diff options
author | Cedric BAIL <cedric.bail@free.fr> | 2009-02-25 11:03:47 +0000 |
---|---|---|
committer | Cedric BAIL <cedric.bail@free.fr> | 2009-02-25 11:03:47 +0000 |
commit | 6978e98dc6247373e7a2a3ec2ec58b37ff404c01 (patch) | |
tree | bf9d12da012faab9bc4c2bd925b864c19a38d8d9 /legacy/ecore/src/lib/ecore_file/ecore_file.c | |
parent | e31b5e961eff9b2c8d5c6a5419502d391e12ca00 (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_file/ecore_file.c | 14 |
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) | |||
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 | */ |
515 | EAPI Ecore_List * | 515 | EAPI Eina_List * |
516 | ecore_file_ls(const char *dir) | 516 | ecore_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 | ||