diff options
author | mycroft <mycroft@NetBSD.org> | 1993-08-10 16:50:01 +0000 |
---|---|---|
committer | mycroft <mycroft@NetBSD.org> | 1993-08-10 16:50:01 +0000 |
commit | b8c4423077142f986300730dda23b325a61076c9 (patch) | |
tree | 705a8803fe98fb3acc0936ed9a8e452dcdab5766 /hangman | |
parent | d4bc69f1955dbd6fab42819a95454e96b66a74aa (diff) | |
download | bsdgames-darwin-b8c4423077142f986300730dda23b325a61076c9.tar.gz bsdgames-darwin-b8c4423077142f986300730dda23b325a61076c9.tar.zst bsdgames-darwin-b8c4423077142f986300730dda23b325a61076c9.zip |
Rewrite special character handling.
Diffstat (limited to 'hangman')
-rw-r--r-- | hangman/getguess.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/hangman/getguess.c b/hangman/getguess.c index 53848c0c..99001c95 100644 --- a/hangman/getguess.c +++ b/hangman/getguess.c @@ -33,9 +33,10 @@ #ifndef lint /*static char sccsid[] = "from: @(#)getguess.c 5.4 (Berkeley) 6/1/90";*/ -static char rcsid[] = "$Id: getguess.c,v 1.2 1993/08/01 18:54:26 mycroft Exp $"; +static char rcsid[] = "$Id: getguess.c,v 1.3 1993/08/10 16:50:01 mycroft Exp $"; #endif /* not lint */ +# include <termios.h> # include "hangman.h" /* @@ -61,7 +62,7 @@ getguess() else break; } - else if (ch == CTRL('D')) + else if (ch == origtermio.c_cc[VEOF]) die(); else mvprintw(MESGY, MESGX, "Not a valid guess: '%s'", @@ -98,11 +99,12 @@ readch() if (++cnt > 100) die(); } - else if (ch == CTRL('L')) { +#ifdef VREPRINT + else if (ch == origtermio.c_cc[VREPRINT]) { wrefresh(curscr); mvcur(0, 0, curscr->_cury, curscr->_curx); - } - else + } else +#endif return ch; } } |