summaryrefslogtreecommitdiffstats
path: root/Source/CursesDialog
diff options
context:
space:
mode:
authorÅdne Hovda <ahovda@openit.com>2014-11-18 09:04:30 (GMT)
committerBrad King <brad.king@kitware.com>2014-11-18 15:02:33 (GMT)
commit44f02b42fb3b2278fdf8e9bd450c3f01573d1e3e (patch)
treea39f9386810fd068a532f4779492fc7eee54eed3 /Source/CursesDialog
parentee3d06a41ec6b5355083a3eba36cf73a5438c1c5 (diff)
downloadCMake-44f02b42fb3b2278fdf8e9bd450c3f01573d1e3e.zip
CMake-44f02b42fb3b2278fdf8e9bd450c3f01573d1e3e.tar.gz
CMake-44f02b42fb3b2278fdf8e9bd450c3f01573d1e3e.tar.bz2
ccmake: Use standard getmaxyx instead of non-standard getmax[xy]
Swap out getmax[xy]() calls for single call to getmaxyx(), to support strict X/Open conformant curses implementations, e.g. HP-UX Xcurses.
Diffstat (limited to 'Source/CursesDialog')
-rw-r--r--Source/CursesDialog/form/form.priv.h6
-rw-r--r--Source/CursesDialog/form/frm_driver.c13
-rw-r--r--Source/CursesDialog/form/frm_post.c5
3 files changed, 2 insertions, 22 deletions
diff --git a/Source/CursesDialog/form/form.priv.h b/Source/CursesDialog/form/form.priv.h
index 889c6e4..8516a6f 100644
--- a/Source/CursesDialog/form/form.priv.h
+++ b/Source/CursesDialog/form/form.priv.h
@@ -33,12 +33,6 @@
#include "mf_common.h"
#include "form.h"
-/* get around odd bug on aCC and itanium */
-#if defined(__hpux)
-#define getmaxx __getmaxx
-#define getmaxy __getmaxy
-#endif
-
/* form status values */
#define _OVLMODE (0x04) /* Form is in overlay mode */
#define _WINDOW_MODIFIED (0x10) /* Current field window has been modified */
diff --git a/Source/CursesDialog/form/frm_driver.c b/Source/CursesDialog/form/frm_driver.c
index b9611bf..db2ee50 100644
--- a/Source/CursesDialog/form/frm_driver.c
+++ b/Source/CursesDialog/form/frm_driver.c
@@ -357,12 +357,7 @@ static void Buffer_To_Window(const FIELD * field, WINDOW * win)
assert(win && field);
-#if defined(__LSB_VERSION__)
getmaxyx(win, height, width);
-#else
- width = getmaxx(win);
- height = getmaxy(win);
-#endif
for(row=0, pBuffer=field->buf;
row < height;
@@ -394,17 +389,13 @@ static void Window_To_Buffer(WINDOW * win, FIELD * field)
int pad;
int len = 0;
char *p;
- int row, height;
+ int row, height, width;
assert(win && field && field->buf );
pad = field->pad;
p = field->buf;
-#if defined(__LSB_VERSION__)
- { int width; getmaxyx(win, height, width); }
-#else
- height = getmaxy(win);
-#endif
+ getmaxyx(win, height, width);
for(row=0; (row < height) && (row < field->drows); row++ )
{
diff --git a/Source/CursesDialog/form/frm_post.c b/Source/CursesDialog/form/frm_post.c
index 3c63de7..924fe6a 100644
--- a/Source/CursesDialog/form/frm_post.c
+++ b/Source/CursesDialog/form/frm_post.c
@@ -63,12 +63,7 @@ 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);