diff options
author | Werner Koch <[email protected]> | 2002-09-10 08:27:38 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2002-09-10 08:27:38 +0000 |
commit | 075f8622776ff04e726e9eb5cef19eb86a92bde1 (patch) | |
tree | bfde95c8b7d8e8589cabc484b2cc01553f7f4b55 /util/simple-gettext.c | |
parent | * gpgkeys_ldap.c (get_key): Some compilers (RISC OS, HPUX c89) don't like (diff) | |
download | gnupg-075f8622776ff04e726e9eb5cef19eb86a92bde1.tar.gz gnupg-075f8622776ff04e726e9eb5cef19eb86a92bde1.zip |
* w32reg.c (read_w32_registry_string): Handle REG_EXPAND_SZ.
Suggested by Ryan Malayter.
* strgutil.c (ascii_strcasecmp): Replaced by code from gnulib.
(ascii_strncasecmp): New.
Diffstat (limited to 'util/simple-gettext.c')
-rw-r--r-- | util/simple-gettext.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/util/simple-gettext.c b/util/simple-gettext.c index db229437d..d9c676f50 100644 --- a/util/simple-gettext.c +++ b/util/simple-gettext.c @@ -28,7 +28,7 @@ #include <config.h> #ifdef USE_SIMPLE_GETTEXT #if !defined (__MINGW32__) && !defined (__CYGWIN32__) - #error This file can only be used with MingW32 or Cygwin32 +#error This file can only be used with MingW32 or Cygwin32 #endif #include <stdio.h> @@ -247,12 +247,21 @@ set_gettext_file( const char *filename ) else { /* relative path - append ".mo" and get dir from the environment */ char *buf = NULL; char *dir; + char *p; dir = read_w32_registry_string( NULL, "Control Panel\\Mingw32\\NLS", "MODir" ); if( dir && (buf=malloc(strlen(dir)+strlen(filename)+1+3+1)) ) { - strcpy(stpcpy(stpcpy(stpcpy( buf, dir),"/"), filename),".mo"); + strcpy(stpcpy(stpcpy(stpcpy( buf, dir),"\\"), filename),".mo"); + /* Better make sure that we don't mix forward and + backward slashes. It seems that some Windoze + versions don't accept this. */ + for (p=buf; *p; p++) + { + if (*p == '/') + *p = '\\'; + } domain = load_domain( buf ); free(buf); } |