]> git.refcnt.org Git - colorize.git/commitdiff
List state of debugging in version output
authorSteven Schubiger <stsc@refcnt.org>
Fri, 6 Dec 2013 20:33:12 +0000 (21:33 +0100)
committerSteven Schubiger <stsc@refcnt.org>
Fri, 6 Dec 2013 20:33:12 +0000 (21:33 +0100)
colorize.c

index 3c87727adbb9557118fb19b3f871b67a4752ebec..36d7a0a228baa62400697051b7cd044a9ad98144 100644 (file)
@@ -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