aboutsummaryrefslogtreecommitdiff
path: root/c13/ex02/btree_apply_infix.c
diff options
context:
space:
mode:
Diffstat (limited to 'c13/ex02/btree_apply_infix.c')
-rw-r--r--c13/ex02/btree_apply_infix.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/c13/ex02/btree_apply_infix.c b/c13/ex02/btree_apply_infix.c
index 3ff3278..c05cbd6 100644
--- a/c13/ex02/btree_apply_infix.c
+++ b/c13/ex02/btree_apply_infix.c
@@ -6,17 +6,18 @@
/* By: cacharle <charles.cabergs@gmail.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/07/21 18:28:07 by cacharle #+# #+# */
-/* Updated: 2019/07/23 21:09:53 by cacharle ### ########.fr */
+/* Updated: 2019/07/24 13:49:17 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
+#include <stdlib.h>
#include "ft_btree.h"
-void btree_apply_infix(t_btree *root, void (*applyf)(void *))
+void btree_apply_infix(t_btree *root, void (*applyf)(void *))
{
if (root == NULL)
return ;
- btree_apply_infix(root->left);
+ btree_apply_infix(root->left, applyf);
(*applyf)(root->item);
- btree_apply_infix(root->right);
+ btree_apply_infix(root->right, applyf);
}