check curses.colors

This commit is contained in:
ruki
2019-03-17 10:23:52 +08:00
parent e153b309a5
commit 482b0b450b

View File

@@ -760,7 +760,9 @@ static int lc_pair_content(lua_State *L)
return 2; return 2;
} }
#ifdef COLORS
LC_NUMBER2(COLORS, COLORS) LC_NUMBER2(COLORS, COLORS)
#endif
LC_NUMBER2(COLOR_PAIRS, COLOR_PAIRS) LC_NUMBER2(COLOR_PAIRS, COLOR_PAIRS)
static int lc_COLOR_PAIR(lua_State *L) static int lc_COLOR_PAIR(lua_State *L)
@@ -2252,7 +2254,9 @@ static const luaL_Reg curseslib[] =
{ "has_colors", lc_has_colors }, { "has_colors", lc_has_colors },
{ "init_pair", lc_init_pair }, { "init_pair", lc_init_pair },
{ "pair_content", lc_pair_content }, { "pair_content", lc_pair_content },
#ifdef COLORS
{ "colors", lc_COLORS }, { "colors", lc_COLORS },
#endif
{ "color_pairs", lc_COLOR_PAIRS }, { "color_pairs", lc_COLOR_PAIRS },
{ "color_pair", lc_COLOR_PAIR }, { "color_pair", lc_COLOR_PAIR },