1 --- msgcat.h.orig 2009-11-23 18:16:18.000000000 -0800
2 +++ msgcat.h 2009-12-05 13:58:11.000000000 -0800
3 @@ -43,13 +43,14 @@ up-to-date. Many thanks.
5 #define MCMagic "*nazgul*"
11 /* For or'd constants */
12 -#define MCMakeId(s,m) (unsigned long) ( ((unsigned short)s << (sizeof(short)*8)) \
13 +#define MCMakeId(s,m) (u_int32_t) ( ((unsigned short)s << (sizeof(short)*8)) \
18 * Critical note here. Sets and Messages *MUST* be stored in ascending
19 * order. There are stored that way (by specification) in the original
20 @@ -88,37 +89,43 @@ typedef union {
26 +#endif /* __LP64__ */
28 * MCMsgT - Message structure (disk and runtime)
30 typedef struct _MCMsgT {
31 - long msgId; /* Id of this message */
32 + int32_t msgId; /* Id of this message */
33 MCOffsetT msg; /* Relative offset on disk or pointer in memory */
34 - long invalid; /* Valid on disk, loaded in memory */
35 + int32_t invalid; /* Valid on disk, loaded in memory */
39 * MCSetT - Set structure (disk and runtime)
41 typedef struct _MCSetT {
42 - long setId; /* Id of this set */
43 + int32_t setId; /* Id of this set */
44 off_t nextSet; /* Offset of next set on disk */
46 off_t firstMsg; /* Offset to first Msg (while on disk) */
47 MCMsgT *msgs; /* Pointer to array of msgs (in mem, loaded) */
49 MCOffsetT data; /* Offset to data, or pointer to data */
50 - long dataLen; /* Length of data area on disk */
51 - long numMsgs; /* Number of messages */
52 - long invalid; /* Valid on disk, loaded in memory */
53 + int32_t dataLen; /* Length of data area on disk */
54 + int32_t numMsgs; /* Number of messages */
55 + int32_t invalid; /* Valid on disk, loaded in memory */
59 +#endif /* __LP64__ */
62 * MCCatT - Runtime catalog pointer
65 FILE *fp; /* File descriptor of catalog (if load-on-demand) */
66 - long numSets; /* Number of sets */
67 + int32_t numSets; /* Number of sets */
68 MCSetT *sets; /* Pointer to the sets */
69 off_t firstSet; /* Offset of first set on disk */
71 @@ -128,10 +135,10 @@ typedef struct {
74 char magic[MCMagicLen]; /* Magic cookie "*nazgul*" */
75 - long majorVer; /* ++ on incompatible changes */
76 - long minorVer; /* ++ on compatible changes */
77 - long flags; /* Informational flags */
78 - long numSets; /* Number of valid Sets */
79 + int32_t majorVer; /* ++ on incompatible changes */
80 + int32_t minorVer; /* ++ on compatible changes */
81 + int32_t flags; /* Informational flags */
82 + int32_t numSets; /* Number of valid Sets */
83 off_t firstSet; /* Offset of first set on disk */