summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: eceb676)
raw | patch | inline | side by side (parent: eceb676)
author | Florian Forster <ff@octo.it> | |
Mon, 12 Jul 2010 16:58:30 +0000 (18:58 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Mon, 12 Jul 2010 16:58:30 +0000 (18:58 +0200) |
src/graph.c | patch | blob | history | |
src/graph.h | patch | blob | history |
diff --git a/src/graph.c b/src/graph.c
index c6fb44446849f6fe0def7a2e2bc02bc7852a2cc9..2c1afc8eb0f5e060e896b35b8e0a2932dd63eac6 100644 (file)
--- a/src/graph.c
+++ b/src/graph.c
return (ident_matches (selector, cfg->select));
} /* }}} _Bool graph_matches_ident */
+_Bool graph_ident_intersect (graph_config_t *cfg, /* {{{ */
+ const graph_ident_t *selector)
+{
+#if C4_DEBUG
+ if ((cfg == NULL) || (selector == NULL))
+ return (0);
+#endif
+
+ return (ident_intersect (cfg->select, selector));
+} /* }}} _Bool graph_ident_intersect */
+
_Bool graph_matches_field (graph_config_t *cfg, /* {{{ */
graph_ident_field_t field, const char *field_value)
{
diff --git a/src/graph.h b/src/graph.h
index b7a7a8919e0ac93d6a238d57229f52758c1fdb78..7dca2cedb5755d31c93cc07c1a67bd59cc569cc7 100644 (file)
--- a/src/graph.h
+++ b/src/graph.h
_Bool graph_matches_ident (graph_config_t *cfg,
const graph_ident_t *selector);
+/* Returns true if a file may apply to both, the graphs selector and the
+ * selector given as argument. If the selectors contradict one another,
+ * returns false. */
+_Bool graph_ident_intersect (graph_config_t *cfg,
+ const graph_ident_t *selector);
+
/* Compares the given string with the appropriate field of the selector. If
* the selector field is "/all/" or "/any/", returns true without checking the
* instances. See "graph_inst_search_field" for finding all matching