|
Last change
on this file since 3558 was 1392, checked in by bird, 22 years ago |
|
This commit was generated by cvs2svn to compensate for changes in r1391,
which included commits to RCS files with non-trunk default branches.
|
-
Property cvs2svn:cvs-rev
set to
1.1.1.2
-
Property svn:eol-style
set to
native
-
Property svn:executable
set to
*
|
|
File size:
490 bytes
|
| Line | |
|---|
| 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 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.