diff options
author | Kjetil Ørbekk <orbekk@pvv.ntnu.no> | 2008-06-15 20:06:47 +0200 |
---|---|---|
committer | Kjetil Ørbekk <orbekk@pvv.ntnu.no> | 2008-06-15 20:06:47 +0200 |
commit | acbf5536ee7b226c9126428bfe67ae5a34509e6f (patch) | |
tree | 3d9202acfbd5b64c7fcb6966e13f9afdd335dfb1 /include | |
parent | 76fdfd180cd2c9cca370b12178aaa72ab54bfade (diff) |
- Made DEBUG write to file instead of stderr (which didn't work)
Diffstat (limited to 'include')
-rw-r--r-- | include/debug.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/debug.h b/include/debug.h index 5b780bc..4588aca 100644 --- a/include/debug.h +++ b/include/debug.h @@ -1,10 +1,16 @@ #ifndef _DEBUG_H_ #define _DEBUG_H_ + #ifdef DEBUGGING -# define DEBUG(...) fprintf (stderr, __VA_ARGS__) +# include <stdio.h> +# define DEBUGPATH "debug.txt" +# define DEBUG(...) FILE *__f491 = fopen(DEBUGPATH, "a"); \ + fprintf (__f491, __VA_ARGS__); \ + fclose(__f491); #else # define DEBUG(...) #endif + #endif |