Subject: Re: ncurses and terminfo
To: None <current-users@NetBSD.ORG>
From: John F. Woods <>
List: current-users
Date: 04/03/1996 07:48:32
> > From external structure terminfo would appear to be superior to
> > termcap [...]
> In many respects it is.  But termcap has terminfo beat all hollow in
> one major, in my opinion critical, area - at least as far as I've been
> able to determine: you can put a terminal type in $TERM and a termcap
> entry for it in $TERMCAP, and termcap works,

The fixed pre-compiled structure of terminfo is a crock.  You can't add a
capability without recompiling the library, and even more fun, you can't
add a site-local capability AT ALL unless you're willing to change the
released sources forever, since any new distributions with new features
will be reusing the table slot you added.  Geez, if AT&T hadn't invented
terminfo, Microsoft would have had to.

[The *name* collision problem (for local capabilities) is present in both
schemes, it just bites at different times.]

The precompilation bit may have been a great idea for that 3B2 space-heater,
but the time required to process termcap entries on a modern processor is
trivial, especially since you can use $TERMCAP to avoid the linear search
for the actual terminal entry -- though it probably takes less time on a
lowly 486/33 to find the last entry in /etc/termcap than a 3B2 took to find
the corresponding file in its tree.