]> git.michaelhowe.org Git - packages/o/openafs.git/commit
gtx: use getmaxyx() with sensible fallbacks
authorBrandon S Allbery <ballbery@sinenomine.net>
Tue, 24 Nov 2015 21:39:02 +0000 (16:39 -0500)
committerStephan Wiesand <stephan.wiesand@desy.de>
Mon, 14 Dec 2015 12:46:55 +0000 (07:46 -0500)
commit28a06cd8e4a8f57ddfc52a570b63b5ccf85bfc7b
tree03af831fd4e5765f738738373eae67131d18170f
parent5eaca907f2afa6f1a3bfbbae5e7985401d7ff3ad
gtx: use getmaxyx() with sensible fallbacks

configure now checks for the standard getmaxyx() macro; failing that,
it looks for the older but pre-standardization getmaxx() and getmaxy(),
then falls back to the 4.2BSD curses _maxx and _maxy fields; if all
else fails, gtx building is disabled.

gtx now defines getmaxyx() itself if necessary, based on the above.

This also fixes a bug in gtx with all ncurses versions > 1.8.0 on
platforms other than NetBSD and OS X: gtx was using the _maxx and
_maxy fields, which starting with ncurses 1.8.1 were off by 1 from
the expected values. As such, behavior of scout and/or afsmonitor
may change on most ncurses-using platforms.

Reviewed-on: http://gerrit.openafs.org/12107
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit b800f7d9bd5ea390ab330c1c0c38ac8277eb9998)

Change-Id: Ia42eb33a963aa15131511c07ef4823f3f061a762
Reviewed-on: http://gerrit.openafs.org/12125
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
acinclude.m4
src/cf/curses.m4 [new file with mode: 0644]
src/gtx/curseswindows.c
src/gtx/gtxcurseswin.h