Annotation of 41BSD/lib/libpc/REWRITE.c, revision 1.1

1.1     ! root        1: /* Copyright (c) 1979 Regents of the University of California */
        !             2: 
        !             3: static char sccsid[] = "@(#)REWRITE.c 1.1 10/29/80";
        !             4: 
        !             5: #include "h00vars.h"
        !             6: #include "h01errs.h"
        !             7: 
        !             8: REWRITE(filep, name, maxnamlen, datasize)
        !             9: 
        !            10:        register struct iorec   *filep;
        !            11:        char                    *name;
        !            12:        int                     maxnamlen;
        !            13:        int                     datasize;
        !            14: {
        !            15:        filep = GETNAME (filep, name, maxnamlen, datasize);
        !            16:        filep->fbuf = fopen(filep->fname, "w");
        !            17:        if (filep->fbuf == NULL) {
        !            18:                ERROR(ECREATE, filep->pfname);
        !            19:                return;
        !            20:        }
        !            21:        filep->funit |= (EOFF | FWRITE);
        !            22:        if (filep->fblk > PREDEF) {
        !            23:                setbuf(filep->fbuf, &filep->buf[0]);
        !            24:        }
        !            25: }

unix.superglobalmegacorp.com

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