9eea165746c09df1d67b2450b0c1325d9e09af62
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
* read sequential formatted external
extern int rd_ed(),rd_ned();
int x_rnew(),x_getc(),x_tab();
LOCAL
char rsfe
[] = "read sfe";
s_rsfe(a
) cilist
*a
; /* start */
if(n
=c_sfe(a
,READ
,SEQ
,rsfe
)) return (n
);
if(curunit
->url
) err(errflag
,F_ERNOSIO
,rsfe
)
if(curunit
->uwrt
&& ! nowreading(curunit
)) err(errflag
, errno
, rsfe
)
donewrec
= dorevert
= doend
= x_rnew
;
if(pars_f()) err(errflag
,F_ERFMT
,rsfe
)
x_rnew() /* find next record */
while((ch
=getc(cf
))!='\n' && ch
!=EOF
);
if (recpos
==0) return(EOF
);
if(curunit
->uend
) return(EOF
);
if((ch
=getc(cf
))!=EOF
&& ch
!='\n')
if(feof(cf
)) curunit
->uend
= YES
;