Commit 013e30db authored by Manish Singh's avatar Manish Singh Committed by Manish Singh

app/undo_history.c app/core/gimpbrush.c app/core/gimpimage-new.c

2003-01-05  Manish Singh  <yosh@gimp.org>

        * app/undo_history.c
        * app/core/gimpbrush.c
        * app/core/gimpimage-new.c
        * app/core/gimpobject.c
        * app/core/gimppalette-import.c
        * app/core/gimppattern.c
        * app/plug-in/plug-in.c
        * app/tools/gimpbezierselecttool.c
        * libgimpwidgets/gimpunitmenu.c
        * plug-ins/MapObject/mapobject_ui.c
        * plug-ins/common/convmatrix.c
        * plug-ins/common/curve_bend.c
        * plug-ins/common/sample_colorize.c
        * plug-ins/common/tiff.c
        * plug-ins/flame/flame.c
        * plug-ins/gflare/gflare.c
        * plug-ins/gimpressionist/general.c
        * plug-ins/gimpressionist/orientation.c
        * plug-ins/gimpressionist/preview.c
        * plug-ins/gimpressionist/size.c
        * plug-ins/imagemap/imap_grid.c
        * plug-ins/imagemap/imap_menu.c
        * plug-ins/maze/algorithms.c
        * plug-ins/script-fu/interp_regex.c
        * plug-ins/script-fu/interp_sliba.c
        * plug-ins/script-fu/script-fu-console.c
        * plug-ins/script-fu/script-fu-server.c
        * plug-ins/webbrowser/webbrowser.c: added GINT_TO_POINTER and friends,
        fixed format strings, for 64-bitness.

        * modules/colorsel_triangle.c
        * plug-ins/tools/tool-safe-mode-plug-in.c: #include missing header
        files
