Doxygen Source Code Documentation
sue.c File Reference
#include "f2c.h"
#include "fio.h"
Go to the source code of this file.
Functions | |
c_sue (cilist *a) | |
integer | s_rsue (cilist *a) |
integer | s_wsue (cilist *a) |
integer | e_wsue (Void) |
integer | e_rsue (Void) |
Variables | |
uiolen | f__reclen |
long | f__recloc |
Function Documentation
|
Definition at line 9 of file sue.c. References cilist::cierr, cilist::ciunit, err, fk_open(), MXUNIT, and UNF. Referenced by s_rsue(), and s_wsue().
00011 { 00012 if(a->ciunit >= MXUNIT || a->ciunit < 0) 00013 err(a->cierr,101,"startio"); 00014 f__external=f__sequential=1; 00015 f__formatted=0; 00016 f__curunit = &f__units[a->ciunit]; 00017 f__elist=a; 00018 if(f__curunit->ufd==NULL && fk_open(SEQ,UNF,a->ciunit)) 00019 err(a->cierr,114,"sue"); 00020 f__cf=f__curunit->ufd; 00021 if(f__curunit->ufmt) err(a->cierr,103,"sue") 00022 if(!f__curunit->useek) err(a->cierr,103,"sue") 00023 return(0); 00024 } |
|
Definition at line 79 of file sue.c. References f__reclen, and uiolen.
|
|
Definition at line 66 of file sue.c. References err, f__reclen, f__recloc, and uiolen.
00067 { long loc; 00068 fwrite((char *)&f__reclen,sizeof(uiolen),1,f__cf); 00069 #ifdef ALWAYS_FLUSH 00070 if (fflush(f__cf)) 00071 err(f__elist->cierr, errno, "write end"); 00072 #endif 00073 loc=ftell(f__cf); 00074 fseek(f__cf,f__recloc,SEEK_SET); 00075 fwrite((char *)&f__reclen,sizeof(uiolen),1,f__cf); 00076 fseek(f__cf,loc,SEEK_SET); 00077 return(0); 00078 } |
|
Definition at line 28 of file sue.c. References c_sue(), cilist::ciend, cilist::cierr, err, f__nowreading(), f__reclen, f_init(), and uiolen.
00030 { 00031 int n; 00032 if(!f__init) f_init(); 00033 f__reading=1; 00034 if(n=c_sue(a)) return(n); 00035 f__recpos=0; 00036 if(f__curunit->uwrt && f__nowreading(f__curunit)) 00037 err(a->cierr, errno, "read start"); 00038 if(fread((char *)&f__reclen,sizeof(uiolen),1,f__cf) 00039 != 1) 00040 { if(feof(f__cf)) 00041 { f__curunit->uend = 1; 00042 err(a->ciend, EOF, "start"); 00043 } 00044 clearerr(f__cf); 00045 err(a->cierr, errno, "start"); 00046 } 00047 return(0); 00048 } |
|
Definition at line 52 of file sue.c. References c_sue(), cilist::cierr, err, f__nowwriting(), f__reclen, f__recloc, f_init(), and uiolen.
00054 { 00055 int n; 00056 if(!f__init) f_init(); 00057 if(n=c_sue(a)) return(n); 00058 f__reading=0; 00059 f__reclen=0; 00060 if(f__curunit->uwrt != 1 && f__nowwriting(f__curunit)) 00061 err(a->cierr, errno, "write start"); 00062 f__recloc=ftell(f__cf); 00063 (void) fseek(f__cf,(long)sizeof(uiolen),SEEK_CUR); 00064 return(0); 00065 } |
Variable Documentation
|
Definition at line 3 of file sue.c. Referenced by do_us(), e_rsue(), e_wsue(), s_rsue(), and s_wsue(). |
|
|