[comp.unix.questions] ADM-42 Terminal Vs. UNIX Sys V Rel 3

wmartin@stl-06sima.army.mil (Will Martin) (09/14/89)

Greetings!

I have run into a situation here that is completely mystifying me. It
involves a changeover from UNIX System V Release 2 to Release 3 on
Unisys (Sperry) 5000-series computers. Here is what is now in our
/etc/SYSIDENT: "88:02:18 DOMESTIC VERSION 5.3 RELEASE 5.0"

I use an ADM-42 terminal. I have been using this terminal for years,
mainly because I find the screen to be the most readable and least
fatigue-inducing of any terminal I've had a chance to use extensively.
However, this terminal does have a peculiarity -- it doesn't have a
"backspace" key (one that sends CTRL-H). It does have a "RUB" key that
sends the DEL character, so I have my stty settings configured to use
"stty erase \^?" so that the RUB/DEL key is the erase-last-character
command key. All was fine until this changeover from Sys V Rel 2 to
Rel 3. When that happened, all of a sudden, hitting the DEL key, instead
of erasing just the last character, began to erase the last TWO
characters typed!

The first thing to suspect in this sort of thing, of course, is
termcap/terminfo incompatibility. When I first noticed this, on the
first of our Unisys systems to be converted, our support people moved
over the ADM-42 terminfo entry from a Rel 2 system that had not yet been
converted, and overlaid the version on the Rel 3 system. It made no
difference. Also, I can tell the Rel 3 system that I am a VT-100 or some
other flavor of terminal, but still use the ADM-42, and the DEL key will
STILL erase two characters instead of one. Also, it is not a hardware
defect in the terminal, sending two instead of one DEL characters,
because I can connect to a 4.3 BSD VAX system or a Sys V Rel 2 system,
and everything works fine!

So it appears to be some mysterious interaction between the terminal 
and Sys 5 Rel 3. The following paragraphs describe the tests I've made
and reported to our system support staff. Does ANYONE out there have any
idea just what on earth is going on here?!?

If I login on a Sys V Rel 2 system, and telnet over to a Release 3
system, the DEL key on the ADM-42 works OK! On both systems, my stty
settings have "stty erase \^?" to set DEL to be the "erase-last-character"
key. When I hit a DEL in that case, it just erases the last character, like
it always did before.

Now, when I login on a Rel 3 system and telnet over to a Rel 2 system, using
the reverse of the above, DEL will erase the last two characters, BUT the
second one is slightly delayed! I can watch the screen as I hit the DEL, and
the last character typed is wiped out right away, but then the second one
back is wiped out after a very brief hesitation! (These systems are on
an Ethernet and linked with TCP/IP.)

When logged in on a Rel 3 system, if I am using my ADM-42 but I reset my stty
settings to "stty erase \^h", so that control-h is my erase-last-character
key, and THEN hit DEL, I get TWO "^?" characters on the screen. So it
isn't the "erase-last-character" action that matters, it is the character
DEL that is the important factor. But I know that it isn't that this 
particular terminal is defective and sending two DELs when I hit the key
once, via keybounce or something like that, because I can see that it
only generates one DEL character per keystroke when connected to a VAX
or to a Sys5 Rel 2 system.

We know it isn't tied to the termcap or terminfo situation, because it 
acts the same when I tell it I am a VT100 or something else. And even
if I have TERM=adm42 set on, but use a real VT100 terminal instead,
DEL erases only one character. So it is somehow a particular hardware
vs. SysV Rel3 issue. I did try hitting DEL during the login process,
when the system doesn't know what hardware you have, and THEN a DEL
from the ADM-42 acts like a single DEL character! (If you type a DEL
during the stuff you type in response to the login: prompt, a single
DEL will put your cursor on the next line, but two will put you down two
lines. Hitting the DEL from the ADM-42 then will give you just one newline.) 

I've been digging thru the ADM-42 manual, but can't find anything in
there that would indicate that there is some sort of setting that would
be causing the terminal to be generating double DEL characters for one
press of the RUB key. What gets me is that somehow the UNIX SysV Rel3 
I am talking to somehow mysteriously "knows" that I am using an ADM-42
and acts differently in that case, even when I tell it I am using some
other kind of terminal! Very strange....

Regards, Will Martin

gwyn@smoke.BRL.MIL (Doug Gwyn) (09/14/89)

In article <20853@adm.BRL.MIL> wmartin@stl-06sima.army.mil (Will Martin) writes:
>The first thing to suspect in this sort of thing, of course, is
>termcap/terminfo incompatibility.

Of course NOT.  If you see this behavior when you're typing shell
commands, terminfo is utterly ruled out.

Two things to check:  Does this occur while running cat>/dev/null?
If not, perhaps you're using a fancy shell whose command-line
editing is not set up right.  Is "stty echoe" in effect?  If so,
perhaps the BS SP BS sequence is improperly being sent as DEL SP DEL.

wmartin@stl-06sima.army.mil (Will Martin) (09/18/89)

The problem has been solved!

My thanks to Andrew Dingwall and Joseph Pepin, who pointed me to the
relevant discussion in the stty and termio(7) man pages. The problem
was that the new release of UNIX Sys V had "stty parmrk" turned on,
when it had not been on in the previous release. That setting has the
side effect, as noted in TERMIO(7), when combined with ISTRIP being off,
of causing a valid character "0377" (DEL) to be read as 0377 0377.

I eliminated the problem by putting "stty -parmrk" in my .profile files
everywhere. The doubling of the deletes went away.

The net really came thru on this one. 

Regards, Will