# 2.11BSD#431 - /usr/src/new/notes/src/pageout.c

##### Functions

    pageout           X

       1: #include "parms.h"
       2: #include "structs.h"
       3:
       4: #ifdef  RCSIDENT
       5: static char rcsid[] = "$Header: pageout.c,v 1.7 85/01/18 15:33:54 notes Rel $";
       6: #endif	RCSIDENT
       7:
       8: /*
       9:  *	pageout(where,zfile)
      10:  *	FILE *zfile; struct daddr_f *where;
      11:  *
      12:  *	Dumps the page to the file. Returns the characters dumped.
      13:  *
      14:  *	Original Coding:	Ray Essick	Long agao
      15:  *		moved out of gtext.c and mult.c and others   4/5/82
      16:  *	Converted for infinite size notes	RBE 5/8/82
      17:  *
      18:  */
      19:
      20: pageout (io, where, zfile)
      21: struct io_f *io;
      22: struct daddr_f *where;
      23: FILE * zfile;
      24: {
      25:     int     i,
      26:             j,
      27:             lines;
      28:     long    count;
      29:     struct txtbuf_f buf;                /* hold text */
      30:
      31:     lines = 0;
      32:
      33:     if (where -> addr == 0)             /* no text */
      34:     where -> textlen = 0;               /* fix this */
      35:     x (lseek (io -> fidtxt, where -> addr, 0) != where -> addr, "pageout: seek");
      36:     for (j = i = count = 0; count < where -> textlen; count++)
      37:     {
      38:     if (i == j)                 /* another buffer */
      39:     {
      40:         x ((j = read (io -> fidtxt, buf.txtbuf, BUFSIZE)) < 0, "pageout: read");
      41:         i = 0;
      42:     }
      43:     putc (buf.txtbuf[i], zfile);
      44:     if (buf.txtbuf[i++] == '\n')
      45:         lines++;                    /* count lines */
      46:     }
      47:     return lines;
      48: }

#### Defined functions

pageout defined in line 20; used 17 times

- in /usr/src/new/notes/src/archiver.c line 369, 388, 426
- in /usr/src/new/notes/src/compress.c line 131, 159, 183
- in /usr/src/new/notes/src/dmpnote.c line 60, 96
- in /usr/src/new/notes/src/dmpresp.c line 62, 96
- in /usr/src/new/notes/src/lprnote.c line 92, 146
- in /usr/src/new/notes/src/newsdump.c line 264, 516
- in /usr/src/new/notes/src/preptxt.c line 59
- in /usr/src/new/notes/src/readem.c line 221, 257

#### Defined variables

rcsid defined in line 5; never used

Last modified: 1985-01-19 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 588 |