[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A suggestion for color handling on modern terminals
From: |
Thomas Dickey |
Subject: |
Re: A suggestion for color handling on modern terminals |
Date: |
Fri, 21 Sep 2007 19:57:39 -0400 |
User-agent: |
Mutt/1.5.16 (2007-06-11) |
On Wed, Sep 19, 2007 at 11:51:51AM +1000, Tim Allen wrote:
> My suggestion is this: When ncurses initialises itself, queries terminfo
> and discovers that it's running on a Tektronix-like terminal (presumably,
> one that defines setaf/setab), it should recognise that "pairs" in the
> terminfo database is a lie, and set COLOR_PAIRS to (colors+1) squared
> rather than the contents of "pairs". Perhaps it should cap the new value to
> INT_MAX, just to be on the safe side.
That would make yet another binary-incompatible interface. The extended
colors model can store 8-bit color codes - needs 16 bits plus a bit or
so to implement default colors.
It's probably doable, but keep in mind that ncurses also makes a table
of the color pairs, which would get correspondingly larger.
--
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net
signature.asc
Description: Digital signature