sync with 0.8.0cvs1
authorPaul Mangan <paul@claws-mail.org>
Tue, 23 Jul 2002 09:59:12 +0000 (09:59 +0000)
committerPaul Mangan <paul@claws-mail.org>
Tue, 23 Jul 2002 09:59:12 +0000 (09:59 +0000)
ChangeLog
ChangeLog.claws
ChangeLog.jp
configure.in
src/codeconv.c
src/utils.c

index 8800ac4..c257c90 100644 (file)
--- 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
index 5102f8d..19d2d63 100644 (file)
@@ -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
index a2a307b..c75879c 100644 (file)
@@ -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
index dd9cdec..47bb21a 100644 (file)
@@ -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
index 320f9b5..b43d55a 100644 (file)
@@ -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);
 }
index bebbca2..4d33b92 100644 (file)
@@ -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");
                }