|
Lines 1-7
Link Here
|
| 1 |
#include "f2c.h" |
1 |
#include "f2c.h" |
| 2 |
#include "fio.h" |
2 |
#include "fio.h" |
| 3 |
extern uiolen f__reclen; |
3 |
extern uiolen f__reclen; |
| 4 |
long f__recloc; |
4 |
f77_offset f__recloc; |
| 5 |
|
5 |
|
| 6 |
#ifdef KR_headers |
6 |
#ifdef KR_headers |
| 7 |
c_sue(a) cilist *a; |
7 |
c_sue(a) cilist *a; |
|
Lines 59-83
Link Here
|
| 59 |
f__reclen=0; |
59 |
f__reclen=0; |
| 60 |
if(f__curunit->uwrt != 1 && f__nowwriting(f__curunit)) |
60 |
if(f__curunit->uwrt != 1 && f__nowwriting(f__curunit)) |
| 61 |
err(a->cierr, errno, "write start"); |
61 |
err(a->cierr, errno, "write start"); |
| 62 |
f__recloc=ftell(f__cf); |
62 |
f__recloc=FTELL(f__cf); |
| 63 |
(void) fseek(f__cf,(long)sizeof(uiolen),SEEK_CUR); |
63 |
(void) FSEEK(f__cf,(long)sizeof(uiolen),SEEK_CUR); |
| 64 |
return(0); |
64 |
return(0); |
| 65 |
} |
65 |
} |
| 66 |
integer e_wsue(Void) |
66 |
integer e_wsue(Void) |
| 67 |
{ long loc; |
67 |
{ f77_offset loc; |
| 68 |
fwrite((char *)&f__reclen,sizeof(uiolen),1,f__cf); |
68 |
fwrite((char *)&f__reclen,sizeof(uiolen),1,f__cf); |
| 69 |
#ifdef ALWAYS_FLUSH |
69 |
#ifdef ALWAYS_FLUSH |
| 70 |
if (fflush(f__cf)) |
70 |
if (fflush(f__cf)) |
| 71 |
err(f__elist->cierr, errno, "write end"); |
71 |
err(f__elist->cierr, errno, "write end"); |
| 72 |
#endif |
72 |
#endif |
| 73 |
loc=ftell(f__cf); |
73 |
loc=FTELL(f__cf); |
| 74 |
fseek(f__cf,f__recloc,SEEK_SET); |
74 |
FSEEK(f__cf,f__recloc,SEEK_SET); |
| 75 |
fwrite((char *)&f__reclen,sizeof(uiolen),1,f__cf); |
75 |
fwrite((char *)&f__reclen,sizeof(uiolen),1,f__cf); |
| 76 |
fseek(f__cf,loc,SEEK_SET); |
76 |
FSEEK(f__cf,loc,SEEK_SET); |
| 77 |
return(0); |
77 |
return(0); |
| 78 |
} |
78 |
} |
| 79 |
integer e_rsue(Void) |
79 |
integer e_rsue(Void) |
| 80 |
{ |
80 |
{ |
| 81 |
(void) fseek(f__cf,(long)(f__reclen-f__recpos+sizeof(uiolen)),SEEK_CUR); |
81 |
(void) FSEEK(f__cf,(long)(f__reclen-f__recpos+sizeof(uiolen)),SEEK_CUR); |
| 82 |
return(0); |
82 |
return(0); |
| 83 |
} |
83 |
} |