19ca6227f6501c7017a2929bd5c9d1e93e2e4013
[platform/upstream/bash.git] / CWRU / misc / errlist.c
1 /*
2  * If necessary, link with lib/sh/libsh.a
3  */
4
5 #include <stdio.h>
6 #include <errno.h>
7
8 extern char *strerror();
9
10 extern int sys_nerr;
11
12 int
13 main(c, v)
14 int     c;
15 char    **v;
16 {
17         int     i, n;
18
19         if (c == 1) {
20                 for (i = 1; i < sys_nerr; i++)
21                         printf("%d --> %s\n", i, strerror(i));
22         } else {
23                 for (i = 1; i < c; i++) {
24                         n = atoi(v[i]);
25                         printf("%d --> %s\n", n, strerror(n));
26                 }
27         }
28         exit (0);
29 }
30
31 programming_error(a, b)
32 char    *a;
33 int     b;
34 {
35 }
36
37 fatal_error()
38 {
39 }