projects
/
ncurses.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ncurses 5.9 - patch 20111022
[ncurses.git]
/
ncurses
/
base
/
lib_color.c
diff --git
a/ncurses/base/lib_color.c
b/ncurses/base/lib_color.c
index f0d2006b71ab9ce2a79849fc029a92a10ad4ac46..5495c6003dc54cf54468828aa18143f81b714843 100644
(file)
--- a/
ncurses/base/lib_color.c
+++ b/
ncurses/base/lib_color.c
@@
-45,7
+45,7
@@
#define CUR SP_TERMTYPE
#endif
#define CUR SP_TERMTYPE
#endif
-MODULE_ID("$Id: lib_color.c,v 1.10
3 2011/07/23 22:00:34
tom Exp $")
+MODULE_ID("$Id: lib_color.c,v 1.10
4 2011/10/22 15:53:42
tom Exp $")
#ifdef USE_TERM_DRIVER
#define CanChange InfoOf(SP_PARM).canchange
#ifdef USE_TERM_DRIVER
#define CanChange InfoOf(SP_PARM).canchange
@@
-390,10
+390,10
@@
start_color(void)
/* This function was originally written by Daniel Weaver <danw@znyx.com> */
static void
/* This function was originally written by Daniel Weaver <danw@znyx.com> */
static void
-rgb2hls(
short r, short g, shor
t b, short *h, short *l, short *s)
+rgb2hls(
int r, int g, in
t b, short *h, short *l, short *s)
/* convert RGB to HLS system */
{
/* convert RGB to HLS system */
{
-
shor
t min, max, t;
+
in
t min, max, t;
if ((min = g < r ? g : r) > b)
min = b;
if ((min = g < r ? g : r) > b)
min = b;
@@
-423,7
+423,7
@@
rgb2hls(short r, short g, short b, short *h, short *l, short *s)
else
t = (short) (360 + ((r - g) * 60) / (max - min));
else
t = (short) (360 + ((r - g) * 60) / (max - min));
- *h =
t % 360
;
+ *h =
(short) (t % 360)
;
}
/*
}
/*
@@
-782,9
+782,9
@@
pair_content(short pair, short *f, short *b)
NCURSES_EXPORT(void)
NCURSES_SP_NAME(_nc_do_color) (NCURSES_SP_DCLx
NCURSES_EXPORT(void)
NCURSES_SP_NAME(_nc_do_color) (NCURSES_SP_DCLx
-
shor
t old_pair,
-
shor
t pair,
-
bool
reverse,
+
in
t old_pair,
+
in
t pair,
+
int
reverse,
NCURSES_SP_OUTC outc)
{
#ifdef USE_TERM_DRIVER
NCURSES_SP_OUTC outc)
{
#ifdef USE_TERM_DRIVER
@@
-864,7
+864,7
@@
NCURSES_SP_NAME(_nc_do_color) (NCURSES_SP_DCLx
#if NCURSES_SP_FUNCS
NCURSES_EXPORT(void)
#if NCURSES_SP_FUNCS
NCURSES_EXPORT(void)
-_nc_do_color(
short old_pair, short pair, bool
reverse, NCURSES_OUTC outc)
+_nc_do_color(
int old_pair, int pair, int
reverse, NCURSES_OUTC outc)
{
SetSafeOutcWrapper(outc);
NCURSES_SP_NAME(_nc_do_color) (CURRENT_SCREEN,
{
SetSafeOutcWrapper(outc);
NCURSES_SP_NAME(_nc_do_color) (CURRENT_SCREEN,