Subject: Re: termcap's xterm
To: Paul Kranenburg <pk@cs.few.eur.nl>
From: J.D.Coleman <J.D.Coleman@newcastle.ac.uk>
List: current-users
Date: 06/26/1997 09:40:13
Paul Kranenburg wrote:
> I dug a little further: the culprits are the End Underline (`ue=\E[24m') and
> End Standout (`se=\E[27m'). I don't know where these come from, but they
> are certainly not defined in the `Xterm Control Sequences' document.

>From my collected vt100 (ANSI) escape sequences, I see :

  ESC [nm             character attributes (n = 0 - all attributes off,
                                                1 - bold on,
                                                2 - faint on,
                                                4 - underline on,
                                                5 - blink on (uses italics),
                                                7 - reverse video on,
                                                21 - bold off,
                                                22 - faint off,
                                                24 - underline off,
                                                25 - blink off,
                                                27 - reverse video off,
                                                30 - white foreground,
                                                31 - black foreground,
                                                32 - red foreground,
                                                33 - green foreground,
                                                34 - yellow foreground,
                                                35 - blue foreground,
                                                36 - magenta foreground,
                                                37 - cyan background,
                                                40 - white background,
                                                41 - black background,
                                                42 - red background,
                                                43 - green background,
                                                44 - yellow background,
                                                45 - blue background,
                                                46 - magenta background,
                                                47 - cyan background)

The old xterm doesn't like n > 7, so you can only turn all attributes off,
so both "se" and "ue" should be "\E[0m".  Also, termcap only has entries
for (individual) attribute on and all attributes off.

Presumably, the new xterm has these extra sequences.  (Does it have colour
too, I wonder.)  The new sequences are a bit nicer, in that if you have
applied multiple attributes, you can turn them off individually, rather
than turning them all off and then turning back on the attributes you want
(which is what the curses library does).  Then again, if you try to get
underscore and standout sequences to co-exist with character attributes,
you have to use the original method anyway.

J

PS.  Apologies for digressing a little!