Off Topic
Somewhat Off Topic: I am using a general macro to remove printf statements, like this (from [1]):
The compiler wil understand that printf-only variables are not needed when printf is not seen by the compiler. Quite nice.
I will use lib_logging since it has a scheme to enable or disable printing via compile options and a scheme to enable or disable printing for sets of source files. I just haven't come around to doing it.
[1] C #define macro for debug printing at stack overflow
Code: Select all
#define DEBUG_PRINT_GLOBAL_APP 1 // Seen by all files
#define DEBUG_PRINT_LOCAL 1 // Local
#define debug_print(fmt, ...) do { if((DEBUG_PRINT_LOCAL==1) && (DEBUG_PRINT_GLOBAL_APP==1)) printf(fmt, __VA_ARGS__); } while (0)
I will use lib_logging since it has a scheme to enable or disable printing via compile options and a scheme to enable or disable printing for sets of source files. I just haven't come around to doing it.
[1] C #define macro for debug printing at stack overflow