1*40865Sbostic /*- 2*40865Sbostic * Copyright (c) 1979 The Regents of the University of California. 3*40865Sbostic * All rights reserved. 4*40865Sbostic * 5*40865Sbostic * %sccs.include.redist.c% 6*40865Sbostic */ 71648Smckusick 8*40865Sbostic #ifndef lint 9*40865Sbostic static char sccsid[] = "@(#)ERROR.c 1.11 (Berkeley) 04/09/90"; 10*40865Sbostic #endif /* not lint */ 111648Smckusick 122179Smckusic #include <stdio.h> 1310225Smckusick #include <signal.h> 141648Smckusick 151648Smckusick /* 163867Smckusic * Routine ERROR is called from the runtime library when a runtime 173867Smckusic * error occurs. Its arguments are a pointer to an error message and 183867Smckusic * an error specific piece of data. 191648Smckusick */ 203002Smckusic long 213867Smckusic ERROR(msg, d1, d2) 221648Smckusick 233857Smckusic char *msg; 243867Smckusic long d1, d2; 253857Smckusic { 261648Smckusick PFLUSH(); 271648Smckusick fputc('\n',stderr); 285665Smckusic fprintf(stderr, msg, d1, d2); 2910225Smckusick kill(getpid(), SIGTRAP); 303867Smckusic return d1; 311648Smckusick } 32