[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Issue using more than 256 Colors in ncurses version 6.0.20170401
From: |
Thomas Dickey |
Subject: |
Re: Issue using more than 256 Colors in ncurses version 6.0.20170401 |
Date: |
Wed, 26 Apr 2017 20:01:56 -0400 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Wed, Apr 26, 2017 at 12:21:10PM -0700, Darby Payne wrote:
> Hi,
>
> Apologizes if this is the wrong place to submit bug reports. I have seen an
It is the bug-ncurses list :-)
> issue with version 6.0.20170401 of ncurses where using more than 256 color
> pairs no longer seems to work with the macro COLOR_PAIR.
>
> The specific line of code I was using to init the colors was
>
> init_pair(color, color, color);
>
> Then to set the color
>
> attron(COLOR_PAIR(x));
thanks - I'll take a look to see.
> However when using more than 256 color pairs COLOR_PAIR no longer works
> correctly. If I use a custom macro instead of COLOR_PAIR it seems to work.
> So for example
>
> #define MY_A_COLOR NCURSES_BITS(((1U) << 16) - 1U, 0)
> #define MY_COLOR_PAIR(n) (NCURSES_BITS((n), 0) & MY_A_COLOR)
>
> The change here is MY_A_COLOR uses a 16 bit shift instead of an 8 bit
> shift. I know that there was a change to support colors and colors pairs
> great than 16 bits, but in this case I am only using 512 pairs.
agreed - there shouldn't be any documented/user-visible change.
--
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net
signature.asc
Description: Digital signature