From acbf5536ee7b226c9126428bfe67ae5a34509e6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kjetil=20=C3=98rbekk?= Date: Sun, 15 Jun 2008 20:06:47 +0200 Subject: - Made DEBUG write to file instead of stderr (which didn't work) --- include/debug.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include') 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 +# define DEBUGPATH "debug.txt" +# define DEBUG(...) FILE *__f491 = fopen(DEBUGPATH, "a"); \ + fprintf (__f491, __VA_ARGS__); \ + fclose(__f491); #else # define DEBUG(...) #endif + #endif -- cgit v1.2.3