From 3bbaf0fc97f8cc71d2b09384f59a84d32d48ab87 Mon Sep 17 00:00:00 2001 From: ccremers Date: Tue, 3 May 2005 09:45:54 +0000 Subject: [PATCH] - Added scyther wrapper tag (cf. GH bug report) - Fixed binding closure (cf. GH bug report) - Reduced indenting to two instead of three spaces. --- src/main.c | 9 ++++++++- src/xmlout.c | 8 +++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/main.c b/src/main.c index f80bc00..92d3962 100644 --- a/src/main.c +++ b/src/main.c @@ -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) diff --git a/src/xmlout.c b/src/xmlout.c index 9fed897..e1f0a51 100644 --- a/src/xmlout.c +++ b/src/xmlout.c @@ -33,13 +33,15 @@ static int xmlindent; // indent level for xml elements in output void xmlOutInit (void) { - xmlindent = 0; + printf ("\n"); + xmlindent = 1; } //! Close up void xmlOutDone (void) { + printf ("\n"); } /* @@ -55,7 +57,7 @@ xmlIndentPrint () i = xmlindent; while (i > 0) { - printf (" "); + printf (" "); i--; } } @@ -319,7 +321,7 @@ xmlOutBindings (const System sys) xmlIndentPrint (); printf ("term); - printf ("\" />\n"); + printf ("\" >\n"); xmlindent++; if (b->done) xmlRunIndex ("from", b->run_from, b->ev_from);