xref: /original-bsd/usr.bin/pascal/libpc/ERROR.c (revision fbed46ce)
1 /* Copyright (c) 1979 Regents of the University of California */
2 
3 static char sccsid[] = "@(#)ERROR.c 1.9 02/02/82";
4 
5 #include	<stdio.h>
6 
7 /*
8  * Routine ERROR is called from the runtime library when a runtime
9  * error occurs. Its arguments are a pointer to an error message and
10  * an error specific piece of data.
11  */
12 long
13 ERROR(msg, d1, d2)
14 
15 	char	*msg;
16 	long	d1, d2;
17 {
18 	PFLUSH();
19 	fputc('\n',stderr);
20 	fprintf(stderr, msg, d1, d2);
21 	SETRACE();
22 	return d1;
23 }
24