src/linked_list.c

changeset 487
4bd19279778c
parent 486
d7ca126eab7f
child 488
9138acaa494b
     1.1 --- a/src/linked_list.c	Tue Dec 28 14:16:04 2021 +0100
     1.2 +++ b/src/linked_list.c	Tue Dec 28 14:25:05 2021 +0100
     1.3 @@ -60,7 +60,7 @@
     1.4          void *start,
     1.5          ptrdiff_t loc_advance,
     1.6          ptrdiff_t loc_data,
     1.7 -        int follow_ptr,
     1.8 +        bool follow_ptr,
     1.9          CxListComparator cmp_func,
    1.10          void *elem
    1.11  ) {
    1.12 @@ -284,7 +284,7 @@
    1.13          ptrdiff_t loc_prev,
    1.14          ptrdiff_t loc_next,
    1.15          ptrdiff_t loc_data,
    1.16 -        int follow_ptr,
    1.17 +        bool follow_ptr,
    1.18          size_t length,
    1.19          void *ls,
    1.20          void *le,
    1.21 @@ -340,7 +340,7 @@
    1.22          ptrdiff_t loc_prev,
    1.23          ptrdiff_t loc_next,
    1.24          ptrdiff_t loc_data,
    1.25 -        int follow_ptr,
    1.26 +        bool follow_ptr,
    1.27          CxListComparator cmp_func
    1.28  ) {
    1.29      assert(begin != NULL);
    1.30 @@ -401,7 +401,7 @@
    1.31          void *begin_right,
    1.32          ptrdiff_t loc_advance,
    1.33          ptrdiff_t loc_data,
    1.34 -        int follow_ptr,
    1.35 +        bool follow_ptr,
    1.36          CxListComparator cmp_func
    1.37  ) {
    1.38      void *left = begin_left, *right = begin_right;
    1.39 @@ -587,7 +587,7 @@
    1.40  ) {
    1.41      return cx_linked_list_find(((cx_linked_list *) list)->begin,
    1.42                                 CX_LL_LOC_NEXT, CX_LL_LOC_DATA,
    1.43 -                               0, list->cmpfunc, elem);
    1.44 +                               false, list->cmpfunc, elem);
    1.45  }
    1.46  
    1.47  static size_t cx_pll_find(
    1.48 @@ -596,21 +596,21 @@
    1.49  ) {
    1.50      return cx_linked_list_find(((cx_linked_list *) list)->begin,
    1.51                                 CX_LL_LOC_NEXT, CX_LL_LOC_DATA,
    1.52 -                               1, list->cmpfunc, elem);
    1.53 +                               true, list->cmpfunc, elem);
    1.54  }
    1.55  
    1.56  static void cx_ll_sort(cx_list_s *list) {
    1.57      cx_linked_list *ll = (cx_linked_list *) list;
    1.58      cx_linked_list_sort((void **) &ll->begin, (void **) &ll->end,
    1.59                          CX_LL_LOC_PREV, CX_LL_LOC_NEXT, CX_LL_LOC_DATA,
    1.60 -                        0, list->cmpfunc);
    1.61 +                        false, list->cmpfunc);
    1.62  }
    1.63  
    1.64  static void cx_pll_sort(cx_list_s *list) {
    1.65      cx_linked_list *ll = (cx_linked_list *) list;
    1.66      cx_linked_list_sort((void **) &ll->begin, (void **) &ll->end,
    1.67                          CX_LL_LOC_PREV, CX_LL_LOC_NEXT, CX_LL_LOC_DATA,
    1.68 -                        1, list->cmpfunc);
    1.69 +                        true, list->cmpfunc);
    1.70  }
    1.71  
    1.72  static cx_list_class cx_linked_list_class = {

mercurial