color in messages

Peter Pentchev roam at ringlet.net
Fri Oct 3 08:15:40 UTC 2003


On Fri, Oct 03, 2003 at 10:55:18AM +0300, Peter Pentchev wrote:
[snip]
> The better, more portable way to do this would be to see if the OS (or
> rather, its application libraries such as libc) supports the termcap
> database - a unified database of information about the display
> capabilities of a wide range of terminals.  This is done using the
> tgetent() and similar functions, described in the termcap(3) manual
> page.  The basic idea is that the database contains an entry for each of
> the common (and some quite uncommon) terminal types as defined by the
> TERM environment variable, so that the program knows whether the
> terminal can e.g. change colors or move the cursor to a desired position
> or change characters and so on, and what exactly is the character
> sequence that will make it do so.  For more information on the termcap
> database, take a look at
> <URL:http://www.cs.utah.edu/dept/old/texinfo/termcap/termcap_toc.html>.

...and, of course, the termcap(5) and termcap(3) manual pages :)

G'luck,
Peter

-- 
Peter Pentchev	roam at ringlet.net    roam at sbnd.net    roam at FreeBSD.org
PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
If the meanings of 'true' and 'false' were switched, then this sentence wouldn't be false.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-doc/attachments/20031003/13b1a30d/attachment.sig>


More information about the freebsd-doc mailing list