* fix compilation if iconv isn't available
authorWilfried Göesgens <willi@citadel.org>
Sat, 3 Oct 2009 20:20:48 +0000 (20:20 +0000)
committerWilfried Göesgens <willi@citadel.org>
Sat, 3 Oct 2009 20:20:48 +0000 (20:20 +0000)
webcit/decode.c
webcit/msg_renderers.c

index c702fdfa387e4fafb9c68ef861164c316e4e4cbc..9ab67465e62ed05da099ae92a0644710c95e61e4 100644 (file)
@@ -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
 
index 97b454abdbdf3cfa4f1ee2c4361f3ca6503c2eff..eeccd46ee121460e56d9f5d48bdcb65bfe241736 100644 (file)
@@ -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("<blockquote>"), 0);
                        for (i = bq; i < bn; i++)                               
                                StrBufAppendBufPlain(Target, HKEY("</blockquote>"), 0);
-
+#ifdef HAVE_ICONV
                        if (ConvertIt) {
                                StrBufConvert(Line, Line1, &ic);
                        }
-
+#endif
                        StrBufAppendBufPlain(Target, HKEY("<tt>"), 0);
                        UrlizeText(Line1, Line, Line2);