diff --git a/ChangeLog b/ChangeLog index 70b3ea0b960d7849d8044621d960dd07f273216d..3b36199559a7953916fa618937e4dfd42042fe3f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,31 @@ + +Sun Mar 22 14:23:03 EST 1998 Adrian Likins + + * app/iscissors.c, app/tips_dialog.c, app/gradient.c, + libgimp/gimp.c, plug-ins/AlienMap/AlienMap.c, + plug-ins/bmp/bmp.c, plug-ins/fits/fitsrw.h, + plug-ins/fits/fitsrw.c, plug-ins/flarefx/flarefx.c, + plug-ins/gfig/gfig.c, plug-ins/gfli/gfli.c, + plug-ins/gicon/gicon.c, plug-ins/gqbist/gqbist.c, + plug-ins/gtm/gtm.c, plug-ins/hot/hot.c, + plug-ins/ifscompose/ifscompose.c, + plug-ins/ifscompose/ifscompose_utils.c + plug-ins/max_rgb/max_rgb.c, plug-ins/nlfilt/nlfilt.c, + plug-ins/pat/pat.c, plug-ins/pcx/pcx.c, plug-ins/rotate/rotate.c, + plug-ins/script-fu/script-fu-server.c, plug-ins/snoise/snoise.c, + plug-ins/threshold_alpha/threshold_alpha.c, + plug-ins/zealouscrop/zealouscrop.c :gimp-joke-980321 + + plug-ins/CML_explorer, plug-ins/autocrop, + plug-ins/align_layers, plug-ins/blinds, + plug-ins/bmp, plug-ins/megawidget: gimp-joke-980322 + + Applied gimp-joke-980322-0.patch and gimp-joke-980321-0.patch + from Yasuhiro SHIRASAKI . Mostly + portability for DEC osf1's cc. Lots of MAIN();'s, trailing + commas in enums, and guchar/gchar madness. + + Sun Mar 22 01:59:31 PST 1998 Manish Singh * autoconfed for random/lrand48/rand madness @@ -86,7 +114,7 @@ Thu Mar 19 01:04:56 PST 1998 Manish Singh Wed Mar 18 20:57:55 EST 1998 Adrian Likins - *AlienMap/AlienMap.c CEL/CEL.c CML_explorer/CML_explorer.c + * AlienMap/AlienMap.c CEL/CEL.c CML_explorer/CML_explorer.c align_layers/align_layers.c animationplay/animationplay.c bmp/bmpwrite.c dbbrowser/dbbrowser.c emboss/emboss.c exchange/exchange.c faxg3/faxg3.c faxg3/g3.c gbr/gbr.c diff --git a/app/dialogs/tips-dialog.c b/app/dialogs/tips-dialog.c index 59cf7f9b93f1d7515fc9cf9128e36b62efd30b6e..4beb9384483a16359726dd85c439a0d5e2fefb51 100644 --- a/app/dialogs/tips-dialog.c +++ b/app/dialogs/tips-dialog.c @@ -41,7 +41,7 @@ tips_dialog_create () if (tips_count == 0) { temp = g_malloc (512); - sprintf (temp, "%s/%s", DATADIR, TIPS_FILE_NAME); + sprintf ((char *)temp, "%s/%s", DATADIR, TIPS_FILE_NAME); read_tips_file ((char *)temp); g_free (temp); } diff --git a/app/gradient.c b/app/gradient.c index 11da88fb1e4ca7cea044cb21e35383d2c2286cba..29c537f7f572e4c117a790c57e4e205882a69f9e 100644 --- a/app/gradient.c +++ b/app/gradient.c @@ -5920,7 +5920,7 @@ gradients_get_active_invoker(Argument *args) return_args[1].value.pdb_pointer = g_strdup(curr_gradient->name); return return_args; -}; /* gradients_get_active_invoker */ +} /* gradients_get_active_invoker */ /***** gradients_set_active *****/ diff --git a/app/gradient_editor.c b/app/gradient_editor.c index 11da88fb1e4ca7cea044cb21e35383d2c2286cba..29c537f7f572e4c117a790c57e4e205882a69f9e 100644 --- a/app/gradient_editor.c +++ b/app/gradient_editor.c @@ -5920,7 +5920,7 @@ gradients_get_active_invoker(Argument *args) return_args[1].value.pdb_pointer = g_strdup(curr_gradient->name); return return_args; -}; /* gradients_get_active_invoker */ +} /* gradients_get_active_invoker */ /***** gradients_set_active *****/ diff --git a/app/gui/gradient-editor.c b/app/gui/gradient-editor.c index 11da88fb1e4ca7cea044cb21e35383d2c2286cba..29c537f7f572e4c117a790c57e4e205882a69f9e 100644 --- a/app/gui/gradient-editor.c +++ b/app/gui/gradient-editor.c @@ -5920,7 +5920,7 @@ gradients_get_active_invoker(Argument *args) return_args[1].value.pdb_pointer = g_strdup(curr_gradient->name); return return_args; -}; /* gradients_get_active_invoker */ +} /* gradients_get_active_invoker */ /***** gradients_set_active *****/ diff --git a/app/gui/palette-editor.c b/app/gui/palette-editor.c index 1f9998d56b612ebd27e010edbfb402c831b66ab7..0686227bd269ea3bd56b9abb9dd04546bd5bf5e5 100644 --- a/app/gui/palette-editor.c +++ b/app/gui/palette-editor.c @@ -854,11 +854,19 @@ palette_refresh_callback (GtkWidget *w, palette = client_data; if(palette) + { + palette_free_palettes (); + palette_init_palettes(); + palette_create_palette_menu (palette, default_palette_entries); + palette_calc_scrollbar (palette); + palette_draw_entries (palette); + palette_draw_current_entry (palette); + } + else { palette_free_palettes (); palette_init_palettes(); } - palette_create_palette_menu (palette, default_palette_entries); } @@ -1466,10 +1474,9 @@ palette_refresh_invoker (Argument *args) */ int success = TRUE ; - if(palette) - palette_free_palettes (); - + palette_free_palettes(); palette_init_palettes(); + return procedural_db_return_args (&palette_refresh_proc, success); } diff --git a/app/gui/tips-dialog.c b/app/gui/tips-dialog.c index 59cf7f9b93f1d7515fc9cf9128e36b62efd30b6e..4beb9384483a16359726dd85c439a0d5e2fefb51 100644 --- a/app/gui/tips-dialog.c +++ b/app/gui/tips-dialog.c @@ -41,7 +41,7 @@ tips_dialog_create () if (tips_count == 0) { temp = g_malloc (512); - sprintf (temp, "%s/%s", DATADIR, TIPS_FILE_NAME); + sprintf ((char *)temp, "%s/%s", DATADIR, TIPS_FILE_NAME); read_tips_file ((char *)temp); g_free (temp); } diff --git a/app/iscissors.c b/app/iscissors.c index c0868dd406ec0466d23df5373340369198386e22..e1f780813274af62ae08d33c165d4d115c296057 100644 --- a/app/iscissors.c +++ b/app/iscissors.c @@ -284,7 +284,7 @@ selection_to_bezier(GtkWidget *w, gpointer none) tools_select(BEZIER_SELECT); } return; -}; +} static IScissorsOptions * iscissors_selection_options (void) diff --git a/app/palette.c b/app/palette.c index 1f9998d56b612ebd27e010edbfb402c831b66ab7..0686227bd269ea3bd56b9abb9dd04546bd5bf5e5 100644 --- a/app/palette.c +++ b/app/palette.c @@ -854,11 +854,19 @@ palette_refresh_callback (GtkWidget *w, palette = client_data; if(palette) + { + palette_free_palettes (); + palette_init_palettes(); + palette_create_palette_menu (palette, default_palette_entries); + palette_calc_scrollbar (palette); + palette_draw_entries (palette); + palette_draw_current_entry (palette); + } + else { palette_free_palettes (); palette_init_palettes(); } - palette_create_palette_menu (palette, default_palette_entries); } @@ -1466,10 +1474,9 @@ palette_refresh_invoker (Argument *args) */ int success = TRUE ; - if(palette) - palette_free_palettes (); - + palette_free_palettes(); palette_init_palettes(); + return procedural_db_return_args (&palette_refresh_proc, success); } diff --git a/app/tips_dialog.c b/app/tips_dialog.c index 59cf7f9b93f1d7515fc9cf9128e36b62efd30b6e..4beb9384483a16359726dd85c439a0d5e2fefb51 100644 --- a/app/tips_dialog.c +++ b/app/tips_dialog.c @@ -41,7 +41,7 @@ tips_dialog_create () if (tips_count == 0) { temp = g_malloc (512); - sprintf (temp, "%s/%s", DATADIR, TIPS_FILE_NAME); + sprintf ((char *)temp, "%s/%s", DATADIR, TIPS_FILE_NAME); read_tips_file ((char *)temp); g_free (temp); } diff --git a/app/tools/gimpiscissorstool.c b/app/tools/gimpiscissorstool.c index c0868dd406ec0466d23df5373340369198386e22..e1f780813274af62ae08d33c165d4d115c296057 100644 --- a/app/tools/gimpiscissorstool.c +++ b/app/tools/gimpiscissorstool.c @@ -284,7 +284,7 @@ selection_to_bezier(GtkWidget *w, gpointer none) tools_select(BEZIER_SELECT); } return; -}; +} static IScissorsOptions * iscissors_selection_options (void) diff --git a/app/tools/iscissors.c b/app/tools/iscissors.c index c0868dd406ec0466d23df5373340369198386e22..e1f780813274af62ae08d33c165d4d115c296057 100644 --- a/app/tools/iscissors.c +++ b/app/tools/iscissors.c @@ -284,7 +284,7 @@ selection_to_bezier(GtkWidget *w, gpointer none) tools_select(BEZIER_SELECT); } return; -}; +} static IScissorsOptions * iscissors_selection_options (void) diff --git a/app/widgets/gimpgradienteditor.c b/app/widgets/gimpgradienteditor.c index 11da88fb1e4ca7cea044cb21e35383d2c2286cba..29c537f7f572e4c117a790c57e4e205882a69f9e 100644 --- a/app/widgets/gimpgradienteditor.c +++ b/app/widgets/gimpgradienteditor.c @@ -5920,7 +5920,7 @@ gradients_get_active_invoker(Argument *args) return_args[1].value.pdb_pointer = g_strdup(curr_gradient->name); return return_args; -}; /* gradients_get_active_invoker */ +} /* gradients_get_active_invoker */ /***** gradients_set_active *****/ diff --git a/app/widgets/gimppaletteeditor.c b/app/widgets/gimppaletteeditor.c index 1f9998d56b612ebd27e010edbfb402c831b66ab7..0686227bd269ea3bd56b9abb9dd04546bd5bf5e5 100644 --- a/app/widgets/gimppaletteeditor.c +++ b/app/widgets/gimppaletteeditor.c @@ -854,11 +854,19 @@ palette_refresh_callback (GtkWidget *w, palette = client_data; if(palette) + { + palette_free_palettes (); + palette_init_palettes(); + palette_create_palette_menu (palette, default_palette_entries); + palette_calc_scrollbar (palette); + palette_draw_entries (palette); + palette_draw_current_entry (palette); + } + else { palette_free_palettes (); palette_init_palettes(); } - palette_create_palette_menu (palette, default_palette_entries); } @@ -1466,10 +1474,9 @@ palette_refresh_invoker (Argument *args) */ int success = TRUE ; - if(palette) - palette_free_palettes (); - + palette_free_palettes(); palette_init_palettes(); + return procedural_db_return_args (&palette_refresh_proc, success); } diff --git a/plug-ins/AlienMap/AlienMap.c b/plug-ins/AlienMap/AlienMap.c index 6d89eed9f44dd064bdf272906d94885c1767d637..b3378c4fe96d7c18157cec9df57d6ae21d1bfc3e 100644 --- a/plug-ins/AlienMap/AlienMap.c +++ b/plug-ins/AlienMap/AlienMap.c @@ -160,7 +160,7 @@ gint do_bluenone; /***** Functions *****/ -MAIN (); +MAIN () static void query () diff --git a/plug-ins/CML_explorer/CML_explorer.c b/plug-ins/CML_explorer/CML_explorer.c index b25d28fd14bbc2e3cd4f0d62f31487224cd92d35..f4d9e8ed62af66df56a9df4033f4168093f4a368 100644 --- a/plug-ins/CML_explorer/CML_explorer.c +++ b/plug-ins/CML_explorer/CML_explorer.c @@ -117,7 +117,7 @@ typedef struct typedef struct { - guchar *name; + gchar *name; gpointer data; } gtkW_menu_item; /* gtkW global variables */ @@ -143,16 +143,16 @@ static void gtkW_menu_update (GtkWidget *widget, gpointer data); static void gtkW_toggle_change_value (gtkW_widget_table *wtable); /* gtkW method */ GtkWidget *gtkW_check_button_new (GtkWidget *parent, - guchar *name, + gchar *name, GtkSignalFunc update, gint *value); -static GtkWidget *gtkW_dialog_new (guchar *name, +static GtkWidget *gtkW_dialog_new (gchar *name, GtkSignalFunc ok_callback, GtkSignalFunc close_callback); -static GtkWidget *gtkW_frame_new (GtkWidget *parent, guchar *name); +static GtkWidget *gtkW_frame_new (GtkWidget *parent, gchar *name); static GtkWidget *gtkW_hbox_new (GtkWidget *parent); -static void gtkW_message_dialog (gint gtk_was_initialized, guchar *message); -static GtkWidget *gtkW_message_dialog_new (guchar * name); +static void gtkW_message_dialog (gint gtk_was_initialized, gchar *message); +static GtkWidget *gtkW_message_dialog_new (gchar * name); static GtkWidget *gtkW_table_add_button (GtkWidget *table, gchar *name, gint x0, @@ -183,7 +183,7 @@ static GtkWidget *gtkW_table_add_iscale_entry (GtkWidget *table, gdouble step, gpointer table_entry); static GtkWidget *gtkW_table_add_menu (GtkWidget *parent, - guchar *name, + gchar *name, gint x, gint y, GtkSignalFunc imenu_update, @@ -192,7 +192,7 @@ static GtkWidget *gtkW_table_add_menu (GtkWidget *parent, gint item_num, gpointer table_entry); static GtkWidget *gtkW_table_add_toggle (GtkWidget *table, - guchar *name, + gchar *name, gint x, gint y, GtkSignalFunc update, @@ -200,7 +200,7 @@ static GtkWidget *gtkW_table_add_toggle (GtkWidget *table, gpointer widget_entry); static GtkWidget *gtkW_table_new (GtkWidget *parent, gint col, gint row); static GtkWidget *gtkW_vbox_add_button (GtkWidget *vbox, - guchar *name, + gchar *name, GtkSignalFunc update, gpointer data); static GtkWidget *gtkW_vbox_new (GtkWidget *parent); @@ -347,7 +347,7 @@ typedef struct gint scale; gint start_offset; gint seed; - guchar last_file_name[256]; + gchar last_file_name[256]; } ValueType; static ValueType VALS = @@ -401,10 +401,10 @@ static void hsv_to_rgb (int *h, int *s, int *v); static gdouble logistic_function (CML_PARAM *param, gdouble x, gdouble power); static gint DIALOG (); static GtkWidget *CML_dialog_sub_panel_new (GtkWidget *parent, - guchar *name, + gchar *name, CML_PARAM *param, gint channel_id); -static GtkWidget *CML_dialog_advanced_panel_new (GtkWidget *parent, guchar *name); +static GtkWidget *CML_dialog_advanced_panel_new (GtkWidget *parent, gchar *name); void preview_update (); static void function_graph_new (GtkWidget *widget, gpointer data); static void CML_set_or_randomize_seed_callback (GtkWidget *widget, gpointer data); @@ -419,7 +419,7 @@ static gint force_overwrite (char *filename); static void CML_overwrite_ok_callback (GtkWidget *widget, gpointer data); static void CML_preview_update_callback (GtkWidget *widget, gpointer data); static void CML_load_from_file_callback (GtkWidget *widget, gpointer client_data); -static gint CML_load_parameter_file (guchar *filename, gint interactive_mode); +static gint CML_load_parameter_file (gchar *filename, gint interactive_mode); static void CML_execute_load_from_file (GtkWidget *widget, gpointer client_data); static gint parse_line_to_gint (FILE *file, gint *flag); static gdouble parse_line_to_gdouble (FILE *file, gint *flag); @@ -528,7 +528,7 @@ run (char *name, break; case RUN_NONINTERACTIVE: { - guchar *filename = param[3].data.d_string; + gchar *filename = param[3].data.d_string; if (! CML_load_parameter_file (filename, FALSE)) return; @@ -1620,7 +1620,7 @@ DIALOG () static GtkWidget * CML_dialog_sub_panel_new (GtkWidget *parent, - guchar *name, + gchar *name, CML_PARAM *param, gint channel_id) { @@ -1733,7 +1733,7 @@ CML_dialog_sub_panel_new (GtkWidget *parent, } static GtkWidget * -CML_dialog_advanced_panel_new (GtkWidget *parent, guchar *name) +CML_dialog_advanced_panel_new (GtkWidget *parent, gchar *name) { GtkWidget *frame; GtkWidget *subframe; @@ -1742,7 +1742,7 @@ CML_dialog_advanced_panel_new (GtkWidget *parent, guchar *name) gint index = 0; gint widget_offset = 12; gint channel_id; - guchar *ch_name[] = { "Hue", "Saturation", "Value" }; + gchar *ch_name[] = { "Hue", "Saturation", "Value" }; CML_PARAM *param; frame = gtkW_frame_new (parent, name); @@ -2091,7 +2091,7 @@ CML_execute_save_to_file (GtkWidget *widget, gpointer client_data) } if ((err != 0) && (file == NULL)) { - guchar buffer[CML_LINE_SIZE]; + gchar buffer[CML_LINE_SIZE]; sprintf (buffer, "Error: could not open \"%s\"", filename); gtkW_message_dialog (TRUE, buffer); @@ -2136,7 +2136,7 @@ CML_execute_save_to_file (GtkWidget *widget, gpointer client_data) fclose(file); #ifdef VERBOSE_DIALOGS { - guchar buffer[CML_LINE_SIZE]; + gchar buffer[CML_LINE_SIZE]; sprintf (buffer, "Parameters were saved to \"%s\"", filename); gtkW_message_dialog (TRUE, buffer); @@ -2266,7 +2266,7 @@ CML_execute_load_from_file (GtkWidget *widget, gpointer client_data) } static gint -CML_load_parameter_file (guchar *filename, gint interactive_mode) +CML_load_parameter_file (gchar *filename, gint interactive_mode) { FILE *file; int channel_id; @@ -2282,7 +2282,7 @@ CML_load_parameter_file (guchar *filename, gint interactive_mode) if (!file) { - guchar buffer[CML_LINE_SIZE]; + gchar buffer[CML_LINE_SIZE]; if (interactive_mode) { @@ -2293,7 +2293,7 @@ CML_load_parameter_file (guchar *filename, gint interactive_mode) } else { - guchar line[CML_LINE_SIZE]; + gchar line[CML_LINE_SIZE]; gdouble version = 0.99; version = parse_line_to_gdouble (file, &flag); /* old format returns 1 */ @@ -2410,8 +2410,8 @@ CML_load_parameter_file (guchar *filename, gint interactive_mode) static gint parse_line_to_gint (FILE *file, gint *flag) { - guchar line[CML_LINE_SIZE]; - guchar *str; + gchar line[CML_LINE_SIZE]; + gchar *str; gint value; if (! *flag) @@ -2438,8 +2438,8 @@ parse_line_to_gint (FILE *file, gint *flag) static gdouble parse_line_to_gdouble (FILE *file, gint *flag) { - guchar line[CML_LINE_SIZE]; - guchar *str; + gchar line[CML_LINE_SIZE]; + gchar *str; gdouble value; if (! *flag) @@ -2636,7 +2636,7 @@ gtkW_toggle_change_value (gtkW_widget_table *wtable) GtkWidget * gtkW_check_button_new (GtkWidget *parent, - guchar *name, + gchar *name, GtkSignalFunc update, gint *value) { @@ -2653,7 +2653,7 @@ gtkW_check_button_new (GtkWidget *parent, } static GtkWidget * -gtkW_dialog_new (guchar *name, +gtkW_dialog_new (gchar *name, GtkSignalFunc ok_callback, GtkSignalFunc close_callback) { @@ -2689,7 +2689,7 @@ gtkW_dialog_new (guchar *name, static GtkWidget * gtkW_frame_new (GtkWidget *parent, - guchar *name) + gchar *name) { GtkWidget *frame; @@ -2718,7 +2718,7 @@ gtkW_hbox_new (GtkWidget *parent) } static void -gtkW_message_dialog (gint gtk_was_initialized, guchar *message) +gtkW_message_dialog (gint gtk_was_initialized, gchar *message) { GtkWidget *dlg; GtkWidget *table; @@ -2751,7 +2751,7 @@ gtkW_message_dialog (gint gtk_was_initialized, guchar *message) } static GtkWidget * -gtkW_message_dialog_new (guchar * name) +gtkW_message_dialog_new (gchar * name) { GtkWidget *dlg, *button; @@ -2811,7 +2811,7 @@ gtkW_table_add_dscale_entry (GtkWidget *table, { GtkObject *adjustment; GtkWidget *label, *hbox, *scale, *entry; - guchar *buffer; + gchar *buffer; label = gtk_label_new (name); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); @@ -2843,7 +2843,7 @@ gtkW_table_add_dscale_entry (GtkWidget *table, gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0); gtk_widget_set_usize (entry, GTKW_ENTRY_WIDTH, 0); - buffer = (guchar *) g_malloc (GTKW_ENTRY_BUFFER_SIZE); + buffer = (gchar *) g_malloc (GTKW_ENTRY_BUFFER_SIZE); sprintf (buffer, "%6f", *value); gtk_entry_set_text (GTK_ENTRY (entry), buffer); gtk_signal_connect (GTK_OBJECT (entry), "changed", @@ -2880,7 +2880,7 @@ gtkW_table_add_iscale_entry (GtkWidget *table, { GtkObject *adjustment; GtkWidget *label, *hbox, *scale, *entry; - guchar *buffer; + gchar *buffer; label = gtk_label_new (name); gtk_misc_set_alignment (GTK_MISC(label), 0.0, 0.5); @@ -2911,7 +2911,7 @@ gtkW_table_add_iscale_entry (GtkWidget *table, gtk_object_set_user_data (adjustment, entry); gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0); gtk_widget_set_usize (entry, GTKW_ENTRY_WIDTH, 0); - buffer = (guchar *) g_malloc (GTKW_ENTRY_BUFFER_SIZE); + buffer = (gchar *) g_malloc (GTKW_ENTRY_BUFFER_SIZE); sprintf (buffer, "%d", *value); gtk_entry_set_text (GTK_ENTRY (entry), buffer); gtk_signal_connect (GTK_OBJECT (entry), "changed", @@ -2935,7 +2935,7 @@ gtkW_table_add_iscale_entry (GtkWidget *table, static GtkWidget * gtkW_table_add_menu (GtkWidget *table, - guchar *name, + gchar *name, gint x, gint y, GtkSignalFunc menu_update, @@ -2995,7 +2995,7 @@ gtkW_table_add_menu (GtkWidget *table, static GtkWidget * gtkW_table_add_toggle (GtkWidget *table, - guchar *name, + gchar *name, gint x, gint y, GtkSignalFunc update, @@ -3041,7 +3041,7 @@ gtkW_table_new (GtkWidget *parent, gint col, gint row) static GtkWidget * gtkW_vbox_add_button (GtkWidget *vbox, - guchar *name, + gchar *name, GtkSignalFunc update, gpointer data) { diff --git a/plug-ins/align_layers/align_layers.c b/plug-ins/align_layers/align_layers.c index e72f5ad06e25168da1aca7d1b9563bab1c0af3b7..9d9f0f6318d8494a567bef724e2288d0f57b91cc 100644 --- a/plug-ins/align_layers/align_layers.c +++ b/plug-ins/align_layers/align_layers.c @@ -53,7 +53,7 @@ static void gtkW_iscale_update (GtkAdjustment *adjustment, gpointer data); static void gtkW_ientry_update (GtkWidget *widget, gpointer data); static GtkWidget *gtkW_dialog_new (char *name, GtkSignalFunc ok_callback, GtkSignalFunc close_callback); -static void gtkW_message_dialog (gint gtk_was_initialized, guchar *message); +static void gtkW_message_dialog (gint gtk_was_initialized, gchar *message); static GtkWidget *gtkW_message_dialog_new (char * name); static void gtkW_table_add_toggle (GtkWidget *table, @@ -83,11 +83,11 @@ GtkWidget *gtkW_table_add_button (GtkWidget *table, gpointer value); typedef struct { - guchar *name; + gchar *name; gpointer data; } gtkW_menu_item; GtkWidget *gtkW_table_add_menu (GtkWidget *parent, - guchar *name, + gchar *name, int x, int y, GtkSignalFunc imenu_update, @@ -482,7 +482,7 @@ DIALOG () GSList *group = NULL; #endif int index = 0; - guchar buffer[10]; + gchar buffer[10]; gchar **argv; gint argc; @@ -733,7 +733,7 @@ gtkW_dialog_new (char * name, } static void -gtkW_message_dialog (gint gtk_was_initialized, guchar *message) +gtkW_message_dialog (gint gtk_was_initialized, gchar *message) { GtkWidget *dlg; GtkWidget *table; @@ -1008,7 +1008,7 @@ gtkW_table_add_button (GtkWidget *table, GtkWidget * gtkW_table_add_menu (GtkWidget *table, - guchar *name, + gchar *name, int x, int y, GtkSignalFunc menu_update, @@ -1018,7 +1018,7 @@ gtkW_table_add_menu (GtkWidget *table, { GtkWidget *label; GtkWidget *menu, *menuitem, *option_menu; - guchar buf[64]; + gchar buf[64]; gint i; label = gtk_label_new (name); diff --git a/plug-ins/autocrop/autocrop.c b/plug-ins/autocrop/autocrop.c index 5bb32e76ca27ac88fbef5b44c3fb969a7beb829c..444d9aedce8aa7ea13a935d7e52900bfac005c38 100644 --- a/plug-ins/autocrop/autocrop.c +++ b/plug-ins/autocrop/autocrop.c @@ -17,9 +17,9 @@ static void run(char *name, GParam * param, int *nreturn_vals, GParam ** return_vals); -static int colors_equal(gchar *col1, gchar *col2, int bytes); +static int colors_equal(guchar *col1, gchar *col2, int bytes); static int guess_bgcolor(GPixelRgn *pr, int width, int height, int bytes, - gchar *color); + guchar *color); static void doit(GDrawable *drawable, gint32); @@ -211,8 +211,8 @@ static void doit(GDrawable *drawable, gint32 image_id) } static int guess_bgcolor(GPixelRgn *pr, int width, int height, int bytes, - gchar *color) { - gchar tl[4], tr[4], bl[4], br[4]; + guchar *color) { + guchar tl[4], tr[4], bl[4], br[4]; gimp_pixel_rgn_get_pixel(pr, tl, 0, 0); gimp_pixel_rgn_get_pixel(pr, tr, width - 1, 0); @@ -256,7 +256,7 @@ static int guess_bgcolor(GPixelRgn *pr, int width, int height, int bytes, } } -static int colors_equal(gchar *col1, gchar *col2, int bytes) { +static int colors_equal(guchar *col1, gchar *col2, int bytes) { int equal = 1; int b; diff --git a/plug-ins/blinds/blinds.c b/plug-ins/blinds/blinds.c index bf659bd9cea8caf77612d711ba5f9ad92f3fc4c6..5f9822be8e9aa3ae0ea4a6f21c3e1d31eb2de2f4 100644 --- a/plug-ins/blinds/blinds.c +++ b/plug-ins/blinds/blinds.c @@ -1004,7 +1004,7 @@ apply_blinds(void) { GPixelRgn des_rgn; GPixelRgn src_rgn; - gchar *src_rows,*des_rows; + guchar *src_rows,*des_rows; int x,y; guchar bg[4]; diff --git a/plug-ins/bmp/bmp.c b/plug-ins/bmp/bmp.c index 7816124f89f7f5886d5f550202fba42e98b3c33f..c7866d1d4bb5bc775cd2fd984f628b354b9a5bc3 100644 --- a/plug-ins/bmp/bmp.c +++ b/plug-ins/bmp/bmp.c @@ -64,7 +64,7 @@ GPlugInInfo PLUG_IN_INFO = run, /* run_proc */ }; -MAIN (); +MAIN () static void query () diff --git a/plug-ins/bmp/bmp.h b/plug-ins/bmp/bmp.h index 5c287be277c19e4b96269bb6460980a4da2e5040..487842c84354f6d6951f392439098ff9e59ed035 100644 --- a/plug-ins/bmp/bmp.h +++ b/plug-ins/bmp/bmp.h @@ -19,7 +19,7 @@ extern gint WriteBMP (char *,gint32,gint32); extern gint ReadColorMap(FILE *, unsigned char[256][3], int, int, int *); extern Image ReadImage(FILE *, int, int, unsigned char[256][3], int, int, int, int, int); extern void WriteColorMap(FILE *, int *, int *, int *, int); -extern void WriteImage(FILE *,char *,int,int,int,int,int,int); +extern void WriteImage(FILE *,guchar *,int,int,int,int,int,int); extern int interactive_bmp; extern char *prog_name; diff --git a/plug-ins/bmp/bmpwrite.c b/plug-ins/bmp/bmpwrite.c index 9879a22b9b70fdebd01643b5d03f71f5ea644e59..8cddfaa9bd4cc1d41889525e16c0e8ef6df1e0b5 100644 --- a/plug-ins/bmp/bmpwrite.c +++ b/plug-ins/bmp/bmpwrite.c @@ -50,7 +50,8 @@ WriteBMP (filename,image,drawable_ID) int rows, cols, channels, MapSize, SpZeile; long BitsPerPixel; int colors; - char *temp_buf,*pixels; + char *temp_buf; + guchar *pixels; GPixelRgn pixel_rgn; GDrawable *drawable; GDrawableType drawable_type; @@ -132,7 +133,7 @@ WriteBMP (filename,image,drawable_ID) /* fetch the image */ - pixels = (char *) g_malloc(drawable->width*drawable->height*channels); + pixels = (guchar *) g_malloc(drawable->width*drawable->height*channels); gimp_pixel_rgn_get_rect(&pixel_rgn, pixels, 0, 0, drawable->width, drawable->height); /* And let's begin the progress */ @@ -237,10 +238,10 @@ void WriteColorMap(FILE *f, int red[MAXCOLORS], int green[MAXCOLORS], void WriteImage(f, src, width, height, encoded, channels, bpp, spzeile) FILE *f; - char *src; + guchar *src; int width,height,encoded,channels,bpp,spzeile; { - char buf[16]; + guchar buf[16]; char *temp,v,g; int xpos,ypos,i,j,rowstride,laenge; diff --git a/plug-ins/common/CML_explorer.c b/plug-ins/common/CML_explorer.c index b25d28fd14bbc2e3cd4f0d62f31487224cd92d35..f4d9e8ed62af66df56a9df4033f4168093f4a368 100644 --- a/plug-ins/common/CML_explorer.c +++ b/plug-ins/common/CML_explorer.c @@ -117,7 +117,7 @@ typedef struct typedef struct { - guchar *name; + gchar *name; gpointer data; } gtkW_menu_item; /* gtkW global variables */ @@ -143,16 +143,16 @@ static void gtkW_menu_update (GtkWidget *widget, gpointer data); static void gtkW_toggle_change_value (gtkW_widget_table *wtable); /* gtkW method */ GtkWidget *gtkW_check_button_new (GtkWidget *parent, - guchar *name, + gchar *name, GtkSignalFunc update, gint *value); -static GtkWidget *gtkW_dialog_new (guchar *name, +static GtkWidget *gtkW_dialog_new (gchar *name, GtkSignalFunc ok_callback, GtkSignalFunc close_callback); -static GtkWidget *gtkW_frame_new (GtkWidget *parent, guchar *name); +static GtkWidget *gtkW_frame_new (GtkWidget *parent, gchar *name); static GtkWidget *gtkW_hbox_new (GtkWidget *parent); -static void gtkW_message_dialog (gint gtk_was_initialized, guchar *message); -static GtkWidget *gtkW_message_dialog_new (guchar * name); +static void gtkW_message_dialog (gint gtk_was_initialized, gchar *message); +static GtkWidget *gtkW_message_dialog_new (gchar * name); static GtkWidget *gtkW_table_add_button (GtkWidget *table, gchar *name, gint x0, @@ -183,7 +183,7 @@ static GtkWidget *gtkW_table_add_iscale_entry (GtkWidget *table, gdouble step, gpointer table_entry); static GtkWidget *gtkW_table_add_menu (GtkWidget *parent, - guchar *name, + gchar *name, gint x, gint y, GtkSignalFunc imenu_update, @@ -192,7 +192,7 @@ static GtkWidget *gtkW_table_add_menu (GtkWidget *parent, gint item_num, gpointer table_entry); static GtkWidget *gtkW_table_add_toggle (GtkWidget *table, - guchar *name, + gchar *name, gint x, gint y, GtkSignalFunc update, @@ -200,7 +200,7 @@ static GtkWidget *gtkW_table_add_toggle (GtkWidget *table, gpointer widget_entry); static GtkWidget *gtkW_table_new (GtkWidget *parent, gint col, gint row); static GtkWidget *gtkW_vbox_add_button (GtkWidget *vbox, - guchar *name, + gchar *name, GtkSignalFunc update, gpointer data); static GtkWidget *gtkW_vbox_new (GtkWidget *parent); @@ -347,7 +347,7 @@ typedef struct gint scale; gint start_offset; gint seed; - guchar last_file_name[256]; + gchar last_file_name[256]; } ValueType; static ValueType VALS = @@ -401,10 +401,10 @@ static void hsv_to_rgb (int *h, int *s, int *v); static gdouble logistic_function (CML_PARAM *param, gdouble x, gdouble power); static gint DIALOG (); static GtkWidget *CML_dialog_sub_panel_new (GtkWidget *parent, - guchar *name, + gchar *name, CML_PARAM *param, gint channel_id); -static GtkWidget *CML_dialog_advanced_panel_new (GtkWidget *parent, guchar *name); +static GtkWidget *CML_dialog_advanced_panel_new (GtkWidget *parent, gchar *name); void preview_update (); static void function_graph_new (GtkWidget *widget, gpointer data); static void CML_set_or_randomize_seed_callback (GtkWidget *widget, gpointer data); @@ -419,7 +419,7 @@ static gint force_overwrite (char *filename); static void CML_overwrite_ok_callback (GtkWidget *widget, gpointer data); static void CML_preview_update_callback (GtkWidget *widget, gpointer data); static void CML_load_from_file_callback (GtkWidget *widget, gpointer client_data); -static gint CML_load_parameter_file (guchar *filename, gint interactive_mode); +static gint CML_load_parameter_file (gchar *filename, gint interactive_mode); static void CML_execute_load_from_file (GtkWidget *widget, gpointer client_data); static gint parse_line_to_gint (FILE *file, gint *flag); static gdouble parse_line_to_gdouble (FILE *file, gint *flag); @@ -528,7 +528,7 @@ run (char *name, break; case RUN_NONINTERACTIVE: { - guchar *filename = param[3].data.d_string; + gchar *filename = param[3].data.d_string; if (! CML_load_parameter_file (filename, FALSE)) return; @@ -1620,7 +1620,7 @@ DIALOG () static GtkWidget * CML_dialog_sub_panel_new (GtkWidget *parent, - guchar *name, + gchar *name, CML_PARAM *param, gint channel_id) { @@ -1733,7 +1733,7 @@ CML_dialog_sub_panel_new (GtkWidget *parent, } static GtkWidget * -CML_dialog_advanced_panel_new (GtkWidget *parent, guchar *name) +CML_dialog_advanced_panel_new (GtkWidget *parent, gchar *name) { GtkWidget *frame; GtkWidget *subframe; @@ -1742,7 +1742,7 @@ CML_dialog_advanced_panel_new (GtkWidget *parent, guchar *name) gint index = 0; gint widget_offset = 12; gint channel_id; - guchar *ch_name[] = { "Hue", "Saturation", "Value" }; + gchar *ch_name[] = { "Hue", "Saturation", "Value" }; CML_PARAM *param; frame = gtkW_frame_new (parent, name); @@ -2091,7 +2091,7 @@ CML_execute_save_to_file (GtkWidget *widget, gpointer client_data) } if ((err != 0) && (file == NULL)) { - guchar buffer[CML_LINE_SIZE]; + gchar buffer[CML_LINE_SIZE]; sprintf (buffer, "Error: could not open \"%s\"", filename); gtkW_message_dialog (TRUE, buffer); @@ -2136,7 +2136,7 @@ CML_execute_save_to_file (GtkWidget *widget, gpointer client_data) fclose(file); #ifdef VERBOSE_DIALOGS { - guchar buffer[CML_LINE_SIZE]; + gchar buffer[CML_LINE_SIZE]; sprintf (buffer, "Parameters were saved to \"%s\"", filename); gtkW_message_dialog (TRUE, buffer); @@ -2266,7 +2266,7 @@ CML_execute_load_from_file (GtkWidget *widget, gpointer client_data) } static gint -CML_load_parameter_file (guchar *filename, gint interactive_mode) +CML_load_parameter_file (gchar *filename, gint interactive_mode) { FILE *file; int channel_id; @@ -2282,7 +2282,7 @@ CML_load_parameter_file (guchar *filename, gint interactive_mode) if (!file) { - guchar buffer[CML_LINE_SIZE]; + gchar buffer[CML_LINE_SIZE]; if (interactive_mode) { @@ -2293,7 +2293,7 @@ CML_load_parameter_file (guchar *filename, gint interactive_mode) } else { - guchar line[CML_LINE_SIZE]; + gchar line[CML_LINE_SIZE]; gdouble version = 0.99; version = parse_line_to_gdouble (file, &flag); /* old format returns 1 */ @@ -2410,8 +2410,8 @@ CML_load_parameter_file (guchar *filename, gint interactive_mode) static gint parse_line_to_gint (FILE *file, gint *flag) { - guchar line[CML_LINE_SIZE]; - guchar *str; + gchar line[CML_LINE_SIZE]; + gchar *str; gint value; if (! *flag) @@ -2438,8 +2438,8 @@ parse_line_to_gint (FILE *file, gint *flag) static gdouble parse_line_to_gdouble (FILE *file, gint *flag) { - guchar line[CML_LINE_SIZE]; - guchar *str; + gchar line[CML_LINE_SIZE]; + gchar *str; gdouble value; if (! *flag) @@ -2636,7 +2636,7 @@ gtkW_toggle_change_value (gtkW_widget_table *wtable) GtkWidget * gtkW_check_button_new (GtkWidget *parent, - guchar *name, + gchar *name, GtkSignalFunc update, gint *value) { @@ -2653,7 +2653,7 @@ gtkW_check_button_new (GtkWidget *parent, } static GtkWidget * -gtkW_dialog_new (guchar *name, +gtkW_dialog_new (gchar *name, GtkSignalFunc ok_callback, GtkSignalFunc close_callback) { @@ -2689,7 +2689,7 @@ gtkW_dialog_new (guchar *name, static GtkWidget * gtkW_frame_new (GtkWidget *parent, - guchar *name) + gchar *name) { GtkWidget *frame; @@ -2718,7 +2718,7 @@ gtkW_hbox_new (GtkWidget *parent) } static void -gtkW_message_dialog (gint gtk_was_initialized, guchar *message) +gtkW_message_dialog (gint gtk_was_initialized, gchar *message) { GtkWidget *dlg; GtkWidget *table; @@ -2751,7 +2751,7 @@ gtkW_message_dialog (gint gtk_was_initialized, guchar *message) } static GtkWidget * -gtkW_message_dialog_new (guchar * name) +gtkW_message_dialog_new (gchar * name) { GtkWidget *dlg, *button; @@ -2811,7 +2811,7 @@ gtkW_table_add_dscale_entry (GtkWidget *table, { GtkObject *adjustment; GtkWidget *label, *hbox, *scale, *entry; - guchar *buffer; + gchar *buffer; label = gtk_label_new (name); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); @@ -2843,7 +2843,7 @@ gtkW_table_add_dscale_entry (GtkWidget *table, gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0); gtk_widget_set_usize (entry, GTKW_ENTRY_WIDTH, 0); - buffer = (guchar *) g_malloc (GTKW_ENTRY_BUFFER_SIZE); + buffer = (gchar *) g_malloc (GTKW_ENTRY_BUFFER_SIZE); sprintf (buffer, "%6f", *value); gtk_entry_set_text (GTK_ENTRY (entry), buffer); gtk_signal_connect (GTK_OBJECT (entry), "changed", @@ -2880,7 +2880,7 @@ gtkW_table_add_iscale_entry (GtkWidget *table, { GtkObject *adjustment; GtkWidget *label, *hbox, *scale, *entry; - guchar *buffer; + gchar *buffer; label = gtk_label_new (name); gtk_misc_set_alignment (GTK_MISC(label), 0.0, 0.5); @@ -2911,7 +2911,7 @@ gtkW_table_add_iscale_entry (GtkWidget *table, gtk_object_set_user_data (adjustment, entry); gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0); gtk_widget_set_usize (entry, GTKW_ENTRY_WIDTH, 0); - buffer = (guchar *) g_malloc (GTKW_ENTRY_BUFFER_SIZE); + buffer = (gchar *) g_malloc (GTKW_ENTRY_BUFFER_SIZE); sprintf (buffer, "%d", *value); gtk_entry_set_text (GTK_ENTRY (entry), buffer); gtk_signal_connect (GTK_OBJECT (entry), "changed", @@ -2935,7 +2935,7 @@ gtkW_table_add_iscale_entry (GtkWidget *table, static GtkWidget * gtkW_table_add_menu (GtkWidget *table, - guchar *name, + gchar *name, gint x, gint y, GtkSignalFunc menu_update, @@ -2995,7 +2995,7 @@ gtkW_table_add_menu (GtkWidget *table, static GtkWidget * gtkW_table_add_toggle (GtkWidget *table, - guchar *name, + gchar *name, gint x, gint y, GtkSignalFunc update, @@ -3041,7 +3041,7 @@ gtkW_table_new (GtkWidget *parent, gint col, gint row) static GtkWidget * gtkW_vbox_add_button (GtkWidget *vbox, - guchar *name, + gchar *name, GtkSignalFunc update, gpointer data) { diff --git a/plug-ins/common/align_layers.c b/plug-ins/common/align_layers.c index e72f5ad06e25168da1aca7d1b9563bab1c0af3b7..9d9f0f6318d8494a567bef724e2288d0f57b91cc 100644 --- a/plug-ins/common/align_layers.c +++ b/plug-ins/common/align_layers.c @@ -53,7 +53,7 @@ static void gtkW_iscale_update (GtkAdjustment *adjustment, gpointer data); static void gtkW_ientry_update (GtkWidget *widget, gpointer data); static GtkWidget *gtkW_dialog_new (char *name, GtkSignalFunc ok_callback, GtkSignalFunc close_callback); -static void gtkW_message_dialog (gint gtk_was_initialized, guchar *message); +static void gtkW_message_dialog (gint gtk_was_initialized, gchar *message); static GtkWidget *gtkW_message_dialog_new (char * name); static void gtkW_table_add_toggle (GtkWidget *table, @@ -83,11 +83,11 @@ GtkWidget *gtkW_table_add_button (GtkWidget *table, gpointer value); typedef struct { - guchar *name; + gchar *name; gpointer data; } gtkW_menu_item; GtkWidget *gtkW_table_add_menu (GtkWidget *parent, - guchar *name, + gchar *name, int x, int y, GtkSignalFunc imenu_update, @@ -482,7 +482,7 @@ DIALOG () GSList *group = NULL; #endif int index = 0; - guchar buffer[10]; + gchar buffer[10]; gchar **argv; gint argc; @@ -733,7 +733,7 @@ gtkW_dialog_new (char * name, } static void -gtkW_message_dialog (gint gtk_was_initialized, guchar *message) +gtkW_message_dialog (gint gtk_was_initialized, gchar *message) { GtkWidget *dlg; GtkWidget *table; @@ -1008,7 +1008,7 @@ gtkW_table_add_button (GtkWidget *table, GtkWidget * gtkW_table_add_menu (GtkWidget *table, - guchar *name, + gchar *name, int x, int y, GtkSignalFunc menu_update, @@ -1018,7 +1018,7 @@ gtkW_table_add_menu (GtkWidget *table, { GtkWidget *label; GtkWidget *menu, *menuitem, *option_menu; - guchar buf[64]; + gchar buf[64]; gint i; label = gtk_label_new (name); diff --git a/plug-ins/common/autocrop.c b/plug-ins/common/autocrop.c index 5bb32e76ca27ac88fbef5b44c3fb969a7beb829c..444d9aedce8aa7ea13a935d7e52900bfac005c38 100644 --- a/plug-ins/common/autocrop.c +++ b/plug-ins/common/autocrop.c @@ -17,9 +17,9 @@ static void run(char *name, GParam * param, int *nreturn_vals, GParam ** return_vals); -static int colors_equal(gchar *col1, gchar *col2, int bytes); +static int colors_equal(guchar *col1, gchar *col2, int bytes); static int guess_bgcolor(GPixelRgn *pr, int width, int height, int bytes, - gchar *color); + guchar *color); static void doit(GDrawable *drawable, gint32); @@ -211,8 +211,8 @@ static void doit(GDrawable *drawable, gint32 image_id) } static int guess_bgcolor(GPixelRgn *pr, int width, int height, int bytes, - gchar *color) { - gchar tl[4], tr[4], bl[4], br[4]; + guchar *color) { + guchar tl[4], tr[4], bl[4], br[4]; gimp_pixel_rgn_get_pixel(pr, tl, 0, 0); gimp_pixel_rgn_get_pixel(pr, tr, width - 1, 0); @@ -256,7 +256,7 @@ static int guess_bgcolor(GPixelRgn *pr, int width, int height, int bytes, } } -static int colors_equal(gchar *col1, gchar *col2, int bytes) { +static int colors_equal(guchar *col1, gchar *col2, int bytes) { int equal = 1; int b; diff --git a/plug-ins/common/blinds.c b/plug-ins/common/blinds.c index bf659bd9cea8caf77612d711ba5f9ad92f3fc4c6..5f9822be8e9aa3ae0ea4a6f21c3e1d31eb2de2f4 100644 --- a/plug-ins/common/blinds.c +++ b/plug-ins/common/blinds.c @@ -1004,7 +1004,7 @@ apply_blinds(void) { GPixelRgn des_rgn; GPixelRgn src_rgn; - gchar *src_rows,*des_rows; + guchar *src_rows,*des_rows; int x,y; guchar bg[4]; diff --git a/plug-ins/common/flarefx.c b/plug-ins/common/flarefx.c index 49df043c982512f5bd48b47601e6d17d4b3dd07b..00eabdad327df9a193c33646b39a5a2e0d361224 100644 --- a/plug-ins/common/flarefx.c +++ b/plug-ins/common/flarefx.c @@ -243,7 +243,7 @@ static gint flare_dialog() GtkWidget *entry; gchar **argv; gint argc; - guchar buffer[32]; + gchar buffer[32]; argc = 1; argv = g_new (gchar *, 1); diff --git a/plug-ins/common/gicon.c b/plug-ins/common/gicon.c index 8ba82e9a5a140a15535240f1779710a19078bb33..796a41e3ec4101b213a23d2b5dccf5dfc69db109 100644 --- a/plug-ins/common/gicon.c +++ b/plug-ins/common/gicon.c @@ -272,7 +272,7 @@ load_image (char *filename) drawable->height, TRUE, FALSE); data_buf = g_new (char, width); - dest = g_new (char, width * 2); + dest = g_new (guchar, width * 2); for (i = 0; i < height; i++) { @@ -340,7 +340,7 @@ save_image (char *filename, fprintf (fp, "static char *%s_bits [] = \n{\n", givals.icon_name); /* write the brush data to the file */ - src_buf = g_new (char, w * drawable->bpp); + src_buf = g_new (guchar, w * drawable->bpp); for (i = 0; i < h; i++) { gimp_pixel_rgn_get_row (&pixel_rgn, src_buf, 0, i, w); diff --git a/plug-ins/common/gqbist.c b/plug-ins/common/gqbist.c index 06b08508388dadbbd31ea1fa7252ef53deb1b089..99d040f7a625249aeeb8bd3fb26cf43fa768b47e 100644 --- a/plug-ins/common/gqbist.c +++ b/plug-ins/common/gqbist.c @@ -374,7 +374,7 @@ void run(char *name, int nparams, GParam *param, int *nreturn_vals, GParam **ret gimp_progress_init ("Qbist ..."); for (row=sel_y1; rowwidth][drawable->height];*/ int *palloc; guchar *buffer, *buf2; - guchar *width, *height; + gchar *width, *height; GPixelRgn pixel_rgn; char *name; @@ -227,8 +227,8 @@ save_image (char *filename, buffer = g_new(guchar,drawable->bpp); buf2 = g_new(guchar,drawable->bpp); - width = malloc (1); - height = malloc (1); + width = malloc (2); + height = malloc (2); sprintf(width," "); sprintf(height," "); if (strcmp (gtmvals.clwidth, "") != 0) { @@ -334,7 +334,7 @@ static gint save_dialog () GtkTooltips *tips; GdkColor tips_fg, tips_bg; gchar **argv; - guchar buffer[32]; + gchar buffer[32]; gint argc; bint.run=FALSE; diff --git a/plug-ins/common/hot.c b/plug-ins/common/hot.c index 25d342c266d0a87d655bb8da30039c17bdd6b56a..5e56ebd15797bfe2e0ab1834682bb2dc66b1afec 100644 --- a/plug-ins/common/hot.c +++ b/plug-ins/common/hot.c @@ -94,12 +94,12 @@ struct piArgs { typedef enum { act_lredux = 0, act_sredux = 1, - act_flag = 2, + act_flag = 2 } hotAction; typedef enum { mode_ntsc = 0, - mode_pal = 1, + mode_pal = 1 } hotModes; #define CHROMA_LIM 50.0 /* chroma amplitude limit */ diff --git a/plug-ins/common/max_rgb.c b/plug-ins/common/max_rgb.c index 4aa979e1138d0468de73ec97a319748dea3af24a..286e0c47696160964afd6c0f549559f42eb60fd7 100644 --- a/plug-ins/common/max_rgb.c +++ b/plug-ins/common/max_rgb.c @@ -48,7 +48,7 @@ static void run (char *name, GParam **return_vals); static GStatusType MAIN_FUNCTION (gint32 drawable_id); static gint DIALOG (); -static void ERROR_DIALOG (gint gtk_was_not_initialized, guchar *message); +static void ERROR_DIALOG (gint gtk_was_not_initialized, gchar *message); static void OK_CALLBACK (GtkWidget *widget, gpointer data); @@ -169,7 +169,7 @@ run (char *name, /* Since a channel might be selected, we must check wheter RGB or not. */ if (!gimp_drawable_color(drawable_id)) { - ERROR_DIALOG (1, (guchar *)"RGB drawable is not selected."); + ERROR_DIALOG (1, "RGB drawable is not selected."); return; } if (! DIALOG ()) @@ -302,7 +302,7 @@ DIALOG () } static void -ERROR_DIALOG (gint gtk_was_not_initialized, guchar *message) +ERROR_DIALOG (gint gtk_was_not_initialized, gchar *message) { GtkWidget *dlg; GtkWidget *table; diff --git a/plug-ins/common/nlfilt.c b/plug-ins/common/nlfilt.c index abd45a36389afb758ce24b539e317f9d0ed08abc..31e1e697f3a1b61ae1b5123524b81e10264f6cfd 100644 --- a/plug-ins/common/nlfilt.c +++ b/plug-ins/common/nlfilt.c @@ -67,7 +67,7 @@ struct piArgs { typedef enum { filter_alpha_trim, filter_opt_est, - filter_edge_enhance, + filter_edge_enhance } FilterType; /* other structure declarations */ diff --git a/plug-ins/common/pat.c b/plug-ins/common/pat.c index 35f73fa7da56dd459600f1a1f968cbadf244980c..d9db68ac1f6314916b7ede6e5d1673f0c980d916 100644 --- a/plug-ins/common/pat.c +++ b/plug-ins/common/pat.c @@ -173,7 +173,7 @@ static gint32 load_image (char *filename) { char *temp; int fd; PatternHeader ph; - gchar *buffer; + guchar *buffer; gint32 image_ID, layer_ID; GDrawable *drawable; gint line; diff --git a/plug-ins/common/pcx.c b/plug-ins/common/pcx.c index fcc5f0782e4eab2293c5443ef2800c1b80cc7779..ceda65f72db1e44502615653fbcb95d9088f5c03 100644 --- a/plug-ins/common/pcx.c +++ b/plug-ins/common/pcx.c @@ -100,10 +100,10 @@ static void query () { /* Declare internal functions. */ static gint32 load_image (char *filename); -static void load_1(FILE *fp, int width, int height, char *buffer, int bytes); -static void load_4(FILE *fp, int width, int height, char *buffer, int bytes); -static void load_8(FILE *fp, int width, int height, char *buffer, int bytes); -static void load_24(FILE *fp, int width, int height, char *buffer, int bytes); +static void load_1(FILE *fp, int width, int height, guchar *buffer, int bytes); +static void load_4(FILE *fp, int width, int height, guchar *buffer, int bytes); +static void load_8(FILE *fp, int width, int height, guchar *buffer, int bytes); +static void load_24(FILE *fp, int width, int height, guchar *buffer, int bytes); static void readline(FILE *fp, guchar* buffer, int bytes); static gint save_image (char *filename, gint32 image, gint32 layer); @@ -273,7 +273,7 @@ static gint32 load_image (char *filename) { return image; } -static void load_8(FILE *fp, int width, int height, char *buffer, int bytes) { +static void load_8(FILE *fp, int width, int height, guchar *buffer, int bytes) { int row; guchar *line; line= (guchar *) g_malloc(bytes); @@ -287,7 +287,7 @@ static void load_8(FILE *fp, int width, int height, char *buffer, int bytes) { g_free(line); } -static void load_24(FILE *fp, int width, int height, char *buffer, int bytes) { +static void load_24(FILE *fp, int width, int height, guchar *buffer, int bytes) { int x, y, c; guchar *line; line= (guchar *) g_malloc(bytes * 3); @@ -305,7 +305,7 @@ static void load_24(FILE *fp, int width, int height, char *buffer, int bytes) { g_free(line); } -static void load_1(FILE *fp, int width, int height, char *buffer, int bytes) { +static void load_1(FILE *fp, int width, int height, guchar *buffer, int bytes) { int x, y; guchar *line; line= (guchar *) g_malloc(bytes); @@ -324,7 +324,7 @@ static void load_1(FILE *fp, int width, int height, char *buffer, int bytes) { g_free(line); } -static void load_4(FILE *fp, int width, int height, char *buffer, int bytes) { +static void load_4(FILE *fp, int width, int height, guchar *buffer, int bytes) { int x, y, c; guchar *line; line= (guchar *) g_malloc(bytes); diff --git a/plug-ins/common/rotate.c b/plug-ins/common/rotate.c index fb3441e9d70359032772b21c1c05cbab9b9aa52b..2d8844760f49e922f3ec87dd77f31c68fbbfef96 100644 --- a/plug-ins/common/rotate.c +++ b/plug-ins/common/rotate.c @@ -118,7 +118,7 @@ static void rotate_ok_callback (GtkWidget *widget, gpointer data); static void rotate_toggle_update (GtkWidget *widget, gpointer data); -static void ErrorMessage (guchar *message); +static void ErrorMessage (gchar *message); gint32 my_gimp_selection_float (gint32 image_ID, gint32 drawable_ID); gint32 my_gimp_selection_is_empty (gint32 image_ID); @@ -770,7 +770,7 @@ rotate_toggle_update (GtkWidget *widget, * This code was stolen from Pavel Greenfield's Colormap Rotation plug-in */ static void -ErrorMessage(guchar *message) +ErrorMessage(gchar *message) { GtkWidget *window, *label, *button, *table; gchar **argv=g_new (gchar *, 1); diff --git a/plug-ins/common/snoise.c b/plug-ins/common/snoise.c index 28d655af86487e8ba318403797031e77e759dda4..4cec4572cac80a6ca03b05894f13a3d6bb0db9d9 100644 --- a/plug-ins/common/snoise.c +++ b/plug-ins/common/snoise.c @@ -471,7 +471,7 @@ solid_noise_dialog (void) GtkObject *scale_data; gchar **argv; gint argc; - guchar buffer[32]; + gchar buffer[32]; /* Set args */ argc = 1; diff --git a/plug-ins/common/threshold_alpha.c b/plug-ins/common/threshold_alpha.c index 07ab487d4041876d1c089a2611ca8591fb3d8285..6eee7ae138bd19da8b6fe7d58dfa50244293a660 100644 --- a/plug-ins/common/threshold_alpha.c +++ b/plug-ins/common/threshold_alpha.c @@ -48,7 +48,7 @@ static void run (char *name, GParam **return_vals); static GStatusType MAIN_FUNCTION (); static gint DIALOG (); -static void ERROR_DIALOG (gint gtk_was_not_initialized, guchar *message); +static void ERROR_DIALOG (gint gtk_was_not_initialized, gchar *message); static void OK_CALLBACK (GtkWidget *widget, gpointer data); @@ -349,7 +349,7 @@ DIALOG () } static void -ERROR_DIALOG (gint gtk_was_not_initialized, guchar *message) +ERROR_DIALOG (gint gtk_was_not_initialized, gchar *message) { GtkWidget *dlg; GtkWidget *table; diff --git a/plug-ins/common/zealouscrop.c b/plug-ins/common/zealouscrop.c index ef68fef15981117034e29cdded380ae29750fd1f..e72e9fa101cca4e4cc626d22a3bc9ba37f1fec5c 100644 --- a/plug-ins/common/zealouscrop.c +++ b/plug-ins/common/zealouscrop.c @@ -29,7 +29,7 @@ static void run(char *name, GParam * param, int *nreturn_vals, GParam ** return_vals); -static inline int colours_equal(gchar *col1, gchar *col2, int bytes); +static inline int colours_equal(guchar *col1, gchar *col2, int bytes); static void do_zcrop(GDrawable *drawable, gint32); @@ -271,7 +271,7 @@ static void do_zcrop(GDrawable *drawable, gint32 image_id) } -static inline int colours_equal(gchar *col1, gchar *col2, int bytes) +static inline int colours_equal(guchar *col1, gchar *col2, int bytes) { int b; diff --git a/plug-ins/fits/fitsrw.c b/plug-ins/fits/fitsrw.c index a601fe1a635f5fe72b8b5e8ef87dc498b38208ff..240fde3630d7406181f29f24c378475dd457361d 100644 --- a/plug-ins/fits/fitsrw.c +++ b/plug-ins/fits/fitsrw.c @@ -760,7 +760,7 @@ void fits_print_header (FITS_HDU_LIST *hdr) static FITS_RECORD_LIST *fits_read_header (FILE *fp, int *nrec) -{unsigned char record[FITS_RECORD_SIZE]; +{char record[FITS_RECORD_SIZE]; FITS_RECORD_LIST *start_list = NULL, *cu_record = NULL, *new_record; FITS_DATA *fdat; int k, simple, xtension; diff --git a/plug-ins/fits/fitsrw.h b/plug-ins/fits/fitsrw.h index dff5f79d7abcfffc3bda52731d2a80b20f9554cc..6c45c5fbfbdd5d165cb3ab735cdeb04485ab667b 100644 --- a/plug-ins/fits/fitsrw.h +++ b/plug-ins/fits/fitsrw.h @@ -68,7 +68,7 @@ typedef union { } FITS_DATA; typedef struct fits_record_list { /* Record list */ - unsigned char data[FITS_RECORD_SIZE]; + char data[FITS_RECORD_SIZE]; struct fits_record_list *next_record; } FITS_RECORD_LIST; diff --git a/plug-ins/flarefx/flarefx.c b/plug-ins/flarefx/flarefx.c index 49df043c982512f5bd48b47601e6d17d4b3dd07b..00eabdad327df9a193c33646b39a5a2e0d361224 100644 --- a/plug-ins/flarefx/flarefx.c +++ b/plug-ins/flarefx/flarefx.c @@ -243,7 +243,7 @@ static gint flare_dialog() GtkWidget *entry; gchar **argv; gint argc; - guchar buffer[32]; + gchar buffer[32]; argc = 1; argv = g_new (gchar *, 1); diff --git a/plug-ins/gfig/gfig.c b/plug-ins/gfig/gfig.c index 754a2b18a37b841bc2736436db9c90fc19fa2d4c..aa95ed123becc2ba980082911c1912f842c57654 100644 --- a/plug-ins/gfig/gfig.c +++ b/plug-ins/gfig/gfig.c @@ -198,39 +198,39 @@ typedef enum DobjType { COPY_OBJ, MOVE_COPY_OBJ, DEL_OBJ, - NULL_OPER, + NULL_OPER } DOBJTYPE; typedef enum Gridtype { RECT_GRID = 0, POLAR_GRID, - ISO_GRID, + ISO_GRID } GRIDTYPE; typedef enum DrawonLayers { SINGLE_LAYER = 0, ORIGINAL_LAYER, - MULTI_LAYER, + MULTI_LAYER } DRAWONLAYERS; typedef enum LayersBGType { LAYER_TRANS_BG = 0, LAYER_BG_BG, LAYER_WHITE_BG, - LAYER_COPY_BG, + LAYER_COPY_BG } DRAWLAYERBG; typedef enum PaintType { PAINT_BRUSH_TYPE = 0, PAINT_SELECTION_TYPE, - PAINT_SELECTION_FILL_TYPE, + PAINT_SELECTION_FILL_TYPE } PAINTTYPE; typedef enum BrshType { BRUSH_BRUSH_TYPE=0, BRUSH_PENCIL_TYPE, BRUSH_AIRBRUSH_TYPE, - BRUSH_PATTERN_TYPE, + BRUSH_PATTERN_TYPE } BRUSH_TYPE; @@ -333,24 +333,24 @@ typedef enum Selection_Type { ADD=0, SUBTRACT=1, REPLACE=2, - INTERSECT=3, + INTERSECT=3 } SELECTION_TYPE; typedef enum Arc_Type { ARC_SEGMENT, - ARC_SECTOR, + ARC_SECTOR } ARC_TYPE; typedef enum Fill_Type { FILL_FOREGROUND = 0, FILL_BACKGROUND = 1, - FILL_PATTERN = 2, + FILL_PATTERN = 2 } FILL_TYPE; typedef enum Fill_When { FILL_EACH = 0, - FILL_AFTER, + FILL_AFTER } FILL_WHEN; struct selection_option { @@ -443,7 +443,7 @@ typedef struct BrushDesc { gchar * bname; /* name of the brush */ gint32 width; /* Width of brush */ gint32 height; /* Height of brush */ - gchar *pv_buf; /* Buffer where brush placed */ + guchar *pv_buf; /* Buffer where brush placed */ gint16 x_off; gint16 y_off; gint bpp; /* Depth - should ALWAYS be the same for all BRUSHDESC */ @@ -576,7 +576,7 @@ static gint has_alpha; static gdouble scale_x_factor,scale_y_factor; static gdouble org_scale_x_factor,org_scale_y_factor; -MAIN (); +MAIN () static void query () @@ -870,7 +870,7 @@ plug_in_parse_gfig_path() Tkane from gflare plugin */ void -gfig_name_encode (guchar *dest, guchar *src) +gfig_name_encode (gchar *dest, guchar *src) { int cnt = MAX_LOAD_LINE - 1; @@ -891,7 +891,7 @@ gfig_name_encode (guchar *dest, guchar *src) Translate "\\040" to SPACE, etc. */ void -gfig_name_decode (guchar *dest, guchar *src) +gfig_name_decode (gchar *dest, gchar *src) { int cnt = MAX_LOAD_LINE - 1; int tmp; @@ -11775,7 +11775,7 @@ d_load_bezier(FILE *from) static fp_pnt_cnt = 0; static fp_pnt_chunk = 0; -gdouble *fp_pnt_pnts = NULL;; +gdouble *fp_pnt_pnts = NULL; static void diff --git a/plug-ins/gfli/gfli.c b/plug-ins/gfli/gfli.c index 499d6f52091a1983b58e83fc2437ae13937c9cc8..19eb0b2a8f1d81eeebb6ac8d9cb26ab1a9023df6 100644 --- a/plug-ins/gfli/gfli.c +++ b/plug-ins/gfli/gfli.c @@ -207,7 +207,7 @@ void fli_read_header(FILE *f, s_fli_header *fli_header) } } -void fli_read_frame(FILE *f, s_fli_header *fli_header, gchar *framebuf, gchar *cmap) +void fli_read_frame(FILE *f, s_fli_header *fli_header, guchar *framebuf, gchar *cmap) { s_fli_frame fli_frame; unsigned long framepos; @@ -257,7 +257,7 @@ void fli_read_frame(FILE *f, s_fli_header *fli_header, gchar *framebuf, gchar *c break; case 15 : { /* fli_brun */ unsigned short yc; - char *pos; + guchar *pos; for (yc=0; yc< fli_header->height; yc++) { unsigned short xc, pc, pcnt; pc=fli_read_char(f); @@ -286,7 +286,7 @@ void fli_read_frame(FILE *f, s_fli_header *fli_header, gchar *framebuf, gchar *c } case 16 : { /* fli_copy */ unsigned long cc; - char *pos; + guchar *pos; pos=framebuf; for (cc=fli_header->width * fli_header->height; cc>0; cc--) { *(pos++)=fli_read_char(f); @@ -295,7 +295,7 @@ void fli_read_frame(FILE *f, s_fli_header *fli_header, gchar *framebuf, gchar *c } case 12 : { /* fli_lc */ unsigned short yc, firstline, numline; - char *pos; + guchar *pos; firstline = fli_read_short(f); numline = fli_read_short(f); for (yc=0; yc < numline; yc++) { @@ -328,7 +328,7 @@ void fli_read_frame(FILE *f, s_fli_header *fli_header, gchar *framebuf, gchar *c } case 7 : { /* fli_lc2 */ unsigned short yc, lc, numline; - char *pos; + guchar *pos; yc=0; numline = fli_read_short(f); for (lc=0; lc < numline; lc++) { @@ -415,8 +415,8 @@ gint32 load_image (char *filename) GDrawable *drawable; gint32 image_ID, layer_ID; - gchar *frame_buffer; - gchar cmap[768]; + guchar *frame_buffer; + guchar cmap[768]; GPixelRgn pixel_rgn; s_fli_header fli_header; diff --git a/plug-ins/gicon/gicon.c b/plug-ins/gicon/gicon.c index 8ba82e9a5a140a15535240f1779710a19078bb33..796a41e3ec4101b213a23d2b5dccf5dfc69db109 100644 --- a/plug-ins/gicon/gicon.c +++ b/plug-ins/gicon/gicon.c @@ -272,7 +272,7 @@ load_image (char *filename) drawable->height, TRUE, FALSE); data_buf = g_new (char, width); - dest = g_new (char, width * 2); + dest = g_new (guchar, width * 2); for (i = 0; i < height; i++) { @@ -340,7 +340,7 @@ save_image (char *filename, fprintf (fp, "static char *%s_bits [] = \n{\n", givals.icon_name); /* write the brush data to the file */ - src_buf = g_new (char, w * drawable->bpp); + src_buf = g_new (guchar, w * drawable->bpp); for (i = 0; i < h; i++) { gimp_pixel_rgn_get_row (&pixel_rgn, src_buf, 0, i, w); diff --git a/plug-ins/gqbist/gqbist.c b/plug-ins/gqbist/gqbist.c index 06b08508388dadbbd31ea1fa7252ef53deb1b089..99d040f7a625249aeeb8bd3fb26cf43fa768b47e 100644 --- a/plug-ins/gqbist/gqbist.c +++ b/plug-ins/gqbist/gqbist.c @@ -374,7 +374,7 @@ void run(char *name, int nparams, GParam *param, int *nreturn_vals, GParam **ret gimp_progress_init ("Qbist ..."); for (row=sel_y1; rowwidth][drawable->height];*/ int *palloc; guchar *buffer, *buf2; - guchar *width, *height; + gchar *width, *height; GPixelRgn pixel_rgn; char *name; @@ -227,8 +227,8 @@ save_image (char *filename, buffer = g_new(guchar,drawable->bpp); buf2 = g_new(guchar,drawable->bpp); - width = malloc (1); - height = malloc (1); + width = malloc (2); + height = malloc (2); sprintf(width," "); sprintf(height," "); if (strcmp (gtmvals.clwidth, "") != 0) { @@ -334,7 +334,7 @@ static gint save_dialog () GtkTooltips *tips; GdkColor tips_fg, tips_bg; gchar **argv; - guchar buffer[32]; + gchar buffer[32]; gint argc; bint.run=FALSE; diff --git a/plug-ins/hot/hot.c b/plug-ins/hot/hot.c index 25d342c266d0a87d655bb8da30039c17bdd6b56a..5e56ebd15797bfe2e0ab1834682bb2dc66b1afec 100644 --- a/plug-ins/hot/hot.c +++ b/plug-ins/hot/hot.c @@ -94,12 +94,12 @@ struct piArgs { typedef enum { act_lredux = 0, act_sredux = 1, - act_flag = 2, + act_flag = 2 } hotAction; typedef enum { mode_ntsc = 0, - mode_pal = 1, + mode_pal = 1 } hotModes; #define CHROMA_LIM 50.0 /* chroma amplitude limit */ diff --git a/plug-ins/ifscompose/ifscompose.c b/plug-ins/ifscompose/ifscompose.c index 5048a6b18e167026760ab9e453ec3754c22f292e..f397e64c741506295f76139c7b5b5d392dbce3ed 100644 --- a/plug-ins/ifscompose/ifscompose.c +++ b/plug-ins/ifscompose/ifscompose.c @@ -62,7 +62,7 @@ typedef enum { typedef enum { VALUE_PAIR_INT, - VALUE_PAIR_DOUBLE, + VALUE_PAIR_DOUBLE } ValuePairType; typedef struct diff --git a/plug-ins/ifscompose/ifscompose_utils.c b/plug-ins/ifscompose/ifscompose_utils.c index 9534d5d18e719a6e57ebaa3fdc1478bb7b4c153b..bb1d4b3a86a8d1e02b440be9d7ca225e8d767031 100644 --- a/plug-ins/ifscompose/ifscompose_utils.c +++ b/plug-ins/ifscompose/ifscompose_utils.c @@ -729,15 +729,15 @@ create_brush(IfsComposeVals *ifsvals, gint *brush_size, gdouble *brush_offset) #ifdef DEBUG_BRUSH putchar(brush_chars[(int)(pixel*3.999)]); totpix += pixel; -#endif DEBUG_BRUSH +#endif /* DEBUG_BRUSH */ } #ifdef DEBUG_BRUSH putchar('\n'); -#endif DEBUG_BRUSH +#endif /* DEBUG_BRUSH */ } #ifdef DEBUG_BRUSH printf("Brush total / area = %f\n",totpix/SQR(ifsvals->subdivide)); -#endif DEBUG_BRUSH +#endif /* DEBUG_BRUSH */ return brush; } diff --git a/plug-ins/max_rgb/max_rgb.c b/plug-ins/max_rgb/max_rgb.c index 4aa979e1138d0468de73ec97a319748dea3af24a..286e0c47696160964afd6c0f549559f42eb60fd7 100644 --- a/plug-ins/max_rgb/max_rgb.c +++ b/plug-ins/max_rgb/max_rgb.c @@ -48,7 +48,7 @@ static void run (char *name, GParam **return_vals); static GStatusType MAIN_FUNCTION (gint32 drawable_id); static gint DIALOG (); -static void ERROR_DIALOG (gint gtk_was_not_initialized, guchar *message); +static void ERROR_DIALOG (gint gtk_was_not_initialized, gchar *message); static void OK_CALLBACK (GtkWidget *widget, gpointer data); @@ -169,7 +169,7 @@ run (char *name, /* Since a channel might be selected, we must check wheter RGB or not. */ if (!gimp_drawable_color(drawable_id)) { - ERROR_DIALOG (1, (guchar *)"RGB drawable is not selected."); + ERROR_DIALOG (1, "RGB drawable is not selected."); return; } if (! DIALOG ()) @@ -302,7 +302,7 @@ DIALOG () } static void -ERROR_DIALOG (gint gtk_was_not_initialized, guchar *message) +ERROR_DIALOG (gint gtk_was_not_initialized, gchar *message) { GtkWidget *dlg; GtkWidget *table; diff --git a/plug-ins/megawidget/megawidget.c b/plug-ins/megawidget/megawidget.c index 19911a0bfd2971f24ba9e0cbbf5c9bdce82350d4..302c09535d1db9fb50ecde58b62ece144b96a42b 100644 --- a/plug-ins/megawidget/megawidget.c +++ b/plug-ins/megawidget/megawidget.c @@ -223,14 +223,14 @@ mw_radio_result(struct mwRadioGroup *rg) { GSList * mw_value_radio_group_new(GtkWidget *parent, gchar *name, - struct mwValueRadioGroup *rg, gint *var) + struct mwValueRadioGroup *rg, glong *var) { GSList *lst = NULL; GtkWidget *frame; GtkWidget *vbox; GtkWidget *button; struct mwValueRadioGroup *c; - gint value; + glong value; if (name != NULL) { frame = gtk_frame_new(name); @@ -707,12 +707,12 @@ ui_toggle_callback(GtkWidget *widget, gpointer data) { static void ui_value_toggle_callback(GtkWidget *widget, gpointer data) { - gint id; + glong id; /* Get radio button ID */ - id=(gint)gtk_object_get_data(GTK_OBJECT(widget),"Radio_ID"); + id=(glong)gtk_object_get_data(GTK_OBJECT(widget),"Radio_ID"); if (GTK_TOGGLE_BUTTON (widget)->active) { - *(gint *)data= id; + *(glong *)data= id; #ifndef NO_PREVIEW if (do_preview && mw_do_preview!=NULL) (*mw_do_preview)(NULL); #endif diff --git a/plug-ins/megawidget/megawidget.h b/plug-ins/megawidget/megawidget.h index 36e06537aaeae0066b19bb26f4dd530bcb1f8e7c..8bc0e10328dedcb3aa77c3060560eda06a177c92 100644 --- a/plug-ins/megawidget/megawidget.h +++ b/plug-ins/megawidget/megawidget.h @@ -34,7 +34,7 @@ struct mwRadioGroup { }; struct mwValueRadioGroup { gchar *name; - gint val; + glong val; }; struct mwPreview { @@ -76,7 +76,7 @@ GSList *mw_radio_group_new(GtkWidget *parent, gchar *name, struct mwRadioGroup *rg); gint mw_radio_result(struct mwRadioGroup *rg); GSList * mw_value_radio_group_new(GtkWidget *parent, gchar *name, - struct mwValueRadioGroup *rg, gint *var); + struct mwValueRadioGroup *rg, glong *var); GtkWidget *mw_toggle_button_new(GtkWidget *parent, gchar *fname, gchar *label, gint *varp); diff --git a/plug-ins/nlfilt/nlfilt.c b/plug-ins/nlfilt/nlfilt.c index abd45a36389afb758ce24b539e317f9d0ed08abc..31e1e697f3a1b61ae1b5123524b81e10264f6cfd 100644 --- a/plug-ins/nlfilt/nlfilt.c +++ b/plug-ins/nlfilt/nlfilt.c @@ -67,7 +67,7 @@ struct piArgs { typedef enum { filter_alpha_trim, filter_opt_est, - filter_edge_enhance, + filter_edge_enhance } FilterType; /* other structure declarations */ diff --git a/plug-ins/pat/pat.c b/plug-ins/pat/pat.c index 35f73fa7da56dd459600f1a1f968cbadf244980c..d9db68ac1f6314916b7ede6e5d1673f0c980d916 100644 --- a/plug-ins/pat/pat.c +++ b/plug-ins/pat/pat.c @@ -173,7 +173,7 @@ static gint32 load_image (char *filename) { char *temp; int fd; PatternHeader ph; - gchar *buffer; + guchar *buffer; gint32 image_ID, layer_ID; GDrawable *drawable; gint line; diff --git a/plug-ins/pcx/pcx.c b/plug-ins/pcx/pcx.c index fcc5f0782e4eab2293c5443ef2800c1b80cc7779..ceda65f72db1e44502615653fbcb95d9088f5c03 100644 --- a/plug-ins/pcx/pcx.c +++ b/plug-ins/pcx/pcx.c @@ -100,10 +100,10 @@ static void query () { /* Declare internal functions. */ static gint32 load_image (char *filename); -static void load_1(FILE *fp, int width, int height, char *buffer, int bytes); -static void load_4(FILE *fp, int width, int height, char *buffer, int bytes); -static void load_8(FILE *fp, int width, int height, char *buffer, int bytes); -static void load_24(FILE *fp, int width, int height, char *buffer, int bytes); +static void load_1(FILE *fp, int width, int height, guchar *buffer, int bytes); +static void load_4(FILE *fp, int width, int height, guchar *buffer, int bytes); +static void load_8(FILE *fp, int width, int height, guchar *buffer, int bytes); +static void load_24(FILE *fp, int width, int height, guchar *buffer, int bytes); static void readline(FILE *fp, guchar* buffer, int bytes); static gint save_image (char *filename, gint32 image, gint32 layer); @@ -273,7 +273,7 @@ static gint32 load_image (char *filename) { return image; } -static void load_8(FILE *fp, int width, int height, char *buffer, int bytes) { +static void load_8(FILE *fp, int width, int height, guchar *buffer, int bytes) { int row; guchar *line; line= (guchar *) g_malloc(bytes); @@ -287,7 +287,7 @@ static void load_8(FILE *fp, int width, int height, char *buffer, int bytes) { g_free(line); } -static void load_24(FILE *fp, int width, int height, char *buffer, int bytes) { +static void load_24(FILE *fp, int width, int height, guchar *buffer, int bytes) { int x, y, c; guchar *line; line= (guchar *) g_malloc(bytes * 3); @@ -305,7 +305,7 @@ static void load_24(FILE *fp, int width, int height, char *buffer, int bytes) { g_free(line); } -static void load_1(FILE *fp, int width, int height, char *buffer, int bytes) { +static void load_1(FILE *fp, int width, int height, guchar *buffer, int bytes) { int x, y; guchar *line; line= (guchar *) g_malloc(bytes); @@ -324,7 +324,7 @@ static void load_1(FILE *fp, int width, int height, char *buffer, int bytes) { g_free(line); } -static void load_4(FILE *fp, int width, int height, char *buffer, int bytes) { +static void load_4(FILE *fp, int width, int height, guchar *buffer, int bytes) { int x, y, c; guchar *line; line= (guchar *) g_malloc(bytes); diff --git a/plug-ins/rotate/rotate.c b/plug-ins/rotate/rotate.c index fb3441e9d70359032772b21c1c05cbab9b9aa52b..2d8844760f49e922f3ec87dd77f31c68fbbfef96 100644 --- a/plug-ins/rotate/rotate.c +++ b/plug-ins/rotate/rotate.c @@ -118,7 +118,7 @@ static void rotate_ok_callback (GtkWidget *widget, gpointer data); static void rotate_toggle_update (GtkWidget *widget, gpointer data); -static void ErrorMessage (guchar *message); +static void ErrorMessage (gchar *message); gint32 my_gimp_selection_float (gint32 image_ID, gint32 drawable_ID); gint32 my_gimp_selection_is_empty (gint32 image_ID); @@ -770,7 +770,7 @@ rotate_toggle_update (GtkWidget *widget, * This code was stolen from Pavel Greenfield's Colormap Rotation plug-in */ static void -ErrorMessage(guchar *message) +ErrorMessage(gchar *message) { GtkWidget *window, *label, *button, *table; gchar **argv=g_new (gchar *, 1); diff --git a/plug-ins/snoise/snoise.c b/plug-ins/snoise/snoise.c index 28d655af86487e8ba318403797031e77e759dda4..4cec4572cac80a6ca03b05894f13a3d6bb0db9d9 100644 --- a/plug-ins/snoise/snoise.c +++ b/plug-ins/snoise/snoise.c @@ -471,7 +471,7 @@ solid_noise_dialog (void) GtkObject *scale_data; gchar **argv; gint argc; - guchar buffer[32]; + gchar buffer[32]; /* Set args */ argc = 1; diff --git a/plug-ins/threshold_alpha/threshold_alpha.c b/plug-ins/threshold_alpha/threshold_alpha.c index 07ab487d4041876d1c089a2611ca8591fb3d8285..6eee7ae138bd19da8b6fe7d58dfa50244293a660 100644 --- a/plug-ins/threshold_alpha/threshold_alpha.c +++ b/plug-ins/threshold_alpha/threshold_alpha.c @@ -48,7 +48,7 @@ static void run (char *name, GParam **return_vals); static GStatusType MAIN_FUNCTION (); static gint DIALOG (); -static void ERROR_DIALOG (gint gtk_was_not_initialized, guchar *message); +static void ERROR_DIALOG (gint gtk_was_not_initialized, gchar *message); static void OK_CALLBACK (GtkWidget *widget, gpointer data); @@ -349,7 +349,7 @@ DIALOG () } static void -ERROR_DIALOG (gint gtk_was_not_initialized, guchar *message) +ERROR_DIALOG (gint gtk_was_not_initialized, gchar *message) { GtkWidget *dlg; GtkWidget *table; diff --git a/plug-ins/zealouscrop/zealouscrop.c b/plug-ins/zealouscrop/zealouscrop.c index ef68fef15981117034e29cdded380ae29750fd1f..e72e9fa101cca4e4cc626d22a3bc9ba37f1fec5c 100644 --- a/plug-ins/zealouscrop/zealouscrop.c +++ b/plug-ins/zealouscrop/zealouscrop.c @@ -29,7 +29,7 @@ static void run(char *name, GParam * param, int *nreturn_vals, GParam ** return_vals); -static inline int colours_equal(gchar *col1, gchar *col2, int bytes); +static inline int colours_equal(guchar *col1, gchar *col2, int bytes); static void do_zcrop(GDrawable *drawable, gint32); @@ -271,7 +271,7 @@ static void do_zcrop(GDrawable *drawable, gint32 image_id) } -static inline int colours_equal(gchar *col1, gchar *col2, int bytes) +static inline int colours_equal(guchar *col1, gchar *col2, int bytes) { int b;