Subject: Re: bug#62265: Underline does not work in Terminal Emacs

From: Eli Zaretskii <[email-masked]>
Date: Sun, 19 Mar 2023 13:37:14 +0200

> From: Mohsin Kaleem <[email-masked]>
> Cc: [email-masked]
> Date: Sun, 19 Mar 2023 10:07:14 +0000
> 
> Hi, so turns out terminfo returns a max-ptr for tigetstr when the
> terminfo definition is missing. There's checks for this for setb24 and
> setf24 but not in the patch I supplied. Updated to check this and added
> a macro definition to avoid repeating the same condition logic 3 times.

Thanks.

However, what about the non-TERMINFO branch?  Do termcap databases
support this capability and tigetstr?  I wonder whether we should do
one of the following:

  . support "smxx" only when TERMINFO is defined
  . support "smxx" regardless of whether TERMINFO is defined

With your patch, it's neither here nor there.  tgetstr is documented
to pay attention only to the first 2 characters of the capability's
name, at least in the ncurses documentation.  If this is generally so
in other curses libraries, then leaving the tgetstr call intact in the
non-TERMINFO case makes no sense.