From 865a8d364843cda7fa23f3db47d3d4dddc80ed80 Mon Sep 17 00:00:00 2001
From: johns <>
Date: Sun, 28 May 2000 20:02:11 +0000
Subject: [PATCH] New debug macros DebugLevelXFn, which also prints the
 function name.

---
 src/include/freecraft.h | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/src/include/freecraft.h b/src/include/freecraft.h
index 63eeb5f29..321a5dc7d 100644
--- a/src/include/freecraft.h
+++ b/src/include/freecraft.h
@@ -101,6 +101,26 @@
 */
 #define DebugLevel3(fmt...)	/* TURNED OFF: printf(fmt##) */
 
+/**
+**	Print debug information of level 0 with function name.
+*/
+#define DebugLevel0Fn(fmt...)	printf(__FUNCTION__": "fmt##)
+
+/**
+**	Print debug information of level 1 with function name.
+*/
+#define DebugLevel1Fn(fmt...)	printf(__FUNCTION__": "fmt##)
+
+/**
+**	Print debug information of level 2 with function name.
+*/
+#define DebugLevel2Fn(fmt...)	printf(__FUNCTION__": "fmt##)
+
+/**
+**	Print debug information of level 3 with function name.
+*/
+#define DebugLevel3Fn(fmt...)	/* TURNED OFF: printf(__FUNCTION__": "fmt##) */
+
 #else	// }{ DEBUG
 
 #define IfDebug(code)
@@ -109,6 +129,10 @@
 #define DebugLevel1(fmt...)
 #define DebugLevel2(fmt...)
 #define DebugLevel3(fmt...)
+#define DebugLevel0Fn(fmt...)
+#define DebugLevel1Fn(fmt...)
+#define DebugLevel2Fn(fmt...)
+#define DebugLevel3Fn(fmt...)
 
 #endif	// } !DEBUG