fix problem with rich text handling, r=asuth, sr=standard8, 495057

This commit is contained in:
David Bienvenu 2009-06-01 13:41:42 -07:00
Родитель 940a5d5950
Коммит b5dd4396b3
2 изменённых файлов: 4 добавлений и 15 удалений

Просмотреть файл

@ -66,8 +66,7 @@ MimeInlineTextRichtextClassInitialize(MimeInlineTextRichtextClass *clazz)
*/
int
MimeRichtextConvert (const char *line, PRInt32 length,
int (*output_fn) (const char *buf, PRInt32 size, void *closure),
void *closure,
MimeObject *obj,
char **obufferP,
PRInt32 *obuffer_sizeP,
PRBool enriched_p)
@ -122,7 +121,7 @@ MimeRichtextConvert (const char *line, PRInt32 length,
if (this_start >= line + length) /* blank line */
{
PL_strncpyz (*obufferP, "<BR>", *obuffer_sizeP);
return output_fn (*obufferP, strlen(*obufferP), closure);
return MimeObject_write(obj, *obufferP, strlen(*obufferP), PR_TRUE);
}
}
@ -345,7 +344,7 @@ MimeRichtextConvert (const char *line, PRInt32 length,
}
*out = 0;
return output_fn (*obufferP, out - *obufferP, closure);
return MimeObject_write(obj, *obufferP, out - *obufferP, PR_TRUE);
}
@ -356,8 +355,7 @@ MimeInlineTextRichtext_parse_line (const char *line, PRInt32 length, MimeObject
->enriched_p);
return MimeRichtextConvert (line, length,
obj->options->output_fn,
obj->options->stream_closure,
obj,
&obj->obuffer, &obj->obuffer_size,
enriched_p);
}

Просмотреть файл

@ -59,13 +59,4 @@ struct MimeInlineTextRichtext {
MimeInlineText text;
};
extern int
MimeRichtextConvert (char *line, PRInt32 length,
int (*output_fn) (const char *buf, PRInt32 size, void *closure),
void *closure,
char **obufferP,
PRInt32 *obuffer_sizeP,
PRBool enriched_p);
#endif /* _MIMETRIC_H_ */