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
This commit is contained in:
David Odin 2001-12-06 02:28:58 +00:00
parent 008b057d11
commit aa201cade4
165 changed files with 386 additions and 650 deletions

View File

@ -1,3 +1,9 @@
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

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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",

View File

@ -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;

View File

@ -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;

View File

@ -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",

View File

@ -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));

View File

@ -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",

View File

@ -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);
}

View File

@ -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++)

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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",

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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",

View File

@ -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);
}

View File

@ -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",

View File

@ -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);
}

View File

@ -639,13 +639,11 @@ query (void)
{ GIMP_PDB_INT32, "argc_lower_val_y", "{ 256 } "},
{ GIMP_PDB_INT8ARRAY, "lower_val_y", "array of 256 y freehand koord { 0 <= y <= 255 }"}
};
static gint nargs = sizeof (args) / sizeof (args[0]);
static GimpParamDef return_vals[] =
{
{ GIMP_PDB_LAYER, "bent_layer", "the handled layer" }
};
static gint nreturn_vals = sizeof(return_vals) / sizeof(return_vals[0]);
static GimpParamDef args_iter[] =
{
@ -654,7 +652,6 @@ query (void)
{ GIMP_PDB_FLOAT, "current_step", "current (for linear iterations this is the layerstack position, otherwise some value inbetween)" },
{ GIMP_PDB_INT32, "len_struct", "length of stored data structure with id is equal to the plug_in proc_name" },
};
static gint nargs_iter = sizeof (args_iter) / sizeof (args_iter[0]);
/* the actual installation of the bend plugin */
gimp_install_procedure (PLUG_IN_NAME,
@ -679,8 +676,8 @@ query (void)
N_("<Image>/Filters/Distorts/CurveBend..."),
PLUG_IN_IMAGE_TYPES,
GIMP_PLUGIN,
nargs,
nreturn_vals,
G_N_ELEMENTS (args),
G_N_ELEMENTS (return_vals),
args,
return_vals);
@ -694,7 +691,7 @@ query (void)
NULL, /* do not appear in menus */
NULL,
GIMP_EXTENSION,
nargs_iter, 0,
G_N_ELEMENTS (args_iter), 0,
args_iter, NULL);
}
@ -848,7 +845,7 @@ run (char *name, /* name of plugin */
/* check to see if invoked with the correct number of parameters */
if (nparams >= 20)
{
cd = g_malloc (sizeof (BenderDialog));
cd = g_new (BenderDialog, 1);
cd->run = TRUE;
cd->show_progress = FALSE;
cd->drawable = l_active_drawable;
@ -876,7 +873,7 @@ run (char *name, /* name of plugin */
break;
case GIMP_RUN_WITH_LAST_VALS:
cd = g_malloc (sizeof (BenderDialog));
cd = g_new (BenderDialog, 1);
cd->run = TRUE;
cd->show_progress = TRUE;
cd->drawable = l_active_drawable;
@ -1146,9 +1143,9 @@ p_retrieve_values (BenderDialog *cd)
}
else
{
cd->bval_from = g_malloc(sizeof(BenderValues));
cd->bval_to = g_malloc(sizeof(BenderValues));
cd->bval_curr = g_malloc(sizeof(BenderValues));
cd->bval_from = g_new (BenderValues, 1);
cd->bval_to = g_new (BenderValues, 1);
cd->bval_curr = g_new (BenderValues, 1);
memcpy(cd->bval_curr, &l_bval, sizeof(l_bval));
/* it seems that we are called from GAP with "Varying Values" */
@ -1305,7 +1302,7 @@ bender_new_dialog (GimpDrawable *drawable)
GtkObject *data;
int i, j;
cd = g_malloc (sizeof (BenderDialog));
cd = g_new (BenderDialog, 1);
cd->preview = FALSE;
cd->curve_type = SMOOTH;
@ -3205,16 +3202,16 @@ p_bender_calculate_iter_curve (BenderDialog *cd,
if(gb_debug) printf("p_bender_calculate_iter_curve ITERmode 1\n");
/* init FROM curves */
cd_from = g_malloc (sizeof (BenderDialog));
cd_from = g_new (BenderDialog, 1);
p_cd_from_bval(cd_from, cd->bval_from);
cd_from->curve_ptr[OUTLINE_UPPER] = g_malloc(sizeof(gint32) * (1+xmax));
cd_from->curve_ptr[OUTLINE_LOWER] = g_malloc(sizeof(gint32) * (1+xmax));
cd_from->curve_ptr[OUTLINE_UPPER] = g_new (gint32, 1+xmax);
cd_from->curve_ptr[OUTLINE_LOWER] = g_new (gint32, 1+xmax);
/* init TO curves */
cd_to = g_malloc (sizeof (BenderDialog));
cd_to = g_new (BenderDialog, 1);
p_cd_from_bval(cd_to, cd->bval_to);
cd_to->curve_ptr[OUTLINE_UPPER] = g_malloc(sizeof(gint32) * (1+xmax));
cd_to->curve_ptr[OUTLINE_LOWER] = g_malloc(sizeof(gint32) * (1+xmax));
cd_to->curve_ptr[OUTLINE_UPPER] = g_new (gint32, 1+xmax);
cd_to->curve_ptr[OUTLINE_LOWER] = g_new (gint32, 1+xmax);
if (cd_from->curve_type == SMOOTH)
{
@ -3308,8 +3305,8 @@ p_vertical_bend (BenderDialog *cd,
l_alpha_lo = 20;
/* allocate array of last values (one element foreach x koordinate) */
last_arr = g_malloc(sizeof(t_Last) * src_gdrw->x2);
first_arr = g_malloc(sizeof(t_Last) * src_gdrw->x2);
last_arr = g_new (t_Last, src_gdrw->x2);
first_arr = g_new (t_Last, src_gdrw->x2);
/* ------------------------------------------------
* foreach pixel in the SAMPLE_drawable:
@ -3592,8 +3589,8 @@ p_main_bend (BenderDialog *cd,
src_drawable = gimp_drawable_get (l_tmp_layer_id);
xmax = ymax = src_drawable->width -1;
cd->curve_ptr[OUTLINE_UPPER] = g_malloc(sizeof(gint32) * (1+xmax));
cd->curve_ptr[OUTLINE_LOWER] = g_malloc(sizeof(gint32) * (1+xmax));
cd->curve_ptr[OUTLINE_UPPER] = g_new (gint32, 1+xmax);
cd->curve_ptr[OUTLINE_LOWER] = g_new (gint32, 1+xmax);
p_bender_calculate_iter_curve(cd, xmax, ymax);
bender_init_min_max(cd, xmax);

View File

@ -139,7 +139,7 @@ static EXTRACT extract[] =
};
/* Number of types of extractions */
#define NUM_EXTRACT_TYPES (sizeof (extract) / sizeof (extract[0]))
#define NUM_EXTRACT_TYPES (G_N_ELEMENTS (extract))
typedef struct
{
@ -193,8 +193,6 @@ query (void)
{ GIMP_PDB_IMAGE, "new_image", "Output gray image (N/A for single channel extract)" },
{ GIMP_PDB_IMAGE, "new_image", "Output gray image (N/A for single channel extract)" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
static gint nreturn_vals = sizeof (return_vals) / sizeof (return_vals[0]);
gimp_install_procedure ("plug_in_decompose",
"Decompose an image into different types of channels",
@ -206,7 +204,8 @@ query (void)
N_("<Image>/Image/Mode/Decompose..."),
"RGB*",
GIMP_PLUGIN,
nargs, nreturn_vals,
G_N_ELEMENTS (args),
G_N_ELEMENTS (return_vals),
args, return_vals);
}

View File

@ -77,7 +77,6 @@ query (void)
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" },
{ GIMP_PDB_INT32, "evenodd", "0 = keep odd, 1 = keep even" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure ("plug_in_deinterlace",
"Deinterlace",
@ -92,7 +91,7 @@ query (void)
N_("<Image>/Filters/Enhance/Deinterlace..."),
"RGB*, GRAY*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -182,7 +182,6 @@ query (void)
{ GIMP_PDB_FLOAT, "scale1", "Depth relative scale 1" },
{ GIMP_PDB_FLOAT, "scale2", "Depth relative scale 2" }
};
static gint numArgs = sizeof (args) / sizeof (GimpParamDef);
gimp_install_procedure (PLUG_IN_NAME,
"Combine two images using corresponding "
@ -198,7 +197,7 @@ query (void)
N_("<Image>/Filters/Combine/Depth Merge..."),
"RGB*, GRAY*",
GIMP_PLUGIN,
numArgs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}
@ -817,10 +816,8 @@ DepthMerge_buildPreviewSourceImage (DepthMerge *dm)
{
int x;
dm->interface->checkRow0 = (guchar *)g_malloc(dm->interface->previewWidth *
sizeof(guchar));
dm->interface->checkRow1 = (guchar *)g_malloc(dm->interface->previewWidth *
sizeof(guchar));
dm->interface->checkRow0 = g_new (guchar, dm->interface->previewWidth);
dm->interface->checkRow1 = g_new (guchar, dm->interface->previewWidth);
for (x = 0; x < dm->interface->previewWidth; x++)
{
@ -1117,10 +1114,9 @@ util_fillReducedBuffer (guchar *dest,
sourceBpp = sourceDrawable->bpp;
sourceBuffer = (guchar *)g_malloc(sourceWidth * sourceHeight *
sourceBpp);
reducedRowBuffer = (guchar *)g_malloc(destWidth * sourceBpp);
sourceRowOffsetLookup = (int *)g_malloc(destWidth * sizeof(int));
sourceBuffer = g_new (guchar, sourceWidth * sourceHeight * sourceBpp);
reducedRowBuffer = g_new (guchar, destWidth * sourceBpp);
sourceRowOffsetLookup = g_new (int, destWidth);
gimp_pixel_rgn_init(&rgn, sourceDrawable, x0, y0, sourceWidth, sourceHeight,
FALSE, FALSE);
sourceHasAlpha = gimp_drawable_has_alpha(sourceDrawable->drawable_id);

View File

@ -169,7 +169,6 @@ query (void)
{ GIMP_PDB_INT32, "black", "Black level (-1 to 255)" },
{ GIMP_PDB_INT32, "white", "White level (0 to 256)" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure (PLUG_IN_NAME,
"Despeckle filter, typically used to \'despeckle\' "
@ -182,7 +181,7 @@ query (void)
N_("<Image>/Filters/Enhance/Despeckle..."),
"RGB*, GRAY*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -134,7 +134,6 @@ query (void)
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" },
{ GIMP_PDB_INT32, "avg_width", "Averaging filter width (default = 36)" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure (PLUG_IN_NAME,
"Destripe filter, used to remove vertical stripes "
@ -147,7 +146,7 @@ query (void)
N_("<Image>/Filters/Enhance/Destripe..."),
"RGB*, GRAY*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -174,7 +174,6 @@ query (void)
{ GIMP_PDB_FLOAT, "scattering", "Scattering (Speed vs. quality)" },
{ GIMP_PDB_FLOAT, "polarization", "Polarization" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure ("plug_in_diffraction",
"Generate diffraction patterns",
@ -185,7 +184,7 @@ query (void)
N_("<Image>/Filters/Render/Pattern/Diffraction Patterns..."),
"RGB*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -166,7 +166,6 @@ query (void)
{ GIMP_PDB_DRAWABLE, "displace_map_y", "Displacement map for Y direction" },
{ GIMP_PDB_INT32, "displace_type", "Edge behavior: { WRAP (0), SMEAR (1), BLACK (2) }" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure ("plug_in_displace",
"Displace the contents of the specified drawable",
@ -183,7 +182,7 @@ query (void)
N_("<Image>/Filters/Map/Displace..."),
"RGB*, GRAY*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -152,7 +152,6 @@ query (void)
{ GIMP_PDB_FLOAT, "amount", "Edge detection amount" },
{ GIMP_PDB_INT32, "wrapmode", "Edge detection behavior: { WRAP (0), SMEAR (1), BLACK (2) }" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gchar *help_string =
"Perform edge detection on the contents of the specified drawable. It "
@ -168,7 +167,7 @@ query (void)
N_("<Image>/Filters/Edge-Detect/Edge..."),
"RGB*, GRAY*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -155,7 +155,6 @@ query (void)
{ GIMP_PDB_INT32, "depth", "The Filter Width" },
{ GIMP_PDB_INT32, "embossp", "Emboss or Bumpmap" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure ("plug_in_emboss",
"Emboss filter",
@ -167,7 +166,7 @@ query (void)
N_("<Image>/Filters/Distorts/Emboss..."),
"RGB*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -108,7 +108,6 @@ query (void)
{ GIMP_PDB_INT32, "height", "Resolution in pixels" },
{ GIMP_PDB_INT32, "limit", "If true, limit line width" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure ("plug_in_engrave",
"Engrave the contents of the specified drawable",
@ -119,7 +118,7 @@ query (void)
N_("<Image>/Filters/Distorts/Engrave..."),
"RGBA, GRAYA",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -124,7 +124,6 @@ query (void)
{ GIMP_PDB_INT8, "green_threshold", "Green threshold" },
{ GIMP_PDB_INT8, "blue_threshold", "Blue threshold" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure ("plug_in_exchange",
"Color Exchange",
@ -136,7 +135,7 @@ query (void)
N_("<Image>/Filters/Colors/Map/Color Exchange..."),
"RGB*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -236,13 +236,11 @@ query (void)
{ GIMP_PDB_INT32, "num_images", "Number of images to be used for film" },
{ GIMP_PDB_INT32ARRAY, "image_ids", "num_images image IDs to be used for film"}
};
static gint nargs = sizeof (args) / sizeof (args[0]);
static GimpParamDef return_vals[] =
{
{ GIMP_PDB_IMAGE, "new_image", "Output image" }
};
static gint nreturn_vals = sizeof (return_vals) / sizeof (return_vals[0]);
gimp_install_procedure ("plug_in_film",
"Compose several images to a roll film",
@ -253,7 +251,8 @@ query (void)
N_("<Image>/Filters/Combine/Film..."),
"INDEXED*, GRAY*, RGB*",
GIMP_PLUGIN,
nargs, nreturn_vals,
G_N_ELEMENTS (args),
G_N_ELEMENTS (return_vals),
args, return_vals);
}
@ -1534,11 +1533,9 @@ static void
film_reset_callback (GtkWidget *widget,
gpointer data)
{
gint i, num;
gint i;
num = sizeof (advanced_defaults) / sizeof (advanced_defaults[0]);
for (i = 0; i < num; i++)
for (i = 0; i < G_N_ELEMENTS (advanced_defaults) ; i++)
gtk_adjustment_set_value (GTK_ADJUSTMENT (filmint.advanced_adj[i]),
advanced_defaults[i]);
}

View File

@ -207,7 +207,6 @@ query (void)
{ GIMP_PDB_INT32, "posx", "X-position" },
{ GIMP_PDB_INT32, "posy", "Y-position" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure ("plug_in_flarefx",
"Add lens flare effects",
@ -220,7 +219,7 @@ query (void)
N_("<Image>/Filters/Light Effects/FlareFX..."),
"RGB*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -115,7 +115,6 @@ query (void)
{ GIMP_PDB_INT32, "outside_type", "outside type"
"(0=WRAP/1=TRANS/2=BLACK/3=WHITE)" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure (PLUG_IN_NAME,
"transform image with the Mandelbrot Fractal",
@ -126,7 +125,7 @@ query (void)
N_("<Image>/Filters/Map/Fractal Trace..."),
"RGB*, GRAY*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -130,7 +130,6 @@ query (void)
{ GIMP_PDB_INT32, "horizontal", "Blur in horizontal direction" },
{ GIMP_PDB_INT32, "vertical", "Blur in vertical direction" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
static GimpParamDef args2[] =
{
@ -140,7 +139,6 @@ query (void)
{ GIMP_PDB_FLOAT, "horizontal", "Horizontal radius of gaussian blur (in pixels)" },
{ GIMP_PDB_FLOAT, "vertical", "Vertical radius of gaussian blur (in pixels)" }
};
static gint nargs2 = sizeof (args2) / sizeof (args2[0]);
gimp_install_procedure ("plug_in_gauss_iir",
"Applies a gaussian blur to the specified drawable.",
@ -161,7 +159,7 @@ query (void)
NULL,
"RGB*, GRAY*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
gimp_install_procedure ("plug_in_gauss_iir2",
@ -184,7 +182,7 @@ query (void)
N_("<Image>/Filters/Blur/Gaussian Blur (IIR)..."),
"RGB*, GRAY*",
GIMP_PLUGIN,
nargs2, 0,
G_N_ELEMENTS (args2), 0,
args2, NULL);
}

View File

@ -124,7 +124,6 @@ query (void)
{ GIMP_PDB_INT32, "horizontal", "Blur in horizontal direction" },
{ GIMP_PDB_INT32, "vertical", "Blur in vertical direction" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
static GimpParamDef args2[] =
{
@ -134,7 +133,6 @@ query (void)
{ GIMP_PDB_FLOAT, "horizontal", "Horizontal radius of gaussian blur (in pixels)" },
{ GIMP_PDB_FLOAT, "vertical", "Vertical radius of gaussian blur (in pixels)" }
};
static gint nargs2 = sizeof (args2) / sizeof (args2[0]);
gimp_install_procedure ("plug_in_gauss_rle",
"Applies a gaussian blur to the specified drawable.",
@ -155,7 +153,7 @@ query (void)
NULL,
"RGB*, GRAY*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
gimp_install_procedure ("plug_in_gauss_rle2",
@ -179,7 +177,7 @@ query (void)
N_("<Image>/Filters/Blur/Gaussian Blur (RLE)..."),
"RGB*, GRAY*",
GIMP_PLUGIN,
nargs2, 0,
G_N_ELEMENTS (args2), 0,
args2, NULL);
}

View File

@ -113,9 +113,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[] =
{
@ -127,7 +124,6 @@ query (void)
{ GIMP_PDB_INT32, "spacing", "Spacing of the brush" },
{ GIMP_PDB_STRING, "description", "Short description of the brush" }
};
static gint nsave_args = sizeof (save_args) / sizeof (save_args[0]);
gimp_install_procedure ("file_gbr_load",
"Loads GIMP brushes (1 or 4 bpp and old .gpb format)",
@ -138,7 +134,8 @@ query (void)
"<Load>/GBR",
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_gbr_save",
@ -150,7 +147,7 @@ query (void)
"<Save>/GBR",
"RGBA, GRAY",
GIMP_PLUGIN,
nsave_args, 0,
G_N_ELEMENTS (save_args), 0,
save_args, NULL);
gimp_register_magic_load_handler ("file_gbr_load",

View File

@ -98,7 +98,6 @@ query (void)
{ GIMP_PDB_IMAGE, "image", "Input Image" },
{ GIMP_PDB_DRAWABLE, "drawable", "Input Drawable" },
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure("plug_in_the_slimy_egg",
"A big hello from the GIMP team!",
@ -113,7 +112,7 @@ query (void)
#endif
"RGB*, INDEXED*, GRAY*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -128,7 +128,6 @@ query (void)
{ GIMP_PDB_IMAGE, "image", "Input Image" },
{ GIMP_PDB_DRAWABLE, "drawable", "Input Drawable" },
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure("plug_in_the_old_egg",
"A big hello from the GIMP team!",
@ -139,7 +138,7 @@ query (void)
N_("<Image>/Filters/Toys/Gee-Zoom"),
"RGB*, INDEXED*, GRAY*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -105,9 +105,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[] =
{
@ -118,7 +115,6 @@ query (void)
{ GIMP_PDB_STRING, "raw_filename", "The name of the file to save the image in" },
{ GIMP_PDB_STRING, "icon_name", "The name of the icon" }
};
static gint nsave_args = sizeof (save_args) / sizeof (save_args[0]);
gimp_install_procedure ("file_gicon_load",
"loads files of the .ico file format",
@ -129,7 +125,8 @@ query (void)
"<Load>/GIcon",
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_gicon_save",
@ -141,7 +138,7 @@ query (void)
"<Save>/GIcon",
"GRAY*",
GIMP_PLUGIN,
nsave_args, 0,
G_N_ELEMENTS (save_args), 0,
save_args, NULL);
gimp_register_magic_load_handler ("file_gicon_load",

View File

@ -389,7 +389,6 @@ query (void)
{ GIMP_PDB_INT32, "default_delay", "(animated gif) Default delay between framese in milliseconds" },
{ GIMP_PDB_INT32, "default_dispose", "(animated gif) Default disposal type (0=`don't care`, 1=combine, 2=replace)" }
};
static gint nsave_args = sizeof (save_args) / sizeof (save_args[0]);
gimp_install_procedure ("file_gif_save",
"saves files in Compuserve GIF file format",
@ -406,7 +405,7 @@ query (void)
"<Save>/GIF",
"INDEXED*, GRAY*",
GIMP_PLUGIN,
nsave_args, 0,
G_N_ELEMENTS (save_args), 0,
save_args, NULL);
gimp_register_save_handler ("file_gif_save",

View File

@ -135,9 +135,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]));
gimp_install_procedure ("file_gif_load",
"loads files of Compuserve GIF file format",
@ -148,7 +145,8 @@ query (void)
"<Load>/GIF",
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_register_magic_load_handler ("file_gif_load",

View File

@ -173,9 +173,6 @@ query (void)
{ GIMP_PDB_INT32, "dimension", "Dimension (again)" },
{ GIMP_PDB_STRINGARRAY, "sel", "Selection modes" }
};
static const gint ngih_save_args = (sizeof (gih_save_args) /
sizeof (gih_save_args[0]));
static GimpParamDef gih_load_args[] =
{
@ -187,9 +184,6 @@ query (void)
{
{ GIMP_PDB_IMAGE, "image", "Output image" }
};
static gint ngih_load_args = sizeof (gih_load_args) / sizeof (gih_load_args[0]);
static gint ngih_load_return_vals = (sizeof (gih_load_return_vals) /
sizeof (gih_load_return_vals[0]));
gimp_install_procedure ("file_gih_save",
"saves images in GIMP brush pipe format",
@ -200,7 +194,7 @@ query (void)
"<Save>/GIH",
"RGBA, GRAYA",
GIMP_PLUGIN,
ngih_save_args, 0,
G_N_ELEMENTS (gih_save_args), 0,
gih_save_args, NULL);
gimp_install_procedure ("file_gih_load",
@ -212,7 +206,8 @@ query (void)
"<Load>/GIH",
NULL,
GIMP_PLUGIN,
ngih_load_args, ngih_load_return_vals,
G_N_ELEMENTS (gih_load_args),
G_N_ELEMENTS (gih_load_return_vals),
gih_load_args, gih_load_return_vals);
gimp_register_save_handler ("file_gih_save",

View File

@ -127,7 +127,6 @@ query (void)
{ GIMP_PDB_INT32, "tilex", "Tile width (10 - 50)" },
{ GIMP_PDB_INT32, "tiley", "Tile height (10 - 50)" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure ("plug_in_glasstile",
"Divide the image into square glassblocks",
@ -138,7 +137,7 @@ query (void)
N_("<Image>/Filters/Glass Effects/Glass Tile..."),
"RGB*, GRAY*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -412,7 +412,6 @@ query (void)
{ GIMP_PDB_IMAGE, "image", "Input image (unused)" },
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" }
};
gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure (PLUG_IN_NAME,
"Create images based on a random genetic formula",
@ -423,7 +422,7 @@ query (void)
N_("<Image>/Filters/Render/Pattern/Qbist..."),
"RGB*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -98,7 +98,6 @@ query()
{ GIMP_PDB_IMAGE, "image", "Input image (unused)" },
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure ("plug_in_gradmap",
"Map the contents of the specified drawable with "
@ -118,7 +117,7 @@ query()
N_("<Image>/Filters/Colors/Map/Gradient Map"),
"RGB*, GRAY*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -148,7 +148,6 @@ void query (void)
{ GIMP_PDB_COLOR, "icolor", "Intersection Colour" },
{ GIMP_PDB_INT8, "iopacity", "Intersection Opacity (0...255)" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure ("plug_in_grid",
"Draws a grid.",
@ -160,7 +159,7 @@ void query (void)
N_("<Image>/Filters/Render/Pattern/Grid..."),
"RGB*, GRAY*, INDEXED*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -156,7 +156,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_GTM_save",
"GIMP Table Magic",
@ -167,7 +166,7 @@ query (void)
"<Save>/HTML",
"RGB*, GRAY*",
GIMP_PLUGIN,
nsave_args, 0,
G_N_ELEMENTS (save_args), 0,
save_args, NULL);
gimp_register_save_handler ("file_GTM_save",

View File

@ -67,7 +67,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_guillotine",
"Slice up the image into subimages, cutting along "
@ -80,7 +79,7 @@ query (void)
N_("<Image>/Image/Transform/Guillotine"),
"RGB*, INDEXED*, GRAY*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}
@ -180,8 +179,8 @@ guillotine (gint32 image_ID)
/* Allocate memory for the arrays of guide offsets, build arrays */
vguides = g_malloc ((num_vguides+2) * sizeof (gint));
hguides = g_malloc ((num_hguides+2) * sizeof (gint));
vguides = g_new (gint, num_vguides+2);
hguides = g_new (gint, num_hguides+2);
num_vguides = 0;
num_hguides = 0;
vguides[num_vguides++] = 0;

View File

@ -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",

View File

@ -65,7 +65,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_header_save",
"saves files as C unsigned character array",
@ -76,7 +75,7 @@ query (void)
"<Save>/Header",
"INDEXED, RGB",
GIMP_PLUGIN,
nsave_args, 0,
G_N_ELEMENTS (save_args), 0,
save_args, NULL);
gimp_register_save_handler ("file_header_save",

View File

@ -218,7 +218,6 @@ query (void)
{ GIMP_PDB_INT32, "action", "The action to perform" },
{ GIMP_PDB_INT32, "new_layerp", "Create a new layer iff True" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure ("plug_in_hot",
"Look for hot NTSC or PAL pixels ",
@ -234,7 +233,7 @@ query (void)
N_("<Image>/Filters/Colors/Hot..."),
"RGB",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -131,9 +131,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[] =
{
@ -143,7 +140,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_hrz_load",
"loads files of the hrz file format",
@ -154,7 +150,8 @@ query (void)
"<Load>/HRZ",
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_hrz_save",
@ -166,7 +163,7 @@ query (void)
"<Save>/HRZ",
"RGB, GRAY",
GIMP_PLUGIN,
nsave_args, 0,
G_N_ELEMENTS (save_args), 0,
save_args, NULL);
gimp_register_magic_load_handler ("file_hrz_load",

View File

@ -107,7 +107,6 @@ query (void)
{ GIMP_PDB_INT32, "division", "the number of divisions" },
{ GIMP_PDB_INT32, "type", "illusion type (0=type1, 1=type2)" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure (PLUG_IN_NAME,
"produce illusion",
@ -118,7 +117,7 @@ query (void)
N_("<Image>/Filters/Map/Illusion..."),
"RGB*, GRAY*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -244,7 +244,6 @@ query (void)
{ GIMP_PDB_IMAGE, "image", "Input image (unused)" },
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure ("plug_in_iwarp",
"Interactive warping of the specified drawable",
@ -255,7 +254,7 @@ query (void)
N_("<Image>/Filters/Distorts/IWarp..."),
"RGB*, GRAY*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -383,7 +383,6 @@ query (void)
{ GIMP_PDB_INT32, "blend_lines", "Number of lines for shading bevels >= 0" },
{ GIMP_PDB_FLOAT, "blend_amount", "The power of the light highlights 0 =< 5" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure ("plug_in_jigsaw",
"Renders a jigsaw puzzle look",
@ -394,7 +393,7 @@ query (void)
N_("<Image>/Filters/Render/Pattern/Jigsaw..."),
"RGB*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}
@ -2311,8 +2310,8 @@ draw_bezier_horizontal_border (guchar *buffer,
style_t style_index;
gint *cachex, *cachey;
cachex = g_malloc(steps * sizeof(gint));
cachey = g_malloc(steps * sizeof(gint));
cachex = g_new (gint, steps);
cachey = g_new (gint, steps);
for (i = 0; i < xtiles; i++)
{

View File

@ -295,9 +295,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[] =
{
@ -316,7 +313,6 @@ query (void)
{ GIMP_PDB_INT32, "restart", "Frequency of restart markers (in rows, 0 = no restart markers)" },
{ GIMP_PDB_INT32, "dct", "DCT algorithm to use (speed/quality tradeoff)" }
};
static gint nsave_args = sizeof (save_args) / sizeof (save_args[0]);
gimp_install_procedure ("file_jpeg_load",
"loads files in the JPEG file format",
@ -327,7 +323,8 @@ query (void)
"<Load>/Jpeg",
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_jpeg_save",
@ -339,7 +336,7 @@ query (void)
"<Save>/JPEG",
"RGB*, GRAY*",
GIMP_PLUGIN,
nsave_args, 0,
G_N_ELEMENTS (save_args), 0,
save_args, NULL);
gimp_register_magic_load_handler ("file_jpeg_load",

View File

@ -75,7 +75,6 @@ query (void)
{ GIMP_PDB_IMAGE, "image", "Input image (unused)" },
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure ("plug_in_laplace",
"Edge Detection with Laplace Operation",
@ -91,7 +90,7 @@ query (void)
N_("<Image>/Filters/Edge-Detect/Laplace"),
"RGB*, GRAY*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -1209,7 +1209,6 @@ query (void)
{ GIMP_PDB_IMAGE, "image", "Input image" },
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure ("plug_in_lic",
"Creates a Van Gogh effect (Line Integral Convolution)",
@ -1220,7 +1219,7 @@ query (void)
N_("<Image>/Filters/Map/Van Gogh (LIC)..."),
"RGB",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -209,7 +209,6 @@ query (void)
{ GIMP_PDB_STRING, "comment", "The Comment" },
{ GIMP_PDB_INT32, "encapsulation", "Uuencode, MIME" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure ("plug_in_mail_image",
"pipe files to uuencode then mail them",
@ -220,7 +219,7 @@ query (void)
N_("<Image>/File/Mail Image..."),
"RGB*, GRAY*, INDEXED*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -152,12 +152,11 @@ static PLInterface plinterface;
static IMG_PREVIEW *
img_preview_alloc (guint width,
guint height)
{
IMG_PREVIEW *ip;
ip = (IMG_PREVIEW *)g_malloc (sizeof (IMG_PREVIEW));
ip->img = (guchar *)g_malloc (width*height*3);
ip = g_new (IMG_PREVIEW, 1);
ip->img = g_new (guchar, width*height*3);
if (ip->img == NULL)
{
g_free (ip);
@ -173,7 +172,6 @@ img_preview_alloc (guint width,
/* Free image preview */
static void
img_preview_free (IMG_PREVIEW *ip)
{
if (ip)
{
@ -325,7 +323,6 @@ query (void)
{ GIMP_PDB_IMAGE, "image", "Input image (not used)" },
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable to adjust" }
};
static gint nadjust_args = sizeof (adjust_args) / sizeof (adjust_args[0]);
static GimpParamDef map_args[] =
{
@ -338,7 +335,6 @@ query (void)
{ GIMP_PDB_COLOR, "dstcolor_2", "Second destination color" },
{ GIMP_PDB_INT32, "map_mode", "Mapping mode (0: linear, others reserved)" }
};
static gint nmap_args = sizeof (map_args) / sizeof (map_args[0]);
gimp_install_procedure ("plug_in_color_adjust",
"Adjust color range given by foreground/background "
@ -353,7 +349,7 @@ query (void)
N_("<Image>/Filters/Colors/Map/Adjust FG-BG"),
"RGB*",
GIMP_PLUGIN,
nadjust_args, 0,
G_N_ELEMENTS (adjust_args), 0,
adjust_args, NULL);
gimp_install_procedure ("plug_in_color_map",
@ -368,7 +364,7 @@ query (void)
N_("<Image>/Filters/Colors/Map/Color Range Mapping..."),
"RGB*",
GIMP_PLUGIN,
nmap_args, 0,
G_N_ELEMENTS (map_args), 0,
map_args, NULL);
}

View File

@ -115,7 +115,6 @@ query (void)
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable"},
{ GIMP_PDB_INT32, "max_p", "1 for maximizing, 0 for minimizing"}
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure (PLUG_IN_NAME,
"Return an image in which each pixel holds only "
@ -129,7 +128,7 @@ query (void)
N_("<Image>/Filters/Colors/Max RGB..."),
"RGB*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -152,7 +152,6 @@ query (void)
{ GIMP_PDB_INT32, "length", "Length" },
{ GIMP_PDB_INT32, "angle", "Angle" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure (PLUG_IN_NAME,
"Motion blur of image",
@ -165,7 +164,7 @@ query (void)
N_("<Image>/Filters/Blur/Motion Blur..."),
"RGB*, GRAY*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -313,8 +313,6 @@ query (void)
{ GIMP_PDB_INT32, "grout_color", "Grout color (black/white or fore/background): { BW (0), FG_BG (1) }" }
};
static GimpParamDef *return_vals = NULL;
static int nargs = sizeof (args) / sizeof (args[0]);
static int nreturn_vals = 0;
INIT_I18N();
@ -328,7 +326,7 @@ query (void)
N_("<Image>/Filters/Render/Pattern/Mosaic..."),
"RGB*, GRAY*",
GIMP_PLUGIN,
nargs, nreturn_vals,
G_N_ELEMENTS (args), nreturn_vals,
args, return_vals);
}

View File

@ -119,9 +119,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]));
gimp_install_procedure ("file_mpeg_load",
"Loads MPEG movies",
@ -132,7 +129,8 @@ query (void)
"<Load>/MPEG",
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_register_magic_load_handler ("file_mpeg_load",

View File

@ -556,7 +556,6 @@ query (void)
{ GIMP_PDB_INT32, "oversample", "how many times to oversample spot fn" }
/* 15 args */
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure ("plug_in_newsprint",
"Re-sample the image to give a newspaper-like effect",
@ -571,7 +570,7 @@ query (void)
N_("<Image>/Filters/Distorts/Newsprint..."),
"RGB*, GRAY*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -148,7 +148,6 @@ query (void)
{ GIMP_PDB_FLOAT, "radius", "The filter radius" },
{ GIMP_PDB_INT32, "filter", "The Filter to Run, 0 - alpha trimmed mean; 1 - optimal estimation (alpha controls noise variance); 2 - edge enhancement" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure ("plug_in_nlfilt",
"Nonlinear swiss army knife filter",
@ -159,7 +158,7 @@ query (void)
N_("<Image>/Filters/Enhance/NL Filter..."),
"RGB,GRAY",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -130,7 +130,6 @@ query (void)
{ GIMP_PDB_FLOAT, "noise_3", "Noise in the third channel (blue)" },
{ GIMP_PDB_FLOAT, "noise_4", "Noise in the fourth channel (alpha)" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure ("plug_in_noisify",
"Adds random noise to a drawable's channels",
@ -141,7 +140,7 @@ query (void)
N_("<Image>/Filters/Noise/Noisify..."),
"RGB*, GRAY*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -212,7 +212,6 @@ query (void)
{ GIMP_PDB_INT32, "nspoke", "Number of spokes" },
{ GIMP_PDB_INT32, "randomhue", "Random hue" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure ("plug_in_nova",
"Produce Supernova effect to the specified drawable",
@ -229,7 +228,7 @@ query (void)
N_("<Image>/Filters/Light Effects/SuperNova..."),
"RGB*, GRAY*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -105,7 +105,6 @@ query (void)
{ GIMP_PDB_INT32, "mask_size", "Oil paint mask size" },
{ GIMP_PDB_INT32, "mode", "Algorithm {RGB (0), INTENSITY (1)}" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure ("plug_in_oilify",
"Modify the specified drawable to resemble an oil "
@ -119,7 +118,7 @@ query (void)
N_("<Image>/Filters/Artistic/Oilify..."),
"RGB*, GRAY*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -834,7 +834,6 @@ plugin_query (void)
{ GIMP_PDB_INT32, "background_color", "background color (for bg-type 5)" },
{ GIMP_PDB_INT32, "background_alpha", "opacity (for bg-type 5)" }
};
static gint numof_args = sizeof args / sizeof args[0];
gimp_install_procedure (PLUGIN_PROCEDURE_NAME,
"Cuts an image into paper tiles, and slides each paper tile.",
@ -845,7 +844,7 @@ plugin_query (void)
N_("<Image>/Filters/Map/Paper Tile..."),
"RGB*",
GIMP_PLUGIN,
numof_args, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -87,9 +87,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[] =
{
@ -100,7 +97,6 @@ query (void)
{ GIMP_PDB_STRING, "raw_filename", "The name of the file to save the image in" },
{ GIMP_PDB_STRING, "description", "Short description of the pattern" },
};
static gint nsave_args = sizeof (save_args) / sizeof (save_args[0]);
gimp_install_procedure ("file_pat_load",
"Loads Gimp's .PAT pattern files",
@ -112,7 +108,8 @@ query (void)
"<Load>/PAT",
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_pat_save",
@ -125,7 +122,7 @@ query (void)
"<Save>/PAT",
"RGB, GRAY",
GIMP_PLUGIN,
nsave_args, 0,
G_N_ELEMENTS (save_args), 0,
save_args, NULL);
gimp_register_magic_load_handler ("file_pat_load",

View File

@ -76,9 +76,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[] =
{
@ -88,7 +85,6 @@ 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]);
gimp_install_procedure ("file_pcx_load",
"Loads files in Zsoft PCX file format",
@ -99,7 +95,8 @@ query (void)
"<Load>/PCX",
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_pcx_save",
@ -111,7 +108,7 @@ query (void)
"<Save>/PCX",
"INDEXED, RGB, GRAY",
GIMP_PLUGIN,
nsave_args, 0,
G_N_ELEMENTS (save_args), 0,
save_args, NULL);
gimp_register_magic_load_handler ("file_pcx_load",

View File

@ -121,9 +121,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[] =
{
@ -133,7 +130,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_pix_load",
"loads files of the PIX file format",
@ -144,7 +140,8 @@ query (void)
"<Load>/PIX",
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_pix_save",
@ -156,7 +153,7 @@ query (void)
"<Save>/PIX",
"RGB*, GRAY*",
GIMP_PLUGIN,
nsave_args, 0,
G_N_ELEMENTS (save_args), 0,
save_args, NULL);
gimp_register_load_handler ("file_pix_load",

View File

@ -177,7 +177,6 @@ query (void)
{ GIMP_PDB_INT32, "seed", "Random seed" },
{ GIMP_PDB_FLOAT, "turbulence", "Turbulence of plasma" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure ("plug_in_plasma",
"Create a plasma cloud like image to the specified drawable",
@ -190,7 +189,7 @@ query (void)
N_("<Image>/Filters/Render/Clouds/Plasma..."),
"RGB*, GRAY*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -88,7 +88,6 @@ query (void)
{
{ GIMP_PDB_INT32, "run_mode", "Interactive, [non-interactive]" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure ("plug_in_details",
"Displays plugin details",
@ -104,7 +103,7 @@ query (void)
N_("<Toolbox>/Xtns/Plugin Details..."),
"",
GIMP_EXTENSION,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -88,7 +88,6 @@ query (void)
{
{ GIMP_PDB_INT32, "run_mode", "Interactive, [non-interactive]" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure ("plug_in_details",
"Displays plugin details",
@ -104,7 +103,7 @@ query (void)
N_("<Toolbox>/Xtns/Plugin Details..."),
"",
GIMP_EXTENSION,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -151,9 +151,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[] =
{
@ -170,7 +167,6 @@ query (void)
{ GIMP_PDB_INT32, "phys", "Write tIME chunk?" },
{ GIMP_PDB_INT32, "time", "Write pHYs chunk?" }
};
static gint nsave_args = sizeof (save_args) / sizeof (save_args[0]);
gimp_install_procedure ("file_png_load",
"Loads files in PNG file format",
@ -181,7 +177,8 @@ query (void)
"<Load>/PNG",
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_png_save",
@ -193,7 +190,7 @@ query (void)
"<Save>/PNG",
"RGB*,GRAY*,INDEXED*",
GIMP_PLUGIN,
nsave_args, 0,
G_N_ELEMENTS (save_args), 0,
save_args, NULL);
gimp_register_magic_load_handler ("file_png_load",

View File

@ -220,9 +220,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[] =
{
@ -233,7 +230,6 @@ query (void)
{ GIMP_PDB_STRING, "raw_filename", "The name of the file to save the image in" },
{ GIMP_PDB_INT32, "raw", "Specify non-zero for raw output, zero for ascii output" }
};
static gint nsave_args = sizeof (save_args) / sizeof (save_args[0]);
gimp_install_procedure ("file_pnm_load",
"loads files of the pnm file format",
@ -244,7 +240,8 @@ query (void)
"<Load>/PNM",
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_pnm_save",
@ -256,7 +253,7 @@ query (void)
"<Save>/PNM",
"RGB, GRAY, INDEXED",
GIMP_PLUGIN,
nsave_args, 0,
G_N_ELEMENTS (save_args), 0,
save_args, NULL);
gimp_register_magic_load_handler ("file_pnm_load",
@ -422,7 +419,7 @@ load_image (gchar *filename)
}
/* allocate the necessary structures */
pnminfo = (PNMInfo *) g_malloc (sizeof (PNMInfo));
pnminfo = g_new (PNMInfo, 1);
scan = NULL;
/* set error handling */
@ -647,7 +644,7 @@ pnm_load_rawpbm (PNMScanner *scan,
fd = pnmscanner_fd(scan);
rowlen = (int)ceil((double)(info->xres)/8.0);
data = g_malloc (gimp_tile_height () * info->xres);
buf = g_malloc(rowlen*sizeof(unsigned char));
buf = g_new (unsigned char, rowlen);
for (y = 0; y < info->yres; )
{
@ -980,7 +977,7 @@ pnmscanner_create (gint fd)
{
PNMScanner *s;
s = (PNMScanner *)g_malloc(sizeof(PNMScanner));
s = g_new (PNMScanner, 1);
s->fd = fd;
s->inbuf = 0;
s->eof = !read(s->fd, &(s->cur), 1);
@ -1004,7 +1001,7 @@ static void
pnmscanner_createbuffer (PNMScanner *s,
gint bufsize)
{
s->inbuf = g_malloc(sizeof(char)*bufsize);
s->inbuf = g_new (char, bufsize);
s->inbufsize = bufsize;
s->inbufpos = 0;
s->inbufvalidsize = read(s->fd, s->inbuf, bufsize);

View File

@ -203,7 +203,6 @@ query (void)
{ GIMP_PDB_INT32, "inverse", "Map from top?" },
{ GIMP_PDB_INT32, "polrec", "Polar to rectangular?" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure (PLUG_IN_NAME,
"Converts and image to and from polar coords",
@ -215,7 +214,7 @@ query (void)
N_("<Image>/Filters/Distorts/Polar Coords..."),
"RGB*, GRAY*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -515,9 +515,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 set_load_args[] =
{
@ -530,8 +527,6 @@ query (void)
{ GIMP_PDB_INT32, "TextAlphaBits", "1, 2, or 4" },
{ GIMP_PDB_INT32, "GraphicsAlphaBits", "1, 2, or 4" }
};
static gint nset_load_args = (sizeof (set_load_args) /
sizeof (set_load_args[0]));
static GimpParamDef save_args[] =
{
@ -552,7 +547,6 @@ query (void)
{ GIMP_PDB_INT32, "preview", "0: no preview, >0: max. size of preview" },
{ GIMP_PDB_INT32, "level", "1: PostScript Level 1, 2: PostScript Level 2" }
};
static gint nsave_args = sizeof (save_args) / sizeof (save_args[0]);
gimp_install_procedure ("file_ps_load",
"load file of PostScript/PDF file format",
@ -563,7 +557,8 @@ query (void)
"<Load>/PostScript",
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_ps_load_setargs",
@ -575,7 +570,7 @@ query (void)
NULL,
NULL,
GIMP_PLUGIN,
nset_load_args, 0,
G_N_ELEMENTS (set_load_args), 0,
set_load_args, NULL);
gimp_install_procedure ("file_ps_save",
@ -587,7 +582,7 @@ query (void)
"<Save>/PostScript",
"RGB, GRAY, INDEXED",
GIMP_PLUGIN,
nsave_args, 0,
G_N_ELEMENTS (save_args), 0,
save_args, NULL);
gimp_register_magic_load_handler ("file_ps_load",
@ -886,7 +881,7 @@ load_image (gchar *filename)
return (-1);
}
image_list = (gint32 *)g_malloc (10 * sizeof (gint32));
image_list = g_new (gint32, 10);
n_images = 0;
max_images = 10;
@ -1919,7 +1914,7 @@ dither_grey (guchar *grey,
{
if (fs_error) g_free (fs_error-1);
if (linecount < 0) return;
fs_error = (int *)g_malloc ((npix+2)*sizeof (int));
fs_error = g_new (int, npix+2);
memset ((char *)fs_error, 0, (npix+2)*sizeof (int));
fs_error++;
@ -2808,7 +2803,7 @@ save_dialog (void)
FALSE, FALSE, 0);
main_vbox[0] = main_vbox[1] = NULL;
for (j = 0; j < sizeof (main_vbox) / sizeof (main_vbox[0]); j++)
for (j = 0; j < G_N_ELEMENTS (main_vbox); j++)
{
main_vbox[j] = gtk_vbox_new (FALSE, 4);
gtk_box_pack_start (GTK_BOX (hbox), main_vbox[j], TRUE, TRUE, 0);
@ -2961,7 +2956,7 @@ save_dialog (void)
gtk_widget_show (vbox);
gtk_widget_show (frame);
for (j = 0; j < sizeof (main_vbox) / sizeof (main_vbox[0]); j++)
for (j = 0; j < G_N_ELEMENTS (main_vbox); j++)
gtk_widget_show (main_vbox[j]);
gtk_widget_show (hbox);

View File

@ -79,7 +79,6 @@ query (void)
{
{ GIMP_PDB_INT32, "run_mode", "Interactive, [non-interactive]" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure ("extension_db_browser",
"List available procedures in the PDB",
@ -90,7 +89,7 @@ query (void)
N_("<Toolbox>/Xtns/DB Browser..."),
"",
GIMP_EXTENSION,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -515,9 +515,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 set_load_args[] =
{
@ -530,8 +527,6 @@ query (void)
{ GIMP_PDB_INT32, "TextAlphaBits", "1, 2, or 4" },
{ GIMP_PDB_INT32, "GraphicsAlphaBits", "1, 2, or 4" }
};
static gint nset_load_args = (sizeof (set_load_args) /
sizeof (set_load_args[0]));
static GimpParamDef save_args[] =
{
@ -552,7 +547,6 @@ query (void)
{ GIMP_PDB_INT32, "preview", "0: no preview, >0: max. size of preview" },
{ GIMP_PDB_INT32, "level", "1: PostScript Level 1, 2: PostScript Level 2" }
};
static gint nsave_args = sizeof (save_args) / sizeof (save_args[0]);
gimp_install_procedure ("file_ps_load",
"load file of PostScript/PDF file format",
@ -563,7 +557,8 @@ query (void)
"<Load>/PostScript",
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_ps_load_setargs",
@ -575,7 +570,7 @@ query (void)
NULL,
NULL,
GIMP_PLUGIN,
nset_load_args, 0,
G_N_ELEMENTS (set_load_args), 0,
set_load_args, NULL);
gimp_install_procedure ("file_ps_save",
@ -587,7 +582,7 @@ query (void)
"<Save>/PostScript",
"RGB, GRAY, INDEXED",
GIMP_PLUGIN,
nsave_args, 0,
G_N_ELEMENTS (save_args), 0,
save_args, NULL);
gimp_register_magic_load_handler ("file_ps_load",
@ -886,7 +881,7 @@ load_image (gchar *filename)
return (-1);
}
image_list = (gint32 *)g_malloc (10 * sizeof (gint32));
image_list = g_new (gint32, 10);
n_images = 0;
max_images = 10;
@ -1919,7 +1914,7 @@ dither_grey (guchar *grey,
{
if (fs_error) g_free (fs_error-1);
if (linecount < 0) return;
fs_error = (int *)g_malloc ((npix+2)*sizeof (int));
fs_error = g_new (int, npix+2);
memset ((char *)fs_error, 0, (npix+2)*sizeof (int));
fs_error++;
@ -2808,7 +2803,7 @@ save_dialog (void)
FALSE, FALSE, 0);
main_vbox[0] = main_vbox[1] = NULL;
for (j = 0; j < sizeof (main_vbox) / sizeof (main_vbox[0]); j++)
for (j = 0; j < G_N_ELEMENTS (main_vbox); j++)
{
main_vbox[j] = gtk_vbox_new (FALSE, 4);
gtk_box_pack_start (GTK_BOX (hbox), main_vbox[j], TRUE, TRUE, 0);
@ -2961,7 +2956,7 @@ save_dialog (void)
gtk_widget_show (vbox);
gtk_widget_show (frame);
for (j = 0; j < sizeof (main_vbox) / sizeof (main_vbox[0]); j++)
for (j = 0; j < G_N_ELEMENTS (main_vbox); j++)
gtk_widget_show (main_vbox[j]);
gtk_widget_show (hbox);

View File

@ -394,9 +394,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]));
gimp_install_procedure ("file_psd_load",
"loads files of the Photoshop(tm) PSD file format",
@ -407,7 +404,8 @@ query (void)
"<Load>/PSD",
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_register_magic_load_handler ("file_psd_load",

View File

@ -346,9 +346,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[] = */
/* { */
@ -374,7 +371,8 @@ query (void)
"<Load>/PSP",
NULL,
GIMP_PLUGIN,
nload_args, nload_return_vals,
G_N_ELEMENTS (load_args),
G_N_ELEMENTS (load_return_vals),
load_args, load_return_vals);
/* Removed until Saving is implemented -- njl195@zepler.org

View File

@ -211,7 +211,6 @@ query (void)
{ GIMP_PDB_INT32, "seed_type", "Seed type (10 = current time, 11 = seed value)" },
{ GIMP_PDB_INT32, "rndm_seed", "Seed value (used only if seed type is 11)" }
};
static gint nargs = sizeof(args) / sizeof (args[0]);
const gchar *hurl_blurb =
"Add a random factor to the image by hurling random data at it.";
@ -240,7 +239,7 @@ query (void)
N_("<Image>/Filters/Noise/Hurl..."),
"RGB*, GRAY*, INDEXED*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
gimp_install_procedure (PLUG_IN_NAME[1],
@ -252,7 +251,7 @@ query (void)
N_("<Image>/Filters/Noise/Pick..."),
"RGB*, GRAY*, INDEXED*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
gimp_install_procedure (PLUG_IN_NAME[2],
@ -264,7 +263,7 @@ query (void)
N_("<Image>/Filters/Noise/Slur..."),
"RGB*, GRAY*, INDEXED*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -145,7 +145,6 @@ query (void)
{ GIMP_PDB_INT32, "antialias", "antialias; True or False" },
{ GIMP_PDB_INT32, "tile", "tile; if this is true, the image will retain it's tilability" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure ("plug_in_ripple",
"Ripple the contents of the specified drawable",
@ -156,7 +155,7 @@ query (void)
N_("<Image>/Filters/Distorts/Ripple..."),
"RGB*, GRAY*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -261,7 +261,6 @@ query (void)
{ GIMP_PDB_INT32, "out_low", "lowest sample color intensity (0 <= out_low <= 254)" },
{ GIMP_PDB_INT32, "out_high", "highest sample color intensity (1 <= out_high <= 255)" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
static gchar *help_string =
"This plug-in colorizes the contents of the specified (gray) layer"
@ -306,7 +305,7 @@ query (void)
N_("<Image>/Filters/Colors/Map/Sample Colorize..."),
"RGB*, GRAY*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -132,7 +132,6 @@ query (void)
{ GIMP_PDB_INT32, "saturation_distance", "distribution distance on saturation axis [0,255]"},
{ GIMP_PDB_INT32, "value_distance", "distribution distance on value axis [0,255]"}
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure (PLUG_IN_NAME,
"Scattering pixel values in HSV space",
@ -143,7 +142,7 @@ query (void)
N_("<Image>/Filters/Noise/Scatter HSV..."),
"RGB*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}
@ -572,8 +571,7 @@ scatter_hsv_preview_update (void)
src_bpl = preview_width * src_bpp;
if (! preview_buffer)
preview_buffer
= (guchar *) g_malloc (src_bpl * preview_height * sizeof (guchar));
preview_buffer = g_new (guchar, src_bpl * preview_height);
if (preview_offset_x < 0)
preview_offset_x = (bound_end_x - bound_start_x) * (- preview_offset_x) / preview_width;

View File

@ -113,13 +113,11 @@ query (void)
{ GIMP_PDB_INT32, "root", "Root window { TRUE, FALSE }" },
{ GIMP_PDB_STRING, "window_id", "Window id" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
static GimpParamDef return_vals[] =
{
{ GIMP_PDB_IMAGE, "image", "Output image" }
};
static gint nreturn_vals = sizeof (return_vals) / sizeof (return_vals[0]);
gimp_install_procedure (PLUG_IN_NAME,
"Creates a screenshot of a single window or the whole screen",
@ -137,7 +135,8 @@ query (void)
N_("<Toolbox>/File/Acquire/Screen Shot..."),
NULL,
GIMP_EXTENSION,
nargs, nreturn_vals,
G_N_ELEMENTS (args),
G_N_ELEMENTS (return_vals),
args, return_vals);
}

View File

@ -108,7 +108,6 @@ query (void)
{ GIMP_PDB_FLOAT, "radius", "Radius of gaussian blur (in pixels > 1.0)" },
{ GIMP_PDB_INT32, "maxdelta", "Maximum delta" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure ("plug_in_sel_gauss",
"Applies a selective gaussian blur to the specified drawable.",
@ -125,7 +124,7 @@ query (void)
N_("<Image>/Filters/Blur/Selective Gaussian Blur..."),
"RGB*, GRAY*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -74,7 +74,6 @@ query (void)
{ GIMP_PDB_IMAGE, "image", "Input image (unused)" },
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure ("plug_in_semiflatten",
"Flatten pixels in an RGBA image that aren't "
@ -89,7 +88,7 @@ query (void)
N_("<Image>/Filters/Colors/Semi-Flatten"),
"RGBA",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

View File

@ -156,7 +156,6 @@ query (void)
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" },
{ GIMP_PDB_INT32, "percent", "Percent sharpening (default = 10)" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
gimp_install_procedure (PLUG_IN_NAME,
"Sharpen filter, typically used to 'sharpen' a photographic image.",
@ -167,7 +166,7 @@ query (void)
N_("<Image>/Filters/Enhance/Sharpen..."),
"RGB*, GRAY*",
GIMP_PLUGIN,
nargs, 0,
G_N_ELEMENTS (args), 0,
args, NULL);
}

Some files were not shown because too many files have changed in this diff Show More