summaryrefslogtreecommitdiffstats
path: root/lib/xwax/debug.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/xwax/debug.h')
-rw-r--r--lib/xwax/debug.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/xwax/debug.h b/lib/xwax/debug.h
index 4b06ba4f73..cc2872b6a7 100644
--- a/lib/xwax/debug.h
+++ b/lib/xwax/debug.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Mark Hills <mark@pogo.org.uk>
+ * Copyright (C) 2013 Mark Hills <mark@xwax.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -23,7 +23,11 @@
#include <stdio.h>
#ifdef DEBUG
-#define debug(...) fprintf(stderr, __VA_ARGS__)
+#define debug(...) { \
+ fprintf(stderr, "%s:%d: ", __FILE__, __LINE__); \
+ fprintf(stderr, __VA_ARGS__); \
+ fputc('\n', stderr); \
+}
#define dassert(x) assert(x)
#else
#define debug(...)