From 9e79a59a9cd97513d54c3e6190d2391947daa14b Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Tue, 25 Aug 2015 08:27:18 +0000 Subject: texk/dvipdfm-x: Replace '(unsigned) long' by '(unsigned) int' or '(u)int32_t' except when needed with for ftell() and fseek() git-svn-id: svn://tug.org/texlive/trunk@38200 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/dvipdfm-x/ChangeLog | 6 + Build/source/texk/dvipdfm-x/agl.c | 14 +- Build/source/texk/dvipdfm-x/agl.h | 2 +- Build/source/texk/dvipdfm-x/cff.c | 106 +++++++------- Build/source/texk/dvipdfm-x/cff.h | 34 ++--- Build/source/texk/dvipdfm-x/cff_dict.c | 32 ++--- Build/source/texk/dvipdfm-x/cff_dict.h | 4 +- Build/source/texk/dvipdfm-x/cff_limits.h | 4 +- Build/source/texk/dvipdfm-x/cff_types.h | 4 +- Build/source/texk/dvipdfm-x/cid.c | 2 +- Build/source/texk/dvipdfm-x/cid.h | 2 +- Build/source/texk/dvipdfm-x/cidtype0.c | 50 +++---- Build/source/texk/dvipdfm-x/cidtype0.h | 2 +- Build/source/texk/dvipdfm-x/cidtype2.c | 30 ++-- Build/source/texk/dvipdfm-x/cidtype2.h | 2 +- Build/source/texk/dvipdfm-x/cmap.c | 28 ++-- Build/source/texk/dvipdfm-x/cmap.h | 12 +- Build/source/texk/dvipdfm-x/cmap_p.h | 2 +- Build/source/texk/dvipdfm-x/cmap_read.c | 18 +-- Build/source/texk/dvipdfm-x/cmap_write.c | 16 +-- Build/source/texk/dvipdfm-x/cmap_write.h | 2 +- Build/source/texk/dvipdfm-x/cs_type2.c | 22 +-- Build/source/texk/dvipdfm-x/cs_type2.h | 2 +- Build/source/texk/dvipdfm-x/dpxcrypt.h | 2 +- Build/source/texk/dvipdfm-x/dpxfile.c | 4 +- Build/source/texk/dvipdfm-x/dpxutil.c | 2 +- Build/source/texk/dvipdfm-x/dpxutil.h | 2 +- Build/source/texk/dvipdfm-x/dvi.h | 2 +- Build/source/texk/dvipdfm-x/dvipdfmx.c | 10 +- Build/source/texk/dvipdfm-x/epdf.c | 20 +-- Build/source/texk/dvipdfm-x/error.h | 2 +- Build/source/texk/dvipdfm-x/fontmap.c | 4 +- Build/source/texk/dvipdfm-x/jp2image.c | 4 +- Build/source/texk/dvipdfm-x/jpegimage.c | 24 ++-- Build/source/texk/dvipdfm-x/mem.c | 14 +- Build/source/texk/dvipdfm-x/mem.h | 16 ++- Build/source/texk/dvipdfm-x/mfileio.c | 33 +++-- Build/source/texk/dvipdfm-x/mfileio.h | 10 +- Build/source/texk/dvipdfm-x/mpost.c | 4 +- Build/source/texk/dvipdfm-x/otl_conf.c | 6 +- Build/source/texk/dvipdfm-x/otl_opt.c | 8 +- Build/source/texk/dvipdfm-x/pdfcolor.c | 4 +- Build/source/texk/dvipdfm-x/pdfdev.c | 18 +-- Build/source/texk/dvipdfm-x/pdfdoc.c | 72 +++++----- Build/source/texk/dvipdfm-x/pdfdoc.h | 14 +- Build/source/texk/dvipdfm-x/pdfdraw.c | 4 +- Build/source/texk/dvipdfm-x/pdfdraw.h | 2 +- Build/source/texk/dvipdfm-x/pdfencoding.c | 2 +- Build/source/texk/dvipdfm-x/pdfencrypt.c | 4 +- Build/source/texk/dvipdfm-x/pdfencrypt.h | 2 +- Build/source/texk/dvipdfm-x/pdfnames.c | 4 +- Build/source/texk/dvipdfm-x/pdfnames.h | 2 +- Build/source/texk/dvipdfm-x/pdfobj.c | 220 +++++++++++++++--------------- Build/source/texk/dvipdfm-x/pdfobj.h | 10 +- Build/source/texk/dvipdfm-x/pdfparse.c | 10 +- Build/source/texk/dvipdfm-x/pdfresource.c | 16 +-- Build/source/texk/dvipdfm-x/pdfresource.h | 10 +- Build/source/texk/dvipdfm-x/pdfximage.c | 14 +- Build/source/texk/dvipdfm-x/pdfximage.h | 14 +- Build/source/texk/dvipdfm-x/pngimage.c | 2 +- Build/source/texk/dvipdfm-x/pst.c | 6 +- Build/source/texk/dvipdfm-x/pst.h | 6 +- Build/source/texk/dvipdfm-x/pst_obj.c | 62 ++++----- Build/source/texk/dvipdfm-x/pst_obj.h | 2 +- Build/source/texk/dvipdfm-x/sfnt.c | 11 +- Build/source/texk/dvipdfm-x/sfnt.h | 2 +- Build/source/texk/dvipdfm-x/spc_color.c | 4 +- Build/source/texk/dvipdfm-x/spc_color.h | 4 +- Build/source/texk/dvipdfm-x/spc_dvips.c | 6 +- Build/source/texk/dvipdfm-x/spc_dvips.h | 4 +- Build/source/texk/dvipdfm-x/spc_html.c | 8 +- Build/source/texk/dvipdfm-x/spc_html.h | 4 +- Build/source/texk/dvipdfm-x/spc_misc.c | 6 +- Build/source/texk/dvipdfm-x/spc_misc.h | 4 +- Build/source/texk/dvipdfm-x/spc_pdfm.c | 42 +++--- Build/source/texk/dvipdfm-x/spc_pdfm.h | 4 +- Build/source/texk/dvipdfm-x/spc_tpic.c | 18 +-- Build/source/texk/dvipdfm-x/spc_tpic.h | 4 +- Build/source/texk/dvipdfm-x/spc_util.c | 6 +- Build/source/texk/dvipdfm-x/spc_util.h | 4 +- Build/source/texk/dvipdfm-x/spc_xtx.c | 2 +- Build/source/texk/dvipdfm-x/spc_xtx.h | 4 +- Build/source/texk/dvipdfm-x/specials.c | 6 +- Build/source/texk/dvipdfm-x/specials.h | 4 +- Build/source/texk/dvipdfm-x/subfont.c | 4 +- Build/source/texk/dvipdfm-x/t1_char.c | 18 +-- Build/source/texk/dvipdfm-x/t1_load.c | 38 +++--- Build/source/texk/dvipdfm-x/tfm.c | 2 +- Build/source/texk/dvipdfm-x/tfm.h | 2 +- Build/source/texk/dvipdfm-x/truetype.c | 6 +- Build/source/texk/dvipdfm-x/tt_cmap.c | 34 ++--- Build/source/texk/dvipdfm-x/tt_cmap.h | 2 +- Build/source/texk/dvipdfm-x/tt_glyf.c | 10 +- Build/source/texk/dvipdfm-x/tt_gsub.c | 72 +++++----- Build/source/texk/dvipdfm-x/tt_table.c | 2 +- Build/source/texk/dvipdfm-x/tt_table.h | 2 +- Build/source/texk/dvipdfm-x/type0.c | 4 +- Build/source/texk/dvipdfm-x/type1.c | 20 +-- Build/source/texk/dvipdfm-x/type1c.c | 14 +- Build/source/texk/dvipdfm-x/unicode.c | 2 +- Build/source/texk/dvipdfm-x/unicode.h | 2 +- Build/source/texk/dvipdfm-x/xbb.c | 16 +-- 102 files changed, 740 insertions(+), 720 deletions(-) (limited to 'Build/source/texk/dvipdfm-x') diff --git a/Build/source/texk/dvipdfm-x/ChangeLog b/Build/source/texk/dvipdfm-x/ChangeLog index 5794b532f67..3e5d48d5bf3 100644 --- a/Build/source/texk/dvipdfm-x/ChangeLog +++ b/Build/source/texk/dvipdfm-x/ChangeLog @@ -1,3 +1,9 @@ +2015-08-25 Peter Breitenlohner + + * Most .c and .h files: Update Copyright years. + Replace '(unsigned) long' by '(unsigned) int' or '(u)int32_t' + except when needed with for ftell() and fseek(). + 2015-08-23 Peter Breitenlohner * agl.[ch], cid.[ch], cidtype0.[ch], cidtype2.[ch], cmap_p.h, diff --git a/Build/source/texk/dvipdfm-x/agl.c b/Build/source/texk/dvipdfm-x/agl.c index 58427967e6a..3517a3e8c47 100644 --- a/Build/source/texk/dvipdfm-x/agl.c +++ b/Build/source/texk/dvipdfm-x/agl.c @@ -145,9 +145,9 @@ static const char * const modifiers[] = { static int skip_capital (const char **p, const char *endptr) { - long slen = 0, len; + int slen = 0, len; - len = (long) (endptr - (*p)); + len = (int) (endptr - (*p)); if (len >= 2 && ((**p == 'A' && *(*p+1) == 'E') || @@ -180,10 +180,10 @@ skip_capital (const char **p, const char *endptr) static int skip_modifier (const char **p, const char *endptr) { - long slen = 0, len; + int slen = 0, len; int i; - len = (long) (endptr - (*p)); + len = (int) (endptr - (*p)); for (i = 0; modifiers[i] != NULL; i++) { if ((len >= strlen(modifiers[i]) && @@ -200,7 +200,7 @@ skip_modifier (const char **p, const char *endptr) static int is_smallcap (const char *glyphname) { - long len, slen; + int len, slen; const char *p, *endptr; if (!glyphname) @@ -598,10 +598,10 @@ agl_name_convert_unicode (const char *glyphname) -static long +static int xtol (const char *start, int len) { - long v = 0; + int v = 0; while (len-- > 0) { v <<= 4; diff --git a/Build/source/texk/dvipdfm-x/agl.h b/Build/source/texk/dvipdfm-x/agl.h index cc7687c34aa..78412b69e17 100644 --- a/Build/source/texk/dvipdfm-x/agl.h +++ b/Build/source/texk/dvipdfm-x/agl.h @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2007-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2007-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks diff --git a/Build/source/texk/dvipdfm-x/cff.c b/Build/source/texk/dvipdfm-x/cff.c index b17ad647be6..036673b1e6d 100644 --- a/Build/source/texk/dvipdfm-x/cff.c +++ b/Build/source/texk/dvipdfm-x/cff.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. This program is free software; you can redistribute it and/or modify @@ -40,9 +40,9 @@ #define CFF_DEBUG 5 #define CFF_DEBUG_STR "CFF" -static unsigned long get_unsigned (FILE *stream, int n) +static unsigned get_unsigned (FILE *stream, int n) { - unsigned long v = 0; + unsigned v = 0; while (n-- > 0) v = v*0x100u + get_unsigned_byte(stream); @@ -55,7 +55,7 @@ static unsigned long get_unsigned (FILE *stream, int n) /* * Read Header, Name INDEX, Top DICT INDEX, and String INDEX. */ -cff_font *cff_open(FILE *stream, long offset, int n) +cff_font *cff_open(FILE *stream, int offset, int n) { cff_font *cff; cff_index *idx; @@ -146,7 +146,7 @@ cff_font *cff_open(FILE *stream, long offset, int n) cff->gsubr_offset = tell_position(cff->stream) - offset; /* Number of glyphs */ - offset = (long) cff_dict_get(cff->topdict, "CharStrings", 0); + offset = cff_dict_get(cff->topdict, "CharStrings", 0); cff_seek_set(cff, offset); cff->num_glyphs = get_unsigned_pair(cff->stream); @@ -159,7 +159,7 @@ cff_font *cff_open(FILE *stream, long offset, int n) /* Check for encoding */ if (cff_dict_known(cff->topdict, "Encoding")) { - offset = (long) cff_dict_get(cff->topdict, "Encoding", 0); + offset = cff_dict_get(cff->topdict, "Encoding", 0); if (offset == 0) { /* predefined */ cff->flag |= ENCODING_STANDARD; } else if (offset == 1) { @@ -171,7 +171,7 @@ cff_font *cff_open(FILE *stream, long offset, int n) /* Check for charset */ if (cff_dict_known(cff->topdict, "charset")) { - offset = (long) cff_dict_get(cff->topdict, "charset", 0); + offset = cff_dict_get(cff->topdict, "charset", 0); if (offset == 0) { /* predefined */ cff->flag |= CHARSETS_ISOADOBE; } else if (offset == 1) { @@ -246,7 +246,7 @@ cff_get_name (cff_font *cff) return fontname; } -long +int cff_set_name (cff_font *cff, char *name) { cff_index *idx; @@ -269,8 +269,8 @@ cff_set_name (cff_font *cff, char *name) return 5 + strlen(name); } -long -cff_put_header (cff_font *cff, card8 *dest, long destlen) +int +cff_put_header (cff_font *cff, card8 *dest, int destlen) { if (destlen < 4) ERROR("Not enough space available..."); @@ -329,7 +329,7 @@ cff_get_index (cff_font *cff) { cff_index *idx; card16 i, count; - long length, nb_read, offset; + int length, nb_read, offset; idx = NEW(1, cff_index); @@ -365,11 +365,11 @@ cff_get_index (cff_font *cff) return idx; } -long -cff_pack_index (cff_index *idx, card8 *dest, long destlen) +int +cff_pack_index (cff_index *idx, card8 *dest, int destlen) { - long len = 0; - long datalen; + int len = 0; + int datalen; card16 i; if (idx->count < 1) { @@ -425,7 +425,7 @@ cff_pack_index (cff_index *idx, card8 *dest, long destlen) return len; } -long +int cff_index_size (cff_index *idx) { if (idx->count > 0) { @@ -484,7 +484,7 @@ void cff_release_index (cff_index *idx) char *cff_get_string (cff_font *cff, s_SID id) { char *result = NULL; - long len; + int len; if (id < CFF_STDSTR_MAX) { len = strlen(cff_stdstr[id]); @@ -505,7 +505,7 @@ char *cff_get_string (cff_font *cff, s_SID id) return result; } -long cff_get_sid (cff_font *cff, const char *str) +int cff_get_sid (cff_font *cff, const char *str) { card16 i; @@ -530,7 +530,7 @@ long cff_get_sid (cff_font *cff, const char *str) return -1; } -long cff_get_seac_sid (cff_font *cff, const char *str) +int cff_get_seac_sid (cff_font *cff, const char *str) { card16 i; @@ -581,7 +581,7 @@ s_SID cff_add_string (cff_font *cff, const char *str, int unique) card16 idx; cff_index *strings; l_offset offset, size; - long len = strlen(str); + int len = strlen(str); if (cff == NULL) ERROR("CFF font not opened."); @@ -622,10 +622,10 @@ s_SID cff_add_string (cff_font *cff, const char *str, int unique) * * Encoding and Charset arrays always begin with GID = 1. */ -long cff_read_encoding (cff_font *cff) +int cff_read_encoding (cff_font *cff) { cff_encoding *encoding; - long offset, length; + int offset, length; card8 i; if (cff->topdict == NULL) { @@ -638,7 +638,7 @@ long cff_read_encoding (cff_font *cff) return 0; } - offset = (long) cff_dict_get(cff->topdict, "Encoding", 0); + offset = cff_dict_get(cff->topdict, "Encoding", 0); if (offset == 0) { /* predefined */ cff->flag |= ENCODING_STANDARD; cff->encoding = NULL; @@ -700,9 +700,9 @@ long cff_read_encoding (cff_font *cff) return length; } -long cff_pack_encoding (cff_font *cff, card8 *dest, long destlen) +int cff_pack_encoding (cff_font *cff, card8 *dest, int destlen) { - long len = 0; + int len = 0; cff_encoding *encoding; card16 i; @@ -834,10 +834,10 @@ void cff_release_encoding (cff_encoding *encoding) } } -long cff_read_charsets (cff_font *cff) +int cff_read_charsets (cff_font *cff) { cff_charsets *charset; - long offset, length; + int offset, length; card16 count, i; if (cff->topdict == NULL) @@ -849,7 +849,7 @@ long cff_read_charsets (cff_font *cff) return 0; } - offset = (long) cff_dict_get(cff->topdict, "charset", 0); + offset = cff_dict_get(cff->topdict, "charset", 0); if (offset == 0) { /* predefined */ cff->flag |= CHARSETS_ISOADOBE; @@ -924,9 +924,9 @@ long cff_read_charsets (cff_font *cff) return length; } -long cff_pack_charsets (cff_font *cff, card8 *dest, long destlen) +int cff_pack_charsets (cff_font *cff, card8 *dest, int destlen) { - long len = 0; + int len = 0; card16 i; cff_charsets *charset; @@ -1193,10 +1193,10 @@ cff_release_charsets (cff_charsets *charset) } /* CID-Keyed font specific */ -long cff_read_fdselect (cff_font *cff) +int cff_read_fdselect (cff_font *cff) { cff_fdselect *fdsel; - long offset, length; + int offset, length; card16 i; if (cff->topdict == NULL) @@ -1205,7 +1205,7 @@ long cff_read_fdselect (cff_font *cff) if (!(cff->flag & FONTTYPE_CIDFONT)) return 0; - offset = (long) cff_dict_get(cff->topdict, "FDSelect", 0); + offset = cff_dict_get(cff->topdict, "FDSelect", 0); cff_seek_set(cff, offset); cff->fdselect = fdsel = NEW(1, cff_fdselect); fdsel->format = get_unsigned_byte(cff->stream); @@ -1246,10 +1246,10 @@ long cff_read_fdselect (cff_font *cff) return length; } -long cff_pack_fdselect (cff_font *cff, card8 *dest, long destlen) +int cff_pack_fdselect (cff_font *cff, card8 *dest, int destlen) { cff_fdselect *fdsel; - long len = 0; + int len = 0; card16 i; if (cff->fdselect == NULL) @@ -1353,10 +1353,10 @@ card8 cff_fdselect_lookup (cff_font *cff, card16 gid) return fd; } -long cff_read_subrs (cff_font *cff) +int cff_read_subrs (cff_font *cff) { - long len = 0; - long offset; + int len = 0; + int offset; int i; if ((cff->flag & FONTTYPE_CIDFONT) && cff->fdarray == NULL) { @@ -1378,8 +1378,8 @@ long cff_read_subrs (cff_font *cff) !cff_dict_known(cff->private[i], "Subrs")) { (cff->subrs)[i] = NULL; } else { - offset = (long) cff_dict_get(cff->fdarray[i], "Private", 1); - offset += (long) cff_dict_get(cff->private[i], "Subrs", 0); + offset = cff_dict_get(cff->fdarray[i], "Private", 1); + offset += cff_dict_get(cff->private[i], "Subrs", 0); cff_seek_set(cff, offset); (cff->subrs)[i] = cff_get_index(cff); len += cff_index_size((cff->subrs)[i]); @@ -1390,8 +1390,8 @@ long cff_read_subrs (cff_font *cff) !cff_dict_known(cff->private[0], "Subrs")) { (cff->subrs)[0] = NULL; } else { - offset = (long) cff_dict_get(cff->topdict, "Private", 1); - offset += (long) cff_dict_get(cff->private[0], "Subrs", 0); + offset = cff_dict_get(cff->topdict, "Private", 1); + offset += cff_dict_get(cff->private[0], "Subrs", 0); cff_seek_set(cff, offset); (cff->subrs)[0] = cff_get_index(cff); len += cff_index_size((cff->subrs)[0]); @@ -1401,11 +1401,11 @@ long cff_read_subrs (cff_font *cff) return len; } -long cff_read_fdarray (cff_font *cff) +int cff_read_fdarray (cff_font *cff) { - long len = 0; + int len = 0; cff_index *idx; - long offset, size; + int offset, size; card16 i; if (cff->topdict == NULL) @@ -1415,7 +1415,7 @@ long cff_read_fdarray (cff_font *cff) return 0; /* must exist */ - offset = (long) cff_dict_get(cff->topdict, "FDArray", 0); + offset = cff_dict_get(cff->topdict, "FDArray", 0); cff_seek_set(cff, offset); idx = cff_get_index(cff); cff->num_fds = (card8)idx->count; @@ -1435,11 +1435,11 @@ long cff_read_fdarray (cff_font *cff) return len; } -long cff_read_private (cff_font *cff) +int cff_read_private (cff_font *cff) { - long len = 0; + int len = 0; card8 *data; - long offset, size; + int offset, size; if (cff->flag & FONTTYPE_CIDFONT) { int i; @@ -1451,9 +1451,9 @@ long cff_read_private (cff_font *cff) for (i=0;inum_fds;i++) { if (cff->fdarray[i] != NULL && cff_dict_known(cff->fdarray[i], "Private") && - (size = (long) cff_dict_get(cff->fdarray[i], "Private", 0)) + (size = cff_dict_get(cff->fdarray[i], "Private", 0)) > 0) { - offset = (long) cff_dict_get(cff->fdarray[i], "Private", 1); + offset = cff_dict_get(cff->fdarray[i], "Private", 1); cff_seek_set(cff, offset); data = NEW(size, card8); if (cff_read_data(data, size, cff) != size) @@ -1469,8 +1469,8 @@ long cff_read_private (cff_font *cff) cff->num_fds = 1; cff->private = NEW(1, cff_dict *); if (cff_dict_known(cff->topdict, "Private") && - (size = (long) cff_dict_get(cff->topdict, "Private", 0)) > 0) { - offset = (long) cff_dict_get(cff->topdict, "Private", 1); + (size = cff_dict_get(cff->topdict, "Private", 0)) > 0) { + offset = cff_dict_get(cff->topdict, "Private", 1); cff_seek_set(cff, offset); data = NEW(size, card8); if (cff_read_data(data, size, cff) != size) diff --git a/Build/source/texk/dvipdfm-x/cff.h b/Build/source/texk/dvipdfm-x/cff.h index bd9458c8d57..97eea6229f6 100644 --- a/Build/source/texk/dvipdfm-x/cff.h +++ b/Build/source/texk/dvipdfm-x/cff.h @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. This program is free software; you can redistribute it and/or modify @@ -79,7 +79,7 @@ typedef struct int flag; /* Flag: see above */ } cff_font; -extern cff_font *cff_open (FILE *file, long offset, int idx); +extern cff_font *cff_open (FILE *file, int offset, int idx); #define cff_seek_set(c, p) seek_absolute (((c)->stream), ((c)->offset) + (p)); #define cff_read_data(d, l, c) fread(d, 1, l, (c)->stream) #define cff_tell(c) ftell((c)->stream) @@ -88,32 +88,32 @@ extern cff_font *cff_open (FILE *file, long offset, int idx); extern void cff_close (cff_font *cff); /* CFF Header */ -extern long cff_put_header (cff_font *cff, card8 *dest, long destlen); +extern int cff_put_header (cff_font *cff, card8 *dest, int destlen); /* CFF INDEX */ extern cff_index *cff_get_index (cff_font *cff); extern cff_index *cff_get_index_header (cff_font *cff); extern void cff_release_index (cff_index *idx); extern cff_index *cff_new_index (card16 count); -extern long cff_index_size (cff_index *idx); -extern long cff_pack_index (cff_index *idx, card8 *dest, long destlen); +extern int cff_index_size (cff_index *idx); +extern int cff_pack_index (cff_index *idx, card8 *dest, int destlen); /* Name INDEX */ extern char *cff_get_name (cff_font *cff); -extern long cff_set_name (cff_font *cff, char *name); +extern int cff_set_name (cff_font *cff, char *name); /* Global and Local Subrs INDEX */ -extern long cff_read_subrs (cff_font *cff); +extern int cff_read_subrs (cff_font *cff); /* Encoding */ -extern long cff_read_encoding (cff_font *cff); -extern long cff_pack_encoding (cff_font *cff, card8 *dest, long destlen); +extern int cff_read_encoding (cff_font *cff); +extern int cff_pack_encoding (cff_font *cff, card8 *dest, int destlen); extern card16 cff_encoding_lookup (cff_font *cff, card8 code); extern void cff_release_encoding (cff_encoding *encoding); /* Charsets */ -extern long cff_read_charsets (cff_font *cff); -extern long cff_pack_charsets (cff_font *cff, card8 *dest, long destlen); +extern int cff_read_charsets (cff_font *cff); +extern int cff_pack_charsets (cff_font *cff, card8 *dest, int destlen); /* Returns GID of PS name "glyph" */ extern card16 cff_glyph_lookup (cff_font *cff, const char *glyph); @@ -128,21 +128,21 @@ extern card16 cff_charsets_lookup_inverse (cff_font *cff, card16 gid); extern card16 cff_charsets_lookup_cid(cff_charsets *charset, card16 gid); /* FDSelect */ -extern long cff_read_fdselect (cff_font *cff); -extern long cff_pack_fdselect (cff_font *cff, card8 *dest, long destlen); +extern int cff_read_fdselect (cff_font *cff); +extern int cff_pack_fdselect (cff_font *cff, card8 *dest, int destlen); extern card8 cff_fdselect_lookup (cff_font *cff, card16 gid); extern void cff_release_fdselect (cff_fdselect *fdselect); /* Font DICT(s) */ -extern long cff_read_fdarray (cff_font *cff); +extern int cff_read_fdarray (cff_font *cff); /* Private DICT(s) */ -extern long cff_read_private (cff_font *cff); +extern int cff_read_private (cff_font *cff); /* String */ extern char *cff_get_string (cff_font *cff, s_SID id); -extern long cff_get_sid (cff_font *cff, const char *str); -extern long cff_get_seac_sid (cff_font *cff, const char *str); +extern int cff_get_sid (cff_font *cff, const char *str); +extern int cff_get_seac_sid (cff_font *cff, const char *str); extern s_SID cff_add_string (cff_font *cff, const char *str, int unique); extern void cff_update_string (cff_font *cff); diff --git a/Build/source/texk/dvipdfm-x/cff_dict.c b/Build/source/texk/dvipdfm-x/cff_dict.c index 8c30b7d13ab..c5927e78fe4 100644 --- a/Build/source/texk/dvipdfm-x/cff_dict.c +++ b/Build/source/texk/dvipdfm-x/cff_dict.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. This program is free software; you can redistribute it and/or modify @@ -185,7 +185,7 @@ static struct { /* Parse DICT data */ static double get_integer (card8 **data, card8 *endptr, int *status) { - long result = 0; + int result = 0; card8 b0, b1, b2; b0 = *(*data)++; @@ -393,9 +393,9 @@ cff_dict *cff_dict_unpack (card8 *data, card8 *endptr) } /* Pack DICT data */ -static long pack_integer (card8 *dest, long destlen, long value) +static int pack_integer (card8 *dest, int destlen, int value) { - long len = 0; + int len = 0; if (value >= -107 && value <= 107) { if (destlen < 1) @@ -437,7 +437,7 @@ static long pack_integer (card8 *dest, long destlen, long value) return len; } -static long pack_real (card8 *dest, long destlen, double value) +static int pack_real (card8 *dest, int destlen, double value) { int i = 0, pos = 2; char buffer[32]; @@ -499,19 +499,19 @@ static long pack_real (card8 *dest, long destlen, double value) return pos/2; } -static long cff_dict_put_number (double value, - card8 *dest, long destlen, +static int cff_dict_put_number (double value, + card8 *dest, int destlen, int type) { - long len = 0; + int len = 0; double nearint; nearint = floor(value+0.5); /* set offset to longint */ if (type == CFF_TYPE_OFFSET) { - long lvalue; + int lvalue; - lvalue = (long) value; + lvalue = (int) value; if (destlen < 5) ERROR("%s: Buffer overflow.", CFF_DEBUG_STR); dest[0] = 29; @@ -524,17 +524,17 @@ static long cff_dict_put_number (double value, (fabs(value - nearint) > 1.0e-5)) { /* real */ len = pack_real(dest, destlen, value); } else { /* integer */ - len = pack_integer(dest, destlen, (long) nearint); + len = pack_integer(dest, destlen, (int) nearint); } return len; } -static long +static int put_dict_entry (cff_dict_entry *de, - card8 *dest, long destlen) + card8 *dest, int destlen) { - long len = 0; + int len = 0; int i, type, id; if (de->count > 0) { @@ -567,9 +567,9 @@ put_dict_entry (cff_dict_entry *de, return len; } -long cff_dict_pack (cff_dict *dict, card8 *dest, long destlen) +int cff_dict_pack (cff_dict *dict, card8 *dest, int destlen) { - long len = 0; + int len = 0; int i; for (i = 0; i < dict->count; i++) { diff --git a/Build/source/texk/dvipdfm-x/cff_dict.h b/Build/source/texk/dvipdfm-x/cff_dict.h index fb1d6b73817..22bded979d9 100644 --- a/Build/source/texk/dvipdfm-x/cff_dict.h +++ b/Build/source/texk/dvipdfm-x/cff_dict.h @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2007-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2007-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. This program is free software; you can redistribute it and/or modify @@ -38,7 +38,7 @@ extern int cff_dict_known (cff_dict *dict, const char *key); /* decode/encode DICT */ extern cff_dict *cff_dict_unpack (card8 *data, card8 *endptr); -extern long cff_dict_pack (cff_dict *dict, card8 *dest, long destlen); +extern int cff_dict_pack (cff_dict *dict, card8 *dest, int destlen); extern void cff_dict_update (cff_dict *dict, cff_font *cff); diff --git a/Build/source/texk/dvipdfm-x/cff_limits.h b/Build/source/texk/dvipdfm-x/cff_limits.h index 8dcc0cb859e..375c73e963b 100644 --- a/Build/source/texk/dvipdfm-x/cff_limits.h +++ b/Build/source/texk/dvipdfm-x/cff_limits.h @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. This program is free software; you can redistribute it and/or modify @@ -26,7 +26,7 @@ #define CFF_INT_MAX 0x7fffffff #define CFF_INT_MIN (-0x7fffffff - 1) -#if (LONG_MAX < CFF_INT_MAX || LONG_MIN > CFF_INT_MIN) +#if (INT_MAX < CFF_INT_MAX || INT_MIN > CFF_INT_MIN) #error "CFF support won't work on this system." #endif diff --git a/Build/source/texk/dvipdfm-x/cff_types.h b/Build/source/texk/dvipdfm-x/cff_types.h index ff6a6f23f63..4d276348e26 100644 --- a/Build/source/texk/dvipdfm-x/cff_types.h +++ b/Build/source/texk/dvipdfm-x/cff_types.h @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. This program is free software; you can redistribute it and/or modify @@ -43,7 +43,7 @@ typedef unsigned char card8; /* 1-byte unsigned number */ typedef unsigned short card16; /* 2-byte unsigned number */ typedef unsigned char c_offsize; /* 1-byte unsigned number specifies the size of an Offset field or fields, range 1-4 */ -typedef unsigned long l_offset; /* 1, 2, 3, or 4-byte offset */ +typedef uint32_t l_offset; /* 1, 2, 3, or 4-byte offset */ typedef unsigned short s_SID; /* 2-byte string identifier */ typedef struct { diff --git a/Build/source/texk/dvipdfm-x/cid.c b/Build/source/texk/dvipdfm-x/cid.c index 486892e68a6..cf475472f9a 100644 --- a/Build/source/texk/dvipdfm-x/cid.c +++ b/Build/source/texk/dvipdfm-x/cid.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. This program is free software; you can redistribute it and/or modify diff --git a/Build/source/texk/dvipdfm-x/cid.h b/Build/source/texk/dvipdfm-x/cid.h index 18535d1be3f..cf0c2742ee0 100644 --- a/Build/source/texk/dvipdfm-x/cid.h +++ b/Build/source/texk/dvipdfm-x/cid.h @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. This program is free software; you can redistribute it and/or modify diff --git a/Build/source/texk/dvipdfm-x/cidtype0.c b/Build/source/texk/dvipdfm-x/cidtype0.c index cc30ab049d5..e906e9ebb7d 100644 --- a/Build/source/texk/dvipdfm-x/cidtype0.c +++ b/Build/source/texk/dvipdfm-x/cidtype0.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2007-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2007-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. This program is free software; you can redistribute it and/or modify @@ -99,7 +99,7 @@ add_CIDHMetrics (pdf_obj *fontdict, struct tt_head_table *head, struct tt_longMetrics *hmtx) { pdf_obj *w_array, *an_array = NULL; - long cid, start = 0, prev = 0; + int cid, start = 0, prev = 0; double defaultAdvanceWidth; int empty = 1; @@ -170,9 +170,9 @@ add_CIDVMetrics (sfnt *sfont, pdf_obj *fontdict, struct tt_head_table *head, struct tt_longMetrics *hmtx) { pdf_obj *w2_array, *an_array = NULL; - long cid; + int cid; #if 0 - long prev = 0, start = 0; + int prev = 0, start = 0; #endif struct tt_VORG_table *vorg; struct tt_vhea_table *vhea = NULL; @@ -344,13 +344,13 @@ add_CIDMetrics (sfnt *sfont, pdf_obj *fontdict, /* * Create an instance of embeddable font. */ -static long +static int write_fontfile (CIDFont *font, cff_font *cffont) { cff_index *topdict, *fdarray, *private; unsigned char *dest; - long destlen = 0, i, size; - long offset, topdict_offset, fdarray_offset; + int destlen = 0, i, size; + int offset, topdict_offset, fdarray_offset; /* DICT sizes (offset set to long int) */ topdict = cff_new_index(1); @@ -617,12 +617,12 @@ CIDFont_type0_dofont (CIDFont *font) cff_index *charstrings, *idx; cff_charsets *charset = NULL; cff_fdselect *fdselect = NULL; - long charstring_len, max_len; - long destlen = 0; - long size, offset = 0; + int charstring_len, max_len; + int destlen = 0; + int size, offset = 0; card8 *data; card16 num_glyphs = 0, gid; - long cid; + int cid; card16 cs_count, last_cid = 0; int fd, prev_fd; char *used_chars; @@ -670,10 +670,10 @@ CIDFont_type0_dofont (CIDFont *font) pdf_add_dict(font->fontdict, pdf_new_name("DW"), pdf_new_number(1000.0)); } else { - long cid_count; + int cid_count; if (cff_dict_known(cffont->topdict, "CIDCount")) { - cid_count = (long) cff_dict_get(cffont->topdict, "CIDCount", 0); + cid_count = (int) cff_dict_get(cffont->topdict, "CIDCount", 0); } else { cid_count = CID_MAX + 1; } @@ -716,7 +716,7 @@ CIDFont_type0_dofont (CIDFont *font) cff_read_subrs(cffont); - offset = (long) cff_dict_get(cffont->topdict, "CharStrings", 0); + offset = (int) cff_dict_get(cffont->topdict, "CharStrings", 0); cff_seek_set(cffont, offset); idx = cff_get_index_header(cffont); /* offset is now absolute offset ... bad */ @@ -1049,12 +1049,12 @@ CIDFont_type0_t1cdofont (CIDFont *font) { cff_font *cffont; cff_index *charstrings, *idx; - long charstring_len, max_len; - long destlen = 0; - long size, offset = 0; + int charstring_len, max_len; + int destlen = 0; + int size, offset = 0; card8 *data; card16 num_glyphs, gid, last_cid; - long i, cid; + int i, cid; char *used_chars; double default_width, nominal_width; CIDType0Error error; @@ -1170,7 +1170,7 @@ CIDFont_type0_t1cdofont (CIDFont *font) /* */ - offset = (long) cff_dict_get(cffont->topdict, "CharStrings", 0); + offset = (int) cff_dict_get(cffont->topdict, "CharStrings", 0); cff_seek_set(cffont, offset); idx = cff_get_index_header(cffont); /* offset is now absolute offset ... bad */ @@ -1418,7 +1418,7 @@ create_ToUnicode_stream (cff_font *cffont, CMap *cmap; CID cid; card16 gid; - long glyph_count, total_fail_count; + int glyph_count, total_fail_count; char *cmap_name; #define WBUF_SIZE 1024 unsigned char wbuf[WBUF_SIZE]; @@ -1506,8 +1506,8 @@ get_font_attr (CIDFont *font, cff_font *cffont) double capheight, ascent, descent; double italicangle, stemv; double defaultwidth, nominalwidth; - long flags = 0; - long gid; + int flags = 0; + int gid; int i; static const char *L_c[] = { "H", "P", "Pi", "Rho", NULL @@ -1704,9 +1704,9 @@ CIDFont_type0_t1dofont (CIDFont *font) { cff_font *cffont; double defaultwidth, nominalwidth; - long num_glyphs = 0; + int num_glyphs = 0; FILE *fp; - long i, offset; + int i, offset; char *used_chars = NULL; card16 last_cid, gid, cid; unsigned char *CIDToGIDMap; @@ -1862,7 +1862,7 @@ CIDFont_type0_t1dofont (CIDFont *font) { cff_index *cstring; t1_ginfo gm; - long max = 0; + int max = 0; double *widths; int w_stat[1001], max_count, dw; diff --git a/Build/source/texk/dvipdfm-x/cidtype0.h b/Build/source/texk/dvipdfm-x/cidtype0.h index 34cf49e7142..8460a464331 100644 --- a/Build/source/texk/dvipdfm-x/cidtype0.h +++ b/Build/source/texk/dvipdfm-x/cidtype0.h @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. This program is free software; you can redistribute it and/or modify diff --git a/Build/source/texk/dvipdfm-x/cidtype2.c b/Build/source/texk/dvipdfm-x/cidtype2.c index f9be32ec6b9..a416f869698 100644 --- a/Build/source/texk/dvipdfm-x/cidtype2.c +++ b/Build/source/texk/dvipdfm-x/cidtype2.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. This program is free software; you can redistribute it and/or modify @@ -228,7 +228,7 @@ static void add_TTCIDHMetrics (pdf_obj *fontdict, struct tt_glyphs *g, char *used_chars, unsigned char *cidtogidmap, unsigned short last_cid) { - long cid, start = 0, prev = 0; + int cid, start = 0, prev = 0; pdf_obj *w_array, *an_array = NULL; double dw; int empty = 1; @@ -299,9 +299,9 @@ add_TTCIDVMetrics (pdf_obj *fontdict, struct tt_glyphs *g, char *used_chars, unsigned short last_cid) { pdf_obj *w2_array, *an_array = NULL; - long cid; + int cid; #if 0 - long prev = 0, start = 0; + int prev = 0, start = 0; #endif double defaultVertOriginY, defaultAdvanceHeight; int empty = 1; @@ -452,11 +452,11 @@ fix_CJK_symbols (unsigned short code) return alt_code; } -static long +static int cid_to_code (CMap *cmap, CID cid) { unsigned char inbuf[2], outbuf[32]; - long inbytesleft = 2, outbytesleft = 32; + int inbytesleft = 2, outbytesleft = 32; const unsigned char *p; unsigned char *q; @@ -472,17 +472,17 @@ cid_to_code (CMap *cmap, CID cid) if (inbytesleft != 0) return 0; else if (outbytesleft == 31) - return (long) outbuf[0]; + return (int) outbuf[0]; else if (outbytesleft == 30) - return (long) (outbuf[0] << 8|outbuf[1]); + return (int) (outbuf[0] << 8|outbuf[1]); else if (outbytesleft == 28) { /* We assume the output encoding is UTF-16. */ CID hi, lo; hi = outbuf[0] << 8|outbuf[1]; lo = outbuf[2] << 8|outbuf[3]; if (hi >= 0xd800 && hi <= 0xdbff && lo >= 0xdc00 && lo <= 0xdfff) - return (long) ((hi - 0xd800) * 0x400 + 0x10000 + lo - 0xdc00); + return (int) ((hi - 0xd800) * 0x400 + 0x10000 + lo - 0xdc00); else - return (long) (hi << 16|lo); + return (int) (hi << 16|lo); } return 0; @@ -689,7 +689,7 @@ CIDFont_type2_dofont (CIDFont *font) if (h_used_chars) { used_chars = h_used_chars; for (cid = 1; cid <= last_cid; cid++) { - long code; + int code; unsigned short gid; if (!is_used_char2(h_used_chars, cid)) @@ -703,7 +703,7 @@ CIDFont_type2_dofont (CIDFont *font) gid = tt_cmap_lookup(ttcmap, code); #ifdef FIX_CJK_UNIOCDE_SYMBOLS if (gid == 0 && unicode_cmap) { - long alt_code; + int alt_code; alt_code = fix_CJK_symbols((unsigned short)code); if (alt_code != code) { @@ -763,7 +763,7 @@ CIDFont_type2_dofont (CIDFont *font) } for (cid = 1; cid <= last_cid; cid++) { - long code; + int code; unsigned short gid; if (!is_used_char2(v_used_chars, cid)) @@ -785,7 +785,7 @@ CIDFont_type2_dofont (CIDFont *font) gid = tt_cmap_lookup(ttcmap, code); #ifdef FIX_CJK_UNIOCDE_SYMBOLS if (gid == 0 && unicode_cmap) { - long alt_code; + int alt_code; alt_code = fix_CJK_symbols((unsigned short)code); if (alt_code != code) { @@ -985,7 +985,7 @@ CIDFont_type2_open (CIDFont *font, const char *name, { char *shortname; - long namelen; + int namelen; /* MAC-ROMAN-EN-POSTSCRIPT or WIN-UNICODE-EN(US)-POSTSCRIPT */ shortname = NEW(PDF_NAME_LEN_MAX, char); diff --git a/Build/source/texk/dvipdfm-x/cidtype2.h b/Build/source/texk/dvipdfm-x/cidtype2.h index 27aeff10a23..b1a2eef69a6 100644 --- a/Build/source/texk/dvipdfm-x/cidtype2.h +++ b/Build/source/texk/dvipdfm-x/cidtype2.h @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. This program is free software; you can redistribute it and/or modify diff --git a/Build/source/texk/dvipdfm-x/cmap.c b/Build/source/texk/dvipdfm-x/cmap.c index fa8a72258ca..eacd6081b8d 100644 --- a/Build/source/texk/dvipdfm-x/cmap.c +++ b/Build/source/texk/dvipdfm-x/cmap.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. This program is free software; you can redistribute it and/or modify @@ -65,10 +65,10 @@ CMap_set_silent (int value) } /* Private funcs. */ -static int bytes_consumed (CMap *cmap, const unsigned char *instr, long inbytes); +static int bytes_consumed (CMap *cmap, const unsigned char *instr, int inbytes); static void handle_undefined (CMap *cmap, - const unsigned char **inbuf, long *inbytesleft, - unsigned char **outbuf, long *outbytesleft); + const unsigned char **inbuf, int *inbytesleft, + unsigned char **outbuf, int *outbytesleft); static int check_range (CMap *cmap, const unsigned char *srclo, const unsigned char *srchi, int srcdim, @@ -223,10 +223,10 @@ CMap_get_profile (CMap *cmap, int type) */ static void handle_undefined (CMap *cmap, - const unsigned char **inbuf, long *inbytesleft, - unsigned char **outbuf, long *outbytesleft) + const unsigned char **inbuf, int *inbytesleft, + unsigned char **outbuf, int *outbytesleft) { - long len = 0; + int len = 0; if (*outbytesleft < 2) ERROR("%s: Buffer overflow.", CMAP_DEBUG_STR); @@ -254,13 +254,13 @@ handle_undefined (CMap *cmap, void CMap_decode_char (CMap *cmap, - const unsigned char **inbuf, long *inbytesleft, - unsigned char **outbuf, long *outbytesleft) + const unsigned char **inbuf, int *inbytesleft, + unsigned char **outbuf, int *outbytesleft) { mapDef *t; const unsigned char *p, *save; unsigned char c = 0; - long count = 0; + int count = 0; p = save = *inbuf; /* @@ -350,10 +350,10 @@ CMap_decode_char (CMap *cmap, /* * For convenience, it does not do decoding to CIDs. */ -long +int CMap_decode (CMap *cmap, - const unsigned char **inbuf, long *inbytesleft, - unsigned char **outbuf, long *outbytesleft) + const unsigned char **inbuf, int *inbytesleft, + unsigned char **outbuf, int *outbytesleft) { int count; @@ -797,7 +797,7 @@ locate_tbl (mapDef **cur, const unsigned char *code, int dim) * a `single' character by CMap_decode(). */ static int -bytes_consumed (CMap *cmap, const unsigned char *instr, long inbytes) +bytes_consumed (CMap *cmap, const unsigned char *instr, int inbytes) { int i, pos, longest = 0, bytesconsumed; diff --git a/Build/source/texk/dvipdfm-x/cmap.h b/Build/source/texk/dvipdfm-x/cmap.h index 677516595ba..78f05ab95c3 100644 --- a/Build/source/texk/dvipdfm-x/cmap.h +++ b/Build/source/texk/dvipdfm-x/cmap.h @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. This program is free software; you can redistribute it and/or modify @@ -99,12 +99,12 @@ extern int CMap_add_codespacerange (CMap *cmap, const unsigned char *codelo, const unsigned char *codehi, int dim); extern void CMap_decode_char (CMap *cmap, - const unsigned char **inbuf, long *inbytesleft, - unsigned char **outbuf, long *outbytesleft); + const unsigned char **inbuf, int *inbytesleft, + unsigned char **outbuf, int *outbytesleft); -extern long CMap_decode (CMap *cmap, - const unsigned char **inbuf, long *inbytesleft, - unsigned char **outbuf, long *outbytesleft); +extern int CMap_decode (CMap *cmap, + const unsigned char **inbuf, int *inbytesleft, + unsigned char **outbuf, int *outbytesleft); extern int CMap_reverse_decode(CMap *cmap, CID cid); diff --git a/Build/source/texk/dvipdfm-x/cmap_p.h b/Build/source/texk/dvipdfm-x/cmap_p.h index 51647aa2525..b734915124f 100644 --- a/Build/source/texk/dvipdfm-x/cmap_p.h +++ b/Build/source/texk/dvipdfm-x/cmap_p.h @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. This program is free software; you can redistribute it and/or modify diff --git a/Build/source/texk/dvipdfm-x/cmap_read.c b/Build/source/texk/dvipdfm-x/cmap_read.c index abf13c2f3f3..018a948496d 100644 --- a/Build/source/texk/dvipdfm-x/cmap_read.c +++ b/Build/source/texk/dvipdfm-x/cmap_read.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks @@ -225,7 +225,7 @@ handle_codearray (CMap *cmap, ifreader *input, unsigned char *codeLo, int dim, i if ((tok = pst_get_token(&(input->cursor), input->endptr)) == NULL) return -1; else if (PST_STRINGTYPE(tok)) { - CMap_add_bfchar(cmap, codeLo, dim, (unsigned char *) pst_data_ptr(tok), (int) pst_length_of(tok)); + CMap_add_bfchar(cmap, codeLo, dim, (unsigned char *) pst_data_ptr(tok), pst_length_of(tok)); } else if (PST_MARKTYPE(tok) || !PST_NAMETYPE(tok)) ERROR("%s: Invalid CMap mapping record.", CMAP_PARSE_DEBUG_STR); else @@ -242,7 +242,7 @@ do_notdefrange (CMap *cmap, ifreader *input, int count) { pst_obj *tok; unsigned char codeLo[TOKEN_LEN_MAX], codeHi[TOKEN_LEN_MAX]; - long dstCID; + int dstCID; int dim; while (count-- > 0) { @@ -278,7 +278,7 @@ do_bfrange (CMap *cmap, ifreader *input, int count) return -1; if (PST_STRINGTYPE(tok)) { CMap_add_bfrange(cmap, codeLo, codeHi, srcdim, - (unsigned char *) pst_data_ptr(tok), (int) pst_length_of(tok)); + (unsigned char *) pst_data_ptr(tok), pst_length_of(tok)); } else if (PST_MARKTYPE(tok)) { if (handle_codearray(cmap, input, codeLo, srcdim, codeHi[srcdim-1] - codeLo[srcdim-1] + 1) < 0) { @@ -298,7 +298,7 @@ do_cidrange (CMap *cmap, ifreader *input, int count) { pst_obj *tok; unsigned char codeLo[TOKEN_LEN_MAX], codeHi[TOKEN_LEN_MAX]; - long dstCID; + int dstCID; int dim; while (count-- > 0) { @@ -323,7 +323,7 @@ static int do_notdefchar (CMap *cmap, ifreader *input, int count) { pst_obj *tok1, *tok2; - long dstCID; + int dstCID; while (count-- > 0) { if (ifreader_need(input, TOKEN_LEN_MAX*2) == 0) @@ -364,8 +364,8 @@ do_bfchar (CMap *cmap, ifreader *input, int count) /* We only support single CID font as descendant font, charName should not come here. */ if (PST_STRINGTYPE(tok1) && PST_STRINGTYPE(tok2)) { CMap_add_bfchar(cmap, - (unsigned char *) pst_data_ptr(tok1), (int) pst_length_of(tok1), - (unsigned char *) pst_data_ptr(tok2), (int) pst_length_of(tok2)); + (unsigned char *) pst_data_ptr(tok1), pst_length_of(tok1), + (unsigned char *) pst_data_ptr(tok2), pst_length_of(tok2)); } else if (PST_NAMETYPE(tok2)) ERROR("%s: Mapping to charName not supported.", CMAP_PARSE_DEBUG_STR); else @@ -381,7 +381,7 @@ static int do_cidchar (CMap *cmap, ifreader *input, int count) { pst_obj *tok1, *tok2; - long dstCID; + int dstCID; while (count-- > 0) { if (ifreader_need(input, TOKEN_LEN_MAX*2) == 0) diff --git a/Build/source/texk/dvipdfm-x/cmap_write.c b/Build/source/texk/dvipdfm-x/cmap_write.c index c56b95fa1a1..a1addc071ae 100644 --- a/Build/source/texk/dvipdfm-x/cmap_write.c +++ b/Build/source/texk/dvipdfm-x/cmap_write.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. This program is free software; you can redistribute it and/or modify @@ -183,7 +183,7 @@ write_map (mapDef *mtab, int count, sprintf(fmt_buf, "%d beginbfchar\n", count); pdf_add_stream(stream, fmt_buf, strlen(fmt_buf)); pdf_add_stream(stream, - wbuf->buf, (long) (wbuf->curptr - wbuf->buf)); + wbuf->buf, (int) (wbuf->curptr - wbuf->buf)); wbuf->curptr = wbuf->buf; pdf_add_stream(stream, "endbfchar\n", strlen("endbfchar\n")); @@ -198,7 +198,7 @@ write_map (mapDef *mtab, int count, sprintf(fmt_buf, "%d beginbfchar\n", count); pdf_add_stream(stream, fmt_buf, strlen(fmt_buf)); pdf_add_stream(stream, - wbuf->buf, (long) (wbuf->curptr - wbuf->buf)); + wbuf->buf, (int) (wbuf->curptr - wbuf->buf)); wbuf->curptr = wbuf->buf; pdf_add_stream(stream, "endbfchar\n", strlen("endbfchar\n")); @@ -229,7 +229,7 @@ write_map (mapDef *mtab, int count, *(wbuf->curptr)++ = '\n'; } pdf_add_stream(stream, - wbuf->buf, (long) (wbuf->curptr - wbuf->buf)); + wbuf->buf, (int) (wbuf->curptr - wbuf->buf)); wbuf->curptr = wbuf->buf; pdf_add_stream(stream, "endbfrange\n", strlen("endbfrange\n")); @@ -323,7 +323,7 @@ CMap_create_stream (CMap *cmap) pdf_new_name("Identity-H")); } } else { - long res_id; + int res_id; pdf_obj *ucmap_ref; res_id = pdf_findresource("CMap", CMap_get_name(cmap->useCMap)); @@ -371,7 +371,7 @@ CMap_create_stream (CMap *cmap) >> def\n" wbuf.curptr += sprintf(wbuf.curptr, CMAP_CSI_FMT, csi->registry, csi->ordering, csi->supplement); - pdf_add_stream(stream, wbuf.buf, (long)(wbuf.curptr - wbuf.buf)); + pdf_add_stream(stream, wbuf.buf, (int)(wbuf.curptr - wbuf.buf)); wbuf.curptr = wbuf.buf; /* codespacerange */ @@ -392,7 +392,7 @@ CMap_create_stream (CMap *cmap) *(wbuf.curptr)++ = '>'; *(wbuf.curptr)++ = '\n'; } - pdf_add_stream(stream, wbuf.buf, (long)(wbuf.curptr - wbuf.buf)); + pdf_add_stream(stream, wbuf.buf, (int)(wbuf.curptr - wbuf.buf)); wbuf.curptr = wbuf.buf; pdf_add_stream(stream, "endcodespacerange\n", strlen("endcodespacerange\n")); @@ -408,7 +408,7 @@ CMap_create_stream (CMap *cmap) sprintf(fmt_buf, "%d beginbfchar\n", count); pdf_add_stream(stream, fmt_buf, strlen(fmt_buf)); pdf_add_stream(stream, - wbuf.buf, (long) (wbuf.curptr - wbuf.buf)); + wbuf.buf, (int) (wbuf.curptr - wbuf.buf)); pdf_add_stream(stream, "endbfchar\n", strlen("endbfchar\n")); count = 0; diff --git a/Build/source/texk/dvipdfm-x/cmap_write.h b/Build/source/texk/dvipdfm-x/cmap_write.h index 00888027ce6..424e6deca0a 100644 --- a/Build/source/texk/dvipdfm-x/cmap_write.h +++ b/Build/source/texk/dvipdfm-x/cmap_write.h @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks diff --git a/Build/source/texk/dvipdfm-x/cs_type2.c b/Build/source/texk/dvipdfm-x/cs_type2.c index f2629420f2e..c2880b4a5af 100644 --- a/Build/source/texk/dvipdfm-x/cs_type2.c +++ b/Build/source/texk/dvipdfm-x/cs_type2.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. This program is free software; you can redistribute it and/or modify @@ -201,10 +201,10 @@ clear_stack (card8 **dest, card8 *limit) for (i = 0; i < stack_top; i++) { double value; - long ivalue; + int ivalue; value = arg_stack[i]; /* Nearest integer value */ - ivalue = (long) floor(value+0.5); + ivalue = (int) floor(value+0.5); if (value >= 0x8000L || value <= (-0x8000L - 1)) { /* * This number cannot be represented as a single operand. @@ -215,10 +215,10 @@ clear_stack (card8 **dest, card8 *limit) /* 16.16-bit signed fixed value */ DST_NEED(limit, *dest + 5); *(*dest)++ = 255; - ivalue = (long) floor(value); /* mantissa */ + ivalue = (int) floor(value); /* mantissa */ *(*dest)++ = (ivalue >> 8) & 0xff; *(*dest)++ = ivalue & 0xff; - ivalue = (long)((value - ivalue) * 0x10000l); /* fraction */ + ivalue = (int)((value - ivalue) * 0x10000l); /* fraction */ *(*dest)++ = (ivalue >> 8) & 0xff; *(*dest)++ = ivalue & 0xff; /* Everything else are integers. */ @@ -593,7 +593,7 @@ do_operator2 (card8 **dest, card8 *limit, card8 **data, card8 *endptr) static void get_integer (card8 **data, card8 *endptr) { - long result = 0; + int result = 0; card8 b0 = **data, b1, b2; *data += 1; @@ -635,7 +635,7 @@ get_integer (card8 **data, card8 *endptr) static void get_fixed (card8 **data, card8 *endptr) { - long ivalue; + int ivalue; double rvalue; *data += 1; @@ -664,7 +664,7 @@ get_fixed (card8 **data, card8 *endptr) * id: biased subroutine number. */ static void -get_subr (card8 **subr, long *len, cff_index *subr_idx, long id) +get_subr (card8 **subr, int *len, cff_index *subr_idx, int id) { card16 count; @@ -704,7 +704,7 @@ do_charstring (card8 **dest, card8 *limit, cff_index *gsubr_idx, cff_index *subr_idx) { card8 b0 = 0, *subr; - long len; + int len; if (nest > CS_SUBR_NEST_MAX) ERROR("%s: Subroutine nested too deeply.", CS_TYPE2_DEBUG_STR); @@ -722,7 +722,7 @@ do_charstring (card8 **dest, card8 *limit, status = CS_STACK_ERROR; } else { stack_top--; - get_subr(&subr, &len, gsubr_idx, (long) arg_stack[stack_top]); + get_subr(&subr, &len, gsubr_idx, (int) arg_stack[stack_top]); if (*dest + len > limit) ERROR("%s: Possible buffer overflow.", CS_TYPE2_DEBUG_STR); do_charstring(dest, limit, &subr, subr + len, @@ -734,7 +734,7 @@ do_charstring (card8 **dest, card8 *limit, status = CS_STACK_ERROR; } else { stack_top--; - get_subr(&subr, &len, subr_idx, (long) arg_stack[stack_top]); + get_subr(&subr, &len, subr_idx, (int) arg_stack[stack_top]); if (limit < *dest + len) ERROR("%s: Possible buffer overflow.", CS_TYPE2_DEBUG_STR); do_charstring(dest, limit, &subr, subr + len, diff --git a/Build/source/texk/dvipdfm-x/cs_type2.h b/Build/source/texk/dvipdfm-x/cs_type2.h index 76ff1b4dc08..8f8e6d40fe5 100644 --- a/Build/source/texk/dvipdfm-x/cs_type2.h +++ b/Build/source/texk/dvipdfm-x/cs_type2.h @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. This program is free software; you can redistribute it and/or modify diff --git a/Build/source/texk/dvipdfm-x/dpxcrypt.h b/Build/source/texk/dvipdfm-x/dpxcrypt.h index e6c8f651cd0..201448de6ac 100644 --- a/Build/source/texk/dvipdfm-x/dpxcrypt.h +++ b/Build/source/texk/dvipdfm-x/dpxcrypt.h @@ -1,6 +1,6 @@ /* This is DVIPDFMx, an eXtended version of DVIPDFM by Mark A. Wicks. - Copyright (C) 2003-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2003-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. This program is free software; you can redistribute it and/or modify diff --git a/Build/source/texk/dvipdfm-x/dpxfile.c b/Build/source/texk/dvipdfm-x/dpxfile.c index 34ab9b0d6b3..301b79ed13f 100644 --- a/Build/source/texk/dvipdfm-x/dpxfile.c +++ b/Build/source/texk/dvipdfm-x/dpxfile.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2007-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2007-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks @@ -1138,7 +1138,7 @@ static int isdfont (FILE *fp) { int i, n; - unsigned long pos; + uint32_t pos; rewind(fp); diff --git a/Build/source/texk/dvipdfm-x/dpxutil.c b/Build/source/texk/dvipdfm-x/dpxutil.c index b2611407a8c..7c8455f89b4 100644 --- a/Build/source/texk/dvipdfm-x/dpxutil.c +++ b/Build/source/texk/dvipdfm-x/dpxutil.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks diff --git a/Build/source/texk/dvipdfm-x/dpxutil.h b/Build/source/texk/dvipdfm-x/dpxutil.h index 574fa34547e..b623b6e3dd3 100644 --- a/Build/source/texk/dvipdfm-x/dpxutil.h +++ b/Build/source/texk/dvipdfm-x/dpxutil.h @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks diff --git a/Build/source/texk/dvipdfm-x/dvi.h b/Build/source/texk/dvipdfm-x/dvi.h index aacfb11b29c..376182be2fd 100644 --- a/Build/source/texk/dvipdfm-x/dvi.h +++ b/Build/source/texk/dvipdfm-x/dvi.h @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks diff --git a/Build/source/texk/dvipdfm-x/dvipdfmx.c b/Build/source/texk/dvipdfm-x/dvipdfmx.c index 38368b4a01a..19b0ea3cf3f 100644 --- a/Build/source/texk/dvipdfm-x/dvipdfmx.c +++ b/Build/source/texk/dvipdfm-x/dvipdfmx.c @@ -73,7 +73,7 @@ static int verbose = 0; static int mp_mode = 0; -static long opt_flags = 0; +static int opt_flags = 0; #define OPT_TPIC_TRANSPARENT_FILL (1 << 1) #define OPT_CIDFONT_FIXEDPITCH (1 << 2) @@ -320,7 +320,7 @@ select_paper (const char *paperspec) struct page_range { - long first, last; + int first, last; } *page_ranges = NULL; int num_page_ranges = 0; @@ -589,7 +589,7 @@ do_args (int argc, char *argv[], const char *source) case 'C': { - long flags = (unsigned) strtol(optarg, &nextptr, 0); + int flags = (unsigned) strtol(optarg, &nextptr, 0); if (nextptr == optarg) ERROR("Invalid flag: %s", optarg); if (flags < 0) @@ -822,7 +822,7 @@ do_mps_pages (void) mps_do_page(fp); MFCLOSE(fp); } else { - long i, page_no, step, page_count = 0; + int i, page_no, step, page_count = 0; char *filename; /* Process filename.1, filename.2,... */ filename = NEW(strlen(dvi_filename) + 16 + 1, char); @@ -833,7 +833,7 @@ do_mps_pages (void) if (page_no < 0) ERROR("Invalid page number for MPS input: %d", page_no); - sprintf(filename, "%s.%ld", dvi_filename, page_no + 1); + sprintf(filename, "%s.%d", dvi_filename, page_no + 1); fp = MFOPEN(filename, FOPEN_RBIN_MODE); if (fp) { MESG("[%ld<%s>", page_no + 1, filename); diff --git a/Build/source/texk/dvipdfm-x/epdf.c b/Build/source/texk/dvipdfm-x/epdf.c index d6305d8f4dd..2f2eb972a78 100644 --- a/Build/source/texk/dvipdfm-x/epdf.c +++ b/Build/source/texk/dvipdfm-x/epdf.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2007-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2007-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks @@ -54,7 +54,7 @@ static int rect_equal (pdf_obj *rect1, pdf_obj *rect2); #if 0 #if HAVE_ZLIB #include -static int add_stream_flate (pdf_obj *dst, const void *data, long len); +static int add_stream_flate (pdf_obj *dst, const void *data, int len); #endif static int concat_stream (pdf_obj *dst, pdf_obj *src); #endif @@ -127,12 +127,12 @@ rect_equal (pdf_obj *rect1, pdf_obj *rect2) } static pdf_obj* -pdf_get_page_obj (pdf_file *pf, long page_no, +pdf_get_page_obj (pdf_file *pf, int page_no, pdf_obj **ret_bbox, pdf_obj **ret_resources) { pdf_obj *page_tree; pdf_obj *bbox = NULL, *resources = NULL, *rotate = NULL; - long page_idx; + int page_idx; /* * Get Page Tree. @@ -180,7 +180,7 @@ pdf_get_page_obj (pdf_file *pf, long page_no, * Negative page numbers are counted from the back. */ { - long count = pdf_number_value(pdf_lookup_dict(page_tree, "Count")); + int count = pdf_number_value(pdf_lookup_dict(page_tree, "Count")); page_idx = page_no + (page_no >= 0 ? -1 : count); if (page_idx < 0 || page_idx >= count) { WARN("Page %ld does not exist.", page_no); @@ -203,7 +203,7 @@ pdf_get_page_obj (pdf_file *pf, long page_no, resources = tmp ? pdf_deref_obj(tmp) : pdf_new_dict(); while (1) { - long kids_length, i; + int kids_length, i; if ((tmp = pdf_deref_obj(pdf_lookup_dict(page_tree, "MediaBox")))) { if (bbox) @@ -260,7 +260,7 @@ pdf_get_page_obj (pdf_file *pf, long page_no, kids_length = pdf_array_length(kids); for (i = 0; i < kids_length; i++) { - long count; + int count; pdf_release_obj(page_tree); page_tree = pdf_deref_obj(pdf_get_array(kids, i)); @@ -398,7 +398,7 @@ pdf_include_page (pdf_ximage *ximage, FILE *image_file, const char *filename) xform_info info; pdf_obj *contents = NULL, *catalog; pdf_obj *page = NULL, *resources = NULL, *markinfo = NULL; - long page_no; + int page_no; pf = pdf_open(filename, image_file); if (!pf) @@ -882,7 +882,7 @@ pdf_copy_clip (FILE *image_file, int pageNo, double x_user, double y_user) #define WBUF_SIZE 4096 #if HAVE_ZLIB static int -add_stream_flate (pdf_obj *dst, const void *data, long len) +add_stream_flate (pdf_obj *dst, const void *data, int len) { z_stream z; Bytef wbuf[WBUF_SIZE]; @@ -926,7 +926,7 @@ static int concat_stream (pdf_obj *dst, pdf_obj *src) { const char *stream_data; - long stream_length; + int stream_length; pdf_obj *stream_dict; pdf_obj *filter; diff --git a/Build/source/texk/dvipdfm-x/error.h b/Build/source/texk/dvipdfm-x/error.h index f6cddbb2c8e..ea6aa616346 100644 --- a/Build/source/texk/dvipdfm-x/error.h +++ b/Build/source/texk/dvipdfm-x/error.h @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks diff --git a/Build/source/texk/dvipdfm-x/fontmap.c b/Build/source/texk/dvipdfm-x/fontmap.c index 832e166c8a1..0aa1c36b597 100644 --- a/Build/source/texk/dvipdfm-x/fontmap.c +++ b/Build/source/texk/dvipdfm-x/fontmap.c @@ -358,7 +358,7 @@ fontmap_parse_mapdef_dpm (fontmap_rec *mrec, while (p + 1 < endptr && *p != '\r' && *p != '\n' && *p == '-') { char *q, mopt = p[1]; - long v; + int v; p += 2; skip_blank(&p, endptr); switch (mopt) { @@ -965,7 +965,7 @@ pdf_load_fontmap_file (const char *filename, int mode) fontmap_rec *mrec; FILE *fp; const char *p = NULL, *endptr; - long llen, lpos = 0; + int llen, lpos = 0; int error = 0, format = 0; ASSERT(filename); diff --git a/Build/source/texk/dvipdfm-x/jp2image.c b/Build/source/texk/dvipdfm-x/jp2image.c index 09d3b227c25..37cbcc0cda6 100644 --- a/Build/source/texk/dvipdfm-x/jp2image.c +++ b/Build/source/texk/dvipdfm-x/jp2image.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Matthias Franz, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Matthias Franz, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks @@ -391,7 +391,7 @@ jp2_include_image (pdf_ximage *ximage, FILE *fp) pdf_new_name("SMaskInData"), pdf_new_number(1)); /* Read whole file */ { - size_t nb_read; + int nb_read; rewind(fp); while ((nb_read = fread(work_buffer, sizeof(char), WORK_BUFFER_SIZE, fp)) > 0) diff --git a/Build/source/texk/dvipdfm-x/jpegimage.c b/Build/source/texk/dvipdfm-x/jpegimage.c index 82179e0e947..aab5ee49f70 100644 --- a/Build/source/texk/dvipdfm-x/jpegimage.c +++ b/Build/source/texk/dvipdfm-x/jpegimage.c @@ -572,10 +572,10 @@ read_APP14_Adobe (struct JPEG_info *j_info, FILE *fp) #define JPEG_EXIF_BIGENDIAN 0 #define JPEG_EXIF_LITTLEENDIAN 1 -static long +static int read_exif_bytes (unsigned char **pp, int n, int endian) { - long rval = 0; + int rval = 0; unsigned char *p = *pp; int i; @@ -618,7 +618,7 @@ read_APP1_Exif (struct JPEG_info *j_info, FILE *fp, size_t length) unsigned char *tiff_header; int endian; int num_fields; - long value = 0, offset; + int value = 0, offset; double xres = 72.0, yres = 72.0; double res_unit = 1.0; @@ -657,8 +657,8 @@ read_APP1_Exif (struct JPEG_info *j_info, FILE *fp, size_t length) num_fields = read_exif_bytes(&p, 2, endian); while (num_fields-- > 0 && p < endptr) { int tag, type; - long count; - unsigned long den, num; + int count; + unsigned int den, num; if (p + 12 > endptr) { WARN("%s: Truncated Exif data...", JPEG_DEBUG_STR); @@ -680,8 +680,8 @@ read_APP1_Exif (struct JPEG_info *j_info, FILE *fp, size_t length) goto err; } else { unsigned char *vp = tiff_header + offset; - num = (unsigned long) read_exif_bytes(&vp, 4, endian); - den = (unsigned long) read_exif_bytes(&vp, 4, endian); + num = (unsigned int) read_exif_bytes(&vp, 4, endian); + den = (unsigned int) read_exif_bytes(&vp, 4, endian); } if (den > 0) xres = (double) num / den; @@ -697,8 +697,8 @@ read_APP1_Exif (struct JPEG_info *j_info, FILE *fp, size_t length) goto err; } else { unsigned char *vp = tiff_header + offset; - num = (unsigned long) read_exif_bytes(&vp, 4, endian); - den = (unsigned long) read_exif_bytes(&vp, 4, endian); + num = (unsigned int) read_exif_bytes(&vp, 4, endian); + den = (unsigned int) read_exif_bytes(&vp, 4, endian); } if (den > 0) yres = (double) num / den; @@ -840,12 +840,12 @@ static int JPEG_copy_stream (struct JPEG_info *j_info, pdf_obj *stream, FILE *fp) { JPEG_marker marker; - size_t length; + int length; int found_SOFn, count; #define SKIP_CHUNK(j,c) ((j)->skipbits[(c) / 8] & (1 << (7 - (c) % 8))) #define COPY_CHUNK(f,s,l) while ((l) > 0) { \ - size_t nb_read = fread(work_buffer, sizeof(char), MIN((l), WORK_BUFFER_SIZE), (f)); \ + int nb_read = fread(work_buffer, sizeof(char), MIN((l), WORK_BUFFER_SIZE), (f)); \ if (nb_read > 0) \ pdf_add_stream((s), work_buffer, nb_read); \ (l) -= nb_read; \ @@ -915,7 +915,7 @@ JPEG_scan_file (struct JPEG_info *j_info, FILE *fp) (marker = JPEG_get_marker(fp)) != (JPEG_marker) -1) { if ( marker != JM_SOI && (marker < JM_RST0 || marker > JM_RST7)) { - long length = get_unsigned_pair(fp) - 2; + int length = get_unsigned_pair(fp) - 2; switch (marker) { case JM_SOF0: case JM_SOF1: case JM_SOF2: case JM_SOF3: case JM_SOF5: case JM_SOF6: case JM_SOF7: case JM_SOF9: diff --git a/Build/source/texk/dvipdfm-x/mem.c b/Build/source/texk/dvipdfm-x/mem.c index 34fc8a6b2a5..1e2f685d95a 100644 --- a/Build/source/texk/dvipdfm-x/mem.c +++ b/Build/source/texk/dvipdfm-x/mem.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks @@ -31,22 +31,22 @@ #include "mem.h" #include "error.h" -void *new (size_t size) +void *new (uint32_t size) { - void *result = malloc (size); + void *result = malloc ((size_t)size); if (!result) { - ERROR("Out of memory - asked for %lu bytes\n", (unsigned long) size); + ERROR("Out of memory - asked for %u bytes\n", size); } return result; } -void *renew (void *mem, size_t size) +void *renew (void *mem, uint32_t size) { if (size) { - void *result = realloc (mem, size); + void *result = realloc (mem, (size_t)size); if (!result) { - ERROR("Out of memory - asked for %lu bytes\n", (unsigned long) size); + ERROR("Out of memory - asked for %u bytes\n", size); } return result; } else { diff --git a/Build/source/texk/dvipdfm-x/mem.h b/Build/source/texk/dvipdfm-x/mem.h index cbc8c28eaa4..3d8200716e1 100644 --- a/Build/source/texk/dvipdfm-x/mem.h +++ b/Build/source/texk/dvipdfm-x/mem.h @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks @@ -24,12 +24,18 @@ #define _MEM_H_ #include +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif -extern void *new (size_t size); -extern void *renew (void *p, size_t size); +extern void *new (uint32_t size); +extern void *renew (void *p, uint32_t size); -#define NEW(n,type) (type *) new(((size_t)(n))*sizeof(type)) -#define RENEW(p,n,type) (type *) renew(p,(n)*sizeof(type)) +#define NEW(n,type) (type *) new(((uint32_t)(n))*sizeof(type)) +#define RENEW(p,n,type) (type *) renew(p,((uint32_t)(n))*sizeof(type)) #define RELEASE(p) free(p) #endif /* _MEM_H_ */ diff --git a/Build/source/texk/dvipdfm-x/mfileio.c b/Build/source/texk/dvipdfm-x/mfileio.c index 8d17ec526e2..c21539eba22 100644 --- a/Build/source/texk/dvipdfm-x/mfileio.c +++ b/Build/source/texk/dvipdfm-x/mfileio.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks @@ -32,7 +32,7 @@ #ifdef IODEBUG static FILE *iodebug_file = NULL; -static long event = 0; +static int event = 0; static void io_debug_init(void) { if (!iodebug_file) { @@ -56,7 +56,7 @@ FILE *mfopen(const char *name, const char *mode, const char *function, int line) tmp = fopen (name, mode); #endif event += 1; - fprintf(iodebug_file, "%p %07ld [fopen] %s:%d\n", tmp, event, + fprintf(iodebug_file, "%p %07d [fopen] %s:%d\n", tmp, event, function, line); return tmp; } @@ -64,7 +64,7 @@ int mfclose(FILE *file, const char *function, int line) { io_debug_init(); event += 1; - fprintf(iodebug_file, "%p %07ld [fclose] %s:%d\n", file, event, + fprintf(iodebug_file, "%p %07d [fclose] %s:%d\n", file, event, function, line); return fclose(file); } @@ -75,16 +75,16 @@ static void os_error(void) ERROR ("io: An OS command failed that should not have.\n"); } -void seek_absolute (FILE *file, long pos) +void seek_absolute (FILE *file, int32_t pos) { - if (fseek(file, pos, SEEK_SET)) { + if (fseek(file, (long)pos, SEEK_SET)) { os_error(); } } -void seek_relative (FILE *file, long pos) +void seek_relative (FILE *file, int32_t pos) { - if (fseek(file, pos, SEEK_CUR)) { + if (fseek(file, (long)pos, SEEK_CUR)) { os_error(); } } @@ -97,23 +97,26 @@ void seek_end (FILE *file) } } -long tell_position (FILE *file) +int32_t tell_position (FILE *file) { - long size; - if ((size = ftell (file)) < 0) { + long size = ftell (file); + if (size < 0) os_error(); - } +#if LONG_MAX > 0x7fffffff + if (size > 0x7fffffff) + ERROR ("ftell: file size %ld exceeds 0x7fffffff.\n", size); +#endif return size; } -long file_size (FILE *file) +int32_t file_size (FILE *file) { - long size; + int32_t size; /* Seek to end */ seek_end (file); size = tell_position (file); rewind (file); - return (size); + return size; } off_t xfile_size (FILE *file, const char *name) diff --git a/Build/source/texk/dvipdfm-x/mfileio.h b/Build/source/texk/dvipdfm-x/mfileio.h index e0a3b239b76..869d338801b 100644 --- a/Build/source/texk/dvipdfm-x/mfileio.h +++ b/Build/source/texk/dvipdfm-x/mfileio.h @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks @@ -43,14 +43,14 @@ int mfclose (FILE *file, const char *function, int line); #define MFCLOSE(file) fclose(file) #endif -extern void seek_absolute (FILE *file, long pos); -extern void seek_relative (FILE *file, long pos); +extern void seek_absolute (FILE *file, int32_t pos); +extern void seek_relative (FILE *file, int32_t pos); extern void seek_end (FILE *file); -extern long tell_position (FILE *file); +extern int32_t tell_position (FILE *file); -extern long file_size (FILE *file); +extern int32_t file_size (FILE *file); #define xseek_absolute(file, pos, name) xfseeko (file, (off_t)(pos), SEEK_SET, name) #define xseek_relative(file, pos, name) xfseeko (file, (off_t)(pos), SEEK_CUR, name) diff --git a/Build/source/texk/dvipdfm-x/mpost.c b/Build/source/texk/dvipdfm-x/mpost.c index b436b86148e..fbabb80b2a5 100644 --- a/Build/source/texk/dvipdfm-x/mpost.c +++ b/Build/source/texk/dvipdfm-x/mpost.c @@ -1534,7 +1534,7 @@ mps_include_page (const char *ident, FILE *fp) int st_depth, gs_depth; char *buffer; const char *p, *endptr; - long length, nb_read; + int length, nb_read; int dirmode, autorotate, error; rewind(fp); @@ -1612,7 +1612,7 @@ mps_do_page (FILE *image_file) pdf_rect bbox; char *buffer; const char *start, *end; - long size; + int size; int dir_mode; rewind(image_file); diff --git a/Build/source/texk/dvipdfm-x/otl_conf.c b/Build/source/texk/dvipdfm-x/otl_conf.c index bafacc57a7c..c65c58dd393 100644 --- a/Build/source/texk/dvipdfm-x/otl_conf.c +++ b/Build/source/texk/dvipdfm-x/otl_conf.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. This program is free software; you can redistribute it and/or modify @@ -459,7 +459,7 @@ otl_read_conf (const char *conf_name) FILE *fp; char *filename, *wbuf, *p, *endptr; const char *pp; - long size, len; + int size, len; filename = NEW(strlen(conf_name)+strlen(".otl")+1, char); strcpy(filename, conf_name); @@ -543,7 +543,7 @@ otl_find_conf (const char *conf_name) if (options) { pdf_obj *optkeys, *opt, *key; - long i, num_opts; + int i, num_opts; optkeys = pdf_dict_keys(options); num_opts = pdf_array_length(optkeys); diff --git a/Build/source/texk/dvipdfm-x/otl_opt.c b/Build/source/texk/dvipdfm-x/otl_opt.c index fa13df0993d..8e556ac0ad0 100644 --- a/Build/source/texk/dvipdfm-x/otl_opt.c +++ b/Build/source/texk/dvipdfm-x/otl_opt.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. This program is free software; you can redistribute it and/or modify @@ -237,12 +237,12 @@ otl_release_opt (otl_opt *opt) #if 0 struct lv_range { - long start, end; + int start, end; }; struct uc_coverage { - long count; + int count; struct lv_range *ranges; }; @@ -283,7 +283,7 @@ static void check_uc_coverage (struct uc_coverage *coverage) { struct lv_range *r1, *r2; - long i; + int i; for (i = 0; i < coverage->count; i++) { r1 = &coverage->ranges[i]; diff --git a/Build/source/texk/dvipdfm-x/pdfcolor.c b/Build/source/texk/dvipdfm-x/pdfcolor.c index 6a8c9077a58..92bf5711e3e 100644 --- a/Build/source/texk/dvipdfm-x/pdfcolor.c +++ b/Build/source/texk/dvipdfm-x/pdfcolor.c @@ -636,7 +636,7 @@ typedef struct typedef struct { - long size; + int size; iccSig CMMType; int32_t version; iccSig devClass; @@ -1261,7 +1261,7 @@ pdf_colorspace_load_ICCBased (const char *ident, const char *filename) pdf_obj *stream_dict; iccHeader icch; int colorspace; - long size; + int size; unsigned char checksum[16]; struct iccbased_cdata *cdata; diff --git a/Build/source/texk/dvipdfm-x/pdfdev.c b/Build/source/texk/dvipdfm-x/pdfdev.c index 8091ccff468..c1d6b86c19e 100644 --- a/Build/source/texk/dvipdfm-x/pdfdev.c +++ b/Build/source/texk/dvipdfm-x/pdfdev.c @@ -76,7 +76,7 @@ pdf_dev_scale (void) #define TEX_ONE_HUNDRED_BP 6578176 static struct { double dvi2pts; - long min_bp_val; /* Shortest resolvable distance in the output PDF. */ + int min_bp_val; /* Shortest resolvable distance in the output PDF. */ int precision; /* Number of decimal digits (in fractional part) kept. */ } dev_unit = { 0.0, @@ -92,8 +92,8 @@ dev_unit_dviunit (void) } #define DEV_PRECISION_MAX 8 -static unsigned long ten_pow[10] = { - 1ul, 10ul, 100ul, 1000ul, 10000ul, 100000ul, 1000000ul, 10000000ul, 100000000ul, 1000000000ul +static uint32_t ten_pow[10] = { + 1u, 10u, 100u, 1000u, 10000u, 100000u, 1000000u, 10000000u, 100000000u, 1000000000u }; static double ten_pow_inv[10] = { @@ -105,7 +105,7 @@ static double ten_pow_inv[10] = { #define dround_at(v,p) (ROUND( (v), ten_pow_inv[(p)] )) static int -p_itoa (long value, char *buf) +p_itoa (int value, char *buf) { int sign, ndigits; char *p = buf; @@ -146,11 +146,11 @@ p_itoa (long value, char *buf) static int p_dtoa (double value, int prec, char *buf) { - const long p[10] = { 1, 10, 100, 1000, 10000, + const int32_t p[10] = { 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000 }; double i, f; - long g; + int32_t g; char *c = buf; int n; @@ -163,7 +163,7 @@ p_dtoa (double value, int prec, char *buf) } f = modf(value, &i); - g = (long) (f * p[prec] + 0.5); + g = (int32_t) (f * p[prec] + 0.5); if (g == p[prec]) { g = 0; @@ -1048,7 +1048,7 @@ handle_multibyte_string (struct dev_font *font, if (ctype != -1 && font->enc_id >= 0) { const unsigned char *inbuf; unsigned char *outbuf; - long inbytesleft, outbytesleft; + int inbytesleft, outbytesleft; CMap *cmap; cmap = CMap_cache_get(font->enc_id); @@ -1287,7 +1287,7 @@ pdf_init_device (double dvi2pts, int precision, int black_and_white) dev_unit.precision = precision; } dev_unit.dvi2pts = dvi2pts; - dev_unit.min_bp_val = (long) ROUND(1.0/(ten_pow[dev_unit.precision]*dvi2pts), 1); + dev_unit.min_bp_val = (int) ROUND(1.0/(ten_pow[dev_unit.precision]*dvi2pts), 1); if (dev_unit.min_bp_val < 0) dev_unit.min_bp_val = -dev_unit.min_bp_val; diff --git a/Build/source/texk/dvipdfm-x/pdfdoc.c b/Build/source/texk/dvipdfm-x/pdfdoc.c index d0c8479762c..af60d898f98 100644 --- a/Build/source/texk/dvipdfm-x/pdfdoc.c +++ b/Build/source/texk/dvipdfm-x/pdfdoc.c @@ -179,7 +179,7 @@ typedef struct pdf_olitem typedef struct pdf_bead { char *id; - long page_no; + int page_no; pdf_rect rect; } pdf_bead; @@ -187,8 +187,8 @@ typedef struct pdf_article { char *id; pdf_obj *info; - long num_beads; - long max_beads; + int num_beads; + int max_beads; pdf_bead *beads; } pdf_article; @@ -217,8 +217,8 @@ typedef struct pdf_doc pdf_rect mediabox; pdf_obj *bop, *eop; - long num_entries; /* This is not actually total number of pages. */ - long max_entries; + int num_entries; /* This is not actually total number of pages. */ + int max_entries; pdf_page *entries; } pages; @@ -229,8 +229,8 @@ typedef struct pdf_doc } outlines; struct { - long num_entries; - long max_entries; + int num_entries; + int max_entries; pdf_article *entries; } articles; @@ -322,10 +322,10 @@ pdf_doc_close_catalog (pdf_doc *p) #define MAXPAGES(p) (p->pages.max_entries) static void -doc_resize_page_entries (pdf_doc *p, long size) +doc_resize_page_entries (pdf_doc *p, int size) { if (size > MAXPAGES(p)) { - long i; + int i; p->pages.entries = RENEW(p->pages.entries, size, struct pdf_page); for (i = p->pages.max_entries; i < size; i++) { @@ -349,7 +349,7 @@ doc_resize_page_entries (pdf_doc *p, long size) } static pdf_page * -doc_get_page_entry (pdf_doc *p, unsigned long page_no) +doc_get_page_entry (pdf_doc *p, unsigned int page_no) { pdf_page *page; @@ -433,7 +433,7 @@ pdf_doc_set_eop_content (const char *content, unsigned length) systems that do not support the tm_gmtoff in struct tm, or have a timezone variable. Such as i386-solaris. */ -static long +static int32_t compute_timezone_offset() { const time_t now = time(NULL); @@ -452,10 +452,10 @@ compute_timezone_offset() /* * Docinfo */ -static long +static int asn_date (char *date_string) { - long tz_offset; + int32_t tz_offset; time_t current_time; struct tm *bd_time; @@ -472,11 +472,11 @@ asn_date (char *date_string) # endif /* HAVE_TIMEZONE */ #endif /* HAVE_TM_GMTOFF */ - sprintf(date_string, "D:%04d%02d%02d%02d%02d%02d%c%02ld'%02ld'", + sprintf(date_string, "D:%04d%02d%02d%02d%02d%02d%c%02d'%02d'", bd_time->tm_year + 1900, bd_time->tm_mon + 1, bd_time->tm_mday, bd_time->tm_hour, bd_time->tm_min, bd_time->tm_sec, - (tz_offset > 0) ? '+' : '-', labs(tz_offset) / 3600, - (labs(tz_offset) / 60) % 60); + (tz_offset > 0) ? '+' : '-', abs(tz_offset) / 3600, + (abs(tz_offset) / 60) % 60); return strlen(date_string); } @@ -605,7 +605,7 @@ pdf_doc_add_page_resource (const char *category, resources = pdf_doc_get_page_resources(p, category); duplicate = pdf_lookup_dict(resources, resource_name); if (duplicate && pdf_compare_reference(duplicate, resource_ref)) { - WARN("Conflicting page resource found (page: %ld, category: %s, name: %s).", + WARN("Conflicting page resource found (page: %d, category: %s, name: %s).", pdf_doc_current_page_number(), category, resource_name); WARN("Ignoring..."); pdf_release_obj(resource_ref); @@ -712,11 +712,11 @@ doc_flush_page (pdf_doc *p, pdf_page *page, pdf_obj *parent_ref) #define PAGE_CLUSTER 4 static pdf_obj * build_page_tree (pdf_doc *p, - pdf_page *firstpage, long num_pages, + pdf_page *firstpage, int num_pages, pdf_obj *parent_ref) { pdf_obj *self, *self_ref, *kids; - long i; + int i; self = pdf_new_dict(); /* @@ -746,7 +746,7 @@ build_page_tree (pdf_doc *p, } } else if (num_pages > 0) { for (i = 0; i < PAGE_CLUSTER; i++) { - long start, end; + int start, end; start = (i*num_pages)/PAGE_CLUSTER; end = ((i+1)*num_pages)/PAGE_CLUSTER; @@ -804,7 +804,7 @@ pdf_doc_close_page_tree (pdf_doc *p) { pdf_obj *page_tree_root; pdf_obj *mediabox; - long page_no; + int page_no; /* * Do consistency check on forward references to pages. @@ -933,7 +933,7 @@ pdf_doc_close_page_tree (pdf_doc *p) */ pdf_obj * -pdf_doc_get_page (pdf_file *pf, long page_no, long *count_p, +pdf_doc_get_page (pdf_file *pf, int page_no, int *count_p, pdf_rect *bbox, pdf_obj **resources_p) { pdf_obj *page_tree = NULL; pdf_obj *resources = NULL, *box = NULL, *rotate = NULL, *medbox = NULL; @@ -947,7 +947,7 @@ pdf_doc_get_page (pdf_file *pf, long page_no, long *count_p, goto error; { - long count; + int count; pdf_obj *tmp = pdf_deref_obj(pdf_lookup_dict(page_tree, "Count")); if (!PDF_OBJ_NUMBERTYPE(tmp)) { if (tmp) @@ -972,7 +972,7 @@ pdf_doc_get_page (pdf_file *pf, long page_no, long *count_p, pdf_obj *art_box = NULL, *trim_box = NULL, *bleed_box = NULL; pdf_obj *media_box = NULL, *crop_box = NULL, *kids, *tmp; int depth = PDF_OBJ_MAX_DEPTH; - long page_idx = page_no-1, kids_length = 1, i = 0; + int page_idx = page_no-1, kids_length = 1, i = 0; while (--depth && i != kids_length) { if ((tmp = pdf_deref_obj(pdf_lookup_dict(page_tree, "MediaBox")))) { @@ -1027,7 +1027,7 @@ pdf_doc_get_page (pdf_file *pf, long page_no, long *count_p, kids_length = pdf_array_length(kids); for (i = 0; i < kids_length; i++) { - long count; + int count; pdf_release_obj(page_tree); page_tree = pdf_deref_obj(pdf_get_array(kids, i)); @@ -1850,7 +1850,7 @@ static pdf_bead * find_bead (pdf_article *article, const char *bead_id) { pdf_bead *bead; - long i; + int i; bead = NULL; for (i = 0; i < article->num_beads; i++) { @@ -1865,12 +1865,12 @@ find_bead (pdf_article *article, const char *bead_id) void pdf_doc_add_bead (const char *article_id, - const char *bead_id, long page_no, const pdf_rect *rect) + const char *bead_id, int page_no, const pdf_rect *rect) { pdf_doc *p = &pdoc; pdf_article *article; pdf_bead *bead; - long i; + int i; if (!article_id) { ERROR("No article identifier specified."); @@ -1925,7 +1925,7 @@ make_article (pdf_doc *p, { pdf_obj *art_dict; pdf_obj *first, *prev, *last; - long i, n; + int i, n; if (!article) return NULL; @@ -2018,7 +2018,7 @@ clean_article (pdf_article *article) return; if (article->beads) { - long i; + int i; for (i = 0; i < article->num_beads; i++) { if (article->beads[i].id) @@ -2191,16 +2191,16 @@ pdf_doc_get_dictionary (const char *category) return dict; } -long +int pdf_doc_current_page_number (void) { pdf_doc *p = &pdoc; - return (long) (PAGECOUNT(p) + 1); + return (int) (PAGECOUNT(p) + 1); } pdf_obj * -pdf_doc_ref_page (unsigned long page_no) +pdf_doc_ref_page (unsigned page_no) { pdf_doc *p = &pdoc; pdf_page *page; @@ -2218,7 +2218,7 @@ pdf_obj * pdf_doc_get_reference (const char *category) { pdf_obj *ref = NULL; - long page_no; + int page_no; ASSERT(category); @@ -2806,9 +2806,9 @@ pdf_doc_expand_box (const pdf_rect *rect) #if 0 /* This should be number tree */ void -pdf_doc_set_pagelabel (long pg_start, +pdf_doc_set_pagelabel (int pg_start, const char *type, - const void *prefix, int prfx_len, long start) + const void *prefix, int prfx_len, int start) { pdf_doc *p = &pdoc; pdf_obj *label_dict; diff --git a/Build/source/texk/dvipdfm-x/pdfdoc.h b/Build/source/texk/dvipdfm-x/pdfdoc.h index 91ea269bc68..1b68fd29338 100644 --- a/Build/source/texk/dvipdfm-x/pdfdoc.h +++ b/Build/source/texk/dvipdfm-x/pdfdoc.h @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2007-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2007-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks @@ -54,13 +54,13 @@ extern pdf_obj *pdf_doc_get_reference (const char *category); #define pdf_doc_names() pdf_doc_get_dictionary("Names") #define pdf_doc_this_page() pdf_doc_get_dictionary("@THISPAGE") -extern pdf_obj *pdf_doc_get_page (pdf_file *pf, long page_no, long *count_p, +extern pdf_obj *pdf_doc_get_page (pdf_file *pf, int page_no, int *count_p, pdf_rect *bbox, pdf_obj **resources_p); -extern long pdf_doc_current_page_number (void); +extern int pdf_doc_current_page_number (void); extern pdf_obj *pdf_doc_current_page_resources (void); -extern pdf_obj *pdf_doc_ref_page (unsigned long page_no); +extern pdf_obj *pdf_doc_ref_page (unsigned page_no); #define pdf_doc_this_page_ref() pdf_doc_get_reference("@THISPAGE") #define pdf_doc_next_page_ref() pdf_doc_get_reference("@NEXTPAGE") #define pdf_doc_prev_page_ref() pdf_doc_get_reference("@PREVPAGE") @@ -88,7 +88,7 @@ extern void pdf_doc_add_page_resource (const char *category, extern void pdf_doc_begin_article (const char *article_id, pdf_obj *info); extern void pdf_doc_add_bead (const char *article_id, const char *bead_id, - long page_no, const pdf_rect *rect); + int page_no, const pdf_rect *rect); /* Bookmarks */ extern int pdf_doc_bookmarks_up (void); @@ -122,10 +122,10 @@ extern void pdf_doc_enable_manual_thumbnails (void); #if 0 /* PageLabels - */ -extern void pdf_doc_set_pagelabel (long page_start, +extern void pdf_doc_set_pagelabel (int page_start, const char *type, const void *prefix, int pfrx_len, - long counter_start); + int counter_start); #endif /* Similar to bop_content */ diff --git a/Build/source/texk/dvipdfm-x/pdfdraw.c b/Build/source/texk/dvipdfm-x/pdfdraw.c index 9d76e99ce4d..14ee22c8d49 100644 --- a/Build/source/texk/dvipdfm-x/pdfdraw.c +++ b/Build/source/texk/dvipdfm-x/pdfdraw.c @@ -808,7 +808,7 @@ pdf_dev__flushpath (pdf_path *pa, { pa_elem *pe, *pe1; char *b = fmt_buf; - long b_len = FORMAT_BUFF_LEN; + int b_len = FORMAT_BUFF_LEN; pdf_rect r; /* FIXME */ pdf_coord *pt; int n_pts, n_seg; @@ -906,7 +906,7 @@ typedef struct pdf_gstate_ /* internal */ pdf_path path; - long flags; + int flags; /* bookkeeping the origin of the last transform applied */ pdf_coord pt_fixee; } pdf_gstate; diff --git a/Build/source/texk/dvipdfm-x/pdfdraw.h b/Build/source/texk/dvipdfm-x/pdfdraw.h index 927249da7c9..eb5f4691a56 100644 --- a/Build/source/texk/dvipdfm-x/pdfdraw.h +++ b/Build/source/texk/dvipdfm-x/pdfdraw.h @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks diff --git a/Build/source/texk/dvipdfm-x/pdfencoding.c b/Build/source/texk/dvipdfm-x/pdfencoding.c index dc57d710146..137760264f9 100644 --- a/Build/source/texk/dvipdfm-x/pdfencoding.c +++ b/Build/source/texk/dvipdfm-x/pdfencoding.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2008-2014 by Jin-Hwan Cho, Matthias Franz, and Shunsaku Hirata, + Copyright (C) 2008-2015 by Jin-Hwan Cho, Matthias Franz, and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks diff --git a/Build/source/texk/dvipdfm-x/pdfencrypt.c b/Build/source/texk/dvipdfm-x/pdfencrypt.c index 78dcfab8997..af4326923db 100644 --- a/Build/source/texk/dvipdfm-x/pdfencrypt.c +++ b/Build/source/texk/dvipdfm-x/pdfencrypt.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. This program is free software; you can redistribute it and/or modify @@ -105,7 +105,7 @@ pdf_enc_init (int use_aes, int encrypt_metadata) } #define PRODUCER \ -"%s-%s, Copyright 2002-2014 by Jin-Hwan Cho, Matthias Franz, and Shunsaku Hirata" +"%s-%s, Copyright 2002-2015 by Jin-Hwan Cho, Matthias Franz, and Shunsaku Hirata" void pdf_enc_compute_id_string (char *dviname, char *pdfname) diff --git a/Build/source/texk/dvipdfm-x/pdfencrypt.h b/Build/source/texk/dvipdfm-x/pdfencrypt.h index 077c0f2f975..c8ff8696c61 100644 --- a/Build/source/texk/dvipdfm-x/pdfencrypt.h +++ b/Build/source/texk/dvipdfm-x/pdfencrypt.h @@ -2,7 +2,7 @@ This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2007-2012 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2007-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. This program is free software; you can redistribute it and/or modify diff --git a/Build/source/texk/dvipdfm-x/pdfnames.c b/Build/source/texk/dvipdfm-x/pdfnames.c index 5fdb6e19540..b37c7a09d7f 100644 --- a/Build/source/texk/dvipdfm-x/pdfnames.c +++ b/Build/source/texk/dvipdfm-x/pdfnames.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks @@ -336,7 +336,7 @@ build_name_tree (struct named_object *first, int num_leaves, int is_root) kids = pdf_new_array(); for (i = 0; i < NAME_CLUSTER; i++) { pdf_obj *subtree; - long start, end; + int start, end; start = (i*num_leaves) / NAME_CLUSTER; end = ((i+1)*num_leaves) / NAME_CLUSTER; diff --git a/Build/source/texk/dvipdfm-x/pdfnames.h b/Build/source/texk/dvipdfm-x/pdfnames.h index 341180ced3a..0748e7388d2 100644 --- a/Build/source/texk/dvipdfm-x/pdfnames.h +++ b/Build/source/texk/dvipdfm-x/pdfnames.h @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks diff --git a/Build/source/texk/dvipdfm-x/pdfobj.c b/Build/source/texk/dvipdfm-x/pdfobj.c index 3e1982b21ed..493e4c6528e 100644 --- a/Build/source/texk/dvipdfm-x/pdfobj.c +++ b/Build/source/texk/dvipdfm-x/pdfobj.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2007-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2007-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks @@ -90,8 +90,8 @@ struct pdf_name struct pdf_array { - unsigned long max; - unsigned long size; + unsigned int max; + unsigned int size; struct pdf_obj **values; }; @@ -106,9 +106,9 @@ struct pdf_stream { struct pdf_obj *dict; unsigned char *stream; - long *objstm_data; /* used for object streams */ - unsigned long stream_length; - unsigned long max_length; + int *objstm_data; /* used for object streams */ + unsigned int stream_length; + unsigned int max_length; unsigned char _flags; }; @@ -116,7 +116,7 @@ struct pdf_indirect { pdf_file *pf; pdf_obj *obj; /* used when PF == NULL */ - unsigned long label; + unsigned label; unsigned short generation; }; @@ -132,9 +132,9 @@ typedef struct pdf_indirect pdf_indirect; static FILE *pdf_output_file = NULL; -static long pdf_output_file_position = 0; -static long pdf_output_line_position = 0; -static long compression_saved = 0; +static int pdf_output_file_position = 0; +static int pdf_output_line_position = 0; +static int compression_saved = 0; #define FORMAT_BUF_SIZE 4096 static char format_buffer[FORMAT_BUF_SIZE]; @@ -142,7 +142,7 @@ static char format_buffer[FORMAT_BUF_SIZE]; typedef struct xref_entry { unsigned char type; /* object storage type */ - unsigned long field2; /* offset in file or object stream */ + unsigned int field2; /* offset in file or object stream */ unsigned short field3; /* generation or index */ pdf_obj *direct; /* used for imported objects */ pdf_obj *indirect; /* used for imported objects */ @@ -150,10 +150,10 @@ typedef struct xref_entry static xref_entry *output_xref; -static unsigned long pdf_max_ind_objects; -static unsigned long next_label; +static unsigned int pdf_max_ind_objects; +static unsigned int next_label; -static unsigned long startxref; +static unsigned int startxref; struct pdf_file { @@ -161,8 +161,8 @@ struct pdf_file pdf_obj *trailer; xref_entry *xref_table; pdf_obj *catalog; - long num_obj; - long file_size; + int num_obj; + int file_size; int version; }; @@ -185,12 +185,12 @@ static void pdf_flush_obj (pdf_obj *object, FILE *file); static void pdf_label_obj (pdf_obj *object); static void pdf_write_obj (pdf_obj *object, FILE *file); -static void set_objstm_data (pdf_obj *objstm, long *data); -static long *get_objstm_data (pdf_obj *objstm); +static void set_objstm_data (pdf_obj *objstm, int *data); +static int *get_objstm_data (pdf_obj *objstm); static void release_objstm (pdf_obj *objstm); static void pdf_out_char (FILE *file, char c); -static void pdf_out (FILE *file, const void *buffer, long length); +static void pdf_out (FILE *file, const void *buffer, int length); static pdf_obj *pdf_new_ref (pdf_obj *object); static void release_indirect (pdf_indirect *data); @@ -275,7 +275,7 @@ static pdf_obj *current_objstm = NULL; static int do_objstm; static void -add_xref_entry (unsigned long label, unsigned char type, unsigned long field2, unsigned short field3) +add_xref_entry (unsigned label, unsigned char type, unsigned int field2, unsigned short field3) { if (label >= pdf_max_ind_objects) { pdf_max_ind_objects = (label/IND_OBJECTS_ALLOC_SIZE+1)*IND_OBJECTS_ALLOC_SIZE; @@ -341,12 +341,12 @@ pdf_out_init (const char *filename, int do_encryption) static void dump_xref_table (void) { - long length; - unsigned long i; + int length; + unsigned int i; pdf_out(pdf_output_file, "xref\n", 5); - length = sprintf(format_buffer, "%d %lu\n", 0, next_label); + length = sprintf(format_buffer, "%d %u\n", 0, next_label); pdf_out(pdf_output_file, format_buffer, length); /* @@ -358,7 +358,7 @@ dump_xref_table (void) unsigned char type = output_xref[i].type; if (type > 1) ERROR("object type %hu not allowed in xref table", type); - length = sprintf(format_buffer, "%010lu %05hu %c \n", + length = sprintf(format_buffer, "%010u %05hu %c \n", output_xref[i].field2, output_xref[i].field3, type ? 'n' : 'f'); pdf_out(pdf_output_file, format_buffer, length); @@ -382,7 +382,7 @@ dump_trailer_dict (void) static void dump_xref_stream (void) { - unsigned long pos, i; + unsigned int pos, i; unsigned poslen; unsigned char buf[7] = {0, 0, 0, 0, 0}; @@ -425,7 +425,7 @@ void pdf_out_flush (void) { if (pdf_output_file) { - long length; + int length; /* Flush current object stream */ if (current_objstm) { @@ -458,7 +458,7 @@ pdf_out_flush (void) RELEASE(output_xref); pdf_out(pdf_output_file, "startxref\n", 10); - length = sprintf(format_buffer, "%lu\n", startxref); + length = sprintf(format_buffer, "%u\n", startxref); pdf_out(pdf_output_file, format_buffer, length); pdf_out(pdf_output_file, "%%EOF\n", 6); @@ -553,7 +553,7 @@ static char xchar[] = "0123456789abcdef"; } while (0) static -void pdf_out (FILE *file, const void *buffer, long length) +void pdf_out (FILE *file, const void *buffer, int length) { if (output_stream && file == pdf_output_file) pdf_add_stream(output_stream, buffer, length); @@ -699,11 +699,11 @@ release_indirect (pdf_indirect *data) static void write_indirect (pdf_indirect *indirect, FILE *file) { - long length; + int length; ASSERT(!indirect->pf); - length = sprintf(format_buffer, "%lu %hu R", indirect->label, indirect->generation); + length = sprintf(format_buffer, "%u %hu R", indirect->label, indirect->generation); pdf_out(file, format_buffer, length); } @@ -1131,7 +1131,7 @@ write_array (pdf_array *array, FILE *file) { pdf_out_char(file, '['); if (array->size > 0) { - unsigned long i; + unsigned int i; int type1 = PDF_UNDEFINED, type2; for (i = 0; i < array->size; i++) { @@ -1149,7 +1149,7 @@ write_array (pdf_array *array, FILE *file) } pdf_obj * -pdf_get_array (pdf_obj *array, long idx) +pdf_get_array (pdf_obj *array, int idx) { pdf_obj *result = NULL; pdf_array *data; @@ -1181,7 +1181,7 @@ pdf_array_length (pdf_obj *array) static void release_array (pdf_array *data) { - unsigned long i; + unsigned int i; if (data->values) { for (i = 0; i < data->size; i++) { @@ -1221,7 +1221,7 @@ void pdf_put_array (pdf_obj *array, unsigned idx, pdf_obj *object) { pdf_array *data; - long i; + int i; TYPECHECK(array, PDF_ARRAY); @@ -1580,8 +1580,12 @@ static void write_stream (pdf_stream *stream, FILE *file) { unsigned char *filtered; - unsigned long filtered_length; - unsigned long buffer_length; + unsigned int filtered_length; +#ifdef HAVE_ZLIB + uLong buffer_length; +#else + unsigned int buffer_length; +#endif unsigned char *buffer; /* @@ -1747,13 +1751,13 @@ pdf_stream_length (pdf_obj *stream) } static void -set_objstm_data (pdf_obj *objstm, long *data) { +set_objstm_data (pdf_obj *objstm, int *data) { TYPECHECK(objstm, PDF_STREAM); ((pdf_stream *) objstm->data)->objstm_data = data; } -static long * +static int * get_objstm_data (pdf_obj *objstm) { TYPECHECK(objstm, PDF_STREAM); @@ -1761,7 +1765,7 @@ get_objstm_data (pdf_obj *objstm) { } void -pdf_add_stream (pdf_obj *stream, const void *stream_data, long length) +pdf_add_stream (pdf_obj *stream, const void *stream_data, int length) { pdf_stream *data; @@ -1781,7 +1785,7 @@ pdf_add_stream (pdf_obj *stream, const void *stream_data, long length) #if HAVE_ZLIB #define WBUF_SIZE 4096 int -pdf_add_stream_flate (pdf_obj *dst, const void *data, long len) +pdf_add_stream_flate (pdf_obj *dst, const void *data, int len) { z_stream z; Bytef wbuf[WBUF_SIZE]; @@ -1883,8 +1887,8 @@ filter_row_TIFF2 (unsigned char *dst, const unsigned char *src, const unsigned char *p = src; unsigned char col[PREDICTOR_TIFF2_MAX_COLORS]; /* bits_per_component < 8 here */ - long mask = (1 << parms->bits_per_component) - 1; - long inbuf, outbuf; /* 2 bytes buffer */ + int mask = (1 << parms->bits_per_component) - 1; + int inbuf, outbuf; /* 2 bytes buffer */ int i, ci, j, k, inbits, outbits; if (parms->colors > PREDICTOR_TIFF2_MAX_COLORS) { @@ -1929,7 +1933,7 @@ filter_row_TIFF2 (unsigned char *dst, const unsigned char *src, * inefficient. */ static int -filter_decoded (pdf_obj *dst, const void *src, long srclen, +filter_decoded (pdf_obj *dst, const void *src, int srclen, struct decode_parms *parms) { const unsigned char *p = (const unsigned char *) src; @@ -1966,9 +1970,9 @@ filter_decoded (pdf_obj *dst, const void *src, long srclen, int b = i - bytes_per_pixel; char hi = b >= 0 ? buf[b] : 0; char lo = b >= 0 ? buf[b + 1] : 0; - long pv = (hi << 8) | lo; - long cv = (p[i] << 8) | p[i + 1]; - long c = pv + cv; + int pv = (hi << 8) | lo; + int cv = (p[i] << 8) | p[i + 1]; + int c = pv + cv; buf[i] = (unsigned char) (c >> 8); buf[i + 1] = (unsigned char) (c & 0xff); } @@ -2069,7 +2073,7 @@ filter_decoded (pdf_obj *dst, const void *src, long srclen, } static int -pdf_add_stream_flate_filtered (pdf_obj *dst, const void *data, long len, struct decode_parms *parms) +pdf_add_stream_flate_filtered (pdf_obj *dst, const void *data, int len, struct decode_parms *parms) { pdf_obj *tmp; z_stream z; @@ -2119,7 +2123,7 @@ int pdf_concat_stream (pdf_obj *dst, pdf_obj *src) { const char *stream_data; - long stream_length; + int stream_length; pdf_obj *stream_dict; pdf_obj *filter; int error = 0; @@ -2273,7 +2277,7 @@ pdf_write_obj (pdf_obj *object, FILE *file) static void pdf_flush_obj (pdf_obj *object, FILE *file) { - long length; + int length; /* * Record file position @@ -2289,10 +2293,10 @@ pdf_flush_obj (pdf_obj *object, FILE *file) pdf_out(file, "\nendobj\n", 8); } -static long +static int pdf_add_objstm (pdf_obj *objstm, pdf_obj *object) { - long *data, pos; + int *data, pos; TYPECHECK(objstm, PDF_STREAM); @@ -2317,12 +2321,12 @@ pdf_add_objstm (pdf_obj *objstm, pdf_obj *object) static void release_objstm (pdf_obj *objstm) { - long *data = get_objstm_data(objstm); - long pos = data[0]; + int *data = get_objstm_data(objstm); + int pos = data[0]; pdf_obj *dict; pdf_stream *stream; unsigned char *old_buf; - unsigned long old_length; + unsigned int old_length; stream = (pdf_stream *) objstm->data; /* Precede stream data by offset table */ @@ -2333,9 +2337,9 @@ release_objstm (pdf_obj *objstm) stream->stream_length = 0; { - long i = 2*pos, *val = data+2; + int i = 2*pos, *val = data+2; while (i--) { - long length = sprintf(format_buffer, "%ld ", *(val++)); + int length = sprintf(format_buffer, "%d ", *(val++)); pdf_add_stream(objstm, format_buffer, length); } } @@ -2374,7 +2378,7 @@ pdf_release_obj (pdf_obj *object) pdf_flush_obj(object, pdf_output_file); else { if (!current_objstm) { - long *data = NEW(2*OBJSTM_MAX_OBJS+2, long); + int *data = NEW(2*OBJSTM_MAX_OBJS+2, int); data[0] = data[1] = 0; current_objstm = pdf_new_stream(STREAM_COMPRESS); set_objstm_data(current_objstm, data); @@ -2444,14 +2448,14 @@ backup_line (FILE *pdf_input_file) return 1; } -static long +static int find_xref (FILE *pdf_input_file) { - long xref_pos; + int xref_pos; int tries = 10; do { - long currentpos; + int currentpos; if (!backup_line(pdf_input_file)) { tries = 0; @@ -2479,7 +2483,7 @@ find_xref (FILE *pdf_input_file) end = start + strlen(work_buffer); skip_white(&start, end); number = parse_number(&start, end); - xref_pos = (long) atof(number); + xref_pos = (int) atof(number); RELEASE(number); } @@ -2521,11 +2525,11 @@ parse_trailer (pdf_file *pf) * is that an object before an xref table will grab the whole table * :-( */ -static long -next_object_offset (pdf_file *pf, unsigned long obj_num) +static int +next_object_offset (pdf_file *pf, unsigned int obj_num) { - long next = pf->file_size; /* Worst case */ - long i, curr; + int next = pf->file_size; /* Worst case */ + int i, curr; curr = pf->xref_table[obj_num].field2; /* Check all other type 1 objects to find next one */ @@ -2544,7 +2548,7 @@ next_object_offset (pdf_file *pf, unsigned long obj_num) ((pf)->xref_table[(n)].type == 2 && !(g)))) pdf_obj * -pdf_new_indirect (pdf_file *pf, unsigned long obj_num, unsigned short obj_gen) +pdf_new_indirect (pdf_file *pf, unsigned obj_num, unsigned short obj_gen) { pdf_obj *result; pdf_indirect *indirect; @@ -2562,10 +2566,10 @@ pdf_new_indirect (pdf_file *pf, unsigned long obj_num, unsigned short obj_gen) } static pdf_obj * -pdf_read_object (unsigned long obj_num, unsigned short obj_gen, - pdf_file *pf, long offset, long limit) +pdf_read_object (unsigned int obj_num, unsigned short obj_gen, + pdf_file *pf, int offset, int limit) { - long length; + int length; char *buffer; const char *p, *endptr; pdf_obj *result; @@ -2587,7 +2591,7 @@ pdf_read_object (unsigned long obj_num, unsigned short obj_gen, { const char *q = p; /* <== p */ char *sp; - unsigned long n, g; + unsigned int n, g; skip_white(&q, endptr); sp = parse_unsigned(&q, endptr); @@ -2639,11 +2643,11 @@ pdf_read_object (unsigned long obj_num, unsigned short obj_gen, } static pdf_obj * -read_objstm (pdf_file *pf, unsigned long num) +read_objstm (pdf_file *pf, unsigned int num) { - unsigned long offset = pf->xref_table[num].field2; + unsigned int offset = pf->xref_table[num].field2; unsigned short gen = pf->xref_table[num].field3; - long limit = next_object_offset(pf, num), n, first, *header = NULL; + int limit = next_object_offset(pf, num), n, first, *header = NULL; char *data = NULL, *q; const char *p, *endptr; int i; @@ -2673,17 +2677,17 @@ read_objstm (pdf_file *pf, unsigned long num) n_obj = pdf_lookup_dict(dict, "N"); if (!PDF_OBJ_NUMBERTYPE(n_obj)) goto error; - n = (long) pdf_number_value(n_obj); + n = (int) pdf_number_value(n_obj); first_obj = pdf_lookup_dict(dict, "First"); if (!PDF_OBJ_NUMBERTYPE(first_obj)) goto error; - first = (long) pdf_number_value(first_obj); + first = (int) pdf_number_value(first_obj); /* reject object streams without object data */ if (first >= pdf_stream_length(objstm)) goto error; - header = NEW(2*(n+1), long); + header = NEW(2*(n+1), int); set_objstm_data(objstm, header); *(header++) = n; *(header++) = first; @@ -2725,7 +2729,7 @@ read_objstm (pdf_file *pf, unsigned long num) * several cross-reference sections. */ static pdf_obj * -pdf_get_object (pdf_file *pf, unsigned long obj_num, unsigned short obj_gen) +pdf_get_object (pdf_file *pf, unsigned int obj_num, unsigned short obj_gen) { pdf_obj *result; @@ -2741,17 +2745,17 @@ pdf_get_object (pdf_file *pf, unsigned long obj_num, unsigned short obj_gen) if (pf->xref_table[obj_num].type == 1) { /* type == 1 */ - unsigned long offset; - long limit; + unsigned int offset; + int limit; offset = pf->xref_table[obj_num].field2; limit = next_object_offset(pf, obj_num); result = pdf_read_object(obj_num, obj_gen, pf, offset, limit); } else { /* type == 2 */ - unsigned long objstm_num = pf->xref_table[obj_num].field2; + unsigned int objstm_num = pf->xref_table[obj_num].field2; unsigned short index = pf->xref_table[obj_num].field3; pdf_obj *objstm; - long *data, n, first, length; + int *data, n, first, length; const char *p, *q; if (objstm_num >= pf->num_obj || @@ -2816,7 +2820,7 @@ pdf_deref_obj (pdf_obj *obj) while (PDF_OBJ_INDIRECTTYPE(obj) && --count) { pdf_file *pf = OBJ_FILE(obj); if (pf) { - unsigned long obj_num = OBJ_NUM(obj); + unsigned int obj_num = OBJ_NUM(obj); unsigned short obj_gen = OBJ_GEN(obj); pdf_release_obj(obj); obj = pdf_get_object(pf, obj_num, obj_gen); @@ -2841,9 +2845,9 @@ pdf_deref_obj (pdf_obj *obj) } static void -extend_xref (pdf_file *pf, long new_size) +extend_xref (pdf_file *pf, int new_size) { - unsigned long i; + unsigned int i; pf->xref_table = RENEW(pf->xref_table, new_size, xref_entry); for (i = pf->num_obj; i < new_size; i++) { @@ -2857,11 +2861,11 @@ extend_xref (pdf_file *pf, long new_size) } static int -parse_xref_table (pdf_file *pf, long xref_pos) +parse_xref_table (pdf_file *pf, int xref_pos) { FILE *pdf_input_file = pf->file; - unsigned long first, size; - unsigned long i, offset; + unsigned int first, size; + unsigned int i, offset; unsigned int obj_gen; char flag; int r; @@ -2880,7 +2884,7 @@ parse_xref_table (pdf_file *pf, long xref_pos) } /* Next line in file has first item and size of table */ for (;;) { - unsigned long current_pos; + unsigned int current_pos; current_pos = tell_position(pdf_input_file); if (mfgets(work_buffer, WORK_BUFFER_SIZE, pdf_input_file) == NULL) { @@ -2898,7 +2902,7 @@ parse_xref_table (pdf_file *pf, long xref_pos) seek_absolute(pdf_input_file, current_pos); break; } - sscanf(work_buffer, "%lu %lu", &first, &size); + sscanf(work_buffer, "%u %u", &first, &size); if (pf->num_obj < first + size) { extend_xref(pf, first + size); } @@ -2913,7 +2917,7 @@ parse_xref_table (pdf_file *pf, long xref_pos) */ work_buffer[19] = 0; offset = 0UL; obj_gen = 0; flag = 0; - r = sscanf(work_buffer, "%010lu %05u %c", &offset, &obj_gen, &flag); + r = sscanf(work_buffer, "%010u %05u %c", &offset, &obj_gen, &flag); if ( r != 3 || ((flag != 'n' && flag != 'f') || (flag == 'n' && @@ -2932,10 +2936,10 @@ parse_xref_table (pdf_file *pf, long xref_pos) return 1; } -static unsigned long -parse_xrefstm_field (const char **p, int length, unsigned long def) +static unsigned int +parse_xrefstm_field (const char **p, int length, unsigned int def) { - unsigned long val = 0; + unsigned int val = 0; if (!length) return def; @@ -2950,9 +2954,9 @@ parse_xrefstm_field (const char **p, int length, unsigned long def) static int parse_xrefstm_subsec (pdf_file *pf, - const char **p, long *length, + const char **p, int *length, int *W, int wsum, - long first, long size) { + int first, int size) { xref_entry *e; if ((*length -= wsum*size) < 0) @@ -2964,7 +2968,7 @@ parse_xrefstm_subsec (pdf_file *pf, e = pf->xref_table + first; while (size--) { unsigned char type; - unsigned long field2; + unsigned int field2; unsigned short field3; type = (unsigned char) parse_xrefstm_field(p, W[0], 1); @@ -2976,7 +2980,7 @@ parse_xrefstm_subsec (pdf_file *pf, return -1; #endif - field2 = (unsigned long) parse_xrefstm_field(p, W[1], 0); + field2 = (unsigned int) parse_xrefstm_field(p, W[1], 0); field3 = (unsigned short) parse_xrefstm_field(p, W[2], 0); if (!e->field2) { @@ -2991,11 +2995,11 @@ parse_xrefstm_subsec (pdf_file *pf, } static int -parse_xref_stream (pdf_file *pf, long xref_pos, pdf_obj **trailer) +parse_xref_stream (pdf_file *pf, int xref_pos, pdf_obj **trailer) { pdf_obj *xrefstm, *size_obj, *W_obj, *index_obj; - unsigned long size; - long length; + unsigned int size; + int length; int W[3], i, wsum = 0; const char *p; @@ -3016,7 +3020,7 @@ parse_xref_stream (pdf_file *pf, long xref_pos, pdf_obj **trailer) size_obj = pdf_lookup_dict(*trailer, "Size"); if (!PDF_OBJ_NUMBERTYPE(size_obj)) goto error; - size = (unsigned long) pdf_number_value(size_obj); + size = (unsigned int) pdf_number_value(size_obj); length = pdf_stream_length(xrefstm); @@ -3047,8 +3051,8 @@ parse_xref_stream (pdf_file *pf, long xref_pos, pdf_obj **trailer) if (!PDF_OBJ_NUMBERTYPE(first) || !PDF_OBJ_NUMBERTYPE(size_obj) || parse_xrefstm_subsec(pf, &p, &length, W, wsum, - (long) pdf_number_value(first), - (long) pdf_number_value(size_obj))) + (int) pdf_number_value(first), + (int) pdf_number_value(size_obj))) goto error; } } else if (parse_xrefstm_subsec(pf, &p, &length, W, wsum, 0, size)) @@ -3077,7 +3081,7 @@ static pdf_obj * read_xref (pdf_file *pf) { pdf_obj *trailer = NULL, *main_trailer = NULL; - long xref_pos; + int xref_pos; if (!(xref_pos = find_xref(pf->file))) goto error; @@ -3099,7 +3103,7 @@ read_xref (pdf_file *pf) if ((xrefstm = pdf_lookup_dict(trailer, "XRefStm"))) { pdf_obj *new_trailer = NULL; if (PDF_OBJ_NUMBERTYPE(xrefstm) && - parse_xref_stream(pf, (long) pdf_number_value(xrefstm), + parse_xref_stream(pf, (int) pdf_number_value(xrefstm), &new_trailer)) pdf_release_obj(new_trailer); else @@ -3119,7 +3123,7 @@ read_xref (pdf_file *pf) if ((prev = pdf_lookup_dict(trailer, "Prev"))) { if (PDF_OBJ_NUMBERTYPE(prev)) - xref_pos = (long) pdf_number_value(prev); + xref_pos = (int) pdf_number_value(prev); else goto error; } else @@ -3170,7 +3174,7 @@ pdf_file_new (FILE *file) static void pdf_file_free (pdf_file *pf) { - unsigned long i; + unsigned int i; if (!pf) { return; @@ -3355,7 +3359,7 @@ static pdf_obj * pdf_import_indirect (pdf_obj *object) { pdf_file *pf = OBJ_FILE(object); - unsigned long obj_num = OBJ_NUM(object); + unsigned int obj_num = OBJ_NUM(object); unsigned short obj_gen = OBJ_GEN(object); pdf_obj *ref; diff --git a/Build/source/texk/dvipdfm-x/pdfobj.h b/Build/source/texk/dvipdfm-x/pdfobj.h index 763aab1a8a3..048a4a958b9 100644 --- a/Build/source/texk/dvipdfm-x/pdfobj.h +++ b/Build/source/texk/dvipdfm-x/pdfobj.h @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2007-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2007-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks @@ -109,7 +109,7 @@ extern void pdf_add_array (pdf_obj *array, pdf_obj *object); #if 0 extern void pdf_put_array (pdf_obj *array, unsigned idx, pdf_obj *object); #endif -extern pdf_obj *pdf_get_array (pdf_obj *array, long idx); +extern pdf_obj *pdf_get_array (pdf_obj *array, int idx); extern unsigned pdf_array_length (pdf_obj *array); #if 0 @@ -146,11 +146,11 @@ extern int pdf_foreach_dict (pdf_obj *dict, extern pdf_obj *pdf_new_stream (int flags); extern void pdf_add_stream (pdf_obj *stream, const void *stream_data_ptr, - long stream_data_len); + int stream_data_len); #if HAVE_ZLIB extern int pdf_add_stream_flate (pdf_obj *stream, const void *stream_data_ptr, - long stream_data_len); + int stream_data_len); #endif extern int pdf_concat_stream (pdf_obj *dst, pdf_obj *src); extern pdf_obj *pdf_stream_dict (pdf_obj *stream); @@ -193,7 +193,7 @@ extern pdf_obj *pdf_import_object (pdf_obj *object); extern int pdfobj_escape_str (char *buffer, int size, const unsigned char *s, int len); -extern pdf_obj *pdf_new_indirect (pdf_file *pf, unsigned long label, unsigned short generation); +extern pdf_obj *pdf_new_indirect (pdf_file *pf, unsigned label, unsigned short generation); #define MAX_IMAGES 5000 /* This may be enough */ extern int PageBox; diff --git a/Build/source/texk/dvipdfm-x/pdfparse.c b/Build/source/texk/dvipdfm-x/pdfparse.c index f4d63cebed3..8bf31815e0c 100644 --- a/Build/source/texk/dvipdfm-x/pdfparse.c +++ b/Build/source/texk/dvipdfm-x/pdfparse.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks @@ -583,7 +583,7 @@ static pdf_obj * parse_pdf_hex_string (const char **pp, const char *endptr) { const char *p; - long len; + int len; p = *pp; @@ -772,7 +772,7 @@ parse_pdf_stream (const char **pp, const char *endptr, pdf_obj *dict) pdf_obj *result = NULL; const char *p; pdf_obj *stream_dict; - long stream_length; + int stream_length; p = *pp; skip_white(&p, endptr); @@ -807,7 +807,7 @@ parse_pdf_stream (const char **pp, const char *endptr, pdf_obj *dict) if (pdf_obj_typeof(tmp2) != PDF_NUMBER) stream_length = -1; else { - stream_length = (long) pdf_number_value(tmp2); + stream_length = (int) pdf_number_value(tmp2); } pdf_release_obj(tmp2); } @@ -901,7 +901,7 @@ parse_pdf_reference (const char **start, const char *end) static pdf_obj * try_pdf_reference (const char *start, const char *end, const char **endptr, pdf_file *pf) { - unsigned long id = 0; + unsigned id = 0; unsigned short gen = 0; ASSERT(pf); diff --git a/Build/source/texk/dvipdfm-x/pdfresource.c b/Build/source/texk/dvipdfm-x/pdfresource.c index 83f8d288458..c24b3a6cb91 100644 --- a/Build/source/texk/dvipdfm-x/pdfresource.c +++ b/Build/source/texk/dvipdfm-x/pdfresource.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks @@ -189,7 +189,7 @@ get_category (const char *category) return -1; } -long +int pdf_defineresource (const char *category, const char *resname, pdf_obj *object, int flags) { @@ -221,7 +221,7 @@ pdf_defineresource (const char *category, } else { res->object = object; } - return (long) ((cat_id << 16)|(res_id)); + return (cat_id << 16) | res_id; } } } else { @@ -251,7 +251,7 @@ pdf_defineresource (const char *category, rc->count++; } - return (long) ((cat_id << 16)|(res_id)); + return (cat_id << 16) | res_id; } #if 0 @@ -282,7 +282,7 @@ pdf_resource_exist (const char *category, const char *resname) } #endif -long +int pdf_findresource (const char *category, const char *resname) { pdf_res *res; @@ -301,7 +301,7 @@ pdf_findresource (const char *category, const char *resname) for (res_id = 0; res_id < rc->count; res_id++) { res = &rc->resources[res_id]; if (!strcmp(resname, res->ident)) { - return (long) (cat_id << 16|res_id); + return cat_id << 16 | res_id; } } @@ -309,7 +309,7 @@ pdf_findresource (const char *category, const char *resname) } pdf_obj * -pdf_get_resource_reference (long rc_id) +pdf_get_resource_reference (int rc_id) { int cat_id, res_id; struct res_cache *rc; @@ -344,7 +344,7 @@ pdf_get_resource_reference (long rc_id) #if 0 pdf_obj * -pdf_get_resource (long rc_id) +pdf_get_resource (int rc_id) { int cat_id, res_id; struct res_cache *rc; diff --git a/Build/source/texk/dvipdfm-x/pdfresource.h b/Build/source/texk/dvipdfm-x/pdfresource.h index d872a13b440..d3cb9720f10 100644 --- a/Build/source/texk/dvipdfm-x/pdfresource.h +++ b/Build/source/texk/dvipdfm-x/pdfresource.h @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks @@ -30,16 +30,16 @@ extern void pdf_init_resources (void); extern void pdf_close_resources (void); -extern long pdf_defineresource (const char *category, +extern int pdf_defineresource (const char *category, const char *resname, pdf_obj *object, int flags); -extern long pdf_findresource (const char *category, const char *resname); +extern int pdf_findresource (const char *category, const char *resname); #if 0 extern int pdf_resource_exist (const char *category, const char *resname); #endif -extern pdf_obj *pdf_get_resource_reference (long res_id); +extern pdf_obj *pdf_get_resource_reference (int res_id); #if 0 -extern pdf_obj *pdf_get_resource (long res_id); +extern pdf_obj *pdf_get_resource (int res_id); #endif #endif /* _PDF_RESOURCE_H_ */ diff --git a/Build/source/texk/dvipdfm-x/pdfximage.c b/Build/source/texk/dvipdfm-x/pdfximage.c index 5e6aa96344c..b96dbc5ced2 100644 --- a/Build/source/texk/dvipdfm-x/pdfximage.c +++ b/Build/source/texk/dvipdfm-x/pdfximage.c @@ -62,7 +62,7 @@ static int ps_include_page (pdf_ximage *ximage, const char *file_name); struct attr_ { - long width, height; + int width, height; double xdensity, ydensity; pdf_rect bbox; }; @@ -71,7 +71,7 @@ struct pdf_ximage_ { char *ident; char res_name[16]; - long page_no, page_count; + int page_no, page_count; int subtype; @@ -113,7 +113,7 @@ static struct ic_ _ic = { static void pdf_init_ximage_struct (pdf_ximage *I, const char *ident, const char *filename, - long page_no, pdf_obj *dict) + int page_no, pdf_obj *dict) { if (ident) { I->ident = NEW(strlen(ident)+1, char); @@ -254,7 +254,7 @@ source_image_type (FILE *fp) static int load_image (const char *ident, const char *fullname, int format, FILE *fp, - long page_no, pdf_obj *dict) + int page_no, pdf_obj *dict) { struct ic_ *ic = &_ic; int id = -1; /* ret */ @@ -357,7 +357,7 @@ load_image (const char *ident, const char *fullname, int format, FILE *fp, uint8_t PageBox_of_id[MAX_IMAGES]; int -pdf_ximage_findresource (const char *ident, long page_no, pdf_obj *dict) +pdf_ximage_findresource (const char *ident, int page_no, pdf_obj *dict) { struct ic_ *ic = &_ic; int id = -1; @@ -559,7 +559,7 @@ pdf_ximage_set_form (pdf_ximage *I, void *form_info, pdf_obj *resource) I->resource = NULL; } -long +int pdf_ximage_get_page (pdf_ximage *I) { return I->page_no; @@ -651,7 +651,7 @@ pdf_ximage_get_subtype (int id) } void -pdf_ximage_set_attr (int id, long width, long height, double xdensity, double ydensity, double llx, double lly, double urx, double ury) +pdf_ximage_set_attr (int id, int width, int height, double xdensity, double ydensity, double llx, double lly, double urx, double ury) { struct ic_ *ic = &_ic; pdf_ximage *I; diff --git a/Build/source/texk/dvipdfm-x/pdfximage.h b/Build/source/texk/dvipdfm-x/pdfximage.h index 5d8f2340f62..e3507a5d199 100644 --- a/Build/source/texk/dvipdfm-x/pdfximage.h +++ b/Build/source/texk/dvipdfm-x/pdfximage.h @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2007-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2007-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks @@ -31,13 +31,13 @@ typedef struct { int flags; - long width; - long height; + int width; + int height; int bits_per_component; int num_components; - long min_dpi; /* NOT USED YET */ + int min_dpi; /* NOT USED YET */ double xdensity, ydensity; /* scale factor for bp */ } ximage_info; @@ -60,7 +60,7 @@ extern char *pdf_ximage_get_resname (int xobj_id); extern pdf_obj *pdf_ximage_get_reference (int xobj_id); -extern int pdf_ximage_findresource (const char *ident, long page_no, +extern int pdf_ximage_findresource (const char *ident, int page_no, pdf_obj *dict); extern int pdf_ximage_defineresource (const char *ident, int subtype, void *cdata, pdf_obj *resource); @@ -70,7 +70,7 @@ extern void pdf_ximage_init_image_info (ximage_info *info); extern void pdf_ximage_init_form_info (xform_info *info); extern void pdf_ximage_set_image (pdf_ximage *ximage, void *info, pdf_obj *resource); extern void pdf_ximage_set_form (pdf_ximage *ximage, void *info, pdf_obj *resource); -extern long pdf_ximage_get_page (pdf_ximage *I); +extern int pdf_ximage_get_page (pdf_ximage *I); /* from pdfximage.c */ extern void set_distiller_template (char *s); @@ -87,7 +87,7 @@ pdf_ximage_scale_image (int id, extern int pdf_ximage_get_subtype (int xobj_id); extern void pdf_ximage_set_attr (int xobj_id, - long width, long height, double xdensity, double ydensity, + int width, int height, double xdensity, double ydensity, double llx, double lly, double urx, double ury); #endif /* _PDFXIMAGE_H_ */ diff --git a/Build/source/texk/dvipdfm-x/pngimage.c b/Build/source/texk/dvipdfm-x/pngimage.c index db9854c847a..609cfab7166 100644 --- a/Build/source/texk/dvipdfm-x/pngimage.c +++ b/Build/source/texk/dvipdfm-x/pngimage.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks diff --git a/Build/source/texk/dvipdfm-x/pst.c b/Build/source/texk/dvipdfm-x/pst.c index 988d54cf13e..02a7f72abea 100644 --- a/Build/source/texk/dvipdfm-x/pst.c +++ b/Build/source/texk/dvipdfm-x/pst.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks @@ -45,7 +45,7 @@ pst_parse_any (unsigned char **inbuf, unsigned char *inbufend) { unsigned char *data; unsigned char *cur = *inbuf; - unsigned long len; + unsigned int len; while (cur < inbufend && !PST_TOKEN_END(cur, inbufend)) cur++; @@ -85,7 +85,7 @@ pst_parse_comment (unsigned char **inbuf, unsigned char *inbufend) { unsigned char *data; unsigned char *cur = *inbuf; - unsigned long len; + unsigned int len; if (*cur != '%') return NULL; diff --git a/Build/source/texk/dvipdfm-x/pst.h b/Build/source/texk/dvipdfm-x/pst.h index affe820d297..ec1d141c4b0 100644 --- a/Build/source/texk/dvipdfm-x/pst.h +++ b/Build/source/texk/dvipdfm-x/pst.h @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks @@ -44,9 +44,9 @@ extern void pst_release_obj(pst_obj *obj); extern pst_obj *pst_new_mark (void); extern pst_type pst_type_of (pst_obj *obj); -extern long pst_length_of (pst_obj *obj); +extern int pst_length_of (pst_obj *obj); -extern long pst_getIV (pst_obj *obj); +extern int pst_getIV (pst_obj *obj); extern double pst_getRV (pst_obj *obj); extern unsigned char *pst_getSV (pst_obj *obj); diff --git a/Build/source/texk/dvipdfm-x/pst_obj.c b/Build/source/texk/dvipdfm-x/pst_obj.c index f5769256590..072a4838e0b 100644 --- a/Build/source/texk/dvipdfm-x/pst_obj.c +++ b/Build/source/texk/dvipdfm-x/pst_obj.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks @@ -50,12 +50,12 @@ static const char *pst_const_false = "false"; typedef char * pst_null; typedef struct { char value; } pst_boolean; -typedef struct { long value; } pst_integer; +typedef struct { int value; } pst_integer; typedef struct { double value; } pst_real; typedef struct { char *value; } pst_name; typedef struct { - long length; + unsigned int length; unsigned char *value; } pst_string; @@ -63,16 +63,16 @@ typedef struct /* BOOLEAN */ static pst_boolean *pst_boolean_new (char value) ; static void pst_boolean_release (pst_boolean *obj); -static long pst_boolean_IV (pst_boolean *obj); +static int pst_boolean_IV (pst_boolean *obj); static double pst_boolean_RV (pst_boolean *obj); static unsigned char *pst_boolean_SV (pst_boolean *obj); -static long pst_boolean_length (void); +static unsigned int pst_boolean_length (void); static void *pst_boolean_data_ptr(pst_boolean *obj); /* NUMBERS */ -static pst_integer *pst_integer_new (long value) ; +static pst_integer *pst_integer_new (int value) ; static void pst_integer_release (pst_integer *obj); -static long pst_integer_IV (pst_integer *obj); +static int pst_integer_IV (pst_integer *obj); static double pst_integer_RV (pst_integer *obj); static unsigned char *pst_integer_SV (pst_integer *obj); static unsigned int pst_integer_length (void); @@ -80,7 +80,7 @@ static void *pst_integer_data_ptr(pst_integer *obj); static pst_real *pst_real_new (double value) ; static void pst_real_release (pst_real *obj); -static long pst_real_IV (pst_real *obj); +static int pst_real_IV (pst_real *obj); static double pst_real_RV (pst_real *obj); static unsigned char *pst_real_SV (pst_real *obj); static void *pst_real_data_ptr (pst_real *obj); @@ -89,7 +89,7 @@ static unsigned int pst_real_length (void); /* NAME */ static pst_name *pst_name_new (const char *name) ; static void pst_name_release (pst_name *obj); -static long pst_name_IV (void); +static int pst_name_IV (void); static double pst_name_RV (void); static unsigned char *pst_name_SV (pst_name *obj); static void *pst_name_data_ptr (pst_name *obj); @@ -101,7 +101,7 @@ static pst_string *pst_string_parse_hex (unsigned char **inbuf, unsigned cha static pst_string *pst_string_new (unsigned char *str, unsigned int len); static void pst_string_release (pst_string *obj) ; -static long pst_string_IV (pst_string *obj) ; +static int pst_string_IV (pst_string *obj) ; static double pst_string_RV (pst_string *obj) ; static unsigned char *pst_string_SV (pst_string *obj) ; static void *pst_string_data_ptr (pst_string *obj) ; @@ -161,10 +161,10 @@ pst_type_of (pst_obj *obj) return obj->type; } -long +int pst_length_of (pst_obj *obj) { - long len = 0; + int len = 0; ASSERT(obj); switch (obj->type) { @@ -187,10 +187,10 @@ pst_length_of (pst_obj *obj) return len; } -long +int pst_getIV (pst_obj *obj) { - long iv = 0; + int iv = 0; ASSERT(obj); switch (obj->type) { @@ -258,7 +258,7 @@ pst_getSV (pst_obj *obj) break; case PST_TYPE_UNKNOWN: { - long len; + int len; len = strlen((char *) obj->data); if (len > 0) { @@ -320,11 +320,11 @@ pst_boolean_release (pst_boolean *obj) RELEASE(obj); } -static long +static int pst_boolean_IV (pst_boolean *obj) { ASSERT(obj); - return (long) obj->value; + return (int) obj->value; } static double @@ -354,7 +354,7 @@ pst_boolean_SV (pst_boolean *obj) return str; } -static long +static unsigned int pst_boolean_length (void) { TYPE_ERROR(); @@ -405,7 +405,7 @@ pst_parse_null (unsigned char **inbuf, unsigned char *inbufend) /* INTEGER */ static pst_integer * -pst_integer_new (long value) +pst_integer_new (int value) { pst_integer *obj; obj = NEW(1, pst_integer); @@ -420,11 +420,11 @@ pst_integer_release (pst_integer *obj) RELEASE(obj); } -static long +static int pst_integer_IV (pst_integer *obj) { ASSERT(obj); - return (long) obj->value; + return (int) obj->value; } static double @@ -443,9 +443,9 @@ pst_integer_SV (pst_integer *obj) ASSERT(obj); - len = sprintf(fmt_buf, "%ld", obj->value); + len = sprintf(fmt_buf, "%d", obj->value); - value = NEW(len, char); + value = NEW(len + 1, char); strcpy(value, fmt_buf); return (unsigned char *) value; @@ -484,11 +484,11 @@ pst_real_release (pst_real *obj) RELEASE(obj); } -static long +static int pst_real_IV (pst_real *obj) { ASSERT(obj); - return (long) obj->value; + return (int) obj->value; } static double @@ -536,7 +536,7 @@ pst_obj * pst_parse_number (unsigned char **inbuf, unsigned char *inbufend) { unsigned char *cur; - long lval; + int lval; double dval; errno = 0; @@ -704,7 +704,7 @@ pst_parse_name (unsigned char **inbuf, unsigned char *inbufend) /* / is required return pst_new_obj(PST_TYPE_NAME, pst_name_new((char *)wbuf)); } -static long +static int pst_name_IV (void) { TYPE_ERROR(); @@ -854,7 +854,7 @@ pst_string_parse_literal (unsigned char **inbuf, unsigned char *inbufend) { unsigned char wbuf[PST_STRING_LEN_MAX]; unsigned char *cur = *inbuf, c = 0; - long len = 0, balance = 1; + int len = 0, balance = 1; if (cur + 2 > inbufend || *cur != '(') return NULL; @@ -905,7 +905,7 @@ pst_string_parse_hex (unsigned char **inbuf, unsigned char *inbufend) { unsigned char wbuf[PST_STRING_LEN_MAX]; unsigned char *cur = *inbuf; - unsigned long len = 0; + unsigned int len = 0; if (cur + 2 > inbufend || *cur != '<' || (*cur == '<' && *(cur+1) == '<')) @@ -941,10 +941,10 @@ pst_string_parse_hex (unsigned char **inbuf, unsigned char *inbufend) return pst_string_new(wbuf, len); } -static long +static int pst_string_IV (pst_string *obj) { - return (long) pst_string_RV(obj); + return (int) pst_string_RV(obj); } static double diff --git a/Build/source/texk/dvipdfm-x/pst_obj.h b/Build/source/texk/dvipdfm-x/pst_obj.h index 475b1cd6d5a..936d2577b21 100644 --- a/Build/source/texk/dvipdfm-x/pst_obj.h +++ b/Build/source/texk/dvipdfm-x/pst_obj.h @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks diff --git a/Build/source/texk/dvipdfm-x/sfnt.c b/Build/source/texk/dvipdfm-x/sfnt.c index fa338349aaa..23354a53fac 100644 --- a/Build/source/texk/dvipdfm-x/sfnt.c +++ b/Build/source/texk/dvipdfm-x/sfnt.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. This program is free software; you can redistribute it and/or modify @@ -142,7 +142,7 @@ dfont_open (FILE *fp, int index) static void release_directory (struct sfnt_table_directory *td) { - long i; + int i; if (td) { if (td->tables) { @@ -192,7 +192,7 @@ put_big_endian (void *s, LONG q, int n) * in a machine independent way. */ static void -convert_tag (char *tag, unsigned long u_tag) +convert_tag (char *tag, uint32_t u_tag) { int i; @@ -356,7 +356,8 @@ int sfnt_read_table_directory (sfnt *sfont, ULONG offset) { struct sfnt_table_directory *td; - unsigned long i, u_tag; + int i; + uint32_t u_tag; ASSERT(sfont); @@ -438,7 +439,7 @@ sfnt_create_FontFile_stream (sfnt *sfont) pdf_obj *stream; pdf_obj *stream_dict; struct sfnt_table_directory *td; - long offset, nb_read, length; + int offset, nb_read, length; int i, sr; char *p; diff --git a/Build/source/texk/dvipdfm-x/sfnt.h b/Build/source/texk/dvipdfm-x/sfnt.h index 30911d0b83b..9cd42329e9d 100644 --- a/Build/source/texk/dvipdfm-x/sfnt.h +++ b/Build/source/texk/dvipdfm-x/sfnt.h @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. This program is free software; you can redistribute it and/or modify diff --git a/Build/source/texk/dvipdfm-x/spc_color.c b/Build/source/texk/dvipdfm-x/spc_color.c index 6f0d8e0fada..1d0b54e4f5f 100644 --- a/Build/source/texk/dvipdfm-x/spc_color.c +++ b/Build/source/texk/dvipdfm-x/spc_color.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks @@ -115,7 +115,7 @@ skip_blank (const char **pp, const char *endptr) } int -spc_color_check_special (const char *buf, long len) +spc_color_check_special (const char *buf, int len) { int r = 0; const char *p, *endptr; diff --git a/Build/source/texk/dvipdfm-x/spc_color.h b/Build/source/texk/dvipdfm-x/spc_color.h index 17799c3f379..c62cb030bfd 100644 --- a/Build/source/texk/dvipdfm-x/spc_color.h +++ b/Build/source/texk/dvipdfm-x/spc_color.h @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks @@ -23,7 +23,7 @@ #ifndef _SPC_COLOR_H_ #define _SPC_COLOR_H_ -extern int spc_color_check_special (const char *buffer, long size); +extern int spc_color_check_special (const char *buffer, int size); extern int spc_color_setup_handler (struct spc_handler *handle, struct spc_env *spe, struct spc_arg *args); diff --git a/Build/source/texk/dvipdfm-x/spc_dvips.c b/Build/source/texk/dvipdfm-x/spc_dvips.c index e12a7276125..3fbae93436d 100644 --- a/Build/source/texk/dvipdfm-x/spc_dvips.c +++ b/Build/source/texk/dvipdfm-x/spc_dvips.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks @@ -936,7 +936,7 @@ spc_dvips_at_end_page (void) } int -spc_dvips_check_special (const char *buf, long len) +spc_dvips_check_special (const char *buf, int len) { const char *p, *endptr; int i; @@ -948,7 +948,7 @@ spc_dvips_check_special (const char *buf, long len) if (p >= endptr) return 0; - len = (long) (endptr - p); + len = (int) (endptr - p); for (i = 0; i < sizeof(dvips_handlers)/sizeof(struct spc_handler); i++) { if (len >= strlen(dvips_handlers[i].key) && diff --git a/Build/source/texk/dvipdfm-x/spc_dvips.h b/Build/source/texk/dvipdfm-x/spc_dvips.h index 007761f07c2..32252ec0cac 100644 --- a/Build/source/texk/dvipdfm-x/spc_dvips.h +++ b/Build/source/texk/dvipdfm-x/spc_dvips.h @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks @@ -30,7 +30,7 @@ extern int spc_dvips_at_end_document (void); extern int spc_dvips_at_begin_page (void); extern int spc_dvips_at_end_page (void); -extern int spc_dvips_check_special (const char *buffer, long size); +extern int spc_dvips_check_special (const char *buffer, int size); extern int spc_dvips_setup_handler (struct spc_handler *handle, struct spc_env *spe, struct spc_arg *args); diff --git a/Build/source/texk/dvipdfm-x/spc_html.c b/Build/source/texk/dvipdfm-x/spc_html.c index 37374d55854..d5fc656ae58 100644 --- a/Build/source/texk/dvipdfm-x/spc_html.c +++ b/Build/source/texk/dvipdfm-x/spc_html.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks @@ -55,7 +55,7 @@ struct spc_html_ { struct { - long extensions; + int extensions; } opts; pdf_obj *link_dict; @@ -899,7 +899,7 @@ spc_html_at_end_document (void) int -spc_html_check_special (const char *buffer, long size) +spc_html_check_special (const char *buffer, int size) { const char *p, *endptr; @@ -907,7 +907,7 @@ spc_html_check_special (const char *buffer, long size) endptr = p + size; for ( ; p < endptr && isspace((unsigned char)*p); p++); - size = (long) (endptr - p); + size = (int) (endptr - p); if (size >= strlen("html:") && !memcmp(p, "html:", strlen("html:"))) { return 1; diff --git a/Build/source/texk/dvipdfm-x/spc_html.h b/Build/source/texk/dvipdfm-x/spc_html.h index 39e5e672da3..dd09cbba64f 100644 --- a/Build/source/texk/dvipdfm-x/spc_html.h +++ b/Build/source/texk/dvipdfm-x/spc_html.h @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks @@ -30,7 +30,7 @@ extern int spc_html_at_end_page (void); extern int spc_html_at_begin_document (void); extern int spc_html_at_end_document (void); -extern int spc_html_check_special (const char *buffer, long size); +extern int spc_html_check_special (const char *buffer, int size); extern int spc_html_setup_handler (struct spc_handler *handle, struct spc_env *spe, struct spc_arg *args); diff --git a/Build/source/texk/dvipdfm-x/spc_misc.c b/Build/source/texk/dvipdfm-x/spc_misc.c index eb0135a8eb8..0b5355145f3 100644 --- a/Build/source/texk/dvipdfm-x/spc_misc.c +++ b/Build/source/texk/dvipdfm-x/spc_misc.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks @@ -139,7 +139,7 @@ static struct spc_handler misc_handlers[] = { int -spc_misc_check_special (const char *buffer, long size) +spc_misc_check_special (const char *buffer, int size) { const char *p, *endptr; int i; @@ -148,7 +148,7 @@ spc_misc_check_special (const char *buffer, long size) endptr = p + size; skip_white(&p, endptr); - size = (long) (endptr - p); + size = (int) (endptr - p); for (i = 0; i < sizeof(misc_handlers)/sizeof(struct spc_handler); i++) { if (size >= strlen(misc_handlers[i].key) && diff --git a/Build/source/texk/dvipdfm-x/spc_misc.h b/Build/source/texk/dvipdfm-x/spc_misc.h index a76f8833b5a..43128556921 100644 --- a/Build/source/texk/dvipdfm-x/spc_misc.h +++ b/Build/source/texk/dvipdfm-x/spc_misc.h @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks @@ -25,7 +25,7 @@ #include "specials.h" -extern int spc_misc_check_special (const char *buffer, long size); +extern int spc_misc_check_special (const char *buffer, int size); extern int spc_misc_setup_handler (struct spc_handler *handle, struct spc_env *spe, struct spc_arg *args); diff --git a/Build/source/texk/dvipdfm-x/spc_pdfm.c b/Build/source/texk/dvipdfm-x/spc_pdfm.c index 29dc171feff..019230ca15d 100644 --- a/Build/source/texk/dvipdfm-x/spc_pdfm.c +++ b/Build/source/texk/dvipdfm-x/spc_pdfm.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2007-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2007-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks @@ -193,7 +193,7 @@ spc_handler_pdfm_bop (struct spc_env *spe, struct spc_arg *args) { if (args->curptr < args->endptr) { pdf_doc_set_bop_content(args->curptr, - (long) (args->endptr - args->curptr)); + (int) (args->endptr - args->curptr)); } args->curptr = args->endptr; @@ -206,7 +206,7 @@ spc_handler_pdfm_eop (struct spc_env *spe, struct spc_arg *args) { if (args->curptr < args->endptr) { pdf_doc_set_eop_content(args->curptr, - (long) (args->endptr - args->curptr)); + (int) (args->endptr - args->curptr)); } args->curptr = args->endptr; @@ -373,7 +373,7 @@ reencodestring (CMap *cmap, pdf_obj *instring) unsigned char wbuf[WBUF_SIZE]; unsigned char *obufcur; const unsigned char *inbufcur; - long inbufleft, obufleft; + int inbufleft, obufleft; if (!cmap || !instring) return 0; @@ -402,14 +402,14 @@ reencodestring (CMap *cmap, pdf_obj *instring) /* tables/values used in UTF-8 interpretation - code is based on ConvertUTF.[ch] sample code published by the Unicode consortium */ -static unsigned long +static uint32_t offsetsFromUTF8[6] = { - 0x00000000UL, - 0x00003080UL, - 0x000E2080UL, - 0x03C82080UL, - 0xFA082080UL, - 0x82082080UL + 0x00000000U, + 0x00003080U, + 0x000E2080U, + 0x03C82080U, + 0xFA082080U, + 0x82082080U }; static unsigned char @@ -457,7 +457,7 @@ maybe_reencode_utf8(pdf_obj *instring) *op++ = 0xfe; *op++ = 0xff; while (cp < inbuf + inlen) { - unsigned long usv = *cp++; + uint32_t usv = *cp++; int extraBytes = bytesFromUTF8[usv]; if (cp + extraBytes > inbuf + inlen) return -1; /* ill-formed, so give up reencoding */ @@ -474,7 +474,7 @@ maybe_reencode_utf8(pdf_obj *instring) return -1; /* out of valid Unicode range, give up */ if (usv > 0xFFFF) { /* supplementary-plane character: generate high surrogate */ - unsigned long hi = 0xdc00 + (usv - 0x10000) % 0x0400; + uint32_t hi = 0xdc00 + (usv - 0x10000) % 0x0400; if (op > wbuf + WBUF_SIZE - 2) return -1; /* out of space */ *op++ = hi / 256; @@ -911,7 +911,7 @@ spc_handler_pdfm_bead (struct spc_env *spe, struct spc_arg *args) pdf_obj *article_info; char *article_name; pdf_rect rect; - long page_no; + int page_no; transform_info ti; pdf_coord cp; @@ -994,7 +994,7 @@ spc_handler_pdfm_image (struct spc_env *spe, struct spc_arg *args) char *ident = NULL; pdf_obj *fspec, *attr = NULL; transform_info ti; - long page_no; + int page_no; /* Initialize the PageBox as the default value @@ -1295,7 +1295,7 @@ spc_handler_pdfm_object (struct spc_env *spe, struct spc_arg *args) static int spc_handler_pdfm_content (struct spc_env *spe, struct spc_arg *args) { - long len = 0; + int len = 0; skip_white(&args->curptr, args->endptr); if (args->curptr < args->endptr) { @@ -1312,7 +1312,7 @@ spc_handler_pdfm_content (struct spc_env *spe, struct spc_arg *args) work_buffer[len++] = ' '; pdf_doc_add_page_content(work_buffer, len); /* op: q cm */ - len = (long) (args->endptr - args->curptr); + len = (int) (args->endptr - args->curptr); pdf_doc_add_page_content(args->curptr, len); /* op: ANY */ pdf_doc_add_page_content(" Q", 2); /* op: Q */ } @@ -1350,7 +1350,7 @@ spc_handler_pdfm_literal (struct spc_env *spe, struct spc_arg *args) pdf_dev_concat(&M); } pdf_doc_add_page_content(" ", 1); /* op: */ - pdf_doc_add_page_content(args->curptr, (long) (args->endptr - args->curptr)); /* op: ANY */ + pdf_doc_add_page_content(args->curptr, (int) (args->endptr - args->curptr)); /* op: ANY */ if (!direct) { M.e = -spe->x_user; M.f = -spe->y_user; pdf_dev_concat(&M); @@ -1393,7 +1393,7 @@ spc_handler_pdfm_code (struct spc_env *spe, struct spc_arg *args) if (args->curptr < args->endptr) { pdf_doc_add_page_content(" ", 1); /* op: */ - pdf_doc_add_page_content(args->curptr, (long) (args->endptr - args->curptr)); /* op: ANY */ + pdf_doc_add_page_content(args->curptr, (int) (args->endptr - args->curptr)); /* op: ANY */ args->curptr = args->endptr; } @@ -1414,7 +1414,7 @@ static int spc_handler_pdfm_stream_with_type (struct spc_env *spe, struct spc_arg *args, int type) { pdf_obj *fstream; - long nb_read; + int nb_read; char *ident, *instring, *fullname; pdf_obj *tmp; FILE *fp; @@ -2010,7 +2010,7 @@ static struct spc_handler pdfm_handlers[] = { }; int -spc_pdfm_check_special (const char *buf, long len) +spc_pdfm_check_special (const char *buf, int len) { int r = 0; const char *p, *endptr; diff --git a/Build/source/texk/dvipdfm-x/spc_pdfm.h b/Build/source/texk/dvipdfm-x/spc_pdfm.h index 14b722b369b..d6c56d669bd 100644 --- a/Build/source/texk/dvipdfm-x/spc_pdfm.h +++ b/Build/source/texk/dvipdfm-x/spc_pdfm.h @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks @@ -28,7 +28,7 @@ extern int spc_pdfm_at_begin_document (void); extern int spc_pdfm_at_end_document (void); -extern int spc_pdfm_check_special (const char *buffer, long size); +extern int spc_pdfm_check_special (const char *buffer, int size); extern int spc_pdfm_setup_handler (struct spc_handler *handle, struct spc_env *spe, struct spc_arg *args); diff --git a/Build/source/texk/dvipdfm-x/spc_tpic.c b/Build/source/texk/dvipdfm-x/spc_tpic.c index ffaefb32312..da2f15cb60c 100644 --- a/Build/source/texk/dvipdfm-x/spc_tpic.c +++ b/Build/source/texk/dvipdfm-x/spc_tpic.c @@ -404,7 +404,7 @@ tpic__arc (struct spc_tpic_ *tp, #if 1 static int -spc_currentpoint (struct spc_env *spe, long *pg, pdf_coord *cp) +spc_currentpoint (struct spc_env *spe, int *pg, pdf_coord *cp) { *pg = 0; cp->x = spe->x_user; @@ -479,7 +479,7 @@ spc_handler_tpic_fp (struct spc_env *spe, { struct spc_tpic_ *tp = &_tpic_state; pdf_coord cp; - long pg; + int pg; ASSERT(spe && ap && tp); @@ -499,7 +499,7 @@ spc_handler_tpic_ip (struct spc_env *spe, { struct spc_tpic_ *tp = &_tpic_state; pdf_coord cp; - long pg; + int pg; ASSERT(spe && ap && tp); @@ -521,7 +521,7 @@ spc_handler_tpic_da (struct spc_env *spe, char *q; double da = 0.0; pdf_coord cp; - long pg; + int pg; ASSERT(spe && ap && tp); @@ -549,7 +549,7 @@ spc_handler_tpic_dt (struct spc_env *spe, char *q; double da = 0.0; pdf_coord cp; - long pg; + int pg; ASSERT(spe && ap && tp); @@ -577,7 +577,7 @@ spc_handler_tpic_sp (struct spc_env *spe, char *q; double da = 0.0; pdf_coord cp; - long pg; + int pg; ASSERT(spe && ap && tp); @@ -604,7 +604,7 @@ spc_handler_tpic_ar (struct spc_env *spe, struct spc_tpic_ *tp = &_tpic_state; double v[6]; pdf_coord cp; - long pg; + int pg; char *q; int i; @@ -644,7 +644,7 @@ spc_handler_tpic_ia (struct spc_env *spe, struct spc_tpic_ *tp = &_tpic_state; double v[6]; pdf_coord cp; - long pg; + int pg; char *q; int i; @@ -985,7 +985,7 @@ static struct spc_handler tpic_handlers[] = { }; int -spc_tpic_check_special (const char *buf, long len) +spc_tpic_check_special (const char *buf, int len) { int istpic = 0; char *q; diff --git a/Build/source/texk/dvipdfm-x/spc_tpic.h b/Build/source/texk/dvipdfm-x/spc_tpic.h index c5e07fcee39..c51b409818f 100644 --- a/Build/source/texk/dvipdfm-x/spc_tpic.h +++ b/Build/source/texk/dvipdfm-x/spc_tpic.h @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks @@ -32,7 +32,7 @@ extern int spc_tpic_at_end_page (void); extern int spc_tpic_at_begin_document (void); extern int spc_tpic_at_end_document (void); -extern int spc_tpic_check_special (const char *buffer, long size); +extern int spc_tpic_check_special (const char *buffer, int size); extern int spc_tpic_setup_handler (struct spc_handler *handle, struct spc_env *spe, struct spc_arg *args); diff --git a/Build/source/texk/dvipdfm-x/spc_util.c b/Build/source/texk/dvipdfm-x/spc_util.c index 18efb3cb253..0c84a9c79b2 100644 --- a/Build/source/texk/dvipdfm-x/spc_util.c +++ b/Build/source/texk/dvipdfm-x/spc_util.c @@ -509,7 +509,7 @@ spc_read_dimtrns_dvips (struct spc_env *spe, transform_info *t, struct spc_arg * static int -spc_read_dimtrns_pdfm (struct spc_env *spe, transform_info *p, struct spc_arg *ap, long *page_no) +spc_read_dimtrns_pdfm (struct spc_env *spe, transform_info *p, struct spc_arg *ap, int *page_no) { int has_scale, has_xscale, has_yscale, has_rotate, has_matrix; const char *_dtkeys[] = { @@ -651,7 +651,7 @@ spc_read_dimtrns_pdfm (struct spc_env *spe, transform_info *p, struct spc_arg *a { double page; if (page_no && spc_util_read_numbers(&page, 1, ap) == 1) - *page_no = (long) page; + *page_no = (int) page; else error = -1; } @@ -716,7 +716,7 @@ spc_read_dimtrns_pdfm (struct spc_env *spe, transform_info *p, struct spc_arg *a } int -spc_util_read_dimtrns (struct spc_env *spe, transform_info *ti, struct spc_arg *args, long *page_no, int syntax) +spc_util_read_dimtrns (struct spc_env *spe, transform_info *ti, struct spc_arg *args, int *page_no, int syntax) { ASSERT(ti && spe && args); diff --git a/Build/source/texk/dvipdfm-x/spc_util.h b/Build/source/texk/dvipdfm-x/spc_util.h index bc97bcb5b36..5e71aa3508f 100644 --- a/Build/source/texk/dvipdfm-x/spc_util.h +++ b/Build/source/texk/dvipdfm-x/spc_util.h @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks @@ -34,7 +34,7 @@ * This is for reading *single* color specification. */ extern int spc_util_read_colorspec (struct spc_env *spe, pdf_color *colorspec, struct spc_arg *args, int syntax); -extern int spc_util_read_dimtrns (struct spc_env *spe, transform_info *dimtrns, struct spc_arg *args, long *page, int syntax); +extern int spc_util_read_dimtrns (struct spc_env *spe, transform_info *dimtrns, struct spc_arg *args, int *page, int syntax); extern int spc_util_read_numbers (double *values, int num_values, struct spc_arg *args); extern int spc_util_read_pdfcolor (struct spc_env *spe, pdf_color *colorspec, struct spc_arg *args, pdf_color *defaultcolor); diff --git a/Build/source/texk/dvipdfm-x/spc_xtx.c b/Build/source/texk/dvipdfm-x/spc_xtx.c index 0358e84f2bd..a2dd6fecb80 100644 --- a/Build/source/texk/dvipdfm-x/spc_xtx.c +++ b/Build/source/texk/dvipdfm-x/spc_xtx.c @@ -396,7 +396,7 @@ static struct spc_handler xtx_handlers[] = { }; int -spc_xtx_check_special (const char *buf, long len) +spc_xtx_check_special (const char *buf, int len) { int r = 0; const char *p, *endptr; diff --git a/Build/source/texk/dvipdfm-x/spc_xtx.h b/Build/source/texk/dvipdfm-x/spc_xtx.h index da69398ea97..def827f76ab 100644 --- a/Build/source/texk/dvipdfm-x/spc_xtx.h +++ b/Build/source/texk/dvipdfm-x/spc_xtx.h @@ -1,7 +1,7 @@ /* This is xdvipdfmx, an extended version of dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2013-2014 by the dvipdfmx project team. + Copyright (C) 2013-2015 by the dvipdfmx project team. Copyright (c) 2006 SIL International Originally written by Jonathan Kew @@ -31,7 +31,7 @@ #include "specials.h" -extern int spc_xtx_check_special (const char *buffer, long size); +extern int spc_xtx_check_special (const char *buffer, int size); extern int spc_xtx_setup_handler (struct spc_handler *handle, struct spc_env *spe, struct spc_arg *args); extern int spc_handler_xtx_do_transform (double x_user, double y_user, double a, double b, double c, double d, double e, double f); diff --git a/Build/source/texk/dvipdfm-x/specials.c b/Build/source/texk/dvipdfm-x/specials.c index 3d173011b0a..83bb120b823 100644 --- a/Build/source/texk/dvipdfm-x/specials.c +++ b/Build/source/texk/dvipdfm-x/specials.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks @@ -362,7 +362,7 @@ static struct { int (*eodhk_func) (void); int (*bophk_func) (void); int (*eophk_func) (void); - int (*check_func) (const char *, long); + int (*check_func) (const char *, int); int (*setup_func) (struct spc_handler *, struct spc_env *, struct spc_arg *); } known_specials[] = { @@ -506,7 +506,7 @@ print_error (const char *name, struct spc_env *spe, struct spc_arg *ap) const char *p; char ebuf[64]; int i; - long pg = spe->pg; + int pg = spe->pg; pdf_coord c; c.x = spe->x_user; c.y = spe->y_user; diff --git a/Build/source/texk/dvipdfm-x/specials.h b/Build/source/texk/dvipdfm-x/specials.h index c748280156d..ea3cc0b0e20 100644 --- a/Build/source/texk/dvipdfm-x/specials.h +++ b/Build/source/texk/dvipdfm-x/specials.h @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2007-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2007-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks @@ -26,7 +26,7 @@ struct spc_env { double x_user, y_user; double mag; - long pg; /* current page in PDF */ + int pg; /* current page in PDF */ }; struct spc_arg { diff --git a/Build/source/texk/dvipdfm-x/subfont.c b/Build/source/texk/dvipdfm-x/subfont.c index 09f20a0dc6e..87a3c3b5494 100644 --- a/Build/source/texk/dvipdfm-x/subfont.c +++ b/Build/source/texk/dvipdfm-x/subfont.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. This program is free software; you can redistribute it and/or modify @@ -169,7 +169,7 @@ read_sfd_record (struct sfd_rec_ *rec, const char *lbuf) const char *p = lbuf, *q; char *r; int repos = 0; - long c, v1 = 0, v2 = 0; + int c, v1 = 0, v2 = 0; int curpos = 0; int error = 0; diff --git a/Build/source/texk/dvipdfm-x/t1_char.c b/Build/source/texk/dvipdfm-x/t1_char.c index 9f67b510d09..bbbeb031434 100644 --- a/Build/source/texk/dvipdfm-x/t1_char.c +++ b/Build/source/texk/dvipdfm-x/t1_char.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks @@ -938,10 +938,10 @@ put_numbers (double *argv, int argn, card8 **dest, card8 *limit) for (i = 0; i < argn; i++) { double value; - long ivalue; + int ivalue; value = argv[i]; /* Nearest integer value */ - ivalue = (long) floor(value+0.5); + ivalue = (int) floor(value+0.5); if (value >= 0x8000L || value <= (-0x8000L - 1)) { /* * This number cannot be represented as a single operand. @@ -952,10 +952,10 @@ put_numbers (double *argv, int argn, card8 **dest, card8 *limit) /* 16.16-bit signed fixed value */ DST_NEED(limit, *dest + 5); *(*dest)++ = 255; - ivalue = (long) floor(value); /* mantissa */ + ivalue = (int) floor(value); /* mantissa */ *(*dest)++ = (ivalue >> 8) & 0xff; *(*dest)++ = ivalue & 0xff; - ivalue = (long)((value - ivalue) * 0x10000l); /* fraction */ + ivalue = (int)((value - ivalue) * 0x10000l); /* fraction */ *(*dest)++ = (ivalue >> 8) & 0xff; *(*dest)++ = ivalue & 0xff; /* Everything else are integers. */ @@ -988,7 +988,7 @@ put_numbers (double *argv, int argn, card8 **dest, card8 *limit) static void get_integer (card8 **data, card8 *endptr) { - long result = 0; + int result = 0; card8 b0 = **data, b1, b2; *data += 1; @@ -1028,7 +1028,7 @@ get_integer (card8 **data, card8 *endptr) static void get_longint (card8 **data, card8 *endptr) { - long result = 0; + int result = 0; int i; *data += 1; @@ -1060,7 +1060,7 @@ t1char_build_charpath (t1_chardesc *cd, card8 **data, card8 *endptr, cff_index *subrs) { card8 b0 = 0, *subr; - long len; + int len; if (nest > CS_SUBR_NEST_MAX) ERROR("Subroutine nested too deeply."); @@ -1101,7 +1101,7 @@ t1char_build_charpath (t1_chardesc *cd, status = CS_PARSE_OK; } else if (status == CS_CHAR_END && *data < endptr) { if (!(*data == endptr - 1 && **data == cs_return)) - WARN("Garbage after endchar. (%ld bytes)", (long) (endptr - *data)); + WARN("Garbage after endchar. (%d bytes)", (int) (endptr - *data)); } else if (status < CS_PARSE_OK) { /* error */ ERROR("Parsing charstring failed: (status=%d, stack=%d)", status, cs_stack_top); } diff --git a/Build/source/texk/dvipdfm-x/t1_load.c b/Build/source/texk/dvipdfm-x/t1_load.c index cfa1b6a6f48..f755bae962b 100644 --- a/Build/source/texk/dvipdfm-x/t1_load.c +++ b/Build/source/texk/dvipdfm-x/t1_load.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks @@ -76,7 +76,7 @@ static void t1_crypt_init (unsigned short key) static void t1_decrypt (unsigned short key, unsigned char *dst, const unsigned char *src, - long skip, long len) + int skip, int len) { len -= skip; while (skip--) @@ -442,8 +442,8 @@ parse_subrs (cff_font *font, { cff_index *subrs; pst_obj *tok; - long i, count, offset, max_size; - long *offsets, *lengths; + int i, count, offset, max_size; + int *offsets, *lengths; card8 *data; tok = pst_get_token(start, end); @@ -471,10 +471,10 @@ parse_subrs (cff_font *font, if (mode != 1) { max_size = CS_STR_LEN_MAX; data = NEW(max_size, card8); - offsets = NEW(count, long); - lengths = NEW(count, long); - memset(offsets, 0, sizeof(long)*count); - memset(lengths, 0, sizeof(long)*count); + offsets = NEW(count, int); + lengths = NEW(count, int); + memset(offsets, 0, sizeof(int)*count); + memset(lengths, 0, sizeof(int)*count); } else { max_size = 0; data = NULL; @@ -485,7 +485,7 @@ parse_subrs (cff_font *font, offset = 0; /* dup subr# n-bytes RD n-binary-bytes NP */ for (i = 0; i < count;) { - long idx, len; + int idx, len; tok = pst_get_token(start, end); if (!tok) { @@ -597,8 +597,8 @@ parse_charstrings (cff_font *font, cff_index *charstrings; cff_charsets *charset; pst_obj *tok; - long i, count, have_notdef; - long max_size, offset; + int i, count, have_notdef; + int max_size, offset; /* /CharStrings n dict dup begin * /GlyphName n-bytes RD -n-binary-bytes- ND @@ -640,7 +640,7 @@ parse_charstrings (cff_font *font, seek_operator(start, end, "begin"); for (i = 0; i < count; i++) { char *glyph_name; - long len, gid, j; + int len, gid, j; /* BUG-20061126 (by ChoF): * Some fonts (e.g., belleek/blsy.pfb) does not have the correct number @@ -725,7 +725,7 @@ parse_charstrings (cff_font *font, *start += 1; if (mode != 1) { if (lenIV >= 0) { - long offs = gid ? offset : 0; + int offs = gid ? offset : 0; charstrings->offset[gid] = offs + 1; /* start at 1 */ t1_decrypt(T1_CHARKEY, charstrings->data+offs, *start, lenIV, len); offset += len - lenIV; @@ -844,7 +844,7 @@ parse_part2 (cff_font *font, unsigned char **start, unsigned char *end, int mode #define TYPE1_NAME_LEN_MAX 127 #endif -static long +static int parse_part1 (cff_font *font, char **enc_vec, unsigned char **start, unsigned char *end) { @@ -1011,10 +1011,10 @@ is_pfb (FILE *fp) #define PFB_SEG_TYPE_BINARY 2 static unsigned char * -get_pfb_segment (FILE *fp, int expected_type, long *length) +get_pfb_segment (FILE *fp, int expected_type, int *length) { unsigned char *buffer; - long bytesread; + int bytesread; buffer = NULL; bytesread = 0; for (;;) { @@ -1032,7 +1032,7 @@ get_pfb_segment (FILE *fp, int expected_type, long *length) break; } { - long slen, rlen; + int slen, rlen; int i; slen = 0; @@ -1082,7 +1082,7 @@ int t1_get_fontname (FILE *fp, char *fontname) { unsigned char *buffer, *start, *end; - long length; + int length; char *key; int fn_found = 0; @@ -1156,7 +1156,7 @@ init_cff_font (cff_font *cff) cff_font * t1_load_font (char **enc_vec, int mode, FILE *fp) { - long length; + int length; cff_font *cff; unsigned char *buffer, *start, *end; diff --git a/Build/source/texk/dvipdfm-x/tfm.c b/Build/source/texk/dvipdfm-x/tfm.c index c8184012f00..7bd3f2dc4b1 100644 --- a/Build/source/texk/dvipdfm-x/tfm.c +++ b/Build/source/texk/dvipdfm-x/tfm.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks diff --git a/Build/source/texk/dvipdfm-x/tfm.h b/Build/source/texk/dvipdfm-x/tfm.h index ba78e852872..9160426ae16 100644 --- a/Build/source/texk/dvipdfm-x/tfm.h +++ b/Build/source/texk/dvipdfm-x/tfm.h @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks diff --git a/Build/source/texk/dvipdfm-x/truetype.c b/Build/source/texk/dvipdfm-x/truetype.c index 9af7b6271ea..a92da2bef9f 100644 --- a/Build/source/texk/dvipdfm-x/truetype.c +++ b/Build/source/texk/dvipdfm-x/truetype.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2007-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2007-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. This program is free software; you can redistribute it and/or modify @@ -170,7 +170,7 @@ pdf_font_open_truetype (pdf_font *font) * "builtin" encoding means "MacRoman" here. */ pdf_obj *tmp; - long flags; + int flags; #ifndef ENABLE_NOEMBED ERROR("Font file=\"%s\" can't be embedded due to liscence restrictions.", ident); @@ -178,7 +178,7 @@ pdf_font_open_truetype (pdf_font *font) pdf_font_set_flags(font, PDF_FONT_FLAG_NOEMBED); tmp = pdf_lookup_dict(descriptor, "Flags"); if (tmp && pdf_obj_typeof(tmp) == PDF_NUMBER) { - flags = (long) pdf_number_value(tmp); + flags = (int) pdf_number_value(tmp); flags &= (1 << 2); /* clear Symbolic */ flags |= (1 << 5); /* set Nonsymbolic */ pdf_add_dict(descriptor, pdf_new_name("Flags"), pdf_new_number(flags)); diff --git a/Build/source/texk/dvipdfm-x/tt_cmap.c b/Build/source/texk/dvipdfm-x/tt_cmap.c index c1aa14d913a..62fadc59fce 100644 --- a/Build/source/texk/dvipdfm-x/tt_cmap.c +++ b/Build/source/texk/dvipdfm-x/tt_cmap.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2007-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2007-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. This program is free software; you can redistribute it and/or modify @@ -617,7 +617,7 @@ load_cmap4 (struct cmap4 *map, USHORT c0, c1, gid, cid; USHORT j, d, segCount; USHORT ch; - long i; + int i; segCount = map->segCountX2 / 2; for (i = segCount - 1; i >= 0 ; i--) { @@ -667,7 +667,7 @@ load_cmap12 (struct cmap12 *map, for (ch = map->groups[i].startCharCode; ch <= map->groups[i].endCharCode; ch++) { - long d = ch - map->groups[i].startCharCode; + int d = ch - map->groups[i].startCharCode; gid = (USHORT) ((map->groups[i].startGlyphID + d) & 0xffff); if (GIDToCIDMap) { cid = ((GIDToCIDMap[2*gid] << 8)|GIDToCIDMap[2*gid+1]); @@ -704,7 +704,7 @@ handle_CIDFont (sfnt *sfont, unsigned char **GIDToCIDMap, CIDSysInfo *csi) { cff_font *cffont; - long offset, i; + int offset, i; card16 num_glyphs, gid; cff_charsets *charset; unsigned char *map; @@ -877,7 +877,7 @@ handle_subst_glyphs (CMap *cmap, for (count = 0, i = 0; i < 8192; i++) { int j; int32_t len; - long inbytesleft, outbytesleft; + int inbytesleft, outbytesleft; const unsigned char *inbuf; unsigned char *outbuf; @@ -938,7 +938,7 @@ handle_subst_glyphs (CMap *cmap, count++; if (verbose > VERBOSE_LEVEL_MIN) { - long _i; + int _i; MESG("otf_cmap>> Additional ToUnicode mapping: <%04X> <", gid); for (_i = 0; _i < len; _i++) { @@ -961,7 +961,7 @@ static cff_font * prepare_CIDFont_from_sfnt(sfnt* sfont) { cff_font *cffont; - unsigned long offset = 0; + unsigned offset = 0; if (sfont->type != SFNT_TYPE_POSTSCRIPT || sfnt_read_table_directory(sfont, 0) < 0 || @@ -1058,7 +1058,7 @@ create_ToUnicode_cmap12 (CMap *cmap, for (i = 0; i < map->nGroups; i++) { for (ch = map->groups[i].startCharCode; ch <= map->groups[i].endCharCode; ch++) { - long d = ch - map->groups[i].startCharCode; + int d = ch - map->groups[i].startCharCode; USHORT gid = (USHORT) ((map->groups[i].startGlyphID + d) & 0xffff); count += add_to_cmap_if_used(cmap, cffont, used_chars, gid, ch); } @@ -1171,7 +1171,7 @@ otf_create_ToUnicode_stream (const char *font_name, int cmap_id) { pdf_obj *cmap_ref = NULL; - long res_id; + int res_id; pdf_obj *cmap_obj = NULL; CMap *cmap_add, *code_to_cid_cmap; int cmap_add_id; @@ -1294,10 +1294,10 @@ otf_create_ToUnicode_stream (const char *font_name, struct gent { USHORT gid; - long ucv; /* assigned PUA unicode */ + int32_t ucv; /* assigned PUA unicode */ - int num_unicodes; - long unicodes[MAX_UNICODES]; + int num_unicodes; + int32_t unicodes[MAX_UNICODES]; }; static void @@ -1382,7 +1382,7 @@ add_glyph (struct ht_table *unencoded, /* This seriously affects speed... */ static struct gent * -find_glyph (struct ht_table *unencoded, long ucv) +find_glyph (struct ht_table *unencoded, int32_t ucv) { ASSERT(unencoded); @@ -1619,7 +1619,7 @@ load_gsub (pdf_obj *conf, otl_gsub *gsub_list, sfnt *sfont) { pdf_obj *rule; char *script, *language, *feature; - long i, size; + int i, size; rule = otl_conf_get_rule(conf); if (!rule) @@ -1632,7 +1632,7 @@ load_gsub (pdf_obj *conf, otl_gsub *gsub_list, sfnt *sfont) for (i = 0; i < size; i += 2) { pdf_obj *tmp, *commands; int flag; - long j, num_comms; + int j, num_comms; tmp = pdf_get_array(rule, i); flag = (int) pdf_number_value(tmp); @@ -1668,7 +1668,7 @@ handle_gsub (pdf_obj *conf, { pdf_obj *rule; char *script, *language, *feature; - long i, size; + int i, size; if (!conf) return; @@ -1688,7 +1688,7 @@ handle_gsub (pdf_obj *conf, size = pdf_array_length(rule); for (i = 0; i < size; i += 2) { pdf_obj *tmp, *commands; - long j, num_comms; + int j, num_comms; int flag; tmp = pdf_get_array(rule, i); diff --git a/Build/source/texk/dvipdfm-x/tt_cmap.h b/Build/source/texk/dvipdfm-x/tt_cmap.h index 99ad50f5f04..f8eb062641b 100644 --- a/Build/source/texk/dvipdfm-x/tt_cmap.h +++ b/Build/source/texk/dvipdfm-x/tt_cmap.h @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. This program is free software; you can redistribute it and/or modify diff --git a/Build/source/texk/dvipdfm-x/tt_glyf.c b/Build/source/texk/dvipdfm-x/tt_glyf.c index da3ec6be550..cd1fbfd336b 100644 --- a/Build/source/texk/dvipdfm-x/tt_glyf.c +++ b/Build/source/texk/dvipdfm-x/tt_glyf.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. This program is free software; you can redistribute it and/or modify @@ -210,7 +210,7 @@ tt_build_tables (sfnt *sfont, struct tt_glyphs *g) struct tt_os2__table *os2; /* temp */ ULONG *location, offset; - long i; + int i; USHORT *w_stat; /* Estimate most frequently appeared width */ ASSERT(g); @@ -448,8 +448,8 @@ tt_build_tables (sfnt *sfont, struct tt_glyphs *g) offset = 0UL; prev = 0; for (i = 0; i < g->num_glyphs; i++) { - long gap, j; - gap = (long) g->gd[i].gid - prev - 1; + int gap, j; + gap = g->gd[i].gid - prev - 1; for (j = 1; j <= gap; j++) { if (prev + j == hhea->numOfLongHorMetrics - 1) { p += sfnt_put_ushort(p, last_advw); @@ -518,7 +518,7 @@ tt_get_metrics (sfnt *sfont, struct tt_glyphs *g) struct tt_os2__table *os2; /* temp */ ULONG *location, offset; - long i; + int i; USHORT *w_stat; ASSERT(g); diff --git a/Build/source/texk/dvipdfm-x/tt_gsub.c b/Build/source/texk/dvipdfm-x/tt_gsub.c index 347c3b25163..554d1e8b6da 100644 --- a/Build/source/texk/dvipdfm-x/tt_gsub.c +++ b/Build/source/texk/dvipdfm-x/tt_gsub.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. This program is free software; you can redistribute it and/or modify @@ -65,7 +65,7 @@ struct clt_range USHORT StartCoverageIndex; /* Converage Index of first GID */ }; -static long +static int clt_read_record (struct clt_record *rec, sfnt *sfont) { int i; @@ -81,7 +81,7 @@ clt_read_record (struct clt_record *rec, sfnt *sfont) return 6; } -static long +static int clt_read_range (struct clt_range *rec, sfnt *sfont) { ASSERT(rec && sfont); @@ -111,10 +111,10 @@ struct clt_number_list USHORT *value; }; -static long +static int clt_read_record_list (struct clt_record_list *list, sfnt *sfont) { - long len, i; + int len, i; ASSERT(list && sfont); @@ -144,10 +144,10 @@ clt_release_record_list (struct clt_record_list *list) } } -static long +static int clt_read_number_list (struct clt_number_list *list, sfnt *sfont) { - long i; + int i; ASSERT(list && sfont); @@ -281,10 +281,10 @@ struct clt_script_table struct clt_record_list LangSysRecord; }; -static long +static int clt_read_script_table (struct clt_script_table *tab, sfnt *sfont) { - long len; + int len; ASSERT(tab && sfont); @@ -312,10 +312,10 @@ struct clt_langsys_table */ }; -static long +static int clt_read_langsys_table (struct clt_langsys_table *tab, sfnt *sfont) { - long len; + int len; ASSERT(tab && sfont); @@ -342,10 +342,10 @@ struct clt_feature_table struct clt_number_list LookupListIndex; /* LookupListIndex List */ }; -static long +static int clt_read_feature_table (struct clt_feature_table *tab, sfnt *sfont) { - long len; + int len; ASSERT(tab && sfont); @@ -375,10 +375,10 @@ struct clt_lookup_table /* offset is from beginning of Lookup table */ }; -static long +static int clt_read_lookup_table (struct clt_lookup_table *tab, sfnt *sfont) { - long len; + int len; ASSERT(tab && sfont); @@ -397,10 +397,10 @@ clt_release_lookup_table (struct clt_lookup_table *tab) clt_release_number_list(&tab->SubTableList); } -static long +static int clt_read_coverage (struct clt_coverage *cov, sfnt *sfont) { - long len, i; + int len, i; ASSERT(cov && sfont); @@ -462,10 +462,10 @@ clt_release_coverage (struct clt_coverage *cov) } /* returns -1 if not found */ -static long +static int clt_lookup_coverage (struct clt_coverage *cov, USHORT gid) { - long i; + int i; ASSERT(cov); @@ -496,10 +496,10 @@ clt_lookup_coverage (struct clt_coverage *cov, USHORT gid) return -1; /* not found */ } -static long +static int otl_gsub_read_single (struct otl_gsub_subtab *subtab, sfnt *sfont) { - long len; + int len; ULONG offset; /* not Offset which is USHORT */ Offset cov_offset; /* subtable offset, offset to Coverage table */ @@ -552,10 +552,10 @@ otl_gsub_read_single (struct otl_gsub_subtab *subtab, sfnt *sfont) return len; } -static long +static int otl_gsub_read_alternate (struct otl_gsub_subtab *subtab, sfnt *sfont) { - long len; + int len; USHORT i, j; ULONG offset; /* not Offset which is USHORT */ Offset cov_offset; /* subtable offset, offset to Coverage table */ @@ -619,10 +619,10 @@ otl_gsub_read_alternate (struct otl_gsub_subtab *subtab, sfnt *sfont) return len; } -static long +static int otl_gsub_read_ligature (struct otl_gsub_subtab *subtab, sfnt *sfont) { - long len; + int len; USHORT i, j; ULONG offset; /* not Offset which is USHORT */ Offset cov_offset; /* subtable offset, offset to Coverage table */ @@ -797,7 +797,7 @@ otl_gsub_release_alternate (struct otl_gsub_subtab *subtab) } } -static long +static int otl_gsub_read_header (struct otl_gsub_header *head, sfnt *sfont) { ASSERT(head && sfont); @@ -832,7 +832,7 @@ struct otl_gsub_tab static int otl_gsub_read_feat (struct otl_gsub_tab *gsub, sfnt *sfont) { - long feat_idx, script_idx; + int feat_idx, script_idx; ULONG gsub_offset, offset; struct otl_gsub_header head; struct otl_gsub_subtab *subtab = NULL; @@ -877,7 +877,7 @@ otl_gsub_read_feat (struct otl_gsub_tab *gsub, sfnt *sfont) if (otl_match_optrule(script, script_list.record[script_idx].tag)) { struct clt_script_table script_tab; - long langsys_idx; + int langsys_idx; offset = gsub_offset + head.ScriptList + script_list.record[script_idx].offset; @@ -966,7 +966,7 @@ otl_gsub_read_feat (struct otl_gsub_tab *gsub, sfnt *sfont) (otl_match_optrule(feature, feature_list.record[feat_idx].tag))) { struct clt_feature_table feature_table; - long i; + int i; if(verbose > VERBOSE_LEVEL_MIN) { MESG(" %c%c%c%c", @@ -989,7 +989,7 @@ otl_gsub_read_feat (struct otl_gsub_tab *gsub, sfnt *sfont) /* Lookup table */ for (i = 0; i < feature_table.LookupListIndex.count; i++) { struct clt_lookup_table lookup_table; - long ll_idx, st_idx, r, n_st; + int ll_idx, st_idx, r, n_st; ll_idx = feature_table.LookupListIndex.value[i]; if (ll_idx >= lookup_list.count) @@ -1156,7 +1156,7 @@ otl_gsub_read_feat (struct otl_gsub_tab *gsub, sfnt *sfont) static int otl_gsub_apply_single (struct otl_gsub_subtab *subtab, USHORT *gid) { - long idx; + int idx; ASSERT(subtab && gid); @@ -1188,7 +1188,7 @@ static int otl_gsub_apply_alternate (struct otl_gsub_subtab *subtab, USHORT alt_idx, USHORT *gid) { - long idx; + int idx; ASSERT(subtab && gid); @@ -1237,7 +1237,7 @@ otl_gsub_apply_ligature (struct otl_gsub_subtab *subtab, USHORT *gid_in, USHORT num_gids, USHORT *gid_out) { - long idx; + int idx; ASSERT(subtab && gid_out); @@ -1514,7 +1514,7 @@ otl_gsub_select (otl_gsub *gsub_list, static int otl_gsub_dump_single (struct otl_gsub_subtab *subtab) { - long gid, idx; + int gid, idx; ASSERT(subtab); @@ -1549,7 +1549,7 @@ otl_gsub_dump_single (struct otl_gsub_subtab *subtab) static int otl_gsub_dump_alternate (struct otl_gsub_subtab *subtab) { - long gid, idx; + int gid, idx; ASSERT(subtab); @@ -1580,7 +1580,7 @@ otl_gsub_dump_alternate (struct otl_gsub_subtab *subtab) static int otl_gsub_dump_ligature (struct otl_gsub_subtab *subtab) { - long gid, idx; + int gid, idx; ASSERT(subtab); diff --git a/Build/source/texk/dvipdfm-x/tt_table.c b/Build/source/texk/dvipdfm-x/tt_table.c index 8b71a1e188d..312a03753ba 100644 --- a/Build/source/texk/dvipdfm-x/tt_table.c +++ b/Build/source/texk/dvipdfm-x/tt_table.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. This program is free software; you can redistribute it and/or modify diff --git a/Build/source/texk/dvipdfm-x/tt_table.h b/Build/source/texk/dvipdfm-x/tt_table.h index 251dd21e131..2e44b4ac5a2 100644 --- a/Build/source/texk/dvipdfm-x/tt_table.h +++ b/Build/source/texk/dvipdfm-x/tt_table.h @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2007-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2007-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. This program is free software; you can redistribute it and/or modify diff --git a/Build/source/texk/dvipdfm-x/type0.c b/Build/source/texk/dvipdfm-x/type0.c index ba3efa2e40f..06bb9c8ec3d 100644 --- a/Build/source/texk/dvipdfm-x/type0.c +++ b/Build/source/texk/dvipdfm-x/type0.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. This program is free software; you can redistribute it and/or modify @@ -662,7 +662,7 @@ static pdf_obj * pdf_read_ToUnicode_file (const char *cmap_name) { pdf_obj *stream; - long res_id = -1; + int res_id = -1; ASSERT(cmap_name); diff --git a/Build/source/texk/dvipdfm-x/type1.c b/Build/source/texk/dvipdfm-x/type1.c index a211e94fb58..6e635552f3d 100644 --- a/Build/source/texk/dvipdfm-x/type1.c +++ b/Build/source/texk/dvipdfm-x/type1.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2008-2014 by Jin-Hwan Cho, Matthias Franz, and Shunsaku Hirata, + Copyright (C) 2008-2015 by Jin-Hwan Cho, Matthias Franz, and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks @@ -130,7 +130,7 @@ get_font_attr (pdf_font *font, cff_font *cffont) double capheight, ascent, descent; double italicangle, stemv; double defaultwidth, nominalwidth; - long flags = 0, gid, i; + int flags = 0, gid, i; static const char *L_c[] = { "H", "P", "Pi", "Rho", NULL }; @@ -268,7 +268,7 @@ get_font_attr (pdf_font *font, cff_font *cffont) } static void -add_metrics (pdf_font *font, cff_font *cffont, char **enc_vec, double *widths, long num_glyphs) +add_metrics (pdf_font *font, cff_font *cffont, char **enc_vec, double *widths, int num_glyphs) { pdf_obj *fontdict, *descriptor; pdf_obj *tmp_array; @@ -355,14 +355,14 @@ add_metrics (pdf_font *font, cff_font *cffont, char **enc_vec, double *widths, l } -static long +static int write_fontfile (pdf_font *font, cff_font *cffont) { pdf_obj *descriptor; pdf_obj *fontfile, *stream_dict; cff_index *topdict; - long private_size, stream_data_len, charstring_len; - long topdict_offset, offset; + int private_size, stream_data_len, charstring_len; + int topdict_offset, offset; #define WBUF_SIZE 1024 card8 *stream_data_ptr, wbuf[WBUF_SIZE]; @@ -489,7 +489,7 @@ pdf_font_load_type1 (pdf_font *font) double *widths; card16 *GIDMap, num_glyphs = 0; FILE *fp; - long offset; + int offset; int code, verbose; ASSERT(font); @@ -582,7 +582,7 @@ pdf_font_load_type1 (pdf_font *font) GIDMap = NEW(MAX_GLYPHS, card16); { int prev, duplicate; - long gid; + int gid; char *glyph; s_SID sid; @@ -678,7 +678,7 @@ pdf_font_load_type1 (pdf_font *font) cff_index *cstring; t1_ginfo gm; card16 gid, gid_orig; - long dstlen_max, srclen; + int dstlen_max, srclen; card8 *srcptr, *dstptr; offset = dstlen_max = 0L; @@ -703,7 +703,7 @@ pdf_font_load_type1 (pdf_font *font) cffont->subrs[0], defaultwidth, nominalwidth, &gm); cstring->offset[gid + 1] = offset + 1; if (gm.use_seac) { - long bchar_gid, achar_gid, i; + int bchar_gid, achar_gid, i; const char *bchar_name, *achar_name; /* diff --git a/Build/source/texk/dvipdfm-x/type1c.c b/Build/source/texk/dvipdfm-x/type1c.c index 0f71630a005..3a1718f0f87 100644 --- a/Build/source/texk/dvipdfm-x/type1c.c +++ b/Build/source/texk/dvipdfm-x/type1c.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2008-2014 by Jin-Hwan Cho, Matthias Franz, and Shunsaku Hirata, + Copyright (C) 2008-2015 by Jin-Hwan Cho, Matthias Franz, and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks @@ -73,7 +73,7 @@ pdf_font_open_type1c (pdf_font *font) sfnt *sfont; cff_font *cffont; pdf_obj *descriptor, *tmp; - unsigned long offset = 0; + unsigned offset = 0; int encoding_id, embedding; ASSERT(font); @@ -240,10 +240,10 @@ pdf_font_load_type1c (pdf_font *font) cff_index *charstrings, *topdict, *cs_idx; cff_charsets *charset = NULL; cff_encoding *encoding = NULL; - long topdict_offset, private_size; - long charstring_len, max_len; - long size, offset = 0; - long stream_data_len = 0; + int topdict_offset, private_size; + int charstring_len, max_len; + int size, offset = 0; + int stream_data_len = 0; card8 *stream_data_ptr, *data; card16 num_glyphs, cs_count, code; cs_ginfo ginfo; @@ -378,7 +378,7 @@ pdf_font_load_type1c (pdf_font *font) /* * Charastrings. */ - offset = (long) cff_dict_get(cffont->topdict, "CharStrings", 0); + offset = cff_dict_get(cffont->topdict, "CharStrings", 0); cff_seek_set(cffont, offset); cs_idx = cff_get_index_header(cffont); diff --git a/Build/source/texk/dvipdfm-x/unicode.c b/Build/source/texk/dvipdfm-x/unicode.c index 90bcddf941f..09e35ce34c6 100644 --- a/Build/source/texk/dvipdfm-x/unicode.c +++ b/Build/source/texk/dvipdfm-x/unicode.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks diff --git a/Build/source/texk/dvipdfm-x/unicode.h b/Build/source/texk/dvipdfm-x/unicode.h index afb5ff67ace..94bbc719994 100644 --- a/Build/source/texk/dvipdfm-x/unicode.h +++ b/Build/source/texk/dvipdfm-x/unicode.h @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2014 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks diff --git a/Build/source/texk/dvipdfm-x/xbb.c b/Build/source/texk/dvipdfm-x/xbb.c index cdc08cd1260..742892d4770 100644 --- a/Build/source/texk/dvipdfm-x/xbb.c +++ b/Build/source/texk/dvipdfm-x/xbb.c @@ -51,7 +51,7 @@ int PageBox = 0; PageBox=5 :bleedbox */ -static long Include_Page = 1; +static int Include_Page = 1; static void show_version(void) { @@ -132,13 +132,13 @@ static char *make_xbb_filename(const char *name) static void write_xbb(char *fname, double bbllx_f, double bblly_f, double bburx_f, double bbury_f, - int pdf_version, long pagecount) + int pdf_version, int pagecount) { char *outname = NULL; FILE *fp = NULL; - long bbllx = ROUND(bbllx_f, 1.0), bblly = ROUND(bblly_f, 1.0); - long bburx = ROUND(bburx_f, 1.0), bbury = ROUND(bbury_f, 1.0); + int bbllx = ROUND(bbllx_f, 1.0), bblly = ROUND(bblly_f, 1.0); + int bburx = ROUND(bburx_f, 1.0), bbury = ROUND(bbury_f, 1.0); if (xbb_to_file) { outname = make_xbb_filename(fname); @@ -159,7 +159,7 @@ static void write_xbb(char *fname, fprintf(fp, "%%%%Title: %s\n", fname); fprintf(fp, "%%%%Creator: extractbb %s\n", VERSION); - fprintf(fp, "%%%%BoundingBox: %ld %ld %ld %ld\n", bbllx, bblly, bburx, bbury); + fprintf(fp, "%%%%BoundingBox: %d %d %d %d\n", bbllx, bblly, bburx, bbury); if (!compat_mode) { /* Note: @@ -173,7 +173,7 @@ static void write_xbb(char *fname, bbllx_f, bblly_f, bburx_f, bbury_f); if (pdf_version >= 0) { fprintf(fp, "%%%%PDFVersion: 1.%d\n", pdf_version); - fprintf(fp, "%%%%Pages: %ld\n", pagecount); + fprintf(fp, "%%%%Pages: %d\n", pagecount); } } @@ -247,8 +247,8 @@ static void do_pdf (FILE *fp, char *filename) { pdf_obj *page; pdf_file *pf; - long page_no = Include_Page; - long count; + int page_no = Include_Page; + int count; pdf_rect bbox; pf = pdf_open(filename, fp); -- cgit v1.2.3