4 static void walk(const struct node
*r
, void (*action
)(const void *, VISIT
, int), int d
)
11 action(r
, preorder
, d
);
12 walk(r
->a
[0], action
, d
+1);
13 action(r
, postorder
, d
);
14 walk(r
->a
[1], action
, d
+1);
15 action(r
, endorder
, d
);
19 void twalk(const void *root
, void (*action
)(const void *, VISIT
, int))
21 walk(root
, action
, 0);