Re: [ILUG] termcap etc.

From: Niall O Broin (niall at domain linux.ie)
Date: Thu 25 Oct 2001 - 13:29:48 IST


On Thu, Oct 25, 2001 at 10:27:12AM +0100, John P. Looney wrote:

> What is the termcap file used for these days ?

That's a good question - man termcap says that the various tget routines

are included as a conversion aid for pro­ grams that use the termcap
library. Their parameters are the same and the routines are emulated using
the terminfo database. Thus, they can only be used to query the capa­
bilities of entries for which a terminfo entry has been compiled.

so it would see that /etc/termcap is redundant. I daresay it's left because
there are some braindead programs which looked at the file rather than using
the provided access functions. However, on this SuSE 7.2 box doing an
ls -lu /usr/share/misc/termcap (to which /etc/termcap is a symlink) shows
that the files has not been accessed since the OS was installed though that
would only mean that I've never used the relevant flaky programs.

Just had a look on a BBC which is essentially Debian based. Terminfo is in
/etc/terminfo there and there are only a couple of entries but there's an
800k /etc/termcap which IS used - set TERM to something unknown, try to do
clear, get a tput error about "unknown terminal type" and observe with ls
-lu that /etc/termcap has been consulted. So, if you're trying to slim down
a Linux for an embedded system, the terminfo database and the termcap file
are definitely candidates for Unislim, but you'd better test your apps.

Niall



This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:12:55 GMT