Thomas Dickey <[email protected]> writes:

> On Thu, Dec 18, 2025 at 09:38:06AM -0600, G. Branden Robinson wrote:
>> At 2025-12-18T12:41:02+0100, Dirk Gouders wrote:
>> > Thomas Dickey <[email protected]> writes:
>> > > ncurses 6.5 does have a use for u6 and u7, but only in a special
>> > > case where it matches common variants of that particular string:
>> > >
>> > > 20231001
>> > >  + modify setupterm to provide for using ANSI cursor-position
>> > >    report (in user6/user7 terminfo capabilities) to obtain
>> > >    screensize if neither environment variables or ioctl is used.
>> > >    The ncurses test-program with options "-E -T" demonstrates
>> > >    this feature.
>> > 
>> > Thank you for that hint, in ncurses/tinfo/lib_setup.c I found some
>> > code that I am now trying to understand and maybe I find other
>> > locations (I didn't grep for "user6" before your answer, but only "u6"
>> > and "%dR".).
>
> References to the standard capability names in the source code usually use
> the long name, because that happens to be defined in term.h for the terminal
> definition which is currently loaded in memory.
>
> man terminfo has this list:
>
>        user0                      u0        u0  User string #0
>        user1                      u1        u1  User string #1
>        user2                      u2        u2  User string #2
>        user3                      u3        u3  User string #3
>        user4                      u4        u4  User string #4
>        user5                      u5        u5  User string #5
>        user6                      u6        u6  User string #6
>        user7                      u7        u7  User string #7
>        user8                      u8        u8  User string #8
>        user9                      u9        u9  User string #9
>
> I suppose Raymond or Weaver chose user6-user9 to be less intrusive,
> leaving user0-user5 for actual user-defined stuff.

Thank you for the explanation.

>> > The above text says "The ncurses test-program".  Which program is
>> > meant by this?
>> 
>> I suspect he means the program named "ncurses" that appears in the
>> "test" directory of an ncurses build.
>
> right.
> That's how it's been referred to for about 30 years.
>
> 961019        - snapshot
>       + correct loop-limit in wnoutrefresh(), bug exposed during pipe-testing
>         had '.lastchar' entry one beyond '._maxx'.
>       + modify ncurses test-program to work with data piped to it.
>
> But (looking at the NEWS file) I more often just say "test/ncurses".

Could be that was just a non-native speaker problem, thank you for the
clarification.  I perhaps should not have been focussed on terminfo
(e.g. demo_terminfo) but should have taken the time to first get an
overview. Then, a test-program ncurses, named exactly as the library,
would certainly have attracted my attention.

Regards,

Dirk

Attachment: signature.asc
Description: PGP signature

Reply via email to