[Konsole-devel] [Bug 203185] Wrong reported terminal dimensions when using the "-e" option

Nikos Chantziaras realnc at gmail.com
Sun Aug 9 15:49:33 UTC 2009


https://bugs.kde.org/show_bug.cgi?id=203185





--- Comment #3 from Nikos Chantziaras <realnc gmail com>  2009-08-09 17:49:32 ---
I've written some example C code to trigger the bug.  It's getting the terminal
size using the TIOCGWINSZ ioctl to get the terminal size.  The TIOCGWINSZ ioctl
call reports the correct size only when not using Konsole's -e option.  With
the -e option, the size is always reported as 0x0:

#include <stdio.h>
#include <sys/ioctl.h>
#include <termios.h>

int main( void )
{
    struct winsize size;
    size.ws_col = size.ws_row = 0;
    if (ioctl(0, TIOCGWINSZ, &size) < 0) {
        printf("Error: ioctl failed.\n");
        return 1;
    }
    printf("Terminal size: %dx%d\n", size.ws_col, size.ws_row);
    printf("[ENTER to quit.]");
    scanf("%*[^\n]");
    return 0;
}

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the konsole-devel mailing list