Date: Fri, 21 Feb 2014 11:14:22 -0800 From: Peter Wemm <peter@wemm.org> To: Bryan Drewery <bdrewery@freebsd.org> Cc: FreeBSD Arch <arch@freebsd.org> Subject: Re: terminfo Message-ID: <CAGE5yCpDOA718hMBLoGHnawN=Oa5Q7Sb7zkV2ndY6k7H=Led=Q@mail.gmail.com> In-Reply-To: <5304A0CC.5000505@FreeBSD.org> References: <5304A0CC.5000505@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Feb 19, 2014 at 4:17 AM, Bryan Drewery <bdrewery@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@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV Yes, I know, gmail sucks now. If you see this then I forgot. Habits are hard to break.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGE5yCpDOA718hMBLoGHnawN=Oa5Q7Sb7zkV2ndY6k7H=Led=Q>