Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4973 | right-hear | 1 | /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ |
2 | #include |
||
3 | #include |
||
4 | #include |
||
5 | #include |
||
6 | |||
7 | void rewind(FILE *f) |
||
8 | { |
||
9 | fflush(f); |
||
10 | lseek(fileno(f), 0L, SEEK_SET); |
||
11 | f->_cnt = 0; |
||
12 | f->_ptr = f->_base; |
||
13 | f->_flag &= ~(_IOERR|_IOEOF); |
||
14 | if (f->_flag & _IORW) |
||
15 | f->_flag &= ~(_IOREAD|_IOWRT); |
||
16 | } |