diff options
author | Kjetil Ørbekk <orbekk@pvv.ntnu.no> | 2008-08-12 12:05:57 +0200 |
---|---|---|
committer | Kjetil Ørbekk <orbekk@pvv.ntnu.no> | 2008-08-12 12:05:57 +0200 |
commit | fe0794042ee8204669531a28ce8ce1e40e097455 (patch) | |
tree | 10648117e77edf901f0e5664062eda0f0e4a0fb9 /include | |
parent | 0c3e24d41c5220608e95be45f620989e779cc373 (diff) |
- Fixed debug filehandle
Diffstat (limited to 'include')
-rw-r--r-- | include/debug.h | 7 |
1 files changed, 4 insertions, 3 deletions
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 <stdio.h> # 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 |