[net.info-terms] Please make your programs ignore the "am" capability

gnu@l5.uucp (John Gilmore) (10/08/85)

In my experience the "am" capability in termcap causes more hassles and
screen glitches than it saves.  Often (as on the VT100), whether or not
the automatic wrap is enabled is set by a dipswitch -- which is NOT
accessible to the computer -- so it requires TWO termcap entries and
requires the user to pick which one (or diddle their dipswitches to
match the termcap entry).  And with other terminals, many people who
create termcap entries don't notice whether am should be off or on -- if
indeed their terminal manual tells them.

All this could be avoided if programmers would simply avoid assuming anything
about the cursor position after writing in column 80.  Avoiding that
assumption means having to send a set-cursor-position after you write
to column 80.  In many cases you would have done that anyway; in the rest,
the three or six bytes are worth it in lack of hassle to the user (no
bad termcap entries or screen garbage).

I fixed "vnews" to ignore "am".  Please do it to YOUR software.

(Note that writing in column 80 of the last line is hazardous.  I like
the trick of writing the char in column 79 and sliding it over with insert-
character, but that takes work.  It's easier to just avoid painting it.)

wcs@ho95e.UUCP (Bill.Stewart.4K435.x0705) (10/11/85)

In article <186@l5.uucp> gnu@l5.uucp (John Gilmore) writes:
>...
>All this could be avoided if programmers would simply avoid assuming anything
>about the cursor position after writing in column 80.  Avoiding that
>assumption means having to send a set-cursor-position after you write
>to column 80.  ....

Another thing to avoid is terminal descriptions or software that ASSUME they
can turn off NL->LFCR translation, so they use control-J to mean
"move straight down".  In a complex environment (e.g. cu, some window programs,
some LAN software), the software on the machine running the editor turns this
off, and the information doesn't get to the mahine controlling the terminal.
So you o "vi /etc/termcap", "set nu",  and half the line numbers are in
column-1 instead of right-adjusted, and the cursor is never in quite the right
place.  PLEASE, FOLKS, write bulletproof terminal handling software!  Even if
it's sometimes a bit slower, it's worth it.
-- 
## Bill Stewart, AT&T Bell Labs, Holmdel NJ 1-201-949-0705 ihnp4!ho95c!wcs

gwyn@brl-tgr.ARPA (Doug Gwyn <gwyn>) (10/14/85)

> Another thing to avoid is terminal descriptions or software that ASSUME they
> can turn off NL->LFCR translation, so they use control-J to mean
> "move straight down".  In a complex environment (e.g. cu, some window programs,
> some LAN software), the software on the machine running the editor turns this
> off, and the information doesn't get to the mahine controlling the terminal.

If the termcap/terminfo terminal description says that do/cud1 is "^J",
then that is what should be used; otherwise, it should NOT be assumed.

If you have a brain-damaged LAN or window manager, then you should
install a corresponding termcap/terminfo terminal description to be
used under those circumstances.

In all cases, software is entitled and required to use just those
capabilities described in the terminal description and must make
no other assumptions.

Implementation note:  I prefix comments describing terminal set-up
modes and other prerequisites to the termcap/terminfo descriptions
that I write.  This seems like the only way of eliminating any
confusion in these days of terminals that emulate numerous other
terminals and stupid LAN designs.