- T((T_CALLED("wcolor_set(%p,%d)"), win, color_pair_number));
- if (win && !opts && (color_pair_number >= 0) && (color_pair_number < COLOR_PAIRS)) {
- T(("... current %ld", (long) PAIR_NUMBER(win->_attrs)));
- toggle_attr_on(win->_attrs,COLOR_PAIR(color_pair_number));
- returnCode(OK);
- } else
- returnCode(ERR);
+ T((T_CALLED("wcolor_set(%p,%d)"), win, color_pair_number));
+ if (win
+ && !opts
+ && (color_pair_number >= 0)
+ && (color_pair_number < COLOR_PAIRS)) {
+ TR(TRACE_ATTRS, ("... current %ld", (long) GET_WINDOW_PAIR(win)));
+ SET_WINDOW_PAIR(win, color_pair_number);
+ if_EXT_COLORS(win->_color = color_pair_number);
+ returnCode(OK);
+ } else
+ returnCode(ERR);