diff options
Diffstat (limited to 'xps')
-rw-r--r-- | xps/muxps.h | 1 | ||||
-rw-r--r-- | xps/xps_tiff.c | 4 | ||||
-rw-r--r-- | xps/xps_zip.c | 5 |
3 files changed, 5 insertions, 5 deletions
diff --git a/xps/muxps.h b/xps/muxps.h index bbdbfea5..f456baf5 100644 --- a/xps/muxps.h +++ b/xps/muxps.h @@ -233,6 +233,7 @@ struct xps_context_s }; int xps_open_file(xps_context **ctxp, char *filename); +int xps_open_stream(xps_context **ctxp, fz_stream *file); void xps_free_context(xps_context *ctx); #endif diff --git a/xps/xps_tiff.c b/xps/xps_tiff.c index 13c4d7f1..d946434f 100644 --- a/xps/xps_tiff.c +++ b/xps/xps_tiff.c @@ -303,8 +303,8 @@ xps_expand_tiff_colormap(struct tiff *tiff) int maxval = 1 << tiff->bitspersample; byte *samples; byte *src, *dst; - int stride; - int x, y; + unsigned int x, y; + unsigned int stride; /* colormap has first all red, then all green, then all blue values */ /* colormap values are 0..65535, bits is 4 or 8 */ diff --git a/xps/xps_zip.c b/xps/xps_zip.c index ab36954b..57769b59 100644 --- a/xps/xps_zip.c +++ b/xps/xps_zip.c @@ -390,7 +390,7 @@ xps_read_part(xps_context *ctx, char *partname) return xps_read_zip_part(ctx, partname); } -int +static int xps_open_directory(xps_context **ctxp, char *directory) { xps_context *ctx; @@ -470,10 +470,9 @@ xps_open_file(xps_context **ctxp, char *filename) return fz_throw("cannot open file '%s': %s", filename, strerror(errno)); code = xps_open_stream(ctxp, file); + fz_close(file); if (code) return fz_rethrow(code, "cannot load document '%s'", filename); - - fz_close(file); return fz_okay; } |