aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/codeconv.c18
-rw-r--r--src/codeconv.h7
-rw-r--r--src/compose.c4
-rw-r--r--src/html.c244
-rw-r--r--src/procmime.c17
-rw-r--r--src/procmime.h8
-rw-r--r--src/procmsg.c26
-rw-r--r--src/quote_fmt_parse.y12
-rw-r--r--src/textview.c2
9 files changed, 74 insertions, 264 deletions
diff --git a/src/codeconv.c b/src/codeconv.c
index d78c2439..906ecdfb 100644
--- a/src/codeconv.c
+++ b/src/codeconv.c
@@ -825,21 +825,24 @@ static void conv_noconv(gchar *outbuf, gint outlen, const gchar *inbuf)
strncpy2(outbuf, inbuf, outlen);
}
-CodeConverter *conv_code_converter_new(const gchar *src_charset)
+CodeConverter *conv_code_converter_new(const gchar *src_encoding,
+ const gchar *dest_encoding)
{
CodeConverter *conv;
conv = g_new0(CodeConverter, 1);
- conv->code_conv_func = conv_get_code_conv_func(src_charset, NULL);
- conv->charset_str = g_strdup(src_charset);
- conv->charset = conv_get_charset_from_str(src_charset);
+ conv->code_conv_func =
+ conv_get_code_conv_func(src_encoding, dest_encoding);
+ conv->src_encoding = g_strdup(src_encoding);
+ conv->dest_encoding = g_strdup(dest_encoding);
return conv;
}
void conv_code_converter_destroy(CodeConverter *conv)
{
- g_free(conv->charset_str);
+ g_free(conv->src_encoding);
+ g_free(conv->dest_encoding);
g_free(conv);
}
@@ -851,7 +854,8 @@ gint conv_convert(CodeConverter *conv, gchar *outbuf, gint outlen,
else {
gchar *str;
- str = conv_iconv_strdup(inbuf, conv->charset_str, NULL);
+ str = conv_iconv_strdup
+ (inbuf, conv->src_encoding, conv->dest_encoding);
if (!str)
return -1;
else {
@@ -1791,7 +1795,7 @@ gint conv_copy_file(const gchar *src, const gchar *dest, const gchar *encoding)
g_warning("can't change file mode\n");
}
- conv = conv_code_converter_new(encoding);
+ conv = conv_code_converter_new(encoding, NULL);
while (fgets(buf, sizeof(buf), src_fp) != NULL) {
if (conv_convert(conv, outbuf, sizeof(outbuf), buf) == 0)
diff --git a/src/codeconv.h b/src/codeconv.h
index 33dc2c1d..89155d7a 100644
--- a/src/codeconv.h
+++ b/src/codeconv.h
@@ -97,8 +97,8 @@ typedef void (*CodeConvFunc) (gchar *outbuf, gint outlen, const gchar *inbuf);
struct _CodeConverter
{
CodeConvFunc code_conv_func;
- gchar *charset_str;
- CharSet charset;
+ gchar *src_encoding;
+ gchar *dest_encoding;
};
#define CS_AUTO "AUTO"
@@ -176,7 +176,8 @@ CharSet conv_guess_ja_encoding(const gchar *str);
void conv_utf8todisp (gchar *outbuf, gint outlen, const gchar *inbuf);
void conv_localetodisp (gchar *outbuf, gint outlen, const gchar *inbuf);
-CodeConverter *conv_code_converter_new (const gchar *src_charset);
+CodeConverter *conv_code_converter_new (const gchar *src_encoding,
+ const gchar *dest_encoding);
void conv_code_converter_destroy (CodeConverter *conv);
gint conv_convert (CodeConverter *conv,
gchar *outbuf,
diff --git a/src/compose.c b/src/compose.c
index 2e160099..4f81babc 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -895,7 +895,7 @@ void compose_redirect(MsgInfo *msginfo, FolderItem *item)
mark = gtk_text_buffer_get_insert(buffer);
gtk_text_buffer_get_iter_at_mark(buffer, &iter, mark);
- if ((fp = procmime_get_first_text_content(msginfo)) == NULL)
+ if ((fp = procmime_get_first_text_content(msginfo, NULL)) == NULL)
g_warning(_("Can't get text part\n"));
else {
while (fgets(buf, sizeof(buf), fp) != NULL) {
@@ -950,7 +950,7 @@ void compose_reedit(MsgInfo *msginfo)
mark = gtk_text_buffer_get_insert(buffer);
gtk_text_buffer_get_iter_at_mark(buffer, &iter, mark);
- if ((fp = procmime_get_first_text_content(msginfo)) == NULL)
+ if ((fp = procmime_get_first_text_content(msginfo, NULL)) == NULL)
g_warning(_("Can't get text part\n"));
else {
while (fgets(buf, sizeof(buf), fp) != NULL) {
diff --git a/src/html.c b/src/html.c
index 71c088ac..9f6c24db 100644
--- a/src/html.c
+++ b/src/html.c
@@ -111,201 +111,7 @@ static HTMLSymbol ascii_symbol_list[] = {
{"ý", "y'"},
};
-static HTMLSymbol eucjp_symbol_list[] = {
- {"¡" , "^!"},
- {"¢" , "\xa1\xf1"},
- {"£" , "\xa1\xf2"},
- {"¥" , "\xa1\xef"},
- {"¦", "|"},
- {"§" , "\xa1\xf8"},
- {"¨" , "\xa1\xaf"},
- {"©" , "(C)"},
- {"&laquo;" , "<<"},
- {"&reg;" , "(R)"},
-
- {"&deg;" , "\xa1\xeb"},
- {"&plusmn;", "\xa1\xde"},
- {"&sup2;" , "^2"},
- {"&sup3;" , "^3"},
- {"&acute;" , "'"},
- {"&micro;" , "\xa6\xcc"},
- {"&para;" , "\xa2\xf9"},
- {"&middot;", "\xa1\xa6"},
- {"&cedil;" , ","},
- {"&sup1;" , "^1"},
- {"&raquo;" , ">>"},
- {"&frac14;", "1/4"},
- {"&frac12;", "1/2"},
- {"&frac34;", "3/4"},
- {"&iquest;", "^?"},
-
- {"&Agrave;", "A`"},
- {"&Aacute;", "A'"},
- {"&Acirc;" , "A^"},
- {"&Atilde;", "A~"},
- {"&Auml;" , "A\xa1\xaf"},
- {"&Aring;" , "A\xa1\xeb"},
- {"&AElig;" , "AE"},
- {"&Egrave;", "E`"},
- {"&Eacute;", "E'"},
- {"&Ecirc;" , "E^"},
- {"&Euml;" , "E\xa1\xaf"},
- {"&Igrave;", "I`"},
- {"&Iacute;", "I'"},
- {"&Icirc;" , "I^"},
- {"&Iuml;" , "I\xa1\xaf"},
-
- {"&Ntilde;", "N~"},
- {"&Ograve;", "O`"},
- {"&Oacute;", "O'"},
- {"&Ocirc;" , "O^"},
- {"&Otilde;", "O~"},
- {"&Ouml;" , "O\xa1\xaf"},
- {"&times;" , "\xa1\xdf"},
- {"&Ugrave;", "U`"},
- {"&Uacute;", "U'"},
- {"&Ucirc;" , "U^"},
- {"&Uuml;" , "U\xa1\xaf"},
- {"&Yacute;", "Y'"},
-
- {"&agrave;", "a`"},
- {"&aacute;", "a'"},
- {"&acirc;" , "a^"},
- {"&atilde;", "a~"},
- {"&auml;" , "a\xa1\xaf"},
- {"&aring;" , "a\xa1\xeb"},
- {"&aelig;" , "ae"},
- {"&egrave;", "e`"},
- {"&eacute;", "e'"},
- {"&ecirc;" , "e^"},
- {"&euml;" , "e\xa1\xaf"},
- {"&igrave;", "i`"},
- {"&iacute;", "i'"},
- {"&icirc;" , "i^"},
- {"&iuml;" , "i\xa1\xaf"},
-
- {"&eth;" , "\xa2\xdf"},
- {"&ntilde;", "n~"},
- {"&ograve;", "o`"},
- {"&oacute;", "o'"},
- {"&ocirc;" , "o^"},
- {"&otilde;", "o~"},
- {"&ouml;" , "o\xa1\xaf"},
- {"&divide;", "\xa1\xe0"},
- {"&ugrave;", "u`"},
- {"&uacute;", "u'"},
- {"&ucirc;" , "u^"},
- {"&uuml;" , "u\xa1\xaf"},
- {"&yacute;", "y'"},
- {"&yuml;" , "y\xa1\xaf"},
-};
-
-static HTMLSymbol latin_symbol_list[] = {
- {"&iexcl;" , "\xa1"},
- {"&cent;" , "\xa2"},
- {"&pound;" , "\xa3"},
- {"&curren;", "\xa4"},
- {"&yen;" , "\xa5"},
- {"&brvbar;", "\xa6"},
- {"&sect;" , "\xa7"},
- {"&uml;" , "\xa8"},
- {"&copy;" , "\xa9"},
- {"&ordf;" , "\xaa"},
- {"&laquo;" , "\xab"},
- {"&not;" , "\xac"},
- {"&shy;" , "\xad"},
- {"&reg;" , "\xae"},
- {"&macr;" , "\xaf"},
-
- {"&deg;" , "\xb0"},
- {"&plusmn;", "\xb1"},
- {"&sup2;" , "\xb2"},
- {"&sup3;" , "\xb3"},
- {"&acute;" , "\xb4"},
- {"&micro;" , "\xb5"},
- {"&para;" , "\xb6"},
- {"&middot;", "\xb7"},
- {"&cedil;" , "\xb8"},
- {"&sup1;" , "\xb9"},
- {"&ordm;" , "\xba"},
- {"&raquo;" , "\xbb"},
- {"&frac14;", "\xbc"},
- {"&frac12;", "\xbd"},
- {"&frac34;", "\xbe"},
- {"&iquest;", "\xbf"},
-
- {"&Agrave;", "\xc0"},
- {"&Aacute;", "\xc1"},
- {"&Acirc;" , "\xc2"},
- {"&Atilde;", "\xc3"},
- {"&Auml;" , "\xc4"},
- {"&Aring;" , "\xc5"},
- {"&AElig;" , "\xc6"},
- {"&Ccedil;", "\xc7"},
- {"&Egrave;", "\xc8"},
- {"&Eacute;", "\xc9"},
- {"&Ecirc;" , "\xca"},
- {"&Euml;" , "\xcb"},
- {"&Igrave;", "\xcc"},
- {"&Iacute;", "\xcd"},
- {"&Icirc;" , "\xce"},
- {"&Iuml;" , "\xcf"},
-
- {"&ETH;" , "\xd0"},
- {"&Ntilde;", "\xd1"},
- {"&Ograve;", "\xd2"},
- {"&Oacute;", "\xd3"},
- {"&Ocirc;" , "\xd4"},
- {"&Otilde;", "\xd5"},
- {"&Ouml;" , "\xd6"},
- {"&times;" , "\xd7"},
- {"&Oslash;", "\xd8"},
- {"&Ugrave;", "\xd9"},
- {"&Uacute;", "\xda"},
- {"&Ucirc;" , "\xdb"},
- {"&Uuml;" , "\xdc"},
- {"&Yacute;", "\xdd"},
- {"&THORN;" , "\xde"},
- {"&szlig;" , "\xdf"},
-
- {"&agrave;", "\xe0"},
- {"&aacute;", "\xe1"},
- {"&acirc;" , "\xe2"},
- {"&atilde;", "\xe3"},
- {"&auml;" , "\xe4"},
- {"&aring;" , "\xe5"},
- {"&aelig;" , "\xe6"},
- {"&ccedil;", "\xe7"},
- {"&egrave;", "\xe8"},
- {"&eacute;", "\xe9"},
- {"&ecirc;" , "\xea"},
- {"&euml;" , "\xeb"},
- {"&igrave;", "\xec"},
- {"&iacute;", "\xed"},
- {"&icirc;" , "\xee"},
- {"&iuml;" , "\xef"},
-
- {"&eth;" , "\xf0"},
- {"&ntilde;", "\xf1"},
- {"&ograve;", "\xf2"},
- {"&oacute;", "\xf3"},
- {"&ocirc;" , "\xf4"},
- {"&otilde;", "\xf5"},
- {"&ouml;" , "\xf6"},
- {"&divide;", "\xf7"},
- {"&oslash;", "\xf8"},
- {"&ugrave;", "\xf9"},
- {"&uacute;", "\xfa"},
- {"&ucirc;" , "\xfb"},
- {"&uuml;" , "\xfc"},
- {"&yacute;", "\xfd"},
- {"&thorn;" , "\xfe"},
- {"&yuml;" , "\xff"},
-};
-
static GHashTable *default_symbol_table;
-static GHashTable *eucjp_symbol_table;
-static GHashTable *latin_symbol_table;
static HTMLState html_read_line (HTMLParser *parser);
static void html_append_char (HTMLParser *parser,
@@ -354,31 +160,10 @@ HTMLParser *html_parser_new(FILE *fp, CodeConverter *conv)
SYMBOL_TABLE_ADD(default_symbol_table, symbol_list);
SYMBOL_TABLE_ADD(default_symbol_table, ascii_symbol_list);
}
- if (!eucjp_symbol_table) {
- eucjp_symbol_table =
- g_hash_table_new(g_str_hash, g_str_equal);
- SYMBOL_TABLE_ADD(eucjp_symbol_table, symbol_list);
- SYMBOL_TABLE_ADD(eucjp_symbol_table, eucjp_symbol_list);
- }
- if (!latin_symbol_table) {
- latin_symbol_table =
- g_hash_table_new(g_str_hash, g_str_equal);
- SYMBOL_TABLE_ADD(latin_symbol_table, symbol_list);
- SYMBOL_TABLE_ADD(latin_symbol_table, latin_symbol_list);
- }
#undef SYMBOL_TABLE_ADD
- if (conv->charset == C_ISO_8859_1)
- parser->symbol_table = latin_symbol_table;
- else if ((conv->charset == C_ISO_2022_JP ||
- conv->charset == C_ISO_2022_JP_2 ||
- conv->charset == C_EUC_JP ||
- conv->charset == C_SHIFT_JIS) &&
- conv_get_locale_charset() == C_EUC_JP)
- parser->symbol_table = eucjp_symbol_table;
- else
- parser->symbol_table = default_symbol_table;
+ parser->symbol_table = default_symbol_table;
return parser;
}
@@ -529,7 +314,7 @@ static HTMLTag *html_get_tag(const gchar *str)
tag = g_new0(HTMLTag, 1);
- for (tmpp = tmp; *tmpp != '\0' && !isspace(*tmpp); tmpp++)
+ for (tmpp = tmp; *tmpp != '\0' && !g_ascii_isspace(*tmpp); tmpp++)
;
if (*tmpp == '\0') {
@@ -549,18 +334,20 @@ static HTMLTag *html_get_tag(const gchar *str)
gchar *p;
gchar quote;
- while (isspace(*tmpp)) tmpp++;
+ while (g_ascii_isspace(*tmpp)) tmpp++;
attr_name = tmpp;
- while (*tmpp != '\0' && !isspace(*tmpp) && *tmpp != '=') tmpp++;
+ while (*tmpp != '\0' && !g_ascii_isspace(*tmpp) &&
+ *tmpp != '=')
+ tmpp++;
if (*tmpp != '\0' && *tmpp != '=') {
*tmpp++ = '\0';
- while (isspace(*tmpp)) tmpp++;
+ while (g_ascii_isspace(*tmpp)) tmpp++;
}
if (*tmpp == '=') {
*tmpp++ = '\0';
- while (isspace(*tmpp)) tmpp++;
+ while (g_ascii_isspace(*tmpp)) tmpp++;
if (*tmpp == '"' || *tmpp == '\'') {
/* name="value" */
@@ -573,11 +360,11 @@ static HTMLTag *html_get_tag(const gchar *str)
}
tmpp = p;
*tmpp++ = '\0';
- while (isspace(*tmpp)) tmpp++;
+ while (g_ascii_isspace(*tmpp)) tmpp++;
} else {
/* name=value */
attr_value = tmpp;
- while (*tmpp != '\0' && !isspace(*tmpp)) tmpp++;
+ while (*tmpp != '\0' && !g_ascii_isspace(*tmpp)) tmpp++;
if (*tmpp != '\0')
*tmpp++ = '\0';
}
@@ -664,7 +451,7 @@ static HTMLState html_parse_tag(HTMLParser *parser)
!strcmp(tag->name, "li") ||
!strcmp(tag->name, "table") ||
!strcmp(tag->name, "tr") ||
- (tag->name[0] == 'h' && isdigit((guchar)tag->name[1]))) {
+ (tag->name[0] == 'h' && g_ascii_isdigit(tag->name[1]))) {
if (!parser->newline) {
parser->space = FALSE;
html_append_char(parser, '\n');
@@ -673,7 +460,7 @@ static HTMLState html_parse_tag(HTMLParser *parser)
} else if (!strcmp(tag->name, "/table") ||
(tag->name[0] == '/' &&
tag->name[1] == 'h' &&
- isdigit((guchar)tag->name[1]))) {
+ g_ascii_isdigit(tag->name[1]))) {
if (!parser->empty_line) {
parser->space = FALSE;
if (!parser->newline) html_append_char(parser, '\n');
@@ -721,13 +508,12 @@ static void html_parse_special(HTMLParser *parser)
html_append_str(parser, val, -1);
parser->state = HTML_NORMAL;
return;
- } else if (symbol_name[1] == '#' && isdigit((guchar)symbol_name[2])) {
+ } else if (symbol_name[1] == '#' && g_ascii_isdigit(symbol_name[2])) {
gint ch;
+ /* TODO: support other entity references */
ch = atoi(symbol_name + 2);
- if ((ch > 0 && ch <= 127) ||
- (ch >= 128 && ch <= 255 &&
- parser->conv->charset == C_ISO_8859_1)) {
+ if (g_ascii_isprint(ch)) {
html_append_char(parser, ch);
parser->state = HTML_NORMAL;
return;
diff --git a/src/procmime.c b/src/procmime.c
index eabeb853..2dd27c7d 100644
--- a/src/procmime.c
+++ b/src/procmime.c
@@ -678,10 +678,11 @@ gint procmime_get_part_fp(const gchar *outfile, FILE *infp, MimeInfo *mimeinfo)
return 0;
}
-FILE *procmime_get_text_content(MimeInfo *mimeinfo, FILE *infp)
+FILE *procmime_get_text_content(MimeInfo *mimeinfo, FILE *infp,
+ const gchar *encoding)
{
FILE *tmpfp, *outfp;
- gchar *src_codeset;
+ const gchar *src_encoding;
gboolean conv_fail = FALSE;
gchar buf[BUFFSIZE];
gchar *str;
@@ -709,12 +710,12 @@ FILE *procmime_get_text_content(MimeInfo *mimeinfo, FILE *infp)
return NULL;
}
- src_codeset = prefs_common.force_charset
+ src_encoding = prefs_common.force_charset
? prefs_common.force_charset : mimeinfo->charset;
if (mimeinfo->mime_type == MIME_TEXT) {
while (fgets(buf, sizeof(buf), tmpfp) != NULL) {
- str = conv_codeset_strdup(buf, src_codeset, NULL);
+ str = conv_codeset_strdup(buf, src_encoding, encoding);
if (str) {
fputs(str, outfp);
g_free(str);
@@ -727,7 +728,7 @@ FILE *procmime_get_text_content(MimeInfo *mimeinfo, FILE *infp)
HTMLParser *parser;
CodeConverter *conv;
- conv = conv_code_converter_new(src_codeset);
+ conv = conv_code_converter_new(src_encoding, encoding);
parser = html_parser_new(tmpfp, conv);
while ((str = html_parse(parser)) != NULL) {
fputs(str, outfp);
@@ -747,7 +748,7 @@ FILE *procmime_get_text_content(MimeInfo *mimeinfo, FILE *infp)
/* search the first text part of (multipart) MIME message,
decode, convert it and output to outfp. */
-FILE *procmime_get_first_text_content(MsgInfo *msginfo)
+FILE *procmime_get_first_text_content(MsgInfo *msginfo, const gchar *encoding)
{
FILE *infp, *outfp = NULL;
MimeInfo *mimeinfo, *partinfo;
@@ -772,7 +773,7 @@ FILE *procmime_get_first_text_content(MsgInfo *msginfo)
}
if (partinfo)
- outfp = procmime_get_text_content(partinfo, infp);
+ outfp = procmime_get_text_content(partinfo, infp, encoding);
fclose(infp);
procmime_mimeinfo_free_all(mimeinfo);
@@ -798,7 +799,7 @@ gboolean procmime_find_string_part(MimeInfo *mimeinfo, const gchar *filename,
return FALSE;
}
- outfp = procmime_get_text_content(mimeinfo, infp);
+ outfp = procmime_get_text_content(mimeinfo, infp, NULL);
fclose(infp);
if (!outfp)
diff --git a/src/procmime.h b/src/procmime.h
index c8b49435..e4014bb2 100644
--- a/src/procmime.h
+++ b/src/procmime.h
@@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2004 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
@@ -156,8 +156,10 @@ gint procmime_get_part_fp (const gchar *outfile,
FILE *infp,
MimeInfo *mimeinfo);
FILE *procmime_get_text_content (MimeInfo *mimeinfo,
- FILE *infp);
-FILE *procmime_get_first_text_content (MsgInfo *msginfo);
+ FILE *infp,
+ const gchar *encoding);
+FILE *procmime_get_first_text_content (MsgInfo *msginfo,
+ const gchar *encoding);
gboolean procmime_find_string_part (MimeInfo *mimeinfo,
const gchar *filename,
diff --git a/src/procmsg.c b/src/procmsg.c
index 985b1871..93a474ab 100644
--- a/src/procmsg.c
+++ b/src/procmsg.c
@@ -36,6 +36,7 @@
#include "prefs_filter.h"
#include "filter.h"
#include "folder.h"
+#include "codeconv.h"
#if USE_GPGME
# include "rfc2015.h"
#endif
@@ -1297,7 +1298,8 @@ void procmsg_print_message(MsgInfo *msginfo, const gchar *cmdline)
g_return_if_fail(msginfo);
- if ((tmpfp = procmime_get_first_text_content(msginfo)) == NULL) {
+ if ((tmpfp = procmime_get_first_text_content
+ (msginfo, conv_get_locale_charset_str())) == NULL) {
g_warning(_("Can't get text part\n"));
return;
}
@@ -1312,14 +1314,24 @@ void procmsg_print_message(MsgInfo *msginfo, const gchar *cmdline)
return;
}
- if (msginfo->date) fprintf(prfp, "Date: %s\n", msginfo->date);
- if (msginfo->from) fprintf(prfp, "From: %s\n", msginfo->from);
- if (msginfo->to) fprintf(prfp, "To: %s\n", msginfo->to);
- if (msginfo->newsgroups)
- fprintf(prfp, "Newsgroups: %s\n", msginfo->newsgroups);
- if (msginfo->subject) fprintf(prfp, "Subject: %s\n", msginfo->subject);
+#define OUTPUT_HEADER(s, fmt) \
+ if (s) { \
+ gchar *locale_str; \
+ locale_str = conv_codeset_strdup \
+ (s, CS_INTERNAL, conv_get_locale_charset_str()); \
+ fprintf(prfp, fmt, locale_str ? locale_str : s); \
+ g_free(locale_str); \
+ }
+
+ OUTPUT_HEADER(msginfo->date, "Date: %s\n");
+ OUTPUT_HEADER(msginfo->from, "From: %s\n");
+ OUTPUT_HEADER(msginfo->to, "To: %s\n");
+ OUTPUT_HEADER(msginfo->newsgroups, "Newsgroups: %s\n");
+ OUTPUT_HEADER(msginfo->subject, "Subject: %s\n");
fputc('\n', prfp);
+#undef OUTPUT_HEADER
+
while (fgets(buf, sizeof(buf), tmpfp) != NULL)
fputs(buf, prfp);
diff --git a/src/quote_fmt_parse.y b/src/quote_fmt_parse.y
index c44edf01..93b46314 100644
--- a/src/quote_fmt_parse.y
+++ b/src/quote_fmt_parse.y
@@ -272,7 +272,8 @@ special:
if (body)
fp = str_open_as_stream(body);
else
- fp = procmime_get_first_text_content(msginfo);
+ fp = procmime_get_first_text_content
+ (msginfo, NULL);
if (fp == NULL)
g_warning("Can't get text part\n");
@@ -294,7 +295,8 @@ special:
if (body)
fp = str_open_as_stream(body);
else
- fp = procmime_get_first_text_content(msginfo);
+ fp = procmime_get_first_text_content
+ (msginfo, NULL);
if (fp == NULL)
g_warning("Can't get text part\n");
@@ -318,7 +320,8 @@ special:
if (body)
fp = str_open_as_stream(body);
else
- fp = procmime_get_first_text_content(msginfo);
+ fp = procmime_get_first_text_content
+ (msginfo, NULL);
if (fp == NULL)
g_warning("Can't get text part\n");
@@ -342,7 +345,8 @@ special:
if (body)
fp = str_open_as_stream(body);
else
- fp = procmime_get_first_text_content(msginfo);
+ fp = procmime_get_first_text_content
+ (msginfo, NULL);
if (fp == NULL)
g_warning("Can't get text part\n");
diff --git a/src/textview.c b/src/textview.c
index 17968e98..03fd6885 100644
--- a/src/textview.c
+++ b/src/textview.c
@@ -729,7 +729,7 @@ static void textview_write_body(TextView *textview, MimeInfo *mimeinfo,
gchar buf[BUFFSIZE];
CodeConverter *conv;
- conv = conv_code_converter_new(charset);
+ conv = conv_code_converter_new(charset, NULL);
tmpfp = procmime_decode_content(NULL, fp, mimeinfo);
if (tmpfp) {