-
Notifications
You must be signed in to change notification settings - Fork 0
/
btree_apply_suffix.c
executable file
·25 lines (23 loc) · 1.13 KB
/
btree_apply_suffix.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* btree_apply_suffix.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: akharrou <akharrou@student.42.us.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/02/21 21:04:46 by akharrou #+# #+# */
/* Updated: 2019/04/21 20:14:29 by akharrou ### ########.fr */
/* */
/* ************************************************************************** */
#include "../Includes/btree.h"
void btree_apply_suffix(t_btree *root, void (*applyf)(void *))
{
if (root)
{
if (root->left)
btree_apply_suffix(root->left, applyf);
if (root->right)
btree_apply_suffix(root->right, applyf);
(*applyf)(root->item);
}
}