X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Flib_colorset.c;h=cd3f7f6638db68d246b77f5fa4e94232a9f92a4f;hp=f480bc16703b9b142ad053331ccc5655673ba598;hb=a8987e73ec254703634802b4f7ee30d3a485524d;hpb=46722468f47c2b77b3987729b4bcf2321cccfd01 diff --git a/ncurses/base/lib_colorset.c b/ncurses/base/lib_colorset.c index f480bc16..cd3f7f66 100644 --- a/ncurses/base/lib_colorset.c +++ b/ncurses/base/lib_colorset.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * Copyright (c) 1998-2002,2003 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 * @@ -28,7 +28,6 @@ /**************************************************************************** * Author: Juergen Pfeifer, 1998 * - * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ /* @@ -41,11 +40,10 @@ #include #include -MODULE_ID("$Id: lib_colorset.c,v 1.8 2002/07/13 11:35:08 juergen Exp $") +MODULE_ID("$Id: lib_colorset.c,v 1.10 2003/12/07 00:15:27 tom Exp $") NCURSES_EXPORT(int) -wcolor_set -(WINDOW *win, short color_pair_number, void *opts) +wcolor_set(WINDOW *win, short color_pair_number, void *opts) { T((T_CALLED("wcolor_set(%p,%d)"), win, color_pair_number)); if (win @@ -53,7 +51,8 @@ wcolor_set && (color_pair_number >= 0) && (color_pair_number < COLOR_PAIRS)) { TR(TRACE_ATTRS, ("... current %ld", (long) PAIR_NUMBER(win->_attrs))); - toggle_attr_on(win->_attrs, COLOR_PAIR(color_pair_number)); + win->_attrs &= ALL_BUT_COLOR; + win->_attrs |= COLOR_PAIR(color_pair_number); returnCode(OK); } else returnCode(ERR);