bahave like the old batch code and call app_exit(FALSE) when reading from

2001-07-18  Michael Natterer  <mitch@gimp.org>

	* app/batch.c: bahave like the old batch code and call
	app_exit(FALSE) when reading from STDIN is finished.
This commit is contained in:
Michael Natterer 2001-07-18 01:11:36 +00:00 committed by Michael Natterer
parent 7c8b419099
commit f38502f316
2 changed files with 13 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2001-07-18 Michael Natterer <mitch@gimp.org>
* app/batch.c: bahave like the old batch code and call
app_exit(FALSE) when reading from STDIN is finished.
2001-07-18 Sven Neumann <sven@gimp.org>
* plug-ins/script-fu/script-fu-text-console.c: stop reading on EOF

View File

@ -52,6 +52,7 @@ static ProcRecord *eval_proc;
void
batch_init (Gimp *gimp)
{
gboolean read_from_stdin = FALSE;
gboolean perl_server_already_running = FALSE;
gint i;
@ -63,6 +64,8 @@ batch_init (Gimp *gimp)
if (batch_cmds[1])
batch_cmds[1] = NULL;
read_from_stdin = TRUE;
}
for (i = 0; batch_cmds[i]; i++)
@ -85,14 +88,17 @@ batch_init (Gimp *gimp)
continue;
}
}
if (!eval_proc)
if (! eval_proc)
{
g_message ("script-fu not available: batch mode disabled\n");
return;
}
batch_run_cmd (gimp, batch_cmds[i]);
if (read_from_stdin)
app_exit (FALSE);
}
}