summaryrefslogtreecommitdiff
path: root/xps
diff options
context:
space:
mode:
Diffstat (limited to 'xps')
-rw-r--r--xps/muxps.h6
-rw-r--r--xps/xps_zip.c16
2 files changed, 11 insertions, 11 deletions
diff --git a/xps/muxps.h b/xps/muxps.h
index c708ac60..e7bdfa41 100644
--- a/xps/muxps.h
+++ b/xps/muxps.h
@@ -251,9 +251,9 @@ struct xps_document_s
fz_device *dev;
};
-xps_document *xps_open_file(fz_context *ctx, char *filename);
-xps_document *xps_open_stream(fz_stream *file);
-void xps_free_context(xps_document *doc);
+xps_document *xps_open_document(fz_context *ctx, char *filename);
+xps_document *xps_open_document_with_stream(fz_stream *file);
+void xps_close_document(xps_document *doc);
/*
* Parsing helper functions
diff --git a/xps/xps_zip.c b/xps/xps_zip.c
index cc7fbb5e..f38538c3 100644
--- a/xps/xps_zip.c
+++ b/xps/xps_zip.c
@@ -451,7 +451,7 @@ xps_has_part(xps_document *doc, char *partname)
}
static xps_document *
-xps_open_directory(fz_context *ctx, char *directory)
+xps_open_document_with_directory(fz_context *ctx, char *directory)
{
xps_document *doc;
@@ -467,7 +467,7 @@ xps_open_directory(fz_context *ctx, char *directory)
}
fz_catch(ctx)
{
- xps_free_context(doc);
+ xps_close_document(doc);
fz_rethrow(ctx);
}
@@ -475,7 +475,7 @@ xps_open_directory(fz_context *ctx, char *directory)
}
xps_document *
-xps_open_stream(fz_stream *file)
+xps_open_document_with_stream(fz_stream *file)
{
fz_context *ctx = file->ctx;
xps_document *doc;
@@ -493,7 +493,7 @@ xps_open_stream(fz_stream *file)
}
fz_catch(ctx)
{
- xps_free_context(doc);
+ xps_close_document(doc);
fz_rethrow(ctx);
}
@@ -501,7 +501,7 @@ xps_open_stream(fz_stream *file)
}
xps_document *
-xps_open_file(fz_context *ctx, char *filename)
+xps_open_document(fz_context *ctx, char *filename)
{
char buf[2048];
fz_stream *file;
@@ -515,7 +515,7 @@ xps_open_file(fz_context *ctx, char *filename)
if (!p)
p = strstr(buf, "\\_rels\\.rels");
*p = 0;
- return xps_open_directory(ctx, buf);
+ return xps_open_document_with_directory(ctx, buf);
}
file = fz_open_file(ctx, filename);
@@ -524,7 +524,7 @@ xps_open_file(fz_context *ctx, char *filename)
fz_try(ctx)
{
- doc = xps_open_stream(file);
+ doc = xps_open_document_with_stream(file);
}
fz_catch(ctx)
{
@@ -536,7 +536,7 @@ xps_open_file(fz_context *ctx, char *filename)
}
void
-xps_free_context(xps_document *doc)
+xps_close_document(xps_document *doc)
{
xps_font_cache *font, *next;
int i;