date and time created 80/10/30 00:36:24 by mckusick
authorKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Thu, 30 Oct 1980 16:36:24 +0000 (08:36 -0800)
committerKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Thu, 30 Oct 1980 16:36:24 +0000 (08:36 -0800)
SCCS-vsn: usr.bin/pascal/libpc/WRITEF.c 1.1

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

diff --git a/usr/src/usr.bin/pascal/libpc/WRITEF.c b/usr/src/usr.bin/pascal/libpc/WRITEF.c
new file mode 100644 (file)
index 0000000..bc883c6
--- /dev/null
@@ -0,0 +1,22 @@
+/* Copyright (c) 1979 Regents of the University of California */
+
+static char sccsid[] = "@(#)WRITEF.c 1.1 %G%";
+
+#include "h00vars.h"
+#include "h01errs.h"
+
+WRITEF(curfile, d1, d2, d3, d4, d5, d6)
+
+       register struct iorec   *curfile;
+       int                     d1, d2, d3, d4, d5, d6;
+{
+       if (curfile->funit & FREAD) {
+               ERROR(EWRITEIT, curfile->pfname);
+               return;
+       }
+       fprintf(d1, d2, d3, d4, d5, d6);
+       if (ferror(curfile->fbuf)) {
+               ERROR(EWRITE, curfile->pfname);
+               return;
+       }
+}