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