From 4b24d0a51d3fac05c9a9b254699b4e9047460b26 Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Sat, 25 Apr 2020 11:59:04 +0200 Subject: [PATCH] remove some old compat code we already rely on c99 in other parts of the code --- src/fe-common/core/printtext.h | 75 +--------------------------------- 1 file changed, 1 insertion(+), 74 deletions(-) diff --git a/src/fe-common/core/printtext.h b/src/fe-common/core/printtext.h index 845bfc6c..c223a3ec 100644 --- a/src/fe-common/core/printtext.h +++ b/src/fe-common/core/printtext.h @@ -32,22 +32,7 @@ void printtext_deinit(void); /* printformat(...) = printformat_format(MODULE_NAME, ...) - Could this be any harder? :) With GNU C compiler and C99 compilers, - use #define. With others use either inline functions if they are - supported or static functions if they are not.. - */ -#if defined (__GNUC__) && !defined (__STRICT_ANSI__) -/* GCC */ -# define printformat(server, target, level, formatnum...) \ - printformat_module(MODULE_NAME, server, target, level, ##formatnum) -# define printformat_window(window, level, formatnum...) \ - printformat_module_window(MODULE_NAME, window, level, ##formatnum) -# define printformat_dest(dest, formatnum...) \ - printformat_module_dest(MODULE_NAME, dest, ##formatnum) -# define printformat_gui(formatnum...) \ - printformat_module_gui(MODULE_NAME, ##formatnum) -#elif __STDC_VERSION__ >= 199901L -/* C99 */ + Irssi requires a C99 pre-processor with __VA_ARGS__ support */ # define printformat(server, target, level, formatnum, ...) \ printformat_module(MODULE_NAME, server, target, level, formatnum, ##__VA_ARGS__) # define printformat_window(window, level, formatnum, ...) \ @@ -56,63 +41,5 @@ void printtext_deinit(void); printformat_module_dest(MODULE_NAME, dest, formatnum, ##__VA_ARGS__) # define printformat_gui(formatnum, ...) \ printformat_module_gui(MODULE_NAME, formatnum, ##__VA_ARGS__) -#else -/* inline/static */ -#ifdef G_CAN_INLINE -G_INLINE_FUNC -#else -static -#endif -void printformat(void *server, const char *target, int level, int formatnum, ...) -{ - va_list va; - - va_start(va, formatnum); - printformat_module_args(MODULE_NAME, server, target, level, formatnum, va); - va_end(va); -} - -#ifdef G_CAN_INLINE -G_INLINE_FUNC -#else -static -#endif -void printformat_window(WINDOW_REC *window, int level, int formatnum, ...) -{ - va_list va; - - va_start(va, formatnum); - printformat_module_window_args(MODULE_NAME, window, level, formatnum, va); - va_end(va); -} - -#ifdef G_CAN_INLINE -G_INLINE_FUNC -#else -static -#endif -void printformat_dest(TEXT_DEST_REC *dest, int formatnum, ...) -{ - va_list va; - - va_start(va, formatnum); - printformat_module_dest_args(MODULE_NAME, dest, formatnum, va); - va_end(va); -} - -#ifdef G_CAN_INLINE -G_INLINE_FUNC -#else -static -#endif -void printformat_gui(int formatnum, ...) -{ - va_list va; - - va_start(va, formatnum); - printformat_module_gui_args(MODULE_NAME, formatnum, va); - va_end(va); -} -#endif #endif