mirror of
https://github.com/reactos/CMake.git
synced 2024-11-26 13:00:25 +00:00
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.
This commit is contained in:
parent
7d691cab9b
commit
a3de30eed9
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user