mirror of https://github.com/GNOME/gimp.git
gimp-joke-980321
* 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 <joke@awa.tohoku.ac.jp>. Mostly portability for DEC osf1's cc. Lots of MAIN();'s, trailing commas in enums, and guchar/gchar madness. Gimp now sends mail, cleans vinyl records, removes stubborn stains, julien fries, and more! -adrian
This commit is contained in:
parent
4ef2e384fc
commit
1bfe515fe1
30
ChangeLog
30
ChangeLog
|
@ -1,3 +1,31 @@
|
|||
|
||||
Sun Mar 22 14:23:03 EST 1998 Adrian Likins <adrian@gimp.org>
|
||||
|
||||
* 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 <joke@awa.tohoku.ac.jp>. 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 <yosh@gimp.org>
|
||||
|
||||
* autoconfed for random/lrand48/rand madness
|
||||
|
@ -86,7 +114,7 @@ Thu Mar 19 01:04:56 PST 1998 Manish Singh <yosh@gimp.org>
|
|||
|
||||
Wed Mar 18 20:57:55 EST 1998 Adrian Likins <adrian@gimp.org>
|
||||
|
||||
*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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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 *****/
|
||||
|
|
|
@ -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 *****/
|
||||
|
|
|
@ -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 *****/
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -284,7 +284,7 @@ selection_to_bezier(GtkWidget *w, gpointer none)
|
|||
tools_select(BEZIER_SELECT);
|
||||
}
|
||||
return;
|
||||
};
|
||||
}
|
||||
|
||||
static IScissorsOptions *
|
||||
iscissors_selection_options (void)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -284,7 +284,7 @@ selection_to_bezier(GtkWidget *w, gpointer none)
|
|||
tools_select(BEZIER_SELECT);
|
||||
}
|
||||
return;
|
||||
};
|
||||
}
|
||||
|
||||
static IScissorsOptions *
|
||||
iscissors_selection_options (void)
|
||||
|
|
|
@ -284,7 +284,7 @@ selection_to_bezier(GtkWidget *w, gpointer none)
|
|||
tools_select(BEZIER_SELECT);
|
||||
}
|
||||
return;
|
||||
};
|
||||
}
|
||||
|
||||
static IScissorsOptions *
|
||||
iscissors_selection_options (void)
|
||||
|
|
|
@ -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 *****/
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -160,7 +160,7 @@ gint do_bluenone;
|
|||
/***** Functions *****/
|
||||
|
||||
|
||||
MAIN ();
|
||||
MAIN ()
|
||||
|
||||
static void
|
||||
query ()
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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];
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ GPlugInInfo PLUG_IN_INFO =
|
|||
run, /* run_proc */
|
||||
};
|
||||
|
||||
MAIN ();
|
||||
MAIN ()
|
||||
|
||||
static void
|
||||
query ()
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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];
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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; row<sel_y2; row++) {
|
||||
qbist(qbist_info, (guchar *)row_data, 0, row, sel_x2-sel_x1, sel_x2-sel_x1, sel_y2-sel_y1, img_bpp);
|
||||
qbist(qbist_info, (gchar *)row_data, 0, row, sel_x2-sel_x1, sel_x2-sel_x1, sel_y2-sel_y1, img_bpp);
|
||||
gimp_pixel_rgn_set_row(&imagePR, row_data, sel_x1, row, (sel_x2-sel_x1));
|
||||
if ((row % 5) == 0)
|
||||
gimp_progress_update((gfloat)(row-sel_y1)/(gfloat)(sel_y2-sel_y1));
|
||||
|
|
|
@ -198,7 +198,7 @@ save_image (char *filename,
|
|||
/*int palloc[drawable->width][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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -67,7 +67,7 @@ struct piArgs {
|
|||
typedef enum {
|
||||
filter_alpha_trim,
|
||||
filter_opt_est,
|
||||
filter_edge_enhance,
|
||||
filter_edge_enhance
|
||||
} FilterType;
|
||||
|
||||
/* other structure declarations */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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; row<sel_y2; row++) {
|
||||
qbist(qbist_info, (guchar *)row_data, 0, row, sel_x2-sel_x1, sel_x2-sel_x1, sel_y2-sel_y1, img_bpp);
|
||||
qbist(qbist_info, (gchar *)row_data, 0, row, sel_x2-sel_x1, sel_x2-sel_x1, sel_y2-sel_y1, img_bpp);
|
||||
gimp_pixel_rgn_set_row(&imagePR, row_data, sel_x1, row, (sel_x2-sel_x1));
|
||||
if ((row % 5) == 0)
|
||||
gimp_progress_update((gfloat)(row-sel_y1)/(gfloat)(sel_y2-sel_y1));
|
||||
|
|
|
@ -198,7 +198,7 @@ save_image (char *filename,
|
|||
/*int palloc[drawable->width][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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -62,7 +62,7 @@ typedef enum {
|
|||
|
||||
typedef enum {
|
||||
VALUE_PAIR_INT,
|
||||
VALUE_PAIR_DOUBLE,
|
||||
VALUE_PAIR_DOUBLE
|
||||
} ValuePairType;
|
||||
|
||||
typedef struct
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -67,7 +67,7 @@ struct piArgs {
|
|||
typedef enum {
|
||||
filter_alpha_trim,
|
||||
filter_opt_est,
|
||||
filter_edge_enhance,
|
||||
filter_edge_enhance
|
||||
} FilterType;
|
||||
|
||||
/* other structure declarations */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue