On Fri, Sep 01, 2006 at 07:25:52PM -0700, Daniel Burrows wrote:
> On Fri, Sep 01, 2006 at 08:30:35AM -0400, Thomas Dickey <[EMAIL PROTECTED]> 
> was heard to say:
> > On Fri, Sep 01, 2006 at 04:30:08AM +0200, Daniel Burrows wrote:
> > >   I'm not sure exactly what causes this, but it goes away if I limit
> > > aptitude to only allocating 100 colors. (that's foreground and
> > > background, for a total of 10,000 color pairs used).
> > > 
> > >   It appears that xterm advertises 32767 available colors, which
> > > obviously should be enough.  However, since I doubt anyone really uses
> > > higher colors with aptitude, I'll limit it to only using the basic
> > > 8-color space for now as a workaround.
> > 
> > It would work with ncurses using the extended-colors feature (which would
> > make ncurses binary-incompatible).
> 
>   Hm, what are extended colors?  Google mainly turns up logs of
> ./configure runs.

It stores the color pair separately in an int rather than packed in 8-bits
with the video attributes.  Here's a typical (non-extended) definition for
cchar_t from curses.h:

        #define CCHARW_MAX      5
        typedef struct
        {   
            attr_t      attr;
            wchar_t     chars[CCHARW_MAX];
        #if 0
            int         ext_color;      /* color pair, must be more than 
16-bits */
        #endif
        }
        cchar_t;

Turning on the ifdef for ext_color makes cchar_t a different size, and
WINDOW a different size.  (I can elaborate on why/what, etc, but probably
should explain that all in my faq ;-)

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net

Attachment: pgp717uMM8xMZ.pgp
Description: PGP signature

Reply via email to