Annotation of 40BSD/libc/stdio/setbuf.c, revision 1.1

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

unix.superglobalmegacorp.com

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