From b5e91f38a6ff7375230e509eec2eb159a2ca82c6 Mon Sep 17 00:00:00 2001 From: Kirk McKusick Date: Thu, 30 Oct 1980 08:36:24 -0800 Subject: [PATCH] date and time created 80/10/30 00:36:24 by mckusick SCCS-vsn: usr.bin/pascal/libpc/WRITEF.c 1.1 --- usr/src/usr.bin/pascal/libpc/WRITEF.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 usr/src/usr.bin/pascal/libpc/WRITEF.c diff --git a/usr/src/usr.bin/pascal/libpc/WRITEF.c b/usr/src/usr.bin/pascal/libpc/WRITEF.c new file mode 100644 index 0000000000..bc883c6f00 --- /dev/null +++ b/usr/src/usr.bin/pascal/libpc/WRITEF.c @@ -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; + } +} -- 2.20.1