From b2d3a39fb4004ab58b5d62017b8d4b3e9c0f8b67 Mon Sep 17 00:00:00 2001 From: mjentsch Date: Thu, 9 Oct 2014 20:13:08 +0200 Subject: [PATCH] Do not use colors when compiling for production mode Pidgin and Adium debug logs do not display terminal color codes correctly, avoid that. --- msglog.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/msglog.c b/msglog.c index 029a426..4ded692 100644 --- a/msglog.c +++ b/msglog.c @@ -3,12 +3,21 @@ #include "debug.h" #include "purple-plugin/telegram-purple.h" +#ifdef DEBUG #define COLOR_GREY "\033[37;1m" #define COLOR_YELLOW "\033[33;1m" #define COLOR_RED "\033[0;31m" #define COLOR_REDB "\033[1;31m" #define COLOR_GREEN "\033[32;1m" #define COLOR_NORMAL "\033[0m" +#else +#define COLOR_GREY "" +#define COLOR_YELLOW "" +#define COLOR_RED "" +#define COLOR_REDB "" +#define COLOR_GREEN "" +#define COLOR_NORMAL "" +#endif void hexdump (int *in_ptr, int *in_end) { int *ptr = in_ptr;