diff options
author | 2000-10-08 22:46:53 +0000 | |
---|---|---|
committer | 2000-10-08 22:46:53 +0000 | |
commit | 91421ef511f3d137bc8cbea1d63f2c50663d7a1f (patch) | |
tree | d1326167c538bf562ffc9cfee9ecbc91a458846e /lib/libcurses/base/lib_colorset.c | |
parent | Update to ncurses-5.1-20001007 version: (diff) | |
download | wireguard-openbsd-91421ef511f3d137bc8cbea1d63f2c50663d7a1f.tar.xz wireguard-openbsd-91421ef511f3d137bc8cbea1d63f2c50663d7a1f.zip |
update to ncurses-5.1-20001007
Diffstat (limited to 'lib/libcurses/base/lib_colorset.c')
-rw-r--r-- | lib/libcurses/base/lib_colorset.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/lib/libcurses/base/lib_colorset.c b/lib/libcurses/base/lib_colorset.c index e3070f4ce30..0c03674baab 100644 --- a/lib/libcurses/base/lib_colorset.c +++ b/lib/libcurses/base/lib_colorset.c @@ -1,7 +1,7 @@ -/* $OpenBSD: lib_colorset.c,v 1.2 1999/05/17 03:03:58 millert Exp $ */ +/* $OpenBSD: lib_colorset.c,v 1.3 2000/10/08 22:46:58 millert Exp $ */ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998,2000 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,17 +42,19 @@ #include <curses.priv.h> #include <ctype.h> -MODULE_ID("$From: lib_colorset.c,v 1.5 1999/05/16 17:13:43 juergen Exp $") +MODULE_ID("$From: lib_colorset.c,v 1.6 2000/07/29 16:37:19 tom Exp $") -int wcolor_set(WINDOW *win, short color_pair_number, void *opts) +int +wcolor_set(WINDOW *win, short color_pair_number, void *opts) { - T((T_CALLED("wcolor_set(%p,%d)"), win, color_pair_number)); - if (win && !opts && (color_pair_number >= 0) && (color_pair_number < COLOR_PAIRS)) { - T(("... current %ld", (long) PAIR_NUMBER(win->_attrs))); - toggle_attr_on(win->_attrs,COLOR_PAIR(color_pair_number)); - returnCode(OK); - } else - returnCode(ERR); + T((T_CALLED("wcolor_set(%p,%d)"), win, color_pair_number)); + if (win + && !opts + && (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)); + returnCode(OK); + } else + returnCode(ERR); } - - |