From: Edward Wang Date: Sat, 30 Jul 1983 08:08:43 +0000 (-0800) Subject: turn off ^\ and unctrl the new termcap entry. X-Git-Tag: BSD-4_2-Snapshot-Development~607 X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/commitdiff_plain/9ad71678fe81ecd918816a5501e4815fcee20c21 turn off ^\ and unctrl the new termcap entry. SCCS-vsn: usr.bin/window/wwinit.c 1.7 --- diff --git a/usr/src/usr.bin/window/wwinit.c b/usr/src/usr.bin/window/wwinit.c index a7b93fec99..5a740e668a 100644 --- a/usr/src/usr.bin/window/wwinit.c +++ b/usr/src/usr.bin/window/wwinit.c @@ -1,5 +1,5 @@ #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" @@ -37,7 +37,6 @@ wwinit() 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) @@ -75,16 +74,19 @@ register char *cap; { 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] = '='; - while (*kp++ = *str++) - ; - kp[-1] = ':'; + while (*str) { + for (p = unctrl(*str++); *kp++ = *p++;) + ; + kp--; + } + *kp++ = ':'; *kp = 0; } }