aboutsummaryrefslogtreecommitdiff
path: root/ncurses/base/lib_colorset.c
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2014-02-28 19:12:44 +0000
committerXin LI <delphij@FreeBSD.org>2014-02-28 19:12:44 +0000
commit4b819fa20a8d007a10f2d3e8d6a5dedf7f18fc9a (patch)
treeb8f6e12b479a78216f3bffb8e1258d54087268de /ncurses/base/lib_colorset.c
parente07762606a5bf651a501cb095c98cba90e4a8fe2 (diff)
downloadsrc-4b819fa20a8d007a10f2d3e8d6a5dedf7f18fc9a.tar.gz
src-4b819fa20a8d007a10f2d3e8d6a5dedf7f18fc9a.zip
Undo two previous imports which was never done in preparation of doing a
new import.
Notes
Notes: svn path=/vendor/ncurses/dist/; revision=262616
Diffstat (limited to 'ncurses/base/lib_colorset.c')
-rw-r--r--ncurses/base/lib_colorset.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/ncurses/base/lib_colorset.c b/ncurses/base/lib_colorset.c
index 6210a0e8a8f9..a973c5350c8f 100644
--- a/ncurses/base/lib_colorset.c
+++ b/ncurses/base/lib_colorset.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2003,2005 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 *
@@ -28,7 +28,7 @@
/****************************************************************************
* Author: Juergen Pfeifer, 1998 *
- * and: Thomas E. Dickey, 2005-on *
+ * and: Thomas E. Dickey, 2005 *
****************************************************************************/
/*
@@ -41,23 +41,20 @@
#include <curses.priv.h>
#include <ctype.h>
-MODULE_ID("$Id: lib_colorset.c,v 1.13 2009/10/24 22:02:14 tom Exp $")
+MODULE_ID("$Id: lib_colorset.c,v 1.11 2005/01/29 21:40:51 tom Exp $")
NCURSES_EXPORT(int)
wcolor_set(WINDOW *win, short color_pair_number, void *opts)
{
- int code = ERR;
-
- T((T_CALLED("wcolor_set(%p,%d)"), (void *) win, color_pair_number));
+ T((T_CALLED("wcolor_set(%p,%d)"), win, color_pair_number));
if (win
&& !opts
- && (SP != 0)
&& (color_pair_number >= 0)
- && (color_pair_number < SP->_pair_limit)) {
+ && (color_pair_number < COLOR_PAIRS)) {
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);
- code = OK;
- }
- returnCode(code);
+ returnCode(OK);
+ } else
+ returnCode(ERR);
}