terminfo
Chuck L. Peterson
clp at altos86.UUCP
Thu Aug 25 06:25:30 AEST 1988
Why does terminfo exist?
It makes much more sense to edit a /etc/termcap to install
new or different terminal capabilities.
For what purpose was there created a terminfo.src method
in which one must edit an ascii file containing the capability
in question followed by running "tic" on it? And why can't
terminfo.src have the same syntax and capability strings
as /etc/termcap? Having each terminal description in a
different /usr/lib/terminfo/?/file has 2 advantages:
1) you can use the filesystem to do hashed
lookup of the requested terminal description
2) the file can contain some sort of "struct terminfo"
which can be read quicker than parsing some ascii file
The right way to do this sort of thing would be to stick with
a system based on termcap, but use -ldbm to do hashed lookups
using a /etc/termcap.{dir,pag} dbm setup. Having the looked-up
data being a ascii string is what I would prefer, but this could
be a "struct terminfo" if you don't want to parse and have
room for bunches of these structs in your filesystem.
You would still have to run a tic-like program each time you
changed /etc/termcap; but you would get rid of this silly directory
hashing as well as the long search time associated with /etc/termcap.
(A vax750 running 4.3bsd takes a long time to determine you
typed in a bad term type when /etc/passwd is 250k.)
Chuck L. Peterson
...!sun!altos86!clp
More information about the Comp.unix.wizards
mailing list