Xref: utzoo comp.unix.wizards:5559 comp.bugs.misc:72
Path: utzoo!mnetor!uunet!husc6!hao!oddjob!gargoyle!ihnp4!cbosgd!mandrill!hal!ncoast!allbery
From: allbery@ncoast.UUCP (Brandon Allbery)
Newsgroups: comp.unix.wizards,comp.bugs.misc
Subject: Re: curses and terminfo
Message-ID: <6364@ncoast.UUCP>
Date: 8 Dec 87 00:39:33 GMT
References: <409@anuck.UUCP>
Reply-To: allbery@ncoast.UUCP (Brandon Allbery)
Followup-To: comp.unix.wizards
Organization: Cleveland Public Access UN*X, Cleveland, Oh
Lines: 47

As quoted from <409@anuck.UUCP> by phr@anuck.UUCP (p.h.reed):
+---------------
| 1.  I have noticed that cursors can not create a box around a window
|     which is the size of the entire screen.  The last row, last column
|     position remains "unboxed".
+---------------

Curses won't write that last column, since most terminals will scroll the
first line off the screen if it does.  See also #3.

+---------------
| 2.  The screen cursor often flickers across the screen as I enter
|     text when using getstr or getch.  This flickering seems to be
|     worse if I have used reverse video for displaying any text or boxes
|     on the screen.
+---------------

Especially when screen attributes are used, refresh() does some fancy
repainting when only a single character is being updated.  V.3 terminfo
has a call "echochar()" which avoids this in many cases.

+---------------
| 3.  If I define a boxed window, with a reverse video border, which starts
|     in column 2 of the screen, the border appears in column 1 and 2, except
|     for the very first row and column which does not contain the border.
+---------------

Sounds like it might be a problem with your terminfo description.  Check the
description; if displaying a character in the last column of the screen makes
the cursor move to the next line, you should add the "am" boolean to the
description and re-"tic" it.

I have a bug to report in V.3 terminfo; maybe someone else already knows
about it, but....

The bug is that wsetscrreg() doesn't check to insure that its arguments are
in range.  If they aren't, curses won't scroll; moreover, the cursor will move
outside the window when attempting to scroll.  (It doesn't display anything,
but the window's cursor ends up *outside* the window.)

The fix:  since wsetscrreg() is a macro, anyone (including binary sites) can
change it.  The values to be set should be tested against 0 and (w)->_maxy,
and also checked so that the second value is >= the first.
-- 
Brandon S. Allbery		      necntc!ncoast!allbery@harvard.harvard.edu
 {hoptoad,harvard!necntc,cbosgd,sun!mandrill!hal,uunet!hnsurg3}!ncoast!allbery
			Moderator of comp.sources.misc