summaryrefslogtreecommitdiffstats
path: root/src/H5B.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5B.c')
-rw-r--r--src/H5B.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/H5B.c b/src/H5B.c
index ad53043..9d89218 100644
--- a/src/H5B.c
+++ b/src/H5B.c
@@ -142,8 +142,8 @@ typedef struct H5B_ins_ud_t {
/* Local Prototypes */
/********************/
static H5B_ins_t H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8_t *lt_key,
- hbool_t *lt_key_changed, uint8_t *md_key, void *udata, uint8_t *rt_key,
- hbool_t *rt_key_changed, H5B_ins_ud_t *split_bt_ud /*out*/);
+ bool *lt_key_changed, uint8_t *md_key, void *udata, uint8_t *rt_key,
+ bool *rt_key_changed, H5B_ins_ud_t *split_bt_ud /*out*/);
static herr_t H5B__insert_child(H5B_t *bt, unsigned *bt_flags, unsigned idx, haddr_t child, H5B_ins_t anchor,
const void *md_key);
static herr_t H5B__split(H5F_t *f, H5B_ins_ud_t *bt_ud, unsigned idx, void *udata,
@@ -268,14 +268,14 @@ done:
* pointers since it assumes that all nodes can be reached
* from the parent node.
*
- * Return: Non-negative (TRUE/FALSE) on success (if found, values returned
+ * Return: Non-negative (true/false) on success (if found, values returned
* through the UDATA argument). Negative on failure (if not found,
* UDATA is undefined).
*
*-------------------------------------------------------------------------
*/
herr_t
-H5B_find(H5F_t *f, const H5B_class_t *type, haddr_t addr, hbool_t *found, void *udata)
+H5B_find(H5F_t *f, const H5B_class_t *type, haddr_t addr, bool *found, void *udata)
{
H5B_t *bt = NULL;
H5UC_t *rc_shared; /* Ref-counted shared info */
@@ -325,7 +325,7 @@ H5B_find(H5F_t *f, const H5B_class_t *type, haddr_t addr, hbool_t *found, void *
/* Check if not found */
if (cmp)
- *found = FALSE;
+ *found = false;
else {
/*
* Follow the link to the subtree or to the data node.
@@ -527,7 +527,7 @@ H5B_insert(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
uint8_t *md_key = (uint8_t *)_md_key;
uint8_t *rt_key = (uint8_t *)_rt_key;
- hbool_t lt_key_changed = FALSE, rt_key_changed = FALSE;
+ bool lt_key_changed = false, rt_key_changed = false;
haddr_t old_root_addr = HADDR_UNDEF;
unsigned level;
H5B_ins_ud_t bt_ud = H5B_INS_UD_T_NULL; /* (Old) root node */
@@ -752,8 +752,8 @@ H5B__insert_child(H5B_t *bt, unsigned *bt_flags, unsigned idx, haddr_t child, H5
*/
static H5B_ins_t
H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8_t *lt_key,
- hbool_t *lt_key_changed, uint8_t *md_key, void *udata, uint8_t *rt_key,
- hbool_t *rt_key_changed, H5B_ins_ud_t *split_bt_ud /*out*/)
+ bool *lt_key_changed, uint8_t *md_key, void *udata, uint8_t *rt_key, bool *rt_key_changed,
+ H5B_ins_ud_t *split_bt_ud /*out*/)
{
H5B_t *bt; /* Convenience pointer to B-tree */
H5UC_t *rc_shared; /* Ref-counted shared info */
@@ -790,8 +790,8 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8
bt = bt_ud->bt;
- *lt_key_changed = FALSE;
- *rt_key_changed = FALSE;
+ *lt_key_changed = false;
+ *rt_key_changed = false;
/* Get shared info for B-tree */
if (NULL == (rc_shared = (type->get_shared)(f, udata)))
@@ -880,7 +880,7 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8
if ((type->new_node)(f, H5B_INS_LEFT, H5B_NKEY(bt, shared, idx), udata, md_key,
&new_child_bt_ud.addr /*out*/) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert minimum leaf node");
- *lt_key_changed = TRUE;
+ *lt_key_changed = true;
} /* end else */
#ifdef H5_STRICT_FORMAT_CHECKS
@@ -932,7 +932,7 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8
if ((type->new_node)(f, H5B_INS_RIGHT, md_key, udata, H5B_NKEY(bt, shared, idx + 1),
&new_child_bt_ud.addr /*out*/) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert maximum leaf node");
- *rt_key_changed = TRUE;
+ *rt_key_changed = true;
} /* end else */
#ifdef H5_STRICT_FORMAT_CHECKS
@@ -988,7 +988,7 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8
if (idx > 0) {
assert(type->critical_key == H5B_LEFT);
assert(!(H5B_INS_LEFT == my_ins || H5B_INS_RIGHT == my_ins));
- *lt_key_changed = FALSE;
+ *lt_key_changed = false;
} /* end if */
else
H5MM_memcpy(lt_key, H5B_NKEY(bt, shared, idx), type->sizeof_nkey);
@@ -998,7 +998,7 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8
if (idx + 1 < bt->nchildren) {
assert(type->critical_key == H5B_RIGHT);
assert(!(H5B_INS_LEFT == my_ins || H5B_INS_RIGHT == my_ins));
- *rt_key_changed = FALSE;
+ *rt_key_changed = false;
} /* end if */
else
H5MM_memcpy(rt_key, H5B_NKEY(bt, shared, idx + 1), type->sizeof_nkey);
@@ -1196,8 +1196,8 @@ H5B_iterate(H5F_t *f, const H5B_class_t *type, haddr_t addr, H5B_operator_t op,
*/
static H5B_ins_t
H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, uint8_t *lt_key /*out*/,
- hbool_t *lt_key_changed /*out*/, void *udata, uint8_t *rt_key /*out*/,
- hbool_t *rt_key_changed /*out*/)
+ bool *lt_key_changed /*out*/, void *udata, uint8_t *rt_key /*out*/,
+ bool *rt_key_changed /*out*/)
{
H5B_t *bt = NULL, *sibling = NULL;
unsigned bt_flags = H5AC__NO_FLAGS_SET;
@@ -1276,8 +1276,8 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u
* method. The best we can do is to leave the object alone but
* remove the B-tree reference to the object.
*/
- *lt_key_changed = FALSE;
- *rt_key_changed = FALSE;
+ *lt_key_changed = false;
+ *rt_key_changed = false;
ret_value = H5B_INS_REMOVE;
}
@@ -1295,7 +1295,7 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u
if (idx > 0)
/* Don't propagate change out of this B-tree node */
- *lt_key_changed = FALSE;
+ *lt_key_changed = false;
else
H5MM_memcpy(lt_key, H5B_NKEY(bt, shared, idx), type->sizeof_nkey);
} /* end if */
@@ -1304,7 +1304,7 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u
bt_flags |= H5AC__DIRTIED_FLAG;
if (idx + 1 < bt->nchildren)
/* Don't propagate change out of this B-tree node */
- *rt_key_changed = FALSE;
+ *rt_key_changed = false;
else
H5MM_memcpy(rt_key, H5B_NKEY(bt, shared, idx + 1), type->sizeof_nkey);
} /* end if */
@@ -1407,7 +1407,7 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u
/* Slide all keys down 1, update lt_key */
memmove(H5B_NKEY(bt, shared, 0), H5B_NKEY(bt, shared, 1), bt->nchildren * type->sizeof_nkey);
H5MM_memcpy(lt_key, H5B_NKEY(bt, shared, 0), type->sizeof_nkey);
- *lt_key_changed = TRUE;
+ *lt_key_changed = true;
}
else
/* Slide all but the leftmost 2 keys down, leaving the leftmost
@@ -1436,7 +1436,7 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u
else {
/* Just update rt_key */
H5MM_memcpy(rt_key, H5B_NKEY(bt, shared, bt->nchildren - 1), type->sizeof_nkey);
- *rt_key_changed = TRUE;
+ *rt_key_changed = true;
} /* end else */
bt->nchildren -= 1;
@@ -1527,8 +1527,8 @@ H5B_remove(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
uint64_t _lt_key[128], _rt_key[128];
uint8_t *lt_key = (uint8_t *)_lt_key; /*left key*/
uint8_t *rt_key = (uint8_t *)_rt_key; /*right key*/
- hbool_t lt_key_changed = FALSE; /*left key changed?*/
- hbool_t rt_key_changed = FALSE; /*right key changed?*/
+ bool lt_key_changed = false; /*left key changed?*/
+ bool rt_key_changed = false; /*right key changed?*/
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1600,7 +1600,7 @@ H5B_delete(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
} /* end if */
else {
- hbool_t lt_key_changed, rt_key_changed; /* Whether key changed (unused here, just for callback) */
+ bool lt_key_changed, rt_key_changed; /* Whether key changed (unused here, just for callback) */
/* Check for removal callback */
if (type->remove) {