diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2015-08-25 08:27:18 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2015-08-25 08:27:18 +0000 |
commit | 9e79a59a9cd97513d54c3e6190d2391947daa14b (patch) | |
tree | d301db97dfeb963bb8bdb0e02139d332057d07e7 /Build/source/texk/dvipdfm-x/pdfdev.c | |
parent | 4dc44f751f9c40c83f347420624e498aa936d0ab (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/pdfdev.c')
-rw-r--r-- | Build/source/texk/dvipdfm-x/pdfdev.c | 18 |
1 files changed, 9 insertions, 9 deletions
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; |