+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)
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;
}
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.
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;
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)
{
guint
g_direct_hash(gpointer key)
{
- return (guint) key;
+ return GPOINTER_TO_UINT (key);
}
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...");
list = clist->selection;
while (list)
{
- if ((gint) list->data >= row)
+ if (GPOINTER_TO_INT (list->data) >= row)
switch (mode)
{
case SYNC_INSERT:
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))
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))
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;
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))
{
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))
{
{
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);
{
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);
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]);
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)
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 */
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));
}
}
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);
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);
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);
/* ...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));
}
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);
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)
{
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;
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);
}
}
}
- if (!stat (rc_file->canonical_name, &statbuf))
+ if (!lstat (rc_file->canonical_name, &statbuf))
{
gint fd;
}
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)
*/
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include "gtk.h"
#include "../gdk/gdk.h"
#include "../gdk/gdkx.h"
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
gtk_signal_connect (GTK_OBJECT (label),
"parent_set",
GTK_SIGNAL_FUNC (set_parent_signal),
- (GtkObject*) 42);
+ GINT_TO_POINTER (42));
gtk_widget_show (label);
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:
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:
list = GTK_CLIST (widget)->selection;
while (list)
{
- g_print (" %d ", (gint) list->data);
+ g_print (" %d ", GPOINTER_TO_INT (list->data));
list = list->next;
}
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:
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:
list = GTK_CLIST (widget)->selection;
while (list)
{
- g_print (" %d ", (gint) list->data);
+ g_print (" %d ", GPOINTER_TO_INT (list->data));
list = list->next;
}
*/
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include "gtk.h"
#include "../gdk/gdk.h"
#include "../gdk/gdkx.h"
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
gtk_signal_connect (GTK_OBJECT (label),
"parent_set",
GTK_SIGNAL_FUNC (set_parent_signal),
- (GtkObject*) 42);
+ GINT_TO_POINTER (42));
gtk_widget_show (label);
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:
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:
list = GTK_CLIST (widget)->selection;
while (list)
{
- g_print (" %d ", (gint) list->data);
+ g_print (" %d ", GPOINTER_TO_INT (list->data));
list = list->next;
}
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:
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:
list = GTK_CLIST (widget)->selection;
while (list)
{
- g_print (" %d ", (gint) list->data);
+ g_print (" %d ", GPOINTER_TO_INT (list->data));
list = list->next;
}