From 1a8ffd75606e69c6f766188f2ab424cc53782a52 Mon Sep 17 00:00:00 2001 From: Ian C Date: Thu, 15 Jan 2004 18:53:52 +0000 Subject: Changes from work --- src/util.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/util.c') 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 #include +#include #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 */ -- cgit v1.2.3