[Tutor] Re: Dynamic change of dictionaries

Derrick 'dman' Hudson dman@dman.ddts.net
Thu, 20 Jun 2002 14:34:18 -0500


--pvezYHf7grwyp3Bc
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Jun 20, 2002 at 11:46:02AM -0300, Marc wrote:
| alan.gauld@bt.com (alan.gauld@bt.com) wrote:

| > But I'm guessing, terminal control under *nix is frought=20
| > with difficulties. If I knew more aboit termcap maybe theres=20
| > a general way to do it there but I don't... I suspect=20
| > ncurses may have ways and means too.
|=20
| You really hate *nix, dont u ? :)

I don't think he does (based on other things he's said before), but
he's right.  There isn't a built-in "red()" function because there are
hundreds (probably literally) of different terminals that can be
connected to a unix system and each has a (potentially) different set
of escape codes for controlling it.

That's in large part why Bill Joy created the "curses" library (with
the associated "termcap" database) back in the '70s.  The termcap
database stores the escape codes necessary to achieve the desired
results.  The end effect is that programs using the curses (or the
newer ncurses) library can be terminal agnostic, yet still work on all
the terminals supported by the termcap (or terminfo, if using ncurses)
database.

| No problem, all I need is to change color in some lines, linux only.
| Your tip did the trick.

If you only need to support 1 particular terminal, then hard-coding
the escapes for it is manageable.

-D

--=20

"Wipe Info uses hexadecimal values to wipe files. This provides more=20
security than wiping with decimal values." -- Norton SystemWorks 2002 Manual
=20
http://dman.ddts.net/~dman/


--pvezYHf7grwyp3Bc
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAj0SLjoACgkQO8l8XBKTpRQl3gCcD2Q3Tj/q18E416fKAzjRXF9l
YZYAn0yyHoPfW1mAIrJOw68tWZblTCZG
=ZJBT
-----END PGP SIGNATURE-----

--pvezYHf7grwyp3Bc--