return (def_append (cfg->defs, tmp));
} /* }}} int graph_add_def */
-_Bool graph_matches_ident (graph_config_t *cfg, const graph_ident_t *ident) /* {{{ */
+_Bool graph_ident_matches (graph_config_t *cfg, const graph_ident_t *ident) /* {{{ */
{
#if C4_DEBUG
if ((cfg == NULL) || (ident == NULL))
#endif
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, /* {{{ */
static int graph_sort_instances_cb (const void *v0, const void *v1) /* {{{ */
{
- return (ident_compare (*(graph_ident_t * const *) v0,
- *(graph_ident_t * const *) v1));
+ return (inst_compare (*(graph_instance_t * const *) v0,
+ *(graph_instance_t * const *) v1));
} /* }}} int graph_sort_instances_cb */
+size_t graph_num_instances (graph_config_t *cfg) /* {{{ */
+{
+ if (cfg == NULL)
+ return ((size_t) -1);
+
+ return (cfg->instances_num);
+} /* }}} size_t graph_num_instances */
+
int graph_sort_instances (graph_config_t *cfg) /* {{{ */
{
if (cfg == NULL)