| 1 | #include "config.h"
|
|---|
| 2 | #include "f2c.h"
|
|---|
| 3 | #include "fio.h"
|
|---|
| 4 |
|
|---|
| 5 | #ifdef KR_headers
|
|---|
| 6 | c_due(a) cilist *a;
|
|---|
| 7 | #else
|
|---|
| 8 | c_due(cilist *a)
|
|---|
| 9 | #endif
|
|---|
| 10 | {
|
|---|
| 11 | if(f__init != 1) f_init();
|
|---|
| 12 | f__init = 3;
|
|---|
| 13 | if(a->ciunit>=MXUNIT || a->ciunit<0)
|
|---|
| 14 | err(a->cierr,101,"startio");
|
|---|
| 15 | f__sequential=f__formatted=f__recpos=0;
|
|---|
| 16 | f__external=1;
|
|---|
| 17 | f__curunit = &f__units[a->ciunit];
|
|---|
| 18 | if(a->ciunit>=MXUNIT || a->ciunit<0)
|
|---|
| 19 | err(a->cierr,101,"startio");
|
|---|
| 20 | f__elist=a;
|
|---|
| 21 | if(f__curunit->ufd==NULL && fk_open(DIR,UNF,a->ciunit) ) err(a->cierr,104,"due");
|
|---|
| 22 | f__cf=f__curunit->ufd;
|
|---|
| 23 | if(f__curunit->ufmt) err(a->cierr,102,"cdue");
|
|---|
| 24 | if(!f__curunit->useek) err(a->cierr,104,"cdue");
|
|---|
| 25 | if(f__curunit->ufd==NULL) err(a->cierr,114,"cdue");
|
|---|
|
|---|