- When counting scenarios, the exit code reflects the number of

scenarios.
This commit is contained in:
ccremers 2004-07-28 12:22:40 +00:00
parent 1ba63d16d4
commit 42e5efedac

View File

@ -19,10 +19,15 @@
* \section exit Exit codes
*
* 0 Okay No attack found, claims encountered
*
* 1 Error Something went wrong (error) E.g. switch error, or scenario ran out.
*
* 2 Okay No attack found (because) no claims encountered
*
* 3 Okay Attack found
*
* However, if the --scenario=-1 switch is used, the exit code is used to return the number of scenarios.
*
* \section coding Coding conventions
*
* Usually, each source file except main.c has an myfileInit() and myfileDone() function
@ -462,6 +467,12 @@ main (int argc, char **argv)
if (sys->latex)
latexDone (sys);
/* transfer any scenario counting to the exit code */
if (sys->switchScenario < 0)
{
exitcode = sys->countScenario;
}
/*
* Now we clean up any memory that was allocated.
*/