bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: LINES && COLS


From: amores perros
Subject: RE: LINES && COLS
Date: Thu, 02 Feb 2006 18:25:59 +0000




From: Bob Rossi
Subject: LINES && COLS
Date: Sat, 28 Jan 2006 23:27:08 -0500

Hi,

I've spent a ton of time recently trying to understand how ncurses
manipulates the LINES and COLS variables, and how they effect the
display of the windows.

For some reason, on Cygwin, my application does not display properly,
unless I have a 25x80 terminal window.

My program indirectly calls tgetent through readline, and I've noticed
that on linux that calls set LINES and COLS to the correct size of the
terminal. However on Cygwin that call does not set LINES and COLS at
all.

Finally, when initscr is called on Linux the variables are already set,
and stay set. However, on Cygwin, they were not set, and get set to
25x80, which is not the size of the terminal.

On both windows and linux the screen size is correct when I fetch it
with the ioctl TIOCGWINSZ.

If I set the environment variables LINES and COLUMNS, then on Cygwin the
display works, cause initscr figures out the correct size of the
terminal.


I don't know if this is any help at all, but lifelines correctly sizes to the cygwin window size. I don't think it calls tgetent directly, and I'm not familiar with
TIOCGWINSZ.

But I do notice that the cygwin window appears to have the variables
LINES and COLUMNS set correctly from my resizing operation (I used the
console properties to make my cygwin window large to verify that lifelines
uses the full size available)

$ set | grep LINES
LINES=45

$ set | grep COLUMNS
COLUMNS=120

so apparently those environment variables are getting set by Windows for me?

Cordially,

Perry






reply via email to

[Prev in Thread] Current Thread [Next in Thread]