summaryrefslogtreecommitdiffstats
path: root/usr.bin/window/wwlabel.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1994-10-30 04:05:50 +0000
committerache <ache@FreeBSD.org>1994-10-30 04:05:50 +0000
commite8cc63c3bb3b5dc1015abf84a6b9eee2453f6898 (patch)
tree98f244c6b5bf842f3b8d541748cb595b796e9a32 /usr.bin/window/wwlabel.c
parent491abb609952c74e827584e709db09c2ea9aed74 (diff)
downloadFreeBSD-src-e8cc63c3bb3b5dc1015abf84a6b9eee2453f6898.zip
FreeBSD-src-e8cc63c3bb3b5dc1015abf84a6b9eee2453f6898.tar.gz
More 8bit/ctype fixes, command mode
Diffstat (limited to 'usr.bin/window/wwlabel.c')
-rw-r--r--usr.bin/window/wwlabel.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/usr.bin/window/wwlabel.c b/usr.bin/window/wwlabel.c
index 4bb128f..d4cc99e 100644
--- a/usr.bin/window/wwlabel.c
+++ b/usr.bin/window/wwlabel.c
@@ -61,6 +61,7 @@ char *l;
register char *smap;
char touched;
unsigned char *p;
+ static unsigned char cbuf[2];
if (f->ww_fmap == 0)
return;
@@ -78,8 +79,14 @@ char *l;
jj = MIN(w->ww_i.r, f->ww_i.r);
j = w->ww_i.l + where;
- while (j < jj && *l)
- for (p = unctrl(*l++); j < jj && *p; j++, p++) {
+ while (j < jj && *l) {
+ if (isctrl(*l))
+ p = unctrl(*l);
+ else {
+ cbuf[0] = *l;
+ p = cbuf;
+ }
+ for (l++; j < jj && *p; j++, p++) {
/* can't label if not already framed */
if (win[j] & WWM_GLS)
continue;
@@ -92,5 +99,6 @@ char *l;
}
fmap[j] |= WWF_LABEL;
}
+ }
wwtouched[row] = touched;
}
OpenPOWER on IntegriCloud