skalibs

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

avlnode_extremenode.c (223B)


      1 /* ISC license. */
      2 
      3 #include <skalibs/avlnode.h>
      4 
      5 uint32_t avlnode_extremenode (avlnode const *s, uint32_t max, uint32_t r, int h)
      6 {
      7   uint32_t oldr = r ;
      8   for (; r < max ; oldr = r, r = s[r].child[h]) ;
      9   return oldr ;
     10 }