projects
/
ncurses.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ncurses 6.1 - patch 20180224
[ncurses.git]
/
ncurses
/
new_pair.h
diff --git
a/ncurses/new_pair.h
b/ncurses/new_pair.h
index 4df40c6fcd14aa99eabacae7c7b91627f4d4c5c3..4dbeb9dc0fb949141eaf21e5ad48f975874a60b9 100644
(file)
--- a/
ncurses/new_pair.h
+++ b/
ncurses/new_pair.h
@@
-33,7
+33,7
@@
/*
* Common type definitions and macros for new_pair.c, lib_color.c
*
/*
* Common type definitions and macros for new_pair.c, lib_color.c
*
- * $Id: new_pair.h,v 1.
5 2017/04/02 14:46:34
tom Exp $
+ * $Id: new_pair.h,v 1.
8 2017/08/11 18:15:11
tom Exp $
*/
#ifndef NEW_PAIR_H
*/
#ifndef NEW_PAIR_H
@@
-42,7
+42,12
@@
#define USE_NEW_PAIR NCURSES_EXT_COLORS
#define USE_NEW_PAIR NCURSES_EXT_COLORS
-#define LIMIT_TYPED(n,t) (t)(((t)(n) < 0) ? MAX_OF_TYPE(t) : (n))
+#define LIMIT_TYPED(n,t) \
+ (t)(((n) > MAX_OF_TYPE(t)) \
+ ? MAX_OF_TYPE(t) \
+ : ((n) < -MAX_OF_TYPE(t)) \
+ ? -MAX_OF_TYPE(t) \
+ : (n))
#define limit_COLOR(n) LIMIT_TYPED(n,NCURSES_COLOR_T)
#define limit_PAIRS(n) LIMIT_TYPED(n,NCURSES_PAIRS_T)
#define limit_COLOR(n) LIMIT_TYPED(n,NCURSES_COLOR_T)
#define limit_PAIRS(n) LIMIT_TYPED(n,NCURSES_PAIRS_T)
@@
-104,11
+109,14
@@
colorpair_t;
((sp != 0) && (pair >= 0) && (pair < sp->_pair_limit) && sp->_coloron)
#if USE_NEW_PAIR
((sp != 0) && (pair >= 0) && (pair < sp->_pair_limit) && sp->_coloron)
#if USE_NEW_PAIR
-extern NCURSES_EXPORT(void) _nc_set_color_pair(SCREEN*, int, int);
+extern NCURSES_EXPORT(void) _nc_copy_pairs(SCREEN*, colorpair_t*, colorpair_t*, int);
+extern NCURSES_EXPORT(void) _nc_free_ordered_pairs(SCREEN*);
extern NCURSES_EXPORT(void) _nc_reset_color_pair(SCREEN*, int, colorpair_t*);
extern NCURSES_EXPORT(void) _nc_reset_color_pair(SCREEN*, int, colorpair_t*);
+extern NCURSES_EXPORT(void) _nc_set_color_pair(SCREEN*, int, int);
#else
#else
-#define _nc_
set_color_pair(sp, pair, mode
) /* nothing */
+#define _nc_
free_ordered_pairs(sp
) /* nothing */
#define _nc_reset_color_pair(sp, pair, data) /* nothing */
#define _nc_reset_color_pair(sp, pair, data) /* nothing */
+#define _nc_set_color_pair(sp, pair, mode) /* nothing */
#endif
#else
#endif
#else