From: Mark Hansen Date: Mon, 14 Nov 2022 10:47:38 +0000 (+1100) Subject: Give better argument names to safe_dcl X-Git-Tag: 7.0.2~8^2~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2da7fecebbb5c3162864c02701b05505e4752f19;p=graphviz Give better argument names to safe_dcl --- diff --git a/lib/common/utils.c b/lib/common/utils.c index 25555a2dc..678533df7 100644 --- a/lib/common/utils.c +++ b/lib/common/utils.c @@ -1237,14 +1237,12 @@ void undoClusterEdges(graph_t * g) /* safe_dcl: * Find the attribute belonging to graph g for objects like obj * with given name. If one does not exist, create it with the - * default value def. + * default value defaultValue. */ -attrsym_t* -safe_dcl(graph_t * g, int obj_kind, char *name, char *def) -{ +attrsym_t *safe_dcl(graph_t *g, int obj_kind, char *name, char *defaultValue) { attrsym_t *a = agattr(g,obj_kind,name, NULL); if (!a) /* attribute does not exist */ - a = agattr(g,obj_kind,name,def); + a = agattr(g, obj_kind, name, defaultValue); return a; } diff --git a/lib/common/utils.h b/lib/common/utils.h index cf734d696..19a442291 100644 --- a/lib/common/utils.h +++ b/lib/common/utils.h @@ -71,7 +71,8 @@ UTILS_API void epsf_define(GVJ_t *job); UTILS_API void undoClusterEdges(graph_t *g); UTILS_API Dt_t *mkClustMap(Agraph_t *g); UTILS_API Agraph_t *findCluster(Dt_t *map, char *name); -UTILS_API attrsym_t *safe_dcl(graph_t *g, int obj_kind, char *name, char *def); +UTILS_API attrsym_t *safe_dcl(graph_t *g, int obj_kind, char *name, + char *defaultValue); UTILS_API int late_int(void *obj, Agsym_t *attr, int defaultValue, int minimum); UTILS_API double late_double(void *obj, Agsym_t *attr, double defaultValue,