From: Peter Hutterer Date: Fri, 27 Mar 2020 11:26:05 +0000 (+1000) Subject: util: make the trace macro actually useful X-Git-Tag: 1.15.901~64 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c4cb4da33afb5a1bb16637ba1f07371b25f9e981;p=platform%2Fupstream%2Flibinput.git util: make the trace macro actually useful This has been there for years and I never used it. Much better to convert it to a generically useful one (i.e. one that prints red so it's easy to see) and make it unconditional. Signed-off-by: Peter Hutterer --- diff --git a/src/libinput-util.h b/src/libinput-util.h index 116e3e96..76da5aeb 100644 --- a/src/libinput-util.h +++ b/src/libinput-util.h @@ -57,15 +57,12 @@ #define DEFAULT_MOUSE_DPI 1000 #define DEFAULT_TRACKPOINT_SENSITIVITY 128 -#ifdef DEBUG_TRACE -#define debug_trace(...) \ +#define trace(...) \ do { \ - printf("%s:%d %s() - ", __FILE__, __LINE__, __func__); \ + printf("%s() - \033[0;31m", __func__); \ printf(__VA_ARGS__); \ + printf("\033[0m"); \ } while (0) -#else -#define debug_trace(...) { } -#endif #define LIBINPUT_EXPORT __attribute__ ((visibility("default")))