Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libcurses Remove check for attribute/colour conflict.
details: https://anonhg.NetBSD.org/src/rev/fa6c944f30ac
branches: trunk
changeset: 542394:fa6c944f30ac
user: jdc <jdc%NetBSD.org@localhost>
date: Mon Jan 27 21:04:10 2003 +0000
description:
Remove check for attribute/colour conflict.
This is now handled in refresh.c as it's not possible to handle the
conflict with background colour here.
diffstat:
lib/libcurses/attributes.c | 11 +++--------
lib/libcurses/standout.c | 13 +++----------
lib/libcurses/underscore.c | 7 ++-----
3 files changed, 8 insertions(+), 23 deletions(-)
diffs (100 lines):
diff -r 6d64a39cc424 -r fa6c944f30ac lib/libcurses/attributes.c
--- a/lib/libcurses/attributes.c Mon Jan 27 21:03:04 2003 +0000
+++ b/lib/libcurses/attributes.c Mon Jan 27 21:04:10 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: attributes.c,v 1.9 2000/12/19 21:34:25 jdc Exp $ */
+/* $NetBSD: attributes.c,v 1.10 2003/01/27 21:04:10 jdc Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: attributes.c,v 1.9 2000/12/19 21:34:25 jdc Exp $");
+__RCSID("$NetBSD: attributes.c,v 1.10 2003/01/27 21:04:10 jdc Exp $");
#endif /* not lint */
#include "curses.h"
@@ -112,17 +112,12 @@
wstandout(win);
if ((attr_t) attr & __UNDERSCORE)
wunderscore(win);
- /* Check for conflict with color. */
- if (win->wattr & __nca)
- win->wattr &= ~__COLOR;
if ((attr_t) attr & __COLOR) {
/* If another color pair is set, turn that off first. */
win->wattr &= ~__COLOR;
/* If can do color video, set the color pair bits. */
- if (__tc_Co != NULL) {
+ if (__tc_Co != NULL)
win->wattr |= attr & __COLOR;
- win->wattr &= ~__nca;
- }
}
return (OK);
}
diff -r 6d64a39cc424 -r fa6c944f30ac lib/libcurses/standout.c
--- a/lib/libcurses/standout.c Mon Jan 27 21:03:04 2003 +0000
+++ b/lib/libcurses/standout.c Mon Jan 27 21:04:10 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: standout.c,v 1.12 2000/12/19 21:34:24 jdc Exp $ */
+/* $NetBSD: standout.c,v 1.13 2003/01/27 21:04:10 jdc Exp $ */
/*
* Copyright (c) 1981, 1993, 1994
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)standout.c 8.3 (Berkeley) 8/10/94";
#else
-__RCSID("$NetBSD: standout.c,v 1.12 2000/12/19 21:34:24 jdc Exp $");
+__RCSID("$NetBSD: standout.c,v 1.13 2003/01/27 21:04:10 jdc Exp $");
#endif
#endif /* not lint */
@@ -80,15 +80,8 @@
* If standout/standend strings, or can underline, set the
* screen standout bit.
*/
- if ((__tc_so != NULL && __tc_se != NULL) || __tc_uc != NULL) {
+ if ((__tc_so != NULL && __tc_se != NULL) || __tc_uc != NULL)
win->wattr |= __STANDOUT;
- if ((win->wattr & __COLOR) && (__nca & __STANDOUT)) {
-#ifdef DEBUG
- __CTRACE("wstandout: !COLOR\n");
-#endif
- win->wattr &= ~__COLOR;
- }
- }
return (1);
}
diff -r 6d64a39cc424 -r fa6c944f30ac lib/libcurses/underscore.c
--- a/lib/libcurses/underscore.c Mon Jan 27 21:03:04 2003 +0000
+++ b/lib/libcurses/underscore.c Mon Jan 27 21:04:10 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: underscore.c,v 1.6 2000/12/19 21:34:24 jdc Exp $ */
+/* $NetBSD: underscore.c,v 1.7 2003/01/27 21:04:10 jdc Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: underscore.c,v 1.6 2000/12/19 21:34:24 jdc Exp $");
+__RCSID("$NetBSD: underscore.c,v 1.7 2003/01/27 21:04:10 jdc Exp $");
#endif /* not lint */
#include "curses.h"
@@ -82,9 +82,6 @@
__CTRACE("wunderscore\n");
#endif
win->wattr |= __UNDERSCORE;
- if ((win->wattr & __COLOR) && (__nca & __UNDERSCORE)) {
- win->wattr &= ~__COLOR;
- }
}
return (1);
}
Home |
Main Index |
Thread Index |
Old Index