View Single Post
Old May 15, 2007, 18:59   #3
Diego Gonzalez
Adept
 
Join Date: May 2007
Posts: 170
Diego Gonzalez is on a distinguished road
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);
}
Diego Gonzalez is offline   Reply With Quote