* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
* write sequential formatted external
LOCAL
char wsfe
[] = "write sfe";
extern int w_ed(),w_ned();
int x_putc(),pr_put(),x_wend(),x_wnew(),x_tab();
s_wsfe(a
) cilist
*a
; /*start*/
if(n
=c_sfe(a
,WRITE
,SEQ
,wsfe
)) return(n
);
if(curunit
->url
) err(errflag
,F_ERNOSIO
,wsfe
)
if(!curunit
->uwrt
&& ! nowwriting(curunit
)) err(errflag
, errno
, wsfe
)
if (curunit
->uprnt
) putn
= pr_put
;
dorevert
= donewrec
= x_wnew
;
if(pars_f()) err(errflag
,F_ERFMT
,wsfe
)
if(c
=='\n') recpos
= reclen
= cursor
= 0;
recpos
= reclen
= cursor
= 0;
else if(c
=='1') c
= '\f';
if(reclen
>recpos
) fseek(cf
,(long)(reclen
-recpos
),1);
if(reclen
>recpos
) fseek(cf
,(long)(reclen
-recpos
),1);