11715Smckusick /* Copyright (c) 1979 Regents of the University of California */ 21715Smckusick 3*3039Smckusic static char sccsid[] = "@(#)WRITEC.c 1.2 03/07/81"; 41715Smckusick 51715Smckusick #include "h00vars.h" 61715Smckusick #include "h01errs.h" 71715Smckusick 81715Smckusick WRITEC(curfile, d1, d2) 91715Smckusick 101715Smckusick register struct iorec *curfile; 11*3039Smckusic long d1; 12*3039Smckusic FILE *d2; 131715Smckusick { 141715Smckusick if (curfile->funit & FREAD) { 151715Smckusick ERROR(EWRITEIT, curfile->pfname); 161715Smckusick return; 171715Smckusick } 18*3039Smckusic fputc((char)d1, d2); 191715Smckusick if (ferror(curfile->fbuf)) { 201715Smckusick ERROR(EWRITE, curfile->pfname); 211715Smckusick return; 221715Smckusick } 231715Smckusick } 24