source: branches/libc-0.6/src/gcc/libf2c/libI77/sfe.c

Last change on this file was 1392, checked in by bird, 21 years ago

This commit was generated by cvs2svn to compensate for changes in r1391,
which included commits to RCS files with non-trunk default branches.

  • Property cvs2svn:cvs-rev set to 1.1.1.2
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 743 bytes
Line 
1/* sequential formatted external common routines*/
2#include "config.h"
3#include "f2c.h"
4#include "fio.h"
5
6extern char *f__fmtbuf;
7
8integer
9e_rsfe (void)
10{
11 int n;
12 f__init = 1;
13 n = en_fio ();
14 f__fmtbuf = NULL;
15 return (n);
16}
17
18int
19c_sfe (cilist * a) /* check */
20{
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);
30}
31
32integer
33e_wsfe (void)
34{
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;
44}
Note: See TracBrowser for help on using the repository browser.