Enlightenment CVS committal

Author  : pfritz
Project : e17
Module  : libs/ecore

Dir     : e17/libs/ecore/src/lib/ecore_file


Modified Files:
        ecore_file.c 


Log Message:
- add ecore_list_sort() a wrapper for ecore_list_mergesort and 
ecore_list_heapsort
- change the API for the sort functions to return an int on success
- change ECORE_SHEAP_MIN/MAX to ECORE_SORT_MIN/MAX (*API break*)
- use ecore_list_sort() in ecore_file_ls()

===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_file/ecore_file.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -3 -r1.52 -r1.53
--- ecore_file.c        18 Jan 2007 07:28:56 -0000      1.52
+++ ecore_file.c        1 Feb 2007 19:22:35 -0000       1.53
@@ -298,7 +298,6 @@
    DIR                *dirp;
    struct dirent      *dp;
    Ecore_List         *list;
-   Ecore_Sheap        *heap;
 
    dirp = opendir(dir);
    if (!dirp) return NULL;
@@ -315,25 +314,8 @@
          }
      }
    closedir(dirp);
-
-   /*
-    * Push the data into a heap.
-    */
-   heap = ecore_sheap_new(ECORE_COMPARE_CB(strcasecmp), 
ecore_list_nodes(list));
-   while ((f = ecore_list_remove_first(list)))
-     {
-       ecore_sheap_insert(heap, f);
-     }
-
-   /*
-    * Extract in sorted order.
-    */
-   while ((f = ecore_sheap_extract(heap)))
-     {
-       ecore_list_append(list, f);
-     }
-
-   ecore_sheap_destroy(heap);
+   
+   ecore_list_sort(list, ECORE_COMPARE_CB(strcasecmp), ECORE_SORT_MIN);
 
    ecore_list_goto_first(list);
    return list;



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to