Commit aa201cad authored by David Odin's avatar David Odin

use the G_N_ELEMENTS macro where appropriate,

removing a bunch of unuseful static variables.
Changed some g_malloc to g_new while I was on it.11
parent 008b057d
2001-12-06 Dindinx <David@dindinx.org>
* plug-ins/*/*.c: use the G_N_ELEMENTS macro where appropriate,
removing a bunch of unuseful static variables.
Changed some g_malloc to g_new while I was on it.
2001-12-03 Michael Natterer <mitch@gimp.org>
* app/devices.c: use the passed Gimp pointer instead of
......
......@@ -200,7 +200,6 @@ query (void)
{ GIMP_PDB_INT8, "blueinvert", "Green inversion mode (1: enabled; 0: disabled)" },
{ GIMP_PDB_INT32, "ncolors", "Number of Colors for mapping (2<=ncolors<=8192)" }
};
static gint nargs = sizeof(args) / sizeof(args[0]);
INIT_I18N();
......@@ -213,7 +212,7 @@ query (void)
N_("<Image>/Filters/Render/Pattern/Fractal Explorer..."),
"RGB*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}
......
......@@ -155,7 +155,6 @@ query (void)
{ GIMP_PDB_INT32, "newimage", "Create a new image (TRUE/FALSE)" },
{ GIMP_PDB_INT32, "transparentbackground", "Make background transparent (TRUE/FALSE)" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure ("plug_in_lighting",
"Apply various lighting effects to an image",
......@@ -166,7 +165,7 @@ query (void)
N_("<Image>/Filters/Light Effects/Lighting Effects..."),
"RGB*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}
......
......@@ -193,7 +193,6 @@ query (void)
{ GIMP_PDB_DRAWABLE, "cyl_top_drawable", "Cylinder top face (set these to -1 if not used)" },
{ GIMP_PDB_DRAWABLE, "cyl_bottom_drawable", "Cylinder bottom face" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure ("plug_in_map_object",
"Maps a picture to a object (plane, sphere, box or cylinder)",
......@@ -204,7 +203,7 @@ query (void)
N_("<Image>/Filters/Map/Map Object..."),
"RGB*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}
......
......@@ -103,9 +103,6 @@ query (void)
{
{ GIMP_PDB_IMAGE, "image", "Output image" },
};
static gint nload_args = sizeof (load_args) / sizeof (load_args[0]);
static gint nload_return_vals = (sizeof (load_return_vals) /
sizeof (load_return_vals[0]));
static GimpParamDef save_args[] =
{
......@@ -115,8 +112,7 @@ query (void)
{ GIMP_PDB_STRING, "filename", "The name of the file to save the image in" },
{ GIMP_PDB_STRING, "raw_filename", "The name entered" },
};
static gint nsave_args = sizeof (save_args) / sizeof (save_args[0]);
INIT_I18N();
gimp_install_procedure ("file_bmp_load",
......@@ -128,7 +124,8 @@ query (void)
"<Load>/BMP",
NULL,
GIMP_PLUGIN,
nload_args, nload_return_vals,
G_N_ELEMENTS (load_args),
G_N_ELEMENTS (load_return_vals),
load_args, load_return_vals);
gimp_install_procedure ("file_bmp_save",
......@@ -140,7 +137,7 @@ query (void)
"<Save>/BMP",
"INDEXED, GRAY, RGB",
GIMP_PLUGIN,
nsave_args, 0,
G_N_ELEMENTS (save_args), 0,
save_args, NULL);
gimp_register_magic_load_handler ("file_bmp_load",
......
......@@ -950,7 +950,6 @@ query (void)
{ GIMP_PDB_INT8, "bluemode", "Blue application mode (0:SIN;1:COS;2:NONE)" },
};
static GimpParamDef *return_vals = NULL;
static int nargs = sizeof (args) / sizeof (args[0]);
static int nreturn_vals = 0;
INIT_I18N();
......@@ -964,7 +963,7 @@ query (void)
N_("<Image>/Filters/Colors/Map/Alien Map..."),
"RGB*",
GIMP_PLUGIN,
nargs, nreturn_vals,
G_N_ELEMENTS (args), nreturn_vals,
args, return_vals);
}
......@@ -1339,8 +1338,8 @@ build_preview_source_image (void)
guchar *p;
guchar pixel[4];
wint.image = g_malloc(preview_width * preview_height * 3 * sizeof(guchar));
wint.wimage = g_malloc(preview_width * preview_height * 3 * sizeof(guchar));
wint.image = g_new (guchar, preview_width * preview_height * 3);
wint.wimage = g_new (guchar, preview_width * preview_height * 3);
left = sel_x1;
right = sel_x2 - 1;
......
......@@ -974,7 +974,6 @@ query (void)
{ GIMP_PDB_INT8, "bluemode", "Blue/luminance application mode (TRUE, FALSE)" },
};
static GimpParamDef *return_vals = NULL;
static int nargs = sizeof (args) / sizeof (args[0]);
static int nreturn_vals = 0;
INIT_I18N();
......@@ -988,7 +987,7 @@ query (void)
N_("<Image>/Filters/Colors/Map/Alien Map 2..."),
"RGB*",
GIMP_PLUGIN,
nargs, nreturn_vals,
G_N_ELEMENTS (args), nreturn_vals,
args, return_vals);
}
......@@ -1331,8 +1330,8 @@ build_preview_source_image (void)
guchar *p;
guchar pixel[4];
wint.image = g_malloc(preview_width * preview_height * 3 * sizeof(guchar));
wint.wimage = g_malloc(preview_width * preview_height * 3 * sizeof(guchar));
wint.image = g_new (guchar, preview_width * preview_height * 3);
wint.wimage = g_new (guchar, preview_width * preview_height * 3);
left = sel_x1;
right = sel_x2 - 1;
......
......@@ -88,9 +88,6 @@ query (void)
{
{ GIMP_PDB_IMAGE, "image", "Output image" }
};
static gint nload_args = sizeof (load_args) / sizeof (load_args[0]);
static gint nload_return_vals = (sizeof (load_return_vals) /
sizeof (load_return_vals[0]));
static GimpParamDef save_args[] =
{
......@@ -101,7 +98,6 @@ query (void)
{ GIMP_PDB_STRING, "raw_filename", "Name entered" },
{ GIMP_PDB_STRING, "palette_filename", "Filename to save palette to" },
};
static gint nsave_args = sizeof (save_args) / sizeof (save_args[0]);
gimp_install_procedure ("file_cel_load",
"Loads files in KISS CEL file format",
......@@ -112,7 +108,8 @@ query (void)
"<Load>/CEL",
NULL,
GIMP_PLUGIN,
nload_args, nload_return_vals,
G_N_ELEMENTS (load_args),
G_N_ELEMENTS (load_return_vals),
load_args, load_return_vals);
gimp_install_procedure ("file_cel_save",
......@@ -124,7 +121,7 @@ query (void)
"<Save>/CEL",
"INDEXEDA",
GIMP_PLUGIN,
nsave_args, 0,
G_N_ELEMENTS (save_args), 0,
save_args, NULL);
gimp_register_magic_load_handler ("file_cel_load",
......
......@@ -456,7 +456,6 @@ query (void)
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" },
{ GIMP_PDB_STRING, "parameter_file_name", "The name of parameter file. CML_explorer makes an image with its settings." }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure (PLUG_IN_NAME,
"Make an image of Coupled-Map Lattice",
......@@ -473,7 +472,7 @@ query (void)
N_("<Image>/Filters/Render/Pattern/CML Explorer..."),
"RGB*, GRAY*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}
......@@ -2079,7 +2078,7 @@ CML_initial_value_sensitives_update (void)
flag2 = (CML_INITIAL_RANDOM_INDEPENDENT <= VALS.initial_value)
& (VALS.initial_value <= CML_INITIAL_RANDOM_SHARED);
for (; i < sizeof (random_sensitives) / sizeof (random_sensitives[0]); i++)
for (; i < G_N_ELEMENTS (random_sensitives) ; i++)
if (random_sensitives[i].widget)
gtk_widget_set_sensitive (random_sensitives[i].widget,
flag1 & (random_sensitives[i].logic == flag2));
......
......@@ -79,7 +79,6 @@ query (void)
{GIMP_PDB_STRING, "raw_filename", "The name entered"},
{GIMP_PDB_STRING, "file_type", "File type to use"}
};
static gint nsave_args = sizeof(save_args) / sizeof(save_args[0]);
gimp_install_procedure ("file_aa_save",
"Saves files in various text formats",
......@@ -90,7 +89,7 @@ query (void)
"<Save>/AA",
"GRAY*", /* support grayscales */
GIMP_PLUGIN,
nsave_args, 0,
G_N_ELEMENTS (save_args), 0,
save_args, NULL);
gimp_register_save_handler ("file_aa_save",
......
......@@ -259,7 +259,6 @@ query (void)
{ GIMP_PDB_IMAGE, "image", "Input image" },
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable (unused)" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure ("plug_in_animationplay",
"This plugin allows you to preview a GIMP layer-based animation.",
......@@ -270,7 +269,7 @@ query (void)
N_("<Image>/Filters/Animation/Animation Playback..."),
"RGB*, INDEXED*, GRAY*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}
......
......@@ -164,8 +164,6 @@ query (void)
{
{ GIMP_PDB_IMAGE, "result", "Resulting image" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
static gint nreturn_args = sizeof (return_args) / sizeof (return_args[0]);
gimp_install_procedure ("plug_in_animationoptimize",
"This procedure applies various optimizations to"
......@@ -178,7 +176,8 @@ query (void)
N_("<Image>/Filters/Animation/Animation Optimize"),
"RGB*, INDEXED*, GRAY*",
GIMP_PLUGIN,
nargs, nreturn_args,
G_N_ELEMENTS (args),
G_N_ELEMENTS (return_args),
args, return_args);
gimp_install_procedure ("plug_in_animationunoptimize",
......@@ -194,7 +193,8 @@ query (void)
N_("<Image>/Filters/Animation/Animation UnOptimize"),
"RGB*, INDEXED*, GRAY*",
GIMP_PLUGIN,
nargs, nreturn_args,
G_N_ELEMENTS (args),
G_N_ELEMENTS (return_args),
args, return_args);
gimp_install_procedure ("plug_in_animation_remove_backdrop",
......@@ -208,7 +208,8 @@ query (void)
N_("<Image>/Filters/Animation/Animation: Remove Backdrop"),
"RGB*, INDEXED*, GRAY*",
GIMP_PLUGIN,
nargs, nreturn_args,
G_N_ELEMENTS (args),
G_N_ELEMENTS (return_args),
args, return_args);
gimp_install_procedure ("plug_in_animation_find_backdrop",
......@@ -223,7 +224,8 @@ query (void)
N_("<Image>/Filters/Animation/Animation: Find Backdrop"),
"RGB*, INDEXED*, GRAY*",
GIMP_PLUGIN,
nargs, nreturn_args,
G_N_ELEMENTS (args),
G_N_ELEMENTS (return_args),
args, return_args);
}
......@@ -484,13 +486,13 @@ do_optimizations(GimpRunModeType run_mode)
guint *num_colours;
these_rows = g_malloc(total_frames * sizeof(guchar *));
red = g_malloc(total_frames * sizeof(guchar *));
green = g_malloc(total_frames * sizeof(guchar *));
blue = g_malloc(total_frames * sizeof(guchar *));
count = g_malloc(total_frames * sizeof(guint *));
these_rows = g_new (guchar *, total_frames);
red = g_new (guchar *, total_frames);
green = g_new (guchar *, total_frames);
blue = g_new (guchar *, total_frames);
count = g_new (guint *, total_frames);
num_colours = g_malloc(width * sizeof(guint));
num_colours = g_new (guint, width);
g_warning("stat fun");
......@@ -498,11 +500,11 @@ g_warning("stat fun");
{
these_rows[this_frame_num] = g_malloc(width * pixelstep);
red[this_frame_num] = g_malloc(width * sizeof(guchar));
green[this_frame_num] = g_malloc(width * sizeof(guchar));
blue[this_frame_num] = g_malloc(width * sizeof(guchar));
red[this_frame_num] = g_new (guchar, width);
green[this_frame_num] = g_new (guchar, width);
blue[this_frame_num] = g_new (guchar, width);
count[this_frame_num] = g_malloc0(width * sizeof(guint));
count[this_frame_num] = g_new0(guint, width);
}
for (row = 0; row < height; row++)
......
......@@ -121,7 +121,6 @@ query (void)
{ GIMP_PDB_INT32, "set_background", "Set lens surroundings to bkgr value" },
{ GIMP_PDB_INT32, "set_transparent", "Set lens surroundings transparent" }
};
static gint nargs = sizeof (args)/ sizeof (args[0]);
gimp_install_procedure ("plug_in_applylens",
"Apply a lens effect",
......@@ -132,7 +131,7 @@ query (void)
N_("<Image>/Filters/Glass Effects/Apply Lens..."),
"RGB*, GRAY*, INDEXED*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}
......
......@@ -169,7 +169,6 @@ query (void)
{ GIMP_PDB_INT32, "orientation", "orientation; 0 = Horizontal, 1 = Vertical" },
{ GIMP_PDB_INT32, "backgndg_trans", "background transparent; FALSE,TRUE" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure ("plug_in_blinds",
"Adds a blinds effect to the image. Rather like "
......@@ -182,7 +181,7 @@ query (void)
N_("<Image>/Filters/Distorts/Blinds..."),
"RGB*, GRAY*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}
......
......@@ -173,7 +173,6 @@ query (void)
{ GIMP_PDB_IMAGE, "image", "Input image (unused)" },
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" }
};
static gint nargs_ni = sizeof(args_ni) / sizeof (args_ni[0]);
static GimpParamDef args[] =
{
......@@ -185,7 +184,6 @@ query (void)
{ GIMP_PDB_INT32, "seed_type", "Seed type (10 = current time, 11 = seed value)" },
{ GIMP_PDB_INT32, "blur_seed", "Seed value (used only if seed type is 11)" }
};
static gint nargs = sizeof(args) / sizeof (args[0]);
const gchar *blurb = "Apply a 3x3 blurring convolution kernel to the specified drawable.";
const gchar *help = "This plug-in randomly blurs the specified drawable, using a 3x3 blur. You control the percentage of the pixels that are blurred and the number of times blurring is applied. Indexed images are not supported.";
......@@ -202,7 +200,7 @@ query (void)
N_("<Image>/Filters/Blur/Blur..."),
"RGB*, GRAY*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
gimp_install_procedure (PLUG_IN_NAME,
......@@ -214,7 +212,7 @@ query (void)
NULL,
"RGB*, GRAY*",
GIMP_PLUGIN,
nargs_ni, 0,
G_N_ELEMENTS (args_ni), 0,
args_ni, NULL);
}
......
......@@ -89,8 +89,6 @@ query (void)
{
{ GIMP_PDB_COLOR, "borderaverage", "The average color of the specified border" },
};
static gint nargs = sizeof (args) / sizeof (args[0]);
static gint nreturn_vals = sizeof (return_vals) / sizeof (return_vals[0]);
INIT_I18N();
......@@ -103,7 +101,8 @@ query (void)
N_("<Image>/Filters/Colors/Border Average..."),
"RGB*",
GIMP_PLUGIN,
nargs, nreturn_vals,
G_N_ELEMENTS (args),
G_N_ELEMENTS (return_vals),
args, return_vals);
}
......
......@@ -350,7 +350,6 @@ query (void)
{ GIMP_PDB_INT32, "invert", "Invert bumpmap" },
{ GIMP_PDB_INT32, "type", "Type of map (LINEAR (0), SPHERICAL (1), SINUOSIDAL (2))" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure ("plug_in_bump_map",
"Create an embossing effect using an image as a "
......@@ -367,7 +366,7 @@ query (void)
N_("<Image>/Filters/Map/Bump Map..."),
"RGB*, GRAY*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
gimp_install_procedure ("plug_in_bump_map_tiled",
......@@ -385,7 +384,7 @@ query (void)
NULL,
"RGB*, GRAY*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}
......
......@@ -94,9 +94,6 @@ query (void)
{
{ GIMP_PDB_IMAGE, "image", "Output image" }
};
static gint nload_args = sizeof (load_args) / sizeof (load_args[0]);
static gint nload_return_vals = (sizeof (load_return_vals) /
sizeof (load_return_vals[0]));
static GimpParamDef save_args[] =
{
......@@ -106,7 +103,6 @@ query (void)
{ GIMP_PDB_STRING, "filename", "The name of the file to save the image in" },
{ GIMP_PDB_STRING, "raw_filename", "The name of the file to save the image in" }
};
static gint nsave_args = sizeof (save_args) / sizeof (save_args[0]);
gimp_install_procedure ("file_bz2_load",
"loads files compressed with bzip2",
......@@ -117,7 +113,8 @@ query (void)
"<Load>/bzip2",
NULL,
GIMP_PLUGIN,
nload_args, nload_return_vals,
G_N_ELEMENTS (load_args),
G_N_ELEMENTS (load_return_vals),
load_args, load_return_vals);
gimp_install_procedure ("file_bz2_save",
......@@ -129,7 +126,7 @@ query (void)
"<Save>/bzip2",
"RGB*, GRAY*, INDEXED*",
GIMP_PLUGIN,
nsave_args, 0,
G_N_ELEMENTS (save_args), 0,
save_args, NULL);
gimp_register_magic_load_handler ("file_bz2_load",
......
......@@ -91,7 +91,6 @@ query (void)
{ GIMP_PDB_INT32, "check_mode", "Regular or Physcobilly" },
{ GIMP_PDB_INT32, "check_size", "Size of the checks" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure ("plug_in_checkerboard",
"Adds a checkerboard pattern to an image",
......@@ -102,7 +101,7 @@ query (void)
N_("<Image>/Filters/Render/Pattern/Checkerboard..."),
"RGB*, GRAY*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}
......
......@@ -128,7 +128,6 @@ query (void)
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" },
{ GIMP_PDB_COLOR, "color", "Color to apply"}
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure ("plug_in_colorify",
"Similar to the \"Color\" mode for layers.",
......@@ -140,7 +139,7 @@ query (void)
N_("<Image>/Filters/Colors/Colorify..."),
"RGB*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}
......
......@@ -111,7 +111,6 @@ query (void)
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" },
{ GIMP_PDB_COLOR, "color", "Color to remove" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure ("plug_in_colortoalpha",
"Convert the color in an image to alpha",
......@@ -124,7 +123,7 @@ query (void)
N_("<Image>/Filters/Colors/Color to Alpha..."),
"RGB*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}
......
......@@ -139,7 +139,7 @@ static COMPOSE_DSC compose_dsc[] =
N_("Black:") }, N_("cmyk-compose"), compose_cmyk }
};
#define MAX_COMPOSE_TYPES (sizeof (compose_dsc) / sizeof (compose_dsc[0]))
#define MAX_COMPOSE_TYPES (G_N_ELEMENTS (compose_dsc))
typedef struct
......@@ -207,8 +207,6 @@ query (void)
{
{ GIMP_PDB_IMAGE, "new_image", "Output image" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
static gint nreturn_vals = sizeof (return_vals) / sizeof (return_vals[0]);
static GimpParamDef drw_args[] =
{
......@@ -224,8 +222,6 @@ query (void)
{
{ GIMP_PDB_IMAGE, "new_image", "Output image" }
};
static gint drw_nargs = sizeof (args) / sizeof (args[0]);
static gint drw_nreturn_vals = sizeof (return_vals) / sizeof (return_vals[0]);
gimp_install_procedure ("plug_in_compose",
"Compose an image from multiple gray images",
......@@ -237,7 +233,8 @@ query (void)
N_("<Image>/Image/Mode/Compose..."),
"GRAY*",
GIMP_PLUGIN,
nargs, nreturn_vals,
G_N_ELEMENTS (args),
G_N_ELEMENTS (return_vals),
args, return_vals);
gimp_install_procedure ("plug_in_drawable_compose",
......@@ -250,7 +247,8 @@ query (void)
NULL, /* It is not available in interactive mode */
"GRAY*",
GIMP_PLUGIN,
drw_nargs, drw_nreturn_vals,
G_N_ELEMENTS (drw_args),
G_N_ELEMENTS (drw_return_vals),
drw_args, drw_return_vals);
}
......
......@@ -142,9 +142,6 @@ query (void)
{
{ GIMP_PDB_IMAGE, "image", "Output image" },
};
static gint nload_args = sizeof (load_args) / sizeof (load_args[0]);
static gint nload_return_vals = (sizeof (load_return_vals) /
sizeof (load_return_vals[0]));
static GimpParamDef save_args[] =
{
......@@ -154,7 +151,6 @@ query (void)
{ GIMP_PDB_STRING, "filename", "The name of the file to save the image in" },
{ GIMP_PDB_STRING, "raw_filename", "The name of the file to save the image in" }
};
static gint nsave_args = sizeof (save_args) / sizeof (save_args[0]);
gimp_install_procedure ("file_gz_load",
"loads files compressed with gzip",
......@@ -165,7 +161,8 @@ query (void)
"<Load>/gzip",
NULL,
GIMP_PLUGIN,
nload_args, nload_return_vals,
G_N_ELEMENTS (load_args),
G_N_ELEMENTS (load_return_vals),
load_args, load_return_vals);
gimp_install_procedure ("file_gz_save",
......@@ -177,7 +174,7 @@ query (void)
"<Save>/gzip",
"RGB*, GRAY*, INDEXED*",
GIMP_PLUGIN,
nsave_args, 0,
G_N_ELEMENTS (save_args), 0,
save_args, NULL);
gimp_register_magic_load_handler ("file_gz_load",
......
......@@ -184,7 +184,6 @@ query (void)
{ GIMP_PDB_INT32ARRAY, "channels", "Mask of the channels to be filtered" },
{ GIMP_PDB_INT32, "bmode", "Mode for treating image borders" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure ("plug_in_convmatrix",
"A generic 5x5 convolution matrix",
......@@ -195,7 +194,7 @@ query (void)
N_("<Image>/Filters/Generic/Convolution Matrix..."),
"RGB*, GRAY*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}
......
......@@ -98,7 +98,6 @@ query (void)
{ GIMP_PDB_STRING, "filename", "The name of the file to save the image in" },
{ GIMP_PDB_STRING, "raw_filename", "The name of the file to save the image in" }
};
static gint nsave_args = sizeof (save_args) / sizeof (save_args[0]);
gimp_install_procedure ("file_csource_save",
"Dump image data in RGB(A) format for C source",
......@@ -109,7 +108,7 @@ query (void)
"<Save>/C-Source",
"RGB*",
GIMP_PLUGIN,
nsave_args, 0,
G_N_ELEMENTS (save_args), 0,
save_args, NULL);
gimp_register_save_handler ("file_csource_save",
......
......@@ -152,7 +152,6 @@ query (void)
{ GIMP_PDB_FLOAT, "tile_saturation", "Expand tiles by this amount" },
{ GIMP_PDB_INT32, "bg_color", "Background color: { BLACK (0), BG (1) }" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure ("plug_in_cubism",
"Convert the input drawable into a collection of rotated squares",
......@@ -163,7 +162,7 @@ query (void)
N_("<Image>/Filters/Artistic/Cubism..."),
"RGB*, GRAY*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}
......
......@@ -639,13 +639,11 @@ query (void)
{ GIMP_PDB_INT32, "argc_lower_val_y", "{ 256 } "},