diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-03-07 06:25:41 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-03-07 06:25:41 +0000 |
commit | ef870de32eb2c2f94dce2b87fdfabd5d6bb84967 (patch) | |
tree | 829fc36e52a8b98193c3246d6eb54b8fa3449a89 /src/codeconv.c | |
parent | 00147be89513db41cdefb984b9d8e5e02e3f8ce6 (diff) |
modified conv_unmime_header() and procheader_scan_date_string().
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@148 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/codeconv.c')
-rw-r--r-- | src/codeconv.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/codeconv.c b/src/codeconv.c index 8371486d..cf41cdea 100644 --- a/src/codeconv.c +++ b/src/codeconv.c @@ -1543,13 +1543,14 @@ const gchar *conv_get_current_locale(void) gchar *conv_unmime_header(const gchar *str, const gchar *default_encoding) { - gchar *utf8_buf; - gint buflen; + gchar buf[BUFFSIZE]; if (is_ascii_str(str)) return unmime_header(str); if (default_encoding) { + gchar *utf8_buf; + utf8_buf = conv_codeset_strdup (str, default_encoding, CS_INTERNAL); if (utf8_buf) { @@ -1561,15 +1562,12 @@ gchar *conv_unmime_header(const gchar *str, const gchar *default_encoding) } } - buflen = MIN(strlen(str) * 6 + 1, BUFFSIZE); - Xalloca(utf8_buf, buflen, return NULL); - if (conv_get_locale_charset() == C_EUC_JP) - conv_anytodisp(utf8_buf, buflen, str); + conv_anytodisp(buf, sizeof(buf), str); else - conv_localetodisp(utf8_buf, buflen, str); + conv_localetodisp(buf, sizeof(buf), str); - return unmime_header(utf8_buf); + return unmime_header(buf); } #define MAX_LINELEN 76 |