xref: /csrg-svn/usr.bin/pascal/libpc/ERROR.c (revision 5665)
11648Smckusick /* Copyright (c) 1979 Regents of the University of California */
21648Smckusick 
3*5665Smckusic static char sccsid[] = "@(#)ERROR.c 1.9 02/02/82";
41648Smckusick 
52179Smckusic #include	<stdio.h>
61648Smckusick 
71648Smckusick /*
83867Smckusic  * Routine ERROR is called from the runtime library when a runtime
93867Smckusic  * error occurs. Its arguments are a pointer to an error message and
103867Smckusic  * an error specific piece of data.
111648Smckusick  */
123002Smckusic long
133867Smckusic ERROR(msg, d1, d2)
141648Smckusick 
153857Smckusic 	char	*msg;
163867Smckusic 	long	d1, d2;
173857Smckusic {
181648Smckusick 	PFLUSH();
191648Smckusick 	fputc('\n',stderr);
20*5665Smckusic 	fprintf(stderr, msg, d1, d2);
211648Smckusick 	SETRACE();
223867Smckusic 	return d1;
231648Smckusick }
24