libgnome r3836 - in trunk: . libgnome



Author: tml
Date: Thu Sep 25 20:27:29 2008
New Revision: 3836
URL: http://svn.gnome.org/viewvc/libgnome?rev=3836&view=rev

Log:
2008-09-25  Tor Lillqvist  <tml novell com>

	* libgnome/dllmain.c (gnome_win32_get_prefixes): Drop the Win9x
	code path. There is no Win9x support any more lower in the stack
	anyway.



Modified:
   trunk/ChangeLog
   trunk/libgnome/dllmain.c

Modified: trunk/libgnome/dllmain.c
==============================================================================
--- trunk/libgnome/dllmain.c	(original)
+++ trunk/libgnome/dllmain.c	Thu Sep 25 20:27:29 2008
@@ -111,31 +111,21 @@
         *full_prefix = NULL;
         *cp_prefix = NULL;
 
-        if (G_WIN32_HAVE_WIDECHAR_API ()) {
-                /* NT-based Windows has wide char API */
-                if (GetModuleFileNameW ((HMODULE) 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)) &&
-                            /* Short pathnames always contain only
-                             * ASCII, I think, but just in case, be
-                             * prepared.
-                             */
-                            WideCharToMultiByte (CP_ACP, 0, wcbfr, -1,
-                                                 cpbfr, G_N_ELEMENTS (cpbfr),
-                                                 NULL, NULL))
-                                *cp_prefix = g_strdup (cpbfr);
-                        else if (*full_prefix)
-                                *cp_prefix = g_locale_from_utf8 (*full_prefix, -1,
-                                                                 NULL, NULL, NULL);
-                }
-        } else {
-                /* Win9x */
-                if (GetModuleFileNameA ((HMODULE) hmodule, cpbfr, G_N_ELEMENTS (cpbfr))) {
-                        *full_prefix = g_locale_to_utf8 (cpbfr, -1,
-                                                         NULL, NULL, NULL);
+        if (GetModuleFileNameW ((HMODULE) 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)) &&
+                    /* Short pathnames always contain only
+                     * ASCII, I think, but just in case, be
+                     * prepared.
+                     */
+                    WideCharToMultiByte (CP_ACP, 0, wcbfr, -1,
+                                         cpbfr, G_N_ELEMENTS (cpbfr),
+                                         NULL, NULL))
                         *cp_prefix = g_strdup (cpbfr);
-                }
+                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]