diff options
author | Ådne Hovda <ahovda@openit.com> | 2014-11-18 09:04:30 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-11-18 15:02:33 (GMT) |
commit | 44f02b42fb3b2278fdf8e9bd450c3f01573d1e3e (patch) | |
tree | a39f9386810fd068a532f4779492fc7eee54eed3 /Source/CursesDialog/form/frm_driver.c | |
parent | ee3d06a41ec6b5355083a3eba36cf73a5438c1c5 (diff) | |
download | CMake-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/form/frm_driver.c')
-rw-r--r-- | Source/CursesDialog/form/frm_driver.c | 13 |
1 files changed, 2 insertions, 11 deletions
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++ ) { |