summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipdfm-x/pdfdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/dvipdfm-x/pdfdev.c')
-rw-r--r--Build/source/texk/dvipdfm-x/pdfdev.c18
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;