xref: /csrg-svn/usr.bin/pascal/libpc/PFLUSH.c (revision 62094)
140865Sbostic /*-
2*62094Sbostic  * Copyright (c) 1979, 1993
3*62094Sbostic  *	The Regents of the University of California.  All rights reserved.
440865Sbostic  *
540865Sbostic  * %sccs.include.redist.c%
640865Sbostic  */
71674Smckusick 
840865Sbostic #ifndef lint
9*62094Sbostic static char sccsid[] = "@(#)PFLUSH.c	8.1 (Berkeley) 06/06/93";
1040865Sbostic #endif /* not lint */
111674Smckusick 
121674Smckusick #include "h00vars.h"
131674Smckusick 
141674Smckusick /*
151674Smckusick  * insure that a usable image is in the buffer window
161674Smckusick  */
PFLUSH()171674Smckusick PFLUSH()
181674Smckusick {
191674Smckusick 	register struct iorec	*next;
201674Smckusick 
2110564Smckusick 	for (next = _fchain.fchain; next != FILNIL; next = next->fchain) {
2210564Smckusick 		if ((next->funit & (FDEF | FREAD)) != 0)
2310564Smckusick 			continue;
2410564Smckusick 		if (next->fbuf != 0)
251674Smckusick 			fflush(next->fbuf);
261674Smckusick 	}
271674Smckusick }
28