home *** CD-ROM | disk | FTP | other *** search
- #include <varargs.h>
- #include <stdio.h>
-
- extern char *myname();
- extern void format();
- extern char *sysmess();
-
- extern int errno;
- extern FILE *outfp;
-
- static
- int
- couldnot_putc(c)
- int c;
- {
- putc(c, outfp);
- }
-
- /*
- * "couldnot(printf_like_format, printf_like_arg, ...);"
- */
- void
- couldnot(va_alist)
- va_dcl
- {
- register char *cp;
- va_list ap;
-
- fprintf(outfp, "%s: could not ", myname());
- va_start(ap);
- format(couldnot_putc, &ap);
- va_end(ap);
- cp = sysmess();
- if (cp != (char *)0 && *cp != '\0')
- {
- fprintf(outfp, ": %s", cp);
- errno = 0;
- }
- fprintf(outfp, ".\n");
- fflush(outfp);
- _exit(1);
- }
-