changeset 2817:0336f54042df

[project @ 1997-03-16 20:09:45 by jwe]
author jwe
date Sun, 16 Mar 1997 20:09:46 +0000
parents ad4bf2a82b4f
children cac5a66e48c6
files info/ChangeLog info/terminal.c
diffstat 2 files changed, 11 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/info/ChangeLog
+++ b/info/ChangeLog
@@ -1,3 +1,9 @@
+Sun Mar 16 14:07:05 1997  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* terminal.c: Include infomap.h here.
+	(terminal_prep_terminal): Use DEL instead of '\177'.
+	Also disable Control-C as quit or interrupt character.
+
 Wed Mar 12 17:00:24 1997  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
 	* Makefile.in (install-strip): New target.
--- a/info/terminal.c
+++ b/info/terminal.c
@@ -26,6 +26,7 @@
 
 #include <stdio.h>
 #include <sys/types.h>
+#include "infomap.h"
 #include "terminal.h"
 #include "termdep.h"
 
@@ -647,10 +648,10 @@
   ttybuff.c_cc[VMIN] = 1;
   ttybuff.c_cc[VTIME] = 0;
 
-  if (ttybuff.c_cc[VINTR] == '\177')
+  if (ttybuff.c_cc[VINTR] == DEL || ttybuff.c_cc[VINTR] == Control ('c'))
     ttybuff.c_cc[VINTR] = -1;
 
-  if (ttybuff.c_cc[VQUIT] == '\177')
+  if (ttybuff.c_cc[VQUIT] == DEL || ttybuff.c_cc[VQUIT] == Control ('c'))
     ttybuff.c_cc[VQUIT] = -1;
 #endif
 
@@ -698,10 +699,10 @@
 
     /* If the a quit or interrupt character conflicts with one of our
        commands, then make it go away. */
-    if (temp.t_intrc == '\177')
+    if (temp.t_intrc == DEL || temp.t_intrc == Control ('c'))
       temp.t_intrc = -1;
 
-    if (temp.t_quitc == '\177')
+    if (temp.t_quitc == DEL || temp.t_quitc == Control ('c'))
       temp.t_quitc = -1;
 
     ioctl (tty, TIOCSETC, &temp);