public
/
Ack-5.5.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Pristine Ack-5.5
[Ack-5.5.git]
/
lang
/
fortran
/
lib
/
libI77
/
rewind.c
1
#include "f2c.h"
2
#include "fio.h"
3
integer f_rew(a) alist *a;
4
{
5
unit *b;
6
if(a->aunit>=MXUNIT || a->aunit<0)
7
err(a->aerr,101,"rewind");
8
b = &units[a->aunit];
9
if(b->ufd == NULL || b->uwrt == 3)
10
return(0);
11
if(!b->useek)
12
err(a->aerr,106,"rewind")
13
if(b->uwrt) {
14
(void) t_runc(a);
15
b->uwrt = 3;
16
}
17
rewind(b->ufd);
18
b->uend=0;
19
return(0);
20
}