diff options
-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 |