1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- #include "private.h"
- static lub_bintree_compare_fn compareright;
- void *lub_bintree_findlast(lub_bintree_t * this)
- {
- lub_bintree_compare_fn *client_compare = this->compareFn;
-
- this->compareFn = compareright;
-
- this->root = lub_bintree_splay(this, this->root, NULL);
-
- this->compareFn = client_compare;
- if (NULL == this->root)
- return NULL;
- else
- return lub_bintree_getclientnode(this, this->root);
- }
- static int compareright(const void *clientnode, const void *clientkey)
- {
- clientnode = clientnode;
- clientkey = clientkey;
- return -1;
- }
|