From: erg Date: Thu, 16 Apr 2009 20:45:32 +0000 (+0000) Subject: Change bad edge length into a warning, which is really is; X-Git-Tag: LAST_LIBGRAPH~32^2~2167 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=59ef81c009bd7a9725a9d87dc4a5943a1f24bd4e;p=graphviz Change bad edge length into a warning, which is really is; allow length of 0 for Nop. --- diff --git a/lib/neatogen/stuff.c b/lib/neatogen/stuff.c index ee5207da9..a5cc3fd79 100644 --- a/lib/neatogen/stuff.c +++ b/lib/neatogen/stuff.c @@ -213,8 +213,8 @@ static double setEdgeLen(graph_t * G, node_t * np, int lenx) for (ep = agfstout(G, np); ep; ep = agnxtout(G, ep)) { len = doubleattr(ep, lenx, 1.0); - if (len <= 0) { - agerr(AGERR, "bad edge len %f in %s ignored\n", len, agnameof(G)); + if ((len < 0) || ((len == 0) && !Nop)) { + agerr(AGWARN, "bad edge len %f in %s - set to 1\n", len, agnameof(G)); len = 1.0; } ED_dist(ep) = len;