* configure.in: Add ${libgcj} to noconfigdirs for xtensa-*-* targets.
[official-gcc.git] / libf2c / libI77 / sfe.c
blob8f05e4806620571ecc643d73f8654f93e3b7e3b5
1 /* sequential formatted external common routines*/
2 #include "config.h"
3 #include "f2c.h"
4 #include "fio.h"
6 extern char *f__fmtbuf;
8 integer
9 e_rsfe (void)
11 int n;
12 f__init = 1;
13 n = en_fio ();
14 f__fmtbuf = NULL;
15 return (n);
18 int
19 c_sfe (cilist * a) /* check */
21 unit *p;
22 if (a->ciunit >= MXUNIT || a->ciunit < 0)
23 err (a->cierr, 101, "startio");
24 p = &f__units[a->ciunit];
25 if (p->ufd == NULL && fk_open (SEQ, FMT, a->ciunit))
26 err (a->cierr, 114, "sfe");
27 if (!p->ufmt)
28 err (a->cierr, 102, "sfe");
29 return (0);
32 integer
33 e_wsfe (void)
35 int n;
36 f__init = 1;
37 n = en_fio ();
38 f__fmtbuf = NULL;
39 #ifdef ALWAYS_FLUSH
40 if (!n && fflush (f__cf))
41 err (f__elist->cierr, errno, "write end");
42 #endif
43 return n;