From 08177fa58119f9e67fdffb32ee20dbf05bd4fa78 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Thu, 10 Jun 2004 20:41:26 +0000 Subject: [project @ 2004-06-10 20:41:26 by bursa] Add global content list. Better error handling in content code. Improved code documentation. Remove some obsolete functions. Implement debug window listing contents. svn path=/import/netsurf/; revision=951 --- render/textplain.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'render/textplain.c') diff --git a/render/textplain.c b/render/textplain.c index 72ad98a4f..0a7f5db7c 100644 --- a/render/textplain.c +++ b/render/textplain.c @@ -15,14 +15,18 @@ static const char header[] = "
";
 static const char footer[] = "
"; -void textplain_create(struct content *c, const char *params[]) +bool textplain_create(struct content *c, const char *params[]) { - html_create(c, params); + if (!html_create(c, params)) + /* html_create() must have broadcast MSG_ERROR already, so we + * don't need to. */ + return false; htmlParseChunk(c->data.html.parser, header, sizeof(header) - 1, 0); + return true; } -int textplain_convert(struct content *c, unsigned int width, unsigned int height) +bool textplain_convert(struct content *c, int width, int height) { htmlParseChunk(c->data.html.parser, footer, sizeof(footer) - 1, 0); c->type = CONTENT_HTML; -- cgit v1.2.3