|
|
1.1 ! root 1: static char ID[] = "@(#) fatal.c: 1.1 3/16/82"; ! 2: #include <stdio.h> ! 3: #include "sdp.h" ! 4: ! 5: char *llaerrfile = "stderr" ; ! 6: int mesg_flag = MESGON ; ! 7: ! 8: FATAL(msg,v1,v2,v3,v4,v5,v6,v7) ! 9: char *msg ; ! 10: int v1 ; ! 11: int v2 ; ! 12: int v3 ; ! 13: int v4 ; ! 14: int v5 ; ! 15: int v6 ; ! 16: int v7 ; ! 17: { ! 18: static FILE *fp = NULL ; ! 19: ! 20: switch(fp) ! 21: { ! 22: case NULL: ! 23: if(strcmp(llaerrfile,"stderr") == 0) ! 24: fp = stderr ; ! 25: else if( (fp = fopen(llaerrfile,"w")) == NULL ) ! 26: exit(-2) ; ! 27: default: ! 28: if(mesg_flag == MESGON) ! 29: fprintf(fp,msg,v1,v2,v3,v4,v5,v6,v7) ; ! 30: } ! 31: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.