Mercurial > geeqie
diff src/main.c @ 495:c7a2471e5c4e
Introduce macros to display debug messages.
if (debug) printf(...) is now replaced by variadic macros:
DEBUG_1()
And for higher debugging levels:
DEBUG_2()
DEBUG_3()
DEBUG_4()
author | zas_ |
---|---|
date | Wed, 23 Apr 2008 20:47:19 +0000 |
parents | 48c8e49b571c |
children | fc9c8a3e1a8b |
line wrap: on
line diff
--- a/src/main.c Wed Apr 23 13:46:18 2008 +0000 +++ b/src/main.c Wed Apr 23 20:47:19 2008 +0000 @@ -220,7 +220,7 @@ if (!command || !path) return; - if (debug) printf("Help command pre \"%s\", \"%s\"\n", command, path); + DEBUG_1("Help command pre \"%s\", \"%s\"\n", command, path); buf = g_strdup(command); begin = strstr(buf, "%s"); @@ -238,7 +238,7 @@ } g_free(buf); - if (debug) printf("Help command post [%s]\n", result); + DEBUG_1("Help command post [%s]\n", result); system(result); @@ -1162,7 +1162,7 @@ } } - if (debug > 0) printf("debugging output enabled (level %d)\n", debug); + DEBUG_1("debugging output enabled (level %d)\n", debug); #endif }