#include "f2c.h"#include "fio.h"Include dependency graph for sue.c:

Go to the source code of this file.
Functions | |
| int | 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 |
| OFF_T | f__recloc |
Definition at line 13 of file sue.c.
References a, err, f__cf, f__curunit, f__elist, f__external, f__formatted, f__sequential, f__units, fk_open(), MXUNIT, NULL, SEQ, unit::ufd, unit::ufmt, UNF, and unit::useek.
Referenced by s_rsue(), and s_wsue().
00015 { 00016 f__external=f__sequential=1; 00017 f__formatted=0; 00018 f__curunit = &f__units[a->ciunit]; 00019 if(a->ciunit >= MXUNIT || a->ciunit < 0) 00020 err(a->cierr,101,"startio"); 00021 f__elist=a; 00022 if(f__curunit->ufd==NULL && fk_open(SEQ,UNF,a->ciunit)) 00023 err(a->cierr,114,"sue"); 00024 f__cf=f__curunit->ufd; 00025 if(f__curunit->ufmt) err(a->cierr,103,"sue") 00026 if(!f__curunit->useek) err(a->cierr,103,"sue") 00027 return(0); 00028 }
Here is the call graph for this function:

Here is the caller graph for this function:

| integer e_rsue | ( | Void | ) |
| integer e_wsue | ( | Void | ) |
Definition at line 70 of file sue.c.
References cilist::cierr, err, errno, f__cf, f__elist, FSEEK, FTELL, OFF_T, and SEEK_SET.
Referenced by writef4().
00071 { OFF_T loc; 00072 fwrite((char *)&f__reclen,sizeof(uiolen),1,f__cf); 00073 #ifdef ALWAYS_FLUSH 00074 if (fflush(f__cf)) 00075 err(f__elist->cierr, errno, "write end"); 00076 #endif 00077 loc=FTELL(f__cf); 00078 FSEEK(f__cf,f__recloc,SEEK_SET); 00079 fwrite((char *)&f__reclen,sizeof(uiolen),1,f__cf); 00080 FSEEK(f__cf,loc,SEEK_SET); 00081 return(0); 00082 }
Here is the caller graph for this function:

Definition at line 32 of file sue.c.
References a, c_sue(), err, errno, f__cf, f__curunit, f__init, f__nowreading(), f__reading, f__recpos, f_init(), n, unit::uend, and unit::uwrt.
Referenced by bfrdr().
00034 { 00035 int n; 00036 if(!f__init) f_init(); 00037 f__reading=1; 00038 if(n=c_sue(a)) return(n); 00039 f__recpos=0; 00040 if(f__curunit->uwrt && f__nowreading(f__curunit)) 00041 err(a->cierr, errno, "read start"); 00042 if(fread((char *)&f__reclen,sizeof(uiolen),1,f__cf) 00043 != 1) 00044 { if(feof(f__cf)) 00045 { f__curunit->uend = 1; 00046 err(a->ciend, EOF, "start"); 00047 } 00048 clearerr(f__cf); 00049 err(a->cierr, errno, "start"); 00050 } 00051 return(0); 00052 }
Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 56 of file sue.c.
References a, c_sue(), err, errno, f__cf, f__curunit, f__init, f__nowwriting(), f__reading, f_init(), FSEEK, FTELL, n, OFF_T, SEEK_CUR, and unit::uwrt.
Referenced by writef4().
00058 { 00059 int n; 00060 if(!f__init) f_init(); 00061 if(n=c_sue(a)) return(n); 00062 f__reading=0; 00063 f__reclen=0; 00064 if(f__curunit->uwrt != 1 && f__nowwriting(f__curunit)) 00065 err(a->cierr, errno, "write start"); 00066 f__recloc=FTELL(f__cf); 00067 FSEEK(f__cf,(OFF_T)sizeof(uiolen),SEEK_CUR); 00068 return(0); 00069 }
Here is the call graph for this function:

Here is the caller graph for this function:

1.5.1