diff options
Diffstat (limited to 'intl/gettext.h')
-rw-r--r-- | intl/gettext.h | 58 |
1 files changed, 53 insertions, 5 deletions
diff --git a/intl/gettext.h b/intl/gettext.h index 11a0236..65e0b27 100644 --- a/intl/gettext.h +++ b/intl/gettext.h @@ -1,5 +1,5 @@ /* Internal header for GNU gettext internationalization functions. - Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1995, 1997, 2000-2002 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -76,26 +76,74 @@ struct mo_file_header nls_uint32 magic; /* The revision number of the file format. */ nls_uint32 revision; + + /* The following are only used in .mo files with major revision 0. */ + /* The number of strings pairs. */ nls_uint32 nstrings; /* Offset of table with start offsets of original strings. */ nls_uint32 orig_tab_offset; - /* Offset of table with start offsets of translation strings. */ + /* Offset of table with start offsets of translated strings. */ nls_uint32 trans_tab_offset; - /* Size of hashing table. */ + /* Size of hash table. */ nls_uint32 hash_tab_size; - /* Offset of first hashing entry. */ + /* Offset of first hash table entry. */ nls_uint32 hash_tab_offset; + + /* The following are only used in .mo files with minor revision >= 1. */ + + /* The number of system dependent segments. */ + nls_uint32 n_sysdep_segments; + /* Offset of table describing system dependent segments. */ + nls_uint32 sysdep_segments_offset; + /* The number of system dependent strings pairs. */ + nls_uint32 n_sysdep_strings; + /* Offset of table with start offsets of original sysdep strings. */ + nls_uint32 orig_sysdep_tab_offset; + /* Offset of table with start offsets of translated sysdep strings. */ + nls_uint32 trans_sysdep_tab_offset; }; +/* Descriptor for static string contained in the binary .mo file. */ struct string_desc { - /* Length of addressed string. */ + /* Length of addressed string, not including the trailing NUL. */ nls_uint32 length; /* Offset of string in file. */ nls_uint32 offset; }; +/* The following are only used in .mo files with minor revision >= 1. */ + +/* Descriptor for system dependent string segment. */ +struct sysdep_segment +{ + /* Length of addressed string, including the trailing NUL. */ + nls_uint32 length; + /* Offset of string in file. */ + nls_uint32 offset; +}; + +/* Descriptor for system dependent string. */ +struct sysdep_string +{ + /* Offset of static string segments in file. */ + nls_uint32 offset; + /* Alternating sequence of static and system dependent segments. + The last segment is a static segment, including the trailing NUL. */ + struct segment_pair + { + /* Size of static segment. */ + nls_uint32 segsize; + /* Reference to system dependent string segment, or ~0 at the end. */ + nls_uint32 sysdepref; + } segments[1]; +}; + +/* Marker for the end of the segments[] array. This has the value 0xFFFFFFFF, + regardless whether 'int' is 16 bit, 32 bit, or 64 bit. */ +#define SEGMENTS_END ((nls_uint32) ~0) + /* @@ begin of epilog @@ */ #endif /* gettext.h */ |