mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-16 07:50:22 +01:00
Add a debug_trace() macro for easier debugging
Disabled by default, define DEBUG_TRACE when needed Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
56264a6ff6
commit
38d59cefff
1 changed files with 9 additions and 0 deletions
|
|
@ -93,6 +93,15 @@ int list_empty(const struct list *list);
|
|||
#define streq(s1, s2) (strcmp((s1), (s2)) == 0)
|
||||
#define strneq(s1, s2, n) (strncmp((s1), (s2), (n)) == 0)
|
||||
|
||||
#ifdef DEBUG_TRACE
|
||||
#define debug_trace(...) \
|
||||
do { \
|
||||
printf("%s:%d %s() - ", __FILE__, __LINE__, __func__); \
|
||||
printf(__VA_ARGS__); \
|
||||
} while (0)
|
||||
#else
|
||||
#define debug_trace(...) { }
|
||||
#endif
|
||||
#define LIBINPUT_EXPORT __attribute__ ((visibility("default")))
|
||||
|
||||
static inline void *
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue