From 07733bd0a10e1ebc89da00b3f13dfc96f8551b43 Mon Sep 17 00:00:00 2001 From: Sebastian Dransfeld Date: Tue, 26 Jan 2010 20:42:49 +0000 Subject: [PATCH] Remove Ecore_Data SVN revision: 45599 --- legacy/ecore/src/bin/ecore_config.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/legacy/ecore/src/bin/ecore_config.c b/legacy/ecore/src/bin/ecore_config.c index 243f31f09f..8bf29882dd 100644 --- a/legacy/ecore/src/bin/ecore_config.c +++ b/legacy/ecore/src/bin/ecore_config.c @@ -10,7 +10,6 @@ #include #include #include "Ecore_Config.h" -#include "Ecore_Data.h" #include "ecore_config_private.h" // strcmp for paths - for sorting folders before files @@ -106,19 +105,9 @@ get(const char *key) static int list(const char *file) { - char *key; - - Eet_File *ef; Ecore_Config_Prop *e; - Ecore_Sheap *keys; - - // Get number of keys and create heap for sort - ef = eet_open(file, EET_FILE_MODE_READ); - if (!ef) return -1; - - keys = ecore_sheap_new(ECORE_COMPARE_CB(pathcmp), eet_num_entries(ef)); - - eet_close(ef); + Eina_List *keys = NULL; + char *key; e = __ecore_config_bundle_local->data; @@ -126,18 +115,17 @@ list(const char *file) { // don't show system settings if( !(e->flags & ECORE_CONFIG_FLAG_SYSTEM) ) - ecore_sheap_insert(keys, e->key); + keys = eina_list_append(keys, e->key); } while((e = e->next)); + keys = eina_list_sort(keys, -1, EINA_COMPARE_CB(pathcmp)); - while((key = ecore_sheap_extract(keys))) + EINA_LIST_FREE(keys, key) { printf("%-28s\t", key); get(key); } - ecore_sheap_destroy(keys); - return 0; }