Subject: Re: color, terminfo & termcap - pls explain?
To: None <vax@linkdead.paranoia.com>
From: Mike Long <mike.long@analog.com>
List: current-users
Date: 02/04/1996 01:19:41
>Date: Sat, 03 Feb 1996 09:19:07 -0600
>From: VaX#n8 <vax@linkdead.paranoia.com>
>
>What are the exact functions of terminfo and termcap?

Both describe terminal capabilities, and what character sequences
control them.

>Is there a prevailing reason to use one or the other?

Terminfo is more detailed, but adds filesystem clutter.
BSD has traditionally used termcap.

>Do either support color?
>I'm asking because of the discussion on port-i386 about color ls and how
>it sends color codes by default (ick!).  Isn't there a Right way to do that?

The ncurses library supports color; it uses terminfo.  See

<URL:ftp://ftp.netcom.com/pubm/zm/zmbenhal/ncurses/>.

If you try to run a color ncurses app on a monochrome terminal, it
prints something like "this terminal doesn't support color" and exits.
-- 
Mike Long <mike.long@analog.com>           http://www.shore.net/~mikel
VLSI Design Engineer         finger mikel@shore.net for PGP public key
Analog Devices, CPD Division          CCBF225E7D3F7ECB2C8F7ABB15D9BE7B
Norwood, MA 02062 USA       (eq (opinion 'ADI) (opinion 'mike)) -> nil