mirror of
https://github.com/VARCem/PDCurses.git
synced 2026-09-25 00:05:16 +00:00
COLOR_PAIR() should & with A_COLOR, not A_ATTRIBUTES.
This commit is contained in:
5
curses.h
5
curses.h
@@ -15,7 +15,7 @@
|
||||
* See the file maintain.er for details of the current maintainer.
|
||||
**************************************************************************/
|
||||
|
||||
/* $Id: curses.h,v 1.129 2006/02/21 07:05:43 wmcbrine Exp $ */
|
||||
/* $Id: curses.h,v 1.130 2006/02/21 17:20:17 wmcbrine Exp $ */
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
PDCurses
|
||||
@@ -1557,8 +1557,7 @@ int PDC_set_line_color(short);
|
||||
|
||||
#if !defined(NOMACROS) && !defined(PDCDEBUG)
|
||||
|
||||
#define COLOR_PAIR(n) (((chtype)(n) << PDC_COLOR_SHIFT) &\
|
||||
A_ATTRIBUTES)
|
||||
#define COLOR_PAIR(n) (((chtype)(n) << PDC_COLOR_SHIFT) & A_COLOR)
|
||||
#define PAIR_NUMBER(n) (((n) & A_COLOR) >> PDC_COLOR_SHIFT)
|
||||
|
||||
# define addch(c) waddch(stdscr, c)
|
||||
|
||||
@@ -35,7 +35,7 @@ static void PDC_init_pair(short, short, short);
|
||||
|
||||
#ifdef PDCDEBUG
|
||||
const char *rcsid_color =
|
||||
"$Id: color.c,v 1.39 2006/02/21 07:05:43 wmcbrine Exp $";
|
||||
"$Id: color.c,v 1.40 2006/02/21 17:20:17 wmcbrine Exp $";
|
||||
#endif
|
||||
|
||||
/*man-start*********************************************************************
|
||||
@@ -133,7 +133,7 @@ unsigned char colorset[PDC_COLOR_PAIRS];
|
||||
|
||||
chtype COLOR_PAIR(int n)
|
||||
{
|
||||
return ((chtype)n << PDC_COLOR_SHIFT) & A_ATTRIBUTES;
|
||||
return ((chtype)n << PDC_COLOR_SHIFT) & A_COLOR;
|
||||
}
|
||||
|
||||
int PAIR_NUMBER(chtype value)
|
||||
|
||||
Reference in New Issue
Block a user