]> Pileus Git - ~andy/gtk/blobdiff - gdk/x11/gdkim-x11.c
Fix string offsets.
[~andy/gtk] / gdk / x11 / gdkim-x11.c
index 263b149f196c59b9ea99a5b70dd209ea17cdc3c5..0ee7356531530ded634d775fb90d80a68acdde08 100644 (file)
  * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
  */
 
+#include <config.h>
+
 #include <locale.h>
 #include <stdlib.h>
+#include <string.h>
 
 #include "gdkx.h"
 #include "gdk.h"               /* For gdk_flush() */
 #include "gdkpixmap.h"
 #include "gdkinternals.h"
 #include "gdkdisplay-x11.h"
-
-#if HAVE_CONFIG_H
-#  include <config.h>
-#  if STDC_HEADERS
-#    include <string.h>
-#  endif
-#endif
+#include "gdkalias.h"
 
 
 /* If this variable is FALSE, it indicates that we should
@@ -69,7 +66,7 @@ _gdk_x11_initialize_locale (void)
     g_warning ("locale not supported by Xlib");
   
   if (!XSetLocaleModifiers (""))
-    g_warning ("can not set locale modifiers");
+    g_warning ("cannot set locale modifiers");
 
   if ((strcmp (current_locale, "C")) && (strcmp (current_locale, "POSIX")))
     {
@@ -112,7 +109,7 @@ gdk_set_locale (void)
 }
 
 static GdkDisplay *
-find_a_display ()
+find_a_display (void)
 {
   GdkDisplay *display = gdk_display_get_default ();
 
@@ -163,11 +160,15 @@ gdk_wcstombs (const GdkWChar *src)
        }
       else
        {
-         if (XwcTextListToTextProperty (xdisplay, (wchar_t**)&src, 1,
+         wchar_t *tmp;
+         
+         if (XwcTextListToTextProperty (xdisplay, &tmp, 1,
                                         XTextStyle, &tpr) != Success)
            {
              return NULL;
            }
+         
+         src = (GdkWChar *)tmp;
        }
       /*
        * We must copy the string into an area allocated by glib, because
@@ -250,3 +251,6 @@ gdk_mbstowcs (GdkWChar *dest, const gchar *src, gint dest_max)
       return i;
     }
 }
+
+#define __GDK_IM_X11_C__
+#include "gdkaliasdef.c"