Annotation of researchv10dc/libc/stdio/rew.c, revision 1.1

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

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.