summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2017-11-27 11:09:46 -0800
committerVito Caputo <vcaputo@pengaru.com>2017-11-27 11:09:46 -0800
commitdbe7629467e1d69c49f60dc2b00943ea7c5e5019 (patch)
tree731ca29e32ea6e2f55513380d6a2ddf225ae6ba6
parent55e7b6fa5bbb84dc8f2689ff674b27706ffe5ef3 (diff)
util: introduce VWM_TRACE_WIN() convenience macro
-rw-r--r--src/util.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
index 72a9a5d..b166efe 100644
--- a/src/util.h
+++ b/src/util.h
@@ -2,6 +2,7 @@
#define _UTIL_H
#include <errno.h>
+#include <inttypes.h>
#include <stdio.h>
#include <string.h>
@@ -15,6 +16,9 @@
#define VWM_TRACE(_fmt, _args...) do { } while(0)
#endif
+#define VWM_TRACE_WIN(_win, _fmt, _args...) \
+ VWM_TRACE("win=%#"PRIx64": "_fmt, (uint64_t)_win, ##_args)
+
#define MIN(_a, _b) ((_a) < (_b) ? (_a) : (_b))
#define MAX(_a, _b) ((_a) > (_b) ? (_a) : (_b))
#define NELEMS(_a) (sizeof(_a) / sizeof(_a[0]))
© All Rights Reserved