about summary refs log tree commit diff stats
path: root/WWW/Library/Implementation/HTBTree.h
diff options
context:
space:
mode:
Diffstat (limited to 'WWW/Library/Implementation/HTBTree.h')
-rw-r--r--WWW/Library/Implementation/HTBTree.h51
1 files changed, 28 insertions, 23 deletions
diff --git a/WWW/Library/Implementation/HTBTree.h b/WWW/Library/Implementation/HTBTree.h
index dc1cbc3e..a4f78f94 100644
--- a/WWW/Library/Implementation/HTBTree.h
+++ b/WWW/Library/Implementation/HTBTree.h
@@ -16,47 +16,49 @@
 #include <HTUtils.h>
 #endif
 
+#ifdef __cplusplus
+extern "C" {
+#endif
 /*
 
 Data structures
 
- */
-typedef struct _HTBTree_element {
-    void *object;		/* User object */
-    struct _HTBTree_element *up;
-    struct _HTBTree_element *left;
-    int left_depth;
-    struct _HTBTree_element *right;
-    int right_depth;
-} HTBTElement;
-
-typedef int (*HTComparer) (void *a, void *b);
-
-typedef struct _HTBTree_top {
-    HTComparer compare;
-    struct _HTBTree_element *top;
-} HTBTree;
+ */ typedef struct _HTBTree_element {
+	void *object;		/* User object */
+	struct _HTBTree_element *up;
+	struct _HTBTree_element *left;
+	int left_depth;
+	struct _HTBTree_element *right;
+	int right_depth;
+    } HTBTElement;
+
+    typedef int (*HTComparer) (void *a, void *b);
+
+    typedef struct _HTBTree_top {
+	HTComparer compare;
+	struct _HTBTree_element *top;
+    } HTBTree;
 
 /*
 
 Create a binary tree given its discrimination routine
 
  */
-extern HTBTree *HTBTree_new(HTComparer comp);
+    extern HTBTree *HTBTree_new(HTComparer comp);
 
 /*
 
 Free storage of the tree but not of the objects
 
  */
-extern void HTBTree_free(HTBTree *tree);
+    extern void HTBTree_free(HTBTree *tree);
 
 /*
 
 Free storage of the tree and of the objects
 
  */
-extern void HTBTreeAndObject_free(HTBTree *tree);
+    extern void HTBTreeAndObject_free(HTBTree *tree);
 
 /*
 
@@ -64,7 +66,7 @@ Add an object to a binary tree
 
  */
 
-extern void HTBTree_add(HTBTree *tree, void *object);
+    extern void HTBTree_add(HTBTree *tree, void *object);
 
 /*
 
@@ -73,7 +75,7 @@ Search an object in a binary tree
   returns          Pointer to equivalent object in a tree or NULL if none.
  */
 
-extern void *HTBTree_search(HTBTree *tree, void *object);
+    extern void *HTBTree_search(HTBTree *tree, void *object);
 
 /*
 
@@ -94,6 +96,9 @@ Find next element in depth-first order
   returns                Pointer to element or NULL if none left.
 
  */
-extern HTBTElement *HTBTree_next(HTBTree *tree, HTBTElement *ele);
+    extern HTBTElement *HTBTree_next(HTBTree *tree, HTBTElement *ele);
 
-#endif /* HTBTREE_H */
+#ifdef __cplusplus
+}
+#endif
+#endif				/* HTBTREE_H */
James Booth <boothj5@gmail.com> 2012-07-30 00:46:39 +0100 committer James Booth <boothj5@gmail.com> 2012-07-30 00:46:39 +0100 Tidy up autotools scripts, removed CFLAGS' href='/danisanti/profani-tty/commit/configure.ac?id=3c0624380a8a54e626dc6e34ad7c0f7d115841fe'>3c062438 ^
b80bf037 ^
2655d9e8 ^
b80bf037 ^
3c062438 ^



11066f20 ^

2655d9e8 ^





1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61


                                                                
                 
                                                     

                                 
                              
                                          




                       













                                                           

                                                        

                                           

                                                                         
 

                                     
 
                                                     

                                                  
 



                                                                          
                                              
 
                                         



                     

                                                                





                                                     
;vc@akkartik.com>  2016-12-27 22:20:43 -0800
committer  Kartik K. Agaram <vc@akkartik.com>  2016-12-27 22:20:43 -0800

3725' href='/akkartik/mu/commit/html/counters.mu.html?h=main&id=97eb971b7574b3f283d7111a567a301faec9912d'>97eb971b ^
204dae92 ^
97eb971b ^
204dae92 ^
97eb971b ^


204dae92 ^



c5ffb6e1 ^


a654e4ec ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90