Annotation of coherent/d/lib/libc/stdio/_fputc.c, revision 1.1

1.1     ! root        1: /*
        !             2:  * Standard I/O Library Internals
        !             3:  * Unbuffered output
        !             4:  */
        !             5: 
        !             6: #include <stdio.h>
        !             7: #include <errno.h>
        !             8: 
        !             9: int
        !            10: _fputc(c, fp)
        !            11: register unsigned int  c;
        !            12: register FILE  *fp;
        !            13: {
        !            14:        char    s[1] = c;
        !            15: 
        !            16:        fp->_cc = 0;
        !            17:        errno = 0;
        !            18:        if (fp->_ff&_FERR || _fpseek(fp)) {
        !            19:                return (EOF);
        !            20:        } else if (write(fileno(fp), s, 1) == 1) {
        !            21:                return ((unsigned char)c);
        !            22:        } else {
        !            23:                if (errno != EINTR)
        !            24:                        fp->_ff |= _FERR;
        !            25:                return (EOF);
        !            26:        }
        !            27: }

unix.superglobalmegacorp.com

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