summaryrefslogtreecommitdiff
path: root/graphics/cinepaint/patches/patch-am
blob: 3ed5b41ff43654bb869273c6fbc2d0b253db6ecf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
$NetBSD: patch-am,v 1.1 2005/03/16 18:32:50 rillig Exp $

gcc-2.95.3 cannot handle declarations intermixed with code.

--- app/gimage.c.orig	Tue Nov 23 12:58:14 2004
+++ app/gimage.c	Wed Mar 16 18:34:14 2005
@@ -3625,21 +3625,25 @@ gimage_set_cms_profile(GImage *image, CM
 }
 
 void gimage_transform_colors(GImage *image, CMSTransform *transform, gboolean allow_undo)
-{   if (allow_undo)
+{
+    Layer *floating_layer;
+    GSList *list = NULL;
+
+    if (allow_undo)
     {   undo_push_group_start (image, GIMAGE_MOD_UNDO);
     }
 
     /*  Relax the floating selection  */
-    Layer* floating_layer = gimage_floating_sel (image);
+    floating_layer = gimage_floating_sel (image);
     if (floating_layer)
     {   floating_sel_relax (floating_layer, TRUE);
     }
   
-    GSList *list = NULL;
     /*  Convert all layers  */
     for (list = image->layers; list; list = g_slist_next (list))
     {   /* get the original layer */
         Layer * layer = (Layer *) list->data;
+        PixelArea transform_area;        
 
         /* get the data */
         Canvas *tiles = drawable_data (GIMP_DRAWABLE (layer));
@@ -3653,7 +3657,6 @@ void gimage_transform_colors(GImage *ima
 	}
 
         /* get the transform and convert */
-        PixelArea transform_area;        
         pixelarea_init(&transform_area, tiles,0, 0, 
 	               drawable_width(GIMP_DRAWABLE(layer)), 
  	               drawable_height(GIMP_DRAWABLE(layer)), TRUE);