1: #ifndef lint
   2: static char *sccsid = "@(#)refer8.c	4.1 (Berkeley) 5/6/83";
   3: #endif
   4: 
   5: #include "refer..c"
   6: 
   7: static char ahead[1024];
   8: static int peeked = 0;
   9: static char *noteof = (char *) 1;
  10: 
  11: char *
  12: input(s)
  13: char *s;
  14: {
  15:     if (peeked) {
  16:         peeked = 0;
  17:         if (noteof == 0)
  18:             return(0);
  19:         strcpy(s, ahead);
  20:         return(s);
  21:     }
  22:     return(fgets(s, 1000, in));
  23: }
  24: 
  25: char *
  26: lookat()
  27: {
  28:     if (peeked)
  29:         return(ahead);
  30:     noteof = input(ahead);
  31:     peeked = 1;
  32:     return(noteof);
  33: }
  34: 
  35: addch(s, c)
  36: char *s;
  37: {
  38:     while (*s)
  39:         s++;
  40:     *s++ = c;
  41:     *s = 0;
  42: }

Defined functions

addch defined in line 35; used 1 times
lookat defined in line 25; used 2 times

Defined variables

ahead defined in line 7; used 3 times
noteof defined in line 9; used 3 times
peeked defined in line 8; used 4 times
sccsid defined in line 2; never used
Last modified: 1987-02-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2132
Valid CSS Valid XHTML 1.0 Strict