[Top][All Lists]

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

Re: SuSE 9.1 weirdness resolved

From: Thomas Dickey
Subject: Re: SuSE 9.1 weirdness resolved
Date: Mon, 20 Jun 2005 18:28:16 -0400 (EDT)

On Mon, 20 Jun 2005, Dave Ulrick wrote:

A while back, I reported a problem with ncurses 5.4 on my SuSE 9.1 Professional system that prevented KEY_RESIZE from being delivered to my

I saw that, but have a different explanation of the problem, prompted by
today's comments.

Now that I've removed this statement, my program receives KEY_RESIZE events. Also, 'less' no longer shows a corrupted screen when run by my app after a window resize.

Conclusion: _don't_ 'export' LINES or COLUMNS, lest strange things happen to your ncurses apps!

yes - that's something that no one commented on before that I can recall. It happens that ncurses obtains the screensize in just one function, which is shared by this (and the _nc_update_screensize function used for SIGWINCH):

       The  use_env  routine, if used, is called before initscr or newterm are
       called.  When called with FALSE as an argument, the values of lines and
       columns  specified in the terminfo database will be used, even if envi-
       ronment variables LINES and COLUMNS (used by default) are  set,  or  if
       curses  is running in a window (in which case default behavior would be
       to use the window size if LINES and COLUMNS are not set).

and (reading the code now), I see that the adjustment for SIGWINCH would only happen for the default case (where LINES and COLUMNS would interfere). SIGWINCH is delivered, but ncurses continues to let the environment override the computed screensize.

So there's room for improvement. However, SuSE's setting LINES and COLUMNS is an error (unless they're actually supporting antique termcap
applications that can't get the screensize).

Thomas E. Dickey

reply via email to

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