From 6ee254699bf787d78835419be2b3241fb037d444 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Tue, 12 Jan 2010 23:22:15 +0000 Subject: Update to ncurses 5.7, with local changes reapplied. This is around eight years worth of changes (previously we were around ncurses 5.2), too many to list - many bug fixes and also a few new functions. A major bump for libcurses, libpanel, libform and libmenu. ok deraadt --- lib/libcurses/base/lib_wattron.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'lib/libcurses/base/lib_wattron.c') diff --git a/lib/libcurses/base/lib_wattron.c b/lib/libcurses/base/lib_wattron.c index b788582bc19..cadbae69980 100644 --- a/lib/libcurses/base/lib_wattron.c +++ b/lib/libcurses/base/lib_wattron.c @@ -1,7 +1,7 @@ -/* $OpenBSD: lib_wattron.c,v 1.2 2001/01/22 18:01:47 millert Exp $ */ +/* $OpenBSD: lib_wattron.c,v 1.3 2010/01/12 23:22:06 nicm Exp $ */ /**************************************************************************** - * Copyright (c) 1998,2000 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 * @@ -31,6 +31,7 @@ /**************************************************************************** * Author: Zeyd M. Ben-Halim 1992,1995 * * and: Eric S. Raymond * + * and: Thomas E. Dickey 1996-on * ****************************************************************************/ /* @@ -43,16 +44,22 @@ #include #include -MODULE_ID("$From: lib_wattron.c,v 1.6 2000/12/10 02:43:28 tom Exp $") +MODULE_ID("$Id: lib_wattron.c,v 1.3 2010/01/12 23:22:06 nicm Exp $") NCURSES_EXPORT(int) -wattr_on -(WINDOW *win, NCURSES_CONST attr_t at, void *opts GCC_UNUSED) +wattr_on(WINDOW *win, attr_t at, void *opts GCC_UNUSED) { T((T_CALLED("wattr_on(%p,%s)"), win, _traceattr(at))); - if (win) { - T(("... current %s", _traceattr(win->_attrs))); - toggle_attr_on(win->_attrs, at); + if (win != 0) { + 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(WINDOW_ATTRS(win), at); returnCode(OK); } else returnCode(ERR); -- cgit v1.2.3