|
|
1.1 root 1: static char Sccsid[]= "@(#)perror.c 1.1 (Ingres) 4/30/82";
2: /*
3: * Print the error indicated
4: * in the cerror cell.
5: * ----
6: * this code stolen from the system perror, the only change is that we print
7: * on 1, instead of 2 (which is usally closed).
8: */
9:
10: int errno;
11: int sys_nerr;
12: char *sys_errlist[];
13: perror(s)
14: char *s;
15: {
16: register char *c;
17: register n;
18:
19: c = "Unknown error";
20: if(errno < sys_nerr)
21: c = sys_errlist[errno];
22: n = strlen(s);
23: if(n) {
24: write(1, s, n);
25: write(1, ": ", 2);
26: }
27: write(1, c, strlen(c));
28: write(1, "\n", 1);
29: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.