Code

src/graph.[ch]: Rename "graph_inst_search" to "graph_search_inst_string".
[collection4.git] / src / graph.c
index 9b545fd702922f7c73c45ca63db5cef4396b168a..66dbd47207e377211457c7e1bf0b24cb78e92288 100644 (file)
@@ -297,7 +297,7 @@ int graph_add_def (graph_config_t *cfg, graph_def_t *def) /* {{{ */
   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))
@@ -305,6 +305,17 @@ _Bool graph_matches_ident (graph_config_t *cfg, const graph_ident_t *ident) /* {
 #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, /* {{{ */
@@ -397,7 +408,7 @@ int graph_inst_find_all_matching (graph_config_t *cfg, /* {{{ */
   return (0);
 } /* }}} int graph_inst_find_all_matching */
 
-int graph_inst_search (graph_config_t *cfg, const char *term, /* {{{ */
+int graph_search_inst_string (graph_config_t *cfg, const char *term, /* {{{ */
     graph_inst_callback_t cb,
     void *user_data)
 {
@@ -408,7 +419,7 @@ int graph_inst_search (graph_config_t *cfg, const char *term, /* {{{ */
   status = graph_get_title (cfg, buffer, sizeof (buffer));
   if (status != 0)
   {
-    fprintf (stderr, "graph_inst_search: graph_get_title failed\n");
+    fprintf (stderr, "graph_search_inst_string: graph_get_title failed\n");
     return (status);
   }
 
@@ -437,7 +448,7 @@ int graph_inst_search (graph_config_t *cfg, const char *term, /* {{{ */
   }
 
   return (0);
-} /* }}} int graph_inst_search */
+} /* }}} int graph_search_inst_string */
 
 int graph_inst_search_field (graph_config_t *cfg, /* {{{ */
     graph_ident_field_t field, const char *field_value,