Annotation of researchv8dc/libc/stdio/setbuf.c, revision 1.1

1.1     ! root        1: /* @(#)setbuf.c        4.1 (Berkeley) 12/21/80 */
        !             2: #include       <stdio.h>
        !             3: 
        !             4: setbuf(iop, buf)
        !             5: register struct _iobuf *iop;
        !             6: unsigned char *buf;
        !             7: {
        !             8:        if (iop->_base != NULL && iop->_flag&_IOMYBUF)
        !             9:                free(iop->_base);
        !            10:        iop->_flag &= ~(_IOMYBUF|_IONBF|_IOLBF);
        !            11:        if ((iop->_base = buf) == NULL)
        !            12:                iop->_flag |= _IONBF;
        !            13:        else
        !            14:                iop->_ptr = iop->_base;
        !            15:        iop->_cnt = 0;
        !            16: }

unix.superglobalmegacorp.com

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