Commit | Line | Data |
---|---|---|
c4d236a1 KM |
1 | /* Copyright (c) 1979 Regents of the University of California */ |
2 | ||
86997b19 | 3 | static char sccsid[] = "@(#)FLUSH.c 1.2 %G%"; |
c4d236a1 KM |
4 | |
5 | #include "h00vars.h" | |
c4d236a1 KM |
6 | |
7 | FLUSH(curfile) | |
8 | ||
9 | register struct iorec *curfile; | |
10 | { | |
11 | if (curfile->fblk >= MAXFILES || _actfile[curfile->fblk] != curfile) { | |
86997b19 | 12 | ERROR("Reference to an inactive file\n", 0); |
c4d236a1 KM |
13 | return; |
14 | } | |
15 | if (curfile->funit & FWRITE) { | |
16 | fflush(curfile->fbuf); | |
17 | } | |
18 | } |