Re: static correctness



At 20:11 26.10.01 +0200, Tim Janik wrote:
>> [...]
>
>postiong the patch here when asking for aproval won't hurt
>though and might speed up matters.
>
Part Two (Gdk)

	* gdk/gdk.c gdk/gdkevents.c
	  gdk/win32/gdkcolor-win32.c gdk/win32/gdkdnd-win32.c
	  gdk/win32/gdkdrawable-win32.c gdk/win32/gdkevents-win32.c
	  gdk/win32/gdkfont-win32.c gdk/win32/gdkgc-win32.c
	  gdk/win32/gdkim-win32.c gdk/win32/gdkmain-win32.c
	  gdk/win32/gdkpixmap-win32.c gdk/win32/gdkpixmap-win32.h
	  gdk/win32/gdkprivate-win32.h gdk/win32/gdkproperty-win32.c
	  gdk/win32/gdkselection-win32.c gdk/win32/gdkwin32.h
	  gdk/win32/gdkwindow-win32.c gdk/win32/gdkwindow-win32.h
	  gdk/x11/gdkmain-x11.c gdk/x11/gdkpixmap-x11.c
	  gdk/x11/gdkpixmap-x11.h gdk/x11/gdkwindow-x11.c
	  gdk/x11/gdkwindow-x11.h :
	static correct-ness, underscore prefixing of library internal functions


diff --ignore-space-change --exclude-from=c:\util\tool\diff.ign -u -r
from-cvs/gtk+/gdk/gdk.c my-gtk/gtk+/gdk/gdk.c
--- from-cvs/gtk+/gdk/gdk.c	Wed Oct 24 20:28:32 2001
+++ my-gtk/gtk+/gdk/gdk.c	Sat Oct 27 00:31:20 2001
@@ -74,7 +74,7 @@
 
 #endif /* G_ENABLE_DEBUG */
 
-GdkArgContext *
+static GdkArgContext *
 gdk_arg_context_new (gpointer cb_data)
 {
   GdkArgContext *result = g_new (GdkArgContext, 1);
@@ -84,20 +84,20 @@
   return result;
 }
 
-void
+static void
 gdk_arg_context_destroy (GdkArgContext *context)
 {
   g_ptr_array_free (context->tables, TRUE);
   g_free (context);
 }
 
-void
+static void
 gdk_arg_context_add_table (GdkArgContext *context, GdkArgDesc *table)
 {
   g_ptr_array_add (context->tables, table);
 }
 
-void
+static void
 gdk_arg_context_parse (GdkArgContext *context, gint *argc, gchar ***argv)
 {
   int i, j, k;
diff --ignore-space-change --exclude-from=c:\util\tool\diff.ign -u -r
from-cvs/gtk+/gdk/gdkevents.c my-gtk/gtk+/gdk/gdkevents.c
--- from-cvs/gtk+/gdk/gdkevents.c	Fri Oct 05 18:46:54 2001
+++ my-gtk/gtk+/gdk/gdkevents.c	Sat Oct 27 01:12:28 2001
@@ -881,7 +881,7 @@
   return event;
 }
 
-void
+static void
 gdk_synthesize_click (GdkEvent *event,
 		      gint	nclicks)
 {
diff --ignore-space-change --exclude-from=c:\util\tool\diff.ign -u -r
from-cvs/gtk+/gdk/win32/gdkcolor-win32.c
my-gtk/gtk+/gdk/win32/gdkcolor-win32.c
--- from-cvs/gtk+/gdk/win32/gdkcolor-win32.c	Thu Sep 20 20:12:52 2001
+++ my-gtk/gtk+/gdk/win32/gdkcolor-win32.c	Sat Oct 27 00:41:56 2001
@@ -1471,7 +1471,7 @@
 
 #define MIN_SYNC_TIME 2
 
-void
+static void
 gdk_colormap_sync (GdkColormap *colormap,
 		   gboolean     force)
 {
diff --ignore-space-change --exclude-from=c:\util\tool\diff.ign -u -r
from-cvs/gtk+/gdk/win32/gdkdnd-win32.c my-gtk/gtk+/gdk/win32/gdkdnd-win32.c
--- from-cvs/gtk+/gdk/win32/gdkdnd-win32.c	Thu Sep 13 21:27:22 2001
+++ my-gtk/gtk+/gdk/win32/gdkdnd-win32.c	Sat Oct 27 15:26:26 2001
@@ -1007,7 +1007,7 @@
 	    }
 	  g_string_append (result, "\015\012");
 	}
-      gdk_sel_prop_store (_gdk_parent_root, text_uri_list_atom, 8,
+      _gdk_selection_property_store (_gdk_parent_root, text_uri_list_atom, 8,
 			  result->str, result->len + 1);
 
       DragFinish (hdrop);
@@ -1050,7 +1050,7 @@
 }      
 
 void
