From fe0794042ee8204669531a28ce8ce1e40e097455 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kjetil=20=C3=98rbekk?= Date: Tue, 12 Aug 2008 12:05:57 +0200 Subject: - Fixed debug filehandle --- include/debug.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/debug.h b/include/debug.h index 4588aca..a14900a 100644 --- a/include/debug.h +++ b/include/debug.h @@ -5,9 +5,10 @@ #ifdef DEBUGGING # include # define DEBUGPATH "debug.txt" -# define DEBUG(...) FILE *__f491 = fopen(DEBUGPATH, "a"); \ - fprintf (__f491, __VA_ARGS__); \ - fclose(__f491); +FILE *__debug_handle__; +# define DEBUG(...) __debug_handle__ = fopen(DEBUGPATH, "a"); \ + fprintf (__debug_handle__, __VA_ARGS__); \ + fclose(__debug_handle__); #else # define DEBUG(...) #endif -- cgit v1.2.3