1*17951Sserge /* @(#)rewind.c 4.3 (Berkeley) 02/13/85 */ 22030Swnj #include <stdio.h> 32030Swnj 42030Swnj rewind(iop) 5*17951Sserge register FILE *iop; 62030Swnj { 72030Swnj fflush(iop); 82030Swnj lseek(fileno(iop), 0L, 0); 92030Swnj iop->_cnt = 0; 102030Swnj iop->_ptr = iop->_base; 112030Swnj iop->_flag &= ~(_IOERR|_IOEOF); 123163Stoy if (iop->_flag & _IORW) 133163Stoy iop->_flag &= ~(_IOREAD|_IOWRT); 142030Swnj } 15