121#define CCC_sort_mergesort(list_pointer, order, comparator_pointer) \
122 _Generic((list_pointer), CCC_Singly_linked_list *: CCC_sort_singly_linked_list_mergesort, CCC_Doubly_linked_list *: CCC_sort_doubly_linked_list_mergesort)( \
123 list_pointer, order, comparator_pointer \
130#ifdef SORT_USING_NAMESPACE_CCC
132# define sort_heapsort(args...) CCC_sort_heapsort(args)
133# define sort_singly_linked_list_mergesort(args...) \
134 CCC_sort_singly_linked_list_mergesort(args)
135# define sort_doubly_linked_list_mergesort(args...) \
136 CCC_sort_doubly_linked_list_mergesort(args)
137# define sort_mergesort(args...) CCC_sort_mergesort(args)
The Doubly Linked List Interface.
The Singly Linked List Interface.
CCC_Result CCC_sort_doubly_linked_list_mergesort(CCC_Doubly_linked_list *list, CCC_Order order, CCC_Comparator const *comparator)
Sorts the doubly linked list in user specified order as defined by the provided order and comparator....
CCC_Result CCC_sort_heapsort(CCC_Buffer *buffer, void *temp, CCC_Order order, CCC_Comparator const *comparator)
Sorts the input buffer in O(N * log(N)) time and O(1) space according to the desired input order.
CCC_Result CCC_sort_singly_linked_list_mergesort(CCC_Singly_linked_list *list, CCC_Order order, CCC_Comparator const *comparator)
Sorts the singly linked list in user specified order as defined by the provided order and comparator....
Definition: private_buffer.h:32
The type passed by reference to any container function that may need to compare elements....
Definition: types.h:416
Definition: private_doubly_linked_list.h:66
Definition: private_singly_linked_list.h:63
The C Container Collection Fundamental Types.
CCC_Order
A three-way comparison for comparison functions.
Definition: types.h:214
CCC_Result
A result of actions on containers.
Definition: types.h:192