1 /* $Id: error.c,v 1.9 1995/08/17 13:33:49 ceriel Exp $ */
3 * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
4 * See the copyright notice in the ACK home directory, in the file "Copyright".
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 */
18 /* This file contains the (non-portable) error-message and diagnostic
19 functions. Beware, they are called with a variable number of
29 fprint(ERROUT, "\"%s\", line %d: %s", FileName, LineNumber, s);
31 else fprint(ERROUT, s);
43 doprnt(ERROUT, fmt, ap);
49 warning(char *fmt, ...)
54 err_hdr("(warning) ");
55 doprnt(ERROUT, fmt, ap);
66 err_hdr("CRASH\007 ");
67 doprnt(ERROUT, fmt, ap);
79 err_hdr("fatal error -- ");
80 doprnt(ERROUT, fmt, ap);
96 fmt = va_arg(ap, char *);
97 doprnt(ERROUT, fmt, ap);
109 err_hdr("(warning) ");
111 fmt = va_arg(ap, char *);
112 doprnt(ERROUT, fmt, ap);
113 fprint(ERROUT, "\n");
124 err_hdr("CRASH\007 ");
126 fmt = va_arg(ap, char *);
127 doprnt(ERROUT, fmt, ap);
128 fprint(ERROUT, "\n");
140 err_hdr("fatal error -- ");
142 fmt = va_arg(ap, char *);
143 doprnt(ERROUT, fmt, ap);
144 fprint(ERROUT, "\n");