[Coco] window surprise

John E. Malmberg wb8tyw at qsl.net
Tue Jan 17 09:23:21 EST 2012


On 1/16/2012 10:19 PM, Willard Goosey wrote:
> On Tue, Jan 17, 2012 at 10:40:12AM +1000, Bob Devries wrote:
>
>> on page 10-85 of the MultiVue manual, an example is given (with the correct
>> spelling of the call). The comment is "acquire size of window".
>
> Thanks, but windint windows are only part of the problem.  Well, I've
> already got a seperate utiltity that's supposed to set up things for
> termcap, maybe I'll have to expand it -- ask windint about the window
> size on /wX, and, IIRC, ANSI and XTERM terminals can be asked directly
> what size they are.

Only some ANSI terminals will answer about the size.  That sequence was 
not implemented in the original VT100.  Also only the early terminals 
will not report all their capabilities.

One way that might work to find out the current screen size on older 
terminals:

1. Get current cursor position.

2. Try to move the cursor to a larger position.

3. Read the position back.

4. Depending on the terminal's ANSI compliance, this step may need to be 
repeated.  Or you may need to probe for the horizontal and vertical 
separately.  Some terminals will move the cursor to the max size if you 
put in large arguments, some will wrap around.

5. Restore the old cursor position.

Regards,
-John
wb8tyw (at) qsl.network
Personal Opinion Only




More information about the Coco mailing list