diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2017-06-19 14:37:59 +0200 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2017-06-22 15:46:56 +0100 |
commit | c444b1b1a593ab253944cc2b33f22733115c0ff7 (patch) | |
tree | 2f6d52f6186e4c894bdf2741481bb7fd31cee4cb /source/fitz | |
parent | 638384c10ff1b7b1233bec1d62db3e82cffeaafc (diff) | |
download | mupdf-c444b1b1a593ab253944cc2b33f22733115c0ff7.tar.xz |
Use unsigned char arrays in hexdumped data.
Diffstat (limited to 'source/fitz')
-rw-r--r-- | source/fitz/buffer.c | 2 | ||||
-rw-r--r-- | source/fitz/colorspace.c | 2 | ||||
-rw-r--r-- | source/fitz/font.c | 8 | ||||
-rw-r--r-- | source/fitz/noto.c | 14 |
4 files changed, 13 insertions, 13 deletions
diff --git a/source/fitz/buffer.c b/source/fitz/buffer.c index 96aa36a6..49c35726 100644 --- a/source/fitz/buffer.c +++ b/source/fitz/buffer.c @@ -52,7 +52,7 @@ fz_new_buffer_from_data(fz_context *ctx, unsigned char *data, size_t size) } fz_buffer * -fz_new_buffer_from_shared_data(fz_context *ctx, const char *data, size_t size) +fz_new_buffer_from_shared_data(fz_context *ctx, const unsigned char *data, size_t size) { fz_buffer *b; diff --git a/source/fitz/colorspace.c b/source/fitz/colorspace.c index d040b076..05b46ac6 100644 --- a/source/fitz/colorspace.c +++ b/source/fitz/colorspace.c @@ -2992,7 +2992,7 @@ fz_new_icc_colorspace(fz_context *ctx, int is_static, int num, fz_buffer *buf, c size_t size; const unsigned char *data; data = fz_lookup_icc(ctx, name, &size); - profile->buffer = fz_new_buffer_from_shared_data(ctx, (const char *)data, size); + profile->buffer = fz_new_buffer_from_shared_data(ctx, data, size); is_lab = (strcmp(name, "lab-icc") == 0); profile->bgr = (strcmp(name, "bgr-icc") == 0); } diff --git a/source/fitz/font.c b/source/fitz/font.c index 79b17458..4c90e5f8 100644 --- a/source/fitz/font.c +++ b/source/fitz/font.c @@ -317,7 +317,7 @@ fz_font *fz_load_system_fallback_font(fz_context *ctx, int script, int language, fz_font *fz_load_fallback_font(fz_context *ctx, int script, int language, int serif, int bold, int italic) { fz_font **fontp; - const char *data; + const unsigned char *data; int index; int size; @@ -364,7 +364,7 @@ fz_font *fz_load_fallback_font(fz_context *ctx, int script, int language, int se fz_font *fz_load_fallback_symbol_font(fz_context *ctx) { - const char *data; + const unsigned char *data; int size; if (!ctx->font->symbol) { @@ -377,7 +377,7 @@ fz_font *fz_load_fallback_symbol_font(fz_context *ctx) fz_font *fz_load_fallback_emoji_font(fz_context *ctx) { - const char *data; + const unsigned char *data; int size; if (!ctx->font->emoji) { @@ -515,7 +515,7 @@ fz_new_font_from_buffer(fz_context *ctx, const char *name, fz_buffer *buffer, in } fz_font * -fz_new_font_from_memory(fz_context *ctx, const char *name, const char *data, int len, int index, int use_glyph_bbox) +fz_new_font_from_memory(fz_context *ctx, const char *name, const unsigned char *data, int len, int index, int use_glyph_bbox) { fz_buffer *buffer = fz_new_buffer_from_shared_data(ctx, data, len); fz_font *font; diff --git a/source/fitz/noto.c b/source/fitz/noto.c index eb070261..f6951ba2 100644 --- a/source/fitz/noto.c +++ b/source/fitz/noto.c @@ -51,11 +51,11 @@ #define RETURN(NAME) \ do { \ extern const int fz_resources_fonts_ ## NAME ## _size; \ - extern const char fz_resources_fonts_ ## NAME []; \ + extern const unsigned char fz_resources_fonts_ ## NAME []; \ return *size = fz_resources_fonts_ ## NAME ## _size, fz_resources_fonts_ ## NAME; \ } while (0) -const char * +const unsigned char * fz_lookup_base14_font(fz_context *ctx, const char *name, int *size) { #ifndef TOFU_BASE14 @@ -84,7 +84,7 @@ fz_lookup_base14_font(fz_context *ctx, const char *name, int *size) if (!is_italic) RETURN(B); else RETURN(BI); \ } -const char * +const unsigned char * fz_lookup_builtin_font(fz_context *ctx, const char *name, int is_bold, int is_italic, int *size) { #ifndef TOFU_BASE14 @@ -137,7 +137,7 @@ fz_lookup_builtin_font(fz_context *ctx, const char *name, int is_bold, int is_it return *size = 0, NULL; } -const char * +const unsigned char * fz_lookup_cjk_font(fz_context *ctx, int registry, int serif, int wmode, int *size, int *index) { if (index) *index = 0; @@ -167,7 +167,7 @@ fz_lookup_cjk_font(fz_context *ctx, int registry, int serif, int wmode, int *siz #define Noto2(SANS,SERIF) \ if (serif) { RETURN(noto_Noto ## SERIF ## _Regular_ttf); } else { RETURN(noto_Noto ## SANS ## _Regular_ttf); } -const char * +const unsigned char * fz_lookup_noto_font(fz_context *ctx, int script, int language, int serif, int *size) { /* TODO: Noto(SansSyriacEstrangela); */ @@ -348,7 +348,7 @@ fz_lookup_noto_font(fz_context *ctx, int script, int language, int serif, int *s return *size = 0, NULL; } -const char * +const unsigned char * fz_lookup_noto_symbol_font(fz_context *ctx, int *size) { #ifndef TOFU_SYMBOL @@ -358,7 +358,7 @@ fz_lookup_noto_symbol_font(fz_context *ctx, int *size) #endif } -const char * +const unsigned char * fz_lookup_noto_emoji_font(fz_context *ctx, int *size) { #ifndef TOFU_EMOJI |