Annotation of 43BSDTahoe/usr.lib/libpc/WRITLN.c, revision 1.1.1.1

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

unix.superglobalmegacorp.com

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