diff options
author | Dan Winship <danw@src.gnome.org> | 2004-07-14 23:19:58 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2004-07-14 23:19:58 +0800 |
commit | 109c235bb23836ebe9a95bd5862a0e7ead568236 (patch) | |
tree | 90e68bc738c7d2a7879c6240f4a937ec2091f951 /e-util/e-mktemp.c | |
parent | 1dcf7c2a308edb953759b4abd5e0f8e1f94050dd (diff) | |
download | gsoc2013-evolution-109c235bb23836ebe9a95bd5862a0e7ead568236.tar.gz gsoc2013-evolution-109c235bb23836ebe9a95bd5862a0e7ead568236.tar.zst gsoc2013-evolution-109c235bb23836ebe9a95bd5862a0e7ead568236.zip |
un-const the return values, since they need to be freed (d): turn off
* e-mktemp.c (e_mktemp, e_mkdtemp): un-const the return values,
since they need to be freed
(d): turn off debugging
(expire_dir_rec): remove debug printfs
svn path=/trunk/; revision=26647
Diffstat (limited to 'e-util/e-mktemp.c')
-rw-r--r-- | e-util/e-mktemp.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/e-util/e-mktemp.c b/e-util/e-mktemp.c index 2e40a4d8a2..9e5b8f7ba0 100644 --- a/e-util/e-mktemp.c +++ b/e-util/e-mktemp.c @@ -40,7 +40,7 @@ #include "e-mktemp.h" -#define d(x) x +#define d(x) /* define to put temporary files in ~/evolution/cache/tmp */ #define TEMP_HOME (1) @@ -60,7 +60,7 @@ expire_dir_rec(const char *base, time_t now) struct stat st; int count = 0; - printf("expire dir '%s'\n", base); + d(printf("expire dir '%s'\n", base)); dir = opendir(base); if (dir == NULL) @@ -100,7 +100,7 @@ expire_dir_rec(const char *base, time_t now) g_string_free(path, TRUE); closedir(dir); - printf("expire dir '%s' %d remaining files\n", base, count); + d(printf("expire dir '%s' %d remaining files\n", base, count)); return count; } @@ -153,8 +153,7 @@ get_dir (gboolean make) } #endif - if (path) - printf("temp dir '%s'\n", path->str); + d(printf("temp dir '%s'\n", path ? path->str : "(null)")); /* fire off an expirey attempt no more often than TEMP_SCAN seconds */ if (path && (last+TEMP_SCAN) < now) { @@ -165,7 +164,7 @@ get_dir (gboolean make) return path; } -const char * +char * e_mktemp (const char *template) { GString *path; @@ -211,7 +210,7 @@ e_mkstemp (const char *template) } -const char * +char * e_mkdtemp (const char *template) { GString *path; |