Commit ee6dad2e authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

use GIMP_GRADIENT as prefix for the GimpGradientType enum.

2003-08-26  Sven Neumann  <sven@gimp.org>

	* app/core/core-enums.h: use GIMP_GRADIENT as prefix for the
	GimpGradientType enum.

	* app/core/core-enums.c
	* app/pdb/misc_tools_cmds.c
	* libgimp/gimpenums.h
	* plug-ins/pygimp/gimpenums.py
	* plug-ins/script-fu/script-fu-constants.c
	* tools/pdbgen/enums.pl: regenerated.

	* app/core/gimpdrawable-blend.c
	* app/tools/gimpblendoptions.c
	* plug-ins/pygimp/plug-ins/sphere.py
	* plug-ins/script-fu/scripts: changed accordingly.

	* libgimp/gimpcompat.h
	* plug-ins/script-fu/siod-wrapper.c: added compatibility defines
	for the old enum values.
parent 17d1fb17
2003-08-26 Sven Neumann <sven@gimp.org>
* app/core/core-enums.h: use GIMP_GRADIENT as prefix for the
GimpGradientType enum.
* app/core/core-enums.c
* app/pdb/misc_tools_cmds.c
* libgimp/gimpenums.h
* plug-ins/pygimp/gimpenums.py
* plug-ins/script-fu/script-fu-constants.c
* tools/pdbgen/enums.pl: regenerated.
* app/core/gimpdrawable-blend.c
* app/tools/gimpblendoptions.c
* plug-ins/pygimp/plug-ins/sphere.py
* plug-ins/script-fu/scripts: changed accordingly.
* libgimp/gimpcompat.h
* plug-ins/script-fu/siod-wrapper.c: added compatibility defines
for the old enum values.
2003-08-26 Michael Natterer <mitch@gimp.org>
* app/tools/gimptransformoptions.c
......@@ -206,17 +206,17 @@ gimp_fill_type_get_type (void)
static const GEnumValue gimp_gradient_type_enum_values[] =
{
{ GIMP_LINEAR, N_("Linear"), "linear" },
{ GIMP_BILINEAR, N_("Bi-Linear"), "bilinear" },
{ GIMP_RADIAL, N_("Radial"), "radial" },
{ GIMP_SQUARE, N_("Square"), "square" },
{ GIMP_CONICAL_SYMMETRIC, N_("Conical (symmetric)"), "conical-symmetric" },
{ GIMP_CONICAL_ASYMMETRIC, N_("Conical (asymmetric)"), "conical-asymmetric" },
{ GIMP_SHAPEBURST_ANGULAR, N_("Shapeburst (angular)"), "shapeburst-angular" },
{ GIMP_SHAPEBURST_SPHERICAL, N_("Shapeburst (spherical)"), "shapeburst-spherical" },
{ GIMP_SHAPEBURST_DIMPLED, N_("Shapeburst (dimpled)"), "shapeburst-dimpled" },
{ GIMP_SPIRAL_CLOCKWISE, N_("Spiral (clockwise)"), "spiral-clockwise" },
{ GIMP_SPIRAL_ANTICLOCKWISE, N_("Spiral (anticlockwise)"), "spiral-anticlockwise" },
{ GIMP_GRADIENT_LINEAR, N_("Linear"), "linear" },
{ GIMP_GRADIENT_BILINEAR, N_("Bi-Linear"), "bilinear" },
{ GIMP_GRADIENT_RADIAL, N_("Radial"), "radial" },
{ GIMP_GRADIENT_SQUARE, N_("Square"), "square" },
{ GIMP_GRADIENT_CONICAL_SYMMETRIC, N_("Conical (symmetric)"), "conical-symmetric" },
{ GIMP_GRADIENT_CONICAL_ASYMMETRIC, N_("Conical (asymmetric)"), "conical-asymmetric" },
{ GIMP_GRADIENT_SHAPEBURST_ANGULAR, N_("Shapeburst (angular)"), "shapeburst-angular" },
{ GIMP_GRADIENT_SHAPEBURST_SPHERICAL, N_("Shapeburst (spherical)"), "shapeburst-spherical" },
{ GIMP_GRADIENT_SHAPEBURST_DIMPLED, N_("Shapeburst (dimpled)"), "shapeburst-dimpled" },
{ GIMP_GRADIENT_SPIRAL_CLOCKWISE, N_("Spiral (clockwise)"), "spiral-clockwise" },
{ GIMP_GRADIENT_SPIRAL_ANTICLOCKWISE, N_("Spiral (anticlockwise)"), "spiral-anticlockwise" },
{ 0, NULL, NULL }
};
......
......@@ -167,17 +167,17 @@ GType gimp_gradient_type_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_LINEAR, /*< desc="Linear" >*/
GIMP_BILINEAR, /*< desc="Bi-Linear" >*/
GIMP_RADIAL, /*< desc="Radial" >*/
GIMP_SQUARE, /*< desc="Square" >*/
GIMP_CONICAL_SYMMETRIC, /*< desc="Conical (symmetric)" >*/
GIMP_CONICAL_ASYMMETRIC, /*< desc="Conical (asymmetric)" >*/
GIMP_SHAPEBURST_ANGULAR, /*< desc="Shapeburst (angular)" >*/
GIMP_SHAPEBURST_SPHERICAL, /*< desc="Shapeburst (spherical)" >*/
GIMP_SHAPEBURST_DIMPLED, /*< desc="Shapeburst (dimpled)" >*/
GIMP_SPIRAL_CLOCKWISE, /*< desc="Spiral (clockwise)" >*/
GIMP_SPIRAL_ANTICLOCKWISE /*< desc="Spiral (anticlockwise)" >*/
GIMP_GRADIENT_LINEAR, /*< desc="Linear" >*/
GIMP_GRADIENT_BILINEAR, /*< desc="Bi-Linear" >*/
GIMP_GRADIENT_RADIAL, /*< desc="Radial" >*/
GIMP_GRADIENT_SQUARE, /*< desc="Square" >*/
GIMP_GRADIENT_CONICAL_SYMMETRIC, /*< desc="Conical (symmetric)" >*/
GIMP_GRADIENT_CONICAL_ASYMMETRIC, /*< desc="Conical (asymmetric)" >*/
GIMP_GRADIENT_SHAPEBURST_ANGULAR, /*< desc="Shapeburst (angular)" >*/
GIMP_GRADIENT_SHAPEBURST_SPHERICAL, /*< desc="Shapeburst (spherical)" >*/
GIMP_GRADIENT_SHAPEBURST_DIMPLED, /*< desc="Shapeburst (dimpled)" >*/
GIMP_GRADIENT_SPIRAL_CLOCKWISE, /*< desc="Spiral (clockwise)" >*/
GIMP_GRADIENT_SPIRAL_ANTICLOCKWISE /*< desc="Spiral (anticlockwise)" >*/
} GimpGradientType;
......
......@@ -701,54 +701,54 @@ gradient_render_pixel (double x,
switch (rbd->gradient_type)
{
case GIMP_LINEAR:
case GIMP_GRADIENT_LINEAR:
factor = gradient_calc_linear_factor (rbd->dist, rbd->vec, rbd->offset,
x - rbd->sx, y - rbd->sy);
break;
case GIMP_BILINEAR:
case GIMP_GRADIENT_BILINEAR:
factor = gradient_calc_bilinear_factor (rbd->dist, rbd->vec, rbd->offset,
x - rbd->sx, y - rbd->sy);
break;
case GIMP_RADIAL:
case GIMP_GRADIENT_RADIAL:
factor = gradient_calc_radial_factor (rbd->dist, rbd->offset,
x - rbd->sx, y - rbd->sy);
break;
case GIMP_SQUARE:
case GIMP_GRADIENT_SQUARE:
factor = gradient_calc_square_factor (rbd->dist, rbd->offset,
x - rbd->sx, y - rbd->sy);
break;
case GIMP_CONICAL_SYMMETRIC:
case GIMP_GRADIENT_CONICAL_SYMMETRIC:
factor = gradient_calc_conical_sym_factor (rbd->dist, rbd->vec, rbd->offset,
x - rbd->sx, y - rbd->sy);
break;
case GIMP_CONICAL_ASYMMETRIC:
case GIMP_GRADIENT_CONICAL_ASYMMETRIC:
factor = gradient_calc_conical_asym_factor (rbd->dist, rbd->vec, rbd->offset,
x - rbd->sx, y - rbd->sy);
break;
case GIMP_SHAPEBURST_ANGULAR:
case GIMP_GRADIENT_SHAPEBURST_ANGULAR:
factor = gradient_calc_shapeburst_angular_factor (x, y);
break;
case GIMP_SHAPEBURST_SPHERICAL:
case GIMP_GRADIENT_SHAPEBURST_SPHERICAL:
factor = gradient_calc_shapeburst_spherical_factor (x, y);
break;
case GIMP_SHAPEBURST_DIMPLED:
case GIMP_GRADIENT_SHAPEBURST_DIMPLED:
factor = gradient_calc_shapeburst_dimpled_factor (x, y);
break;
case GIMP_SPIRAL_CLOCKWISE:
case GIMP_GRADIENT_SPIRAL_CLOCKWISE:
factor = gradient_calc_spiral_factor (rbd->dist, rbd->vec, rbd->offset,
x - rbd->sx, y - rbd->sy,TRUE);
break;
case GIMP_SPIRAL_ANTICLOCKWISE:
case GIMP_GRADIENT_SPIRAL_ANTICLOCKWISE:
factor = gradient_calc_spiral_factor (rbd->dist, rbd->vec, rbd->offset,
x - rbd->sx, y - rbd->sy,FALSE);
break;
......@@ -971,20 +971,20 @@ gradient_fill_region (GimpImage *gimage,
switch (gradient_type)
{
case GIMP_RADIAL:
case GIMP_GRADIENT_RADIAL:
rbd.dist = sqrt(SQR(ex - sx) + SQR(ey - sy));
break;
case GIMP_SQUARE:
case GIMP_GRADIENT_SQUARE:
rbd.dist = MAX (fabs (ex - sx), fabs (ey - sy));
break;
case GIMP_CONICAL_SYMMETRIC:
case GIMP_CONICAL_ASYMMETRIC:
case GIMP_SPIRAL_CLOCKWISE:
case GIMP_SPIRAL_ANTICLOCKWISE:
case GIMP_LINEAR:
case GIMP_BILINEAR:
case GIMP_GRADIENT_CONICAL_SYMMETRIC:
case GIMP_GRADIENT_CONICAL_ASYMMETRIC:
case GIMP_GRADIENT_SPIRAL_CLOCKWISE:
case GIMP_GRADIENT_SPIRAL_ANTICLOCKWISE:
case GIMP_GRADIENT_LINEAR:
case GIMP_GRADIENT_BILINEAR:
rbd.dist = sqrt (SQR (ex - sx) + SQR (ey - sy));
if (rbd.dist > 0.0)
......@@ -995,9 +995,9 @@ gradient_fill_region (GimpImage *gimage,
break;
case GIMP_SHAPEBURST_ANGULAR:
case GIMP_SHAPEBURST_SPHERICAL:
case GIMP_SHAPEBURST_DIMPLED:
case GIMP_GRADIENT_SHAPEBURST_ANGULAR:
case GIMP_GRADIENT_SHAPEBURST_SPHERICAL:
case GIMP_GRADIENT_SHAPEBURST_DIMPLED:
rbd.dist = sqrt (SQR (ex - sx) + SQR (ey - sy));
gradient_precalc_shapeburst (gimage, drawable, PR, rbd.dist);
break;
......
......@@ -85,7 +85,7 @@ blend_invoker (Gimp *gimp,
success = FALSE;
gradient_type = args[3].value.pdb_int;
if (gradient_type < GIMP_LINEAR || gradient_type > GIMP_SPIRAL_ANTICLOCKWISE)
if (gradient_type < GIMP_GRADIENT_LINEAR || gradient_type > GIMP_GRADIENT_SPIRAL_ANTICLOCKWISE)
success = FALSE;
opacity = args[4].value.pdb_float;
......@@ -166,7 +166,7 @@ static ProcArg blend_inargs[] =
{
GIMP_PDB_INT32,
"gradient_type",
"The type of gradient: { GIMP_LINEAR (0), GIMP_BILINEAR (1), GIMP_RADIAL (2), GIMP_SQUARE (3), GIMP_CONICAL_SYMMETRIC (4), GIMP_CONICAL_ASYMMETRIC (5), GIMP_SHAPEBURST_ANGULAR (6), GIMP_SHAPEBURST_SPHERICAL (7), GIMP_SHAPEBURST_DIMPLED (8), GIMP_SPIRAL_CLOCKWISE (9), GIMP_SPIRAL_ANTICLOCKWISE (10) }"
"The type of gradient: { GIMP_GRADIENT_LINEAR (0), GIMP_GRADIENT_BILINEAR (1), GIMP_GRADIENT_RADIAL (2), GIMP_GRADIENT_SQUARE (3), GIMP_GRADIENT_CONICAL_SYMMETRIC (4), GIMP_GRADIENT_CONICAL_ASYMMETRIC (5), GIMP_GRADIENT_SHAPEBURST_ANGULAR (6), GIMP_GRADIENT_SHAPEBURST_SPHERICAL (7), GIMP_GRADIENT_SHAPEBURST_DIMPLED (8), GIMP_GRADIENT_SPIRAL_CLOCKWISE (9), GIMP_GRADIENT_SPIRAL_ANTICLOCKWISE (10) }"
},
{
GIMP_PDB_FLOAT,
......
......@@ -118,7 +118,7 @@ gimp_blend_options_class_init (GimpBlendOptionsClass *klass)
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_GRADIENT_TYPE,
"gradient-type", NULL,
GIMP_TYPE_GRADIENT_TYPE,
GIMP_LINEAR,
GIMP_GRADIENT_LINEAR,
0);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SUPERSAMPLE,
......
2003-08-26 Sven Neumann <sven@gimp.org>
* libgimp/tmpl/gimpenums.sgml: updated GimpGradientType.
2003-08-23 Michael Natterer <mitch@gimp.org>
* libgimpwidgets/libgimpwidgets.types: added missing
......
......@@ -185,17 +185,17 @@ Enums and definitions.
</para>
@GIMP_LINEAR:
@GIMP_BILINEAR:
@GIMP_RADIAL:
@GIMP_SQUARE:
@GIMP_CONICAL_SYMMETRIC:
@GIMP_CONICAL_ASYMMETRIC:
@GIMP_SHAPEBURST_ANGULAR:
@GIMP_SHAPEBURST_SPHERICAL:
@GIMP_SHAPEBURST_DIMPLED:
@GIMP_SPIRAL_CLOCKWISE:
@GIMP_SPIRAL_ANTICLOCKWISE:
@GIMP_GRADIENT_LINEAR:
@GIMP_GRADIENT_BILINEAR:
@GIMP_GRADIENT_RADIAL:
@GIMP_GRADIENT_SQUARE:
@GIMP_GRADIENT_CONICAL_SYMMETRIC:
@GIMP_GRADIENT_CONICAL_ASYMMETRIC:
@GIMP_GRADIENT_SHAPEBURST_ANGULAR:
@GIMP_GRADIENT_SHAPEBURST_SPHERICAL:
@GIMP_GRADIENT_SHAPEBURST_DIMPLED:
@GIMP_GRADIENT_SPIRAL_CLOCKWISE:
@GIMP_GRADIENT_SPIRAL_ANTICLOCKWISE:
<!-- ##### ENUM GimpHueRange ##### -->
<para>
......
......@@ -124,6 +124,21 @@ enum
GIMP_UNKNOWN = GIMP_ORIENTATION_UNKNOWN
};
enum
{
GIMP_LINEAR = GIMP_GRADIENT_LINEAR,
GIMP_BILNEAR = GIMP_GRADIENT_BILINEAR,
GIMP_RADIAL = GIMP_GRADIENT_RADIAL,
GIMP_SQUARE = GIMP_GRADIENT_SQUARE,
GIMP_CONICAL_SYMMETRIC = GIMP_GRADIENT_CONICAL_SYMMETRIC,
GIMP_CONICAL_ASYMMETRIC = GIMP_GRADIENT_CONICAL_ASYMMETRIC,
GIMP_SHAPEBURST_ANGULAR = GIMP_GRADIENT_SHAPEBURST_ANGULAR,
GIMP_SHAPEBURST_SPHERICAL = GIMP_GRADIENT_SHAPEBURST_SPHERICAL,
GIMP_SHAPEBURST_DIMPLED = GIMP_GRADIENT_SHAPEBURST_DIMPLED,
GIMP_SPIRAL_CLOCKWISE = GIMP_GRADIENT_SPIRAL_CLOCKWISE,
GIMP_SPIRAL_ANTICLOCKWISE = GIMP_GRADIENT_SPIRAL_ANTICLOCKWISE
};
G_END_DECLS
#endif /* __GIMP_COMPAT_H__ */
......@@ -134,17 +134,17 @@ typedef enum
typedef enum
{
GIMP_LINEAR,
GIMP_BILINEAR,
GIMP_RADIAL,
GIMP_SQUARE,
GIMP_CONICAL_SYMMETRIC,
GIMP_CONICAL_ASYMMETRIC,
GIMP_SHAPEBURST_ANGULAR,
GIMP_SHAPEBURST_SPHERICAL,
GIMP_SHAPEBURST_DIMPLED,
GIMP_SPIRAL_CLOCKWISE,
GIMP_SPIRAL_ANTICLOCKWISE
GIMP_GRADIENT_LINEAR,
GIMP_GRADIENT_BILINEAR,
GIMP_GRADIENT_RADIAL,
GIMP_GRADIENT_SQUARE,
GIMP_GRADIENT_CONICAL_SYMMETRIC,
GIMP_GRADIENT_CONICAL_ASYMMETRIC,
GIMP_GRADIENT_SHAPEBURST_ANGULAR,
GIMP_GRADIENT_SHAPEBURST_SPHERICAL,
GIMP_GRADIENT_SHAPEBURST_DIMPLED,
GIMP_GRADIENT_SPIRAL_CLOCKWISE,
GIMP_GRADIENT_SPIRAL_ANTICLOCKWISE
} GimpGradientType;
typedef enum
......
......@@ -114,17 +114,17 @@ TRANSPARENT_FILL = 3
NO_FILL = 4
# GimpGradientType
LINEAR = 0
BILINEAR = 1
RADIAL = 2
SQUARE = 3
CONICAL_SYMMETRIC = 4
CONICAL_ASYMMETRIC = 5
SHAPEBURST_ANGULAR = 6
SHAPEBURST_SPHERICAL = 7
SHAPEBURST_DIMPLED = 8
SPIRAL_CLOCKWISE = 9
SPIRAL_ANTICLOCKWISE = 10
GRADIENT_LINEAR = 0
GRADIENT_BILINEAR = 1
GRADIENT_RADIAL = 2
GRADIENT_SQUARE = 3
GRADIENT_CONICAL_SYMMETRIC = 4
GRADIENT_CONICAL_ASYMMETRIC = 5
GRADIENT_SHAPEBURST_ANGULAR = 6
GRADIENT_SHAPEBURST_SPHERICAL = 7
GRADIENT_SHAPEBURST_DIMPLED = 8
GRADIENT_SPIRAL_CLOCKWISE = 9
GRADIENT_SPIRAL_ANTICLOCKWISE = 10
# GimpHueRange
ALL_HUES = 0
......
......@@ -57,7 +57,7 @@ def python_sphere(radius, light, shadow, bg_colour, sphere_colour):
MULTIPLY_MODE, 100, 0, FALSE, 0, 0)
pdb.gimp_ellipse_select(img, cx - radius, cy - radius, 2 * radius,
2 * radius, CHANNEL_OP_REPLACE, TRUE, FALSE, 0)
pdb.gimp_blend(drawable, FG_BG_RGB_MODE, NORMAL_MODE, RADIAL,
pdb.gimp_blend(drawable, FG_BG_RGB_MODE, NORMAL_MODE, GRADIENT_RADIAL,
100, offset, REPEAT_NONE, FALSE, FALSE, 0, 0, TRUE,
light_x, light_y, light_end_x, light_end_y)
pdb.gimp_selection_none(img)
......
......@@ -55,20 +55,20 @@ siod_get_output_file (void)
return siod_output;
}
void
void
siod_set_output_file (FILE *file)
{
siod_output = file;
}
int
int
siod_get_verbose_level (void)
{
return siod_verbose_level;
}
void
void
siod_set_verbose_level (gint verbose_level)
{
siod_verbose_level = verbose_level;
......@@ -107,7 +107,7 @@ static void init_procedures (void);
static gboolean register_scripts = FALSE;
void
void
siod_init (gboolean local_register_scripts)
{
char *siod_argv[] =
......@@ -147,10 +147,10 @@ static LISP script_fu_quit_call (LISP a);
/*********
Below can be found the functions responsible for registering the gimp functions
and types against the scheme interpreter.
********/
......@@ -178,7 +178,7 @@ init_procedures (void)
init_lsubr ("script-fu-register", script_fu_register_call);
init_lsubr ("script-fu-quit", script_fu_quit_call);
gimp_procedural_db_query (".*", ".*", ".*", ".*", ".*", ".*", ".*",
gimp_procedural_db_query (".*", ".*", ".*", ".*", ".*", ".*", ".*",
&num_procs, &proc_list);
/* Register each procedure as a scheme func */
......@@ -187,13 +187,13 @@ init_procedures (void)
proc_name = g_strdup (proc_list[i]);
/* lookup the procedure */
if (gimp_procedural_db_proc_info (proc_name,
&proc_blurb,
&proc_help,
if (gimp_procedural_db_proc_info (proc_name,
&proc_blurb,
&proc_help,
&proc_author,
&proc_copyright,
&proc_date,
&proc_type,
&proc_copyright,
&proc_date,
&proc_type,
&nparams, &nreturn_vals,
&params, &return_vals))
{
......@@ -221,8 +221,8 @@ init_procedures (void)
args = cons (cintern (proc_name), args);
/* set the acture pdb procedure name */
code = cons (cons (cintern ("quote"),
cons (cintern (proc_list[i]), NIL)),
code = cons (cons (cintern ("quote"),
cons (cintern (proc_list[i]), NIL)),
code);
code = cons (cintern ("gimp-proc-db-call"), code);
......@@ -247,17 +247,17 @@ init_constants (void)
{
gchar *gimp_plugin_dir;
setvar (cintern ("gimp-data-dir"),
setvar (cintern ("gimp-data-dir"),
strcons (-1, (gchar *) gimp_data_directory ()), NIL);
gimp_plugin_dir = gimp_gimprc_query ("gimp_plugin_dir");
if (gimp_plugin_dir)
{
setvar (cintern ("gimp-plugin-dir"),
setvar (cintern ("gimp-plugin-dir"),
strcons (-1, gimp_plugin_dir), NIL);
g_free (gimp_plugin_dir);
}
/* Generated constants */
init_generated_constants ();
......@@ -322,6 +322,18 @@ init_constants (void)
setvar (cintern ("VERTICAL"), flocons (GIMP_ORIENTATION_VERTICAL), NIL);
setvar (cintern ("UNKNOWN"), flocons (GIMP_ORIENTATION_UNKNOWN), NIL);
setvar (cintern ("LINEAR"), flocons (GIMP_GRADIENT_LINEAR), NIL);
setvar (cintern ("BILINEAR"), flocons (GIMP_GRADIENT_BILINEAR), NIL);
setvar (cintern ("RADIAL"), flocons (GIMP_GRADIENT_RADIAL), NIL);
setvar (cintern ("SQUARE"), flocons (GIMP_GRADIENT_SQUARE), NIL);
setvar (cintern ("CONICAL-SYMMETRIC"), flocons (GIMP_GRADIENT_CONICAL_SYMMETRIC), NIL);
setvar (cintern ("CONICAL-ASYMMETRIC"), flocons (GIMP_GRADIENT_CONICAL_ASYMMETRIC), NIL);
setvar (cintern ("SHAPEBURST-ANGULAR"), flocons (GIMP_GRADIENT_SHAPEBURST_ANGULAR), NIL);
setvar (cintern ("SHAPEBURST-SPHERICAL"), flocons (GIMP_GRADIENT_SHAPEBURST_SPHERICAL), NIL);
setvar (cintern ("SHAPEBURST-DIMPLED"), flocons (GIMP_GRADIENT_SHAPEBURST_DIMPLED), NIL);
setvar (cintern ("SPIRAL-CLOCKWISE"), flocons (GIMP_GRADIENT_SPIRAL_CLOCKWISE), NIL);
setvar (cintern ("SPIRAL-ANTICLOCKWISE"), flocons (GIMP_GRADIENT_SPIRAL_ANTICLOCKWISE), NIL);
/* Useful misc stuff */
setvar (cintern ("TRUE"), flocons (TRUE), NIL);
setvar (cintern ("FALSE"), flocons (FALSE), NIL);
......@@ -420,7 +432,7 @@ marshall_proc_db_call (LISP a)
"The procedure to be executed and the arguments it requires "
"(possibly none) must be specified.", NIL);
/* Derive the pdb procedure name from the argument
/* Derive the pdb procedure name from the argument
or first argument of a list */
if (TYPEP (a, tc_cons))
proc_name = get_c_string (car (a));
......@@ -431,9 +443,9 @@ marshall_proc_db_call (LISP a)
script_fu_report_cc (proc_name);
/* Attempt to fetch the procedure from the database */
if (! gimp_procedural_db_proc_info (proc_name,
&proc_blurb,
&proc_help,
if (! gimp_procedural_db_proc_info (proc_name,
&proc_blurb,
&proc_help,
&proc_author,
&proc_copyright,
&proc_date,
......@@ -457,7 +469,7 @@ marshall_proc_db_call (LISP a)
/* Check the supplied number of arguments */
if ((nlength (a) - 1) != nparams)
{
g_snprintf (error_str, sizeof (error_str),
g_snprintf (error_str, sizeof (error_str),
"Invalid arguments supplied to %s--(# args: %ld, expecting: %d)",
proc_name, (nlength (a) - 1), nparams);
return my_err (error_str, NIL);
......@@ -530,7 +542,7 @@ marshall_proc_db_call (LISP a)
if (success)
{
args[i].type = GIMP_PDB_INT32ARRAY;
args[i].data.d_int32array =
args[i].data.d_int32array =
(gint32*) (car (a))->storage_as.long_array.data;
}
break;
......@@ -541,7 +553,7 @@ marshall_proc_db_call (LISP a)
if (success)
{
args[i].type = GIMP_PDB_INT16ARRAY;
args[i].data.d_int16array =
args[i].data.d_int16array =
(gint16*) (car (a))->storage_as.long_array.data;
}
break;
......@@ -552,7 +564,7 @@ marshall_proc_db_call (LISP a)
if (success)
{
args[i].type = GIMP_PDB_INT8ARRAY;
args[i].data.d_int8array =
args[i].data.d_int8array =
(gint8*) (car (a))->storage_as.string.data;
}
break;
......@@ -563,7 +575,7 @@ marshall_proc_db_call (LISP a)
if (success)
{
args[i].type = GIMP_PDB_FLOATARRAY;
args[i].data.d_floatarray =
args[i].data.d_floatarray =
(car (a))->storage_as.double_array.data;
}
break;
......@@ -586,7 +598,7 @@ marshall_proc_db_call (LISP a)
num_strings = args[i - 1].data.d_int32;
if (nlength (list) != num_strings)
return my_err ("String array argument has incorrectly specified length", NIL);
array = args[i].data.d_stringarray =
array = args[i].data.d_stringarray =
g_new (char *, num_strings);
for (j = 0; j < num_strings; j++)
......@@ -619,7 +631,7 @@ marshall_proc_db_call (LISP a)
break;
case GIMP_PDB_REGION:
return my_err ("Regions are currently unsupported as arguments",
return my_err ("Regions are currently unsupported as arguments",
car (a));
break;
......@@ -684,12 +696,12 @@ marshall_proc_db_call (LISP a)
break;
case GIMP_PDB_BOUNDARY:
return my_err ("Boundaries are currently unsupported as arguments",
return my_err ("Boundaries are currently unsupported as arguments",
car (a));
break;
case GIMP_PDB_PATH:
return my_err ("Paths are currently unsupported as arguments",
return my_err ("Paths are currently unsupported as arguments",
car (a));
break;
......@@ -701,9 +713,9 @@ marshall_proc_db_call (LISP a)
args[i].type = GIMP_PDB_PARASITE;
/* parasite->name */
intermediate_val = car (a);
args[i].data.d_parasite.name =
args[i].data.d_parasite.name =
get_c_string (car (intermediate_val));
/* parasite->flags */
intermediate_val = cdr (intermediate_val);
args[i].data.d_parasite.flags = get_c_long (car(intermediate_val));
......@@ -740,7 +752,7 @@ marshall_proc_db_call (LISP a)
{
strcpy (error_str, "Procedural database execution did not return a status:\n ");
lprin1s (a_saved, error_str + strlen(error_str));
return my_err (error_str, NIL);
}
......@@ -766,22 +778,22 @@ marshall_proc_db_call (LISP a)
switch (return_vals[i].type)
{
case GIMP_PDB_INT32:
return_val = cons (flocons (values[i + 1].data.d_int32),
return_val = cons (flocons (values[i + 1].data.d_int32),
return_val);
break;
case GIMP_PDB_INT16:
return_val = cons (flocons (values[i + 1].data.d_int32),
return_val = cons (flocons (values[i + 1].data.d_int32),
return_val);
break;
case GIMP_PDB_INT8:
return_val = cons (flocons (values[i + 1].data.d_int32),
return_val = cons (flocons (values[i + 1].data.d_int32),
return_val);
break;
case GIMP_PDB_FLOAT:
return_val = cons (flocons (values[i + 1].data.d_float),
return_val = cons (flocons (values[i + 1].data.d_float),
return_val);
break;
......@@ -799,7 +811,7 @@ marshall_proc_db_call (LISP a)
array = arcons (tc_long_array, values[i].data.d_int32, 0);
for (j = 0; j < values[i].data.d_int32; j++)
{
array->storage_as.long_array.data[j] =
array->storage_as.long_array.data[j] =
values[i + 1].data.d_int32array[j];
}
return_val = cons (array, return_val);
......@@ -818,7 +830,7 @@ marshall_proc_db_call (LISP a)
array = arcons (tc_byte_array, values[i].data.d_int32, 0);
for (j = 0; j < values[i].data.d_int32; j++)
{
array->storage_as.string.data[j] =
array->storage_as.string.data[j] =
values[i + 1].data.d_int8array[j];
}
return_val = cons (array, return_val);
......@@ -833,7 +845,7 @@ marshall_proc_db_call (LISP a)
array = arcons (tc_double_array, values[i].data.d_int32, 0);
for (j = 0; j < values[i].data.d_int32; j++)
{
array->storage_as.double_array.data[j] =
array->storage_as.double_array.data[j] =
values[i + 1].data.d_floatarray[j];
}
return_val = cons (array, return_val);
......@@ -853,7 +865,7 @@ marshall_proc_db_call (LISP a)
for (j = 0; j < num_strings; j++)
{
string_len = strlen (array[j]);
string_array = cons (strcons (string_len, array[j]),
string_array = cons (strcons (string_len, array[j]),
string_array);
}
......@@ -880,32 +892,32 @@ marshall_proc_db_call (LISP a)
break;
case GIMP_PDB_DISPLAY:
return_val = cons (flocons (values[i + 1].data.d_int32),
return_val = cons (flocons (values[i + 1].data.d_int32),
return_val);
break;
case GIMP_PDB_IMAGE:
return_val = cons (flocons (values[i + 1].data.d_int32),
return_val = cons (flocons (values[i + 1].data.d_int32),
return_val);
break;
case GIMP_PDB_LAYER:
return_val = cons (flocons (values[i + 1].data.d_int32),
return_val = cons (flocons (values[i + 1].data.d_int32),
return_val);
break;
case GIMP_PDB_CHANNEL:
return_val = cons (flocons (values[i + 1].data.d_int32),
return_val = cons (flocons (values[i + 1].data.d_int32),
return_val);
break;
case GIMP_PDB_DRAWABLE:
return_val = cons (flocons (values[i + 1].data.d_int32),
return_val = cons (flocons (values[i + 1].data.d_int32),
return_val);
break;
case GIMP_PDB_SELECTION:
return_val = cons (flocons (values[i + 1].data.d_int32),
return_val = cons (flocons (values[i + 1].data.d_int32),
return_val);
break;
......@@ -930,15 +942,15 @@ marshall_proc_db_call (LISP a)
string_len = strlen (values[i + 1].data.d_parasite.name);
name = strcons (string_len,
values[i + 1].data.d_parasite.name);
flags = flocons (values[i + 1].data.d_parasite.flags);
data = arcons (tc_byte_array,
values[i+1].data.d_parasite.size, 0);
memcpy(data->storage_as.string.data,
values[i+1].data.d_parasite.data,
values[i+1].data.d_parasite.size);
intermediate_val = cons (name,
values[i+1].data.d_parasite.data,