Doxygen Source Code Documentation
due.c File Reference
#include "f2c.h"#include "fio.h"Go to the source code of this file.
Functions | |
| c_due (cilist *a) | |
| integer | s_rdue (cilist *a) |
| integer | s_wdue (cilist *a) |
| integer | e_rdue (Void) |
| integer | e_wdue (Void) |
Function Documentation
|
|
Definition at line 7 of file due.c. References cilist::cierr, cilist::cirec, cilist::ciunit, DIR, err, f_init(), fk_open(), MXUNIT, and UNF. Referenced by s_rdue(), and s_wdue().
00009 {
00010 if(!f__init) f_init();
00011 if(a->ciunit>=MXUNIT || a->ciunit<0)
00012 err(a->cierr,101,"startio");
00013 f__sequential=f__formatted=f__recpos=0;
00014 f__external=1;
00015 f__curunit = &f__units[a->ciunit];
00016 f__elist=a;
00017 if(f__curunit->ufd==NULL && fk_open(DIR,UNF,a->ciunit) ) err(a->cierr,104,"due");
00018 f__cf=f__curunit->ufd;
00019 if(f__curunit->ufmt) err(a->cierr,102,"cdue")
00020 if(!f__curunit->useek) err(a->cierr,104,"cdue")
00021 if(f__curunit->ufd==NULL) err(a->cierr,114,"cdue")
00022 (void) fseek(f__cf,(long)(a->cirec-1)*f__curunit->url,SEEK_SET);
00023 f__curunit->uend = 0;
00024 return(0);
00025 }
|
|
|
Definition at line 52 of file due.c. References err. Referenced by e_wdue().
00053 {
00054 if(f__curunit->url==1 || f__recpos==f__curunit->url)
00055 return(0);
00056 (void) fseek(f__cf,(long)(f__curunit->url-f__recpos),SEEK_CUR);
00057 if(ftell(f__cf)%f__curunit->url)
00058 err(f__elist->cierr,200,"syserr");
00059 return(0);
00060 }
|
|
|
Definition at line 61 of file due.c.
|
|
|
Definition at line 29 of file due.c. References c_due(), cilist::cierr, err, and f__nowreading().
00031 {
00032 int n;
00033 if(n=c_due(a)) return(n);
00034 f__reading=1;
00035 if(f__curunit->uwrt && f__nowreading(f__curunit))
00036 err(a->cierr,errno,"read start");
00037 return(0);
00038 }
|
|
|
Definition at line 42 of file due.c. References c_due(), cilist::cierr, err, and f__nowwriting().
00044 {
00045 int n;
00046 if(n=c_due(a)) return(n);
00047 f__reading=0;
00048 if(f__curunit->uwrt != 1 && f__nowwriting(f__curunit))
00049 err(a->cierr,errno,"write start");
00050 return(0);
00051 }
|