aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Steven Schubiger <stsc@refcnt.org> 2013-12-06 21:33:12 +0100
committerGravatar Steven Schubiger <stsc@refcnt.org> 2013-12-06 21:33:12 +0100
commit34f3a907f22b4d9cd1c879754bdfa19826407250 (patch)
treefc63cbf36b7e84b7a0f8323cefba3cc95d8e2ddc
parent3670d233d1dd376d13ad73f14212cc83d5a4ecbf (diff)
downloadcolorize-34f3a907f22b4d9cd1c879754bdfa19826407250.tar.gz
colorize-34f3a907f22b4d9cd1c879754bdfa19826407250.tar.bz2
List state of debugging in version output
-rw-r--r--colorize.c9
1 files changed, 8 insertions, 1 deletions
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