home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Trees / V7 / usr / src / libc / stdio / rew.c < prev    next >
Encoding:
C/C++ Source or Header  |  1979-05-05  |  242 b   |  14 lines

  1. #include    <stdio.h>
  2.  
  3. rewind(iop)
  4.     register struct _iobuf *iop;
  5. {
  6.     fflush(iop);
  7.     lseek(fileno(iop), 0L, 0);
  8.     iop->_cnt = 0;
  9.     iop->_ptr = iop->_base;
  10.     iop->_flag &= ~(_IOERR|_IOEOF);
  11.     if (iop->_flag & _IORW)
  12.         iop->_flag &= ~(_IOREAD|_IOWRT);
  13. }
  14.