changeset 300:a05bb36f6873

DEBUG_NP
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 25 Dec 2004 20:42:04 +0000
parents 9ddce00a8653
children a2b4a19f564a
files src/xmms-sid.h
diffstat 1 files changed, 14 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/xmms-sid.h	Sat Dec 25 20:42:01 2004 +0000
+++ b/src/xmms-sid.h	Sat Dec 25 20:42:04 2004 +0000
@@ -44,10 +44,16 @@
  * Some constants and defines
  */
 /* Define for spurious debugging messages */
-#undef DEBUG
+#define DEBUG
+
+/* Define to ISO C99 macro for debugging instead of varargs function.
+ * This provides more useful information.
+ */
+#undef DEBUG_NP
 
 /* Define to enable non-portable thread and mutex debugging code.
- * (Works probably with Linux glibc only)
+ * You need to #define DEBUG also to make this useful.
+ * (Works probably with GNU/Linux pthreads implementation only)
  */
 #undef XS_MUTEX_DEBUG
 
@@ -189,22 +195,22 @@
 gint	xs_get_time(void);
 void	xs_get_song_info(gchar *, gchar **, gint *);
 void	xs_about(void);
-void	XSERR(const char *, ...);
 
 gint	xs_rateconv_filter(void *, void *, AFormat, gint, gint);
 t_xs_tuneinfo *xs_tuneinfo_new(gchar *, gint, gint, gchar *, gchar *, gchar *, gint, gint, gint, gint);
 void	xs_tuneinfo_free(t_xs_tuneinfo *);
 
+void	XSERR(const char *, ...);
 
-/* Debugging and error handling macros
- */
-#ifdef 
+#ifndef DEBUG_NP
+void	XSDEBUG(const char *, ...);
+#else
 #ifdef DEBUG
 #define XSDEBUG(...) { fprintf(stderr, "XS[%s:%s:%d]: ", __FILE__, __FUNCTION__, (int) __LINE__); fprintf(stderr, __VA_ARGS__); }
 #else
-#define XSDEBUG(...) /* foo */
+#define XSDEBUG(...) /* stub */
 #endif
-
+#endif
 
 #ifdef __cplusplus
 }