summaryrefslogtreecommitdiffabout
path: root/kmicromail/libetpan
authorzautrix <zautrix>2004-11-06 23:30:02 (UTC)
committer zautrix <zautrix>2004-11-06 23:30:02 (UTC)
commit023e0e82dd8bf6421d12492a2dd25534fc43ad31 (patch) (unidiff)
treecf0533e3ccc642cb57a41953f184f457fa5365ba /kmicromail/libetpan
parentf8841c92d5251f713eb7a025af8fdee52de45b3d (diff)
downloadkdepimpi-023e0e82dd8bf6421d12492a2dd25534fc43ad31.zip
kdepimpi-023e0e82dd8bf6421d12492a2dd25534fc43ad31.tar.gz
kdepimpi-023e0e82dd8bf6421d12492a2dd25534fc43ad31.tar.bz2
many ompi fixes
Diffstat (limited to 'kmicromail/libetpan') (more/less context) (show whitespace changes)
-rw-r--r--kmicromail/libetpan/mime/mailmime_decode.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/kmicromail/libetpan/mime/mailmime_decode.c b/kmicromail/libetpan/mime/mailmime_decode.c
index dbaeb68..b2ab0f7 100644
--- a/kmicromail/libetpan/mime/mailmime_decode.c
+++ b/kmicromail/libetpan/mime/mailmime_decode.c
@@ -117,8 +117,9 @@ int mailmime_encoded_phrase_parse(const char * default_fromcode,
117 first = TRUE; 117 first = TRUE;
118 118
119 type = TYPE_ERROR; /* XXX - removes a gcc warning */ 119 type = TYPE_ERROR; /* XXX - removes a gcc warning */
120 120 // LUTZ add
121 while (1) { 121 int appendNewLine = FALSE;
122 while (1) { //while
122 123
123 r = mailmime_encoded_word_parse(message, length, &cur_token, &word); 124 r = mailmime_encoded_word_parse(message, length, &cur_token, &word);
124 if (r == MAILIMF_NO_ERROR) { 125 if (r == MAILIMF_NO_ERROR) {
@@ -199,7 +200,17 @@ int mailmime_encoded_phrase_parse(const char * default_fromcode,
199 res = MAILIMF_ERROR_PARSE; 200 res = MAILIMF_ERROR_PARSE;
200 goto free; 201 goto free;
201 } 202 }
202 203 // LUTZ add
204 if ( appendNewLine ) {
205 appendNewLine = FALSE;
206 if (mmap_string_append(gphrase, "\n") == NULL) {
207 free(wordutf8);
208 free(raw_word);
209 res = MAILIMF_ERROR_MEMORY;
210 goto free;
211 }
212 }
213 //fprintf(stderr,"append *%s* \n",wordutf8 );
203 if (mmap_string_append(gphrase, wordutf8) == NULL) { 214 if (mmap_string_append(gphrase, wordutf8) == NULL) {
204 free(wordutf8); 215 free(wordutf8);
205 free(raw_word); 216 free(raw_word);
@@ -212,7 +223,11 @@ int mailmime_encoded_phrase_parse(const char * default_fromcode,
212 first = FALSE; 223 first = FALSE;
213 } 224 }
214 else if (r == MAILIMF_ERROR_PARSE) { 225 else if (r == MAILIMF_ERROR_PARSE) {
226 // LUTZ add
227 if ( cur_token >= length )
215 break; 228 break;
229 ++cur_token;
230 appendNewLine = TRUE;
216 } 231 }
217 else { 232 else {
218 res = r; 233 res = r;