src/cx/linked_list.h

changeset 1692
56731bb98508
parent 1675
36c0fb2b60b2
equal deleted inserted replaced
1691:5e608d0e5bd1 1692:56731bb98508
441 * @param end a pointer to the end node pointer (if your list has one) 441 * @param end a pointer to the end node pointer (if your list has one)
442 * @param loc_prev the location of a @c prev pointer within your node struct (negative if your struct does not have one) 442 * @param loc_prev the location of a @c prev pointer within your node struct (negative if your struct does not have one)
443 * @param loc_next the location of a @c next pointer within your node struct (required) 443 * @param loc_next the location of a @c next pointer within your node struct (required)
444 * @param new_node a pointer to the node that shall be inserted 444 * @param new_node a pointer to the node that shall be inserted
445 * @param cmp_func a compare function that will receive the node pointers 445 * @param cmp_func a compare function that will receive the node pointers
446 * @param context the context for the compare function
446 * @retval zero when the node was inserted 447 * @retval zero when the node was inserted
447 * @retval non-zero when a node with the same value already exists 448 * @retval non-zero when a node with the same value already exists
448 */ 449 */
449 CX_EXTERN CX_NONNULL_ARG(1, 5, 6) 450 CX_EXTERN CX_NONNULL_ARG(1, 5, 6)
450 int cx_linked_list_insert_unique_c(void **begin, void **end, 451 int cx_linked_list_insert_unique_c(void **begin, void **end,
589 * @param begin_left the beginning of the left list (@c NULL denotes an empty list) 590 * @param begin_left the beginning of the left list (@c NULL denotes an empty list)
590 * @param begin_right the beginning of the right list (@c NULL denotes an empty list) 591 * @param begin_right the beginning of the right list (@c NULL denotes an empty list)
591 * @param loc_advance the location of the pointer to advance 592 * @param loc_advance the location of the pointer to advance
592 * @param loc_data the location of the @c data pointer within your node struct 593 * @param loc_data the location of the @c data pointer within your node struct
593 * @param cmp_func the function to compare the elements 594 * @param cmp_func the function to compare the elements
595 * @param context the context for the compare function
594 * @return the first non-zero result of invoking @p cmp_func or: negative if the left list is smaller than the 596 * @return the first non-zero result of invoking @p cmp_func or: negative if the left list is smaller than the
595 * right list, positive if the left list is larger than the right list, zero if both lists are equal. 597 * right list, positive if the left list is larger than the right list, zero if both lists are equal.
596 */ 598 */
597 CX_EXTERN CX_NONNULL_ARG(5) 599 CX_EXTERN CX_NONNULL_ARG(5)
598 int cx_linked_list_compare_c(const void *begin_left, const void *begin_right, 600 int cx_linked_list_compare_c(const void *begin_left, const void *begin_right,

mercurial