BUGFIX: Skipping running/commit signals caused bugs in graphviz output.
This commit is contained in:
parent
fa8440c8e5
commit
fda39f7eab
57
src/dotout.c
57
src/dotout.c
@ -1454,9 +1454,8 @@ drawRegularRuns (const System sys)
|
|||||||
Roledef rd;
|
Roledef rd;
|
||||||
int index;
|
int index;
|
||||||
int prevnode;
|
int prevnode;
|
||||||
|
int firstnode;
|
||||||
|
|
||||||
prevnode = 0;
|
|
||||||
index = 0;
|
|
||||||
rd = sys->runs[run].start;
|
rd = sys->runs[run].start;
|
||||||
// Regular run
|
// Regular run
|
||||||
|
|
||||||
@ -1476,8 +1475,13 @@ drawRegularRuns (const System sys)
|
|||||||
setRunColorBuf (sys, run, colorbuf);
|
setRunColorBuf (sys, run, colorbuf);
|
||||||
|
|
||||||
// Display the respective events
|
// Display the respective events
|
||||||
while (index < sys->runs[run].length)
|
prevnode = 0;
|
||||||
|
firstnode = true;
|
||||||
|
for (index = 0; index < sys->runs[run].length; index++)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* invariant: prevnode has been drawn OR firstnode is true
|
||||||
|
*/
|
||||||
if (!isEventIgnored (sys, run, index))
|
if (!isEventIgnored (sys, run, index))
|
||||||
{
|
{
|
||||||
// Print node itself
|
// Print node itself
|
||||||
@ -1504,9 +1508,9 @@ drawRegularRuns (const System sys)
|
|||||||
eprintf (";\n");
|
eprintf (";\n");
|
||||||
|
|
||||||
// Print binding to previous node
|
// Print binding to previous node
|
||||||
if (index > sys->runs[run].firstReal)
|
if (firstnode == false)
|
||||||
{
|
{
|
||||||
// index > 0
|
// not the first node
|
||||||
eprintf ("\t\t");
|
eprintf ("\t\t");
|
||||||
node (sys, run, prevnode);
|
node (sys, run, prevnode);
|
||||||
eprintf (" -> ");
|
eprintf (" -> ");
|
||||||
@ -1514,45 +1518,13 @@ drawRegularRuns (const System sys)
|
|||||||
eprintf (" [style=\"bold\", weight=\"%s\"]",
|
eprintf (" [style=\"bold\", weight=\"%s\"]",
|
||||||
RUNWEIGHT);
|
RUNWEIGHT);
|
||||||
eprintf (";\n");
|
eprintf (";\n");
|
||||||
prevnode = index;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// index <= firstReal
|
// firstnode
|
||||||
if (index == sys->runs[run].firstReal)
|
|
||||||
{
|
|
||||||
// index == firstReal
|
|
||||||
Roledef rd;
|
|
||||||
int send_before_read;
|
|
||||||
int done;
|
|
||||||
|
|
||||||
// Determine if it is an active role or note
|
|
||||||
/**
|
|
||||||
*@todo note that this will probably become a standard function call for role.h
|
|
||||||
*/
|
|
||||||
rd =
|
|
||||||
roledef_shift (sys->runs[run].start,
|
|
||||||
sys->runs[run].firstReal);
|
|
||||||
done = 0;
|
|
||||||
send_before_read = 0;
|
|
||||||
while (!done && rd != NULL)
|
|
||||||
{
|
|
||||||
if (rd->type == READ)
|
|
||||||
{
|
|
||||||
done = 1;
|
|
||||||
}
|
|
||||||
if (rd->type == SEND)
|
|
||||||
{
|
|
||||||
done = 1;
|
|
||||||
send_before_read = 1;
|
|
||||||
}
|
|
||||||
rd = rd->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!switches.clusters)
|
if (!switches.clusters)
|
||||||
{
|
{
|
||||||
// Draw the first box (HEADER)
|
// Draw the first box (HEADER)
|
||||||
// This used to be drawn only if done && send_before_read, now we always draw it.
|
|
||||||
eprintf ("\t\ts%i [label=\"{ ", run);
|
eprintf ("\t\ts%i [label=\"{ ", run);
|
||||||
|
|
||||||
printRunExplanation (sys, run, "\\l", "|");
|
printRunExplanation (sys, run, "\\l", "|");
|
||||||
@ -1567,14 +1539,11 @@ drawRegularRuns (const System sys)
|
|||||||
eprintf
|
eprintf
|
||||||
(" [style=bold, weight=\"%s\"];\n",
|
(" [style=bold, weight=\"%s\"];\n",
|
||||||
RUNWEIGHT);
|
RUNWEIGHT);
|
||||||
|
}
|
||||||
|
firstnode = false;
|
||||||
|
}
|
||||||
prevnode = index;
|
prevnode = index;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
index++;
|
|
||||||
rd = rd->next;
|
rd = rd->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user