sync with 0.8.0cvs1

This commit is contained in:
Paul Mangan 2002-07-23 09:59:12 +00:00
parent e803c0c7db
commit 7e9510badb
6 changed files with 63 additions and 24 deletions

View file

@ -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

View 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

View 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

View 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

View 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;
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);
}
void conv_unmime_header(gchar *outbuf, gint outlen, const gchar *str,
const gchar *charset)
{
gchar *buf;
gint buflen;
CharSet cur_charset;
cur_charset = conv_get_current_charset();
if (cur_charset == C_EUC_JP) {
Xalloca(buf, outlen, return);
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);
conv_jistodisp(outbuf, outlen, buf);
strncpy2(str, buf, buflen);
}
}
void conv_unmime_header(gchar *outbuf, gint outlen, const gchar *str,
const gchar *charset)
{
CharSet cur_charset;
cur_charset = conv_get_current_charset();
if (cur_charset == C_EUC_JP) {
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);
}

View 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");
}