changeset 3331:9c53688bb559 trunk

some debugging for giacomo
author William Pitcock <nenolod@atheme-project.org>
date Sat, 11 Aug 2007 07:34:28 -0500
parents 8745ffb73f49
children 7ed2be7e885e
files src/audacious/tuple_formatter.c
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/tuple_formatter.c	Sat Aug 11 05:44:31 2007 -0500
+++ b/src/audacious/tuple_formatter.c	Sat Aug 11 07:34:28 2007 -0500
@@ -25,6 +25,14 @@
 #include "tuple.h"
 #include "tuple_formatter.h"
 
+#define _DEBUG
+
+#ifdef _DEBUG
+# define _TRACE(fmt, ...) g_print("[tuple-fmt] %s(%d) " fmt "\n", __FILE__, __LINE__, __VA_ARGS__);
+#else
+# define _TRACE(fmt, ...)
+#endif
+
 /*
  * the tuple formatter:
  *
@@ -72,6 +80,8 @@
     ctx = g_new0(TupleFormatterContext, 1);
     ctx->str = g_string_new("");
 
+    _TRACE("parsing <%s>", string);
+
     /* parsers are ugly */
     for (iter = string; *iter != '\0'; iter++)
     {
@@ -229,6 +239,8 @@
     g_string_free(ctx->str, TRUE);
     g_free(ctx);
 
+    _TRACE("parsed <%s> as <%s>", string, out);
+
     return out;
 }