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(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: }
Last modified: 1979-01-10
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 472
Valid CSS Valid XHTML 1.0 Strict