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

View File

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