On Sat, Jan 31, 2026 at 06:09:52PM -0500, Thomas Dickey wrote:
> On Sat, Jan 31, 2026 at 10:06:01AM -0800, Jared Finder wrote:
> > On 2026-01-30 14:24, Thomas Dickey wrote:
> > > On Fri, Jan 30, 2026 at 05:46:57PM +0000, Robin Haberkorn via Bug
> > > reports for ncurses, the GNU implementation of curses wrote:
> > > > btw. Some terminals nowadays have squiggles and strike-through
> > > > as well. I always wondered why this didn't make it right through
> > > > to ncurses.
> > > 
> > > a few do, but look at the allocated bits (adding stuff would be an ABI
> > > change)
> > 
> > If controlling the underline style and color was widely desired, couldn't
> > the extra parameter to color_set be used? That would also require the curses
> > library to maintain extra state of the current underline style and color for
> > attron to look at and emit the correct escape sequence.
> 
> It's a little late for that (several years, in fact).

ncurses 6.1, early 2018
 
> See the manpage section on extensions, which makes that a pointer to 'int',
> for getting extended color pairs (past 32767).

I considered making a struct, decided that (since there were no other
plausible extensions to account for), that the color pair was enough
for this ABI.

That "would also require" skims over a lot of work -- if you'll read through
the history of this stuff, you might notice that the developers who make
these features up are unwilling to do any part of that.
 
> (changing that would be an ABI change...)

...however, the "allocated bits" would have to come from the attr_t type,
e.g., as used here:

typedef struct
{
    attr_t      attr;
    wchar_t     chars[CCHARW_MAX];
    int         ext_color;
}
cchar_t;

or (if we're not limited to wide-characters...) the same data in chtype:

int addch (const chtype);

as noted, chtype can't store color pairs with more bits.

-- 
Thomas E. Dickey <[email protected]>
https://invisible-island.net

Attachment: signature.asc
Description: PGP signature

Reply via email to