Imported from ../bash-2.03.tar.gz.
This commit is contained in:
parent
bc4cd23ce9
commit
b72432fdcc
191 changed files with 10113 additions and 3553 deletions
39
CWRU/misc/errlist.c
Normal file
39
CWRU/misc/errlist.c
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* If necessary, link with lib/sh/libsh.a
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
extern char *strerror();
|
||||
|
||||
extern int sys_nerr;
|
||||
|
||||
int
|
||||
main(c, v)
|
||||
int c;
|
||||
char **v;
|
||||
{
|
||||
int i, n;
|
||||
|
||||
if (c == 1) {
|
||||
for (i = 1; i < sys_nerr; i++)
|
||||
printf("%d --> %s\n", i, strerror(i));
|
||||
} else {
|
||||
for (i = 1; i < c; i++) {
|
||||
n = atoi(v[i]);
|
||||
printf("%d --> %s\n", n, strerror(n));
|
||||
}
|
||||
}
|
||||
exit (0);
|
||||
}
|
||||
|
||||
programming_error(a, b)
|
||||
char *a;
|
||||
int b;
|
||||
{
|
||||
}
|
||||
|
||||
fatal_error()
|
||||
{
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue