Annotation of coherent/b/lib/libc/stdio/i8086/getw.c, revision 1.1

1.1     ! root        1: /*
        !             2:  * Standard I/O Library
        !             3:  * Get word (int)
        !             4:  * Routine rather than macro, for the aesthetically inclined
        !             5:  */
        !             6: 
        !             7: #include <stdio.h>
        !             8: #undef getw
        !             9: 
        !            10: int
        !            11: getw(fp)
        !            12: register FILE  *fp;
        !            13: {
        !            14:        register int    c0, c1;
        !            15: 
        !            16:        if ((c0=getc(fp))==EOF)
        !            17:                return (EOF);
        !            18:        else if ((c1=getc(fp))==EOF) {
        !            19:                fp->_ff |= _FERR;
        !            20:                return (EOF);
        !            21:        } else
        !            22:                return (c1<<8|c0);
        !            23: }

unix.superglobalmegacorp.com

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