- Added scyther wrapper tag (cf. GH bug report)

- Fixed binding closure (cf. GH bug report)
- Reduced indenting to two instead of three spaces.
This commit is contained in:
ccremers 2005-05-03 09:45:54 +00:00
parent 71558706a6
commit 3bbaf0fc97
2 changed files with 13 additions and 4 deletions

View File

@ -105,7 +105,6 @@ main (int argc, char **argv)
sys->argv = argv;
process_switches (sys);
// exit (0); // TODO FIX weghalen [x][cc]
/* init compiler for this system */
compilerInit (sys);
@ -192,6 +191,10 @@ main (int argc, char **argv)
* ---------------------------------------
*/
/* xml init */
if (sys->switchXMLoutput)
xmlOutInit ();
/* latex header? */
if (sys->latex)
latexInit (sys, argc, argv);
@ -242,6 +245,10 @@ main (int argc, char **argv)
if (sys->latex)
latexDone (sys);
/* xml closeup */
if (sys->switchXMLoutput)
xmlOutDone ();
/* Transfer any scenario counting to the exit code,
* assuming that there is no error. */
if (exitcode != EXIT_ERROR && sys->switchScenario < 0)

View File

@ -33,13 +33,15 @@ static int xmlindent; // indent level for xml elements in output
void
xmlOutInit (void)
{
xmlindent = 0;
printf ("<scyther>\n");
xmlindent = 1;
}
//! Close up
void
xmlOutDone (void)
{
printf ("</scyther>\n");
}
/*
@ -55,7 +57,7 @@ xmlIndentPrint ()
i = xmlindent;
while (i > 0)
{
printf (" ");
printf (" ");
i--;
}
}
@ -319,7 +321,7 @@ xmlOutBindings (const System sys)
xmlIndentPrint ();
printf ("<binding term=\"");
termPrint (b->term);
printf ("\" />\n");
printf ("\" >\n");
xmlindent++;
if (b->done)
xmlRunIndex ("from", b->run_from, b->ev_from);