sysline(1)

Romain Kang romain at pyramid.pyramid.com
Sat Feb 25 15:19:00 AEST 1989


In article <11142 at s.ms.uky.edu> david at ms.uky.edu (David Herron -- One of the vertebrae) writes:
| We have a number of terminals here which if you print in the last
| character position on the screen the terminal does a "CR".  If this
| was done as part of a status line update, the following "fs" (from 
| status-line) stuff ends up with the cursor at the beginning of the line
| that it originally came from.

| This is (at least) on Ampex 210's and TVI 950's.  (I think).  I know this
| is for certain on the Ampex 210's.  (A210's are *VERY* similar to TVI925's)

The problem you describe certainly exists in vanilla 4.3 sysline used
with "magic cookie terminals".  For example, Wyse 50's and Wyse 50
emulators, like Ampex 230's actually have a a 78-column bottom status
line (in 80-column mode).  (I'm assuming that A230's are similar to
A210's.)  For these terminals, you avoid going past column 77.

Lou Salkind of NYU had a fix that looked for a "cg" numeric attribute,
which I guess meant "column gap".  This is the difference between the
width of the terminal screen and the width of the sysline.  So a Wyse
50 would use "cg#2".  Additionally, since there's a "ws" attribute
described the 4.3BSD termcap(5), it seems reasonable to use that, if
it's available.

Here's a diff against "sysline.c	5.6 (Berkeley) 1/9/86":

***************
*** 1182,1187
  	}
  
! 	/* the "-1" below is to avoid cursor wraparound problems */
! 	columns = tgetnum("co") - 1;
  	if (window) {
  		strcpy(to_status_line, "\r");

--- 1187,1198 -----
  	}
  
! 	if ((columns = tgetnum("ws")) < 0) {
! 		int gap;
! 		columns = tgetnum("co");
! 		if ((gap = tgetnum("cg")) > 0)
! 			columns -= gap;
! 	}
! 	columns--;	/* avoid cursor wraparound */
! 
  	if (window) {
  		strcpy(to_status_line, "\r");

It would be cleverer to add a boolean attribute for the status line
which would be analogous to "am", rather than blithely shortchanging
all status lines by one character.  What would one name that attribute?

And if you really wanted to play with the two-letter attribute names,
you could add a secondary status line -- Wyse 50's can use a 46-column
"host message area" at the top of the screen, as well as the 78-column
region at the bottom.

"Jeepers, feepers! / Where'd you get those features ...."



More information about the Comp.bugs.4bsd.ucb-fixes mailing list