]> granicus.if.org Git - graphviz/commitdiff
Give better argument names to safe_dcl
authorMark Hansen <markhansen@google.com>
Mon, 14 Nov 2022 10:47:38 +0000 (21:47 +1100)
committerMark Hansen <markhansen@google.com>
Mon, 14 Nov 2022 10:52:49 +0000 (21:52 +1100)
lib/common/utils.c
lib/common/utils.h

index 25555a2dc54589198f568a77dfc51a9c365bd7f2..678533df7f24833a252ae0297c5e9837a4082204 100644 (file)
@@ -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;
 }
 
index cf734d6960d3d735779dc59022fa8b6183e0fcd8..19a442291370427ab9996efaf8a17641b85c931d 100644 (file)
@@ -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,