src/cx/linked_list.h

changeset 476
60ff4561dc04
parent 475
31bf97fdbf71
child 477
73a93c7a56ae
     1.1 --- a/src/cx/linked_list.h	Sat Dec 04 17:38:23 2021 +0100
     1.2 +++ b/src/cx/linked_list.h	Mon Dec 20 11:17:06 2021 +0100
     1.3 @@ -172,20 +172,16 @@
     1.4   * \li \p loc_next and \p loc_prev
     1.5   * \li \p loc_next and \p begin
     1.6   *
     1.7 - * This function returns an adjacent node according to the following rules:
     1.8 - * \li if the node has only one adjacent node, that one is returned
     1.9 - * \li otherwise, the former \c prev node is returned
    1.10 - *
    1.11 - * \remark The \c next and \c prev pointers of the removed node are cleared by this function.
    1.12 + * \remark The \c next and \c prev pointers of the removed node are not cleared by this function and may still be used
    1.13 + * to traverse to a former adjacent node in the list.
    1.14   *
    1.15   * @param begin a pointer to the begin node pointer (optional)
    1.16   * @param end a pointer to the end node pointer (optional)
    1.17   * @param loc_prev the location of a \c prev pointer within your node struct (negative if your struct does not have one)
    1.18   * @param loc_next the location of a \c next pointer within your node struct (required)
    1.19   * @param node the node to remove
    1.20 - * @return an adjacent node or \c NULL, if this was the last node
    1.21   */
    1.22 -void *cx_linked_list_remove(void **begin, void **end, ptrdiff_t loc_prev, ptrdiff_t loc_next, void *node);
    1.23 +void cx_linked_list_remove(void **begin, void **end, ptrdiff_t loc_prev, ptrdiff_t loc_next, void *node);
    1.24  
    1.25  
    1.26  /**
    1.27 @@ -216,6 +212,8 @@
    1.28   * }
    1.29   * \endcode
    1.30   *
    1.31 + * @note This is a recursive function with at most logarithmic recursion depth.
    1.32 + *
    1.33   * @param begin a pointer to the begin node pointer (required)
    1.34   * @param end a pointer to the end node pointer (optional)
    1.35   * @param loc_prev the location of a \c prev pointer within your node struct (negative if not present)

mercurial