aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-03-18 05:49:49 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-03-18 05:49:49 +0000
commit951ba1bd0fd5582c507a807b5fe0dd8454b5271c (patch)
treea57ba3b56a95c00675b01f68254610ffab8948e7
parentd391fd2c9f96506e4341d6e635b88b27c7e7409e (diff)
force output of newline when output HTML.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@184 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r--ChangeLog6
-rw-r--r--ChangeLog.ja6
-rw-r--r--src/html.c4
-rw-r--r--src/html.h4
-rw-r--r--src/procmime.c4
-rw-r--r--src/textview.c4
6 files changed, 22 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 4640426f..a4302b97 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2005-03-18
+ * src/html.[ch]: html_parse(): made return value const.
+ * src/textview.c: textview_show_html(): force output of newline.
+ * src/procmime.c: procmime_get_text_content(): follow the API change.
+
+2005-03-18
+
* src/account.c: account_find_from_message_file(): added missing
NULL terminator of the HeaderEntry array which had introduced
crash on re-edit (thanks to Michael Schwendt).
diff --git a/ChangeLog.ja b/ChangeLog.ja
index 95ff9a63..0ba433cd 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,5 +1,11 @@
2005-03-18
+ * src/html.[ch]: html_parse(): 戻り値を const にした。
+ * src/textview.c: textview_show_html(): 強制的に改行を出力。
+ * src/procmime.c: procmime_get_text_content(): API の変更に追従。
+
+2005-03-18
+
* src/account.c: account_find_from_message_file(): HeaderEntry 配列
の NULL 終端が抜けていたのを追加(再編集時にクラッシュを起こして
いた) (Michael Schwendt さん thanks)。
diff --git a/src/html.c b/src/html.c
index 6cc04e52..75e82e12 100644
--- a/src/html.c
+++ b/src/html.c
@@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2003 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2005 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -176,7 +176,7 @@ void html_parser_destroy(HTMLParser *parser)
g_free(parser);
}
-gchar *html_parse(HTMLParser *parser)
+const gchar *html_parse(HTMLParser *parser)
{
parser->state = HTML_NORMAL;
g_string_truncate(parser->str, 0);
diff --git a/src/html.h b/src/html.h
index 7267c175..37f7e11f 100644
--- a/src/html.h
+++ b/src/html.h
@@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2003 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2005 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -82,6 +82,6 @@ struct _HTMLTag
HTMLParser *html_parser_new (FILE *fp,
CodeConverter *conv);
void html_parser_destroy (HTMLParser *parser);
-gchar *html_parse (HTMLParser *parser);
+const gchar *html_parse (HTMLParser *parser);
#endif /* __HTML_H__ */
diff --git a/src/procmime.c b/src/procmime.c
index 4cb6545c..22e00de3 100644
--- a/src/procmime.c
+++ b/src/procmime.c
@@ -684,7 +684,6 @@ FILE *procmime_get_text_content(MimeInfo *mimeinfo, FILE *infp,
const gchar *src_encoding;
gboolean conv_fail = FALSE;
gchar buf[BUFFSIZE];
- gchar *str;
g_return_val_if_fail(mimeinfo != NULL, NULL);
g_return_val_if_fail(infp != NULL, NULL);
@@ -714,6 +713,8 @@ FILE *procmime_get_text_content(MimeInfo *mimeinfo, FILE *infp,
if (mimeinfo->mime_type == MIME_TEXT) {
while (fgets(buf, sizeof(buf), tmpfp) != NULL) {
+ gchar *str;
+
str = conv_codeset_strdup(buf, src_encoding, encoding);
if (str) {
fputs(str, outfp);
@@ -726,6 +727,7 @@ FILE *procmime_get_text_content(MimeInfo *mimeinfo, FILE *infp,
} else if (mimeinfo->mime_type == MIME_TEXT_HTML) {
HTMLParser *parser;
CodeConverter *conv;
+ const gchar *str;
conv = conv_code_converter_new(src_encoding, encoding);
parser = html_parser_new(tmpfp, conv);
diff --git a/src/textview.c b/src/textview.c
index fe30d64e..d5fc7353 100644
--- a/src/textview.c
+++ b/src/textview.c
@@ -729,7 +729,7 @@ static void textview_show_html(TextView *textview, FILE *fp,
CodeConverter *conv)
{
HTMLParser *parser;
- gchar *str;
+ const gchar *str;
parser = html_parser_new(fp, conv);
g_return_if_fail(parser != NULL);
@@ -740,6 +740,8 @@ static void textview_show_html(TextView *textview, FILE *fp,
else
textview_write_line(textview, str, NULL);
}
+ textview_write_line(textview, "\n", NULL);
+
html_parser_destroy(parser);
}