11648Smckusick /* Copyright (c) 1979 Regents of the University of California */ 21648Smckusick 3*3867Smckusic static char sccsid[] = "@(#)ERROR.c 1.8 06/10/81"; 41648Smckusick 52179Smckusic #include <stdio.h> 62179Smckusic #include <signal.h> 72179Smckusic #include "h00vars.h" 81648Smckusick 91648Smckusick /* 10*3867Smckusic * Routine ERROR is called from the runtime library when a runtime 11*3867Smckusic * error occurs. Its arguments are a pointer to an error message and 12*3867Smckusic * an error specific piece of data. 131648Smckusick */ 143002Smckusic long 15*3867Smckusic ERROR(msg, d1, d2) 161648Smckusick 173857Smckusic char *msg; 18*3867Smckusic long d1, d2; 193857Smckusic { 201648Smckusick PFLUSH(); 211648Smckusick fputc('\n',stderr); 221648Smckusick SETRACE(); 23*3867Smckusic /* 24*3867Smckusic * Historical anomaly 25*3867Smckusic */ 26*3867Smckusic if ((int)msg == 5) { 27*3867Smckusic fprintf(stderr, "Label of %D not found in case\n", d1); 28*3867Smckusic return d1; 291648Smckusick } 30*3867Smckusic fprintf(stderr, msg, d1, d2); 31*3867Smckusic return d1; 321648Smckusick } 33