Quote:
Originally Posted by
pogdorica
---------- Post updated at 04:59 PM ---------- Previous update was at 04:26 PM ----------
[/COLOR]Oh !!! I just find this post:
terminal Width/height change
No, I really think you need to call
resizeterm(). The ioctl only changes what size is reported, not what size the window is, so isn't very useful. How the terminal is actually resized from the user end is terminal-specific and nothing to do with the kernel, hence part of curses.
What value is resizeterm returning? It may not think your terminal's resizable. Curses also provides the function
is_term_resized() to tell if curses thinks the terminal is even capable of resizing. What does 'env | grep TERM' show? If TERM is not xterm it probably won't try to resize it even if the terminal supports it.
---------- Post updated at 10:50 AM ---------- Previous update was at 10:09 AM ----------
(posted from PM with permission)
Quote:
Originally Posted by pogdorica
Hi Corona.
I'm grateful for your time and support. I'm from Madrid-Spain and I'm really sorry if my english isnīt very good. I hope you understand all my post.
Even if it's not as easy as Spanish for you, your english is quite good.
Quote:
Today, itīs the first time that i try to do something with 'curses' library and i would want to know what it is possible to do and not to do with this library. I am studying your link; sure it 's very good.
I really don't know curses. I'm just using google, reading documentation, and suggesting things I do by habit. It certainly seems possible to resize terminals with curses -- both PuTTY and curses support it.
Whenever a function doesn't work, first check its return value. Whether curses believes its succeeded or not will help you figure out what's gone wrong. curses might not even be trying to resize the terminal if it doesn't believe its resizable.
Another thing to check is the manual page, see 'man resizeterm'. That's where I found that resizeterm and resize_term are different functions -- you should be calling resizeterm -- and where I found the mention of is_term_resized.
You might also find
Writing Programs with NCURSES useful.