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
This commit is contained in:
Manish Singh 2003-01-05 20:38:21 +00:00 committed by Manish Singh
parent a817b033d2
commit 013e30db54
44 changed files with 119 additions and 76 deletions

View File

@ -1,3 +1,39 @@
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>
* configure.in: changed --with-gnome-desktop to --with-gnome-datadir

View File

@ -512,7 +512,7 @@ gimp_brush_load_brush (gint fd,
{
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Could not read %d bytes from '%s': %s"),
sizeof (header), filename, g_strerror (errno));
(gint) sizeof (header), filename, g_strerror (errno));
return NULL;
}

View File

@ -512,7 +512,7 @@ gimp_brush_load_brush (gint fd,
{
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Could not read %d bytes from '%s': %s"),
sizeof (header), filename, g_strerror (errno));
(gint) sizeof (header), filename, g_strerror (errno));
return NULL;
}

View File

@ -111,7 +111,7 @@ gimp_image_new_get_memsize_string (gsize memsize)
{
if (memsize < 4096)
{
return g_strdup_printf (_("%d Bytes"), memsize);
return g_strdup_printf (_("%lu Bytes"), memsize);
}
else if (memsize < 1024 * 10)
{
@ -123,7 +123,7 @@ gimp_image_new_get_memsize_string (gsize memsize)
}
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)
{

View File

@ -290,7 +290,7 @@ gimp_object_get_memsize (GimpObject *object)
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,
g_type_name (G_TYPE_FROM_INSTANCE (object)),
object->name,

View File

@ -104,7 +104,8 @@ gimp_palette_import_store_colors (GHashTable *h_array,
}
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)
@ -127,7 +128,7 @@ gimp_palette_import_store_colors (GHashTable *h_array,
new_color->g = colors[1];
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
{

View File

@ -309,7 +309,7 @@ gimp_pattern_load (const gchar *filename,
{
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Could not read %d bytes from '%s': %s"),
sizeof (header), filename, g_strerror (errno));
(gint) sizeof (header), filename, g_strerror (errno));
goto error;
}

View File

@ -309,7 +309,7 @@ gimp_pattern_load (const gchar *filename,
{
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Could not read %d bytes from '%s': %s"),
sizeof (header), filename, g_strerror (errno));
(gint) sizeof (header), filename, g_strerror (errno));
goto error;
}

View File

