|
|
1.1 ! root 1: # include "monitor.h" ! 2: # include <ingres.h> ! 3: # include <aux.h> ! 4: # include <sccs.h> ! 5: ! 6: SCCSID(@(#)getch.c 8.1 12/31/84) ! 7: ! 8: ! 9: ! 10: /* ! 11: ** GET CHARACTER ! 12: ** ! 13: ** This routine is just a getchar, except it allows a pseudo- ! 14: ** EOF marker. ! 15: */ ! 16: ! 17: char ! 18: getch() ! 19: { ! 20: register char c; ! 21: ! 22: if (GiveEof) ! 23: c = '\0'; ! 24: else ! 25: c = getc(Input); ! 26: if (c < 0) ! 27: c = '\0'; ! 28: ! 29: /* deliver EOF if newline in Oneline mode */ ! 30: if (c == '\n' && Oneline) ! 31: { ! 32: ungetc(c, Input); ! 33: c = '\0'; ! 34: } ! 35: ! 36: GiveEof = FALSE; ! 37: return (c); ! 38: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.