Added gitignore entries needed to ignore derived objects generated from full build...
[bash.git] / CWRU / misc / errlist.c
blob53c368d36c894a6869a6442569e372110656d552
1 /*
2 * If necessary, link with lib/sh/libsh.a
3 */
5 /* Copyright (C) 1998-2009 Free Software Foundation, Inc.
7 This file is part of GNU Bash, the Bourne Again SHell.
9 Bash is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
14 Bash is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with Bash. If not, see <http://www.gnu.org/licenses/>.
23 #include <stdio.h>
24 #include <errno.h>
26 extern char *strerror();
28 extern int sys_nerr;
30 int
31 main(c, v)
32 int c;
33 char **v;
35 int i, n;
37 if (c == 1) {
38 for (i = 1; i < sys_nerr; i++)
39 printf("%d --> %s\n", i, strerror(i));
40 } else {
41 for (i = 1; i < c; i++) {
42 n = atoi(v[i]);
43 printf("%d --> %s\n", n, strerror(n));
46 exit (0);
49 programming_error(a, b)
50 char *a;
51 int b;
55 fatal_error()