HELP SUN_TTY_SIZE                                     Chris Slymon July 1985

sun_tty_size() -> width -> height;

SUN_TTY_SIZE returns the width and height of the current window (in the
SUNTOOLS window management system), or false (twice) if the current process is
not running in a window. The window size is returned as the number of lines
and columns of text in the current font that will fit into the window.

Examples of use:
In INIT.P, put the following lines to make POP11 printing aware of the
actual available line length.

    vars width; sun_tty_size() -> width ->; ;;; erase the height

    if width then
        width - 2 -> poplinemax;
        poplinemax - 7 -> poplinewidth;
    endif;

In VEDINIT.P, define the procedure VEDINIT to make VED aware of the actual
window size.

define vedinit;
    lvars w h;
    sun_tty_size() -> w -> h;
    if w then
        w - 2 -> vedscreenwidth;
        vedscreenwidth - 2 -> vedlinemax;
        vedscreenlength -> w;
        h -> vedscreenlength;
        ;;; this ensures that windows retain the same proportions!
        intof( h * vedstartwindow / w) -> vedstartwindow;
    endif;
enddefine;

NOTE: POPLINEMAX and VEDSCREENWIDTH should be at least two characters
less than the actual window width, otherwise problems may occur with
the terminal emulator.

Making VED monitor and respond to CHANGES in window size is a bit more
difficult.
