src/graph.[ch]: Implement "graph_matches_ident".
[collection4.git] / src / graph.c
index 845bbb7..75c83b1 100644 (file)
@@ -307,6 +307,17 @@ _Bool graph_ident_matches (graph_config_t *cfg, const graph_ident_t *ident) /* {
   return (ident_matches (cfg->select, ident));
 } /* }}} _Bool graph_ident_matches */
 
+_Bool graph_matches_ident (graph_config_t *cfg, /* {{{ */
+    const graph_ident_t *selector)
+{
+#if C4_DEBUG
+  if ((cfg == NULL) || (selector == NULL))
+    return (0);
+#endif
+
+  return (ident_matches (selector, cfg->select));
+} /* }}} _Bool graph_matches_ident */
+
 _Bool graph_matches_field (graph_config_t *cfg, /* {{{ */
     graph_ident_field_t field, const char *field_value)
 {