|
|
1.1 ! root 1: /* ! 2: * Put message and die. ! 3: */ ! 4: #include <stdio.h> ! 5: #include <errno.h> ! 6: ! 7: void ! 8: fatal(s) ! 9: char *s; ! 10: { ! 11: int save = errno; ! 12: ! 13: fprintf(stderr, "\nfatal: %r\n", &s); ! 14: if (0 != (errno = save)) ! 15: perror("errno reports"); ! 16: exit(1); ! 17: } ! 18: ! 19: #ifdef TEST ! 20: main() ! 21: { ! 22: xopen("Bogus.file", "r"); ! 23: } ! 24: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.