terminfo

Peter Wemm peter at wemm.org
Fri Feb 21 19:14:23 UTC 2014


On Wed, Feb 19, 2014 at 4:17 AM, Bryan Drewery <bdrewery at freebsd.org> wrote:
> Why do we not use terminfo? Our termcap is quite aged and missing a lot
> of modern terminals/clients. Using terminfo would allow us to use the
> already well maintained database from ncurses.
>
> Is it just a matter of someone doing the work or are there other reasons?
>
> --
> Regards,
> Bryan Drewery
>

There are historical reasons.  As the person who imported the current
setup I have some insight into that.

One issue was because cons25 / syscons was evolving.  That's no longer
the case.  Because things were in flux, people accumulated their own
rules.  Another was that termcap was the source of truth on 4.x BSD
systems, but we could translate into terminfo dynamically for things
that needed it.  At the time, the reverse wasn't adequate - the
ncurses provided terminfo wasn't rich enough to express everything we
had in termcap so we couldn't do a lossless conversion of our home
grown termcap rules into terminfo and get everything back through the
emulator.  There were personal preferences as well - the ncurses
terminfo at the time was sysv-style and was a fixed binary format and
non-extensible while termcap was flexible and freely extendable.

HOWEVER, if I were to do it today, I would be inclined to use netbsd's
libtinfo and cdb modules and switch to terminfo as the source of
truth.  It is my understanding that netbsd's libtinfo "compiles" into
a .cdb format file and gives us the same flexibility that we have with
termcap/termcap.db without the non-extensible sysv binary format
lock-in.  Then have ncurses use it instead, like netbsd does.  We get
to import the ncurses sourced terminfo database and port over our
tweaks/extensions as needed.

As has been pointed out in other followups.. the ones that really
matter are xterm/xterm-color/vt100/cons25.  And less so on including
cons25 in that as syscons can speak xterm now and the others are xterm
only.
-- 
Peter Wemm - peter at wemm.org; peter at FreeBSD.org; peter at yahoo-inc.com; KI6FJV
Yes, I know, gmail sucks now. If you see this then I forgot. Habits
are hard to break.


More information about the freebsd-arch mailing list