X-Git-Url: http://ncurses.scripts.mit.edu/?a=blobdiff_plain;ds=sidebyside;f=ncurses%2Fbase%2Flib_color.c;h=f0d2006b71ab9ce2a79849fc029a92a10ad4ac46;hb=44a4147009bf2978d342175fb52b7f0999e11b5f;hp=50d580ec72266561ee4330c020deda58b75e1eae;hpb=d1a026123ac051716cdc16278345c1fb5c843b79;p=ncurses.git diff --git a/ncurses/base/lib_color.c b/ncurses/base/lib_color.c index 50d580ec..f0d2006b 100644 --- a/ncurses/base/lib_color.c +++ b/ncurses/base/lib_color.c @@ -45,7 +45,7 @@ #define CUR SP_TERMTYPE #endif -MODULE_ID("$Id: lib_color.c,v 1.101 2011/05/28 21:57:59 tom Exp $") +MODULE_ID("$Id: lib_color.c,v 1.103 2011/07/23 22:00:34 tom Exp $") #ifdef USE_TERM_DRIVER #define CanChange InfoOf(SP_PARM).canchange @@ -331,6 +331,13 @@ NCURSES_SP_NAME(start_color) (NCURSES_SP_DCL0) default_bg(NCURSES_SP_ARG), NCURSES_SP_NAME(_nc_outch)); } +#if !NCURSES_EXT_COLORS + /* + * Without ext-colors, we cannot represent more than 256 color pairs. + */ + if (maxpairs > 256) + maxpairs = 256; +#endif if (maxpairs > 0 && maxcolors > 0) { SP_PARM->_pair_limit = maxpairs;