1 #ifndef LIBRARIES_BTREE_H 2 #define LIBRARIES_BTREE_H 3 4 /* 5 btree.library include (V50) 6 7 Copyright © 2003 The MorphOS Development Team, All Rights Reserved. 8 */ 9 10 #ifndef EXEC_TYPES_H 11 # include <exec/types.h> 12 #endif 13 14 #pragma pack(2) 15 16 17 #define BTREENAME "btree.library" 18 19 struct BTArgArray 20 { 21 APTR (*Alloc)(APTR userdata, ULONG size); 22 void (*Free)(APTR userdata, APTR mem, ULONG size); 23 LONG (*Compare)(APTR userdata, const APTR keya, const APTR keyb); 24 void (*DestroyKey)(APTR userdata, APTR key); 25 void (*DestroyData)(APTR userdata, APTR data); 26 APTR UserData; 27 }; 28 29 30 /* Tree Types for CreateTree 31 */ 32 enum 33 { 34 BT_DEFAULT, /* The best overall routine for generic use */ 35 BT_AVL_TREE, /* AVL balanced binary tree */ 36 BT_RED_BLACK_TREE /* Red-Black balanced binary tree */ 37 }; 38 39 40 #pragma pack() 41 42 #endif /* LIBRARIES_BTREE_H */