3 extern uiolen f__reclen
;
12 if(a
->ciunit
>= MXUNIT
|| a
->ciunit
< 0)
13 err(a
->cierr
,101,"startio");
14 f__external
=f__sequential
=1;
16 f__curunit
= &f__units
[a
->ciunit
];
18 if(f__curunit
->ufd
==NULL
&& fk_open(SEQ
,UNF
,a
->ciunit
))
19 err(a
->cierr
,114,"sue");
20 f__cf
=f__curunit
->ufd
;
21 if(f__curunit
->ufmt
) err(a
->cierr
,103,"sue");
22 if(!f__curunit
->useek
) err(a
->cierr
,103,"sue");
26 integer
s_rsue(a
) cilist
*a
;
28 integer
s_rsue(cilist
*a
)
32 if(f__init
!= 1) f_init();
35 if(n
=c_sue(a
)) return(n
);
37 if(f__curunit
->uwrt
&& f__nowreading(f__curunit
))
38 err(a
->cierr
, errno
, "read start");
39 if(fread((char *)&f__reclen
,sizeof(uiolen
),1,f__cf
)
42 { f__curunit
->uend
= 1;
43 err(a
->ciend
, EOF
, "start");
46 err(a
->cierr
, errno
, "start");
51 integer
s_wsue(a
) cilist
*a
;
53 integer
s_wsue(cilist
*a
)
57 if(f__init
!= 1) f_init();
59 if(n
=c_sue(a
)) return(n
);
62 if(f__curunit
->uwrt
!= 1 && f__nowwriting(f__curunit
))
63 err(a
->cierr
, errno
, "write start");
64 f__recloc
=ftell(f__cf
);
65 (void) fseek(f__cf
,(long)sizeof(uiolen
),SEEK_CUR
);
71 fwrite((char *)&f__reclen
,sizeof(uiolen
),1,f__cf
);
74 err(f__elist
->cierr
, errno
, "write end");
77 fseek(f__cf
,f__recloc
,SEEK_SET
);
78 fwrite((char *)&f__reclen
,sizeof(uiolen
),1,f__cf
);
79 fseek(f__cf
,loc
,SEEK_SET
);
85 (void) fseek(f__cf
,(long)(f__reclen
-f__recpos
+sizeof(uiolen
)),SEEK_CUR
);