diff --git a/src/switches.c b/src/switches.c index 73f5334..0775de3 100644 --- a/src/switches.c +++ b/src/switches.c @@ -73,9 +73,11 @@ switchesInit (int argc, char **argv) switches.reportClaims = 0; // default don't report on claims switches.xml = 0; // default no xml output switches.human = false; // not human friendly by default - switches.reportMemory; - switches.reportTime; - switches.reportStates; + switches.reportMemory = 0; + switches.reportTime = 0; + switches.reportStates = 0; + switches.extendNonReads = 0; // default off + // Obsolete switches.latex = 0; // latex output? @@ -449,6 +451,20 @@ switcher (const int process, int index) } } + if (detect (' ', "extend-nonreads", 0)) + { + if (!process) + { + /* discourage: hide + */ + } + else + { + switches.extendNonReads = 1; + return index; + } + } + /* ================== * External options */ diff --git a/src/switches.h b/src/switches.h index 76402c1..b81b8c1 100644 --- a/src/switches.h +++ b/src/switches.h @@ -55,6 +55,8 @@ struct switchdata int reportMemory; //!< Memory display switch. int reportTime; //!< Time display switch. int reportStates; //!< Progress display switch. (traversed states) + int extendNonReads; //!< Show further events in arachne xml output. + //! Latex output switch. /** * Obsolete. Use globalLatex instead. diff --git a/src/xmlout.c b/src/xmlout.c index a589260..dbd86ff 100644 --- a/src/xmlout.c +++ b/src/xmlout.c @@ -711,9 +711,36 @@ xmlOutRuns (const System sys) Roledef rd; int index; + //! Test whether to display this event + /** + * Could be integrated into a single line on the while loop, + * but that makes it rather hard to understand. + */ + int showthis (void) + { + if (rd != NULL) + { + if (index < sys->runs[run].step) + { + return true; + } + else + { + if (switches.extendNonReads) + { + if (rd->type != READ) + { + return true; + } + } + } + } + return false; + } + index = 0; rd = sys->runs[run].start; - while (rd != NULL && index < sys->runs[run].step) + while (showthis ()) { xmlOutEvent (sys, rd, run, index); index++; @@ -752,6 +779,9 @@ xmlOutSemitrace (const System sys) xmlIndentPrint (); printf ("attackid);