| 53 | } |
| 54 | |
| 55 | void infix_walk(struct tree_node *t, void (*action)(void *arg, void *key), |
| 56 | void *arg) |
| 57 | { |
| 58 | if (t->left) |
| 59 | infix_walk(t->left, action, arg); |
| 60 | action(arg, t->key); |
| 61 | if (t->right) |
| 62 | infix_walk(t->right, action, arg); |
| 63 | } |
| 64 | |
| 65 | void tree_free(struct tree_node *t) |
| 66 | { |