Annotation of researchv10no/libc/stdio/fputs.c, revision 1.1

1.1     ! root        1: /* Copyright AT&T Bell Laboratories, 1993 */
        !             2: #include       <stdio.h>
        !             3: 
        !             4: fputs(const char *s, FILE *iop)
        !             5: {
        !             6:        unsigned char *e, *t;
        !             7:        for(;;) {
        !             8:                t = iop->_ptr;
        !             9:                e = t + iop->_cnt;
        !            10:                while(*s && t < e)
        !            11:                        *t++ = *s++;
        !            12:                iop->_cnt -= t - iop->_ptr;
        !            13:                iop->_ptr = t;
        !            14:                if(*s == 0)
        !            15:                        break;
        !            16:                if(putc(*s++, iop) == EOF)
        !            17:                        return EOF;
        !            18:        }
        !            19:        return 0;
        !            20: }

unix.superglobalmegacorp.com

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