aboutsummaryrefslogtreecommitdiffstats
path: root/libibex
diff options
context:
space:
mode:
authorNotZed <NotZed@HelixCode.com>2000-05-07 11:57:50 +0800
committerMichael Zucci <zucchi@src.gnome.org>2000-05-07 11:57:50 +0800
commitf490803d13f53f9615e258126f6fe25eabc83c3e (patch)
treef841071236ad0133da14d6a854a68efe33ba3db8 /libibex
parent05dcdd341dbed148e4d1c6088dbf2dc054e5cc14 (diff)
downloadgsoc2013-evolution-f490803d13f53f9615e258126f6fe25eabc83c3e.tar
gsoc2013-evolution-f490803d13f53f9615e258126f6fe25eabc83c3e.tar.gz
gsoc2013-evolution-f490803d13f53f9615e258126f6fe25eabc83c3e.tar.bz2
gsoc2013-evolution-f490803d13f53f9615e258126f6fe25eabc83c3e.tar.lz
gsoc2013-evolution-f490803d13f53f9615e258126f6fe25eabc83c3e.tar.xz
gsoc2013-evolution-f490803d13f53f9615e258126f6fe25eabc83c3e.tar.zst
gsoc2013-evolution-f490803d13f53f9615e258126f6fe25eabc83c3e.zip
New function to find out if a file is indexed.
2000-05-06 NotZed <NotZed@HelixCode.com> * find.c (ibex_contains_name): New function to find out if a file is indexed. svn path=/trunk/; revision=2856
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.
*/