Annotation of xinu/sys/rfgetc.c, revision 1.1

1.1     ! root        1: /* rfgetc.c - rfgetc */
        !             2: 
        !             3: #include <conf.h>
        !             4: #include <kernel.h>
        !             5: #include <network.h>
        !             6: 
        !             7: /*------------------------------------------------------------------------
        !             8:  *  rfgetc  --  get a character from a remote file
        !             9:  *------------------------------------------------------------------------
        !            10:  */
        !            11: rfgetc(devptr)
        !            12: struct devsw   *devptr;
        !            13: {
        !            14:        char    ch;
        !            15:        int     retcode;
        !            16: 
        !            17:        if ( (retcode=read(devptr->dvnum, &ch, 1)) == 1)
        !            18:                return(ch);
        !            19:        else if (retcode != EOF)
        !            20:                retcode = SYSERR;
        !            21:        return(retcode);
        !            22: }

unix.superglobalmegacorp.com

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