#include <sys/types.h>#include <string.h>#include <stdio.h>Go to the source code of this file.
Defines | |
| #define | BPT_VERSION "1.9" |
| #define | BPT_INIT_HEIGHT 0x1 |
| #define | BPT_INIT_NIKEYS 0x2 |
| #define | BPT_INIT_NLKEYS 0x2 |
| #define | BPT_NDI_T signed int |
| #define | BPT_UNI_T signed int |
| #define | BPT_OPTS_T unsigned char |
| #define | BPT_CB_T unsigned char |
| #define | BPT_TYPE_T unsigned char |
| #define | BPT_FLAGS_T unsigned char |
| #define | BPT_BLKSZ_T unsigned int |
| #define | BPT_NODES_T unsigned int |
| #define | BPT_HEIGHT_T unsigned short |
| #define | BPT_OPT_ZERO 0x0 |
| #define | BPT_OPT_TREE 0x1 |
| #define | BPT_OPT_NODE 0x2 |
| #define | BPT_OPT_HEAD 0x1 |
| #define | BPT_OPT_TAIL 0x2 |
| #define | BPT_OPT_KEY 0x1 |
| #define | BPT_OPT_PARENT 0x2 |
| #define | BPT_OPT_PERFECT 0x1 |
| #define | BPT_OPT_PARTIAL 0x2 |
| #define | BPT_OPT_COLLIDE 0x4 |
| #define | BPT_OPT_NONDI(T) (t_bpt_ndi_##T)0x0 |
| #define | BPT_OPT_NOKEY(T) (t_bpt_key_##T)0x0 |
| #define | BPT_OPT_NOVALUE(T) (t_bpt_addr_##T)0x0 |
| #define | BPT_OPT_INIT 0x1 |
| #define | BPT_OPT_ADD 0x2 |
| #define | BPT_OPT_MODIFY 0x3 |
| #define | BPT_OPT_REMOVE 0x4 |
| #define | BPT_OPT_CLEAN 0x5 |
| #define | BPT_CB_UNKNOWN 0x0 |
| #define | BPT_CB_INSERT 0x1 |
| #define | BPT_CB_SPLIT 0x2 |
| #define | BPT_CB_MODIFY 0x3 |
| #define | BPT_CB_DELETE 0x4 |
| #define | BPT_CB_MIGRATE 0x5 |
| #define | BPT_CB_BALANCE 0x6 |
| #define | BPT_FLAG_ZERO 0x0 |
| #define | BPT_FLAG_CALLBACK 0x1 |
| #define | BPT_FLAG_COLLIDE 0x2 |
| #define | BPT_TYPE_INTERNAL 0x1 |
| #define | BPT_TYPE_LEAF 0x2 |
| #define | bpt_debug(fmt...) |
| #define | BPT_INIT_ALLOC() (1) |
| #define | BPT_ADD_ALLOC(_bpt_) ((_bpt_)->height + 1) |
| #define | BPT_REMOVE_ALLOC(_bpt_) (0) |
| #define | BPT_MODIFY_ALLOC(_bpt_) (BPT_ADD_ALLOC(_bpt_) + BPT_REMOVE_ALLOC(_bpt_)) |
| #define | BPT_CLEAN_ALLOC(_bpt_) (0) |
| #define | BPT_INIT_SIZE() (1) |
| #define | BPT_ADD_SIZE(_bpt_) ((_bpt_)->height + 1) |
| #define | BPT_REMOVE_SIZE(_bpt_) ((_bpt_)->height * ((_bpt_)->height - 1) + 1) |
| #define | BPT_MODIFY_SIZE(_bpt_) (BPT_ADD_SIZE(_bpt_) + BPT_REMOVE_SIZE(_bpt_)) |
| #define | BPT_CLEAN_SIZE(_bpt_) ((_bpt_)->nodes) |
| #define | t_bpt_key(T) t_bpt_key_##T |
| #define | t_bpt_addr(T) t_bpt_addr_##T |
| #define | t_bpt_ndi(T) t_bpt_ndi_##T |
| #define | t_bpt_uni(T) t_bpt_uni_##T |
| #define | t_bpt_blksz(T) t_bpt_blksz_##T |
| #define | t_bpt_nodes(T) t_bpt_nodes_##T |
| #define | t_bpt_height(T) t_bpt_height_##T |
| #define | t_bpt_node(T) t_bpt_node_##T |
| #define | t_bpt_imm(T) t_bpt_imm_##T |
| #define | t_bpt(T) t_bpt_##T |
| #define | t_bpt_cbctx(T) t_bpt_cbctx_##T |
| #define | t_bpt_unused(T) t_bpt_unused_##T |
| #define | t_bpt_head(T) t_bpt_head_##T |
| #define | t_bpt_inentry(T) t_bpt_inentry_##T |
| #define | t_bpt_lfentry(T) t_bpt_lfentry_##T |
| #define | t_bpt_entry(T) t_bpt_entry_##T |
| #define | t_bpt_load_fn(T) t_bpt_load_fn_##T |
| #define | t_bpt_unload_fn(T) t_bpt_unload_fn_##T |
| #define | t_bpt_callback_fn(T) t_bpt_callback_fn_##T |
| #define | bpt_list(T, _bpt_, _node_, _entry_, _opts_) bpt_list_##T(_bpt_, _node_, _entry_, _opts_) |
| #define | bpt_check_unused(T, _bpt_, _unused_, _opts_) bpt_check_unused_##T(_bpt_, _unused_, _opts_) |
| #define | bpt_first_entry(T, _bpt_, _node_, _first_) bpt_first_entry_##T(_bpt_, _node_, _first_) |
| #define | bpt_prev_entry(T, _bpt_, _current_, _previous_, _opts_) bpt_prev_entry_##T(_bpt_, _current_, _previous_, _opts_) |
| #define | bpt_next_entry(T, _bpt_, _current_, _next_, _opts_) bpt_next_entry_##T(_bpt_, _current_, _next_, _opts_) |
| #define | bpt_last_entry(T, _bpt_, _node_, _last_) bpt_last_entry_##T(_bpt_, _node_, _last_) |
| #define | bpt_reinit_entries(T, _bpt_, _node_) bpt_reinit_entries_##T(_bpt_, _node_) |
| #define | bpt_make_node(T, _bpt_, _node_, _type_, _parent_) bpt_make_node_##T(_bpt_, _node_, _type_, _parent_) |
| #define | bpt_key(T, _bpt_, _node_, _key_) bpt_key_##T(_bpt_, _node_, _key_) |
| #define | bpt_ndi(T, _bpt_, _node_, _value_, _ndi_) bpt_ndi_##T(_bpt_, _node_, _value_, _ndi_) |
| #define | bpt_update_node(T, _bpt_, _node_, _addr_, _key_, _opts_) bpt_update_node_##T(_bpt_, _node_, _addr_, _key_, _opts_) |
| #define | bpt_update_parent(T, _bpt_, _node_) bpt_update_parent_##T(_bpt_, _node_) |
| #define | bpt_update(T, _bpt_, _node_, _opts_) bpt_update_##T(_bpt_, _node_, _opts_) |
| #define | bpt_linear_search(T, _bpt_, _node_, _key_, _ndi_, _opts_) bpt_linear_search_##T(_bpt_, _node_, _key_, _ndi_, _opts_) |
| #define | bpt_dichotomic_search(T, _bpt_, _node_, _key_, _ndi_, _opts_) bpt_dichotomic_search_##T(_bpt_, _node_, _key_, _ndi_, _opts_) |
| #define | bpt_search_entry(T, _bpt_, _node_, _key_, _ndi_, _opts_) bpt_search_entry_##T(_bpt_, _node_, _key_, _ndi_, _opts_) |
| #define | bpt_search_leaf(T, _bpt_, _node_, _leaf_, _key_) bpt_search_leaf_##T(_bpt_, _node_, _leaf_, _key_) |
| #define | bpt_search(T, _bpt_, _key_, _entry_) bpt_search_##T(_bpt_, _key_, _entry_) |
| #define | bpt_collide_next(T, _bpt_, _key_, _entry_) bpt_collide_next_##T(_bpt_, _key_, _entry_) |
| #define | bpt_collide_search(T, _bpt_, _key_, _value_, _entry_) bpt_collide_search_##T(_bpt_, _key_, _value_, _entry_) |
| #define | bpt_check_collide(T, _bpt_, _node1_, _key_, _value_) bpt_check_collide_##T(_bpt_, _node1_, _key_, _value_) |
| #define | bpt_node_size(T, _bpt_, _node_) bpt_node_size_##T(_bpt_, _node_) |
| #define | bpt_simplify(T, _bpt_, _node_, _unused_) bpt_simplify_##T(_bpt_, _node_, _unused_) |
| #define | bpt_balancein_1(T, _bpt_, _node1_, _node2_,_cbctx_, _prev_, _unused_) bpt_balancein_1_##T(_bpt_, _node1_, _node2_, _cbctx_, _prev_, _unused_) |
| #define | bpt_balancein_2(T, _bpt_, _node1_, _node2_,_cbctx_, _prev_, _unused_) bpt_balancein_2_##T(_bpt_, _node1_, _node2_, _cbctx_, _prev_, _unused_) |
| #define | bpt_balancein_3(T, _bpt_, _node1_, _node2_,_cbctx_, _prev_, _unused_) bpt_balancein_3_##T(_bpt_, _node1_, _node2_, _cbctx_, _prev_, _unused_) |
| #define | bpt_balancein_4(T, _bpt_, _node1_, _node2_,_cbctx_, _prev_, _unused_) bpt_balancein_4_##T(_bpt_, _node1_, _node2_, _cbctx_, _prev_, _unused_) |
| #define | bpt_delete(T, _bpt_, _entry_, _cbctx_, _unused_) bpt_delete_##T(_bpt_, _entry_, _cbctx_, _unused_) |
| #define | bpt_remove(T, _bpt_, _key_, _unused_) bpt_remove_##T(_bpt_, _key_, _unused_) |
| #define | bpt_collide_remove(T, _bpt_, _entry_, _unused_) bpt_collide_remove_##T(_bpt_, _entry_, _unused_) |
| #define | bpt_modify(T, _bpt_, _key_, _lfentry_, _unused_) bpt_modify_##T(_bpt_, _key_, _lfentry_, _unused_) |
| #define | bpt_collide_modify(T, _bpt_, _entry_, _lfentry_, _unused_) bpt_collide_modify_##T(_bpt_, _entry_, _lfentry_, _unused_) |
| #define | bpt_insert_head(T, _bpt_, _node1_, _node2_) bpt_insert_head_##T(_bpt_, _node1_, _node2_) |
| #define | bpt_insert_tail(T, _bpt_, _node1_, _node2_) bpt_insert_tail_##T(_bpt_, _node1_, _node2_) |
| #define | bpt_shift_sort(T, _bpt_, _node_) bpt_shift_sort_##T(_bpt_, _node_) |
| #define | bpt_insert_sort(T, _bpt_, _node_, _key_, _value_,_ndi_, _opts_) bpt_insert_sort_##T(_bpt_, _node_, _key_, _value_, _ndi_, _opts_) |
| #define | bpt_new_root(T, _bpt_, _node1_, _node2_, _unused_) bpt_new_root_##T(_bpt_, _node1_, _node2_, _unused_) |
| #define | bpt_balanceout(T, _bpt_, _node1_, _node2_, _entry_, _cbctx_) bpt_balanceout_##T(_bpt_, _node1_, _node2_, _entry_, _cbctx_) |
| #define | bpt_split_node(T, _bpt_, _node1_, _entry_,_current_, _unused_) bpt_split_node_##T(_bpt_, _node1_, _entry_, _current_, _unused_) |
| #define | bpt_insert(T, _bpt_, _node_, _entry_, _cbctx_, _unused_) bpt_insert_##T(_bpt_, _node_, _entry_, _cbctx_, _unused_) |
| #define | bpt_add(T, _bpt_, _lfentry_, _unused_) bpt_add_##T(_bpt_, _lfentry_, _unused_) |
| #define | bpt_init(T, _bpt_, _blksz_, _unusedval_, _flags_,_load_, _unload_, _callback_, _unused_) |
| #define | bpt_clean_node(T, _bpt_, _node_, _unused_) bpt_clean_node_##T(_bpt_, _node_, _unused_) |
| #define | bpt_clean(T, _bpt_, _unused_) bpt_clean_##T(_bpt_, _unused_) |
| #define | BPT_HEAD(T, _node_) (t_bpt_head(T) *)((_node_)->buf) |
| #define | BPT_INENTRY(T, _node_, _ndi_) |
| #define | BPT_LFENTRY(T, _node_, _ndi_) |
| #define | BPT_INIT_ENTRY(T, _node_, _ndi_) |
| #define | BPT_IMPORT_ENTRY(T, _node_, _ndi_, _entry_) |
| #define | BPT_EXPORT_ENTRY(T, _node_, _ndi_, _entry_) |
| #define | BPT_COPY_ENTRY(T, _node1_, _node2_, _ndi1_, _ndi2_) |
| #define | BPT_SWAP_ENTRIES(T, _node_, _ndi1_, _ndi2_) |
| #define | BPT_SET_ENTRY(T, _node_, _ndi_, _elem_, _value_) |
| #define | BPT_GET_ENTRY(T, _node_, _ndi_, _elem_) |
| #define | BPT_GET_THIS_ENTRY(T, _head_, _ptr_, _elem_) |
| #define | BPT_QUOTA(T, _bpt_, _node_) |
| #define | BPT_NODES(_bpt_) (_bpt_)->nodes |
| #define | BPT_NIKEYS(_bpt_) (_bpt_)->nikeys |
| #define | BPT_NLKEYS(_bpt_) (_bpt_)->nlkeys |
| #define | BPT_HEIGHT(_bpt_) (_bpt_)->height |
| #define | BPT_NKEYS(T, _bpt_, _node_) |
| #define | BPT_COPY_NODE(_bpt_, _node1_, _node2_) memcpy((_node2_), (_node1_), (_bpt_)->blksz) |
| #define | BPT_LOAD(_bpt_, _node_, _addr_) (_bpt_)->load((_bpt_), (_node_), (_addr_)) |
| #define | BPT_UNLOAD(_bpt_, _node_) (_bpt_)->unload((_bpt_), (_node_)); |
| #define | BPT_CALLBACK(_bpt_, _cbctx_) |
| #define | BPT_GET_ROOT(_bpt_) (_bpt_)->root |
| #define | BPT_SET_ROOT(_bpt_, _root_) (_bpt_)->root = (_root_) |
| #define | BPT_INIT_CBCTX(_bpt_, _cbctx_) |
| #define | BPT_SET_CBCTX(_bpt_, _head_, _cbctx_, _elem_, _value_) |
| #define | BPT_RESERVE(_bpt_, _unused_, _var_) |
| #define | BPT_RELEASE(_bpt_, _unused_, _val_) |
| #define | bpt_make_types(T, _t_bpt_blksz_, _t_bpt_ndi_, _t_bpt_uni_,_t_bpt_nodes_, _t_bpt_height_, _t_bpt_key_,_t_bpt_addr_, _t_bpt_inentry_,_t_bpt_lfentry_) |
| #define | bpt_make_protos(T) |
| #define | bpt_make_functions(T, _key_, _value_) |
| #define | bpt_make(T, _t_bpt_blksz_, _t_bpt_ndi_, _t_bpt_uni_,_t_bpt_nodes_, _t_bpt_height_, _t_bpt_key_,_t_bpt_addr_, _t_bpt_inentry_, _t_bpt_lfentry_,_key_, _value_) |
Typedefs | |
| typedef BPT_CB_T | t_bpt_cb |
| typedef BPT_OPTS_T | t_bpt_opts |
| typedef BPT_TYPE_T | t_bpt_type |
| typedef BPT_FLAGS_T | t_bpt_flags |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Value: { \
if ((_bpt_)->flags & BPT_FLAG_CALLBACK) \
(_bpt_)->callback((_bpt_), (_cbctx_)); \
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Value: memcpy((BPT_HEAD(T, (_node1_)))->type == BPT_TYPE_INTERNAL ? \ (_node2_)->buf + sizeof(t_bpt_head(T)) + \ (_ndi2_) * sizeof(t_bpt_inentry(T)) : \ (_node2_)->buf + sizeof(t_bpt_head(T)) + \ (_ndi2_) * sizeof(t_bpt_lfentry(T)), \ (BPT_HEAD(T, (_node1_)))->type == BPT_TYPE_INTERNAL ? \ (_node1_)->buf + sizeof(t_bpt_head(T)) + \ (_ndi1_) * sizeof(t_bpt_inentry(T)) : \ (_node1_)->buf + sizeof(t_bpt_head(T)) + \ (_ndi1_) * sizeof(t_bpt_lfentry(T)), \ (BPT_HEAD(T, (_node1_)))->type == BPT_TYPE_INTERNAL ? \ sizeof(t_bpt_inentry(T)) : sizeof(t_bpt_lfentry(T))); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Value: memcpy((_entry_), \ (BPT_HEAD(T, (_node_)))->type == BPT_TYPE_INTERNAL ? \ (_node_)->buf + sizeof(t_bpt_head(T)) + \ (_ndi_) * sizeof(t_bpt_inentry(T)) : \ (_node_)->buf + sizeof(t_bpt_head(T)) + \ (_ndi_) * sizeof(t_bpt_lfentry(T)), \ (_BPT_HEAD(T, (_node_))->type == BPT_TYPE_INTERNAL ? \ sizeof(t_bpt_inentry(T)) : sizeof(t_bpt_lfentry(T))); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Value: ((BPT_HEAD(T, (_node_)))->type == BPT_TYPE_INTERNAL ? \ ((t_bpt_inentry(T) *)((_node_)->buf + sizeof(t_bpt_head(T)) + (_ndi_) * \ sizeof(t_bpt_inentry(T))))->_elem_ : \ ((t_bpt_lfentry(T) *)((_node_)->buf + sizeof(t_bpt_head(T)) + (_ndi_) * \ sizeof(t_bpt_lfentry(T))))->_elem_) |
|
|
|
|
|
Value: ((_head_)->type == BPT_TYPE_INTERNAL ? \ ((t_bpt_inentry(T) *)(_ptr_))->_elem_ : \ ((t_bpt_lfentry(T) *)(_ptr_))->_elem_) |
|
|
|
|
|
|
|
|
|
|
|
Value: memcpy((BPT_HEAD(T, (_node_)))->type == BPT_TYPE_INTERNAL ? \ (_node_)->buf + sizeof(t_bpt_head(T)) + \ (_ndi_) * sizeof(t_bpt_inentry(T)) : \ (_node_)->buf + sizeof(t_bpt_head(T)) + \ (_ndi_) * sizeof(t_bpt_lfentry(T)), \ (_entry_), \ (BPT_HEAD(T, (_node_)))->type == BPT_TYPE_INTERNAL ? \ sizeof(t_bpt_inentry(T)) : sizeof(t_bpt_lfentry(T))); |
|
|
Value: (t_bpt_inentry(T) *)((_node_)->buf + sizeof(t_bpt_head(T)) + \ (_ndi_) * sizeof(t_bpt_inentry(T))) |
|
|
Value: bpt_init_##T(_bpt_, _blksz_, _unusedval_, _flags_, _load_, \
_unload_, _callback_, _unused_)
|
|
|
|
|
|
Value: { \
if ((_bpt_)->flags & BPT_FLAG_CALLBACK) \
{ \
(_cbctx_)->cb = BPT_CB_UNKNOWN; \
\
(_cbctx_)->previous.node = (_bpt_)->unused; \
(_cbctx_)->previous.ndi = 0; \
(_cbctx_)->current.node = (_bpt_)->unused; \
(_cbctx_)->current.ndi = 0; \
\
(_cbctx_)->node = (_bpt_)->unused; \
\
(_cbctx_)->node1 = (_bpt_)->unused; \
(_cbctx_)->node2 = (_bpt_)->unused; \
} \
}
|
|
|
Value: memset((BPT_HEAD(T, (_node_)))->type == BPT_TYPE_INTERNAL ? \ (_node_)->buf + sizeof(t_bpt_head(T)) + \ (_ndi_) * sizeof(t_bpt_inentry(T)) : \ (_node_)->buf + sizeof(t_bpt_head(T)) + \ (_ndi_) * sizeof(t_bpt_lfentry(T)), 0x0, \ (BPT_HEAD(T, (_node_)))->type == BPT_TYPE_INTERNAL ? \ sizeof(t_bpt_inentry(T)) : sizeof(t_bpt_lfentry(T))) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Value: (t_bpt_lfentry(T) *)((_node_)->buf + sizeof(t_bpt_head(T)) + \ (_ndi_) * sizeof(t_bpt_lfentry(T))) |
|
|
|
|
|
|
|
|
|
|
|
Value: bpt_make_types(T, _t_bpt_blksz_, _t_bpt_ndi_, _t_bpt_uni_, _t_bpt_nodes_, \ _t_bpt_height_, _t_bpt_key_, _t_bpt_addr_, _t_bpt_inentry_, \ _t_bpt_lfentry_) \ bpt_make_protos(T) \ bpt_make_functions(T, _key_, _value_) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Value: ((BPT_HEAD(T, (_node_)))->type == BPT_TYPE_INTERNAL ? \ (_bpt_)->nikeys : (_bpt_)->nlkeys) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Value: (t_bpt_ndi(T)) ((BPT_HEAD(T, (_node_)))->type == BPT_TYPE_INTERNAL ? \ ((_bpt_)->nikeys * 50 / 100) : \ ((_bpt_)->nlkeys * 50 / 100)) |
|
|
|
|
|
Value: { \
(_unused_)->index++; \
(_unused_)->array[(_unused_)->index] = (_val_); \
(_bpt_)->nodes--; \
}
|
|
|
|
|
|
|
|
|
|
|
|
Value: |
|
|
|
|
|
|
|
|
|
|
|
Value: { \
if (((_bpt_)->flags & BPT_FLAG_CALLBACK) && \
((_head_)->type == BPT_TYPE_LEAF)) \
(_cbctx_)->_elem_ = (_value_); \
}
|
|
|
Value: { \
if ((BPT_HEAD(T, (_node_)))->type == BPT_TYPE_INTERNAL) \
{ \
t_bpt_inentry(T) *_entry_ = BPT_INENTRY(T, _node_, _ndi_); \
\
_entry_->_elem_ = (_value_); \
} \
else \
{ \
t_bpt_lfentry(T) *_entry_ = BPT_LFENTRY(T, _node_, _ndi_); \
\
_entry_->_elem_ = (_value_); \
} \
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Value: { \
if ((BPT_HEAD(T, (_node_)))->type == BPT_TYPE_INTERNAL) \
{ \
t_bpt_inentry(T) _swap_; \
\
memcpy(&_swap_, (_node_)->buf + sizeof(t_bpt_head(T)) + (_ndi1_) * \
sizeof(t_bpt_inentry(T)), sizeof(t_bpt_inentry(T))); \
memcpy((_node_)->buf + sizeof(t_bpt_head(T)) + (_ndi1_) * \
sizeof(t_bpt_inentry(T)), (_node_)->buf + \
sizeof(t_bpt_head(T)) + (_ndi2_) * \
sizeof(t_bpt_inentry(T)), sizeof(t_bpt_inentry(T))); \
memcpy((_node_)->buf + sizeof(t_bpt_head(T)) + (_ndi2_) * \
sizeof(t_bpt_inentry(T)), &_swap_, \
sizeof(t_bpt_inentry(T))); \
} \
else \
{ \
t_bpt_lfentry(T) _swap_; \
\
memcpy(&_swap_, (_node_)->buf + sizeof(t_bpt_head(T)) + (_ndi1_) * \
sizeof(t_bpt_lfentry(T)), sizeof(t_bpt_lfentry(T))); \
memcpy((_node_)->buf + sizeof(t_bpt_head(T)) + (_ndi1_) * \
sizeof(t_bpt_lfentry(T)), (_node_)->buf + \
sizeof(t_bpt_head(T)) + (_ndi2_) * \
sizeof(t_bpt_lfentry(T)), sizeof(t_bpt_lfentry(T))); \
memcpy((_node_)->buf + sizeof(t_bpt_head(T)) + (_ndi2_) * \
sizeof(t_bpt_lfentry(T)), &_swap_, \
sizeof(t_bpt_lfentry(T))); \
} \
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.4.6