| 400 |
400 |
| 401 |
401 |
| 402 /** |
402 /** |
| 403 * Compares two lists element wise. |
403 * Compares two lists element wise. |
| 404 * |
404 * |
| |
405 * The \c follow_ptr flags have the following meaning: if \c false, the pointer denoted by \p loc_data shall |
| |
406 * directly be passed to the \p cmp_func. |
| |
407 * If \c true, the data at \p loc_data is assumed to be a pointer, dereferenced, and then passed to \p cmp_func. |
| |
408 * |
| 405 * \note Both list must have the same structure. |
409 * \note Both list must have the same structure. |
| 406 * |
410 * |
| 407 * @param begin_left the begin of the left list (\c NULL denotes an empty list) |
411 * @param begin_left the begin of the left list (\c NULL denotes an empty list) |
| 408 * @param begin_right the begin of the right list (\c NULL denotes an empty list) |
412 * @param begin_right the begin of the right list (\c NULL denotes an empty list) |
| 409 * @param loc_advance the location of the pointer to advance |
413 * @param loc_advance the location of the pointer to advance |
| 410 * @param loc_data the location of the \c data pointer within your node struct |
414 * @param loc_data the location of the \c data pointer within your node struct |
| 411 * @param follow_ptr \c false if the pointer denoted by \p loc_data shall be passed to the \p cmp_func. |
415 * @param follow_ptr_left indicates whether pointers in the left list shall be dereferenced |
| 412 * If \c true, the data at \p loc_data is assumed to be a pointer, dereferenced, and then passed to \p cmp_func. |
416 * @param follow_ptr_right indicates whether pointers in the right list shall be dereferenced |
| 413 * @param cmp_func the function to compare the elements |
417 * @param cmp_func the function to compare the elements |
| 414 * @return |
418 * @return the first non-zero result of invoking \p cmp_func or: negative if the left list is smaller than the |
| |
419 * right list, positive if the left list is larger than the right list, zero if both lists are equal. |
| 415 */ |
420 */ |
| 416 int cx_linked_list_compare( |
421 int cx_linked_list_compare( |
| 417 void const *begin_left, |
422 void const *begin_left, |
| 418 void const *begin_right, |
423 void const *begin_right, |
| 419 ptrdiff_t loc_advance, |
424 ptrdiff_t loc_advance, |
| 420 ptrdiff_t loc_data, |
425 ptrdiff_t loc_data, |
| 421 bool follow_ptr, |
426 bool follow_ptr_left, |
| |
427 bool follow_ptr_right, |
| 422 CxListComparator cmp_func |
428 CxListComparator cmp_func |
| 423 ) __attribute__((__nonnull__(6))); |
429 ) __attribute__((__nonnull__(7))); |
| 424 |
430 |
| 425 /** |
431 /** |
| 426 * Reverses the order of the nodes in a linked list. |
432 * Reverses the order of the nodes in a linked list. |
| 427 * |
433 * |
| 428 * @param begin a pointer to the begin node pointer (required) |
434 * @param begin a pointer to the begin node pointer (required) |