[net.unix-wizards] Question about "ul" in termcap

ajs@hpfcla.UUCP (04/01/84)

Termcap(5) from BSD4.1 (I think) says this about "ul":

>	ul   bool   Terminal underlines even though it doesn't overstrike

>	If your terminal correctly generates	underlined  characters
>	(with	 no  special  codes  needed)  even  though it does not
>	overstrike, then you should give the capability ul.

It's not clear HOW the terminal  should  generate  underline  characters
without special codes.  Are there terminals that can backspace and add a
non-destructive underscore (only)?  Is that what this is intended for?

More(1) avoids processing underscores if "ul" or "os" (overstrike) is in
termcap for the terminal.  Does that make sense?

Thanks in advance for answers by mail!

Alan Silverstein, Hewlett-Packard Fort Collins Systems Division, Colorado
{ihnp4 | hplabs}!hpfcla!ajs, 303-226-3800 x3053, N 40 31'31" W 105 00'43"

ajs@hpfcla.UUCP (04/10/84)

Thanks for the quick and succinct responses.  Here is the question again,
followed by excerpts from the answers.

Alan Silverstein

Q> From termcap(5):
Q>	If your terminal correctly generates	underlined  characters
Q>	(with	 no  special  codes  needed)  even  though it does not
Q>	overstrike, then you should give the capability ul.
Q> It's not clear HOW the terminal  should  generate  underline  characters
Q> without special codes.  Are there terminals that can backspace and add a
Q> non-destructive underscore (only)?  Is that what this is intended for?

A1> There are terminals which cannot normally overstrike but which, if sent
A1> the sequence "x<BACKSPACE>_" will display an underscored x.  These
A1> terminals are described by "ul".  Terminals described by "os" obviously
A1> can do this.  Thus, it is correct for more(1) to use this scheme to
A1> underline on terminals described by either of these attributes.

A2> When I found that the 4.1c BSD termcap entry for Ann Arbor Ambassadors
A2> had 'ul' and that they didn't work with more(1) or ul(1), I suspected
A2> that the definition was funny.
A2> I interpret the definition "terminal underlines though it doesn't
A2> overstrike" as meaning "some terminals can take the sequence character-
A2> backspace-underscore and translate it into underscore".

A3> Perhaps your termcap lacks the us= and ue= entries which tell how to
A3> active and terminate the underlining.  (In fact my terminal as I write
A3> this does not have the ul property but does underline (because this
A3> terminal does have magic cookies around the underlining).

	No, the termcap has "us" and "ue" (and even "so" and "se"); the
	question was when it also needed "ul", and why.

A4> Some terminals (I think there's a Concept that does this) transform
A4> <character><backspace>_ (or actually any _ that is printed on top of
A4> a visible character) into an underlined character.  So foo\b\b\b___
A4> makes "foo" become underlined also.