summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vrhel <michael.vrhel@artifex.com>2018-08-31 16:43:45 -0700
committerSebastian Rasmussen <sebras@gmail.com>2018-09-04 18:23:31 +0800
commit76316cd7ec5e53b1acb797185b852f9874112c4d (patch)
tree3554289aff36f42f8bab4199e34e897422cd2f7e
parent72da08b3dc083d9aede30c41028b4672bf7cd496 (diff)
downloadmupdf-76316cd7ec5e53b1acb797185b852f9874112c4d.tar.xz
Fix bit rot in gproof support.
-rw-r--r--source/gprf/gprf-doc.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/source/gprf/gprf-doc.c b/source/gprf/gprf-doc.c
index ff242001..aeec0ee4 100644
--- a/source/gprf/gprf-doc.c
+++ b/source/gprf/gprf-doc.c
@@ -1,4 +1,10 @@
#include "mupdf/fitz.h"
+#include "../fitz/fitz-imp.h"
+#include <string.h>
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
#if FZ_ENABLE_GPRF
/* Choose whether to call gs via an exe or via an API */
@@ -10,8 +16,6 @@
#define GS_API_NULL_STDIO
#endif
-#include "mupdf/fitz.h"
-
#if defined(USE_GS_API)
/* We are assumed to be using the DLL here */
@@ -153,17 +157,18 @@ gprf_drop_page_imp(fz_context *ctx, fz_page *page_)
fz_drop_gprf_file(ctx, page->file);
}
-static fz_rect *
-gprf_bound_page(fz_context *ctx, fz_page *page_, fz_rect *bbox)
+static fz_rect
+gprf_bound_page(fz_context *ctx, fz_page *page_)
{
gprf_page *page = (gprf_page*)page_;
gprf_document *doc = page->doc;
+ fz_rect bbox;
/* BBox is in points, not pixels */
- bbox->x0 = 0;
- bbox->y0 = 0;
- bbox->x1 = 72.0f * page->width / doc->res;
- bbox->y1 = 72.0f * page->height / doc->res;
+ bbox.x0 = 0;
+ bbox.y0 = 0;
+ bbox.x1 = 72.0f * page->width / doc->res;
+ bbox.y1 = 72.0f * page->height / doc->res;
return bbox;
}