1*22144Smckusick #ifndef lint 2*22144Smckusick static char sccsid[] = "@(#)rewind.c 5.1 (Berkeley) 06/05/85"; 3*22144Smckusick #endif not lint 4*22144Smckusick 52030Swnj #include <stdio.h> 62030Swnj 72030Swnj rewind(iop) 817951Sserge register FILE *iop; 92030Swnj { 102030Swnj fflush(iop); 112030Swnj lseek(fileno(iop), 0L, 0); 122030Swnj iop->_cnt = 0; 132030Swnj iop->_ptr = iop->_base; 142030Swnj iop->_flag &= ~(_IOERR|_IOEOF); 153163Stoy if (iop->_flag & _IORW) 163163Stoy iop->_flag &= ~(_IOREAD|_IOWRT); 172030Swnj } 18