avlnode_extreme.c (285B)
1 /* ISC license. */ 2 3 #include <errno.h> 4 #include <skalibs/avlnode.h> 5 6 int avlnode_extreme (avlnode const *s, uint32_t max, uint32_t r, int h, uint32_t *k) 7 { 8 uint32_t i = avlnode_extremenode(s, max, r, h) ; 9 if (i >= max) return (errno = ESRCH, 0) ; 10 *k = s[i].data ; 11 return 1 ; 12 }