From c3bcb0052ef5774f91c06d79ae40c78fa5daa955 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Sun, 29 Oct 2006 22:07:07 +0000 Subject: [PATCH] * Add back cucul_set_color() and cucul_set_truecolor() but mark them as deprecated using GCC attributes. --- cucul/colour.c | 4 ---- cucul/cucul.h | 49 ++++++++++++++++++++++++++++++------------------- 2 files changed, 30 insertions(+), 23 deletions(-) diff --git a/cucul/colour.c b/cucul/colour.c index db52ac5..d4179e2 100644 --- a/cucul/colour.c +++ b/cucul/colour.c @@ -26,10 +26,6 @@ #include "cucul.h" #include "cucul_internals.h" -/* Legacy stuff from old versions */ -int cucul_set_color(cucul_canvas_t *, unsigned char, unsigned char); -int cucul_set_truecolor(cucul_canvas_t *, unsigned int, unsigned int); - /** \brief Set the default character attribute. * * Set the default character attribute for drawing. Attributes define diff --git a/cucul/cucul.h b/cucul/cucul.h index e18b535..78e1058 100644 --- a/cucul/cucul.h +++ b/cucul/cucul.h @@ -237,25 +237,36 @@ cucul_canvas_t * cucul_import_canvas(cucul_buffer_t *, char const *); char const * const * cucul_get_import_list(void); /* @} */ -/* Legacy macros */ -#define CUCUL_COLOR_BLACK CUCUL_BLACK -#define CUCUL_COLOR_BLUE CUCUL_BLUE -#define CUCUL_COLOR_GREEN CUCUL_GREEN -#define CUCUL_COLOR_CYAN CUCUL_CYAN -#define CUCUL_COLOR_RED CUCUL_RED -#define CUCUL_COLOR_MAGENTA CUCUL_MAGENTA -#define CUCUL_COLOR_BROWN CUCUL_BROWN -#define CUCUL_COLOR_LIGHTGRAY CUCUL_LIGHTGRAY -#define CUCUL_COLOR_DARKGRAY CUCUL_DARKGRAY -#define CUCUL_COLOR_LIGHTBLUE CUCUL_LIGHTBLUE -#define CUCUL_COLOR_LIGHTGREEN CUCUL_LIGHTGREEN -#define CUCUL_COLOR_LIGHTCYAN CUCUL_LIGHTCYAN -#define CUCUL_COLOR_LIGHTRED CUCUL_LIGHTRED -#define CUCUL_COLOR_LIGHTMAGENTA CUCUL_LIGHTMAGENTA -#define CUCUL_COLOR_YELLOW CUCUL_YELLOW -#define CUCUL_COLOR_WHITE CUCUL_YELLOW -#define CUCUL_COLOR_DEFAULT CUCUL_DEFAULT -#define CUCUL_COLOR_TRANSPARENT CUCUL_TRANSPARENT +#if !defined(_DOXYGEN_SKIP_ME) +/* Legacy stuff from beta versions */ +# ifdef __GNUC__ +# define CUCUL_DEPRECATED __attribute__ ((deprecated)) +# else +# define CUCUL_DEPRECATED +# endif +int cucul_set_color(cucul_canvas_t *, unsigned char, + unsigned char) CUCUL_DEPRECATED; +int cucul_set_truecolor(cucul_canvas_t *, unsigned int, + unsigned int) CUCUL_DEPRECATED; +# define CUCUL_COLOR_BLACK CUCUL_BLACK +# define CUCUL_COLOR_BLUE CUCUL_BLUE +# define CUCUL_COLOR_GREEN CUCUL_GREEN +# define CUCUL_COLOR_CYAN CUCUL_CYAN +# define CUCUL_COLOR_RED CUCUL_RED +# define CUCUL_COLOR_MAGENTA CUCUL_MAGENTA +# define CUCUL_COLOR_BROWN CUCUL_BROWN +# define CUCUL_COLOR_LIGHTGRAY CUCUL_LIGHTGRAY +# define CUCUL_COLOR_DARKGRAY CUCUL_DARKGRAY +# define CUCUL_COLOR_LIGHTBLUE CUCUL_LIGHTBLUE +# define CUCUL_COLOR_LIGHTGREEN CUCUL_LIGHTGREEN +# define CUCUL_COLOR_LIGHTCYAN CUCUL_LIGHTCYAN +# define CUCUL_COLOR_LIGHTRED CUCUL_LIGHTRED +# define CUCUL_COLOR_LIGHTMAGENTA CUCUL_LIGHTMAGENTA +# define CUCUL_COLOR_YELLOW CUCUL_YELLOW +# define CUCUL_COLOR_WHITE CUCUL_YELLOW +# define CUCUL_COLOR_DEFAULT CUCUL_DEFAULT +# define CUCUL_COLOR_TRANSPARENT CUCUL_TRANSPARENT +#endif #ifdef __cplusplus }