diff options
Diffstat (limited to 'src/libdatastruct/avlnode-internal.h')
-rw-r--r-- | src/libdatastruct/avlnode-internal.h | 15 |
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 |