From 0d2ee57010442a7dc23f3ae1c9c23713df14784a Mon Sep 17 00:00:00 2001 From: lecoanet Date: Wed, 14 Mar 2001 16:30:31 +0000 Subject: Suppression de la commande inutilis�e et inutilisable ZnListDo. --- generic/List.c | 37 ------------------------------------- generic/List.h | 5 ----- 2 files changed, 42 deletions(-) (limited to 'generic') 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; - } -} diff --git a/generic/List.h b/generic/List.h index be17ad3..f63f0e0 100644 --- a/generic/List.h +++ b/generic/List.h @@ -71,11 +71,6 @@ void ZnListDelete(ZnList /* list */, int /* index */); void ZnListTruncate(ZnList /* list */, int /* index */); -int ZnListDo(ZnList /* list */, - void *data, - int (*/* to_do */)(void */* value */, - void */*data*/)); - #ifdef __CPLUSPLUS__ } -- cgit v1.1