turn off ^\ and unctrl the new termcap entry.
authorEdward Wang <edward@ucbvax.Berkeley.EDU>
Sat, 30 Jul 1983 08:08:43 +0000 (00:08 -0800)
committerEdward Wang <edward@ucbvax.Berkeley.EDU>
Sat, 30 Jul 1983 08:08:43 +0000 (00:08 -0800)
SCCS-vsn: usr.bin/window/wwinit.c 1.7

usr/src/usr.bin/window/wwinit.c

index a7b93fe..5a740e6 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)wwinit.c    1.6 83/07/26";
+static char *sccsid = "@(#)wwinit.c    1.7 83/07/29";
 #endif
 
 #include "ww.h"
 #endif
 
 #include "ww.h"
@@ -37,7 +37,6 @@ wwinit()
        wwnewtty.ww_sgttyb.sg_flags |= CBREAK;
        wwnewtty.ww_sgttyb.sg_flags &= ~(ECHO|CRMOD);
        wwnewtty.ww_lmode |= LLITOUT;
        wwnewtty.ww_sgttyb.sg_flags |= CBREAK;
        wwnewtty.ww_sgttyb.sg_flags &= ~(ECHO|CRMOD);
        wwnewtty.ww_lmode |= LLITOUT;
-       wwnewtty.ww_tchars.t_quitc = wwoldtty.ww_tchars.t_quitc;
        if (wwsettty(0, &wwnewtty) < 0)
                return -1;
        if (Winit(2, 1) != 0)
        if (wwsettty(0, &wwnewtty) < 0)
                return -1;
        if (Winit(2, 1) != 0)
@@ -75,16 +74,19 @@ register char *cap;
 {
        static char tbuf[512];
        static char *tp = tbuf;
 {
        static char tbuf[512];
        static char *tp = tbuf;
-       register char *str;
+       register char *str, *p;
        char *tgetstr();
 
        if ((str = tgetstr(cap, &tp)) != 0) {
                while (*kp++ = *cap++)
                        ;
                kp[-1] = '=';
        char *tgetstr();
 
        if ((str = tgetstr(cap, &tp)) != 0) {
                while (*kp++ = *cap++)
                        ;
                kp[-1] = '=';
-               while (*kp++ = *str++)
-                       ;
-               kp[-1] = ':';
+               while (*str) {
+                       for (p = unctrl(*str++); *kp++ = *p++;)
+                               ;
+                       kp--;
+               }
+               *kp++ = ':';
                *kp = 0;
        }
 }
                *kp = 0;
        }
 }