summaryrefslogtreecommitdiff
path: root/render/textplain.c
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2004-06-10 20:41:26 +0000
committerJames Bursa <james@netsurf-browser.org>2004-06-10 20:41:26 +0000
commit08177fa58119f9e67fdffb32ee20dbf05bd4fa78 (patch)
treedaa1124c9304e218045d12b9d531bd35e3a51565 /render/textplain.c
parentff5e70f86538bfd5a08a0ebbb7bc484ae9b841e6 (diff)
downloadnetsurf-08177fa58119f9e67fdffb32ee20dbf05bd4fa78.tar.gz
netsurf-08177fa58119f9e67fdffb32ee20dbf05bd4fa78.tar.bz2
[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
Diffstat (limited to 'render/textplain.c')
-rw-r--r--render/textplain.c10
1 files changed, 7 insertions, 3 deletions
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[] = "<html><body><pre>";
static const char footer[] = "</pre></body></html>";
-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;