diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2011-09-21 15:01:36 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2011-09-21 15:01:36 +0200 |
commit | aa7668835afffd5a2a496a60ed6edb672f5af1a7 (patch) | |
tree | 92bc58eb4ee9d4f3b30f9b9919aa148b1e330471 /pdf/pdf_font.c | |
parent | 69ed4a8f4dbfac7f2f1de925e34807e4fee3b27c (diff) | |
download | mupdf-aa7668835afffd5a2a496a60ed6edb672f5af1a7.tar.xz |
Rename malloc functions for arrays (fz_calloc and fz_realloc).
Diffstat (limited to 'pdf/pdf_font.c')
-rw-r--r-- | pdf/pdf_font.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pdf/pdf_font.c b/pdf/pdf_font.c index ad5b8d97..e1cae007 100644 --- a/pdf/pdf_font.c +++ b/pdf/pdf_font.c @@ -504,7 +504,7 @@ pdf_load_simple_font(pdf_font_desc **fontdescp, pdf_xref *xref, fz_obj *dict) else fz_warn("freetype could not find any cmaps"); - etable = fz_calloc(ctx, 256, sizeof(unsigned short)); + etable = fz_malloc_array(ctx, 256, sizeof(unsigned short)); for (i = 0; i < 256; i++) { estrings[i] = NULL; @@ -800,7 +800,7 @@ load_cid_font(pdf_font_desc **fontdescp, pdf_xref *xref, fz_obj *dict, fz_obj *e goto cleanup; fontdesc->cid_to_gid_len = (buf->len) / 2; - fontdesc->cid_to_gid = fz_calloc(ctx, fontdesc->cid_to_gid_len, sizeof(unsigned short)); + fontdesc->cid_to_gid = fz_malloc_array(ctx, fontdesc->cid_to_gid_len, sizeof(unsigned short)); for (i = 0; i < fontdesc->cid_to_gid_len; i++) fontdesc->cid_to_gid[i] = (buf->data[i * 2] << 8) + buf->data[i * 2 + 1]; @@ -1067,7 +1067,7 @@ pdf_make_width_table(fz_context *ctx, pdf_font_desc *fontdesc) } font->width_count ++; - font->width_table = fz_calloc(ctx, font->width_count, sizeof(int)); + font->width_table = fz_malloc_array(ctx, font->width_count, sizeof(int)); for (i = 0; i < fontdesc->hmtx_len; i++) { |