about summary refs log tree commit diff
path: root/intl/gettextP.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-07-27 08:47:23 +0000
committerUlrich Drepper <drepper@redhat.com>2002-07-27 08:47:23 +0000
commit3172f58fa34e806ba4d4a521572ea7c3acea015f (patch)
tree1f37577eb79e42349da33290fa5e38999c71c63a /intl/gettextP.h
parentd683fe11f91717f0f9c2cf238c8bff0f1618c1ae (diff)
downloadglibc-3172f58fa34e806ba4d4a521572ea7c3acea015f.tar.gz
glibc-3172f58fa34e806ba4d4a521572ea7c3acea015f.tar.xz
glibc-3172f58fa34e806ba4d4a521572ea7c3acea015f.zip
Update.
2002-07-15  Alexandre Oliva  <aoliva@redhat.com>

	* configure.in (static_nss): Set to `yes' if --disable-shared.

2002-07-23  Bruno Haible  <bruno@clisp.org>

	* intl/loadmsgcat.c (PRI*): Redefine the macros if PRI_MACROS_BROKEN
	is set.

2002-07-25  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h: New file.
	* sysdeps/unix/sysv/linux/ia64/profil-counter.h: Fix profil_counter
	arguments.

2002-07-25  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/alpha/adjtime.c (__adjtimex_internal): Add
	alias.

2002-07-21  Bruno Haible  <bruno@clisp.org>

	* intl/libintl.h (__GNU_GETTEXT_SUPPORTED_REVISION): New macro.
	* intl/gettext.h (struct mo_file_header): New fields n_sysdep_segments,
	sysdep_segments_offset, n_sysdep_strings, orig_sysdep_tab_offset,
	trans_sysdep_tab_offset.
	(struct sysdep_segment): New type.
	(struct sysdep_string): New type.
	(SEGMENTS_END): New macro.
	* intl/gettextP.h (struct sysdep_string_desc): New type.
	(struct loaded_domain): New fields malloced, n_sysdep_strings,
	orig_sysdep_tab, trans_sysdep_tab, must_swap_hash_tab. Make fields
	orig_tab, trans_tab, hash_tab to const pointers because they point
	into read-only memory.
	* intl/loadmsgcat.c: Include stdint.h, inttypes.h, hash-string.h.
	(PRI*): Define fallback values.
	(get_sysdep_segment_value): New function.
	(_nl_load_domain): Distinguish major and minor revision parts. Add
	support for minor revision 1 with system dependent strings.
	(_nl_unload_domain): Also free the 'malloced' field.
	* intl/dcigettext.c (_nl_find_msg): Remove test for domain->hash_size,
	now done in loadmsgcat.c. Add support for system dependent strings.
Diffstat (limited to 'intl/gettextP.h')
-rw-r--r--intl/gettextP.h38
1 files changed, 35 insertions, 3 deletions
diff --git a/intl/gettextP.h b/intl/gettextP.h
index 98d16954f9..d90e59a364 100644
--- a/intl/gettextP.h
+++ b/intl/gettextP.h
@@ -75,18 +75,50 @@ SWAP (i)
 #endif
 
 
+/* In-memory representation of system dependent string.  */
+struct sysdep_string_desc
+{
+  /* Length of addressed string, including the trailing NUL.  */
+  size_t length;
+  /* Pointer to addressed string.  */
+  const char *pointer;
+};
+
 /* The representation of an opened message catalog.  */
 struct loaded_domain
 {
+  /* Pointer to memory containing the .mo file.  */
   const char *data;
+  /* 1 if the memory is mmap()ed, 0 if the memory is malloc()ed.  */
   int use_mmap;
+  /* Size of mmap()ed memory.  */
   size_t mmap_size;
+  /* 1 if the .mo file uses a different endianness than this machine.  */
   int must_swap;
+  /* Pointer to additional malloc()ed memory.  */
+  void *malloced;
+
+  /* Number of static strings pairs.  */
   nls_uint32 nstrings;
-  struct string_desc *orig_tab;
-  struct string_desc *trans_tab;
+  /* Pointer to descriptors of original strings in the file.  */
+  const struct string_desc *orig_tab;
+  /* Pointer to descriptors of translated strings in the file.  */
+  const struct string_desc *trans_tab;
+
+  /* Number of system dependent strings pairs.  */
+  nls_uint32 n_sysdep_strings;
+  /* Pointer to descriptors of original sysdep strings.  */
+  const struct sysdep_string_desc *orig_sysdep_tab;
+  /* Pointer to descriptors of translated sysdep strings.  */
+  const struct sysdep_string_desc *trans_sysdep_tab;
+
+  /* Size of hash table.  */
   nls_uint32 hash_size;
-  nls_uint32 *hash_tab;
+  /* Pointer to hash table.  */
+  const nls_uint32 *hash_tab;
+  /* 1 if the hash table uses a different endianness than this machine.  */
+  int must_swap_hash_tab;
+
   int codeset_cntr;
 #ifdef _LIBC
   __gconv_t conv;