From: Andreas Eversberg Date: Sat, 15 Oct 2011 07:29:44 +0000 (+0200) Subject: Adding "fflush" to debug.log. X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=commitdiff_plain;h=2106a9212ce6610b01f7019d5acf92ee1af5c8d8 Adding "fflush" to debug.log. This is usefull when using "tail -f". The debug will be written to the debug.log file right when the debug function is called. --- diff --git a/main.c b/main.c index ce05452..6e91207 100644 --- a/main.c +++ b/main.c @@ -84,6 +84,7 @@ void debug(const char *function, int line, const char *prefix, char *buffer) fprintf(debug_fp, "%s%s(in %s() line %d): %s", prefix?prefix:"", prefix?" ":"", function, line, buffer); else fprintf(debug_fp, "%s%s: %s", prefix?prefix:"", prefix?" ":"", buffer); + fflush(debug_fp); } }