@ -1655,7 +1655,7 @@ plug_in_flush (GIOChannel *channel,
GIOStatus status;
GError *error = NULL;
gint count;
guint bytes;
gsize bytes;
plug_in = (PlugIn *) user_data;

View File

@ -1655,7 +1655,7 @@ plug_in_flush (GIOChannel *channel,
GIOStatus status;
GError *error = NULL;
gint count;
guint bytes;
gsize bytes;
plug_in = (PlugIn *) user_data;

View File

@ -1655,7 +1655,7 @@ plug_in_flush (GIOChannel *channel,
GIOStatus status;
GError *error = NULL;
gint count;
guint bytes;
gsize bytes;
plug_in = (PlugIn *) user_data;

View File

@ -1655,7 +1655,7 @@ plug_in_flush (GIOChannel *channel,
GIOStatus status;
GError *error = NULL;
gint count;
guint bytes;
gsize bytes;
plug_in = (PlugIn *) user_data;

View File

@ -1655,7 +1655,7 @@ plug_in_flush (GIOChannel *channel,
GIOStatus status;
GError *error = NULL;
gint count;
guint bytes;
gsize bytes;
plug_in = (PlugIn *) user_data;

View File

@ -1655,7 +1655,7 @@ plug_in_flush (GIOChannel *channel,
GIOStatus status;
GError *error = NULL;
gint count;
guint bytes;
gsize bytes;
plug_in = (PlugIn *) user_data;

View File

@ -1655,7 +1655,7 @@ plug_in_flush (GIOChannel *channel,
GIOStatus status;
GError *error = NULL;
gint count;
guint bytes;
gsize bytes;
plug_in = (PlugIn *) user_data;

View File

@ -1655,7 +1655,7 @@ plug_in_flush (GIOChannel *channel,
GIOStatus status;
GError *error = NULL;
gint count;
guint bytes;
gsize bytes;
plug_in = (PlugIn *) user_data;

View File

@ -1655,7 +1655,7 @@ plug_in_flush (GIOChannel *channel,
GIOStatus status;
GError *error = NULL;
gint count;
guint bytes;
gsize bytes;
plug_in = (PlugIn *) user_data;

View File

@ -3460,7 +3460,7 @@ bezier_stroke (GimpBezierSelectTool *bezier_sel,
procedural_db_run_proc (gdisp->gimage->gimp,
pdb_string,
&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_FLOATARRAY, rpnts->stroke_points,
GIMP_PDB_END);

View File

@ -428,7 +428,7 @@ undo_history_set_pixmap (GtkCList *clist,
{
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;
idle.clist = clist;

View File

@ -295,7 +295,7 @@ gimp_object_get_memsize (GimpObject *object)
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,
g_type_name (G_TYPE_FROM_INSTANCE (object)),
object->name,

View File

@ -630,7 +630,8 @@ gimp_unit_menu_callback (GtkWidget *widget,
GimpUnit new_unit;
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)
return;

View File

@ -22,6 +22,8 @@
#include "config.h"
#include <stdlib.h>
#ifdef __GNUC__
#warning GTK_DISABLE_DEPRECATED
#endif

View File

@ -387,7 +387,7 @@ box_drawable_callback (gint32 id,
{
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;
}
@ -410,7 +410,7 @@ cylinder_drawable_callback (gint32 id,
{
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;
}

View File

@ -831,7 +831,7 @@ static void
my_bmode_callback (GtkWidget *widget,
gpointer data)
{
my_config.bmode = (int) data - 1;
my_config.bmode = GPOINTER_TO_INT (data) - 1;
}
static gint
@ -1010,7 +1010,7 @@ dialog (void)
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (my_bmode_callback),
(gpointer) (i + 1));
GINT_TO_POINTER (i + 1));
}
gtk_widget_show (box);

View File

@ -2832,8 +2832,8 @@ void
p_end_gdrw (t_GDRW *gdrw)
{
if(gb_debug)
printf ("\np_end_gdrw: drawable %x ID: %d\n",
(int)gdrw->drawable, (int)gdrw->drawable->drawable_id);
printf ("\np_end_gdrw: drawable %p ID: %d\n",
gdrw->drawable, (int)gdrw->drawable->drawable_id);
if(gdrw->tile)
{
@ -2858,7 +2858,7 @@ p_init_gdrw (t_GDRW *gdrw,
gint32 l_sel_channel_id;
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->tile = NULL;

View File

@ -507,7 +507,7 @@ p_smp_toggle_callback (GtkWidget *widget,
void
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))
{
@ -527,7 +527,7 @@ p_smp_menu_callback(gint32 id, gpointer data)
{
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)
{
@ -2590,7 +2590,7 @@ p_end_gdrw(t_GDRW *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)
{
@ -2628,7 +2628,7 @@ p_init_gdrw(t_GDRW *gdrw, GimpDrawable *drawable, gint dirty, gint shadow)
t_GDRW *l_sel_gdrw;
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->tile = NULL;

View File

@ -698,13 +698,13 @@ load_rgba (TIFF *tif, channel_data *channel)
{
uint32 imageWidth, imageLength;
uint32 row;
gulong *buffer;
uint32 *buffer;
TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &imageWidth);
TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &imageLength);
gimp_pixel_rgn_init (&(channel[0].pixel_rgn), channel[0].drawable,
0, 0, imageWidth, imageLength, TRUE, FALSE);
buffer = g_new(gulong, imageWidth * imageLength);
buffer = g_new(uint32, imageWidth * imageLength);
channel[0].pixels = (guchar*) buffer;
if (buffer == NULL) {
g_message("TIFF Unable to allocate temporary buffer\n");

View File

@ -583,7 +583,7 @@ static void
preview_clicked (GtkWidget *widget,
gpointer data)
{
gint mut = (gint) data;
gint mut = GPOINTER_TO_INT (data);
if (mut == 4)
{
@ -874,7 +874,7 @@ static void
gradient_cb (GtkWidget *widget,
gpointer data)
{
config.cmap_drawable = (gint) data;
config.cmap_drawable = GPOINTER_TO_INT (data);
set_cmap_preview();
set_flame_preview();
/* set_edit_preview(); */
@ -1149,7 +1149,7 @@ dialog (void)
menuitem = gtk_menu_item_new_with_label (names[i]);
g_signal_connect (G_OBJECT (menuitem), "activate",
G_CALLBACK (gradient_cb),
(gpointer) d);
GINT_TO_POINTER (d));
gtk_menu_shell_prepend (GTK_MENU_SHELL (menu), menuitem);
if (d == save_drawable)
gtk_menu_set_active (GTK_MENU (menu), 0);

View File

@ -4310,7 +4310,7 @@ ed_ientry_callback (GtkWidget *widget, gpointer data)
static void
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"));

View File

@ -32,7 +32,7 @@ void generalbgchange(GtkWidget *wg, void *d, int num)
int n;
if(wg) {
n = (int) d;
n = GPOINTER_TO_INT (d);
if(!img_has_alpha && (n == 3))
n = 1;
pcvals.generalbgtype = n;

View File

@ -32,7 +32,7 @@ GtkWidget *orientradio[NUMORIENTRADIO];
void orientchange(GtkWidget *wg, void *d, int num)
{
if (wg) {
pcvals.orienttype = (int) d;
pcvals.orienttype = GPOINTER_TO_INT (d);
} else {
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(orientradio[num]), TRUE);
}

View File

@ -82,7 +82,7 @@ void updatepreviewprev(GtkWidget *wg, gpointer d)
if(d) {
storevals();
if((gint) d != 2)
if(GPOINTER_TO_INT(d) != 2)
repaint(&p, &a);
}
if(img_has_alpha)

View File

@ -28,7 +28,7 @@ GtkWidget *sizeradio[NUMSIZERADIO];
void sizechange(GtkWidget *wg, void *d, int num)
{
if(wg) {
pcvals.sizetype = (int) d;
pcvals.sizetype = GPOINTER_TO_INT (d);
} else {
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(sizeradio[num]), TRUE);
}

View File

@ -112,7 +112,7 @@ static void
type_toggled_cb(GtkWidget *widget, gpointer data)
{
if (GTK_WIDGET_STATE(widget) & GTK_STATE_SELECTED) {
grid_type = (gint) data;
grid_type = GPOINTER_TO_INT (data);
redraw_preview();
}
}

View File

@ -89,7 +89,7 @@ static void
menu_zoom_to(GtkWidget *widget, gpointer data)
{
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) {
_menu_callback_lock--;

View File

@ -477,19 +477,19 @@ prim_tileable(gchar *maz, guint x, guint y)
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,(gpointer)down);
front_cells=g_slist_append(front_cells,(gpointer)left);
front_cells=g_slist_append(front_cells,(gpointer)right);
front_cells=g_slist_append(front_cells,GINT_TO_POINTER(up));
front_cells=g_slist_append(front_cells,GINT_TO_POINTER(down));
front_cells=g_slist_append(front_cells,GINT_TO_POINTER(left));
front_cells=g_slist_append(front_cells,GINT_TO_POINTER(right));
/* While frontier is not empty do the following... */
while(g_slist_length(front_cells) > 0) {
/* Remove one cell at random from frontier and place it in IN. */
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);
front_cells=g_slist_remove(front_cells,GUINT_TO_POINTER(pos));
maz[pos]=IN;
/* If the cell has any neighbors in OUT, remove them from
@ -504,7 +504,7 @@ prim_tileable(gchar *maz, guint x, guint y)
switch (maz[up]) {
case OUT:
maz[up]=FRONTIER;
front_cells=g_slist_append(front_cells,(gpointer)up);
front_cells=g_slist_append(front_cells,GINT_TO_POINTER(up));
break;
case IN:
d=1;
@ -515,7 +515,7 @@ prim_tileable(gchar *maz, guint x, guint y)
switch (maz[down]) {
case OUT:
maz[down]=FRONTIER;
front_cells=g_slist_append(front_cells,(gpointer)down);
front_cells=g_slist_append(front_cells,GINT_TO_POINTER(down));
break;
case IN:
d=d|2;
@ -526,7 +526,7 @@ prim_tileable(gchar *maz, guint x, guint y)
switch (maz[left]) {
case OUT:
maz[left]=FRONTIER;
front_cells=g_slist_append(front_cells,(gpointer)left);
front_cells=g_slist_append(front_cells,GINT_TO_POINTER(left));
break;
case IN:
d=d|4;
@ -537,7 +537,7 @@ prim_tileable(gchar *maz, guint x, guint y)
switch (maz[right]) {
case OUT:
maz[right]=FRONTIER;
front_cells=g_slist_append(front_cells,(gpointer)right);
front_cells=g_slist_append(front_cells,GINT_TO_POINTER(right));
break;
case IN:
d=d|8;

View File

@ -141,7 +141,7 @@ regex_prin1 (LISP ptr, struct gen_printio *f)
char buffer[256];
regex_t *p;
p = get_tc_regex (ptr)->r;
sprintf (buffer, "#<REGEX %p nsub=%d",
sprintf (buffer, "#<REGEX %p nsub=%lu",
p, p->re_nsub);
gput_st (f, buffer);
gput_st (f, ">");

View File

@ -1489,19 +1489,19 @@ number2string (LISP x, LISP b, LISP w, LISP p)
if ((width >= 0) && (prec >= 0))
sprintf (format,
NULLP (b) ? "%%%d.%dg" :
EQ (sym_e, b) ? "%%%d.%dd" : "%%%d.%df",
NULLP (b) ? "%%%ld.%ldg" :
EQ (sym_e, b) ? "%%%ld.%ldd" : "%%%ld.%ldf",
width, prec);
else if (width >= 0)
sprintf (format,
NULLP (b) ? "%%%dg" : EQ (sym_e, b) ? "%%%de" : "%%%df",
NULLP (b) ? "%%%ldg" : EQ (sym_e, b) ? "%%%lde" : "%%%ldf",
width);
else if (prec >= 0)
sprintf (format,
NULLP (b) ? "%%.%dg" : EQ (sym_e, b) ? "%%.%de" : "%%.%df",
NULLP (b) ? "%%.%ldg" : EQ (sym_e, b) ? "%%.%lde" : "%%.%ldf",
prec);
else
sprintf (format, NULLP (b) ? "%g" : EQ (sym_e, b) ? "%e" : "%f");
sprintf (format, NULLP (b) ? "%%g" : EQ (sym_e, b) ? "%%e" : "%%f");
g_ascii_formatd (buffer, sizeof(buffer), format, y);
}
@ -1510,7 +1510,7 @@ number2string (LISP x, LISP b, LISP w, LISP p)
if (width >= 0)
sprintf (buffer,
(base == 10) ? "%0*ld" : (base == 8) ? "%0*lo" : "%0*lX",
width,
(int) width,
(long) y);
else
sprintf (buffer,
@ -2304,7 +2304,7 @@ fast_save (LISP fname, LISP forms, LISP nohash, LISP comment)
sprintf (msgbuff, "# Siod Binary Object Save File\n");
fput_st (f, msgbuff);
sprintf (msgbuff, "# sizeof(long) = %d\n# sizeof(double) = %d\n",
sizeof (long), sizeof (double));
(int) sizeof (long), (int) sizeof (double));
fput_st (f, msgbuff);
shexstr (databuff, &l_one, sizeof (l_one));
sprintf (msgbuff, "# 1 = %s\n", databuff);

View File

@ -391,7 +391,7 @@ script_fu_siod_read (GIOChannel *channel,
GIOCondition cond,
gpointer data)
{
gint count;
gsize count;
GIOStatus status;
GError *error = NULL;
GtkTextIter cursor;

View File

@ -268,7 +268,7 @@ script_fu_server_listen (gint timeout)
/* Associate the client address with the socket */
g_hash_table_insert (clientname_ht,
(gpointer) new,
GINT_TO_POINTER (new),
g_strdup (inet_ntoa (clientname.sin_addr)));
/*
server_log ("Server: connect from host %s, port %d.\n",
@ -283,7 +283,7 @@ script_fu_server_listen (gint timeout)
if (read_from_client (i) < 0)
{
/* Disassociate the client address with the socket */
g_hash_table_remove (clientname_ht, (gpointer) i);
g_hash_table_remove (clientname_ht, GINT_TO_POINTER (i));
/*
server_log ("Server: disconnect from host %s, port %d.\n",
@ -490,7 +490,8 @@ read_from_client (gint filedes)
queue_length ++;
/* Get the client address from the address/socket table */
clientaddr = g_hash_table_lookup (clientname_ht, (gpointer) cmd->filedes);
clientaddr = g_hash_table_lookup (clientname_ht,
GINT_TO_POINTER (cmd->filedes));
time (&clock);
server_log ("Received request #%d from IP address %s: %s on %s,"
"[Request queue length: %d]",

View File

@ -141,7 +141,7 @@ regex_prin1 (LISP ptr, struct gen_printio *f)
char buffer[256];
regex_t *p;
p = get_tc_regex (ptr)->r;
sprintf (buffer, "#<REGEX %p nsub=%d",
sprintf (buffer, "#<REGEX %p nsub=%lu",
p, p->re_nsub);
gput_st (f, buffer);
gput_st (f, ">");

View File

@ -1489,19 +1489,19 @@ number2string (LISP x, LISP b, LISP w, LISP p)
if ((width >= 0) && (prec >= 0))
sprintf (format,
NULLP (b) ? "%%%d.%dg" :
EQ (sym_e, b) ? "%%%d.%dd" : "%%%d.%df",
NULLP (b) ? "%%%ld.%ldg" :
EQ (sym_e, b) ? "%%%ld.%ldd" : "%%%ld.%ldf",
width, prec);
else if (width >= 0)
sprintf (format,
NULLP (b) ? "%%%dg" : EQ (sym_e, b) ? "%%%de" : "%%%df",
NULLP (b) ? "%%%ldg" : EQ (sym_e, b) ? "%%%lde" : "%%%ldf",
width);
else if (prec >= 0)
sprintf (format,
NULLP (b) ? "%%.%dg" : EQ (sym_e, b) ? "%%.%de" : "%%.%df",
NULLP (b) ? "%%.%ldg" : EQ (sym_e, b) ? "%%.%lde" : "%%.%ldf",
prec);
else
sprintf (format, NULLP (b) ? "%g" : EQ (sym_e, b) ? "%e" : "%f");
sprintf (format, NULLP (b) ? "%%g" : EQ (sym_e, b) ? "%%e" : "%%f");
g_ascii_formatd (buffer, sizeof(buffer), format, y);
}
@ -1510,7 +1510,7 @@ number2string (LISP x, LISP b, LISP w, LISP p)
if (width >= 0)
sprintf (buffer,
(base == 10) ? "%0*ld" : (base == 8) ? "%0*lo" : "%0*lX",
width,
(int) width,
(long) y);
else
sprintf (buffer,
@ -2304,7 +2304,7 @@ fast_save (LISP fname, LISP forms, LISP nohash, LISP comment)
sprintf (msgbuff, "# Siod Binary Object Save File\n");
fput_st (f, msgbuff);
sprintf (msgbuff, "# sizeof(long) = %d\n# sizeof(double) = %d\n",
sizeof (long), sizeof (double));
(int) sizeof (long), (int) sizeof (double));
fput_st (f, msgbuff);
shexstr (databuff, &l_one, sizeof (l_one));
sprintf (msgbuff, "# 1 = %s\n", databuff);

View File

@ -20,6 +20,8 @@
#include "config.h"
#include <string.h>
#include <gtk/gtk.h>
#include <libgimp/gimp.h>

View File

@ -369,7 +369,7 @@ new_window_callback (GtkWidget *widget,
{
if (GTK_TOGGLE_BUTTON (widget)->active)
{
url_info.new_window = (gint) data;
url_info.new_window = GPOINTER_TO_INT (data);
}
}