bug-ncurses
[Top][All Lists]
Advanced

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

Re: infocmp posible bug


From: Thomas Dickey
Subject: Re: infocmp posible bug
Date: Fri, 10 Jan 2025 18:45:39 -0500

On Fri, Jan 10, 2025 at 11:17:13PM +0100, Peter Radisson wrote:
> Hi,
> i was playing with infocmp to learn about long and short names so i can
> use tput better.
> 
> I am using the current version with opensuse
> infocmp -V
> ncurses 6.1.20180317
> 
> when i was dumping the xterm capabilities i noted that the long name
> version has one entry that the short version is missing. So far i
> understand is there for any long name also a short name, so this may
> indicate an error.

not quite - there are some exceptions.  I can see offhand the use of
"user-defined" capabilities in the output (see screenshot in vi-like-emacs).

The short name for backspaces_with_bs is OTbs, for which the explanation
is ESR's comment at the top of terminfo.src:

        # The version you are looking at may be in any of three formats: master
        # (terminfo with OT capabilities), stock terminfo, or termcap.  You can 
tell
        # which by the format given in the header above.
        #
        # The master format is accepted and generated by the terminfo tools in 
the
        # ncurses suite; it differs from stock (System V-compatible) terminfo 
only
        # in that it admits a group of capabilities (prefixed `OT') equivalent 
to
        # various obsolete termcap capabilities.  You can, thus, convert from 
master
        # to stock terminfo simply by filtering with `sed "/OT[^,]*,/s///"'; 
but if
        # you have ncurses `tic -I' is nicer (among other things, it 
automatically
        # outputs entries in a canonical form).

The names are defined in include/Caps:

https://github.com/ThomasDickey/ncurses-snapshots/blob/c6d02b91c12b8d9dfc53a04119ad094543742ec1/include/Caps#L843

        # The capabilities below are either obsolete or extensions on certain 
systems.
        # They are not used by SVR4 terminfo.  Some are used by captoinfo to 
translate
        # termcap sources; the rest are listed for completeness, and in case 
somebody
        # cares about them enough to hack in code that will translate them into
        # terminfo capabilities.

It's not in the manpage, because few people are interested in a manual
page devoted to obsolete features that aren't used in ncurses aside from
recognizing them.

ESR had three files, intending to mechanically translate between the
three.  That was incomplete, resulting in errors.  I repaired things
over the course of several years, while improving tic/infocmp to
mechanically translate termcap.src from terminfo.src

I had no use for a separate "master" file, because it was usable as
terminfo with the "OT" names as specially-handled "user-defined" (or
"extended") capabilities.  But the BSDs have had a use for the
termcap.src file (mainly NetBSD and OpenBSD -- FreeBSD's file has its
own history and quirks):

https://invisible-island.net/ncurses/tctest.html

Besides the additional consistency checks I added to tic, I occasionally
check old entries against the SCO terminal database from which ESR
copied extensively, as well as Solaris and other vendor databases.  For
anything newer than 25 years or so, I'm on my own.

I use a script combining tic/infocmp to preview differences between a
working terminfo.src and what's installed.  That currently produces a
list of 2860 lines, one for each terminal description.  Running it on
the "termtypes.master" file gives a listing of the differences - 15487
lines.

Even with all of that, occasionally someone reports an error.
But this instance isn't one of those.

>  infocmp -sd -1  | head -15 | more
> #                                              Reconstructed via infocmp
> from file: /usr/share/terminfo/x/xterm
> xterm|xterm terminal emulator (X Window System),
>                                                am,
>                                                xenl,
>                                                km,
>                                                mir,
>                                                msgr,
>                                                mc5i,
>                                                npc,
>                                                bce,
>                                                cols#80,
>                                                it#8,
>                                                lines#24,
>                                                colors#8,
>                                                pairs#64,
> 
> 
> infocmp -sd -1 -L | head -15 | more
> #                                              Reconstructed via infocmp
> from file: /usr/share/terminfo/x/xterm
> xterm|xterm terminal emulator (X Window System),
>                                                auto_right_margin,
>                                                eat_newline_glitch,
>                                                has_meta_key,
>                                                move_insert_mode,
>                                                move_standout_mode,
>                                                prtr_silent,
>                                                no_pad_char,
>                                                back_color_erase,
>                                                backspaces_with_bs,
>                                                columns#80,
>                                                init_tabs#8,
>                                                lines#24,
>                                                max_colors#8,
> 
> comparing shows
>       bce=back_color_erase
>       ???=backspaces_with_bs
>         cols#80=columns#80
> 
> hope that helps
> 
> 

-- 
Thomas E. Dickey <dickey@invisible-island.net>
https://invisible-island.net

Attachment: screenshot.png
Description: PNG image

Attachment: signature.asc
Description: PGP signature


reply via email to

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