skalibs

Mirror/fork of https://skarnet.org/software/skalibs/
git clone https://ccx.te2000.cz/git/skalibs
Log | Files | Refs | README | LICENSE

avlnode-internal.h (495B)


      1 /* ISC license. */
      2 
      3 #ifndef AVLNODE_INTERNAL_H
      4 #define AVLNODE_INTERNAL_H
      5 
      6 #include <stdint.h>
      7 #include <skalibs/avlnode.h>
      8 
      9 #define avlnode_ufroms(c) ((c) > 0)
     10 #define avlnode_sfromu(h) ((h) ? 1 : -1)
     11 
     12 extern uint32_t avlnode_rotate (avlnode *, uint32_t, uint32_t, int) ;
     13 extern uint32_t avlnode_doublerotate (avlnode *, uint32_t, uint32_t, int) ;
     14 #define avlnode_rotate_maydouble(s, max, r, h, isdouble) ((isdouble) ? avlnode_doublerotate(s, max, r, h) : avlnode_rotate(s, max, r, h))
     15 
     16 #endif