summaryrefslogtreecommitdiff
path: root/source/pdf
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/pdf
parent638384c10ff1b7b1233bec1d62db3e82cffeaafc (diff)
downloadmupdf-c444b1b1a593ab253944cc2b33f22733115c0ff7.tar.xz
Use unsigned char arrays in hexdumped data.
Diffstat (limited to 'source/pdf')
-rw-r--r--source/pdf/pdf-font.c10
-rw-r--r--source/pdf/pdf-js.c4
2 files changed, 7 insertions, 7 deletions
diff --git a/source/pdf/pdf-font.c b/source/pdf/pdf-font.c
index 11349534..0088b09c 100644
--- a/source/pdf/pdf-font.c
+++ b/source/pdf/pdf-font.c
@@ -53,7 +53,7 @@ static const char *base_font_names[][10] =
{ "ZapfDingbats", NULL }
};
-const char *
+const unsigned char *
pdf_lookup_substitute_font(fz_context *ctx, int mono, int serif, int bold, int italic, int *len)
{
if (mono) {
@@ -132,7 +132,7 @@ static int is_builtin_font(fz_context *ctx, fz_font *font)
if (!font->buffer)
return 0;
fz_buffer_storage(ctx, font->buffer, &data);
- return fz_lookup_base14_font(ctx, clean_font_name(font->name), &size) == (char*)data;
+ return fz_lookup_base14_font(ctx, clean_font_name(font->name), &size) == data;
}
/*
@@ -349,7 +349,7 @@ pdf_load_builtin_font(fz_context *ctx, pdf_font_desc *fontdesc, const char *font
fontdesc->font = fz_load_system_font(ctx, fontname, 0, 0, !has_descriptor);
if (!fontdesc->font)
{
- const char *data;
+ const unsigned char *data;
int len;
data = fz_lookup_base14_font(ctx, clean_name, &len);
@@ -374,7 +374,7 @@ pdf_load_substitute_font(fz_context *ctx, pdf_font_desc *fontdesc, const char *f
fontdesc->font = fz_load_system_font(ctx, fontname, bold, italic, 0);
if (!fontdesc->font)
{
- const char *data;
+ const unsigned char *data;
int len;
data = pdf_lookup_substitute_font(ctx, mono, serif, bold, italic, &len);
@@ -401,7 +401,7 @@ pdf_load_substitute_cjk_font(fz_context *ctx, pdf_font_desc *fontdesc, const cha
fontdesc->font = fz_load_system_cjk_font(ctx, fontname, ros, serif);
if (!fontdesc->font)
{
- const char *data;
+ const unsigned char *data;
int len;
int index;
diff --git a/source/pdf/pdf-js.c b/source/pdf/pdf-js.c
index e4bccc28..4ff1c601 100644
--- a/source/pdf/pdf-js.c
+++ b/source/pdf/pdf-js.c
@@ -562,7 +562,7 @@ static void declare_dom(pdf_js *js)
js_setglobal(J, "MuPDF_Doc"); /* for pdf-util.js use */
}
-extern const char fz_source_pdf_pdf_js_util_js[];
+extern const unsigned char fz_source_pdf_pdf_js_util_js[];
static void preload_helpers(pdf_js *js)
{
@@ -582,7 +582,7 @@ static void preload_helpers(pdf_js *js)
);
#endif
- js_dostring(js->imp, fz_source_pdf_pdf_js_util_js);
+ js_dostring(js->imp, (const char *)fz_source_pdf_pdf_js_util_js);
}
void pdf_drop_js(fz_context *ctx, pdf_js *js)