- When counting scenarios, the exit code reflects the number of
scenarios.
This commit is contained in:
parent
1ba63d16d4
commit
42e5efedac
11
src/main.c
11
src/main.c
@ -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.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user