GNU bug report logs -
#69598
29.2; colour support based on $TERM value not terminfo database
Previous Next
Reported by: chohag <at> jtan.com
Date: Wed, 6 Mar 2024 23:24:02 UTC
Severity: normal
Found in version 29.2
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: chohag <at> jtan.com
> cc: chohag <at> jtan.com, 69598 <at> debbugs.gnu.org
> Comments: In-reply-to Eli Zaretskii <eliz <at> gnu.org>
> message dated "Thu, 07 Mar 2024 19:47:05 +0200."
> Date: Thu, 07 Mar 2024 18:31:20 +0000
>
> Eli Zaretskii writes:
> > So I guess you will need to step with a debugger through the code in
> > term.c which discovers and initializes the color-related capabilities,
>
> If there's something you would like me to look for then I can but
> I am highly sceptical of the idea that it is isolated to something
> unique about my computers here.
I think there might be a misunderstanding. What meant was to see what
happens in the function init_tty in this part of it:
#ifdef TERMINFO
{
const char *fg = tigetstr ("setf24");
const char *bg = tigetstr ("setb24");
/* Non-standard support for 24-bit colors. */
if (fg && bg
&& fg != (char *) (intptr_t) -1
&& bg != (char *) (intptr_t) -1)
{
tty->TS_set_foreground = fg;
tty->TS_set_background = bg;
tty->TN_max_colors = 16777216;
}
/* Standard support for 24-bit colors. */
else if (tigetflag ("RGB") > 0)
{
/* If the used Terminfo library supports only 16-bit
signed values, tgetnum("Co") and tigetnum("colors")
could return 32767. */
tty->TN_max_colors = 16777216;
}
/* Fall back to xterm+direct (semicolon version) if Tc is set
(de-facto standard introduced by tmux) or if requested by
the COLORTERM environment variable. */
else if ((tigetflag ("Tc") > 0)
|| ((bg = getenv ("COLORTERM")) != NULL
&& strcasecmp (bg, "truecolor") == 0))
{
tty->TS_set_foreground = "\033[%?%p1%{8}%<%t3%p1%d%e38;2;%p1%{65536}%/%d;%p1%{256}%/%{255}%&%d;%p1%{255}%&%d%;m";
tty->TS_set_background = "\033[%?%p1%{8}%<%t4%p1%d%e48;2;%p1%{65536}%/%d;%p1%{256}%/%{255}%&%d;%p1%{255}%&%d%;m";
tty->TN_max_colors = 16777216;
}
}
#endif
By contrast, it sounds like you are only talking about a terminfo
entry that redirects to another entry.
> Did you confirm presence of the bug with the transcript I provided?
No, I cannot try that on the systems to which I have access. Maybe
someone else could, preferably someone who knows more than I do about
terminfo.
This bug report was last modified 1 year and 63 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.