664 cfunc, cdata, failed, root, |
664 cfunc, cdata, failed, root, |
665 loc_parent, loc_children, loc_last_child, |
665 loc_parent, loc_children, loc_last_child, |
666 loc_prev, loc_next); |
666 loc_prev, loc_next); |
667 } |
667 } |
668 |
668 |
|
669 |
|
670 int cxTreeAddChild( |
|
671 CxTree *tree, |
|
672 void *parent, |
|
673 const void *data) { |
|
674 void *node = tree->node_create(data, tree); |
|
675 if (node == NULL) return 1; |
|
676 cx_tree_zero_pointers(node, cx_tree_node_layout(tree)); |
|
677 cx_tree_link(parent, node, cx_tree_node_layout(tree)); |
|
678 tree->size++; |
|
679 return 0; |
|
680 } |