projects
/
dragonfly.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Merge from vendor branch BZIP:
[dragonfly.git]
/
contrib
/
gcc-3.4
/
libf2c
/
libI77
/
rewind.c
1
#include "config.h"
2
#include "f2c.h"
3
#include "fio.h"
4
integer
5
f_rew (alist * a)
6
{
7
unit *b;
8
if (f__init & 2)
9
f__fatal (131, "I/O recursion");
10
if (a->aunit >= MXUNIT || a->aunit < 0)
11
err (a->aerr, 101, "rewind");
12
b = &f__units[a->aunit];
13
if (b->ufd == NULL || b->uwrt == 3)
14
return (0);
15
if (!b->useek)
16
err (a->aerr, 106, "rewind");
17
if (b->uwrt)
18
{
19
(void) t_runc (a);
20
b->uwrt = 3;
21
}
22
FSEEK (b->ufd, 0, SEEK_SET);
23
b->uend = 0;
24
return (0);
25
}