Pristine Ack-5.5
[Ack-5.5.git] / lang / fortran / lib / libI77 / sfe.c
1 /* sequential formatted external common routines*/
2 #include "f2c.h"
3 #include "fio.h"
4
5 extern char *fmtbuf;
6
7 integer e_rsfe()
8 {       int n;
9         n=en_fio();
10         if (cf == stdout)
11                 fflush(stdout);
12         else if (cf == stderr)
13                 fflush(stderr);
14         fmtbuf=NULL;
15         return(n);
16 }
17 c_sfe(a) cilist *a; /* check */
18 {       unit *p;
19         if(a->ciunit >= MXUNIT || a->ciunit<0)
20                 err(a->cierr,101,"startio");
21         p = &units[a->ciunit];
22         if(p->ufd==NULL && fk_open(SEQ,FMT,a->ciunit)) err(a->cierr,114,"sfe")
23         if(!p->ufmt) err(a->cierr,102,"sfe")
24         return(0);
25 }
26 integer e_wsfe()
27 {       return(e_rsfe());
28 }