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-url.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-url.c')
-rw-r--r-- | camel/camel-url.c | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/camel/camel-url.c b/camel/camel-url.c index a2d4e73dac..64abd76265 100644 --- a/camel/camel-url.c +++ b/camel/camel-url.c @@ -304,15 +304,16 @@ camel_url_to_string (CamelURL *url, guint32 flags) { GString *str; char *enc, *return_result; - + /* IF YOU CHANGE ANYTHING IN THIS FUNCTION, RUN * tests/misc/url AFTERWARD. */ - + str = g_string_sized_new (20); - + if (url->protocol) - g_string_sprintfa (str, "%s:", url->protocol); + g_string_append_printf (str, "%s:", url->protocol); + if (url->host) { g_string_append (str, "//"); if (url->user) { @@ -322,45 +323,46 @@ camel_url_to_string (CamelURL *url, guint32 flags) } if (url->authmech && *url->authmech) { enc = camel_url_encode (url->authmech, TRUE, ":@/"); - g_string_sprintfa (str, ";auth=%s", enc); + g_string_append_printf (str, ";auth=%s", enc); g_free (enc); } if (url->passwd && !(flags & CAMEL_URL_HIDE_PASSWORD)) { enc = camel_url_encode (url->passwd, TRUE, "@/"); - g_string_sprintfa (str, ":%s", enc); + g_string_append_printf (str, ":%s", enc); g_free (enc); } if (url->host) { enc = camel_url_encode (url->host, TRUE, ":/"); - g_string_sprintfa (str, "%s%s", url->user ? "@" : "", enc); + g_string_append_printf (str, "%s%s", url->user ? "@" : "", enc); g_free (enc); } if (url->port) - g_string_sprintfa (str, ":%d", url->port); + g_string_append_printf (str, ":%d", url->port); if (!url->path && (url->params || url->query || url->fragment)) g_string_append_c (str, '/'); } - + if (url->path) { enc = camel_url_encode (url->path, FALSE, ";?#"); - g_string_sprintfa (str, "%s", enc); + g_string_append_printf (str, "%s", enc); g_free (enc); } if (url->params && !(flags & CAMEL_URL_HIDE_PARAMS)) g_datalist_foreach (&url->params, output_param, str); if (url->query) { enc = camel_url_encode (url->query, FALSE, "#"); - g_string_sprintfa (str, "?%s", enc); + g_string_append_printf (str, "?%s", enc); g_free (enc); } if (url->fragment) { enc = camel_url_encode (url->fragment, FALSE, NULL); - g_string_sprintfa (str, "#%s", enc); + g_string_append_printf (str, "#%s", enc); g_free (enc); } - + return_result = str->str; g_string_free (str, FALSE); + return return_result; } @@ -369,13 +371,13 @@ output_param (GQuark key_id, gpointer data, gpointer user_data) { GString *str = user_data; char *enc; - + enc = camel_url_encode (g_quark_to_string (key_id), FALSE, "?#"); - g_string_sprintfa (str, ";%s", enc); + g_string_append_printf (str, ";%s", enc); g_free (enc); if (*(char *)data) { enc = camel_url_encode (data, FALSE, "?#"); - g_string_sprintfa (str, "=%s", enc); + g_string_append_printf (str, "=%s", enc); g_free (enc); } } |