diff -r 2946e13c89a4 -r 4373c2a90066 src/cx/linked_list.h --- a/src/cx/linked_list.h Sat May 21 11:22:47 2022 +0200 +++ b/src/cx/linked_list.h Sat May 21 12:10:25 2022 +0200 @@ -402,25 +402,31 @@ /** * Compares two lists element wise. * + * The \c follow_ptr flags have the following meaning: if \c false, the pointer denoted by \p loc_data shall + * directly be passed to the \p cmp_func. + * If \c true, the data at \p loc_data is assumed to be a pointer, dereferenced, and then passed to \p cmp_func. + * * \note Both list must have the same structure. * * @param begin_left the begin of the left list (\c NULL denotes an empty list) * @param begin_right the begin of the right list (\c NULL denotes an empty list) * @param loc_advance the location of the pointer to advance * @param loc_data the location of the \c data pointer within your node struct - * @param follow_ptr \c false if the pointer denoted by \p loc_data shall be passed to the \p cmp_func. - * If \c true, the data at \p loc_data is assumed to be a pointer, dereferenced, and then passed to \p cmp_func. + * @param follow_ptr_left indicates whether pointers in the left list shall be dereferenced + * @param follow_ptr_right indicates whether pointers in the right list shall be dereferenced * @param cmp_func the function to compare the elements - * @return + * @return the first non-zero result of invoking \p cmp_func or: negative if the left list is smaller than the + * right list, positive if the left list is larger than the right list, zero if both lists are equal. */ int cx_linked_list_compare( void const *begin_left, void const *begin_right, ptrdiff_t loc_advance, ptrdiff_t loc_data, - bool follow_ptr, + bool follow_ptr_left, + bool follow_ptr_right, CxListComparator cmp_func -) __attribute__((__nonnull__(6))); +) __attribute__((__nonnull__(7))); /** * Reverses the order of the nodes in a linked list.