util: print help for debug options on non-debug builds
authorMarek Olšák <maraeo@gmail.com>
Tue, 6 Jul 2010 22:01:27 +0000 (00:01 +0200)
committerMarek Olšák <maraeo@gmail.com>
Tue, 6 Jul 2010 22:12:49 +0000 (00:12 +0200)
I'd like to see the help when I request it.

src/gallium/auxiliary/util/u_debug.c

index 5e373ff24c46581e880b4674b0c20fdcf6bc5689..ad162558bc149abcc3c36f2414a895ef7bea6ac4 100644 (file)
@@ -190,11 +190,11 @@ debug_get_flags_option(const char *name,
       result = dfault;
    else if (!util_strcmp(str, "help")) {
       result = dfault;
-      debug_printf("%s: help for %s:\n", __FUNCTION__, name);
+      _debug_printf("%s: help for %s:\n", __FUNCTION__, name);
       for (; flags->name; ++flags)
          namealign = MAX2(namealign, strlen(flags->name));
       for (flags = orig; flags->name; ++flags)
-         debug_printf("| %*s [0x%0*lx]%s%s\n", namealign, flags->name,
+         _debug_printf("| %*s [0x%0*lx]%s%s\n", namealign, flags->name,
                       (int)sizeof(unsigned long)*CHAR_BIT/4, flags->value,
                       flags->desc ? " " : "", flags->desc ? flags->desc : "");
    }