aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/ecore/src/lib/ecore_file/ecore_file.c
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/ecore/src/lib/ecore_file/ecore_file.c
parent * eina/src/lib/eina_list.c: Use less code. (diff)
downloadefl-6978e98dc6247373e7a2a3ec2ec58b37ff404c01.tar.gz
* 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_file/ecore_file.c14
1 files changed, 5 insertions, 9 deletions
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)
* For more information see the manual pages of strcoll and setlocale.
* The list will not contain the directory entries for '.' and '..'.
* @param dir The name of the directory to list
- * @return Return an Ecore_List containing all the files in the directory;
+ * @return Return an Eina_List containing all the files in the directory;
* on failure it returns NULL.
*/
-EAPI Ecore_List *
+EAPI Eina_List *
ecore_file_ls(const char *dir)
{
char *f;
DIR *dirp;
struct dirent *dp;
- Ecore_List *list;
+ Eina_List *list = NULL;
dirp = opendir(dir);
if (!dirp) return NULL;
- list = ecore_list_new();
- ecore_list_free_cb_set(list, free);
-
while ((dp = readdir(dirp)))
{
if ((strcmp(dp->d_name, ".")) && (strcmp(dp->d_name, "..")))
{
f = strdup(dp->d_name);
- ecore_list_append(list, f);
+ list = eina_list_append(list, f);
}
}
closedir(dirp);
- ecore_list_sort(list, ECORE_COMPARE_CB(strcoll), ECORE_SORT_MIN);
+ list = eina_list_sort(list, ECORE_SORT_MIN, ECORE_COMPARE_CB(strcoll));
- ecore_list_first_goto(list);
return list;
}