1*26659Sdonn #if defined(LIBC_SCCS) && !defined(lint) 2*26659Sdonn static char sccsid[] = "@(#)rewind.c 5.2 (Berkeley) 03/09/86"; 3*26659Sdonn #endif LIBC_SCCS and not lint 422144Smckusick 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