summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rw-r--r--include/mupdf/fitz/store.h1
-rw-r--r--include/mupdf/fitz/text.h1
-rw-r--r--source/xps/xps-common.c3
-rw-r--r--source/xps/xps-doc.c5
-rw-r--r--source/xps/xps-glyphs.c3
-rw-r--r--source/xps/xps-gradient.c3
-rw-r--r--source/xps/xps-image.c3
-rw-r--r--source/xps/xps-imp.h (renamed from include/mupdf/xps.h)18
-rw-r--r--source/xps/xps-link.c3
-rw-r--r--source/xps/xps-outline.c3
-rw-r--r--source/xps/xps-path.c3
-rw-r--r--source/xps/xps-resource.c3
-rw-r--r--source/xps/xps-tile.c3
-rw-r--r--source/xps/xps-util.c3
-rw-r--r--source/xps/xps-zip.c5
16 files changed, 31 insertions, 32 deletions
diff --git a/Makefile b/Makefile
index c6253230..c85f7f5e 100644
--- a/Makefile
+++ b/Makefile
@@ -84,7 +84,6 @@ ALL_DIR += $(OUT)/fonts
FITZ_HDR := include/mupdf/fitz.h $(wildcard include/mupdf/fitz/*.h)
PDF_HDR := include/mupdf/pdf.h $(wildcard include/mupdf/pdf/*.h)
-XPS_HDR := include/mupdf/xps.h
SVG_HDR := include/mupdf/svg.h
HTML_HDR := include/mupdf/html.h
@@ -113,7 +112,7 @@ GPRF_OBJ := $(subst source/, $(OUT)/, $(addsuffix .o, $(basename $(GPRF_SRC))))
$(FITZ_OBJ) : $(FITZ_HDR) $(FITZ_SRC_HDR)
$(PDF_OBJ) : $(FITZ_HDR) $(PDF_HDR) $(PDF_SRC_HDR)
-$(XPS_OBJ) : $(FITZ_HDR) $(XPS_HDR) $(XPS_SRC_HDR)
+$(XPS_OBJ) : $(FITZ_HDR) $(XPS_SRC_HDR)
$(SVG_OBJ) : $(FITZ_HDR) $(SVG_HDR) $(SVG_SRC_HDR)
$(CBZ_OBJ) : $(FITZ_HDR)
$(HTML_OBJ) : $(FITZ_HDR) $(HTML_HDR) $(HTML_SRC_HDR)
diff --git a/include/mupdf/fitz/store.h b/include/mupdf/fitz/store.h
index a3c45b7f..90c93b5c 100644
--- a/include/mupdf/fitz/store.h
+++ b/include/mupdf/fitz/store.h
@@ -3,6 +3,7 @@
#include "mupdf/fitz/system.h"
#include "mupdf/fitz/context.h"
+#include "mupdf/fitz/output.h"
/*
Resource store
diff --git a/include/mupdf/fitz/text.h b/include/mupdf/fitz/text.h
index ceca3336..e8efa4db 100644
--- a/include/mupdf/fitz/text.h
+++ b/include/mupdf/fitz/text.h
@@ -5,6 +5,7 @@
#include "mupdf/fitz/context.h"
#include "mupdf/fitz/font.h"
#include "mupdf/fitz/path.h"
+#include "mupdf/fitz/bidi.h"
/*
* Text buffer.
diff --git a/source/xps/xps-common.c b/source/xps/xps-common.c
index 61e0932f..1843a41c 100644
--- a/source/xps/xps-common.c
+++ b/source/xps/xps-common.c
@@ -1,4 +1,5 @@
-#include "mupdf/xps.h"
+#include "mupdf/fitz.h"
+#include "xps-imp.h"
static inline int unhex(int a)
{
diff --git a/source/xps/xps-doc.c b/source/xps/xps-doc.c
index 457b2d6b..d530bdbd 100644
--- a/source/xps/xps-doc.c
+++ b/source/xps/xps-doc.c
@@ -1,4 +1,5 @@
-#include "mupdf/xps.h"
+#include "mupdf/fitz.h"
+#include "xps-imp.h"
#define REL_START_PART \
"http://schemas.microsoft.com/xps/2005/06/fixedrepresentation"
@@ -405,7 +406,7 @@ xps_load_fixed_page(fz_context *ctx, xps_document *doc, xps_fixpage *page)
return root;
}
-fz_rect *
+static fz_rect *
xps_bound_page(fz_context *ctx, xps_page *page, fz_rect *bounds)
{
bounds->x0 = bounds->y0 = 0;
diff --git a/source/xps/xps-glyphs.c b/source/xps/xps-glyphs.c
index 242c4dd2..0ea1ab9d 100644
--- a/source/xps/xps-glyphs.c
+++ b/source/xps/xps-glyphs.c
@@ -1,4 +1,5 @@
-#include "mupdf/xps.h"
+#include "mupdf/fitz.h"
+#include "xps-imp.h"
#include <ft2build.h>
#include FT_FREETYPE_H
diff --git a/source/xps/xps-gradient.c b/source/xps/xps-gradient.c
index 5150ca61..c33352e0 100644
--- a/source/xps/xps-gradient.c
+++ b/source/xps/xps-gradient.c
@@ -1,4 +1,5 @@
-#include "mupdf/xps.h"
+#include "mupdf/fitz.h"
+#include "xps-imp.h"
#define MAX_STOPS 256
diff --git a/source/xps/xps-image.c b/source/xps/xps-image.c
index ddd63904..83f7ac0d 100644
--- a/source/xps/xps-image.c
+++ b/source/xps/xps-image.c
@@ -1,4 +1,5 @@
-#include "mupdf/xps.h"
+#include "mupdf/fitz.h"
+#include "xps-imp.h"
static fz_image *
xps_load_image(fz_context *ctx, xps_document *doc, xps_part *part)
diff --git a/include/mupdf/xps.h b/source/xps/xps-imp.h
index c5350e58..4f21fb95 100644
--- a/include/mupdf/xps.h
+++ b/source/xps/xps-imp.h
@@ -1,7 +1,5 @@
-#ifndef MUPDF_XPS_H
-#define MUPDF_XPS_H
-
-#include "mupdf/fitz.h"
+#ifndef MUPDF_XPS_IMP_H
+#define MUPDF_XPS_IMP_H
typedef struct xps_document_s xps_document;
typedef struct xps_page_s xps_page;
@@ -32,24 +30,12 @@ xps_document *xps_open_document(fz_context *ctx, const char *filename);
*/
xps_document *xps_open_document_with_stream(fz_context *ctx, fz_stream *file);
-/*
- xps_drop_document: Closes and frees an opened document.
-
- The resource store in the context associated with xps_document
- is emptied.
-
- Does not throw exceptions.
-*/
-void xps_drop_document(fz_context *ctx, xps_document *doc);
-
int xps_count_pages(fz_context *ctx, xps_document *doc);
xps_page *xps_load_page(fz_context *ctx, xps_document *doc, int number);
fz_outline *xps_load_outline(fz_context *ctx, xps_document *doc);
void xps_run_page(fz_context *ctx, xps_page *page, fz_device *dev, const fz_matrix *ctm, fz_cookie *cookie);
fz_link *xps_load_links(fz_context *ctx, xps_page *page);
-/* xps-internal.h */
-
/*
* Memory, and string functions.
*/
diff --git a/source/xps/xps-link.c b/source/xps/xps-link.c
index 64abc2a7..9986d25f 100644
--- a/source/xps/xps-link.c
+++ b/source/xps/xps-link.c
@@ -1,4 +1,5 @@
-#include "mupdf/xps.h"
+#include "mupdf/fitz.h"
+#include "xps-imp.h"
/* Quick parsing of document to find links. */
diff --git a/source/xps/xps-outline.c b/source/xps/xps-outline.c
index 14f8cae7..50eaf960 100644
--- a/source/xps/xps-outline.c
+++ b/source/xps/xps-outline.c
@@ -1,4 +1,5 @@
-#include "mupdf/xps.h"
+#include "mupdf/fitz.h"
+#include "xps-imp.h"
/*
* Parse the document structure / outline parts referenced from fixdoc relationships.
diff --git a/source/xps/xps-path.c b/source/xps/xps-path.c
index 250c4206..750a8309 100644
--- a/source/xps/xps-path.c
+++ b/source/xps/xps-path.c
@@ -1,4 +1,5 @@
-#include "mupdf/xps.h"
+#include "mupdf/fitz.h"
+#include "xps-imp.h"
static char *
xps_parse_float_array(fz_context *ctx, xps_document *doc, char *s, int num, float *x)
diff --git a/source/xps/xps-resource.c b/source/xps/xps-resource.c
index f12a465d..c0212e3f 100644
--- a/source/xps/xps-resource.c
+++ b/source/xps/xps-resource.c
@@ -1,4 +1,5 @@
-#include "mupdf/xps.h"
+#include "mupdf/fitz.h"
+#include "xps-imp.h"
static fz_xml *
xps_lookup_resource(fz_context *ctx, xps_document *doc, xps_resource *dict, char *name, char **urip)
diff --git a/source/xps/xps-tile.c b/source/xps/xps-tile.c
index 31373ba3..925eed40 100644
--- a/source/xps/xps-tile.c
+++ b/source/xps/xps-tile.c
@@ -1,4 +1,5 @@
-#include "mupdf/xps.h"
+#include "mupdf/fitz.h"
+#include "xps-imp.h"
#define TILE
diff --git a/source/xps/xps-util.c b/source/xps/xps-util.c
index c7def9f4..3c9e149d 100644
--- a/source/xps/xps-util.c
+++ b/source/xps/xps-util.c
@@ -1,4 +1,5 @@
-#include "mupdf/xps.h"
+#include "mupdf/fitz.h"
+#include "xps-imp.h"
static inline int xps_tolower(int c)
{
diff --git a/source/xps/xps-zip.c b/source/xps/xps-zip.c
index aea42216..b2cc9e77 100644
--- a/source/xps/xps-zip.c
+++ b/source/xps/xps-zip.c
@@ -1,4 +1,5 @@
-#include "mupdf/xps.h"
+#include "mupdf/fitz.h"
+#include "xps-imp.h"
static void xps_init_document(fz_context *ctx, xps_document *doc);
@@ -193,7 +194,7 @@ xps_open_document(fz_context *ctx, const char *filename)
return doc;
}
-void
+static void
xps_drop_document(fz_context *ctx, xps_document *doc)
{
xps_font_cache *font, *next;