1*40865Sbostic /*- 2*40865Sbostic * Copyright (c) 1979 The Regents of the University of California. 3*40865Sbostic * All rights reserved. 4*40865Sbostic * 5*40865Sbostic * %sccs.include.redist.c% 6*40865Sbostic */ 71708Smckusick 8*40865Sbostic #ifndef lint 9*40865Sbostic static char sccsid[] = "@(#)TEOF.c 1.5 (Berkeley) 04/09/90"; 10*40865Sbostic #endif /* not lint */ 111708Smckusick 121708Smckusick #include "h00vars.h" 131708Smckusick 143035Smckusic bool 151708Smckusick TEOF(filep) 161708Smckusick 171708Smckusick register struct iorec *filep; 181708Smckusick { 197765Smckusick if (filep->fblk >= MAXFILES || _actfile[filep->fblk] != filep || 207765Smckusick (filep->funit & FDEF)) { 213869Smckusic ERROR("Reference to an inactive file\n", 0); 221708Smckusick return; 231708Smckusick } 247765Smckusick if (filep->funit & (EOFF|FWRITE)) 251708Smckusick return TRUE; 261708Smckusick IOSYNC(filep); 271708Smckusick if (filep->funit & EOFF) 281708Smckusick return TRUE; 291708Smckusick return FALSE; 301708Smckusick } 31