summaryrefslogtreecommitdiffstats
path: root/Source/CursesDialog/form/frm_post.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-01-05 16:07:24 (GMT)
committerBrad King <brad.king@kitware.com>2011-01-05 16:07:24 (GMT)
commitdde0c89cfcec22ac75cbadd77e45d2113521f326 (patch)
tree2165bb2734227b2f3ca5239210863120c7121fc6 /Source/CursesDialog/form/frm_post.c
parenta3de30eed95cbcff75aeb654710f8b43a8dfa90d (diff)
downloadCMake-dde0c89cfcec22ac75cbadd77e45d2113521f326.zip
CMake-dde0c89cfcec22ac75cbadd77e45d2113521f326.tar.gz
CMake-dde0c89cfcec22ac75cbadd77e45d2113521f326.tar.bz2
ccmake: Use LSB 4.0 getmaxyx conditionally
Use of 'getmaxyx' works on LSB but does not seem portable to other curses versions.
Diffstat (limited to 'Source/CursesDialog/form/frm_post.c')
-rw-r--r--Source/CursesDialog/form/frm_post.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/CursesDialog/form/frm_post.c b/Source/CursesDialog/form/frm_post.c
index 924fe6a..3c63de7 100644
--- a/Source/CursesDialog/form/frm_post.c
+++ b/Source/CursesDialog/form/frm_post.c
@@ -63,7 +63,12 @@ int post_form(FORM * form)
RETURN(E_NOT_CONNECTED);
formwin = Get_Form_Window(form);
+#if defined(__LSB_VERSION__)
getmaxyx(formwin, height, width);
+#else
+ width = getmaxx(formwin);
+ height = getmaxy(formwin);
+#endif
if ((form->cols > width) || (form->rows > height))
RETURN(E_NO_ROOM);