bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tic confused about ich/ich1


From: Thomas Dickey
Subject: Re: tic confused about ich/ich1
Date: Tue, 5 Nov 2019 20:13:32 -0500
User-agent: NeoMutt/20170113 (1.7.2)

On Wed, Nov 06, 2019 at 12:36:19AM +0100, Sebastian J. Bronner wrote:
> Hi Thomas,
> 
> I have been using `tic -v` to help clean up the upstream `st` terminfo
> entry.  While doing that I stumbled across a warning that seemed a
> little -- off:
> 
> ```
> "st.info", line 1, terminal 'st': non-curses applications may be confused by 
> ich1 with smir/rmir
> ```
> 
> st.info has no `ich1` capability. But it does have the `ich` capability,
> which is what `tic` is actually checking. See
> 
> ncurses-6.1-20191102/progs/tic.c:3051-3059
> 
> Both the comments there and the warning string mention `ich1`. The condition
> is checking for the presence of `ich`, though. Which is correct?

short: xterm's correct
long:

I added the original check in 1997/12/14 to comp_parse.c, commenting

   add some debug-code, at least, that will show the entries that have ich/ich1
   conflicting with smir/rmir.  The Debian people don't like that because it
   breaks jove.

I moved the check to tic.c from comp_parse.c (1999/02/19) looking like this:

         if ((PRESENT(enter_insert_mode) || PRESENT(exit_insert_mode))
          && (PRESENT(insert_character)  || PRESENT(parm_ich))) {
            _nc_warning("non-curses applications may be confused by ich/ich1 
with smir/rmir");
         }

and I modified this in 2002/09/01, commenting

   xterm patch #70 comments that we don't have to worry about ich vs rmir/smir,
   it is ich1.

xterm's comment in #70 reads:

     * restore  "ich"  capability  to  terminfo  entries,  since  Michael       
       Schroeder  points  out that "ich1" is the one which is the problem       
       in Solaris vi.

which put it into the current form:

    if ((PRESENT(enter_insert_mode) || PRESENT(exit_insert_mode))
        && PRESENT(parm_ich)) {
        _nc_warning("non-curses applications may be confused by ich1 with 
smir/rmir");
    }

which (man 5 terminfo) looks as if the change was incorrect:

       insert_character              ich1       ic        insert character (P)

and the code should read

    if ((PRESENT(enter_insert_mode) || PRESENT(exit_insert_mode))
        && PRESENT(insert_character)) {
        _nc_warning("non-curses applications may be confused by ich1 with 
smir/rmir");
    }

(that would be Solaris 10 or earlier, since Solaris uses vim since 2011).

st's entry started as a copy of ncurses' pcansi entry;
the ich terminfo feature came from Aurélien Aptel in 2010,
without useful information:

        commit 273d4ba938dc6bf7edb2b1154ea36c19bfcd22d1
        Author: Aurélien Aptel <address@hidden>
        Date:   Fri Sep 3 00:15:43 2010 +0200

            cleaning st.info. added comment in st.c for DECSCNM.

but probably copied from xterm's terminfo.

But I'd overlooked the message since ESR has made the library treat
insert_character as a special case of parm_ich, and had either reused or
modified many entries using both.  He copied a lot of those from the SCO
terminfo, which I can see does this (93 warnings in SCO, 372 in ncurses),
Amending the check won't make much difference for that.

thanks :-)

-- 
Thomas E. Dickey <address@hidden>
https://invisible-island.net
ftp://ftp.invisible-island.net

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]