X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Flib_wattroff.c;h=eac07f08a4ee143555fe4b8bfb7b36fcd4cfe523;hp=9ac331ae5a2e6badfa197b74250dcd89a6511811;hb=1f7a36fe16b11bb4aab51be89bbc1b0f75936b78;hpb=55ccd2b959766810cf7db8d1c4462f338ce0afc8;ds=sidebyside diff --git a/ncurses/base/lib_wattroff.c b/ncurses/base/lib_wattroff.c index 9ac331ae..eac07f08 100644 --- a/ncurses/base/lib_wattroff.c +++ b/ncurses/base/lib_wattroff.c @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. * + * Copyright 2020 Thomas E. Dickey * + * Copyright 1998-2006,2009 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 +43,22 @@ #include #include -MODULE_ID("$Id: lib_wattroff.c,v 1.8 2005/01/29 21:20:03 tom Exp $") +MODULE_ID("$Id: lib_wattroff.c,v 1.11 2020/02/02 23:34:34 tom Exp $") NCURSES_EXPORT(int) wattr_off(WINDOW *win, attr_t at, void *opts GCC_UNUSED) { - T((T_CALLED("wattr_off(%p,%s)"), win, _traceattr(at))); + T((T_CALLED("wattr_off(%p,%s)"), (void *) win, _traceattr(at))); if (win) { - 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 = 0; }); - toggle_attr_off(win->_attrs, at); + toggle_attr_off(WINDOW_ATTRS(win), at); returnCode(OK); } else returnCode(ERR);