Using "am" or "xn" in programs considered harmful

Mark Horton mark at cbosgd.UUCP
Mon Aug 11 14:27:16 AEST 1986


An interesting idea, but there are a number of problems.

First, some vt100-like terminals (including the vt100) set a flag
when you type something in column 80 and auto-wrap is set.  The
only way to clear this flag is to output some printing char
or to send it CRLF.  Sending an explicit CUP won't clear it.

Second, what do you about a character sent in column 80 of the
last line?  Terminals without am and terminals with am and xn
can use this position, terminals with only am must avoid that
space completely (to avoid scrolling) which isn't transparent
to the user and requires some ugly code.  (You have to delay
the updating of that column until it's been scrolled up a line,
which may never occur.)  You really do need to know when a
terminal can be depended to hammer on the right margin.

Third, what about terminals that don't have a CUP command, and
only have relative motions?  These are becoming more and more
rare, but there are still plenty of them out there.  (The TEK
4025 series, for example.)

Sure, it's a pain to get the terminal set right.  It is, for
reasons I've never understood, traditional to default wrapping
to OFF.  Emulators of terminals with switches (such as the Microterm
emulation of the adm3a, or the CrossTalk emulation of the vt100)
don't give you a choice, they default to off.  How anyone is supposed
to make good use of a terminal that hammers on the right margin is
beyond me - you have to have a screen package involved to program
around the braindamage.

The MIT solution of not using the last column is a nonsolution, in
my opinion.  It's easy to implement, but the user loses.  It makes it
impossible to emulate an 80 column terminal.  If you daisy chain,
you lose one column per emulation.  Your number of columns is no
longer divisible by 8, so your tabs stops can be off.

	Mark



More information about the Comp.bugs.4bsd.ucb-fixes mailing list