gconf r2698 - in trunk: . gconf
- From: tml svn gnome org
- To: svn-commits-list gnome org
- Subject: gconf r2698 - in trunk: . gconf
- Date: Thu, 25 Sep 2008 20:24:01 +0000 (UTC)
Author: tml
Date: Thu Sep 25 20:24:00 2008
New Revision: 2698
URL: http://svn.gnome.org/viewvc/gconf?rev=2698&view=rev
Log:
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.
Modified:
trunk/ChangeLog
trunk/gconf/dllmain.c
Modified: trunk/gconf/dllmain.c
==============================================================================
--- trunk/gconf/dllmain.c (original)
+++ trunk/gconf/dllmain.c Thu Sep 25 20:24:00 2008
@@ -68,11 +68,10 @@
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 @@
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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]