From 91f8a679db6211b883ce2a7499728ee2b6a5f2af Mon Sep 17 00:00:00 2001 From: James Bursa Date: Sat, 15 Mar 2003 15:53:20 +0000 Subject: [project @ 2003-03-15 15:53:20 by bursa] MIME types for local files, new test files. svn path=/import/netsurf/; revision=107 --- render/textplain.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'render/textplain.c') diff --git a/render/textplain.c b/render/textplain.c index 84875804c..f6e157466 100644 --- a/render/textplain.c +++ b/render/textplain.c @@ -1,5 +1,5 @@ /** - * $Id: textplain.c,v 1.2 2003/02/25 21:00:27 bursa Exp $ + * $Id: textplain.c,v 1.3 2003/03/15 15:53:20 bursa Exp $ */ #include @@ -8,6 +8,7 @@ #include "libxml/HTMLparser.h" #include "netsurf/render/html.h" #include "netsurf/render/textplain.h" +#include "netsurf/utils/log.h" static const char header[] = "
";
@@ -17,7 +18,7 @@ static const char footer[] = "
"; void textplain_create(struct content *c) { html_create(c); - htmlParseChunk(c->data.html.parser, header, sizeof(header), 0); + htmlParseChunk(c->data.html.parser, header, sizeof(header) - 1, 0); } @@ -29,7 +30,7 @@ void textplain_process_data(struct content *c, char *data, unsigned long size) int textplain_convert(struct content *c, unsigned int width, unsigned int height) { - htmlParseChunk(c->data.html.parser, footer, sizeof(footer), 0); + htmlParseChunk(c->data.html.parser, footer, sizeof(footer) - 1, 0); c->type = CONTENT_HTML; return html_convert(c, width, height); } -- cgit v1.2.3