Commit | Line | Data |
---|---|---|
0b85893f KM |
1 | /* Copyright (c) 1979 Regents of the University of California */ |
2 | ||
86997b19 | 3 | static char sccsid[] = "@(#)ERROR.c 1.8 %G%"; |
0b85893f | 4 | |
e939d449 KM |
5 | #include <stdio.h> |
6 | #include <signal.h> | |
7 | #include "h00vars.h" | |
0b85893f KM |
8 | |
9 | /* | |
86997b19 KM |
10 | * Routine ERROR is called from the runtime library when a runtime |
11 | * error occurs. Its arguments are a pointer to an error message and | |
12 | * an error specific piece of data. | |
0b85893f | 13 | */ |
492cc5d3 | 14 | long |
86997b19 | 15 | ERROR(msg, d1, d2) |
0b85893f | 16 | |
d3fdcc0c | 17 | char *msg; |
86997b19 | 18 | long d1, d2; |
d3fdcc0c | 19 | { |
0b85893f KM |
20 | PFLUSH(); |
21 | fputc('\n',stderr); | |
22 | SETRACE(); | |
86997b19 KM |
23 | /* |
24 | * Historical anomaly | |
25 | */ | |
26 | if ((int)msg == 5) { | |
27 | fprintf(stderr, "Label of %D not found in case\n", d1); | |
28 | return d1; | |
0b85893f | 29 | } |
86997b19 KM |
30 | fprintf(stderr, msg, d1, d2); |
31 | return d1; | |
0b85893f | 32 | } |