too much information...
[unix-history] / usr / src / usr.bin / pascal / libpc / ERROR.c
CommitLineData
0b85893f
KM
1/* Copyright (c) 1979 Regents of the University of California */
2
5e75e883 3static char sccsid[] = "@(#)ERROR.c 1.10 %G%";
0b85893f 4
e939d449 5#include <stdio.h>
5e75e883 6#include <signal.h>
0b85893f
KM
7
8/*
86997b19
KM
9 * Routine ERROR is called from the runtime library when a runtime
10 * error occurs. Its arguments are a pointer to an error message and
11 * an error specific piece of data.
0b85893f 12 */
492cc5d3 13long
86997b19 14ERROR(msg, d1, d2)
0b85893f 15
d3fdcc0c 16 char *msg;
86997b19 17 long d1, d2;
d3fdcc0c 18{
0b85893f
KM
19 PFLUSH();
20 fputc('\n',stderr);
86997b19 21 fprintf(stderr, msg, d1, d2);
5e75e883 22 kill(getpid(), SIGTRAP);
86997b19 23 return d1;
0b85893f 24}