| 103 size_t *found_index, |
103 size_t *found_index, |
| 104 cx_compare_func cmp_func |
104 cx_compare_func cmp_func |
| 105 ) { |
105 ) { |
| 106 cx_compare_func_wrapper wrapper = {cmp_func}; |
106 cx_compare_func_wrapper wrapper = {cmp_func}; |
| 107 return cx_linked_list_find_c(start, loc_advance, loc_data, |
107 return cx_linked_list_find_c(start, loc_advance, loc_data, |
| 108 elem, found_index, cx_ccmp_wrap, &wrapper); |
108 elem, found_index, cx_cmp_wrap, &wrapper); |
| 109 } |
109 } |
| 110 |
110 |
| 111 void *cx_linked_list_first( |
111 void *cx_linked_list_first( |
| 112 const void *node, |
112 const void *node, |
| 113 ptrdiff_t loc_prev |
113 ptrdiff_t loc_prev |
| 418 cx_compare_func cmp_func |
418 cx_compare_func cmp_func |
| 419 ) { |
419 ) { |
| 420 cx_compare_func_wrapper wrapper = {cmp_func}; |
420 cx_compare_func_wrapper wrapper = {cmp_func}; |
| 421 cx_linked_list_insert_sorted_chain_impl( |
421 cx_linked_list_insert_sorted_chain_impl( |
| 422 begin, end, loc_prev, loc_next, |
422 begin, end, loc_prev, loc_next, |
| 423 insert_begin, cx_ccmp_wrap, &wrapper, true); |
423 insert_begin, cx_cmp_wrap, &wrapper, true); |
| 424 } |
424 } |
| 425 |
425 |
| 426 int cx_linked_list_insert_unique( |
426 int cx_linked_list_insert_unique( |
| 427 void **begin, |
427 void **begin, |
| 428 void **end, |
428 void **end, |
| 445 cx_compare_func cmp_func |
445 cx_compare_func cmp_func |
| 446 ) { |
446 ) { |
| 447 cx_compare_func_wrapper wrapper = {cmp_func}; |
447 cx_compare_func_wrapper wrapper = {cmp_func}; |
| 448 return cx_linked_list_insert_sorted_chain_impl( |
448 return cx_linked_list_insert_sorted_chain_impl( |
| 449 begin, end, loc_prev, loc_next, |
449 begin, end, loc_prev, loc_next, |
| 450 insert_begin, cx_ccmp_wrap, &wrapper, false); |
450 insert_begin, cx_cmp_wrap, &wrapper, false); |
| 451 } |
451 } |
| 452 |
452 |
| 453 void cx_linked_list_insert_sorted_c( |
453 void cx_linked_list_insert_sorted_c( |
| 454 void **begin, |
454 void **begin, |
| 455 void **end, |
455 void **end, |
| 715 ptrdiff_t loc_next, |
715 ptrdiff_t loc_next, |
| 716 ptrdiff_t loc_data, |
716 ptrdiff_t loc_data, |
| 717 cx_compare_func cmp_func |
717 cx_compare_func cmp_func |
| 718 ) { |
718 ) { |
| 719 cx_compare_func_wrapper wrapper = {cmp_func}; |
719 cx_compare_func_wrapper wrapper = {cmp_func}; |
| 720 cx_linked_list_sort_c(begin, end, loc_prev, loc_next, loc_data, cx_ccmp_wrap, &wrapper); |
720 cx_linked_list_sort_c(begin, end, loc_prev, loc_next, loc_data, cx_cmp_wrap, &wrapper); |
| 721 } |
721 } |
| 722 |
722 |
| 723 int cx_linked_list_compare_c( |
723 int cx_linked_list_compare_c( |
| 724 const void *begin_left, |
724 const void *begin_left, |
| 725 const void *begin_right, |
725 const void *begin_right, |
| 751 ptrdiff_t loc_data, |
751 ptrdiff_t loc_data, |
| 752 cx_compare_func cmp_func |
752 cx_compare_func cmp_func |
| 753 ) { |
753 ) { |
| 754 cx_compare_func_wrapper wrapper = {cmp_func}; |
754 cx_compare_func_wrapper wrapper = {cmp_func}; |
| 755 return cx_linked_list_compare_c(begin_left, begin_right, |
755 return cx_linked_list_compare_c(begin_left, begin_right, |
| 756 loc_advance, loc_data, cx_ccmp_wrap, &wrapper); |
756 loc_advance, loc_data, cx_cmp_wrap, &wrapper); |
| 757 } |
757 } |
| 758 |
758 |
| 759 void cx_linked_list_reverse( |
759 void cx_linked_list_reverse( |
| 760 void **begin, |
760 void **begin, |
| 761 void **end, |
761 void **end, |