summaryrefslogtreecommitdiff
path: root/src/libdatastruct/avlnode-internal.h
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2014-09-18 18:55:44 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2014-09-18 18:55:44 +0000
commit3534b428629be185e096be99e3bd5fdfe32d5544 (patch)
tree210ef3198ed66bc7f7b7bf6a85e4579f455e5a36 /src/libdatastruct/avlnode-internal.h
downloadskalibs-3534b428629be185e096be99e3bd5fdfe32d5544.tar.xz
initial commit with rc for skalibs-2.0.0.0
Diffstat (limited to 'src/libdatastruct/avlnode-internal.h')
-rw-r--r--src/libdatastruct/avlnode-internal.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/libdatastruct/avlnode-internal.h b/src/libdatastruct/avlnode-internal.h
new file mode 100644
index 0000000..0342695
--- /dev/null
+++ b/src/libdatastruct/avlnode-internal.h
@@ -0,0 +1,15 @@
+/* ISC license. */
+
+#ifndef AVLNODE_INTERNAL_H
+#define AVLNODE_INTERNAL_H
+
+#include <skalibs/avlnode.h>
+
+#define avlnode_ufroms(c) ((c) > 0)
+#define avlnode_sfromu(h) ((h) ? 1 : -1)
+
+extern unsigned int avlnode_rotate (avlnode_ref, unsigned int, unsigned int, int) ;
+extern unsigned int avlnode_doublerotate (avlnode_ref, unsigned int, unsigned int, int) ;
+#define avlnode_rotate_maydouble(s, max, r, h, isdouble) ((isdouble) ? avlnode_doublerotate(s, max, r, h) : avlnode_rotate(s, max, r, h))
+
+#endif