510 * again. |
510 * again. |
511 * |
511 * |
512 * Refer to the documentation of #cx_tree_add() for more details. |
512 * Refer to the documentation of #cx_tree_add() for more details. |
513 * |
513 * |
514 * @param iter a pointer to an arbitrary iterator |
514 * @param iter a pointer to an arbitrary iterator |
|
515 * @param num the maximum number of elements to obtain from the iterator |
515 * @param sfunc a search function |
516 * @param sfunc a search function |
516 * @param cfunc a node creation function |
517 * @param cfunc a node creation function |
517 * @param cdata optional additional data |
518 * @param cdata optional additional data |
518 * @param root the root node of the tree |
519 * @param root the root node of the tree |
519 * @param failed location where the pointer to a failed node shall be stored |
520 * @param failed location where the pointer to a failed node shall be stored |
524 * @param loc_prev offset in the node struct for the prev pointer |
525 * @param loc_prev offset in the node struct for the prev pointer |
525 * @param loc_next offset in the node struct for the next pointer |
526 * @param loc_next offset in the node struct for the next pointer |
526 * @return the number of nodes created and added |
527 * @return the number of nodes created and added |
527 * @see cx_tree_add() |
528 * @see cx_tree_add() |
528 */ |
529 */ |
529 __attribute__((__nonnull__(1, 2, 3, 5, 6))) |
530 __attribute__((__nonnull__(1, 3, 4, 6, 7))) |
530 size_t cx_tree_add_iter( |
531 size_t cx_tree_add_iter( |
531 struct cx_iterator_base_s *iter, |
532 struct cx_iterator_base_s *iter, |
|
533 size_t num, |
532 cx_tree_search_func sfunc, |
534 cx_tree_search_func sfunc, |
533 cx_tree_node_create_func cfunc, |
535 cx_tree_node_create_func cfunc, |
534 void *cdata, |
536 void *cdata, |
535 void **failed, |
537 void **failed, |
536 void *root, |
538 void *root, |