Fixes to vnews terminal handler

Guy Harris guy at rlgvax.UUCP
Fri Sep 23 03:25:51 AEST 1983


It was mentioned in net.news.b that the "cs" string is used inconsistently
in 4.1BSD "termcap" and 4.1c "termcap"; in 4.1 the "cs" string for the VT100
has a "%r" in it while in 4.1c it doesn't.

The order problem is probably due to the fact that the arguments to "tgoto" are
"column, line", but most terminals put the line in the cursor motion string
first and the column next, so "tgoto" puts the arguments out in reverse
order.  Therefore, using "tgoto" on the "cs" string requires you to pass the
arguments in the order "last line, first line" which is a bit strange so I
guess they put in the "%r" in the 4.1 termcap so you would pass them in the
order "first line, last line".  However, in ex/vi 3.6 that comes with 4.1BSD
the "cs" string isn't used anywhere, while in ex/vi 3.7 that comes with 4.1c
it is used but "tgoto" is called with the arguments "last line, first line".
Therefore, I'd vote for "last line, first line" being the right arguments to
"tgoto" when used with the "cs" string, and leaving the "%r" out.

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



More information about the Comp.unix.wizards mailing list