From 83edb77d74bb339f3e1324a51039c78ac503db90 Mon Sep 17 00:00:00 2001 From: Charles Date: Wed, 24 Jul 2019 18:46:39 +0200 Subject: bsq and c13 passed --- c13/ex02/btree_apply_infix.c | 9 +++++---- c13/ex02/ft_btree.h | 8 ++++---- 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'c13/ex02') 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 +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* 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 #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); } diff --git a/c13/ex02/ft_btree.h b/c13/ex02/ft_btree.h index 3af177e..2a1506a 100644 --- a/c13/ex02/ft_btree.h +++ b/c13/ex02/ft_btree.h @@ -6,7 +6,7 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/07/17 19:29:12 by cacharle #+# #+# */ -/* Updated: 2019/07/21 18:19:33 by cacharle ### ########.fr */ +/* Updated: 2019/07/24 12:10:39 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -15,9 +15,9 @@ typedef struct s_btree { - struct s_btree *left; - struct s_btree *right; - void *item; + struct s_btree *left; + struct s_btree *right; + void *item; } t_btree; #endif -- cgit