Mercurial > geeqie
comparison 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 |
comparison
equal
deleted
inserted
replaced
494:3bb9a8df6ee9 | 495:c7a2471e5c4e |
---|---|
218 gchar *begin; | 218 gchar *begin; |
219 gchar *end; | 219 gchar *end; |
220 | 220 |
221 if (!command || !path) return; | 221 if (!command || !path) return; |
222 | 222 |
223 if (debug) printf("Help command pre \"%s\", \"%s\"\n", command, path); | 223 DEBUG_1("Help command pre \"%s\", \"%s\"\n", command, path); |
224 | 224 |
225 buf = g_strdup(command); | 225 buf = g_strdup(command); |
226 begin = strstr(buf, "%s"); | 226 begin = strstr(buf, "%s"); |
227 if (begin) | 227 if (begin) |
228 { | 228 { |
236 { | 236 { |
237 result = g_strdup_printf("%s \"%s\" &", command, path); | 237 result = g_strdup_printf("%s \"%s\" &", command, path); |
238 } | 238 } |
239 g_free(buf); | 239 g_free(buf); |
240 | 240 |
241 if (debug) printf("Help command post [%s]\n", result); | 241 DEBUG_1("Help command post [%s]\n", result); |
242 | 242 |
243 system(result); | 243 system(result); |
244 | 244 |
245 g_free(result); | 245 g_free(result); |
246 } | 246 } |
1160 } | 1160 } |
1161 } | 1161 } |
1162 } | 1162 } |
1163 } | 1163 } |
1164 | 1164 |
1165 if (debug > 0) printf("debugging output enabled (level %d)\n", debug); | 1165 DEBUG_1("debugging output enabled (level %d)\n", debug); |
1166 #endif | 1166 #endif |
1167 } | 1167 } |
1168 | 1168 |
1169 /* | 1169 /* |
1170 *----------------------------------------------------------------------------- | 1170 *----------------------------------------------------------------------------- |