summaryrefslogtreecommitdiff
path: root/source/html/css-parse.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2014-11-19 14:57:18 +0100
committerTor Andersson <tor.andersson@artifex.com>2014-12-03 12:25:52 +0100
commit105d9d938396f867607406167c6e78f18625004d (patch)
tree472df76f21c000228ecd0ca9f6351c079282c44f /source/html/css-parse.c
parentc64f2faf180e5c14aff85e46e6fe68114f741eda (diff)
downloadmupdf-105d9d938396f867607406167c6e78f18625004d.tar.xz
html: Images.
Diffstat (limited to 'source/html/css-parse.c')
-rw-r--r--source/html/css-parse.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/source/html/css-parse.c b/source/html/css-parse.c
index c3ec8431..d454dbf1 100644
--- a/source/html/css-parse.c
+++ b/source/html/css-parse.c
@@ -749,22 +749,16 @@ struct rule *fz_parse_css(fz_context *ctx, struct rule *chain, const char *sourc
struct rule *fz_parse_css_file(fz_context *ctx, struct rule *chain, const char *filename)
{
- fz_stream *stm = NULL;
- fz_buffer *buf = NULL;
+ fz_buffer *buf = fz_read_file(ctx, filename);
- fz_var(buf);
-
- stm = fz_open_file(ctx, filename);
fz_try(ctx)
{
- buf = fz_read_all(stm, 0);
fz_write_buffer_byte(ctx, buf, 0);
chain = fz_parse_css(ctx, chain, (char*)buf->data);
}
fz_always(ctx)
{
fz_drop_buffer(ctx, buf);
- fz_close(stm);
}
fz_catch(ctx)
{