Add terminfo(5) support (via WANT_TERMCAP_PREFER_TERMINFO)..
commit27f3e9d171b9e0370aefa9b424ee8cbc2a65f3e4
authorSteffen (Daode) Nurpmeso <steffen@sdaoden.eu>
Fri, 8 Apr 2016 21:29:19 +0000 (8 23:29 +0200)
committerSteffen (Daode) Nurpmeso <steffen@sdaoden.eu>
Thu, 15 Sep 2016 13:57:23 +0000 (15 15:57 +0200)
tree13de71fadacb3156599559bbe36ccffdc130499e
parentdfee11b623990a7e8d83134cb68d94258d02fb6d
Add terminfo(5) support (via WANT_TERMCAP_PREFER_TERMINFO)..

On most modern systems termcap(5) is in fact provided by
ncurses(3) from GNU a.k.a. Thomas Dickey, being only a wrapper
around terminfo(5) functionality.

For one this wrapper mechanism is not for free.

And then Thomas Dickey has a strong preference for terminfo(5),
and has so even longer than he is maintainer of ncurses(3), that
being twenty years.  For termcap(5) this means that many keycodes
that terminfo(5) provides have no equivalence in termcap(5), or
could have an equivalence but noone ever cared: this includes the
entire BSD community which seemed and seems to leave him alone.
Of course the names of these combinations would be sick due to the
two-letter restriction of termcap(5), whereas terminfo(5) can use
names like kLFT7 (for control-alt-cursor-left).  ^.^

Support terminfo(5) if available, give users the option to choose
termcap(5) nonetheless via the new WANT_TERMCAP_PREFER_TERMINFO
option, but which defaults to yes.

For the commands which are always queried and which need to be
termcap(5)-compatible forever continue to use termcap(5) names.
But for the now lazy-loaded queries switch and use the longer and
most often more descriptive and thus user friendlier terminfo(5)
names instead.  (Easier for the upcoming `bind' functionality of
the MLE.)

To ease maintenance take the same approach that has been chosen
for the internal variables (enum okeys) and add a small script
that generates the new header tcaps.h from enum information found
in nail.h.  This also allows saving space by separating the string
information (terminfo(5) are variable-sized) from the control
flags etc.
colour.c
make.rc
mk-conf.sh
mk-mk.in
mk-tcap-map.pl [new file with mode: 0755]
nail.1
nail.h
tcaps.h [new file with mode: 0644]
termcap.c