From e8cc63c3bb3b5dc1015abf84a6b9eee2453f6898 Mon Sep 17 00:00:00 2001 From: ache Date: Sun, 30 Oct 1994 04:05:50 +0000 Subject: More 8bit/ctype fixes, command mode --- usr.bin/window/wwgets.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'usr.bin/window/wwgets.c') diff --git a/usr.bin/window/wwgets.c b/usr.bin/window/wwgets.c index 1141834..a7223b7 100644 --- a/usr.bin/window/wwgets.c +++ b/usr.bin/window/wwgets.c @@ -91,7 +91,10 @@ register struct ww *w; if (p >= buf + n - 1) wwputc(ctrl('g'), w); else - wwputs(unctrl(*p++ = c), w); + if (isctrl(c)) + wwputs(unctrl(*p++ = c), w); + else + wwputc(*p++ = c, w); } } *p = 0; @@ -104,6 +107,6 @@ struct ww *w; { register i; - for (i = strlen(unctrl(c)); --i >= 0;) + for (i = isctrl(c) ? strlen(unctrl(c)) : 1; --i >= 0;) (void) wwwrite(w, "\b \b", 3); } -- cgit v1.1