summaryrefslogtreecommitdiff
path: root/source/tools
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2016-03-22 13:24:23 +0100
committerTor Andersson <tor.andersson@artifex.com>2016-03-23 15:58:47 +0100
commitb2c3d9e7ca40e001d3ee18975427224b726dc4d1 (patch)
treed113ff85ce07dbd81ae45f8f18b303e8787d26cf /source/tools
parent81109bf17aada37f678b6adbdb9fa8eca1cd3163 (diff)
downloadmupdf-b2c3d9e7ca40e001d3ee18975427224b726dc4d1.tar.xz
Compile embedded fonts in separate C files.
Also change unsigned char into const char for embedded data.
Diffstat (limited to 'source/tools')
-rw-r--r--source/tools/murun.c6
-rw-r--r--source/tools/pdfcreate.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/source/tools/murun.c b/source/tools/murun.c
index 8e99cac5..26ff1a57 100644
--- a/source/tools/murun.c
+++ b/source/tools/murun.c
@@ -732,7 +732,7 @@ static fz_buffer *ffi_tobuffer(js_State *J, int idx)
else {
const char *str = js_tostring(J, idx);
fz_try(ctx)
- buf = fz_new_buffer_from_shared_data(ctx, (unsigned char*)str, strlen(str));
+ buf = fz_new_buffer_from_shared_data(ctx, str, strlen(str));
fz_catch(ctx)
rethrow(J);
}
@@ -1862,8 +1862,8 @@ static void ffi_new_Font(js_State *J)
fz_context *ctx = js_getcontext(J);
const char *name = js_tostring(J, 1);
int index = js_isnumber(J, 2) ? js_tonumber(J, 2) : 0;
- unsigned char *data;
- unsigned int size;
+ const char *data;
+ int size;
fz_font *font = NULL;
fz_try(ctx) {
diff --git a/source/tools/pdfcreate.c b/source/tools/pdfcreate.c
index 4ebc87fe..c2a330c2 100644
--- a/source/tools/pdfcreate.c
+++ b/source/tools/pdfcreate.c
@@ -26,8 +26,8 @@ static pdf_document *doc = NULL;
static void add_font_res(pdf_obj *resources, char *name, char *path)
{
- unsigned char *data;
- unsigned int size;
+ const char *data;
+ int size;
fz_font *font;
pdf_obj *subres, *ref;