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".
5 /* $Id: error.c,v 1.5 1995/08/17 16:43:36 ceriel Exp $ */
6 /* E R R O R A N D D I A G N O S T I C R O U T I N E S */
19 /* This file contains the (non-portable) error-message and diagnostic
20 functions. Beware, they are called with a variable number of
30 fprint(ERROUT, "\"%s\", line %d: %s", FileName, (int)LineNumber, s);
32 else fprint(ERROUT, s);
44 doprnt(ERROUT, fmt, ap);
50 warning(char *fmt, ...)
54 err_hdr("(warning) ");
56 doprnt(ERROUT, fmt, ap);
62 strict(char *fmt, ...)
68 doprnt(ERROUT, fmt, ap);
78 err_hdr("CRASH\007 ");
80 doprnt(ERROUT, fmt, ap);
91 err_hdr("fatal error -- ");
93 doprnt(ERROUT, fmt, ap);
109 fmt = va_arg(ap, char *);
110 doprnt(ERROUT, fmt, ap);
111 fprint(ERROUT, "\n");
122 err_hdr("(warning) ");
124 fmt = va_arg(ap, char *);
125 doprnt(ERROUT, fmt, ap);
126 fprint(ERROUT, "\n");
137 err_hdr("(strict) ");
139 fmt = va_arg(ap, char *);
140 doprnt(ERROUT, fmt, ap);
141 fprint(ERROUT, "\n");
152 err_hdr("CRASH\007 ");
154 fmt = va_arg(ap, char *);
155 doprnt(ERROUT, fmt, ap);
156 fprint(ERROUT, "\n");
168 err_hdr("fatal error -- ");
170 fmt = va_arg(ap, char *);
171 doprnt(ERROUT, fmt, ap);
172 fprint(ERROUT, "\n");