X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Flib_wattron.c;h=2e17d965e94a95af3b9c11deb1f9b167a35162c8;hp=1d3b24a7afcd88cfc3b5e46eee2fd23aa58fdeba;hb=3853a8e97d7efa8cb6a3c93c696d2c52895d6a70;hpb=55ccd2b959766810cf7db8d1c4462f338ce0afc8 diff --git a/ncurses/base/lib_wattron.c b/ncurses/base/lib_wattron.c index 1d3b24a7..2e17d965 100644 --- a/ncurses/base/lib_wattron.c +++ b/ncurses/base/lib_wattron.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. * + * Copyright (c) 1998-2005,2006 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 * @@ -42,19 +42,22 @@ #include #include -MODULE_ID("$Id: lib_wattron.c,v 1.8 2005/01/29 21:23:08 tom Exp $") +MODULE_ID("$Id: lib_wattron.c,v 1.9 2006/05/27 19:30:46 tom Exp $") NCURSES_EXPORT(int) wattr_on(WINDOW *win, attr_t at, void *opts GCC_UNUSED) { T((T_CALLED("wattr_on(%p,%s)"), win, _traceattr(at))); if (win != 0) { - T(("... current %s (%d)", _traceattr(win->_attrs), GET_WINDOW_PAIR(win))); + T(("... current %s (%d)", + _traceattr(WINDOW_ATTRS(win)), + GET_WINDOW_PAIR(win))); + if_EXT_COLORS({ if (at & A_COLOR) win->_color = PAIR_NUMBER(at); }); - toggle_attr_on(win->_attrs, at); + toggle_attr_on(WINDOW_ATTRS(win), at); returnCode(OK); } else returnCode(ERR);