plug-ins/script-fu/script-fu.c added an eval PDB interface for running

* plug-ins/script-fu/script-fu.c
* plug-ins/script-fu/script-fu-console.[ch]: added an eval
PDB interface for running arbitrary scheme code

* app/batch.c: redid batch mode to use script-fu-eval

* app/main.c: fixed command line parsing for batch mode and
image loading

-Yosh
This commit is contained in:
Manish Singh
1998-09-10 19:03:20 +00:00
parent bdc82fb50a
commit e5ef178966
7 changed files with 135 additions and 270 deletions

View File

@ -114,6 +114,13 @@ query ()
};
static gint nconsole_args = sizeof (console_args) / sizeof (console_args[0]);
static GParamDef eval_args[] =
{
{ PARAM_INT32, "run_mode", "[Interactive], non-interactive" },
{ PARAM_STRING, "code", "The code to evaluate" }
};
static gint neval_args = sizeof (eval_args) / sizeof (eval_args[0]);
static GParamDef server_args[] =
{
{ PARAM_INT32, "run_mode", "[Interactive], non-interactive" },
@ -156,6 +163,18 @@ query ()
PROC_EXTENSION,
nserver_args, 0,
server_args, NULL);
gimp_install_procedure ("extension_script_fu_eval",
"Evaluate scheme code",
"Evaluate the code under the scheme interpeter (primarily for batch mode)",
"Manish Singh",
"Manish Singh",
"1998",
NULL,
NULL,
PROC_EXTENSION,
neval_args, 0,
eval_args, NULL);
}
static void
@ -221,6 +240,13 @@ run (char *name,
{
script_fu_server_run (name, nparams, param, nreturn_vals, return_vals);
}
/*
* A non-interactive "console" (for batch mode)
*/
else if (strcmp (name, "extension_script_fu_eval") == 0)
{
script_fu_eval_run (name, nparams, param, nreturn_vals, return_vals);
}
}
static gint