Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libcurses Merge another #ifdefs that now has identical c...
details: https://anonhg.NetBSD.org/src/rev/9b9336041bf6
branches: trunk
changeset: 445925:9b9336041bf6
user: uwe <uwe%NetBSD.org@localhost>
date: Sun Nov 18 02:17:24 2018 +0000
description:
Merge another #ifdefs that now has identical code in both branches
modulo swapped arguments to celleq() call. Same object code is
generated otherwise for both HAVE_WCHAR and !HAVE_WCHAR
diffstat:
lib/libcurses/refresh.c | 45 ++++++++++++++++-----------------------------
1 files changed, 16 insertions(+), 29 deletions(-)
diffs (77 lines):
diff -r 0ac212f81bc8 -r 9b9336041bf6 lib/libcurses/refresh.c
--- a/lib/libcurses/refresh.c Sun Nov 18 01:54:30 2018 +0000
+++ b/lib/libcurses/refresh.c Sun Nov 18 02:17:24 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: refresh.c,v 1.97 2018/11/18 01:54:30 uwe Exp $ */
+/* $NetBSD: refresh.c,v 1.98 2018/11/18 02:17:24 uwe Exp $ */
/*
* Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)refresh.c 8.7 (Berkeley) 8/13/94";
#else
-__RCSID("$NetBSD: refresh.c,v 1.97 2018/11/18 01:54:30 uwe Exp $");
+__RCSID("$NetBSD: refresh.c,v 1.98 2018/11/18 02:17:24 uwe Exp $");
#endif
#endif /* not lint */
@@ -1213,14 +1213,23 @@
while (wx <= lch) {
#ifdef DEBUG
+#ifndef HAVE_WCHAR
__CTRACE(__CTRACE_REFRESH, "makech: wx=%d,lch=%d\n", wx, lch);
+#else
+ __CTRACE(__CTRACE_REFRESH, "makech: nsp=(%x,%x,%x,%x,%p)\n",
+ nsp->ch, nsp->attr, win->bch, win->battr, nsp->nsp);
+ __CTRACE(__CTRACE_REFRESH, "makech: csp=(%x,%x,%x,%x,%p)\n",
+ csp->ch, csp->attr, win->bch, win->battr, csp->nsp);
+#endif
#endif /* DEBUG */
-#ifndef HAVE_WCHAR
- if (!(wlp->flags & __ISFORCED) && celleq(nsp, csp))
+ if (!(wlp->flags & __ISFORCED) &&
+#ifdef HAVE_WCHAR
+ ((nsp->attr & __WCWIDTH) != __WCWIDTH) &&
+#endif
+ celleq(nsp, csp))
{
if (wx <= lch) {
- while (wx <= lch && celleq(nsp, csp))
- {
+ while (wx <= lch && celleq(nsp, csp)) {
nsp++;
if (!_cursesi_screen->curwin)
++csp;
@@ -1230,29 +1239,7 @@
}
break;
}
-#else
-#ifdef DEBUG
- __CTRACE(__CTRACE_REFRESH, "makech: nsp=(%x,%x,%x,%x,%p)\n",
- nsp->ch, nsp->attr, win->bch, win->battr, nsp->nsp);
- __CTRACE(__CTRACE_REFRESH, "makech: csp=(%x,%x,%x,%x,%p)\n",
- csp->ch, csp->attr, win->bch, win->battr, csp->nsp);
-#endif /* DEBUG */
- if (!(wlp->flags & __ISFORCED) &&
- (((nsp->attr & __WCWIDTH) != __WCWIDTH) &&
- celleq(nsp, csp)))
- {
- if (wx <= lch) {
- while (wx <= lch && celleq( csp, nsp )) {
- nsp++;
- if (!_cursesi_screen->curwin)
- ++csp;
- ++wx;
- }
- continue;
- }
- break;
- }
-#endif /* HAVE_WCHAR */
+
domvcur(win, _cursesi_screen->ly, _cursesi_screen->lx, wy, wx);
#ifdef DEBUG
Home |
Main Index |
Thread Index |
Old Index