1 /*- 2 * Copyright (c) 1979, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 */ 7 8 #ifndef lint 9 static char sccsid[] = "@(#)ERROR.c 8.1 (Berkeley) 06/06/93"; 10 #endif /* not lint */ 11 12 #include <stdio.h> 13 #include <signal.h> 14 15 /* 16 * Routine ERROR is called from the runtime library when a runtime 17 * error occurs. Its arguments are a pointer to an error message and 18 * an error specific piece of data. 19 */ 20 long 21 ERROR(msg, d1, d2) 22 23 char *msg; 24 long d1, d2; 25 { 26 PFLUSH(); 27 fputc('\n',stderr); 28 fprintf(stderr, msg, d1, d2); 29 kill(getpid(), SIGTRAP); 30 return d1; 31 } 32