From: Gary Coady (gary at domain netsoc.tcd.ie)
Date: Thu 25 Oct 2001 - 21:32:16 IST
On Thu, Oct 25, 2001 at 08:13:25PM +0100, Ronan Cunniffe wrote:
> > What is the termcap file used for these days ?
I think nearly all console-screen apps use ncurses these days? ncurses
by default uses the terminfo database (yeah usually in /usr/share
nowadays). As far as I can see, it tries to use that database if it's
available, it can also use $HOME/.terminfo and directories specified by an
environmental variable. In the absence of any terminfo database being
available, it will fallback to the termcap file if that is compiled in.
The ncurses maintainers recommend that this feature not be compiled in, as
it causes a large execution-time penalty. After that, ncurses may use any
fallback entries compiled into it. Each fallback entry takes up about 2.5K
of text space. As far as I can see, the default on Debian is to have no
fallback entries, ncurses comes with a script MKfallback.sh, which alters
the source for ncurses to include fallback entries, or there is a
--with-fallback configure flag also. After that, it seems to check the
environment for your standard LINES and COLUMNS variables. And if that
doesn't work, it'll assume a 24x80 screen.
How slang works is left as an exercise :)
> Unless someone else knows better, I offer that everything in /bin or /sbin
> that runs before/outside a shell uses it directly (init and getty come
> prominently to mind here), and everything else relies on the shells, which
> also use it directly.
I suggest that actually there are not very many fullscreen ncurses apps in
/bin or /sbin...
> I could be wrong though, because (in the case of Linux)
> a) you know the console type at compile time, and
> b) none of the proggies I've mentioned link to /lib/libtermcap.
a) well that could work happily, if it's compiled in (not on Debian, I
dunno about the other systems).
b) libtermcap.so on this system is only used for development - seems like
libtermcap is definitely legacy material.
> I could pull the termcap file for fun and see what happens, but not until
> I work how I'm going to get back into the system afterwards....
I don't think that would be a problem :)
-- You are your own light, through the darkness.
This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:12:55 GMT