]> git.sur5r.net Git - openldap/commitdiff
friendly form for balance factors
authorPierangelo Masarati <ando@openldap.org>
Sat, 4 Feb 2006 15:49:04 +0000 (15:49 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 4 Feb 2006 15:49:04 +0000 (15:49 +0000)
include/avl.h

index f23ec135c1a55dc29bbde5145c5dfdc3497bad09..05315377c0544e0ded177b7db212957bde92811b 100644 (file)
@@ -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