summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalph Giles <ralph.giles@artifex.com>2001-04-07 07:28:33 +0000
committerRalph Giles <ralph.giles@artifex.com>2001-04-07 07:28:33 +0000
commiteb233a78d7d437a8234dce0bb590126dc4c0b05b (patch)
tree66a953d0e204b2c348a884a4c148143c44736e5a
parent1580ac7194252c91285a299d1dc745455a49df8f (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
-rw-r--r--gs/icclib/icc.c10
-rw-r--r--gs/icclib/icc.h14
-rw-r--r--gs/src/dscparse.h4
3 files changed, 14 insertions, 14 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 */
diff --git a/gs/src/dscparse.h b/gs/src/dscparse.h
index 3c46c16f9..cccabb0a9 100644
--- a/gs/src/dscparse.h
+++ b/gs/src/dscparse.h
@@ -184,7 +184,7 @@ typedef enum {
CDSC_PORTRAIT = 1,
CDSC_LANDSCAPE = 2,
CDSC_UPSIDEDOWN = 3,
- CDSC_SEASCAPE = 4,
+ CDSC_SEASCAPE = 4
} CDSC_ORIENTATION_ENUM;
/* stored in dsc->document_data */
@@ -284,7 +284,7 @@ typedef enum {
typedef enum {
CDSC_ERROR_INFORM = 0, /* Not an error */
CDSC_ERROR_WARN = 1, /* Not a DSC error itself, */
- CDSC_ERROR_ERROR = 2, /* DSC error */
+ CDSC_ERROR_ERROR = 2 /* DSC error */
} CDSC_MESSAGE_SEVERITY;
/* response */