X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Flib_color.c;h=13bc209cb04a21e69a8fec266f7778792439fc27;hp=003929871f99fe8962f5313f9ec42ae2d4f67e3f;hb=761e4f0825b330e970558e82a4bd638383914429;hpb=1c551ea75ea57f9186fbe8d79674ac85baa4d358 diff --git a/ncurses/base/lib_color.c b/ncurses/base/lib_color.c index 00392987..13bc209c 100644 --- a/ncurses/base/lib_color.c +++ b/ncurses/base/lib_color.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2011,2012 Free Software Foundation, Inc. * + * Copyright (c) 1998-2012,2013 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -45,7 +45,7 @@ #define CUR SP_TERMTYPE #endif -MODULE_ID("$Id: lib_color.c,v 1.106 2012/12/15 19:14:34 tom Exp $") +MODULE_ID("$Id: lib_color.c,v 1.108 2013/03/09 22:33:38 tom Exp $") #ifdef USE_TERM_DRIVER #define CanChange InfoOf(SP_PARM).canchange @@ -264,8 +264,7 @@ reset_color_pair(NCURSES_SP_DCL0) (void) SP_PARM; if (orig_pair != 0) { - TPUTS_TRACE("orig_pair"); - putp(orig_pair); + (void) NCURSES_PUTP2("orig_pair", orig_pair); result = TRUE; } return result; @@ -292,8 +291,7 @@ NCURSES_SP_NAME(_nc_reset_colors) (NCURSES_SP_DCL0) result = CallDriver(SP_PARM, rescolors); #else if (orig_colors != 0) { - TPUTS_TRACE("orig_colors"); - putp(orig_colors); + NCURSES_PUTP2("orig_colors", orig_colors); result = TRUE; } #endif @@ -553,11 +551,11 @@ NCURSES_SP_NAME(init_pair) (NCURSES_SP_DCLx short pair, short f, short b) tp[f].red, tp[f].green, tp[f].blue, tp[b].red, tp[b].green, tp[b].blue)); - TPUTS_TRACE("initialize_pair"); - putp(TPARM_7(initialize_pair, - pair, - tp[f].red, tp[f].green, tp[f].blue, - tp[b].red, tp[b].green, tp[b].blue)); + NCURSES_PUTP2("initialize_pair", + TPARM_7(initialize_pair, + pair, + tp[f].red, tp[f].green, tp[f].blue, + tp[b].red, tp[b].green, tp[b].blue)); } #endif @@ -615,8 +613,8 @@ NCURSES_SP_NAME(init_color) (NCURSES_SP_DCLx #ifdef USE_TERM_DRIVER CallDriver_4(SP_PARM, initcolor, color, r, g, b); #else - TPUTS_TRACE("initialize_color"); - putp(TPARM_4(initialize_color, color, r, g, b)); + NCURSES_PUTP2("initialize_color", + TPARM_4(initialize_color, color, r, g, b)); #endif SP_PARM->_color_defs = max(color + 1, SP_PARM->_color_defs); @@ -792,7 +790,8 @@ NCURSES_SP_NAME(_nc_do_color) (NCURSES_SP_DCLx #else NCURSES_COLOR_T fg = COLOR_DEFAULT; NCURSES_COLOR_T bg = COLOR_DEFAULT; - NCURSES_COLOR_T old_fg, old_bg; + NCURSES_COLOR_T old_fg = -1; + NCURSES_COLOR_T old_bg = -1; if (!ValidPair(pair)) { return;