aboutsummaryrefslogtreecommitdiffstats
path: root/CWRU/misc/errlist.c
diff options
context:
space:
mode:
Diffstat (limited to 'CWRU/misc/errlist.c')
-rw-r--r--CWRU/misc/errlist.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/CWRU/misc/errlist.c b/CWRU/misc/errlist.c
new file mode 100644
index 0000000..19ca622
--- /dev/null
+++ b/CWRU/misc/errlist.c
@@ -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()
+{
+}