summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipdfm-x/pdfcolor.c
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2015-08-24 08:49:38 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2015-08-24 08:49:38 +0000
commit186bbd00ffa404c29caaeeeee89437c127e95df7 (patch)
tree1adffc6952f6d43b9ecd8002064da7189fbeae5d /Build/source/texk/dvipdfm-x/pdfcolor.c
parent90e1eb12c7fa4c597d0b72e1a8af3186110e2bb2 (diff)
texk/dvipdfm-x: No reason to use 'long' for 32-bit integers
git-svn-id: svn://tug.org/texlive/trunk@38194 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipdfm-x/pdfcolor.c')
-rw-r--r--Build/source/texk/dvipdfm-x/pdfcolor.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/Build/source/texk/dvipdfm-x/pdfcolor.c b/Build/source/texk/dvipdfm-x/pdfcolor.c
index 5e50727b29c..6a8c9077a58 100644
--- a/Build/source/texk/dvipdfm-x/pdfcolor.c
+++ b/Build/source/texk/dvipdfm-x/pdfcolor.c
@@ -618,7 +618,7 @@ iccp_version_supported (int major, int minor)
return 0;
}
-typedef unsigned long iccSig;
+typedef uint32_t iccSig;
static iccSig
str2iccSig (const void *s)
{
@@ -631,14 +631,14 @@ str2iccSig (const void *s)
typedef struct
{
- long X, Y, Z; /* s15Fixed16Numeber */
+ int32_t X, Y, Z; /* s15Fixed16Number */
} iccXYZNumber;
typedef struct
{
long size;
iccSig CMMType;
- long version;
+ int32_t version;
iccSig devClass;
iccSig colorSpace;
iccSig PCS; /* Profile Connection Space */
@@ -649,7 +649,7 @@ typedef struct
iccSig devMnfct;
iccSig devModel;
char devAttr[8];
- long intent;
+ int32_t intent;
iccXYZNumber illuminant;
iccSig creator;
unsigned char ID[16]; /* MD5 checksum with Rendering intent,
@@ -700,7 +700,7 @@ iccp_init_iccHeader (iccHeader *icch)
*/
struct iccbased_cdata
{
- long sig; /* 'i' 'c' 'c' 'b' */
+ int32_t sig; /* 'i' 'c' 'c' 'b' */
unsigned char checksum[16]; /* 16 bytes MD5 Checksum */
int colorspace; /* input colorspace:
@@ -785,7 +785,7 @@ compare_iccbased (const char *ident1, const struct iccbased_cdata *cdata1,
}
int
-iccp_check_colorspace (int colortype, const void *profile, long proflen)
+iccp_check_colorspace (int colortype, const void *profile, int proflen)
{
iccSig colorspace;
const unsigned char *p;
@@ -823,11 +823,11 @@ iccp_check_colorspace (int colortype, const void *profile, long proflen)
}
pdf_obj *
-iccp_get_rendering_intent (const void *profile, long proflen)
+iccp_get_rendering_intent (const void *profile, int proflen)
{
pdf_obj *ri = NULL;
const unsigned char *p;
- long intent;
+ int32_t intent;
if (!profile || proflen < 128)
return NULL;
@@ -856,13 +856,13 @@ iccp_get_rendering_intent (const void *profile, long proflen)
return ri;
}
-#define sget_signed_long(p) ((long) ((p)[0] << 24|(p)[1] << 16|(p)[2] << 8|(p)[3]))
+#define sget_signed_long(p) ((int32_t) ((p)[0] << 24|(p)[1] << 16|(p)[2] << 8|(p)[3]))
#define sget_signed_short(p) ((short) ((p)[0] << 8|(p)[1]))
#define get_iccSig(p) ((iccSig) ((p)[0] << 24|(p)[1] << 16|(p)[2] << 8|(p)[3]))
static int
iccp_unpack_header (iccHeader *icch,
- const void *profile, long proflen, int check_size)
+ const void *profile, int proflen, int check_size)
{
const unsigned char *p, *endptr;
@@ -931,8 +931,8 @@ iccp_unpack_header (iccHeader *icch,
/* 28 bytes reserved - must be set to zeros */
for (; p < endptr; p++) {
if (*p != '\0') {
- WARN("Reserved pad not zero: %02x (at offset %ld in ICC profile header.)",
- *p, 128 - ((long) (endptr - p)));
+ WARN("Reserved pad not zero: %02x (at offset %d in ICC profile header.)",
+ *p, 128 - ((int) (endptr - p)));
return -1;
}
}
@@ -955,7 +955,7 @@ iccp_unpack_header (iccHeader *icch,
#include "dpxcrypt.h"
static void
-iccp_get_checksum (unsigned char *checksum, const void *profile, long proflen)
+iccp_get_checksum (unsigned char *checksum, const void *profile, int proflen)
{
const unsigned char *p;
MD5_CONTEXT md5;
@@ -1115,7 +1115,7 @@ iccp_devClass_allowed (int dev_class)
int
iccp_load_profile (const char *ident,
- const void *profile, long proflen)
+ const void *profile, int proflen)
{
int cspc_id;
pdf_obj *resource;
@@ -1213,11 +1213,11 @@ iccp_load_profile (const char *ident,
static unsigned char wbuf[WBUF_SIZE];
static pdf_obj *
-iccp_load_file_stream (unsigned char *checksum, long length, FILE *fp)
+iccp_load_file_stream (unsigned char *checksum, int length, FILE *fp)
{
pdf_obj *stream;
MD5_CONTEXT md5;
- long nb_read;
+ int nb_read;
rewind(fp);