summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2009-02-25 11:03:47 +0000
committerCedric BAIL <cedric.bail@free.fr>2009-02-25 11:03:47 +0000
commit6978e98dc6247373e7a2a3ec2ec58b37ff404c01 (patch)
treebf9d12da012faab9bc4c2bd925b864c19a38d8d9 /legacy
parente31b5e961eff9b2c8d5c6a5419502d391e12ca00 (diff)
* estickies,
* etk, * PROTO/exalt, * E-MODULES-EXTRA/diskio, * E-MODULES-EXTRA/drawer, * E-MODULES-EXTRA/penguins, * E-MODULES-EXTRA/slideshow, * E-MODULES-EXTRA/mail, * E-MODULES-EXTRA/forecasts, * E-MODULES-EXTRA/iiirk, * E-MODULES-EXTRA/places, * e, * ewl, * ecore, * elitaire, * entrance, * e_dbus, * efreet: Here we go, move from Ecore_List to Eina_List. NOTE: This patch is huge, I did test it a lot, and I hope nothing is broken. But if you think something change after this commit, please contact me ASAP. SVN revision: 39200
Diffstat (limited to '')
-rw-r--r--legacy/ecore/src/lib/ecore/Ecore_Data.h10
-rw-r--r--legacy/ecore/src/lib/ecore/ecore_getopt.c9
-rw-r--r--legacy/ecore/src/lib/ecore/ecore_path.c53
-rw-r--r--legacy/ecore/src/lib/ecore/ecore_plugin.c33
-rw-r--r--legacy/ecore/src/lib/ecore_con/ecore_con.c28
-rw-r--r--legacy/ecore/src/lib/ecore_con/ecore_con_info.c15
-rw-r--r--legacy/ecore/src/lib/ecore_con/ecore_con_url.c72
-rw-r--r--legacy/ecore/src/lib/ecore_config/ecore_config_ipc_ecore.c1
-rw-r--r--legacy/ecore/src/lib/ecore_evas/ecore_evas_fb.c21
-rw-r--r--legacy/ecore/src/lib/ecore_fb/ecore_fb_li.c10
-rw-r--r--legacy/ecore/src/lib/ecore_file/Ecore_File.h4
-rw-r--r--legacy/ecore/src/lib/ecore_file/ecore_file.c14
-rw-r--r--legacy/ecore/src/lib/ecore_file/ecore_file_download.c29
-rw-r--r--legacy/ecore/src/lib/ecore_file/ecore_file_monitor_poll.c27
-rw-r--r--legacy/ecore/src/lib/ecore_file/ecore_file_path.c62
-rw-r--r--legacy/ecore/src/lib/ecore_imf/Ecore_IMF.h4
-rw-r--r--legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c14
-rw-r--r--legacy/ecore/src/lib/ecore_imf/ecore_imf_module.c53
-rw-r--r--legacy/ecore/src/lib/ecore_imf/ecore_imf_private.h6
-rw-r--r--legacy/ecore/src/lib/ecore_ipc/Ecore_Ipc.h2
-rw-r--r--legacy/ecore/src/lib/ecore_ipc/ecore_ipc.c44
-rw-r--r--legacy/ecore/src/lib/ecore_ipc/ecore_ipc_private.h6
-rw-r--r--legacy/ecore/src/lib/ecore_x/xcb/ecore_xcb_reply.c36
-rw-r--r--legacy/efreet/src/bin/ef_cache.c9
-rw-r--r--legacy/efreet/src/bin/ef_data_dirs.c18
-rw-r--r--legacy/efreet/src/bin/ef_desktop.c127
-rw-r--r--legacy/efreet/src/bin/ef_icon_theme.c111
-rw-r--r--legacy/efreet/src/bin/ef_menu.c17
-rw-r--r--legacy/efreet/src/bin/efreet_spec_test.c4
-rw-r--r--legacy/efreet/src/bin/main.c34
-rw-r--r--legacy/efreet/src/lib/Efreet_Trash.h2
-rw-r--r--legacy/efreet/src/lib/efreet_base.c32
-rw-r--r--legacy/efreet/src/lib/efreet_base.h4
-rw-r--r--legacy/efreet/src/lib/efreet_desktop.c249
-rw-r--r--legacy/efreet/src/lib/efreet_desktop.h22
-rw-r--r--legacy/efreet/src/lib/efreet_icon.c245
-rw-r--r--legacy/efreet/src/lib/efreet_icon.h22
-rw-r--r--legacy/efreet/src/lib/efreet_ini.c2
-rw-r--r--legacy/efreet/src/lib/efreet_menu.c548
-rw-r--r--legacy/efreet/src/lib/efreet_menu.h2
-rw-r--r--legacy/efreet/src/lib/efreet_mime.c124
-rw-r--r--legacy/efreet/src/lib/efreet_private.h11
-rw-r--r--legacy/efreet/src/lib/efreet_trash.c6
-rw-r--r--legacy/efreet/src/lib/efreet_utils.c239
-rw-r--r--legacy/efreet/src/lib/efreet_utils.h16
45 files changed, 1113 insertions, 1284 deletions
diff --git a/legacy/ecore/src/lib/ecore/Ecore_Data.h b/legacy/ecore/src/lib/ecore/Ecore_Data.h
index 2a8331e647..2397ccb410 100644
--- a/legacy/ecore/src/lib/ecore/Ecore_Data.h
+++ b/legacy/ecore/src/lib/ecore/Ecore_Data.h
@@ -1,8 +1,6 @@
1#ifndef _ECORE_DATA_H 1#ifndef _ECORE_DATA_H
2# define _ECORE_DATA_H 2# define _ECORE_DATA_H
3 3
4#include <Eina.h>
5
6#ifdef EAPI 4#ifdef EAPI
7# undef EAPI 5# undef EAPI
8#endif 6#endif
@@ -32,6 +30,8 @@
32/* we need this for size_t */ 30/* we need this for size_t */
33#include <stddef.h> 31#include <stddef.h>
34 32
33#include <Eina.h>
34
35/** 35/**
36 * @file Ecore_Data.h 36 * @file Ecore_Data.h
37 * @brief Contains threading, list, hash, debugging and tree functions. 37 * @brief Contains threading, list, hash, debugging and tree functions.
@@ -300,7 +300,7 @@ extern "C" {
300 300
301 struct _ecore_path_group 301 struct _ecore_path_group
302 { 302 {
303 Ecore_List *paths; 303 Eina_List *paths;
304 }; 304 };
305 305
306 /* 306 /*
@@ -331,7 +331,7 @@ extern "C" {
331 /* 331 /*
332 * Get a list of all the available files in a path set 332 * Get a list of all the available files in a path set
333 */ 333 */
334 EAPI Ecore_List * ecore_path_group_available_get(Ecore_Path_Group *group); 334 EAPI Eina_List * ecore_path_group_available_get(Ecore_Path_Group *group);
335 335
336 336
337 typedef struct _ecore_plugin Ecore_Plugin; 337 typedef struct _ecore_plugin Ecore_Plugin;
@@ -355,7 +355,7 @@ extern "C" {
355 */ 355 */
356 EAPI void *ecore_plugin_symbol_get(Ecore_Plugin * plugin, const char *symbol_name); 356 EAPI void *ecore_plugin_symbol_get(Ecore_Plugin * plugin, const char *symbol_name);
357 357
358 EAPI Ecore_List *ecore_plugin_available_get(Ecore_Path_Group *group); 358 EAPI Eina_List *ecore_plugin_available_get(Ecore_Path_Group *group);
359 359
360 360
361 typedef struct _ecore_heap Ecore_Sheap; 361 typedef struct _ecore_heap Ecore_Sheap;
diff --git a/legacy/ecore/src/lib/ecore/ecore_getopt.c b/legacy/ecore/src/lib/ecore/ecore_getopt.c
index fc897c81d6..75c198c025 100644
--- a/legacy/ecore/src/lib/ecore/ecore_getopt.c
+++ b/legacy/ecore/src/lib/ecore/ecore_getopt.c
@@ -1635,11 +1635,10 @@ ecore_getopt_parse(const Ecore_Getopt *parser, Ecore_Getopt_Value *values, int a
1635Eina_List * 1635Eina_List *
1636ecore_getopt_list_free(Eina_List *list) 1636ecore_getopt_list_free(Eina_List *list)
1637{ 1637{
1638 while (list) 1638 void *data;
1639 { 1639
1640 free(list->data); 1640 EINA_LIST_FREE(list, data)
1641 list = eina_list_remove_list(list, list); 1641 free(data);
1642 }
1643 return NULL; 1642 return NULL;
1644} 1643}
1645 1644
diff --git a/legacy/ecore/src/lib/ecore/ecore_path.c b/legacy/ecore/src/lib/ecore/ecore_path.c
index ea1431e091..bb1f195bff 100644
--- a/legacy/ecore/src/lib/ecore/ecore_path.c
+++ b/legacy/ecore/src/lib/ecore/ecore_path.c
@@ -45,11 +45,12 @@ ecore_path_group_new(void)
45EAPI void 45EAPI void
46ecore_path_group_del(Ecore_Path_Group *group) 46ecore_path_group_del(Ecore_Path_Group *group)
47{ 47{
48 CHECK_PARAM_POINTER("group", group); 48 char *path;
49 49
50 if (group->paths) 50 CHECK_PARAM_POINTER("group", group);
51 ecore_list_destroy(group->paths);
52 51
52 EINA_LIST_FREE(group->paths, path)
53 free(path);
53 free(group); 54 free(group);
54} 55}
55 56
@@ -65,13 +66,7 @@ ecore_path_group_add(Ecore_Path_Group *group, const char *path)
65 CHECK_PARAM_POINTER("group", group); 66 CHECK_PARAM_POINTER("group", group);
66 CHECK_PARAM_POINTER("path", path); 67 CHECK_PARAM_POINTER("path", path);
67 68
68 if (!group->paths) 69 group->paths = eina_list_append(group->paths, strdup(path));
69 {
70 group->paths = ecore_list_new();
71 ecore_list_free_cb_set(group->paths, free);
72 }
73
74 ecore_list_append(group->paths, strdup(path));
75} 70}
76 71
77/** 72/**
@@ -94,16 +89,16 @@ ecore_path_group_remove(Ecore_Path_Group *group, const char *path)
94 /* 89 /*
95 * Find the path in the list of available paths 90 * Find the path in the list of available paths
96 */ 91 */
97 ecore_list_first_goto(group->paths); 92 found = eina_list_search_unsorted(group->paths, strcmp, path);
98
99 while ((found = ecore_list_current(group->paths)) && strcmp(found, path))
100 ecore_list_next(group->paths);
101 93
102 /* 94 /*
103 * If the path is found, remove and free it 95 * If the path is found, remove and free it
104 */ 96 */
105 if (found) 97 if (found)
106 ecore_list_remove_destroy(group->paths); 98 {
99 group->paths = eina_list_remove(group->paths, found);
100 free(found);
101 }
107} 102}
108 103
109/** 104/**
@@ -117,6 +112,7 @@ ecore_path_group_remove(Ecore_Path_Group *group, const char *path)
117EAPI char * 112EAPI char *
118ecore_path_group_find(Ecore_Path_Group *group, const char *name) 113ecore_path_group_find(Ecore_Path_Group *group, const char *name)
119{ 114{
115 Eina_List *l;
120 int r; 116 int r;
121 char *p; 117 char *p;
122 struct stat st; 118 struct stat st;
@@ -131,15 +127,13 @@ ecore_path_group_find(Ecore_Path_Group *group, const char *name)
131 /* 127 /*
132 * Search the paths of the path group for the specified file name 128 * Search the paths of the path group for the specified file name
133 */ 129 */
134 ecore_list_first_goto(group->paths); 130 EINA_LIST_FOREACH(group->paths, l, p)
135 p = ecore_list_next(group->paths);
136 do
137 { 131 {
138 snprintf(path, PATH_MAX, "%s/%s", p, name); 132 snprintf(path, PATH_MAX, "%s/%s", p, name);
139 r = stat(path, &st); 133 r = stat(path, &st);
134 if ((r >= 0) && S_ISREG(st.st_mode))
135 break;
140 } 136 }
141 while (((r < 0) || !S_ISREG(st.st_mode)) &&
142 (p = ecore_list_next(group->paths)));
143 137
144 if (p) 138 if (p)
145 p = strdup(path); 139 p = strdup(path);
@@ -154,20 +148,19 @@ ecore_path_group_find(Ecore_Path_Group *group, const char *name)
154 * identified by @p group_id. @c NULL otherwise. 148 * identified by @p group_id. @c NULL otherwise.
155 * @ingroup Ecore_Path_Group 149 * @ingroup Ecore_Path_Group
156 */ 150 */
157EAPI Ecore_List * 151EAPI Eina_List *
158ecore_path_group_available_get(Ecore_Path_Group *group) 152ecore_path_group_available_get(Ecore_Path_Group *group)
159{ 153{
160 Ecore_List *avail = NULL; 154 Eina_List *avail = NULL;
155 Eina_List *l;
161 char *path; 156 char *path;
162 157
163 CHECK_PARAM_POINTER_RETURN("group", group, NULL); 158 CHECK_PARAM_POINTER_RETURN("group", group, NULL);
164 159
165 if (!group->paths || ecore_list_empty_is(group->paths)) 160 if (!group->paths || !eina_list_count(group->paths))
166 return NULL; 161 return NULL;
167 162
168 ecore_list_first_goto(group->paths); 163 EINA_LIST_FOREACH(group->paths, l, path)
169
170 while ((path = ecore_list_next(group->paths)) != NULL)
171 { 164 {
172 DIR *dir; 165 DIR *dir;
173 struct stat st; 166 struct stat st;
@@ -203,13 +196,11 @@ ecore_path_group_available_get(Ecore_Path_Group *group)
203 196
204 strncpy(n, d->d_name, l - 2); 197 strncpy(n, d->d_name, l - 2);
205*/ 198*/
206 if (!avail) 199/* avail = eina_list_append(avail, strdup(n));*/
207 avail = ecore_list_new(); 200 avail = eina_list_append(avail, strdup(d->d_name));
208
209/* ecore_list_append(avail, strdup(n));*/
210 ecore_list_append(avail, strdup(d->d_name));
211 } 201 }
212 } 202 }
213 203
214 return avail; 204 return avail;
215} 205}
206
diff --git a/legacy/ecore/src/lib/ecore/ecore_plugin.c b/legacy/ecore/src/lib/ecore/ecore_plugin.c
index 0162a27b68..8b79dc134f 100644
--- a/legacy/ecore/src/lib/ecore/ecore_plugin.c
+++ b/legacy/ecore/src/lib/ecore/ecore_plugin.c
@@ -28,7 +28,7 @@
28#include "ecore_private.h" 28#include "ecore_private.h"
29 29
30 30
31static Ecore_List *loaded_plugins = NULL; 31static Eina_List *loaded_plugins = NULL;
32 32
33static Eina_Bool _hash_keys(const Eina_Hash *hash, 33static Eina_Bool _hash_keys(const Eina_Hash *hash,
34 const char *key, 34 const char *key,
@@ -106,10 +106,8 @@ ecore_plugin_load(Ecore_Path_Group *group, const char *plugin_name, const char *
106 /* 106 /*
107 * Now add it to the list of the groups loaded plugins 107 * Now add it to the list of the groups loaded plugins
108 */ 108 */
109 if (!loaded_plugins)
110 loaded_plugins = ecore_list_new();
111 109
112 ecore_list_append(loaded_plugins, plugin); 110 loaded_plugins = eina_list_append(loaded_plugins, plugin);
113 111
114 FREE(path); 112 FREE(path);
115 113
@@ -129,14 +127,7 @@ ecore_plugin_unload(Ecore_Plugin *plugin)
129 if (!plugin->handle) 127 if (!plugin->handle)
130 return; 128 return;
131 129
132 if (ecore_list_goto(loaded_plugins, plugin)) 130 loaded_plugins = eina_list_remove(loaded_plugins, plugin);
133 ecore_list_remove(loaded_plugins);
134
135 if (ecore_list_empty_is(loaded_plugins))
136 {
137 ecore_list_destroy(loaded_plugins);
138 loaded_plugins = NULL;
139 }
140 131
141 dlclose(plugin->handle); 132 dlclose(plugin->handle);
142 133
@@ -173,23 +164,23 @@ ecore_plugin_symbol_get(Ecore_Plugin *plugin, const char *symbol_name)
173 * paths identified by @p group_id. @c NULL otherwise. 164 * paths identified by @p group_id. @c NULL otherwise.
174 * @ingroup Ecore_Plugin 165 * @ingroup Ecore_Plugin
175 */ 166 */
176EAPI Ecore_List * 167EAPI Eina_List *
177ecore_plugin_available_get(Ecore_Path_Group *group) 168ecore_plugin_available_get(Ecore_Path_Group *group)
178{ 169{
179 Ecore_List *avail = NULL; 170 Eina_List *avail = NULL;
171 Eina_List *l;
180 Eina_Hash *plugins = NULL; 172 Eina_Hash *plugins = NULL;
181 Eina_Iterator *it = NULL; 173 Eina_Iterator *it = NULL;
182 char *path; 174 char *path;
183 175
184 CHECK_PARAM_POINTER_RETURN("group", group, NULL); 176 CHECK_PARAM_POINTER_RETURN("group", group, NULL);
185 177
186 if (!group->paths || ecore_list_empty_is(group->paths)) 178 if (!group->paths || !eina_list_count(group->paths))
187 return NULL; 179 return NULL;
188 180
189 ecore_list_first_goto(group->paths);
190 plugins = eina_hash_string_superfast_new(NULL); 181 plugins = eina_hash_string_superfast_new(NULL);
191 182
192 while ((path = ecore_list_next(group->paths)) != NULL) 183 EINA_LIST_FOREACH(group->paths, l, path)
193 { 184 {
194 DIR *dir; 185 DIR *dir;
195 struct stat st; 186 struct stat st;
@@ -239,14 +230,10 @@ ecore_plugin_available_get(Ecore_Path_Group *group)
239 closedir(dir); 230 closedir(dir);
240 } 231 }
241 232
242 avail = ecore_list_new();
243 ecore_list_free_cb_set(avail, free);
244
245
246 it = eina_hash_iterator_data_new(plugins); 233 it = eina_hash_iterator_data_new(plugins);
247 if (it) 234 if (it)
248 { 235 {
249 eina_iterator_foreach(it, EINA_EACH(_hash_keys), avail); 236 eina_iterator_foreach(it, EINA_EACH(_hash_keys), &avail);
250 eina_iterator_free(it); 237 eina_iterator_free(it);
251 } 238 }
252 239
@@ -259,6 +246,6 @@ ecore_plugin_available_get(Ecore_Path_Group *group)
259static Eina_Bool 246static Eina_Bool
260_hash_keys(const Eina_Hash *hash __UNUSED__, const char *key, void *list) 247_hash_keys(const Eina_Hash *hash __UNUSED__, const char *key, void *list)
261{ 248{
262 ecore_list_append(list, strdup(key)); 249 *(Eina_List **)list = eina_list_append(*(Eina_List **)list, key);
263 return EINA_TRUE; 250 return EINA_TRUE;
264} 251}
diff --git a/legacy/ecore/src/lib/ecore_con/ecore_con.c b/legacy/ecore/src/lib/ecore_con/ecore_con.c
index 5b83ed4738..d9199ef5a4 100644
--- a/legacy/ecore/src/lib/ecore_con/ecore_con.c
+++ b/legacy/ecore/src/lib/ecore_con/ecore_con.c
@@ -57,7 +57,7 @@ EAPI int ECORE_CON_EVENT_SERVER_DEL = 0;
57EAPI int ECORE_CON_EVENT_CLIENT_DATA = 0; 57EAPI int ECORE_CON_EVENT_CLIENT_DATA = 0;
58EAPI int ECORE_CON_EVENT_SERVER_DATA = 0; 58EAPI int ECORE_CON_EVENT_SERVER_DATA = 0;
59 59
60static Ecore_List *servers = NULL; 60static Eina_List *servers = NULL;
61static int init_count = 0; 61static int init_count = 0;
62 62
63#define LENGTH_OF_SOCKADDR_UN(s) (strlen((s)->sun_path) + (size_t)(((struct sockaddr_un *)NULL)->sun_path)) 63#define LENGTH_OF_SOCKADDR_UN(s) (strlen((s)->sun_path) + (size_t)(((struct sockaddr_un *)NULL)->sun_path))
@@ -94,8 +94,6 @@ ecore_con_init(void)
94 ecore_con_dns_init(); 94 ecore_con_dns_init();
95 ecore_con_info_init(); 95 ecore_con_info_init();
96 96
97 servers = ecore_list_new();
98
99 return init_count; 97 return init_count;
100} 98}
101 99
@@ -110,10 +108,8 @@ ecore_con_shutdown(void)
110{ 108{
111 if (--init_count != 0) return init_count; 109 if (--init_count != 0) return init_count;
112 110
113 while (!ecore_list_empty_is(servers)) 111 while (servers)
114 _ecore_con_server_free(ecore_list_first_remove(servers)); 112 _ecore_con_server_free(eina_list_data_get(servers));
115 ecore_list_destroy(servers);
116 servers = NULL;
117 113
118 ecore_con_info_shutdown(); 114 ecore_con_info_shutdown();
119 ecore_con_dns_shutdown(); 115 ecore_con_dns_shutdown();
@@ -239,7 +235,7 @@ ecore_con_server_add(Ecore_Con_Type compl_type, const char *name, int port,
239 socket_unix.sun_family = AF_UNIX; 235 socket_unix.sun_family = AF_UNIX;
240 if (type == ECORE_CON_LOCAL_ABSTRACT) 236 if (type == ECORE_CON_LOCAL_ABSTRACT)
241 { 237 {
242#ifdef HAVE_ABSTRACT_SOCKETS 238#ifdef HAVE_ABSTRACT_SOCKET
243 /* . is a placeholder */ 239 /* . is a placeholder */
244 snprintf(socket_unix.sun_path, sizeof(socket_unix.sun_path), ".%s", name); 240 snprintf(socket_unix.sun_path, sizeof(socket_unix.sun_path), ".%s", name);
245 /* first char null indicates abstract namespace */ 241 /* first char null indicates abstract namespace */
@@ -285,7 +281,7 @@ ecore_con_server_add(Ecore_Con_Type compl_type, const char *name, int port,
285 if (!ecore_con_info_udp_listen(svr, _ecore_con_cb_udp_listen, svr)) goto error; 281 if (!ecore_con_info_udp_listen(svr, _ecore_con_cb_udp_listen, svr)) goto error;
286 } 282 }
287 283
288 ecore_list_append(servers, svr); 284 servers = eina_list_append(servers, svr);
289 ECORE_MAGIC_SET(svr, ECORE_MAGIC_CON_SERVER); 285 ECORE_MAGIC_SET(svr, ECORE_MAGIC_CON_SERVER);
290 286
291 return svr; 287 return svr;
@@ -463,7 +459,7 @@ ecore_con_server_connect(Ecore_Con_Type compl_type, const char *name, int port,
463 if (!ecore_con_info_udp_connect(svr, _ecore_con_cb_udp_connect, svr)) goto error; 459 if (!ecore_con_info_udp_connect(svr, _ecore_con_cb_udp_connect, svr)) goto error;
464 } 460 }
465 461
466 ecore_list_append(servers, svr); 462 servers = eina_list_append(servers, svr);
467 ECORE_MAGIC_SET(svr, ECORE_MAGIC_CON_SERVER); 463 ECORE_MAGIC_SET(svr, ECORE_MAGIC_CON_SERVER);
468 464
469 return svr; 465 return svr;
@@ -494,6 +490,8 @@ ecore_con_server_del(Ecore_Con_Server *svr)
494 ECORE_MAGIC_FAIL(svr, ECORE_MAGIC_CON_SERVER, "ecore_con_server_del"); 490 ECORE_MAGIC_FAIL(svr, ECORE_MAGIC_CON_SERVER, "ecore_con_server_del");
495 return NULL; 491 return NULL;
496 } 492 }
493 if (svr->delete_me) return NULL;
494
497 data = svr->data; 495 data = svr->data;
498 svr->data = NULL; 496 svr->data = NULL;
499 svr->delete_me = 1; 497 svr->delete_me = 1;
@@ -508,7 +506,6 @@ ecore_con_server_del(Ecore_Con_Server *svr)
508 else 506 else
509 { 507 {
510 _ecore_con_server_free(svr); 508 _ecore_con_server_free(svr);
511 if (ecore_list_goto(servers, svr)) ecore_list_remove(servers);
512 } 509 }
513 return data; 510 return data;
514} 511}
@@ -886,12 +883,8 @@ _ecore_con_server_free(Ecore_Con_Server *svr)
886 } 883 }
887 } 884 }
888 if (svr->write_buf) free(svr->write_buf); 885 if (svr->write_buf) free(svr->write_buf);
889 while (svr->clients) 886 EINA_LIST_FREE(svr->clients, cl)
890 {
891 cl = eina_list_data_get(svr->clients);
892 svr->clients = eina_list_remove(svr->clients, cl);
893 _ecore_con_client_free(cl); 887 _ecore_con_client_free(cl);
894 }
895 if ((svr->created) && (svr->path) && (svr->ppid == getpid())) 888 if ((svr->created) && (svr->path) && (svr->ppid == getpid()))
896 unlink(svr->path); 889 unlink(svr->path);
897 if (svr->fd >= 0) close(svr->fd); 890 if (svr->fd >= 0) close(svr->fd);
@@ -900,6 +893,7 @@ _ecore_con_server_free(Ecore_Con_Server *svr)
900 if (svr->path) free(svr->path); 893 if (svr->path) free(svr->path);
901 if (svr->ip) free(svr->ip); 894 if (svr->ip) free(svr->ip);
902 if (svr->fd_handler) ecore_main_fd_handler_del(svr->fd_handler); 895 if (svr->fd_handler) ecore_main_fd_handler_del(svr->fd_handler);
896 servers = eina_list_remove(servers, svr);
903 free(svr); 897 free(svr);
904} 898}
905 899
@@ -1389,7 +1383,7 @@ static int
1389_ecore_con_svr_udp_handler(void *data, Ecore_Fd_Handler *fd_handler) 1383_ecore_con_svr_udp_handler(void *data, Ecore_Fd_Handler *fd_handler)
1390{ 1384{
1391 Ecore_Con_Server *svr; 1385 Ecore_Con_Server *svr;
1392 Ecore_Con_Client *cl; 1386 Ecore_Con_Client *cl = NULL;
1393 1387
1394 svr = data; 1388 svr = data;
1395 if (svr->dead) return 1; 1389 if (svr->dead) return 1;
diff --git a/legacy/ecore/src/lib/ecore_con/ecore_con_info.c b/legacy/ecore/src/lib/ecore_con/ecore_con_info.c
index de21a00e10..019dd99c47 100644
--- a/legacy/ecore/src/lib/ecore_con/ecore_con_info.c
+++ b/legacy/ecore/src/lib/ecore_con/ecore_con_info.c
@@ -198,9 +198,10 @@ ecore_con_info_get(Ecore_Con_Server *svr,
198 char service[NI_MAXSERV]; 198 char service[NI_MAXSERV];
199 char hbuf[NI_MAXHOST]; 199 char hbuf[NI_MAXHOST];
200 char sbuf[NI_MAXSERV]; 200 char sbuf[NI_MAXSERV];
201 void *tosend; 201 void *tosend = NULL;
202 int tosend_len; 202 int tosend_len;
203 int canonname_len = 0; 203 int canonname_len = 0;
204 int err;
204 205
205 /* FIXME with EINA */ 206 /* FIXME with EINA */
206 snprintf(service, NI_MAXSERV, "%i", svr->port); 207 snprintf(service, NI_MAXSERV, "%i", svr->port);
@@ -210,12 +211,13 @@ ecore_con_info_get(Ecore_Con_Server *svr,
210 if (result->ai_canonname) 211 if (result->ai_canonname)
211 canonname_len = strlen(result->ai_canonname) + 1; 212 canonname_len = strlen(result->ai_canonname) + 1;
212 tosend_len = sizeof(Ecore_Con_Info) + result->ai_addrlen + canonname_len; 213 tosend_len = sizeof(Ecore_Con_Info) + result->ai_addrlen + canonname_len;
213 tosend = malloc(tosend_len); 214
215 if ((tosend = malloc(tosend_len)));
216 goto on_error;
217 memset(tosend, 0, tosend_len);
214 container = (Ecore_Con_Info *)tosend; 218 container = (Ecore_Con_Info *)tosend;
215 219
216 container->size = tosend_len; 220 container->size = tosend_len;
217 memset(container->ip, 0, sizeof(container->ip));
218 memset(container->service, 0, sizeof(container->service));
219 221
220 memcpy(&container->info, result, sizeof(struct addrinfo)); 222 memcpy(&container->info, result, sizeof(struct addrinfo));
221 memcpy(tosend + sizeof(Ecore_Con_Info), result->ai_addr, result->ai_addrlen); 223 memcpy(tosend + sizeof(Ecore_Con_Info), result->ai_addr, result->ai_addrlen);
@@ -228,13 +230,14 @@ ecore_con_info_get(Ecore_Con_Server *svr,
228 memcpy(container->ip, hbuf, sizeof(container->ip)); 230 memcpy(container->ip, hbuf, sizeof(container->ip));
229 memcpy(container->service, sbuf, sizeof(container->service)); 231 memcpy(container->service, sbuf, sizeof(container->service));
230 } 232 }
231 write(fd[1], tosend, tosend_len); 233 err = write(fd[1], tosend, tosend_len);
232 234
233 free(tosend); 235 free(tosend);
234 } 236 }
235 else 237 else
236 write(fd[1], "", 1); 238 err = write(fd[1], "", 1);
237 239
240on_error:
238 close(fd[1]); 241 close(fd[1]);
239# ifdef __USE_ISOC99 242# ifdef __USE_ISOC99
240 _Exit(0); 243 _Exit(0);
diff --git a/legacy/ecore/src/lib/ecore_con/ecore_con_url.c b/legacy/ecore/src/lib/ecore_con/ecore_con_url.c
index 9461aa6313..bbff69036c 100644
--- a/legacy/ecore/src/lib/ecore_con/ecore_con_url.c
+++ b/legacy/ecore/src/lib/ecore_con/ecore_con_url.c
@@ -80,7 +80,7 @@ static void _ecore_con_event_url_free(void *data __UNUSED__, void *ev);
80static int _ecore_con_url_process_completed_jobs(Ecore_Con_Url *url_con_to_match); 80static int _ecore_con_url_process_completed_jobs(Ecore_Con_Url *url_con_to_match);
81 81
82static Ecore_Idler *_fd_idler_handler = NULL; 82static Ecore_Idler *_fd_idler_handler = NULL;
83static Ecore_List *_url_con_list = NULL; 83static Eina_List *_url_con_list = NULL;
84static CURLM *curlm = NULL; 84static CURLM *curlm = NULL;
85static fd_set _current_fd_set; 85static fd_set _current_fd_set;
86static int init_count = 0; 86static int init_count = 0;
@@ -129,6 +129,8 @@ EAPI int
129ecore_con_url_init(void) 129ecore_con_url_init(void)
130{ 130{
131#ifdef HAVE_CURL 131#ifdef HAVE_CURL
132 Ecore_Con_Url *url_con;
133
132 if (!ECORE_CON_EVENT_URL_DATA) 134 if (!ECORE_CON_EVENT_URL_DATA)
133 { 135 {
134 ECORE_CON_EVENT_URL_DATA = ecore_event_type_new(); 136 ECORE_CON_EVENT_URL_DATA = ecore_event_type_new();
@@ -136,27 +138,21 @@ ecore_con_url_init(void)
136 ECORE_CON_EVENT_URL_PROGRESS = ecore_event_type_new(); 138 ECORE_CON_EVENT_URL_PROGRESS = ecore_event_type_new();
137 } 139 }
138 140
139 if (!_url_con_list)
140 {
141 _url_con_list = ecore_list_new();
142 if (!_url_con_list) return 0;
143 }
144
145 if (!curlm) 141 if (!curlm)
146 { 142 {
147 FD_ZERO(&_current_fd_set); 143 FD_ZERO(&_current_fd_set);
148 if (curl_global_init(CURL_GLOBAL_NOTHING)) 144 if (curl_global_init(CURL_GLOBAL_NOTHING))
149 { 145 {
150 ecore_list_destroy(_url_con_list); 146 EINA_LIST_FREE(_url_con_list, url_con)
151 _url_con_list = NULL; 147 ecore_con_url_destroy(url_con);
152 return 0; 148 return 0;
153 } 149 }
154 150
155 curlm = curl_multi_init(); 151 curlm = curl_multi_init();
156 if (!curlm) 152 if (!curlm)
157 { 153 {
158 ecore_list_destroy(_url_con_list); 154 EINA_LIST_FREE(_url_con_list, url_con)
159 _url_con_list = NULL; 155 ecore_con_url_destroy(url_con);
160 return 0; 156 return 0;
161 } 157 }
162 } 158 }
@@ -176,24 +172,14 @@ EAPI int
176ecore_con_url_shutdown(void) 172ecore_con_url_shutdown(void)
177{ 173{
178#ifdef HAVE_CURL 174#ifdef HAVE_CURL
175 Ecore_Con_Url *url_con;
179 176
180 if (!init_count) 177 if (!init_count)
181 return 0; 178 return 0;
182 179
183 init_count--; 180 init_count--;
184 if (_url_con_list) 181 EINA_LIST_FREE(_url_con_list, url_con)
185 {
186 if (!ecore_list_empty_is(_url_con_list))
187 {
188 Ecore_Con_Url *url_con;
189 while ((url_con = ecore_list_first(_url_con_list)))
190 {
191 ecore_con_url_destroy(url_con); 182 ecore_con_url_destroy(url_con);
192 }
193 }
194 ecore_list_destroy(_url_con_list);
195 _url_con_list = NULL;
196 }
197 183
198 if (curlm) 184 if (curlm)
199 { 185 {
@@ -286,8 +272,7 @@ ecore_con_url_destroy(Ecore_Con_Url *url_con)
286 { 272 {
287 if (url_con->active) 273 if (url_con->active)
288 { 274 {
289 if (ecore_list_find(_url_con_list, ecore_direct_compare, url_con) == url_con) 275 _url_con_list = eina_list_remove(_url_con_list, url_con);
290 ecore_list_remove(_url_con_list);
291 url_con->active = 0; 276 url_con->active = 0;
292 277
293 curl_multi_remove_handle(curlm, url_con->curl_easy); 278 curl_multi_remove_handle(curlm, url_con->curl_easy);
@@ -615,14 +600,14 @@ ecore_con_url_ftp_use_epsv_set(Ecore_Con_Url *url_con, int use_epsv)
615static int 600static int
616_ecore_con_url_suspend_fd_handler(void) 601_ecore_con_url_suspend_fd_handler(void)
617{ 602{
603 Eina_List *l;
618 Ecore_Con_Url *url_con; 604 Ecore_Con_Url *url_con;
619 int deleted = 0; 605 int deleted = 0;
620 606
621 if (!_url_con_list) 607 if (!_url_con_list)
622 return 0; 608 return 0;
623 609
624 ecore_list_first_goto(_url_con_list); 610 EINA_LIST_FOREACH(_url_con_list, l, url_con)
625 while ((url_con = ecore_list_current(_url_con_list)))
626 { 611 {
627 if (url_con->active && url_con->fd_handler) 612 if (url_con->active && url_con->fd_handler)
628 { 613 {
@@ -630,7 +615,6 @@ _ecore_con_url_suspend_fd_handler(void)
630 url_con->fd_handler = NULL; 615 url_con->fd_handler = NULL;
631 deleted++; 616 deleted++;
632 } 617 }
633 ecore_list_next(_url_con_list);
634 } 618 }
635 619
636 return deleted; 620 return deleted;
@@ -639,25 +623,23 @@ _ecore_con_url_suspend_fd_handler(void)
639static int 623static int
640_ecore_con_url_restart_fd_handler(void) 624_ecore_con_url_restart_fd_handler(void)
641{ 625{
626 Eina_List *l;
642 Ecore_Con_Url *url_con; 627 Ecore_Con_Url *url_con;
643 int activated = 0; 628 int activated = 0;
644 629
645 if (!_url_con_list) 630 if (!_url_con_list)
646 return 0; 631 return 0;
647 632
648 ecore_list_first_goto(_url_con_list); 633 EINA_LIST_FOREACH(_url_con_list, l, url_con)
649 while ((url_con = ecore_list_current(_url_con_list)))
650 { 634 {
651 if (url_con->fd_handler == NULL 635 if (url_con->fd_handler == NULL && url_con->fd != -1)
652 && url_con->fd != -1)
653 { 636 {
654 url_con->fd_handler = ecore_main_fd_handler_add(url_con->fd, 637 url_con->fd_handler == ecore_main_fd_handler_add(url_con->fd,
655 url_con->flags, 638 url_con->flags,
656 _ecore_con_url_fd_handler, 639 _ecore_con_url_fd_handler,
657 NULL, NULL, NULL); 640 NULL, NULL, NULL);
658 activated++; 641 activated++;
659 } 642 }
660 ecore_list_next(_url_con_list);
661 } 643 }
662 644
663 return activated; 645 return activated;
@@ -781,7 +763,7 @@ _ecore_con_url_perform(Ecore_Con_Url *url_con)
781 int still_running; 763 int still_running;
782 int completed_immediately = 0; 764 int completed_immediately = 0;
783 765
784 ecore_list_append(_url_con_list, url_con); 766 _url_con_list = eina_list_append(_url_con_list, url_con);
785 767
786 url_con->active = 1; 768 url_con->active = 1;
787 curl_multi_add_handle(curlm, url_con->curl_easy); 769 curl_multi_add_handle(curlm, url_con->curl_easy);
@@ -874,7 +856,9 @@ _ecore_con_url_fd_handler(void *data __UNUSED__, Ecore_Fd_Handler *fd_handler __
874static int 856static int
875_ecore_con_url_process_completed_jobs(Ecore_Con_Url *url_con_to_match) 857_ecore_con_url_process_completed_jobs(Ecore_Con_Url *url_con_to_match)
876{ 858{
859 Eina_List *l;
877 Ecore_Con_Url *url_con; 860 Ecore_Con_Url *url_con;
861 Ecore_Con_Event_Url_Complete *e;
878 CURLMsg *curlmsg; 862 CURLMsg *curlmsg;
879 int n_remaining; 863 int n_remaining;
880 int job_matched = 0; 864 int job_matched = 0;
@@ -885,16 +869,13 @@ _ecore_con_url_process_completed_jobs(Ecore_Con_Url *url_con_to_match)
885 if (curlmsg->msg != CURLMSG_DONE) continue; 869 if (curlmsg->msg != CURLMSG_DONE) continue;
886 870
887 /* find the job which is done */ 871 /* find the job which is done */
888 ecore_list_first_goto(_url_con_list); 872 EINA_LIST_FOREACH(_url_con_list, l, url_con)
889 while ((url_con = ecore_list_current(_url_con_list)))
890 { 873 {
891 if (curlmsg->easy_handle == url_con->curl_easy) 874 if (curlmsg->easy_handle == url_con->curl_easy)
892 { 875 {
893 /* We have found the completed job in our job list */ 876 if (url_con_to_match && (url_con == url_con_to_match))
894 if (url_con_to_match && (url_con == url_con_to_match)) {
895 job_matched = 1; 877 job_matched = 1;
896 } 878 if(url_con->fd != -1)
897 if (url_con->fd != -1)
898 { 879 {
899 FD_CLR(url_con->fd, &_current_fd_set); 880 FD_CLR(url_con->fd, &_current_fd_set);
900 if (url_con->fd_handler) 881 if (url_con->fd_handler)
@@ -902,27 +883,22 @@ _ecore_con_url_process_completed_jobs(Ecore_Con_Url *url_con_to_match)
902 url_con->fd = -1; 883 url_con->fd = -1;
903 url_con->fd_handler = NULL; 884 url_con->fd_handler = NULL;
904 } 885 }
905 ecore_list_remove(_url_con_list); 886 _url_con_list = eina_list_remove(_url_con_list, url_con);
906 url_con->active = 0; 887 url_con->active = 0;
907 {
908 Ecore_Con_Event_Url_Complete *e;
909 e = calloc(1, sizeof(Ecore_Con_Event_Url_Complete)); 888 e = calloc(1, sizeof(Ecore_Con_Event_Url_Complete));
910 if (e) 889 if (e)
911 { 890 {
912 e->url_con = url_con; 891 e->url_con = url_con;
913
914 e->status = 0; 892 e->status = 0;
915 curl_easy_getinfo(curlmsg->easy_handle, CURLINFO_RESPONSE_CODE, &e->status); 893 curl_easy_getinfo(curlmsg->easy_handle, CURLINFO_RESPONSE_CODE, &e->status);
916
917 _url_complete_push_event(ECORE_CON_EVENT_URL_COMPLETE, e); 894 _url_complete_push_event(ECORE_CON_EVENT_URL_COMPLETE, e);
918 } 895 }
919 }
920 curl_multi_remove_handle(curlm, url_con->curl_easy); 896 curl_multi_remove_handle(curlm, url_con->curl_easy);
921 break; 897 break;
922 } 898 }
923 ecore_list_next(_url_con_list);
924 } 899 }
925 } 900 }
901
926 return job_matched; 902 return job_matched;
927} 903}
928 904
diff --git a/legacy/ecore/src/lib/ecore_config/ecore_config_ipc_ecore.c b/legacy/ecore/src/lib/ecore_config/ecore_config_ipc_ecore.c
index ad4ec35a0b..bd2ec03022 100644
--- a/legacy/ecore/src/lib/ecore_config/ecore_config_ipc_ecore.c
+++ b/legacy/ecore/src/lib/ecore_config/ecore_config_ipc_ecore.c
@@ -364,6 +364,7 @@ _ecore_config_ipc_ecore_exit(void **data)
364 } 364 }
365 365
366 ecore_ipc_shutdown(); 366 ecore_ipc_shutdown();
367 ecore_shutdown();
367 368
368 return ret; 369 return ret;
369} 370}
diff --git a/legacy/ecore/src/lib/ecore_evas/ecore_evas_fb.c b/legacy/ecore/src/lib/ecore_evas/ecore_evas_fb.c
index e97d864ad5..6c187a8000 100644
--- a/legacy/ecore/src/lib/ecore_evas/ecore_evas_fb.c
+++ b/legacy/ecore/src/lib/ecore_evas/ecore_evas_fb.c
@@ -23,7 +23,7 @@ static int _ecore_evas_init_count = 0;
23 23
24static int _ecore_evas_fps_debug = 0; 24static int _ecore_evas_fps_debug = 0;
25static char *ecore_evas_default_display = "0"; 25static char *ecore_evas_default_display = "0";
26static Ecore_List *ecore_evas_input_devices = NULL; 26static Eina_List *ecore_evas_input_devices = NULL;
27static Ecore_Evas *ecore_evases = NULL; 27static Ecore_Evas *ecore_evases = NULL;
28static Ecore_Event_Handler *ecore_evas_event_handlers[6] = {NULL, NULL, NULL, NULL, NULL, NULL}; 28static Ecore_Event_Handler *ecore_evas_event_handlers[6] = {NULL, NULL, NULL, NULL, NULL, NULL};
29static Ecore_Idle_Enterer *ecore_evas_idle_enterer = NULL; 29static Ecore_Idle_Enterer *ecore_evas_idle_enterer = NULL;
@@ -76,6 +76,7 @@ static void
76_ecore_evas_fb_lose(void *data __UNUSED__) 76_ecore_evas_fb_lose(void *data __UNUSED__)
77{ 77{
78 Ecore_List2 *l; 78 Ecore_List2 *l;
79 Eina_List *ll;
79 Ecore_Fb_Input_Device *dev; 80 Ecore_Fb_Input_Device *dev;
80 81
81 for (l = (Ecore_List2 *)ecore_evases; l; l = l->next) 82 for (l = (Ecore_List2 *)ecore_evases; l; l = l->next)
@@ -87,8 +88,7 @@ _ecore_evas_fb_lose(void *data __UNUSED__)
87 } 88 }
88 if (ecore_evas_input_devices) 89 if (ecore_evas_input_devices)
89 { 90 {
90 ecore_list_first_goto(ecore_evas_input_devices); 91 EINA_LIST_FOREACH(ecore_evas_input_devices, ll, dev)
91 while ((dev = ecore_list_next(ecore_evas_input_devices)))
92 ecore_fb_input_device_listen(dev, 0); 92 ecore_fb_input_device_listen(dev, 0);
93 } 93 }
94} 94}
@@ -97,6 +97,7 @@ static void
97_ecore_evas_fb_gain(void *data __UNUSED__) 97_ecore_evas_fb_gain(void *data __UNUSED__)
98{ 98{
99 Ecore_List2 *l; 99 Ecore_List2 *l;
100 Eina_List *l;
100 Ecore_Fb_Input_Device *dev; 101 Ecore_Fb_Input_Device *dev;
101 102
102 for (l = (Ecore_List2 *)ecore_evases; l; l = l->next) 103 for (l = (Ecore_List2 *)ecore_evases; l; l = l->next)
@@ -112,8 +113,7 @@ _ecore_evas_fb_gain(void *data __UNUSED__)
112 } 113 }
113 if (ecore_evas_input_devices) 114 if (ecore_evas_input_devices)
114 { 115 {
115 ecore_list_first_goto(ecore_evas_input_devices); 116 EINA_LIST_FOREACH(ecore_evas_input_devices, ll, dev)
116 while ((dev = ecore_list_next(ecore_evas_input_devices)))
117 ecore_fb_input_device_listen(dev, 1); 117 ecore_fb_input_device_listen(dev, 1);
118 } 118 }
119} 119}
@@ -274,7 +274,6 @@ _ecore_evas_fb_init(int w, int h)
274 input_dir = opendir("/dev/input/"); 274 input_dir = opendir("/dev/input/");
275 if (!input_dir) return _ecore_evas_init_count; 275 if (!input_dir) return _ecore_evas_init_count;
276 276
277 ecore_evas_input_devices = ecore_list_new();
278 while ((input_entry = readdir(input_dir))) 277 while ((input_entry = readdir(input_dir)))
279 { 278 {
280 char device_path[256]; 279 char device_path[256];
@@ -295,7 +294,7 @@ _ecore_evas_fb_init(int w, int h)
295 { 294 {
296 ecore_fb_input_device_axis_size_set(device, w, h); 295 ecore_fb_input_device_axis_size_set(device, w, h);
297 ecore_fb_input_device_listen(device,1); 296 ecore_fb_input_device_listen(device,1);
298 ecore_list_append(ecore_evas_input_devices, device); 297 ecore_evas_input_devices = eina_list_append(ecore_evas_input_devices, device);
299 if (!mouse_handled) 298 if (!mouse_handled)
300 { 299 {
301 ecore_evas_event_handlers[2] = ecore_event_handler_add(ECORE_FB_EVENT_MOUSE_BUTTON_DOWN, _ecore_evas_event_mouse_button_down, NULL); 300 ecore_evas_event_handlers[2] = ecore_event_handler_add(ECORE_FB_EVENT_MOUSE_BUTTON_DOWN, _ecore_evas_event_mouse_button_down, NULL);
@@ -309,7 +308,7 @@ _ecore_evas_fb_init(int w, int h)
309 else if ((caps & ECORE_FB_INPUT_DEVICE_CAP_KEYS_OR_BUTTONS) && !(caps & ECORE_FB_INPUT_DEVICE_CAP_ABSOLUTE)) 308 else if ((caps & ECORE_FB_INPUT_DEVICE_CAP_KEYS_OR_BUTTONS) && !(caps & ECORE_FB_INPUT_DEVICE_CAP_ABSOLUTE))
310 { 309 {
311 ecore_fb_input_device_listen(device,1); 310 ecore_fb_input_device_listen(device,1);
312 ecore_list_append(ecore_evas_input_devices, device); 311 ecore_evas_input_devices = eina_list_append(ecore_evas_input_devices, device);
313 if (!keyboard_handled) 312 if (!keyboard_handled)
314 { 313 {
315 ecore_evas_event_handlers[0] = ecore_event_handler_add(ECORE_FB_EVENT_KEY_DOWN, _ecore_evas_event_key_down, NULL); 314 ecore_evas_event_handlers[0] = ecore_event_handler_add(ECORE_FB_EVENT_KEY_DOWN, _ecore_evas_event_key_down, NULL);
@@ -480,6 +479,7 @@ _ecore_evas_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int h
480static void 479static void
481_ecore_evas_fullscreen_set(Ecore_Evas *ee, int on) 480_ecore_evas_fullscreen_set(Ecore_Evas *ee, int on)
482{ 481{
482 Eina_List *l;
483 int resized = 0; 483 int resized = 0;
484 484
485 if (((ee->prop.fullscreen) && (on)) || 485 if (((ee->prop.fullscreen) && (on)) ||
@@ -520,9 +520,8 @@ _ecore_evas_fullscreen_set(Ecore_Evas *ee, int on)
520 { 520 {
521 Ecore_Fb_Input_Device *dev; 521 Ecore_Fb_Input_Device *dev;
522 522
523 ecore_list_first_goto(ecore_evas_input_devices); 523 EINA_LIST_FOREACH(ecore_evas_input_devices, l, dev)
524 while ((dev = ecore_list_next(ecore_evas_input_devices))) 524 ecore_fb_input_device_axis_size_set(dev, ee->wn ee->h);
525 ecore_fb_input_device_axis_size_set(dev, ee->w, ee->h);
526 } 525 }
527 if (resized) 526 if (resized)
528 { 527 {
diff --git a/legacy/ecore/src/lib/ecore_fb/ecore_fb_li.c b/legacy/ecore/src/lib/ecore_fb/ecore_fb_li.c
index bc0e11f009..547aef42dd 100644
--- a/legacy/ecore/src/lib/ecore_fb/ecore_fb_li.c
+++ b/legacy/ecore/src/lib/ecore_fb/ecore_fb_li.c
@@ -11,7 +11,7 @@
11 11
12#define CLICK_THRESHOLD_DEFAULT 0.25 12#define CLICK_THRESHOLD_DEFAULT 0.25
13 13
14static Ecore_List *_ecore_fb_li_devices = NULL; 14static Eina_List *_ecore_fb_li_devices = NULL;
15 15
16static const char *_ecore_fb_li_kbd_syms[128 * 6] = 16static const char *_ecore_fb_li_kbd_syms[128 * 6] =
17{ 17{
@@ -374,9 +374,6 @@ ecore_fb_input_device_open(const char *dev)
374 device = calloc(1, sizeof(Ecore_Fb_Input_Device)); 374 device = calloc(1, sizeof(Ecore_Fb_Input_Device));
375 if(!device) return NULL; 375 if(!device) return NULL;
376 376
377 if(!_ecore_fb_li_devices)
378 _ecore_fb_li_devices = ecore_list_new();
379
380 if((fd = open(dev, O_RDONLY, O_NONBLOCK)) < 0) 377 if((fd = open(dev, O_RDONLY, O_NONBLOCK)) < 0)
381 { 378 {
382 fprintf(stderr, "[ecore_fb_li:device_open] %s %s", dev, strerror(errno)); 379 fprintf(stderr, "[ecore_fb_li:device_open] %s %s", dev, strerror(errno));
@@ -433,7 +430,7 @@ ecore_fb_input_device_open(const char *dev)
433 break; 430 break;
434 } 431 }
435 } 432 }
436 ecore_list_append(_ecore_fb_li_devices, device); 433 _ecore_fb_li_devices = eina_list_append(_ecore_fb_li_devices, device);
437 return device; 434 return device;
438 435
439 error_caps: 436 error_caps:
@@ -450,8 +447,7 @@ ecore_fb_input_device_close(Ecore_Fb_Input_Device *dev)
450 /* close the fd */ 447 /* close the fd */
451 close(dev->fd); 448 close(dev->fd);
452 /* remove the element from the list */ 449 /* remove the element from the list */
453 if(ecore_list_goto(_ecore_fb_li_devices, dev)) 450 _ecore_fb_li_devices = eina_list_remove(_ecore_fb_li_devices, dev);
454 ecore_list_remove(_ecore_fb_li_devices);
455 free(dev); 451 free(dev);
456} 452}
457 453
diff --git a/legacy/ecore/src/lib/ecore_file/Ecore_File.h b/legacy/ecore/src/lib/ecore_file/Ecore_File.h
index 03c2355f22..5bb8f0b1da 100644
--- a/legacy/ecore/src/lib/ecore_file/Ecore_File.h
+++ b/legacy/ecore/src/lib/ecore_file/Ecore_File.h
@@ -84,7 +84,7 @@ extern "C" {
84 EAPI int ecore_file_can_write (const char *file); 84 EAPI int ecore_file_can_write (const char *file);
85 EAPI int ecore_file_can_exec (const char *file); 85 EAPI int ecore_file_can_exec (const char *file);
86 EAPI char *ecore_file_readlink (const char *link); 86 EAPI char *ecore_file_readlink (const char *link);
87 EAPI Ecore_List *ecore_file_ls (const char *dir); 87 EAPI Eina_List *ecore_file_ls (const char *dir);
88 EAPI char *ecore_file_app_exe_get (const char *app); 88 EAPI char *ecore_file_app_exe_get (const char *app);
89 EAPI char *ecore_file_escape_name (const char *filename); 89 EAPI char *ecore_file_escape_name (const char *filename);
90 EAPI char *ecore_file_strip_ext (const char *file); 90 EAPI char *ecore_file_strip_ext (const char *file);
@@ -100,7 +100,7 @@ extern "C" {
100 100
101 EAPI int ecore_file_path_dir_exists(const char *in_dir); 101 EAPI int ecore_file_path_dir_exists(const char *in_dir);
102 EAPI int ecore_file_app_installed(const char *exe); 102 EAPI int ecore_file_app_installed(const char *exe);
103 EAPI Ecore_List *ecore_file_app_list(void); 103 EAPI Eina_List *ecore_file_app_list(void);
104 104
105 EAPI int ecore_file_download(const char *url, const char *dst, 105 EAPI int ecore_file_download(const char *url, const char *dst,
106 void (*completion_cb)(void *data, 106 void (*completion_cb)(void *data,
diff --git a/legacy/ecore/src/lib/ecore_file/ecore_file.c b/legacy/ecore/src/lib/ecore_file/ecore_file.c
index eb3f4f0982..6efe5e0502 100644
--- a/legacy/ecore/src/lib/ecore_file/ecore_file.c
+++ b/legacy/ecore/src/lib/ecore_file/ecore_file.c
@@ -509,36 +509,32 @@ ecore_file_readlink(const char *link)
509 * For more information see the manual pages of strcoll and setlocale. 509 * For more information see the manual pages of strcoll and setlocale.
510 * The list will not contain the directory entries for '.' and '..'. 510 * The list will not contain the directory entries for '.' and '..'.
511 * @param dir The name of the directory to list 511 * @param dir The name of the directory to list
512 * @return Return an Ecore_List containing all the files in the directory; 512 * @return Return an Eina_List containing all the files in the directory;
513 * on failure it returns NULL. 513 * on failure it returns NULL.
514 */ 514 */
515EAPI Ecore_List * 515EAPI Eina_List *
516ecore_file_ls(const char *dir) 516ecore_file_ls(const char *dir)
517{ 517{
518 char *f; 518 char *f;
519 DIR *dirp; 519 DIR *dirp;
520 struct dirent *dp; 520 struct dirent *dp;
521 Ecore_List *list; 521 Eina_List *list = NULL;
522 522
523 dirp = opendir(dir); 523 dirp = opendir(dir);
524 if (!dirp) return NULL; 524 if (!dirp) return NULL;
525 525
526 list = ecore_list_new();
527 ecore_list_free_cb_set(list, free);
528
529 while ((dp = readdir(dirp))) 526 while ((dp = readdir(dirp)))
530 { 527 {
531 if ((strcmp(dp->d_name, ".")) && (strcmp(dp->d_name, ".."))) 528 if ((strcmp(dp->d_name, ".")) && (strcmp(dp->d_name, "..")))
532 { 529 {
533 f = strdup(dp->d_name); 530 f = strdup(dp->d_name);
534 ecore_list_append(list, f); 531 list = eina_list_append(list, f);
535 } 532 }
536 } 533 }
537 closedir(dirp); 534 closedir(dirp);
538 535
539 ecore_list_sort(list, ECORE_COMPARE_CB(strcoll), ECORE_SORT_MIN); 536 list = eina_list_sort(list, ECORE_SORT_MIN, ECORE_COMPARE_CB(strcoll));
540 537
541 ecore_list_first_goto(list);
542 return list; 538 return list;
543} 539}
544 540
diff --git a/legacy/ecore/src/lib/ecore_file/ecore_file_download.c b/legacy/ecore/src/lib/ecore_file/ecore_file_download.c
index 4506f72f7f..c855c7135e 100644
--- a/legacy/ecore/src/lib/ecore_file/ecore_file_download.c
+++ b/legacy/ecore/src/lib/ecore_file/ecore_file_download.c
@@ -45,7 +45,7 @@ static void _ecore_file_download_abort(Ecore_File_Download_Job *job);
45static int init = 0; 45static int init = 0;
46static Ecore_Event_Handler *_url_complete_handler = NULL; 46static Ecore_Event_Handler *_url_complete_handler = NULL;
47static Ecore_Event_Handler *_url_progress_download = NULL; 47static Ecore_Event_Handler *_url_progress_download = NULL;
48static Ecore_List *_job_list; 48static Eina_List *_job_list;
49 49
50EAPI int 50EAPI int
51ecore_file_download_init(void) 51ecore_file_download_init(void)
@@ -60,11 +60,6 @@ ecore_file_download_init(void)
60 _url_progress_download = ecore_event_handler_add(ECORE_CON_EVENT_URL_PROGRESS, _ecore_file_download_url_progress_cb, NULL); 60 _url_progress_download = ecore_event_handler_add(ECORE_CON_EVENT_URL_PROGRESS, _ecore_file_download_url_progress_cb, NULL);
61#endif 61#endif
62 } 62 }
63 if (!_job_list)
64 {
65 _job_list = ecore_list_new();
66 if (!_job_list) return 0;
67 }
68 63
69 return 1; 64 return 1;
70#else 65#else
@@ -84,9 +79,7 @@ ecore_file_download_shutdown(void)
84 ecore_event_handler_del(_url_progress_download); 79 ecore_event_handler_del(_url_progress_download);
85 _url_complete_handler = NULL; 80 _url_complete_handler = NULL;
86 _url_progress_download = NULL; 81 _url_progress_download = NULL;
87 if (_job_list) 82 ecore_file_download_abort_all();
88 ecore_list_destroy(_job_list);
89 _job_list = NULL;
90 } 83 }
91 84
92 return ecore_con_url_shutdown(); 85 return ecore_con_url_shutdown();
@@ -98,16 +91,10 @@ ecore_file_download_shutdown(void)
98EAPI void 91EAPI void
99ecore_file_download_abort_all(void) 92ecore_file_download_abort_all(void)
100{ 93{
101 if (!ecore_list_empty_is(_job_list))
102 {
103 Ecore_File_Download_Job *job; 94 Ecore_File_Download_Job *job;
104 95
105 while ((job = ecore_list_first_remove(_job_list))) 96 EINA_LIST_FREE(_job_list, job)
106 {
107 _ecore_file_download_abort(job); 97 _ecore_file_download_abort(job);
108 }
109 }
110 ecore_list_clear(_job_list);
111} 98}
112 99
113/** 100/**
@@ -212,10 +199,10 @@ _ecore_file_download_url_complete_cb(void *data, int type, void *event)
212 Ecore_Con_Event_Url_Complete *ev = event; 199 Ecore_Con_Event_Url_Complete *ev = event;
213 Ecore_File_Download_Job *job; 200 Ecore_File_Download_Job *job;
214 201
215 job = ecore_list_find(_job_list, _ecore_file_download_url_compare_job, ev->url_con); 202 job = eina_list_search_unsorted(_job_list, _ecore_file_download_url_compare_job, ev->url_con);
216 if (!ECORE_MAGIC_CHECK(job, ECORE_MAGIC_FILE_DOWNLOAD_JOB)) return 1; 203 if (!ECORE_MAGIC_CHECK(job, ECORE_MAGIC_FILE_DOWNLOAD_JOB)) return 1;
217 204
218 ecore_list_remove(_job_list); 205 _job_list = eina_list_remove(_job_list, job);
219 206
220 if (job->completion_cb) 207 if (job->completion_cb)
221 job->completion_cb(ecore_con_url_data_get(job->url_con), job->dst, !ev->status); 208 job->completion_cb(ecore_con_url_data_get(job->url_con), job->dst, !ev->status);
@@ -233,7 +220,7 @@ _ecore_file_download_url_progress_cb(void *data, int type, void *event)
233 Ecore_Con_Event_Url_Progress *ev = event; 220 Ecore_Con_Event_Url_Progress *ev = event;
234 Ecore_File_Download_Job *job; 221 Ecore_File_Download_Job *job;
235 222
236 job = ecore_list_find(_job_list, _ecore_file_download_url_compare_job, ev->url_con); 223 job = eina_list_search_unsorted(_job_list, _ecore_file_download_url_compare_job, ev->url_con);
237 if (!ECORE_MAGIC_CHECK(job, ECORE_MAGIC_FILE_DOWNLOAD_JOB)) return 1; 224 if (!ECORE_MAGIC_CHECK(job, ECORE_MAGIC_FILE_DOWNLOAD_JOB)) return 1;
238 225
239 if (job->progress_cb) 226 if (job->progress_cb)
@@ -241,7 +228,7 @@ _ecore_file_download_url_progress_cb(void *data, int type, void *event)
241 (long int) ev->down.total, (long int) ev->down.now, 228 (long int) ev->down.total, (long int) ev->down.now,
242 (long int) ev->up.total, (long int) ev->up.now) != 0) 229 (long int) ev->up.total, (long int) ev->up.now) != 0)
243 { 230 {
244 ecore_list_remove(_job_list); 231 _job_list = eina_list_remove(_job_list, job);
245 _ecore_file_download_abort(job); 232 _ecore_file_download_abort(job);
246 } 233 }
247 234
@@ -285,7 +272,7 @@ _ecore_file_download_curl(const char *url, const char *dst,
285 272
286 job->completion_cb = completion_cb; 273 job->completion_cb = completion_cb;
287 job->progress_cb = progress_cb; 274 job->progress_cb = progress_cb;
288 ecore_list_append(_job_list, job); 275 _job_list = eina_list_append(_job_list, job);
289 276
290 ecore_con_url_send(job->url_con, NULL, 0, NULL); 277 ecore_con_url_send(job->url_con, NULL, 0, NULL);
291 278
diff --git a/legacy/ecore/src/lib/ecore_file/ecore_file_monitor_poll.c b/legacy/ecore/src/lib/ecore_file/ecore_file_monitor_poll.c
index 6573539dc1..76bdc702ea 100644
--- a/legacy/ecore/src/lib/ecore_file/ecore_file_monitor_poll.c
+++ b/legacy/ecore/src/lib/ecore_file/ecore_file_monitor_poll.c
@@ -117,29 +117,28 @@ ecore_file_monitor_poll_add(const char *path,
117 if (ecore_file_is_dir(em->path)) 117 if (ecore_file_is_dir(em->path))
118 { 118 {
119 /* Check for subdirs */ 119 /* Check for subdirs */
120 Ecore_List *files; 120 Eina_List *files;
121 char *file; 121 char *file;
122 122
123 files = ecore_file_ls(em->path); 123 files = ecore_file_ls(em->path);
124 if (files) 124 EINA_LIST_FREE(files, file)
125 {
126 while ((file = ecore_list_next(files)))
127 { 125 {
128 Ecore_File *f; 126 Ecore_File *f;
129 char buf[PATH_MAX]; 127 char buf[PATH_MAX];
130 128
131 f = calloc(1, sizeof(Ecore_File)); 129 f = calloc(1, sizeof(Ecore_File));
132 if (!f) 130 if (!f)
131 {
132 free(file);
133 continue; 133 continue;
134 }
134 135
135 snprintf(buf, sizeof(buf), "%s/%s", em->path, file); 136 snprintf(buf, sizeof(buf), "%s/%s", em->path, file);
136 f->name = strdup(file); 137 f->name = file;
137 f->mtime = ecore_file_mod_time(buf); 138 f->mtime = ecore_file_mod_time(buf);
138 f->is_dir = ecore_file_is_dir(buf); 139 f->is_dir = ecore_file_is_dir(buf);
139 em->files = _ecore_list2_append(em->files, f); 140 em->files = _ecore_list2_append(em->files, f);
140 } 141 }
141 ecore_list_destroy(files);
142 }
143 } 142 }
144 } 143 }
145 else 144 else
@@ -307,7 +306,8 @@ _ecore_file_monitor_poll_check(Ecore_File_Monitor *em)
307 /* Check for new files */ 306 /* Check for new files */
308 if (ECORE_FILE_MONITOR_POLL(em)->mtime < mtime) 307 if (ECORE_FILE_MONITOR_POLL(em)->mtime < mtime)
309 { 308 {
310 Ecore_List *files; 309 Eina_List *files;
310 Eina_List *l;
311 char *file; 311 char *file;
312 312
313 /* Files have been added or removed */ 313 /* Files have been added or removed */
@@ -315,7 +315,7 @@ _ecore_file_monitor_poll_check(Ecore_File_Monitor *em)
315 if (files) 315 if (files)
316 { 316 {
317 /* Are we a directory? We should check first, rather than rely on null here*/ 317 /* Are we a directory? We should check first, rather than rely on null here*/
318 while ((file = ecore_list_next(files))) 318 EINA_LIST_FOREACH(files, l, file)
319 { 319 {
320 Ecore_File *f; 320 Ecore_File *f;
321 char buf[PATH_MAX]; 321 char buf[PATH_MAX];
@@ -331,7 +331,7 @@ _ecore_file_monitor_poll_check(Ecore_File_Monitor *em)
331 331
332 f->name = strdup(file); 332 f->name = strdup(file);
333 f->mtime = ecore_file_mod_time(buf); 333 f->mtime = ecore_file_mod_time(buf);
334 f->is_dir = ecore_file_is_dir(buf); 334 f->is_dir = ecore_file_mod_time(buf);
335 if (f->is_dir) 335 if (f->is_dir)
336 event = ECORE_FILE_EVENT_CREATED_DIRECTORY; 336 event = ECORE_FILE_EVENT_CREATED_DIRECTORY;
337 else 337 else
@@ -339,7 +339,12 @@ _ecore_file_monitor_poll_check(Ecore_File_Monitor *em)
339 em->func(em->data, em, event, buf); 339 em->func(em->data, em, event, buf);
340 em->files = _ecore_list2_append(em->files, f); 340 em->files = _ecore_list2_append(em->files, f);
341 } 341 }
342 ecore_list_destroy(files); 342 while (files)
343 {
344 file = eina_list_data_get(files);
345 free(file);
346 files = eina_list_remove_list(files, files);
347 }
343 } 348 }
344 349
345 if (!ecore_file_is_dir(em->path)) 350 if (!ecore_file_is_dir(em->path))
diff --git a/legacy/ecore/src/lib/ecore_file/ecore_file_path.c b/legacy/ecore/src/lib/ecore_file/ecore_file_path.c
index de2b4dc4d4..dd1e95f0ec 100644
--- a/legacy/ecore/src/lib/ecore_file/ecore_file_path.c
+++ b/legacy/ecore/src/lib/ecore_file/ecore_file_path.c
@@ -12,36 +12,35 @@
12#include "ecore_file_private.h" 12#include "ecore_file_private.h"
13 13
14static int init = 0; 14static int init = 0;
15static Ecore_List *__ecore_file_path_bin = NULL; 15static Eina_List *__ecore_file_path_bin = NULL;
16 16
17static Ecore_List *_ecore_file_path_from_env(const char *env); 17static Eina_List *_ecore_file_path_from_env(const char *env);
18 18
19int 19int
20ecore_file_path_init(void) 20ecore_file_path_init(void)
21{ 21{
22 if (++init != 1) return init; 22 if (++init != 1) return init;
23 __ecore_file_path_bin = _ecore_file_path_from_env("PATH"); 23 __ecore_file_path_bin = _ecore_file_path_from_env("PATH");
24 ecore_list_free_cb_set(__ecore_file_path_bin, free);
25 return init; 24 return init;
26} 25}
27 26
28int 27int
29ecore_file_path_shutdown(void) 28ecore_file_path_shutdown(void)
30{ 29{
30 char *dir;
31
31 if (--init != 0) return init; 32 if (--init != 0) return init;
32 ecore_list_destroy(__ecore_file_path_bin); 33 EINA_LIST_FREE(__ecore_file_path_bin, dir)
33 __ecore_file_path_bin = NULL; 34 free(dir);
34 return init; 35 return init;
35} 36}
36 37
37Ecore_List * 38Eina_List *
38_ecore_file_path_from_env(const char *env) 39_ecore_file_path_from_env(const char *env)
39{ 40{
40 Ecore_List *path; 41 Eina_List *path = NULL;
41 char *env_path, *p, *last; 42 char *env_path, *p, *last;
42 43
43 path = ecore_list_new();
44
45 env_path = getenv(env); 44 env_path = getenv(env);
46 if (!env_path) 45 if (!env_path)
47 return path; 46 return path;
@@ -56,12 +55,12 @@ _ecore_file_path_from_env(const char *env)
56 if (!*p) 55 if (!*p)
57 { 56 {
58 if (!ecore_file_path_dir_exists(last)) 57 if (!ecore_file_path_dir_exists(last))
59 ecore_list_append(path, strdup(last)); 58 path = eina_list_append(path, strdup(last));
60 last = p + 1; 59 last = p + 1;
61 } 60 }
62 } 61 }
63 if (p > last) 62 if (p > last)
64 ecore_list_append(path, strdup(last)); 63 path = eina_list_append(path, strdup(last));
65 64
66 free(env_path); 65 free(env_path);
67 return path; 66 return path;
@@ -75,14 +74,16 @@ _ecore_file_path_from_env(const char *env)
75EAPI int 74EAPI int
76ecore_file_path_dir_exists(const char *in_dir) 75ecore_file_path_dir_exists(const char *in_dir)
77{ 76{
77 Eina_List *l;
78 char *dir; 78 char *dir;
79 79
80 if (!__ecore_file_path_bin) return 0; 80 if (!__ecore_file_path_bin) return 0;
81 ecore_list_first_goto(__ecore_file_path_bin); 81 EINA_LIST_FOREACH(__ecore_file_path_bin, l, dir)
82 while ((dir = ecore_list_next(__ecore_file_path_bin)) != NULL)
83 { 82 {
84 if (!strcmp(dir, in_dir)) return 1; 83 if (strcmp(dir, in_dir))
84 return 1;
85 } 85 }
86
86 return 0; 87 return 0;
87} 88}
88 89
@@ -96,50 +97,47 @@ ecore_file_path_dir_exists(const char *in_dir)
96EAPI int 97EAPI int
97ecore_file_app_installed(const char *exe) 98ecore_file_app_installed(const char *exe)
98{ 99{
100 Eina_List *l;
99 char *dir; 101 char *dir;
100 char buf[PATH_MAX]; 102 char buf[PATH_MAX];
101 103
102 if (!exe) return 0; 104 if (!exe) return 0;
103 if (ecore_file_can_exec(exe)) return 1; 105 if (ecore_file_can_exec(exe)) return 1;
104 106
105 ecore_list_first_goto(__ecore_file_path_bin); 107 EINA_LIST_FOREACH(__ecore_file_path_bin, l, dir)
106 while ((dir = ecore_list_next(__ecore_file_path_bin)) != NULL)
107 { 108 {
108 snprintf(buf, sizeof(buf), "%s/%s", dir, exe); 109 snprintf(buf, sizeof(buf), "%s/%s", dir, exe);
109 if (ecore_file_can_exec(buf)) return 1; 110 if (ecore_file_can_exec(buf))
111 return 1;
110 } 112 }
113
111 return 0; 114 return 0;
112} 115}
113 116
114/** 117/**
115 * Get a list of all the applications installed on the system 118 * Get a list of all the applications installed on the system
116 * @return An Ecore_List containing all the executable files in the system 119 * @return An Eina_List containing all the executable files in the system
117 */ 120 */
118EAPI Ecore_List * 121EAPI Eina_List *
119ecore_file_app_list(void) 122ecore_file_app_list(void)
120{ 123{
121 Ecore_List *list, *files; 124 Eina_List *list = NULL;
125 Eina_List *files;
126 Eina_List *l;
122 char buf[PATH_MAX], *dir, *exe; 127 char buf[PATH_MAX], *dir, *exe;
123 128
124 list = ecore_list_new(); 129 EINA_LIST_FOREACH(__ecore_file_path_bin, l, dir)
125 if (!list) return NULL;
126 ecore_list_free_cb_set(list, free);
127 ecore_list_first_goto(__ecore_file_path_bin);
128 while ((dir = ecore_list_next(__ecore_file_path_bin)) != NULL)
129 { 130 {
130 files = ecore_file_ls(dir); 131 files = ecore_file_ls(dir);
131 if (files) 132 EINA_LIST_FREE(files, exe)
132 {
133 ecore_list_first_goto(files);
134 while ((exe = ecore_list_next(files)) != NULL)
135 { 133 {
136 snprintf(buf, sizeof(buf), "%s/%s", dir, exe); 134 snprintf(buf, sizeof(buf), "%s/%s", dir, exe);
137 if ((ecore_file_can_exec(buf)) && 135 if ((ecore_file_can_exec(buf)) &&
138 (!ecore_file_is_dir(buf))) 136 (!ecore_file_is_dir(buf)))
139 ecore_list_append(list, strdup(buf)); 137 list = eina_list_append(list, strdup(buf));
140 } 138 free(exe);
141 ecore_list_destroy(files);
142 } 139 }
143 } 140 }
141
144 return list; 142 return list;
145} 143}
diff --git a/legacy/ecore/src/lib/ecore_imf/Ecore_IMF.h b/legacy/ecore/src/lib/ecore_imf/Ecore_IMF.h
index 71f890f27c..1ae870846f 100644
--- a/legacy/ecore/src/lib/ecore_imf/Ecore_IMF.h
+++ b/legacy/ecore/src/lib/ecore_imf/Ecore_IMF.h
@@ -294,8 +294,8 @@ extern "C" {
294 EAPI int ecore_imf_init(void); 294 EAPI int ecore_imf_init(void);
295 EAPI int ecore_imf_shutdown(void); 295 EAPI int ecore_imf_shutdown(void);
296 296
297 EAPI Ecore_List *ecore_imf_context_available_ids_get(void); 297 EAPI Eina_List *ecore_imf_context_available_ids_get(void);
298 EAPI Ecore_List *ecore_imf_context_available_ids_by_canvas_type_get(const char *canvas_type); 298 EAPI Eina_List *ecore_imf_context_available_ids_by_canvas_type_get(const char *canvas_type);
299 EAPI const char *ecore_imf_context_default_id_get(void); 299 EAPI const char *ecore_imf_context_default_id_get(void);
300 EAPI const char *ecore_imf_context_default_id_by_canvas_type_get(const char *canvas_type); 300 EAPI const char *ecore_imf_context_default_id_by_canvas_type_get(const char *canvas_type);
301 EAPI const Ecore_IMF_Context_Info *ecore_imf_context_info_by_id_get(const char *id); 301 EAPI const Ecore_IMF_Context_Info *ecore_imf_context_info_by_id_get(const char *id);
diff --git a/legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c b/legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c
index 827b794ec1..d8b7ce1104 100644
--- a/legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c
+++ b/legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c
@@ -24,20 +24,20 @@
24/** 24/**
25 * Get the list of the available Input Method Context ids. 25 * Get the list of the available Input Method Context ids.
26 * 26 *
27 * Note that the caller is responsible for freeing the Ecore_List 27 * Note that the caller is responsible for freeing the Eina_List
28 * when finished with it. There is no need to finish the list strings. 28 * when finished with it. There is no need to finish the list strings.
29 * 29 *
30 * @return Return an Ecore_List of strings; 30 * @return Return an EIna_List of strings;
31 * on failure it returns NULL. 31 * on failure it returns NULL.
32 * @ingroup Ecore_IMF_Context_Group 32 * @ingroup Ecore_IMF_Context_Group
33 */ 33 */
34EAPI Ecore_List * 34EAPI Eina_List *
35ecore_imf_context_available_ids_get(void) 35ecore_imf_context_available_ids_get(void)
36{ 36{
37 return ecore_imf_module_context_ids_get(); 37 return ecore_imf_module_context_ids_get();
38} 38}
39 39
40EAPI Ecore_List * 40EAPI Eina_List *
41ecore_imf_context_available_ids_by_canvas_type_get(const char *canvas_type) 41ecore_imf_context_available_ids_by_canvas_type_get(const char *canvas_type)
42{ 42{
43 return ecore_imf_module_context_ids_by_canvas_type_get(canvas_type); 43 return ecore_imf_module_context_ids_by_canvas_type_get(canvas_type);
@@ -85,7 +85,7 @@ EAPI const char *
85ecore_imf_context_default_id_by_canvas_type_get(const char *canvas_type) 85ecore_imf_context_default_id_by_canvas_type_get(const char *canvas_type)
86{ 86{
87 const char *id; 87 const char *id;
88 Ecore_List *modules; 88 Eina_List *modules;
89 Ecore_IMF_Module *module; 89 Ecore_IMF_Module *module;
90 char *locale; 90 char *locale;
91 char *tmp; 91 char *tmp;
@@ -113,8 +113,7 @@ ecore_imf_context_default_id_by_canvas_type_get(const char *canvas_type)
113 113
114 id = NULL; 114 id = NULL;
115 115
116 ecore_list_first_goto(modules); 116 EINA_LIST_FREE(modules, module)
117 while ((module = ecore_list_next(modules)))
118 { 117 {
119 if (canvas_type && 118 if (canvas_type &&
120 strcmp(module->info->canvas_type, canvas_type) == 0) 119 strcmp(module->info->canvas_type, canvas_type) == 0)
@@ -135,7 +134,6 @@ ecore_imf_context_default_id_by_canvas_type_get(const char *canvas_type)
135 p = q ? q + 1 : NULL; 134 p = q ? q + 1 : NULL;
136 } 135 }
137 } 136 }
138 ecore_list_destroy(modules);
139 137
140 free(locale); 138 free(locale);
141 return id; 139 return id;
diff --git a/legacy/ecore/src/lib/ecore_imf/ecore_imf_module.c b/legacy/ecore/src/lib/ecore_imf/ecore_imf_module.c
index 78de2dc98e..07fd849168 100644
--- a/legacy/ecore/src/lib/ecore_imf/ecore_imf_module.c
+++ b/legacy/ecore/src/lib/ecore_imf/ecore_imf_module.c
@@ -66,33 +66,25 @@ ecore_imf_module_shutdown(void)
66static Eina_Bool 66static Eina_Bool
67_hash_module_available_get(const Eina_Hash *hash, int *data, void *list) 67_hash_module_available_get(const Eina_Hash *hash, int *data, void *list)
68{ 68{
69 ecore_list_append(list, data); 69 *(Eina_List**)list = eina_list_append(*(Eina_List**)list, data);
70 return EINA_TRUE; 70 return EINA_TRUE;
71} 71}
72 72
73Ecore_List * 73Eina_List *
74ecore_imf_module_available_get(void) 74ecore_imf_module_available_get(void)
75{ 75{
76 Ecore_List *values; 76 Eina_List *values = NULL;
77 Eina_Iterator *it = NULL; 77 Eina_Iterator *it = NULL;
78 78
79 if (!modules) return NULL; 79 if (!modules) return NULL;
80 80
81 values = ecore_list_new();
82 if (!values) return NULL;
83
84 it = eina_hash_iterator_data_new(modules); 81 it = eina_hash_iterator_data_new(modules);
85 if (!it) 82 if (!it)
86 {
87 ecore_list_destroy(values);
88 return NULL; 83 return NULL;
89 }
90 84
91 eina_iterator_foreach(it, EINA_EACH(_hash_module_available_get), values); 85 eina_iterator_foreach(it, EINA_EACH(_hash_module_available_get), &values);
92 eina_iterator_free(it); 86 eina_iterator_free(it);
93 87
94 ecore_list_first_goto(values);
95
96 return values; 88 return values;
97} 89}
98 90
@@ -128,29 +120,23 @@ ecore_imf_module_context_create(const char *ctx_id)
128static Eina_Bool 120static Eina_Bool
129_hash_ids_get(const Eina_Hash *hash, const char *key, void *list) 121_hash_ids_get(const Eina_Hash *hash, const char *key, void *list)
130{ 122{
131 ecore_list_append(list, key); 123 *(Eina_List**)list = eina_list_append(*(Eina_List**)list, key);
132 return EINA_TRUE; 124 return EINA_TRUE;
133} 125}
134 126
135Ecore_List * 127Eina_List *
136ecore_imf_module_context_ids_get(void) 128ecore_imf_module_context_ids_get(void)
137{ 129{
138 Ecore_List *l = NULL; 130 Eina_List *l = NULL;
139 Eina_Iterator *it = NULL; 131 Eina_Iterator *it = NULL;
140 132
141 if (!modules) return NULL; 133 if (!modules) return NULL;
142 134
143 l = ecore_list_new();
144 if (!l) return NULL;
145
146 it = eina_hash_iterator_key_new(modules); 135 it = eina_hash_iterator_key_new(modules);
147 if (!it) 136 if (!it)
148 {
149 ecore_list_destroy(l);
150 return NULL; 137 return NULL;
151 }
152 138
153 eina_iterator_foreach(it, EINA_EACH(_hash_ids_get), l); 139 eina_iterator_foreach(it, EINA_EACH(_hash_ids_get), &l);
154 eina_iterator_free(it); 140 eina_iterator_free(it);
155 141
156 return l; 142 return l;
@@ -163,16 +149,16 @@ _hash_ids_by_canvas_type_get(const Eina_Hash *hash, void *data, void *fdata)
163 Ecore_IMF_Selector *selector = fdata; 149 Ecore_IMF_Selector *selector = fdata;
164 150
165 if (!strcmp(module->info->canvas_type, selector->toselect)) 151 if (!strcmp(module->info->canvas_type, selector->toselect))
166 ecore_list_append(selector->selected, (void *)module->info->id); 152 selector->selected = eina_list_append(selector->selected, (void *)module->info->id);
167 153
168 return EINA_TRUE; 154 return EINA_TRUE;
169} 155}
170 156
171Ecore_List * 157Eina_List *
172ecore_imf_module_context_ids_by_canvas_type_get(const char *canvas_type) 158ecore_imf_module_context_ids_by_canvas_type_get(const char *canvas_type)
173{ 159{
174 Ecore_IMF_Selector selector; 160 Ecore_IMF_Selector selector;
175 Ecore_List *values; 161 Eina_List *values = NULL;
176 Eina_Iterator *it = NULL; 162 Eina_Iterator *it = NULL;
177 163
178 if (!modules) return NULL; 164 if (!modules) return NULL;
@@ -180,30 +166,22 @@ ecore_imf_module_context_ids_by_canvas_type_get(const char *canvas_type)
180 if (!canvas_type) 166 if (!canvas_type)
181 return ecore_imf_module_context_ids_get(); 167 return ecore_imf_module_context_ids_get();
182 168
183 values = ecore_list_new();
184 if (!values) return NULL;
185
186 it = eina_hash_iterator_data_new(modules); 169 it = eina_hash_iterator_data_new(modules);
187 if (!it) 170 if (!it)
188 {
189 ecore_list_destroy(values);
190 return NULL; 171 return NULL;
191 }
192 172
193 selector.toselect = canvas_type; 173 selector.toselect = canvas_type;
194 selector.selected = values; 174 selector.selected = values;
195 eina_iterator_foreach(it, EINA_EACH(_hash_ids_by_canvas_type_get), &selector); 175 eina_iterator_foreach(it, EINA_EACH(_hash_ids_by_canvas_type_get), &selector);
196 eina_iterator_free(it); 176 eina_iterator_free(it);
197 177
198 ecore_list_first_goto(values);
199
200 return values; 178 return values;
201} 179}
202 180
203static void 181static void
204_ecore_imf_module_load_all(void) 182_ecore_imf_module_load_all(void)
205{ 183{
206 Ecore_List *avail; 184 Eina_List *avail;
207 char *filename; 185 char *filename;
208 Ecore_Plugin *plugin; 186 Ecore_Plugin *plugin;
209 const Ecore_IMF_Context_Info *info = NULL; 187 const Ecore_IMF_Context_Info *info = NULL;
@@ -213,8 +191,7 @@ _ecore_imf_module_load_all(void)
213 avail = ecore_plugin_available_get(ecore_imf_modules_path); 191 avail = ecore_plugin_available_get(ecore_imf_modules_path);
214 if (!avail) return; 192 if (!avail) return;
215 193
216 ecore_list_first_goto(avail); 194 EINA_LIST_FREE(avail, filename)
217 while ((filename = ecore_list_next(avail)))
218 { 195 {
219 plugin = ecore_plugin_load(ecore_imf_modules_path, filename, NULL); 196 plugin = ecore_plugin_load(ecore_imf_modules_path, filename, NULL);
220 if (!plugin) 197 if (!plugin)
@@ -255,8 +232,6 @@ _ecore_imf_module_load_all(void)
255 232
256 _ecore_imf_module_append(plugin, info, imf_module_create); 233 _ecore_imf_module_append(plugin, info, imf_module_create);
257 } 234 }
258
259 ecore_list_destroy(avail);
260} 235}
261 236
262static void 237static void
@@ -267,7 +242,7 @@ _ecore_imf_module_append(Ecore_Plugin *plugin,
267 Ecore_IMF_Module *module; 242 Ecore_IMF_Module *module;
268 243
269 if (!modules) 244 if (!modules)
270 modules = eina_hash_string_superfast_new(_ecore_imf_module_free); 245 modules = eina_hash_string_superfast_new(EINA_FREE_CB(_ecore_imf_module_free));
271 246
272 module = malloc(sizeof(Ecore_IMF_Module)); 247 module = malloc(sizeof(Ecore_IMF_Module));
273 module->plugin = plugin; 248 module->plugin = plugin;
diff --git a/legacy/ecore/src/lib/ecore_imf/ecore_imf_private.h b/legacy/ecore/src/lib/ecore_imf/ecore_imf_private.h
index dd951e2c89..e6812e7866 100644
--- a/legacy/ecore/src/lib/ecore_imf/ecore_imf_private.h
+++ b/legacy/ecore/src/lib/ecore_imf/ecore_imf_private.h
@@ -29,10 +29,10 @@ struct _Ecore_IMF_Module
29 29
30void ecore_imf_module_init(void); 30void ecore_imf_module_init(void);
31void ecore_imf_module_shutdown(void); 31void ecore_imf_module_shutdown(void);
32Ecore_List *ecore_imf_module_available_get(void); 32Eina_List *ecore_imf_module_available_get(void);
33Ecore_IMF_Module *ecore_imf_module_get(const char *ctx_id); 33Ecore_IMF_Module *ecore_imf_module_get(const char *ctx_id);
34Ecore_IMF_Context *ecore_imf_module_context_create(const char *ctx_id); 34Ecore_IMF_Context *ecore_imf_module_context_create(const char *ctx_id);
35Ecore_List *ecore_imf_module_context_ids_get(void); 35Eina_List *ecore_imf_module_context_ids_get(void);
36Ecore_List *ecore_imf_module_context_ids_by_canvas_type_get(const char *canvas_type); 36Eina_List *ecore_imf_module_context_ids_by_canvas_type_get(const char *canvas_type);
37 37
38#endif 38#endif
diff --git a/legacy/ecore/src/lib/ecore_ipc/Ecore_Ipc.h b/legacy/ecore/src/lib/ecore_ipc/Ecore_Ipc.h
index 8e07366880..9c26a749d8 100644
--- a/legacy/ecore/src/lib/ecore_ipc/Ecore_Ipc.h
+++ b/legacy/ecore/src/lib/ecore_ipc/Ecore_Ipc.h
@@ -297,7 +297,7 @@ EAPI unsigned long long _ecore_ipc_swap_64(unsigned long long v);
297 EAPI void *ecore_ipc_server_del(Ecore_Ipc_Server *svr); 297 EAPI void *ecore_ipc_server_del(Ecore_Ipc_Server *svr);
298 EAPI void *ecore_ipc_server_data_get(Ecore_Ipc_Server *svr); 298 EAPI void *ecore_ipc_server_data_get(Ecore_Ipc_Server *svr);
299 EAPI int ecore_ipc_server_connected_get(Ecore_Ipc_Server *svr); 299 EAPI int ecore_ipc_server_connected_get(Ecore_Ipc_Server *svr);
300 EAPI Ecore_List *ecore_ipc_server_clients_get(Ecore_Ipc_Server *svr); 300 EAPI Eina_List *ecore_ipc_server_clients_get(Ecore_Ipc_Server *svr);
301 /* FIXME: this needs to become an ipc message */ 301 /* FIXME: this needs to become an ipc message */
302 EAPI int ecore_ipc_server_send(Ecore_Ipc_Server *svr, int major, int minor, int ref, int ref_to, int response, const void *data, int size); 302 EAPI int ecore_ipc_server_send(Ecore_Ipc_Server *svr, int major, int minor, int ref, int ref_to, int response, const void *data, int size);
303 EAPI void ecore_ipc_server_client_limit_set(Ecore_Ipc_Server *svr, int client_limit, char reject_excess_clients); 303 EAPI void ecore_ipc_server_client_limit_set(Ecore_Ipc_Server *svr, int client_limit, char reject_excess_clients);
diff --git a/legacy/ecore/src/lib/ecore_ipc/ecore_ipc.c b/legacy/ecore/src/lib/ecore_ipc/ecore_ipc.c
index 6bfc04bbbc..e69866aa51 100644
--- a/legacy/ecore/src/lib/ecore_ipc/ecore_ipc.c
+++ b/legacy/ecore/src/lib/ecore_ipc/ecore_ipc.c
@@ -241,7 +241,7 @@ EAPI int ECORE_IPC_EVENT_CLIENT_DATA = 0;
241EAPI int ECORE_IPC_EVENT_SERVER_DATA = 0; 241EAPI int ECORE_IPC_EVENT_SERVER_DATA = 0;
242 242
243static int init_count = 0; 243static int init_count = 0;
244static Ecore_Ipc_Server *servers = NULL; 244static Eina_List *servers = NULL;
245static Ecore_Event_Handler *handler[6]; 245static Ecore_Event_Handler *handler[6];
246 246
247/** 247/**
@@ -300,7 +300,7 @@ ecore_ipc_shutdown(void)
300 300
301 if (--init_count != 0) return init_count; 301 if (--init_count != 0) return init_count;
302 302
303 while (servers) ecore_ipc_server_del(servers); 303 while (servers) ecore_ipc_server_del(eina_list_data_get(servers));
304 304
305 for (i = 0; i < 6; i++) 305 for (i = 0; i < 6; i++)
306 ecore_event_handler_del(handler[i]); 306 ecore_event_handler_del(handler[i]);
@@ -364,9 +364,7 @@ ecore_ipc_server_add(Ecore_Ipc_Type compl_type, const char *name, int port, cons
364 } 364 }
365 svr->max_buf_size = 32 * 1024; 365 svr->max_buf_size = 32 * 1024;
366 svr->data = (void *)data; 366 svr->data = (void *)data;
367 svr->client_list = ecore_list_new(); 367 servers = eina_list_append(servers, svr);
368 ecore_list_init(svr->client_list);
369 servers = _ecore_list2_append(servers, svr);
370 ECORE_MAGIC_SET(svr, ECORE_MAGIC_IPC_SERVER); 368 ECORE_MAGIC_SET(svr, ECORE_MAGIC_IPC_SERVER);
371 return svr; 369 return svr;
372} 370}
@@ -422,7 +420,7 @@ ecore_ipc_server_connect(Ecore_Ipc_Type compl_type, char *name, int port, const
422 } 420 }
423 svr->max_buf_size = -1; 421 svr->max_buf_size = -1;
424 svr->data = (void *)data; 422 svr->data = (void *)data;
425 servers = _ecore_list2_append(servers, svr); 423 servers = eina_list_append(servers, svr);
426 ECORE_MAGIC_SET(svr, ECORE_MAGIC_IPC_SERVER); 424 ECORE_MAGIC_SET(svr, ECORE_MAGIC_IPC_SERVER);
427 return svr; 425 return svr;
428} 426}
@@ -444,17 +442,21 @@ ecore_ipc_server_del(Ecore_Ipc_Server *svr)
444 "ecore_ipc_server_del"); 442 "ecore_ipc_server_del");
445 return NULL; 443 return NULL;
446 } 444 }
445 if (svr->delete_me) return NULL;
446
447 data = svr->data; 447 data = svr->data;
448 svr->data = NULL; 448 svr->data = NULL;
449 svr->delete_me = 1; 449 svr->delete_me = 1;
450 if (svr->event_count == 0) 450 if (svr->event_count == 0)
451 { 451 {
452 while (svr->clients) 452 Ecore_Ipc_Client *cl;
453 ecore_ipc_client_del((Ecore_Ipc_Client *)svr->clients); 453
454 EINA_LIST_FREE(svr->clients, cl)
455 ecore_ipc_client_del(cl);
454 ecore_con_server_del(svr->server); 456 ecore_con_server_del(svr->server);
455 servers = _ecore_list2_remove(servers, svr); 457 servers = eina_list_remove(servers, svr);
458
456 if (svr->buf) free(svr->buf); 459 if (svr->buf) free(svr->buf);
457 if (svr->client_list) ecore_list_destroy(svr->client_list);
458 ECORE_MAGIC_SET(svr, ECORE_MAGIC_NONE); 460 ECORE_MAGIC_SET(svr, ECORE_MAGIC_NONE);
459 free(svr); 461 free(svr);
460 } 462 }
@@ -500,10 +502,10 @@ ecore_ipc_server_connected_get(Ecore_Ipc_Server *svr)
500/** 502/**
501 * Retrieves the list of clients for this server. 503 * Retrieves the list of clients for this server.
502 * @param svr The given IPC server. 504 * @param svr The given IPC server.
503 * @return An Ecore_List with the clients. 505 * @return An Eina_List with the clients.
504 * @ingroup Ecore_IPC_Server_Group 506 * @ingroup Ecore_IPC_Server_Group
505 */ 507 */
506EAPI Ecore_List * 508EAPI Eina_List *
507ecore_ipc_server_clients_get(Ecore_Ipc_Server *svr) 509ecore_ipc_server_clients_get(Ecore_Ipc_Server *svr)
508{ 510{
509 if (!ECORE_MAGIC_CHECK(svr, ECORE_MAGIC_IPC_SERVER)) 511 if (!ECORE_MAGIC_CHECK(svr, ECORE_MAGIC_IPC_SERVER))
@@ -1000,7 +1002,7 @@ _ecore_ipc_event_client_add(void *data __UNUSED__, int ev_type __UNUSED__, void
1000 Ecore_Con_Event_Client_Add *e; 1002 Ecore_Con_Event_Client_Add *e;
1001 1003
1002 e = ev; 1004 e = ev;
1003 if (!_ecore_list2_find(servers, ecore_con_server_data_get(ecore_con_client_server_get(e->client)))) return 1; 1005 if (!eina_list_data_find(servers, ecore_con_server_data_get(ecore_con_client_server_get(e->client)))) return 1;
1004 /* handling code here */ 1006 /* handling code here */
1005 { 1007 {
1006 Ecore_Ipc_Client *cl; 1008 Ecore_Ipc_Client *cl;
@@ -1014,7 +1016,7 @@ _ecore_ipc_event_client_add(void *data __UNUSED__, int ev_type __UNUSED__, void
1014 cl->max_buf_size = 32 * 1024; 1016 cl->max_buf_size = 32 * 1024;
1015 ecore_con_client_data_set(cl->client, (void *)cl); 1017 ecore_con_client_data_set(cl->client, (void *)cl);
1016 svr->clients = _ecore_list2_append(svr->clients, cl); 1018 svr->clients = _ecore_list2_append(svr->clients, cl);
1017 ecore_list_append(svr->client_list, cl); 1019 svr->client_list = eina_list_append(svr->client_list, cl);
1018 if (!cl->delete_me) 1020 if (!cl->delete_me)
1019 { 1021 {
1020 Ecore_Ipc_Event_Client_Add *e2; 1022 Ecore_Ipc_Event_Client_Add *e2;
@@ -1038,7 +1040,7 @@ _ecore_ipc_event_client_del(void *data __UNUSED__, int ev_type __UNUSED__, void
1038 Ecore_Con_Event_Client_Del *e; 1040 Ecore_Con_Event_Client_Del *e;
1039 1041
1040 e = ev; 1042 e = ev;
1041 if (!_ecore_list2_find(servers, ecore_con_server_data_get(ecore_con_client_server_get(e->client)))) return 1; 1043 if (!eina_list_data_find(servers, ecore_con_server_data_get(ecore_con_client_server_get(e->client)))) return 1;
1042 /* handling code here */ 1044 /* handling code here */
1043 { 1045 {
1044 Ecore_Ipc_Client *cl; 1046 Ecore_Ipc_Client *cl;
@@ -1049,9 +1051,7 @@ _ecore_ipc_event_client_del(void *data __UNUSED__, int ev_type __UNUSED__, void
1049 Ecore_Ipc_Server *svr; 1051 Ecore_Ipc_Server *svr;
1050 1052
1051 svr = ecore_con_server_data_get(ecore_con_client_server_get(e->client)); 1053 svr = ecore_con_server_data_get(ecore_con_client_server_get(e->client));
1052 ecore_list_goto(svr->client_list, cl); 1054 svr->client_list = eina_list_remove(svr->client_list, cl);
1053 ecore_list_remove(svr->client_list);
1054 ecore_list_first_goto(svr->client_list);
1055 if (!cl->delete_me) 1055 if (!cl->delete_me)
1056 { 1056 {
1057 e2 = calloc(1, sizeof(Ecore_Ipc_Event_Client_Del)); 1057 e2 = calloc(1, sizeof(Ecore_Ipc_Event_Client_Del));
@@ -1074,7 +1074,7 @@ _ecore_ipc_event_server_add(void *data __UNUSED__, int ev_type __UNUSED__, void
1074 Ecore_Con_Event_Server_Add *e; 1074 Ecore_Con_Event_Server_Add *e;
1075 1075
1076 e = ev; 1076 e = ev;
1077 if (!_ecore_list2_find(servers, ecore_con_server_data_get(e->server))) return 1; 1077 if (!eina_list_data_find(servers, ecore_con_server_data_get(e->server))) return 1;
1078 /* handling code here */ 1078 /* handling code here */
1079 { 1079 {
1080 Ecore_Ipc_Server *svr; 1080 Ecore_Ipc_Server *svr;
@@ -1103,7 +1103,7 @@ _ecore_ipc_event_server_del(void *data __UNUSED__, int ev_type __UNUSED__, void
1103 Ecore_Con_Event_Server_Del *e; 1103 Ecore_Con_Event_Server_Del *e;
1104 1104
1105 e = ev; 1105 e = ev;
1106 if (!_ecore_list2_find(servers, ecore_con_server_data_get(e->server))) return 1; 1106 if (!eina_list_data_find(servers, ecore_con_server_data_get(e->server))) return 1;
1107 /* handling code here */ 1107 /* handling code here */
1108 { 1108 {
1109 Ecore_Ipc_Server *svr; 1109 Ecore_Ipc_Server *svr;
@@ -1173,7 +1173,7 @@ _ecore_ipc_event_client_data(void *data __UNUSED__, int ev_type __UNUSED__, void
1173 Ecore_Con_Event_Client_Data *e; 1173 Ecore_Con_Event_Client_Data *e;
1174 1174
1175 e = ev; 1175 e = ev;
1176 if (!_ecore_list2_find(servers, ecore_con_server_data_get(ecore_con_client_server_get(e->client)))) return 1; 1176 if (!eina_list_data_find(servers, ecore_con_server_data_get(ecore_con_client_server_get(e->client)))) return 1;
1177 /* handling code here */ 1177 /* handling code here */
1178 { 1178 {
1179 Ecore_Ipc_Client *cl; 1179 Ecore_Ipc_Client *cl;
@@ -1365,7 +1365,7 @@ _ecore_ipc_event_server_data(void *data __UNUSED__, int ev_type __UNUSED__, void
1365 Ecore_Con_Event_Server_Data *e; 1365 Ecore_Con_Event_Server_Data *e;
1366 1366
1367 e = ev; 1367 e = ev;
1368 if (!_ecore_list2_find(servers, ecore_con_server_data_get(e->server))) return 1; 1368 if (!eina_list_data_find(servers, ecore_con_server_data_get(e->server))) return 1;
1369 /* handling code here */ 1369 /* handling code here */
1370 { 1370 {
1371 Ecore_Ipc_Server *svr; 1371 Ecore_Ipc_Server *svr;
diff --git a/legacy/ecore/src/lib/ecore_ipc/ecore_ipc_private.h b/legacy/ecore/src/lib/ecore_ipc/ecore_ipc_private.h
index f8813a8999..9595975018 100644
--- a/legacy/ecore/src/lib/ecore_ipc/ecore_ipc_private.h
+++ b/legacy/ecore/src/lib/ecore_ipc/ecore_ipc_private.h
@@ -39,7 +39,6 @@ __attribute__ ((packed));
39 39
40struct _Ecore_Ipc_Client 40struct _Ecore_Ipc_Client
41{ 41{
42 Ecore_List __list_data;
43 ECORE_MAGIC; 42 ECORE_MAGIC;
44 Ecore_Con_Client *client; 43 Ecore_Con_Client *client;
45 void *data; 44 void *data;
@@ -57,11 +56,10 @@ struct _Ecore_Ipc_Client
57 56
58struct _Ecore_Ipc_Server 57struct _Ecore_Ipc_Server
59{ 58{
60 Ecore_List __list_data;
61 ECORE_MAGIC; 59 ECORE_MAGIC;
62 Ecore_Con_Server *server; 60 Ecore_Con_Server *server;
63 Ecore_Ipc_Client *clients; 61 Eina_List *clients;
64 Ecore_List *client_list; 62 Eina_List *client_list;
65 void *data; 63 void *data;
66 unsigned char *buf; 64 unsigned char *buf;
67 int buf_size; 65 int buf_size;
diff --git a/legacy/ecore/src/lib/ecore_x/xcb/ecore_xcb_reply.c b/legacy/ecore/src/lib/ecore_x/xcb/ecore_xcb_reply.c
index f27f3b0860..13402b66e5 100644
--- a/legacy/ecore/src/lib/ecore_x/xcb/ecore_xcb_reply.c
+++ b/legacy/ecore/src/lib/ecore_x/xcb/ecore_xcb_reply.c
@@ -19,7 +19,7 @@
19 * but its code is commented. 19 * but its code is commented.
20 */ 20 */
21 21
22static Ecore_List *_ecore_xcb_cookies = NULL; 22static Eina_List *_ecore_xcb_cookies = NULL;
23static void *_ecore_xcb_reply = NULL; 23static void *_ecore_xcb_reply = NULL;
24 24
25typedef struct _Ecore_Xcb_Data Ecore_Xcb_Data; 25typedef struct _Ecore_Xcb_Data Ecore_Xcb_Data;
@@ -33,35 +33,22 @@ struct _Ecore_Xcb_Data
33int 33int
34_ecore_x_reply_init () 34_ecore_x_reply_init ()
35{ 35{
36 _ecore_xcb_cookies = ecore_list_new();
37 if (!_ecore_xcb_cookies)
38 return 0;
39
40 if (!ecore_list_init(_ecore_xcb_cookies))
41 {
42 ecore_list_destroy(_ecore_xcb_cookies);
43 return 0;
44 }
45
46 if (!ecore_list_free_cb_set(_ecore_xcb_cookies, ECORE_FREE_CB(free)))
47 {
48 ecore_list_destroy(_ecore_xcb_cookies);
49 return 0;
50 }
51
52 return 1; 36 return 1;
53} 37}
54 38
55void 39void
56_ecore_x_reply_shutdown () 40_ecore_x_reply_shutdown ()
57{ 41{
42 Ecore_Xcb_Data *data;
43
58 if (_ecore_xcb_reply) 44 if (_ecore_xcb_reply)
59 free(_ecore_xcb_reply); 45 free(_ecore_xcb_reply);
60 46
61 if (!_ecore_xcb_cookies) 47 if (!_ecore_xcb_cookies)
62 return; 48 return;
63 49
64 ecore_list_destroy(_ecore_xcb_cookies); 50 EINA_LIST_FREE(_ecore_xcb_cookies, data)
51 free(data);
65} 52}
66 53
67void 54void
@@ -78,7 +65,8 @@ _ecore_xcb_cookie_cache (unsigned int cookie)
78 65
79 data->cookie = cookie; 66 data->cookie = cookie;
80 67
81 if (!ecore_list_append(_ecore_xcb_cookies, data)) 68 _ecore_xcb_cookies = eina_list_append(_ecore_xcb_cookies, data);
69 if (!eina_list_data_find(_ecore_xcb_cookies, data))
82 { 70 {
83 free(data); 71 free(data);
84 return; 72 return;
@@ -94,16 +82,14 @@ _ecore_xcb_cookie_get (void)
94 if (!_ecore_xcb_cookies) 82 if (!_ecore_xcb_cookies)
95 return 0; 83 return 0;
96 84
97 data = ecore_list_first_remove(_ecore_xcb_cookies); 85 data = eina_list_data_get(_ecore_xcb_cookies);
98 if (data) 86 if (!data) return 0;
99 { 87
88 _ecore_xcb_cookies = eina_list_remove_list(_ecore_xcb_cookies, _ecore_xcb_cookies);
100 cookie = data->cookie; 89 cookie = data->cookie;
101 free(data); 90 free(data);
102 91
103 return cookie; 92 return cookie;
104 }
105
106 return 0;
107} 93}
108 94
109void 95void
diff --git a/legacy/efreet/src/bin/ef_cache.c b/legacy/efreet/src/bin/ef_cache.c
index 45ffd80e56..73fd0dff2a 100644
--- a/legacy/efreet/src/bin/ef_cache.c
+++ b/legacy/efreet/src/bin/ef_cache.c
@@ -5,7 +5,8 @@
5static int 5static int
6timer(void *data __UNUSED__) 6timer(void *data __UNUSED__)
7{ 7{
8 Ecore_List *list; 8 Eina_List *list;
9 Eina_List *l;
9 Efreet_Desktop *desktop; 10 Efreet_Desktop *desktop;
10 double start; 11 double start;
11 12
@@ -22,12 +23,12 @@ timer(void *data __UNUSED__)
22 list = efreet_util_desktop_mime_list("application/ogg"); 23 list = efreet_util_desktop_mime_list("application/ogg");
23 if (list) 24 if (list)
24 { 25 {
25 ecore_list_first_goto(list); 26 EINA_LIST_FOREACH(list, l, desktop)
26 while ((desktop = ecore_list_next(list)))
27 { 27 {
28 printf("application/ogg: %s\n", desktop->name); 28 printf("application/ogg: %s\n", desktop->name);
29 } 29 }
30 ecore_list_destroy(list); 30 while (list)
31 list = eina_list_remove_list(list, list);
31 } 32 }
32 33
33 return 0; 34 return 0;
diff --git a/legacy/efreet/src/bin/ef_data_dirs.c b/legacy/efreet/src/bin/ef_data_dirs.c
index 291273dd29..02e3ae3b2b 100644
--- a/legacy/efreet/src/bin/ef_data_dirs.c
+++ b/legacy/efreet/src/bin/ef_data_dirs.c
@@ -153,7 +153,7 @@ ef_cb_efreet_cache_home(void)
153int 153int
154ef_cb_efreet_data_dirs(void) 154ef_cb_efreet_data_dirs(void)
155{ 155{
156 Ecore_List *tmp; 156 Eina_List *tmp, *l;
157 int ret = 1, i; 157 int ret = 1, i;
158 char dirs[128], *val; 158 char dirs[128], *val;
159 char *vals[] = {"/var/tmp/a", "/tmp/b", "/usr/local/share", "/etc", NULL}; 159 char *vals[] = {"/var/tmp/a", "/tmp/b", "/usr/local/share", "/etc", NULL};
@@ -172,8 +172,7 @@ ef_cb_efreet_data_dirs(void)
172 172
173 i = 0; 173 i = 0;
174 tmp = efreet_data_dirs_get(); 174 tmp = efreet_data_dirs_get();
175 ecore_list_first_goto(tmp); 175 EINA_LIST_FOREACH(tmp, l, val)
176 while ((val = ecore_list_next(tmp)))
177 { 176 {
178 if (vals[i] == NULL) 177 if (vals[i] == NULL)
179 { 178 {
@@ -199,14 +198,13 @@ ef_cb_efreet_data_dirs(void)
199 198
200 i = 0; 199 i = 0;
201 tmp = efreet_data_dirs_get(); 200 tmp = efreet_data_dirs_get();
202 if (ecore_list_count(tmp) != 2) 201 if (eina_list_count(tmp) != 2)
203 { 202 {
204 printf("efreet_data_dirs_get() nodes is differnet from expected default\n"); 203 printf("efreet_data_dirs_get() nodes is differnet from expected default\n");
205 ret = 0; 204 ret = 0;
206 } 205 }
207 206
208 ecore_list_first_goto(tmp); 207 EINA_LIST_FOREACH(tmp, l, val)
209 while ((val = ecore_list_next(tmp)))
210 { 208 {
211 if (def_vals[i] == NULL) 209 if (def_vals[i] == NULL)
212 { 210 {
@@ -231,7 +229,7 @@ ef_cb_efreet_data_dirs(void)
231int 229int
232ef_cb_efreet_config_dirs(void) 230ef_cb_efreet_config_dirs(void)
233{ 231{
234 Ecore_List *tmp; 232 Eina_List *tmp, *l;
235 int ret = 1, i; 233 int ret = 1, i;
236 char dirs[128], *val; 234 char dirs[128], *val;
237 char *vals[] = {"/var/tmp/a", "/tmp/b", "/usr/local/share", "/etc", NULL}; 235 char *vals[] = {"/var/tmp/a", "/tmp/b", "/usr/local/share", "/etc", NULL};
@@ -251,8 +249,7 @@ ef_cb_efreet_config_dirs(void)
251 249
252 i = 0; 250 i = 0;
253 tmp = efreet_config_dirs_get(); 251 tmp = efreet_config_dirs_get();
254 ecore_list_first_goto(tmp); 252 EINA_LIST_FOREACH(tmp, l, val)
255 while ((val = ecore_list_next(tmp)))
256 { 253 {
257 if (vals[i] == NULL) 254 if (vals[i] == NULL)
258 { 255 {
@@ -278,8 +275,7 @@ ef_cb_efreet_config_dirs(void)
278 275
279 i = 0; 276 i = 0;
280 tmp = efreet_config_dirs_get(); 277 tmp = efreet_config_dirs_get();
281 ecore_list_first_goto(tmp); 278 EINA_LIST_FOREACH(tmp, l, val)
282 while ((val = ecore_list_next(tmp)))
283 { 279 {
284 if (def_vals[i] == NULL) 280 if (def_vals[i] == NULL)
285 { 281 {
diff --git a/legacy/efreet/src/bin/ef_desktop.c b/legacy/efreet/src/bin/ef_desktop.c
index af7cfadb76..7713cced82 100644
--- a/legacy/efreet/src/bin/ef_desktop.c
+++ b/legacy/efreet/src/bin/ef_desktop.c
@@ -14,6 +14,7 @@ int
14ef_cb_desktop_parse(void) 14ef_cb_desktop_parse(void)
15{ 15{
16 Efreet_Desktop *desktop; 16 Efreet_Desktop *desktop;
17 Eina_List *l;
17 int ret = 1; 18 int ret = 1;
18 19
19 desktop = efreet_desktop_get(PACKAGE_DATA_DIR"/test/test.desktop"); 20 desktop = efreet_desktop_get(PACKAGE_DATA_DIR"/test/test.desktop");
@@ -48,8 +49,7 @@ ef_cb_desktop_parse(void)
48 const char *cat; 49 const char *cat;
49 int num_categories = 2, i = 0; 50 int num_categories = 2, i = 0;
50 51
51 ecore_list_first_goto(desktop->categories); 52 EINA_LIST_FOREACH(desktop->categories, l, cat)
52 while ((cat = ecore_list_next(desktop->categories)))
53 { 53 {
54 if (i >= num_categories) 54 if (i >= num_categories)
55 { 55 {
@@ -141,10 +141,9 @@ ef_cb_desktop_save(void)
141 desktop->type = EFREET_DESKTOP_TYPE_APPLICATION; 141 desktop->type = EFREET_DESKTOP_TYPE_APPLICATION;
142 desktop->generic_name = strdup("Test Application"); 142 desktop->generic_name = strdup("Test Application");
143 desktop->exec = strdup("efreet_test"); 143 desktop->exec = strdup("efreet_test");
144 desktop->categories = ecore_list_new(); 144 desktop->categories = NULL;
145 ecore_list_free_cb_set(desktop->categories, ECORE_FREE_CB(free)); 145 desktop->categories = eina_list_append(desktop->categories, strdup("Test"));
146 ecore_list_append(desktop->categories, strdup("Test")); 146 desktop->categories = eina_list_append(desktop->categories, strdup("Enlightenment"));
147 ecore_list_append(desktop->categories, strdup("Enlightenment"));
148 printf("save test: %d\n", efreet_desktop_save(desktop)); 147 printf("save test: %d\n", efreet_desktop_save(desktop));
149 unlink("/tmp/test.desktop"); 148 unlink("/tmp/test.desktop");
150 efreet_desktop_free(desktop); 149 efreet_desktop_free(desktop);
@@ -154,7 +153,7 @@ ef_cb_desktop_save(void)
154 153
155typedef struct 154typedef struct
156{ 155{
157 Ecore_List *expected; 156 Eina_List *expected;
158 int error; 157 int error;
159 char type; 158 char type;
160} Test_Info; 159} Test_Info;
@@ -163,7 +162,7 @@ int
163ef_cb_desktop_command_get(void) 162ef_cb_desktop_command_get(void)
164{ 163{
165 Efreet_Desktop *desktop; 164 Efreet_Desktop *desktop;
166 Ecore_List *files, *expected; 165 Eina_List *files, *expected;
167 char olddir[PATH_MAX]; 166 char olddir[PATH_MAX];
168 Test_Info *info; 167 Test_Info *info;
169 int ret; 168 int ret;
@@ -177,14 +176,15 @@ ef_cb_desktop_command_get(void)
177 desktop->name = strdup("App Name"); 176 desktop->name = strdup("App Name");
178 desktop->icon = strdup("icon.png"); 177 desktop->icon = strdup("icon.png");
179 178
180 files = ecore_list_new(); 179 files = NULL;
181 ecore_list_append(files, "/tmp/absolute_path"); 180 files = eina_list_append(files, "/tmp/absolute_path");
182 ecore_list_append(files, "relative_path"); 181 files = eina_list_append(files, "relative_path");
183 ecore_list_append(files, "file:///tmp/absolute_uri"); 182 files = eina_list_append(files, "file:///tmp/absolute_uri");
184 ecore_list_append(files, "file:relative_uri"); 183 files = eina_list_append(files, "file:relative_uri");
185 184
186 info = NEW(Test_Info, 1); 185 info = NEW(Test_Info, 1);
187 expected = ecore_list_new(); 186 expected = NULL;
187 // FIXME: info->expected needs to be update.
188 info->expected = expected; 188 info->expected = expected;
189 info->error = 0; 189 info->error = 0;
190 190
@@ -192,129 +192,131 @@ ef_cb_desktop_command_get(void)
192 info->type = 'f'; 192 info->type = 'f';
193 IF_FREE(desktop->exec); 193 IF_FREE(desktop->exec);
194 desktop->exec = strdup("app %f"); 194 desktop->exec = strdup("app %f");
195 ecore_list_append(expected, "app '/tmp/absolute_path'"); 195 expected = eina_list_append(expected, "app '/tmp/absolute_path'");
196 ecore_list_append(expected, "app '/relative_path'"); 196 expected = eina_list_append(expected, "app '/relative_path'");
197 ecore_list_append(expected, "app '/tmp/absolute_uri'"); 197 expected = eina_list_append(expected, "app '/tmp/absolute_uri'");
198 ecore_list_append(expected, "app '/relative_uri'"); 198 expected = eina_list_append(expected, "app '/relative_uri'");
199 199
200 ecore_list_first_goto(expected);
201 efreet_desktop_command_get(desktop, files, _cb_command, info); 200 efreet_desktop_command_get(desktop, files, _cb_command, info);
202 ecore_list_clear(expected); 201 while (expected)
202 expected = eina_list_remove_list(expected, expected);
203 203
204 /* test single uri */ 204 /* test single uri */
205 info->type = 'u'; 205 info->type = 'u';
206 IF_FREE(desktop->exec); 206 IF_FREE(desktop->exec);
207 desktop->exec = strdup("app %u"); 207 desktop->exec = strdup("app %u");
208 ecore_list_append(expected, "app 'file:///tmp/absolute_path'"); 208 expected = eina_list_append(expected, "app 'file:///tmp/absolute_path'");
209 ecore_list_append(expected, "app 'file:///relative_path'"); 209 expected = eina_list_append(expected, "app 'file:///relative_path'");
210 ecore_list_append(expected, "app 'file:///tmp/absolute_uri'"); 210 expected = eina_list_append(expected, "app 'file:///tmp/absolute_uri'");
211 ecore_list_append(expected, "app 'file:///relative_uri'"); 211 expected = eina_list_append(expected, "app 'file:///relative_uri'");
212 212
213 ecore_list_first_goto(expected);
214 efreet_desktop_command_get(desktop, files, _cb_command, info); 213 efreet_desktop_command_get(desktop, files, _cb_command, info);
215 ecore_list_clear(expected); 214 while (expected)
215 expected = eina_list_remove_list(expected, expected);
216 216
217 /* test single dir */ 217 /* test single dir */
218 info->type = 'd'; 218 info->type = 'd';
219 IF_FREE(desktop->exec); 219 IF_FREE(desktop->exec);
220 desktop->exec = strdup("app %d"); 220 desktop->exec = strdup("app %d");
221 ecore_list_append(expected, "app '/tmp'"); 221 expected = eina_list_append(expected, "app '/tmp'");
222 ecore_list_append(expected, "app '/'"); 222 expected = eina_list_append(expected, "app '/'");
223 ecore_list_append(expected, "app '/tmp'"); 223 expected = eina_list_append(expected, "app '/tmp'");
224 ecore_list_append(expected, "app '/'"); 224 expected = eina_list_append(expected, "app '/'");
225 225
226 ecore_list_first_goto(expected);
227 efreet_desktop_command_get(desktop, files, _cb_command, info); 226 efreet_desktop_command_get(desktop, files, _cb_command, info);
228 ecore_list_clear(expected); 227 while (expected)
228 expected = eina_list_remove_list(expected, expected);
229 229
230 230
231 /* test single names */ 231 /* test single names */
232 info->type = 'n'; 232 info->type = 'n';
233 IF_FREE(desktop->exec); 233 IF_FREE(desktop->exec);
234 desktop->exec = strdup("app %n"); 234 desktop->exec = strdup("app %n");
235 ecore_list_append(expected, "app 'absolute_path'"); 235 expected = eina_list_append(expected, "app 'absolute_path'");
236 ecore_list_append(expected, "app 'relative_path'"); 236 expected = eina_list_append(expected, "app 'relative_path'");
237 ecore_list_append(expected, "app 'absolute_uri'"); 237 expected = eina_list_append(expected, "app 'absolute_uri'");
238 ecore_list_append(expected, "app 'relative_uri'"); 238 expected = eina_list_append(expected, "app 'relative_uri'");
239 239
240 ecore_list_first_goto(expected);
241 efreet_desktop_command_get(desktop, files, _cb_command, info); 240 efreet_desktop_command_get(desktop, files, _cb_command, info);
242 ecore_list_clear(expected); 241 while (expected)
242 expected = eina_list_remove_list(expected, expected);
243 243
244 /* test multiple fullpaths */ 244 /* test multiple fullpaths */
245 info->type = 'F'; 245 info->type = 'F';
246 IF_FREE(desktop->exec); 246 IF_FREE(desktop->exec);
247 desktop->exec = strdup("app %F"); 247 desktop->exec = strdup("app %F");
248 ecore_list_append(expected, "app '/tmp/absolute_path' '/relative_path' '/tmp/absolute_uri' '/relative_uri'"); 248 expected = eina_list_append(expected, "app '/tmp/absolute_path' '/relative_path' '/tmp/absolute_uri' '/relative_uri'");
249 249
250 ecore_list_first_goto(expected);
251 efreet_desktop_command_get(desktop, files, _cb_command, info); 250 efreet_desktop_command_get(desktop, files, _cb_command, info);
252 ecore_list_clear(expected); 251 while (expected)
252 expected = eina_list_remove_list(expected, expected);
253 253
254 /* test multiple URIs */ 254 /* test multiple URIs */
255 info->type = 'U'; 255 info->type = 'U';
256 IF_FREE(desktop->exec); 256 IF_FREE(desktop->exec);
257 desktop->exec = strdup("app %U"); 257 desktop->exec = strdup("app %U");
258 ecore_list_append(expected, "app 'file:///tmp/absolute_path' 'file:///relative_path' 'file:///tmp/absolute_uri' 'file:///relative_uri'"); 258 expected = eina_list_append(expected, "app 'file:///tmp/absolute_path' 'file:///relative_path' 'file:///tmp/absolute_uri' 'file:///relative_uri'");
259 259
260 ecore_list_first_goto(expected);
261 efreet_desktop_command_get(desktop, files, _cb_command, info); 260 efreet_desktop_command_get(desktop, files, _cb_command, info);
262 ecore_list_clear(expected); 261 while (expected)
262 expected = eina_list_remove_list(expected, expected);
263 263
264 /* test multiple dirs */ 264 /* test multiple dirs */
265 info->type = 'D'; 265 info->type = 'D';
266 IF_FREE(desktop->exec); 266 IF_FREE(desktop->exec);
267 desktop->exec = strdup("app %D"); 267 desktop->exec = strdup("app %D");
268 ecore_list_append(expected, "app '/tmp' '/' '/tmp' '/'"); 268 expected = eina_list_append(expected, "app '/tmp' '/' '/tmp' '/'");
269 269
270 ecore_list_first_goto(expected);
271 efreet_desktop_command_get(desktop, files, _cb_command, info); 270 efreet_desktop_command_get(desktop, files, _cb_command, info);
272 ecore_list_clear(expected); 271 while (expected)
272 expected = eina_list_remove_list(expected, expected);
273 273
274 /* test multiple names */ 274 /* test multiple names */
275 info->type = 'N'; 275 info->type = 'N';
276 IF_FREE(desktop->exec); 276 IF_FREE(desktop->exec);
277 desktop->exec = strdup("app %N"); 277 desktop->exec = strdup("app %N");
278 ecore_list_append(expected, "app 'absolute_path' 'relative_path' 'absolute_uri' 'relative_uri'"); 278 expected = eina_list_append(expected, "app 'absolute_path' 'relative_path' 'absolute_uri' 'relative_uri'");
279 279
280 ecore_list_first_goto(expected);
281 efreet_desktop_command_get(desktop, files, _cb_command, info); 280 efreet_desktop_command_get(desktop, files, _cb_command, info);
282 ecore_list_clear(expected); 281 while (expected)
282 expected = eina_list_remove_list(expected, expected);
283 283
284 /* test icon appending */ 284 /* test icon appending */
285 info->type = 'i'; 285 info->type = 'i';
286 IF_FREE(desktop->exec); 286 IF_FREE(desktop->exec);
287 desktop->exec = strdup("app %i"); 287 desktop->exec = strdup("app %i");
288 ecore_list_append(expected, "app --icon 'icon.png'"); 288 expected = eina_list_append(expected, "app --icon 'icon.png'");
289 289
290 ecore_list_first_goto(expected);
291 efreet_desktop_command_get(desktop, NULL, _cb_command, info); 290 efreet_desktop_command_get(desktop, NULL, _cb_command, info);
292 ecore_list_clear(expected); 291 while (expected)
292 expected = eina_list_remove_list(expected, expected);
293 293
294 /* test app name */ 294 /* test app name */
295 info->type = 'c'; 295 info->type = 'c';
296 IF_FREE(desktop->exec); 296 IF_FREE(desktop->exec);
297 desktop->exec = strdup("app %c"); 297 desktop->exec = strdup("app %c");
298 ecore_list_append(expected, "app 'App Name'"); 298 expected = eina_list_append(expected, "app 'App Name'");
299 299
300 ecore_list_first_goto(expected);
301 efreet_desktop_command_get(desktop, NULL, _cb_command, info); 300 efreet_desktop_command_get(desktop, NULL, _cb_command, info);
302 ecore_list_clear(expected); 301 while (expected)
302 expected = eina_list_remove_list(expected, expected);
303 303
304 /* test desktop path */ 304 /* test desktop path */
305 info->type = 'k'; 305 info->type = 'k';
306 IF_FREE(desktop->exec); 306 IF_FREE(desktop->exec);
307 desktop->exec = strdup("app %k"); 307 desktop->exec = strdup("app %k");
308 ecore_list_append(expected, "app 'test.desktop'"); 308 expected = eina_list_append(expected, "app 'test.desktop'");
309 309
310 ecore_list_first_goto(expected);
311 efreet_desktop_command_get(desktop, NULL, _cb_command, info); 310 efreet_desktop_command_get(desktop, NULL, _cb_command, info);
312 ecore_list_clear(expected); 311 while (expected)
312 expected = eina_list_remove_list(expected, expected);
313 313
314 /* clean up */ 314 /* clean up */
315 efreet_desktop_free(desktop); 315 efreet_desktop_free(desktop);
316 ecore_list_destroy(files); 316 while (files)
317 ecore_list_destroy(expected); 317 files = eina_list_remove_list(files, expected);
318 while (expected)
319 expected = eina_list_remove_list(expected, expected);
318 320
319 ret = info->error > 0 ? 0 : 1; 321 ret = info->error > 0 ? 0 : 1;
320 free(info); 322 free(info);
@@ -331,7 +333,8 @@ _cb_command(void *data, Efreet_Desktop *desktop __UNUSED__,
331 Test_Info *info = data; 333 Test_Info *info = data;
332 char *expected; 334 char *expected;
333 335
334 expected = ecore_list_next(info->expected); 336 expected = eina_list_data_get(info->expected);
337 info->expected = eina_list_demote_list(info->expected, info->expected);
335 if (!expected) 338 if (!expected)
336 { 339 {
337 printf(" ERROR: (%%%c) got \"%s\", expected nothing\n", info->type, exec); 340 printf(" ERROR: (%%%c) got \"%s\", expected nothing\n", info->type, exec);
diff --git a/legacy/efreet/src/bin/ef_icon_theme.c b/legacy/efreet/src/bin/ef_icon_theme.c
index 56dcaf8b2d..369a4b8c1a 100644
--- a/legacy/efreet/src/bin/ef_icon_theme.c
+++ b/legacy/efreet/src/bin/ef_icon_theme.c
@@ -15,7 +15,7 @@
15static Eina_Bool _hash_keys(Eina_Hash *hash, const char *key, void *list); 15static Eina_Bool _hash_keys(Eina_Hash *hash, const char *key, void *list);
16static void ef_icon_theme_themes_find(const char *search_dir, 16static void ef_icon_theme_themes_find(const char *search_dir,
17 Eina_Hash *themes); 17 Eina_Hash *themes);
18static void ef_icons_find(Efreet_Icon_Theme *theme, Ecore_List *themes, 18static void ef_icons_find(Efreet_Icon_Theme *theme, Eina_List *themes,
19 Eina_Hash *icons); 19 Eina_Hash *icons);
20static void ef_read_dir(const char *dir, Eina_Hash *icons); 20static void ef_read_dir(const char *dir, Eina_Hash *icons);
21 21
@@ -56,7 +56,9 @@ ef_cb_efreet_icon_theme(void)
56static Eina_Bool 56static Eina_Bool
57_hash_keys(Eina_Hash *hash, const char *key, void *list) 57_hash_keys(Eina_Hash *hash, const char *key, void *list)
58{ 58{
59 ecore_list_append(list, key); 59 Eina_List **l = list;
60
61 *l = eina_list_append(*l, key);
60 return EINA_TRUE; 62 return EINA_TRUE;
61} 63}
62 64
@@ -64,11 +66,12 @@ int
64ef_cb_efreet_icon_theme_list(void) 66ef_cb_efreet_icon_theme_list(void)
65{ 67{
66 int ret = 1; 68 int ret = 1;
67 Ecore_List *themes; 69 Eina_List *themes;
70 Eina_List *icon_dirs;
71 Eina_List *l;
68 Eina_Hash *dirs; 72 Eina_Hash *dirs;
69 Eina_Iterator *it; 73 Eina_Iterator *it;
70 Efreet_Icon_Theme *theme; 74 Efreet_Icon_Theme *theme;
71 Ecore_List *icon_dirs;
72 const char *dir; 75 const char *dir;
73 char buf[PATH_MAX]; 76 char buf[PATH_MAX];
74 void *value; 77 void *value;
@@ -76,10 +79,9 @@ ef_cb_efreet_icon_theme_list(void)
76 dirs = eina_hash_string_superfast_new(free); 79 dirs = eina_hash_string_superfast_new(free);
77 80
78 icon_dirs = efreet_data_dirs_get(); 81 icon_dirs = efreet_data_dirs_get();
79 ecore_list_first_goto(icon_dirs);
80 82
81 ef_icon_theme_themes_find(efreet_icon_user_dir_get(), dirs); 83 ef_icon_theme_themes_find(efreet_icon_user_dir_get(), dirs);
82 while ((dir = ecore_list_next(icon_dirs))) 84 EINA_LIST_FOREACH(icon_dirs, l, dir)
83 { 85 {
84 snprintf(buf, sizeof(buf), "%s/icons", dir); 86 snprintf(buf, sizeof(buf), "%s/icons", dir);
85 ef_icon_theme_themes_find(buf, dirs); 87 ef_icon_theme_themes_find(buf, dirs);
@@ -87,8 +89,7 @@ ef_cb_efreet_icon_theme_list(void)
87 ef_icon_theme_themes_find("/usr/share/pixmaps", dirs); 89 ef_icon_theme_themes_find("/usr/share/pixmaps", dirs);
88 90
89 themes = efreet_icon_theme_list_get(); 91 themes = efreet_icon_theme_list_get();
90 ecore_list_first_goto(themes); 92 EINA_LIST_FOREACH(themes, l, theme)
91 while ((theme = ecore_list_next(themes)))
92 { 93 {
93 if ((eina_hash_find(dirs, theme->name.internal))) 94 if ((eina_hash_find(dirs, theme->name.internal)))
94 eina_hash_del(dirs, theme->name.internal, NULL); 95 eina_hash_del(dirs, theme->name.internal, NULL);
@@ -99,26 +100,31 @@ ef_cb_efreet_icon_theme_list(void)
99 ret = 0; 100 ret = 0;
100 } 101 }
101 } 102 }
102 ecore_list_destroy(themes); 103 while (themes)
104 {
105 themes = eina_list_remove_list(themes, themes);
106 }
103 107
104 themes = ecore_list_new(); 108 themes = NULL;
105 it = eina_hash_iterator_key_new(dirs); 109 it = eina_hash_iterator_key_new(dirs);
106 eina_iterator_foreach(it, EINA_EACH(_hash_keys), themes); 110 eina_iterator_foreach(it, EINA_EACH(_hash_keys), &themes);
107 eina_iterator_free(it); 111 eina_iterator_free(it);
108 112
109 if (ecore_list_count(themes) > 0) 113 if (eina_list_count(themes) > 0)
110 { 114 {
111 char *dir; 115 char *dir;
112 116
113 printf("efreet_icon_theme_list_get() missed: "); 117 printf("efreet_icon_theme_list_get() missed: ");
114 ecore_list_first_goto(themes); 118 EINA_LIST_FOREACH(themes, l, dir)
115 while ((dir = ecore_list_next(themes)))
116 printf("%s ", dir); 119 printf("%s ", dir);
117 printf("\n"); 120 printf("\n");
118 121
119 ret = 0; 122 ret = 0;
120 } 123 }
121 ecore_list_destroy(themes); 124 while (themes)
125 {
126 themes = eina_list_remove_list(themes, themes);
127 }
122 eina_hash_free(dirs); 128 eina_hash_free(dirs);
123 129
124 return ret; 130 return ret;
@@ -127,7 +133,7 @@ ef_cb_efreet_icon_theme_list(void)
127static void 133static void
128ef_icon_theme_themes_find(const char *search_dir, Eina_Hash *themes) 134ef_icon_theme_themes_find(const char *search_dir, Eina_Hash *themes)
129{ 135{
130 Ecore_List *dirs; 136 Eina_List *dirs;
131 char *dir; 137 char *dir;
132 138
133 if (!search_dir || !themes) return; 139 if (!search_dir || !themes) return;
@@ -135,10 +141,11 @@ ef_icon_theme_themes_find(const char *search_dir, Eina_Hash *themes)
135 dirs = ecore_file_ls(search_dir); 141 dirs = ecore_file_ls(search_dir);
136 if (!dirs) return; 142 if (!dirs) return;
137 143
138 while ((dir = ecore_list_first_remove(dirs))) 144 while ((dir = eina_list_data_get(dirs)))
139 { 145 {
140 char p[PATH_MAX]; 146 char p[PATH_MAX];
141 147
148 dirs = eina_list_remove_list(dirs, dirs);
142 /* if we've already added the theme we're done */ 149 /* if we've already added the theme we're done */
143 if (eina_hash_find(themes, dir)) 150 if (eina_hash_find(themes, dir))
144 { 151 {
@@ -170,7 +177,6 @@ ef_icon_theme_themes_find(const char *search_dir, Eina_Hash *themes)
170 } 177 }
171 free(dir); 178 free(dir);
172 } 179 }
173 ecore_list_destroy(dirs);
174} 180}
175 181
176const char *icons[] = 182const char *icons[] =
@@ -440,11 +446,11 @@ ef_cb_efreet_icon_match(void)
440 int i, ret = 1; 446 int i, ret = 1;
441 Eina_Hash *icon_hash; 447 Eina_Hash *icon_hash;
442 Efreet_Icon_Theme *theme; 448 Efreet_Icon_Theme *theme;
443 Ecore_List *themes; 449 Eina_List *themes;
450 Eina_List *l;
444 451
445 themes = efreet_icon_theme_list_get(); 452 themes = efreet_icon_theme_list_get();
446 ecore_list_first_goto(themes); 453 EINA_LIST_FOREACH(themes, l, theme)
447 while ((theme = ecore_list_next(themes)))
448 { 454 {
449 if (!strcmp(theme->name.internal, THEME)) 455 if (!strcmp(theme->name.internal, THEME))
450 break; 456 break;
@@ -453,14 +459,16 @@ ef_cb_efreet_icon_match(void)
453 if (!theme) 459 if (!theme)
454 { 460 {
455 printf("Theme not installed, SKIPPED.\n"); 461 printf("Theme not installed, SKIPPED.\n");
456 ecore_list_destroy(themes); 462 while (themes)
463 themes = eina_list_remove_list(themes, themes);
457 return 1; 464 return 1;
458 } 465 }
459 466
460 icon_hash = eina_hash_string_superfast_new(free); 467 icon_hash = eina_hash_string_superfast_new(free);
461 468
462 ef_icons_find(theme, themes, icon_hash); 469 ef_icons_find(theme, themes, icon_hash);
463 ecore_list_destroy(themes); 470 while (themes)
471 themes = eina_list_remove_list(themes, themes);
464 472
465 double start = ecore_time_get(); 473 double start = ecore_time_get();
466 for (i = 0; icons[i] != NULL; i++) 474 for (i = 0; icons[i] != NULL; i++)
@@ -527,67 +535,33 @@ ef_cb_efreet_icon_match(void)
527} 535}
528 536
529static void 537static void
530ef_icons_find(Efreet_Icon_Theme *theme, Ecore_List *themes, Eina_Hash *icons) 538ef_icons_find(Efreet_Icon_Theme *theme, Eina_List *themes, Eina_Hash *icons)
531{ 539{
540 Eina_List *l, *ll;
532 char path[PATH_MAX]; 541 char path[PATH_MAX];
542 const char *theme_path;
533 543
534 if (!theme || !icons) return; 544 if (!theme || !icons) return;
535 545
536 if (theme->paths.count == 1) 546 EINA_LIST_FOREACH(theme->paths, l, theme_path)
537 { 547 {
538 Efreet_Icon_Theme_Directory *dir; 548 Efreet_Icon_Theme_Directory *dir;
539 549
540 ecore_list_first_goto(theme->directories); 550 EINA_LIST_FOREACH(theme->directories, ll, dir)
541 while ((dir = ecore_list_next(theme->directories)))
542 {
543 if (theme->paths.count > 1)
544 {
545 Ecore_List *list;
546 char *tmp;
547
548 list = theme->paths.path;
549 ecore_list_first_goto(list);
550 while ((tmp = ecore_list_next(list)))
551 {
552 snprintf(path, sizeof(path), "%s/%s/", tmp, dir->name);
553 ef_read_dir(path, icons);
554 }
555 }
556 else if (theme->paths.count == 1)
557 {
558 snprintf(path, sizeof(path), "%s/%s/", (char *)theme->paths.path, dir->name);
559 ef_read_dir(path, icons);
560 }
561 }
562 }
563 else if (theme->paths.count > 1)
564 {
565 const char *theme_path;
566
567 ecore_list_first_goto(theme->paths.path);
568 while ((theme_path = ecore_list_next(theme->paths.path)))
569 {
570 Efreet_Icon_Theme_Directory *dir;
571
572 ecore_list_first_goto(theme->directories);
573 while ((dir = ecore_list_next(theme->directories)))
574 { 551 {
575 snprintf(path, sizeof(path), "%s/%s/", theme_path, dir->name); 552 snprintf(path, sizeof(path), "%s/%s/", theme_path, dir->name);
576 ef_read_dir(path, icons); 553 ef_read_dir(path, icons);
577 } 554 }
578 } 555 }
579 }
580 556
581 if (theme->inherits) 557 if (theme->inherits)
582 { 558 {
583 Efreet_Icon_Theme *parent_theme; 559 Efreet_Icon_Theme *parent_theme;
584 char *parent; 560 char *parent;
585 561
586 ecore_list_first_goto(theme->inherits); 562 EINA_LIST_FOREACH(theme->inherits, l, parent)
587 while ((parent = ecore_list_next(theme->inherits)))
588 { 563 {
589 ecore_list_first_goto(themes); 564 EINA_LIST_FOREACH(themes, ll, parent_theme)
590 while ((parent_theme = ecore_list_next(themes)))
591 { 565 {
592 if (!strcmp(parent_theme->name.internal, parent)) 566 if (!strcmp(parent_theme->name.internal, parent))
593 ef_icons_find(parent_theme, themes, icons); 567 ef_icons_find(parent_theme, themes, icons);
@@ -598,8 +572,7 @@ ef_icons_find(Efreet_Icon_Theme *theme, Ecore_List *themes, Eina_Hash *icons)
598 { 572 {
599 Efreet_Icon_Theme *parent_theme; 573 Efreet_Icon_Theme *parent_theme;
600 574
601 ecore_list_first_goto(themes); 575 EINA_LIST_FOREACH(themes, l, parent_theme)
602 while ((parent_theme = ecore_list_next(themes)))
603 { 576 {
604 if (!strcmp(parent_theme->name.internal, "hicolor")) 577 if (!strcmp(parent_theme->name.internal, "hicolor"))
605 ef_icons_find(parent_theme, themes, icons); 578 ef_icons_find(parent_theme, themes, icons);
@@ -612,7 +585,7 @@ ef_icons_find(Efreet_Icon_Theme *theme, Ecore_List *themes, Eina_Hash *icons)
612static void 585static void
613ef_read_dir(const char *dir, Eina_Hash *icons) 586ef_read_dir(const char *dir, Eina_Hash *icons)
614{ 587{
615 Ecore_List *files; 588 Eina_List *files;
616 char *file; 589 char *file;
617 590
618 if (!dir || !icons) return; 591 if (!dir || !icons) return;
@@ -620,10 +593,11 @@ ef_read_dir(const char *dir, Eina_Hash *icons)
620 files = ecore_file_ls(dir); 593 files = ecore_file_ls(dir);
621 if (!files) return; 594 if (!files) return;
622 595
623 while ((file = ecore_list_first_remove(files))) 596 while ((file = eina_list_data_get(files)))
624 { 597 {
625 char *p; 598 char *p;
626 599
600 files = eina_list_remove_list(files, files);
627 p = strrchr(file, '.'); 601 p = strrchr(file, '.');
628 if (!p) 602 if (!p)
629 { 603 {
@@ -640,5 +614,4 @@ ef_read_dir(const char *dir, Eina_Hash *icons)
640 614
641 FREE(file); 615 FREE(file);
642 } 616 }
643 ecore_list_destroy(files);
644} 617}
diff --git a/legacy/efreet/src/bin/ef_menu.c b/legacy/efreet/src/bin/ef_menu.c
index 9894b4f5f0..e15a93dd82 100644
--- a/legacy/efreet/src/bin/ef_menu.c
+++ b/legacy/efreet/src/bin/ef_menu.c
@@ -8,20 +8,20 @@
8static void 8static void
9ef_menu_desktop_exec(Efreet_Menu *menu) 9ef_menu_desktop_exec(Efreet_Menu *menu)
10{ 10{
11 Eina_List *l;
12
11 if (menu->entries) 13 if (menu->entries)
12 { 14 {
13 Efreet_Desktop *desktop; 15 Efreet_Desktop *desktop;
14 16
15 ecore_list_first_goto(menu->entries); 17 EINA_LIST_FOREACH(menu->entries, l, desktop)
16 while ((desktop = ecore_list_next(menu->entries)))
17 efreet_desktop_exec(desktop, NULL); 18 efreet_desktop_exec(desktop, NULL);
18 } 19 }
19 if (menu->sub_menus) 20 if (menu->sub_menus)
20 { 21 {
21 Efreet_Menu *sub_menu; 22 Efreet_Menu *sub_menu;
22 23
23 ecore_list_first_goto(menu->sub_menus); 24 EINA_LIST_FOREACH(menu->sub_menus, l, sub_menu)
24 while ((sub_menu = ecore_list_next(menu->sub_menus)))
25 ef_menu_desktop_exec(sub_menu); 25 ef_menu_desktop_exec(sub_menu);
26 } 26 }
27} 27}
@@ -113,8 +113,7 @@ ef_cb_menu_edit(void)
113 efreet_menu_dump(menu, ""); 113 efreet_menu_dump(menu, "");
114 printf("\n"); 114 printf("\n");
115#endif 115#endif
116 ecore_list_first_goto(menu->entries); 116 entry = eina_list_data_get(menu->entries);
117 entry = ecore_list_current(menu->entries);
118 if (desktop != entry->desktop) 117 if (desktop != entry->desktop)
119 { 118 {
120 efreet_menu_free(menu); 119 efreet_menu_free(menu);
@@ -127,8 +126,7 @@ ef_cb_menu_edit(void)
127 efreet_menu_dump(menu, ""); 126 efreet_menu_dump(menu, "");
128 printf("\n"); 127 printf("\n");
129#endif 128#endif
130 ecore_list_index_goto(menu->entries, 2); 129 entry = eina_list_nth(menu->entries, 2);
131 entry = ecore_list_current(menu->entries);
132 if (desktop != entry->desktop) 130 if (desktop != entry->desktop)
133 { 131 {
134 efreet_menu_free(menu); 132 efreet_menu_free(menu);
@@ -141,8 +139,7 @@ ef_cb_menu_edit(void)
141 efreet_menu_dump(menu, ""); 139 efreet_menu_dump(menu, "");
142 printf("\n"); 140 printf("\n");
143#endif 141#endif
144 ecore_list_last_goto(menu->entries); 142 entry = eina_list_data_get(eina_list_last(menu->entries));
145 entry = ecore_list_current(menu->entries);
146 if (desktop != entry->desktop) 143 if (desktop != entry->desktop)
147 { 144 {
148 efreet_menu_free(menu); 145 efreet_menu_free(menu);
diff --git a/legacy/efreet/src/bin/efreet_spec_test.c b/legacy/efreet/src/bin/efreet_spec_test.c
index a5ef2a60e8..ed93ea5ced 100644
--- a/legacy/efreet/src/bin/efreet_spec_test.c
+++ b/legacy/efreet/src/bin/efreet_spec_test.c
@@ -35,11 +35,11 @@ static void
35dump(Efreet_Menu *menu, const char *path) 35dump(Efreet_Menu *menu, const char *path)
36{ 36{
37 Efreet_Menu *entry; 37 Efreet_Menu *entry;
38 Eina_List *l;
38 39
39 if (!menu || !menu->entries) return; 40 if (!menu || !menu->entries) return;
40 41
41 ecore_list_first_goto(menu->entries); 42 EINA_LIST_FOREACH(menu->entries, l, entry)
42 while ((entry = ecore_list_next(menu->entries)))
43 { 43 {
44 if (entry->type == EFREET_MENU_ENTRY_DESKTOP) 44 if (entry->type == EFREET_MENU_ENTRY_DESKTOP)
45 { 45 {
diff --git a/legacy/efreet/src/bin/main.c b/legacy/efreet/src/bin/main.c
index 105a057679..b515f8cc4a 100644
--- a/legacy/efreet/src/bin/main.c
+++ b/legacy/efreet/src/bin/main.c
@@ -77,34 +77,34 @@ static Efreet_Test tests[] = {
77}; 77};
78 78
79extern char **environ; 79extern char **environ;
80static Ecore_List *environment = NULL; 80static Eina_List *environment = NULL;
81 81
82void 82void
83environment_store(void) 83environment_store(void)
84{ 84{
85 char *env;
85 char **e; 86 char **e;
86 87
87 if (environment) 88 while (environment)
88 ecore_list_clear(environment);
89 else
90 { 89 {
91 environment = ecore_list_new(); 90 env = eina_list_data_get(environment);
92 ecore_list_free_cb_set(environment, ECORE_FREE_CB(free)); 91 free(env);
92 environment = eina_list_remove_list(environment, environment);
93 } 93 }
94 94
95 for (e = environ; *e; e++) 95 for (e = environ; *e; e++)
96 ecore_list_append(environment, strdup(*e)); 96 environment = eina_list_append(environment, strdup(*e));
97} 97}
98 98
99void 99void
100environment_restore(void) 100environment_restore(void)
101{ 101{
102 Eina_List *l;
102 char *e; 103 char *e;
103 if (!environment) return; 104 if (!environment) return;
104 105
105 *environ = NULL; 106 *environ = NULL;
106 ecore_list_first_goto(environment); 107 EINA_LIST_FOREACH(environment, l, e)
107 while ((e = ecore_list_next(environment)))
108 putenv(e); 108 putenv(e);
109} 109}
110 110
@@ -112,13 +112,12 @@ int
112main(int argc, char ** argv) 112main(int argc, char ** argv)
113{ 113{
114 int i, passed = 0, num_tests = 0; 114 int i, passed = 0, num_tests = 0;
115 Ecore_List *run = NULL; 115 Eina_List *run = NULL;
116 double total; 116 double total;
117 117
118 total = ecore_time_get(); 118 total = ecore_time_get();
119 if (argc > 1) 119 if (argc > 1)
120 { 120 {
121 run = ecore_list_new();
122 for (i = 1; i < argc; i++) 121 for (i = 1; i < argc; i++)
123 { 122 {
124 if ((!strcmp(argv[i], "-h")) || 123 if ((!strcmp(argv[i], "-h")) ||
@@ -130,7 +129,7 @@ main(int argc, char ** argv)
130 } 129 }
131 return 1; 130 return 1;
132 } 131 }
133 ecore_list_append(run, argv[i]); 132 run = eina_list_append(run, argv[i]);
134 } 133 }
135 } 134 }
136 135
@@ -141,7 +140,7 @@ main(int argc, char ** argv)
141 double start; 140 double start;
142 141
143 /* we've been given specific tests and it isn't in the list */ 142 /* we've been given specific tests and it isn't in the list */
144 if (run && !ecore_list_find(run, ECORE_COMPARE_CB(strcasecmp), 143 if (run && !eina_list_search_unsorted(run, ECORE_COMPARE_CB(strcasecmp),
145 tests[i].name)) 144 tests[i].name))
146 continue; 145 continue;
147 146
@@ -166,10 +165,15 @@ main(int argc, char ** argv)
166 } 165 }
167 166
168 printf("\n-----------------\n"); 167 printf("\n-----------------\n");
169 if (environment) ecore_list_destroy(environment); 168 while (environment)
169 {
170 free(eina_list_data_get(environment));
171 environment = eina_list_remove_list(environment, environment);
172 }
170 printf("Passed %d of %d tests.\n", passed, num_tests); 173 printf("Passed %d of %d tests.\n", passed, num_tests);
171 174
172 if (run) ecore_list_destroy(run); 175 while (run)
176 run = eina_list_remove_list(run, run);
173 177
174 printf("Total run: %.3f seconds\n", ecore_time_get() - total); 178 printf("Total run: %.3f seconds\n", ecore_time_get() - total);
175 return 0; 179 return 0;
diff --git a/legacy/efreet/src/lib/Efreet_Trash.h b/legacy/efreet/src/lib/Efreet_Trash.h
index febf70d6eb..897f6464c4 100644
--- a/legacy/efreet/src/lib/Efreet_Trash.h
+++ b/legacy/efreet/src/lib/Efreet_Trash.h
@@ -41,7 +41,7 @@ EAPI void efreet_trash_shutdown(void);
41 41
42EAPI const char *efreet_trash_dir_get(void); 42EAPI const char *efreet_trash_dir_get(void);
43EAPI int efreet_trash_delete_uri(Efreet_Uri *uri, int force_delete); 43EAPI int efreet_trash_delete_uri(Efreet_Uri *uri, int force_delete);
44EAPI Ecore_List *efreet_trash_ls(void); 44EAPI Eina_List *efreet_trash_ls(void);
45EAPI int efreet_trash_is_empty(void); 45EAPI int efreet_trash_is_empty(void);
46EAPI int efreet_trash_empty_trash(void); 46EAPI int efreet_trash_empty_trash(void);
47 47
diff --git a/legacy/efreet/src/lib/efreet_base.c b/legacy/efreet/src/lib/efreet_base.c
index 3be459e6ee..f4738e1538 100644
--- a/legacy/efreet/src/lib/efreet_base.c
+++ b/legacy/efreet/src/lib/efreet_base.c
@@ -6,11 +6,11 @@ static const char *efreet_home_dir = NULL;
6static const char *xdg_data_home = NULL; 6static const char *xdg_data_home = NULL;
7static const char *xdg_config_home = NULL; 7static const char *xdg_config_home = NULL;
8static const char *xdg_cache_home = NULL; 8static const char *xdg_cache_home = NULL;
9static Ecore_List *xdg_data_dirs = NULL; 9static Eina_List *xdg_data_dirs = NULL;
10static Ecore_List *xdg_config_dirs = NULL; 10static Eina_List *xdg_config_dirs = NULL;
11 11
12static const char *efreet_dir_get(const char *key, const char *fallback); 12static const char *efreet_dir_get(const char *key, const char *fallback);
13static Ecore_List *efreet_dirs_get(const char *key, 13static Eina_List *efreet_dirs_get(const char *key,
14 const char *fallback); 14 const char *fallback);
15 15
16/** 16/**
@@ -77,15 +77,15 @@ efreet_data_home_get(void)
77} 77}
78 78
79/** 79/**
80 * @return Returns the Ecore_List of preference ordered extra data directories 80 * @return Returns the Eina_List of preference ordered extra data directories
81 * @brief Returns the Ecore_List of prefernece oredred extra data 81 * @brief Returns the Eina_List of prefernece oredred extra data
82 * directories 82 * directories
83 * 83 *
84 * @note The returned list is static inside Efreet. If you add/remove from the 84 * @note The returned list is static inside Efreet. If you add/remove from the
85 * list then the next call to efreet_data_dirs_get() will return your 85 * list then the next call to efreet_data_dirs_get() will return your
86 * modified values. DO NOT free this list. 86 * modified values. DO NOT free this list.
87 */ 87 */
88EAPI Ecore_List * 88EAPI Eina_List *
89efreet_data_dirs_get(void) 89efreet_data_dirs_get(void)
90{ 90{
91 if (xdg_data_dirs) return xdg_data_dirs; 91 if (xdg_data_dirs) return xdg_data_dirs;
@@ -107,15 +107,15 @@ efreet_config_home_get(void)
107} 107}
108 108
109/** 109/**
110 * @return Returns the Ecore_List of preference ordered extra config directories 110 * @return Returns the Eina_List of preference ordered extra config directories
111 * @brief Returns the Ecore_List of prefernece oredred extra config 111 * @brief Returns the Eina_List of prefernece oredred extra config
112 * directories 112 * directories
113 * 113 *
114 * @note The returned list is static inside Efreet. If you add/remove from the 114 * @note The returned list is static inside Efreet. If you add/remove from the
115 * list then the next call to efreet_config_dirs_get() will return your 115 * list then the next call to efreet_config_dirs_get() will return your
116 * modified values. DO NOT free this list. 116 * modified values. DO NOT free this list.
117 */ 117 */
118EAPI Ecore_List * 118EAPI Eina_List *
119efreet_config_dirs_get(void) 119efreet_config_dirs_get(void)
120{ 120{
121 if (xdg_config_dirs) return xdg_config_dirs; 121 if (xdg_config_dirs) return xdg_config_dirs;
@@ -177,18 +177,16 @@ efreet_dir_get(const char *key, const char *fallback)
177 * @brief Creates a list of directories as given in the environment key @a 177 * @brief Creates a list of directories as given in the environment key @a
178 * key or from the fallbacks in @a fallback 178 * key or from the fallbacks in @a fallback
179 */ 179 */
180static Ecore_List * 180static Eina_List *
181efreet_dirs_get(const char *key, const char *fallback) 181efreet_dirs_get(const char *key, const char *fallback)
182{ 182{
183 Ecore_List *dirs; 183 Eina_List *dirs = NULL;
184 const char *path; 184 const char *path;
185 char *tmp, *s, *p; 185 char *tmp, *s, *p;
186 186
187 path = getenv(key); 187 path = getenv(key);
188 if (!path || (path[0] == '\0')) path = fallback; 188 if (!path || (path[0] == '\0')) path = fallback;
189 189
190 dirs = ecore_list_new();
191 ecore_list_free_cb_set(dirs, ECORE_FREE_CB(eina_stringshare_del));
192 if (!path) return dirs; 190 if (!path) return dirs;
193 191
194 tmp = strdup(path); 192 tmp = strdup(path);
@@ -197,14 +195,14 @@ efreet_dirs_get(const char *key, const char *fallback)
197 while (p) 195 while (p)
198 { 196 {
199 *p = '\0'; 197 *p = '\0';
200 if (!ecore_list_find(dirs, ECORE_COMPARE_CB(strcmp), s)) 198 if (!eina_list_search_unsorted(dirs, (Eina_Compare_Cb)strcmp, s))
201 ecore_list_append(dirs, (void *)eina_stringshare_add(s)); 199 dirs = eina_list_append(dirs, (void *)eina_stringshare_add(s));
202 200
203 s = ++p; 201 s = ++p;
204 p = strchr(s, ':'); 202 p = strchr(s, ':');
205 } 203 }
206 if (!ecore_list_find(dirs, ECORE_COMPARE_CB(strcmp), s)) 204 if (!eina_list_search_unsorted(dirs, ECORE_COMPARE_CB(strcmp), s))
207 ecore_list_append(dirs, (void *)eina_stringshare_add(s)); 205 dirs = eina_list_append(dirs, (void *)eina_stringshare_add(s));
208 FREE(tmp); 206 FREE(tmp);
209 207
210 return dirs; 208 return dirs;
diff --git a/legacy/efreet/src/lib/efreet_base.h b/legacy/efreet/src/lib/efreet_base.h
index 021c89b3c2..d6b9f243c2 100644
--- a/legacy/efreet/src/lib/efreet_base.h
+++ b/legacy/efreet/src/lib/efreet_base.h
@@ -16,10 +16,10 @@
16#include <Ecore_Data.h> 16#include <Ecore_Data.h>
17 17
18EAPI const char *efreet_data_home_get(void); 18EAPI const char *efreet_data_home_get(void);
19EAPI Ecore_List *efreet_data_dirs_get(void); 19EAPI Eina_List *efreet_data_dirs_get(void);
20 20
21EAPI const char *efreet_config_home_get(void); 21EAPI const char *efreet_config_home_get(void);
22EAPI Ecore_List *efreet_config_dirs_get(void); 22EAPI Eina_List *efreet_config_dirs_get(void);
23 23
24EAPI const char *efreet_cache_home_get(void); 24EAPI const char *efreet_cache_home_get(void);
25 25
diff --git a/legacy/efreet/src/lib/efreet_desktop.c b/legacy/efreet/src/lib/efreet_desktop.c
index b0f057e207..5db998a857 100644
--- a/legacy/efreet/src/lib/efreet_desktop.c
+++ b/legacy/efreet/src/lib/efreet_desktop.c
@@ -18,7 +18,7 @@ static Eina_Hash *efreet_desktop_cache = NULL;
18/** 18/**
19 * A list of the desktop types available 19 * A list of the desktop types available
20 */ 20 */
21static Ecore_List *efreet_desktop_types = NULL; 21static Eina_List *efreet_desktop_types = NULL;
22 22
23/** 23/**
24 * A unique id for each tmp file created while building a command 24 * A unique id for each tmp file created while building a command
@@ -74,7 +74,7 @@ static char *efreet_string_append(char *dest, int *size,
74 int *len, const char *src); 74 int *len, const char *src);
75static char *efreet_string_append_char(char *dest, int *size, 75static char *efreet_string_append_char(char *dest, int *size,
76 int *len, char c); 76 int *len, char c);
77static Ecore_List *efreet_desktop_command_build(Efreet_Desktop_Command *command); 77static Eina_List *efreet_desktop_command_build(Efreet_Desktop_Command *command);
78static void efreet_desktop_command_free(Efreet_Desktop_Command *command); 78static void efreet_desktop_command_free(Efreet_Desktop_Command *command);
79static char *efreet_desktop_command_append_quoted(char *dest, int *size, 79static char *efreet_desktop_command_append_quoted(char *dest, int *size,
80 int *len, char *src); 80 int *len, char *src);
@@ -106,7 +106,7 @@ static void *efreet_desktop_exec_cb(void *data, Efreet_Desktop *desktop,
106 106
107static void efreet_desktop_type_info_free(Efreet_Desktop_Type_Info *info); 107static void efreet_desktop_type_info_free(Efreet_Desktop_Type_Info *info);
108static int efreet_desktop_command_flags_get(Efreet_Desktop *desktop); 108static int efreet_desktop_command_flags_get(Efreet_Desktop *desktop);
109static void *efreet_desktop_command_execs_process(Efreet_Desktop_Command *command, Ecore_List *execs); 109static void *efreet_desktop_command_execs_process(Efreet_Desktop_Command *command, Eina_List *execs);
110 110
111/** 111/**
112 * @internal 112 * @internal
@@ -121,10 +121,7 @@ efreet_desktop_init(void)
121 if (!ecore_file_init()) return --init; 121 if (!ecore_file_init()) return --init;
122 122
123 efreet_desktop_cache = eina_hash_string_superfast_new(NULL); 123 efreet_desktop_cache = eina_hash_string_superfast_new(NULL);
124 124 efreet_desktop_types = NULL;
125 efreet_desktop_types = ecore_list_new();
126 ecore_list_free_cb_set(efreet_desktop_types,
127 ECORE_FREE_CB(efreet_desktop_type_info_free));
128 125
129 EFREET_DESKTOP_TYPE_APPLICATION = efreet_desktop_type_add("Application", 126 EFREET_DESKTOP_TYPE_APPLICATION = efreet_desktop_type_add("Application",
130 efreet_desktop_application_fields_parse, 127 efreet_desktop_application_fields_parse,
@@ -147,13 +144,21 @@ efreet_desktop_init(void)
147int 144int
148efreet_desktop_shutdown(void) 145efreet_desktop_shutdown(void)
149{ 146{
147 Efreet_Desktop_Type_Info *info;
148
150 if (--init) return init; 149 if (--init) return init;
151 ecore_file_shutdown(); 150 ecore_file_shutdown();
152 eina_stringshare_shutdown(); 151 eina_stringshare_shutdown();
153 152
154 IF_RELEASE(desktop_environment); 153 IF_RELEASE(desktop_environment);
155 IF_FREE_HASH(efreet_desktop_cache); 154 IF_FREE_HASH(efreet_desktop_cache);
156 IF_FREE_LIST(efreet_desktop_types); 155 while (efreet_desktop_types)
156 {
157 info = eina_list_data_get(efreet_desktop_types);
158 efreet_desktop_type_info_free(info);
159 efreet_desktop_types = eina_list_remove_list(efreet_desktop_types,
160 efreet_desktop_types);
161 }
157 162
158 return init; 163 return init;
159} 164}
@@ -353,6 +358,8 @@ efreet_desktop_read(Efreet_Desktop *desktop)
353static void 358static void
354efreet_desktop_clear(Efreet_Desktop *desktop) 359efreet_desktop_clear(Efreet_Desktop *desktop)
355{ 360{
361 char *data;
362
356 IF_FREE(desktop->name); 363 IF_FREE(desktop->name);
357 IF_FREE(desktop->generic_name); 364 IF_FREE(desktop->generic_name);
358 IF_FREE(desktop->comment); 365 IF_FREE(desktop->comment);
@@ -366,15 +373,25 @@ efreet_desktop_clear(Efreet_Desktop *desktop)
366 373
367 IF_FREE_LIST(desktop->only_show_in); 374 IF_FREE_LIST(desktop->only_show_in);
368 IF_FREE_LIST(desktop->not_show_in); 375 IF_FREE_LIST(desktop->not_show_in);
369 IF_FREE_LIST(desktop->categories); 376 while (desktop->categories)
370 IF_FREE_LIST(desktop->mime_types); 377 {
378 data = eina_list_data_get(desktop->categories);
379 eina_stringshare_del(data);
380 desktop->categories = eina_list_remove_list(desktop->categories, desktop->categories);
381 }
382 while (desktop->mime_types)
383 {
384 data = eina_list_data_get(desktop->mime_types);
385 eina_stringshare_del(data);
386 desktop->mime_types = eina_list_remove_list(desktop->mime_types, desktop->mime_types);
387 }
371 388
372 IF_FREE_HASH(desktop->x); 389 IF_FREE_HASH(desktop->x);
373 390
374 if (desktop->type_data) 391 if (desktop->type_data)
375 { 392 {
376 Efreet_Desktop_Type_Info *info; 393 Efreet_Desktop_Type_Info *info;
377 info = ecore_list_index_goto(efreet_desktop_types, desktop->type); 394 info = eina_list_nth(efreet_desktop_types, desktop->type);
378 if (info->free_func) 395 if (info->free_func)
379 info->free_func(desktop->type_data); 396 info->free_func(desktop->type_data);
380 } 397 }
@@ -397,7 +414,7 @@ efreet_desktop_save(Efreet_Desktop *desktop)
397 efreet_ini_section_add(ini, "Desktop Entry"); 414 efreet_ini_section_add(ini, "Desktop Entry");
398 efreet_ini_section_set(ini, "Desktop Entry"); 415 efreet_ini_section_set(ini, "Desktop Entry");
399 416
400 info = ecore_list_index_goto(efreet_desktop_types, desktop->type); 417 info = eina_list_nth(efreet_desktop_types, desktop->type);
401 if (info) 418 if (info)
402 { 419 {
403 efreet_ini_string_set(ini, "Type", info->type); 420 efreet_ini_string_set(ini, "Type", info->type);
@@ -494,15 +511,24 @@ efreet_desktop_free(Efreet_Desktop *desktop)
494 511
495 IF_FREE_LIST(desktop->only_show_in); 512 IF_FREE_LIST(desktop->only_show_in);
496 IF_FREE_LIST(desktop->not_show_in); 513 IF_FREE_LIST(desktop->not_show_in);
497 IF_FREE_LIST(desktop->categories); 514
498 IF_FREE_LIST(desktop->mime_types); 515 while (desktop->categories)
516 {
517 eina_stringshare_del(eina_list_data_get(desktop->categories));
518 desktop->categories = eina_list_remove_list(desktop->categories, desktop->categories);
519 }
520 while (desktop->mime_types)
521 {
522 eina_stringshare_del(eina_list_data_get(desktop->mime_types));
523 desktop->mime_types = eina_list_remove_list(desktop->mime_types, desktop->mime_types);
524 }
499 525
500 IF_FREE_HASH(desktop->x); 526 IF_FREE_HASH(desktop->x);
501 527
502 if (desktop->type_data) 528 if (desktop->type_data)
503 { 529 {
504 Efreet_Desktop_Type_Info *info; 530 Efreet_Desktop_Type_Info *info;
505 info = ecore_list_index_goto(efreet_desktop_types, desktop->type); 531 info = eina_list_nth(efreet_desktop_types, desktop->type);
506 if (info->free_func) 532 if (info->free_func)
507 info->free_func(desktop->type_data); 533 info->free_func(desktop->type_data);
508 } 534 }
@@ -518,7 +544,7 @@ efreet_desktop_free(Efreet_Desktop *desktop)
518 * @brief Parses the @a desktop exec line and returns an Ecore_Exe. 544 * @brief Parses the @a desktop exec line and returns an Ecore_Exe.
519 */ 545 */
520EAPI void 546EAPI void
521efreet_desktop_exec(Efreet_Desktop *desktop, Ecore_List *files, void *data) 547efreet_desktop_exec(Efreet_Desktop *desktop, Eina_List *files, void *data)
522{ 548{
523 efreet_desktop_command_get(desktop, files, efreet_desktop_exec_cb, data); 549 efreet_desktop_command_get(desktop, files, efreet_desktop_exec_cb, data);
524} 550}
@@ -564,7 +590,7 @@ EAPI unsigned int
564efreet_desktop_category_count_get(Efreet_Desktop *desktop) 590efreet_desktop_category_count_get(Efreet_Desktop *desktop)
565{ 591{
566 if (!desktop || !desktop->categories) return 0; 592 if (!desktop || !desktop->categories) return 0;
567 return ecore_list_count(desktop->categories); 593 return eina_list_count(desktop->categories);
568} 594}
569 595
570/** 596/**
@@ -577,17 +603,10 @@ efreet_desktop_category_add(Efreet_Desktop *desktop, const char *category)
577{ 603{
578 if (!desktop) return; 604 if (!desktop) return;
579 605
580 if (!desktop->categories) 606 if (eina_list_search_unsorted(desktop->categories,
581 { 607 (Eina_Compare_Cb)strcmp, category)) return;
582 desktop->categories = ecore_list_new();
583 ecore_list_free_cb_set(desktop->categories,
584 ECORE_FREE_CB(eina_stringshare_del));
585 }
586 else
587 if (ecore_list_find(desktop->categories,
588 ECORE_COMPARE_CB(strcmp), category)) return;
589 608
590 ecore_list_append(desktop->categories, 609 desktop->categories = eina_list_append(desktop->categories,
591 (void *)eina_stringshare_add(category)); 610 (void *)eina_stringshare_add(category));
592} 611}
593 612
@@ -600,17 +619,20 @@ efreet_desktop_category_add(Efreet_Desktop *desktop, const char *category)
600EAPI int 619EAPI int
601efreet_desktop_category_del(Efreet_Desktop *desktop, const char *category) 620efreet_desktop_category_del(Efreet_Desktop *desktop, const char *category)
602{ 621{
603 int found = 0; 622 char *found = NULL;
623
604 if (!desktop || !desktop->categories) return 0; 624 if (!desktop || !desktop->categories) return 0;
605 625
606 if (ecore_list_find(desktop->categories, 626 if ((found = eina_list_search_unsorted(desktop->categories,
607 ECORE_COMPARE_CB(strcmp), category)) 627 (Eina_Compare_Cb)strcmp, category)))
608 { 628 {
609 found = 1; 629 eina_stringshare_del(found);
610 ecore_list_remove(desktop->categories); 630 desktop->categories = eina_list_remove(desktop->categories, found);
631
632 return 1;
611 } 633 }
612 634
613 return found; 635 return 0;
614} 636}
615 637
616/** 638/**
@@ -632,7 +654,7 @@ efreet_desktop_type_add(const char *type, Efreet_Desktop_Type_Parse_Cb parse_fun
632 info = NEW(Efreet_Desktop_Type_Info, 1); 654 info = NEW(Efreet_Desktop_Type_Info, 1);
633 if (!info) return 0; 655 if (!info) return 0;
634 656
635 id = ecore_list_count(efreet_desktop_types); 657 id = eina_list_count(efreet_desktop_types);
636 658
637 info->id = id; 659 info->id = id;
638 info->type = strdup(type); 660 info->type = strdup(type);
@@ -640,7 +662,7 @@ efreet_desktop_type_add(const char *type, Efreet_Desktop_Type_Parse_Cb parse_fun
640 info->save_func = save_func; 662 info->save_func = save_func;
641 info->free_func = free_func; 663 info->free_func = free_func;
642 664
643 ecore_list_append(efreet_desktop_types, info); 665 efreet_desktop_types = eina_list_append(efreet_desktop_types, info);
644 666
645 return id; 667 return id;
646} 668}
@@ -657,7 +679,7 @@ EAPI int
657efreet_desktop_type_alias(int from_type, const char *alias) 679efreet_desktop_type_alias(int from_type, const char *alias)
658{ 680{
659 Efreet_Desktop_Type_Info *info; 681 Efreet_Desktop_Type_Info *info;
660 info = ecore_list_index_goto(efreet_desktop_types, from_type); 682 info = eina_list_nth(efreet_desktop_types, from_type);
661 if (!info) return -1; 683 if (!info) return -1;
662 684
663 return efreet_desktop_type_add(alias, info->parse_func, info->save_func, info->free_func); 685 return efreet_desktop_type_add(alias, info->parse_func, info->save_func, info->free_func);