From: Emden Gansner Date: Fri, 9 Dec 2016 20:28:41 +0000 (-0500) Subject: Fix verbose printing. First, we are not printing the graph depth, but the X-Git-Tag: 2.42.0~226 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=03058fc4824c5c875167efb5182623166ac7af40;p=graphviz Fix verbose printing. First, we are not printing the graph depth, but the maximum number of steps to the center. Second, we can't use SLEAF if the root is specified, since SLEAF is not calculated in that case. --- diff --git a/lib/twopigen/circle.c b/lib/twopigen/circle.c index 8bc950e35..9117908d8 100644 --- a/lib/twopigen/circle.c +++ b/lib/twopigen/circle.c @@ -422,10 +422,10 @@ Agnode_t* circleLayout(Agraph_t * sg, Agnode_t * center) if (!center) center = findCenterNode(sg); - if (Verbose) - fprintf(stderr, "root = %s depth = %d\n", agnameof(center), SLEAF(center)-1); maxNStepsToCenter = setParentNodes(sg,center); + if (Verbose) + fprintf(stderr, "root = %s max steps to root = %d\n", agnameof(center), maxNStepsToCenter); if (maxNStepsToCenter < 0) { agerr(AGERR, "twopi: use of weight=0 creates disconnected component.\n"); return center;