From: Kirk McKusick Date: Thu, 30 Oct 1980 16:36:21 +0000 (-0800) Subject: date and time created 80/10/30 00:36:21 by mckusick X-Git-Tag: BSD-4^3~69 X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/commitdiff_plain/55bf170c9d649be7c682614423371ff4c4ba45d6 date and time created 80/10/30 00:36:21 by mckusick SCCS-vsn: usr.bin/pascal/libpc/WRITEC.c 1.1 --- diff --git a/usr/src/usr.bin/pascal/libpc/WRITEC.c b/usr/src/usr.bin/pascal/libpc/WRITEC.c new file mode 100644 index 0000000000..34513611c4 --- /dev/null +++ b/usr/src/usr.bin/pascal/libpc/WRITEC.c @@ -0,0 +1,22 @@ +/* Copyright (c) 1979 Regents of the University of California */ + +static char sccsid[] = "@(#)WRITEC.c 1.1 %G%"; + +#include "h00vars.h" +#include "h01errs.h" + +WRITEC(curfile, d1, d2) + + register struct iorec *curfile; + int d1, d2; +{ + if (curfile->funit & FREAD) { + ERROR(EWRITEIT, curfile->pfname); + return; + } + fputc(d1, d2); + if (ferror(curfile->fbuf)) { + ERROR(EWRITE, curfile->pfname); + return; + } +}