# include "curses.ext" /* * This routine reads in a character from the window. * * 7/8/81 (Berkeley) @(#)getch.c 1.2 */ wgetch(win) reg WINDOW *win; { reg inp; # ifdef DEBUG fprintf(outf, "WGETCH: _echoit = %c\n", _echoit ? 'T' : 'F'); # endif inp = _getchar(); # ifdef DEBUG fprintf(outf,"WGETCH got '%s'\n",unctrl(inp)); # endif if (_echoit) { if(waddch(win, inp) == ERR) return(ERR); wrefresh(win); } return inp; }