-gdk_win32_dnd_exit (void)
+_gdk_win32_dnd_exit (void)
 {
 #ifdef OLE2_DND
   OleUninitialize ();
diff --ignore-space-change --exclude-from=c:\util\tool\diff.ign -u -r
from-cvs/gtk+/gdk/win32/gdkdrawable-win32.c
my-gtk/gtk+/gdk/win32/gdkdrawable-win32.c
--- from-cvs/gtk+/gdk/win32/gdkdrawable-win32.c	Sat Sep 15 18:52:24 2001
+++ my-gtk/gtk+/gdk/win32/gdkdrawable-win32.c	Sat Oct 27 15:35:02 2001
@@ -238,7 +238,7 @@
       && (gc_private->values_mask & GDK_GC_TILE)    
       && (gc_private->values_mask & GDK_GC_FILL))
     {
-      gdk_win32_draw_tiles (drawable, gc, gc_private->tile, x, y, width,
height);
+      _gdk_win32_draw_tiles (drawable, gc, gc_private->tile, x, y, width,
height);
       return;
     }
 
@@ -537,15 +537,15 @@
     {
       /* For single characters, don't try to interpret as UTF-8. */
       wc = (guchar) text[0];
-      gdk_wchar_text_handle (font, &wc, 1, gdk_draw_text_handler, &arg);
+      _gdk_wchar_text_handle (font, &wc, 1, gdk_draw_text_handler, &arg);
     }
   else
     {
       wcstr = g_new (wchar_t, text_length);
-      if ((wlen = gdk_nmbstowchar_ts (wcstr, text, text_length,
text_length)) == -1)
-	g_warning ("gdk_win32_draw_text: gdk_nmbstowchar_ts failed");
+      if ((wlen = _gdk_win32_nmbstowchar_ts (wcstr, text, text_length,
text_length)) == -1)
+	g_warning ("gdk_win32_draw_text: _gdk_win32_nmbstowchar_ts failed");
       else
-	gdk_wchar_text_handle (font, wcstr, wlen, gdk_draw_text_handler, &arg);
+	_gdk_wchar_text_handle (font, wcstr, wlen, gdk_draw_text_handler, &arg);
       g_free (wcstr);
     }
 
@@ -589,7 +589,7 @@
   else
     wcstr = (wchar_t *) text;
 
-  gdk_wchar_text_handle (font, wcstr, text_length,
+  _gdk_wchar_text_handle (font, wcstr, text_length,
 			 gdk_draw_text_handler, &arg);
 
   if (sizeof (wchar_t) != sizeof (GdkWChar))
@@ -758,7 +758,7 @@
 }
 
 void
