Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libcurses Check for conflict between colour and other at...
details: https://anonhg.NetBSD.org/src/rev/f4f81092a215
branches: trunk
changeset: 542398:f4f81092a215
user: jdc <jdc%NetBSD.org@localhost>
date: Mon Jan 27 21:11:12 2003 +0000
description:
Check for conflict between colour and other attributes. The previous
checks when adding attributes could be inadequate if background colours
were later added to a window.
diffstat:
lib/libcurses/refresh.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diffs (38 lines):
diff -r b76b45932142 -r f4f81092a215 lib/libcurses/refresh.c
--- a/lib/libcurses/refresh.c Mon Jan 27 21:09:20 2003 +0000
+++ b/lib/libcurses/refresh.c Mon Jan 27 21:11:12 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: refresh.c,v 1.51 2003/01/12 12:53:51 jdc Exp $ */
+/* $NetBSD: refresh.c,v 1.52 2003/01/27 21:11:12 jdc Exp $ */
/*
* Copyright (c) 1981, 1993, 1994
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)refresh.c 8.7 (Berkeley) 8/13/94";
#else
-__RCSID("$NetBSD: refresh.c,v 1.51 2003/01/12 12:53:51 jdc Exp $");
+__RCSID("$NetBSD: refresh.c,v 1.52 2003/01/27 21:11:12 jdc Exp $");
#endif
#endif /* not lint */
@@ -186,12 +186,19 @@
wx <= *wlp->lastchp && wx < maxx &&
x_off < screen->__virtscr->maxx; wx++, x_off++) {
vlp->line[x_off].attr = wlp->line[wx].attr;
+ /* Copy attributes */
if (wlp->line[wx].attr & __COLOR)
vlp->line[x_off].attr |=
wlp->line[wx].battr & ~__COLOR;
else
vlp->line[x_off].attr |=
wlp->line[wx].battr;
+ /* Check for nca conflict with colour */
+ if ((vlp->line[x_off].attr & __COLOR) &&
+ (vlp->line[x_off].attr &
+ _cursesi_screen->nca))
+ vlp->line[x_off].attr &= ~__COLOR;
+ /* Copy character */
if (wlp->line[wx].ch == ' ' &&
wlp->line[wx].bch != ' ')
vlp->line[x_off].ch
Home |
Main Index |
Thread Index |
Old Index