Annotation of 43BSDTahoe/lib/libc/stdio/fread.4.2, revision 1.1

1.1     ! root        1: #include       <stdio.h>
        !             2: 
        !             3: fread(ptr, size, count, iop)
        !             4: unsigned size, count;
        !             5: register char *ptr;
        !             6: register FILE *iop;
        !             7: {
        !             8:        register c;
        !             9:        unsigned ndone, s;
        !            10: 
        !            11:        ndone = 0;
        !            12:        if (size)
        !            13:        for (; ndone<count; ndone++) {
        !            14:                s = size;
        !            15:                do {
        !            16:                        if ((c = getc(iop)) >= 0)
        !            17:                                *ptr++ = c;
        !            18:                        else
        !            19:                                return(ndone);
        !            20:                } while (--s);
        !            21:        }
        !            22:        return(ndone);
        !            23: }

unix.superglobalmegacorp.com

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