extern int rd_ed(),rd_ned(),y_getc(),y_putc(),y_err();
extern int y_rev(), y_rsk();
extern int w_ed(),w_ned();
if(curunit
->uwrt
) (void) nowreading(curunit
);
dorevert
= donewrec
= y_err
;
err(a
->cierr
,100,"startio");
if(n
=c_dfe(a
)) return(n
);
if(!curunit
->uwrt
) (void) nowwriting(curunit
);
dorevert
= donewrec
= y_err
;
err(a
->cierr
,100,"startwrt");
if(a
->ciunit
>MXUNIT
|| a
->ciunit
<0)
err(a
->cierr
,101,"startchk");
curunit
= &units
[a
->ciunit
];
if(curunit
->ufd
==NULL
&& fk_open(DIR,FMT
,a
->ciunit
))
if(!curunit
->ufmt
) err(a
->cierr
,102,"dfe")
if(!curunit
->useek
) err(a
->cierr
,104,"dfe")
(void) fseek(cf
,(long)curunit
->url
* (a
->cirec
-1),0);
if(curunit
->uend
|| curunit
->url
<= recpos
|| curunit
->url
== 1) return;
} while(++recpos
< curunit
->url
);
if(curunit
->uend
) return(-1);
if(curunit
->url
>=recpos
||
err(elist
->cierr
,errno
,"readingd");
if(recpos
<= curunit
->url
|| curunit
->url
==1)
err(elist
->cierr
,110,"dout");
{ /*what about work done?*/
if(curunit
->url
==1 || recpos
==curunit
->url
)
while(recpos
<curunit
->url
)
err(elist
->cierr
, 110, "dfe");