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/43e4206c939a
branches:  trunk
changeset: 445967:43e4206c939a
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 8b3792ae8e07 -r 43e4206c939a 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