]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/base/lib_wattron.c
ncurses 6.2 - patch 20200912
[ncurses.git] / ncurses / base / lib_wattron.c
index 1d3b24a7afcd88cfc3b5e46eee2fd23aa58fdeba..c589f10473cba00742465218a4a452fa8f2657da 100644 (file)
@@ -1,5 +1,6 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc.              *
+ * Copyright 2020 Thomas E. Dickey                                          *
+ * Copyright 1998-2009,2010 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            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
 #include <curses.priv.h>
 #include <ctype.h>
 
 #include <curses.priv.h>
 #include <ctype.h>
 
-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.12 2020/02/02 23:34:34 tom Exp $")
 
 NCURSES_EXPORT(int)
 wattr_on(WINDOW *win, attr_t at, void *opts GCC_UNUSED)
 {
 
 NCURSES_EXPORT(int)
 wattr_on(WINDOW *win, attr_t at, void *opts GCC_UNUSED)
 {
-    T((T_CALLED("wattr_on(%p,%s)"), win, _traceattr(at)));
+    T((T_CALLED("wattr_on(%p,%s)"), (void *) win, _traceattr(at)));
     if (win != 0) {
     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)
        if_EXT_COLORS({
            if (at & A_COLOR)
-               win->_color = PAIR_NUMBER(at);
+               win->_color = PairNumber(at);
        });
        });
-       toggle_attr_on(win->_attrs, at);
+       toggle_attr_on(WINDOW_ATTRS(win), at);
        returnCode(OK);
     } else
        returnCode(ERR);
        returnCode(OK);
     } else
        returnCode(ERR);