Annotation of researchv9/libc/gen/perror.c, revision 1.1

1.1     ! root        1: /*
        !             2:  * Print the error indicated
        !             3:  * in the cerror cell.
        !             4:  */
        !             5: 
        !             6: int    errno;
        !             7: int    sys_nerr;
        !             8: char   *sys_errlist[];
        !             9: perror(s)
        !            10: char *s;
        !            11: {
        !            12:        register char *c;
        !            13:        register n;
        !            14: 
        !            15:        c = "Unknown error";
        !            16:        if((unsigned)errno < sys_nerr)
        !            17:                c = sys_errlist[errno];
        !            18:        n = strlen(s);
        !            19:        if(n) {
        !            20:                write(2, s, n);
        !            21:                write(2, ": ", 2);
        !            22:        }
        !            23:        write(2, c, strlen(c));
        !            24:        write(2, "\n", 1);
        !            25: }

unix.superglobalmegacorp.com

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