diff lib/gl_list.c @ 7410:9704ff2cbdfe

Add bounded list search operations.
author Bruno Haible <bruno@clisp.org>
date Fri, 06 Oct 2006 12:06:07 +0000
parents 0de49c40e105
children 238942284e2f
line wrap: on
line diff
--- a/lib/gl_list.c
+++ b/lib/gl_list.c
@@ -232,6 +232,14 @@
 	 ->sortedlist_search (list, compar, elt);
 }
 
+gl_list_node_t
+gl_sortedlist_search_from_to (gl_list_t list, gl_listelement_compar_fn compar, size_t start_index, size_t end_index, const void *elt)
+{
+  return ((const struct gl_list_impl_base *) list)->vtable
+	 ->sortedlist_search_from_to (list, compar, start_index, end_index,
+				      elt);
+}
+
 size_t
 gl_sortedlist_indexof (gl_list_t list, gl_listelement_compar_fn compar, const void *elt)
 {
@@ -239,6 +247,14 @@
 	 ->sortedlist_indexof (list, compar, elt);
 }
 
+size_t
+gl_sortedlist_indexof_from_to (gl_list_t list, gl_listelement_compar_fn compar, size_t start_index, size_t end_index, const void *elt)
+{
+  return ((const struct gl_list_impl_base *) list)->vtable
+	 ->sortedlist_indexof_from_to (list, compar, start_index, end_index,
+				       elt);
+}
+
 gl_list_node_t
 gl_sortedlist_add (gl_list_t list, gl_listelement_compar_fn compar, const void *elt)
 {