Annotation of 42BSD/usr.lib/libpc/WRITES.c, revision 1.1.1.1

1.1       root        1: /* Copyright (c) 1979 Regents of the University of California */
                      2: 
                      3: static char sccsid[] = "@(#)WRITES.c 1.4 6/10/81";
                      4: 
                      5: #include "h00vars.h"
                      6: 
                      7: WRITES(curfile, d1, d2, d3, d4)
                      8: 
                      9:        register struct iorec   *curfile;
                     10:        FILE                    *d1;
                     11:        int                     d2, d3;
                     12:        char                    *d4;
                     13: {
                     14:        if (curfile->funit & FREAD) {
                     15:                ERROR("%s: Attempt to write, but open for reading\n",
                     16:                        curfile->pfname);
                     17:                return;
                     18:        }
                     19:        fwrite(d1, d2, d3, d4);
                     20:        if (ferror(curfile->fbuf)) {
                     21:                PERROR("Could not write to ", curfile->pfname);
                     22:                return;
                     23:        }
                     24: }

unix.superglobalmegacorp.com

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