changeset 488:66fda00f15d2

Set debug macro MSG var in datauri and https dpis (controlled by SILENT define)
author Jorge Arellano Cid <jcid@dillo.org>
date Sat, 10 Jan 2009 21:37:17 -0300
parents 2e35e2d95115
children 8f7293125059
files dpi/datauri.c dpi/https.c
diffstat 2 files changed, 12 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/dpi/datauri.c	Sat Jan 10 11:30:12 2009 -0300
+++ b/dpi/datauri.c	Sat Jan 10 21:37:17 2009 -0300
@@ -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
--- a/dpi/https.c	Sat Jan 10 11:30:12 2009 -0300
+++ b/dpi/https.c	Sat Jan 10 21:37:17 2009 -0300
@@ -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