projects
/
lcr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
c67eb25
)
Adding "fflush" to debug.log.
author
Andreas Eversberg
<jolly@eversberg.eu>
Sat, 15 Oct 2011 07:29:44 +0000
(09:29 +0200)
committer
Andreas Eversberg
<jolly@eversberg.eu>
Sat, 15 Oct 2011 07:29:44 +0000
(09:29 +0200)
This is usefull when using "tail -f". The debug will be written to
the debug.log file right when the debug function is called.
main.c
patch
|
blob
|
history
diff --git
a/main.c
b/main.c
index
ce05452
..
6e91207
100644
(file)
--- 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);
}
}