source: vendor/gcc/3.3.4/libf2c/libI77/rewind.c

Last change on this file was 1391, checked in by bird, 21 years ago

GCC v3.3.3 sources.

  • 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"
4integer
5f_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.