Module Name:    src
Committed By:   uwe
Date:           Sun Nov 18 22:53:22 UTC 2018

Modified Files:
        src/lib/libcurses: background.c

Log Message:
wbkgrnd - do not duplicate code that's already in wbkgrndset()


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/lib/libcurses/background.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libcurses/background.c
diff -u src/lib/libcurses/background.c:1.23 src/lib/libcurses/background.c:1.24
--- src/lib/libcurses/background.c:1.23	Sun Nov 18 22:34:32 2018
+++ src/lib/libcurses/background.c	Sun Nov 18 22:53:22 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: background.c,v 1.23 2018/11/18 22:34:32 uwe Exp $	*/
+/*	$NetBSD: background.c,v 1.24 2018/11/18 22:53:22 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.23 2018/11/18 22:34:32 uwe Exp $");
+__RCSID("$NetBSD: background.c,v 1.24 2018/11/18 22:53:22 uwe Exp $");
 #endif				/* not lint */
 
 #include <stdlib.h>
@@ -227,8 +227,6 @@ wbkgrndset(WINDOW *win, const cchar_t *w
 int
 wbkgrnd(WINDOW *win, const cchar_t *wch)
 {
-	attr_t battr;
-
 #ifdef DEBUG
 	__CTRACE(__CTRACE_ATTR, "wbkgrnd: (%p), '%s', %x\n",
 		win, (const char *) wunctrl(wch), wch->attributes);
@@ -238,12 +236,6 @@ wbkgrnd(WINDOW *win, const cchar_t *wch)
 	if (!wch->elements || wcwidth( wch->vals[ 0 ]) > 1)
 		return ERR;
 
-	/* Background attributes (check colour). */
-	battr = wch->attributes & WA_ATTRIBUTES;
-	if (__using_color && !( battr & __COLOR))
-		battr |= __default_color;
-
-	win->battr = battr;
 	wbkgrndset(win, wch);
 	__touchwin(win);
 	return OK;

Reply via email to