Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6]: src/lib/libcurses Pull up following revision(s) (requested by...
details: https://anonhg.NetBSD.org/src/rev/68768ffbe088
branches: netbsd-6
changeset: 773934:68768ffbe088
user: bouyer <bouyer%NetBSD.org@localhost>
date: Sat Mar 17 17:51:47 2012 +0000
description:
Pull up following revision(s) (requested by blymn in ticket #121):
lib/libcurses/clrtoeol.c: revision 1.26
lib/libcurses/clrtobot.c: revision 1.22
PR/46049: Tim van der Molen:
clrtobot() and clrtoeol() do not set background attributes
diffstat:
lib/libcurses/clrtobot.c | 15 +++++++++------
lib/libcurses/clrtoeol.c | 10 +++++-----
2 files changed, 14 insertions(+), 11 deletions(-)
diffs (85 lines):
diff -r a1bb04f37a6f -r 68768ffbe088 lib/libcurses/clrtobot.c
--- a/lib/libcurses/clrtobot.c Sat Mar 17 17:50:44 2012 +0000
+++ b/lib/libcurses/clrtobot.c Sat Mar 17 17:51:47 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: clrtobot.c,v 1.21 2009/07/22 16:57:14 roy Exp $ */
+/* $NetBSD: clrtobot.c,v 1.21.8.1 2012/03/17 17:51:47 bouyer Exp $ */
/*
* Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)clrtobot.c 8.2 (Berkeley) 5/4/94";
#else
-__RCSID("$NetBSD: clrtobot.c,v 1.21 2009/07/22 16:57:14 roy Exp $");
+__RCSID("$NetBSD: clrtobot.c,v 1.21.8.1 2012/03/17 17:51:47 bouyer Exp $");
#endif
#endif /* not lint */
@@ -77,8 +77,8 @@
starty = win->cury;
startx = win->curx;
}
- if (__using_color && win != curscr)
- attr = win->battr & __COLOR;
+ if (win != curscr)
+ attr = win->battr & __ATTRIBUTES;
else
attr = 0;
for (y = starty; y < win->maxy; y++) {
@@ -89,12 +89,15 @@
if (sp->ch != win->bch || sp->attr != attr) {
#else
if (sp->ch != (wchar_t)btowc((int) win->bch) ||
- (sp->attr & WA_ATTRIBUTES) != 0 || sp->nsp) {
+ (sp->attr & WA_ATTRIBUTES) != attr || sp->nsp) {
#endif /* HAVE_WCHAR */
maxx = sp;
if (minx == -1)
minx = (int)(sp - win->alines[y]->line);
- sp->attr = attr;
+ if (sp->attr & __ALTCHARSET)
+ sp->attr = attr | __ALTCHARSET;
+ else
+ sp->attr = attr;
#ifdef HAVE_WCHAR
sp->ch = ( wchar_t )btowc(( int ) win->bch);
if (_cursesi_copy_nsp(win->bnsp, sp) == ERR)
diff -r a1bb04f37a6f -r 68768ffbe088 lib/libcurses/clrtoeol.c
--- a/lib/libcurses/clrtoeol.c Sat Mar 17 17:50:44 2012 +0000
+++ b/lib/libcurses/clrtoeol.c Sat Mar 17 17:51:47 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: clrtoeol.c,v 1.25 2009/07/22 16:57:14 roy Exp $ */
+/* $NetBSD: clrtoeol.c,v 1.25.8.1 2012/03/17 17:51:47 bouyer Exp $ */
/*
* Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)clrtoeol.c 8.2 (Berkeley) 5/4/94";
#else
-__RCSID("$NetBSD: clrtoeol.c,v 1.25 2009/07/22 16:57:14 roy Exp $");
+__RCSID("$NetBSD: clrtoeol.c,v 1.25.8.1 2012/03/17 17:51:47 bouyer Exp $");
#endif
#endif /* not lint */
@@ -82,8 +82,8 @@
end = &win->alines[y]->line[win->maxx];
minx = -1;
maxx = &win->alines[y]->line[x];
- if (__using_color && win != curscr)
- attr = win->battr & __COLOR;
+ if (win != curscr)
+ attr = win->battr & __ATTRIBUTES;
else
attr = 0;
for (sp = maxx; sp < end; sp++)
@@ -97,7 +97,7 @@
maxx = sp;
if (minx == -1)
minx = (int) (sp - win->alines[y]->line);
- sp->attr = attr;
+ sp->attr = attr | (sp->attr & __ALTCHARSET);
#ifdef HAVE_WCHAR
sp->ch = ( wchar_t )btowc(( int ) win->bch);
if (_cursesi_copy_nsp(win->bnsp, sp) == ERR)
Home |
Main Index |
Thread Index |
Old Index