xref: /csrg-svn/usr.bin/pascal/libpc/TEOF.c (revision 3035)
11708Smckusick /* Copyright (c) 1979 Regents of the University of California */
21708Smckusick 
3*3035Smckusic static char sccsid[] = "@(#)TEOF.c 1.2 03/07/81";
41708Smckusick 
51708Smckusick #include "h00vars.h"
61708Smckusick #include "h01errs.h"
71708Smckusick 
8*3035Smckusic bool
91708Smckusick TEOF(filep)
101708Smckusick 
111708Smckusick 	register struct iorec	*filep;
121708Smckusick {
131708Smckusick 	if (filep->fblk >= MAXFILES || _actfile[filep->fblk] != filep) {
141708Smckusick 		ERROR(ENOFILE, 0);
151708Smckusick 		return;
161708Smckusick 	}
171708Smckusick 	if (filep->funit & EOFF)
181708Smckusick 		return TRUE;
191708Smckusick 	IOSYNC(filep);
201708Smckusick 	if (filep->funit & EOFF)
211708Smckusick 		return TRUE;
221708Smckusick 	return FALSE;
231708Smckusick }
24