[net.sources] CR turning off attributes

guy@rlgvax.UUCP (Guy Harris) (10/23/83)

	"That bit of silliness" is not just limited to NEC and Diablo.
	Several DEC products do the same thing notably the vt100 and the
	lqp02 printer.  I believe it is part of the ANSI standard for
	controlling serial output devices.  (I can't remember the standard
	number.)

I believe the standard you're thinking of is ANSI X3.64, "Additional Controls
for Use with American National Standard Code for Information Interchange", and
it says the *exact opposite*, namely:

	5.77 SGR	SELECT GRAPHIC RENDITION

	...Invokes the graphic rendition specified by the parameter(s).
	All following characters in the data stream are rendered according
	to the parameter(s) *until the next occurrence of SGR in the data
	stream.* (Italics mine)

In short, an X3.64 terminal is not supposed to turn off attributes until it
gets told explicitly to do something with the attributes.  And, since the
VT100 is an ANSI X3.64 terminal, it does *NOT* turn attributes off when it
receives a CR or LF; I sent the sequence "<ESC>[7mText\r\nText" to my VT100
and *both* lines saying Text came out in reverse video.  NEC and Diablo aren't
X3.64 compatible anyway, and if they *do* come out with an X3.64-compatible
printer it better *not* turn off boldfacing (<ESC>[1m) or underlining (<ESC>[4m)
or any other graphic rendition attributes when it gets a CR or LF; they can
*only* be turned off when it receives another SGR escape sequence.  (I suspect
the LQP02 may also be X3.64 compatible, as most recent DEC terminals are, and
if it claims to be X3.64 compatible *it* better not turn off underlining or
boldfacing when it gets a CR or LF.)

	As a matter of fact the underlining filter in (at least) the 4.1bsd
	"more" breaks when confronted with terminals which DON'T turn off
	attributes after a CR.  The similar filter in "ul" works fine though.

This is what's known in the trade as a "bug"; it means that "more" won't
work with any X3.64 terminals.  On the other hand, I've never seen any problems
with "more" on my VT100.

	Guy Harris
	{seismo,mcnc,brl-bmd,allegra}!rlgvax!guy

msc@qubix.UUCP (Mark Callow) (10/25/83)

"That bit of silliness" is not just limited to NEC and Diablo.
Several DEC products do the same thing notably the vt100 and the
lqp02 printer.  I believe it is part of the ANSI standard for
controlling serial output devices.  (I can't remember the standard
number.)

As a matter of fact the underlining filter in (at least) the 4.1bsd "more"
breaks when confronted with terminals which DON'T turn off attributes
after a CR.  The similar filter in "ul" works fine though.
-- 
	Mark Callow, Saratoga, CA.
	...{decvax,ucbvax,ihnp4}!decwrl!
		      ...{ittvax,amd70}!qubix!msc
	decwrl!qubix!msc@Berkeley.ARPA