xref: /csrg-svn/usr.bin/pascal/libpc/PAGE.c (revision 62092)
140865Sbostic /*-
2*62092Sbostic  * Copyright (c) 1979, 1993
3*62092Sbostic  *	The Regents of the University of California.  All rights reserved.
440865Sbostic  *
540865Sbostic  * %sccs.include.redist.c%
640865Sbostic  */
71670Smckusick 
840865Sbostic #ifndef lint
9*62092Sbostic static char sccsid[] = "@(#)PAGE.c	8.1 (Berkeley) 06/06/93";
1040865Sbostic #endif /* not lint */
111670Smckusick 
121670Smckusick #include "h00vars.h"
131670Smckusick 
PAGE(curfile)141670Smckusick PAGE(curfile)
151670Smckusick 
161670Smckusick 	register struct iorec	*curfile;
171670Smckusick {
181670Smckusick 	if (curfile->funit & FREAD) {
193868Smckusic 		ERROR("%s: Attempt to write, but open for reading\n",
203868Smckusic 			curfile->pfname);
211670Smckusick 		return;
221670Smckusick 	}
231670Smckusick 	fputc('', curfile->fbuf);
241670Smckusick 	if (ferror(curfile->fbuf)) {
253868Smckusic 		PERROR("Could not write to ", curfile->pfname);
261670Smckusick 		return;
271670Smckusick 	}
281670Smckusick }
29