1: # include   <stdio.h>
   2: 
   3: # include   "../ingres.h"
   4: # include   "../aux.h"
   5: # include   "monitor.h"
   6: 
   7: /*
   8: **  GET CHARACTER
   9: **
  10: **	This routine is just a getchar, except it allows a single
  11: **	backup character ("Peekch").  If Peekch is nonzero it is
  12: **	returned, otherwise a getchar is returned.
  13: */
  14: 
  15: char
  16: getch()
  17: {
  18:     register char   c;
  19: 
  20:     c = Peekch;
  21:     if (c)
  22:         Peekch = 0;
  23:     else
  24:     {
  25:         c = getc(Input);
  26:     }
  27:     if (c < 0)
  28:         c = 0;
  29: 
  30:     /* deliver EOF if newline in Oneline mode */
  31:     if (c == '\n' && Oneline)
  32:     {
  33:         Peekch = c;
  34:         c = 0;
  35:     }
  36: 
  37:     return (c);
  38: }
Last modified: 1995-02-04
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2407
Valid CSS Valid XHTML 1.0 Strict