/* * ERRPRNT * printfs error message using second optional parameter * in formatting string, the first parameter, and then halts. * Robert L. Kirby on October 9, 1980. * cc -c -O errprnt.c */ #include /*VARARGS*/ errprnt(buf, bp1, bp2, bp3, bp4, bp5, bp6, bp7, bp8, bp9) char *buf, *bp1, *bp2, *bp3, *bp4, *bp5, *bp6, *bp7, *bp8, *bp9; { extern char *argv0; /* A copy of zeroth parameter - the program's name */ fprintf(stderr, "%s ", argv0); fprintf(stderr, buf, bp1, bp2, bp3, bp4, bp5, bp6, bp7, bp8, bp9); fputc('\n', stderr); exit(1); }