1 #ifndef CLIB_SAVL_PROTOS_H 2 #define CLIB_SAVL_PROTOS_H 3 4 /* 5 * Adelson-Velskii-Landis balanced binary tree routines with 6 * AmigaOS 3.9 (V45) compatible API. This stuff does not belong 7 * to exec. 8 * 9 * Copyright © 2005 Harry Sintonen <sintonen@iki.fi>. 10 */ 11 12 #ifndef EXEC_AVL_H 13 #include <exec/avl.h> 14 #endif /* EXEC_AVL_H */ 15 16 #ifdef __cplusplus 17 extern "C" { 18 #endif /* __cplusplus */ 19 20 struct AVLNode *AVL_AddNode(struct AVLNode **root, struct AVLNode *node, APTR func); 21 struct AVLNode *AVL_RemNodeByAddress(struct AVLNode **root, struct AVLNode *node); 22 struct AVLNode *AVL_RemNodeByKey(struct AVLNode **root, AVLKey key, APTR func); 23 struct AVLNode *AVL_FindNode(const struct AVLNode *root, AVLKey key, APTR func); 24 struct AVLNode *AVL_FindPrevNodeByAddress(const struct AVLNode *node); 25 struct AVLNode *AVL_FindPrevNodeByKey(const struct AVLNode *root, AVLKey key, APTR func); 26 struct AVLNode *AVL_FindNextNodeByAddress(const struct AVLNode *node); 27 struct AVLNode *AVL_FindNextNodeByKey(const struct AVLNode *root, AVLKey key, APTR func); 28 struct AVLNode *AVL_FindFirstNode(const struct AVLNode *root); 29 struct AVLNode *AVL_FindLastNode(const struct AVLNode *root); 30 31 #ifdef __cplusplus 32 } 33 #endif /* __cplusplus */ 34 35 #endif /* CLIB_SAVL_PROTOS_H */