|
|
1.1 root 1: #include <stdio.h>
2:
3: static char *iberrs[] =
4: {
5: "No command byte",
6: "CAC conflict",
7: "not CAC",
8: "not SAC",
9: "IFC abort",
10: "timeout",
11: "bad function code",
12: "TCT timeout",
13: "no listeners",
14: "bcr error",
15: "no PP",
16: "ir timeout",
17: "ir next memory",
18: "next memory",
19: "bcr-bar error",
20: "UNIBUS map",
21: "open error",
22: "unused",
23: "unused",
24: "bad ibup function code",
25: "no device",
26: "device not Listener",
27: "device not Talker",
28: };
29:
30: iberr(err, str)
31: char *str;
32: {
33: char *s, buf[256];
34: extern int errno;
35:
36: if(err >= 0)
37: s = "No error";
38: else if((err < 0) && (err > -24))
39: s = iberrs[-1-err];
40: else if(err == -100)
41: sprintf(s = buf, "error -100: errno=%d\n", errno);
42: else
43: sprintf(s = buf, "no message for error %d", err);
44: printf("%d %s: %s\n", err, str, s);
45: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.