11676Smckusick /* Copyright (c) 1979 Regents of the University of California */ 21676Smckusick 3*3017Smckusic static char sccsid[] = "@(#)PUT.c 1.2 03/07/81"; 41676Smckusick 51676Smckusick #include "h00vars.h" 61676Smckusick #include "h01errs.h" 71676Smckusick 81676Smckusick PUT(curfile) 91676Smckusick 101676Smckusick register struct iorec *curfile; 111676Smckusick { 121676Smckusick if (curfile->funit & FREAD) { 131676Smckusick ERROR(EWRITEIT, curfile->pfname); 141676Smckusick return; 151676Smckusick } 16*3017Smckusic fwrite(curfile->fileptr, (int)curfile->fsize, 1, curfile->fbuf); 171676Smckusick if (ferror(curfile->fbuf)) { 181676Smckusick ERROR(EWRITE, curfile->pfname); 191676Smckusick return; 201676Smckusick } 211676Smckusick } 22