summaryrefslogtreecommitdiffstats
path: root/test/objcopy.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/objcopy.c')
-rw-r--r--test/objcopy.c1677
1 files changed, 836 insertions, 841 deletions
diff --git a/test/objcopy.c b/test/objcopy.c
index 8848ab1..d604c54 100644
--- a/test/objcopy.c
+++ b/test/objcopy.c
@@ -204,28 +204,28 @@ token_insert(H5O_info2_t *oi)
*
* Purpose: Check if a token has already been encountered
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: (can't fail)
*
*-------------------------------------------------------------------------
*/
-static H5_ATTR_PURE hbool_t
+static H5_ATTR_PURE bool
token_lookup(hid_t loc_id, H5O_info2_t *oi)
{
size_t n;
int token_cmp;
if (oi->rc < 2)
- return FALSE; /*only one link possible*/
+ return false; /*only one link possible*/
for (n = 0; n < idtab_g.nobjs; n++) {
if (H5Otoken_cmp(loc_id, &idtab_g.obj[n], &oi->token, &token_cmp) < 0)
- return FALSE;
+ return false;
if (!token_cmp)
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
} /* end token_lookup() */
/*-------------------------------------------------------------------------
@@ -258,9 +258,10 @@ token_reset(void)
static herr_t
attach_ref_attr(hid_t file_id, hid_t loc_id)
{
- char dsetname1[] = "dataset1_pointed_by_ref_attr";
- char dsetname2[] = "dataset2_pointed_by_ref_attr";
- hid_t did1 = (-1), did2 = (-1), aid = (-1), sid = (-1), sid_ref = (-1);
+ char dsetname1[] = "dataset1_pointed_by_ref_attr";
+ char dsetname2[] = "dataset2_pointed_by_ref_attr";
+ hid_t did1 = (H5I_INVALID_HID), did2 = (H5I_INVALID_HID), aid = (H5I_INVALID_HID),
+ sid = (H5I_INVALID_HID), sid_ref = (H5I_INVALID_HID);
hsize_t dims[2] = {2, 9};
hsize_t dims_ref[1] = {2};
hobj_ref_t ref[2];
@@ -333,10 +334,10 @@ static herr_t
attach_reg_ref_attr(hid_t file_id, hid_t loc_id)
{
const char dsetnamev[] = "dataset_pointed_by_reg_ref_attr";
- hid_t aid = (-1);
- hid_t space_id = (-1); /* dataspace identifiers */
- hid_t spacer_id = (-1); /* dataspace identifiers */
- hid_t dsetv_id = (-1); /*dataset identifiers*/
+ hid_t aid = (H5I_INVALID_HID);
+ hid_t space_id = (H5I_INVALID_HID); /* dataspace identifiers */
+ hid_t spacer_id = (H5I_INVALID_HID); /* dataspace identifiers */
+ hid_t dsetv_id = (H5I_INVALID_HID); /*dataset identifiers*/
hsize_t dims[2] = {2, 9};
hsize_t dimsr[1] = {2};
int rank = 2;
@@ -429,10 +430,10 @@ create_reg_ref_dataset(hid_t file_id, hid_t loc_id)
const char dsetnamer[] = "dataset_with_reg_ref";
const char dsetnamer1[] = "compact_dataset_with_reg_ref";
const char dsetnamer2[] = "compressed_dataset_with_reg_ref";
- hid_t space_id = (-1); /* dataspace identifiers */
- hid_t spacer_id = (-1);
- hid_t dsetv_id = (-1); /*dataset identifiers*/
- hid_t dsetr_id = (-1);
+ hid_t space_id = (H5I_INVALID_HID); /* dataspace identifiers */
+ hid_t spacer_id = (H5I_INVALID_HID);
+ hid_t dsetv_id = (H5I_INVALID_HID); /*dataset identifiers*/
+ hid_t dsetr_id = (H5I_INVALID_HID);
hsize_t dims[2] = {2, 9};
hsize_t dimsr[1] = {2};
int rank = 2;
@@ -444,7 +445,7 @@ create_reg_ref_dataset(hid_t file_id, hid_t loc_id)
hsize_t count[2];
hsize_t coord[3][2] = {{0, 0}, {1, 6}, {0, 8}};
size_t num_points = 3;
- hid_t pid = (-1);
+ hid_t pid = (H5I_INVALID_HID);
if ((space_id = H5Screate_simple(rank, dims, NULL)) < 0)
TEST_ERROR;
@@ -547,7 +548,7 @@ error:
static int
test_copy_attach_attribute_vl(hid_t loc_id)
{
- hid_t aid = -1, sid = -1, tid = -1;
+ hid_t aid = H5I_INVALID_HID, sid = H5I_INVALID_HID, tid = H5I_INVALID_HID;
hvl_t buf[4];
hsize_t dim1 = 4;
unsigned int i, j;
@@ -602,11 +603,11 @@ done:
static int
test_copy_attach_attributes(hid_t loc_id, hid_t type_id)
{
- hid_t aid = -1, sid = -1;
+ hid_t aid = H5I_INVALID_HID, sid = H5I_INVALID_HID;
char attr_name[ATTR_NAME_LEN];
int attr_data[2];
hsize_t dim1 = 2;
- hid_t acpl = -1;
+ hid_t acpl = H5I_INVALID_HID;
unsigned u;
int ret_value = -1;
@@ -618,7 +619,7 @@ test_copy_attach_attributes(hid_t loc_id, hid_t type_id)
goto done;
for (u = 0; u < num_attributes_g; u++) {
- HDsnprintf(attr_name, sizeof(attr_name), "%u attr", u);
+ snprintf(attr_name, sizeof(attr_name), "%u attr", u);
/* Set attribute data */
attr_data[0] = (int)(100 * u);
@@ -669,10 +670,10 @@ done:
static int
test_copy_attach_paired_attributes(hid_t loc_id, hid_t loc_id2, hid_t type_id)
{
- hid_t aid = -1, sid = -1;
+ hid_t aid = H5I_INVALID_HID, sid = H5I_INVALID_HID;
char attr_name[ATTR_NAME_LEN];
int attr_data[2];
- hid_t acpl = -1;
+ hid_t acpl = H5I_INVALID_HID;
unsigned u;
hsize_t dim1 = 2;
@@ -684,7 +685,7 @@ test_copy_attach_paired_attributes(hid_t loc_id, hid_t loc_id2, hid_t type_id)
goto done;
for (u = 0; u < num_attributes_g; u++) {
- HDsnprintf(attr_name, sizeof(attr_name), "%u attr", u);
+ snprintf(attr_name, sizeof(attr_name), "%u attr", u);
/* Set attribute data */
attr_data[0] = (int)(100 * u);
@@ -738,23 +739,23 @@ done:
*
* Purpose: Compare two attributes to check that they are equal
*
- * Return: TRUE if attributes are equal/FALSE if they are different
+ * Return: true if attributes are equal/false if they are different
*
*-------------------------------------------------------------------------
*/
static int
compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_owner)
{
- hid_t sid = -1, sid2 = -1; /* Dataspace IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype IDs */
- size_t elmt_size; /* Size of datatype */
- htri_t is_committed; /* If the datatype is committed */
- htri_t is_committed2; /* If the datatype is committed */
- H5A_info_t ainfo; /* Attribute info */
- H5A_info_t ainfo2; /* Attribute info */
- hssize_t nelmts; /* # of elements in dataspace */
- void *rbuf = NULL; /* Buffer for reading raw data */
- void *rbuf2 = NULL; /* Buffer for reading raw data */
+ hid_t sid = H5I_INVALID_HID, sid2 = H5I_INVALID_HID; /* Dataspace IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */
+ size_t elmt_size; /* Size of datatype */
+ htri_t is_committed; /* If the datatype is committed */
+ htri_t is_committed2; /* If the datatype is committed */
+ H5A_info_t ainfo; /* Attribute info */
+ H5A_info_t ainfo2; /* Attribute info */
+ hssize_t nelmts; /* # of elements in dataspace */
+ void *rbuf = NULL; /* Buffer for reading raw data */
+ void *rbuf2 = NULL; /* Buffer for reading raw data */
/* Check the character sets are equal */
if (H5Aget_info(aid, &ainfo) < 0)
@@ -790,7 +791,7 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_
TEST_ERROR;
/* Compare the datatypes */
- if (H5Tequal(tid, tid2) != TRUE)
+ if (H5Tequal(tid, tid2) != true)
TEST_ERROR;
/* Determine the size of datatype (for later) */
@@ -808,7 +809,7 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_
TEST_ERROR;
/* Compare the dataspaces */
- if (H5Sextent_equal(sid, sid2) != TRUE)
+ if (H5Sextent_equal(sid, sid2) != true)
TEST_ERROR;
/* Determine the number of elements in dataspace (for later) */
@@ -843,10 +844,10 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_
TEST_ERROR;
/* Reclaim vlen data, if necessary */
- if (H5Tdetect_class(tid, H5T_VLEN) == TRUE)
+ if (H5Tdetect_class(tid, H5T_VLEN) == true)
if (H5Treclaim(tid, sid, H5P_DEFAULT, rbuf) < 0)
TEST_ERROR;
- if (H5Tdetect_class(tid2, H5T_VLEN) == TRUE)
+ if (H5Tdetect_class(tid2, H5T_VLEN) == true)
if (H5Treclaim(tid2, sid2, H5P_DEFAULT, rbuf2) < 0)
TEST_ERROR;
@@ -872,7 +873,7 @@ compare_attribute(hid_t aid, hid_t aid2, hid_t pid, const void *wbuf, hid_t obj_
if (H5Tclose(tid2) < 0)
TEST_ERROR;
- return TRUE;
+ return true;
error:
if (rbuf)
@@ -887,7 +888,7 @@ error:
H5Tclose(tid);
}
H5E_END_TRY
- return FALSE;
+ return false;
} /* end compare_attribute() */
/*-------------------------------------------------------------------------
@@ -895,7 +896,7 @@ error:
*
* Purpose: Compare "standard" attributes on two objects to check that they are equal
*
- * Return: TRUE if objects have same attributes/FALSE if they are different
+ * Return: true if objects have same attributes/false if they are different
*
* Note: This isn't very general, the attributes are assumed to be
* those written in test_copy_attach_attributes().
@@ -905,9 +906,9 @@ error:
static int
compare_std_attributes(hid_t oid, hid_t oid2, hid_t pid)
{
- hid_t aid = -1, aid2 = -1; /* Attribute IDs */
- H5O_info2_t oinfo1, oinfo2; /* Object info */
- unsigned cpy_flags; /* Object copy flags */
+ hid_t aid = H5I_INVALID_HID, aid2 = H5I_INVALID_HID; /* Attribute IDs */
+ H5O_info2_t oinfo1, oinfo2; /* Object info */
+ unsigned cpy_flags; /* Object copy flags */
/* Retrieve the object copy flags from the property list, if it's non-DEFAULT */
if (pid != H5P_DEFAULT) {
@@ -962,7 +963,7 @@ compare_std_attributes(hid_t oid, hid_t oid2, hid_t pid)
} /* end if */
/* Objects should be the same. :-) */
- return TRUE;
+ return true;
error:
H5E_BEGIN_TRY
@@ -971,7 +972,7 @@ error:
H5Aclose(aid);
}
H5E_END_TRY
- return FALSE;
+ return false;
} /* end compare_std_attributes() */
/*-------------------------------------------------------------------------
@@ -979,7 +980,7 @@ error:
*
* Purpose: Compare two buffers of data to check that they are equal
*
- * Return: TRUE if buffer are equal/FALSE if they are different
+ * Return: true if buffer are equal/false if they are different
*
*-------------------------------------------------------------------------
*/
@@ -996,7 +997,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
/* If the type is a compound containing a vlen, loop over all elements for
* each compound member. Compounds containing reference are not supported
* yet. */
- if ((H5Tget_class(tid) == H5T_COMPOUND) && (H5Tdetect_class(tid, H5T_VLEN) == TRUE)) {
+ if ((H5Tget_class(tid) == H5T_COMPOUND) && (H5Tdetect_class(tid, H5T_VLEN) == true)) {
hid_t memb_id; /* Member id */
const uint8_t *memb1; /* Pointer to current member */
const uint8_t *memb2; /* Pointer to current member */
@@ -1059,7 +1060,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
else {
/* vlens cannot currently be nested below the top layer of a
* compound */
- assert(H5Tdetect_class(memb_id, H5T_VLEN) == FALSE);
+ assert(H5Tdetect_class(memb_id, H5T_VLEN) == false);
/* Iterate over all elements, calling memcmp() for each */
for (elmt = 0; elmt < nelmts; elmt++) {
@@ -1073,7 +1074,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
} /* end else */
} /* end for */
}
- else if (H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ else if (H5Tdetect_class(tid, H5T_VLEN) == true) {
const hvl_t *vl_buf1, *vl_buf2; /* Aliases for buffers to compare */
hid_t base_tid; /* Base type of vlen datatype */
size_t u; /* Local index variable */
@@ -1103,7 +1104,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
if (H5Tclose(base_tid) < 0)
TEST_ERROR;
} /* end if */
- else if (H5Tdetect_class(tid, H5T_REFERENCE) == TRUE) {
+ else if (H5Tdetect_class(tid, H5T_REFERENCE) == true) {
size_t u; /* Local index variable */
/* Check for "simple" reference datatype */
@@ -1151,24 +1152,24 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
TEST_ERROR;
if (H5Oclose(obj2_id) < 0)
TEST_ERROR;
- return TRUE;
+ return true;
}
}
/* Check for types of objects handled */
switch (obj1_type) {
case H5O_TYPE_DATASET:
- if (compare_datasets(obj1_id, obj2_id, pid, NULL) != TRUE)
+ if (compare_datasets(obj1_id, obj2_id, pid, NULL) != true)
TEST_ERROR;
break;
case H5O_TYPE_GROUP:
- if (compare_groups(obj1_id, obj2_id, pid, -1, 0) != TRUE)
+ if (compare_groups(obj1_id, obj2_id, pid, -1, 0) != true)
TEST_ERROR;
break;
case H5O_TYPE_NAMED_DATATYPE:
- if (H5Tequal(obj1_id, obj2_id) != TRUE)
+ if (H5Tequal(obj1_id, obj2_id) != true)
TEST_ERROR;
break;
@@ -1229,24 +1230,24 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
TEST_ERROR;
if (H5Oclose(obj2_id) < 0)
TEST_ERROR;
- return TRUE;
+ return true;
}
}
/* Check for types of objects handled */
switch (obj1_type) {
case H5O_TYPE_DATASET:
- if (compare_datasets(obj1_id, obj2_id, pid, NULL) != TRUE)
+ if (compare_datasets(obj1_id, obj2_id, pid, NULL) != true)
TEST_ERROR;
break;
case H5O_TYPE_GROUP:
- if (compare_groups(obj1_id, obj2_id, pid, -1, 0) != TRUE)
+ if (compare_groups(obj1_id, obj2_id, pid, -1, 0) != true)
TEST_ERROR;
break;
case H5O_TYPE_NAMED_DATATYPE:
- if (H5Tequal(obj1_id, obj2_id) != TRUE)
+ if (H5Tequal(obj1_id, obj2_id) != true)
TEST_ERROR;
break;
@@ -1289,10 +1290,10 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
TEST_ERROR;
/* Data should be the same. :-) */
- return TRUE;
+ return true;
error:
- return FALSE;
+ return false;
} /* end compare_data() */
/*-------------------------------------------------------------------------
@@ -1300,25 +1301,25 @@ error:
*
* Purpose: Compare two datasets to check that they are equal
*
- * Return: TRUE if datasets are equal/FALSE if they are different
+ * Return: true if datasets are equal/false if they are different
*
*-------------------------------------------------------------------------
*/
static int
compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
{
- hid_t sid = -1, sid2 = -1; /* Dataspace IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype IDs */
- hid_t dcpl = -1, dcpl2 = -1; /* Dataset creation property list IDs */
- size_t elmt_size; /* Size of datatype */
- htri_t is_committed; /* If the datatype is committed */
- htri_t is_committed2; /* If the datatype is committed */
- int nfilters; /* Number of filters applied to dataset */
- hssize_t nelmts; /* # of elements in dataspace */
- void *rbuf = NULL; /* Buffer for reading raw data */
- void *rbuf2 = NULL; /* Buffer for reading raw data */
- H5D_space_status_t space_status; /* Dataset's raw dataspace status */
- H5D_space_status_t space_status2; /* Dataset's raw dataspace status */
+ hid_t sid = H5I_INVALID_HID, sid2 = H5I_INVALID_HID; /* Dataspace IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */
+ hid_t dcpl = H5I_INVALID_HID, dcpl2 = H5I_INVALID_HID; /* Dataset creation property list IDs */
+ size_t elmt_size; /* Size of datatype */
+ htri_t is_committed; /* If the datatype is committed */
+ htri_t is_committed2; /* If the datatype is committed */
+ int nfilters; /* Number of filters applied to dataset */
+ hssize_t nelmts; /* # of elements in dataspace */
+ void *rbuf = NULL; /* Buffer for reading raw data */
+ void *rbuf2 = NULL; /* Buffer for reading raw data */
+ H5D_space_status_t space_status; /* Dataset's raw dataspace status */
+ H5D_space_status_t space_status2; /* Dataset's raw dataspace status */
/* Check the datatypes are equal */
@@ -1339,7 +1340,7 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
TEST_ERROR;
/* Compare the datatypes */
- if (H5Tequal(tid, tid2) != TRUE)
+ if (H5Tequal(tid, tid2) != true)
TEST_ERROR;
/* Determine the size of datatype (for later) */
@@ -1357,7 +1358,7 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
TEST_ERROR;
/* Compare the dataspaces */
- if (H5Sextent_equal(sid, sid2) != TRUE)
+ if (H5Sextent_equal(sid, sid2) != true)
TEST_ERROR;
/* Determine the number of elements in dataspace (for later) */
@@ -1375,7 +1376,7 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
TEST_ERROR;
/* Compare the rest of the dataset creation property lists */
- if (H5Pequal(dcpl, dcpl2) != TRUE)
+ if (H5Pequal(dcpl, dcpl2) != true)
TEST_ERROR;
/* Get the number of filters on dataset (for later) */
@@ -1441,10 +1442,10 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
TEST_ERROR;
/* Reclaim vlen data, if necessary */
- if (H5Tdetect_class(tid, H5T_VLEN) == TRUE)
+ if (H5Tdetect_class(tid, H5T_VLEN) == true)
if (H5Treclaim(tid, sid, H5P_DEFAULT, rbuf) < 0)
TEST_ERROR;
- if (H5Tdetect_class(tid2, H5T_VLEN) == TRUE)
+ if (H5Tdetect_class(tid2, H5T_VLEN) == true)
if (H5Treclaim(tid2, sid2, H5P_DEFAULT, rbuf2) < 0)
TEST_ERROR;
@@ -1471,11 +1472,11 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
TEST_ERROR;
/* Check if the attributes are equal */
- if (compare_std_attributes(did, did2, pid) != TRUE)
+ if (compare_std_attributes(did, did2, pid) != true)
TEST_ERROR;
/* Datasets should be the same. :-) */
- return TRUE;
+ return true;
error:
H5E_BEGIN_TRY
@@ -1492,7 +1493,7 @@ error:
H5Tclose(tid);
}
H5E_END_TRY
- return FALSE;
+ return false;
} /* end compare_datasets() */
/*-------------------------------------------------------------------------
@@ -1500,7 +1501,7 @@ error:
*
* Purpose: Compare two groups to check that they are "equal"
*
- * Return: TRUE if group are equal/FALSE if they are different
+ * Return: true if group are equal/false if they are different
*
*-------------------------------------------------------------------------
*/
@@ -1550,7 +1551,7 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags)
if (H5Lget_name_by_idx(gid2, ".", H5_INDEX_NAME, H5_ITER_INC, idx, objname2,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, objname2) != 0)
+ if (strcmp(objname, objname2) != 0)
TEST_ERROR;
/* Get link info */
@@ -1613,19 +1614,19 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags)
switch (oinfo.type) {
case H5O_TYPE_GROUP:
/* Compare groups */
- if (compare_groups(oid, oid2, pid, depth - 1, copy_flags) != TRUE)
+ if (compare_groups(oid, oid2, pid, depth - 1, copy_flags) != true)
TEST_ERROR;
break;
case H5O_TYPE_DATASET:
/* Compare datasets */
- if (compare_datasets(oid, oid2, pid, NULL) != TRUE)
+ if (compare_datasets(oid, oid2, pid, NULL) != true)
TEST_ERROR;
break;
case H5O_TYPE_NAMED_DATATYPE:
/* Compare datatypes */
- if (H5Tequal(oid, oid2) != TRUE)
+ if (H5Tequal(oid, oid2) != true)
TEST_ERROR;
break;
@@ -1681,18 +1682,18 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags)
} /* end if */
/* Check if the attributes are equal */
- if (compare_std_attributes(gid, gid2, pid) != TRUE)
+ if (compare_std_attributes(gid, gid2, pid) != true)
TEST_ERROR;
/* Groups should be the same. :-) */
- return TRUE;
+ return true;
error:
H5E_BEGIN_TRY
{
}
H5E_END_TRY
- return FALSE;
+ return false;
} /* end compare_groups() */
/*-------------------------------------------------------------------------
@@ -1701,9 +1702,9 @@ error:
* Purpose: If using new format, the index array type should be NEW_TYPE
* If not, the index array type should be OLD_TYPE
*
- * Return: TRUE if the index type retrieved for the dataset DID is
+ * Return: true if the index type retrieved for the dataset DID is
* as expected
- * FALSE if not
+ * false if not
*
*-------------------------------------------------------------------------
*/
@@ -1729,9 +1730,9 @@ compare_idx_type(hid_t fapl, hid_t did, H5D_chunk_index_t new_type, H5D_chunk_in
else if (idx_type != old_type)
TEST_ERROR;
- return TRUE;
+ return true;
error:
- return FALSE;
+ return false;
} /* compare_idx_type() */
/*-------------------------------------------------------------------------
@@ -1747,8 +1748,8 @@ error:
static int
test_copy_named_datatype(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype IDs */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -1807,7 +1808,7 @@ test_copy_named_datatype(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d
FAIL_STACK_ERROR;
/* Compare the datatypes */
- if (H5Tequal(tid, tid2) != TRUE)
+ if (H5Tequal(tid, tid2) != true)
TEST_ERROR;
/* close the destination datatype */
@@ -1854,8 +1855,8 @@ error:
static int
test_copy_named_datatype_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype IDs */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -1914,7 +1915,7 @@ test_copy_named_datatype_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_
FAIL_STACK_ERROR;
/* Compare the datatypes */
- if (H5Tequal(tid, tid2) != TRUE)
+ if (H5Tequal(tid, tid2) != true)
TEST_ERROR;
/* close the destination datatype */
@@ -1961,8 +1962,8 @@ error:
static int
test_copy_named_datatype_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype IDs */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -2029,7 +2030,7 @@ test_copy_named_datatype_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
FAIL_STACK_ERROR;
/* Compare the datatypes */
- if (H5Tequal(tid, tid2) != TRUE)
+ if (H5Tequal(tid, tid2) != true)
TEST_ERROR;
/* close the destination datatype */
@@ -2078,14 +2079,14 @@ error:
static int
test_copy_named_datatype_attr_self(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype IDs */
- hid_t aid = -1; /* Attribute ID */
- hid_t sid = -1; /* Dataspace ID */
- hsize_t dims[2] = {3, 4}; /* Dataspace dimensions */
- H5O_info2_t oinfo, oinfo2; /* Object info */
- H5G_info_t ginfo; /* Group info */
- hbool_t same_type;
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hsize_t dims[2] = {3, 4}; /* Dataspace dimensions */
+ H5O_info2_t oinfo, oinfo2; /* Object info */
+ H5G_info_t ginfo; /* Group info */
+ bool same_type;
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -2164,7 +2165,7 @@ test_copy_named_datatype_attr_self(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
FAIL_STACK_ERROR;
/* Compare the datatypes */
- if (H5Tequal(tid, tid2) != TRUE)
+ if (H5Tequal(tid, tid2) != true)
TEST_ERROR;
/* close the source datatype */
@@ -2180,7 +2181,7 @@ test_copy_named_datatype_attr_self(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
TEST_ERROR;
/* verify that the attribute's datatype is committed */
- if (H5Tcommitted(tid) != TRUE)
+ if (H5Tcommitted(tid) != true)
TEST_ERROR;
/* verify that the tokens of the datatypes are the same */
@@ -2189,16 +2190,16 @@ test_copy_named_datatype_attr_self(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
if (H5Oget_info3(tid2, &oinfo2, H5O_INFO_BASIC) < 0)
TEST_ERROR;
- same_type = TRUE;
+ same_type = true;
if (oinfo.fileno == oinfo2.fileno) {
int token_cmp;
if (H5Otoken_cmp(tid2, &oinfo.token, &oinfo2.token, &token_cmp) < 0)
TEST_ERROR;
if (token_cmp)
- same_type = FALSE;
+ same_type = false;
}
else
- same_type = FALSE;
+ same_type = false;
if (!same_type)
FAIL_PUTS_ERROR("destination attribute does not use the same committed datatype");
@@ -2256,12 +2257,12 @@ error:
static int
test_copy_dataset_simple(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- int buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- hsize_t dim2d[2]; /* Dataset dimensions */
- int i, j; /* local index variables */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ int buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ int i, j; /* local index variables */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -2342,7 +2343,7 @@ test_copy_dataset_simple(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -2398,19 +2399,19 @@ error:
static int
test_copy_dataset_versionbounds(hid_t fcpl_src, hid_t fapl_src)
{
- hid_t fid_src = -1, fid_dst = -1; /* Source and destination file IDs */
- hid_t fapl_dst = -1; /* File access plist for dest file */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did_src = -1, did_dst = -1; /* Source and destination dataset IDs */
- int buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- hsize_t dim2d[2]; /* Dataset dimensions */
- char src_fname[NAME_BUF_SIZE]; /* Name of source file */
- char dst_fname[NAME_BUF_SIZE]; /* Name of destination file */
- H5F_libver_t low, high; /* File format bounds */
- unsigned srcdset_layoutversion; /* Layout version of source dataset */
- int i, j; /* Local index variables */
- H5D_t *dsetp = NULL; /* Pointer to internal dset structure */
- herr_t ret; /* Generic return value */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* Source and destination file IDs */
+ hid_t fapl_dst = H5I_INVALID_HID; /* File access plist for dest file */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did_src = H5I_INVALID_HID, did_dst = H5I_INVALID_HID; /* Source and destination dataset IDs */
+ int buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ char src_fname[NAME_BUF_SIZE]; /* Name of source file */
+ char dst_fname[NAME_BUF_SIZE]; /* Name of destination file */
+ H5F_libver_t low, high; /* File format bounds */
+ unsigned srcdset_layoutversion; /* Layout version of source dataset */
+ int i, j; /* Local index variables */
+ H5D_t *dsetp = NULL; /* Pointer to internal dset structure */
+ herr_t ret; /* Generic return value */
TESTING("H5Ocopy(): simple dataset with version bounds");
@@ -2542,7 +2543,7 @@ test_copy_dataset_versionbounds(hid_t fcpl_src, hid_t fapl_src)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did_src, did_dst, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did_src, did_dst, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* Close the datasets */
@@ -2595,12 +2596,12 @@ error:
static int
test_copy_dataset_simple_samefile(hid_t fcpl, hid_t fapl)
{
- hid_t fid = -1; /* File ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- int buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- hsize_t dim2d[2]; /* Dataset dimensions */
- int i, j; /* local index variables */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ int buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ int i, j; /* local index variables */
char filename[NAME_BUF_SIZE];
TESTING("H5Ocopy(): simple dataset within the same file");
@@ -2670,7 +2671,7 @@ test_copy_dataset_simple_samefile(hid_t fcpl, hid_t fapl)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -2715,13 +2716,12 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_copy_dataset_simple_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
- hbool_t test_open)
+test_copy_dataset_simple_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool test_open)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hsize_t dim2d[2]; /* Dataset dimensions */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hsize_t dim2d[2]; /* Dataset dimensions */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -2803,7 +2803,7 @@ test_copy_dataset_simple_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -2851,11 +2851,11 @@ error:
static int
test_copy_dataset_compound(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t tid = -1; /* Datatype ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hsize_t dim1d[1]; /* Dataset dimensions */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hsize_t dim1d[1]; /* Dataset dimensions */
typedef struct comp_t {
int a;
double d;
@@ -2954,7 +2954,7 @@ test_copy_dataset_compound(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3003,18 +3003,18 @@ error:
static int
test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hsize_t max_dim1d[1]; /* Dataset max. dimensions */
- hsize_t dim2d[2]; /* Dataset dimensions */
- hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
- hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
- float buf1d[DIM_SIZE_1]; /* Buffer for writing data */
- float buf2d[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- int i, j; /* Local index variables */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hsize_t max_dim1d[1]; /* Dataset max. dimensions */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
+ hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
+ float buf1d[DIM_SIZE_1]; /* Buffer for writing data */
+ float buf2d[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ int i, j; /* Local index variables */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -3329,11 +3329,11 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_EARRAY, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_EARRAY, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf1d) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf1d) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3353,11 +3353,11 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf1d) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf1d) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3377,11 +3377,11 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf2d) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf2d) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3401,11 +3401,11 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf2d) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf2d) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3425,11 +3425,11 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf2d) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf2d) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3449,11 +3449,11 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf2d) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf2d) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3473,11 +3473,11 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf2d) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf2d) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3527,15 +3527,15 @@ error:
static int
test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hsize_t max_dim1d[1]; /* Dataset max. dimensions */
- hsize_t dim2d[2]; /* Dataset dimensions */
- hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
- hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hsize_t max_dim1d[1]; /* Dataset max. dimensions */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
+ hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -3829,11 +3829,11 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_EARRAY, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_EARRAY, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3853,11 +3853,11 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3877,11 +3877,11 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3901,11 +3901,11 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3925,11 +3925,11 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3949,11 +3949,11 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -3973,11 +3973,11 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -4027,21 +4027,21 @@ error:
static int
test_copy_dataset_chunked_sparse(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hsize_t new_dim1d[1]; /* Dataset dimensions */
- hsize_t max_dim1d[1]; /* Dataset max. dimensions */
- hsize_t dim2d[2]; /* Dataset dimensions */
- hsize_t new_dim2d[2]; /* Dataset dimensions */
- hsize_t max_dim2d[2]; /* Dataset max. dimensions */
- hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
- hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
- float buf1d[DIM_SIZE_1]; /* Buffer for writing data */
- float buf2d[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- int i, j; /* Local index variables */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hsize_t new_dim1d[1]; /* Dataset dimensions */
+ hsize_t max_dim1d[1]; /* Dataset max. dimensions */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ hsize_t new_dim2d[2]; /* Dataset dimensions */
+ hsize_t max_dim2d[2]; /* Dataset max. dimensions */
+ hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
+ hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
+ float buf1d[DIM_SIZE_1]; /* Buffer for writing data */
+ float buf2d[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ int i, j; /* Local index variables */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -4279,11 +4279,11 @@ test_copy_dataset_chunked_sparse(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_EARRAY, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_EARRAY, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -4303,11 +4303,11 @@ test_copy_dataset_chunked_sparse(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_BT2, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_BT2, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -4327,11 +4327,11 @@ test_copy_dataset_chunked_sparse(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -4351,11 +4351,11 @@ test_copy_dataset_chunked_sparse(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the array index type is correct */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -4405,14 +4405,14 @@ static int
test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
#ifdef H5_HAVE_FILTER_DEFLATE
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hsize_t dim2d[2]; /* Dataset dimensions */
- hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
- float buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- int i, j; /* Local index variables */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
+ float buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ int i, j; /* Local index variables */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
#endif /* H5_HAVE_FILTER_DEFLATE */
@@ -4425,7 +4425,7 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
(void)src_fapl;
(void)dst_fapl; /* Silence compiler */
SKIPPED();
- HDputs(" Deflation filter not available");
+ puts(" Deflation filter not available");
#else /* H5_HAVE_FILTER_DEFLATE */
/* set initial data values */
for (i = 0; i < DIM_SIZE_1; i++)
@@ -4671,11 +4671,11 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -4694,11 +4694,11 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED2, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -4717,11 +4717,11 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED2_SINGLE, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -4740,11 +4740,11 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED3_SINGLE, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -4763,11 +4763,11 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED4_SINGLE, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -4820,18 +4820,17 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_copy_dataset_no_edge_filt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
- hbool_t test_open)
+test_copy_dataset_no_edge_filt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool test_open)
{
#ifdef H5_HAVE_FILTER_DEFLATE
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hsize_t dim2d[2]; /* Dataset dimensions */
- hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
- float buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- int i, j; /* Local index variables */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
+ float buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ int i, j; /* Local index variables */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
#endif /* H5_HAVE_FILTER_DEFLATE */
@@ -4849,7 +4848,7 @@ test_copy_dataset_no_edge_filt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
(void)src_fapl;
(void)dst_fapl; /* Silence compiler */
SKIPPED();
- HDputs(" Deflation filter not available");
+ puts(" Deflation filter not available");
#else /* H5_HAVE_FILTER_DEFLATE */
/* set initial data values */
for (i = 0; i < DIM_SIZE_1; i++)
@@ -4945,11 +4944,11 @@ test_copy_dataset_no_edge_filt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
TEST_ERROR;
/* H5Pset_chunk_opts() will set layout version to 4 which will use latest indexing available */
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_FARRAY) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_FARRAY) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -5002,15 +5001,15 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_copy_dataset_compact(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, hbool_t test_open)
+test_copy_dataset_compact(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool test_open)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hsize_t dim2d[2]; /* Dataset dimensions */
- float buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- int i, j; /* Local index variables */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ float buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ int i, j; /* Local index variables */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -5110,7 +5109,7 @@ test_copy_dataset_compact(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -5159,10 +5158,10 @@ error:
static int
test_copy_dataset_external(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
int i;
hsize_t size;
hsize_t dim1d[1];
@@ -5255,7 +5254,7 @@ test_copy_dataset_external(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -5305,10 +5304,10 @@ error:
static int
test_copy_dataset_named_dtype(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
int i;
hsize_t dim1d[1];
int buf[DIM_SIZE_1];
@@ -5397,7 +5396,7 @@ test_copy_dataset_named_dtype(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hi
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -5447,11 +5446,11 @@ error:
static int
test_copy_dataset_named_dtype_hier(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
int i;
hsize_t dim1d[1];
int buf[DIM_SIZE_1];
@@ -5560,7 +5559,7 @@ test_copy_dataset_named_dtype_hier(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
FAIL_STACK_ERROR;
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* close the destination group */
@@ -5612,11 +5611,11 @@ error:
static int
test_copy_dataset_named_dtype_hier_outside(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
int i;
hsize_t dim1d[1];
int buf[DIM_SIZE_1];
@@ -5725,7 +5724,7 @@ test_copy_dataset_named_dtype_hier_outside(hid_t fcpl_src, hid_t fcpl_dst, hid_t
FAIL_STACK_ERROR;
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* close the destination group */
@@ -5779,12 +5778,12 @@ error:
*/
static int
test_copy_dataset_multi_ohdr_chunks(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
- hbool_t test_open)
+ bool test_open)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
int i;
hsize_t dim1d[1];
int buf[DIM_SIZE_1];
@@ -5901,7 +5900,7 @@ test_copy_dataset_multi_ohdr_chunks(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fa
FAIL_STACK_ERROR;
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* close the destination group */
@@ -5952,11 +5951,11 @@ error:
static int
test_copy_dataset_attr_named_dtype(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
int i;
hsize_t dim1d[1];
int buf[DIM_SIZE_1];
@@ -6068,7 +6067,7 @@ test_copy_dataset_attr_named_dtype(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
FAIL_STACK_ERROR;
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* close the destination group */
@@ -6120,14 +6119,14 @@ error:
static int
test_copy_dataset_contig_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -6205,7 +6204,7 @@ test_copy_dataset_contig_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -6225,7 +6224,7 @@ test_copy_dataset_contig_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -6277,16 +6276,16 @@ error:
static int
test_copy_dataset_chunked_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
- hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
+ hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -6391,11 +6390,11 @@ test_copy_dataset_chunked_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_VL, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -6414,11 +6413,11 @@ test_copy_dataset_chunked_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_VL2, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -6438,7 +6437,7 @@ test_copy_dataset_chunked_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -6491,15 +6490,15 @@ error:
static int
test_copy_dataset_compact_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -6587,7 +6586,7 @@ test_copy_dataset_compact_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -6607,7 +6606,7 @@ test_copy_dataset_compact_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -6659,11 +6658,11 @@ error:
static int
test_copy_attribute_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t aid = -1, aid2 = -1; /* Attribute IDs */
- hsize_t dim2d[2]; /* Dataset dimensions */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t aid = H5I_INVALID_HID, aid2 = H5I_INVALID_HID; /* Attribute IDs */
+ hsize_t dim2d[2]; /* Dataset dimensions */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -6742,7 +6741,7 @@ test_copy_attribute_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst
if ((aid2 = H5Aopen_by_idx(did2, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)0, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
TEST_ERROR;
- if (compare_attribute(aid, aid2, H5P_DEFAULT, NULL, did) != TRUE)
+ if (compare_attribute(aid, aid2, H5P_DEFAULT, NULL, did) != true)
TEST_ERROR;
if (H5Aclose(aid) < 0)
TEST_ERROR;
@@ -6795,13 +6794,13 @@ error:
static int
attach_attribute_compound_vlstr(hid_t loc_id)
{
- hid_t aid = -1; /* Attribute ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t tid = -1; /* Datatype ID */
- hid_t vl_str_tid = -1; /* Variable length string datatype ID */
- hid_t cmpd_tid = -1; /* Compound datatype ID */
- hsize_t dim1 = 1; /* Dimension size */
- typedef struct { /* Compound structure for the attribute */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t vl_str_tid = H5I_INVALID_HID; /* Variable length string datatype ID */
+ hid_t cmpd_tid = H5I_INVALID_HID; /* Compound datatype ID */
+ hsize_t dim1 = 1; /* Dimension size */
+ typedef struct { /* Compound structure for the attribute */
int i;
char *v;
} s1;
@@ -6836,11 +6835,11 @@ attach_attribute_compound_vlstr(hid_t loc_id)
goto done;
/* Write to the attribute */
- len = HDstrlen(ATTR_CMPD_STRING) + 1;
+ len = strlen(ATTR_CMPD_STRING) + 1;
buf.i = 9;
if (NULL == (buf.v = (char *)calloc(len, sizeof(char))))
goto done;
- HDstrncpy(buf.v, ATTR_CMPD_STRING, len);
+ strncpy(buf.v, ATTR_CMPD_STRING, len);
if (H5Awrite(aid, cmpd_tid, &buf) < 0)
goto done;
@@ -6876,10 +6875,10 @@ done:
static int
compare_attribute_compound_vlstr(hid_t loc, hid_t loc2)
{
- hid_t aid = -1, aid2 = -1; /* Attribute IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype IDs */
- hid_t sid = -1, sid2 = -1; /* Dataspace IDs */
- hid_t dxpl_id = -1;
+ hid_t aid = H5I_INVALID_HID, aid2 = H5I_INVALID_HID; /* Attribute IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */
+ hid_t sid = H5I_INVALID_HID, sid2 = H5I_INVALID_HID; /* Dataspace IDs */
+ hid_t dxpl_id = H5I_INVALID_HID;
typedef struct { /* Compound structure for the attribute */
int i;
char *v;
@@ -6916,9 +6915,9 @@ compare_attribute_compound_vlstr(hid_t loc, hid_t loc2)
/* Compare the attributes' data */
if (rbuf.i != rbuf2.i)
FAIL_STACK_ERROR;
- if (HDstrlen(rbuf.v) != HDstrlen(rbuf2.v))
+ if (strlen(rbuf.v) != strlen(rbuf2.v))
FAIL_STACK_ERROR;
- if (memcmp(rbuf.v, rbuf2.v, HDstrlen(rbuf.v)) != 0)
+ if (memcmp(rbuf.v, rbuf2.v, strlen(rbuf.v)) != 0)
FAIL_STACK_ERROR;
/* Reclaim vlen buffer */
@@ -6944,7 +6943,7 @@ compare_attribute_compound_vlstr(hid_t loc, hid_t loc2)
FAIL_STACK_ERROR;
if (H5Aclose(aid2) < 0)
FAIL_STACK_ERROR;
- return TRUE;
+ return true;
error:
H5E_BEGIN_TRY
@@ -6960,7 +6959,7 @@ error:
H5Pclose(dxpl_id);
}
H5E_END_TRY
- return FALSE;
+ return false;
} /* compare_attribute_compound_vlstr() */
@@ -6981,14 +6980,14 @@ error:
static int
test_copy_attribute_compound_vlstr(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t aid = -1, aid2 = -1; /* Attribute IDs */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hsize_t dim2d[2]; /* Dataset dimensions */
- char src_filename[NAME_BUF_SIZE]; /* Source file name */
- char dst_filename[NAME_BUF_SIZE]; /* Destination file name */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t aid = H5I_INVALID_HID, aid2 = H5I_INVALID_HID; /* Attribute IDs */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ char src_filename[NAME_BUF_SIZE]; /* Source file name */
+ char dst_filename[NAME_BUF_SIZE]; /* Destination file name */
TESTING("H5Ocopy(): attribute with compound datatype consisting of variable length string");
@@ -7143,16 +7142,16 @@ static int
test_copy_dataset_compressed_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
#ifdef H5_HAVE_FILTER_DEFLATE
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t tid = -1; /* Datatype ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- hsize_t dim2d[2]; /* Dataset dimensions */
- hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
- hvl_t buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- int i, j, k; /* Local index variables */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
+ hvl_t buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ int i, j, k; /* Local index variables */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
#endif /* H5_HAVE_FILTER_DEFLATE */
@@ -7165,7 +7164,7 @@ test_copy_dataset_compressed_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
(void)src_fapl;
(void)dst_fapl; /* Silence compiler */
SKIPPED();
- HDputs(" Deflation filter not available");
+ puts(" Deflation filter not available");
#else /* H5_HAVE_FILTER_DEFLATE */
/* set initial data values */
for (i = 0; i < DIM_SIZE_1; i++) {
@@ -7254,7 +7253,7 @@ test_copy_dataset_compressed_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -7274,7 +7273,7 @@ test_copy_dataset_compressed_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -7329,8 +7328,8 @@ error:
static int
test_copy_group_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -7389,7 +7388,7 @@ test_copy_group_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_
FAIL_STACK_ERROR;
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* close the destination group */
@@ -7436,11 +7435,11 @@ error:
static int
test_copy_root_group(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hid_t gid_sub = -1; /* Sub-group ID */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t gid_sub = H5I_INVALID_HID; /* Sub-group ID */
hsize_t dim2d[2];
int buf[DIM_SIZE_1][DIM_SIZE_2];
int i, j;
@@ -7542,7 +7541,7 @@ test_copy_root_group(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_f
FAIL_STACK_ERROR;
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* close the destination group */
@@ -7592,11 +7591,11 @@ error:
static int
test_copy_group(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hid_t gid_sub = -1; /* Sub-group ID */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t gid_sub = H5I_INVALID_HID; /* Sub-group ID */
hsize_t dim2d[2];
int buf[DIM_SIZE_1][DIM_SIZE_2];
int i, j;
@@ -7698,7 +7697,7 @@ test_copy_group(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
FAIL_STACK_ERROR;
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* close the destination group */
@@ -7748,11 +7747,11 @@ error:
static int
test_copy_group_deep(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hid_t gid_sub = -1, gid_sub2; /* Sub-group IDs */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t gid_sub = H5I_INVALID_HID, gid_sub2; /* Sub-group IDs */
hsize_t dim2d[2];
int buf[DIM_SIZE_1][DIM_SIZE_2];
int i, j, k; /* Local index variables */
@@ -7796,17 +7795,17 @@ test_copy_group_deep(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_f
/* create nested sub-groups & datasets */
for (i = 0; i < NUM_SUB_GROUPS; i++) {
- HDsnprintf(objname, sizeof(objname), "Group #%d", i);
+ snprintf(objname, sizeof(objname), "Group #%d", i);
if ((gid_sub = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
for (j = 0; j < NUM_SUB_GROUPS; j++) {
- HDsnprintf(objname, sizeof(objname), "Group #%d", j);
+ snprintf(objname, sizeof(objname), "Group #%d", j);
if ((gid_sub2 = H5Gcreate2(gid_sub, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
for (k = 0; k < NUM_DATASETS; k++) {
- HDsnprintf(objname, sizeof(objname), "Dataset #%d", k);
+ snprintf(objname, sizeof(objname), "Dataset #%d", k);
/* add a dataset to the group */
if ((did = H5Dcreate2(gid_sub2, objname, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT,
@@ -7864,7 +7863,7 @@ test_copy_group_deep(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_f
FAIL_STACK_ERROR;
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* close the destination group */
@@ -7914,9 +7913,9 @@ error:
static int
test_copy_group_loop(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hid_t gid_sub = -1, gid_sub2 = -1; /* Sub-group IDs */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t gid_sub = H5I_INVALID_HID, gid_sub2 = H5I_INVALID_HID; /* Sub-group IDs */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -7994,7 +7993,7 @@ test_copy_group_loop(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_f
FAIL_STACK_ERROR;
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* close the destination group */
@@ -8048,11 +8047,11 @@ error:
static int
test_copy_group_wide_loop(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hid_t gid_sub = -1, gid_sub2 = -1; /* Sub-group IDs */
- unsigned u, v; /* Local index variables */
- char objname[NAME_BUF_SIZE]; /* Object name buffer */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t gid_sub = H5I_INVALID_HID, gid_sub2 = H5I_INVALID_HID; /* Sub-group IDs */
+ unsigned u, v; /* Local index variables */
+ char objname[NAME_BUF_SIZE]; /* Object name buffer */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -8079,12 +8078,12 @@ test_copy_group_wide_loop(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
/* create wide sub-group hierarchy, with multiple links to higher groups */
for (u = 0; u < NUM_WIDE_LOOP_GROUPS; u++) {
- HDsnprintf(objname, sizeof(objname), "%s-%u", NAME_GROUP_SUB, u);
+ snprintf(objname, sizeof(objname), "%s-%u", NAME_GROUP_SUB, u);
if ((gid_sub = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
for (v = 0; v < NUM_WIDE_LOOP_GROUPS; v++) {
- HDsnprintf(objname, sizeof(objname), "%s-%u", NAME_GROUP_SUB_SUB2, v);
+ snprintf(objname, sizeof(objname), "%s-%u", NAME_GROUP_SUB_SUB2, v);
if ((gid_sub2 = H5Gcreate2(gid_sub, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
@@ -8144,7 +8143,7 @@ test_copy_group_wide_loop(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
FAIL_STACK_ERROR;
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* close the destination group */
@@ -8193,13 +8192,13 @@ error:
static int
test_copy_group_links(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1, fid_ext = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hid_t plid = -1; /* Object copy plist ID */
- hsize_t dim2d[2];
- hsize_t dim1d[1];
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID, fid_ext = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t plid = H5I_INVALID_HID; /* Object copy plist ID */
+ hsize_t dim2d[2];
+ hsize_t dim1d[1];
H5L_info2_t linfo;
int buf[DIM_SIZE_1][DIM_SIZE_2];
int i, j;
@@ -8382,7 +8381,7 @@ test_copy_group_links(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_
TEST_ERROR;
if ((did2 = H5Dopen2(fid_dst, NAME_LINK_SOFT, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* Delete expanded dataset, add soft link */
@@ -8415,7 +8414,7 @@ test_copy_group_links(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_
TEST_ERROR;
if ((did2 = H5Dopen2(fid_dst, NAME_LINK_EXTERN, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* Delete expanded dataset, add external link */
@@ -8435,7 +8434,7 @@ test_copy_group_links(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_
} /* end if */
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* close the destination group */
@@ -8459,7 +8458,7 @@ test_copy_group_links(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_
TEST_ERROR;
/* Compare the groups */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* Close groups */
@@ -8517,12 +8516,12 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_copy_soft_link(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, hbool_t test_open)
+test_copy_soft_link(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool test_open)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t gid = -1; /* Group ID */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
hsize_t dim2d[2];
int buf[DIM_SIZE_1][DIM_SIZE_2];
int i, j;
@@ -8625,7 +8624,7 @@ test_copy_soft_link(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fa
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -8674,10 +8673,10 @@ error:
static int
test_copy_ext_link(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1, fid_ext = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t gid = -1; /* Group ID */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID, fid_ext = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
hsize_t dim2d[2];
int buf[DIM_SIZE_1][DIM_SIZE_2];
int i, j;
@@ -8782,7 +8781,7 @@ test_copy_ext_link(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fap
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -8836,13 +8835,13 @@ error:
static int
test_copy_exist(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset IDs */
- int buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- hsize_t dim2d[2]; /* Dataset dimensions */
- int i, j; /* local index variables */
- herr_t ret; /* Generic return value */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset IDs */
+ int buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ int i, j; /* local index variables */
+ herr_t ret; /* Generic return value */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -8960,14 +8959,14 @@ error:
static int
test_copy_path(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t gid = -1; /* Group ID */
- int buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- hsize_t dim2d[2]; /* Dataset dimensions */
- int i, j; /* local index variables */
- herr_t ret; /* Generic return value */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ int buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ int i, j; /* local index variables */
+ herr_t ret; /* Generic return value */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -9073,7 +9072,7 @@ test_copy_path(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -9122,8 +9121,8 @@ error:
static int
test_copy_same_file_named_datatype(hid_t fcpl_src, hid_t fapl)
{
- hid_t fid = -1; /* File ID */
- hid_t tid = -1, tid2 = -1; /* Datatype IDs */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */
char filename[NAME_BUF_SIZE];
TESTING("H5Ocopy(): named datatype in same file");
@@ -9155,7 +9154,7 @@ test_copy_same_file_named_datatype(hid_t fcpl_src, hid_t fapl)
FAIL_STACK_ERROR;
/* Compare the datatypes */
- if (H5Tequal(tid, tid2) != TRUE)
+ if (H5Tequal(tid, tid2) != true)
TEST_ERROR;
/* close the destination datatype */
@@ -9199,11 +9198,11 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_copy_old_layout(hid_t fcpl_dst, hid_t fapl, hbool_t test_open)
+test_copy_old_layout(hid_t fcpl_dst, hid_t fapl, bool test_open)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t src_fapl = -1; /* Source file FAPL ID */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t src_fapl = H5I_INVALID_HID; /* Source file FAPL ID */
const char *src_filename = H5_get_srcdir_filename(FILE_OLD_LAYOUT); /* Corrected test file name */
char dst_filename[NAME_BUF_SIZE];
@@ -9262,7 +9261,7 @@ test_copy_old_layout(hid_t fcpl_dst, hid_t fapl, hbool_t test_open)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, NULL) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -9311,15 +9310,15 @@ error:
static int
test_copy_dataset_compact_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid_copy = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid_copy = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -9419,7 +9418,7 @@ test_copy_dataset_compact_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -9439,7 +9438,7 @@ test_copy_dataset_compact_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid_copy, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid_copy, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -9493,14 +9492,14 @@ error:
static int
test_copy_dataset_contig_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid_copy = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid_copy = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -9590,7 +9589,7 @@ test_copy_dataset_contig_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -9610,7 +9609,7 @@ test_copy_dataset_contig_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid_copy, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid_copy, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -9665,18 +9664,18 @@ error:
*/
static int
test_copy_dataset_chunked_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
- hbool_t test_open)
+ bool test_open)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid_copy = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
- hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid_copy = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -9786,7 +9785,7 @@ test_copy_dataset_chunked_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -9806,7 +9805,7 @@ test_copy_dataset_chunked_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid_copy, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid_copy, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -9860,16 +9859,16 @@ error:
static int
test_copy_dataset_compressed_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid_copy = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
- hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid_copy = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -9971,7 +9970,7 @@ test_copy_dataset_compressed_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -9991,7 +9990,7 @@ test_copy_dataset_compressed_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid_copy, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid_copy, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -10045,16 +10044,16 @@ error:
static int
test_copy_dataset_compact_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j, k; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
- hvl_t *tvl; /* Temporary pointer to VL information */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j, k; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hvl_t *tvl; /* Temporary pointer to VL information */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -10158,7 +10157,7 @@ test_copy_dataset_compact_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -10178,7 +10177,7 @@ test_copy_dataset_compact_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid2, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid2, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -10235,19 +10234,18 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_copy_dataset_contig_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
- hbool_t test_open)
+test_copy_dataset_contig_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool test_open)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j, k; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
- hvl_t *tvl; /* Temporary pointer to VL information */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j, k; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hvl_t *tvl; /* Temporary pointer to VL information */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -10358,7 +10356,7 @@ test_copy_dataset_contig_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -10378,7 +10376,7 @@ test_copy_dataset_contig_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid2, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid2, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -10434,15 +10432,15 @@ error:
static int
test_copy_dataset_chunked_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j, k; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j, k; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
hvl_t *tvl; /* Temporary pointer to VL information */
hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
char src_filename[NAME_BUF_SIZE];
@@ -10563,11 +10561,11 @@ test_copy_dataset_chunked_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_VL_VL, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -10586,11 +10584,11 @@ test_copy_dataset_chunked_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
if ((did2 = H5Dopen2(fid_dst, NAME_DATASET_VL_VL2, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != TRUE)
+ if (compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != true)
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -10610,7 +10608,7 @@ test_copy_dataset_chunked_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid2, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid2, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -10668,17 +10666,17 @@ error:
*/
static int
test_copy_dataset_compressed_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
- hbool_t test_open)
+ bool test_open)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j, k; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j, k; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
hvl_t *tvl; /* Temporary pointer to VL information */
hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
char src_filename[NAME_BUF_SIZE];
@@ -10794,7 +10792,7 @@ test_copy_dataset_compressed_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -10814,7 +10812,7 @@ test_copy_dataset_compressed_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid2, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid2, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -10879,16 +10877,16 @@ typedef struct cmpd_vl_t {
static int
test_copy_dataset_contig_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t tid2 = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t did2 = -1; /* Dataset ID */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- cmpd_vl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t tid2 = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t did2 = H5I_INVALID_HID; /* Dataset ID */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ cmpd_vl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -10977,7 +10975,7 @@ test_copy_dataset_contig_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -10997,7 +10995,7 @@ test_copy_dataset_contig_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -11052,16 +11050,16 @@ error:
static int
test_copy_dataset_chunked_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
- cmpd_vl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
+ cmpd_vl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -11159,7 +11157,7 @@ test_copy_dataset_chunked_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -11179,7 +11177,7 @@ test_copy_dataset_chunked_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -11235,15 +11233,15 @@ error:
static int
test_copy_dataset_compact_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Dataset creation property list ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t dxpl_id = -1; /* Dataset transfer property list ID */
- unsigned int i, j; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- cmpd_vl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dxpl_id = H5I_INVALID_HID; /* Dataset transfer property list ID */
+ unsigned int i, j; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ cmpd_vl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -11341,7 +11339,7 @@ test_copy_dataset_compact_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the destination dataset */
@@ -11361,7 +11359,7 @@ test_copy_dataset_compact_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
TEST_ERROR;
/* Reclaim vlen buffer */
- if (H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if (H5Tdetect_class(tid, H5T_VLEN) == true) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
if (H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0)
@@ -11421,14 +11419,14 @@ error:
static int
test_copy_null_ref(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid1 = -1, fid2 = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Object copy property list ID */
- hid_t did1 = -1, did2 = -1; /* Dataset IDs */
- hsize_t dim1d[1] = {2}; /* Dataset dimensions */
- hobj_ref_t obj_buf[2]; /* Buffer for object refs */
- hdset_reg_ref_t reg_buf[2]; /* Buffer for region refs */
- char zeros[MAX(sizeof(obj_buf), sizeof(reg_buf))]; /* Array of zeros, for memcmp */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Object copy property list ID */
+ hid_t did1 = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hsize_t dim1d[1] = {2}; /* Dataset dimensions */
+ hobj_ref_t obj_buf[2]; /* Buffer for object refs */
+ hdset_reg_ref_t reg_buf[2]; /* Buffer for region refs */
+ char zeros[MAX(sizeof(obj_buf), sizeof(reg_buf))]; /* Array of zeros, for memcmp */
char src_filename[NAME_BUF_SIZE];
char mid_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -11612,18 +11610,18 @@ error:
static int
test_copy_null_ref_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid1 = -1, fid2 = -1, fid3 = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t pid = -1; /* Object copy property list ID */
- hid_t did1 = -1, did2 = -1; /* Dataset IDs */
- hid_t did3 = -1, did4 = -1; /* Dataset IDs */
- hid_t did5 = -1, did6 = -1; /* Dataset IDs */
- hid_t dcpl = -1; /* Dataset creation property list */
- hsize_t chunk_dim1d[1] = {2}; /* Chunk dimensions */
- hsize_t dim1d[1] = {3}; /* Dataset dimensions */
- hobj_ref_t obj_buf[3]; /* Buffer for object refs */
- hdset_reg_ref_t reg_buf[3]; /* Buffer for region refs */
- char zeros[MAX(sizeof(obj_buf), sizeof(reg_buf))]; /* Array of zeros, for memcmp */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID, fid3 = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t pid = H5I_INVALID_HID; /* Object copy property list ID */
+ hid_t did1 = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t did3 = H5I_INVALID_HID, did4 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t did5 = H5I_INVALID_HID, did6 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */
+ hsize_t chunk_dim1d[1] = {2}; /* Chunk dimensions */
+ hsize_t dim1d[1] = {3}; /* Dataset dimensions */
+ hobj_ref_t obj_buf[3]; /* Buffer for object refs */
+ hdset_reg_ref_t reg_buf[3]; /* Buffer for region refs */
+ char zeros[MAX(sizeof(obj_buf), sizeof(reg_buf))]; /* Array of zeros, for memcmp */
char src_filename[NAME_BUF_SIZE];
char mid_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -11817,9 +11815,9 @@ error:
static int
test_copy_attr_crt_order(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid1 = -1, fid2 = -1; /* File IDs */
- hid_t gcplid = -1; /* Group creation property list ID */
- hid_t gid1 = -1, gid2 = -1; /* Group IDs */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File IDs */
+ hid_t gcplid = H5I_INVALID_HID; /* Group creation property list ID */
+ hid_t gid1 = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -11889,7 +11887,7 @@ test_copy_attr_crt_order(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d
TEST_ERROR;
/* Compare the attributes */
- if (compare_std_attributes(gid1, gid2, H5P_DEFAULT) != TRUE)
+ if (compare_std_attributes(gid1, gid2, H5P_DEFAULT) != true)
TEST_ERROR;
/* Close groups */
@@ -11905,7 +11903,7 @@ test_copy_attr_crt_order(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d
TEST_ERROR;
/* Compare the attributes */
- if (compare_std_attributes(gid1, gid2, H5P_DEFAULT) != TRUE)
+ if (compare_std_attributes(gid1, gid2, H5P_DEFAULT) != true)
TEST_ERROR;
/* Close groups */
@@ -11948,18 +11946,18 @@ error:
*/
static int
test_copy_committed_datatype_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
- hbool_t reopen)
+ bool reopen)
{
- hid_t fid_src1 = -1, fid_src2 = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t ocpypl_id = -1; /* Object copy plist ID */
- unsigned int i; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- int buf[DIM_SIZE_1]; /* Buffer for writing data */
- H5O_info2_t oinfo; /* Object info */
- H5O_token_t exp_token; /* Expected object token */
+ hid_t fid_src1 = H5I_INVALID_HID, fid_src2 = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t ocpypl_id = H5I_INVALID_HID; /* Object copy plist ID */
+ unsigned int i; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ int buf[DIM_SIZE_1]; /* Buffer for writing data */
+ H5O_info2_t oinfo; /* Object info */
+ H5O_token_t exp_token; /* Expected object token */
char src1_filename[NAME_BUF_SIZE];
char src2_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -12264,19 +12262,19 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_copy_committed_datatype_merge_same_file(hid_t fcpl, hid_t fapl, hbool_t reopen)
+test_copy_committed_datatype_merge_same_file(hid_t fcpl, hid_t fapl, bool reopen)
{
- hid_t fid = -1; /* File ID */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t gid = -1; /* Group ID */
- hid_t ocpypl_id = -1; /* Object copy plist ID */
- unsigned int i; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- int buf[DIM_SIZE_1]; /* Buffer for writing data */
- H5O_info2_t oinfo; /* Object info */
- H5O_token_t exp_token; /* Expected object token */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t ocpypl_id = H5I_INVALID_HID; /* Object copy plist ID */
+ unsigned int i; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ int buf[DIM_SIZE_1]; /* Buffer for writing data */
+ H5O_info2_t oinfo; /* Object info */
+ H5O_token_t exp_token; /* Expected object token */
char filename[NAME_BUF_SIZE];
int token_cmp;
@@ -12657,19 +12655,18 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_copy_committed_dt_merge_sugg(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
- hbool_t reopen)
+test_copy_committed_dt_merge_sugg(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool reopen)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t ocpypl_id = -1; /* Object copy plist ID */
- unsigned int i; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- int buf[DIM_SIZE_1]; /* Buffer for writing data */
- H5O_info2_t oinfo; /* Object info */
- H5O_token_t exp_token; /* Expected object token */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t ocpypl_id = H5I_INVALID_HID; /* Object copy plist ID */
+ unsigned int i; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ int buf[DIM_SIZE_1]; /* Buffer for writing data */
+ H5O_info2_t oinfo; /* Object info */
+ H5O_token_t exp_token; /* Expected object token */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
int token_cmp;
@@ -12952,21 +12949,20 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_copy_committed_dt_merge_attr(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
- hbool_t reopen)
+test_copy_committed_dt_merge_attr(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool reopen)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t aid = -1; /* Attribute ID */
- hid_t gid = -1; /* Group ID */
- hid_t ocpypl_id = -1; /* Object copy plist ID */
- unsigned int i; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- int buf[DIM_SIZE_1]; /* Buffer for writing data */
- H5O_info2_t oinfo; /* Object info */
- H5O_token_t exp_token; /* Expected object token */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t ocpypl_id = H5I_INVALID_HID; /* Object copy plist ID */
+ unsigned int i; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ int buf[DIM_SIZE_1]; /* Buffer for writing data */
+ H5O_info2_t oinfo; /* Object info */
+ H5O_token_t exp_token; /* Expected object token */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
int token_cmp;
@@ -13224,25 +13220,25 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, hbool_t reopen)
+test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool reopen)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t gid = -1; /* Group IDs */
- hid_t f_tid = -1; /* Datatype ID for root group */
- hid_t g_tid = -1; /* Datatype ID for group */
- hid_t anon_tid = -1; /* Anonymous datatype */
- hid_t aid = -1; /* Attribute ID */
- hid_t ocpypl_id = -1; /* Object copy plist ID */
- int i; /* Local index variable */
- hsize_t dim1d[1]; /* dimension sizes */
- int buf[DIM_SIZE_1]; /* Buffer for data */
- H5O_token_t exp_token_int, exp_token_short; /* Expected object tokenes */
- H5O_info2_t oinfo; /* Object info */
- char src_filename[NAME_BUF_SIZE]; /* Source file name */
- char dst_filename[NAME_BUF_SIZE]; /* Destination file name */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t gid = H5I_INVALID_HID; /* Group IDs */
+ hid_t f_tid = H5I_INVALID_HID; /* Datatype ID for root group */
+ hid_t g_tid = H5I_INVALID_HID; /* Datatype ID for group */
+ hid_t anon_tid = H5I_INVALID_HID; /* Anonymous datatype */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
+ hid_t ocpypl_id = H5I_INVALID_HID; /* Object copy plist ID */
+ int i; /* Local index variable */
+ hsize_t dim1d[1]; /* dimension sizes */
+ int buf[DIM_SIZE_1]; /* Buffer for data */
+ H5O_token_t exp_token_int, exp_token_short; /* Expected object tokenes */
+ H5O_info2_t oinfo; /* Object info */
+ char src_filename[NAME_BUF_SIZE]; /* Source file name */
+ char dst_filename[NAME_BUF_SIZE]; /* Destination file name */
int token_cmp;
if (reopen)
@@ -13694,20 +13690,20 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_copy_cdt_merge_cdt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, hbool_t reopen)
+test_copy_cdt_merge_cdt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool reopen)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid1 = -1, tid2 = -1; /* Datatype IDs */
- hid_t tid3 = -1, tid4 = -1; /* Datatype IDs */
- hid_t tid5 = -1, tid = -1; /* Datatype IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t aid = -1; /* Attribute ID */
- hid_t ocpypl_id = -1; /* Object copy plist ID */
- hsize_t dim1d[1]; /* dimension sizes */
- H5O_info2_t oinfo; /* Object info */
- H5O_token_t exp_token; /* Expected object token */
- char src_filename[NAME_BUF_SIZE]; /* Source file name */
- char dst_filename[NAME_BUF_SIZE]; /* Destination file name */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid1 = H5I_INVALID_HID, tid2 = H5I_INVALID_HID; /* Datatype IDs */
+ hid_t tid3 = H5I_INVALID_HID, tid4 = H5I_INVALID_HID; /* Datatype IDs */
+ hid_t tid5 = H5I_INVALID_HID, tid = H5I_INVALID_HID; /* Datatype IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
+ hid_t ocpypl_id = H5I_INVALID_HID; /* Object copy plist ID */
+ hsize_t dim1d[1]; /* dimension sizes */
+ H5O_info2_t oinfo; /* Object info */
+ H5O_token_t exp_token; /* Expected object token */
+ char src_filename[NAME_BUF_SIZE]; /* Source file name */
+ char dst_filename[NAME_BUF_SIZE]; /* Destination file name */
int token_cmp;
if (reopen)
@@ -14007,13 +14003,13 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_copy_cdt_merge_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, hbool_t reopen)
+test_copy_cdt_merge_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool reopen)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t ocpypl_id = -1; /* Object copy plist ID */
- H5O_info2_t oinfo; /* Object info */
- H5O_token_t exp_token; /* Expected object token */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t ocpypl_id = H5I_INVALID_HID; /* Object copy plist ID */
+ H5O_info2_t oinfo; /* Object info */
+ H5O_token_t exp_token; /* Expected object token */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
int token_cmp;
@@ -14320,18 +14316,18 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, hbool_t reopen)
+test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool reopen)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t ocpypl_id = -1; /* Object copy plist ID */
- unsigned int i; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- int buf[DIM_SIZE_1]; /* Buffer for writing data */
- H5O_info2_t oinfo; /* Object info */
- H5O_token_t exp_token; /* Expected object token */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t ocpypl_id = H5I_INVALID_HID; /* Object copy plist ID */
+ unsigned int i; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ int buf[DIM_SIZE_1]; /* Buffer for writing data */
+ H5O_info2_t oinfo; /* Object info */
+ H5O_token_t exp_token; /* Expected object token */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
int token_cmp;
@@ -14693,19 +14689,19 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_copy_cdt_merge_all_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, hbool_t reopen)
+test_copy_cdt_merge_all_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool reopen)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t gid = -1; /* Group ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t tid = -1; /* Datatype ID */
- hid_t aid = -1; /* Attribute ID */
- hid_t did = -1; /* Dataset ID */
- hid_t exp_did = -1; /* Dataset ID */
- hid_t tid_short = -1; /* Datatype ID */
- hid_t exp_tid = -1; /* Expected datatype ID */
- hid_t ocpypl_id = -1; /* Object copy plist ID */
- hsize_t dim1d[1]; /* Dataset dimensions */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t exp_did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t tid_short = H5I_INVALID_HID; /* Datatype ID */
+ hid_t exp_tid = H5I_INVALID_HID; /* Expected datatype ID */
+ hid_t ocpypl_id = H5I_INVALID_HID; /* Object copy plist ID */
+ hsize_t dim1d[1]; /* Dataset dimensions */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -15336,18 +15332,18 @@ mcdt_search_cb(void *_udata)
} /* mcdt_search_cb() */
static int
-test_copy_set_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, hbool_t reopen)
+test_copy_set_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool reopen)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t ocpypl_id = -1; /* Object copy plist ID */
- unsigned int i; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- int buf[DIM_SIZE_1]; /* Buffer for writing data */
- H5O_info2_t oinfo; /* Object info */
- H5O_token_t exp_token; /* Expected object token */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t ocpypl_id = H5I_INVALID_HID; /* Object copy plist ID */
+ unsigned int i; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ int buf[DIM_SIZE_1]; /* Buffer for writing data */
+ H5O_info2_t oinfo; /* Object info */
+ H5O_token_t exp_token; /* Expected object token */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
mcdt_search_cb_ud cb_udata; /* User data for callback */
@@ -15808,17 +15804,16 @@ mcdt_search_cbB(void *_udata)
/* The main test function */
static int
-test_copy_set_get_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
- hbool_t reopen)
+test_copy_set_get_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, bool reopen)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1; /* Datatype ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t ocpypl_id = -1; /* Object copy plist ID */
- unsigned int i; /* Local index variables */
- hsize_t dim1d[1]; /* Dataset dimensions */
- int buf[DIM_SIZE_1]; /* Buffer for writing data */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t ocpypl_id = H5I_INVALID_HID; /* Object copy plist ID */
+ unsigned int i; /* Local index variables */
+ hsize_t dim1d[1]; /* Dataset dimensions */
+ int buf[DIM_SIZE_1]; /* Buffer for writing data */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
H5O_mcdt_search_cb_t mcdt_cb = NULL; /* The callback function */
@@ -16222,8 +16217,8 @@ error:
static int
test_copy_iterate(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid1 = -1, fid2 = -1; /* File IDs */
- hid_t gid = -1; /* Group ID */
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID; /* File IDs */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
int i;
char grp_name[16];
char src_filename[NAME_BUF_SIZE];
@@ -16244,7 +16239,7 @@ test_copy_iterate(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl
/* Create groups */
for (i = 0; i < 9; i++) {
- HDsnprintf(grp_name, sizeof(grp_name), "grp%d", i);
+ snprintf(grp_name, sizeof(grp_name), "grp%d", i);
if ((gid = H5Gcreate2(fid1, grp_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(gid) < 0)
@@ -16307,16 +16302,16 @@ error:
*/
static int
test_copy_option(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, unsigned flag,
- hbool_t crt_intermediate_grp, const char *test_desciption)
+ bool crt_intermediate_grp, const char *test_desciption)
{
- hid_t fid_src = -1, fid_dst = -1, fid_ext = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hid_t gid = -1, gid2 = -1, gid_ref = -1; /* Group IDs */
- hid_t gid_sub = -1, gid_sub_sub = -1; /* Sub-group ID */
- hid_t pid = -1, lcpl_id = -1; /* Property IDs */
- unsigned cpy_flags; /* Object copy flags */
- int depth = -1; /* Copy depth */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID, fid_ext = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID, gid_ref = H5I_INVALID_HID; /* Group IDs */
+ hid_t gid_sub = H5I_INVALID_HID, gid_sub_sub = H5I_INVALID_HID; /* Sub-group ID */
+ hid_t pid = H5I_INVALID_HID, lcpl_id = H5I_INVALID_HID; /* Property IDs */
+ unsigned cpy_flags; /* Object copy flags */
+ int depth = -1; /* Copy depth */
hsize_t dim2d[2];
int buf[DIM_SIZE_1][DIM_SIZE_2];
int i, j;
@@ -16554,7 +16549,7 @@ test_copy_option(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
/* Create link creation plist to pass in intermediate group creation */
if ((lcpl_id = H5Pcreate(H5P_LINK_CREATE)) < 0)
TEST_ERROR;
- if (H5Pset_create_intermediate_group(lcpl_id, TRUE) < 0)
+ if (H5Pset_create_intermediate_group(lcpl_id, true) < 0)
TEST_ERROR;
if (H5Ocopy(fid_src, NAME_GROUP_TOP, fid_dst, "/new_g0/new_g00", pid, lcpl_id) < 0)
@@ -16634,7 +16629,7 @@ test_copy_option(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
} /* end else */
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, pid, depth, flag) != TRUE)
+ if (compare_groups(gid, gid2, pid, depth, flag) != true)
TEST_ERROR;
if (H5Gclose(gid2) < 0)
TEST_ERROR;
@@ -16715,18 +16710,18 @@ error:
static int
test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
- hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t sid = -1; /* Dataspace ID */
- hid_t tid = -1; /* Datatype ID */
- hid_t did = -1, did2 = -1; /* Dataset IDs */
- hid_t did3 = -1, did4 = -1; /* Dataset IDs */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hid_t pid = -1; /* Dataset creation property list */
- hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimension sizes */
- int buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- int newbuf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- hsize_t dim2d[2]; /* Dataset dimensions */
- int i, j; /* local index variables */
+ hid_t fid_src = H5I_INVALID_HID, fid_dst = H5I_INVALID_HID; /* File IDs */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t did = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t did3 = H5I_INVALID_HID, did4 = H5I_INVALID_HID; /* Dataset IDs */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t pid = H5I_INVALID_HID; /* Dataset creation property list */
+ hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimension sizes */
+ int buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ int newbuf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ int i, j; /* local index variables */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
@@ -16818,9 +16813,9 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did3, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did3, H5P_DEFAULT, buf) != true)
TEST_ERROR;
- if (compare_datasets(did2, did4, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did2, did4, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the copied dataset */
@@ -16845,9 +16840,9 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did3, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did3, H5P_DEFAULT, buf) != true)
TEST_ERROR;
- if (compare_datasets(did2, did4, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did2, did4, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the copied dataset in DST file */
@@ -16893,9 +16888,9 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did3, H5P_DEFAULT, newbuf) != TRUE)
+ if (compare_datasets(did, did3, H5P_DEFAULT, newbuf) != true)
TEST_ERROR;
- if (compare_datasets(did2, did4, H5P_DEFAULT, newbuf) != TRUE)
+ if (compare_datasets(did2, did4, H5P_DEFAULT, newbuf) != true)
TEST_ERROR;
/* close the copied dataset in SRC file */
@@ -16919,9 +16914,9 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did3, H5P_DEFAULT, newbuf) != TRUE)
+ if (compare_datasets(did, did3, H5P_DEFAULT, newbuf) != true)
TEST_ERROR;
- if (compare_datasets(did2, did4, H5P_DEFAULT, newbuf) != TRUE)
+ if (compare_datasets(did2, did4, H5P_DEFAULT, newbuf) != true)
TEST_ERROR;
/* close the copied dataset in DST file */
@@ -16977,7 +16972,7 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the copied dataset in SRC file */
@@ -16997,7 +16992,7 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst
TEST_ERROR;
/* Check if the datasets are equal */
- if (compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE)
+ if (compare_datasets(did, did2, H5P_DEFAULT, buf) != true)
TEST_ERROR;
/* close the copied dataset in DST file */
@@ -17043,7 +17038,7 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst
TEST_ERROR;
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* close the DST dataset */
@@ -17062,7 +17057,7 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst
TEST_ERROR;
/* Check if the groups are equal */
- if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != TRUE)
+ if (compare_groups(gid, gid2, H5P_DEFAULT, -1, 0) != true)
TEST_ERROR;
/* close the group in DST file */
@@ -17130,10 +17125,10 @@ main(void)
int configuration; /* Configuration of tests. */
int ExpressMode;
const char *env_h5_drvr; /* File Driver value from environment */
- hbool_t same_file; /* Whether to run tests that only use one file */
- hbool_t driver_is_default_compatible;
+ bool same_file; /* Whether to run tests that only use one file */
+ bool driver_is_default_compatible;
- env_h5_drvr = HDgetenv(HDF5_DRIVER);
+ env_h5_drvr = getenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
@@ -17179,10 +17174,10 @@ main(void)
hid_t fcpl_src;
hid_t fcpl_dst;
- /* Start with same_file == TRUE. Use source file settings for these
+ /* Start with same_file == true. Use source file settings for these
* tests. Don't run with a non-default destination file setting, as
* destination settings have no effect. */
- same_file = TRUE;
+ same_file = true;
/* No need to test dense attributes with old format */
if (!(configuration & CONFIG_SRC_NEW_FORMAT) && (configuration & CONFIG_DENSE))
@@ -17190,52 +17185,52 @@ main(void)
/* Test with and without shared messages */
if (configuration & CONFIG_SHARE_SRC) {
- HDputs("\nTesting with shared src messages:");
+ puts("\nTesting with shared src messages:");
fcpl_src = fcpl_shared;
}
else {
- HDputs("\nTesting without shared src messages:");
+ puts("\nTesting without shared src messages:");
fcpl_src = H5P_DEFAULT;
}
if (configuration & CONFIG_SHARE_DST) {
- HDputs("Testing with shared dst messages:");
+ puts("Testing with shared dst messages:");
fcpl_dst = fcpl_shared;
- same_file = FALSE;
+ same_file = false;
}
else {
- HDputs("Testing without shared dst messages:");
+ puts("Testing without shared dst messages:");
fcpl_dst = H5P_DEFAULT;
}
/* Set the FAPL for the source file's type of format */
if (configuration & CONFIG_SRC_NEW_FORMAT) {
- HDputs("Testing with latest format for source file:");
+ puts("Testing with latest format for source file:");
src_fapl = fapl2;
/* Test with and without dense attributes */
if (configuration & CONFIG_DENSE) {
- HDputs("Testing with dense attributes:");
+ puts("Testing with dense attributes:");
num_attributes_g = max_compact + 1;
}
else {
- HDputs("Testing without dense attributes:");
+ puts("Testing without dense attributes:");
num_attributes_g = MAX(min_dense, 2) - 2;
}
} /* end if */
else {
- HDputs("Testing with oldest file format for source file:");
+ puts("Testing with oldest file format for source file:");
src_fapl = fapl;
num_attributes_g = 4;
} /* end else */
/* Set the FAPL for the destination file's type of format */
if (configuration & CONFIG_DST_NEW_FORMAT) {
- HDputs("Testing with latest format for destination file:");
+ puts("Testing with latest format for destination file:");
dst_fapl = fapl2;
- same_file = FALSE;
+ same_file = false;
} /* end if */
else {
- HDputs("Testing with oldest file format for destination file:");
+ puts("Testing with oldest file format for destination file:");
dst_fapl = fapl;
} /* end else */
@@ -17245,8 +17240,8 @@ main(void)
nerrors += test_copy_dataset_simple_samefile(fcpl_src, src_fapl);
/* Test with dataset opened in the file or not */
- nerrors += test_copy_dataset_simple_empty(fcpl_src, fcpl_dst, src_fapl, dst_fapl, FALSE);
- nerrors += test_copy_dataset_simple_empty(fcpl_src, fcpl_dst, src_fapl, dst_fapl, TRUE);
+ nerrors += test_copy_dataset_simple_empty(fcpl_src, fcpl_dst, src_fapl, dst_fapl, false);
+ nerrors += test_copy_dataset_simple_empty(fcpl_src, fcpl_dst, src_fapl, dst_fapl, true);
nerrors += test_copy_dataset_compound(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
nerrors += test_copy_dataset_chunked(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
@@ -17255,15 +17250,15 @@ main(void)
nerrors += test_copy_dataset_compressed(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
/* Test with dataset opened in the file or not */
- nerrors += test_copy_dataset_no_edge_filt(fcpl_src, fcpl_dst, src_fapl, dst_fapl, FALSE);
- nerrors += test_copy_dataset_no_edge_filt(fcpl_src, fcpl_dst, src_fapl, dst_fapl, TRUE);
+ nerrors += test_copy_dataset_no_edge_filt(fcpl_src, fcpl_dst, src_fapl, dst_fapl, false);
+ nerrors += test_copy_dataset_no_edge_filt(fcpl_src, fcpl_dst, src_fapl, dst_fapl, true);
/* Test with dataset opened in the file or not */
- nerrors += test_copy_dataset_compact(fcpl_src, fcpl_dst, src_fapl, dst_fapl, FALSE);
- nerrors += test_copy_dataset_compact(fcpl_src, fcpl_dst, src_fapl, dst_fapl, TRUE);
+ nerrors += test_copy_dataset_compact(fcpl_src, fcpl_dst, src_fapl, dst_fapl, false);
+ nerrors += test_copy_dataset_compact(fcpl_src, fcpl_dst, src_fapl, dst_fapl, true);
- nerrors += test_copy_dataset_multi_ohdr_chunks(fcpl_src, fcpl_dst, src_fapl, dst_fapl, FALSE);
- nerrors += test_copy_dataset_multi_ohdr_chunks(fcpl_src, fcpl_dst, src_fapl, dst_fapl, TRUE);
+ nerrors += test_copy_dataset_multi_ohdr_chunks(fcpl_src, fcpl_dst, src_fapl, dst_fapl, false);
+ nerrors += test_copy_dataset_multi_ohdr_chunks(fcpl_src, fcpl_dst, src_fapl, dst_fapl, true);
nerrors += test_copy_dataset_attr_named_dtype(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
@@ -17276,8 +17271,8 @@ main(void)
nerrors += test_copy_group_links(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
/* Test with dataset opened in the file or not */
- nerrors += test_copy_soft_link(fcpl_src, fcpl_dst, src_fapl, dst_fapl, FALSE);
- nerrors += test_copy_soft_link(fcpl_src, fcpl_dst, src_fapl, dst_fapl, TRUE);
+ nerrors += test_copy_soft_link(fcpl_src, fcpl_dst, src_fapl, dst_fapl, false);
+ nerrors += test_copy_soft_link(fcpl_src, fcpl_dst, src_fapl, dst_fapl, true);
nerrors += test_copy_ext_link(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
nerrors += test_copy_exist(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
@@ -17287,30 +17282,30 @@ main(void)
nerrors += test_copy_attr_crt_order(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
- nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl, H5O_COPY_WITHOUT_ATTR_FLAG, FALSE,
+ nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl, H5O_COPY_WITHOUT_ATTR_FLAG, false,
"H5Ocopy(): without attributes");
- nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl, 0, TRUE,
+ nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl, 0, true,
"H5Ocopy(): with missing groups");
nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl, H5O_COPY_EXPAND_SOFT_LINK_FLAG,
- FALSE, "H5Ocopy(): expand soft link");
+ false, "H5Ocopy(): expand soft link");
nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl, H5O_COPY_EXPAND_EXT_LINK_FLAG,
- FALSE, "H5Ocopy(): expand external link");
+ false, "H5Ocopy(): expand external link");
/* Splitter VFD currently has external link-related bugs */
- if (HDstrcmp(env_h5_drvr, "splitter")) {
+ if (strcmp(env_h5_drvr, "splitter")) {
nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl,
- H5O_COPY_EXPAND_SOFT_LINK_FLAG | H5O_COPY_EXPAND_EXT_LINK_FLAG, FALSE,
+ H5O_COPY_EXPAND_SOFT_LINK_FLAG | H5O_COPY_EXPAND_EXT_LINK_FLAG, false,
"H5Ocopy(): expand soft and external links");
}
nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl, H5O_COPY_SHALLOW_HIERARCHY_FLAG,
- FALSE, "H5Ocopy(): shallow group copy");
+ false, "H5Ocopy(): shallow group copy");
nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl, H5O_COPY_EXPAND_REFERENCE_FLAG,
- FALSE, "H5Ocopy(): expand object reference");
+ false, "H5Ocopy(): expand object reference");
nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl, H5O_COPY_PRESERVE_NULL_FLAG,
- FALSE, "H5Ocopy(): preserve NULL messages");
+ false, "H5Ocopy(): preserve NULL messages");
nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl,
- H5O_COPY_WITHOUT_ATTR_FLAG | H5O_COPY_PRESERVE_NULL_FLAG, TRUE,
+ H5O_COPY_WITHOUT_ATTR_FLAG | H5O_COPY_PRESERVE_NULL_FLAG, true,
"H5Ocopy(): preserve NULL messages");
nerrors += test_copy_dataset_open(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
@@ -17324,7 +17319,7 @@ main(void)
nerrors += test_copy_named_datatype_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
/* Loop over reopening the file */
- for (reopen = FALSE; reopen <= TRUE; reopen++) {
+ for (reopen = false; reopen <= true; reopen++) {
nerrors += test_copy_committed_datatype_merge(fcpl_src, fcpl_dst, src_fapl, dst_fapl, reopen);
if (same_file)
@@ -17358,21 +17353,21 @@ main(void)
nerrors += test_copy_dataset_contig_named_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
/* Test with dataset opened in the file or not */
- nerrors += test_copy_dataset_chunked_named_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, FALSE);
- nerrors += test_copy_dataset_chunked_named_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, TRUE);
+ nerrors += test_copy_dataset_chunked_named_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, false);
+ nerrors += test_copy_dataset_chunked_named_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, true);
nerrors += test_copy_dataset_compressed_named_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
nerrors += test_copy_dataset_compact_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
/* Test with dataset opened in the file or not */
- nerrors += test_copy_dataset_contig_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, FALSE);
- nerrors += test_copy_dataset_contig_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, TRUE);
+ nerrors += test_copy_dataset_contig_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, false);
+ nerrors += test_copy_dataset_contig_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, true);
nerrors += test_copy_dataset_chunked_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
/* Test with dataset opened in the file or not */
- nerrors += test_copy_dataset_compressed_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, FALSE);
- nerrors += test_copy_dataset_compressed_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, TRUE);
+ nerrors += test_copy_dataset_compressed_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, false);
+ nerrors += test_copy_dataset_compressed_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, true);
nerrors += test_copy_dataset_contig_cmpd_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
nerrors += test_copy_dataset_chunked_cmpd_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
@@ -17382,8 +17377,8 @@ main(void)
if (driver_is_default_compatible) {
/* Test with dataset opened in the file or not */
- nerrors += test_copy_old_layout(fcpl_dst, dst_fapl, FALSE);
- nerrors += test_copy_old_layout(fcpl_dst, dst_fapl, TRUE);
+ nerrors += test_copy_old_layout(fcpl_dst, dst_fapl, false);
+ nerrors += test_copy_old_layout(fcpl_dst, dst_fapl, true);
}
/* Test with dataset opened in the file or not */
@@ -17412,7 +17407,7 @@ main(void)
exit(EXIT_FAILURE);
} /* end if */
- HDputs("All object copying tests passed.");
+ puts("All object copying tests passed.");
/* close property list.
* NOTE: if this property list is not closed and the test is