summaryrefslogtreecommitdiff
path: root/Source/CursesDialog
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-01-04 08:52:50 -0500
committerBrad King <brad.king@kitware.com>2011-01-04 08:52:50 -0500
commita3de30eed95cbcff75aeb654710f8b43a8dfa90d (patch)
tree22ce24dd5d0227b3e83f22af6c2aa82c1163797a /Source/CursesDialog
parent7d691cab9b479b154653f49057724a7707015828 (diff)
downloadcmake-a3de30eed95cbcff75aeb654710f8b43a8dfa90d.tar.gz
ccmake: Use LSB 4.0 curses API conditionally
Use of 'attr_t' and 'wattr_get' works on LSB but does not seem portable to other curses versions.
Diffstat (limited to 'Source/CursesDialog')
-rw-r--r--Source/CursesDialog/form/frm_driver.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/Source/CursesDialog/form/frm_driver.c b/Source/CursesDialog/form/frm_driver.c
index 519d66d273..80f09d06b1 100644
--- a/Source/CursesDialog/form/frm_driver.c
+++ b/Source/CursesDialog/form/frm_driver.c
@@ -855,8 +855,6 @@ static int Display_Or_Erase_Field(FIELD * field, bool bEraseFlag)
{
WINDOW *win;
WINDOW *fwin;
- attr_t fwinAttrs;
- short fwinPair;
if (!field)
return E_SYSTEM_ERROR;
@@ -872,12 +870,17 @@ static int Display_Or_Erase_Field(FIELD * field, bool bEraseFlag)
if (field->opts & O_VISIBLE)
Set_Field_Window_Attributes(field,win);
else
- {
+ {
+#if defined(__LSB_VERSION__)
/* getattrs() would be handy, but it is not part of LSB 4.0 */
- /* wattrset(win,getattrs(fwin)); */
+ attr_t fwinAttrs;
+ short fwinPair;
wattr_get(fwin, &fwinAttrs, &fwinPair, 0);
wattr_set(win, fwinAttrs, fwinPair, 0);
- }
+#else
+ wattrset(win,getattrs(fwin));
+#endif
+ }
werase(win);
}