]> git.sur5r.net Git - openldap/blobdiff - include/avl.h
More for ITS#7749
[openldap] / include / avl.h
index 0b6ed41298fbc8a1cd1a2320f43670b0bdd7c900..58c5a86722db0c5c6f78a8c34b3b98d979f01fd6 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2005 The OpenLDAP Foundation.
+ * Copyright 1998-2013 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -59,6 +59,8 @@ struct avlnode {
 #define EH     0
 #define RH     1
 
+#define avl_bf2str(bf) ((bf) == -1 ? "LH" : (bf) == 0 ? "EH" : (bf) == 1 ? "RH" : "(unknown)" )
+
 /* thread bits */
 #define        AVL_THREAD      0
 #define        AVL_CHILD       1
@@ -132,6 +134,18 @@ tavl_find LDAP_P((Avlnode *, const void*, AVL_CMP));
 LDAP_AVL_F( Avlnode* )
 tavl_find2 LDAP_P((Avlnode *, const void*, AVL_CMP));
 
+LDAP_AVL_F( Avlnode* )
+tavl_find3 LDAP_P((Avlnode *, const void*, AVL_CMP, int *ret));
+
+#define        TAVL_DIR_LEFT   0
+#define        TAVL_DIR_RIGHT  1
+
+LDAP_AVL_F( Avlnode* )
+tavl_end LDAP_P((Avlnode *, int direction ));
+
+LDAP_AVL_F( Avlnode* )
+tavl_next LDAP_P((Avlnode *, int direction ));
+
 /* apply traversal types */
 #define AVL_PREORDER   1
 #define AVL_INORDER    2