1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

Adjust for the changed Camellia draft.

W32 gettext changes.
Comment and typo fixes.
This commit is contained in:
Werner Koch 2008-04-18 09:20:25 +00:00
parent 057558d04b
commit 4896f5f47c
15 changed files with 166 additions and 69 deletions

View file

@ -1,3 +1,8 @@
2008-04-08 Werner Koch <wk@g10code.com>
* i18n.c (i18n_switchto_utf8, i18n_switchback)
[USE_SIMPLE_GETTEXT]: Implement.
2008-04-07 Werner Koch <wk@g10code.com>
* b64enc.c (b64enc_start): Detect PGP mode.

View file

@ -45,17 +45,19 @@ i18n_init (void)
/* The Assuan agent protocol requires us to transmit utf-8 strings
thus we need a fuctnion to temporary switch gettext from native to
thus we need a way to temporary switch gettext from native to
utf8. */
char *
i18n_switchto_utf8 (void)
{
#ifdef ENABLE_NLS
#ifdef USE_SIMPLE_GETTEXT
gettext_select_utf8 (1);
#elif define(ENABLE_NLS)
char *orig_codeset = bind_textdomain_codeset (PACKAGE_GT, NULL);
#ifdef HAVE_LANGINFO_CODESET
# ifdef HAVE_LANGINFO_CODESET
if (!orig_codeset)
orig_codeset = nl_langinfo (CODESET);
#endif
# endif
if (orig_codeset)
{ /* We only switch when we are able to restore the codeset later.
Note that bind_textdomain_codeset does only return on memory
@ -78,7 +80,9 @@ i18n_switchto_utf8 (void)
void
i18n_switchback (char *saved_codeset)
{
#ifdef ENABLE_NLS
#ifdef USE_SIMPLE_GETTEXT
gettext_select_utf8 (0);
#elif defined(ENABLE_NLS)
if (saved_codeset)
{
bind_textdomain_codeset (PACKAGE_GT, saved_codeset);