changed API of sort algorithms (no further hint for the algorithms used in preparation for the upcomming change from qsort to natural merge sort)

Thu, 16 Aug 2012 11:31:16 +0200

author
Mike Becker <universe@uap-core.de>
date
Thu, 16 Aug 2012 11:31:16 +0200
changeset 36
a9d656e4f7ce
parent 35
fdabd1240b69
child 37
ec296899d12f

changed API of sort algorithms (no further hint for the algorithms used in preparation for the upcomming change from qsort to natural merge sort)

test/dlist_tests.c file | annotate | diff | comparison | revisions
test/dlist_tests.h file | annotate | diff | comparison | revisions
test/list_tests.c file | annotate | diff | comparison | revisions
test/list_tests.h file | annotate | diff | comparison | revisions
test/main.c file | annotate | diff | comparison | revisions
ucx/dlist.c file | annotate | diff | comparison | revisions
ucx/dlist.h file | annotate | diff | comparison | revisions
ucx/list.c file | annotate | diff | comparison | revisions
ucx/list.h file | annotate | diff | comparison | revisions
--- a/test/dlist_tests.c	Wed Aug 15 19:32:29 2012 +0200
+++ b/test/dlist_tests.c	Thu Aug 16 11:31:16 2012 +0200
@@ -166,7 +166,7 @@
     ucx_dlist_free(copy);
 }
 
-UCX_TEST_IMPLEMENT(test_ucx_dlist_qsort) {
+UCX_TEST_IMPLEMENT(test_ucx_dlist_sort) {
     UcxDlist *list = ucx_dlist_append(NULL, "this");
     list = ucx_dlist_append(list, "is");
     list = ucx_dlist_append(list, "a");
@@ -183,7 +183,7 @@
     expected = ucx_dlist_append(expected, "test");
     expected = ucx_dlist_append(expected, "this");
 
-    list = ucx_dlist_qsort(list, cmp_string, NULL);
+    list = ucx_dlist_sort(list, cmp_string, NULL);
 
     UCX_TEST_BEGIN
     UCX_TEST_ASSERT(
--- a/test/dlist_tests.h	Wed Aug 15 19:32:29 2012 +0200
+++ b/test/dlist_tests.h	Thu Aug 16 11:31:16 2012 +0200
@@ -32,7 +32,7 @@
 UCX_TEST_DECLARE(test_ucx_dlist_get)
 UCX_TEST_DECLARE(test_ucx_dlist_remove)
 UCX_TEST_DECLARE(test_ucx_dlist_clone)
-UCX_TEST_DECLARE(test_ucx_dlist_qsort)
+UCX_TEST_DECLARE(test_ucx_dlist_sort)
 
 #ifdef	__cplusplus
 }
--- a/test/list_tests.c	Wed Aug 15 19:32:29 2012 +0200
+++ b/test/list_tests.c	Thu Aug 16 11:31:16 2012 +0200
@@ -154,7 +154,7 @@
     ucx_list_free(copy);
 }
 
-UCX_TEST_IMPLEMENT(test_ucx_list_qsort) {
+UCX_TEST_IMPLEMENT(test_ucx_list_sort) {
     UcxList *list = ucx_list_append(NULL, "this");
     list = ucx_list_append(list, "is");
     list = ucx_list_append(list, "a");
@@ -171,7 +171,7 @@
     expected = ucx_list_append(expected, "test");
     expected = ucx_list_append(expected, "this");
 
-    list = ucx_list_qsort(list, cmp_string, NULL);
+    list = ucx_list_sort(list, cmp_string, NULL);
 
     UCX_TEST_BEGIN
     UCX_TEST_ASSERT(
--- a/test/list_tests.h	Wed Aug 15 19:32:29 2012 +0200
+++ b/test/list_tests.h	Thu Aug 16 11:31:16 2012 +0200
@@ -31,7 +31,7 @@
 UCX_TEST_DECLARE(test_ucx_list_get)
 UCX_TEST_DECLARE(test_ucx_list_remove)
 UCX_TEST_DECLARE(test_ucx_list_clone)
-UCX_TEST_DECLARE(test_ucx_list_qsort)
+UCX_TEST_DECLARE(test_ucx_list_sort)
 
 #ifdef	__cplusplus
 }
--- a/test/main.c	Wed Aug 15 19:32:29 2012 +0200
+++ b/test/main.c	Thu Aug 16 11:31:16 2012 +0200
@@ -116,7 +116,7 @@
         ucx_test_register(suite, test_ucx_list_get);
         ucx_test_register(suite, test_ucx_list_remove);
         ucx_test_register(suite, test_ucx_list_clone);
-        ucx_test_register(suite, test_ucx_list_qsort);
+        ucx_test_register(suite, test_ucx_list_sort);
         
         /* UcxDlist Tests */
         ucx_test_register(suite, test_ucx_dlist_append);
@@ -129,7 +129,7 @@
         ucx_test_register(suite, test_ucx_dlist_get);
         ucx_test_register(suite, test_ucx_dlist_remove);
         ucx_test_register(suite, test_ucx_dlist_clone);
-        ucx_test_register(suite, test_ucx_dlist_qsort);
+        ucx_test_register(suite, test_ucx_dlist_sort);
 
         /* UcxMemPool Tests */
         ucx_test_register(suite, test_ucx_mempool_new);
--- a/ucx/dlist.c	Wed Aug 15 19:32:29 2012 +0200
+++ b/ucx/dlist.c	Thu Aug 16 11:31:16 2012 +0200
@@ -145,7 +145,7 @@
     }
 }
 
-UcxDlist *ucx_dlist_qsort(UcxDlist *l, cmp_func fnc, void *data) {
+UcxDlist *ucx_dlist_sort(UcxDlist *l, cmp_func fnc, void *data) {
     if (l == NULL) {
         return NULL;
     }
--- a/ucx/dlist.h	Wed Aug 15 19:32:29 2012 +0200
+++ b/ucx/dlist.h	Thu Aug 16 11:31:16 2012 +0200
@@ -30,7 +30,7 @@
 UcxDlist *ucx_dlist_get(UcxDlist *l, int index);
 size_t ucx_dlist_size(UcxDlist *l);
 
-UcxDlist *ucx_dlist_qsort(UcxDlist *l, cmp_func fnc, void *data);
+UcxDlist *ucx_dlist_sort(UcxDlist *l, cmp_func fnc, void *data);
 
 /* dlist specific functions */
 UcxDlist *ucx_dlist_first(UcxDlist *l);
--- a/ucx/list.c	Wed Aug 15 19:32:29 2012 +0200
+++ b/ucx/list.c	Thu Aug 16 11:31:16 2012 +0200
@@ -141,7 +141,7 @@
     }
 }
 
-UcxList *ucx_list_qsort(UcxList *l, cmp_func fnc, void *data) {
+UcxList *ucx_list_sort(UcxList *l, cmp_func fnc, void *data) {
     if (l == NULL) {
         return NULL;
     }
--- a/ucx/list.h	Wed Aug 15 19:32:29 2012 +0200
+++ b/ucx/list.h	Thu Aug 16 11:31:16 2012 +0200
@@ -29,7 +29,7 @@
 UcxList *ucx_list_get(UcxList *l, int index);
 size_t ucx_list_size(UcxList *l);
 
-UcxList *ucx_list_qsort(UcxList *l, cmp_func fnc, void *data);
+UcxList *ucx_list_sort(UcxList *l, cmp_func fnc, void *data);
 
 /* list specific functions */
 UcxList *ucx_list_remove(UcxList *l, UcxList *e);

mercurial