aboutsummaryrefslogtreecommitdiff
path: root/generic/List.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/List.c')
-rw-r--r--generic/List.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/generic/List.c b/generic/List.c
index 2b0ed2f..ea5432c 100644
--- a/generic/List.c
+++ b/generic/List.c
@@ -590,40 +590,3 @@ ZnListTruncate(ZnList list,
cur_list->used_size = index;
}
-
-
-/*
- **********************************************************************************
- *
- * ZnListDo --
- * Apply the function 'to_do' to each entry in the list.
- * Stop either at end of list or if 'to_do' returns a
- * non nul result. 'to_do' is a function with two
- * parameters. The first is bound in turn to each value of
- * the list, the second is the data passed to ZnListDo.
- * If the scan stops at the end of the list, the function
- * returns -1, else it returns the index at which it has
- * stopped.
- *
- **********************************************************************************
- */
-
-int
-ZnListDo(ZnList list,
- void *data,
- int (*to_do)(void *value, void *data))
-{
- _ZnList *cur_list = (_ZnList *) list;
- int i;
-
- for (i = 0;
- i < cur_list->used_size &&
- !(*to_do)((void *) (cur_list->list + (i * cur_list->elem_size)), data);
- i++);
- if (i == cur_list->used_size) {
- return -1;
- }
- else {
- return i;
- }
-}