From cf1d3766b10c6cdf0fedc2468a591ffdf70ca837 Mon Sep 17 00:00:00 2001 From: ian Date: Sun, 20 Mar 2005 18:24:26 +0000 Subject: [PATCH] shorter pnames from trivpairnodes --- layout/redactgraph.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/layout/redactgraph.c b/layout/redactgraph.c index b03df43..70953b4 100644 --- a/layout/redactgraph.c +++ b/layout/redactgraph.c @@ -1,4 +1,9 @@ -/**/ +/* + */ +/* for debugging, runes like + * ./ours.redactgraph consistency movfeatsplitedges consistency movfeatrmstubs consistency movfeatsplitnodes consistency trivpairnodes consistency trivnullnodes consistency printforneato | neato -Tps >u.ps + * are often useful. + */ #include #include @@ -529,8 +534,10 @@ static void trivpairnodes(void) { continue; } trace(" yes:\n"); - rightedge->edge->pname= - masprintf("%s+%s", leftedge->edge->pname, rightedge->edge->pname); + if (!strchr(rightedge->edge->pname, '+')) { + rightedge->edge->pname= + masprintf("%s+", rightedge->edge->pname); + } rightedge->edge->distance += leftedge->edge->distance; edgeend_replumb(rightedge, edgeend_otherend(leftedge)->node); edge_delete(leftedge); -- 2.30.2