summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipdfm-x/cidtype2.c
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2015-08-25 08:27:18 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2015-08-25 08:27:18 +0000
commit9e79a59a9cd97513d54c3e6190d2391947daa14b (patch)
treed301db97dfeb963bb8bdb0e02139d332057d07e7 /Build/source/texk/dvipdfm-x/cidtype2.c
parent4dc44f751f9c40c83f347420624e498aa936d0ab (diff)
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
Diffstat (limited to 'Build/source/texk/dvipdfm-x/cidtype2.c')
-rw-r--r--Build/source/texk/dvipdfm-x/cidtype2.c30
1 files changed, 15 insertions, 15 deletions
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);