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