Changeset View
Changeset View
Standalone View
Standalone View
contrib/ldns/ldns/rbtree.h
Show First 20 Lines • Show All 145 Lines • ▼ Show 20 Lines | |||||
* @return: node that fits or NULL. | * @return: node that fits or NULL. | ||||
*/ | */ | ||||
ldns_rbnode_t *ldns_rbtree_search(ldns_rbtree_t *rbtree, const void *key); | ldns_rbnode_t *ldns_rbtree_search(ldns_rbtree_t *rbtree, const void *key); | ||||
/** | /** | ||||
* Find, but match does not have to be exact. | * Find, but match does not have to be exact. | ||||
* @param rbtree: tree to find in. | * @param rbtree: tree to find in. | ||||
* @param key: key to find position of. | * @param key: key to find position of. | ||||
* @param result: set to the exact node if present, otherwise to element that | * @param[out] result: set to the exact node if present, otherwise to element that | ||||
* precedes the position of key in the tree. NULL if no smaller element. | * precedes the position of key in the tree. NULL if no smaller element. | ||||
* @return: true if exact match in result. Else result points to <= element, | * @return: true if exact match in result. Else result points to <= element, | ||||
* or NULL if key is smaller than the smallest key. | * or NULL if key is smaller than the smallest key. | ||||
*/ | */ | ||||
int ldns_rbtree_find_less_equal(ldns_rbtree_t *rbtree, const void *key, | int ldns_rbtree_find_less_equal(ldns_rbtree_t *rbtree, const void *key, | ||||
ldns_rbnode_t **result); | ldns_rbnode_t **result); | ||||
/** | /** | ||||
▲ Show 20 Lines • Show All 68 Lines • Show Last 20 Lines |