From ea27bb406e3d8fe9466ba274af38e6f540ff5bfc Mon Sep 17 00:00:00 2001 From: Alexander Wirt Date: Sun, 3 Jun 2012 08:49:55 +0200 Subject: Imported Upstream version 1.2.1 --- include/debug.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 include/debug.h (limited to 'include/debug.h') diff --git a/include/debug.h b/include/debug.h new file mode 100644 index 0000000..f205983 --- /dev/null +++ b/include/debug.h @@ -0,0 +1,21 @@ +#ifndef _DEBUG_H +#define _DEBUG_H + +#include + +#undef DEBUG_CT + +#ifdef DEBUG_CT +#define debug_ct(ct, msg) \ +({ \ + char buf[1024]; \ + nfct_snprintf(buf, 1024, ct, NFCT_T_ALL, 0, 0); \ + printf("[%s]: %s\n", msg, buf); \ +}) +#define debug printf +#else +#define debug_ct(ct, msg) do {} while (0) +#define debug(...) do {} while (0) +#endif + +#endif -- cgit v1.2.3