SCCS-vsn: usr.bin/pascal/libpc/FNIL.c 1.2
SCCS-vsn: usr.bin/pascal/libpc/IOSYNC.c 1.2
/* Copyright (c) 1979 Regents of the University of California */
/* Copyright (c) 1979 Regents of the University of California */
-static char sccsid[] = "@(#)FNIL.c 1.1 %G%";
+static char sccsid[] = "@(#)FNIL.c 1.2 %G%";
#include "h00vars.h"
#include "h01errs.h"
#include "h00vars.h"
#include "h01errs.h"
}
if (curfile->funit & FREAD) {
IOSYNC(curfile);
}
if (curfile->funit & FREAD) {
IOSYNC(curfile);
- if (curfile->funit & EOFF) {
- ERROR(EPASTEOF, curfile->pfname);
- return;
- }
}
return curfile->fileptr;
}
}
return curfile->fileptr;
}
/* Copyright (c) 1979 Regents of the University of California */
/* Copyright (c) 1979 Regents of the University of California */
-static char sccsid[] = "@(#)IOSYNC.c 1.1 %G%";
+static char sccsid[] = "@(#)IOSYNC.c 1.2 %G%";
#include "h00vars.h"
#include "h01errs.h"
#include "h00vars.h"
#include "h01errs.h"
}
if (feof(curfile->fbuf)) {
curfile->funit = unit | EOFF;
}
if (feof(curfile->fbuf)) {
curfile->funit = unit | EOFF;
+ if (unit & FTEXT) {
+ *curfile->fileptr = ' ';
+ return;
+ }
limit = &curfile->fileptr[curfile->fsize];
for (ptr = curfile->fileptr; ptr < limit; )
*ptr++ = 0;
limit = &curfile->fileptr[curfile->fsize];
for (ptr = curfile->fileptr; ptr < limit; )
*ptr++ = 0;