X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fnew_pair.h;h=811abc11442b3395ee9928f1eb902fe6c2801ee5;hp=4dbeb9dc0fb949141eaf21e5ad48f975874a60b9;hb=c976a90788f3e50afc773670ff74c5270ecb48df;hpb=a20e6eb464be80b9cd8cae7ce925d27fe9c209ed diff --git a/ncurses/new_pair.h b/ncurses/new_pair.h index 4dbeb9dc..811abc11 100644 --- a/ncurses/new_pair.h +++ b/ncurses/new_pair.h @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 2017 Free Software Foundation, Inc. * + * Copyright 2018,2020 Thomas E. Dickey * + * Copyright 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 * @@ -33,15 +34,13 @@ /* * Common type definitions and macros for new_pair.c, lib_color.c * - * $Id: new_pair.h,v 1.8 2017/08/11 18:15:11 tom Exp $ + * $Id: new_pair.h,v 1.10 2020/02/02 23:34:34 tom Exp $ */ #ifndef NEW_PAIR_H #define NEW_PAIR_H 1 /* *INDENT-OFF* */ -#define USE_NEW_PAIR NCURSES_EXT_COLORS - #define LIMIT_TYPED(n,t) \ (t)(((n) > MAX_OF_TYPE(t)) \ ? MAX_OF_TYPE(t) \ @@ -54,9 +53,8 @@ #define MAX_XCURSES_PAIR MAX_OF_TYPE(NCURSES_PAIRS_T) -#if USE_NEW_PAIR +#if NCURSES_EXT_COLORS #define OPTIONAL_PAIR GCC_UNUSED -#define USE_NEW_PAIR NCURSES_EXT_COLORS #define get_extended_pair(opts, color_pair) \ if ((opts) != NULL) { \ *(int*)(opts) = color_pair; \ @@ -67,7 +65,6 @@ } #else #define OPTIONAL_PAIR /* nothing */ -#define USE_NEW_PAIR NCURSES_EXT_COLORS #define get_extended_pair(opts, color_pair) /* nothing */ #define set_extended_pair(opts, color_pair) \ if ((opts) != NULL) { \ @@ -88,7 +85,7 @@ typedef struct _color_pairs { int fg; int bg; -#if USE_NEW_PAIR +#if NCURSES_EXT_COLORS int mode; /* tells if the entry is allocated or free */ int prev; /* index of previous item */ int next; /* index of next item */ @@ -108,7 +105,7 @@ colorpair_t; #define ValidPair(sp,pair) \ ((sp != 0) && (pair >= 0) && (pair < sp->_pair_limit) && sp->_coloron) -#if USE_NEW_PAIR +#if NCURSES_EXT_COLORS 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*);