static void set_foreground_color(int fg, int (*outc)(int)) { if (set_a_foreground) { TPUTS_TRACE("set_a_foreground"); tputs(tparm(set_a_foreground, fg), 1, outc); } else { TPUTS_TRACE("set_foreground"); tputs(tparm(set_foreground, toggled_colors(fg)), 1, outc); } }
static void set_background_color(int bg, int (*outc)(int)) { if (set_a_background) { TPUTS_TRACE("set_a_background"); tputs(tparm(set_a_background, bg), 1, outc); } else { TPUTS_TRACE("set_background"); tputs(tparm(set_background, toggled_colors(bg)), 1, outc); } }
static void set_foreground_color(NCURSES_SP_DCLx int fg, NCURSES_SP_OUTC outc) { #ifdef USE_TERM_DRIVER CallDriver_3(SP_PARM, td_color, TRUE, fg, outc); #else if (set_a_foreground) { TPUTS_TRACE("set_a_foreground"); NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx TPARM_1(set_a_foreground, fg), 1, outc); } else { TPUTS_TRACE("set_foreground"); NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx TPARM_1(set_foreground, toggled_colors(fg)), 1, outc); } #endif }
static void set_background_color(NCURSES_SP_DCLx int bg, NCURSES_SP_OUTC outc) { #ifdef USE_TERM_DRIVER CallDriver_3(SP_PARM, color, FALSE, bg, outc); #else if (set_a_background) { TPUTS_TRACE("set_a_background"); NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx TPARM_1(set_a_background, bg), 1, outc); } else { TPUTS_TRACE("set_background"); NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx TPARM_1(set_background, toggled_colors(bg)), 1, outc); } #endif }