From 7e9510badbd9296d0562de0881c14629e7b36c7b Mon Sep 17 00:00:00 2001 From: Paul Mangan Date: Tue, 23 Jul 2002 09:59:12 +0000 Subject: [PATCH] sync with 0.8.0cvs1 --- ChangeLog | 10 ++++++++++ ChangeLog.claws | 5 +++++ ChangeLog.jp | 11 +++++++++++ configure.in | 2 +- src/codeconv.c | 41 ++++++++++++++++++++++++++--------------- src/utils.c | 2 ++ 6 files changed, 55 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8800ac48b..c257c9007 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2002-07-23 + + * src/utils.c: remove_numbered_files(): don't try to unlink() + directories. + * src/codeconv.c: + conv_get_code_conv_func(): return conv_anytodisp() if charset is + not specified. + conv_unmime_header_overwrite() + conv_unmime_header(): do conv_anytodisp() before decoding header. + 2002-07-14 * version 0.8.0 diff --git a/ChangeLog.claws b/ChangeLog.claws index 5102f8d1d..19d2d631b 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -1,3 +1,8 @@ +2002-07-23 [paul] 0.8.0claws1 + + * sync with 0.8.0cvs1 + see ChangeLog 2002-07-23 + 2002-07-23 [paul] 0.8.0claws * release of 0.8.0claws diff --git a/ChangeLog.jp b/ChangeLog.jp index a2a307b25..c75879c0c 100644 --- a/ChangeLog.jp +++ b/ChangeLog.jp @@ -1,3 +1,14 @@ +2002-07-23 + + * src/utils.c: remove_numbered_files(): ¥Ç¥£¥ì¥¯¥È¥ê¤ò unlink() + ¤·¤Ê¤¤¤è¤¦¤Ë¤·¤¿¡£ + * src/codeconv.c: + conv_get_code_conv_func(): charset ¤¬»ØÄꤵ¤ì¤Æ¤¤¤Ê¤±¤ì¤Ð + conv_anytodisp() ¤òÊÖ¤¹¤è¤¦¤Ë¤·¤¿¡£ + conv_unmime_header_overwrite() + conv_unmime_header(): ¥Ø¥Ã¥À¤ò¥Ç¥³¡¼¥É¤¹¤ëÁ°¤Ë conv_anytodisp() + ¤¹¤ë¤è¤¦¤Ë¤·¤¿¡£ + 2002-07-14 * version 0.8.0 diff --git a/configure.in b/configure.in index dd9cdecfb..47bb21a58 100644 --- a/configure.in +++ b/configure.in @@ -8,7 +8,7 @@ MINOR_VERSION=8 MICRO_VERSION=0 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=claws +EXTRA_VERSION=claws1 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION dnl set $target diff --git a/src/codeconv.c b/src/codeconv.c index 320f9b5be..b43d55a37 100644 --- a/src/codeconv.c +++ b/src/codeconv.c @@ -588,7 +588,9 @@ gchar *conv_codeset_strdup(const gchar *inbuf, func = conv_get_code_conv_func(src_codeset); if (func != conv_noconv) { - if (func == conv_jistodisp || func == conv_sjistodisp) + if (func == conv_jistodisp || + func == conv_sjistodisp || + func == conv_anytodisp) len = strlen(inbuf) * 2 + 1; else len = strlen(inbuf) + 1; @@ -663,10 +665,12 @@ gchar *conv_codeset_strdup(const gchar *inbuf, CodeConvFunc conv_get_code_conv_func(const gchar *charset) { CodeConvFunc code_conv; + CharSet cur_charset; if (!charset) { - if (conv_get_outgoing_charset() == C_ISO_2022_JP) - return conv_jistodisp; + cur_charset = conv_get_current_charset(); + if (cur_charset == C_EUC_JP || cur_charset == C_SHIFT_JIS) + return conv_anytodisp; else return conv_noconv; } @@ -984,32 +988,39 @@ const gchar *conv_get_current_locale(void) void conv_unmime_header_overwrite(gchar *str) { gchar *buf; - gint outlen; + gint buflen; CharSet cur_charset; cur_charset = conv_get_current_charset(); - outlen = strlen(str) + 1; - Xalloca(buf, outlen, return); - unmime_header(buf, str); - if (cur_charset == C_EUC_JP) - conv_jistodisp(str, outlen, buf); - else - strncpy2(str, buf, outlen); + if (cur_charset == C_EUC_JP) { + buflen = strlen(str) * 2 + 1; + Xalloca(buf, buflen, return); + conv_anytodisp(buf, buflen, str); + unmime_header(str, buf); + } else { + buflen = strlen(str) + 1; + Xalloca(buf, buflen, return); + unmime_header(buf, str); + strncpy2(str, buf, buflen); + } } void conv_unmime_header(gchar *outbuf, gint outlen, const gchar *str, const gchar *charset) { - gchar *buf; CharSet cur_charset; cur_charset = conv_get_current_charset(); if (cur_charset == C_EUC_JP) { - Xalloca(buf, outlen, return); - unmime_header(buf, str); - conv_jistodisp(outbuf, outlen, buf); + gchar *buf; + gint buflen; + + buflen = strlen(str) * 2 + 1; + Xalloca(buf, buflen, return); + conv_anytodisp(buf, buflen, str); + unmime_header(outbuf, buf); } else unmime_header(outbuf, str); } diff --git a/src/utils.c b/src/utils.c index bebbca2f7..4d33b92bd 100644 --- a/src/utils.c +++ b/src/utils.c @@ -1727,6 +1727,8 @@ gint remove_numbered_files(const gchar *dir, guint first, guint last) while ((d = readdir(dp)) != NULL) { fileno = to_number(d->d_name); if (fileno >= 0 && first <= fileno && fileno <= last) { + if (is_dir_exist(d->d_name)) + continue; if (unlink(d->d_name) < 0) FILE_OP_ERROR(d->d_name, "unlink"); } -- 2.25.1