/* Copyright (c) 1979 Regents of the University of California */
static char sccsid
[] = "@(#)IOSYNC.c 1.1 %G%";
* insure that a usable image is in the buffer window
register struct iorec
*curfile
;
register short unit
= curfile
->funit
;
ERROR(EREADIT
, curfile
->pfname
);
if ((unit
& SYNC
) == 0) {
ERROR(EPASTEOF
, curfile
->pfname
);
fread(curfile
->fileptr
, curfile
->fsize
, 1, curfile
->fbuf
);
if (ferror(curfile
->fbuf
)) {
ERROR(EPASTEOF
, curfile
->pfname
);
if (feof(curfile
->fbuf
)) {
curfile
->funit
= unit
| EOFF
;
limit
= &curfile
->fileptr
[curfile
->fsize
];
for (ptr
= curfile
->fileptr
; ptr
< limit
; )
if (*curfile
->fileptr
== '\n') {