summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2006-09-17 00:01:19 +0000
committerIan C <ianc@noddybox.co.uk>2006-09-17 00:01:19 +0000
commit5b27bd62f60532486d288a60193b583d2e6cb8c0 (patch)
tree1caaf8a4b1ba4e7e66d983b58d790dba4df1ac81 /src/util.c
parent79ff304abce3f4a1e876e3335dbb890846ff3f3e (diff)
Updates
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/util.c b/src/util.c
index 566255d..8ce2822 100644
--- a/src/util.c
+++ b/src/util.c
@@ -111,13 +111,21 @@ const char *Dirname(const char *path)
void Debug(const char *format, ...)
{
+ static const int USE_STDERR=1;
static FILE *fp=NULL;
va_list ap;
if (!fp)
{
- fp=fopen("debug.txt","w");
- setbuf(fp,NULL);
+ if (USE_STDERR)
+ {
+ fp=stderr;
+ }
+ else
+ {
+ fp=fopen("debug.txt","w");
+ setbuf(fp,NULL);
+ }
}
if (!fp)