# 2.11BSD#431 - /usr/ingres/source/monitor/getch.c

##### Functions

    getch             X

       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: }

#### Defined functions

getch defined in line 15; used 9 times

- in /usr/ingres/source/monitor/branch.c line 23, 31, 38, 84
- in /usr/ingres/source/monitor/clrline.c line 31
- in /usr/ingres/source/monitor/getfilename.c line 23-26(2)
- in /usr/ingres/source/monitor/monitor.c line 94, 229

Last modified: 1995-02-04 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 913 |