[Top][All Lists]

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


From: Thomas Dickey
Subject: Re: LINES && COLS
Date: Tue, 31 Jan 2006 20:36:46 -0500 (EST)

On Sat, 28 Jan 2006, Bob Rossi wrote:


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.

tgetent calls
        _nc_setupterm which calls

The last one is where LINES/COLS are manipulated. That slice has been relatively stable for a few years - I'm not sure what would go wrong with the cygwin package. It's possible that you're linking with the termcap library on cygwin. That would explain the 25x80, for instance, if the
termcap file contains those values - which it does for the "cygwin" entry.

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

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

I was really hoping someone here could help me figure out what is wrong
with the initscr code (or with my code), so that I can get my
application working on Cygwin.

Bob Rossi

Bug-ncurses mailing list

Thomas E. Dickey

reply via email to

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