Doxygen Source Code Documentation
Main Page Alphabetical List Data Structures File List Data Fields Globals Search
sfe.c
Go to the documentation of this file.00001
00002 #include "f2c.h"
00003 #include "fio.h"
00004
00005 extern char *f__fmtbuf;
00006
00007 integer e_rsfe(Void)
00008 { int n;
00009 n=en_fio();
00010 if (f__cf == stdout)
00011 fflush(stdout);
00012 else if (f__cf == stderr)
00013 fflush(stderr);
00014 f__fmtbuf=NULL;
00015 return(n);
00016 }
00017 #ifdef KR_headers
00018 c_sfe(a) cilist *a;
00019 #else
00020 c_sfe(cilist *a)
00021 #endif
00022 { unit *p;
00023 if(a->ciunit >= MXUNIT || a->ciunit<0)
00024 err(a->cierr,101,"startio");
00025 p = &f__units[a->ciunit];
00026 if(p->ufd==NULL && fk_open(SEQ,FMT,a->ciunit)) err(a->cierr,114,"sfe")
00027 if(!p->ufmt) err(a->cierr,102,"sfe")
00028 return(0);
00029 }
00030 integer e_wsfe(Void)
00031 {
00032 #ifdef ALWAYS_FLUSH
00033 int n;
00034 n = en_fio();
00035 f__fmtbuf=NULL;
00036 if (!n && fflush(f__cf))
00037 err(f__elist->cierr, errno, "write end");
00038 return n;
00039 #else
00040 return(e_rsfe());
00041 #endif
00042 }