xref: /original-bsd/usr.bin/pascal/libpc/PERROR.c (revision 0b685140)
1 /* Copyright (c) 1979 Regents of the University of California */
2 
3 static char sccsid[] = "@(#)PERROR.c 1.1 06/10/81";
4 
5 #include	<stdio.h>
6 #include	<signal.h>
7 #include	"h00vars.h"
8 
9 /*
10  * Routine PERROR is called from the runtime library when a runtime
11  * I/O error occurs. Its arguments are a pointer to an error message and
12  * the name of the offending file.
13  */
14 long
15 PERROR(msg, fname)
16 
17 	char	*msg, *fname;
18 {
19 	PFLUSH();
20 	fputc('\n',stderr);
21 	SETRACE();
22 	fputs(msg, stderr);
23 	perror(fname);
24 	return 0;
25 }
26