TaggedOpenLibrary constants off by one fix.
[AROS.git] / compiler / include / exec / avl.h
blob08fec4a8465ced4b728dc2d51b67c7005c404898
1 #ifndef EXEC_AVL_H
2 #define EXEC_AVL_H
4 /*
5 Copyright 2008, The AROS Development Team. All rights reserved.
7 Structures for AVL balanced trees.
8 */
10 #ifndef EXEC_TYPES_H
11 #include <exec/types.h>
12 #endif
13 #include <aros/asmcall.h>
15 /* The base node in an AVL tree. Embed this within your object a-la exec ListNode. */
16 struct AVLNode {
17 struct AVLNode *avl_link[2];
18 struct AVLNode *avl_parent;
19 LONG avl_balance;
22 /* The key type, it's content is only intepreted by the key comparison function */
23 typedef void *AVLKey;
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 */