From 638965b41641363ed5c7c135b38cbc66ecc1f9b3 Mon Sep 17 00:00:00 2001 From: cedric Date: Wed, 17 Jun 2009 11:47:28 +0000 Subject: [PATCH] * ecore: Remove Ecore_List2 at all. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@41074 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/ecore/ecore_list.c | 172 ------------------------------------------ src/lib/ecore/ecore_private.h | 15 ---- 2 files changed, 187 deletions(-) diff --git a/src/lib/ecore/ecore_list.c b/src/lib/ecore/ecore_list.c index f129bf2..01d6d51 100644 --- a/src/lib/ecore/ecore_list.c +++ b/src/lib/ecore/ecore_list.c @@ -63,178 +63,6 @@ static void *_ecore_dlist_previous(Ecore_DList * list); static void *_ecore_dlist_first_remove(Ecore_DList *list); static void *_ecore_dlist_index_goto(Ecore_DList *list, int index); -/* XXX: Begin deprecated code */ -EAPI void * -_ecore_list2_append(void *in_list, void *in_item) -{ - Ecore_List2 *l, *new_l; - Ecore_List2 *list, *item; - - list = in_list; - item = in_item; - new_l = item; - new_l->next = NULL; - if (!list) - { - new_l->prev = NULL; - new_l->last = new_l; - return new_l; - } - if (list->last) l = list->last; - else for (l = list; l; l = l->next); - l->next = new_l; - new_l->prev = l; - list->last = new_l; - return list; -} - -EAPI void * -_ecore_list2_prepend(void *in_list, void *in_item) -{ - Ecore_List2 *new_l; - Ecore_List2 *list, *item; - - list = in_list; - item = in_item; - new_l = item; - new_l->prev = NULL; - if (!list) - { - new_l->next = NULL; - new_l->last = new_l; - return new_l; - } - new_l->next = list; - list->prev = new_l; - new_l->last = list->last; - list->last = NULL; - return new_l; -} - -EAPI void * -_ecore_list2_append_relative(void *in_list, void *in_item, void *in_relative) -{ - Ecore_List2 *l; - Ecore_List2 *list, *item, *relative; - - list = in_list; - item = in_item; - relative = in_relative; - for (l = list; l; l = l->next) - { - if (l == relative) - { - Ecore_List2 *new_l; - - new_l = item; - if (l->next) - { - new_l->next = l->next; - l->next->prev = new_l; - } - - else new_l->next = NULL; - l->next = new_l; - new_l->prev = l; - if (!new_l->next) - list->last = new_l; - return list; - } - } - return _ecore_list2_append(list, item); -} - -EAPI void * -_ecore_list2_prepend_relative(void *in_list, void *in_item, void *in_relative) -{ - Ecore_List2 *l; - Ecore_List2 *list, *item, *relative; - - list = in_list; - item = in_item; - relative = in_relative; - for (l = list; l; l = l->next) - { - if (l == relative) - { - Ecore_List2 *new_l; - - new_l = item; - new_l->prev = l->prev; - new_l->next = l; - l->prev = new_l; - if (new_l->prev) - { - new_l->prev->next = new_l; - if (!new_l->next) - list->last = new_l; - return list; - } - else - { - if (!new_l->next) - new_l->last = new_l; - else - { - new_l->last = list->last; - list->last = NULL; - } - return new_l; - } - } - } - return _ecore_list2_prepend(list, item); -} - -EAPI void * -_ecore_list2_remove(void *in_list, void *in_item) -{ - Ecore_List2 *return_l; - Ecore_List2 *list, *item; - - /* checkme */ - if(!in_list) - return in_list; - - list = in_list; - item = in_item; - if (!item) return list; - if (item->next) - item->next->prev = item->prev; - if (item->prev) - { - item->prev->next = item->next; - return_l = list; - } - else - { - return_l = item->next; - if (return_l) - return_l->last = list->last; - } - if (item == list->last) - list->last = item->prev; - item->next = NULL; - item->prev = NULL; - return return_l; -} - -EAPI void * -_ecore_list2_find(void *in_list, void *in_item) -{ - Ecore_List2 *l; - Ecore_List2 *list, *item; - - list = in_list; - item = in_item; - for (l = list; l; l = l->next) - { - if (l == item) return item; - } - return NULL; -} -/* XXX: End deprecated code */ - /** @defgroup Ecore_Data_List_Creation_Group List Creation/Destruction Functions diff --git a/src/lib/ecore/ecore_private.h b/src/lib/ecore/ecore_private.h index adb3c4e..5a7eee1 100644 --- a/src/lib/ecore/ecore_private.h +++ b/src/lib/ecore/ecore_private.h @@ -120,21 +120,6 @@ EAPI void ecore_print_warning(const char *function, const char *sparam); typedef unsigned int Ecore_Magic; -typedef struct _Ecore_List2 Ecore_List2; -typedef struct _Ecore_List2_Data Ecore_List2_Data; - -struct _Ecore_List2 -{ - Ecore_List2 *next, *prev; - Ecore_List2 *last; -}; - -struct _Ecore_List2_Data -{ - Ecore_List2 __list_data; - void *data; -}; - #ifndef _ECORE_H enum _Ecore_Fd_Handler_Flags { -- 2.7.4