Annotation of 40BSD/lib/libpc/READ8.c, revision 1.1

1.1     ! root        1: /* Copyright (c) 1979 Regents of the University of California */
        !             2: 
        !             3: static char sccsid[] = "@(#)READ8.c 1.1 10/29/80";
        !             4: 
        !             5: #include "h00vars.h"
        !             6: #include "h01errs.h"
        !             7: 
        !             8: double
        !             9: READ8(curfile)
        !            10: 
        !            11:        register struct iorec   *curfile;
        !            12: {
        !            13:        double                  data;
        !            14: 
        !            15:        if (curfile->funit & FWRITE) {
        !            16:                ERROR(EREADIT, curfile->pfname);
        !            17:                return;
        !            18:        }
        !            19:        UNSYNC(curfile);
        !            20:        if (fscanf(curfile->fbuf, "%lf", &data) == 0) {
        !            21:                ERROR(EBADFNUM, curfile->pfname);
        !            22:                return;
        !            23:        }
        !            24:        curfile->funit |= SYNC;
        !            25:        return data;
        !            26: }

unix.superglobalmegacorp.com

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