[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ncurses-5.4-20040918.patch.gz
From: |
Marcin 'Qrczak' Kowalczyk |
Subject: |
Re: ncurses-5.4-20040918.patch.gz |
Date: |
Mon, 27 Sep 2004 23:45:59 +0200 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
Thomas Dickey <address@hidden> writes:
> + remove check in wget_wch() added to fix an infinite loop, appears to
> have been working around a transitory glibc bug, and interferes
> with normal operation (report by Marcin 'Qrczak' Kowalczyk).
> + correct wadd_wch() and wecho_wch(), which did not pass the rendition
> information (report by Marcin 'Qrczak' Kowalczyk).
Thanks. Here is a change needed to make setcchar/getcchar actually
work with colors:
--- ncurses-5.4/ncurses/widechar/lib_cchar.c.orig 2004-09-27
23:10:47.113467830 +0200
+++ ncurses-5.4/ncurses/widechar/lib_cchar.c 2004-09-27 23:14:13.220833629
+0200
@@ -79,7 +79,7 @@
memset(wcval, 0, sizeof(*wcval));
if (len != 0) {
- SetAttr(*wcval, attrs | color_pair);
+ SetAttr(*wcval, attrs | COLOR_PAIR(color_pair));
memcpy(&wcval->chars, wch, len * sizeof(wchar_t));
TR(TRACE_CCALLS, ("copy %d wchars, first is %s", len,
_tracecchar_t(wcval)));
@@ -114,8 +114,8 @@
} else if (attrs == 0 || color_pair == 0) {
code = ERR;
} else if (len >= 0) {
- *attrs = AttrOf(*wcval);
- *color_pair = AttrOf(*wcval) & A_COLOR;
+ *attrs = AttrOf(*wcval) & A_ATTRIBUTES;
+ *color_pair = PAIR_NUMBER(AttrOf(*wcval));
wmemcpy(wch, wcval->chars, (unsigned) len);
wch[len] = L'\0';
code = OK;
--
__("< Marcin Kowalczyk
\__/ address@hidden
^^ http://qrnik.knm.org.pl/~qrczak/