Source-Changes-HG archive

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

[src/trunk]: src/lib/libcurses Further tweak previous. Change the check orde...



details:   https://anonhg.NetBSD.org/src/rev/f6b52165a283
branches:  trunk
changeset: 445927:f6b52165a283
user:      uwe <uwe%NetBSD.org@localhost>
date:      Sun Nov 18 02:39:44 2018 +0000

description:
Further tweak previous.  Change the check order to be more logical.
No functional change intentded.  While here fix indentation.

diffstat:

 lib/libcurses/refresh.c |  11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diffs (38 lines):

diff -r 9b9fbe2df0f7 -r f6b52165a283 lib/libcurses/refresh.c
--- a/lib/libcurses/refresh.c   Sun Nov 18 02:34:39 2018 +0000
+++ b/lib/libcurses/refresh.c   Sun Nov 18 02:39:44 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: refresh.c,v 1.99 2018/11/18 02:34:39 uwe Exp $ */
+/*     $NetBSD: refresh.c,v 1.100 2018/11/18 02:39:44 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.99 2018/11/18 02:34:39 uwe Exp $");
+__RCSID("$NetBSD: refresh.c,v 1.100 2018/11/18 02:39:44 uwe Exp $");
 #endif
 #endif                         /* not lint */
 
@@ -1250,16 +1250,15 @@
                _cursesi_screen->ly = wy;
                _cursesi_screen->lx = wx;
                while (wx <= lch &&
-                      (!celleq(nsp, csp)
-                       || (wlp->flags & __ISFORCED)))
+                      ((wlp->flags & __ISFORCED) || !celleq(nsp, csp)))
                {
 #ifndef HAVE_WCHAR
                        if (ce != NULL && wx >= nlsp
                            && nsp->ch == ' ' && nsp->attr == lspc)
 #else
                        if (ce != NULL && wx >= nlsp
-                          && nsp->ch == (wchar_t)btowc((int)' ') /* XXX */
-                          && (nsp->attr & WA_ATTRIBUTES) == lspc)
+                           && nsp->ch == (wchar_t)btowc((int)' ') /* XXX */
+                           && (nsp->attr & WA_ATTRIBUTES) == lspc)
 #endif
                        {
                                /* Check for clear to end-of-line. */



Home | Main Index | Thread Index | Old Index