YKCS11: Change DBG to print to stderr.

This commit is contained in:
Alessio Di Mauro
2015-11-05 15:26:59 +01:00
parent 98f3462e5e
commit 602208bf20
7 changed files with 318 additions and 318 deletions
+5 -5
View File
@@ -4,15 +4,15 @@
#define YKCS11_DBG 1 // General debug, must be either 1 or 0
#define YKCS11_DINOUT 1 // Function in/out debug, must be either 1 or 0
#define D(x) do { \
printf ("debug: %s:%d (%s): ", __FILE__, __LINE__, __FUNCTION__); \
printf x; \
printf ("\n"); \
#define D(x...) do { \
fprintf (stderr, "debug: %s:%d (%s): ", __FILE__, __LINE__, __FUNCTION__); \
fprintf (stderr, x); \
fprintf (stderr, "\n"); \
} while (0)
#if YKCS11_DBG
#include <stdio.h>
#define DBG(x) D(x);
#define DBG(x...) D(x);
#else
#define DBG(x)
#endif