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

Go to the source code of this file.
Functions | |
| int | do_us (ftnint *number, char *ptr, ftnlen len) |
| integer | do_ud (ftnint *number, char *ptr, ftnlen len) |
| integer | do_uio (ftnint *number, char *ptr, ftnlen len) |
Variables | |
| uiolen | f__reclen |
Definition at line 34 of file uio.c.
References cilist::cierr, err, f__cf, f__curunit, f__elist, f__reading, f__recpos, i, int, memset(), unit::url, and void().
Referenced by do_uio().
00036 { 00037 f__recpos += (int)(*number * len); 00038 if(f__recpos > f__curunit->url && f__curunit->url!=1) 00039 err(f__elist->cierr,110,"do_ud"); 00040 if(f__reading) 00041 { 00042 #ifdef Pad_UDread 00043 #ifdef KR_headers 00044 int i; 00045 #else 00046 size_t i; 00047 #endif 00048 if (!(i = fread(ptr,(int)len,(int)(*number),f__cf)) 00049 && !(f__recpos - *number*len)) 00050 err(f__elist->cierr,EOF,"do_ud") 00051 if (i < *number) 00052 memset(ptr + i*len, 0, (*number - i)*len); 00053 return 0; 00054 #else 00055 if(fread(ptr,(int)len,(int)(*number),f__cf) != *number) 00056 err(f__elist->cierr,EOF,"do_ud") 00057 else return(0); 00058 #endif 00059 } 00060 (void) fwrite(ptr,(int)len,(int)(*number),f__cf); 00061 return(0); 00062 }
Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 66 of file uio.c.
References do_ud(), do_us(), and f__sequential.
Referenced by bfrdr(), and writef4().
00068 { 00069 if(f__sequential) 00070 return(do_us(number,ptr,len)); 00071 else return(do_ud(number,ptr,len)); 00072 }
Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 12 of file uio.c.
References cilist::ciend, cilist::cierr, err, f__cf, f__elist, f__reading, f__recpos, int, and void().
Referenced by do_uio().
00014 { 00015 if(f__reading) 00016 { 00017 f__recpos += (int)(*number * len); 00018 if(f__recpos>f__reclen) 00019 err(f__elist->cierr, 110, "do_us"); 00020 if (fread(ptr,(int)len,(int)(*number),f__cf) != *number) 00021 err(f__elist->ciend, EOF, "do_us"); 00022 return(0); 00023 } 00024 else 00025 { 00026 f__reclen += *number * len; 00027 (void) fwrite(ptr,(int)len,(int)(*number),f__cf); 00028 return(0); 00029 } 00030 }
Here is the call graph for this function:

Here is the caller graph for this function:

1.5.1