5 Copyright 2008, The AROS Development Team. All rights reserved.
7 Structures for AVL balanced trees.
11 #include <exec/types.h>
13 #include <aros/asmcall.h>
15 /* The base node in an AVL tree. Embed this within your object a-la exec ListNode. */
17 struct AVLNode
*avl_link
[2];
18 struct AVLNode
*avl_parent
;
22 /* The key type, it's content is only intepreted by the key comparison function */
25 /* Compare two nodes */
26 typedef AROS_UFP2(LONG
, (*AVLNODECOMP
),
27 AROS_UFPA(const struct AVLNode
*, avlnode1
, A0
),
28 AROS_UFPA(const struct AVLNode
*, avlnode2
, A1
));
30 /* Compare a node to a key */
31 typedef AROS_UFP2(LONG
, (*AVLKEYCOMP
),
32 AROS_UFPA(const struct AVLNode
*, avlnode
, A0
),
33 AROS_UFPA(AVLKey
, avlkey
, A1
));
35 #endif /* EXEC_AVL_H */