- Added --errors switch.

This commit is contained in:
ccremers 2006-12-11 09:18:54 +00:00
parent 8d66dc48fd
commit b8c57a1395
3 changed files with 26 additions and 0 deletions

View File

@ -2,6 +2,8 @@ Recent changes (since beta 4):
- --max-attacks is now per claim, and no longer global. - --max-attacks is now per claim, and no longer global.
- more explicit output for intruder-generated terms. - more explicit output for intruder-generated terms.
- added switch '--errors=file' to redirect standard error output to a
file.

Binary file not shown.

View File

@ -1292,6 +1292,30 @@ switcher (const int process, int index, int commandline)
} }
} }
if (detect (' ', "errors", 1))
{
if (!process)
{
if (switches.expert)
{
helptext (" --errors=<FILE>", "error file [stderr]");
}
}
else
{
// Set output file name
/* try to open */
if (!freopen (arg_pointer, "w", stderr))
{
printfstderr ("Could not create error file '%s'.\n",
arg_pointer);
exit (1);
}
arg_next ();
return index;
}
}
// If the option is not recognized, it means a file name. // If the option is not recognized, it means a file name.
if (!process) if (!process)
{ {