]> granicus.if.org Git - graphviz/commitdiff
core plugin: abbreviate 'IS_CLUSTER' macro
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 27 Sep 2022 15:22:28 +0000 (08:22 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 28 Sep 2022 14:57:12 +0000 (07:57 -0700)
plugin/core/gvrender_core_json.c

index dfb7b258745ae3c6cfc7296da20bf27a4764ca0b..7b75a4f2b6a7b1ef39ec33b59da19df187071105 100644 (file)
@@ -28,6 +28,7 @@
 #include <gvc/gvplugin_device.h>
 #include <cgraph/agxbuf.h>
 #include <cgraph/alloc.h>
+#include <cgraph/startswith.h>
 #include <cgraph/unreachable.h>
 #include <common/utils.h>
 #include <gvc/gvc.h>
@@ -57,7 +58,7 @@ typedef struct {
 #define ED_gid(n) (((gvid_t*)aggetrec(n, ID, FALSE))->id) 
 #define GD_gid(n) (((gvid_t*)aggetrec(n, ID, FALSE))->id) 
 
-#define IS_CLUSTER(s) (!strncmp(agnameof(s), "cluster", 7))
+#define IS_CLUSTER(s) startswith(agnameof(s), "cluster")
 
 static void json_begin_graph(GVJ_t *job)
 {