summaryrefslogtreecommitdiff
path: root/source/tools
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2017-06-19 14:37:59 +0200
committerRobin Watts <robin.watts@artifex.com>2017-06-22 15:46:56 +0100
commitc444b1b1a593ab253944cc2b33f22733115c0ff7 (patch)
tree2f6d52f6186e4c894bdf2741481bb7fd31cee4cb /source/tools
parent638384c10ff1b7b1233bec1d62db3e82cffeaafc (diff)
downloadmupdf-c444b1b1a593ab253944cc2b33f22733115c0ff7.tar.xz
Use unsigned char arrays in hexdumped data.
Diffstat (limited to 'source/tools')
-rw-r--r--source/tools/murun.c4
-rw-r--r--source/tools/pdfcreate.c2
-rw-r--r--source/tools/pdfportfolio.c4
3 files changed, 5 insertions, 5 deletions
diff --git a/source/tools/murun.c b/source/tools/murun.c
index 47cc1884..5e627295 100644
--- a/source/tools/murun.c
+++ b/source/tools/murun.c
@@ -763,7 +763,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, str, strlen(str));
+ buf = fz_new_buffer_from_shared_data(ctx, (const unsigned char *)str, strlen(str));
fz_catch(ctx)
rethrow(J);
}
@@ -2253,7 +2253,7 @@ 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;
- const char *data;
+ const unsigned char *data;
int size;
fz_font *font = NULL;
diff --git a/source/tools/pdfcreate.c b/source/tools/pdfcreate.c
index f4fec946..b1649500 100644
--- a/source/tools/pdfcreate.c
+++ b/source/tools/pdfcreate.c
@@ -33,7 +33,7 @@ static pdf_document *doc = NULL;
static void add_font_res(pdf_obj *resources, char *name, char *path)
{
- const char *data;
+ const unsigned char *data;
int size;
fz_font *font;
pdf_obj *subres, *ref;
diff --git a/source/tools/pdfportfolio.c b/source/tools/pdfportfolio.c
index a473968b..9f08cff1 100644
--- a/source/tools/pdfportfolio.c
+++ b/source/tools/pdfportfolio.c
@@ -244,7 +244,7 @@ int pdfportfolio_main(int argc, char **argv)
/* add a blank page */
{
const char *template = "BT /Tm 16 Tf 50 434 TD (This is a portfolio document.) Tj ET\n";
- const char *data;
+ const unsigned char *data;
int size;
fz_font *font;
pdf_obj *font_obj, *page_obj;
@@ -260,7 +260,7 @@ int pdfportfolio_main(int argc, char **argv)
resources = pdf_add_object_drop(ctx, doc, pdf_new_dict(ctx, doc, 1));
pdf_dict_putp_drop(ctx, resources, "Font/Tm", font_obj);
- contents = fz_new_buffer_from_shared_data(ctx, template, strlen(template));
+ contents = fz_new_buffer_from_shared_data(ctx, (const unsigned char *)template, strlen(template));
page_obj = pdf_add_page(ctx, doc, &mediabox, 0, resources, contents);
pdf_insert_page(ctx, doc, -1, page_obj);