-gdk_win32_draw_tiles (GdkDrawable *drawable,
+_gdk_win32_draw_tiles (GdkDrawable *drawable,
 		      GdkGC       *gc,
 		      GdkPixmap   *tile,
 		      gint        x_from,
@@ -809,7 +809,7 @@
 
   hdc = gdk_win32_hdc_get (drawable, gc, 0);
   
-  fg = gdk_colormap_color (impl->colormap, gc_private->foreground);
+  fg = _gdk_win32_colormap_color (impl->colormap, gc_private->foreground);
 
   GDK_NOTE (MISC, g_print ("gdk_draw_points: %#x %dx%.06x\n",
 			   (guint) GDK_DRAWABLE_IMPL_WIN32 (drawable)->handle,
diff --ignore-space-change --exclude-from=c:\util\tool\diff.ign -u -r
from-cvs/gtk+/gdk/win32/gdkevents-win32.c
my-gtk/gtk+/gdk/win32/gdkevents-win32.c
--- from-cvs/gtk+/gdk/win32/gdkevents-win32.c	Sat Sep 15 18:11:42 2001
+++ my-gtk/gtk+/gdk/win32/gdkevents-win32.c	Sat Oct 27 01:18:14 2001
@@ -270,19 +270,19 @@
 }
 
 LRESULT CALLBACK
-gdk_window_procedure (HWND   hwnd,
+_gdk_win32_window_procedure (HWND   hwnd,
 		      UINT   message,
 		      WPARAM wparam,
 		      LPARAM lparam)
 {
   LRESULT retval;
 
-  GDK_NOTE (MISC, g_print ("gdk_window_procedure: %#lx %s\n",
+  GDK_NOTE (MISC, g_print ("_gdk_win32_window_procedure: %#lx %s\n",
 			     (gulong) hwnd, gdk_win32_message_name (message)));
 
   retval = real_window_procedure (hwnd, message, wparam, lparam);
 
-  GDK_NOTE (MISC, g_print ("gdk_window_procedure: %#lx returns %ld\n",
+  GDK_NOTE (MISC, g_print ("_gdk_win32_window_procedure: %#lx returns %ld\n",
 			     (gulong) hwnd, retval));
 
   return retval;
@@ -2589,7 +2589,7 @@
 
       if (GDK_WINDOW_OBJECT (window)->bg_pixmap == NULL)
 	{
-	  bg = gdk_colormap_color (GDK_DRAWABLE_IMPL_WIN32 (GDK_WINDOW_OBJECT
(window)->impl)->colormap,
+	  bg = _gdk_win32_colormap_color (GDK_DRAWABLE_IMPL_WIN32
(GDK_WINDOW_OBJECT (window)->impl)->colormap,
 				   GDK_WINDOW_OBJECT (window)->bg_color.pixel);
 
 	  GetClipBox (hdc, &rect);
diff --ignore-space-change --exclude-from=c:\util\tool\diff.ign -u -r
from-cvs/gtk+/gdk/win32/gdkfont-win32.c my-gtk/gtk+/gdk/win32/gdkfont-win32.c
--- from-cvs/gtk+/gdk/win32/gdkfont-win32.c	Thu Aug 09 22:29:08 2001
+++ my-gtk/gtk+/gdk/win32/gdkfont-win32.c	Sat Oct 27 15:24:10 2001
@@ -1791,7 +1791,7 @@
 }
 
 void
-gdk_wchar_text_handle (GdkFont       *font,
+_gdk_wchar_text_handle (GdkFont       *font,
 		       const wchar_t *wcstr,
 		       int            wclen,
 		       void         (*handler)(GdkWin32SingleFont *,
@@ -1812,7 +1812,7 @@
 
   g_assert (private->base.ref_count > 0);
 
-  GDK_NOTE (MISC, g_print ("gdk_wchar_text_handle: "));
+  GDK_NOTE (MISC, g_print ("_gdk_wchar_text_handle: "));
 
   while (wcp < end)
     {
@@ -1901,14 +1901,14 @@
       /* For single characters, don't try to interpret as UTF-8.
        */
       wcstr[0] = (guchar) text[0];
-      gdk_wchar_text_handle (font, wcstr, 1, gdk_text_size_handler, arg);
+      _gdk_wchar_text_handle (font, wcstr, 1, gdk_text_size_handler, arg);
     }
   else
     {
-      if ((wlen = gdk_nmbstowchar_ts (wcstr, text, text_length,
text_length)) == -1)
-	g_warning ("gdk_text_size: gdk_nmbstowchar_ts failed");
+      if ((wlen = _gdk_win32_nmbstowchar_ts (wcstr, text, text_length,
text_length)) == -1)
+	g_warning ("gdk_text_size: _gdk_win32_nmbstowchar_ts failed");
       else
-	gdk_wchar_text_handle (font, wcstr, wlen, gdk_text_size_handler, arg);
+	_gdk_wchar_text_handle (font, wcstr, wlen, gdk_text_size_handler, arg);
     }
 
   g_free (wcstr);
@@ -1959,7 +1959,7 @@
 
   arg.total.cx = arg.total.cy = 0;
 
-  gdk_wchar_text_handle (font, wcstr, text_length,
+  _gdk_wchar_text_handle (font, wcstr, text_length,
 			 gdk_text_size_handler, &arg);
 
   if (sizeof (wchar_t) != sizeof (GdkWChar))
@@ -2008,14 +2008,14 @@
   if (text_length == 1)
     {
       wcstr[0] = (guchar) text[0];
-      gdk_wchar_text_handle (font, wcstr, 1, gdk_text_size_handler, &arg);
+      _gdk_wchar_text_handle (font, wcstr, 1, gdk_text_size_handler, &arg);
     }
   else
     {
-      if ((wlen = gdk_nmbstowchar_ts (wcstr, text, text_length,
text_length)) == -1)
-	g_warning ("gdk_text_extents: gdk_nmbstowchar_ts failed");
+      if ((wlen = _gdk_win32_nmbstowchar_ts (wcstr, text, text_length,
text_length)) == -1)
+	g_warning ("gdk_text_extents: _gdk_win32_nmbstowchar_ts failed");
       else
-	gdk_wchar_text_handle (font, wcstr, wlen, gdk_text_size_handler, &arg);
+	_gdk_wchar_text_handle (font, wcstr, wlen, gdk_text_size_handler, &arg);
     }
 
   g_free (wcstr);
@@ -2079,7 +2079,7 @@
 
   arg.total.cx = arg.total.cy = 0;
 
-  gdk_wchar_text_handle (font, wcstr, text_length,
+  _gdk_wchar_text_handle (font, wcstr, text_length,
 			 gdk_text_size_handler, &arg);
 
   if (sizeof (wchar_t) != sizeof (GdkWChar))
diff --ignore-space-change --exclude-from=c:\util\tool\diff.ign -u -r
from-cvs/gtk+/gdk/win32/gdkgc-win32.c my-gtk/gtk+/gdk/win32/gdkgc-win32.c
--- from-cvs/gtk+/gdk/win32/gdkgc-win32.c	Thu Sep 13 21:27:26 2001
+++ my-gtk/gtk+/gdk/win32/gdkgc-win32.c	Sat Oct 27 14:47:52 2001
@@ -51,7 +51,7 @@
 static gpointer parent_class = NULL;
 
 GType
-gdk_gc_win32_get_type (void)
+_gdk_gc_win32_get_type (void)
 {
   static GType object_type = 0;
 
@@ -495,7 +495,7 @@
    */
   g_return_val_if_fail (GDK_IS_DRAWABLE_IMPL_WIN32 (drawable), NULL);
 
-  gc = g_object_new (gdk_gc_win32_get_type (), NULL);
+  gc = g_object_new (_gdk_gc_win32_get_type (), NULL);
   win32_gc = GDK_GC_WIN32 (gc);
 
   win32_gc->hdc = NULL;
@@ -820,7 +820,7 @@
 static guint bitmask[9] = { 0, 1, 3, 7, 15, 31, 63, 127, 255 };
 
 COLORREF
-gdk_colormap_color (GdkColormap *colormap,
+_gdk_win32_colormap_color (GdkColormap *colormap,
 		    gulong       pixel)
 {
   const GdkVisual *visual;
@@ -916,7 +916,7 @@
 	}
     }
 
-  fg = gdk_colormap_color (colormap, win32_gc->foreground);
+  fg = _gdk_win32_colormap_color (colormap, win32_gc->foreground);
 
   if (SetTextColor (win32_gc->hdc, fg) == CLR_INVALID)
     WIN32_GDI_FAILED ("SetTextColor"), *ok = FALSE;
@@ -955,7 +955,7 @@
     WIN32_GDI_FAILED ("SelectObject"), *ok = FALSE;
 }  
 
-void
+static void
 predraw_set_background (GdkGC       *gc,
 			GdkColormap *colormap,
 			gboolean    *ok)
@@ -964,7 +964,7 @@
 
   if (win32_gc->values_mask & GDK_GC_BACKGROUND)
     {
-      COLORREF bg = gdk_colormap_color (colormap, win32_gc->background);
+      COLORREF bg = _gdk_win32_colormap_color (colormap,
win32_gc->background);
 
       if (SetBkColor (win32_gc->hdc, bg) == CLR_INVALID)
         WIN32_GDI_FAILED ("SetBkColor"), *ok = FALSE;
diff --ignore-space-change --exclude-from=c:\util\tool\diff.ign -u -r
from-cvs/gtk+/gdk/win32/gdkim-win32.c my-gtk/gtk+/gdk/win32/gdkim-win32.c
--- from-cvs/gtk+/gdk/win32/gdkim-win32.c	Sat Mar 10 11:44:46 2001
+++ my-gtk/gtk+/gdk/win32/gdkim-win32.c	Sat Oct 27 15:02:08 2001
@@ -166,7 +166,7 @@
  */
 
 /* First a helper function for not zero-terminated strings */
-gint
+static gint
 gdk_nmbstowcs (GdkWChar    *dest,
 	       const gchar *src,
 	       gint         src_len,
@@ -252,7 +252,7 @@
 /* A version that converts to wchar_t wide chars */
 
 gint
-gdk_nmbstowchar_ts (wchar_t     *dest,
+_gdk_win32_nmbstowchar_ts (wchar_t     *dest,
 		    const gchar *src,
 		    gint         src_len,
 		    gint         dest_max)
diff --ignore-space-change --exclude-from=c:\util\tool\diff.ign -u -r
from-cvs/gtk+/gdk/win32/gdkmain-win32.c my-gtk/gtk+/gdk/win32/gdkmain-win32.c
--- from-cvs/gtk+/gdk/win32/gdkmain-win32.c	Thu Sep 13 21:27:26 2001
+++ my-gtk/gtk+/gdk/win32/gdkmain-win32.c	Sat Oct 27 15:27:30 2001
@@ -95,7 +95,7 @@
   gdk_win32_dropfiles_atom = gdk_atom_intern ("DROPFILES_DND", FALSE);
   gdk_ole2_dnd_atom = gdk_atom_intern ("OLE2_DND", FALSE);
 
-  gdk_win32_selection_init ();
+  _gdk_win32_selection_init ();
 
   return TRUE;
 }
@@ -243,14 +243,14 @@
 void
 _gdk_windowing_exit (void)
 {
-  gdk_win32_dnd_exit ();
+  _gdk_win32_dnd_exit ();
   CoUninitialize ();
   DeleteDC (gdk_display_hdc);
   gdk_display_hdc = NULL;
 }
 
 gchar *
-gdk_get_display(void)
+gdk_get_display (void)
 {
   return "Win32";
 }
diff --ignore-space-change --exclude-from=c:\util\tool\diff.ign -u -r
from-cvs/gtk+/gdk/win32/gdkpixmap-win32.c
my-gtk/gtk+/gdk/win32/gdkpixmap-win32.c
--- from-cvs/gtk+/gdk/win32/gdkpixmap-win32.c	Fri Oct 26 13:25:14 2001
+++ my-gtk/gtk+/gdk/win32/gdkpixmap-win32.c	Sat Oct 27 15:10:10 2001
@@ -46,7 +46,7 @@
 static gpointer parent_class = NULL;
 
 GType
-gdk_pixmap_impl_win32_get_type (void)
+_gdk_pixmap_impl_win32_get_type (void)
 {
   static GType object_type = 0;
 
@@ -76,7 +76,7 @@
 GType
 _gdk_pixmap_impl_get_type (void)
 {
-  return gdk_pixmap_impl_win32_get_type ();
+  return _gdk_pixmap_impl_win32_get_type ();
 }
 
 static void
diff --ignore-space-change --exclude-from=c:\util\tool\diff.ign -u -r
from-cvs/gtk+/gdk/win32/gdkpixmap-win32.h
my-gtk/gtk+/gdk/win32/gdkpixmap-win32.h
--- from-cvs/gtk+/gdk/win32/gdkpixmap-win32.h	Sun Jul 23 03:18:34 2000
+++ my-gtk/gtk+/gdk/win32/gdkpixmap-win32.h	Sat Oct 27 15:29:54 2001
@@ -40,7 +40,7 @@
 typedef struct _GdkPixmapImplWin32 GdkPixmapImplWin32;
 typedef struct _GdkPixmapImplWin32Class GdkPixmapImplWin32Class;
 
-#define GDK_TYPE_PIXMAP_IMPL_WIN32
(gdk_pixmap_impl_win32_get_type ())
+#define GDK_TYPE_PIXMAP_IMPL_WIN32
(_gdk_pixmap_impl_win32_get_type ())
 #define GDK_PIXMAP_IMPL_WIN32(object)
(G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_PIXMAP_IMPL_WIN32,
GdkPixmapImplWin32))
 #define GDK_PIXMAP_IMPL_WIN32_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST
((klass), GDK_TYPE_PIXMAP_IMPL_WIN32, GdkPixmapImplWin32Class))
 #define GDK_IS_PIXMAP_IMPL_WIN32(object)
(G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PIXMAP_IMPL_WIN32))
@@ -63,7 +63,7 @@
 
 };
 
-GType gdk_pixmap_impl_win32_get_type (void);
+GType _gdk_pixmap_impl_win32_get_type (void);
  
 #ifdef __cplusplus
 }
diff --ignore-space-change --exclude-from=c:\util\tool\diff.ign -u -r
from-cvs/gtk+/gdk/win32/gdkprivate-win32.h
my-gtk/gtk+/gdk/win32/gdkprivate-win32.h
--- from-cvs/gtk+/gdk/win32/gdkprivate-win32.h	Thu Sep 13 21:27:28 2001
+++ my-gtk/gtk+/gdk/win32/gdkprivate-win32.h	Sat Oct 27 15:34:32 2001
@@ -44,7 +44,7 @@
                                     GdkRectangle  *area);
 
 /* gdkdrawable-win32.c, background draw helper */
-void gdk_win32_draw_tiles (GdkDrawable *drawable,
+void _gdk_win32_draw_tiles (GdkDrawable *drawable,
                            GdkGC       *gc,
                            GdkPixmap   *tile,
                            gint        x, 
@@ -52,8 +52,8 @@
                            gint        width, 
                            gint        height);
 
-void gdk_win32_selection_init (void);
-void gdk_win32_dnd_exit (void);
+void _gdk_win32_selection_init (void);
+void _gdk_win32_dnd_exit (void);
 
 void	 gdk_win32_handle_table_insert    (HANDLE   *handle,
 					   gpointer data);
@@ -69,29 +69,27 @@
 				gint            width,
 				gint            height);
 
-COLORREF gdk_colormap_color      (GdkColormap        *colormap,
+COLORREF _gdk_win32_colormap_color      (GdkColormap        *colormap,
 				  gulong              pixel);
 
 HRGN	 BitmapToRegion          (HBITMAP hBmp);
 
 gchar  *gdk_font_full_name_get   (GdkFont *font);
 
-void    gdk_sel_prop_store       (GdkWindow *owner,
+void    _gdk_selection_property_store (GdkWindow *owner,
 				  GdkAtom    type,
 				  gint       format,
 				  guchar    *data,
 				  gint       length);
 
-gint    gdk_nmbstowcs            (GdkWChar    *dest,
-				  const gchar *src,
-				  gint         src_len,
-				  gint         dest_max);
-gint    gdk_nmbstowchar_ts       (wchar_t     *dest,
+void    _gdk_selection_property_delete (GdkWindow *);
+
+gint    _gdk_win32_nmbstowchar_ts (wchar_t     *dest,
 				  const gchar *src,
 				  gint         src_len,
 				  gint         dest_max);
 
-void    gdk_wchar_text_handle    (GdkFont       *font,
+void    _gdk_wchar_text_handle    (GdkFont       *font,
 				  const wchar_t *wcstr,
 				  int            wclen,
 				  void         (*handler)(GdkWin32SingleFont *,
@@ -131,7 +129,7 @@
 #define OTHER_API_FAILED(api) gdk_other_api_failed (__FILE__, __LINE__, api)
 #endif
  
-extern LRESULT CALLBACK gdk_window_procedure (HWND, UINT, WPARAM, LPARAM);
+extern LRESULT CALLBACK _gdk_win32_window_procedure (HWND, UINT, WPARAM,
LPARAM);
 
 extern HWND		 gdk_root_window;
 extern gboolean		 gdk_event_func_from_window_proc;
diff --ignore-space-change --exclude-from=c:\util\tool\diff.ign -u -r
from-cvs/gtk+/gdk/win32/gdkproperty-win32.c
my-gtk/gtk+/gdk/win32/gdkproperty-win32.c
--- from-cvs/gtk+/gdk/win32/gdkproperty-win32.c	Fri Oct 26 13:19:34 2001
+++ my-gtk/gtk+/gdk/win32/gdkproperty-win32.c	Sat Oct 27 15:21:54 2001
@@ -222,7 +222,6 @@
 		     GdkAtom    property)
 {
   gchar *prop_name;
-  extern void gdk_selection_property_delete (GdkWindow *);
 
   g_return_if_fail (window != NULL);
   g_return_if_fail (GDK_IS_WINDOW (window));
@@ -235,7 +234,7 @@
 	     g_free (prop_name)));
 
   if (property == _gdk_selection_property)
-    gdk_selection_property_delete (window);
+    _gdk_selection_property_delete (window);
   else
     g_warning ("gdk_property_delete: General case not implemented");
 }
diff --ignore-space-change --exclude-from=c:\util\tool\diff.ign -u -r
from-cvs/gtk+/gdk/win32/gdkselection-win32.c
my-gtk/gtk+/gdk/win32/gdkselection-win32.c
--- from-cvs/gtk+/gdk/win32/gdkselection-win32.c	Thu Sep 13 21:27:28 2001
+++ my-gtk/gtk+/gdk/win32/gdkselection-win32.c	Sat Oct 27 15:27:56 2001
@@ -49,14 +49,14 @@
 static GHashTable *sel_prop_table = NULL;
 
 void
-gdk_win32_selection_init (void)
+_gdk_win32_selection_init (void)
 {
   if (sel_prop_table == NULL)
     sel_prop_table = g_hash_table_new (g_int_hash, g_int_equal);
 }
 
 void
-gdk_sel_prop_store (GdkWindow *owner,
+_gdk_selection_property_store (GdkWindow *owner,
 		    GdkAtom    type,
 		    gint       format,
 		    guchar    *data,
@@ -98,7 +98,7 @@
     {
       if (!owner)
         return FALSE;
-      gdk_sel_prop_store (owner, selection, 0, 0, 0);
+      _gdk_selection_property_store (owner, selection, 0, 0, 0);
       return TRUE;
     }
 
@@ -278,7 +278,7 @@
 		  p++;
 		}
 	      *datap++ = '\0';
-	      gdk_sel_prop_store (requestor, GDK_TARGET_STRING, 8,
+	      _gdk_selection_property_store (requestor, GDK_TARGET_STRING, 8,
 				  data, strlen (data) + 1);
 	      
 	      GlobalUnlock (hdata);
@@ -308,7 +308,7 @@
 	{
 	  g_hash_table_remove (sel_prop_table,
 			       &GDK_WINDOW_HWND (_gdk_parent_root));
-	  gdk_sel_prop_store (requestor, prop->type, prop->format,
+	  _gdk_selection_property_store (requestor, prop->type, prop->format,
 			      prop->data, prop->length);
 	  g_free (prop);
 	  SendMessage (GDK_WINDOW_HWND (requestor), gdk_selection_notify_msg,
selection, target);
@@ -356,7 +356,7 @@
 }
 
 void
-gdk_selection_property_delete (GdkWindow *window)
+_gdk_selection_property_delete (GdkWindow *window)
 {
   GdkSelProp *prop;
   
diff --ignore-space-change --exclude-from=c:\util\tool\diff.ign -u -r
from-cvs/gtk+/gdk/win32/gdkwin32.h my-gtk/gtk+/gdk/win32/gdkwin32.h
--- from-cvs/gtk+/gdk/win32/gdkwin32.h	Wed Oct 24 20:28:36 2001
+++ my-gtk/gtk+/gdk/win32/gdkwin32.h	Sat Oct 27 14:44:20 2001
@@ -291,7 +291,7 @@
 typedef struct _GdkGCWin32      GdkGCWin32;
 typedef struct _GdkGCWin32Class GdkGCWin32Class;
 
-#define GDK_TYPE_GC_WIN32              (gdk_gc_win32_get_type ())
+#define GDK_TYPE_GC_WIN32              (_gdk_gc_win32_get_type ())
 #define GDK_GC_WIN32(object)           (G_TYPE_CHECK_INSTANCE_CAST
((object), GDK_TYPE_GC_WIN32, GdkGCWin32))
 #define GDK_GC_WIN32_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass),
GDK_TYPE_GC_WIN32, GdkGCWin32Class))
 #define GDK_IS_GC_WIN32(object)        (G_TYPE_CHECK_INSTANCE_TYPE
((object), GDK_TYPE_GC_WIN32))
diff --ignore-space-change --exclude-from=c:\util\tool\diff.ign -u -r
from-cvs/gtk+/gdk/win32/gdkwindow-win32.c
my-gtk/gtk+/gdk/win32/gdkwindow-win32.c
--- from-cvs/gtk+/gdk/win32/gdkwindow-win32.c	Wed Oct 24 20:28:38 2001
+++ my-gtk/gtk+/gdk/win32/gdkwindow-win32.c	Sat Oct 27 15:38:06 2001
@@ -53,7 +53,7 @@
 static gpointer parent_class = NULL;
 
 GType
-gdk_window_impl_win32_get_type (void)
+_gdk_window_impl_win32_get_type (void)
 {
   static GType object_type = 0;
 
@@ -83,7 +83,7 @@
 GType
 _gdk_window_impl_get_type (void)
 {
-  return gdk_window_impl_win32_get_type ();
+  return _gdk_window_impl_win32_get_type ();
 }
 
 static void
@@ -253,7 +253,7 @@
 /* The Win API function AdjustWindowRect may return negative values
  * resulting in obscured title bars. This helper function is coreccting it.
  */
-BOOL
+static BOOL
 SafeAdjustWindowRectEx (RECT* lpRect,
 			DWORD dwStyle, 
 			BOOL  bMenu, 
@@ -284,7 +284,7 @@
  *   is ever needed (e.g Dialog specific), every such window should
  *   get its own class
  */
-ATOM
+static ATOM
 RegisterGdkClass (GdkWindowType wtype)
 {
   static ATOM klassTOPLEVEL = 0;
@@ -299,7 +299,7 @@
   wcl.style = 0; /* DON'T set CS_<H,V>REDRAW. It causes total redraw
                   * on WM_SIZE and WM_MOVE. Flicker, Performance!
                   */
-  wcl.lpfnWndProc = gdk_window_procedure;
+  wcl.lpfnWndProc = _gdk_win32_window_procedure;
   wcl.cbClsExtra = 0;
   wcl.cbWndExtra = 0;
   wcl.hInstance = gdk_app_hmodule;
diff --ignore-space-change --exclude-from=c:\util\tool\diff.ign -u -r
from-cvs/gtk+/gdk/win32/gdkwindow-win32.h
my-gtk/gtk+/gdk/win32/gdkwindow-win32.h
--- from-cvs/gtk+/gdk/win32/gdkwindow-win32.h	Tue Jul 25 19:31:04 2000
+++ my-gtk/gtk+/gdk/win32/gdkwindow-win32.h	Sat Oct 27 15:38:32 2001
@@ -58,7 +58,7 @@
 typedef struct _GdkWindowImplWin32 GdkWindowImplWin32;
 typedef struct _GdkWindowImplWin32Class GdkWindowImplWin32Class;
 
-#define GDK_TYPE_WINDOW_IMPL_WIN32
(gdk_window_impl_win32_get_type ())
+#define GDK_TYPE_WINDOW_IMPL_WIN32
(_gdk_window_impl_win32_get_type ())
 #define GDK_WINDOW_IMPL_WIN32(object)
(G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_WINDOW_IMPL_WIN32,
GdkWindowImplWin32))
 #define GDK_WINDOW_IMPL_WIN32_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST
((klass), GDK_TYPE_WINDOW_IMPL_WIN32, GdkWindowImplWin32Class))
 #define GDK_IS_WINDOW_IMPL_WIN32(object)
(G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_WINDOW_IMPL_WIN32))
@@ -97,7 +97,7 @@
 
 };
 
-GType gdk_window_impl_win32_get_type (void);
+GType _gdk_window_impl_win32_get_type (void);
 
 #ifdef __cplusplus
 }
Only in my-gtk/gtk+/gdk/win32/rc: gdk.rc
diff --ignore-space-change --exclude-from=c:\util\tool\diff.ign -u -r
from-cvs/gtk+/gdk/x11/gdkmain-x11.c my-gtk/gtk+/gdk/x11/gdkmain-x11.c
--- from-cvs/gtk+/gdk/x11/gdkmain-x11.c	Sat Oct 27 01:40:00 2001
+++ my-gtk/gtk+/gdk/x11/gdkmain-x11.c	Wed Oct 24 20:28:40 2001
@@ -115,7 +115,7 @@
 {
   XKeyboardState keyboard_state;
   XClassHint *class_hint;
-  gulong pid;
+  guint pid;
 
   _gdk_x11_initialize_locale ();
   
diff --ignore-space-change --exclude-from=c:\util\tool\diff.ign -u -r
from-cvs/gtk+/gdk/x11/gdkpixmap-x11.c my-gtk/gtk+/gdk/x11/gdkpixmap-x11.c
--- from-cvs/gtk+/gdk/x11/gdkpixmap-x11.c	Wed Oct 24 20:28:40 2001
+++ my-gtk/gtk+/gdk/x11/gdkpixmap-x11.c	Sat Oct 27 15:11:32 2001
@@ -62,7 +62,7 @@
 static gpointer parent_class = NULL;
 
 static GType
-gdk_pixmap_impl_x11_get_type (void)
+_gdk_pixmap_impl_x11_get_type (void)
 {
   static GType object_type = 0;
 
diff --ignore-space-change --exclude-from=c:\util\tool\diff.ign -u -r
from-cvs/gtk+/gdk/x11/gdkpixmap-x11.h my-gtk/gtk+/gdk/x11/gdkpixmap-x11.h
--- from-cvs/gtk+/gdk/x11/gdkpixmap-x11.h	Thu Sep 13 21:27:40 2001
+++ my-gtk/gtk+/gdk/x11/gdkpixmap-x11.h	Sat Oct 27 15:11:44 2001
@@ -40,7 +40,7 @@
 typedef struct _GdkPixmapImplX11 GdkPixmapImplX11;
 typedef struct _GdkPixmapImplX11Class GdkPixmapImplX11Class;
 
-#define GDK_TYPE_PIXMAP_IMPL_X11
(gdk_pixmap_impl_x11_get_type ())
+#define GDK_TYPE_PIXMAP_IMPL_X11
(_gdk_pixmap_impl_x11_get_type ())
 #define GDK_PIXMAP_IMPL_X11(object)           (G_TYPE_CHECK_INSTANCE_CAST
((object), GDK_TYPE_PIXMAP_IMPL_X11, GdkPixmapImplX11))
 #define GDK_PIXMAP_IMPL_X11_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST
((klass), GDK_TYPE_PIXMAP_IMPL_X11, GdkPixmapImplX11Class))
 #define GDK_IS_PIXMAP_IMPL_X11(object)        (G_TYPE_CHECK_INSTANCE_TYPE
((object), GDK_TYPE_PIXMAP_IMPL_X11))
diff --ignore-space-change --exclude-from=c:\util\tool\diff.ign -u -r
from-cvs/gtk+/gdk/x11/gdkwindow-x11.c my-gtk/gtk+/gdk/x11/gdkwindow-x11.c
--- from-cvs/gtk+/gdk/x11/gdkwindow-x11.c	Sat Oct 27 01:40:02 2001
+++ my-gtk/gtk+/gdk/x11/gdkwindow-x11.c	Sat Oct 27 15:39:08 2001
@@ -96,7 +96,7 @@
 static gpointer parent_class = NULL;
 
 GType
-gdk_window_impl_x11_get_type (void)
+_gdk_window_impl_x11_get_type (void)
 {
   static GType object_type = 0;
 
@@ -126,7 +126,7 @@
 GType
 _gdk_window_impl_get_type (void)
 {
-  return gdk_window_impl_x11_get_type ();
+  return _gdk_window_impl_x11_get_type ();
 }
 
 static void
@@ -337,7 +337,7 @@
   unsigned int class;
   char *title;
   int i;
-  long pid;
+  int pid;
   
   g_return_val_if_fail (attributes != NULL, NULL);
   
@@ -2763,9 +2763,9 @@
 gdk_window_set_icon_list (GdkWindow *window,
 			  GList     *pixbufs)
 {
-  gulong *data;
+  guint *data;
   guchar *pixels;
-  gulong *p;
+  guint *p;
   gint size;
   GList *l;
   GdkPixbuf *pixbuf;
@@ -2794,7 +2794,7 @@
       l = g_list_next (l);
     }
 
-  data = g_malloc (size * sizeof (gulong));
+  data = g_malloc (size*4);
 
   l = pixbufs;
   p = data;
diff --ignore-space-change --exclude-from=c:\util\tool\diff.ign -u -r
from-cvs/gtk+/gdk/x11/gdkwindow-x11.h my-gtk/gtk+/gdk/x11/gdkwindow-x11.h
--- from-cvs/gtk+/gdk/x11/gdkwindow-x11.h	Fri Apr 20 13:42:32 2001
+++ my-gtk/gtk+/gdk/x11/gdkwindow-x11.h	Sat Oct 27 15:36:56 2001
@@ -57,7 +57,7 @@
 typedef struct _GdkWindowImplX11 GdkWindowImplX11;
 typedef struct _GdkWindowImplX11Class GdkWindowImplX11Class;
 
-#define GDK_TYPE_WINDOW_IMPL_X11
(gdk_window_impl_x11_get_type ())
+#define GDK_TYPE_WINDOW_IMPL_X11
(_gdk_window_impl_x11_get_type ())
 #define GDK_WINDOW_IMPL_X11(object)           (G_TYPE_CHECK_INSTANCE_CAST
((object), GDK_TYPE_WINDOW_IMPL_X11, GdkWindowImplX11))
 #define GDK_WINDOW_IMPL_X11_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST
((klass), GDK_TYPE_WINDOW_IMPL_X11, GdkWindowImplX11Class))
 #define GDK_IS_WINDOW_IMPL_X11(object)        (G_TYPE_CHECK_INSTANCE_TYPE
((object), GDK_TYPE_WINDOW_IMPL_X11))
@@ -96,7 +96,7 @@
 
 };
 
-GType gdk_window_impl_x11_get_type (void);
+GType _gdk_window_impl_x11_get_type (void);
 
 #ifdef __cplusplus
 }

-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to 
get along without it.                -- Dilbert



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]