]> git.refcnt.org Git - colorize.git/blobdiff - colorize.c
Comment end of conditional inclusion
[colorize.git] / colorize.c
index 54f6889fe3c308a74550bc38b335b3d0853a408a..30d03bc1d1c3e65733f5bf8fc380b2f926c8a2f0 100644 (file)
@@ -403,6 +403,11 @@ print_help (void)
 static void
 print_version (void)
 {
+#ifdef HAVE_VERSION
+# include "version.h"
+#else
+    const char *version = NULL;
+#endif
     const char *c_flags;
     struct bytes_size bytes_size;
     bool debug;
@@ -416,7 +421,10 @@ print_version (void)
 #else
     debug = false;
 #endif
-    printf ("%s v%s (compiled at %s, %s)\n", "colorize", VERSION, __DATE__, __TIME__);
+    if (version)
+      printf ("colorize %s (compiled at %s, %s)\n", version, __DATE__, __TIME__);
+    else
+      printf ("colorize v%s (compiled at %s, %s)\n", VERSION, __DATE__, __TIME__);
     printf ("Compiler flags: %s\n", c_flags);
     if (get_bytes_size (BUF_SIZE, &bytes_size))
       {
@@ -1018,7 +1026,7 @@ realloc_wrap_debug (void *ptr, size_t size, const char *file, unsigned int line)
       MEM_ALLOC_FAIL_DEBUG (file, line);
     return p;
 }
-#endif
+#endif /* !DEBUG */
 
 static void
 free_wrap (void **ptr)