xref: /csrg-svn/usr.bin/pascal/libpc/PFLUSH.c (revision 10564)
11674Smckusick /* Copyright (c) 1979 Regents of the University of California */
21674Smckusick 
3*10564Smckusick static char sccsid[] = "@(#)PFLUSH.c 1.2 01/21/83";
41674Smckusick 
51674Smckusick #include "h00vars.h"
61674Smckusick 
71674Smckusick /*
81674Smckusick  * insure that a usable image is in the buffer window
91674Smckusick  */
101674Smckusick PFLUSH()
111674Smckusick {
121674Smckusick 	register struct iorec	*next;
131674Smckusick 
14*10564Smckusick 	for (next = _fchain.fchain; next != FILNIL; next = next->fchain) {
15*10564Smckusick 		if ((next->funit & (FDEF | FREAD)) != 0)
16*10564Smckusick 			continue;
17*10564Smckusick 		if (next->fbuf != 0)
181674Smckusick 			fflush(next->fbuf);
191674Smckusick 	}
201674Smckusick }
21