From: Emden R. Gansner Date: Wed, 30 Apr 2014 20:09:33 +0000 (-0400) Subject: Remove extraneous expression from line 1681; X-Git-Tag: TRAVIS_CI_BUILD_EXPERIMENTAL~216^2~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=574b5c0d78c619967d1e74460d2bd03bd3209d84;p=graphviz Remove extraneous expression from line 1681; remove shortcut tests added in cd45ebb0c3015556d782bbbfdee1658f227b3eef, as they were too aggressive; fix bugs 2445, 2430, 2427, 2421. These were due to the conversion to cgraph, so there may be more bugs fixed than these. The problem is that with cgraph, edges always come in pairs. In particular, to access the head and tail of an edge, both parts need to be set. This wasn't being done for the temporary hack edges in make_regular_edge. --- diff --git a/lib/dotgen/dotsplines.c b/lib/dotgen/dotsplines.c index 23f7362ca..11e9e9651 100644 --- a/lib/dotgen/dotsplines.c +++ b/lib/dotgen/dotsplines.c @@ -383,14 +383,11 @@ static void _dot_splines(graph_t * g, int normalize) } for (i = 0; i < n_edges;) { - boolean havePorts; ind = i; le0 = getmainedge((e0 = edges[i++])); if (ED_tail_port(e0).defined || ED_head_port(e0).defined) { - havePorts = TRUE; ea = e0; } else { - havePorts = FALSE; ea = le0; } if (ED_tree_index(ea) & BWDEDGE) { @@ -402,12 +399,8 @@ static void _dot_splines(graph_t * g, int normalize) break; if (ED_adjacent(e0)) continue; /* all flat adjacent edges at once */ if (ED_tail_port(e1).defined || ED_head_port(e1).defined) { - if (!havePorts) break; - else eb = e1; } else { - if (havePorts) break; - else eb = le1; } if (ED_tree_index(eb) & BWDEDGE) { @@ -1685,7 +1678,7 @@ makeLineEdge(graph_t* g, edge_t* fe, pointf* points, node_t** hp) height = dimen.y; } - lp = ED_label(e)->pos, lp; + lp = ED_label(e)->pos; if (leftOf (endp,startp,lp)) { lp.x += width/2.0; lp.y -= height/2.0; @@ -1746,6 +1739,7 @@ make_regular_edge(graph_t* g, spline_info_t* sp, path * P, edge_t ** edges, int if (ABS(ND_rank(agtail(e)) - ND_rank(aghead(e))) > 1) { fwdedgeai = *(Agedgeinfo_t*)e->base.data; fwdedgea.out = *e; + fwdedgea.in = *AGOUT2IN(e); fwdedgea.out.base.data = (Agrec_t*)&fwdedgeai; if (ED_tree_index(e) & BWDEDGE) { MAKEFWDEDGE(&fwdedgeb.out, e); @@ -1756,6 +1750,7 @@ make_regular_edge(graph_t* g, spline_info_t* sp, path * P, edge_t ** edges, int fwdedgeb.out = *e; fwdedgeb.out.base.data = (Agrec_t*)&fwdedgebi; agtail(&fwdedgea.out) = agtail(e); + fwdedgeb.in = *AGOUT2IN(e); } le = getmainedge(e); while (ED_to_virt(le))