- Added '--echo' to stdout the commandline. Useful for reporting.

This commit is contained in:
ccremers 2004-07-29 13:15:29 +00:00
parent c88c1d4461
commit 331569c9a8
3 changed files with 11 additions and 7 deletions

View File

@ -114,6 +114,7 @@ main (int argc, char **argv)
struct arg_lit *switch_disable_noclaims_reductions = arg_lit0 (NULL, "no-noclaims-red", "disable no more claims reductions"); struct arg_lit *switch_disable_noclaims_reductions = arg_lit0 (NULL, "no-noclaims-red", "disable no more claims reductions");
struct arg_lit *switch_disable_endgame_reductions = arg_lit0 (NULL, "no-endgame-red", "disable endgame reductions"); struct arg_lit *switch_disable_endgame_reductions = arg_lit0 (NULL, "no-endgame-red", "disable endgame reductions");
struct arg_lit *switch_summary = arg_lit0 ("S", "summary", "show summary on stdout instead of stderr"); struct arg_lit *switch_summary = arg_lit0 ("S", "summary", "show summary on stdout instead of stderr");
struct arg_lit *switch_echo = arg_lit0 ("E", "echo", "echo command line to stdout");
#ifdef DEBUG #ifdef DEBUG
struct arg_int *switch_por_parameter = arg_int0 (NULL, "pp", NULL, "POR parameter"); struct arg_int *switch_por_parameter = arg_int0 (NULL, "pp", NULL, "POR parameter");
struct arg_lit *switch_debug_indent = arg_lit0 ("I", "debug-indent", struct arg_lit *switch_debug_indent = arg_lit0 ("I", "debug-indent",
@ -133,6 +134,7 @@ main (int argc, char **argv)
switch_scenario, switch_scenario,
switch_latex_output, switch_latex_output,
switch_summary, switch_summary,
switch_echo,
switch_progress_bar, switch_progress_bar,
switch_traversal_method, switch_traversal_method,
@ -298,11 +300,14 @@ main (int argc, char **argv)
/* transfer command line */ /* transfer command line */
sys->argc = argc; sys->argc = argc;
sys->argv = argv; sys->argv = argv;
#ifdef DEBUG
if (switch_echo->count > 0)
{
/* print command line */ /* print command line */
commandlinePrint (stderr, sys); fprintf (stdout, "command\t");
fprintf (stderr, "\n"); commandlinePrint (stdout, sys);
#endif fprintf (stdout, "\n");
}
/* handle switches */ /* handle switches */

View File

@ -505,7 +505,7 @@ void graphInit (const System sys)
printf ("digraph Statespace {\n"); printf ("digraph Statespace {\n");
/* label */ /* label */
printf ("\tcomment = \""); printf ("\tcomment = \"$");
commandlinePrint (stdout, sys); commandlinePrint (stdout, sys);
printf ("\";\n"); printf ("\";\n");

View File

@ -865,7 +865,6 @@ commandlinePrint (FILE *stream, const System sys)
/* print command line */ /* print command line */
int i; int i;
fprintf (stream, "$");
for (i = 0; i < sys->argc; i++) for (i = 0; i < sys->argc; i++)
fprintf (stream, " %s", sys->argv[i]); fprintf (stream, " %s", sys->argv[i]);
} }