Source-Changes-HG archive

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

[src/trunk]: src/lib/libcurses wbkgd - do not duplicate the code that's alrea...



details:   https://anonhg.NetBSD.org/src/rev/a36127efd2da
branches:  trunk
changeset: 994704:a36127efd2da
user:      uwe <uwe%NetBSD.org@localhost>
date:      Sun Nov 18 21:01:16 2018 +0000

description:
wbkgd - do not duplicate the code that's already in wbkgdset()
that we do call anyway.

diffstat:

 lib/libcurses/background.c |  11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)

diffs (33 lines):

diff -r ed4b773fab66 -r a36127efd2da lib/libcurses/background.c
--- a/lib/libcurses/background.c        Sun Nov 18 20:26:29 2018 +0000
+++ b/lib/libcurses/background.c        Sun Nov 18 21:01:16 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: background.c,v 1.19 2018/11/18 20:26:29 uwe Exp $      */
+/*     $NetBSD: background.c,v 1.20 2018/11/18 21:01:16 uwe Exp $      */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: background.c,v 1.19 2018/11/18 20:26:29 uwe Exp $");
+__RCSID("$NetBSD: background.c,v 1.20 2018/11/18 21:01:16 uwe Exp $");
 #endif                         /* not lint */
 
 #include <stdlib.h>
@@ -95,13 +95,8 @@
        __CTRACE(__CTRACE_ATTR, "wbkgd: (%p), '%s', %08x\n",
            win, unctrl(ch & __CHARTEXT), ch & __ATTRIBUTES);
 #endif
+       wbkgdset(win, ch);
 
-       /* Background attributes (check colour). */
-       if (__using_color && !(ch & __COLOR))
-               ch |= __default_color;
-
-       win->battr = (attr_t) ch & __ATTRIBUTES;
-       wbkgdset(win, ch);
        for (y = 0; y < win->maxy; y++)
                for (x = 0; x < win->maxx; x++) {
                        /* Copy character if space */



Home | Main Index | Thread Index | Old Index