- if (initialize_pair) /* don't know how to handle this */
- returnCode(ERR);
-
- SP->_default_color = isDefaultColor(fg) || isDefaultColor(bg);
- SP->_has_sgr_39_49 = (tigetflag("AX") == TRUE);
- SP->_default_fg = isDefaultColor(fg) ? COLOR_DEFAULT : (fg & C_MASK);
- SP->_default_bg = isDefaultColor(bg) ? COLOR_DEFAULT : (bg & C_MASK);
- if (SP->_color_pairs != 0) {
- bool save = SP->_default_color;
- SP->_default_color = TRUE;
- init_pair(0, (short) fg, (short) bg);
- SP->_default_color = save;
+ SP_PARM->_default_color = isDefaultColor(fg) || isDefaultColor(bg);
+ SP_PARM->_has_sgr_39_49 = (tigetflag("AX") == TRUE);
+ SP_PARM->_default_fg = isDefaultColor(fg) ? COLOR_DEFAULT : (fg & C_MASK);
+ SP_PARM->_default_bg = isDefaultColor(bg) ? COLOR_DEFAULT : (bg & C_MASK);
+ if (SP_PARM->_color_pairs != 0) {
+ bool save = SP_PARM->_default_color;
+ SP_PARM->_assumed_color = TRUE;
+ SP_PARM->_default_color = TRUE;
+ init_pair(0, (short) fg, (short) bg);
+ SP_PARM->_default_color = save;
+ }
+ code = OK;