From: Wilfried Göesgens Date: Sat, 3 Oct 2009 20:20:48 +0000 (+0000) Subject: * fix compilation if iconv isn't available X-Git-Tag: v7.86~805 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=c3cd364e864859835ebfe6e0aeda2bb07160063f * fix compilation if iconv isn't available --- diff --git a/webcit/decode.c b/webcit/decode.c index c702fdfa3..9ab67465e 100644 --- a/webcit/decode.c +++ b/webcit/decode.c @@ -235,7 +235,7 @@ void utf8ify_rfc822_string(char **buf) { } #else -inline void utf8ify_rfc822_string(char *a){}; +inline void utf8ify_rfc822_string(char **a){}; #endif diff --git a/webcit/msg_renderers.c b/webcit/msg_renderers.c index 97b454abd..eeccd46ee 100644 --- a/webcit/msg_renderers.c +++ b/webcit/msg_renderers.c @@ -816,7 +816,6 @@ void render_MAIL_variformat(wc_mime_attachment *Mime, StrBuf *RawData, StrBuf *F void render_MAIL_text_plain(wc_mime_attachment *Mime, StrBuf *RawData, StrBuf *FoundCharset) { - StrBuf *cs = NULL; const char *ptr, *pte; const char *BufPtr = NULL; StrBuf *Line; @@ -824,12 +823,13 @@ void render_MAIL_text_plain(wc_mime_attachment *Mime, StrBuf *RawData, StrBuf *F StrBuf *Line2; StrBuf *Target; - int ConvertIt = 1; int bn = 0; int bq = 0; int i; long len; #ifdef HAVE_ICONV + StrBuf *cs = NULL; + int ConvertIt = 1; iconv_t ic = (iconv_t)(-1) ; #endif @@ -899,11 +899,11 @@ void render_MAIL_text_plain(wc_mime_attachment *Mime, StrBuf *RawData, StrBuf *F StrBufAppendBufPlain(Target, HKEY("
"), 0); for (i = bq; i < bn; i++) StrBufAppendBufPlain(Target, HKEY("
"), 0); - +#ifdef HAVE_ICONV if (ConvertIt) { StrBufConvert(Line, Line1, &ic); } - +#endif StrBufAppendBufPlain(Target, HKEY(""), 0); UrlizeText(Line1, Line, Line2);