From 3534b428629be185e096be99e3bd5fdfe32d5544 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Thu, 18 Sep 2014 18:55:44 +0000 Subject: initial commit with rc for skalibs-2.0.0.0 --- src/libdatastruct/avlnode-internal.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/libdatastruct/avlnode-internal.h (limited to 'src/libdatastruct/avlnode-internal.h') 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 + +#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 -- cgit v1.3.1