date and time created 81/06/10 00:48:04 by mckusick
authorKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Wed, 10 Jun 1981 15:48:04 +0000 (07:48 -0800)
committerKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Wed, 10 Jun 1981 15:48:04 +0000 (07:48 -0800)
SCCS-vsn: usr.bin/pascal/libpc/PERROR.c 1.1

usr/src/usr.bin/pascal/libpc/PERROR.c [new file with mode: 0644]

diff --git a/usr/src/usr.bin/pascal/libpc/PERROR.c b/usr/src/usr.bin/pascal/libpc/PERROR.c
new file mode 100644 (file)
index 0000000..cb84f41
--- /dev/null
@@ -0,0 +1,25 @@
+/* Copyright (c) 1979 Regents of the University of California */
+
+static char sccsid[] = "@(#)PERROR.c 1.1 %G%";
+
+#include       <stdio.h>
+#include       <signal.h>
+#include       "h00vars.h"
+
+/*
+ * Routine PERROR is called from the runtime library when a runtime
+ * I/O error occurs. Its arguments are a pointer to an error message and 
+ * the name of the offending file.
+ */
+long
+PERROR(msg, fname)
+
+       char    *msg, *fname;
+{
+       PFLUSH();
+       fputc('\n',stderr);
+       SETRACE();
+       fputs(msg, stderr);
+       perror(fname);
+       return 0;
+}