summaryrefslogtreecommitdiffstats
path: root/hangman
diff options
context:
space:
mode:
authormycroft <mycroft@NetBSD.org>1993-08-10 16:50:01 +0000
committermycroft <mycroft@NetBSD.org>1993-08-10 16:50:01 +0000
commitb8c4423077142f986300730dda23b325a61076c9 (patch)
tree705a8803fe98fb3acc0936ed9a8e452dcdab5766 /hangman
parentd4bc69f1955dbd6fab42819a95454e96b66a74aa (diff)
downloadbsdgames-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.c12
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;
}
}