diff --git a/Source/CursesDialog/form/frm_driver.c b/Source/CursesDialog/form/frm_driver.c index 80f09d06b..03896c29f 100644 --- a/Source/CursesDialog/form/frm_driver.c +++ b/Source/CursesDialog/form/frm_driver.c @@ -357,7 +357,12 @@ 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; @@ -389,13 +394,17 @@ static void Window_To_Buffer(WINDOW * win, FIELD * field) int pad; int len = 0; char *p; - int row, height, width; + int row, height; assert(win && field && field->buf ); pad = field->pad; p = field->buf; - getmaxyx(win, height, width); +#if defined(__LSB_VERSION__) + { int width; getmaxyx(win, height, width); } +#else + height = getmaxy(win); +#endif 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 924fe6a9e..3c63de70e 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);