Date: Wed, 16 Jan 2002 16:59:26 -0800 From: Jason Evans <jasone@canonware.com> To: arch@freebsd.org Subject: termcap versus terminfo Message-ID: <20020116165926.N451@canonware.com>
next in thread | raw e-mail | index | archive | help
Currently, FreeBSD uses termcap for storage of terminal attributes. In order to make this work, we have had to hack up ncurses, which is normally based on terminfo. I have several problems with this: 1) It requires extra work in tracking ncurses, which is contributed source code. 2) We end up having to maintain the termcap file, whereas if we were using terminfo and submitting our changes back to the ncurses maintainer, there would be very little divergence from the pristine contrib sources. 3) With the likely exception of some of (but not all of) the other BSDs, I don't think any other modern systems use termcap. Linux and SYSV-based OSes use terminfo. In fact, Solaris does not even support the termcap APIs. 4) terminfo is standardized. It is documented in SUSv2, and in all likelihood, the Austin Group Specification (IEEE 1003.1). 5) terminfo is generally better designed. termcap has scalability issues, which we have partially solved by creating termcap.db. However, the speedups afforded by the db file only help if using the termcap library API, since termcap.db does not have a public API to allow direct access. By contrast, the terminfo database is in a compiled format that is formally documented, which allows applications to quickly access terminfo entries without using the terminfo library API. I've been thinking for over a month about this, trying to intuit the rationale for sticking with termcap, and nothing really comes to mind, except NIH. ncurses provides a compatibility shim for termcap functions, which means that unless an application wants to access the termcap file directly, using terminfo isn't even visible to applications. As mentioned above, directly accessing termcap has scalability issues, unlike terminfo. I would like to move FreeBSD to a much less hacked ncurses, which means converting to terminfo. Are there any good reasons for not making this change? Jason To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020116165926.N451>