Annotation of 43BSD/ingres/source/gutil/perror.c, revision 1.1.1.1

1.1       root        1: # include      <sccs.h>
                      2: 
                      3: SCCSID(@(#)perror.c    8.1     12/31/84)
                      4: 
                      5: /*
                      6:  * Print the error indicated
                      7:  * in the cerror cell.
                      8:  * ----
                      9:  * this code stolen from the system perror, the only change is that we print
                     10:  * on 1, instead of 2 (which is usally closed).
                     11:  */
                     12: 
                     13: int    errno;
                     14: int    sys_nerr;
                     15: char   *sys_errlist[];
                     16: perror(s)
                     17: char *s;
                     18: {
                     19:        register char *c;
                     20:        register n;
                     21: 
                     22:        c = "Unknown error";
                     23:        if(errno < sys_nerr)
                     24:                c = sys_errlist[errno];
                     25:        n = strlen(s);
                     26:        if(n) {
                     27:                write(1, s, n);
                     28:                write(1, ": ", 2);
                     29:        }
                     30:        write(1, c, strlen(c));
                     31:        write(1, "\n", 1);
                     32: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.