sfe.c
Go to the documentation of this file.
00001 /* sequential formatted external common routines*/
00002 #include "f2c.h"
00003 #include "fio.h"
00004 #ifdef __cplusplus
00005 extern "C" {
00006 #endif
00007 
00008 #ifdef KR_headers
00009 extern char *f__fmtbuf;
00010 #else
00011 extern const char *f__fmtbuf;
00012 #endif
00013 
00014 integer e_rsfe(Void)
00015 {       int n;
00016         n=en_fio();
00017         f__fmtbuf=NULL;
00018         return(n);
00019 }
00020 
00021  int
00022 #ifdef KR_headers
00023 c_sfe(a) cilist *a; /* check */
00024 #else
00025 c_sfe(cilist *a) /* check */
00026 #endif
00027 {       unit *p;
00028         f__curunit = p = &f__units[a->ciunit];
00029         if(a->ciunit >= MXUNIT || a->ciunit<0)
00030                 err(a->cierr,101,"startio");
00031         if(p->ufd==NULL && fk_open(SEQ,FMT,a->ciunit)) err(a->cierr,114,"sfe")
00032         if(!p->ufmt) err(a->cierr,102,"sfe")
00033         return(0);
00034 }
00035 integer e_wsfe(Void)
00036 {
00037         int n = en_fio();
00038         f__fmtbuf = NULL;
00039 #ifdef ALWAYS_FLUSH
00040         if (!n && fflush(f__cf))
00041                 err(f__elist->cierr, errno, "write end");
00042 #endif
00043         return n;
00044 }
00045 #ifdef __cplusplus
00046 }
00047 #endif


swiftnav
Author(s):
autogenerated on Sat Jun 8 2019 18:56:05