diff options
Diffstat (limited to 'c13/ex03/btree_apply_suffix.c')
| -rw-r--r-- | c13/ex03/btree_apply_suffix.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/c13/ex03/btree_apply_suffix.c b/c13/ex03/btree_apply_suffix.c index e69de29..6d5c3b2 100644 --- a/c13/ex03/btree_apply_suffix.c +++ b/c13/ex03/btree_apply_suffix.c @@ -0,0 +1,22 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* btree_apply_suffix.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cacharle <charles.cabergs@gmail.com> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/07/21 18:37:33 by cacharle #+# #+# */ +/* Updated: 2019/07/21 18:38:10 by cacharle ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "ft_btree.h" + +void btree_apply_suffix(t_btree *root, void (*applyf)(void *)) +{ + if (root == NULL) + return ; + btree_apply_suffix(root->left); + btree_apply_suffix(root->right); + (*applyf)(root->item); +} |
