diff options
author | Ralph Giles <ralph.giles@artifex.com> | 2001-04-07 07:28:33 +0000 |
---|---|---|
committer | Ralph Giles <ralph.giles@artifex.com> | 2001-04-07 07:28:33 +0000 |
commit | eb233a78d7d437a8234dce0bb590126dc4c0b05b (patch) | |
tree | 66a953d0e204b2c348a884a4c148143c44736e5a /gs/icclib | |
parent | 1580ac7194252c91285a299d1dc745455a49df8f (diff) |
Fix: two small issues with compilation under xlc on IBM AIX RS6000, a name
conflict with structures names (u)int64, and trailing commas in enum
declarations. Patch from Dan Coby. Sourceforge bug #414328.
git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@1401 a1074d23-0009-0410-80fe-cf8c14f379e6
Diffstat (limited to 'gs/icclib')
-rw-r--r-- | gs/icclib/icc.c | 10 | ||||
-rw-r--r-- | gs/icclib/icc.h | 14 |
2 files changed, 12 insertions, 12 deletions
diff --git a/gs/icclib/icc.c b/gs/icclib/icc.c index 2cd9d7965..472cd2c83 100644 --- a/gs/icclib/icc.c +++ b/gs/icclib/icc.c @@ -142,7 +142,7 @@ static int write_UInt32Number(unsigned int d, char *p) { return 0; } -static void read_UInt64Number(uint64 *d, char *p) { +static void read_UInt64Number(uint64bits *d, char *p) { d->h = 16777216 * (unsigned int)((ORD8 *)p)[0] + 65536 * (unsigned int)((ORD8 *)p)[1] + 256 * (unsigned int)((ORD8 *)p)[2] @@ -153,7 +153,7 @@ static void read_UInt64Number(uint64 *d, char *p) { + (unsigned int)((ORD8 *)p)[7]; } -static int write_UInt64Number(uint64 *d, char *p) { +static int write_UInt64Number(uint64bits *d, char *p) { ((ORD8 *)p)[0] = (ORD8)(d->h >> 24); ((ORD8 *)p)[1] = (ORD8)(d->h >> 16); ((ORD8 *)p)[2] = (ORD8)(d->h >> 8); @@ -260,7 +260,7 @@ static int write_SInt32Number(int d, char *p) { return 0; } -static void read_SInt64Number(int64 *d, char *p) { +static void read_SInt64Number(int64bits *d, char *p) { d->h = 16777216 * (int)((INT8 *)p)[0] + 65536 * (int)((ORD8 *)p)[1] + 256 * (int)((ORD8 *)p)[2] @@ -271,7 +271,7 @@ static void read_SInt64Number(int64 *d, char *p) { + (unsigned int)((ORD8 *)p)[7]; } -static int write_SInt64Number(int64 *d, char *p) { +static int write_SInt64Number(int64bits *d, char *p) { ((INT8 *)p)[0] = (INT8)(d->h >> 24); ((ORD8 *)p)[1] = (ORD8)(d->h >> 16); ((ORD8 *)p)[2] = (ORD8)(d->h >> 8); @@ -1809,7 +1809,7 @@ static int icmUInt64Array_allocate( icmUInt64Array *p = (icmUInt64Array *)pp; if (p->size > 0 && p->data == NULL) { - if ((p->data = (uint64 *) malloc(p->size * sizeof(uint64))) == NULL) { + if ((p->data = (uint64bits *) malloc(p->size * sizeof(uint64bits))) == NULL) { sprintf(p->icp->err,"icmUInt64Array_alloc: malloc() of icmUInt64Array data failed"); return p->icp->errc = 2; } diff --git a/gs/icclib/icc.h b/gs/icclib/icc.h index 641e31054..5bc7bf814 100644 --- a/gs/icclib/icc.h +++ b/gs/icclib/icc.h @@ -42,11 +42,11 @@ typedef int icmSig; /* Otherwise un-enumerated 4 byte signature */ typedef struct { ORD32 l; /* High and low components of signed 64 bit */ INT32 h; -} int64; +} int64bits; typedef struct { ORD32 l,h; /* High and low components of unsigned 64 bit */ -} uint64; +} uint64bits; /* XYZ Number */ typedef struct { @@ -115,7 +115,7 @@ static icmBase *new_icmUInt32Array(struct _icc *icp); struct _icmUInt64Array { BASE_MEMBERS unsigned long size; /* Allocated and used size of the array */ - uint64 *data; /* Pointer to array of hight data */ + uint64bits *data; /* Pointer to array of hight data */ }; typedef struct _icmUInt64Array icmUInt64Array; static icmBase *new_icmUInt64Array(struct _icc *icp); @@ -388,7 +388,7 @@ struct _icmDescStruct { int (*allocate)(struct _icmDescStruct *p); /* Allocate method */ icmSig deviceMfg; /* Dev Manufacturer */ unsigned int deviceModel; /* Dev Model */ - uint64 attributes; /* Dev attributes */ + uint64bits attributes; /* Dev attributes */ icTechnologySignature technology; /* Technology sig */ icmTextDescription device; /* Manufacturer text (sub structure) */ icmTextDescription model; /* Model text (sub structure) */ @@ -481,11 +481,11 @@ struct _icmHeader { /* Values that should be set before writing */ icmSig manufacturer; /* Dev manufacturer */ icmSig model; /* Dev model */ - uint64 attributes; /* Device attributes.l */ + uint64bits attributes; /* Device attributes.l */ unsigned int flags; /* Various bits */ /* Values that may optionally be set before writing */ - /* uint64 attributes; Device attributes.h (see above) */ + /* uint64bits attributes; Device attributes.h (see above) */ icmSig creator; /* Profile creator */ /* Values that are not normally set, since they have defaults */ @@ -512,7 +512,7 @@ typedef enum { /* Public: Parameter to get_luobj function */ typedef enum { icmLuOrdNorm = 0, /* Normal profile preference: Lut, matrix, monochrome */ - icmLuOrdRev = 1, /* Reverse profile preference: monochrome, matrix, monochrome */ + icmLuOrdRev = 1 /* Reverse profile preference: monochrome, matrix, monochrome */ } icmLookupOrder; /* Publix: Lookup algorithm object type */ |