|
|
1.1 root 1: /* @(#)rew.c 1.2 */
2: /* 3.0 SID # 1.2 */
3: /*LINTLIBRARY*/
4: #include <stdio.h>
5:
6: extern int fflush();
7: extern long lseek();
8:
9: void
10: rewind(iop)
11: register FILE *iop;
12: {
13: (void) fflush(iop);
14: (void) lseek(fileno(iop), 0L, 0);
15: iop->_cnt = 0;
16: iop->_ptr = iop->_base;
17: iop->_flag &= ~(_IOERR | _IOEOF);
18: if(iop->_flag & _IORW)
19: iop->_flag &= ~(_IOREAD | _IOWRT);
20: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.