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