TERMCAP experts READ UP!!!

Doug Gwyn gwyn at smoke.BRL.MIL
Thu Feb 15 01:58:23 AEST 1990


In article <2NQ1.H1xds13 at ficc.uu.net> peter at ficc.uu.net (Peter da Silva) writes:
>I have another question. Most termcaps have been set up so that 'cs' to
>change the scrolling region takes the top line # first. Someone sent in
>a set of changes to browse that implied that for xterm windows on a SS1
>the reverse is true (bottom line # first). Which is it?

Look, guys, I went through a lot of trouble to edit the termcap manual
entry for the 4.3BSD release, bringing it up to date with respect to
terminfo at the time.  (Another update is imminent.)  I even posted it
so you would all be able to have a copy even if you don't have access
to 4.3BSD documentation.  The answers to questions like these are not
hard to figure out from the specs in the official termcap manual.

	cs	str	(NP)	Change scrolling region to lines m thru n
				(VT100)

	If the terminal has a settable scrolling region (like the VT100),
	the command to set this can be described with the "cs" capability,
	which takes two parameters: the top and bottom lines of the
	scrolling region.  The cursor position is, alas, undefined after
	using this command.

While it doesn't rub your nose in it, by analogy with similar wording
elsewhere in the termcap manual entry this certainly implies that the
first parameter (unless %r is specified) is `m' and denotes the top line
of the region, while the second (ditto) is `n' and denotes the bottom line.
Referring to the VT100 termcap that I occasionally post will confirm this:
	cs=\E[%i%d;%dr
The "xterm" termcap from X11R3 has the identical definition for "cs".
(In fact it's the ANS X3.64 definition: ESC CSI top `;' bottom `r'.)



More information about the Comp.unix.wizards mailing list