summaryrefslogtreecommitdiff
path: root/lib/libcurses
diff options
context:
space:
mode:
authorblymn <blymn@NetBSD.org>2021-06-22 07:22:44 +0000
committerblymn <blymn@NetBSD.org>2021-06-22 07:22:44 +0000
commit5d5c6baf1ae607bf689afb0d4bb339ef982bd65e (patch)
treeef5a9d711bad9031fd37bc68da57cc78a6af9530 /lib/libcurses
parentea22804450a2d4b3890a915ba37933f2238a1133 (diff)
Fix the debug output to stop spamming out the aline for row 0, we
may not be working on that row so the output is pointless.
Diffstat (limited to 'lib/libcurses')
-rw-r--r--lib/libcurses/ins_wch.c27
1 files changed, 6 insertions, 21 deletions
diff --git a/lib/libcurses/ins_wch.c b/lib/libcurses/ins_wch.c
index ccf578ceae9..ac9e17cfac6 100644
--- a/lib/libcurses/ins_wch.c
+++ b/lib/libcurses/ins_wch.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ins_wch.c,v 1.15 2020/07/06 22:46:50 uwe Exp $ */
+/* $NetBSD: ins_wch.c,v 1.16 2021/06/22 07:22:44 blymn Exp $ */
/*
* Copyright (c) 2005 The NetBSD Foundation Inc.
@@ -36,7 +36,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: ins_wch.c,v 1.15 2020/07/06 22:46:50 uwe Exp $");
+__RCSID("$NetBSD: ins_wch.c,v 1.16 2021/06/22 07:22:44 blymn Exp $");
#endif /* not lint */
#include <string.h>
@@ -95,19 +95,14 @@ wins_wch(WINDOW *win, const cchar_t *wch)
if (!wch)
return OK;
cw = wcwidth(wch->vals[0]);
+#ifdef DEBUG
+ __CTRACE(__CTRACE_INPUT, "wins_wch: wcwidth %d\n", cw);
+#endif
if (cw < 0)
cw = 1;
if (!cw)
return wadd_wch( win, wch );
-#ifdef DEBUG
- __CTRACE(__CTRACE_INPUT, "--before--\n");
- for (x = 0; x < win->maxx; x++)
- __CTRACE(__CTRACE_INPUT, "wins_wch: (0,%d)=(%x,%x,%p)\n", x,
- win->alines[0]->line[x].ch,
- win->alines[0]->line[x].attr,
- win->alines[0]->line[x].nsp);
-#endif /* DEBUG */
x = win->curx;
y = win->cury;
#ifdef DEBUG
@@ -217,17 +212,7 @@ wins_wch(WINDOW *win, const cchar_t *wch)
temp1->nsp = NULL;
ex++, temp1++;
}
-#ifdef DEBUG
- {
- __CTRACE(__CTRACE_INPUT, "--after---\n");
- for (x = 0; x < win->maxx; x++)
- __CTRACE(__CTRACE_INPUT,
- "wins_wch: (0,%d)=(%x,%x,%p)\n", x,
- win->alines[0]->line[x].ch,
- win->alines[0]->line[x].attr,
- win->alines[0]->line[x].nsp);
- }
-#endif /* DEBUG */
+
newx = win->maxx - 1 + win->ch_off;
if (newx > *lnp->lastchp)
*lnp->lastchp = newx;