11655Smckusick /* Copyright (c) 1979 Regents of the University of California */ 21655Smckusick 3*3867Smckusic static char sccsid[] = "@(#)GET.c 1.2 06/10/81"; 41655Smckusick 51655Smckusick #include "h00vars.h" 61655Smckusick 71655Smckusick GET(curfile) 81655Smckusick 91655Smckusick register struct iorec *curfile; 101655Smckusick { 111655Smckusick if (curfile->funit & FWRITE) { 12*3867Smckusic ERROR("%s: Attempt to read, but open for writing\n", 13*3867Smckusic curfile->pfname); 141655Smckusick return; 151655Smckusick } 161655Smckusick IOSYNC(curfile); 171655Smckusick if (curfile->funit & EOFF) { 18*3867Smckusic ERROR("%s: Tried to read past end of file\n", curfile->pfname); 191655Smckusick return; 201655Smckusick } 211655Smckusick curfile->funit |= SYNC; 221655Smckusick } 23