# HG changeset patch # User Mike Becker # Date 1345109476 -7200 # Node ID a9d656e4f7cec0477dca924f821e8d60e750cce2 # Parent fdabd1240b691054ac1971b8d7453f9c6cabd176 changed API of sort algorithms (no further hint for the algorithms used in preparation for the upcomming change from qsort to natural merge sort) diff -r fdabd1240b69 -r a9d656e4f7ce test/dlist_tests.c --- 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( diff -r fdabd1240b69 -r a9d656e4f7ce test/dlist_tests.h --- 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 } diff -r fdabd1240b69 -r a9d656e4f7ce test/list_tests.c --- 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( diff -r fdabd1240b69 -r a9d656e4f7ce test/list_tests.h --- 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 } diff -r fdabd1240b69 -r a9d656e4f7ce test/main.c --- 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); diff -r fdabd1240b69 -r a9d656e4f7ce ucx/dlist.c --- 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; } diff -r fdabd1240b69 -r a9d656e4f7ce ucx/dlist.h --- 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); diff -r fdabd1240b69 -r a9d656e4f7ce ucx/list.c --- 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; } diff -r fdabd1240b69 -r a9d656e4f7ce ucx/list.h --- 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);