View Single Post
Old May 15, 2007, 19:28   #4
pav
Administrator
 
pav's Avatar
 
Join Date: Apr 2007
Location: Prague, Czech republic
Age: 39
Posts: 783
pav is on a distinguished road
Send a message via ICQ to pav
Quote:
Originally Posted by Diego Gonzalez View Post
I had the same problem when I was writing a Telnet client. Try with this

Code:
void handleSIGWINCH(int sig) 
{
        struct winsize ws;

        if (ioctl(1, TIOCGWINSZ, &ws) == -1)
        {
                perror("ioctl");
                return;
        }

        resize_term(ws.ws_row, ws.ws_col);
}
How portable is this ioctl interface?

Tried it, same screen flicker as my method, so I'm not switching
__________________
See the elves and everything! http://angband.oook.cz
pav is offline   Reply With Quote