/* Copyright (c) 1979 Regents of the University of California */
static char sccsid
[] = "@(#)PCLOSE.c 1.4 %G%";
register struct iorec
*next
;
while(next
!= FILNIL
&& next
->flev
<= level
) {
if ((next
->funit
& FDEF
) == 0) {
if (next
->fblk
> PREDEF
) {
setbuf(next
->fbuf
, NULL
);
if (ferror(next
->fbuf
)) {
ERROR("%s: Close failed\n",
if ((next
->funit
& TEMP
) != 0 &&
PERROR("Could not remove ", next
->pfname
);
_actfile
[next
->fblk
] = FILNIL
;