From: Steven Schubiger Date: Fri, 6 Dec 2013 20:33:12 +0000 (+0100) Subject: List state of debugging in version output X-Git-Tag: v0.53~8 X-Git-Url: http://git.refcnt.org/?p=colorize.git;a=commitdiff_plain;h=34f3a907f22b4d9cd1c879754bdfa19826407250 List state of debugging in version output --- diff --git a/colorize.c b/colorize.c index 3c87727..36d7a0a 100644 --- a/colorize.c +++ b/colorize.c @@ -375,14 +375,21 @@ static void print_version (void) { const char *c_flags; - printf ("%s v%s (compiled at %s, %s)\n", "colorize", VERSION, __DATE__, __TIME__); + bool debug; #ifdef CFLAGS c_flags = to_str (CFLAGS); #else c_flags = "unknown"; #endif +#if DEBUG + debug = true; +#else + debug = false; +#endif + printf ("%s v%s (compiled at %s, %s)\n", "colorize", VERSION, __DATE__, __TIME__); printf ("Compiler flags: %s\n", c_flags); printf ("Buffer size: %u bytes\n", BUF_SIZE); + printf ("Debugging: %s\n", debug ? "yes" : "no"); } static void