summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/adt_tree.h29
-rw-r--r--source3/include/includes.h1
2 files changed, 29 insertions, 1 deletions
diff --git a/source3/include/adt_tree.h b/source3/include/adt_tree.h
index 12e2ea5cc5..2fbfb55e88 100644
--- a/source3/include/adt_tree.h
+++ b/source3/include/adt_tree.h
@@ -21,6 +21,14 @@
#ifndef ADT_TREE_H
#define ADT_TREE_H
+#ifndef _BOOL
+typedef int BOOL;
+#define _BOOL
+#endif
+
+
+/* data structure used to build the tree */
+
typedef struct _tree_node {
struct _tree_node *parent;
struct _tree_node **children;
@@ -35,4 +43,25 @@ typedef struct _tree_root {
void (*free_func)(void *p);
} SORTED_TREE;
+/*
+ * API
+ */
+
+/* initializer and desctrutor */
+SORTED_TREE* pathtree_init( void *data_p, int (cmp_fn)(void*, void*), void (free_fn)(void*) );
+void pathtree_destroy( SORTED_TREE *tree );
+
+/* add a new path component */
+
+BOOL pathtree_add( SORTED_TREE *tree, const char *path, void *data_p );
+
+/* search path */
+
+void* pathtree_find( SORTED_TREE *tree, char *key );
+
+/* debug (print) functions */
+
+void pathtree_print_keys( SORTED_TREE *tree, int debug );
+
+
#endif
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 45c7133f1e..982eee1886 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -802,7 +802,6 @@ extern int errno;
#include "messages.h"
#include "charset.h"
#include "dynconfig.h"
-#include "adt_tree.h"
#include "util_getent.h"