summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJorge Arellano Cid <jcid@dillo.org>2009-01-10 21:37:17 -0300
committerJorge Arellano Cid <jcid@dillo.org>2009-01-10 21:37:17 -0300
commit0d8837f13b0a5557dbe449ba4b9898341ef52a05 (patch)
tree52e50e02b6c97cc36c9035eb82279bea61219901
parentdddbadb11c6a78a61daab813f72fcb848068b620 (diff)
Set debug macro MSG var in datauri and https dpis (controlled by SILENT define)
-rw-r--r--dpi/datauri.c7
-rw-r--r--dpi/https.c7
2 files changed, 12 insertions, 2 deletions
diff --git a/dpi/datauri.c b/dpi/datauri.c
index 5f3c79a7..0165eba4 100644
--- a/dpi/datauri.c
+++ b/dpi/datauri.c
@@ -22,8 +22,13 @@
/*
* Debugging macros
*/
+#define SILENT 1
#define _MSG(...)
-#define MSG(...) printf("[datauri dpi]: " __VA_ARGS__)
+#if SILENT
+ #define MSG(...)
+#else
+ #define MSG(...) fprintf(stderr, "[datauri dpi]: " __VA_ARGS__)
+#endif
/*
* Global variables
diff --git a/dpi/https.c b/dpi/https.c
index fff0be3b..294dc332 100644
--- a/dpi/https.c
+++ b/dpi/https.c
@@ -64,8 +64,13 @@
/*
* Debugging macros
*/
+#define SILENT 1
#define _MSG(...)
-#define MSG(...) printf("[https dpi]: " __VA_ARGS__)
+#if SILENT
+ #define MSG(...)
+#else
+ #define MSG(...) fprintf(stderr, "[https dpi]: " __VA_ARGS__)
+#endif
#ifdef ENABLE_SSL