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 */ 71651Smckusick 8*40865Sbostic #ifndef lint 9*40865Sbostic static char sccsid[] = "@(#)FLUSH.c 1.3 (Berkeley) 04/09/90"; 10*40865Sbostic #endif /* not lint */ 111651Smckusick 121651Smckusick #include "h00vars.h" 131651Smckusick 141651Smckusick FLUSH(curfile) 151651Smckusick 161651Smckusick register struct iorec *curfile; 171651Smckusick { 181651Smckusick if (curfile->fblk >= MAXFILES || _actfile[curfile->fblk] != curfile) { 193867Smckusic ERROR("Reference to an inactive file\n", 0); 201651Smckusick return; 211651Smckusick } 221651Smckusick if (curfile->funit & FWRITE) { 231651Smckusick fflush(curfile->fbuf); 241651Smckusick } 251651Smckusick } 26