From: Mark Hansen Date: Mon, 14 Nov 2022 10:49:06 +0000 (+1100) Subject: Give better names for setEdgeType arguments X-Git-Tag: 7.0.2~8^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b2511f820c21e2c989f412ba7ec2a53a183c8b8d;p=graphviz Give better names for setEdgeType arguments --- diff --git a/lib/common/utils.c b/lib/common/utils.c index 678533df7..ac6b6becd 100644 --- a/lib/common/utils.c +++ b/lib/common/utils.c @@ -1634,7 +1634,7 @@ static int edgeType(const char *s, int dflt) /* setEdgeType: * Sets graph's edge type based on the "splines" attribute. - * If the attribute is not defined, use default. + * If the attribute is not defined, use defaultValue. * If the attribute is "", use NONE. * If attribute value matches (case indepedent), use match. * ortho => EDGETYPE_ORTHO @@ -1642,25 +1642,23 @@ static int edgeType(const char *s, int dflt) * line => EDGETYPE_LINE * polyline => EDGETYPE_PLINE * spline => EDGETYPE_SPLINE - * If attribute is boolean, true means EDGETYPE_SPLINE, false means EDGETYPE_LINE. - * Else warn and use default. + * If attribute is boolean, true means EDGETYPE_SPLINE, false means + * EDGETYPE_LINE. Else warn and use default. */ -void setEdgeType (graph_t* g, int dflt) -{ +void setEdgeType(graph_t *g, int defaultValue) { char* s = agget(g, "splines"); int et; if (!s) { - et = dflt; + et = defaultValue; } else if (*s == '\0') { et = EDGETYPE_NONE; - } - else et = edgeType (s, dflt); + } else + et = edgeType(s, defaultValue); GD_flags(g) |= et; } - /* get_gradient_points * Evaluates the extreme points of an ellipse or polygon * Determines the point at the center of the extreme points diff --git a/lib/common/utils.h b/lib/common/utils.h index 19a442291..76c77bfcd 100644 --- a/lib/common/utils.h +++ b/lib/common/utils.h @@ -122,7 +122,7 @@ UTILS_API pointf spline_at_y(splines *spl, double y); UTILS_API Agsym_t *setAttr(graph_t *, void *, char *name, char *value, Agsym_t *); -UTILS_API void setEdgeType(graph_t *g, int dflt); +UTILS_API void setEdgeType(graph_t *g, int defaultValue); UTILS_API bool is_a_cluster(Agraph_t *g); /* from postproc.c */