12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- #include "private.h"
- static lub_bintree_compare_fn compareleft;
- void *lub_bintree_findfirst(lub_bintree_t * this)
- {
- lub_bintree_compare_fn *client_compare = this->compareFn;
-
- this->compareFn = compareleft;
-
- 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 compareleft(const void *clientnode, const void *clientkey)
- {
- clientnode = clientnode;
- clientkey = clientkey;
- return 1;
- }
|