Commit 141b6e8a authored by Manish Singh's avatar Manish Singh
Browse files

applied gimp-lecorfec-99041[02]-0, changes follow

* applied gimp-lecorfec-99041[02]-0, changes follow

* plug-ins/FractalExplorer/Dialogs.h (make_color_map):
replaced free with g_free to fix segfault.

* plug-ins/Lighting/lighting_preview.c (compute_preview):
allocate xpostab and ypostab only when needed (it could also be
allocated on stack with a compilation-fixed size like MapObject).
It avoids to lose some Kb on each preview :)
Also reindented (unfortunate C-c C-q) some other lines.

* plug-ins/Lighting/lighting_main.c (run):
release allocated postabs.

* plug-ins/Lighting/lighting_ui.c:
callbacks now have only one argument because gck widget use
gtk_signal_connect_object. Caused segfault for scale widget.

* plug-ins/autocrop/autocrop.c (doit):
return if image has only background (thus fixing a segfault).

* plug-ins/emboss/emboss.c (pluginCore, emboss_do_preview):
replaced malloc/free with g_malloc/g_free (unneeded, but
shouldn't everyone use glib calls ? :)

* plug-ins/flame/flame.c :
replaced a segfaulting free, and several harmless malloc/free pairs.

* plug-ins/flame/megawidget.c (mw_preview_build):
replaced harmless malloc/free pair.
Note : mwp->bits is malloc'ed but seems to be never freed.

* plug-ins/fractaltrace/fractaltrace.c (pixels_free):
replaced a bunch of segfaulting free.
(pixels_get, dialog_show): replaced gtk_signal_connect_object
with gtk_signal_connect to accomodate callbacks (caused STRANGE
dialog behaviour, coz you destroyed buttons one by one).

* plug-ins/illusion/illusion.c (dialog):
same gtk_signal_connect_object replacement for same reasons.

* plug-ins/libgck/gck/gckcolor.c :
changed all gck_rgb_to_color* functions to use a static GdkColor
instead of a malloc'ed area. Provided reentrant functions with
the old behaviour (gck_rgb_to_color*_r). Made some private functions
static, too.
gck_rgb_to_gdkcolor now use the new functions while
gck_rgb_to_gdkcolor_r is the reentrant version.
Also affected by this change: gck_gc_set_foreground and
gck_gc_set_background (no more free(color)).

* plug-ins/libgck/gck/gckcolor.h :
added the gck_rgb_to_gdkcolor_r proto.

* plug-ins/lic/lic.c (ok_button_clicked, cancel_button_clicked) :
segfault on gtk_widget_destroy, now calls gtk_main_quit.
(dialog_destroy) : segfault on window closure when called by
"destroy" event. Now called by "delete_event".

* plug-ins/megawidget/megawidget.c (mw_preview_build):
replaced harmless malloc/free pair.
Note : mwp->bits is malloc'ed but seems to be never freed.

* plug-ins/png/png.c (load_image):
replaced 2 segfaulting free.

* plug-ins/print/print-ps.c (ps_print):
replaced a segfaulting free (called many times :).

* plug-ins/sgi/sgi.c (load_image, save_image):
replaced a bunch of segfaulting free, and did some harmless
inits to avoid a few gcc warnings.

* plug-ins/wind/wind.c (render_wind):
replaced a segfaulting free.
(render_blast): replaced harmless malloc/free pair.

* plug-ins/bmp/bmpread.c (ReadImage):
yet another free()/g_free() problem fixed.

* plug-ins/exchange/exchange.c (real_exchange):
ditto.

* plug-ins/fp/fp.h: added Frames_Check_Button_In_A_Box proto.
* plug-ins/fp/fp_gtk.c: closing subdialogs via window manager
wasn't handled, thus leading to errors and crashes.
Now delete_event signals the dialog control button
to close a dialog with the good way.

* plug-ins/ifscompose/ifscompose.c (value_pair_create):
tried to set events mask on scale widget (a NO_WINDOW widget).

* plug-ins/png/png.c (save_image):
Replaced 2 free() with g_free() for g_malloc'ed memory.
Mysteriously I corrected the loading bug but not the saving one :)

