I’m using SWI 10.0.0 on MacOS 15.5.
tty_get_capability(co, number , A) and tty_get_capability(li, number, B) should provide columns and rows of the current terminal. If I type this goals in the SWI GUI command line, then I get 80x24, independent how big or small I arrange the SWI window. (BTW this is the same using term package commands of TCL and running them in a Mac Terminal App).
Could someone explain me the reason and even more important, how to get the real number of columns and rows of the swish window?
This basic principle to fetch the output of a process was provided by @jan some posts earlier. In this way now I get the effective size in columns and rows of the swish as numbers.
But I’m still interested to learn why tty_get_capability (which in facts goes to termcap) gives fix 80x24….?
That works on all versions, including the Windows console and swipl-win terminal in Windows. On non-Windows it uses the ioctl() call and works on any tty, while the new swipl-win for non-Windows uses a pseudo-tty.