- Added xml output switch (-x, check scyther --help). It's not complete

yet, to be finished tomorrow.
This commit is contained in:
ccremers
2005-05-01 13:32:50 +00:00
parent 3682e3ab24
commit 924abc065d
7 changed files with 446 additions and 71 deletions

View File

@@ -114,7 +114,7 @@ switcher (const int process, const System sys, int index)
// It's the right thing
if (optlength + 3 < this_arg_length)
{
arg_pointer = this_arg + 2 + optlength + 1;
arg_pointer = this_arg + 2 + optlength + 1;
}
else
{
@@ -177,7 +177,7 @@ switcher (const int process, const System sys, int index)
}
#endif
this_arg = argv[index];
this_arg_length = strlen(this_arg);
this_arg_length = strlen (this_arg);
}
else
{
@@ -210,6 +210,19 @@ switcher (const int process, const System sys, int index)
}
}
if (detect ('x', "xml-output", 0))
{
if (!process)
{
helptext ("-x,--xml-output", "show attack output in XML format");
}
else
{
sys->switchXMLoutput = 1;
return index;
}
}
if (detect ('m', "match", 1))
{
if (!process)
@@ -517,9 +530,10 @@ switcher (const int process, const System sys, int index)
{
fprintf (stderr, "Unknown switch '%s'.\n", this_arg);
}
else
else
{
fprintf (stderr, "Could not open input file '%s'.\n", this_arg);
fprintf (stderr, "Could not open input file '%s'.\n",
this_arg);
}
exit (1);
}