summaryrefslogtreecommitdiffstats
path: root/rogue/message.c
diff options
context:
space:
mode:
authormycroft <mycroft@NetBSD.org>1993-08-10 16:33:14 +0000
committermycroft <mycroft@NetBSD.org>1993-08-10 16:33:14 +0000
commitd4bc69f1955dbd6fab42819a95454e96b66a74aa (patch)
tree7705c802b8fc4011427ac9792e620d50d96b1ec3 /rogue/message.c
parentc09e3a474e3e86518ff93fa0bf757512217e5669 (diff)
downloadbsdgames-darwin-d4bc69f1955dbd6fab42819a95454e96b66a74aa.tar.gz
bsdgames-darwin-d4bc69f1955dbd6fab42819a95454e96b66a74aa.tar.zst
bsdgames-darwin-d4bc69f1955dbd6fab42819a95454e96b66a74aa.zip
Rewrite special character handling.
Diffstat (limited to 'rogue/message.c')
-rw-r--r--rogue/message.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/rogue/message.c b/rogue/message.c
index d3fcf09a..2bdcd3b2 100644
--- a/rogue/message.c
+++ b/rogue/message.c
@@ -36,7 +36,7 @@
#ifndef lint
/*static char sccsid[] = "from: @(#)message.c 5.3 (Berkeley) 6/1/90";*/
-static char rcsid[] = "$Id: message.c,v 1.2 1993/08/01 18:52:24 mycroft Exp $";
+static char rcsid[] = "$Id: message.c,v 1.3 1993/08/10 16:33:14 mycroft Exp $";
#endif /* not lint */
/*
@@ -52,6 +52,8 @@ static char rcsid[] = "$Id: message.c,v 1.2 1993/08/01 18:52:24 mycroft Exp $";
*/
#include <stdio.h>
+#include <termios.h>
+#include <signal.h>
#include "rogue.h"
char msgs[NMESSAGES][DCOLS] = {"", "", "", "", ""};
@@ -194,23 +196,22 @@ rgetchar()
for(;;) {
ch = getchar();
- switch(ch) {
- case '\022':
+#ifdef VREPRINT
+ if (ch == origtermio.c_cc[VREPRINT])
wrefresh(curscr);
- break;
-#ifdef UNIX_BSD4_2
- case '\032':
+ else
+#endif
+#ifdef VSUSP
+ if (ch == origtermio.c_cc[VSUSP]) {
printf(CL);
fflush(stdout);
- tstp();
- break;
+ kill(0, SIGTSTP);
+ } else
#endif
- case '&':
+ if (ch == '&')
save_screen();
- break;
- default:
+ else
return(ch);
- }
}
}
/*