diff options
Diffstat (limited to 'graphics/cinepaint/patches/patch-ad')
-rw-r--r-- | graphics/cinepaint/patches/patch-ad | 87 |
1 files changed, 42 insertions, 45 deletions
diff --git a/graphics/cinepaint/patches/patch-ad b/graphics/cinepaint/patches/patch-ad index 24a0f6dd8c6..178235042bb 100644 --- a/graphics/cinepaint/patches/patch-ad +++ b/graphics/cinepaint/patches/patch-ad @@ -1,10 +1,8 @@ -$NetBSD: patch-ad,v 1.1 2005/03/16 18:32:50 rillig Exp $ +$NetBSD: patch-ad,v 1.2 2005/07/04 19:57:01 drochner 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 +--- app/cms.c.orig 2005-05-24 20:51:25.000000000 +0200 ++++ app/cms.c +@@ -208,7 +208,12 @@ erase_alpha_from_4th_color (CMSTransform * called from app_procs.c:app_init() */ void cms_init() @@ -18,7 +16,7 @@ gcc-2.95.3 cannot handle declarations intermixed with code. 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() +@@ -222,9 +227,6 @@ void cms_init() /* suppress lcms errors while checking */ cmsErrorAction(LCMS_ERROR_IGNORE); @@ -28,7 +26,7 @@ gcc-2.95.3 cannot handle declarations intermixed with code. /* 1. image profile */ if (cms_default_image_profile_name != NULL) -@@ -476,11 +478,12 @@ cms_read_icc_profile_dir(gchar *path, ic +@@ -525,11 +527,12 @@ cms_read_icc_profile_dir(gchar *path, ic while ((entry = readdir (dir))) { char *file_name = entry->d_name; cmsHPROFILE profile; @@ -42,7 +40,7 @@ gcc-2.95.3 cannot handle declarations intermixed with code. 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 +@@ -566,6 +569,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); @@ -50,7 +48,7 @@ gcc-2.95.3 cannot handle declarations intermixed with code. /* process path by path, paths are separated by : */ char *remaining_directories = directories; -@@ -531,7 +535,7 @@ cms_read_standard_profile_dirs(icProfile +@@ -580,7 +584,7 @@ cms_read_standard_profile_dirs(icProfile { path = strdup(token); } @@ -59,24 +57,24 @@ gcc-2.95.3 cannot handle declarations intermixed with code. return_list = g_slist_concat(return_list, sub_list); g_free(path); -@@ -673,6 +677,7 @@ cms_load_profile_to_mem (char* filename, +@@ -729,6 +733,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 - } + size_t size_order = 128; + char *mem = 0; + const char *keyname = 0; +@@ -743,7 +748,7 @@ cms_get_profile_from_file(char *file_nam + keyname = cms_get_profile_keyname (profile, mem); /* 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)); + (gpointer) cms_get_profile_keyname(profile,mem)); if (cache_entry != NULL) { cache_entry->ref_count ++; -@@ -719,7 +724,8 @@ cms_get_profile_from_file(char *file_nam +@@ -783,7 +788,8 @@ cms_get_profile_from_file(char *file_nam CMSProfile * cms_get_profile_from_mem(void *mem_pointer, DWORD size) { CMSProfile *return_value; @@ -86,16 +84,16 @@ gcc-2.95.3 cannot handle declarations intermixed with code. /* get profile information */ cmsHPROFILE profile = cmsOpenProfileFromMem (mem_pointer, size); if (profile == NULL) -@@ -728,7 +734,7 @@ cms_get_profile_from_mem(void *mem_point +@@ -792,7 +798,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)); + (gpointer) cms_get_profile_keyname(profile,mem_pointer)); if (cache_entry != NULL) { cache_entry->ref_count ++; -@@ -788,6 +794,7 @@ cms_get_profile_data(CMSProfile *profile +@@ -852,6 +858,7 @@ cms_get_profile_data(CMSProfile *profile CMSProfile * cms_get_lab_profile(LPcmsCIExyY white_point) { CMSProfile *return_value; @@ -103,7 +101,7 @@ gcc-2.95.3 cannot handle declarations intermixed with code. GString *hash_key = g_string_new(NULL); if (white_point) -@@ -797,7 +804,7 @@ cms_get_lab_profile(LPcmsCIExyY white_po +@@ -861,7 +868,7 @@ cms_get_lab_profile(LPcmsCIExyY white_po { g_string_sprintf(hash_key, "###LAB###"); } @@ -112,7 +110,7 @@ gcc-2.95.3 cannot handle declarations intermixed with code. if (cache_entry != NULL) { cache_entry->ref_count ++; return_value = cache_entry->profile; -@@ -970,12 +977,13 @@ cms_return_profile(CMSProfile *profile) +@@ -1034,12 +1041,13 @@ cms_return_profile(CMSProfile *profile) { /* search the cache for the profile * decreate ref_counter + possibly close profile */ @@ -127,7 +125,7 @@ gcc-2.95.3 cannot handle declarations intermixed with code. if (entry == NULL) { g_warning("cms_return_profile: profile not found in cache"); return FALSE; -@@ -1008,7 +1016,18 @@ cms_get_transform(GSList *profiles, +@@ -1072,7 +1080,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 */ @@ -146,7 +144,7 @@ gcc-2.95.3 cannot handle declarations intermixed with code. 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, +@@ -1092,12 +1111,9 @@ cms_get_transform(GSList *profiles, return NULL; } @@ -161,7 +159,7 @@ gcc-2.95.3 cannot handle declarations intermixed with code. 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, +@@ -1114,7 +1130,7 @@ cms_get_transform(GSList *profiles, lcms_intent, lcms_flags); /* now check the cache */ @@ -170,7 +168,7 @@ gcc-2.95.3 cannot handle declarations intermixed with code. /* if it was in the disc cache */ if (cache_entry != NULL) -@@ -1079,7 +1095,6 @@ cms_get_transform(GSList *profiles, +@@ -1143,7 +1159,6 @@ cms_get_transform(GSList *profiles, } /* if no cache hit, create transform */ @@ -178,7 +176,7 @@ gcc-2.95.3 cannot handle declarations intermixed with code. transform = cmsCreateMultiprofileTransform (profile_array, num_profiles, lcms_input_format, -@@ -1093,8 +1108,8 @@ cms_get_transform(GSList *profiles, +@@ -1157,8 +1172,8 @@ cms_get_transform(GSList *profiles, } /* save it to disk */ @@ -189,7 +187,7 @@ gcc-2.95.3 cannot handle declarations intermixed with code. _cmsSaveProfile(devicelink, file_name); cmsCloseProfile(devicelink); -@@ -1218,6 +1233,12 @@ cms_set_display_profile(CMSProfile *prof +@@ -1282,6 +1297,12 @@ cms_set_display_profile(CMSProfile *prof void cms_transform_area(CMSTransform *transform, PixelArea *src_area, PixelArea *dest_area) { TransformFunc transform_func; @@ -202,7 +200,7 @@ gcc-2.95.3 cannot handle declarations intermixed with code. 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 +@@ -1309,12 +1330,6 @@ cms_transform_area(CMSTransform *transfo } @@ -215,17 +213,16 @@ gcc-2.95.3 cannot handle declarations intermixed with code. for (pag = pixelarea_register (1, src_area, dest_area); pag != NULL; pag = pixelarea_process (pag)) -@@ -1321,6 +1336,9 @@ void +@@ -1385,6 +1400,8 @@ 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) + if (!transform || !transform->handle) g_warning ("%s:%d %s() transform not allocated\n", __FILE__,__LINE__,__func__); -@@ -1328,9 +1346,9 @@ cms_transform_float(CMSTransform *transf +@@ -1392,9 +1409,9 @@ cms_transform_float(CMSTransform *transf g_warning ("%s:%d %s() array not allocated\n", __FILE__,__LINE__,__func__); @@ -238,7 +235,7 @@ gcc-2.95.3 cannot handle declarations intermixed with code. 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 +@@ -1463,10 +1480,14 @@ static GtkWidget *cms_profile_menu_new(G { GtkWidget *menu; GtkWidget *menuitem; GtkWidget *optionmenu; @@ -254,7 +251,7 @@ gcc-2.95.3 cannot handle declarations intermixed with code. if (can_select_none) { menuitem = gtk_menu_item_new_with_label("[none]"); -@@ -1382,9 +1404,6 @@ static GtkWidget *cms_profile_menu_new(G +@@ -1474,9 +1495,6 @@ static GtkWidget *cms_profile_menu_new(G gtk_object_set_data(GTK_OBJECT(menuitem), "value", NULL); } @@ -264,7 +261,7 @@ gcc-2.95.3 cannot handle declarations intermixed with code. 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 +@@ -1506,8 +1524,8 @@ static GtkWidget *cms_intent_menu_new(Gt GtkWidget *menuitem = NULL; GtkWidget *optionmenu = NULL; @@ -274,7 +271,7 @@ gcc-2.95.3 cannot handle declarations intermixed with code. menuitem = gtk_menu_item_new_with_label ("Perceptual"); gtk_menu_append (GTK_MENU (menu), menuitem); -@@ -1593,6 +1612,8 @@ cms_assign_dialog(GImage *image) +@@ -1685,6 +1703,8 @@ cms_assign_dialog(GImage *image) GtkWidget *label = NULL; GtkWidget *vbox = NULL; GtkWidget *alignment = NULL; @@ -283,7 +280,7 @@ gcc-2.95.3 cannot handle declarations intermixed with code. CMSAssignDialogData *data=g_new(CMSAssignDialogData,1); data->image = image; -@@ -1608,8 +1629,8 @@ cms_assign_dialog(GImage *image) +@@ -1700,8 +1720,8 @@ cms_assign_dialog(GImage *image) table = gtk_table_new(3, 1, FALSE); gtk_box_pack_start (GTK_BOX (vbox), table, TRUE, TRUE, 0); @@ -294,7 +291,7 @@ gcc-2.95.3 cannot handle declarations intermixed with code. 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) +@@ -1792,6 +1812,7 @@ cms_open_assign_dialog(GImage *image) GSList *radiogroup = NULL; GtkWidget *vbox = NULL; GtkWidget *alignment = NULL; @@ -302,7 +299,7 @@ gcc-2.95.3 cannot handle declarations intermixed with code. CMSOpenAssignDialogData *data=g_new(CMSOpenAssignDialogData,1); data->image = image; -@@ -1729,7 +1751,7 @@ cms_open_assign_dialog(GImage *image) +@@ -1821,7 +1842,7 @@ cms_open_assign_dialog(GImage *image) data->profile_menu = cms_profile_menu_new(GTK_TABLE(table), 1, 0, TRUE); @@ -311,7 +308,7 @@ gcc-2.95.3 cannot handle declarations intermixed with code. 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 +@@ -1888,9 +1909,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))) @@ -323,7 +320,7 @@ gcc-2.95.3 cannot handle declarations intermixed with code. 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 +@@ -1939,6 +1961,7 @@ cms_convert_on_open_prompt(GImage *image GtkWidget *table; GtkWidget *vbox; GtkWidget *alignment; @@ -331,7 +328,7 @@ gcc-2.95.3 cannot handle declarations intermixed with code. CMSConvertOnOpenPromptData *data = g_new(CMSConvertOnOpenPromptData, 1); -@@ -1918,7 +1942,7 @@ cms_convert_on_open_prompt(GImage *image +@@ -2010,7 +2033,7 @@ cms_convert_on_open_prompt(GImage *image data->event_loop = g_main_new(FALSE); g_main_run(data->event_loop); @@ -340,7 +337,7 @@ gcc-2.95.3 cannot handle declarations intermixed with code. g_main_destroy(data->event_loop); g_free(data); -@@ -1931,9 +1955,9 @@ cms_convert_on_open_prompt_yes_callback +@@ -2023,9 +2046,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 */ |