parent a817b033
2003-01-05 Manish Singh <yosh@gimp.org>
* app/undo_history.c
* app/core/gimpbrush.c
* app/core/gimpimage-new.c
* app/core/gimpobject.c
* app/core/gimppalette-import.c
* app/core/gimppattern.c
* app/plug-in/plug-in.c
* app/tools/gimpbezierselecttool.c
* libgimpwidgets/gimpunitmenu.c
* plug-ins/MapObject/mapobject_ui.c
* plug-ins/common/convmatrix.c
* plug-ins/common/curve_bend.c
* plug-ins/common/sample_colorize.c
* plug-ins/common/tiff.c
* plug-ins/flame/flame.c
* plug-ins/gflare/gflare.c
* plug-ins/gimpressionist/general.c
* plug-ins/gimpressionist/orientation.c
* plug-ins/gimpressionist/preview.c
* plug-ins/gimpressionist/size.c
* plug-ins/imagemap/imap_grid.c
* plug-ins/imagemap/imap_menu.c
* plug-ins/maze/algorithms.c
* plug-ins/script-fu/interp_regex.c
* plug-ins/script-fu/interp_sliba.c
* plug-ins/script-fu/script-fu-console.c
* plug-ins/script-fu/script-fu-server.c
* plug-ins/webbrowser/webbrowser.c: added GINT_TO_POINTER and friends,
fixed format strings, for 64-bitness.
* modules/colorsel_triangle.c
* plug-ins/tools/tool-safe-mode-plug-in.c: #include missing header
files
2003-01-05 Michael Natterer <mitch@gimp.org> 2003-01-05 Michael Natterer <mitch@gimp.org>
* configure.in: changed --with-gnome-desktop to --with-gnome-datadir * configure.in: changed --with-gnome-desktop to --with-gnome-datadir
......
...@@ -512,7 +512,7 @@ gimp_brush_load_brush (gint fd, ...@@ -512,7 +512,7 @@ gimp_brush_load_brush (gint fd,
{ {
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ, g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Could not read %d bytes from '%s': %s"), _("Could not read %d bytes from '%s': %s"),
sizeof (header), filename, g_strerror (errno)); (gint) sizeof (header), filename, g_strerror (errno));
return NULL; return NULL;
} }
......
...@@ -512,7 +512,7 @@ gimp_brush_load_brush (gint fd, ...@@ -512,7 +512,7 @@ gimp_brush_load_brush (gint fd,
{ {
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ, g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Could not read %d bytes from '%s': %s"), _("Could not read %d bytes from '%s': %s"),
sizeof (header), filename, g_strerror (errno)); (gint) sizeof (header), filename, g_strerror (errno));
return NULL; return NULL;
} }
......
...@@ -111,7 +111,7 @@ gimp_image_new_get_memsize_string (gsize memsize) ...@@ -111,7 +111,7 @@ gimp_image_new_get_memsize_string (gsize memsize)
{ {
if (memsize < 4096) if (memsize < 4096)
{ {
return g_strdup_printf (_("%d Bytes"), memsize); return g_strdup_printf (_("%lu Bytes"), memsize);
} }
else if (memsize < 1024 * 10) else if (memsize < 1024 * 10)
{ {
...@@ -123,7 +123,7 @@ gimp_image_new_get_memsize_string (gsize memsize) ...@@ -123,7 +123,7 @@ gimp_image_new_get_memsize_string (gsize memsize)
} }
else if (memsize < 1024 * 1024) else if (memsize < 1024 * 1024)
{ {
return g_strdup_printf (_("%d KB"), memsize / 1024); return g_strdup_printf (_("%lu KB"), memsize / 1024);
} }
else if (memsize < 1024 * 1024 * 10) else if (memsize < 1024 * 1024 * 10)
{ {
......
...@@ -290,7 +290,7 @@ gimp_object_get_memsize (GimpObject *object) ...@@ -290,7 +290,7 @@ gimp_object_get_memsize (GimpObject *object)
indent_buf[i] = '\0'; indent_buf[i] = '\0';
object_size = g_strdup_printf ("%s%s \"%s\": %d\n", object_size = g_strdup_printf ("%s%s \"%s\": %lu\n",
indent_buf, indent_buf,
g_type_name (G_TYPE_FROM_INSTANCE (object)), g_type_name (G_TYPE_FROM_INSTANCE (object)),
object->name, object->name,
......
...@@ -104,7 +104,8 @@ gimp_palette_import_store_colors (GHashTable *h_array, ...@@ -104,7 +104,8 @@ gimp_palette_import_store_colors (GHashTable *h_array,
} }
else else
{ {
found_color = g_hash_table_lookup (h_array, (gpointer) key_colors); found_color = g_hash_table_lookup (h_array,
GUINT_TO_POINTER (key_colors));
} }
if (found_color == NULL) if (found_color == NULL)
...@@ -127,7 +128,7 @@ gimp_palette_import_store_colors (GHashTable *h_array, ...@@ -127,7 +128,7 @@ gimp_palette_import_store_colors (GHashTable *h_array,
new_color->g = colors[1]; new_color->g = colors[1];
new_color->b = colors[2]; new_color->b = colors[2];
g_hash_table_insert (h_array, (gpointer) key_colors, new_color); g_hash_table_insert (h_array, GUINT_TO_POINTER (key_colors), new_color);
} }
else else
{ {
......
...@@ -309,7 +309,7 @@ gimp_pattern_load (const gchar *filename, ...@@ -309,7 +309,7 @@ gimp_pattern_load (const gchar *filename,
{ {
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ, g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Could not read %d bytes from '%s': %s"), _("Could not read %d bytes from '%s': %s"),
sizeof (header), filename, g_strerror (errno)); (gint) sizeof (header), filename, g_strerror (errno));
goto error; goto error;
} }
......
...@@ -309,7 +309,7 @@ gimp_pattern_load (const gchar *filename, ...@@ -309,7 +309,7 @@ gimp_pattern_load (const gchar *filename,
{ {
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ, g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Could not read %d bytes from '%s': %s"), _("Could not read %d bytes from '%s': %s"),
sizeof (header), filename, g_strerror (errno)); (gint) sizeof (header), filename, g_strerror (errno));
goto error; goto error;
} }
......
...@@ -1655,7 +1655,7 @@ plug_in_flush (GIOChannel *channel, ...@@ -1655,7 +1655,7 @@ plug_in_flush (GIOChannel *channel,
GIOStatus status; GIOStatus status;
GError *error = NULL; GError *error = NULL;
gint count; gint count;
guint bytes; gsize bytes;
plug_in = (PlugIn *) user_data; plug_in = (PlugIn *) user_data;
......
...@@ -1655,7 +1655,7 @@ plug_in_flush (GIOChannel *channel, ...@@ -1655,7 +1655,7 @@ plug_in_flush (GIOChannel *channel,
GIOStatus status; GIOStatus status;
GError *error = NULL; GError *error = NULL;
gint count; gint count;
guint bytes; gsize bytes;
plug_in = (PlugIn *) user_data; plug_in = (PlugIn *) user_data;
......
...@@ -1655,7 +1655,7 @@ plug_in_flush (GIOChannel *channel, ...@@ -1655,7 +1655,7 @@ plug_in_flush (GIOChannel *channel,
GIOStatus status; GIOStatus status;
GError *error = NULL; GError *error = NULL;
gint count; gint count;
guint bytes; gsize bytes;
plug_in = (PlugIn *) user_data; plug_in = (PlugIn *) user_data;
......
...@@ -1655,7 +1655,7 @@ plug_in_flush (GIOChannel *channel, ...@@ -1655,7 +1655,7 @@ plug_in_flush (GIOChannel *channel,
GIOStatus status; GIOStatus status;
GError *error = NULL; GError *error = NULL;
gint count; gint count;
guint bytes; gsize bytes;
plug_in = (PlugIn *) user_data; plug_in = (PlugIn *) user_data;
......
...@@ -1655,7 +1655,7 @@ plug_in_flush (GIOChannel *channel, ...@@ -1655,7 +1655,7 @@ plug_in_flush (GIOChannel *channel,
GIOStatus status; GIOStatus status;
GError *error = NULL; GError *error = NULL;
gint count; gint count;
guint bytes; gsize bytes;
plug_in = (PlugIn *) user_data; plug_in = (PlugIn *) user_data;
......
...@@ -1655,7 +1655,7 @@ plug_in_flush (GIOChannel *channel, ...@@ -1655,7 +1655,7 @@ plug_in_flush (GIOChannel *channel,
GIOStatus status; GIOStatus status;
GError *error = NULL; GError *error = NULL;
gint count; gint count;
guint bytes; gsize bytes;
plug_in = (PlugIn *) user_data; plug_in = (PlugIn *) user_data;
......
...@@ -1655,7 +1655,7 @@ plug_in_flush (GIOChannel *channel, ...@@ -1655,7 +1655,7 @@ plug_in_flush (GIOChannel *channel,
GIOStatus status; GIOStatus status;
GError *error = NULL; GError *error = NULL;
gint count; gint count;
guint bytes; gsize bytes;
plug_in = (PlugIn *) user_data; plug_in = (PlugIn *) user_data;
......
...@@ -1655,7 +1655,7 @@ plug_in_flush (GIOChannel *channel, ...@@ -1655,7 +1655,7 @@ plug_in_flush (GIOChannel *channel,
GIOStatus status; GIOStatus status;
GError *error = NULL; GError *error = NULL;
gint count; gint count;
guint bytes; gsize bytes;
plug_in = (PlugIn *) user_data; plug_in = (PlugIn *) user_data;
......
...@@ -1655,7 +1655,7 @@ plug_in_flush (GIOChannel *channel, ...@@ -1655,7 +1655,7 @@ plug_in_flush (GIOChannel *channel,
GIOStatus status; GIOStatus status;
GError *error = NULL; GError *error = NULL;
gint count; gint count;
guint bytes; gsize bytes;
plug_in = (PlugIn *) user_data; plug_in = (PlugIn *) user_data;
......
...@@ -3460,7 +3460,7 @@ bezier_stroke (GimpBezierSelectTool *bezier_sel, ...@@ -3460,7 +3460,7 @@ bezier_stroke (GimpBezierSelectTool *bezier_sel,
procedural_db_run_proc (gdisp->gimage->gimp, procedural_db_run_proc (gdisp->gimage->gimp,
pdb_string, pdb_string,
&nreturn_vals, &nreturn_vals,
GIMP_PDB_DRAWABLE, (GimpDrawable *) gimp_item_get_ID (GIMP_ITEM (drawable)), GIMP_PDB_DRAWABLE, gimp_item_get_ID (GIMP_ITEM (drawable)),
GIMP_PDB_INT32, (gint32) rpnts->num_stroke_points * 2, GIMP_PDB_INT32, (gint32) rpnts->num_stroke_points * 2,
GIMP_PDB_FLOATARRAY, rpnts->stroke_points, GIMP_PDB_FLOATARRAY, rpnts->stroke_points,
GIMP_PDB_END); GIMP_PDB_END);
......
...@@ -428,7 +428,7 @@ undo_history_set_pixmap (GtkCList *clist, ...@@ -428,7 +428,7 @@ undo_history_set_pixmap (GtkCList *clist,
{ {
static idle_preview_args idle; static idle_preview_args idle;
if (!size || ((gint)gtk_clist_get_row_data (clist, row)) == 2) if (!size || (GPOINTER_TO_INT (gtk_clist_get_row_data (clist, row))) == 2)
return; return;
idle.clist = clist; idle.clist = clist;
......
...@@ -295,7 +295,7 @@ gimp_object_get_memsize (GimpObject *object) ...@@ -295,7 +295,7 @@ gimp_object_get_memsize (GimpObject *object)
indent_buf[i] = '\0'; indent_buf[i] = '\0';
object_size = g_strdup_printf ("%s%s \"%s\": %d\n", object_size = g_strdup_printf ("%s%s \"%s\": %lu\n",
indent_buf, indent_buf,
g_type_name (G_TYPE_FROM_INSTANCE (object)), g_type_name (G_TYPE_FROM_INSTANCE (object)),
object->name, object->name,
......
...@@ -630,7 +630,8 @@ gimp_unit_menu_callback (GtkWidget *widget, ...@@ -630,7 +630,8 @@ gimp_unit_menu_callback (GtkWidget *widget,
GimpUnit new_unit; GimpUnit new_unit;
gum = data; gum = data;
new_unit = (guint) g_object_get_data (G_OBJECT (widget), "gimp_unit_menu"); new_unit = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (widget),
"gimp_unit_menu"));
if (gum->unit == new_unit) if (gum->unit == new_unit)
return; return;
......
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
#include "config.h" #include "config.h"
#include <stdlib.h>
#ifdef __GNUC__ #ifdef __GNUC__
#warning GTK_DISABLE_DEPRECATED #warning GTK_DISABLE_DEPRECATED
#endif #endif
......
...@@ -387,7 +387,7 @@ box_drawable_callback (gint32 id, ...@@ -387,7 +387,7 @@ box_drawable_callback (gint32 id,
{ {
gint i; gint i;
i = (gint) g_object_get_data (G_OBJECT (data), "_mapwid_id"); i = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (data), "_mapwid_id"));
mapvals.boxmap_id[i] = id; mapvals.boxmap_id[i] = id;
} }
...@@ -410,7 +410,7 @@ cylinder_drawable_callback (gint32 id, ...@@ -410,7 +410,7 @@ cylinder_drawable_callback (gint32 id,
{ {
gint i; gint i;
i = (gint) g_object_get_data (G_OBJECT (data), "_mapwid_id"); i = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (data), "_mapwid_id"));
mapvals.cylindermap_id[i] = id; mapvals.cylindermap_id[i] = id;
} }
......
...@@ -831,7 +831,7 @@ static void ...@@ -831,7 +831,7 @@ static void
my_bmode_callback (GtkWidget *widget, my_bmode_callback (GtkWidget *widget,
gpointer data) gpointer data)
{ {
my_config.bmode = (int) data - 1; my_config.bmode = GPOINTER_TO_INT (data) - 1;
} }
static gint static gint
...@@ -1010,7 +1010,7 @@ dialog (void) ...@@ -1010,7 +1010,7 @@ dialog (void)
g_signal_connect (G_OBJECT (button), "toggled", g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (my_bmode_callback), G_CALLBACK (my_bmode_callback),
(gpointer) (i + 1)); GINT_TO_POINTER (i + 1));
} }
gtk_widget_show (box); gtk_widget_show (box);
......
...@@ -2832,8 +2832,8 @@ void ...@@ -2832,8 +2832,8 @@ void
p_end_gdrw (t_GDRW *gdrw) p_end_gdrw (t_GDRW *gdrw)
{ {
if(gb_debug) if(gb_debug)
printf ("\np_end_gdrw: drawable %x ID: %d\n", printf ("\np_end_gdrw: drawable %p ID: %d\n",
(int)gdrw->drawable, (int)gdrw->drawable->drawable_id); gdrw->drawable, (int)gdrw->drawable->drawable_id);
if(gdrw->tile) if(gdrw->tile)
{ {
...@@ -2858,7 +2858,7 @@ p_init_gdrw (t_GDRW *gdrw, ...@@ -2858,7 +2858,7 @@ p_init_gdrw (t_GDRW *gdrw,
gint32 l_sel_channel_id; gint32 l_sel_channel_id;
gint l_offsetx, l_offsety; gint l_offsetx, l_offsety;
if(gb_debug) printf("\np_init_gdrw: drawable %x ID: %d\n", (int)drawable, (int)drawable->drawable_id); if(gb_debug) printf("\np_init_gdrw: drawable %p ID: %d\n", drawable, (int)drawable->drawable_id);
gdrw->drawable = drawable; gdrw->drawable = drawable;
gdrw->tile = NULL; gdrw->tile = NULL;
......
...@@ -507,7 +507,7 @@ p_smp_toggle_callback (GtkWidget *widget, ...@@ -507,7 +507,7 @@ p_smp_toggle_callback (GtkWidget *widget,
void void
p_gradient_callback(GtkWidget *w, gint32 id) p_gradient_callback(GtkWidget *w, gint32 id)
{ {
if(g_Sdebug) printf("GRADIENT_MENU_CB: wiget %x, id: %d\n", (int)w, (int)id); if(g_Sdebug) printf("GRADIENT_MENU_CB: widget %p, id: %d\n", w, (int)id);
if((id == SMP_GRADIENT) || (id == SMP_INV_GRADIENT)) if((id == SMP_GRADIENT) || (id == SMP_INV_GRADIENT))
{ {
...@@ -527,7 +527,7 @@ p_smp_menu_callback(gint32 id, gpointer data) ...@@ -527,7 +527,7 @@ p_smp_menu_callback(gint32 id, gpointer data)
{ {
gint32 *id_ptr; gint32 *id_ptr;
if(g_Sdebug) printf("MENU_CB: data %x, dst: %x, samp %x\n", (int)data, (int)&g_values.sample_id, (int)&g_values.dst_id); if(g_Sdebug) printf("MENU_CB: data %p, dst: %x, samp %x\n", data, (int)&g_values.sample_id, (int)&g_values.dst_id);
if((id_ptr = (gint32 *)data) != NULL) if((id_ptr = (gint32 *)data) != NULL)
{ {
...@@ -2590,7 +2590,7 @@ p_end_gdrw(t_GDRW *gdrw) ...@@ -2590,7 +2590,7 @@ p_end_gdrw(t_GDRW *gdrw)
{ {
t_GDRW *l_sel_gdrw; t_GDRW *l_sel_gdrw;
if(g_Sdebug) printf("\np_end_gdrw: drawable %x ID: %d\n", (int)gdrw->drawable, (int)gdrw->drawable->drawable_id); if(g_Sdebug) printf("\np_end_gdrw: drawable %p ID: %d\n", gdrw->drawable, (int)gdrw->drawable->drawable_id);
if(gdrw->tile) if(gdrw->tile)
{ {
...@@ -2628,7 +2628,7 @@ p_init_gdrw(t_GDRW *gdrw, GimpDrawable *drawable, gint dirty, gint shadow) ...@@ -2628,7 +2628,7 @@ p_init_gdrw(t_GDRW *gdrw, GimpDrawable *drawable, gint dirty, gint shadow)
t_GDRW *l_sel_gdrw; t_GDRW *l_sel_gdrw;
gint32 non_empty; gint32 non_empty;
if(g_Sdebug) printf("\np_init_gdrw: drawable %x ID: %d\n", (int)drawable, (int)drawable->drawable_id); if(g_Sdebug) printf("\np_init_gdrw: drawable %p ID: %d\n", drawable, (int)drawable->drawable_id);
gdrw->drawable = drawable; gdrw->drawable = drawable;
gdrw->tile = NULL; gdrw->tile = NULL;
......
...@@ -698,13 +698,13 @@ load_rgba (TIFF *tif, channel_data *channel) ...@@ -698,13 +698,13 @@ load_rgba (TIFF *tif, channel_data *channel)
{ {
uint32 imageWidth, imageLength; uint32 imageWidth, imageLength;
uint32 row; uint32 row;
gulong *buffer; uint32 *buffer;
TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &imageWidth); TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &imageWidth);
TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &imageLength); TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &imageLength);
gimp_pixel_rgn_init (&(channel[0].pixel_rgn), channel[0].drawable, gimp_pixel_rgn_init (&(channel[0].pixel_rgn), channel[0].drawable,
0, 0, imageWidth, imageLength, TRUE, FALSE); 0, 0, imageWidth, imageLength, TRUE, FALSE);
buffer = g_new(gulong, imageWidth * imageLength); buffer = g_new(uint32, imageWidth * imageLength);
channel[0].pixels = (guchar*) buffer; channel[0].pixels = (guchar*) buffer;
if (buffer == NULL) { if (buffer == NULL) {
g_message("TIFF Unable to allocate temporary buffer\n"); g_message("TIFF Unable to allocate temporary buffer\n");
......
...@@ -583,7 +583,7 @@ static void ...@@ -583,7 +583,7 @@ static void
preview_clicked (GtkWidget *widget, preview_clicked (GtkWidget *widget,
gpointer data) gpointer data)
{ {
gint mut = (gint) data; gint mut = GPOINTER_TO_INT (data);
if (mut == 4) if (mut == 4)
{ {
...@@ -874,7 +874,7 @@ static void ...@@ -874,7 +874,7 @@ static void
gradient_cb (GtkWidget *widget, gradient_cb (GtkWidget *widget,
gpointer data) gpointer data)
{ {
config.cmap_drawable = (gint) data; config.cmap_drawable = GPOINTER_TO_INT (data);
set_cmap_preview(); set_cmap_preview();
set_flame_preview(); set_flame_preview();
/* set_edit_preview(); */ /* set_edit_preview(); */
...@@ -1149,7 +1149,7 @@ dialog (void) ...@@ -1149,7 +1149,7 @@ dialog (void)
menuitem = gtk_menu_item_new_with_label (names[i]); menuitem = gtk_menu_item_new_with_label (names[i]);
g_signal_connect (G_OBJECT (menuitem), "activate", g_signal_connect (G_OBJECT (menuitem), "activate",
G_CALLBACK (gradient_cb), G_CALLBACK (gradient_cb),
(gpointer) d); GINT_TO_POINTER (d));
gtk_menu_shell_prepend (GTK_MENU_SHELL (menu), menuitem); gtk_menu_shell_prepend (GTK_MENU_SHELL (menu), menuitem);
if (d == save_drawable) if (d == save_drawable)
gtk_menu_set_active (GTK_MENU (menu), 0); gtk_menu_set_active (GTK_MENU (menu), 0);
......
...@@ -4310,7 +4310,7 @@ ed_ientry_callback (GtkWidget *widget, gpointer data) ...@@ -4310,7 +4310,7 @@ ed_ientry_callback (GtkWidget *widget, gpointer data)
static void static void
ed_page_map_callback (GtkWidget *widget, gpointer data) ed_page_map_callback (GtkWidget *widget, gpointer data)
{ {
gint page_num = (gint) data; gint page_num = GPOINTER_TO_INT (data);
DEBUG_PRINT(("ed_page_map_callback\n")); DEBUG_PRINT(("ed_page_map_callback\n"));
......
...@@ -32,7 +32,7 @@ void generalbgchange(GtkWidget *wg, void *d, int num) ...@@ -32,7 +32,7 @@ void generalbgchange(GtkWidget *wg, void *d, int num)
int n; int n;
if(wg) { if(wg) {
n = (int) d; n = GPOINTER_TO_INT (d);
if(!img_has_alpha && (n == 3)) if(!img_has_alpha && (n == 3))
n = 1; n = 1;
pcvals.generalbgtype = n; pcvals.generalbgtype = n;
......
...@@ -32,7 +32,7 @@ GtkWidget *orientradio[NUMORIENTRADIO]; ...@@ -32,7 +32,7 @@ GtkWidget *orientradio[NUMORIENTRADIO];
void orientchange(GtkWidget *wg, void *d, int num) void orientchange(GtkWidget *wg, void *d, int num)
{ {
if (wg) { if (wg) {
pcvals.orienttype = (int) d; pcvals.orienttype = GPOINTER_TO_INT (d);
} else { } else {
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(orientradio[num]), TRUE); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(orientradio[num]), TRUE);
} }
......
...@@ -82,7 +82,7 @@ void updatepreviewprev(GtkWidget *wg, gpointer d) ...@@ -82,7 +82,7 @@ void updatepreviewprev(GtkWidget *wg, gpointer d)
if(d) { if(d) {
storevals(); storevals();
if((gint) d != 2) if(GPOINTER_TO_INT(d) != 2)
repaint(&p, &a); repaint(&p, &a);
} }
if(img_has_alpha) if(img_has_alpha)
......
...@@ -28,7 +28,7 @@ GtkWidget *sizeradio[NUMSIZERADIO]; ...@@ -28,7 +28,7 @@ GtkWidget *sizeradio[NUMSIZERADIO];
void sizechange(GtkWidget *wg, void *d, int num) void sizechange(GtkWidget *wg, void *d, int num)
{ {
if(wg) { if(wg) {
pcvals.sizetype = (int) d; pcvals.sizetype = GPOINTER_TO_INT (d);
} else { } else {
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(sizeradio[num]), TRUE); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(sizeradio[num]), TRUE);
} }
......
...@@ -112,7 +112,7 @@ static void ...@@ -112,7 +112,7 @@ static void
type_toggled_cb(GtkWidget *widget, gpointer data) type_toggled_cb(GtkWidget *widget, gpointer data)
{ {
if (GTK_WIDGET_STATE(widget) & GTK_STATE_SELECTED) { if (GTK_WIDGET_STATE(widget) & GTK_STATE_SELECTED) {
grid_type = (gint) data; grid_type = GPOINTER_TO_INT (data);
redraw_preview(); redraw_preview();
} }
} }
......
...@@ -89,7 +89,7 @@ static void ...@@ -89,7 +89,7 @@ static void
menu_zoom_to(GtkWidget *widget, gpointer data) menu_zoom_to(GtkWidget *widget, gpointer data)
{ {
if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget))) { if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget))) {
gint factor = (gint) data; gint factor = GPOINTER_TO_INT (data);
if (_menu_callback_lock) { if (_menu_callback_lock) {
_menu_callback_lock--; _menu_callback_lock--;
......
...@@ -477,19 +477,19 @@ prim_tileable(gchar *maz, guint x, guint y) ...@@ -477,19 +477,19 @@ prim_tileable(gchar *maz, guint x, guint y)
maz[up]=maz[down]=maz[left]=maz[right]=FRONTIER; maz[up]=maz[down]=maz[left]=maz[right]=FRONTIER;
front_cells=g_slist_append(front_cells,(gpointer)up); front_cells=g_slist_append(front_cells,GINT_TO_POINTER(up));
front_cells=g_slist_append(front_cells,(gpointer)down); front_cells=g_slist_append(front_cells,GINT_TO_POINTER(down));
front_cells=g_slist_append(front_cells,(gpointer)left); front_cells=g_slist_append(front_cells,GINT_TO_POINTER(left));
front_cells=g_slist_append(front_cells,(gpointer)right); front_cells=g_slist_append(front_cells,GINT_TO_POINTER(right));
/* While frontier is not empty do the following... */ /* While frontier is not empty do the following... */
while(g_slist_length(front_cells) > 0) { while(g_slist_length(front_cells) > 0) {
/* Remove one cell at random from frontier and place it in IN. */ /* Remove one cell at random from frontier and place it in IN. */
current = g_rand_int_range (gr, 0, g_slist_length(front_cells)); current = g_rand_int_range (gr, 0, g_slist_length(front_cells));
pos = (guint)g_slist_nth(front_cells,current)->data; pos = GPOINTER_TO_UINT(g_slist_nth(front_cells,current)->data);
front_cells=g_slist_remove(front_cells,(gpointer)pos);