Is there a way to find out whether ncurses supports ABI 6?
if ( ABI 6 is supported ) {
...
}
else {
...
}
You can see this by comparing the header files. There are two features which can be checked at compile time:
/* * Identify the mouse encoding version. */ -#define NCURSES_MOUSE_VERSION 1 +#define NCURSES_MOUSE_VERSION 2
@@ -374,9 +419,9 @@ { attr_t attr; wchar_t chars[CCHARW_MAX]; -#if 0 +#if 1 #undef NCURSES_EXT_COLORS -#define NCURSES_EXT_COLORS 20110404 +#define NCURSES_EXT_COLORS 20170729 int ext_color; /* color pair, must be more than 16-bits */ #endif }
That is, the latter is (in ABI 5) within an ifdef which prevents the NCURSES_EXT_COLORS
symbol from being defined. The NCURSES_MOUSE_VERSION
symbol is always defined, but its value changed.