1*1715Smckusick /* Copyright (c) 1979 Regents of the University of California */ 2*1715Smckusick 3*1715Smckusick static char sccsid[] = "@(#)WRITEC.c 1.1 10/30/80"; 4*1715Smckusick 5*1715Smckusick #include "h00vars.h" 6*1715Smckusick #include "h01errs.h" 7*1715Smckusick 8*1715Smckusick WRITEC(curfile, d1, d2) 9*1715Smckusick 10*1715Smckusick register struct iorec *curfile; 11*1715Smckusick int d1, d2; 12*1715Smckusick { 13*1715Smckusick if (curfile->funit & FREAD) { 14*1715Smckusick ERROR(EWRITEIT, curfile->pfname); 15*1715Smckusick return; 16*1715Smckusick } 17*1715Smckusick fputc(d1, d2); 18*1715Smckusick if (ferror(curfile->fbuf)) { 19*1715Smckusick ERROR(EWRITE, curfile->pfname); 20*1715Smckusick return; 21*1715Smckusick } 22*1715Smckusick } 23