TERMCAPs extensions...

Bill Stewart wcs at ho95b.UUCP
Sat Apr 13 07:12:47 AEST 1985


Barry Shein at BU asked if there was some way to inform TERMCAP and
similar programs about different window sizes, for terminals that
support multiple windows, and suggested environment variables as one approach.

System V Release 2 and the Teletype 5620 terminal provide some
support for this.  (The 5620 is the production equivalent of the
BLIT bitmapped graphics terminal.)  The TERMINFO version of curses
recognizes the variables LINES and COLUMNS as the dimensions of the
window, and can optionally be compiled to try using the 5620/blit
ioctl to check window size.  This means that any programs using
libcurses.a can know how big windows are (if they bother to ask
curses instead of wiring in 24x80), and for programs that don't
need curses but just want a screen width (e.g. ls -C), the variables
are available.  
Some of the terminal emulation programs that run on
the 5620 will automatically set and export the LINES and COLUMNS
variables whenever the window size changes; "emacsterm" exports
these, plus TERMCAP, TERM, and TERMINFO so that anything
screen-oriented gets the right information.  This approach is useful
in a remote execution environment, where the program can't always DO
an ioctl to the real device, especially if you can pass environment
variables.
			Bill Stewart, ihnp4!ho95c!wcs at AT&T Bell Labs.



More information about the Comp.unix.wizards mailing list