X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Flib_color.c;h=9b4d2b8f8d85c80b6be7f0301e64a2b3223d4967;hp=9f7250ddaffff9b688948953b06837a97cfedd46;hb=5c085efbe35681c3847b3ced598635f083810865;hpb=4f84dbbd027e85fc88e2c6be466b3237141e027e diff --git a/ncurses/base/lib_color.c b/ncurses/base/lib_color.c index 9f7250dd..9b4d2b8f 100644 --- a/ncurses/base/lib_color.c +++ b/ncurses/base/lib_color.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2013,2014 Free Software Foundation, Inc. * + * Copyright (c) 1998-2015,2016 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.109 2014/02/01 22:22:30 tom Exp $") +MODULE_ID("$Id: lib_color.c,v 1.113 2016/05/07 23:50:54 tom Exp $") #ifdef USE_TERM_DRIVER #define CanChange InfoOf(SP_PARM).canchange @@ -188,7 +188,7 @@ 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); + CallDriver_3(SP_PARM, td_color, FALSE, bg, outc); #else if (set_a_background) { TPUTS_TRACE("set_a_background"); @@ -208,7 +208,7 @@ static void set_foreground_color(NCURSES_SP_DCLx int fg, NCURSES_SP_OUTC outc) { #ifdef USE_TERM_DRIVER - CallDriver_3(SP_PARM, color, TRUE, fg, outc); + CallDriver_3(SP_PARM, td_color, TRUE, fg, outc); #else if (set_a_foreground) { TPUTS_TRACE("set_a_foreground"); @@ -258,7 +258,7 @@ static bool reset_color_pair(NCURSES_SP_DCL0) { #ifdef USE_TERM_DRIVER - return CallDriver(SP_PARM, rescol); + return CallDriver(SP_PARM, td_rescol); #else bool result = FALSE; @@ -288,7 +288,7 @@ NCURSES_SP_NAME(_nc_reset_colors) (NCURSES_SP_DCL0) result = TRUE; #ifdef USE_TERM_DRIVER - result = CallDriver(SP_PARM, rescolors); + result = CallDriver(SP_PARM, td_rescolors); #else if (orig_colors != 0) { NCURSES_PUTP2("orig_colors", orig_colors); @@ -544,10 +544,10 @@ NCURSES_SP_NAME(init_pair) (NCURSES_SP_DCLx SP_PARM->_color_pairs[pair] = result; if (GET_SCREEN_PAIR(SP_PARM) == pair) - SET_SCREEN_PAIR(SP_PARM, (chtype) (~0)); /* force attribute update */ + SET_SCREEN_PAIR(SP_PARM, (int) (~0)); /* force attribute update */ #ifdef USE_TERM_DRIVER - CallDriver_3(SP_PARM, initpair, pair, f, b); + CallDriver_3(SP_PARM, td_initpair, pair, f, b); #else if (initialize_pair && InPalette(f) && InPalette(b)) { const color_t *tp = DefaultPalette; @@ -625,7 +625,7 @@ NCURSES_SP_NAME(init_color) (NCURSES_SP_DCLx } #ifdef USE_TERM_DRIVER - CallDriver_4(SP_PARM, initcolor, color, r, g, b); + CallDriver_4(SP_PARM, td_initcolor, color, r, g, b); #else NCURSES_PUTP2("initialize_color", TPARM_4(initialize_color, color, r, g, b)); @@ -811,7 +811,7 @@ NCURSES_SP_NAME(_nc_do_color) (NCURSES_SP_DCLx NCURSES_SP_OUTC outc) { #ifdef USE_TERM_DRIVER - CallDriver_4(SP_PARM, docolor, old_pair, pair, reverse, outc); + CallDriver_4(SP_PARM, td_docolor, old_pair, pair, reverse, outc); #else NCURSES_COLOR_T fg = COLOR_DEFAULT; NCURSES_COLOR_T bg = COLOR_DEFAULT; @@ -858,7 +858,7 @@ NCURSES_SP_NAME(_nc_do_color) (NCURSES_SP_DCLx } } else { reset_color_pair(NCURSES_SP_ARG); - if (old_pair < 0) + if (old_pair < 0 && pair <= 0) return; }