summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2005-03-16 18:32:50 +0000
committerrillig <rillig@pkgsrc.org>2005-03-16 18:32:50 +0000
commiteeb2f123f5108c4b3f9ec6811e498796834a48e9 (patch)
tree28ba98c499cff73ba246392d366c22c38d61ebe8 /graphics
parent04971f189b3ab4fdc83caf5958e3b3421d70020a (diff)
downloadpkgsrc-eeb2f123f5108c4b3f9ec6811e498796834a48e9.tar.gz
Added lots of patches to build cinepaint on NetBSD-1.6.2 using gcc-2.95.3.
These patches have been submitted to the upstream authors. Approved by wiz.
Diffstat (limited to 'graphics')
-rw-r--r--graphics/cinepaint/distinfo16
-rw-r--r--graphics/cinepaint/patches/patch-ac58
-rw-r--r--graphics/cinepaint/patches/patch-ad353
-rw-r--r--graphics/cinepaint/patches/patch-ae73
-rw-r--r--graphics/cinepaint/patches/patch-af250
-rw-r--r--graphics/cinepaint/patches/patch-ag38
-rw-r--r--graphics/cinepaint/patches/patch-ah42
-rw-r--r--graphics/cinepaint/patches/patch-ai22
-rw-r--r--graphics/cinepaint/patches/patch-aj22
-rw-r--r--graphics/cinepaint/patches/patch-ak25
-rw-r--r--graphics/cinepaint/patches/patch-al121
-rw-r--r--graphics/cinepaint/patches/patch-am43
-rw-r--r--graphics/cinepaint/patches/patch-an337
-rw-r--r--graphics/cinepaint/patches/patch-ao34
-rw-r--r--graphics/cinepaint/patches/patch-ap21
15 files changed, 1454 insertions, 1 deletions
diff --git a/graphics/cinepaint/distinfo b/graphics/cinepaint/distinfo
index c0176844698..169ef03d6a0 100644
--- a/graphics/cinepaint/distinfo
+++ b/graphics/cinepaint/distinfo
@@ -1,7 +1,21 @@
-$NetBSD: distinfo,v 1.3 2005/02/24 08:45:03 agc Exp $
+$NetBSD: distinfo,v 1.4 2005/03/16 18:32:50 rillig Exp $
SHA1 (cinepaint-0.19-0.tar.gz) = ce3f3cb9cc26bacd8a9b99b6059caad967e59297
RMD160 (cinepaint-0.19-0.tar.gz) = eec10941ae75c6ef7213ea4f5649bbb6937f4bcc
Size (cinepaint-0.19-0.tar.gz) = 7218293 bytes
SHA1 (patch-aa) = 2259896756f3371589b4a83655e4c118d0247302
SHA1 (patch-ab) = 1e03ffb0deab12b229f2604083bd3515a80747ac
+SHA1 (patch-ac) = 106b4569e627692566abc1f2d2175df01ae76fea
+SHA1 (patch-ad) = 86e3677cea5bf24c749f1771943ef18808eb1d14
+SHA1 (patch-ae) = 188e453a0a2b5fdf7ce3ec7db889d08071a57bd3
+SHA1 (patch-af) = 313f9fe908217de89ba9b02bd98cb28761d188ba
+SHA1 (patch-ag) = 25dff8ba05f414d4dde3356dfc71624f6fdb8a60
+SHA1 (patch-ah) = b2f750fa1adf9c09af13e8b0fa172be90e7802d4
+SHA1 (patch-ai) = e7979dec50e3402927a5442cb69e5771b03362db
+SHA1 (patch-aj) = 06ca475fdb0ea0e49e89c91cdb164d001a6a1937
+SHA1 (patch-ak) = e63c101cdc372ec8680ccf22bae99099fdb641af
+SHA1 (patch-al) = 2e456b752b363191c0f6ddcff9904b434ddf81ea
+SHA1 (patch-am) = 9bdb163ddc08bb526be842a3c3ef719426dc257f
+SHA1 (patch-an) = 8ef057f80c9586e26e66a28e8b402147e6d98faa
+SHA1 (patch-ao) = 564d69b66582f3db696063b64f329d78b4f4836f
+SHA1 (patch-ap) = 04dd321313b21acc76f84cc62cb6c6e28306f6f1
diff --git a/graphics/cinepaint/patches/patch-ac b/graphics/cinepaint/patches/patch-ac
new file mode 100644
index 00000000000..e58f4caa4d2
--- /dev/null
+++ b/graphics/cinepaint/patches/patch-ac
@@ -0,0 +1,58 @@
+$NetBSD: patch-ac,v 1.1 2005/03/16 18:32:50 rillig Exp $
+
+Copy and paste bug.
+
+--- app/store_frame_manager.c.orig Tue Dec 28 17:22:02 2004
++++ app/store_frame_manager.c Sat Mar 12 14:36:11 2005
+@@ -2153,51 +2153,6 @@ sfm_store_change_frame_to (GDisplay* dis
+ disp->ID = disp->gimage->ID;
+ item->gimage = disp->gimage;
+ sfm_store_make_cur (disp, fm->fg);
+-void
+-sfm_slide_show (GtkWidget *w, gpointer data)
+-{
+- GDisplay *display=NULL;
+- GtkWidget *window;
+- static gint win_x, win_y, win_w, win_h, win_d;
+-
+- display = gdisplay_active();
+- window = display->shell;
+-
+- if(display)
+- {
+- display->slide_show = display->slide_show ? 0 : 1;
+- if(display->slide_show)
+- {
+- gdk_window_get_geometry(window->window, &win_x, &win_y, &win_w, &win_h, &win_d);
+-
+- gtk_widget_hide(display->menubar);
+- gtk_widget_hide(display->hsb);
+- gtk_widget_hide(display->vsb);
+- gtk_widget_hide(display->hrule);
+- gtk_widget_hide(display->vrule);
+-
+- gdk_window_move_resize (window->window, -50, -75, gdk_screen_width()+92,
+- gdk_screen_height()+105);
+- gtk_window_set_default_size (GTK_WINDOW (window), gdk_screen_width()+92,
+- gdk_screen_height()+105);
+- gtk_widget_set_usize (GTK_WIDGET(window), gdk_screen_width()+92,
+- gdk_screen_height()+105);
+- }
+- else
+- {
+- gdk_window_move_resize (window->window, win_x, win_y, win_w, win_h);
+- gtk_window_set_default_size (GTK_WINDOW (window), win_w, win_h);
+- gtk_widget_set_usize (GTK_WIDGET(window), win_w, win_h);
+-
+- gtk_widget_show(display->menubar);
+- gtk_widget_show(display->hsb);
+- gtk_widget_show(display->vsb);
+- gtk_widget_show(display->hrule);
+- gtk_widget_show(display->vrule);
+- }
+- gdisplays_flush();
+- }
+-}
+ gtk_clist_set_text (GTK_CLIST (disp->bfm->sfm->store_list), disp->bfm->sfm->fg,
+ 5, temp_name);
+
diff --git a/graphics/cinepaint/patches/patch-ad b/graphics/cinepaint/patches/patch-ad
new file mode 100644
index 00000000000..24a0f6dd8c6
--- /dev/null
+++ b/graphics/cinepaint/patches/patch-ad
@@ -0,0 +1,353 @@
+$NetBSD: patch-ad,v 1.1 2005/03/16 18:32:50 rillig Exp $
+
+gcc-2.95.3 cannot handle declarations intermixed with code.
+
+--- app/cms.c.orig Tue Nov 23 12:58:15 2004
++++ app/cms.c Wed Mar 16 18:11:19 2005
+@@ -202,7 +202,12 @@ erase_alpha_from_4th_color (CMSTransform
+ * called from app_procs.c:app_init()
+ */
+ void cms_init()
+-{ profile_cache = g_hash_table_new(g_str_hash, g_str_equal);
++{
++ GList *remove_settings = NULL;
++ GList *update_settings = NULL;
++ cmsHPROFILE test = NULL;
++
++ profile_cache = g_hash_table_new(g_str_hash, g_str_equal);
+ transform_cache = g_hash_table_new(g_str_hash, g_str_equal);
+ profile_info_buffer = g_new(CMSProfileInfo, 1);
+ profile_info_buffer->manufacturer = NULL;
+@@ -216,9 +221,6 @@ void cms_init()
+ /* suppress lcms errors while checking */
+ cmsErrorAction(LCMS_ERROR_IGNORE);
+
+- GList *remove_settings = NULL;
+- GList *update_settings = NULL;
+- cmsHPROFILE test = NULL;
+
+ /* 1. image profile */
+ if (cms_default_image_profile_name != NULL)
+@@ -476,11 +478,12 @@ cms_read_icc_profile_dir(gchar *path, ic
+ while ((entry = readdir (dir)))
+ { char *file_name = entry->d_name;
+ cmsHPROFILE profile;
++ GString *file_path;
+ if ((strcmp (file_name, "..") == 0) || (strcmp (file_name, ".") == 0))
+ { continue;
+ }
+
+- GString *file_path = g_string_new(NULL);
++ file_path = g_string_new(NULL);
+ g_string_sprintf (file_path, "%s/%s", path, file_name);
+
+ /* Open the file and try to read it using the lcms library
+@@ -517,6 +520,7 @@ cms_read_standard_profile_dirs(icProfile
+ const char *home = GetDirHome();
+ char *directories = g_strdup(cms_profile_path);
+ GString *file_path = g_string_new(NULL);
++ GSList *sub_list;
+
+ /* process path by path, paths are separated by : */
+ char *remaining_directories = directories;
+@@ -531,7 +535,7 @@ cms_read_standard_profile_dirs(icProfile
+ { path = strdup(token);
+ }
+
+- GSList *sub_list = cms_read_icc_profile_dir(path, class);
++ sub_list = cms_read_icc_profile_dir(path, class);
+ return_list = g_slist_concat(return_list, sub_list);
+
+ g_free(path);
+@@ -673,6 +677,7 @@ cms_load_profile_to_mem (char* filename,
+ CMSProfile *
+ cms_get_profile_from_file(char *file_name)
+ { CMSProfile *return_value;
++ ProfileCacheEntry *cache_entry;
+
+ /* get profile information */
+ cmsHPROFILE profile = cmsOpenProfileFromFile (file_name, "r");
+@@ -682,7 +687,7 @@ cms_get_profile_from_file(char *file_nam
+ }
+
+ /* check hash table for profile */
+- ProfileCacheEntry *cache_entry = g_hash_table_lookup(profile_cache,
++ cache_entry = g_hash_table_lookup(profile_cache,
+ (gpointer) cms_get_long_profile_info(profile));
+ if (cache_entry != NULL)
+ { cache_entry->ref_count ++;
+@@ -719,7 +724,8 @@ cms_get_profile_from_file(char *file_nam
+ CMSProfile *
+ cms_get_profile_from_mem(void *mem_pointer, DWORD size)
+ { CMSProfile *return_value;
+-
++ ProfileCacheEntry *cache_entry;
++
+ /* get profile information */
+ cmsHPROFILE profile = cmsOpenProfileFromMem (mem_pointer, size);
+ if (profile == NULL)
+@@ -728,7 +734,7 @@ cms_get_profile_from_mem(void *mem_point
+ }
+
+ /* check hash table for profile */
+- ProfileCacheEntry *cache_entry = g_hash_table_lookup(profile_cache,
++ cache_entry = g_hash_table_lookup(profile_cache,
+ (gpointer) cms_get_long_profile_info(profile));
+ if (cache_entry != NULL)
+ { cache_entry->ref_count ++;
+@@ -788,6 +794,7 @@ cms_get_profile_data(CMSProfile *profile
+ CMSProfile *
+ cms_get_lab_profile(LPcmsCIExyY white_point)
+ { CMSProfile *return_value;
++ ProfileCacheEntry *cache_entry;
+
+ GString *hash_key = g_string_new(NULL);
+ if (white_point)
+@@ -797,7 +804,7 @@ cms_get_lab_profile(LPcmsCIExyY white_po
+ { g_string_sprintf(hash_key, "###LAB###");
+ }
+
+- ProfileCacheEntry *cache_entry = g_hash_table_lookup(profile_cache, (gpointer) hash_key);
++ cache_entry = g_hash_table_lookup(profile_cache, (gpointer) hash_key);
+ if (cache_entry != NULL)
+ { cache_entry->ref_count ++;
+ return_value = cache_entry->profile;
+@@ -970,12 +977,13 @@ cms_return_profile(CMSProfile *profile)
+ { /* search the cache for the profile
+ * decreate ref_counter + possibly close profile
+ */
++ ProfileCacheEntry *entry;
+ if (profile == NULL)
+ { g_warning("cms_return_profile: profile is NULL");
+ return FALSE;
+ }
+
+- ProfileCacheEntry *entry = g_hash_table_lookup(profile_cache, (gpointer)profile->cache_key);
++ entry = g_hash_table_lookup(profile_cache, (gpointer)profile->cache_key);
+ if (entry == NULL)
+ { g_warning("cms_return_profile: profile not found in cache");
+ return FALSE;
+@@ -1008,7 +1016,18 @@ cms_get_transform(GSList *profiles,
+ { /* turn profiles into an array as needed by lcms +
+ check all profiles are registered with the profile cache +
+ create hash key to check transform cache */
++
++ int i;
++ GString *hash_key;
++ CMSProfile *current_profile;
++ GSList *iterator;
++ TransformCacheEntry *cache_entry;
++ cmsHTRANSFORM transform;
++ cmsHPROFILE devicelink;
++ char *file_name;
++
+ int num_profiles = g_slist_length(profiles);
++ cmsHPROFILE profile_array[num_profiles];
+ if (num_profiles == 0)
+ { g_warning("cms_get_transform: profile list is empty, cannot create transfrom");
+ return NULL;
+@@ -1028,12 +1047,9 @@ cms_get_transform(GSList *profiles,
+ return NULL;
+ }
+
+- cmsHPROFILE profile_array[num_profiles];
+- GString *hash_key = g_string_new(NULL);
++ hash_key = g_string_new(NULL);
+
+- int i;
+- CMSProfile *current_profile;
+- GSList *iterator = profiles;
++ iterator = profiles;
+ for (i=0; ((i<num_profiles) && (iterator !=NULL)); i++)
+ { current_profile = (CMSProfile *)iterator->data;
+ if (g_hash_table_lookup(profile_cache, (gpointer)current_profile->cache_key) == NULL)
+@@ -1050,7 +1066,7 @@ cms_get_transform(GSList *profiles,
+ lcms_intent, lcms_flags);
+
+ /* now check the cache */
+- TransformCacheEntry *cache_entry = g_hash_table_lookup(transform_cache, (gpointer) hash_key->str);
++ cache_entry = g_hash_table_lookup(transform_cache, (gpointer) hash_key->str);
+
+ /* if it was in the disc cache */
+ if (cache_entry != NULL)
+@@ -1079,7 +1095,6 @@ cms_get_transform(GSList *profiles,
+ }
+
+ /* if no cache hit, create transform */
+- cmsHTRANSFORM transform;
+ transform = cmsCreateMultiprofileTransform (profile_array,
+ num_profiles,
+ lcms_input_format,
+@@ -1093,8 +1108,8 @@ cms_get_transform(GSList *profiles,
+ }
+
+ /* save it to disk */
+- cmsHPROFILE devicelink = cmsTransform2DeviceLink(transform,0);
+- char *file_name = file_temp_name("icc");
++ devicelink = cmsTransform2DeviceLink(transform,0);
++ file_name = file_temp_name("icc");
+ _cmsSaveProfile(devicelink, file_name);
+ cmsCloseProfile(devicelink);
+
+@@ -1218,6 +1233,12 @@ cms_set_display_profile(CMSProfile *prof
+ void
+ cms_transform_area(CMSTransform *transform, PixelArea *src_area, PixelArea *dest_area)
+ { TransformFunc transform_func;
++ PixelRow src_row_buffer, dest_row_buffer;
++ guint h;
++ void *src_data, *dest_data;
++ guint num_pixels;
++ void *pag;
++
+ Tag src_tag = pixelarea_tag(src_area);
+ Tag dest_tag = pixelarea_tag(dest_area);
+ if (tag_precision(src_tag) != tag_precision(dest_tag))
+@@ -1245,12 +1266,6 @@ cms_transform_area(CMSTransform *transfo
+ }
+
+
+- PixelRow src_row_buffer, dest_row_buffer;
+- guint h;
+- void *src_data, *dest_data;
+- guint num_pixels;
+- void *pag;
+-
+ for (pag = pixelarea_register (1, src_area, dest_area);
+ pag != NULL;
+ pag = pixelarea_process (pag))
+@@ -1321,6 +1336,9 @@ void
+ cms_transform_float(CMSTransform *transform, void *src_data, void *dest_data, int num_pixels)
+ { /* need to convert data to double for lcms's convenience */
+ int i;
++ float *src_fbuffer, *dest_fbuffer;
++ double *dbuffer;
++
+ if (transform <= 1 || !transform->handle)
+ g_warning ("%s:%d %s() transform not allocated\n",
+ __FILE__,__LINE__,__func__);
+@@ -1328,9 +1346,9 @@ cms_transform_float(CMSTransform *transf
+ g_warning ("%s:%d %s() array not allocated\n",
+ __FILE__,__LINE__,__func__);
+
+- float *src_fbuffer = (float *)src_data;
+- float *dest_fbuffer = (float *)dest_data;
+- double *dbuffer = malloc(sizeof(double) * num_pixels * 4);
++ src_fbuffer = (float *)src_data;
++ dest_fbuffer = (float *)dest_data;
++ dbuffer = malloc(sizeof(double) * num_pixels * 4);
+ for (i=0; i < num_pixels * 4; i++)
+ { dbuffer[i]=(double)src_fbuffer[i];
+ }
+@@ -1371,10 +1389,14 @@ static GtkWidget *cms_profile_menu_new(G
+ { GtkWidget *menu;
+ GtkWidget *menuitem;
+ GtkWidget *optionmenu;
++
++ gchar *current_filename;
++ CMSProfile *current_profile;
++ CMSProfileInfo *current_profile_info;
+
+- menu = gtk_menu_new ();
+ GSList *profile_file_names = cms_read_standard_profile_dirs(CMS_ANY_PROFILECLASS);
+ GSList *iterator = profile_file_names;
++ menu = gtk_menu_new ();
+
+ if (can_select_none)
+ { menuitem = gtk_menu_item_new_with_label("[none]");
+@@ -1382,9 +1404,6 @@ static GtkWidget *cms_profile_menu_new(G
+ gtk_object_set_data(GTK_OBJECT(menuitem), "value", NULL);
+ }
+
+- gchar *current_filename;
+- CMSProfile *current_profile;
+- CMSProfileInfo *current_profile_info;
+ while (iterator != NULL)
+ { current_filename = iterator->data;
+ current_profile = cms_get_profile_from_file(current_filename);
+@@ -1414,8 +1433,8 @@ static GtkWidget *cms_intent_menu_new(Gt
+ GtkWidget *menuitem = NULL;
+ GtkWidget *optionmenu = NULL;
+
+- menu = gtk_menu_new ();
+ guint8 *value = NULL;
++ menu = gtk_menu_new ();
+
+ menuitem = gtk_menu_item_new_with_label ("Perceptual");
+ gtk_menu_append (GTK_MENU (menu), menuitem);
+@@ -1593,6 +1612,8 @@ cms_assign_dialog(GImage *image)
+ GtkWidget *label = NULL;
+ GtkWidget *vbox = NULL;
+ GtkWidget *alignment = NULL;
++ CMSProfile *current_profile;
++ GString *profile_string;
+
+ CMSAssignDialogData *data=g_new(CMSAssignDialogData,1);
+ data->image = image;
+@@ -1608,8 +1629,8 @@ cms_assign_dialog(GImage *image)
+ table = gtk_table_new(3, 1, FALSE);
+ gtk_box_pack_start (GTK_BOX (vbox), table, TRUE, TRUE, 0);
+
+- CMSProfile *current_profile = gimage_get_cms_profile(image);
+- GString *profile_string = g_string_new(NULL);
++ current_profile = gimage_get_cms_profile(image);
++ profile_string = g_string_new(NULL);
+
+ if (current_profile == NULL)
+ { g_string_sprintf (profile_string, "[The currently assigned profile is: [none]]");
+@@ -1700,6 +1721,7 @@ cms_open_assign_dialog(GImage *image)
+ GSList *radiogroup = NULL;
+ GtkWidget *vbox = NULL;
+ GtkWidget *alignment = NULL;
++ GString *profile_string;
+
+ CMSOpenAssignDialogData *data=g_new(CMSOpenAssignDialogData,1);
+ data->image = image;
+@@ -1729,7 +1751,7 @@ cms_open_assign_dialog(GImage *image)
+
+ data->profile_menu = cms_profile_menu_new(GTK_TABLE(table), 1, 0, TRUE);
+
+- GString *profile_string = g_string_new(NULL);
++ profile_string = g_string_new(NULL);
+ if (cms_default_image_profile_name == NULL)
+ { g_string_sprintf (profile_string, "The default image profile: [none]");
+ }
+@@ -1796,9 +1818,10 @@ cms_open_assign_dialog_ok_callback(GtkWi
+
+ /* update cms_open_action (global preference variable) */
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(data->always_default_check)))
+- { cms_open_action = CMS_ASSIGN_DEFAULT;
++ {
+ GList *update_settings = NULL;
+ GList *remove_settings = NULL;
++ cms_open_action = CMS_ASSIGN_DEFAULT;
+ update_settings = g_list_append(update_settings, "cms-open-action");
+ save_gimprc(&update_settings, &remove_settings);
+ g_list_free(update_settings);
+@@ -1847,6 +1870,7 @@ cms_convert_on_open_prompt(GImage *image
+ GtkWidget *table;
+ GtkWidget *vbox;
+ GtkWidget *alignment;
++ gboolean return_value;
+
+ CMSConvertOnOpenPromptData *data = g_new(CMSConvertOnOpenPromptData, 1);
+
+@@ -1918,7 +1942,7 @@ cms_convert_on_open_prompt(GImage *image
+ data->event_loop = g_main_new(FALSE);
+ g_main_run(data->event_loop);
+
+- gboolean return_value = data->return_value;
++ return_value = data->return_value;
+ g_main_destroy(data->event_loop);
+ g_free(data);
+
+@@ -1931,9 +1955,9 @@ cms_convert_on_open_prompt_yes_callback
+ { data->return_value = TRUE;
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(data->auto_convert_check)))
+ { /* cms_auto_convert is global preference variable */
+- cms_mismatch_action = CMS_MISMATCH_AUTO_CONVERT;
+ GList *update_settings = NULL;
+ GList *remove_settings = NULL;
++ cms_mismatch_action = CMS_MISMATCH_AUTO_CONVERT;
+ update_settings = g_list_append(update_settings, "cms-mismatch-action");
+ save_gimprc(&update_settings, &remove_settings);
+ g_list_free(update_settings);
diff --git a/graphics/cinepaint/patches/patch-ae b/graphics/cinepaint/patches/patch-ae
new file mode 100644
index 00000000000..2d09dfd7e9c
--- /dev/null
+++ b/graphics/cinepaint/patches/patch-ae
@@ -0,0 +1,73 @@
+$NetBSD: patch-ae,v 1.1 2005/03/16 18:32:50 rillig Exp $
+
+gcc-2.95.3 cannot handle declarations intermixed with code.
+
+--- app/color_correction.c.orig Tue Nov 23 12:58:15 2004
++++ app/color_correction.c Wed Mar 16 18:13:56 2005
+@@ -103,16 +103,19 @@ color_correction_free_transfer_LUTs (voi
+ void
+ color_correction_init_lab_transforms (GImage *image)
+ { CMSProfile *image_profile = gimage_get_cms_profile(image);
++ CMSProfile *lab_profile;
++ GSList *profiles = NULL;
++ Tag t;
++ DWORD lcms_format;
+ if (!image_profile)
+ { image_profile = cms_get_srgb_profile();
+ }
+
+- CMSProfile *lab_profile = cms_get_lab_profile(NULL);
+- GSList *profiles = NULL;
++ lab_profile = cms_get_lab_profile(NULL);
+ profiles = g_slist_append(profiles, image_profile);
+ profiles = g_slist_append(profiles, lab_profile);
+- Tag t = canvas_tag(drawable_data(gimage_active_drawable(image)));
+- DWORD lcms_format = cms_get_lcms_format(t, image_profile);
++ t = canvas_tag(drawable_data(gimage_active_drawable(image)));
++ lcms_format = cms_get_lcms_format(t, image_profile);
+ color_correction_to_lab_transform = cms_get_transform(profiles, lcms_format, TYPE_Lab_16, INTENT_PERCEPTUAL, 0);
+
+ profiles = g_slist_remove(profiles, image_profile);
+@@ -141,6 +144,13 @@ color_correction (PixelArea *src_area,
+ /* r,g,b values of the colour we are interpolating with, sat and lightness */
+ gfloat rgb[3][3];
+ int i=0;
++ gint width, height, num_channels, row_overhead;
++ gboolean has_alpha;
++ guint16 Lab[3],new_Lab[3];
++ gint16 new_col[3];
++ /* buffers to hold a colour value in float, used with HLS */
++ float fcol[3], fnew_col[3];
++ guint8 *s, *d;
+
+ /* get the fully saturated colour of given hue in rgb
+ this is the colour we are moving towards/interpolating with */
+@@ -155,21 +165,17 @@ color_correction (PixelArea *src_area,
+ i++;
+ }
+
+- gint width = pixelarea_width(src_area);
+- gint height = pixelarea_height(src_area);
+- gint num_channels = tag_num_channels(pixelarea_tag(src_area));
++ width = pixelarea_width(src_area);
++ height = pixelarea_height(src_area);
++ num_channels = tag_num_channels(pixelarea_tag(src_area));
+ /* overhead is in pixels */
+- gint row_overhead = pixelarea_rowstride(src_area)/pixelarea_bytes(src_area) - width;
+- gboolean has_alpha = tag_alpha(pixelarea_tag(src_area)) == ALPHA_YES ? TRUE : FALSE;
++ row_overhead = pixelarea_rowstride(src_area)/pixelarea_bytes(src_area) - width;
++ has_alpha = tag_alpha(pixelarea_tag(src_area)) == ALPHA_YES ? TRUE : FALSE;
+
+ /* buffers to hold a Lab colour value, used with Lab */
+- guint16 Lab[3],new_Lab[3];
+- gint16 new_col[3];
+- /* buffers to hold a colour value in float, used with HLS */
+- float fcol[3], fnew_col[3];
+
+- guint8 *s = (guint8 *)pixelarea_data(src_area);
+- guint8 *d = (guint8 *)pixelarea_data(dest_area);
++ s = (guint8 *)pixelarea_data(src_area);
++ d = (guint8 *)pixelarea_data(dest_area);
+ while (height--)
+ {
+ while (width--) {
diff --git a/graphics/cinepaint/patches/patch-af b/graphics/cinepaint/patches/patch-af
new file mode 100644
index 00000000000..56a3d0c7dbc
--- /dev/null
+++ b/graphics/cinepaint/patches/patch-af
@@ -0,0 +1,250 @@
+$NetBSD: patch-af,v 1.1 2005/03/16 18:32:50 rillig Exp $
+
+gcc-2.95.3 cannot handle declarations intermixed with code.
+
+--- app/color_correction_gui.c.orig Tue Nov 23 12:58:15 2004
++++ app/color_correction_gui.c Wed Mar 16 18:24:44 2005
+@@ -246,12 +246,14 @@ static void _color_correction_gui_save_p
+
+ void
+ color_correction_gui (GDisplay *display)
+-{ if (! drawable_color (gimage_active_drawable (display->gimage)))
++{
++ _ColorCorrectionGui *data;
++ if (! drawable_color (gimage_active_drawable (display->gimage)))
+ { g_message ("Color correction operates only on RGB color drawables.");
+ return;
+ }
+
+- _ColorCorrectionGui *data = g_new(_ColorCorrectionGui, 1);
++ data = g_new(_ColorCorrectionGui, 1);
+ data->display = display;
+ data->active=TRUE;
+ data->image_map = image_map_create (data->display,
+@@ -280,6 +282,7 @@ _color_correction_gui_create (_ColorCorr
+ GtkWidget *label =NULL;
+ GtkWidget *notebook = NULL;
+ GtkWidget *frame = NULL;
++ int i;
+
+
+ /*** MAIN SHELL AND NOTEBOOK */
+@@ -308,9 +311,14 @@ _color_correction_gui_create (_ColorCorr
+ gtk_notebook_append_page(GTK_NOTEBOOK(notebook), hbox, button);
+
+ /*** WHEELS + SLIDERS + INPUTS ***/
+- int i;
+ for (i=SHADOWS; i<=HIGHLIGHTS; i++)
+- { data->settings->values[i][HUE]=0.0;
++ {
++ _ColorCorrectionGuiWheel *wheel_data;
++ _ColorCorrectionGuiLSlider *lslider_data;
++ GtkObject *hue_adjustment, *saturation_adjustment, *lightness_adjustment;
++ _ColorCorrectionGuiSpin *spin_data;
++
++ data->settings->values[i][HUE]=0.0;
+ data->settings->values[i][SATURATION]=0.0;
+ data->settings->values[i][LIGHTNESS]=0.0;
+
+@@ -334,7 +342,7 @@ _color_correction_gui_create (_ColorCorr
+ /* WHEEL */
+ data->color_wheels[i] = gtk_drawing_area_new ();
+ gtk_drawing_area_size(GTK_DRAWING_AREA(data->color_wheels[i]), WHEEL_RADIUS*2+2,WHEEL_RADIUS*2+2);
+- _ColorCorrectionGuiWheel *wheel_data=g_new(_ColorCorrectionGuiWheel, 1);
++ wheel_data=g_new(_ColorCorrectionGuiWheel, 1);
+ wheel_data->range = i;
+ wheel_data->pixmap = NULL;
+ wheel_data->display_buffer = NULL;
+@@ -366,7 +374,7 @@ _color_correction_gui_create (_ColorCorr
+ // gtk_widget_set_style(frame, style);
+
+ data->lsliders[i] = gtk_drawing_area_new();
+- _ColorCorrectionGuiLSlider *lslider_data = g_new(_ColorCorrectionGuiLSlider, 1);
++ lslider_data = g_new(_ColorCorrectionGuiLSlider, 1);
+ lslider_data->range= i;
+ lslider_data->gc = NULL;
+ lslider_data->pixmap = NULL;
+@@ -384,15 +392,15 @@ _color_correction_gui_create (_ColorCorr
+
+
+ /* INNPUTS */
+- GtkObject *hue_adjustment = gtk_adjustment_new(0.0, 0.0, 360.0, 1.0, 0.0, 0.0);
+- GtkObject *saturation_adjustment = gtk_adjustment_new(0.0, 0.0, 100.0, 1.0, 0.0, 0.0);
+- GtkObject *lightness_adjustment = gtk_adjustment_new(0.0, 0.0, 100.0, 1.0, 0.0, 0.0);
++ hue_adjustment = gtk_adjustment_new(0.0, 0.0, 360.0, 1.0, 0.0, 0.0);
++ saturation_adjustment = gtk_adjustment_new(0.0, 0.0, 100.0, 1.0, 0.0, 0.0);
++ lightness_adjustment = gtk_adjustment_new(0.0, 0.0, 100.0, 1.0, 0.0, 0.0);
+
+ hbox = gtk_hbox_new(FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 3);
+
+
+- _ColorCorrectionGuiSpin *spin_data = g_new(_ColorCorrectionGuiSpin, 1);
++ spin_data = g_new(_ColorCorrectionGuiSpin, 1);
+ spin_data->range = i;
+ spin_data->attribute = HUE;
+ label = gtk_label_new("H");
+@@ -501,10 +509,10 @@ static void
+ _color_correction_gui_update_wheel_handle (_ColorCorrectionGui *dialog,
+ ColorCorrectionLightnessRange range)
+ { _ColorCorrectionGuiWheel *data;
++ gint new_pos[2];
+ data = (_ColorCorrectionGuiWheel *)gtk_object_get_data(GTK_OBJECT(dialog->color_wheels[range]),
+ "data");
+
+- gint new_pos[2];
+ _color_correction_gui_wheel_hs_to_pos(dialog->settings->values[range][HUE],
+ dialog->settings->values[range][SATURATION],
+ data->radius, data->radius,
+@@ -521,10 +529,11 @@ static void
+ _color_correction_gui_update_lslider_handle (_ColorCorrectionGui *dialog,
+ ColorCorrectionLightnessRange range)
+ { _ColorCorrectionGuiLSlider *data;
++ gint new_position;
+ data = (_ColorCorrectionGuiLSlider *)gtk_object_get_data(GTK_OBJECT(dialog->lsliders[range]),
+ "data");
+
+- gint new_position = (0.5-dialog->settings->values[range][LIGHTNESS]) * data->height;
++ new_position = (0.5-dialog->settings->values[range][LIGHTNESS]) * data->height;
+ if (new_position != data->position)
+ { _color_correction_gui_erase_lslider_handle(dialog->lsliders[range], data);
+ data->position = new_position;
+@@ -625,13 +634,13 @@ _color_correction_gui_wheel_events_cb (G
+ { data->active = data->active ? FALSE : TRUE;
+ if (data->active)
+ {
++ _ColorCorrectionGuiLSlider *slider_data;
+ /* reset values from positions */
+ _color_correction_gui_wheel_pos_to_hs(data->position[X]-data->x,
+ data->position[Y]-data->y,
+ data->radius, data->radius,
+ &dialog->settings->values[data->range][HUE],
+ &dialog->settings->values[data->range][SATURATION]);
+- _ColorCorrectionGuiLSlider *slider_data;
+ slider_data = (_ColorCorrectionGuiLSlider *)gtk_object_get_data(GTK_OBJECT(dialog->lsliders[data->range]),
+ "data");
+ dialog->settings->values[data->range][LIGHTNESS] = (1-slider_data->position/(gfloat)slider_data->height) - 0.5;
+@@ -697,6 +706,7 @@ _color_correction_gui_lslider_events_cb
+ GdkEvent *event,
+ _ColorCorrectionGui *dialog)
+ { _ColorCorrectionGuiLSlider *data = (_ColorCorrectionGuiLSlider *)gtk_object_get_data(GTK_OBJECT(widget), "data");
++ gfloat new_lightness;
+
+ switch (event->type)
+ {
+@@ -716,7 +726,7 @@ _color_correction_gui_lslider_events_cb
+ _color_correction_gui_erase_lslider_handle(widget, data);
+
+ data->position=event->button.y;
+- gfloat new_lightness = (1-data->position/(gfloat)data->height) -0.5;
++ new_lightness = (1-data->position/(gfloat)data->height) -0.5;
+ if (dialog->settings->values[data->range][LIGHTNESS] != new_lightness)
+ { if(dialog->settings->values[data->range][LIGHTNESS] == 0)
+ { dialog->settings->lightness_modified ++;
+@@ -740,7 +750,7 @@ _color_correction_gui_lslider_events_cb
+ if (data->dragging)
+ { _color_correction_gui_erase_lslider_handle(widget, data);
+ data->position=event->button.y;
+- gfloat new_lightness = (1-data->position/(gfloat)data->height) -0.5;
++ new_lightness = (1-data->position/(gfloat)data->height) -0.5;
+ if (dialog->settings->values[data->range][LIGHTNESS] != new_lightness)
+ { if(dialog->settings->values[data->range][LIGHTNESS] == 0)
+ { dialog->settings->lightness_modified ++;
+@@ -843,6 +853,7 @@ _color_correction_gui_draw_wheel (GtkWid
+ gfloat h,s,l;
+ guchar color[3];
+ _ColorCorrectionGuiWheel *data = (_ColorCorrectionGuiWheel *)gtk_object_get_data(GTK_OBJECT(drawing_area), "data");
++ int xmax, ymax;
+
+ /* translate the marker to the new size */
+ gint new_width, new_height;
+@@ -875,7 +886,6 @@ _color_correction_gui_draw_wheel (GtkWid
+ TRUE, 0,0, data->width, data->height);
+
+ /* iterate over wheel calculating hue and saturation */
+- int xmax, ymax;
+ data->x = data->width/2-data->radius;
+ data->y = data->height/2-data->radius;
+ xmax = data->x + 2 * data->radius;
+@@ -903,14 +913,20 @@ _color_correction_gui_draw_wheel (GtkWid
+
+ static void
+ _color_correction_gui_draw_wheel_handle (GtkWidget *drawing_area, _ColorCorrectionGuiWheel *data)
+-{ gdk_gc_set_foreground(data->gc, &GTK_WIDGET(drawing_area)->style->black);
++{
++ GdkRectangle update_area;
++
++ gdk_gc_set_foreground(data->gc, &GTK_WIDGET(drawing_area)->style->black);
+
+ gdk_draw_arc(data->display_buffer, data->gc, FALSE,
+ data->position[X]-5, data->position[Y]-5,
+ 10,10,0,23040); /* last two params are angle in 1/64th of degree */
+ gdk_draw_point(data->display_buffer, data->gc,
+ data->position[X], data->position[Y]);
+- GdkRectangle update_area = {data->position[X]-5, data->position[Y]-5, 11, 11};
++ update_area.x = data->position[X]-5;
++ update_area.y = data->position[Y]-5;
++ update_area.width = 11;
++ update_area.height = 11;
+ gtk_widget_draw(drawing_area, &update_area);
+ }
+
+@@ -931,6 +947,7 @@ _color_correction_gui_erase_wheel_handle
+ static void
+ _color_correction_gui_draw_wheel_toggle(GtkWidget *drawing_area)
+ { _ColorCorrectionGuiWheel *data = (_ColorCorrectionGuiWheel *)gtk_object_get_data(GTK_OBJECT(drawing_area), "data");
++ GdkRectangle update_area = {3,3,27,19};
+ if (data->active)
+ { gdk_rgb_gc_set_foreground(data->gc, 0x777777);
+ gdk_draw_rectangle(data->display_buffer, data->gc, TRUE, 3,3, 26, 19);
+@@ -966,7 +983,6 @@ _color_correction_gui_draw_wheel_toggle(
+ color_correction_wheel_labels[data->range], 3);
+ }
+
+- GdkRectangle update_area = {3,3,27,19};
+ gtk_widget_draw(drawing_area, &update_area);
+ }
+
+@@ -1063,7 +1079,8 @@ static void
+ _color_correction_gui_draw_lslider (GtkWidget *drawing_area)
+ { _ColorCorrectionGuiLSlider *data = (_ColorCorrectionGuiLSlider *)gtk_object_get_data(GTK_OBJECT(drawing_area), "data");
+ gint y;
+-
++ int step_size, gray;
++
+ data->height = drawing_area->allocation.height;
+
+ if (data->gc == NULL)
+@@ -1084,8 +1101,7 @@ _color_correction_gui_draw_lslider (GtkW
+
+ /* draw the slider */
+ gdk_gc_set_function(data->gc, GDK_COPY);
+- int step_size = 255/data->height;
+- int gray;
++ step_size = 255/data->height;
+ for (y = 0; y < data->height; y++)
+ { gray=255-(y*step_size);
+ gdk_rgb_gc_set_foreground(data->gc, (gray<<16) | (gray<<8) | gray);
+@@ -1102,7 +1118,9 @@ _color_correction_gui_draw_lslider (GtkW
+
+ static void
+ _color_correction_gui_draw_lslider_handle (GtkWidget *drawing_area, _ColorCorrectionGuiLSlider *data)
+-{ gdk_gc_set_foreground(data->gc, &drawing_area->style->white);
++{
++ GdkRectangle update_area;
++ gdk_gc_set_foreground(data->gc, &drawing_area->style->white);
+ gdk_draw_line(data->display_buffer, data->gc,
+ 0, data->position-2, LSLIDER_WIDTH, data->position-2);
+ gdk_gc_set_foreground(data->gc, &drawing_area->style->mid[GTK_STATE_NORMAL]);
+@@ -1112,7 +1130,10 @@ _color_correction_gui_draw_lslider_handl
+ gdk_draw_line(data->display_buffer, data->gc,
+ 0, data->position+2, LSLIDER_WIDTH, data->position+2);
+
+- GdkRectangle update_area = {0, data->position-2, LSLIDER_WIDTH, 5};
++ update_area.x = 0;
++ update_area.y = data->position-2;
++ update_area.width = LSLIDER_WIDTH;
++ update_area.height = 5;
+ gtk_widget_draw(drawing_area, &update_area);
+ }
+
diff --git a/graphics/cinepaint/patches/patch-ag b/graphics/cinepaint/patches/patch-ag
new file mode 100644
index 00000000000..0f2864a3348
--- /dev/null
+++ b/graphics/cinepaint/patches/patch-ag
@@ -0,0 +1,38 @@
+$NetBSD: patch-ag,v 1.1 2005/03/16 18:32:50 rillig Exp $
+
+gcc-2.95.3 cannot handle declarations intermixed with code.
+
+--- app/convert.c.orig Tue Nov 23 12:58:15 2004
++++ app/convert.c Wed Mar 16 18:25:45 2005
+@@ -310,6 +310,9 @@ convert_image_colorspace (void *gimage_p
+ /* get the profiles */
+ GSList *profiles = NULL;
+ CMSProfile *image_profile = gimage_get_cms_profile(image);
++ DWORD lcms_format_in, lcms_format_out;
++ CMSTransform *transform;
++
+ if (image_profile == NULL)
+ { g_warning("convert_image_colourspace: No cms profile assigned to gimage. Cannot convert.");
+ return;
+@@ -318,10 +321,10 @@ convert_image_colorspace (void *gimage_p
+ profiles = g_slist_append(profiles, (gpointer)new_profile);
+
+ /* assuming all layers have homogenous alpha */
+- DWORD lcms_format_in = cms_get_lcms_format(
++ lcms_format_in = cms_get_lcms_format(
+ drawable_tag(GIMP_DRAWABLE(image->active_layer)),
+ gimage_get_cms_profile(image) );
+- DWORD lcms_format_out = cms_get_lcms_format(
++ lcms_format_out = cms_get_lcms_format(
+ drawable_tag(GIMP_DRAWABLE(image->active_layer)),
+ new_profile );
+ if (!(int)lcms_format_in || !(int)lcms_format_out)
+@@ -330,7 +333,7 @@ convert_image_colorspace (void *gimage_p
+ return;
+ }
+
+- CMSTransform *transform = cms_get_transform(profiles, lcms_format_in, lcms_format_out, lcms_intent, cms_default_flags);
++ transform = cms_get_transform(profiles, lcms_format_in, lcms_format_out, lcms_intent, cms_default_flags);
+ g_slist_free(profiles);
+ gimage_transform_colors(image, transform, TRUE);
+ cms_return_transform(transform);
diff --git a/graphics/cinepaint/patches/patch-ah b/graphics/cinepaint/patches/patch-ah
new file mode 100644
index 00000000000..83b360e57fe
--- /dev/null
+++ b/graphics/cinepaint/patches/patch-ah
@@ -0,0 +1,42 @@
+$NetBSD: patch-ah,v 1.1 2005/03/16 18:32:50 rillig Exp $
+
+gcc-2.95.3 cannot handle declarations intermixed with code.
+
+--- app/depth/commands.c.orig Fri Dec 3 21:25:34 2004
++++ app/depth/commands.c Wed Mar 16 17:38:10 2005
+@@ -2136,7 +2136,7 @@ file_pref_cmd_callback (GtkWidget *widge
+ (gpointer)&cms_default_image_profile_name );
+ gtk_menu_set_active(GTK_MENU(menu), 0);
+
+- GSList *profile_file_names = cms_read_standard_profile_dirs(CMS_ANY_PROFILECLASS);
++ {GSList *profile_file_names = cms_read_standard_profile_dirs(CMS_ANY_PROFILECLASS);
+ GSList *iterator = profile_file_names;
+ gchar *current_filename;
+ CMSProfile *current_profile;
+@@ -2280,7 +2280,7 @@ file_pref_cmd_callback (GtkWidget *widge
+ gtk_widget_show(label);
+
+ menu = gtk_menu_new ();
+- guint8 *value;
++ {guint8 *value;
+ menuitem = gtk_menu_item_new_with_label ("Perceptual");
+ gtk_menu_append (GTK_MENU (menu), menuitem);
+ value = g_new(guint8, 1);
+@@ -2347,7 +2347,7 @@ file_pref_cmd_callback (GtkWidget *widge
+ gtk_widget_show(label);
+
+ menu = gtk_menu_new ();
+- guint16 *value16;
++ {guint16 *value16;
+ menuitem = gtk_menu_item_new_with_label ("CMM default");
+ gtk_menu_append (GTK_MENU (menu), menuitem);
+ value16 = g_new(guint16, 1);
+@@ -2558,7 +2558,7 @@ file_pref_cmd_callback (GtkWidget *widge
+ label = gtk_label_new ("Color Management");
+ gtk_notebook_append_page (GTK_NOTEBOOK(notebook), out_frame, label);
+ gtk_widget_show (notebook);
+- }
++ }}}}
+
+ gtk_widget_show (prefs_dlg);
+ }
diff --git a/graphics/cinepaint/patches/patch-ai b/graphics/cinepaint/patches/patch-ai
new file mode 100644
index 00000000000..6d867979cf4
--- /dev/null
+++ b/graphics/cinepaint/patches/patch-ai
@@ -0,0 +1,22 @@
+$NetBSD: patch-ai,v 1.1 2005/03/16 18:32:50 rillig Exp $
+
+gcc-2.95.3 cannot handle declarations intermixed with code.
+
+--- app/depth/layer.c.orig Tue Dec 28 17:22:01 2004
++++ app/depth/layer.c Wed Mar 16 17:39:33 2005
+@@ -197,6 +197,7 @@ layer_new (
+ )
+ {
+ Layer * layer;
++ SplineTool *st;
+
+ if (width == 0 || height == 0) {
+ g_message ("Zero width or height layers not allowed.");
+@@ -233,7 +234,6 @@ layer_new (
+ layer->fs.num_segs = 0;
+
+ /* spline layer variables */
+- SplineTool *st;
+ layer->sl.splines=(DL_list*)malloc(sizeof(DL_list));
+ DL_init((DL_node*)layer->sl.splines);
+ st=(SplineTool*)malloc(sizeof(SplineTool));
diff --git a/graphics/cinepaint/patches/patch-aj b/graphics/cinepaint/patches/patch-aj
new file mode 100644
index 00000000000..863b4987ad6
--- /dev/null
+++ b/graphics/cinepaint/patches/patch-aj
@@ -0,0 +1,22 @@
+$NetBSD: patch-aj,v 1.1 2005/03/16 18:32:50 rillig Exp $
+
+gcc-2.95.3 cannot handle declarations intermixed with code.
+
+--- app/depth/levels.c.orig Tue Nov 23 13:01:51 2004
++++ app/depth/levels.c Wed Mar 16 17:47:55 2005
+@@ -4173,13 +4173,12 @@ levels_reset_callback (GtkWidget *
+ {
+ LevelsDialog *ld;
+ HistogramValues *values;
++ int single, channel;
+
+ ld = levels_dialog;
+ values = histogram_values (ld->histogram);
+
+- int single = FALSE,
+- channel;
+-
++ single = FALSE;
+ channel = ld->channel;
+
+ if (channel != HISTOGRAM_VALUE)
diff --git a/graphics/cinepaint/patches/patch-ak b/graphics/cinepaint/patches/patch-ak
new file mode 100644
index 00000000000..3d5b8662370
--- /dev/null
+++ b/graphics/cinepaint/patches/patch-ak
@@ -0,0 +1,25 @@
+$NetBSD: patch-ak,v 1.1 2005/03/16 18:32:50 rillig Exp $
+
+gcc-2.95.3 cannot handle declarations intermixed with code.
+
+--- app/fileops.c.orig Tue Nov 23 12:58:14 2004
++++ app/fileops.c Wed Mar 16 18:29:30 2005
+@@ -2021,6 +2021,7 @@ file_temp_name(char *extension)
+ static gint pid;
+
+ GString *s = g_string_new (NULL);
++ char *file_name;
+
+ if (id == 0)
+ { pid = getpid();
+@@ -2030,8 +2031,8 @@ file_temp_name(char *extension)
+ id++, extension);
+
+
+- char *file_name = strdup(s->str);
+- g_string_free (s, FALSE);
++ file_name = strdup(s->str); /* FIXME: possible null pointer access */
++ g_string_free (s, FALSE); /* FIXME: memory leak */
+ return file_name;
+ }
+
diff --git a/graphics/cinepaint/patches/patch-al b/graphics/cinepaint/patches/patch-al
new file mode 100644
index 00000000000..351d681f7c1
--- /dev/null
+++ b/graphics/cinepaint/patches/patch-al
@@ -0,0 +1,121 @@
+$NetBSD: patch-al,v 1.1 2005/03/16 18:32:50 rillig Exp $
+
+gcc-2.95.3 cannot handle declarations intermixed with code.
+
+--- app/gdisplay.c.orig Fri Dec 3 23:16:18 2004
++++ app/gdisplay.c Wed Mar 16 18:32:58 2005
+@@ -90,6 +90,7 @@ gdisplay_new (GImage *gimage,
+ GSList *cur_wid_list;
+ char title [MAX_TITLE_BUF];
+ int instance;
++ Tag t;
+
+ /* If there isn't an interface, never create a gdisplay */
+ if (no_interface)
+@@ -181,7 +182,7 @@ gdisplay_new (GImage *gimage,
+ gdisplays_update_title (gimage->ID);
+
+ /* initialize the projection */
+- Tag t = gimage_tag (gdisp->gimage);
++ t = gimage_tag (gdisp->gimage);
+ t = tag_set_alpha (t, ALPHA_YES);
+ if (tag_format (t) == FORMAT_INDEXED)
+ { t = tag_set_format (t, FORMAT_RGB);
+@@ -225,11 +226,11 @@ gdisplay_format_title (GImage *gimage,
+ int empty = gimage_is_empty (gimage);
+ Tag t = gimage_tag (gimage);
+ char *alpha_msg = ""; /*"no alpha";*/
++ const char *profile;
+ if (layer_has_alpha(gimage->active_layer)){
+ alpha_msg = "A"; /*"alpha";*/
+ }
+
+- const char *profile;
+ if (gimage_get_cms_profile(gimage) != NULL)
+ { profile = cms_get_profile_info(gimage_get_cms_profile(gimage))->description;
+ }
+@@ -373,6 +374,8 @@ gdisplay_process_area_list (GSList *list
+ static void
+ gdisplay_project (GDisplay *display, int x, int y, int w, int h)
+ { /* realloc projection if necessary */
++ PixelArea image_projection_area;
++ PixelArea display_projection_area;
+ if((display->gimage->width != canvas_width(display->projection)) ||
+ (display->gimage->height != canvas_height(display->projection)) ||
+ (canvas_tag(display->projection) != canvas_tag(gimage_projection(display->gimage))))
+@@ -400,8 +403,6 @@ gdisplay_project (GDisplay *display, int
+
+
+ /* Stefan Klein: temporary solution, just copy projection calculated in gimage */
+- PixelArea image_projection_area;
+- PixelArea display_projection_area;
+
+ gimage_construct(display->gimage, x,y,w,h);
+ pixelarea_init (&image_projection_area, gimage_projection(display->gimage), x,y,w,h, FALSE);
+@@ -1918,7 +1919,9 @@ gdisplay_set_cms_flags(GDisplay *display
+
+ gboolean
+ gdisplay_set_colormanaged(GDisplay *display, gboolean colormanaged)
+-{ if (colormanaged != display->colormanaged)
++{
++ GString *buffer;
++ if (colormanaged != display->colormanaged)
+ { if ((colormanaged == TRUE) && (gimage_get_cms_profile(display->gimage) == NULL))
+ { g_warning("gdisplay_set_colormanaged: cannot colormanage. no display profile defined");
+ return FALSE;
+@@ -1930,7 +1933,7 @@ gdisplay_set_colormanaged(GDisplay *disp
+
+ display->colormanaged = colormanaged;
+ /* set the toggle menu */
+- GString *buffer = g_string_new(NULL);
++ buffer = g_string_new(NULL);
+ g_string_sprintf(buffer, "<Image%d>/View/Colormanage Display", display->unique_id);
+ menus_set_state (buffer->str, colormanaged);
+ g_string_free(buffer, TRUE);
+@@ -1945,15 +1948,17 @@ gdisplay_set_colormanaged(GDisplay *disp
+
+ gboolean
+ gdisplay_all_set_colormanaged(gboolean colormanaged)
+-{ if ((colormanaged == TRUE) && (cms_display_profile_name == NULL))
++{
++ gboolean some_without_profile = FALSE;
++ GSList *list = display_list;
++ GDisplay *current_display;
++ GString *buffer;
++ if ((colormanaged == TRUE) && (cms_display_profile_name == NULL))
+ { g_warning("gdisplay_all_set_colormanaged: cannot colormanage. no display profile defined");
+ return FALSE;
+ }
+
+- gboolean some_without_profile = FALSE;
+- GSList *list = display_list;
+- GDisplay *current_display;
+- GString *buffer = g_string_new(NULL);
++ buffer = g_string_new(NULL);
+
+ /* traverse the linked list of displays */
+ while (list)
+@@ -1986,15 +1991,18 @@ gdisplay_all_set_colormanaged(gboolean c
+
+ gboolean
+ gdisplay_image_set_colormanaged(int image_id, gboolean colormanaged)
+-{ if ((colormanaged == TRUE) && (cms_display_profile_name == NULL))
++{
++ gboolean some_without_profile = FALSE;
++ GSList *list = display_list;
++ GDisplay *current_display;
++ GString *buffer;
++
++ if ((colormanaged == TRUE) && (cms_display_profile_name == NULL))
+ { g_warning("gdisplay_image_set_colormanaged: cannot colormanage. no display profile defined");
+ return FALSE;
+ }
+
+- gboolean some_without_profile = FALSE;
+- GSList *list = display_list;
+- GDisplay *current_display;
+- GString *buffer = g_string_new(NULL);
++ buffer = g_string_new(NULL);
+
+ /* traverse the linked list of displays */
+ while (list)
diff --git a/graphics/cinepaint/patches/patch-am b/graphics/cinepaint/patches/patch-am
new file mode 100644
index 00000000000..3ed5b41ff43
--- /dev/null
+++ b/graphics/cinepaint/patches/patch-am
@@ -0,0 +1,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);
diff --git a/graphics/cinepaint/patches/patch-an b/graphics/cinepaint/patches/patch-an
new file mode 100644
index 00000000000..7860b444d4d
--- /dev/null
+++ b/graphics/cinepaint/patches/patch-an
@@ -0,0 +1,337 @@
+$NetBSD: patch-an,v 1.1 2005/03/16 18:32:50 rillig Exp $
+
+gcc-2.95.3 cannot handle declarations intermixed with code.
+
+--- app/look_profile.c.orig Tue Nov 23 12:58:14 2004
++++ app/look_profile.c Wed Mar 16 18:45:54 2005
+@@ -90,9 +90,10 @@ look_profile_change_image_height(GImage
+ list = gimage->channels;
+ list = g_slist_append(list, gimage->selection_mask);
+ while (list)
+- { channel = (Channel *) list->data;
++ {
+ PixelArea src_area, dest_area;
+ Canvas *new_canvas;
++ channel = (Channel *) list->data;
+
+ /* Update the old channel position */
+ drawable_update (GIMP_DRAWABLE(channel),
+@@ -194,13 +195,16 @@ look_profile_change_layer_height(Layer *
+
+ /* If there is a layer mask, make sure it gets resized also */
+ if (layer->mask)
+- { GIMP_DRAWABLE(layer->mask)->offset_x = GIMP_DRAWABLE(layer)->offset_x;
++ {
++ Channel *channel;
++ PixelArea src_area, dest_area;
++ Canvas *new_canvas;
++
++ GIMP_DRAWABLE(layer->mask)->offset_x = GIMP_DRAWABLE(layer)->offset_x;
+ GIMP_DRAWABLE(layer->mask)->offset_y = GIMP_DRAWABLE(layer)->offset_y;
+
+
+- Channel* channel = GIMP_CHANNEL(layer->mask);
+- PixelArea src_area, dest_area;
+- Canvas *new_canvas;
++ channel = GIMP_CHANNEL(layer->mask);
+
+ /* Update the old channel position */
+ drawable_update (GIMP_DRAWABLE(channel),
+@@ -253,6 +257,18 @@ look_profile_change_layer_height(Layer *
+ LookProfile *
+ look_profile_create(GImage *image, gint sample_depth)
+ { LookProfile *look_profile;
++ PixelArea sample_area;
++ CMSProfile *lab_profile, *input_profile;
++ GSList *profiles = NULL;
++ DWORD lcms_format_out;
++ CMSTransform *transform;
++ guint16 Lab[3];
++ guint8 rgb[3];
++ PixelRow row_buffer;
++ void *pag;
++ gint col_index;
++ guint8 *row_data;
++ gint sample_step;
+
+ gint num_pix = pow(sample_depth, 3);
+
+@@ -267,37 +283,32 @@ look_profile_create(GImage *image, gint
+ #endif
+
+
+- PixelArea sample_area;
+ pixelarea_init(&sample_area, look_profile->canvas,
+ 0, 0, canvas_width(look_profile->canvas), 1, TRUE);
+
+ /* get a lab->rgb transform
+ (the reference strip is calculated iterating over Lab, the image is rgb) */
+- CMSProfile *lab_profile = cms_get_lab_profile(NULL);
+- CMSProfile *input_profile = gimage_get_cms_profile(image);
++ lab_profile = cms_get_lab_profile(NULL);
++ input_profile = gimage_get_cms_profile(image);
+ if (!input_profile)
+ { input_profile = cms_get_srgb_profile();
+ }
+
+- GSList *profiles = NULL;
+ profiles = g_slist_append(profiles, lab_profile);
+ profiles = g_slist_append(profiles, input_profile);
+- DWORD lcms_format_out= cms_get_lcms_format(gimage_tag(image),input_profile);
+- CMSTransform *transform = cms_get_transform(profiles, TYPE_Lab_16,
++ lcms_format_out= cms_get_lcms_format(gimage_tag(image),input_profile);
++ transform = cms_get_transform(profiles, TYPE_Lab_16,
+ lcms_format_out,
+ INTENT_PERCEPTUAL,
+ cms_default_flags);
+ g_slist_free(profiles);
+
+ /* iterate over Lab space, converting to rgb, filling into picture */
+- guint16 Lab[3];
+- guint8 rgb[3];
+- PixelRow row_buffer;
+- void *pag = pixelarea_register (1, &sample_area);
++ pag = pixelarea_register (1, &sample_area);
+ pixelarea_getdata (&sample_area, &row_buffer, 0);
+- gint col_index = pixelrow_width(&row_buffer);
+- guint8 *row_data = pixelrow_data(&row_buffer);
+- gint sample_step = 65535/(sample_depth-1);
++ col_index = pixelrow_width(&row_buffer);
++ row_data = pixelrow_data(&row_buffer);
++ sample_step = 65535/(sample_depth-1);
+
+ Lab[0]=Lab[1]=Lab[2]=0;
+ while (TRUE)
+@@ -384,8 +395,10 @@ look_profile_new_dialog ()
+ void
+ look_profile_include (LookProfile *profile, ImageMapApplyFunc func, void *data)
+ { PixelArea src_area, dest_area;
++ Canvas *new_canvas;
++ void *pag;
+ pixelarea_init(&src_area, profile->canvas, 0,0, canvas_width(profile->canvas), 1, FALSE);
+- Canvas *new_canvas= canvas_new (canvas_tag(profile->canvas), canvas_width(profile->canvas), 1,
++ new_canvas= canvas_new (canvas_tag(profile->canvas), canvas_width(profile->canvas), 1,
+ #ifdef NO_TILES
+ STORAGE_FLAT);
+ #else
+@@ -393,7 +406,6 @@ look_profile_include (LookProfile *profi
+ #endif
+ pixelarea_init(&dest_area, new_canvas, 0,0, canvas_width(profile->canvas), 1, TRUE);
+
+- void *pag;
+ for (pag = pixelarea_register (2, &src_area, &dest_area);
+ pag != NULL;
+ pag = pixelarea_process (pag))
+@@ -431,6 +443,13 @@ void
+ look_profile_save (LookProfile *profile,
+ gchar *file_name, int intent, DWORD flags)
+ { /* create a new profile, abstract, Lab */
++ LPLUT AToB0;
++ SampleInfo *sample_info;
++ CMSProfile *input_profile, *lab_profile;
++ Tag t;
++ GSList *profiles = NULL;
++ PixelRow row_buffer;
++
+ cmsHPROFILE saved_profile = cmsOpenProfileFromFile(file_name, "w");
+ cmsSetColorSpace(saved_profile, icSigLabData);
+ cmsSetPCS(saved_profile, icSigLabData);
+@@ -438,22 +457,21 @@ look_profile_save (LookProfile *profile,
+
+ cmsSetDeviceClass(saved_profile, icSigAbstractClass);
+
+- LPLUT AToB0 = cmsAllocLUT();
++ AToB0 = cmsAllocLUT();
+ cmsAlloc3DGrid(AToB0, profile->sample_depth, 3, 3);
+
+- SampleInfo *sample_info = g_new(SampleInfo, 1);
++ sample_info = g_new(SampleInfo, 1);
+ sample_info->profile = profile;
+
+ /* create a transform from image space to lab (the space of the
+ new abstract profile, just the other way from before)*/
+- CMSProfile *input_profile = gimage_get_cms_profile(sample_info->profile->image);
++ input_profile = gimage_get_cms_profile(sample_info->profile->image);
+ if (!input_profile)
+ { input_profile = cms_get_srgb_profile();
+ }
+- CMSProfile *lab_profile = cms_get_lab_profile(NULL);
++ lab_profile = cms_get_lab_profile(NULL);
+
+- Tag t = gimage_tag(sample_info->profile->image);
+- GSList *profiles = NULL;
++ t = gimage_tag(sample_info->profile->image);
+ profiles = g_slist_append(profiles, input_profile);
+ profiles = g_slist_append(profiles, lab_profile);
+ sample_info->transform = cms_get_transform(profiles,
+@@ -466,7 +484,6 @@ look_profile_save (LookProfile *profile,
+ canvas_width(profile->canvas), 1,FALSE);
+
+ sample_info->pag = pixelarea_register (1, &sample_info->sample_area);
+- PixelRow row_buffer;
+ pixelarea_getdata (&sample_info->sample_area, &row_buffer, 0);
+ sample_info->col_index = pixelrow_width (&row_buffer);
+ sample_info->current_pixel = pixelrow_data(&row_buffer);
+@@ -700,28 +717,33 @@ _look_profile_gui_free_row_data(gpointer
+
+ static void
+ _look_profile_gui_update_list(_LookProfileGui *data)
+-{ data->row_count=0;
++{
++ GSList *profile_file_names, *iterator;
++ gint path_length;
++ char *file_path;
++ _LookProfileGuiRowData *row_data = NULL;
++
++ data->row_count=0;
+ gtk_clist_clear(GTK_CLIST(data->profile_list));
+
+- GSList *profile_file_names = cms_read_icc_profile_dir(look_profile_path, icSigAbstractClass);
++ profile_file_names = cms_read_icc_profile_dir(look_profile_path, icSigAbstractClass);
+ if (!profile_file_names)
+ { return;
+ }
+
+- gint path_length = strlen(look_profile_path);
+- gchar *file_path;
++ path_length = strlen(look_profile_path);
+ /* row_data[0] contains the path of the profile,
+ row_data[1] is NULL if off, profile handle if on */
+- _LookProfileGuiRowData *row_data = NULL;
+
+- GSList *iterator = profile_file_names;
++ iterator = profile_file_names;
+ while (iterator != NULL)
+- { file_path = (gchar *)iterator->data;
++ {
++ /* the text to display in the row, one element per column */
++ gchar *row_text[2] = {NULL, NULL};
++ file_path = (gchar *)iterator->data;
+ row_data = g_new(_LookProfileGuiRowData, 1);
+ row_data->file_name = file_path;
+ row_data->handle = NULL;
+- /* the text to display in the row, one element per column */
+- gchar *row_text[2] = {NULL, NULL};
+ /* strdup(file_path + path_length + 1) extracts the filename from the path */
+ row_text[1] = strdup(file_path + path_length + 1);
+ gtk_clist_insert(GTK_CLIST(data->profile_list), data->row_count, row_text);
+@@ -813,10 +835,10 @@ _look_profile_gui_open_cb (GtkWidget *wi
+
+ static void
+ _look_profile_gui_open_ok_cb(GtkWidget *widget, _LookProfileGui *data)
+-{ look_profile_path = strdup(gtk_file_selection_get_filename (GTK_FILE_SELECTION(data->file_selector)));
+-
++{
+ GList *update_settings = NULL;
+ GList *remove_settings = NULL;
++ look_profile_path = strdup(gtk_file_selection_get_filename (GTK_FILE_SELECTION(data->file_selector)));
+ update_settings = g_list_append(update_settings, "look-profile-path");
+ save_gimprc(&update_settings, &remove_settings);
+ g_list_free(update_settings);
+@@ -829,6 +851,10 @@ void
+ _look_profile_gui_apply(_LookProfileGui *data)
+ { GSList *profiles = NULL;
+ CMSProfile *image_profile = gimage_get_cms_profile(data->display->gimage);
++ DWORD lcms_format;
++ CMSTransform *transform;
++ int i;
++
+ if (image_profile == NULL)
+ { image_profile = cms_get_srgb_profile();
+ }
+@@ -836,9 +862,9 @@ _look_profile_gui_apply(_LookProfileGui
+ profiles = g_slist_append(profiles, (gpointer)image_profile);
+ profiles = g_slist_concat(profiles, g_slist_copy(gdisplay_get_look_profile_pipe(data->display)));
+ profiles = g_slist_append(profiles, (gpointer)image_profile);
+- DWORD lcms_format = cms_get_lcms_format(gimage_tag(data->display->gimage),
++ lcms_format = cms_get_lcms_format(gimage_tag(data->display->gimage),
+ image_profile);
+- CMSTransform *transform = cms_get_transform(profiles,
++ transform = cms_get_transform(profiles,
+ lcms_format, lcms_format,
+ gdisplay_get_cms_intent(data->display),
+ gdisplay_get_cms_flags(data->display));
+@@ -847,7 +873,6 @@ _look_profile_gui_apply(_LookProfileGui
+ cms_return_transform(transform);
+
+ /* resets all the selections */
+- int i;
+ for (i=0; i<data->row_count; i++)
+ { _look_profile_gui_profile_set_active(data, i, FALSE);
+ }
+@@ -855,13 +880,22 @@ _look_profile_gui_apply(_LookProfileGui
+
+ void
+ _look_profile_gui_apply_flipbook (_LookProfileGui *data)
+-{ if (data->display->bfm == NULL)
++{
++ GSList *profiles = NULL;
++ CMSProfile *image_profile;
++ DWORD lcms_format;
++ CMSTransform *transform;
++ GtkWidget *progress_dialog, *vbox, *progress_bar;
++ GSList *iterator;
++ gint num_images, count;
++ int i;
++
++ if (data->display->bfm == NULL)
+ { g_message("This display has no flipbook. Application to flipbook stores not possible");
+ return;
+ }
+
+- GSList *profiles = NULL;
+- CMSProfile *image_profile = gimage_get_cms_profile(data->display->gimage);
++ image_profile = gimage_get_cms_profile(data->display->gimage);
+ if (image_profile == NULL)
+ { image_profile = cms_get_srgb_profile();
+ }
+@@ -869,23 +903,23 @@ _look_profile_gui_apply_flipbook (_LookP
+ profiles = g_slist_append(profiles, (gpointer)image_profile);
+ profiles = g_slist_concat(profiles, g_slist_copy(gdisplay_get_look_profile_pipe(data->display)));
+ profiles = g_slist_append(profiles, (gpointer)image_profile);
+- DWORD lcms_format = cms_get_lcms_format(gimage_tag(data->display->gimage), image_profile);
+- CMSTransform *transform = cms_get_transform(profiles,
++ lcms_format = cms_get_lcms_format(gimage_tag(data->display->gimage), image_profile);
++ transform = cms_get_transform(profiles,
+ lcms_format, lcms_format,
+ gdisplay_get_cms_intent(data->display),
+ gdisplay_get_cms_flags(data->display));
+ g_slist_free(profiles);
+
+ /* create progress dialog */
+- GtkWidget *progress_dialog = gtk_window_new(GTK_WINDOW_DIALOG);
++ progress_dialog = gtk_window_new(GTK_WINDOW_DIALOG);
+ gtk_window_set_wmclass (GTK_WINDOW (progress_dialog), "progress", PROGRAM_NAME);
+ gtk_window_set_title (GTK_WINDOW (progress_dialog), "Applying look to flipbook stores...");
+ gtk_window_set_position(GTK_WINDOW(progress_dialog), GTK_WIN_POS_CENTER);
+
+- GtkWidget *vbox = gtk_vbox_new(FALSE, 0);
++ vbox = gtk_vbox_new(FALSE, 0);
+ gtk_container_add (GTK_CONTAINER (progress_dialog), vbox);
+
+- GtkWidget *progress_bar = gtk_progress_bar_new();
++ progress_bar = gtk_progress_bar_new();
+ gtk_box_pack_start (GTK_BOX(vbox), progress_bar, TRUE, TRUE, 0);
+ gtk_widget_set_usize(progress_bar, 250,-1);
+ gtk_widget_show_all(progress_dialog);
+@@ -894,9 +928,9 @@ _look_profile_gui_apply_flipbook (_LookP
+ gtk_widget_draw(progress_bar, NULL);
+ gdk_flush();
+
+- GSList *iterator = data->display->bfm->sfm->stores;
+- gint num_images = g_slist_length(iterator);
+- gint count = 0;
++ iterator = data->display->bfm->sfm->stores;
++ num_images = g_slist_length(iterator);
++ count = 0;
+ while (iterator != NULL)
+ { store *store = iterator->data;
+ gimage_transform_colors(store->gimage, transform, FALSE);
+@@ -914,7 +948,6 @@ _look_profile_gui_apply_flipbook (_LookP
+ cms_return_transform(transform);
+
+ /* resets all the selections */
+- int i;
+ for (i=0; i<data->row_count; i++)
+ { _look_profile_gui_profile_set_active(data, i, FALSE);
+ }
diff --git a/graphics/cinepaint/patches/patch-ao b/graphics/cinepaint/patches/patch-ao
new file mode 100644
index 00000000000..52db8048c46
--- /dev/null
+++ b/graphics/cinepaint/patches/patch-ao
@@ -0,0 +1,34 @@
+$NetBSD: patch-ao,v 1.1 2005/03/16 18:32:50 rillig Exp $
+
+gcc-2.95.3 cannot handle declarations intermixed with code.
+
+--- app/spline.c.orig Tue Dec 28 17:22:02 2004
++++ app/spline.c Wed Mar 16 18:47:21 2005
+@@ -1028,7 +1028,8 @@ spline_stroke_ellipse(Tool *tool)
+ if(a==0)
+ return;
+ b=abs(point1->y-point2->y);
+- int x[(int)a+1], y[(int)a+1];
++ {int x[(int)a+1], y[(int)a+1];
++ int spacing;
+ b2=b*b;
+ b2a2=b2/(a*a);
+ for(i=0; i<a; i++)
+@@ -1038,7 +1039,7 @@ spline_stroke_ellipse(Tool *tool)
+ }
+
+ /* this is a temporary fix to force brush spacing to 1. */
+- int spacing=gimp_brush_get_spacing();
++ spacing=gimp_brush_get_spacing();
+ gimp_brush_set_spacing(1);
+
+ spline_control(tool, PAUSE, display);
+@@ -1156,7 +1157,7 @@ spline_stroke_ellipse(Tool *tool)
+ gdisplay_flush(display);
+ gimp_brush_set_spacing(spacing);
+
+-}
++}}
+
+ void
+ spline_stroke_curve(Tool *tool)
diff --git a/graphics/cinepaint/patches/patch-ap b/graphics/cinepaint/patches/patch-ap
new file mode 100644
index 00000000000..ce0bb8d1121
--- /dev/null
+++ b/graphics/cinepaint/patches/patch-ap
@@ -0,0 +1,21 @@
+$NetBSD: patch-ap,v 1.1 2005/03/16 18:32:50 rillig Exp $
+
+gcc-2.95.3 cannot handle declarations intermixed with code.
+
+--- plug-ins/tiff/tiff.c.orig Tue Nov 23 13:17:14 2004
++++ plug-ins/tiff/tiff.c Wed Mar 16 16:50:25 2005
+@@ -857,12 +857,13 @@ load_image ( gchar *filename)
+ /* TODO more specific GRAYSCALE handling */
+ { size_t size = 0;
+ char* buf;
++ cmsHPROFILE lp;
+ LPGAMMATABLE gamma = cmsBuildGamma(256, 1.0), g;
+ if (info->photomet == PHOTOMETRIC_MINISWHITE)
+ g = cmsReverseGamma(256, gamma);
+ else
+ g = gamma;
+- cmsHPROFILE lp = cmsCreateGrayProfile(cmsD50_xyY(), g);
++ lp = cmsCreateGrayProfile(cmsD50_xyY(), g);
+ _cmsSaveProfileToMem (lp, NULL, &size);
+ buf = (char*) calloc (sizeof(char), size);
+ _cmsSaveProfileToMem (lp, buf, &size);