summaryrefslogtreecommitdiff
path: root/source/html/html-doc.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2016-12-28 13:19:47 +0100
committerTor Andersson <tor.andersson@artifex.com>2017-01-09 13:21:40 +0100
commitbbcc85a9f746c161b2e23c6057e69ec7b967252b (patch)
tree8ead60bd762cc0cbf945c002c769e74699594c0b /source/html/html-doc.c
parente9667e7f8ab7c154d8932916a22c33cf2bad0445 (diff)
downloadmupdf-bbcc85a9f746c161b2e23c6057e69ec7b967252b.tar.xz
Add fz_terminate_buffer function.
Non-destructively zero terminate a fz_buffer for use as a C string.
Diffstat (limited to 'source/html/html-doc.c')
-rw-r--r--source/html/html-doc.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/source/html/html-doc.c b/source/html/html-doc.c
index 05a86d83..c19d5049 100644
--- a/source/html/html-doc.c
+++ b/source/html/html-doc.c
@@ -139,12 +139,8 @@ htdoc_open_document_with_stream(fz_context *ctx, fz_stream *file)
doc->set = fz_new_html_font_set(ctx);
buf = fz_read_all(ctx, file, 0);
-
fz_try(ctx)
- {
- fz_write_buffer_byte(ctx, buf, 0);
doc->html = fz_parse_html(ctx, doc->set, doc->zip, ".", buf, fz_user_css(ctx));
- }
fz_always(ctx)
fz_drop_buffer(ctx, buf);
fz_catch(ctx)
@@ -175,12 +171,8 @@ htdoc_open_document(fz_context *ctx, const char *filename)
doc->set = fz_new_html_font_set(ctx);
buf = fz_read_file(ctx, filename);
-
fz_try(ctx)
- {
- fz_write_buffer_byte(ctx, buf, 0);
doc->html = fz_parse_html(ctx, doc->set, doc->zip, ".", buf, fz_user_css(ctx));
- }
fz_always(ctx)
fz_drop_buffer(ctx, buf);
fz_catch(ctx)