Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libcurses Move 'i' into DEBUG only code (now there be th...



details:   https://anonhg.NetBSD.org/src/rev/d41d5a1d8030
branches:  trunk
changeset: 1026300:d41d5a1d8030
user:      kre <kre%NetBSD.org@localhost>
date:      Tue Nov 16 23:23:02 2021 +0000

description:
Move 'i' into DEBUG only code (now there be three).
Hopefully unbreaks !DEBUG builds.

diffstat:

 lib/libcurses/ins_wstr.c |  12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diffs (54 lines):

diff -r 7897ddefea5d -r d41d5a1d8030 lib/libcurses/ins_wstr.c
--- a/lib/libcurses/ins_wstr.c  Tue Nov 16 22:12:44 2021 +0000
+++ b/lib/libcurses/ins_wstr.c  Tue Nov 16 23:23:02 2021 +0000
@@ -1,4 +1,4 @@
-/*   $NetBSD: ins_wstr.c,v 1.19 2021/11/16 21:00:50 blymn Exp $ */
+/*   $NetBSD: ins_wstr.c,v 1.20 2021/11/16 23:23:02 kre Exp $ */
 
 /*
  * Copyright (c) 2005 The NetBSD Foundation Inc.
@@ -36,7 +36,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: ins_wstr.c,v 1.19 2021/11/16 21:00:50 blymn Exp $");
+__RCSID("$NetBSD: ins_wstr.c,v 1.20 2021/11/16 23:23:02 kre Exp $");
 #endif                                           /* not lint */
 
 #include <string.h>
@@ -135,7 +135,7 @@
        const wchar_t *scp;
        cchar_t cc;
        wchar_t *lstr, *slstr;
-       int i, width, len, lx, sx, x, y, tx, ty, cw, pcw, newx, tn, w;
+       int width, len, lx, sx, x, y, tx, ty, cw, pcw, newx, tn, w;
        wchar_t ws[] = L"               ";
 
        /* check for leading non-spacing character */
@@ -294,6 +294,8 @@
                        *lnp->firstchp = newx;
 #ifdef DEBUG
                {
+                       int i;
+
                        __CTRACE(__CTRACE_INPUT, "========before=======\n");
                        for (i = 0; i < win->maxx; i++)
                        __CTRACE(__CTRACE_INPUT,
@@ -334,6 +336,8 @@
                        }
 #ifdef DEBUG
                        {
+                               int i;
+
                                __CTRACE(__CTRACE_INPUT, "=====after shift====\n");
                                for (i = 0; i < win->maxx; i++)
                                        __CTRACE(__CTRACE_INPUT,
@@ -363,6 +367,8 @@
 
 #ifdef DEBUG
                {
+                       int i;
+
                        __CTRACE(__CTRACE_INPUT, "lx = %d, x = %x\n", lx, x);
                        __CTRACE(__CTRACE_INPUT, "========after=======\n");
                        for (i = 0; i < win->maxx; i++)



Home | Main Index | Thread Index | Old Index