From a84f11d6bd217de89e73b1880546a3af48cfd9c8 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Tue, 17 Dec 2002 21:46:44 +0000 Subject: Replace calls to g_string_sprintfa() with g_string_append_printf() since 2002-12-17 Jeffrey Stedfast * providers/imap/camel-imap-utils.c: Replace calls to g_string_sprintfa() with g_string_append_printf() since the former seems to have been deprecated. * providers/imap/camel-imap-search.c: Same. * providers/imap/camel-imap-folder.c: Here too. * providers/local/camel-mbox-summary.c: And here. * providers/local/camel-local-summary.c: Replace g_string_sprintf() with g_string_printf(). * camel-data-cache.c (data_cache_expire): Replace g_string_sprintf() with g_string_printf(). * camel-url.c: Replace calls to g_string_sprintfa() with g_string_append_printf() since the former seems to have been deprecated. * camel-service.c: Same. * camel-mime-utils.c: Here too. svn path=/trunk/; revision=19154 --- camel/providers/local/camel-mbox-summary.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'camel/providers/local/camel-mbox-summary.c') diff --git a/camel/providers/local/camel-mbox-summary.c b/camel/providers/local/camel-mbox-summary.c index 5b001c0977..41ebe28fa6 100644 --- a/camel/providers/local/camel-mbox-summary.c +++ b/camel/providers/local/camel-mbox-summary.c @@ -561,14 +561,16 @@ camel_mbox_summary_build_from(struct _header_raw *header) /* a pseudo, but still bogus attempt at thread safing the function */ /*memcpy(&tm, gmtime(&thetime), sizeof(tm));*/ - gmtime_r(&thetime, &tm); - - g_string_sprintfa(out, " %s %s %2d %02d:%02d:%02d %4d\n", - tz_days[tm.tm_wday], - tz_months[tm.tm_mon], tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec, tm.tm_year + 1900); - + gmtime_r (&thetime, &tm); + + g_string_append_printf (out, " %s %s %2d %02d:%02d:%02d %4d\n", + tz_days[tm.tm_wday], tz_months[tm.tm_mon], + tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec, + tm.tm_year + 1900); + ret = out->str; - g_string_free(out, FALSE); + g_string_free (out, FALSE); + return ret; } @@ -594,8 +596,8 @@ mbox_summary_sync_full(CamelMboxSummary *mbs, gboolean expunge, CamelFolderChang return -1; } - tmpname = alloca(strlen (cls->folder_path) + 5); - sprintf(tmpname, "%s.tmp", cls->folder_path); + tmpname = g_alloca (strlen (cls->folder_path) + 5); + sprintf (tmpname, "%s.tmp", cls->folder_path); d(printf("Writing tmp file to %s\n", tmpname)); fdout = open(tmpname, O_WRONLY|O_CREAT|O_TRUNC, 0600); if (fdout == -1) { -- cgit v1.2.3