/* Header for binary .mo file format. */ structmo_file_header { /* The magic number. */ 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 or 1. */
/* 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 translated strings. */ nls_uint32 trans_tab_offset; /* Size of hash table. */ nls_uint32 hash_tab_size; /* 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; };
loaded_l10nfile
1 2 3 4 5 6 7 8 9 10
structloaded_l10nfile { constchar *filename; int decided;
/* The representation of an opened message catalog. */ structloaded_domain { /* Pointer to memory containing the .mo file. */ 0x0: constchar *data; /* 1 if the memory is mmap()ed, 0 if the memory is malloc()ed. */ 0x8: int use_mmap; /* Size of mmap()ed memory. */ 0x10: size_t mmap_size; /* 1 if the .mo file uses a different endianness than this machine. */ 0x18: int must_swap; /* Pointer to additional malloc()ed memory. */ 0x20: void *malloced;
/* Number of static strings pairs. */ 0x28: nls_uint32 nstrings; /* Pointer to descriptors of original strings in the file. */ 0x30: conststructstring_desc *orig_tab; /* Pointer to descriptors of translated strings in the file. */ 0x38: conststructstring_desc *trans_tab;
/* Number of system dependent strings pairs. */ 0x40: nls_uint32 n_sysdep_strings; /* Pointer to descriptors of original sysdep strings. */ 0x48: conststructsysdep_string_desc *orig_sysdep_tab; /* Pointer to descriptors of translated sysdep strings. */ 0x50: conststructsysdep_string_desc *trans_sysdep_tab;
/* Size of hash table. */ 0x58: nls_uint32 hash_size; /* Pointer to hash table. */ 0x60: const nls_uint32 *hash_tab; /* 1 if the hash table uses a different endianness than this machine. */ 0x68: int must_swap_hash_tab;
/* Cache of charset conversions of the translated strings. */ structconverted_domain *conversions; size_t nconversions; gl_rwlock_define (, conversions_lock)