Subject: prob solved (was: pcvt/(kermit,tip) difficulty with '\t')
To: None <port-i386@NetBSD.ORG>
From: Robert Kennedy <robert@Theory.Stanford.EDU>
List: netbsd-bugs
Date: 03/17/1996 21:19:30
Earlier today, I wrote to port-i386:
> When I use tip or kermit to connect to a modem on one of my
> serial ports, I get very strange behavior when the modem sends a '\t'
> (^I) character to me. As best I can tell, the cursor on my screen
> advances to the 80th column, just as if no tab stops were set.
> ...

Here are the things that were messing up tab handling for me under
kermit:

1) When tip and kermit initialize the user terminal, they turn off
   OPOST in the termio structure, which makes the tty driver pass '\t'
   straight through to the console driver (pcvt). This is as it should
   be.

2) My .login invokes tset(1), which sends the "terminal and tab
   initialization strings" to the terminal.

3) The pcvt driver's interpretation of the "tab initialization string"
   is that it should clear *all* tabs, including the "hardware" tabs
   that (in my opinion) should remain set at 8-column intervals.

Is it a bug for tset(1) to think of the "ct" terminal capability as a
"tab initialization string" when `man 5 termcap` says it should "clear
*all* [emphasis added] tab stops"?

Is it a bug for pcvt and termcap to treat the "ct" terminal capability
as a string that clears *all* tabs, when obviously this isn't the way
most other terminals and termcap entries behave?

There's a bug in at least one of these places, but I don't know enough
tradition to know which place has the bug. It seems odd that the
normal behavior of tset(1) should be to blow away the terminal's
ability to deal with tab characters.

In any case, my solution so far is to defy the termcap man page and
set up pcvt so that the "clear tabs" string resets the tabs to their
default setup (every 8 columns).

	-- Robert