1: /*
   2:  * Copyright (c) 1983 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  */
   6: 
   7: #ifndef lint
   8: static char sccsid[] = "@(#)necf.c	5.1 (Berkeley) 5/15/85";
   9: #endif not lint
  10: 
  11: #include <stdio.h>
  12: #include <sgtty.h>
  13: 
  14: #define PAGESIZE    66
  15: 
  16: main()
  17: {
  18:     extern char _sobuf[BUFSIZ];
  19:     extern char *rindex();
  20:     char line[256];
  21:     register char c, *cp;
  22:     register lnumber;
  23: 
  24:     setbuf(stdout, _sobuf);
  25: #ifdef SHEETFEEDER
  26:     printf("\033=\033\033\033O\f");
  27: #else
  28:     printf("\033=");
  29: #endif
  30:     lnumber = 0;
  31:     while (fgets(line, sizeof(line), stdin) != NULL) {
  32: #ifdef SHEETFEEDER
  33:         if (lnumber == PAGESIZE-1) {
  34:             putchar('\f');
  35:             lnumber = 0;
  36:         }
  37:         if (lnumber >= 2) {
  38: #endif
  39: #ifdef TTY
  40:             if ((cp = rindex(line, '\n')) != NULL)
  41:                 *cp = '\r';
  42: #endif
  43:             printf("%s", line);
  44: #ifdef SHEETFEEDER
  45:         }
  46:         lnumber++;
  47: #endif
  48:     }
  49:     fflush (stdout);
  50: }

Defined functions

main defined in line 16; never used

Defined variables

sccsid defined in line 8; never used

Defined macros

PAGESIZE defined in line 14; used 1 times
  • in line 33
Last modified: 1985-06-19
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 987
Valid CSS Valid XHTML 1.0 Strict