summaryrefslogtreecommitdiff
path: root/xps/xpsmem.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2011-03-22 19:42:01 +0100
committerTor Andersson <tor.andersson@artifex.com>2011-03-22 20:27:43 +0100
commitb1c3f5a602f7be8e2db87f73c1e55052b58b1c6e (patch)
tree19d13becbd97b40cc91f60a1ae2d30bdf1ceaef4 /xps/xpsmem.c
parentb8efb1cf3ce4c57fd4a0396c2a9102630d3d6e36 (diff)
downloadmupdf-b1c3f5a602f7be8e2db87f73c1e55052b58b1c6e.tar.xz
xps: use fitz runtime and remove ghostscript specific code so it compiles.
Diffstat (limited to 'xps/xpsmem.c')
-rw-r--r--xps/xpsmem.c51
1 files changed, 9 insertions, 42 deletions
diff --git a/xps/xpsmem.c b/xps/xpsmem.c
index 95199f07..3af3b3f6 100644
--- a/xps/xpsmem.c
+++ b/xps/xpsmem.c
@@ -1,27 +1,5 @@
-/* Copyright (C) 2006-2010 Artifex Software, Inc.
- All Rights Reserved.
-
- This software is provided AS-IS with no warranty, either express or
- implied.
-
- This software is distributed under license and may not be copied, modified
- or distributed except as expressly authorized under the terms of that
- license. Refer to licensing information at http://www.artifex.com/
- or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134,
- San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information.
-*/
-
-/* XPS interpreter - string manipulation functions */
-
-#include "ghostxps.h"
-
-void *
-xps_realloc_imp(xps_context_t *ctx, void *ptr, int size, const char *func)
-{
- if (!ptr)
- return gs_alloc_bytes(ctx->memory, size, func);
- return gs_resize_object(ctx->memory, ptr, size, func);
-}
+#include "fitz.h"
+#include "muxps.h"
static inline int
xps_tolower(int c)
@@ -34,24 +12,13 @@ xps_tolower(int c)
int
xps_strcasecmp(char *a, char *b)
{
- while (xps_tolower(*a) == xps_tolower(*b))
- {
- if (*a++ == 0)
- return 0;
- b++;
- }
- return xps_tolower(*a) - xps_tolower(*b);
-}
-
-char *
-xps_strdup_imp(xps_context_t *ctx, const char *str, const char *cname)
-{
- char *cpy = NULL;
- if (str)
- cpy = (char*) gs_alloc_bytes(ctx->memory, strlen(str) + 1, cname);
- if (cpy)
- strcpy(cpy, str);
- return cpy;
+ while (xps_tolower(*a) == xps_tolower(*b))
+ {
+ if (*a++ == 0)
+ return 0;
+ b++;
+ }
+ return xps_tolower(*a) - xps_tolower(*b);
}
size_t