Commit 43dfe74c authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

Fixed up a stat() that Sopwith missed when changing stat => lstat.

Tue May 12 19:37:55 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtkrc.c (gtk_rc_parse_file): Fixed up a stat()
	that Sopwith missed when changing stat => lstat.

Tue May 12 19:19:29 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtkinputdialog.c gtk/gtkgamma.c gtk/gtkrc.c
	  gtk/gtkcolorsel.c gtk/gtkclist.c gtk/testgtk.c: Use
	GPOINTER_TO_INT/GINT_TO_POINTER macros where appropriate.

	* gdk/gdk.c: Print sizeof() results
	as g_print("%ld", (glong)sizeof(foo)), to deal with
	sizeof() being long on Alpha's.

	* gtk/testgtk.c: include <string.h> for strlen

Tue May 12 19:22:58 1998  Owen Taylor  <otaylor@gtk.org>

 	* glib/glib.h: Added macros G[U]INT_TO_POINTER() and
	GPOINTER_TO_[U]INT for storing small integers integers
	inside pointers.

	* glib/testglib.c: Print sizeof() results
	as g_print("%ld", (glong)sizeof(foo)), to deal with
	size_t being long on Alpha's.
parent eae7b32f
Tue May 12 19:37:55 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkrc.c (gtk_rc_parse_file): Fixed up a stat()
that Sopwith missed when changing stat => lstat.
Tue May 12 19:19:29 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkinputdialog.c gtk/gtkgamma.c gtk/gtkrc.c
gtk/gtkcolorsel.c gtk/gtkclist.c gtk/testgtk.c: Use
GPOINTER_TO_INT/GINT_TO_POINTER macros where appropriate.
* gdk/gdk.c: Print sizeof() results
as g_print("%ld", (glong)sizeof(foo)), to deal with
sizeof() being long on Alpha's.
* gtk/testgtk.c: include <string.h> for strlen
Tue May 12 16:56:35 1998 Owen Taylor <otaylor@gtk.org>
(James A <jamesa@demon.net> : gtk-jamesa-980511-4.patch)
......
Tue May 12 19:37:55 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkrc.c (gtk_rc_parse_file): Fixed up a stat()
that Sopwith missed when changing stat => lstat.
Tue May 12 19:19:29 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkinputdialog.c gtk/gtkgamma.c gtk/gtkrc.c
gtk/gtkcolorsel.c gtk/gtkclist.c gtk/testgtk.c: Use
GPOINTER_TO_INT/GINT_TO_POINTER macros where appropriate.
* gdk/gdk.c: Print sizeof() results
as g_print("%ld", (glong)sizeof(foo)), to deal with
sizeof() being long on Alpha's.
* gtk/testgtk.c: include <string.h> for strlen
Tue May 12 16:56:35 1998 Owen Taylor <otaylor@gtk.org>
(James A <jamesa@demon.net> : gtk-jamesa-980511-4.patch)
......
Tue May 12 19:37:55 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkrc.c (gtk_rc_parse_file): Fixed up a stat()
that Sopwith missed when changing stat => lstat.
Tue May 12 19:19:29 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkinputdialog.c gtk/gtkgamma.c gtk/gtkrc.c
gtk/gtkcolorsel.c gtk/gtkclist.c gtk/testgtk.c: Use
GPOINTER_TO_INT/GINT_TO_POINTER macros where appropriate.
* gdk/gdk.c: Print sizeof() results
as g_print("%ld", (glong)sizeof(foo)), to deal with
sizeof() being long on Alpha's.
* gtk/testgtk.c: include <string.h> for strlen
Tue May 12 16:56:35 1998 Owen Taylor <otaylor@gtk.org>
(James A <jamesa@demon.net> : gtk-jamesa-980511-4.patch)
......
Tue May 12 19:37:55 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkrc.c (gtk_rc_parse_file): Fixed up a stat()
that Sopwith missed when changing stat => lstat.
Tue May 12 19:19:29 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkinputdialog.c gtk/gtkgamma.c gtk/gtkrc.c
gtk/gtkcolorsel.c gtk/gtkclist.c gtk/testgtk.c: Use
GPOINTER_TO_INT/GINT_TO_POINTER macros where appropriate.
* gdk/gdk.c: Print sizeof() results
as g_print("%ld", (glong)sizeof(foo)), to deal with
sizeof() being long on Alpha's.
* gtk/testgtk.c: include <string.h> for strlen
Tue May 12 16:56:35 1998 Owen Taylor <otaylor@gtk.org>
(James A <jamesa@demon.net> : gtk-jamesa-980511-4.patch)
......
Tue May 12 19:37:55 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkrc.c (gtk_rc_parse_file): Fixed up a stat()
that Sopwith missed when changing stat => lstat.
Tue May 12 19:19:29 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkinputdialog.c gtk/gtkgamma.c gtk/gtkrc.c
gtk/gtkcolorsel.c gtk/gtkclist.c gtk/testgtk.c: Use
GPOINTER_TO_INT/GINT_TO_POINTER macros where appropriate.
* gdk/gdk.c: Print sizeof() results
as g_print("%ld", (glong)sizeof(foo)), to deal with
sizeof() being long on Alpha's.
* gtk/testgtk.c: include <string.h> for strlen
Tue May 12 16:56:35 1998 Owen Taylor <otaylor@gtk.org>
(James A <jamesa@demon.net> : gtk-jamesa-980511-4.patch)
......
Tue May 12 19:37:55 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkrc.c (gtk_rc_parse_file): Fixed up a stat()
that Sopwith missed when changing stat => lstat.
Tue May 12 19:19:29 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkinputdialog.c gtk/gtkgamma.c gtk/gtkrc.c
gtk/gtkcolorsel.c gtk/gtkclist.c gtk/testgtk.c: Use
GPOINTER_TO_INT/GINT_TO_POINTER macros where appropriate.
* gdk/gdk.c: Print sizeof() results
as g_print("%ld", (glong)sizeof(foo)), to deal with
sizeof() being long on Alpha's.
* gtk/testgtk.c: include <string.h> for strlen
Tue May 12 16:56:35 1998 Owen Taylor <otaylor@gtk.org>
(James A <jamesa@demon.net> : gtk-jamesa-980511-4.patch)
......
Tue May 12 19:37:55 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkrc.c (gtk_rc_parse_file): Fixed up a stat()
that Sopwith missed when changing stat => lstat.
Tue May 12 19:19:29 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkinputdialog.c gtk/gtkgamma.c gtk/gtkrc.c
gtk/gtkcolorsel.c gtk/gtkclist.c gtk/testgtk.c: Use
GPOINTER_TO_INT/GINT_TO_POINTER macros where appropriate.
* gdk/gdk.c: Print sizeof() results
as g_print("%ld", (glong)sizeof(foo)), to deal with
sizeof() being long on Alpha's.
* gtk/testgtk.c: include <string.h> for strlen
Tue May 12 16:56:35 1998 Owen Taylor <otaylor@gtk.org>
(James A <jamesa@demon.net> : gtk-jamesa-980511-4.patch)
......
......@@ -4005,8 +4005,8 @@ gdk_dnd_check_types (GdkWindow *window,
if (realfmt != (sizeof(Atom) * 8))
{
g_warning("XdeTypelist property had format of %d instead of the expected %d, on window %#lx\n",
realfmt, sizeof(Atom) * 8, xevent->xclient.data.l[0]);
g_warning("XdeTypelist property had format of %d instead of the expected %ld, on window %#lx\n",
realfmt, (glong)sizeof(Atom) * 8, xevent->xclient.data.l[0]);
return 0;
}
......
......@@ -4005,8 +4005,8 @@ gdk_dnd_check_types (GdkWindow *window,
if (realfmt != (sizeof(Atom) * 8))
{
g_warning("XdeTypelist property had format of %d instead of the expected %d, on window %#lx\n",
realfmt, sizeof(Atom) * 8, xevent->xclient.data.l[0]);
g_warning("XdeTypelist property had format of %d instead of the expected %ld, on window %#lx\n",
realfmt, (glong)sizeof(Atom) * 8, xevent->xclient.data.l[0]);
return 0;
}
......
Tue May 12 16:54:15 1998 Owen Taylor <otaylor@gtk.org>
Tue May 12 19:22:58 1998 Owen Taylor <otaylor@gtk.org>
* glib/glib.h: Added macros G[U]INT_TO_POINTER() and
GPOINTER_TO_[U]INT for storing small integers integers
inside pointers.
* glib/testglib.c: Print sizeof() results
as g_print("%ld", (glong)sizeof(foo)), to deal with
size_t being long on Alpha's.
( James A <jamesa@demon.net> : gtk-jamesa-980511-4.patch)
Tue May 12 16:54:15 1998 Owen Taylor <otaylor@gtk.org>
(James A <jamesa@demon.net> : gtk-jamesa-980511-4.patch)
* glib.h gstring.c gmessages.c: Added some missing
const to arguments.
......
......@@ -361,6 +361,28 @@ typedef signed long gint32;
typedef unsigned long guint32;
#endif /* SIZEOF_INT */
/* Define macros for storing integers inside pointers */
#if (SIZEOF_INT == SIZEOF_VOID_P)
#define GPOINTER_TO_INT(p) ((gint)(p))
#define GPOINTER_TO_UINT(p) ((guint)(p))
#define GINT_TO_POINTER(i) ((gpointer)(i))
#define GUINT_TO_POINTER(u) ((gpointer)(u))
#elif (SIZEOF_LONG == SIZEOF_VOID_P)
#define GPOINTER_TO_INT(p) ((gint)(glong)(p))
#define GPOINTER_TO_UINT(p) ((guint)(gulong)(p))
#define GINT_TO_POINTER(i) ((gpointer)(glong)(i))
#define GUINT_TO_POINTER(u) ((gpointer)(gulong)(u))
#else
#error "No integer type of the same size as a pointer"
#endif
typedef struct _GList GList;
typedef struct _GSList GSList;
......
......@@ -170,7 +170,7 @@ g_string_chunk_insert_const (GStringChunk *fchunk,
if (!chunk->const_table)
chunk->const_table = g_hash_table_new (g_str_hash, g_str_equal);
lookup = (char*) g_hash_table_lookup (chunk->const_table, string);
lookup = (char*) g_hash_table_lookup (chunk->const_table, (gchar *)string);
if (!lookup)
{
......
......@@ -823,6 +823,6 @@ g_parse_debug_string (const gchar *string,
guint
g_direct_hash(gpointer key)
{
return (guint) key;
return GPOINTER_TO_UINT (key);
}
......@@ -108,9 +108,9 @@ main (int argc,
GTree *tree;
char chars[62];
g_print ("checking size of gint8...%d (should be 1)\n", sizeof (gint8));
g_print ("checking size of gint16...%d (should be 2)\n", sizeof (gint16));
g_print ("checking size of gint32...%d (should be 4)\n", sizeof (gint32));
g_print ("checking size of gint8...%ld (should be 1)\n", (glong)sizeof (gint8));
g_print ("checking size of gint16...%ld (should be 2)\n", (glong)sizeof (gint16));
g_print ("checking size of gint32...%ld (should be 4)\n", (glong)sizeof (gint32));
g_print ("checking doubly linked lists...");
......
......@@ -1407,7 +1407,7 @@ sync_selection (GtkCList * clist,
list = clist->selection;
while (list)
{
if ((gint) list->data >= row)
if (GPOINTER_TO_INT (list->data) >= row)
switch (mode)
{
case SYNC_INSERT:
......@@ -3075,7 +3075,7 @@ real_select_row (GtkCList * clist,
if (clist_row->state == GTK_STATE_NORMAL)
{
clist_row->state = GTK_STATE_SELECTED;
clist->selection = g_list_append (clist->selection, (gpointer) row);
clist->selection = g_list_append (clist->selection, GINT_TO_POINTER (row));
if (!GTK_CLIST_FROZEN (clist)
&& (gtk_clist_row_is_visible (clist, row) != GTK_VISIBILITY_NONE))
......@@ -3102,7 +3102,7 @@ real_unselect_row (GtkCList * clist,
if (clist_row->state == GTK_STATE_SELECTED)
{
clist_row->state = GTK_STATE_NORMAL;
clist->selection = g_list_remove (clist->selection, (gpointer) row);
clist->selection = g_list_remove (clist->selection, GINT_TO_POINTER (row));
if (!GTK_CLIST_FROZEN (clist)
&& (gtk_clist_row_is_visible (clist, row) != GTK_VISIBILITY_NONE))
......
......@@ -402,11 +402,11 @@ gtk_color_selection_init (GtkColorSelection *colorsel)
gtk_signal_connect_object (GTK_OBJECT (adj), "value_changed",
scale_vals[n].updater, (gpointer) colorsel->scales[n]);
gtk_object_set_data (GTK_OBJECT (colorsel->scales[n]), "_GtkColorSelection", (gpointer) colorsel);
gtk_object_set_data (GTK_OBJECT (colorsel->scales[n]), value_index_key, (gpointer) n);
gtk_object_set_data (GTK_OBJECT (colorsel->scales[n]), value_index_key, GINT_TO_POINTER (n));
gtk_signal_connect_object (GTK_OBJECT (colorsel->entries[n]), "changed",
scale_vals[n].updater, (gpointer) colorsel->entries[n]);
gtk_object_set_data (GTK_OBJECT (colorsel->entries[n]), "_GtkColorSelection", (gpointer) colorsel);
gtk_object_set_data (GTK_OBJECT (colorsel->entries[n]), value_index_key, (gpointer) n);
gtk_object_set_data (GTK_OBJECT (colorsel->entries[n]), value_index_key, GINT_TO_POINTER (n));
}
colorsel->opacity_label = label;
......@@ -664,7 +664,7 @@ gtk_color_selection_hsv_updater (GtkWidget *widget,
if (GTK_WIDGET_DRAWABLE (GTK_WIDGET (widget)))
{
colorsel = (GtkColorSelection*) gtk_object_get_data (GTK_OBJECT (widget), "_GtkColorSelection");
i = (gint) gtk_object_get_data (GTK_OBJECT (widget), value_index_key);
i = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (widget), value_index_key));
if (GTK_IS_SCALE (widget))
{
......@@ -714,7 +714,7 @@ gtk_color_selection_rgb_updater (GtkWidget *widget,
if (GTK_WIDGET_DRAWABLE (GTK_WIDGET (widget)))
{
colorsel = (GtkColorSelection*) gtk_object_get_data (GTK_OBJECT (widget), "_GtkColorSelection");
i = (gint) gtk_object_get_data (GTK_OBJECT (widget), value_index_key);
i = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (widget), value_index_key));
if (GTK_IS_SCALE (widget))
{
......
......@@ -262,7 +262,7 @@ gtk_gamma_curve_init (GtkGammaCurve *curve)
{
curve->button[i] = gtk_toggle_button_new ();
gtk_object_set_data (GTK_OBJECT (curve->button[i]), "_GtkGammaCurveIndex",
(gpointer) (long) i);
GINT_TO_POINTER (i));
gtk_container_add (GTK_CONTAINER (vbox), curve->button[i]);
gtk_signal_connect (GTK_OBJECT (curve->button[i]), "realize",
(GtkSignalFunc) button_realize_callback, 0);
......@@ -276,7 +276,7 @@ gtk_gamma_curve_init (GtkGammaCurve *curve)
{
curve->button[i] = gtk_button_new ();
gtk_object_set_data (GTK_OBJECT (curve->button[i]), "_GtkGammaCurveIndex",
(gpointer) (long) i);
GINT_TO_POINTER (i));
gtk_container_add (GTK_CONTAINER (vbox), curve->button[i]);
gtk_signal_connect (GTK_OBJECT (curve->button[i]), "realize",
(GtkSignalFunc) button_realize_callback, 0);
......@@ -298,7 +298,7 @@ button_realize_callback (GtkWidget *w)
GdkPixmap *pm;
int i;
i = (long) gtk_object_get_data (GTK_OBJECT (w), "_GtkGammaCurveIndex");
i = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (w), "_GtkGammaCurveIndex"));
pm = gdk_pixmap_create_from_xpm_d (w->window, &mask,
&w->style->bg[GTK_STATE_NORMAL], xpm[i]);
......@@ -320,7 +320,7 @@ button_toggled_callback (GtkWidget *w, gpointer data)
if (!GTK_TOGGLE_BUTTON (w)->active)
return;
active = (long) gtk_object_get_data (GTK_OBJECT (w), "_GtkGammaCurveIndex");
active = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (w), "_GtkGammaCurveIndex"));
for (i = 0; i < 3; ++i)
if ((i != active) && GTK_TOGGLE_BUTTON (c->button[i])->active)
......@@ -371,7 +371,7 @@ button_clicked_callback (GtkWidget *w, gpointer data)
GtkGammaCurve *c = data;
int active;
active = (long) gtk_object_get_data (GTK_OBJECT (w), "_GtkGammaCurveIndex");
active = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (w), "_GtkGammaCurveIndex"));
if (active == 3)
{
/* set gamma */
......
......@@ -236,7 +236,7 @@ gtk_input_dialog_init (GtkInputDialog *inputd)
gtk_object_set_user_data (GTK_OBJECT (menuitem), inputd);
gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
(GtkSignalFunc) gtk_input_dialog_set_device,
(gpointer)((long)info->deviceid));
GUINT_TO_POINTER(info->deviceid));
}
}
......@@ -265,7 +265,7 @@ gtk_input_dialog_init (GtkInputDialog *inputd)
gtk_widget_show(menuitem);
gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
(GtkSignalFunc) gtk_input_dialog_set_mapping_mode,
(gpointer)((long)GDK_MODE_DISABLED));
GINT_TO_POINTER (GDK_MODE_DISABLED));
menuitem = gtk_menu_item_new_with_label("Screen");
gtk_menu_append(GTK_MENU(mapping_menu),menuitem);
......@@ -273,7 +273,7 @@ gtk_input_dialog_init (GtkInputDialog *inputd)
gtk_widget_show(menuitem);
gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
(GtkSignalFunc) gtk_input_dialog_set_mapping_mode,
(gpointer)((long)GDK_MODE_SCREEN));
GINT_TO_POINTER (GDK_MODE_SCREEN));
menuitem = gtk_menu_item_new_with_label("Window");
gtk_menu_append(GTK_MENU(mapping_menu),menuitem);
......@@ -281,7 +281,7 @@ gtk_input_dialog_init (GtkInputDialog *inputd)
gtk_widget_show(menuitem);
gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
(GtkSignalFunc) gtk_input_dialog_set_mapping_mode,
(gpointer)((long)GDK_MODE_WINDOW));
GINT_TO_POINTER (GDK_MODE_WINDOW));
label = gtk_label_new("Mode: ");
gtk_box_pack_start (GTK_BOX (util_box), label, FALSE, FALSE, 2);
......@@ -344,8 +344,8 @@ gtk_input_dialog_init (GtkInputDialog *inputd)
/* ...set_device expects to get input dialog from widget user data */
gtk_object_set_user_data (GTK_OBJECT (inputd), inputd);
gtk_input_dialog_set_device(GTK_WIDGET(inputd), (gpointer)((long)
((GdkDeviceInfo *)device_info->data)->deviceid));
gtk_input_dialog_set_device(GTK_WIDGET(inputd),
GUINT_TO_POINTER (((GdkDeviceInfo *)device_info->data)->deviceid));
}
......@@ -385,14 +385,14 @@ gtk_input_dialog_new (void)
static void
gtk_input_dialog_set_device(GtkWidget *widget, gpointer data)
{
guint32 deviceid = (guint32)data;
guint32 deviceid = GPOINTER_TO_UINT(data);
GdkDeviceInfo *info;
GtkInputDialog *inputd = GTK_INPUT_DIALOG(
gtk_object_get_user_data(GTK_OBJECT(widget)));
inputd->current_device = deviceid;
info = gtk_input_dialog_get_device_info((guint32)data);
info = gtk_input_dialog_get_device_info (deviceid);
gtk_input_dialog_fill_axes(inputd, info);
gtk_input_dialog_fill_keys(inputd, info);
......@@ -419,7 +419,7 @@ gtk_input_dialog_set_mapping_mode(GtkWidget *w,
gtk_object_get_user_data(GTK_OBJECT(w)));
GdkDeviceInfo *info = gtk_input_dialog_get_device_info (inputd->current_device);
GdkInputMode old_mode = info->mode;
GdkInputMode mode = (GdkInputMode)data;
GdkInputMode mode = GPOINTER_TO_INT (data);
if (mode != old_mode)
{
......@@ -445,13 +445,13 @@ gtk_input_dialog_set_mapping_mode(GtkWidget *w,
static void
gtk_input_dialog_set_axis(GtkWidget *widget, gpointer data)
{
GdkAxisUse use = (GdkAxisUse)data & 0xFFFF;
GdkAxisUse use = GPOINTER_TO_INT(data) & 0xFFFF;
GdkAxisUse old_use;
GdkAxisUse *new_axes;
GtkInputDialog *inputd = GTK_INPUT_DIALOG (gtk_object_get_user_data (GTK_OBJECT (widget)));
GdkDeviceInfo *info = gtk_input_dialog_get_device_info (inputd->current_device);
gint axis = ((gint)data >> 16) - 1;
gint axis = (GPOINTER_TO_INT(data) >> 16) - 1;
gint old_axis;
int i;
......@@ -558,7 +558,7 @@ gtk_input_dialog_fill_axes(GtkInputDialog *inputd, GdkDeviceInfo *info)
gtk_object_set_user_data (GTK_OBJECT (menu_item), inputd);
gtk_signal_connect (GTK_OBJECT (menu_item), "activate",
(GtkSignalFunc) gtk_input_dialog_set_axis,
(gpointer) ((long) (0x10000 * (j + 1) + i)));
GINT_TO_POINTER (0x10000 * (j + 1) + i));
gtk_widget_show (menu_item);
gtk_menu_append (GTK_MENU (menu), menu_item);
}
......
......@@ -300,7 +300,7 @@ gtk_rc_parse_file (const gchar *filename, gboolean reload)
}
}
if (!stat (rc_file->canonical_name, &statbuf))
if (!lstat (rc_file->canonical_name, &statbuf))
{
gint fd;
......@@ -561,7 +561,7 @@ gtk_rc_parse_any (const gchar *input_name,
}
for (i = 0; i < nsymbols; i++)
g_scanner_add_symbol (scanner, symbols[i].name, (gpointer) symbols[i].token);
g_scanner_add_symbol (scanner, symbols[i].name, GINT_TO_POINTER (symbols[i].token));
done = FALSE;
while (!done)
......
......@@ -18,6 +18,7 @@
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "gtk.h"
#include "../gdk/gdk.h"
#include "../gdk/gdkx.h"
......@@ -1651,7 +1652,7 @@ set_parent_signal (GtkWidget *child,
gtk_type_name (GTK_OBJECT_TYPE (child)),
child->parent ? gtk_type_name (GTK_OBJECT_TYPE (child->parent)) : "NULL",
old_parent ? gtk_type_name (GTK_OBJECT_TYPE (old_parent)) : "NULL",
(gint) func_data);
GPOINTER_TO_INT (func_data));
}
static void
......@@ -1712,7 +1713,7 @@ create_reparent (void)
gtk_signal_connect (GTK_OBJECT (label),
"parent_set",
GTK_SIGNAL_FUNC (set_parent_signal),
(GtkObject*) 42);
GINT_TO_POINTER (42));
gtk_widget_show (label);
......@@ -3067,8 +3068,8 @@ select_clist (GtkWidget *widget,
case GTK_CELL_PIXMAP:
g_print ("CELL %d GTK_CELL_PIXMAP\n", i);
gtk_clist_get_pixmap (GTK_CLIST (widget), row, i, &pixmap, &mask);
g_print ("PIXMAP: %d\n", (int) pixmap);
g_print ("MASK: %d\n", (int) mask);
g_print ("PIXMAP: %p\n", pixmap);
g_print ("MASK: %p\n", mask);
break;
case GTK_CELL_PIXTEXT:
......@@ -3076,8 +3077,8 @@ select_clist (GtkWidget *widget,
gtk_clist_get_pixtext (GTK_CLIST (widget), row, i, &text, &spacing, &pixmap, &mask);
g_print ("TEXT: %s\n", text);
g_print ("SPACING: %d\n", spacing);
g_print ("PIXMAP: %d\n", (int) pixmap);
g_print ("MASK: %d\n", (int) mask);
g_print ("PIXMAP: %p\n", pixmap);
g_print ("MASK: %p\n", mask);
break;
default:
......@@ -3090,7 +3091,7 @@ select_clist (GtkWidget *widget,
list = GTK_CLIST (widget)->selection;
while (list)
{
g_print (" %d ", (gint) list->data);
g_print (" %d ", GPOINTER_TO_INT (list->data));
list = list->next;
}
......@@ -3128,8 +3129,8 @@ unselect_clist (GtkWidget *widget,
case GTK_CELL_PIXMAP:
g_print ("CELL %d GTK_CELL_PIXMAP\n", i);
gtk_clist_get_pixmap (GTK_CLIST (widget), row, i, &pixmap, &mask);
g_print ("PIXMAP: %d\n", (int) pixmap);
g_print ("MASK: %d\n", (int) mask);
g_print ("PIXMAP: %p\n", pixmap);
g_print ("MASK: %p\n", mask);
break;
case GTK_CELL_PIXTEXT:
......@@ -3137,8 +3138,8 @@ unselect_clist (GtkWidget *widget,
gtk_clist_get_pixtext (GTK_CLIST (widget), row, i, &text, &spacing, &pixmap, &mask);
g_print ("TEXT: %s\n", text);
g_print ("SPACING: %d\n", spacing);
g_print ("PIXMAP: %d\n", (int) pixmap);
g_print ("MASK: %d\n", (int) mask);
g_print ("PIXMAP: %p\n", pixmap);
g_print ("MASK: %p\n", mask);
break;
default:
......@@ -3151,7 +3152,7 @@ unselect_clist (GtkWidget *widget,
list = GTK_CLIST (widget)->selection;
while (list)
{
g_print (" %d ", (gint) list->data);
g_print (" %d ", GPOINTER_TO_INT (list->data));
list = list->next;
}
......
......@@ -18,6 +18,7 @@
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "gtk.h"
#include "../gdk/gdk.h"
#include "../gdk/gdkx.h"
......@@ -1651,7 +1652,7 @@ set_parent_signal (GtkWidget *child,
gtk_type_name (GTK_OBJECT_TYPE (child)),
child->parent ? gtk_type_name (GTK_OBJECT_TYPE (child->parent)) : "NULL",
old_parent ? gtk_type_name (GTK_OBJECT_TYPE (old_parent)) : "NULL",
(gint) func_data);
GPOINTER_TO_INT (func_data));
}
static void
......@@ -1712,7 +1713,7 @@ create_reparent (void)
gtk_signal_connect (GTK_OBJECT (label),
"parent_set",
GTK_SIGNAL_FUNC (set_parent_signal),
(GtkObject*) 42);
GINT_TO_POINTER (42));
gtk_widget_show (label);
......@@ -3067,8 +3068,8 @@ select_clist (GtkWidget *widget,
case GTK_CELL_PIXMAP:
g_print ("CELL %d GTK_CELL_PIXMAP\n", i);
gtk_clist_get_pixmap (GTK_CLIST (widget), row, i, &pixmap, &mask);
g_print ("PIXMAP: %d\n", (int) pixmap);
g_print ("MASK: %d\n", (int) mask);
g_print ("PIXMAP: %p\n", pixmap);
g_print ("MASK: %p\n", mask);
break;
case GTK_CELL_PIXTEXT:
......@@ -3076,8 +3077,8 @@ select_clist (GtkWidget *widget,
gtk_clist_get_pixtext (GTK_CLIST (widget), row, i, &text, &spacing, &pixmap, &mask);
g_print ("TEXT: %s\n", text);
g_print ("SPACING: %d\n", spacing);
g_print ("PIXMAP: %d\n", (int) pixmap);
g_print ("MASK: %d\n", (int) mask);
g_print ("PIXMAP: %p\n", pixmap);
g_print ("MASK: %p\n", mask);
break;
default:
......@@ -3090,7 +3091,7 @@ select_clist (GtkWidget *widget,
list = GTK_CLIST (widget)->selection;
while (list)
{
g_print (" %d ", (gint) list->data);
g_print (" %d ", GPOINTER_TO_INT (list->data));
list = list->next;
}
......@@ -3128,8 +3129,8 @@ unselect_clist (GtkWidget *widget,
case GTK_CELL_PIXMAP:
g_print ("CELL %d GTK_CELL_PIXMAP\n", i);
gtk_clist_get_pixmap (GTK_CLIST (widget), row, i, &pixmap, &mask);
g_print ("PIXMAP: %d\n", (int) pixmap);
g_print ("MASK: %d\n", (int) mask);
g_print ("PIXMAP: %p\n", pixmap);
g_print ("MASK: %p\n", mask);
break;
case GTK_CELL_PIXTEXT:
......@@ -3137,8 +3138,8 @@ unselect_clist (GtkWidget *widget,
gtk_clist_get_pixtext (GTK_CLIST (widget), row, i, &text, &spacing, &pixmap, &mask);
g_print ("TEXT: %s\n", text);
g_print ("SPACING: %d\n", spacing);
g_print ("PIXMAP: %d\n", (int) pixmap);
g_print ("MASK: %d\n", (int) mask);
g_print ("PIXMAP: %p\n", pixmap);
g_print ("MASK: %p\n", mask);
break;
default:
......@@ -3151,7 +3152,7 @@ unselect_clist (GtkWidget *widget,
list = GTK_CLIST (widget)->selection;
while (list)
{
g_print (" %d ", (gint) list->data);
g_print (" %d ", GPOINTER_TO_INT (list->data));
list = list->next;
}
......