-Yosh
parent 6f386957
Thu Apr 15 14:41:01 PDT 1999 Manish Singh <yosh@gimp.org>
* applied gimp-lecorfec-99041[02]-0, changes follow
* plug-ins/FractalExplorer/Dialogs.h (make_color_map):
replaced free with g_free to fix segfault.
* plug-ins/Lighting/lighting_preview.c (compute_preview):
allocate xpostab and ypostab only when needed (it could also be
allocated on stack with a compilation-fixed size like MapObject).
It avoids to lose some Kb on each preview :)
Also reindented (unfortunate C-c C-q) some other lines.
* plug-ins/Lighting/lighting_main.c (run):
release allocated postabs.
* plug-ins/Lighting/lighting_ui.c:
callbacks now have only one argument because gck widget use
gtk_signal_connect_object. Caused segfault for scale widget.
* plug-ins/autocrop/autocrop.c (doit):
return if image has only background (thus fixing a segfault).
* plug-ins/emboss/emboss.c (pluginCore, emboss_do_preview):
replaced malloc/free with g_malloc/g_free (unneeded, but
shouldn't everyone use glib calls ? :)
* plug-ins/flame/flame.c :
replaced a segfaulting free, and several harmless malloc/free pairs.
* plug-ins/flame/megawidget.c (mw_preview_build):
replaced harmless malloc/free pair.
Note : mwp->bits is malloc'ed but seems to be never freed.
* plug-ins/fractaltrace/fractaltrace.c (pixels_free):
replaced a bunch of segfaulting free.
(pixels_get, dialog_show): replaced gtk_signal_connect_object
with gtk_signal_connect to accomodate callbacks (caused STRANGE
dialog behaviour, coz you destroyed buttons one by one).
* plug-ins/illusion/illusion.c (dialog):
same gtk_signal_connect_object replacement for same reasons.
* plug-ins/libgck/gck/gckcolor.c :
changed all gck_rgb_to_color* functions to use a static GdkColor
instead of a malloc'ed area. Provided reentrant functions with
the old behaviour (gck_rgb_to_color*_r). Made some private functions
static, too.
gck_rgb_to_gdkcolor now use the new functions while
gck_rgb_to_gdkcolor_r is the reentrant version.
Also affected by this change: gck_gc_set_foreground and
gck_gc_set_background (no more free(color)).
* plug-ins/libgck/gck/gckcolor.h :
added the gck_rgb_to_gdkcolor_r proto.
* plug-ins/lic/lic.c (ok_button_clicked, cancel_button_clicked) :
segfault on gtk_widget_destroy, now calls gtk_main_quit.
(dialog_destroy) : segfault on window closure when called by
"destroy" event. Now called by "delete_event".
* plug-ins/megawidget/megawidget.c (mw_preview_build):
replaced harmless malloc/free pair.
Note : mwp->bits is malloc'ed but seems to be never freed.
* plug-ins/png/png.c (load_image):
replaced 2 segfaulting free.
* plug-ins/print/print-ps.c (ps_print):
replaced a segfaulting free (called many times :).
* plug-ins/sgi/sgi.c (load_image, save_image):
replaced a bunch of segfaulting free, and did some harmless
inits to avoid a few gcc warnings.
* plug-ins/wind/wind.c (render_wind):
replaced a segfaulting free.
(render_blast): replaced harmless malloc/free pair.
* plug-ins/bmp/bmpread.c (ReadImage):
yet another free()/g_free() problem fixed.
* plug-ins/exchange/exchange.c (real_exchange):
ditto.
* plug-ins/fp/fp.h: added Frames_Check_Button_In_A_Box proto.
* plug-ins/fp/fp_gtk.c: closing subdialogs via window manager
wasn't handled, thus leading to errors and crashes.
Now delete_event signals the dialog control button
to close a dialog with the good way.
* plug-ins/ifscompose/ifscompose.c (value_pair_create):
tried to set events mask on scale widget (a NO_WINDOW widget).
* plug-ins/png/png.c (save_image):
Replaced 2 free() with g_free() for g_malloc'ed memory.
Mysteriously I corrected the loading bug but not the saving one :)
Thu Apr 15 14:08:51 PDT 1999 Manish Singh <yosh@gimp.org>
* configure.in
......
......@@ -1304,7 +1304,7 @@ make_color_map()
colormap[i][1] = gr;
colormap[i][2] = bl;
}
free(g);
g_free(g);
}
/**********************************************************************
......
......@@ -287,6 +287,11 @@ static void run(gchar *name,
values[0].data.d_status = status;
gimp_drawable_detach (drawable);
if (xpostab)
g_free(xpostab);
if (ypostab)
g_free(ypostab);
}
GPlugInInfo PLUG_IN_INFO =
......
......@@ -6,8 +6,13 @@
gint lightx,lighty;
BackBuffer backbuf={0,0,0,0,NULL};
/* g_free()'ed on exit */
gdouble *xpostab=NULL,*ypostab=NULL;
gint xpostab_size = -1; /* if preview size change, do realloc */
gint ypostab_size = -1;
/* Protos */
/* ====== */
......@@ -25,8 +30,33 @@ void compute_preview (gint startx,gint starty,gint w,gint h)
GckVector3 pos;
get_ray_func ray_func;
xpostab = (gdouble *)malloc(sizeof(gdouble)*w);
ypostab = (gdouble *)malloc(sizeof(gdouble)*h);
if (xpostab_size != w)
{
if (xpostab)
{
g_free(xpostab);
xpostab = NULL;
}
}
if (!xpostab)
{
xpostab = (gdouble *)g_malloc(sizeof(gdouble)*w);
xpostab_size = w;
}
if (ypostab_size != h)
{
if (ypostab)
{
g_free(ypostab);
ypostab = NULL;
}
}
if (!ypostab)
{
ypostab = (gdouble *)g_malloc(sizeof(gdouble)*h);
ypostab_size = h;
}
for (xcnt=0;xcnt<w;xcnt++)
xpostab[xcnt]=(gdouble)width*((gdouble)xcnt/(gdouble)w);
......@@ -43,7 +73,7 @@ void compute_preview (gint startx,gint starty,gint w,gint h)
if (mapvals.bump_mapped==TRUE && mapvals.bumpmap_id!=-1)
{
gimp_pixel_rgn_init (&bump_region, gimp_drawable_get(mapvals.bumpmap_id),
0, 0, width, height, FALSE, FALSE);
0, 0, width, height, FALSE, FALSE);
}
imagey=0;
......@@ -51,14 +81,14 @@ void compute_preview (gint startx,gint starty,gint w,gint h)
if (mapvals.previewquality)
ray_func = get_ray_color;
else
ray_func = get_ray_color_no_bilinear;
ray_func = get_ray_color_no_bilinear;
if (mapvals.env_mapped==TRUE && mapvals.envmap_id!=-1)
{
env_width = gimp_drawable_width(mapvals.envmap_id);
env_height = gimp_drawable_height(mapvals.envmap_id);
gimp_pixel_rgn_init (&env_region, gimp_drawable_get(mapvals.envmap_id),
0, 0, env_width, env_height, FALSE, FALSE);
0, 0, env_width, env_height, FALSE, FALSE);
if (mapvals.previewquality)
ray_func = get_ray_color_ref;
......@@ -73,53 +103,53 @@ void compute_preview (gint startx,gint starty,gint w,gint h)
if ((ycnt>=starty && ycnt<(starty+h)) &&
(xcnt>=startx && xcnt<(startx+w)))
{
imagex=xpostab[xcnt-startx];
imagey=ypostab[ycnt-starty];
pos=int_to_posf(imagex,imagey);
if (mapvals.bump_mapped==TRUE && mapvals.bumpmap_id!=-1 && xcnt==startx)
{
pos_to_float(pos.x,pos.y,&imagex,&imagey);
precompute_normals(0,width,(gint)(imagey+0.5));
}
color=(*ray_func)(&pos);
imagex=xpostab[xcnt-startx];
imagey=ypostab[ycnt-starty];
pos=int_to_posf(imagex,imagey);
if (mapvals.bump_mapped==TRUE && mapvals.bumpmap_id!=-1 && xcnt==startx)
{
pos_to_float(pos.x,pos.y,&imagex,&imagey);
precompute_normals(0,width,(gint)(imagey+0.5));
}
color=(*ray_func)(&pos);
if (color.a<1.0)
{
f1=((xcnt % 32)<16);
f2=((ycnt % 32)<16);
f1=f1^f2;
if (color.a<1.0)
{
f1=((xcnt % 32)<16);
f2=((ycnt % 32)<16);
f1=f1^f2;
if (f1)
{
if (color.a==0.0)
color=lightcheck;
else
{
gck_rgb_mul(&color,color.a);
temp=lightcheck;
gck_rgb_mul(&temp,1.0-color.a);
gck_rgb_add(&color,&temp);
}
}
else
{
if (color.a==0.0)
color=darkcheck;
else
{
gck_rgb_mul(&color,color.a);
temp=darkcheck;
gck_rgb_mul(&temp,1.0-color.a);
gck_rgb_add(&color,&temp);
}
}
}
preview_rgb_data[index++]=(guchar)(255.0*color.r);
preview_rgb_data[index++]=(guchar)(255.0*color.g);
preview_rgb_data[index++]=(guchar)(255.0*color.b);
imagex++;
if (f1)
{
if (color.a==0.0)
color=lightcheck;
else
{
gck_rgb_mul(&color,color.a);
temp=lightcheck;
gck_rgb_mul(&temp,1.0-color.a);
gck_rgb_add(&color,&temp);
}
}
else
{
if (color.a==0.0)
color=darkcheck;
else
{
gck_rgb_mul(&color,color.a);
temp=darkcheck;
gck_rgb_mul(&temp,1.0-color.a);
gck_rgb_add(&color,&temp);
}
}
}
preview_rgb_data[index++]=(guchar)(255.0*color.r);
preview_rgb_data[index++]=(guchar)(255.0*color.g);
preview_rgb_data[index++]=(guchar)(255.0*color.b);
imagex++;
}
else
{
......
......@@ -66,21 +66,23 @@ void create_main_notebook (GtkWidget *);
/**************************/
gint preview_events (GtkWidget *area, GdkEvent *event);
void xyzval_update (GtkWidget *widget, GtkEntry *entry);
void entry_update (GtkWidget *widget, GtkEntry *entry);
void scale_update (GtkWidget *widget, GtkScale *scale);
void toggle_update (GtkWidget *button, gpointer data);
void toggleanti_update (GtkWidget *button, gpointer data);
void toggletips_update (GtkWidget *button, gpointer data);
void toggletrans_update (GtkWidget *button, gpointer data);
void togglebump_update (GtkWidget *button, gpointer data);
void toggleenvironment_update (GtkWidget *button, gpointer data);
void togglerefraction_update (GtkWidget *button, gpointer data);
#ifdef _LIGHTNING_UNUSED_CODE
void xyzval_update (GtkEntry *entry);
#endif
void entry_update (GtkEntry *entry);
void scale_update (GtkScale *scale);
void toggle_update (GtkWidget *button);
void toggleanti_update (GtkWidget *button);
void toggletips_update (GtkWidget *button);
void toggletrans_update (GtkWidget *button);
void togglebump_update (GtkWidget *button);
void toggleenvironment_update (GtkWidget *button);
void togglerefraction_update (GtkWidget *button);
void lightmenu_callback (GtkWidget *widget, gpointer client_data);
void preview_callback (GtkWidget *widget, gpointer client_data);
void apply_callback (GtkWidget *widget, gpointer client_data);
void exit_callback (GtkWidget *widget, gpointer client_data);
void preview_callback (GtkWidget *widget);
void apply_callback (GtkWidget *widget);
void exit_callback (GtkWidget *widget);
void color_ok_callback (GtkWidget *widget, gpointer client_data);
gint color_delete_callback (GtkWidget *widget, GdkEvent *event, gpointer client_data);
void color_changed_callback (GtkColorSelection *colorsel, gpointer client_data);
......@@ -100,31 +102,33 @@ void envmap_drawable_callback (gint32 id, gpointer data);
/* Implementation */
/******************/
#ifdef _LIGHTNING_UNUSED_CODE
/**********************************************************/
/* Update entry fields that affect the preview parameters */
/**********************************************************/
void xyzval_update(GtkWidget *widget, GtkEntry *entry)
void xyzval_update(GtkEntry *entry)
{
gdouble *valueptr;
gdouble value;
valueptr=(gdouble *)gtk_object_get_data(GTK_OBJECT(widget),"ValuePtr");
valueptr=(gdouble *)gtk_object_get_data(GTK_OBJECT(entry),"ValuePtr");
value = atof(gtk_entry_get_text(entry));
*valueptr=value;
}
#endif
/*********************/
/* Std. entry update */
/*********************/
void entry_update(GtkWidget *widget, GtkEntry *entry)
void entry_update(GtkEntry *entry)
{
gdouble *valueptr;
gdouble value;
valueptr=(gdouble *)gtk_object_get_data(GTK_OBJECT(widget),"ValuePtr");
valueptr=(gdouble *)gtk_object_get_data(GTK_OBJECT(entry),"ValuePtr");
value = atof(gtk_entry_get_text(entry));
*valueptr=value;
......@@ -134,12 +138,12 @@ void entry_update(GtkWidget *widget, GtkEntry *entry)
/* Std. scale update */
/*********************/
void scale_update(GtkWidget *widget,GtkScale *scale)
void scale_update(GtkScale *scale)
{
gdouble *valueptr;
GtkAdjustment *adjustment;
valueptr=(gdouble *)gtk_object_get_data(GTK_OBJECT(widget),"ValuePtr");
valueptr=(gdouble *)gtk_object_get_data(GTK_OBJECT(scale),"ValuePtr");
adjustment=gtk_range_get_adjustment(GTK_RANGE(scale));
*valueptr=(gdouble)adjustment->value;
......@@ -149,7 +153,7 @@ void scale_update(GtkWidget *widget,GtkScale *scale)
/* Std. toggle update */
/**********************/
void toggle_update(GtkWidget *button, gpointer data)
void toggle_update(GtkWidget *button)
{
gint *value;
......@@ -157,7 +161,7 @@ void toggle_update(GtkWidget *button, gpointer data)
*value=!(*value);
}
void togglestretch_update(GtkWidget *button, gpointer data)
void togglestretch_update(GtkWidget *button)
{
gint *value;
......@@ -165,7 +169,7 @@ void togglestretch_update(GtkWidget *button, gpointer data)
*value=!(*value);
}
void togglequality_update(GtkWidget *button, gpointer data)
void togglequality_update(GtkWidget *button)
{
gint *value;
......@@ -179,7 +183,7 @@ void togglequality_update(GtkWidget *button, gpointer data)
/* Toggle refractive layer update */
/**********************************/
void togglerefraction_update(GtkWidget *button, gpointer data)
void togglerefraction_update(GtkWidget *button)
{
gint *value;
......@@ -191,7 +195,7 @@ void togglerefraction_update(GtkWidget *button, gpointer data)
/* Toggle bumpmapping update */
/*****************************/
void togglebump_update(GtkWidget *button, gpointer data)
void togglebump_update(GtkWidget *button)
{
gint *value;
......@@ -219,7 +223,7 @@ void togglebump_update(GtkWidget *button, gpointer data)
/* Toggle environment mapping update */
/*************************************/
void toggleenvironment_update(GtkWidget *button, gpointer data)
void toggleenvironment_update(GtkWidget *button)
{
gint *value;
......@@ -248,7 +252,7 @@ void toggleenvironment_update(GtkWidget *button, gpointer data)
/* Antialiasing toggle update */
/******************************/
void toggleanti_update(GtkWidget *button, gpointer data)
void toggleanti_update(GtkWidget *button)
{
gint *value;
......@@ -260,7 +264,7 @@ void toggleanti_update(GtkWidget *button, gpointer data)
/* Tooltips toggle update */
/**************************/
void toggletips_update(GtkWidget *button, gpointer data)
void toggletips_update(GtkWidget *button)
{
gint *value;
......@@ -280,7 +284,7 @@ void toggletips_update(GtkWidget *button, gpointer data)
/* Transparent background toggle update */
/****************************************/
void toggletrans_update(GtkWidget *button, gpointer data)
void toggletrans_update(GtkWidget *button)
{
gint *value;
......@@ -343,7 +347,7 @@ void mapmenu2_callback(GtkWidget *widget, gpointer client_data)
/* Main window "Preview!" button callback */
/******************************************/
void preview_callback(GtkWidget *widget, gpointer client_data)
void preview_callback(GtkWidget *widget)
{
draw_preview_image(TRUE);
}
......@@ -352,7 +356,7 @@ void preview_callback(GtkWidget *widget, gpointer client_data)
/* Main window "-" (zoom in) button callback */
/*********************************************/
void zoomout_callback(GtkWidget *widget, gpointer client_data)
void zoomout_callback(GtkWidget *widget)
{
mapvals.preview_zoom_factor*=0.5;
draw_preview_image(TRUE);
......@@ -362,7 +366,7 @@ void zoomout_callback(GtkWidget *widget, gpointer client_data)
/* Main window "+" (zoom out) button callback */
/*********************************************/
void zoomin_callback(GtkWidget *widget, gpointer client_data)
void zoomin_callback(GtkWidget *widget)
{
mapvals.preview_zoom_factor*=2.0;
draw_preview_image(TRUE);
......@@ -373,7 +377,7 @@ void zoomin_callback(GtkWidget *widget, gpointer client_data)
/* Render to GIMP image, close down and exit. */
/**********************************************/
void apply_callback(GtkWidget *widget, gpointer client_data)
void apply_callback(GtkWidget *widget)
{
if (preview_rgb_data!=NULL)
free(preview_rgb_data);
......@@ -395,7 +399,7 @@ void apply_callback(GtkWidget *widget, gpointer client_data)
/* Main window "Cancel" button callback. Shut down and exit. */
/*************************************************************/
void exit_callback(GtkWidget *widget, gpointer client_data)
void exit_callback(GtkWidget *widget)
{
if (preview_rgb_data!=NULL)
free(preview_rgb_data);
......
......@@ -62,6 +62,7 @@ SUBDIRS = \
gauss_iir \
gauss_rle \
gbr \
gdyntext \
gee \
gfig \
gfli \
......
......@@ -226,7 +226,7 @@ Image ReadImage (fd, len, height, cmap, ncols, bpp, compression, spzeile, grey)
name_buf = g_malloc (strlen (filename) + 10);
sprintf (name_buf, "%s", filename);
gimp_image_set_filename(image,name_buf);
free (name_buf);
g_free (name_buf);
gimp_image_add_layer(image,layer,0);
drawable = gimp_drawable_get(layer);
......
......@@ -339,8 +339,8 @@ int pluginCore(struct piArgs *argp) {
gimp_pixel_rgn_init (&src, drw, x1, y1, width, height, FALSE, FALSE);
gimp_pixel_rgn_init (&dst, drw, x1, y1, width, height, TRUE, TRUE);
srcbuf=(guchar*)malloc(rowsize*3);
dstbuf=(guchar*)malloc(rowsize);
srcbuf=(guchar*)g_malloc(rowsize*3);
dstbuf=(guchar*)g_malloc(rowsize);
memset(srcbuf,(int)0,(size_t)(rowsize*3));
memset(dstbuf,(int)0,(size_t)rowsize);
......@@ -372,8 +372,8 @@ int pluginCore(struct piArgs *argp) {
gimp_pixel_rgn_set_row(&dst, dstbuf, x1, y1+y+1, width);
}
free(srcbuf);
free(dstbuf);
g_free(srcbuf);
g_free(dstbuf);
gimp_drawable_flush(drw);
gimp_drawable_merge_shadow (drw->id, TRUE);
......@@ -473,8 +473,8 @@ emboss_do_preview(GtkWidget *w) {
ap->embossp = !mw_radio_result(rgp);
rowsize=thePreview->width*thePreview->bpp;
dst = malloc(rowsize);
c = malloc(rowsize*3);
dst = g_malloc(rowsize);
c = g_malloc(rowsize*3);
memcpy(c, thePreview->bits, rowsize);
memcpy(c+rowsize, thePreview->bits, rowsize*2);
EmbossInit(DtoR(ap->azimuth), DtoR(ap->elevation), ap->depth);
......@@ -491,7 +491,7 @@ emboss_do_preview(GtkWidget *w) {
dst, thePreview->width, thePreview->bpp, FALSE);
gtk_preview_draw_row(GTK_PREVIEW(theWidget),
dst, 0, thePreview->height-1, thePreview->width);
free(c);
g_free(c);
for(y=0, c=thePreview->bits;y<thePreview->height-2; y++, c+=rowsize){
EmbossRow(c, ap->embossp ? (guchar *)0 : c,
......@@ -502,7 +502,7 @@ emboss_do_preview(GtkWidget *w) {
gtk_widget_draw(theWidget, NULL);
gdk_flush();
free(dst);
g_free(dst);
}
/*
......
......@@ -515,8 +515,8 @@ void real_exchange(gint x1, gint y1, gint x2, gint y2, int dopreview)
if (! dopreview && (y % 10) == 0)
gimp_progress_update((double) y / (double) height);
}
free(src_row);
free(dest_row);
g_free(src_row);
g_free(dest_row);
if (! dopreview)
{
/* update the processed region */
......
......@@ -268,11 +268,11 @@ static void pixels_free( void )
{
gint y;
for( y = 0; y < image.height; y++ ){
free( spixels[y] );
free( dpixels[y] );
g_free( spixels[y] );
g_free( dpixels[y] );
}
free( spixels );
free( dpixels );
g_free( spixels );
g_free( dpixels );
}
static void pixels_get( gint x, gint y, pixel_t *pixel )
......@@ -750,9 +750,9 @@ static gint dialog_show( void )
GtkWidget *button;
button = gtk_button_new_with_label( "OK" );
gtk_signal_connect_object( GTK_OBJECT( button ), "clicked",
GTK_SIGNAL_FUNC( dialog_ok_callback ),
GTK_OBJECT( dialog ) );
gtk_signal_connect( GTK_OBJECT( button ), "clicked",
GTK_SIGNAL_FUNC( dialog_ok_callback ),
GTK_OBJECT( dialog ) );
gtk_box_pack_start( GTK_BOX( GTK_DIALOG( dialog )->action_area ),