489:af6be1e123aa | 490:e66551b47466 |
---|---|
611 cx_linked_list_sort((void **) &ll->begin, (void **) &ll->end, | 611 cx_linked_list_sort((void **) &ll->begin, (void **) &ll->end, |
612 CX_LL_LOC_PREV, CX_LL_LOC_NEXT, CX_LL_LOC_DATA, | 612 CX_LL_LOC_PREV, CX_LL_LOC_NEXT, CX_LL_LOC_DATA, |
613 true, list->cmpfunc); | 613 true, list->cmpfunc); |
614 } | 614 } |
615 | 615 |
616 static void cx_ll_reverse(cx_list_s *list) { | |
617 cx_linked_list *ll = (cx_linked_list *) list; | |
618 cx_linked_list_reverse((void **) &ll->begin, (void **) ll->end, CX_LL_LOC_PREV, CX_LL_LOC_NEXT); | |
619 } | |
620 | |
616 static int cx_ll_compare( | 621 static int cx_ll_compare( |
617 cx_list_s const *list, | 622 cx_list_s const *list, |
618 cx_list_s const *other | 623 cx_list_s const *other |
619 ) { | 624 ) { |
620 cx_linked_list *left = (cx_linked_list *) list; | 625 cx_linked_list *left = (cx_linked_list *) list; |
640 cx_ll_insert, | 645 cx_ll_insert, |
641 cx_ll_remove, | 646 cx_ll_remove, |
642 cx_ll_at, | 647 cx_ll_at, |
643 cx_ll_find, | 648 cx_ll_find, |
644 cx_ll_sort, | 649 cx_ll_sort, |
645 cx_ll_compare | 650 cx_ll_compare, |
651 cx_ll_reverse | |
646 }; | 652 }; |
647 | 653 |
648 static cx_list_class cx_pointer_linked_list_class = { | 654 static cx_list_class cx_pointer_linked_list_class = { |
649 cx_pll_add, | 655 cx_pll_add, |
650 cx_pll_insert, | 656 cx_pll_insert, |
651 cx_ll_remove, | 657 cx_ll_remove, |
652 cx_pll_at, | 658 cx_pll_at, |
653 cx_pll_find, | 659 cx_pll_find, |
654 cx_pll_sort, | 660 cx_pll_sort, |
655 cx_pll_compare | 661 cx_pll_compare, |
662 cx_ll_reverse | |
656 }; | 663 }; |
657 | 664 |
658 CxList cxLinkedListCreate( | 665 CxList cxLinkedListCreate( |
659 CxAllocator allocator, | 666 CxAllocator allocator, |
660 CxListComparator comparator, | 667 CxListComparator comparator, |