1.1 --- a/src/cx/linked_list.h Mon Dec 27 17:16:32 2021 +0100 1.2 +++ b/src/cx/linked_list.h Tue Dec 28 14:16:04 2021 +0100 1.3 @@ -382,6 +382,28 @@ 1.4 CxListComparator cmp_func 1.5 ) __attribute__((__nonnull__(1, 7))); 1.6 1.7 + 1.8 +/** 1.9 + * Compares two lists element wise. 1.10 + * 1.11 + * @param begin_left the begin of the left list (\c NULL denotes an empty list) 1.12 + * @param begin_right the begin of the right list (\c NULL denotes an empty list) 1.13 + * @param loc_advance the location of the pointer to advance 1.14 + * @param loc_data the location of the \c data pointer within your node struct 1.15 + * @param follow_ptr \c false if the pointer denoted by \p loc_data shall be passed to the \p cmp_func. 1.16 + * If \c true, the data at \p loc_data is assumed to be a pointer, dereferenced, and then passed to \p cmp_func. 1.17 + * @param cmp_func the function to compare the elements 1.18 + * @return 1.19 + */ 1.20 +int cx_linked_list_compare( 1.21 + void *begin_left, 1.22 + void *begin_right, 1.23 + ptrdiff_t loc_advance, 1.24 + ptrdiff_t loc_data, 1.25 + int follow_ptr, 1.26 + CxListComparator cmp_func 1.27 +) __attribute__((__nonnull__(6))); 1.28 + 1.29 /** 1.30 * Reverses the order of the nodes in a linked list. 1.31 *