2 * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
3 * See the copyright notice in the ACK home directory, in the file "Copyright".
6 static char rcsid[] = "$Id: error.c,v 3.6 1994/06/24 10:34:38 ceriel Exp $";
13 static short nerrors = 0;
18 extern char *outputname;
19 extern int exitstatus;
30 fatal(format, a1, a2, a3, a4)
34 diag("fatal", format, a1, a2, a3, a4);
39 warning(format, a1, a2, a3, a4)
42 diag("warning", format, a1, a2, a3, a4);
46 error(format, a1, a2, a3, a4)
50 diag("error", format, a1, a2, a3, a4);
54 do_verbose(format, a1, a2, a3, a4)
57 diag((char *) 0, format, a1, a2, a3, a4);
61 diag(tail, format, a1, a2, a3, a4)
65 extern char *progname, *archname, *modulname;
67 fprintf(stderr, "%s: ", progname);
68 if (archname && modulname)
69 fprintf(stderr, "%s(%.14s): ", archname, modulname);
71 fprintf(stderr, "%s: ", archname);
73 fprintf(stderr, "%s: ", modulname);
74 fprintf(stderr, format, a1, a2, a3, a4);
75 if (tail) fprintf(stderr, " (%s)\n", tail);
76 else putc('\n', stderr);