diff options
author | Bruno Haible <bruno@clisp.org> | 2005-04-29 17:44:42 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-23 12:12:32 +0200 |
commit | 6ea1a5a3b6c52fb85af46a844963b717298511e1 (patch) | |
tree | 94ef97d315f81f52ca4709419ec57aa114a299fe /gettext-runtime/intl/gettextP.h | |
parent | 3f405dcb0c4e0bacb86a4c7e61a10794ae89a80d (diff) | |
download | external_gettext-6ea1a5a3b6c52fb85af46a844963b717298511e1.zip external_gettext-6ea1a5a3b6c52fb85af46a844963b717298511e1.tar.gz external_gettext-6ea1a5a3b6c52fb85af46a844963b717298511e1.tar.bz2 |
Fix gettext-tools/tests/gettext-5 bug.
Diffstat (limited to 'gettext-runtime/intl/gettextP.h')
-rw-r--r-- | gettext-runtime/intl/gettextP.h | 40 |
1 files changed, 25 insertions, 15 deletions
diff --git a/gettext-runtime/intl/gettextP.h b/gettext-runtime/intl/gettextP.h index d73b3e1..6be4646 100644 --- a/gettext-runtime/intl/gettextP.h +++ b/gettext-runtime/intl/gettextP.h @@ -77,6 +77,26 @@ struct sysdep_string_desc const char *pointer; }; +/* Cache of translated strings after charset conversion. + Note: The strings are converted to the target encoding only on an as-needed + basis. */ +struct converted_domain +{ + /* The target encoding name. */ + const char *encoding; + /* The descriptor for conversion from the message catalog's encoding to + this target encoding. */ +#ifdef _LIBC + __gconv_t conv; +#else +# if HAVE_ICONV + iconv_t conv; +# endif +#endif + /* The table of translated strings after charset conversion. */ + char **conv_tab; +}; + /* The representation of an opened message catalog. */ struct loaded_domain { @@ -113,14 +133,10 @@ struct loaded_domain int must_swap_hash_tab; int codeset_cntr; -#ifdef _LIBC - __gconv_t conv; -#else -# if HAVE_ICONV - iconv_t conv; -# endif -#endif - char **conv_tab; + + /* Cache of charset conversions of the translated strings. */ + struct converted_domain *conversions; + size_t nconversions; struct expression *plural; unsigned long int nplurals; @@ -166,16 +182,10 @@ void _nl_load_domain (struct loaded_l10nfile *__domain, internal_function; void _nl_unload_domain (struct loaded_domain *__domain) internal_function; -const char *_nl_init_domain_conv (struct loaded_l10nfile *__domain_file, - struct loaded_domain *__domain, - struct binding *__domainbinding) - internal_function; -void _nl_free_domain_conv (struct loaded_domain *__domain) - internal_function; char *_nl_find_msg (struct loaded_l10nfile *domain_file, struct binding *domainbinding, const char *msgid, - size_t *lengthp) + int convert, size_t *lengthp) internal_function; #ifdef _LIBC |