Loading...
nls/FreeBSD/msgcat.h Libc-1725.40.4 Libc-583
--- Libc/Libc-1725.40.4/nls/FreeBSD/msgcat.h
+++ Libc/Libc-583/nls/FreeBSD/msgcat.h
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/lib/libc/nls/msgcat.h,v 1.9 2005/02/01 16:04:55 phantom Exp $ */
+/* $FreeBSD: src/lib/libc/nls/msgcat.h,v 1.8 2000/09/03 21:05:10 ache Exp $ */
 
 #ifndef _MSGCAT_H_
 #define _MSGCAT_H_
@@ -36,23 +36,26 @@
 
 ******************************************************************/
 
-#include <_stdio.h>
-#include <sys/_types/_off_t.h>
+
+#include <sys/types.h>
 
 /*
- * Magic definitions
+ * On disk data structures
  */
 
+/* For or'd constants */
+#define MCMakeId(s,m)		(unsigned long) ( ((unsigned short)s << (sizeof(short)*8)) \
+						 | (unsigned short)m )
+#define MCSetId(id)		(unsigned int) ( id >> (sizeof(short) * 8) )
+#define MCMsgId(id)		(unsigned int) ( (id << (sizeof(short) * 8)) \
+						>> (sizeof(short) * 8) )
 #define MCMagicLen	8
 #define MCMagic		"*nazgul*"
+#define MCLastMsg	0
+#define MCLastSet	0
 
-#define MCMajorVer	1
+#define MCMajorVer	1L
 #define MCMinorVer	0
-
-/* For or'd constants */
-#define MCMakeId(s,m)		(u_int32_t) ( ((unsigned short)s << (sizeof(short)*8)) \
-						 | (unsigned short)m )
-
 
 /*
  * Critical note here.  Sets and Messages *MUST* be stored in ascending
@@ -81,6 +84,11 @@
  * no guarantee that this will all work.
  */
 
+/* These should be publicly available */
+
+#define MCLoadBySet	0	/* Load entire sets as they are used */
+#define MCLoadAll	1	/* Load entire DB on catopen */
+
 /*
  * MCOffsetT - Union to handle both disk and runtime pointers
  */
@@ -92,43 +100,38 @@
     struct _MCSetT	*set;
 } MCOffsetT;
 
-#ifdef __LP64__
-#pragma pack(4)
-#endif /* __LP64__ */
 /*
  * MCMsgT - Message structure (disk and runtime)
  */
 typedef struct _MCMsgT {
-    int32_t	msgId;		/* Id of this message */
+    long	msgId;		/* Id of this message */
     MCOffsetT	msg;		/* Relative offset on disk or pointer in memory */
-    int32_t	invalid;	/* Valid on disk, loaded in memory */
+    long	invalid;	/* Valid on disk, loaded in memory */
 } MCMsgT;
 
 /*
  * MCSetT - Set structure (disk and runtime)
  */
 typedef struct _MCSetT {
-    int32_t	setId;		/* Id of this set */
+    long	setId;		/* Id of this set */
     off_t	nextSet;	/* Offset of next set on disk */
     union {
 	off_t	firstMsg;	/* Offset to first Msg (while on disk) */
 	MCMsgT	*msgs;		/* Pointer to array of msgs (in mem, loaded) */
     } u;
     MCOffsetT	data;		/* Offset to data, or pointer to data */
-    int32_t	dataLen;	/* Length of data area on disk */
-    int32_t	numMsgs;	/* Number of messages */
-    int32_t	invalid;	/* Valid on disk, loaded in memory */
+    long	dataLen;	/* Length of data area on disk */
+    long	numMsgs;	/* Number of messages */
+    long	invalid;	/* Valid on disk, loaded in memory */
 } MCSetT;
-#ifdef __LP64__
-#pragma pack()
-#endif /* __LP64__ */
 
 /*
  * MCCatT - Runtime catalog pointer
  */
 typedef struct {
+    long	loadType;	/* How to load the messages (see MSLoadType) */
     FILE        *fp;            /* File descriptor of catalog (if load-on-demand) */
-    int32_t	numSets;	/* Number of sets */
+    long	numSets;	/* Number of sets */
     MCSetT	*sets;		/* Pointer to the sets */
     off_t	firstSet;	/* Offset of first set on disk */
 } MCCatT;
@@ -138,10 +141,10 @@
  */
 typedef struct {
     char	magic[MCMagicLen];	/* Magic cookie "*nazgul*" */
-    int32_t	majorVer;		/* ++ on incompatible changes */
-    int32_t	minorVer;		/* ++ on compatible changes */
-    int32_t	flags;			/* Informational flags */
-    int32_t	numSets;		/* Number of valid Sets */
+    long	majorVer;		/* ++ on incompatible changes */
+    long	minorVer;		/* ++ on compatible changes */
+    long	flags;			/* Informational flags */
+    long	numSets;		/* Number of valid Sets */
     off_t	firstSet;		/* Offset of first set on disk */
 } MCHeaderT;