|
|
1.1 ! root 1: /* ! 2: * rewind.c - f77 file rewind ! 3: */ ! 4: ! 5: #include "fio.h" ! 6: ! 7: f_rew(a) alist *a; ! 8: { int n; ! 9: unit *b; ! 10: ! 11: lfname = NULL; ! 12: elist = NO; ! 13: external = YES; /* for err */ ! 14: lunit = a->aunit; ! 15: errflag = a->aerr; ! 16: if(not_legal(lunit)) err(errflag,101,"rewind") ! 17: b = &units[lunit]; ! 18: if(!b->ufd && (n=fk_open(READ,SEQ,FMT,(ftnint)lunit)) ) ! 19: err(errflag,n,"rewind") ! 20: lfname = b->ufnm; ! 21: if(!b->useek) err(errflag,106,"rewind") ! 22: b->uend = NO; ! 23: if(b->uwrt) ! 24: if(n=t_runc(b,errflag)) return(n); ! 25: rewind(b->ufd); ! 26: return(OK); ! 27: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.