Mercurial > geeqie
diff src/cache.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/cache.c Wed Apr 23 13:46:18 2008 +0000 +++ b/src/cache.c Wed Apr 23 20:47:19 2008 +0000 @@ -457,7 +457,7 @@ if (fread(&buf, sizeof(char), 9, f) != 9 || strncmp(buf, "SIMcache", 8) != 0) { - if (debug) printf("%s is not a cache file\n", cd->path); + DEBUG_1("%s is not a cache file\n", cd->path); success = 0; } @@ -601,7 +601,7 @@ } if (!isdir(path)) { - if (debug) printf("creating sub dir:%s\n", path); + DEBUG_1("creating sub dir:%s\n", path); if (!mkdir_utf8(path, mode)) { printf("create dir failed: %s\n", path); @@ -770,7 +770,7 @@ if (utime(cachel, &ut) < 0 && errno == EPERM) { - if (debug) printf("cache permission workaround: %s\n", cachel); + DEBUG_1("cache permission workaround: %s\n", cachel); ret = TRUE; } }
