diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-12-18 05:01:00 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-12-18 05:01:00 +0800 |
commit | 5c90cbb6e1a5a1f4cf59c7554e273aec4f52fa22 (patch) | |
tree | f76f0dfd12be914146acbe3f96e899b9165dbf20 /camel/camel-service.c | |
parent | f37b0a1ab7d9dd437905d10d85410992ad9abc0a (diff) | |
download | gsoc2013-evolution-5c90cbb6e1a5a1f4cf59c7554e273aec4f52fa22.tar.gz gsoc2013-evolution-5c90cbb6e1a5a1f4cf59c7554e273aec4f52fa22.tar.zst gsoc2013-evolution-5c90cbb6e1a5a1f4cf59c7554e273aec4f52fa22.zip |
Replace calls to g_string_sprintfa() with g_string_append_printf() since
2002-12-17 Jeffrey Stedfast <fejj@ximian.com>
* 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=19153
Diffstat (limited to 'camel/camel-service.c')
-rw-r--r-- | camel/camel-service.c | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/camel/camel-service.c b/camel/camel-service.c index 8c3b3fc62f..13daa75492 100644 --- a/camel/camel-service.c +++ b/camel/camel-service.c @@ -534,10 +534,10 @@ camel_service_get_name (CamelService *service, gboolean brief) static char * get_path (CamelService *service) { + CamelProvider *prov = service->provider; + CamelURL *url = service->url; GString *gpath; char *path; - CamelURL *url = service->url; - CamelProvider *prov = service->provider; /* A sort of ad-hoc default implementation that works for our * current set of services. @@ -546,33 +546,31 @@ get_path (CamelService *service) gpath = g_string_new (service->provider->protocol); if (CAMEL_PROVIDER_ALLOWS (prov, CAMEL_URL_PART_USER)) { if (CAMEL_PROVIDER_ALLOWS (prov, CAMEL_URL_PART_HOST)) { - g_string_sprintfa (gpath, "/%s@%s", - url->user ? url->user : "", - url->host ? url->host : ""); + g_string_append_printf (gpath, "/%s@%s", + url->user ? url->user : "", + url->host ? url->host : ""); if (url->port) - g_string_sprintfa (gpath, ":%d", url->port); + g_string_append_printf (gpath, ":%d", url->port); } else { - g_string_sprintfa (gpath, "/%s%s", - url->user ? url->user : "", - CAMEL_PROVIDER_NEEDS (prov, CAMEL_URL_PART_USER) ? "" : "@"); + g_string_append_printf (gpath, "/%s%s", url->user ? url->user : "", + CAMEL_PROVIDER_NEEDS (prov, CAMEL_URL_PART_USER) ? "" : "@"); } } else if (CAMEL_PROVIDER_ALLOWS (prov, CAMEL_URL_PART_HOST)) { - g_string_sprintfa (gpath, "/%s%s", - CAMEL_PROVIDER_NEEDS (prov, CAMEL_URL_PART_HOST) ? "" : "@", - url->host ? url->host : ""); + g_string_append_printf (gpath, "/%s%s", + CAMEL_PROVIDER_NEEDS (prov, CAMEL_URL_PART_HOST) ? "" : "@", + url->host ? url->host : ""); if (url->port) - g_string_sprintfa (gpath, ":%d", url->port); - } - if (CAMEL_PROVIDER_NEEDS (prov, CAMEL_URL_PART_PATH)) { - g_string_sprintfa (gpath, "%s%s", - *url->path == '/' ? "" : "/", - url->path); + g_string_append_printf (gpath, ":%d", url->port); } + if (CAMEL_PROVIDER_NEEDS (prov, CAMEL_URL_PART_PATH)) + g_string_append_printf (gpath, "%s%s", *url->path == '/' ? "" : "/", url->path); + path = gpath->str; g_string_free (gpath, FALSE); + return path; } |