Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Classes | |
struct | rcrb_cmp_wrap_t |
Typedefs | |
typedef struct rcrb_cmp_wrap_t | RCRBCmpWrap |
typedef struct rcrb_cmp_wrap_t RCRBCmpWrap |
Definition at line 331 of file rbtree.c.
References rz_rb_iter_t::len, rz_rb_iter_t::path, and x.
Referenced by rz_rbtree_first(), and rz_rbtree_last().
Definition at line 348 of file rbtree.c.
References rz_rb_iter_t::len, rz_rb_iter_t::path, and x.
Referenced by rz_rbtree_iter_next(), and rz_rbtree_iter_prev().
|
inlinestatic |
Definition at line 40 of file rbtree.c.
References cmp(), d, rz_rb_iter_t::len, rz_rb_iter_t::path, and x.
Referenced by rz_rbtree_lower_bound_forward(), and rz_rbtree_upper_bound_backward().
|
static |
Definition at line 435 of file rbtree.c.
References container_of, rz_containing_rb_node_t::data, and free().
Referenced by rz_rbtree_cont_delete(), and rz_rbtree_cont_free().
|
static |
Definition at line 381 of file rbtree.c.
References rcrb_cmp_wrap_t::cmp, container_of, rz_containing_rb_node_t::data, and rcrb_cmp_wrap_t::user.
Referenced by cont_rbtree_free_cmp_wrapper(), and rz_rbtree_cont_insert().
|
static |
Definition at line 394 of file rbtree.c.
References cont_rbtree_cmp_wrapper(), container_of, rz_containing_rb_node_t::data, and rcrb_cmp_wrap_t::free.
Referenced by rz_rbtree_cont_delete().
|
static |
Definition at line 388 of file rbtree.c.
References rcrb_cmp_wrap_t::cmp, container_of, rz_containing_rb_node_t::data, and rcrb_cmp_wrap_t::user.
Referenced by rz_rbtree_cont_find().
Definition at line 9 of file rbtree.c.
References x.
Referenced by rz_rbtree_aug_delete(), and rz_rbtree_aug_insert().
RZ_API bool rz_rbtree_aug_delete | ( | RBNode ** | root, |
void * | data, | ||
RBComparator | cmp, | ||
void * | cmp_user, | ||
RBNodeFree | freefn, | ||
void * | free_user, | ||
RBNodeSum | sum | ||
) |
Returns true if a node with an equal key is deleted.
Definition at line 67 of file rbtree.c.
References rz_rb_node_t::child, cmp(), d, d2, d3, del(), freefn(), g, test-lz4-versions::head, NULL, p, path, rz_rb_node_t::red, red(), root, RZ_LOG_ERROR, RZ_RBTREE_MAX_HEIGHT, s, zag(), and zig_zag().
Referenced by rz_analysis_block_merge(), rz_analysis_block_relocate(), rz_analysis_block_unref(), rz_interval_tree_delete(), rz_rbtree_cont_delete(), and rz_rbtree_delete().
RZ_API bool rz_rbtree_aug_insert | ( | RBNode ** | root, |
void * | data, | ||
RBNode * | node, | ||
RBComparator | cmp, | ||
void * | cmp_user, | ||
RBNodeSum | sum | ||
) |
Returns true if the node was inserted successfully.
Definition at line 163 of file rbtree.c.
References rz_rb_node_t::child, cmp(), d, d2, d3, done, g, NULL, p, path, rz_rb_node_t::red, red(), root, RZ_LOG_ERROR, RZ_RBTREE_MAX_HEIGHT, zag(), and zig_zag().
Referenced by rz_analysis_block_relocate(), rz_analysis_block_split(), rz_analysis_create_block(), rz_analysis_var_global_add(), rz_interval_tree_insert(), rz_rbtree_cont_insert(), and rz_rbtree_insert().
RZ_API bool rz_rbtree_aug_update_sum | ( | RBNode * | root, |
void * | data, | ||
RBNode * | node, | ||
RBComparator | cmp, | ||
void * | cmp_user, | ||
RBNodeSum | sum | ||
) |
Returns true if the sum has been updated, false if node has not been found.
Definition at line 235 of file rbtree.c.
References rz_rb_node_t::child, cmp(), d, path, root, RZ_LOG_ERROR, and RZ_RBTREE_MAX_HEIGHT.
Referenced by rz_analysis_block_set_size(), and rz_interval_tree_resize().
RZ_API bool rz_rbtree_cont_delete | ( | RContRBTree * | tree, |
void * | data, | ||
RContRBCmp | cmp, | ||
void * | user | ||
) |
Definition at line 443 of file rbtree.c.
References cmp(), cont_node_free(), cont_rbtree_free_cmp_wrapper(), container_of, rz_containing_rb_tree_t::free, rz_containing_rb_node_t::node, NULL, rz_containing_rb_tree_t::root, and rz_rbtree_aug_delete().
RZ_API void* rz_rbtree_cont_find | ( | RContRBTree * | tree, |
void * | data, | ||
RContRBCmp | cmp, | ||
void * | user | ||
) |
Definition at line 457 of file rbtree.c.
References cmp(), cont_rbtree_search_cmp_wrapper(), container_of, rz_containing_rb_node_t::node, NULL, rz_containing_rb_tree_t::root, rz_rbtree_find(), and rz_return_val_if_fail.
RZ_API void rz_rbtree_cont_free | ( | RContRBTree * | tree | ) |
Definition at line 471 of file rbtree.c.
References cont_node_free(), rz_containing_rb_tree_t::free, free(), rz_containing_rb_node_t::node, rz_containing_rb_tree_t::root, and rz_rbtree_free().
RZ_API bool rz_rbtree_cont_insert | ( | RContRBTree * | tree, |
void * | data, | ||
RContRBCmp | cmp, | ||
void * | user | ||
) |
Definition at line 404 of file rbtree.c.
References cmp(), cont_rbtree_cmp_wrapper(), container_of, rz_containing_rb_node_t::data, free(), rz_containing_rb_node_t::node, NULL, rz_containing_rb_tree_t::root, RZ_LOG_ERROR, RZ_NEW0, rz_rbtree_aug_insert(), and rz_return_val_if_fail.
RZ_API RZ_OWN RContRBTree* rz_rbtree_cont_new | ( | void | ) |
RZ_API RZ_OWN RContRBTree* rz_rbtree_cont_newf | ( | RContRBFree | f | ) |
Definition at line 367 of file rbtree.c.
References f, rz_containing_rb_tree_t::free, and rz_rbtree_cont_new().
RZ_API bool rz_rbtree_delete | ( | RBNode ** | root, |
void * | data, | ||
RBComparator | cmp, | ||
void * | cmp_user, | ||
RBNodeFree | freefn, | ||
void * | free_user | ||
) |
Returns true if a node with an equal key is deleted.
Definition at line 263 of file rbtree.c.
References cmp(), freefn(), NULL, root, and rz_rbtree_aug_delete().
Referenced by rz_analysis_hint_unset_arch(), rz_analysis_hint_unset_bits(), rz_analysis_var_global_delete(), rz_spaces_rename(), and spaces_unset_single().
RZ_API RBNode* rz_rbtree_find | ( | RBNode * | x, |
void * | data, | ||
RBComparator | cmp, | ||
void * | user | ||
) |
Definition at line 267 of file rbtree.c.
References cmp(), d, NULL, and x.
Referenced by ensure_ranged_hint_record(), rz_analysis_get_block_at(), rz_analysis_var_global_get_byaddr_at(), rz_bin_pdb_get_type_by_index(), rz_rbtree_cont_find(), and rz_spaces_get().
RZ_API void rz_rbtree_free | ( | RZ_NULLABLE RBNode * | x, |
RBNodeFree | freefn, | ||
void * | user | ||
) |
Definition at line 281 of file rbtree.c.
References freefn(), rz_rbtree_free(), and x.
Referenced by free_tpi_stream(), rz_analysis_free(), rz_analysis_hint_storage_fini(), rz_core_analysis_hint_list_print(), rz_core_analysis_hint_print(), rz_interval_tree_fini(), rz_rbtree_cont_free(), rz_rbtree_free(), rz_spaces_fini(), and rz_spaces_purge().
RZ_API bool rz_rbtree_insert | ( | RBNode ** | root, |
void * | data, | ||
RBNode * | node, | ||
RBComparator | cmp, | ||
void * | user | ||
) |
Returns true if the node was inserted successfully.
Definition at line 291 of file rbtree.c.
References cmp(), NULL, root, and rz_rbtree_aug_insert().
Referenced by ensure_ranged_hint_record(), parse_simple_type(), parse_tpi_stream(), print_addr_hint_cb(), print_arch_hint_cb(), print_bits_hint_cb(), rz_spaces_add(), and rz_spaces_rename().
Definition at line 355 of file rbtree.c.
References _next().
Referenced by rz_interval_tree_all_at(), and rz_interval_tree_node_at_data().
RZ_API RBNode* rz_rbtree_lower_bound | ( | RBNode * | x, |
void * | data, | ||
RBComparator | cmp, | ||
void * | user | ||
) |
RZ_API RBIter rz_rbtree_lower_bound_forward | ( | RBNode * | root, |
void * | data, | ||
RBComparator | cmp, | ||
void * | user | ||
) |
Definition at line 309 of file rbtree.c.
References bound_iter(), cmp(), and root.
RZ_API RBNode* rz_rbtree_upper_bound | ( | RBNode * | x, |
void * | data, | ||
RBComparator | cmp, | ||
void * | user | ||
) |
Definition at line 313 of file rbtree.c.
References cmp(), d, NULL, and x.
Referenced by rz_analysis_hint_arch_at(), rz_analysis_hint_bits_at(), and rz_analysis_var_global_get_byaddr_in().
RZ_API RBIter rz_rbtree_upper_bound_backward | ( | RBNode * | root, |
void * | data, | ||
RBComparator | cmp, | ||
void * | user | ||
) |
Definition at line 327 of file rbtree.c.
References bound_iter(), cmp(), and root.
Definition at line 13 of file rbtree.c.
References rz_rb_node_t::child, rz_rb_node_t::red, and x.
Referenced by rz_rbtree_aug_delete(), and rz_rbtree_aug_insert().
Definition at line 25 of file rbtree.c.
References rz_rb_node_t::child, rz_rb_node_t::red, and x.
Referenced by rz_rbtree_aug_delete(), and rz_rbtree_aug_insert().