diff options
author | Tor Lillqvist <tml@novell.com> | 2008-09-25 20:24:00 +0000 |
---|---|---|
committer | Tor Lillqvist <tml@src.gnome.org> | 2008-09-25 20:24:00 +0000 |
commit | cd9c24150cd592af9f12d91959994b1dd3c16b5a (patch) | |
tree | 5569ee7b35a2a2df3f927a4afd93704f5cf65004 | |
parent | 8794682390dc23f6f1aa9bbee5419a81ae64a489 (diff) | |
download | gconf-cd9c24150cd592af9f12d91959994b1dd3c16b5a.tar.gz |
Drop the Win9x code path. There is no Win9x support any more lower in the
2008-09-25 Tor Lillqvist <tml@novell.com>
* gconf/dllmain.c (setup): Drop the Win9x code path. There is no
Win9x support any more lower in the stack anyway.
svn path=/trunk/; revision=2698
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | gconf/dllmain.c | 28 |
2 files changed, 12 insertions, 21 deletions
@@ -1,3 +1,8 @@ +2008-09-25 Tor Lillqvist <tml@novell.com> + + * gconf/dllmain.c (setup): Drop the Win9x code path. There is no + Win9x support any more lower in the stack anyway. + =========================== 2.24.0 =========================== 2008-09-22 Kjartan Maraas <kmaraas@gnome.org> diff --git a/gconf/dllmain.c b/gconf/dllmain.c index 22f724dd..ed9ccd20 100644 --- a/gconf/dllmain.c +++ b/gconf/dllmain.c @@ -68,11 +68,10 @@ DllMain (HINSTANCE hinstDLL, static void setup (void) { - char *full_prefix; + char *full_prefix = NULL; char *cp_prefix; wchar_t wcbfr[1000]; - char cpbfr[1000]; G_LOCK (mutex); if (locale_dir != NULL) @@ -81,26 +80,13 @@ setup (void) return; } - if (G_WIN32_HAVE_WIDECHAR_API ()) + if (GetModuleFileNameW (hmodule, wcbfr, G_N_ELEMENTS (wcbfr))) { - /* NT-based Windows has wide char API */ - if (GetModuleFileNameW (hmodule, wcbfr, G_N_ELEMENTS (wcbfr))) - { - full_prefix = g_utf16_to_utf8 (wcbfr, -1, NULL, NULL, NULL); - if (GetShortPathNameW (wcbfr, wcbfr, G_N_ELEMENTS (wcbfr))) - cp_prefix = g_utf16_to_utf8 (wcbfr, -1, NULL, NULL, NULL); - else if (full_prefix) - cp_prefix = g_locale_from_utf8 (full_prefix, -1, NULL, NULL, NULL); - } - } - else - { - /* Win9x */ - if (GetModuleFileNameA (hmodule, cpbfr, G_N_ELEMENTS (cpbfr))) - { - full_prefix = g_locale_to_utf8 (cpbfr, -1, NULL, NULL, NULL); - cp_prefix = g_strdup (cpbfr); - } + full_prefix = g_utf16_to_utf8 (wcbfr, -1, NULL, NULL, NULL); + if (GetShortPathNameW (wcbfr, wcbfr, G_N_ELEMENTS (wcbfr))) + cp_prefix = g_utf16_to_utf8 (wcbfr, -1, NULL, NULL, NULL); + else if (full_prefix) + cp_prefix = g_locale_from_utf8 (full_prefix, -1, NULL, NULL, NULL); } if (full_prefix != NULL) |