diff options
Diffstat (limited to 'render/textplain.c')
-rw-r--r-- | render/textplain.c | 10 |
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; |