aboutsummaryrefslogtreecommitdiffstats
path: root/libibex
diff options
context:
space:
mode:
Diffstat (limited to 'libibex')
-rw-r--r--libibex/ChangeLog5
-rw-r--r--libibex/find.c16
-rw-r--r--libibex/ibex.h4
3 files changed, 25 insertions, 0 deletions
diff --git a/libibex/ChangeLog b/libibex/ChangeLog
index ceb75a4e51..abd1914e84 100644
--- a/libibex/ChangeLog
+++ b/libibex/ChangeLog
@@ -1,3 +1,8 @@
+2000-05-06 NotZed <NotZed@HelixCode.com>
+
+ * find.c (ibex_contains_name): New function to find out if a file
+ is indexed.
+
2000-05-02 Matt Loper <matt@helixcode.com>
* Makefile.am: set G_LOG_DOMAIN.
diff --git a/libibex/find.c b/libibex/find.c
index e0b5d263c8..1bb58917ac 100644
--- a/libibex/find.c
+++ b/libibex/find.c
@@ -56,6 +56,22 @@ ibex_find (ibex *ib, char *word)
}
/**
+ * ibex_contains_name:
+ * @ib:
+ * @name:
+ *
+ * Returns #TRUE if the ibex @ib has any index entry for
+ * the key @name.
+ *
+ * Return value:
+ **/
+gboolean
+ibex_contains_name(ibex *ib, char *name)
+{
+ return g_tree_lookup(ib->files, name) != NULL;
+}
+
+/**
* ibex_find_name: Check if a word occurs in a given file
* @ib: an ibex
* @name: a filename
diff --git a/libibex/ibex.h b/libibex/ibex.h
index e24508aaf7..646853b120 100644
--- a/libibex/ibex.h
+++ b/libibex/ibex.h
@@ -87,6 +87,10 @@ GPtrArray *ibex_find (ibex *ib, char *word);
*/
gboolean ibex_find_name (ibex *ib, char *name, char *word);
+/* has a file been indexed?
+ */
+gboolean ibex_contains_name(ibex *ib, char *name);
+
/* Return all the files containing all of the words in the given
* array. Returned data is like with ibex_find.
*/