aboutsummaryrefslogtreecommitdiff
path: root/ncurses/base/lib_colorset.c
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2020-02-07 08:36:41 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2020-02-07 08:36:41 +0000
commitf0179cb6083cc92e5947ae56e6a0a5c5328aead0 (patch)
treebcee0ba9c2149b71f0bfc036df1e61e3105bf980 /ncurses/base/lib_colorset.c
parentcea297eb34d2361e79529034397465068ae34ecd (diff)
downloadsrc-f0179cb6083cc92e5947ae56e6a0a5c5328aead0.tar.gz
src-f0179cb6083cc92e5947ae56e6a0a5c5328aead0.zip
Vendor import ncurses 6.1-20200118vendor/ncurses/6.1-20200118
Notes
Notes: svn path=/vendor/ncurses/dist/; revision=357645 svn path=/vendor/ncurses/6.1-20200118/; revision=357646; tag=vendor/ncurses/6.1-20200118
Diffstat (limited to 'ncurses/base/lib_colorset.c')
-rw-r--r--ncurses/base/lib_colorset.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/ncurses/base/lib_colorset.c b/ncurses/base/lib_colorset.c
index e9354860ad0d..f3aef7e39110 100644
--- a/ncurses/base/lib_colorset.c
+++ b/ncurses/base/lib_colorset.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2009,2014 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2017 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 *
@@ -41,22 +41,23 @@
#include <curses.priv.h>
#include <ctype.h>
-MODULE_ID("$Id: lib_colorset.c,v 1.14 2014/02/01 22:10:42 tom Exp $")
+MODULE_ID("$Id: lib_colorset.c,v 1.15 2017/03/16 23:45:30 tom Exp $")
NCURSES_EXPORT(int)
-wcolor_set(WINDOW *win, NCURSES_PAIRS_T color_pair_number, void *opts)
+wcolor_set(WINDOW *win, NCURSES_PAIRS_T pair_arg, void *opts)
{
int code = ERR;
+ int color_pair = pair_arg;
- T((T_CALLED("wcolor_set(%p,%d)"), (void *) win, (int) color_pair_number));
+ T((T_CALLED("wcolor_set(%p,%d)"), (void *) win, color_pair));
+ set_extended_pair(opts, color_pair);
if (win
- && !opts
&& (SP != 0)
- && (color_pair_number >= 0)
- && (color_pair_number < SP->_pair_limit)) {
+ && (color_pair >= 0)
+ && (color_pair < SP->_pair_limit)) {
TR(TRACE_ATTRS, ("... current %ld", (long) GET_WINDOW_PAIR(win)));
- SET_WINDOW_PAIR(win, color_pair_number);
- if_EXT_COLORS(win->_color = color_pair_number);
+ SET_WINDOW_PAIR(win, color_pair);
+ if_EXT_COLORS(win->_color = color_pair);
code = OK;
}
returnCode(code);