SCCS-vsn: usr.bin/pascal/libpc/GETNAME.c 1.2
SCCS-vsn: usr.bin/pascal/libpc/PCLOSE.c 1.2
/*
* have a previous buffer, close associated file
*/
+ if (filep->fblk > PREDEF) {
+ fflush(filep->fbuf);
+ setbuf(filep->fbuf, NULL);
+ }
fclose(filep->fbuf);
if (ferror(filep->fbuf)) {
ERROR(ECLOSE, filep->pfname);
while(next != FILNIL && next->flev <= level) {
if (next->fbuf != 0) {
if ((next->funit & FDEF) == 0) {
+ if (next->fblk > PREDEF) {
+ fflush(next->fblk);
+ setbuf(next->fbuf, NULL);
+ }
fclose(next->fbuf);
if (ferror(next->fbuf)) {
ERROR(ECLOSE, next->pfname);