summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-02-23 16:36:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:55:43 -0500
commit96a3fede405cd095e353398ff05f4b43a07c457d (patch)
tree2c0e52f9883949091c8af092307e154cb58f4bf2 /source3/include
parent34a5c5a580102afe1503da911d6e3b61191bb325 (diff)
downloadsamba-96a3fede405cd095e353398ff05f4b43a07c457d.tar.gz
samba-96a3fede405cd095e353398ff05f4b43a07c457d.tar.bz2
samba-96a3fede405cd095e353398ff05f4b43a07c457d.zip
r5517: code cleanup; rename the sorted_tree to pathtree (used by registry code)
I was going to use this for tracking dfs mounts in smbclient but found another way. Still the cleanup is valid so commiting it. should be minimally disruptive since it is not widely used. (This used to be commit 00738dca3b07083c91545910486a1f30f2b17281)
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"