From c444b1b1a593ab253944cc2b33f22733115c0ff7 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 19 Jun 2017 14:37:59 +0200 Subject: Use unsigned char arrays in hexdumped data. --- source/tools/murun.c | 4 ++-- source/tools/pdfcreate.c | 2 +- source/tools/pdfportfolio.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'source/tools') 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); -- cgit v1.2.3