Doxygen Source Code Documentation
rewind.c File Reference
#include "f2c.h"
#include "fio.h"
Go to the source code of this file.
Functions | |
integer | f_rew (alist *a) |
Function Documentation
|
Definition at line 6 of file rewind.c. References a, err, MXUNIT, t_runc(), unit::uend, unit::ufd, unit::useek, and unit::uwrt. Referenced by MAIN__().
00008 { 00009 unit *b; 00010 if(a->aunit>=MXUNIT || a->aunit<0) 00011 err(a->aerr,101,"rewind"); 00012 b = &f__units[a->aunit]; 00013 if(b->ufd == NULL || b->uwrt == 3) 00014 return(0); 00015 if(!b->useek) 00016 err(a->aerr,106,"rewind") 00017 if(b->uwrt) { 00018 (void) t_runc(a); 00019 b->uwrt = 3; 00020 } 00021 rewind(b->ufd); 00022 b->uend=0; 00023 return(0); 00024 } |