Annotation of 40BSD/lib/libpc/READ4.c, revision 1.1.1.1

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

unix.superglobalmegacorp.com

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