1: # include "refer.h"
   2: static char ahead[LLINE];
   3: static int peeked 0;
   4: static int noteof 1;
   5: 
   6: char *
   7: input (s)
   8: char *s;
   9: {
  10:     if (peeked)
  11:     {
  12:         peeked=0;
  13:         if (noteof==0) return(0);
  14:         strcpy (s, ahead);
  15:         return(s);
  16:     }
  17:     return(fgets(s, LLINE, in));
  18: }
  19: char *
  20: lookat()
  21: {
  22:     if (peeked) return(ahead);
  23:     noteof=input(ahead);
  24:     peeked=1;
  25:     return(noteof);
  26: }
  27: addch(s, c)
  28: char *s;
  29: {
  30:     while (*s) s++;
  31:     *s++ = c;
  32:     *s = 0;
  33: }

Defined functions

addch defined in line 27; used 1 times
input defined in line 6; used 3 times
lookat defined in line 19; used 1 times

Defined variables

ahead defined in line 2; used 3 times
noteof defined in line 4; used 3 times
peeked defined in line 3; used 4 times
Last modified: 1982-05-25
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 705
Valid CSS Valid XHTML 1.0 Strict