Annotation of coherent/d/lib/libc/gen/perror.c, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Print error messages based on value in `errno'.
                      3:  */
                      4: 
                      5: #include <stdio.h>
                      6: 
                      7: extern int     errno;
                      8: extern char    *sys_errlist[];
                      9: extern int     sys_nerr;
                     10: 
                     11: perror(s)
                     12: register char *s;
                     13: {
                     14:        register char *es;
                     15: 
                     16:        if (errno < sys_nerr)
                     17:                es = sys_errlist[errno]; else
                     18:                es = "Bad error number";
                     19:        if (s != NULL) {
                     20:                fputs(s, stderr);
                     21:                fputs(": ", stderr);
                     22:        }
                     23:        fputs(es, stderr);
                     24:        fputs("\n", stderr);
                     25: }

unix.superglobalmegacorp.com

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