rewind.c
Go to the documentation of this file.
00001 #include "f2c.h"
00002 #include "fio.h"
00003 #ifdef __cplusplus
00004 extern "C" {
00005 #endif
00006 #ifdef KR_headers
00007 integer f_rew(a) alist *a;
00008 #else
00009 integer f_rew(alist *a)
00010 #endif
00011 {
00012         unit *b;
00013         if(a->aunit>=MXUNIT || a->aunit<0)
00014                 err(a->aerr,101,"rewind");
00015         b = &f__units[a->aunit];
00016         if(b->ufd == NULL || b->uwrt == 3)
00017                 return(0);
00018         if(!b->useek)
00019                 err(a->aerr,106,"rewind")
00020         if(b->uwrt) {
00021                 (void) t_runc(a);
00022                 b->uwrt = 3;
00023                 }
00024         rewind(b->ufd);
00025         b->uend=0;
00026         return(0);
00027 }
00028 #ifdef __cplusplus
00029 }
00030 #endif


swiftnav
Author(s):
autogenerated on Sat Jun 8 2019 18:55:56