Code

src/graph.[ch]: Rename "graph_inst_search" to "graph_search_inst_string".
[collection4.git] / src / graph.c
index 845bbb7a02f7abedb13261c17e5621100d5cbb79..66dbd47207e377211457c7e1bf0b24cb78e92288 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)
 {
@@ -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,