summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c
index a8a037d..49b4e2d 100644
--- a/src/util.c
+++ b/src/util.c
@@ -27,6 +27,7 @@ static const char ident[]="$Id$";
#include <stdio.h>
#include <string.h>
+#include <stdarg.h>
#include "util.h"
#include "exit.h"
@@ -108,4 +109,20 @@ const char *Dirname(const char *path)
}
+void Debug(const char *format, ...)
+{
+ static FILE *fp=NULL;
+ va_list ap;
+
+ if (!fp)
+ fp=fopen("debug.txt","w");
+
+ if (!fp)
+ return;
+
+ va_start(ap,format);
+ vfprintf(fp,format,ap);
+ va_end(ap);
+}
+
/* END OF FILE */