summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-09-15 22:13:18 (GMT)
committerGitHub <noreply@github.com>2023-09-15 22:13:18 (GMT)
commit44a00ef876ad3e1922847e93feac57c479217fbe (patch)
tree5e9fc677913a06a71eba1342633f92e93bd07a6c /test
parent59a90368cdb696205bdf15040d1a48b4f69af97f (diff)
downloadhdf5-44a00ef876ad3e1922847e93feac57c479217fbe.zip
hdf5-44a00ef876ad3e1922847e93feac57c479217fbe.tar.gz
hdf5-44a00ef876ad3e1922847e93feac57c479217fbe.tar.bz2
Strip HD prefix from string/char C API calls (#3540)
* Strip HD prefix from string/char C API calls * HD(f)(put|get)(s|c) * HDstr* * HDv*printf * HD(s)(print|scan)f * HDperror But NOT: * HDstrcase* * HDvasprintf * HDstrtok_r * HDstrndup As those are not C99 and have portability work-around implementations. They will be handled later. * Fix th5_system.c screwup
Diffstat (limited to 'test')
-rw-r--r--test/API/H5_api_async_test.c2
-rw-r--r--test/API/H5_api_attribute_test.c74
-rw-r--r--test/API/H5_api_dataset_test.c22
-rw-r--r--test/API/H5_api_file_test.c12
-rw-r--r--test/API/H5_api_group_test.c3
-rw-r--r--test/API/H5_api_link_test.c896
-rw-r--r--test/API/H5_api_misc_test.c18
-rw-r--r--test/API/H5_api_object_test.c16
-rw-r--r--test/API/H5_api_test.c11
-rw-r--r--test/API/H5_api_test_util.c6
-rw-r--r--test/API/tarray.c28
-rw-r--r--test/API/tattr.c279
-rw-r--r--test/API/tcoords.c12
-rw-r--r--test/API/testhdf5.c38
-rw-r--r--test/API/testhdf5.h14
-rw-r--r--test/API/tfile.c32
-rw-r--r--test/API/tgenprop.c44
-rw-r--r--test/API/th5o.c24
-rw-r--r--test/API/titerate.c74
-rw-r--r--test/API/tmisc.c28
-rw-r--r--test/API/trefer.c8
-rw-r--r--test/API/tselect.c39
-rw-r--r--test/API/tunicode.c84
-rw-r--r--test/API/tvlstr.c40
-rw-r--r--test/API/tvltypes.c186
-rw-r--r--test/accum.c14
-rw-r--r--test/app_ref.c6
-rw-r--r--test/big.c42
-rw-r--r--test/bittests.c48
-rw-r--r--test/btree2.c6
-rw-r--r--test/cache.c423
-rw-r--r--test/cache_api.c6
-rw-r--r--test/cache_common.c188
-rw-r--r--test/cache_image.c54
-rw-r--r--test/cache_logging.c6
-rw-r--r--test/cache_tagging.c10
-rw-r--r--test/chunk_info.c2
-rw-r--r--test/cmpd_dset.c72
-rw-r--r--test/cmpd_dtransform.c8
-rw-r--r--test/cork.c8
-rw-r--r--test/cross_read.c20
-rw-r--r--test/dangle.c14
-rw-r--r--test/del_many_dense_attrs.c4
-rw-r--r--test/direct_chunk.c4
-rw-r--r--test/dsets.c128
-rw-r--r--test/dt_arith.c178
-rw-r--r--test/dtransform.c16
-rw-r--r--test/dtypes.c128
-rw-r--r--test/earray.c29
-rw-r--r--test/efc.c6
-rw-r--r--test/enc_dec_plist.c6
-rw-r--r--test/enc_dec_plist_cross_platform.c8
-rw-r--r--test/enum.c4
-rw-r--r--test/error_test.c20
-rw-r--r--test/event_set.c4
-rw-r--r--test/evict_on_close.c6
-rw-r--r--test/external.c42
-rw-r--r--test/external_common.c8
-rw-r--r--test/external_env.c10
-rw-r--r--test/farray.c18
-rw-r--r--test/fheap.c32
-rw-r--r--test/file_image.c20
-rw-r--r--test/filenotclosed.c6
-rw-r--r--test/fillval.c80
-rw-r--r--test/filter_fail.c4
-rw-r--r--test/filter_plugin.c72
-rw-r--r--test/flush1.c2
-rw-r--r--test/flush2.c10
-rw-r--r--test/flushrefresh.c14
-rw-r--r--test/freespace.c4
-rw-r--r--test/gen_bad_ohdr.c2
-rw-r--r--test/gen_bogus.c2
-rw-r--r--test/gen_cross.c4
-rw-r--r--test/gen_plist.c4
-rw-r--r--test/genall5.c226
-rw-r--r--test/getname.c60
-rw-r--r--test/gheap.c44
-rw-r--r--test/h5test.c74
-rw-r--r--test/h5test.h14
-rw-r--r--test/hdfs.c26
-rw-r--r--test/hyperslab.c59
-rw-r--r--test/istore.c30
-rw-r--r--test/lheap.c12
-rw-r--r--test/links.c789
-rw-r--r--test/links_env.c10
-rw-r--r--test/mf.c204
-rw-r--r--test/mirror_vfd.c80
-rw-r--r--test/mount.c98
-rw-r--r--test/mtime.c22
-rw-r--r--test/ntypes.c12
-rw-r--r--test/objcopy.c56
-rw-r--r--test/objcopy_ref.c26
-rw-r--r--test/ohdr.c34
-rw-r--r--test/onion.c34
-rw-r--r--test/page_buffer.c28
-rw-r--r--test/reserved.c14
-rw-r--r--test/ros3.c67
-rw-r--r--test/s3comms.c78
-rw-r--r--test/select_io_dset.c46
-rw-r--r--test/set_extent.c8
-rw-r--r--test/stab.c38
-rw-r--r--test/swmr.c20
-rw-r--r--test/swmr_common.c4
-rw-r--r--test/swmr_generator.c4
-rw-r--r--test/swmr_reader.c4
-rw-r--r--test/swmr_start_write.c6
-rw-r--r--test/swmr_writer.c4
-rw-r--r--test/tarray.c28
-rw-r--r--test/tattr.c279
-rw-r--r--test/tcoords.c12
-rw-r--r--test/testframe.c40
-rw-r--r--test/testhdf5.h2
-rw-r--r--test/testmeta.c8
-rw-r--r--test/tfile.c32
-rw-r--r--test/tgenprop.c44
-rw-r--r--test/th5_system.c88
-rw-r--r--test/th5o.c24
-rw-r--r--test/thread_id.c16
-rw-r--r--test/timer.c18
-rw-r--r--test/titerate.c74
-rw-r--r--test/tmisc.c28
-rw-r--r--test/trefer.c8
-rw-r--r--test/trefer_deprec.c8
-rw-r--r--test/trefstr.c64
-rw-r--r--test/tselect.c39
-rw-r--r--test/tsohm.c16
-rw-r--r--test/ttsafe.c2
-rw-r--r--test/tunicode.c84
-rw-r--r--test/tvlstr.c40
-rw-r--r--test/tvltypes.c186
-rw-r--r--test/twriteorder.c4
-rw-r--r--test/unlink.c90
-rw-r--r--test/unregister.c2
-rw-r--r--test/use_append_chunk.c4
-rw-r--r--test/use_append_chunk_mirror.c8
-rw-r--r--test/use_append_mchunks.c4
-rw-r--r--test/use_common.c8
-rw-r--r--test/use_disable_mdc_flushes.c6
-rw-r--r--test/vds.c42
-rw-r--r--test/vds_env.c13
-rw-r--r--test/vfd.c66
-rw-r--r--test/vfd_plugin.c16
-rw-r--r--test/vol.c50
-rw-r--r--test/vol_plugin.c4
144 files changed, 3707 insertions, 3773 deletions
diff --git a/test/API/H5_api_async_test.c b/test/API/H5_api_async_test.c
index ebae012..7777e10 100644
--- a/test/API/H5_api_async_test.c
+++ b/test/API/H5_api_async_test.c
@@ -2676,7 +2676,7 @@ cleanup_files(void)
H5Fdelete(ASYNC_API_TEST_FILE, H5P_DEFAULT);
for (i = 0; i <= max_printf_file; i++) {
- HDsnprintf(file_name, 64, ASYNC_API_TEST_FILE_PRINTF, i);
+ snprintf(file_name, 64, ASYNC_API_TEST_FILE_PRINTF, i);
H5Fdelete(file_name, H5P_DEFAULT);
} /* end for */
}
diff --git a/test/API/H5_api_attribute_test.c b/test/API/H5_api_attribute_test.c
index badfb1a..680ee43 100644
--- a/test/API/H5_api_attribute_test.c
+++ b/test/API/H5_api_attribute_test.c
@@ -4082,8 +4082,8 @@ test_get_attribute_name(void)
PART_ERROR(H5Aget_name);
}
- if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME,
- strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) {
+ if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME,
+ strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) {
H5_FAILED();
printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME);
@@ -4127,8 +4127,8 @@ test_get_attribute_name(void)
PART_ERROR(H5Aget_name_by_idx_crt_order_increasing);
}
- if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME,
- strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) {
+ if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME,
+ strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) {
H5_FAILED();
printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME);
@@ -4145,8 +4145,8 @@ test_get_attribute_name(void)
PART_ERROR(H5Aget_name_by_idx_crt_order_increasing);
}
- if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2,
- strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2) + 1)) {
+ if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2,
+ strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2) + 1)) {
H5_FAILED();
printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2);
@@ -4163,8 +4163,8 @@ test_get_attribute_name(void)
PART_ERROR(H5Aget_name_by_idx_crt_order_increasing);
}
- if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3,
- strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3) + 1)) {
+ if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3,
+ strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3) + 1)) {
H5_FAILED();
printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3);
@@ -4195,8 +4195,8 @@ test_get_attribute_name(void)
PART_ERROR(H5Aget_name_by_idx_crt_order_decreasing);
}
- if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME,
- strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) {
+ if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME,
+ strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) {
H5_FAILED();
printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME);
@@ -4213,8 +4213,8 @@ test_get_attribute_name(void)
PART_ERROR(H5Aget_name_by_idx_crt_order_decreasing);
}
- if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2,
- strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2) + 1)) {
+ if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2,
+ strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2) + 1)) {
H5_FAILED();
printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2);
@@ -4231,8 +4231,8 @@ test_get_attribute_name(void)
PART_ERROR(H5Aget_name_by_idx_crt_order_decreasing);
}
- if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3,
- strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3) + 1)) {
+ if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3,
+ strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3) + 1)) {
H5_FAILED();
printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3);
@@ -4257,8 +4257,8 @@ test_get_attribute_name(void)
PART_ERROR(H5Aget_name_by_idx_name_order_increasing);
}
- if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME,
- strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) {
+ if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME,
+ strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) {
H5_FAILED();
printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME);
@@ -4275,8 +4275,8 @@ test_get_attribute_name(void)
PART_ERROR(H5Aget_name_by_idx_name_order_increasing);
}
- if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2,
- strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2) + 1)) {
+ if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2,
+ strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2) + 1)) {
H5_FAILED();
printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2);
@@ -4293,8 +4293,8 @@ test_get_attribute_name(void)
PART_ERROR(H5Aget_name_by_idx_name_order_increasing);
}
- if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3,
- strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3) + 1)) {
+ if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3,
+ strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3) + 1)) {
H5_FAILED();
printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3);
@@ -4319,8 +4319,8 @@ test_get_attribute_name(void)
PART_ERROR(H5Aget_name_by_idx_name_order_decreasing);
}
- if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME,
- strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) {
+ if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME,
+ strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) {
H5_FAILED();
printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME);
@@ -4337,8 +4337,8 @@ test_get_attribute_name(void)
PART_ERROR(H5Aget_name_by_idx_name_order_decreasing);
}
- if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2,
- strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2) + 1)) {
+ if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2,
+ strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2) + 1)) {
H5_FAILED();
printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2);
@@ -4355,8 +4355,8 @@ test_get_attribute_name(void)
PART_ERROR(H5Aget_name_by_idx_name_order_decreasing);
}
- if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3,
- strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3) + 1)) {
+ if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3,
+ strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3) + 1)) {
H5_FAILED();
printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf,
ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3);
@@ -6553,8 +6553,8 @@ test_attribute_iterate_group(void)
for (i = 0; i < ATTRIBUTE_ITERATE_TEST_NUM_ATTRS; i++) {
char attr_name[ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE];
- HDsnprintf(attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE,
- ATTRIBUTE_ITERATE_TEST_ATTR_NAME "%d", (int)(ATTRIBUTE_ITERATE_TEST_NUM_ATTRS - i - 1));
+ snprintf(attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE, ATTRIBUTE_ITERATE_TEST_ATTR_NAME "%d",
+ (int)(ATTRIBUTE_ITERATE_TEST_NUM_ATTRS - i - 1));
if ((attr_id = H5Acreate2(group_id, attr_name, attr_dtype, attr_space_id, H5P_DEFAULT, H5P_DEFAULT)) <
0) {
@@ -6962,8 +6962,8 @@ test_attribute_iterate_dataset(void)
for (i = 0; i < ATTRIBUTE_ITERATE_TEST_NUM_ATTRS; i++) {
char attr_name[ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE];
- HDsnprintf(attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE,
- ATTRIBUTE_ITERATE_TEST_ATTR_NAME "%d", (int)(ATTRIBUTE_ITERATE_TEST_NUM_ATTRS - i - 1));
+ snprintf(attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE, ATTRIBUTE_ITERATE_TEST_ATTR_NAME "%d",
+ (int)(ATTRIBUTE_ITERATE_TEST_NUM_ATTRS - i - 1));
if ((attr_id = H5Acreate2(dset_id, attr_name, attr_dtype, attr_space_id, H5P_DEFAULT, H5P_DEFAULT)) <
0) {
@@ -7381,8 +7381,8 @@ test_attribute_iterate_datatype(void)
for (i = 0; i < ATTRIBUTE_ITERATE_TEST_NUM_ATTRS; i++) {
char attr_name[ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE];
- HDsnprintf(attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE,
- ATTRIBUTE_ITERATE_TEST_ATTR_NAME "%d", (int)(ATTRIBUTE_ITERATE_TEST_NUM_ATTRS - i - 1));
+ snprintf(attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE, ATTRIBUTE_ITERATE_TEST_ATTR_NAME "%d",
+ (int)(ATTRIBUTE_ITERATE_TEST_NUM_ATTRS - i - 1));
if ((attr_id = H5Acreate2(type_id, attr_name, attr_dtype, attr_space_id, H5P_DEFAULT, H5P_DEFAULT)) <
0) {
@@ -10990,18 +10990,18 @@ attr_iter_callback1(hid_t location_id, const char *attr_name, const H5A_info_t *
*/
test_iteration = (counter_val / ATTRIBUTE_ITERATE_TEST_NUM_ATTRS);
if (test_iteration == 0 || test_iteration == 3) {
- HDsnprintf(expected_attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE,
- ATTRIBUTE_ITERATE_TEST_ATTR_NAME "%d",
- (int)(counter_val % ATTRIBUTE_ITERATE_TEST_NUM_ATTRS));
+ snprintf(expected_attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE,
+ ATTRIBUTE_ITERATE_TEST_ATTR_NAME "%d",
+ (int)(counter_val % ATTRIBUTE_ITERATE_TEST_NUM_ATTRS));
}
else {
- HDsnprintf(
+ snprintf(
expected_attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE,
ATTRIBUTE_ITERATE_TEST_ATTR_NAME "%d",
(int)(ATTRIBUTE_ITERATE_TEST_NUM_ATTRS - (counter_val % ATTRIBUTE_ITERATE_TEST_NUM_ATTRS) - 1));
}
- if (HDstrncmp(attr_name, expected_attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE)) {
+ if (strncmp(attr_name, expected_attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE)) {
printf(" attribute name '%s' didn't match expected name '%s'\n", attr_name, expected_attr_name);
ret_val = H5_ITER_ERROR;
goto done;
diff --git a/test/API/H5_api_dataset_test.c b/test/API/H5_api_dataset_test.c
index 80d4308..996e2cc 100644
--- a/test/API/H5_api_dataset_test.c
+++ b/test/API/H5_api_dataset_test.c
@@ -1197,7 +1197,7 @@ test_create_dataset_random_shapes(void)
goto error;
}
- HDsprintf(name, "%s%zu", DATASET_SHAPE_TEST_DSET_BASE_NAME, i + 1);
+ sprintf(name, "%s%zu", DATASET_SHAPE_TEST_DSET_BASE_NAME, i + 1);
if ((dset_id = H5Dcreate2(group_id, name, dset_dtype, space_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
@@ -1295,7 +1295,7 @@ test_create_dataset_predefined_types(void)
generate_random_dataspace(DATASET_PREDEFINED_TYPE_TEST_SPACE_RANK, NULL, NULL, false)) < 0)
TEST_ERROR;
- HDsprintf(name, "%s%zu", DATASET_PREDEFINED_TYPE_TEST_BASE_NAME, i);
+ sprintf(name, "%s%zu", DATASET_PREDEFINED_TYPE_TEST_BASE_NAME, i);
if ((dset_id = H5Dcreate2(group_id, name, predefined_type_test_table[i], fspace_id, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
@@ -1598,7 +1598,7 @@ test_create_dataset_compound_types(void)
size_t member_size;
char member_name[256];
- HDsnprintf(member_name, 256, "member%zu", j);
+ snprintf(member_name, 256, "member%zu", j);
if ((type_pool[j] = generate_random_datatype(H5T_NO_CLASS, false)) < 0) {
H5_FAILED();
@@ -1626,7 +1626,7 @@ test_create_dataset_compound_types(void)
if (H5Tpack(compound_type) < 0)
TEST_ERROR;
- HDsnprintf(dset_name, sizeof(dset_name), "%s%zu", DATASET_COMPOUND_TYPE_TEST_DSET_NAME, i);
+ snprintf(dset_name, sizeof(dset_name), "%s%zu", DATASET_COMPOUND_TYPE_TEST_DSET_NAME, i);
if ((dset_id = H5Dcreate2(group_id, dset_name, compound_type, fspace_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
@@ -1747,7 +1747,7 @@ test_create_dataset_enum_types(void)
for (i = 0; i < DATASET_ENUM_TYPE_TEST_NUM_MEMBERS; i++) {
char val_name[15];
- HDsnprintf(val_name, 15, "%s%zu", DATASET_ENUM_TYPE_TEST_VAL_BASE_NAME, i);
+ snprintf(val_name, 15, "%s%zu", DATASET_ENUM_TYPE_TEST_VAL_BASE_NAME, i);
if (H5Tenum_insert(enum_non_native, val_name, &i) < 0)
TEST_ERROR;
@@ -2118,7 +2118,7 @@ test_create_dataset_creation_properties(void)
PART_ERROR(DCPL_alloc_time_test);
}
- HDsprintf(name, "%s%zu", DATASET_CREATION_PROPERTIES_TEST_ALLOC_TIMES_BASE_NAME, i);
+ sprintf(name, "%s%zu", DATASET_CREATION_PROPERTIES_TEST_ALLOC_TIMES_BASE_NAME, i);
if ((dset_id = H5Dcreate2(group_id, name, dset_dtype, fspace_id, H5P_DEFAULT, dcpl_id,
H5P_DEFAULT)) < 0) {
@@ -2194,7 +2194,7 @@ test_create_dataset_creation_properties(void)
PART_ERROR(DCPL_attr_crt_order_test);
}
- HDsprintf(name, "%s%zu", DATASET_CREATION_PROPERTIES_TEST_CRT_ORDER_BASE_NAME, i);
+ sprintf(name, "%s%zu", DATASET_CREATION_PROPERTIES_TEST_CRT_ORDER_BASE_NAME, i);
if ((dset_id = H5Dcreate2(group_id, name, dset_dtype, fspace_id, H5P_DEFAULT, dcpl_id,
H5P_DEFAULT)) < 0) {
@@ -2327,7 +2327,7 @@ test_create_dataset_creation_properties(void)
PART_ERROR(DCPL_fill_time_property_test);
}
- HDsprintf(name, "%s%zu", DATASET_CREATION_PROPERTIES_TEST_FILL_TIMES_BASE_NAME, i);
+ sprintf(name, "%s%zu", DATASET_CREATION_PROPERTIES_TEST_FILL_TIMES_BASE_NAME, i);
if ((dset_id = H5Dcreate2(group_id, name, dset_dtype, fspace_id, H5P_DEFAULT, dcpl_id,
H5P_DEFAULT)) < 0) {
@@ -2513,7 +2513,7 @@ test_create_dataset_creation_properties(void)
}
}
- HDsprintf(name, "%s%zu", DATASET_CREATION_PROPERTIES_TEST_LAYOUTS_BASE_NAME, i);
+ sprintf(name, "%s%zu", DATASET_CREATION_PROPERTIES_TEST_LAYOUTS_BASE_NAME, i);
if ((dset_id =
H5Dcreate2(group_id, name, (H5D_COMPACT == layouts[i]) ? compact_dtype : dset_dtype,
@@ -3765,7 +3765,7 @@ test_dataset_property_lists(void)
PART_ERROR(H5Dget_access_plist);
}
- if (HDstrncmp(tmp_prefix, path_prefix, (size_t)buf_size + 1)) {
+ if (strncmp(tmp_prefix, path_prefix, (size_t)buf_size + 1)) {
H5_FAILED();
printf(" DAPL values were incorrect!\n");
PART_ERROR(H5Dget_access_plist);
@@ -3779,7 +3779,7 @@ test_dataset_property_lists(void)
PART_ERROR(H5Dget_access_plist);
}
- if (!HDstrncmp(tmp_prefix, path_prefix, (size_t)buf_size + 1)) {
+ if (!strncmp(tmp_prefix, path_prefix, (size_t)buf_size + 1)) {
H5_FAILED();
printf(" DAPL property value was set!\n");
PART_ERROR(H5Dget_access_plist);
diff --git a/test/API/H5_api_file_test.c b/test/API/H5_api_file_test.c
index 5f3af25..804b3bd 100644
--- a/test/API/H5_api_file_test.c
+++ b/test/API/H5_api_file_test.c
@@ -948,7 +948,7 @@ test_flush_file(void)
}
for (u = 0; u < 10; u++) {
- HDsprintf(dset_name, "Dataset %u", u);
+ sprintf(dset_name, "Dataset %u", u);
if ((dset_id = H5Dcreate2(file_id, dset_name, H5T_STD_U32LE, dspace_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
@@ -2211,7 +2211,7 @@ test_get_file_name(void)
PART_ERROR(H5Fget_name_file_id);
}
- if (HDstrncmp(file_name_buf, prefixed_filename, (size_t)file_name_buf_len)) {
+ if (strncmp(file_name_buf, prefixed_filename, (size_t)file_name_buf_len)) {
H5_FAILED();
printf(" file name '%s' didn't match expected name '%s'\n", file_name_buf,
prefixed_filename);
@@ -2242,7 +2242,7 @@ test_get_file_name(void)
PART_ERROR(H5Fget_name_grp_id);
}
- if (HDstrncmp(file_name_buf, prefixed_filename, (size_t)file_name_buf_len)) {
+ if (strncmp(file_name_buf, prefixed_filename, (size_t)file_name_buf_len)) {
H5_FAILED();
printf(" file name '%s' didn't match expected name '%s'\n", file_name_buf,
prefixed_filename);
@@ -2287,7 +2287,7 @@ test_get_file_name(void)
PART_ERROR(H5Fget_name_dset_id);
}
- if (HDstrncmp(file_name_buf, prefixed_filename, (size_t)file_name_buf_len)) {
+ if (strncmp(file_name_buf, prefixed_filename, (size_t)file_name_buf_len)) {
H5_FAILED();
printf(" file name '%s' didn't match expected name '%s'\n", file_name_buf,
prefixed_filename);
@@ -2340,7 +2340,7 @@ test_get_file_name(void)
PART_ERROR(H5Fget_name_attr_id);
}
- if (HDstrncmp(file_name_buf, prefixed_filename, (size_t)file_name_buf_len)) {
+ if (strncmp(file_name_buf, prefixed_filename, (size_t)file_name_buf_len)) {
H5_FAILED();
printf(" file name '%s' didn't match expected name '%s'\n", file_name_buf,
prefixed_filename);
@@ -2393,7 +2393,7 @@ test_get_file_name(void)
PART_ERROR(H5Fget_name_dtype_id);
}
- if (HDstrncmp(file_name_buf, prefixed_filename, (size_t)file_name_buf_len)) {
+ if (strncmp(file_name_buf, prefixed_filename, (size_t)file_name_buf_len)) {
H5_FAILED();
printf(" file name '%s' didn't match expected name '%s'\n", file_name_buf,
prefixed_filename);
diff --git a/test/API/H5_api_group_test.c b/test/API/H5_api_group_test.c
index 8de7b27..4132f64 100644
--- a/test/API/H5_api_group_test.c
+++ b/test/API/H5_api_group_test.c
@@ -1437,8 +1437,7 @@ test_get_group_info(void)
/* Create multiple groups under the parent group */
for (i = 0; i < GROUP_GET_INFO_TEST_GROUP_NUMB; i++) {
/* Create the groups with a reverse-ordering naming scheme to test creation order */
- HDsnprintf(group_name, NAME_BUF_SIZE, "group %02u",
- (unsigned)(GROUP_GET_INFO_TEST_GROUP_NUMB - i - 1));
+ snprintf(group_name, NAME_BUF_SIZE, "group %02u", (unsigned)(GROUP_GET_INFO_TEST_GROUP_NUMB - i - 1));
if ((group_id = H5Gcreate2(parent_group_id, group_name, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
diff --git a/test/API/H5_api_link_test.c b/test/API/H5_api_link_test.c
index 9971a0a..b6ae512 100644
--- a/test/API/H5_api_link_test.c
+++ b/test/API/H5_api_link_test.c
@@ -512,7 +512,7 @@ test_create_hard_link_many(void)
goto error;
}
- if (HDstrcmp(objname, "/" LINK_TEST_GROUP_NAME "/" HARD_LINK_TEST_GROUP_MANY_NAME "/hard21")) {
+ if (strcmp(objname, "/" LINK_TEST_GROUP_NAME "/" HARD_LINK_TEST_GROUP_MANY_NAME "/hard21")) {
H5_FAILED();
printf(" wrong name of the object '%s'\n", objname);
goto error;
@@ -900,8 +900,7 @@ test_create_hard_link_invalid_params(void)
{
TESTING_2("H5Lcreate_hard across files");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -1710,7 +1709,7 @@ test_create_soft_link_many(void)
goto error;
}
- if (HDstrcmp(objname, "/" LINK_TEST_GROUP_NAME "/" SOFT_LINK_TEST_GROUP_MANY_NAME "/soft16")) {
+ if (strcmp(objname, "/" LINK_TEST_GROUP_NAME "/" SOFT_LINK_TEST_GROUP_MANY_NAME "/soft16")) {
H5_FAILED();
printf(" wrong name of the object '%s'\n", objname);
goto error;
@@ -2000,7 +1999,7 @@ test_create_external_link(void)
return 0;
}
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -2108,7 +2107,7 @@ test_create_external_link_dangling(void)
return 0;
}
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -2249,8 +2248,7 @@ test_create_external_link_multi(void)
{
TESTING_2("Create the first external file to be pointed to");
- HDsnprintf(ext_link_filename1, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename1, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((file_id = H5Fcreate(ext_link_filename1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -2310,8 +2308,8 @@ test_create_external_link_multi(void)
{
TESTING_2("Create the second external file to be pointed to");
- HDsnprintf(ext_link_filename2, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME2);
+ snprintf(ext_link_filename2, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
+ EXTERNAL_LINK_TEST_FILE_NAME2);
if ((file_id = H5Fcreate(ext_link_filename2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -2367,8 +2365,8 @@ test_create_external_link_multi(void)
{
TESTING_2("Create the third external file to be pointed to");
- HDsnprintf(ext_link_filename3, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME3);
+ snprintf(ext_link_filename3, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
+ EXTERNAL_LINK_TEST_FILE_NAME3);
if ((file_id = H5Fcreate(ext_link_filename3, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -2464,7 +2462,7 @@ test_create_external_link_multi(void)
PART_ERROR(H5Lcreate_external_final_file);
}
- if (HDstrcmp(objname, "/A/B/C")) {
+ if (strcmp(objname, "/A/B/C")) {
H5_FAILED();
printf(" wrong name of the object '%s'\n", objname);
PART_ERROR(H5Lcreate_external_final_file);
@@ -2534,7 +2532,7 @@ test_create_external_link_multi(void)
PART_ERROR(H5Lcreate_external_object_created);
}
- if (HDstrcmp(objname, "/A/B/C/new_group")) {
+ if (strcmp(objname, "/A/B/C/new_group")) {
H5_FAILED();
printf(" wrong name of the object '%s'\n", objname);
PART_ERROR(H5Lcreate_external_object_created);
@@ -2607,8 +2605,8 @@ test_create_external_link_ping_pong(void)
return 0;
}
- HDsnprintf(ext_link_filename1, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_PING_PONG_NAME1);
- HDsnprintf(ext_link_filename2, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_PING_PONG_NAME2);
+ snprintf(ext_link_filename1, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_PING_PONG_NAME1);
+ snprintf(ext_link_filename2, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_PING_PONG_NAME2);
BEGIN_MULTIPART
{
@@ -2737,7 +2735,7 @@ test_create_external_link_ping_pong(void)
PART_ERROR(H5Lcreate_external_verify);
}
- if (HDstrcmp(objname, "/final")) {
+ if (strcmp(objname, "/final")) {
H5_FAILED();
printf(" wrong name of the object '%s'\n", objname);
PART_ERROR(H5Lcreate_external_verify);
@@ -2797,7 +2795,7 @@ test_create_external_link_ping_pong(void)
PART_ERROR(H5Lcreate_external_verify_again);
}
- if (HDstrcmp(objname, "/final/new_group")) {
+ if (strcmp(objname, "/final/new_group")) {
H5_FAILED();
printf(" wrong name of the object '%s'\n", objname);
PART_ERROR(H5Lcreate_external_verify_again);
@@ -2862,8 +2860,8 @@ test_create_external_link_invalid_params(void)
TESTING_2("test setup");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_INVALID_PARAMS_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
+ EXTERNAL_LINK_INVALID_PARAMS_TEST_FILE_NAME);
if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -3168,7 +3166,7 @@ test_create_user_defined_link(void)
goto error;
}
- if ((udata_size = HDsnprintf(udata, UD_LINK_TEST_UDATA_MAX_SIZE, "udata")) < 0)
+ if ((udata_size = snprintf(udata, UD_LINK_TEST_UDATA_MAX_SIZE, "udata")) < 0)
TEST_ERROR;
if (H5Lcreate_ud(group_id, UD_LINK_TEST_LINK_NAME, H5L_TYPE_EXTERNAL, udata, (size_t)udata_size,
@@ -3260,7 +3258,7 @@ test_create_user_defined_link_invalid_params(void)
goto error;
}
- if ((udata_size = HDsnprintf(udata, UD_LINK_INVALID_PARAMS_TEST_UDATA_MAX_SIZE, "udata")) < 0)
+ if ((udata_size = snprintf(udata, UD_LINK_INVALID_PARAMS_TEST_UDATA_MAX_SIZE, "udata")) < 0)
TEST_ERROR;
PASSED();
@@ -3753,8 +3751,7 @@ test_delete_link(void)
{
TESTING_2("H5Ldelete on external link");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -5717,8 +5714,7 @@ test_delete_link(void)
}
/* Create file for external link to reference */
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -5999,8 +5995,7 @@ test_delete_link(void)
}
/* Create file for external link to reference */
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -6275,8 +6270,7 @@ test_delete_link(void)
TESTING_2("H5Ldelete_by_idx on external link by alphabetical order in increasing order");
/* Create file for external link to reference */
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -6551,8 +6545,7 @@ test_delete_link(void)
TESTING_2("H5Ldelete_by_idx on external link by alphabetical order in decreasing order");
/* Create file for external link to reference */
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -8127,7 +8120,7 @@ test_copy_link(void)
PART_ERROR(H5Lcopy_soft_check);
}
- if (HDstrncmp(orig_link_val, new_link_val, COPY_LINK_TEST_LINK_VAL_BUF_SIZE)) {
+ if (strncmp(orig_link_val, new_link_val, COPY_LINK_TEST_LINK_VAL_BUF_SIZE)) {
H5_FAILED();
printf(" copied soft link's value '%s' doesn't match original link's value '%s'\n",
new_link_val, orig_link_val);
@@ -8260,8 +8253,7 @@ test_copy_link(void)
{
TESTING_2("H5Lcopy on external link (copied link's properties not checked)");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -8369,8 +8361,7 @@ test_copy_link(void)
TESTING_2("H5Lcopy on external link (copied link's properties checked)");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -8542,7 +8533,7 @@ test_copy_link(void)
PART_ERROR(H5Lcopy_external_check);
}
- if (HDstrncmp(new_filename, orig_filename, strlen(orig_filename)) < 0) {
+ if (strncmp(new_filename, orig_filename, strlen(orig_filename)) < 0) {
H5_FAILED();
printf(" copied external link's filename '%s' doesn't match original external link's "
"filename '%s'\n",
@@ -8550,7 +8541,7 @@ test_copy_link(void)
PART_ERROR(H5Lcopy_external_check);
}
- if (HDstrncmp(new_objname, orig_objname, strlen(orig_objname)) < 0) {
+ if (strncmp(new_objname, orig_objname, strlen(orig_objname)) < 0) {
H5_FAILED();
printf(" copied external link's object name '%s' doesn't match original external link's "
"object name '%s'\n",
@@ -8573,8 +8564,7 @@ test_copy_link(void)
{
TESTING_2("H5Lcopy on external link using H5L_SAME_LOC");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -9091,8 +9081,7 @@ test_copy_link_invalid_params(void)
{
TESTING_2("H5Lcopy invalid across files");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -9186,7 +9175,7 @@ test_move_link(void)
TESTING_2("test setup");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -9857,7 +9846,7 @@ test_move_link(void)
PART_ERROR(H5Lmove_soft_check);
}
- if (HDstrncmp(orig_link_val, new_link_val, MOVE_LINK_TEST_LINK_VAL_BUF_SIZE)) {
+ if (strncmp(orig_link_val, new_link_val, MOVE_LINK_TEST_LINK_VAL_BUF_SIZE)) {
H5_FAILED();
printf(" moved soft link's value '%s' doesn't match original link's value '%s'\n",
new_link_val, orig_link_val);
@@ -10067,8 +10056,7 @@ test_move_link(void)
{
TESTING_2("H5Lmove on external link (moved link's properties not checked)");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -10176,8 +10164,7 @@ test_move_link(void)
TESTING_2("H5Lmove on external link (moved link's properties checked)");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -10349,7 +10336,7 @@ test_move_link(void)
PART_ERROR(H5Lmove_external_check);
}
- if (HDstrncmp(new_filename, orig_filename, strlen(orig_filename)) < 0) {
+ if (strncmp(new_filename, orig_filename, strlen(orig_filename)) < 0) {
H5_FAILED();
printf(" moved external link's filename '%s' doesn't match original external link's "
"filename '%s'\n",
@@ -10357,7 +10344,7 @@ test_move_link(void)
PART_ERROR(H5Lmove_external_check);
}
- if (HDstrncmp(new_objname, orig_objname, strlen(orig_objname)) < 0) {
+ if (strncmp(new_objname, orig_objname, strlen(orig_objname)) < 0) {
H5_FAILED();
printf(" moved external link's object name '%s' doesn't match original external link's "
"object name '%s'\n",
@@ -10380,8 +10367,7 @@ test_move_link(void)
{
TESTING_2("H5Lmove on external link using H5L_SAME_LOC");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -10519,8 +10505,7 @@ test_move_link(void)
{
TESTING_2("H5Lmove to rename external link without moving it");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -11404,8 +11389,7 @@ test_move_link_invalid_params(void)
{
TESTING_2("H5Lmove into another file");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -11613,7 +11597,7 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_soft);
}
- if (HDstrncmp(link_val_buf, link_target, link_val_size)) {
+ if (strncmp(link_val_buf, link_target, link_val_size)) {
H5_FAILED();
printf(" soft link value did not match\n");
PART_ERROR(H5Lget_val_soft);
@@ -11644,8 +11628,7 @@ test_get_link_val(void)
memset(&link_info, 0, sizeof(link_info));
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -11714,14 +11697,14 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_external);
}
- if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
+ if (strncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
ext_link_filename);
PART_ERROR(H5Lget_val_external);
}
- if (HDstrncmp(ext_link_val, ext_obj_name, strlen(ext_obj_name) + 1)) {
+ if (strncmp(ext_link_val, ext_obj_name, strlen(ext_obj_name) + 1)) {
H5_FAILED();
printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
ext_obj_name);
@@ -11873,7 +11856,7 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_increasing);
}
- if (HDstrncmp(link_val_buf, link_target_a, strlen(link_target_a) + 1)) {
+ if (strncmp(link_val_buf, link_target_a, strlen(link_target_a) + 1)) {
H5_FAILED();
printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
link_val_buf, 0, link_target_a);
@@ -11904,7 +11887,7 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_increasing);
}
- if (HDstrncmp(link_val_buf, link_target_b, strlen(link_target_b) + 1)) {
+ if (strncmp(link_val_buf, link_target_b, strlen(link_target_b) + 1)) {
H5_FAILED();
printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
link_val_buf, 1, link_target_b);
@@ -11935,7 +11918,7 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_increasing);
}
- if (HDstrncmp(link_val_buf, link_target_c, strlen(link_target_c) + 1)) {
+ if (strncmp(link_val_buf, link_target_c, strlen(link_target_c) + 1)) {
H5_FAILED();
printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
link_val_buf, 2, link_target_c);
@@ -12067,7 +12050,7 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_decreasing);
}
- if (HDstrncmp(link_val_buf, link_target_a, strlen(link_target_a) + 1)) {
+ if (strncmp(link_val_buf, link_target_a, strlen(link_target_a) + 1)) {
H5_FAILED();
printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
link_val_buf, 2, link_target_a);
@@ -12098,7 +12081,7 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_decreasing);
}
- if (HDstrncmp(link_val_buf, link_target_b, strlen(link_target_b) + 1)) {
+ if (strncmp(link_val_buf, link_target_b, strlen(link_target_b) + 1)) {
H5_FAILED();
printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
link_val_buf, 1, link_target_b);
@@ -12129,7 +12112,7 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_soft_crt_order_decreasing);
}
- if (HDstrncmp(link_val_buf, link_target_c, strlen(link_target_c) + 1)) {
+ if (strncmp(link_val_buf, link_target_c, strlen(link_target_c) + 1)) {
H5_FAILED();
printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
link_val_buf, 0, link_target_c);
@@ -12255,7 +12238,7 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_soft_name_order_increasing);
}
- if (HDstrncmp(link_val_buf, link_target_a, strlen(link_target_a) + 1)) {
+ if (strncmp(link_val_buf, link_target_a, strlen(link_target_a) + 1)) {
H5_FAILED();
printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
link_val_buf, 0, link_target_a);
@@ -12286,7 +12269,7 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_soft_name_order_increasing);
}
- if (HDstrncmp(link_val_buf, link_target_b, strlen(link_target_b) + 1)) {
+ if (strncmp(link_val_buf, link_target_b, strlen(link_target_b) + 1)) {
H5_FAILED();
printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
link_val_buf, 1, link_target_b);
@@ -12317,7 +12300,7 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_soft_name_order_increasing);
}
- if (HDstrncmp(link_val_buf, link_target_c, strlen(link_target_c) + 1)) {
+ if (strncmp(link_val_buf, link_target_c, strlen(link_target_c) + 1)) {
H5_FAILED();
printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
link_val_buf, 2, link_target_c);
@@ -12443,7 +12426,7 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
- if (HDstrncmp(link_val_buf, link_target_a, strlen(link_target_a) + 1)) {
+ if (strncmp(link_val_buf, link_target_a, strlen(link_target_a) + 1)) {
H5_FAILED();
printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
link_val_buf, 2, link_target_a);
@@ -12474,7 +12457,7 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
- if (HDstrncmp(link_val_buf, link_target_b, strlen(link_target_b) + 1)) {
+ if (strncmp(link_val_buf, link_target_b, strlen(link_target_b) + 1)) {
H5_FAILED();
printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
link_val_buf, 1, link_target_b);
@@ -12505,7 +12488,7 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
- if (HDstrncmp(link_val_buf, link_target_c, strlen(link_target_c) + 1)) {
+ if (strncmp(link_val_buf, link_target_c, strlen(link_target_c) + 1)) {
H5_FAILED();
printf(" link value '%s' for link at index %d did not match expected value '%s'\n",
link_val_buf, 0, link_target_c);
@@ -12543,8 +12526,7 @@ test_get_link_val(void)
PART_EMPTY(H5Lget_val_by_idx_external_crt_order_increasing);
}
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -12656,14 +12638,14 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
- if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
+ if (strncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
- if (HDstrncmp(ext_link_val, ext_obj_name_a, strlen(ext_obj_name_a) + 1)) {
+ if (strncmp(ext_link_val, ext_obj_name_a, strlen(ext_obj_name_a) + 1)) {
H5_FAILED();
printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
ext_obj_name_a);
@@ -12701,14 +12683,14 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
- if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
+ if (strncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
- if (HDstrncmp(ext_link_val, ext_obj_name_b, strlen(ext_obj_name_b) + 1)) {
+ if (strncmp(ext_link_val, ext_obj_name_b, strlen(ext_obj_name_b) + 1)) {
H5_FAILED();
printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
ext_obj_name_b);
@@ -12746,14 +12728,14 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
- if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
+ if (strncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
- if (HDstrncmp(ext_link_val, ext_obj_name_c, strlen(ext_obj_name_c) + 1)) {
+ if (strncmp(ext_link_val, ext_obj_name_c, strlen(ext_obj_name_c) + 1)) {
H5_FAILED();
printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
ext_obj_name_c);
@@ -12793,8 +12775,7 @@ test_get_link_val(void)
PART_EMPTY(H5Lget_val_by_idx_external_crt_order_decreasing);
}
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -12906,14 +12887,14 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
- if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
+ if (strncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
- if (HDstrncmp(ext_link_val, ext_obj_name_a, strlen(ext_obj_name_a) + 1)) {
+ if (strncmp(ext_link_val, ext_obj_name_a, strlen(ext_obj_name_a) + 1)) {
H5_FAILED();
printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
ext_obj_name_a);
@@ -12951,14 +12932,14 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
- if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
+ if (strncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
- if (HDstrncmp(ext_link_val, ext_obj_name_b, strlen(ext_obj_name_b) + 1)) {
+ if (strncmp(ext_link_val, ext_obj_name_b, strlen(ext_obj_name_b) + 1)) {
H5_FAILED();
printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
ext_obj_name_b);
@@ -12996,14 +12977,14 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
- if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
+ if (strncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
- if (HDstrncmp(ext_link_val, ext_obj_name_c, strlen(ext_obj_name_c) + 1)) {
+ if (strncmp(ext_link_val, ext_obj_name_c, strlen(ext_obj_name_c) + 1)) {
H5_FAILED();
printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
ext_obj_name_c);
@@ -13037,8 +13018,7 @@ test_get_link_val(void)
TESTING_2("H5Lget_val_by_idx on external link by alphabetical order in increasing order");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -13150,14 +13130,14 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
- if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
+ if (strncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
- if (HDstrncmp(ext_link_val, ext_obj_name_a, strlen(ext_obj_name_a) + 1)) {
+ if (strncmp(ext_link_val, ext_obj_name_a, strlen(ext_obj_name_a) + 1)) {
H5_FAILED();
printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
ext_obj_name_a);
@@ -13195,14 +13175,14 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
- if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
+ if (strncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
- if (HDstrncmp(ext_link_val, ext_obj_name_b, strlen(ext_obj_name_b) + 1)) {
+ if (strncmp(ext_link_val, ext_obj_name_b, strlen(ext_obj_name_b) + 1)) {
H5_FAILED();
printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
ext_obj_name_b);
@@ -13240,14 +13220,14 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
- if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
+ if (strncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
- if (HDstrncmp(ext_link_val, ext_obj_name_c, strlen(ext_obj_name_c) + 1)) {
+ if (strncmp(ext_link_val, ext_obj_name_c, strlen(ext_obj_name_c) + 1)) {
H5_FAILED();
printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
ext_obj_name_c);
@@ -13281,8 +13261,7 @@ test_get_link_val(void)
TESTING_2("H5Lget_val_by_idx on external link by alphabetical order in decreasing order");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -13394,14 +13373,14 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
- if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
+ if (strncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
- if (HDstrncmp(ext_link_val, ext_obj_name_a, strlen(ext_obj_name_a) + 1)) {
+ if (strncmp(ext_link_val, ext_obj_name_a, strlen(ext_obj_name_a) + 1)) {
H5_FAILED();
printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
ext_obj_name_a);
@@ -13439,14 +13418,14 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
- if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
+ if (strncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
- if (HDstrncmp(ext_link_val, ext_obj_name_b, strlen(ext_obj_name_b) + 1)) {
+ if (strncmp(ext_link_val, ext_obj_name_b, strlen(ext_obj_name_b) + 1)) {
H5_FAILED();
printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
ext_obj_name_b);
@@ -13484,14 +13463,14 @@ test_get_link_val(void)
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
- if (HDstrncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
+ if (strncmp(ext_link_filepath, ext_link_filename, strlen(ext_link_filename) + 1)) {
H5_FAILED();
printf(" external link target file '%s' did not match expected '%s'\n", ext_link_filepath,
ext_link_filename);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
- if (HDstrncmp(ext_link_val, ext_obj_name_c, strlen(ext_obj_name_c) + 1)) {
+ if (strncmp(ext_link_val, ext_obj_name_c, strlen(ext_obj_name_c) + 1)) {
H5_FAILED();
printf(" external link value '%s' did not match expected '%s'\n", ext_link_val,
ext_obj_name_c);
@@ -14189,8 +14168,7 @@ test_get_link_info(void)
memset(&link_info, 0, sizeof(link_info));
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -15755,8 +15733,7 @@ test_get_link_info(void)
PART_EMPTY(H5Lget_info_by_idx_external_crt_order_increasing);
}
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -15959,8 +15936,7 @@ test_get_link_info(void)
PART_EMPTY(H5Lget_info_by_idx_external_crt_order_decreasing);
}
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -16157,8 +16133,7 @@ test_get_link_info(void)
{
TESTING_2("H5Lget_info_by_idx2 on external link by alphabetical order in increasing order");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -16361,8 +16336,7 @@ test_get_link_info(void)
{
TESTING_2("H5Lget_info_by_idx2 on external link by alphabetical order in decreasing order");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -17156,8 +17130,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME3,
- strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME3) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME3,
+ strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME3) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_HARD_LINK_NAME3);
@@ -17178,8 +17152,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME2,
- strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME2) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME2,
+ strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME2) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_HARD_LINK_NAME2);
@@ -17200,8 +17174,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME,
- strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME,
+ strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_HARD_LINK_NAME);
@@ -17324,8 +17298,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME,
- strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME,
+ strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_HARD_LINK_NAME);
@@ -17346,8 +17320,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME2,
- strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME2) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME2,
+ strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME2) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_HARD_LINK_NAME2);
@@ -17368,8 +17342,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_hard_crt_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME3,
- strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME3) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME3,
+ strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME3) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_HARD_LINK_NAME3);
@@ -17486,8 +17460,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_hard_name_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME,
- strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME,
+ strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_HARD_LINK_NAME);
@@ -17508,8 +17482,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_hard_name_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME2,
- strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME2) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME2,
+ strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME2) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_HARD_LINK_NAME2);
@@ -17530,8 +17504,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_hard_name_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME3,
- strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME3) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME3,
+ strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME3) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_HARD_LINK_NAME3);
@@ -17648,8 +17622,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_hard_name_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME3,
- strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME3) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME3,
+ strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME3) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_HARD_LINK_NAME3);
@@ -17670,8 +17644,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_hard_name_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME2,
- strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME2) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME2,
+ strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME2) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_HARD_LINK_NAME2);
@@ -17692,8 +17666,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_hard_name_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME,
- strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_HARD_LINK_NAME,
+ strlen(GET_LINK_NAME_TEST_HARD_LINK_NAME) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_HARD_LINK_NAME);
@@ -17816,8 +17790,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME3,
- strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME3) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME3,
+ strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME3) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
@@ -17838,8 +17812,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME2,
- strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME2) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME2,
+ strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME2) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
@@ -17860,8 +17834,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME,
- strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME,
+ strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_SOFT_LINK_NAME);
@@ -17984,8 +17958,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME,
- strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME,
+ strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_SOFT_LINK_NAME);
@@ -18006,8 +17980,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME2,
- strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME2) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME2,
+ strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME2) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
@@ -18028,8 +18002,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_soft_crt_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME3,
- strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME3) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME3,
+ strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME3) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
@@ -18146,8 +18120,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_soft_name_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME,
- strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME,
+ strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_SOFT_LINK_NAME);
@@ -18168,8 +18142,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_soft_name_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME2,
- strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME2) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME2,
+ strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME2) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
@@ -18190,8 +18164,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_soft_name_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME3,
- strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME3) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME3,
+ strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME3) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
@@ -18308,8 +18282,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_soft_name_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME3,
- strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME3) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME3,
+ strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME3) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_SOFT_LINK_NAME3);
@@ -18330,8 +18304,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_soft_name_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME2,
- strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME2) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME2,
+ strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME2) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_SOFT_LINK_NAME2);
@@ -18352,8 +18326,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_soft_name_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME,
- strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_SOFT_LINK_NAME,
+ strlen(GET_LINK_NAME_TEST_SOFT_LINK_NAME) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_SOFT_LINK_NAME);
@@ -18388,8 +18362,7 @@ test_get_link_name(void)
}
/* Create file for external link to reference */
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -18495,8 +18468,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_external_crt_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3,
- strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3,
+ strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
@@ -18517,8 +18490,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_external_crt_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2,
- strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2,
+ strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
@@ -18539,8 +18512,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_external_crt_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME,
- strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME,
+ strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
@@ -18577,8 +18550,7 @@ test_get_link_name(void)
}
/* Create file for external link to reference */
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -18684,8 +18656,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_external_crt_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME,
- strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME,
+ strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
@@ -18706,8 +18678,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_external_crt_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2,
- strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2,
+ strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
@@ -18728,8 +18700,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_external_crt_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3,
- strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3,
+ strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
@@ -18760,8 +18732,7 @@ test_get_link_name(void)
TESTING_2("H5Lget_name_by_idx on external link by alphabetical order in increasing order");
/* Create file for external link to reference */
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -18867,8 +18838,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_external_name_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME,
- strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME,
+ strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
@@ -18889,8 +18860,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_external_name_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2,
- strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2,
+ strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
@@ -18911,8 +18882,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_external_name_order_increasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3,
- strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3,
+ strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
@@ -18943,8 +18914,7 @@ test_get_link_name(void)
TESTING_2("H5Lget_name_by_idx on external link by alphabetical order in decreasing order");
/* Create file for external link to reference */
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
- EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -19050,8 +19020,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_external_name_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3,
- strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3,
+ strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME3);
@@ -19072,8 +19042,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_external_name_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2,
- strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2,
+ strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME2);
@@ -19094,8 +19064,8 @@ test_get_link_name(void)
PART_ERROR(H5Lget_name_by_idx_external_name_order_decreasing);
}
- if (HDstrncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME,
- strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME) + 1)) {
+ if (strncmp(link_name_buf, GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME,
+ strlen(GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME) + 1)) {
H5_FAILED();
printf(" link name '%s' did not match expected name '%s'\n", link_name_buf,
GET_LINK_NAME_TEST_EXTERNAL_LINK_NAME);
@@ -19565,8 +19535,8 @@ test_link_iterate_hard_links(void)
char dset_name[LINK_ITER_HARD_LINKS_TEST_BUF_SIZE];
/* Create the datasets with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(dset_name, LINK_ITER_HARD_LINKS_TEST_BUF_SIZE, LINK_ITER_HARD_LINKS_TEST_LINK_NAME "%d",
- (int)(LINK_ITER_HARD_LINKS_TEST_NUM_LINKS - i - 1));
+ snprintf(dset_name, LINK_ITER_HARD_LINKS_TEST_BUF_SIZE, LINK_ITER_HARD_LINKS_TEST_LINK_NAME "%d",
+ (int)(LINK_ITER_HARD_LINKS_TEST_NUM_LINKS - i - 1));
if ((dset_id = H5Dcreate2(group_id, dset_name, dset_dtype, dset_dspace, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
@@ -19929,11 +19899,11 @@ test_link_iterate_soft_links(void)
char link_target[LINK_ITER_SOFT_LINKS_TEST_BUF_SIZE];
/* Create the links with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(link_name, LINK_ITER_SOFT_LINKS_TEST_BUF_SIZE, LINK_ITER_SOFT_LINKS_TEST_LINK_NAME "%d",
- (int)(LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS - i - 1));
+ snprintf(link_name, LINK_ITER_SOFT_LINKS_TEST_BUF_SIZE, LINK_ITER_SOFT_LINKS_TEST_LINK_NAME "%d",
+ (int)(LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS - i - 1));
- HDsnprintf(link_target, LINK_ITER_SOFT_LINKS_TEST_BUF_SIZE, "target%d",
- (int)(LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS - i - 1));
+ snprintf(link_target, LINK_ITER_SOFT_LINKS_TEST_BUF_SIZE, "target%d",
+ (int)(LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS - i - 1));
if (H5Lcreate_soft(link_target, group_id, link_name, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
@@ -20245,7 +20215,7 @@ test_link_iterate_external_links(void)
TESTING_2("test setup");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -20293,8 +20263,8 @@ test_link_iterate_external_links(void)
char link_name[LINK_ITER_EXT_LINKS_TEST_BUF_SIZE];
/* Create the links with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(link_name, LINK_ITER_EXT_LINKS_TEST_BUF_SIZE, LINK_ITER_EXT_LINKS_TEST_LINK_NAME "%d",
- (int)(LINK_ITER_EXT_LINKS_TEST_NUM_LINKS - i - 1));
+ snprintf(link_name, LINK_ITER_EXT_LINKS_TEST_BUF_SIZE, LINK_ITER_EXT_LINKS_TEST_LINK_NAME "%d",
+ (int)(LINK_ITER_EXT_LINKS_TEST_NUM_LINKS - i - 1));
if (H5Lcreate_external(ext_link_filename, "/", group_id, link_name, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
@@ -20642,7 +20612,7 @@ test_link_iterate_mixed_links(void)
TESTING_2("test setup");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -21128,7 +21098,7 @@ test_link_iterate_invalid_params(void)
TESTING_2("test setup");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -21822,9 +21792,9 @@ test_link_visit_hard_links_no_cycles(void)
char grp_name[LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE];
/* Create the groups with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(grp_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d",
- (int)(LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - i - 1));
+ snprintf(grp_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d",
+ (int)(LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - i - 1));
if ((subgroup_id = H5Gcreate2(group_id, grp_name, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -21836,9 +21806,9 @@ test_link_visit_hard_links_no_cycles(void)
char dset_name[LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE];
/* Create the datasets with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(dset_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
- (int)(LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
+ snprintf(dset_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
+ (int)(LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
if ((dset_id = H5Dcreate2(subgroup_id, dset_name, dset_dtype, dset_dspace, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0) {
@@ -22213,9 +22183,9 @@ test_link_visit_soft_links_no_cycles(void)
char grp_name[LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE];
/* Create the groups with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(grp_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d",
- (int)(LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - i - 1));
+ snprintf(grp_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d",
+ (int)(LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - i - 1));
if ((subgroup_id = H5Gcreate2(group_id, grp_name, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -22228,12 +22198,12 @@ test_link_visit_soft_links_no_cycles(void)
char link_target[LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE];
/* Create the links with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(link_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
- (int)(LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
+ snprintf(link_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
+ (int)(LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
- HDsnprintf(link_target, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE, "target%d",
- (int)(LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
+ snprintf(link_target, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE, "target%d",
+ (int)(LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
if (H5Lcreate_soft(link_target, subgroup_id, link_name, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
@@ -22555,7 +22525,7 @@ test_link_visit_external_links_no_cycles(void)
TESTING_2("test setup");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -22605,9 +22575,9 @@ test_link_visit_external_links_no_cycles(void)
char grp_name[LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE];
/* Create the groups with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(grp_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d",
- (int)(LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - i - 1));
+ snprintf(grp_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d",
+ (int)(LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - i - 1));
if ((subgroup_id = H5Gcreate2(group_id, grp_name, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -22619,9 +22589,9 @@ test_link_visit_external_links_no_cycles(void)
char link_name[LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE];
/* Create the links with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(link_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
- (int)(LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
+ snprintf(link_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
+ (int)(LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
if (H5Lcreate_external(ext_link_filename, "/", subgroup_id, link_name, H5P_DEFAULT, H5P_DEFAULT) <
0) {
@@ -22983,7 +22953,7 @@ test_link_visit_mixed_links_no_cycles(void)
TESTING_2("test setup");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -23499,9 +23469,9 @@ test_link_visit_hard_links_cycles(void)
char grp_name[LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE];
/* Create the groups with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(grp_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_HARD_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d",
- (int)(LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_SUBGROUPS - i - 1));
+ snprintf(grp_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_HARD_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d",
+ (int)(LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_SUBGROUPS - i - 1));
if ((subgroup_id = H5Gcreate2(group_id, grp_name, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -23513,9 +23483,9 @@ test_link_visit_hard_links_cycles(void)
char link_name[LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE];
/* Create the links with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(link_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_HARD_LINKS_CYCLE_TEST_LINK_NAME "%d",
- (int)(LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
+ snprintf(link_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_HARD_LINKS_CYCLE_TEST_LINK_NAME "%d",
+ (int)(LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
if (H5Lcreate_hard(subgroup_id, ".", subgroup_id, link_name, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
@@ -23872,9 +23842,9 @@ test_link_visit_soft_links_cycles(void)
char grp_name[LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE];
/* Create the groups with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(grp_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d",
- (int)(LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_SUBGROUPS - i - 1));
+ snprintf(grp_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d",
+ (int)(LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_SUBGROUPS - i - 1));
if ((subgroup_id = H5Gcreate2(group_id, grp_name, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -23887,13 +23857,13 @@ test_link_visit_soft_links_cycles(void)
char link_target[2 * LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE];
/* Create the links with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(link_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_SOFT_LINKS_CYCLE_TEST_LINK_NAME "%d",
- (int)(LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
+ snprintf(link_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_SOFT_LINKS_CYCLE_TEST_LINK_NAME "%d",
+ (int)(LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
- HDsnprintf(link_target, 2 * LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
- "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_SOFT_LINKS_CYCLE_TEST_SUBGROUP_NAME "/%s",
- grp_name);
+ snprintf(link_target, 2 * LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
+ "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_SOFT_LINKS_CYCLE_TEST_SUBGROUP_NAME "/%s",
+ grp_name);
if (H5Lcreate_soft(link_target, subgroup_id, link_name, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
@@ -24252,9 +24222,9 @@ test_link_visit_external_links_cycles(void)
char grp_name[LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE];
/* Create the groups with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(grp_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_EXT_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d",
- (int)(LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_SUBGROUPS - i - 1));
+ snprintf(grp_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_EXT_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d",
+ (int)(LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_SUBGROUPS - i - 1));
if ((subgroup_id = H5Gcreate2(group_id, grp_name, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -24267,13 +24237,13 @@ test_link_visit_external_links_cycles(void)
char link_target_obj[2 * LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE];
/* Create the links with a reverse-ordering naming scheme to test creation order later */
- HDsnprintf(link_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_EXT_LINKS_CYCLE_TEST_LINK_NAME "%d",
- (int)(LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
+ snprintf(link_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_EXT_LINKS_CYCLE_TEST_LINK_NAME "%d",
+ (int)(LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_LINKS_PER_GROUP - j - 1));
- HDsnprintf(link_target_obj, 2 * LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
- "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_EXT_LINKS_CYCLE_TEST_SUBGROUP_NAME "/%s",
- grp_name);
+ snprintf(link_target_obj, 2 * LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
+ "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_EXT_LINKS_CYCLE_TEST_SUBGROUP_NAME "/%s",
+ grp_name);
if (H5Lcreate_external(H5_api_test_filename, link_target_obj, subgroup_id, link_name, H5P_DEFAULT,
H5P_DEFAULT) < 0) {
@@ -24623,7 +24593,7 @@ test_link_visit_mixed_links_cycles(void)
TESTING_2("test setup");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -25060,7 +25030,7 @@ test_link_visit_invalid_params(void)
TESTING_2("test setup");
- HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
+ snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -25761,18 +25731,18 @@ link_iter_hard_links_cb(hid_t group_id, const char *name, const H5L_info2_t *inf
*/
test_iteration = (counter_val / LINK_ITER_HARD_LINKS_TEST_NUM_LINKS);
if (test_iteration == 0 || test_iteration == 3) {
- HDsnprintf(expected_link_name, LINK_ITER_HARD_LINKS_TEST_BUF_SIZE,
- LINK_ITER_HARD_LINKS_TEST_LINK_NAME "%d",
- (int)(counter_val % LINK_ITER_HARD_LINKS_TEST_NUM_LINKS));
+ snprintf(expected_link_name, LINK_ITER_HARD_LINKS_TEST_BUF_SIZE,
+ LINK_ITER_HARD_LINKS_TEST_LINK_NAME "%d",
+ (int)(counter_val % LINK_ITER_HARD_LINKS_TEST_NUM_LINKS));
}
else {
- HDsnprintf(expected_link_name, LINK_ITER_HARD_LINKS_TEST_BUF_SIZE,
- LINK_ITER_HARD_LINKS_TEST_LINK_NAME "%d",
- (int)(LINK_ITER_HARD_LINKS_TEST_NUM_LINKS -
- (counter_val % LINK_ITER_HARD_LINKS_TEST_NUM_LINKS) - 1));
+ snprintf(expected_link_name, LINK_ITER_HARD_LINKS_TEST_BUF_SIZE,
+ LINK_ITER_HARD_LINKS_TEST_LINK_NAME "%d",
+ (int)(LINK_ITER_HARD_LINKS_TEST_NUM_LINKS -
+ (counter_val % LINK_ITER_HARD_LINKS_TEST_NUM_LINKS) - 1));
}
- if (HDstrncmp(name, expected_link_name, LINK_ITER_HARD_LINKS_TEST_BUF_SIZE)) {
+ if (strncmp(name, expected_link_name, LINK_ITER_HARD_LINKS_TEST_BUF_SIZE)) {
printf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
ret_val = H5_ITER_ERROR;
goto done;
@@ -25821,18 +25791,18 @@ link_iter_soft_links_cb(hid_t group_id, const char *name, const H5L_info2_t *inf
*/
test_iteration = (counter_val / LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS);
if (test_iteration == 0 || test_iteration == 3) {
- HDsnprintf(expected_link_name, LINK_ITER_SOFT_LINKS_TEST_BUF_SIZE,
- LINK_ITER_SOFT_LINKS_TEST_LINK_NAME "%d",
- (int)(counter_val % LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS));
+ snprintf(expected_link_name, LINK_ITER_SOFT_LINKS_TEST_BUF_SIZE,
+ LINK_ITER_SOFT_LINKS_TEST_LINK_NAME "%d",
+ (int)(counter_val % LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS));
}
else {
- HDsnprintf(expected_link_name, LINK_ITER_SOFT_LINKS_TEST_BUF_SIZE,
- LINK_ITER_SOFT_LINKS_TEST_LINK_NAME "%d",
- (int)(LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS -
- (counter_val % LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS) - 1));
+ snprintf(expected_link_name, LINK_ITER_SOFT_LINKS_TEST_BUF_SIZE,
+ LINK_ITER_SOFT_LINKS_TEST_LINK_NAME "%d",
+ (int)(LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS -
+ (counter_val % LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS) - 1));
}
- if (HDstrncmp(name, expected_link_name, LINK_ITER_SOFT_LINKS_TEST_BUF_SIZE)) {
+ if (strncmp(name, expected_link_name, LINK_ITER_SOFT_LINKS_TEST_BUF_SIZE)) {
printf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
ret_val = H5_ITER_ERROR;
goto done;
@@ -25888,18 +25858,18 @@ link_iter_external_links_cb(hid_t group_id, const char *name, const H5L_info2_t
*/
test_iteration = (counter_val / LINK_ITER_EXT_LINKS_TEST_NUM_LINKS);
if (test_iteration == 0 || test_iteration == 3) {
- HDsnprintf(expected_link_name, LINK_ITER_EXT_LINKS_TEST_BUF_SIZE,
- LINK_ITER_EXT_LINKS_TEST_LINK_NAME "%d",
- (int)(counter_val % LINK_ITER_EXT_LINKS_TEST_NUM_LINKS));
+ snprintf(expected_link_name, LINK_ITER_EXT_LINKS_TEST_BUF_SIZE,
+ LINK_ITER_EXT_LINKS_TEST_LINK_NAME "%d",
+ (int)(counter_val % LINK_ITER_EXT_LINKS_TEST_NUM_LINKS));
}
else {
- HDsnprintf(expected_link_name, LINK_ITER_EXT_LINKS_TEST_BUF_SIZE,
- LINK_ITER_EXT_LINKS_TEST_LINK_NAME "%d",
- (int)(LINK_ITER_EXT_LINKS_TEST_NUM_LINKS -
- (counter_val % LINK_ITER_EXT_LINKS_TEST_NUM_LINKS) - 1));
+ snprintf(expected_link_name, LINK_ITER_EXT_LINKS_TEST_BUF_SIZE,
+ LINK_ITER_EXT_LINKS_TEST_LINK_NAME "%d",
+ (int)(LINK_ITER_EXT_LINKS_TEST_NUM_LINKS -
+ (counter_val % LINK_ITER_EXT_LINKS_TEST_NUM_LINKS) - 1));
}
- if (HDstrncmp(name, expected_link_name, LINK_ITER_EXT_LINKS_TEST_BUF_SIZE)) {
+ if (strncmp(name, expected_link_name, LINK_ITER_EXT_LINKS_TEST_BUF_SIZE)) {
printf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
ret_val = H5_ITER_ERROR;
goto done;
@@ -25932,8 +25902,8 @@ link_iter_mixed_links_cb(hid_t group_id, const char *name, const H5L_info2_t *in
UNUSED(group_id);
- if (!HDstrncmp(name, LINK_ITER_MIXED_LINKS_TEST_HARD_LINK_NAME,
- strlen(LINK_ITER_MIXED_LINKS_TEST_HARD_LINK_NAME) + 1) &&
+ if (!strncmp(name, LINK_ITER_MIXED_LINKS_TEST_HARD_LINK_NAME,
+ strlen(LINK_ITER_MIXED_LINKS_TEST_HARD_LINK_NAME) + 1) &&
(counter_val == 1 || counter_val == 4 || counter_val == 6 || counter_val == 11)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
@@ -25942,8 +25912,8 @@ link_iter_mixed_links_cb(hid_t group_id, const char *name, const H5L_info2_t *in
goto done;
}
- else if (!HDstrncmp(name, LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME,
- strlen(LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME) + 1) &&
+ else if (!strncmp(name, LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME,
+ strlen(LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME) + 1) &&
(counter_val == 2 || counter_val == 3 || counter_val == 7 || counter_val == 10)) {
if (H5L_TYPE_SOFT != info->type) {
ret_val = -1;
@@ -25952,8 +25922,8 @@ link_iter_mixed_links_cb(hid_t group_id, const char *name, const H5L_info2_t *in
goto done;
}
- else if (!HDstrncmp(name, LINK_ITER_MIXED_LINKS_TEST_EXT_LINK_NAME,
- strlen(LINK_ITER_MIXED_LINKS_TEST_EXT_LINK_NAME) + 1) &&
+ else if (!strncmp(name, LINK_ITER_MIXED_LINKS_TEST_EXT_LINK_NAME,
+ strlen(LINK_ITER_MIXED_LINKS_TEST_EXT_LINK_NAME) + 1) &&
(counter_val == 0 || counter_val == 5 || counter_val == 8 || counter_val == 9)) {
if (H5L_TYPE_EXTERNAL != info->type) {
ret_val = -1;
@@ -26022,29 +25992,29 @@ link_iter_idx_saving_cb(hid_t group_id, const char *name, const H5L_info2_t *inf
UNUSED(group_id);
if (broken && !*broken &&
- !HDstrncmp(name, LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME,
- strlen(LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME) + 1)) {
+ !strncmp(name, LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME,
+ strlen(LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME) + 1)) {
return (*broken = 1);
}
- if (!HDstrncmp(name, LINK_ITER_MIXED_LINKS_TEST_HARD_LINK_NAME,
- strlen(LINK_ITER_MIXED_LINKS_TEST_HARD_LINK_NAME) + 1)) {
+ if (!strncmp(name, LINK_ITER_MIXED_LINKS_TEST_HARD_LINK_NAME,
+ strlen(LINK_ITER_MIXED_LINKS_TEST_HARD_LINK_NAME) + 1)) {
if (H5L_TYPE_HARD != info->type) {
H5_FAILED();
printf(" link type did not match\n");
goto error;
}
}
- else if (!HDstrncmp(name, LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME,
- strlen(LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME) + 1)) {
+ else if (!strncmp(name, LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME,
+ strlen(LINK_ITER_MIXED_LINKS_TEST_SOFT_LINK_NAME) + 1)) {
if (H5L_TYPE_SOFT != info->type) {
H5_FAILED();
printf(" link type did not match\n");
goto error;
}
}
- else if (!HDstrncmp(name, LINK_ITER_MIXED_LINKS_TEST_EXT_LINK_NAME,
- strlen(LINK_ITER_MIXED_LINKS_TEST_EXT_LINK_NAME) + 1)) {
+ else if (!strncmp(name, LINK_ITER_MIXED_LINKS_TEST_EXT_LINK_NAME,
+ strlen(LINK_ITER_MIXED_LINKS_TEST_EXT_LINK_NAME) + 1)) {
if (H5L_TYPE_EXTERNAL != info->type) {
H5_FAILED();
printf(" link type did not match\n");
@@ -26127,34 +26097,34 @@ link_visit_hard_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_i
if (test_iteration == 0 || test_iteration == 3) {
if (is_subgroup_link) {
- HDsnprintf(expected_link_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d", (int)subgroup_number);
+ snprintf(expected_link_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d", (int)subgroup_number);
}
else {
- HDsnprintf(expected_link_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME
- "%d"
- "/" LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
- (int)subgroup_number, (int)link_idx_val);
+ snprintf(expected_link_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME
+ "%d"
+ "/" LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
+ (int)subgroup_number, (int)link_idx_val);
}
}
else {
if (is_subgroup_link) {
- HDsnprintf(expected_link_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d",
- (int)(LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1));
+ snprintf(expected_link_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d",
+ (int)(LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1));
}
else {
- HDsnprintf(expected_link_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME
- "%d"
- "/" LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
- (int)(LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1),
- (int)(LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - link_idx_val - 1));
+ snprintf(expected_link_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME
+ "%d"
+ "/" LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
+ (int)(LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1),
+ (int)(LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - link_idx_val - 1));
}
}
- if (HDstrncmp(name, expected_link_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE)) {
+ if (strncmp(name, expected_link_name, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_BUF_SIZE)) {
printf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
ret_val = H5_ITER_ERROR;
goto done;
@@ -26240,34 +26210,34 @@ link_visit_soft_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_i
if (test_iteration == 0 || test_iteration == 3) {
if (is_subgroup_link) {
- HDsnprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d", (int)subgroup_number);
+ snprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d", (int)subgroup_number);
}
else {
- HDsnprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME
- "%d"
- "/" LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
- (int)subgroup_number, (int)link_idx_val);
+ snprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME
+ "%d"
+ "/" LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
+ (int)subgroup_number, (int)link_idx_val);
}
}
else {
if (is_subgroup_link) {
- HDsnprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d",
- (int)(LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1));
+ snprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d",
+ (int)(LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1));
}
else {
- HDsnprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME
- "%d"
- "/" LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
- (int)(LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1),
- (int)(LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - link_idx_val - 1));
+ snprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME
+ "%d"
+ "/" LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
+ (int)(LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1),
+ (int)(LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - link_idx_val - 1));
}
}
- if (HDstrncmp(name, expected_link_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE)) {
+ if (strncmp(name, expected_link_name, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_BUF_SIZE)) {
printf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
ret_val = H5_ITER_ERROR;
goto done;
@@ -26361,34 +26331,34 @@ link_visit_external_links_no_cycles_cb(hid_t group_id, const char *name, const H
if (test_iteration == 0 || test_iteration == 3) {
if (is_subgroup_link) {
- HDsnprintf(expected_link_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d", (int)subgroup_number);
+ snprintf(expected_link_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d", (int)subgroup_number);
}
else {
- HDsnprintf(expected_link_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME
- "%d"
- "/" LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
- (int)subgroup_number, (int)link_idx_val);
+ snprintf(expected_link_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME
+ "%d"
+ "/" LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
+ (int)subgroup_number, (int)link_idx_val);
}
}
else {
if (is_subgroup_link) {
- HDsnprintf(expected_link_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d",
- (int)(LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1));
+ snprintf(expected_link_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME "%d",
+ (int)(LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1));
}
else {
- HDsnprintf(expected_link_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME
- "%d"
- "/" LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
- (int)(LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1),
- (int)(LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - link_idx_val - 1));
+ snprintf(expected_link_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NESTED_GRP_NAME
+ "%d"
+ "/" LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_LINK_NAME "%d",
+ (int)(LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1),
+ (int)(LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_GROUP - link_idx_val - 1));
}
}
- if (HDstrncmp(name, expected_link_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE)) {
+ if (strncmp(name, expected_link_name, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE)) {
printf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
ret_val = H5_ITER_ERROR;
goto done;
@@ -26422,12 +26392,12 @@ link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_
UNUSED(group_id);
UNUSED(op_data);
- if (!HDstrncmp(name,
- LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME1,
- strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME1) +
- 1) &&
+ if (!strncmp(name,
+ LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME1,
+ strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME1) +
+ 1) &&
(counter_val == 2 || counter_val == 14 || counter_val == 18 || counter_val == 30)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
@@ -26438,12 +26408,12 @@ link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_
goto done;
}
- else if (!HDstrncmp(name,
- LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME2,
- strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME2) +
- 1) &&
+ else if (!strncmp(name,
+ LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME2,
+ strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME2) +
+ 1) &&
(counter_val == 3 || counter_val == 13 || counter_val == 19 || counter_val == 29)) {
if (H5L_TYPE_SOFT != info->type) {
ret_val = -1;
@@ -26454,12 +26424,12 @@ link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_
goto done;
}
- else if (!HDstrncmp(name,
- LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME3,
- strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME3) +
- 1) &&
+ else if (!strncmp(name,
+ LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME3,
+ strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME3) +
+ 1) &&
(counter_val == 6 || counter_val == 10 || counter_val == 22 || counter_val == 26)) {
if (H5L_TYPE_EXTERNAL != info->type) {
ret_val = -1;
@@ -26470,12 +26440,12 @@ link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_
goto done;
}
- else if (!HDstrncmp(name,
- LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME4,
- strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME4) +
- 1) &&
+ else if (!strncmp(name,
+ LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME4,
+ strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_LINK_NAME4) +
+ 1) &&
(counter_val == 7 || counter_val == 9 || counter_val == 23 || counter_val == 25)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
@@ -26486,12 +26456,12 @@ link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_
goto done;
}
- else if (!HDstrncmp(name,
- LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME,
- strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME) +
- 1) &&
+ else if (!strncmp(name,
+ LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME,
+ strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME) +
+ 1) &&
(counter_val == 1 || counter_val == 15 || counter_val == 17 || counter_val == 31)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
@@ -26502,12 +26472,12 @@ link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_
goto done;
}
- else if (!HDstrncmp(name,
- LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME2,
- strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
- "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME2) +
- 1) &&
+ else if (!strncmp(name,
+ LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME2,
+ strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3
+ "/" LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_DSET_NAME2) +
+ 1) &&
(counter_val == 5 || counter_val == 11 || counter_val == 21 || counter_val == 27)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
@@ -26518,8 +26488,8 @@ link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_
goto done;
}
- else if (!HDstrncmp(name, LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2,
- strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2) + 1) &&
+ else if (!strncmp(name, LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2,
+ strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME2) + 1) &&
(counter_val == 0 || counter_val == 12 || counter_val == 16 || counter_val == 28)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
@@ -26529,8 +26499,8 @@ link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_
goto done;
}
- else if (!HDstrncmp(name, LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3,
- strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3) + 1) &&
+ else if (!strncmp(name, LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3,
+ strlen(LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME3) + 1) &&
(counter_val == 4 || counter_val == 8 || counter_val == 20 || counter_val == 24)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
@@ -26615,34 +26585,34 @@ link_visit_hard_links_cycles_cb(hid_t group_id, const char *name, const H5L_info
if (test_iteration == 0 || test_iteration == 3) {
if (is_subgroup_link) {
- HDsnprintf(expected_link_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_HARD_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d", (int)subgroup_number);
+ snprintf(expected_link_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_HARD_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d", (int)subgroup_number);
}
else {
- HDsnprintf(expected_link_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_HARD_LINKS_CYCLE_TEST_NESTED_GRP_NAME
- "%d"
- "/" LINK_VISIT_HARD_LINKS_CYCLE_TEST_LINK_NAME "%d",
- (int)subgroup_number, (int)link_idx_val);
+ snprintf(expected_link_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_HARD_LINKS_CYCLE_TEST_NESTED_GRP_NAME
+ "%d"
+ "/" LINK_VISIT_HARD_LINKS_CYCLE_TEST_LINK_NAME "%d",
+ (int)subgroup_number, (int)link_idx_val);
}
}
else {
if (is_subgroup_link) {
- HDsnprintf(expected_link_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_HARD_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d",
- (int)(LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1));
+ snprintf(expected_link_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_HARD_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d",
+ (int)(LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1));
}
else {
- HDsnprintf(expected_link_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_HARD_LINKS_CYCLE_TEST_NESTED_GRP_NAME
- "%d"
- "/" LINK_VISIT_HARD_LINKS_CYCLE_TEST_LINK_NAME "%d",
- (int)(LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1),
- (int)(LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_LINKS_PER_GROUP - link_idx_val - 1));
+ snprintf(expected_link_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_HARD_LINKS_CYCLE_TEST_NESTED_GRP_NAME
+ "%d"
+ "/" LINK_VISIT_HARD_LINKS_CYCLE_TEST_LINK_NAME "%d",
+ (int)(LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1),
+ (int)(LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_LINKS_PER_GROUP - link_idx_val - 1));
}
}
- if (HDstrncmp(name, expected_link_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE)) {
+ if (strncmp(name, expected_link_name, LINK_VISIT_HARD_LINKS_CYCLE_TEST_BUF_SIZE)) {
printf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
ret_val = H5_ITER_ERROR;
goto done;
@@ -26728,34 +26698,34 @@ link_visit_soft_links_cycles_cb(hid_t group_id, const char *name, const H5L_info
if (test_iteration == 0 || test_iteration == 3) {
if (is_subgroup_link) {
- HDsnprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d", (int)subgroup_number);
+ snprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d", (int)subgroup_number);
}
else {
- HDsnprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NESTED_GRP_NAME
- "%d"
- "/" LINK_VISIT_SOFT_LINKS_CYCLE_TEST_LINK_NAME "%d",
- (int)subgroup_number, (int)link_idx_val);
+ snprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NESTED_GRP_NAME
+ "%d"
+ "/" LINK_VISIT_SOFT_LINKS_CYCLE_TEST_LINK_NAME "%d",
+ (int)subgroup_number, (int)link_idx_val);
}
}
else {
if (is_subgroup_link) {
- HDsnprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d",
- (int)(LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1));
+ snprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d",
+ (int)(LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1));
}
else {
- HDsnprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NESTED_GRP_NAME
- "%d"
- "/" LINK_VISIT_SOFT_LINKS_CYCLE_TEST_LINK_NAME "%d",
- (int)(LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1),
- (int)(LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_LINKS_PER_GROUP - link_idx_val - 1));
+ snprintf(expected_link_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NESTED_GRP_NAME
+ "%d"
+ "/" LINK_VISIT_SOFT_LINKS_CYCLE_TEST_LINK_NAME "%d",
+ (int)(LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1),
+ (int)(LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_LINKS_PER_GROUP - link_idx_val - 1));
}
}
- if (HDstrncmp(name, expected_link_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE)) {
+ if (strncmp(name, expected_link_name, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_BUF_SIZE)) {
printf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
ret_val = H5_ITER_ERROR;
goto done;
@@ -26848,34 +26818,34 @@ link_visit_external_links_cycles_cb(hid_t group_id, const char *name, const H5L_
if (test_iteration == 0 || test_iteration == 3) {
if (is_subgroup_link) {
- HDsnprintf(expected_link_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_EXT_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d", (int)subgroup_number);
+ snprintf(expected_link_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_EXT_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d", (int)subgroup_number);
}
else {
- HDsnprintf(expected_link_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_EXT_LINKS_CYCLE_TEST_NESTED_GRP_NAME
- "%d"
- "/" LINK_VISIT_EXT_LINKS_CYCLE_TEST_LINK_NAME "%d",
- (int)subgroup_number, (int)link_idx_val);
+ snprintf(expected_link_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_EXT_LINKS_CYCLE_TEST_NESTED_GRP_NAME
+ "%d"
+ "/" LINK_VISIT_EXT_LINKS_CYCLE_TEST_LINK_NAME "%d",
+ (int)subgroup_number, (int)link_idx_val);
}
}
else {
if (is_subgroup_link) {
- HDsnprintf(expected_link_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_EXT_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d",
- (int)(LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1));
+ snprintf(expected_link_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_EXT_LINKS_CYCLE_TEST_NESTED_GRP_NAME "%d",
+ (int)(LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1));
}
else {
- HDsnprintf(expected_link_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
- LINK_VISIT_EXT_LINKS_CYCLE_TEST_NESTED_GRP_NAME
- "%d"
- "/" LINK_VISIT_EXT_LINKS_CYCLE_TEST_LINK_NAME "%d",
- (int)(LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1),
- (int)(LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_LINKS_PER_GROUP - link_idx_val - 1));
+ snprintf(expected_link_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE,
+ LINK_VISIT_EXT_LINKS_CYCLE_TEST_NESTED_GRP_NAME
+ "%d"
+ "/" LINK_VISIT_EXT_LINKS_CYCLE_TEST_LINK_NAME "%d",
+ (int)(LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_SUBGROUPS - subgroup_number - 1),
+ (int)(LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_LINKS_PER_GROUP - link_idx_val - 1));
}
}
- if (HDstrncmp(name, expected_link_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE)) {
+ if (strncmp(name, expected_link_name, LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE)) {
printf(" link name '%s' didn't match expected name '%s'\n", name, expected_link_name);
ret_val = H5_ITER_ERROR;
goto done;
@@ -26909,12 +26879,12 @@ link_visit_mixed_links_cycles_cb(hid_t group_id, const char *name, const H5L_inf
UNUSED(group_id);
UNUSED(op_data);
- if (!HDstrncmp(name,
- LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2
- "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME1,
- strlen(LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2
- "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME1) +
- 1) &&
+ if (!strncmp(name,
+ LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2
+ "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME1,
+ strlen(LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2
+ "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME1) +
+ 1) &&
(counter_val == 1 || counter_val == 11 || counter_val == 13 || counter_val == 23)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
@@ -26925,12 +26895,12 @@ link_visit_mixed_links_cycles_cb(hid_t group_id, const char *name, const H5L_inf
goto done;
}
- else if (!HDstrncmp(name,
- LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2
- "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME2,
- strlen(LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2
- "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME2) +
- 1) &&
+ else if (!strncmp(name,
+ LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2
+ "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME2,
+ strlen(LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2
+ "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME2) +
+ 1) &&
(counter_val == 2 || counter_val == 10 || counter_val == 14 || counter_val == 22)) {
if (H5L_TYPE_SOFT != info->type) {
ret_val = -1;
@@ -26941,12 +26911,12 @@ link_visit_mixed_links_cycles_cb(hid_t group_id, const char *name, const H5L_inf
goto done;
}
- else if (!HDstrncmp(name,
- LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3
- "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME3,
- strlen(LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3
- "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME3) +
- 1) &&
+ else if (!strncmp(name,
+ LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3
+ "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME3,
+ strlen(LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3
+ "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME3) +
+ 1) &&
(counter_val == 4 || counter_val == 8 || counter_val == 16 || counter_val == 20)) {
if (H5L_TYPE_EXTERNAL != info->type) {
ret_val = -1;
@@ -26957,12 +26927,12 @@ link_visit_mixed_links_cycles_cb(hid_t group_id, const char *name, const H5L_inf
goto done;
}
- else if (!HDstrncmp(name,
- LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3
- "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME4,
- strlen(LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3
- "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME4) +
- 1) &&
+ else if (!strncmp(name,
+ LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3
+ "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME4,
+ strlen(LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3
+ "/" LINK_VISIT_MIXED_LINKS_CYCLE_TEST_LINK_NAME4) +
+ 1) &&
(counter_val == 5 || counter_val == 7 || counter_val == 17 || counter_val == 19)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
@@ -26973,8 +26943,8 @@ link_visit_mixed_links_cycles_cb(hid_t group_id, const char *name, const H5L_inf
goto done;
}
- else if (!HDstrncmp(name, LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2,
- strlen(LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2) + 1) &&
+ else if (!strncmp(name, LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2,
+ strlen(LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME2) + 1) &&
(counter_val == 0 || counter_val == 9 || counter_val == 12 || counter_val == 21)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
@@ -26984,8 +26954,8 @@ link_visit_mixed_links_cycles_cb(hid_t group_id, const char *name, const H5L_inf
goto done;
}
- else if (!HDstrncmp(name, LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3,
- strlen(LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3) + 1) &&
+ else if (!strncmp(name, LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3,
+ strlen(LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME3) + 1) &&
(counter_val == 3 || counter_val == 6 || counter_val == 15 || counter_val == 18)) {
if (H5L_TYPE_HARD != info->type) {
ret_val = -1;
diff --git a/test/API/H5_api_misc_test.c b/test/API/H5_api_misc_test.c
index 6643465..bce618b 100644
--- a/test/API/H5_api_misc_test.c
+++ b/test/API/H5_api_misc_test.c
@@ -948,15 +948,15 @@ test_symbols_in_compound_field_name(void)
total_type_size += H5Tget_size(type_pool[i]);
}
- HDsnprintf(member_names[0], 256, "{{{ member0");
- HDsnprintf(member_names[1], 256, "member1 }}}");
- HDsnprintf(member_names[2], 256, "{{{ member2 }}");
- HDsnprintf(member_names[3], 256, "{{ member3 }}}");
- HDsnprintf(member_names[4], 256, "\\\"member4");
- HDsnprintf(member_names[5], 256, "member5\\\"");
- HDsnprintf(member_names[6], 256, "mem\\\"ber6");
- HDsnprintf(member_names[7], 256, "{{ member7\\\" }");
- HDsnprintf(member_names[8], 256, "{{ member8\\\\");
+ snprintf(member_names[0], 256, "{{{ member0");
+ snprintf(member_names[1], 256, "member1 }}}");
+ snprintf(member_names[2], 256, "{{{ member2 }}");
+ snprintf(member_names[3], 256, "{{ member3 }}}");
+ snprintf(member_names[4], 256, "\\\"member4");
+ snprintf(member_names[5], 256, "member5\\\"");
+ snprintf(member_names[6], 256, "mem\\\"ber6");
+ snprintf(member_names[7], 256, "{{ member7\\\" }");
+ snprintf(member_names[8], 256, "{{ member8\\\\");
if ((compound_type = H5Tcreate(H5T_COMPOUND, total_type_size)) < 0) {
H5_FAILED();
diff --git a/test/API/H5_api_object_test.c b/test/API/H5_api_object_test.c
index bd17a63..d861661 100644
--- a/test/API/H5_api_object_test.c
+++ b/test/API/H5_api_object_test.c
@@ -6883,7 +6883,7 @@ object_copy_attribute_iter_callback(hid_t location_id, const char *attr_name, co
snprintf(expected_name, 256, "attr%d", (int)(*counter));
- if (HDstrncmp(attr_name, expected_name, 256)) {
+ if (strncmp(attr_name, expected_name, 256)) {
printf(" attribute name '%s' did not match expected name '%s'\n", attr_name, expected_name);
ret_value = H5_ITER_ERROR;
goto done;
@@ -7028,28 +7028,28 @@ object_visit_callback(hid_t o_id, const char *name, const H5O_info2_t *object_in
UNUSED(o_id);
- if (!HDstrncmp(name, ".", strlen(".") + 1) &&
+ if (!strncmp(name, ".", strlen(".") + 1) &&
(counter_val == 0 || counter_val == 4 || counter_val == 8 || counter_val == 12)) {
if (H5O_TYPE_GROUP == object_info->type)
goto done;
else
printf(" type for object '%s' was not H5O_TYPE_GROUP\n", name);
}
- else if (!HDstrncmp(name, OBJECT_VISIT_TEST_GROUP_NAME, strlen(OBJECT_VISIT_TEST_GROUP_NAME) + 1) &&
+ else if (!strncmp(name, OBJECT_VISIT_TEST_GROUP_NAME, strlen(OBJECT_VISIT_TEST_GROUP_NAME) + 1) &&
(counter_val == 2 || counter_val == 6 || counter_val == 9 || counter_val == 15)) {
if (H5O_TYPE_GROUP == object_info->type)
goto done;
else
printf(" type for object '%s' was not H5O_TYPE_GROUP\n", name);
}
- else if (!HDstrncmp(name, OBJECT_VISIT_TEST_DSET_NAME, strlen(OBJECT_VISIT_TEST_DSET_NAME) + 1) &&
+ else if (!strncmp(name, OBJECT_VISIT_TEST_DSET_NAME, strlen(OBJECT_VISIT_TEST_DSET_NAME) + 1) &&
(counter_val == 1 || counter_val == 7 || counter_val == 10 || counter_val == 14)) {
if (H5O_TYPE_DATASET == object_info->type)
goto done;
else
printf(" type for object '%s' was not H5O_TYPE_DATASET\n", name);
}
- else if (!HDstrncmp(name, OBJECT_VISIT_TEST_TYPE_NAME, strlen(OBJECT_VISIT_TEST_TYPE_NAME) + 1) &&
+ else if (!strncmp(name, OBJECT_VISIT_TEST_TYPE_NAME, strlen(OBJECT_VISIT_TEST_TYPE_NAME) + 1) &&
(counter_val == 3 || counter_val == 5 || counter_val == 11 || counter_val == 13)) {
if (H5O_TYPE_NAMED_DATATYPE == object_info->type)
goto done;
@@ -7078,7 +7078,7 @@ object_visit_dset_callback(hid_t o_id, const char *name, const H5O_info2_t *obje
UNUSED(o_id);
UNUSED(op_data);
- if (HDstrncmp(name, ".", strlen(".") + 1)) {
+ if (strncmp(name, ".", strlen(".") + 1)) {
printf(" object '%s' didn't match known names\n", name);
return -1;
}
@@ -7102,7 +7102,7 @@ object_visit_dtype_callback(hid_t o_id, const char *name, const H5O_info2_t *obj
UNUSED(o_id);
UNUSED(op_data);
- if (HDstrncmp(name, ".", strlen(".") + 1)) {
+ if (strncmp(name, ".", strlen(".") + 1)) {
printf(" object '%s' didn't match known names\n", name);
return -1;
}
@@ -7128,7 +7128,7 @@ object_visit_soft_link_callback(hid_t o_id, const char *name, const H5O_info2_t
UNUSED(o_id);
- if (!HDstrncmp(name, ".", strlen(".") + 1) && (counter_val <= 5)) {
+ if (!strncmp(name, ".", strlen(".") + 1) && (counter_val <= 5)) {
if (H5O_TYPE_GROUP == object_info->type)
goto done;
else
diff --git a/test/API/H5_api_test.c b/test/API/H5_api_test.c
index b5d1643..98dd260 100644
--- a/test/API/H5_api_test.c
+++ b/test/API/H5_api_test.c
@@ -158,8 +158,7 @@ main(int argc, char **argv)
if (NULL == (test_path_prefix = HDgetenv(HDF5_API_TEST_PATH_PREFIX)))
test_path_prefix = "";
- HDsnprintf(H5_api_test_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix,
- TEST_FILE_NAME);
+ snprintf(H5_api_test_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, TEST_FILE_NAME);
if (NULL == (vol_connector_string = HDgetenv(HDF5_VOL_CONNECTOR))) {
printf("No VOL connector selected; using native VOL connector\n");
@@ -169,13 +168,13 @@ main(int argc, char **argv)
else {
char *token;
- if (NULL == (vol_connector_string_copy = HDstrdup(vol_connector_string))) {
+ if (NULL == (vol_connector_string_copy = strdup(vol_connector_string))) {
fprintf(stderr, "Unable to copy VOL connector string\n");
err_occurred = true;
goto done;
}
- if (NULL == (token = HDstrtok(vol_connector_string_copy, " "))) {
+ if (NULL == (token = strtok(vol_connector_string_copy, " "))) {
fprintf(stderr, "Error while parsing VOL connector string\n");
err_occurred = true;
goto done;
@@ -183,7 +182,7 @@ main(int argc, char **argv)
vol_connector_name = token;
- if (NULL != (token = HDstrtok(NULL, " "))) {
+ if (NULL != (token = strtok(NULL, " "))) {
vol_connector_info = token;
}
}
@@ -208,7 +207,7 @@ main(int argc, char **argv)
* Otherwise, HDF5 will default to running the tests
* with the native connector, which could be misleading.
*/
- if (0 != HDstrcmp(vol_connector_name, "native")) {
+ if (0 != strcmp(vol_connector_name, "native")) {
htri_t is_registered;
if ((is_registered = H5VLis_connector_registered_by_name(vol_connector_name)) < 0) {
diff --git a/test/API/H5_api_test_util.c b/test/API/H5_api_test_util.c
index 83ac272..d0194f7 100644
--- a/test/API/H5_api_test_util.c
+++ b/test/API/H5_api_test_util.c
@@ -410,7 +410,7 @@ generate_random_datatype_compound(H5T_class_t H5_ATTR_UNUSED parent_class, bool
size_t member_size;
char member_name[256];
- HDsnprintf(member_name, 256, "compound_member%zu", i);
+ snprintf(member_name, 256, "compound_member%zu", i);
if ((compound_members[i] = generate_random_datatype(H5T_COMPOUND, is_compact)) < 0) {
printf(" couldn't create compound datatype member %zu\n", i);
@@ -514,7 +514,7 @@ generate_random_datatype_enum(H5T_class_t H5_ATTR_UNUSED parent_class, bool H5_A
char name[ENUM_TYPE_MAX_MEMBER_NAME_LENGTH];
int enum_val;
- HDsnprintf(name, ENUM_TYPE_MAX_MEMBER_NAME_LENGTH, "enum_val%zu", i);
+ snprintf(name, ENUM_TYPE_MAX_MEMBER_NAME_LENGTH, "enum_val%zu", i);
do {
enum_val = rand();
@@ -750,7 +750,7 @@ prefix_filename(const char *prefix, const char *filename, char **filename_out)
goto done;
}
- HDsnprintf(out_buf, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", prefix, filename);
+ snprintf(out_buf, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", prefix, filename);
*filename_out = out_buf;
diff --git a/test/API/tarray.c b/test/API/tarray.c
index 32f3f2d..7ab2114 100644
--- a/test/API/tarray.c
+++ b/test/API/tarray.c
@@ -686,7 +686,7 @@ test_array_compound_atomic(void)
/* Check the 1st field's name */
mname = H5Tget_member_name(tid2, 0);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "i") != 0)
+ if (strcmp(mname, "i") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -705,7 +705,7 @@ test_array_compound_atomic(void)
/* Check the 2nd field's name */
mname = H5Tget_member_name(tid2, 1);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "f") != 0)
+ if (strcmp(mname, "f") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -908,7 +908,7 @@ test_array_compound_array(void)
/* Check the 1st field's name */
mname = H5Tget_member_name(tid2, 0);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "i") != 0)
+ if (strcmp(mname, "i") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -927,7 +927,7 @@ test_array_compound_array(void)
/* Check the 2nd field's name */
mname = H5Tget_member_name(tid2, 1);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "f") != 0)
+ if (strcmp(mname, "f") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -1664,9 +1664,9 @@ test_array_bkg(void)
for (i = 0; i < dtsinfo->nsubfields; i++)
dtsinfo->name[i] = (char *)calloc((size_t)20, sizeof(char));
- HDstrcpy(dtsinfo->name[0], "One");
- HDstrcpy(dtsinfo->name[1], "Two");
- HDstrcpy(dtsinfo->name[2], "Three");
+ strcpy(dtsinfo->name[0], "One");
+ strcpy(dtsinfo->name[1], "Two");
+ strcpy(dtsinfo->name[2], "Three");
/* Create file */
/* ----------- */
@@ -1967,7 +1967,7 @@ test_compat(void)
/* Check the 1st field's name */
mname = H5Tget_member_name(tid1, 0);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "i") != 0)
+ if (strcmp(mname, "i") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -1986,7 +1986,7 @@ test_compat(void)
/* Check the 2nd field's name */
mname = H5Tget_member_name(tid1, 1);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "f") != 0)
+ if (strcmp(mname, "f") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -2005,7 +2005,7 @@ test_compat(void)
/* Check the 3rd field's name */
mname = H5Tget_member_name(tid1, 2);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "l") != 0)
+ if (strcmp(mname, "l") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -2048,7 +2048,7 @@ test_compat(void)
/* Check the 1st field's name */
mname = H5Tget_member_name(tid1, 0);
CHECK_PTR(mname, "H5Tget_member_name");
- if (mname && HDstrcmp(mname, "i") != 0)
+ if (mname && strcmp(mname, "i") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
if (mname)
H5free_memory(mname);
@@ -2068,7 +2068,7 @@ test_compat(void)
/* Check the 2nd field's name */
mname = H5Tget_member_name(tid1, 1);
CHECK_PTR(mname, "H5Tget_member_name");
- if (mname && HDstrcmp(mname, "f") != 0)
+ if (mname && strcmp(mname, "f") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
if (mname)
H5free_memory(mname);
@@ -2116,7 +2116,7 @@ test_compat(void)
/* Check the 3rd field's name */
mname = H5Tget_member_name(tid1, 2);
CHECK_PTR(mname, "H5Tget_member_name");
- if (mname && HDstrcmp(mname, "l") != 0)
+ if (mname && strcmp(mname, "l") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
if (mname)
H5free_memory(mname);
@@ -2164,7 +2164,7 @@ test_compat(void)
/* Check the 4th field's name */
mname = H5Tget_member_name(tid1, 3);
CHECK_PTR(mname, "H5Tget_member_name");
- if (mname && HDstrcmp(mname, "d") != 0)
+ if (mname && strcmp(mname, "d") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
if (mname)
H5free_memory(mname);
diff --git a/test/API/tattr.c b/test/API/tattr.c
index 276d0b8..c4ae9f9 100644
--- a/test/API/tattr.c
+++ b/test/API/tattr.c
@@ -314,8 +314,8 @@ test_attr_basic_write(hid_t fapl)
if (attr_name) {
ret = (herr_t)H5Aget_name(attr, (size_t)(attr_name_size + 1), attr_name);
CHECK(ret, FAIL, "H5Aget_name");
- ret = HDstrcmp(attr_name, ATTR_TMP_NAME);
- VERIFY(ret, 0, "HDstrcmp");
+ ret = strcmp(attr_name, ATTR_TMP_NAME);
+ VERIFY(ret, 0, "strcmp");
free(attr_name);
attr_name = NULL;
@@ -351,8 +351,8 @@ test_attr_basic_write(hid_t fapl)
if (attr_name) {
ret = (herr_t)H5Aget_name(attr2, (size_t)(attr_name_size + 1), attr_name);
CHECK(ret, FAIL, "H5Aget_name");
- ret = HDstrcmp(attr_name, ATTR1A_NAME);
- VERIFY(ret, 0, "HDstrcmp");
+ ret = strcmp(attr_name, ATTR1A_NAME);
+ VERIFY(ret, 0, "strcmp");
free(attr_name);
attr_name = NULL;
@@ -887,8 +887,8 @@ test_attr_compound_read(hid_t fapl)
VERIFY(fields, 3, "H5Tget_nmembers");
for (i = 0; i < fields; i++) {
fieldname = H5Tget_member_name(type, (unsigned)i);
- if (!(HDstrcmp(fieldname, ATTR4_FIELDNAME1) != 0 || HDstrcmp(fieldname, ATTR4_FIELDNAME2) != 0 ||
- HDstrcmp(fieldname, ATTR4_FIELDNAME3) != 0))
+ if (!(strcmp(fieldname, ATTR4_FIELDNAME1) != 0 || strcmp(fieldname, ATTR4_FIELDNAME2) != 0 ||
+ strcmp(fieldname, ATTR4_FIELDNAME3) != 0))
TestErrPrintf("invalid field name for field #%d: %s\n", i, fieldname);
H5free_memory(fieldname);
} /* end for */
@@ -947,8 +947,8 @@ test_attr_compound_read(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR4_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR4_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR4_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR4_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR4_NAME);
/* Close attribute datatype */
@@ -1330,16 +1330,16 @@ test_attr_mult_read(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR1_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR1_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR1_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR1_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR1_NAME);
/* Verify Name with too small of a buffer */
- name_len = H5Aget_name(attr, HDstrlen(ATTR1_NAME), attr_name);
- VERIFY(name_len, HDstrlen(ATTR1_NAME), "H5Aget_name");
- HDstrcpy(temp_name, ATTR1_NAME); /* make a copy of the name */
- temp_name[HDstrlen(ATTR1_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
- if (HDstrcmp(attr_name, temp_name) != 0)
+ name_len = H5Aget_name(attr, strlen(ATTR1_NAME), attr_name);
+ VERIFY(name_len, strlen(ATTR1_NAME), "H5Aget_name");
+ strcpy(temp_name, ATTR1_NAME); /* make a copy of the name */
+ temp_name[strlen(ATTR1_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
+ if (strcmp(attr_name, temp_name) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, temp_name);
/* Close attribute */
@@ -1388,16 +1388,16 @@ test_attr_mult_read(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR2_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR2_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR2_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR2_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR2_NAME);
/* Verify Name with too small of a buffer */
- name_len = H5Aget_name(attr, HDstrlen(ATTR2_NAME), attr_name);
- VERIFY(name_len, HDstrlen(ATTR2_NAME), "H5Aget_name");
- HDstrcpy(temp_name, ATTR2_NAME); /* make a copy of the name */
- temp_name[HDstrlen(ATTR2_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
- if (HDstrcmp(attr_name, temp_name) != 0)
+ name_len = H5Aget_name(attr, strlen(ATTR2_NAME), attr_name);
+ VERIFY(name_len, strlen(ATTR2_NAME), "H5Aget_name");
+ strcpy(temp_name, ATTR2_NAME); /* make a copy of the name */
+ temp_name[strlen(ATTR2_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
+ if (strcmp(attr_name, temp_name) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, temp_name);
/* Close attribute */
@@ -1450,16 +1450,16 @@ test_attr_mult_read(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR3_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR3_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR3_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR3_NAME);
/* Verify Name with too small of a buffer */
- name_len = H5Aget_name(attr, HDstrlen(ATTR3_NAME), attr_name);
- VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name");
- HDstrcpy(temp_name, ATTR3_NAME); /* make a copy of the name */
- temp_name[HDstrlen(ATTR3_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
- if (HDstrcmp(attr_name, temp_name) != 0)
+ name_len = H5Aget_name(attr, strlen(ATTR3_NAME), attr_name);
+ VERIFY(name_len, strlen(ATTR3_NAME), "H5Aget_name");
+ strcpy(temp_name, ATTR3_NAME); /* make a copy of the name */
+ temp_name[strlen(ATTR3_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
+ if (strcmp(attr_name, temp_name) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, temp_name);
/* Close attribute */
@@ -1488,19 +1488,19 @@ attr_op1(hid_t H5_ATTR_UNUSED loc_id, const char *name, const H5A_info_t H5_ATTR
switch (*count) {
case 0:
- if (HDstrcmp(name, ATTR1_NAME) != 0)
+ if (strcmp(name, ATTR1_NAME) != 0)
TestErrPrintf("attribute name different: name=%s, should be %s\n", name, ATTR1_NAME);
(*count)++;
break;
case 1:
- if (HDstrcmp(name, ATTR2_NAME) != 0)
+ if (strcmp(name, ATTR2_NAME) != 0)
TestErrPrintf("attribute name different: name=%s, should be %s\n", name, ATTR2_NAME);
(*count)++;
break;
case 2:
- if (HDstrcmp(name, ATTR3_NAME) != 0)
+ if (strcmp(name, ATTR3_NAME) != 0)
TestErrPrintf("attribute name different: name=%s, should be %s\n", name, ATTR3_NAME);
(*count)++;
break;
@@ -1647,8 +1647,8 @@ test_attr_delete(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR1_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR1_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR1_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR1_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR1_NAME);
/* Close attribute */
@@ -1662,8 +1662,8 @@ test_attr_delete(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR3_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR3_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR3_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR3_NAME);
/* Close attribute */
@@ -1686,8 +1686,8 @@ test_attr_delete(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR3_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR3_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR3_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR3_NAME);
/* Close attribute */
@@ -2159,7 +2159,7 @@ test_attr_dense_verify(hid_t loc_id, unsigned max_attr)
/* Re-open all the attributes by name and verify the data */
for (u = 0; u < max_attr; u++) {
/* Open attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Aopen(loc_id, attrname, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Aopen");
@@ -2184,10 +2184,10 @@ test_attr_dense_verify(hid_t loc_id, unsigned max_attr)
CHECK(attr, FAIL, "H5Aopen_by_idx");
/* Verify Name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, check_name);
- VERIFY(name_len, HDstrlen(attrname), "H5Aget_name");
- if (HDstrcmp(check_name, attrname) != 0)
+ VERIFY(name_len, strlen(attrname), "H5Aget_name");
+ if (strcmp(check_name, attrname) != 0)
TestErrPrintf("attribute name different: attrname = '%s', should be '%s'\n", check_name,
attrname);
@@ -2288,7 +2288,7 @@ test_attr_dense_create(hid_t fcpl, hid_t fapl)
/* Add attributes, until just before converting to dense storage */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -2307,7 +2307,7 @@ test_attr_dense_create(hid_t fcpl, hid_t fapl)
#endif
/* Add one more attribute, to push into "dense" storage */
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
#if 0
@@ -2441,7 +2441,7 @@ test_attr_dense_open(hid_t fcpl, hid_t fapl)
/* Add attributes, until just before converting to dense storage */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -2464,7 +2464,7 @@ test_attr_dense_open(hid_t fcpl, hid_t fapl)
#endif
/* Add one more attribute, to push into "dense" storage */
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
#if 0
@@ -2608,7 +2608,7 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
/* Add attributes, until well into dense storage */
for (u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -2653,7 +2653,7 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
/* Delete attributes until the attributes revert to compact storage again */
for (u--; u >= min_dense; u--) {
/* Delete attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
@@ -2667,7 +2667,7 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
VERIFY(is_dense, true, "H5O__is_attr_dense_test");
#endif
/* Delete one more attribute, which should cause reversion to compact storage */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
#if 0
@@ -2680,7 +2680,7 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "test_attr_dense_verify");
/* Delete another attribute, to verify deletion in compact storage */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (u - 1));
+ snprintf(attrname, sizeof(attrname), "attr %02u", (u - 1));
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
#if 0
@@ -2812,7 +2812,7 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
/* Add attributes, until well into dense storage */
for (u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, H5I_INVALID_HID, "H5Acreate2");
@@ -2825,7 +2825,7 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
/* Rename attribute */
- HDsnprintf(new_attrname, sizeof(new_attrname), "new attr %02u", u);
+ snprintf(new_attrname, sizeof(new_attrname), "new attr %02u", u);
/* Rename attribute */
ret = H5Arename_by_name(fid, DSET1_NAME, attrname, new_attrname, H5P_DEFAULT);
@@ -2878,7 +2878,7 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
unsigned value; /* Attribute value */
/* Open attribute */
- HDsnprintf(attrname, sizeof(attrname), "new attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "new attr %02u", u);
attr = H5Aopen(dataset, attrname, H5P_DEFAULT);
CHECK(attr, H5I_INVALID_HID, "H5Aopen");
@@ -3005,7 +3005,7 @@ test_attr_dense_unlink(hid_t fcpl, hid_t fapl)
/* Add attributes, until well into dense storage */
for (u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3155,7 +3155,7 @@ test_attr_dense_limits(hid_t fcpl, hid_t fapl)
/* Create attribute */
u = 0;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3176,7 +3176,7 @@ test_attr_dense_limits(hid_t fcpl, hid_t fapl)
/* Create attribute */
u = 1;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3208,7 +3208,7 @@ test_attr_dense_limits(hid_t fcpl, hid_t fapl)
/* Delete attribute */
u = 0;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
#if 0
@@ -3321,7 +3321,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
/* Add attributes, until just before converting to dense storage */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3344,7 +3344,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
CHECK(sid2, FAIL, "H5Screate_simple");
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
#if 0
@@ -3627,7 +3627,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
/* Delete a few attributes until the storage switches to compact */
for (u = min_dense - 1; u <= max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
add_attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(add_attr, FAIL, "H5Acreate2");
@@ -3695,7 +3695,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
/* Add attributes, until just before converting to dense storage */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(gid1, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3867,7 +3867,7 @@ test_attr_big(hid_t fcpl, hid_t fapl)
/* Create attribute */
u = 0;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3886,7 +3886,7 @@ test_attr_big(hid_t fcpl, hid_t fapl)
/* Create attribute */
u = 1;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3905,7 +3905,7 @@ test_attr_big(hid_t fcpl, hid_t fapl)
/* Create attribute */
u = 2;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, big_sid, H5P_DEFAULT, H5P_DEFAULT);
if (low == H5F_LIBVER_LATEST || attr >= 0) {
CHECK(attr, FAIL, "H5Acreate2");
@@ -3930,7 +3930,7 @@ test_attr_big(hid_t fcpl, hid_t fapl)
/* Create attribute */
u = 3;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, big_sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3954,7 +3954,7 @@ test_attr_big(hid_t fcpl, hid_t fapl)
/* Delete attribute */
u = 1;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
#if 0
@@ -3969,7 +3969,7 @@ test_attr_big(hid_t fcpl, hid_t fapl)
/* Delete attribute */
u = 3;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
#if 0
@@ -3984,7 +3984,7 @@ test_attr_big(hid_t fcpl, hid_t fapl)
/* Delete attribute */
u = 2;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
#if 0
@@ -3999,7 +3999,7 @@ test_attr_big(hid_t fcpl, hid_t fapl)
/* Delete attribute */
u = 0;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
#if 0
@@ -4114,7 +4114,7 @@ test_attr_null_space(hid_t fcpl, hid_t fapl)
/* Add attribute with 'null' dataspace */
/* Create attribute */
- HDstrcpy(attrname, "null attr");
+ strcpy(attrname, "null attr");
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, null_sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -4155,7 +4155,7 @@ test_attr_null_space(hid_t fcpl, hid_t fapl)
/* Add another attribute with 'null' dataspace */
/* Create attribute */
- HDstrcpy(attrname, "null attr #2");
+ strcpy(attrname, "null attr #2");
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, null_sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -4189,7 +4189,7 @@ test_attr_null_space(hid_t fcpl, hid_t fapl)
CHECK(dataset, FAIL, "H5Dopen2");
/* Open first attribute */
- HDstrcpy(attrname, "null attr #2");
+ strcpy(attrname, "null attr #2");
attr = H5Aopen(dataset, attrname, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Aopen");
@@ -4229,7 +4229,7 @@ test_attr_null_space(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
/* Open second attribute */
- HDstrcpy(attrname, "null attr");
+ strcpy(attrname, "null attr");
attr = H5Aopen(dataset, attrname, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Aopen");
@@ -4416,7 +4416,7 @@ test_attr_many(bool new_format, hid_t fcpl, hid_t fapl)
/* Create many attributes */
for (u = 0; u < nattr; u++) {
- HDsnprintf(attrname, sizeof(attrname), "a-%06u", u);
+ snprintf(attrname, sizeof(attrname), "a-%06u", u);
exists = H5Aexists(gid, attrname);
VERIFY(exists, false, "H5Aexists");
@@ -4468,7 +4468,7 @@ test_attr_many(bool new_format, hid_t fcpl, hid_t fapl)
for (u = 0; u < nattr; u++) {
unsigned value; /* Attribute value */
- HDsnprintf(attrname, sizeof(attrname), "a-%06u", u);
+ snprintf(attrname, sizeof(attrname), "a-%06u", u);
exists = H5Aexists(gid, attrname);
VERIFY(exists, true, "H5Aexists");
@@ -4729,7 +4729,7 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl)
/* Create several attributes, but keep storage in compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -4819,7 +4819,7 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl)
H5A_info_t ainfo; /* Attribute information */
/* Retrieve information for attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Aget_info_by_name(my_dataset, ".", attrname, &ainfo, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_info_by_name");
@@ -4936,7 +4936,7 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
/* Create several attributes, but keep storage in compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -4960,7 +4960,7 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
} /* end for */
/* Create another attribute, to push into dense storage */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", max_compact);
+ snprintf(attrname, sizeof(attrname), "attr %02u", max_compact);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5054,7 +5054,7 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
H5A_info_t ainfo; /* Attribute information */
/* Retrieve information for attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Aget_info_by_name(my_dataset, ".", attrname, &ainfo, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_info_by_name");
@@ -5330,7 +5330,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
/* Create several attributes, but keep storage in compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5354,7 +5354,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
} /* end for */
/* Create another attribute, to push into dense storage */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", max_compact);
+ snprintf(attrname, sizeof(attrname), "attr %02u", max_compact);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5382,7 +5382,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
#endif
/* Delete several attributes from object, until attribute storage resumes compact form */
for (u = max_compact; u >= min_dense; u--) {
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
#if 0
@@ -5403,7 +5403,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
} /* end for */
/* Delete another attribute, to push attribute storage into compact form */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (min_dense - 1));
+ snprintf(attrname, sizeof(attrname), "attr %02u", (min_dense - 1));
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
#if 0
@@ -5419,7 +5419,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
/* Re-add attributes to get back into dense form */
for (u = (min_dense - 1); u < (max_compact + 1); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5507,7 +5507,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
#endif
/* Delete several attributes from object, until attribute storage resumes compact form */
for (u = max_compact; u >= min_dense; u--) {
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
#if 0
@@ -5528,7 +5528,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
} /* end for */
/* Delete another attribute, to push attribute storage into compact form */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (min_dense - 1));
+ snprintf(attrname, sizeof(attrname), "attr %02u", (min_dense - 1));
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
#if 0
@@ -5544,7 +5544,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
/* Re-add attributes to get back into dense form */
for (u = (min_dense - 1); u < (max_compact + 1); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5573,11 +5573,11 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
#endif
/* Delete all attributes */
for (u = max_compact; u > 0; u--) {
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
} /* end for */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", 0);
+ snprintf(attrname, sizeof(attrname), "attr %02u", 0);
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
} /* end for */
@@ -5719,7 +5719,7 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl)
/* Create attributes, until attribute storage is in dense form */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5848,7 +5848,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, bool use_i
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname) != 0)
+ if (strcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
/* Don't test "native" order if there is no creation order index, since
@@ -5875,7 +5875,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, bool use_i
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC /* H5_ITER_NATIVE */, n,
tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname) != 0)
+ if (strcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
} /* end if */
@@ -5896,7 +5896,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, bool use_i
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname) != 0)
+ if (strcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
/* Verify the information for first attribute, in increasing name order */
@@ -5916,7 +5916,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, bool use_i
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname) != 0)
+ if (strcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
/* Don't test "native" order queries on link name order, since there's not
@@ -5940,7 +5940,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, bool use_i
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname) != 0)
+ if (strcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
/* Retrieve current # of errors */
@@ -6071,7 +6071,7 @@ test_attr_info_by_idx(bool new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -6123,7 +6123,7 @@ test_attr_info_by_idx(bool new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for (; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -6592,7 +6592,7 @@ test_attr_delete_by_idx(bool new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -6671,10 +6671,10 @@ test_attr_delete_by_idx(bool new_format, hid_t fcpl, hid_t fapl)
ret = (herr_t)H5Aget_name_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0,
tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
if (order == H5_ITER_INC)
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (u + 1));
+ snprintf(attrname, sizeof(attrname), "attr %02u", (u + 1));
else
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (max_compact - (u + 2)));
- ret = HDstrcmp(attrname, tmpname);
+ snprintf(attrname, sizeof(attrname), "attr %02u", (max_compact - (u + 2)));
+ ret = strcmp(attrname, tmpname);
VERIFY(ret, 0, "H5Aget_name_by_idx");
} /* end for */
@@ -6710,7 +6710,7 @@ test_attr_delete_by_idx(bool new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for (u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -6804,11 +6804,10 @@ test_attr_delete_by_idx(bool new_format, hid_t fcpl, hid_t fapl)
ret = (herr_t)H5Aget_name_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0,
tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
if (order == H5_ITER_INC)
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (u + 1));
+ snprintf(attrname, sizeof(attrname), "attr %02u", (u + 1));
else
- HDsnprintf(attrname, sizeof(attrname), "attr %02u",
- ((max_compact * 2) - (u + 2)));
- ret = HDstrcmp(attrname, tmpname);
+ snprintf(attrname, sizeof(attrname), "attr %02u", ((max_compact * 2) - (u + 2)));
+ ret = strcmp(attrname, tmpname);
VERIFY(ret, 0, "H5Aget_name_by_idx");
} /* end for */
@@ -6853,7 +6852,7 @@ test_attr_delete_by_idx(bool new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, to push into dense form */
for (u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -6922,11 +6921,11 @@ test_attr_delete_by_idx(bool new_format, hid_t fcpl, hid_t fapl)
ret = (herr_t)H5Aget_name_by_idx(my_dataset, ".", idx_type, order, (hsize_t)u,
tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
if (order == H5_ITER_INC)
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", ((u * 2) + 1));
+ snprintf(attrname, sizeof(attrname), "attr %02u", ((u * 2) + 1));
else
- HDsnprintf(attrname, sizeof(attrname), "attr %02u",
- ((max_compact * 2) - ((u * 2) + 2)));
- ret = HDstrcmp(attrname, tmpname);
+ snprintf(attrname, sizeof(attrname), "attr %02u",
+ ((max_compact * 2) - ((u * 2) + 2)));
+ ret = strcmp(attrname, tmpname);
VERIFY(ret, 0, "H5Aget_name_by_idx");
} /* end for */
} /* end for */
@@ -6975,11 +6974,11 @@ test_attr_delete_by_idx(bool new_format, hid_t fcpl, hid_t fapl)
ret = (herr_t)H5Aget_name_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0,
tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
if (order == H5_ITER_INC)
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", ((u * 2) + 3));
+ snprintf(attrname, sizeof(attrname), "attr %02u", ((u * 2) + 3));
else
- HDsnprintf(attrname, sizeof(attrname), "attr %02u",
- ((max_compact * 2) - ((u * 2) + 4)));
- ret = HDstrcmp(attrname, tmpname);
+ snprintf(attrname, sizeof(attrname), "attr %02u",
+ ((max_compact * 2) - ((u * 2) + 4)));
+ ret = strcmp(attrname, tmpname);
VERIFY(ret, 0, "H5Aget_name_by_idx");
} /* end for */
@@ -7063,8 +7062,8 @@ attr_iterate2_cb(hid_t loc_id, const char *attr_name, const H5A_info_t *info, vo
} /* end if */
/* Verify name of link */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (unsigned)my_info.corder);
- if (HDstrcmp(attr_name, attrname) != 0)
+ snprintf(attrname, sizeof(attrname), "attr %02u", (unsigned)my_info.corder);
+ if (strcmp(attr_name, attrname) != 0)
return (H5_ITER_ERROR);
/* Check if we've visited this link before */
@@ -7604,7 +7603,7 @@ test_attr_iterate2(bool new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -7691,7 +7690,7 @@ test_attr_iterate2(bool new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for (u = max_compact; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -8005,7 +8004,7 @@ test_attr_open_by_idx(bool new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -8068,7 +8067,7 @@ test_attr_open_by_idx(bool new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for (u = max_compact; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -8174,7 +8173,7 @@ attr_open_check(hid_t fid, const char *dsetname, hid_t obj_id, unsigned max_attr
/* Open each attribute on object by index and check that it's the correct one */
for (u = 0; u < max_attrs; u++) {
/* Open the attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr_id = H5Aopen(obj_id, attrname, H5P_DEFAULT);
CHECK(attr_id, FAIL, "H5Aopen");
@@ -8357,7 +8356,7 @@ test_attr_open_by_name(bool new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -8435,7 +8434,7 @@ test_attr_open_by_name(bool new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for (u = max_compact; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -8632,7 +8631,7 @@ test_attr_create_by_name(bool new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate_by_name(fid, dsetname, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate_by_name");
@@ -8689,7 +8688,7 @@ test_attr_create_by_name(bool new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for (u = max_compact; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate_by_name(fid, dsetname, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate_by_name");
@@ -8923,7 +8922,7 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
/* Add attributes to each dataset, until after converting to dense storage */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
/* Alternate between creating "small" & "big" attributes */
if (u % 2) {
@@ -9272,7 +9271,7 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
/* Add attributes to each dataset, until after converting to dense storage */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
/* Alternate between creating "small" & "big" attributes */
if (u % 2) {
@@ -9381,7 +9380,7 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
#endif
/* Create new attribute name */
- HDsnprintf(attrname2, sizeof(attrname2), "new attr %02u", u);
+ snprintf(attrname2, sizeof(attrname2), "new attr %02u", u);
/* Change second dataset's attribute's name */
ret = H5Arename_by_name(fid, DSET2_NAME, attrname, attrname2, H5P_DEFAULT);
@@ -9731,7 +9730,7 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
/* Add attributes to each dataset, until after converting to dense storage */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
/* Alternate between creating "small" & "big" attributes */
if (u % 2) {
@@ -9843,7 +9842,7 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
/* Delete attributes from second dataset */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
/* Delete second dataset's attribute */
ret = H5Adelete_by_name(fid, DSET2_NAME, attrname, H5P_DEFAULT);
@@ -10115,7 +10114,7 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
/* Add attributes to each dataset, until after converting to dense storage */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
/* Alternate between creating "small" & "big" attributes */
if (u % 2) {
@@ -10244,7 +10243,7 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
/* Check ref count on attributes of first dataset */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
/* Open attribute on first dataset */
attr = H5Aopen(dataset, attrname, H5P_DEFAULT);
@@ -10518,7 +10517,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl)
/* Create attributes on group */
for (i = 0; i < BUG2_NATTR; i++) {
- HDsnprintf(aname, sizeof(aname), "%03u", i);
+ snprintf(aname, sizeof(aname), "%03u", i);
aid = H5Acreate2(gid, aname, H5T_STD_I32LE, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
@@ -10528,7 +10527,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl)
/* Delete every other attribute */
for (i = 1; i < BUG2_NATTR; i += 2) {
- HDsnprintf(aname, sizeof(aname), "%03u", i);
+ snprintf(aname, sizeof(aname), "%03u", i);
ret = H5Adelete(gid, aname);
CHECK(ret, FAIL, "H5Adelete");
}
@@ -10552,7 +10551,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl)
/* Open an attribute in the middle */
i = (BUG2_NATTR / 4) * 2;
- HDsnprintf(aname, sizeof(aname), "%03u", i);
+ snprintf(aname, sizeof(aname), "%03u", i);
aid = H5Aopen(gid, aname, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Aopen");
@@ -10595,7 +10594,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl)
/* Create attributes on group */
for (i = 0; i < BUG2_NATTR2; i++) {
- HDsnprintf(aname, sizeof(aname), "%03u", i);
+ snprintf(aname, sizeof(aname), "%03u", i);
aid = H5Acreate2(gid, aname, H5T_STD_I32LE, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
@@ -10605,7 +10604,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl)
/* Delete every other attribute */
for (i = 0; i < BUG2_NATTR2; i++) {
- HDsnprintf(aname, sizeof(aname), "%03u", i);
+ snprintf(aname, sizeof(aname), "%03u", i);
ret = H5Adelete(gid, aname);
CHECK(ret, FAIL, "H5Adelete");
}
@@ -11465,7 +11464,7 @@ test_attr_bug9(hid_t fcpl, hid_t fapl)
/* Create enough attributes to cause a change to dense storage */
for (i = 0; i < max_compact + 1; i++) {
/* Create attribute */
- HDsnprintf(aname, sizeof(aname), "%u", i);
+ snprintf(aname, sizeof(aname), "%u", i);
aid = H5Acreate2(gid, aname, H5T_NATIVE_CHAR, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
diff --git a/test/API/tcoords.c b/test/API/tcoords.c
index 2471504..5599def 100644
--- a/test/API/tcoords.c
+++ b/test/API/tcoords.c
@@ -87,9 +87,9 @@ test_singleEnd_selElements(hid_t file, bool is_chunked)
/* Construct dataset's name */
memset(dset_name, 0, (size_t)NAME_LEN);
- HDstrcat(dset_name, SINGLE_END_DSET);
+ strcat(dset_name, SINGLE_END_DSET);
if (is_chunked)
- HDstrcat(dset_name, "_chunked");
+ strcat(dset_name, "_chunked");
did = H5Dcreate2(file, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, plid, H5P_DEFAULT);
CHECK(did, FAIL, "H5Dcreate2");
@@ -259,9 +259,9 @@ test_singleEnd_selHyperslab(hid_t file, bool is_chunked)
/* Construct dataset's name */
memset(dset_name, 0, NAME_LEN);
- HDstrcat(dset_name, SINGLE_END_DSET);
+ strcat(dset_name, SINGLE_END_DSET);
if (is_chunked)
- HDstrcat(dset_name, "_chunked");
+ strcat(dset_name, "_chunked");
/* Dataspace for the dataset in file */
sid = H5Screate_simple(4, da_dims, da_dims);
@@ -462,9 +462,9 @@ test_multiple_ends(hid_t file, bool is_chunked)
/* Construct dataset's name */
memset(dset_name, 0, NAME_LEN);
- HDstrcat(dset_name, MULTI_ENDS_SEL_HYPER_DSET);
+ strcat(dset_name, MULTI_ENDS_SEL_HYPER_DSET);
if (is_chunked)
- HDstrcat(dset_name, "_chunked");
+ strcat(dset_name, "_chunked");
did = H5Dcreate2(file, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, plid, H5P_DEFAULT);
CHECK(did, FAIL, "H5Dcreate2");
diff --git a/test/API/testhdf5.c b/test/API/testhdf5.c
index e82ac12..c2b4260 100644
--- a/test/API/testhdf5.c
+++ b/test/API/testhdf5.c
@@ -56,7 +56,7 @@ print_func(const char *format, ...)
int ret_value;
va_start(arglist, format);
- ret_value = HDvprintf(format, arglist);
+ ret_value = vprintf(format, arglist);
va_end(arglist);
return ret_value;
}
@@ -76,7 +76,7 @@ TestErrPrintf(const char *format, ...)
/* Print the requested information */
va_start(arglist, format);
- ret_value = HDvprintf(format, arglist);
+ ret_value = vprintf(format, arglist);
va_end(arglist);
/* Return the length of the string produced (like printf() does) */
@@ -123,7 +123,7 @@ getenv_all(MPI_Comm comm, int root, const char *name)
if (mpi_rank == root) {
env = HDgetenv(name);
if (env) {
- len = (int)HDstrlen(env);
+ len = (int)strlen(env);
MPI_Bcast(&len, 1, MPI_INT, root, comm);
MPI_Bcast(env, len, MPI_CHAR, root, comm);
}
@@ -138,7 +138,7 @@ getenv_all(MPI_Comm comm, int root, const char *name)
if (len >= 0) {
if (env == NULL)
env = (char *)malloc((size_t)len + 1);
- else if (HDstrlen(env) < (size_t)len)
+ else if (strlen(env) < (size_t)len)
env = (char *)realloc(env, (size_t)len + 1);
MPI_Bcast(env, len, MPI_CHAR, root, comm);
@@ -235,12 +235,12 @@ h5_get_libver_fapl(hid_t fapl)
* If it's nothing (environment variable was whitespace)
* just return the default fapl.
*/
- HDstrncpy(buf, env, sizeof(buf));
+ strncpy(buf, env, sizeof(buf));
buf[sizeof(buf) - 1] = '\0';
if (NULL == (tok = HDstrtok_r(buf, " \t\n\r", &lasts)))
goto done;
- if (!HDstrcmp(tok, "latest")) {
+ if (!strcmp(tok, "latest")) {
/* use the latest format */
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
goto error;
@@ -302,7 +302,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
* we are using the split driver since both of those
* use the multi VFD under the hood.
*/
- if (driver_env_var && !HDstrcmp(driver_env_var, "split")) {
+ if (driver_env_var && !strcmp(driver_env_var, "split")) {
/* split VFD */
if (subst_for_superblock)
suffix = ".h5.meta";
@@ -396,7 +396,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
/* This is a parallel system */
char *subdir;
- if (!HDstrcmp(prefix, HDF5_PARAPREFIX)) {
+ if (!strcmp(prefix, HDF5_PARAPREFIX)) {
/*
* If the prefix specifies the HDF5_PARAPREFIX directory, then
* default to using the "/tmp/$USER" or "/tmp/$LOGIN"
@@ -421,11 +421,11 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
if (!fullname[0]) {
/* We didn't append the prefix yet */
- HDstrncpy(fullname, prefix, size);
+ strncpy(fullname, prefix, size);
fullname[size - 1] = '\0';
}
- if (HDstrlen(fullname) + HDstrlen(base_name) + 1 < size) {
+ if (strlen(fullname) + strlen(base_name) + 1 < size) {
/*
* Append the base_name with a slash first. Multiple
* slashes are handled below.
@@ -440,10 +440,10 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
* subdirectory. Default to PREFIX's original
* prefix value.
*/
- HDstrcpy(fullname, prefix);
+ strcpy(fullname, prefix);
- HDstrcat(fullname, "/");
- HDstrcat(fullname, base_name);
+ strcat(fullname, "/");
+ strcat(fullname, base_name);
}
else {
/* Buffer is too small */
@@ -451,25 +451,25 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
}
}
else {
- if (HDsnprintf(fullname, size, "%s/%s", prefix, base_name) == (int)size)
+ if (snprintf(fullname, size, "%s/%s", prefix, base_name) == (int)size)
/* Buffer is too small */
return NULL;
}
}
- else if (HDstrlen(base_name) >= size) {
+ else if (strlen(base_name) >= size) {
/* Buffer is too small */
return NULL;
}
else {
- HDstrcpy(fullname, base_name);
+ strcpy(fullname, base_name);
}
/* Append a suffix */
if (suffix) {
- if (HDstrlen(fullname) + HDstrlen(suffix) >= size)
+ if (strlen(fullname) + strlen(suffix) >= size)
return NULL;
- HDstrcat(fullname, suffix);
+ strcat(fullname, suffix);
}
/* Remove any double slashes in the filename */
@@ -506,7 +506,7 @@ h5_using_default_driver(const char *drv_name)
drv_name = HDgetenv(HDF5_DRIVER);
if (drv_name)
- return (!HDstrcmp(drv_name, "sec2") || !HDstrcmp(drv_name, "nomatch"));
+ return (!strcmp(drv_name, "sec2") || !strcmp(drv_name, "nomatch"));
return ret_val;
}
diff --git a/test/API/testhdf5.h b/test/API/testhdf5.h
index 6cdcb2e..4e9e81d 100644
--- a/test/API/testhdf5.h
+++ b/test/API/testhdf5.h
@@ -147,7 +147,7 @@
"%s \n", \
(where), (int)__LINE__, __FILE__, x); \
} \
- if (HDstrcmp(x, val) != 0) { \
+ if (strcmp(x, val) != 0) { \
TestErrPrintf("*** UNEXPECTED VALUE from %s should be %s, but is %s at line %4d " \
"in %s\n", \
where, val, x, (int)__LINE__, __FILE__); \
@@ -220,27 +220,27 @@
}
#define PASSED() \
{ \
- HDputs(" PASSED"); \
+ puts(" PASSED"); \
fflush(stdout); \
}
#define H5_FAILED() \
{ \
- HDputs("*FAILED*"); \
+ puts("*FAILED*"); \
fflush(stdout); \
}
#define H5_WARNING() \
{ \
- HDputs("*WARNING*"); \
+ puts("*WARNING*"); \
fflush(stdout); \
}
#define SKIPPED() \
{ \
- HDputs(" -SKIP-"); \
+ puts(" -SKIP-"); \
fflush(stdout); \
}
#define PUTS_ERROR(s) \
{ \
- HDputs(s); \
+ puts(s); \
AT(); \
goto error; \
}
@@ -266,7 +266,7 @@
{ \
H5_FAILED(); \
AT(); \
- HDputs(s); \
+ puts(s); \
goto error; \
}
diff --git a/test/API/tfile.c b/test/API/tfile.c
index 8704b62..d404a82 100644
--- a/test/API/tfile.c
+++ b/test/API/tfile.c
@@ -1213,14 +1213,14 @@ test_get_obj_ids(void)
/* creates NGROUPS groups under the root group */
for (m = 0; m < NGROUPS; m++) {
- HDsnprintf(gname, sizeof(gname), "group%d", m);
+ snprintf(gname, sizeof(gname), "group%d", m);
gid[m] = H5Gcreate2(fid, gname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(gid[m], FAIL, "H5Gcreate2");
}
/* create NDSETS datasets under the root group */
for (n = 0; n < NDSETS; n++) {
- HDsnprintf(dname, sizeof(dname), "dataset%d", n);
+ snprintf(dname, sizeof(dname), "dataset%d", n);
dset[n] = H5Dcreate2(fid, dname, H5T_NATIVE_INT, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(dset[n], FAIL, "H5Dcreate2");
}
@@ -1280,7 +1280,7 @@ test_get_obj_ids(void)
/* Open NDSETS datasets under the root group */
for (n = 0; n < NDSETS; n++) {
- HDsnprintf(dname, sizeof(dname), "dataset%d", n);
+ snprintf(dname, sizeof(dname), "dataset%d", n);
dset[n] = H5Dopen2(fid, dname, H5P_DEFAULT);
CHECK(dset[n], FAIL, "H5Dcreate2");
}
@@ -1837,7 +1837,7 @@ test_file_is_accessible(const char *env_h5_drvr)
/* This test is not currently working for the family VFD.
* There are failures when creating files with userblocks.
*/
- if (0 != HDstrcmp(env_h5_drvr, "family")) {
+ if (0 != strcmp(env_h5_drvr, "family")) {
/* Create a file creation property list with a non-default user block size */
fcpl_id = H5Pcreate(H5P_FILE_CREATE);
CHECK(fcpl_id, H5I_INVALID_HID, "H5Pcreate");
@@ -3065,8 +3065,8 @@ test_userblock_file_size(const char *env_h5_drvr)
herr_t ret; /* Generic return value */
/* Don't run with multi/split, family or direct drivers */
- if (!HDstrcmp(env_h5_drvr, "multi") || !HDstrcmp(env_h5_drvr, "split") ||
- !HDstrcmp(env_h5_drvr, "family") || !HDstrcmp(env_h5_drvr, "direct"))
+ if (!strcmp(env_h5_drvr, "multi") || !strcmp(env_h5_drvr, "split") ||
+ !strcmp(env_h5_drvr, "family") || !strcmp(env_h5_drvr, "direct"))
return;
/* Output message about test being performed */
@@ -4119,7 +4119,7 @@ test_filespace_info(const char *env_h5_drvr)
MESSAGE(5, ("Testing file creation public routines: H5Pget/set_file_space_strategy & "
"H5Pget/set_file_space_page_size\n"));
- contig_addr_vfd = (bool)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
fapl = h5_fileaccess();
h5_fixname(FILESPACE_NAME[0], fapl, filename, sizeof filename);
@@ -4542,8 +4542,8 @@ test_file_freespace(const char *env_h5_drvr)
hsize_t expected_fs_del; /* Freespace expected after delete */
herr_t ret; /* Return value */
- split_vfd = !HDstrcmp(env_h5_drvr, "split");
- multi_vfd = !HDstrcmp(env_h5_drvr, "multi");
+ split_vfd = !strcmp(env_h5_drvr, "split");
+ multi_vfd = !strcmp(env_h5_drvr, "multi");
if (!split_vfd && !multi_vfd) {
fapl = h5_fileaccess();
@@ -4630,7 +4630,7 @@ test_file_freespace(const char *env_h5_drvr)
/* Create datasets in file */
for (u = 0; u < 10; u++) {
- HDsnprintf(name, sizeof(name), "Dataset %u", u);
+ snprintf(name, sizeof(name), "Dataset %u", u);
dset = H5Dcreate2(file, name, H5T_STD_U32LE, dspace, H5P_DEFAULT, dcpl, H5P_DEFAULT);
CHECK(dset, FAIL, "H5Dcreate2");
@@ -4653,7 +4653,7 @@ test_file_freespace(const char *env_h5_drvr)
#endif
/* Delete datasets in file */
for (k = 9; k >= 0; k--) {
- HDsnprintf(name, sizeof(name), "Dataset %u", (unsigned)k);
+ snprintf(name, sizeof(name), "Dataset %u", (unsigned)k);
ret = H5Ldelete(file, name, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Ldelete");
} /* end for */
@@ -4721,8 +4721,8 @@ test_sects_freespace(const char *env_h5_drvr, bool new_format)
/* Output message about test being performed */
MESSAGE(5, ("Testing H5Fget_free_sections()--free-space section info in the file\n"));
- split_vfd = !HDstrcmp(env_h5_drvr, "split");
- multi_vfd = !HDstrcmp(env_h5_drvr, "multi");
+ split_vfd = !strcmp(env_h5_drvr, "split");
+ multi_vfd = !strcmp(env_h5_drvr, "multi");
if (!split_vfd && !multi_vfd) {
@@ -4784,7 +4784,7 @@ test_sects_freespace(const char *env_h5_drvr, bool new_format)
/* Create datasets in file */
for (u = 0; u < 10; u++) {
- HDsnprintf(name, sizeof(name), "Dataset %u", u);
+ snprintf(name, sizeof(name), "Dataset %u", u);
dset = H5Dcreate2(file, name, H5T_STD_U32LE, dspace, H5P_DEFAULT, dcpl, H5P_DEFAULT);
CHECK(dset, FAIL, "H5Dcreate2");
@@ -4802,7 +4802,7 @@ test_sects_freespace(const char *env_h5_drvr, bool new_format)
/* Delete odd-numbered datasets in file */
for (u = 0; u < 10; u++) {
- HDsnprintf(name, sizeof(name), "Dataset %u", u);
+ snprintf(name, sizeof(name), "Dataset %u", u);
if (u % 2) {
ret = H5Ldelete(file, name, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Ldelete");
@@ -7819,7 +7819,7 @@ test_incr_filesize(void)
/* Create datasets in file */
for (u = 0; u < 10; u++) {
- HDsnprintf(name, sizeof(name), "Dataset %u", u);
+ snprintf(name, sizeof(name), "Dataset %u", u);
dset = H5Dcreate2(fid, name, H5T_STD_U32LE, dspace, H5P_DEFAULT, dcpl, H5P_DEFAULT);
CHECK(dset, FAIL, "H5Dcreate2");
diff --git a/test/API/tgenprop.c b/test/API/tgenprop.c
index 4b64bae..9a1f551 100644
--- a/test/API/tgenprop.c
+++ b/test/API/tgenprop.c
@@ -94,7 +94,7 @@ test_genprop_basic_class(void)
/* Check class name */
name = H5Pget_class_name(cid1);
CHECK_PTR(name, "H5Pget_class_name");
- if (HDstrcmp(name, CLASS1_NAME) != 0)
+ if (strcmp(name, CLASS1_NAME) != 0)
TestErrPrintf("Class names don't match!, name=%s, CLASS1_NAME=%s\n", name, CLASS1_NAME);
H5free_memory(name);
@@ -125,7 +125,7 @@ test_genprop_basic_class(void)
/* Check class name */
name = H5Pget_class_name(cid1);
CHECK_PTR(name, "H5Pget_class_name");
- if (HDstrcmp(name, CLASS2_NAME) != 0)
+ if (strcmp(name, CLASS2_NAME) != 0)
TestErrPrintf("Class names don't match!, name=%s, CLASS2_NAME=%s\n", name, CLASS2_NAME);
H5free_memory(name);
@@ -313,7 +313,7 @@ test_genprop_iter1(hid_t H5_ATTR_UNUSED id, const char *name, void *iter_data)
{
iter_data_t *idata = (iter_data_t *)iter_data;
- return HDstrcmp(name, idata->names[idata->iter_count++]);
+ return strcmp(name, idata->names[idata->iter_count++]);
}
/****************************************************************
@@ -868,7 +868,7 @@ test_genprop_iter2(hid_t H5_ATTR_UNUSED id, const char *name, void *iter_data)
{
iter_data_t *idata = (iter_data_t *)iter_data;
- return HDstrcmp(name, idata->names[idata->iter_count++]);
+ return strcmp(name, idata->names[idata->iter_count++]);
}
/****************************************************************
@@ -1026,7 +1026,7 @@ test_genprop_prop_crt_cb1(const char *name, size_t size, void *def_value)
{
/* Set the information from the creation call */
prop1_cb_info.crt_count++;
- prop1_cb_info.crt_name = HDstrdup(name);
+ prop1_cb_info.crt_name = strdup(name);
prop1_cb_info.crt_value = malloc(size);
memcpy(prop1_cb_info.crt_value, def_value, size);
@@ -1045,7 +1045,7 @@ test_genprop_prop_set_cb1(hid_t plist_id, const char *name, size_t size, void *v
prop1_cb_info.set_count++;
prop1_cb_info.set_plist_id = plist_id;
if (prop1_cb_info.set_name == NULL)
- prop1_cb_info.set_name = HDstrdup(name);
+ prop1_cb_info.set_name = strdup(name);
if (prop1_cb_info.set_value == NULL)
prop1_cb_info.set_value = malloc(size);
memcpy(prop1_cb_info.set_value, value, size);
@@ -1065,7 +1065,7 @@ test_genprop_prop_get_cb1(hid_t plist_id, const char *name, size_t size, void *v
prop1_cb_info.get_count++;
prop1_cb_info.get_plist_id = plist_id;
if (prop1_cb_info.get_name == NULL)
- prop1_cb_info.get_name = HDstrdup(name);
+ prop1_cb_info.get_name = strdup(name);
if (prop1_cb_info.get_value == NULL)
prop1_cb_info.get_value = malloc(size);
memcpy(prop1_cb_info.get_value, value, size);
@@ -1084,7 +1084,7 @@ test_genprop_prop_cop_cb1(const char *name, size_t size, void *value)
/* Set the information from the get call */
prop1_cb_info.cop_count++;
if (prop1_cb_info.cop_name == NULL)
- prop1_cb_info.cop_name = HDstrdup(name);
+ prop1_cb_info.cop_name = strdup(name);
if (prop1_cb_info.cop_value == NULL)
prop1_cb_info.cop_value = malloc(size);
memcpy(prop1_cb_info.cop_value, value, size);
@@ -1131,7 +1131,7 @@ test_genprop_prop_cls_cb1(const char *name, size_t size, void *value)
/* Set the information from the close call */
prop1_cb_info.cls_count++;
if (prop1_cb_info.cls_name == NULL)
- prop1_cb_info.cls_name = HDstrdup(name);
+ prop1_cb_info.cls_name = strdup(name);
if (prop1_cb_info.cls_value == NULL)
prop1_cb_info.cls_value = malloc(size);
memcpy(prop1_cb_info.cls_value, value, size);
@@ -1150,7 +1150,7 @@ test_genprop_prop_del_cb2(hid_t plist_id, const char *name, size_t size, void *v
/* Set the information from the delete call */
prop2_cb_info.del_count++;
prop2_cb_info.del_plist_id = plist_id;
- prop2_cb_info.del_name = HDstrdup(name);
+ prop2_cb_info.del_name = strdup(name);
prop2_cb_info.del_value = malloc(size);
memcpy(prop2_cb_info.del_value, value, size);
@@ -1238,7 +1238,7 @@ test_genprop_list_callback(void)
/* Verify creation callback information for properties tracked */
VERIFY(prop1_cb_info.crt_count, 1, "H5Pcreate");
- if (HDstrcmp(prop1_cb_info.crt_name, PROP1_NAME) != 0)
+ if (strcmp(prop1_cb_info.crt_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop1_cb_info.crt_value, PROP1_DEF_VALUE, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
@@ -1274,7 +1274,7 @@ test_genprop_list_callback(void)
/* Verify get callback information for properties tracked */
VERIFY(prop1_cb_info.get_count, 1, "H5Pget");
VERIFY(prop1_cb_info.get_plist_id, lid1, "H5Pget");
- if (HDstrcmp(prop1_cb_info.get_name, PROP1_NAME) != 0)
+ if (strcmp(prop1_cb_info.get_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop1_cb_info.get_value, PROP1_DEF_VALUE, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
@@ -1286,7 +1286,7 @@ test_genprop_list_callback(void)
/* Verify set callback information for properties tracked */
VERIFY(prop1_cb_info.set_count, 1, "H5Pset");
VERIFY(prop1_cb_info.set_plist_id, lid1, "H5Pset");
- if (HDstrcmp(prop1_cb_info.set_name, PROP1_NAME) != 0)
+ if (strcmp(prop1_cb_info.set_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop1_cb_info.set_value, &prop1_new_value, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
@@ -1309,7 +1309,7 @@ test_genprop_list_callback(void)
/* Verify get callback information again for properties tracked */
VERIFY(prop1_cb_info.get_count, 2, "H5Pget");
VERIFY(prop1_cb_info.get_plist_id, lid1, "H5Pget");
- if (HDstrcmp(prop1_cb_info.get_name, PROP1_NAME) != 0)
+ if (strcmp(prop1_cb_info.get_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop1_cb_info.get_value, &prop1_new_value, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
@@ -1321,7 +1321,7 @@ test_genprop_list_callback(void)
/* Verify delete callback information for properties tracked */
VERIFY(prop2_cb_info.del_count, 1, "H5Premove");
VERIFY(prop2_cb_info.del_plist_id, lid1, "H5Premove");
- if (HDstrcmp(prop2_cb_info.del_name, PROP2_NAME) != 0)
+ if (strcmp(prop2_cb_info.del_name, PROP2_NAME) != 0)
TestErrPrintf("Property #2 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop2_cb_info.del_value, PROP2_DEF_VALUE, PROP2_SIZE) != 0)
TestErrPrintf("Property #2 value doesn't match!, line=%d\n", __LINE__);
@@ -1332,7 +1332,7 @@ test_genprop_list_callback(void)
/* Verify copy callback information for properties tracked */
VERIFY(prop1_cb_info.cop_count, 1, "H5Pcopy");
- if (HDstrcmp(prop1_cb_info.cop_name, PROP1_NAME) != 0)
+ if (strcmp(prop1_cb_info.cop_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop1_cb_info.cop_value, &prop1_new_value, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
@@ -1355,7 +1355,7 @@ test_genprop_list_callback(void)
/* Verify close callback information for properties tracked */
VERIFY(prop1_cb_info.cls_count, 1, "H5Pclose");
- if (HDstrcmp(prop1_cb_info.cls_name, PROP1_NAME) != 0)
+ if (strcmp(prop1_cb_info.cls_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop1_cb_info.cls_value, &prop1_new_value, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
@@ -1811,7 +1811,7 @@ test_genprop_path(void)
/* Get full path for first class */
path = H5P__get_class_path_test(cid1);
CHECK_PTR(path, "H5P__get_class_path_test");
- if (HDstrcmp(path, CLASS1_PATH) != 0)
+ if (strcmp(path, CLASS1_PATH) != 0)
TestErrPrintf("Class names don't match!, path=%s, CLASS1_PATH=%s\n", path, CLASS1_PATH);
H5free_memory(path);
#endif
@@ -1827,7 +1827,7 @@ test_genprop_path(void)
/* Get full path for second class */
path = H5P__get_class_path_test(cid2);
CHECK_PTR(path, "H5P__get_class_path_test");
- if (HDstrcmp(path, CLASS2_PATH) != 0)
+ if (strcmp(path, CLASS2_PATH) != 0)
TestErrPrintf("Class names don't match!, path=%s, CLASS2_PATH=%s\n", path, CLASS2_PATH);
/* Open a copy of the class with the path name */
@@ -1888,7 +1888,7 @@ test_genprop_refcount(void)
/* Check class name */
name = H5Pget_class_name(cid1);
CHECK_PTR(name, "H5Pget_class_name");
- if (HDstrcmp(name, CLASS1_NAME) != 0)
+ if (strcmp(name, CLASS1_NAME) != 0)
TestErrPrintf("Class names don't match!, name=%s, CLASS1_NAME=%s\n", name, CLASS1_NAME);
H5free_memory(name);
@@ -1907,7 +1907,7 @@ test_genprop_refcount(void)
/* Check class name */
name = H5Pget_class_name(cid1);
CHECK_PTR(name, "H5Pget_class_name");
- if (HDstrcmp(name, CLASS1_NAME) != 0)
+ if (strcmp(name, CLASS1_NAME) != 0)
TestErrPrintf("Class names don't match!, name=%s, CLASS1_NAME=%s\n", name, CLASS1_NAME);
H5free_memory(name);
@@ -1918,7 +1918,7 @@ test_genprop_refcount(void)
/* Check class name */
name = H5Pget_class_name(cid1);
CHECK_PTR(name, "H5Pget_class_name");
- if (HDstrcmp(name, CLASS1_NAME) != 0)
+ if (strcmp(name, CLASS1_NAME) != 0)
TestErrPrintf("Class names don't match!, name=%s, CLASS1_NAME=%s\n", name, CLASS1_NAME);
H5free_memory(name);
diff --git a/test/API/th5o.c b/test/API/th5o.c
index f666473..8a052ee 100644
--- a/test/API/th5o.c
+++ b/test/API/th5o.c
@@ -1209,7 +1209,7 @@ test_h5o_comment(void)
len = H5Oget_comment(fid, check_comment, (size_t)comment_len + 1);
CHECK(len, FAIL, "H5Oget_comment");
- ret_value = HDstrcmp(file_comment, check_comment);
+ ret_value = strcmp(file_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment");
/* Open the group */
@@ -1223,7 +1223,7 @@ test_h5o_comment(void)
len = H5Oget_comment(grp, check_comment, (size_t)comment_len + 1);
CHECK(len, FAIL, "H5Oget_comment");
- ret_value = HDstrcmp(grp_comment, check_comment);
+ ret_value = strcmp(grp_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment");
/* Open the datatype */
@@ -1237,7 +1237,7 @@ test_h5o_comment(void)
len = H5Oget_comment(dtype, check_comment, (size_t)comment_len + 1);
CHECK(len, FAIL, "H5Oget_comment");
- ret_value = HDstrcmp(dtype_comment, check_comment);
+ ret_value = strcmp(dtype_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment");
/* Open the dataset */
@@ -1251,7 +1251,7 @@ test_h5o_comment(void)
len = H5Oget_comment(dset, check_comment, (size_t)comment_len + 1);
CHECK(ret, len, "H5Oget_comment");
- ret_value = HDstrcmp(dset_comment, check_comment);
+ ret_value = strcmp(dset_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment");
/* Close the IDs */
@@ -1384,7 +1384,7 @@ test_h5o_comment_by_name(void)
len = H5Oget_comment_by_name(fid, ".", check_comment, (size_t)comment_len + 1, H5P_DEFAULT);
CHECK(len, FAIL, "H5Oget_comment_by_name");
- ret_value = HDstrcmp(file_comment, check_comment);
+ ret_value = strcmp(file_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment_by_name");
/* Open the group */
@@ -1398,7 +1398,7 @@ test_h5o_comment_by_name(void)
len = H5Oget_comment_by_name(fid, "group", check_comment, (size_t)comment_len + 1, H5P_DEFAULT);
CHECK(len, FAIL, "H5Oget_comment_by_name");
- ret_value = HDstrcmp(grp_comment, check_comment);
+ ret_value = strcmp(grp_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment_by_name");
/* Getting the comment on the datatype and verify it */
@@ -1408,7 +1408,7 @@ test_h5o_comment_by_name(void)
len = H5Oget_comment_by_name(grp, "datatype", check_comment, (size_t)comment_len + 1, H5P_DEFAULT);
CHECK(len, FAIL, "H5Oget_comment");
- ret_value = HDstrcmp(dtype_comment, check_comment);
+ ret_value = strcmp(dtype_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment_by_name");
/* Getting the comment on the dataset and verify it */
@@ -1418,7 +1418,7 @@ test_h5o_comment_by_name(void)
len = H5Oget_comment_by_name(fid, "dataset", check_comment, (size_t)comment_len + 1, H5P_DEFAULT);
CHECK(len, FAIL, "H5Oget_comment_by_name");
- ret_value = HDstrcmp(dset_comment, check_comment);
+ ret_value = strcmp(dset_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment_by_name");
/* Close the IDs */
@@ -1706,16 +1706,16 @@ visit_obj_cb(hid_t group_id, const char *name, const H5O_info1_t *oinfo1, void H
H5O_info1_t oinfo2; /* Object info structs */
/* Verify the object info for "group1", "group2" and the root group */
- if (!(HDstrcmp(name, "group1"))) {
+ if (!(strcmp(name, "group1"))) {
H5Oget_info_by_name2(group_id, name, &oinfo2, H5O_INFO_NUM_ATTRS, H5P_DEFAULT);
VERIFY(oinfo1->num_attrs, oinfo2.num_attrs, "obj info from H5Ovisit1");
}
- else if (!(HDstrcmp(name, "group2"))) {
+ else if (!(strcmp(name, "group2"))) {
H5Oget_info_by_name2(group_id, name, &oinfo2, H5O_INFO_HDR, H5P_DEFAULT);
VERIFY(oinfo1->hdr.nmesgs, oinfo2.hdr.nmesgs, "obj info from H5Ovisit1/H5Oget_info2");
VERIFY(oinfo1->hdr.nchunks, oinfo2.hdr.nchunks, "obj info from H5Ovisit1/H5Oget_info2");
}
- else if (!(HDstrcmp(name, "."))) {
+ else if (!(strcmp(name, "."))) {
H5Oget_info_by_name2(group_id, name, &oinfo2, H5O_INFO_META_SIZE, H5P_DEFAULT);
VERIFY(oinfo1->meta_size.obj.index_size, oinfo2.meta_size.obj.index_size,
"obj info from H5Ovisit1/H5Oget_info2");
@@ -1768,7 +1768,7 @@ test_h5o_getinfo_visit(void)
/* Attach 10 attributes to "group1" */
for (j = 0; j < 10; j++) {
/* Create the attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr%u", j);
+ snprintf(attrname, sizeof(attrname), "attr%u", j);
/* Create the attribute */
aid = H5Acreate2(gid1, attrname, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
diff --git a/test/API/titerate.c b/test/API/titerate.c
index 741d45a..5e6ce36 100644
--- a/test/API/titerate.c
+++ b/test/API/titerate.c
@@ -74,7 +74,7 @@ herr_t aiter_cb(hid_t group, const char *name, const H5A_info_t *ainfo, v
H5_ATTR_PURE int
iter_strcmp(const void *s1, const void *s2)
{
- return (HDstrcmp(*(const char *const *)s1, *(const char *const *)s2));
+ return (strcmp(*(const char *const *)s1, *(const char *const *)s2));
}
/****************************************************************
@@ -97,7 +97,7 @@ liter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2_t H5_ATTR
return 1;
}
- HDstrcpy(info->name, name);
+ strcpy(info->name, name);
switch (info->command) {
case RET_ZERO:
@@ -166,12 +166,12 @@ test_iter_group(hid_t fapl, bool new_format)
CHECK(filespace, FAIL, "H5Screate");
for (i = 0; i < NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "Dataset %d", i);
+ snprintf(name, sizeof(name), "Dataset %d", i);
dataset = H5Dcreate2(file, name, datatype, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(dataset, FAIL, "H5Dcreate2");
/* Keep a copy of the dataset names around for later */
- lnames[i] = HDstrdup(name);
+ lnames[i] = strdup(name);
CHECK_PTR(lnames[i], "strdup");
ret = H5Dclose(dataset);
@@ -182,13 +182,13 @@ test_iter_group(hid_t fapl, bool new_format)
grp = H5Gcreate2(file, "grp", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Gcreate2");
- lnames[NDATASETS] = HDstrdup("grp");
+ lnames[NDATASETS] = strdup("grp");
CHECK_PTR(lnames[NDATASETS], "strdup");
ret = H5Tcommit2(file, "dtype", datatype, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Tcommit2");
- lnames[NDATASETS + 1] = HDstrdup("dtype");
+ lnames[NDATASETS + 1] = strdup("dtype");
CHECK_PTR(lnames[NDATASETS], "strdup");
/* Close everything up */
@@ -333,7 +333,7 @@ test_iter_group(hid_t fapl, bool new_format)
TestErrPrintf("Group iteration function walked too far!\n");
/* Verify that the correct name is retrieved */
- if (HDstrncmp(info.name, lnames[(size_t)(idx - 1)], NAMELEN) != 0)
+ if (strncmp(info.name, lnames[(size_t)(idx - 1)], NAMELEN) != 0)
TestErrPrintf(
"Group iteration function didn't return name correctly for link - lnames[%u] = '%s'!\n",
(unsigned)(idx - 1), lnames[(size_t)(idx - 1)]);
@@ -365,7 +365,7 @@ test_iter_group(hid_t fapl, bool new_format)
TestErrPrintf("Group iteration function walked too far!\n");
/* Verify that the correct name is retrieved */
- if (HDstrncmp(info.name, lnames[(size_t)(idx - 1)], NAMELEN) != 0)
+ if (strncmp(info.name, lnames[(size_t)(idx - 1)], NAMELEN) != 0)
TestErrPrintf(
"Group iteration function didn't return name correctly for link - lnames[%u] = '%s'!\n",
(unsigned)(idx - 1), lnames[(size_t)(idx - 1)]);
@@ -397,7 +397,7 @@ aiter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5A_info_t H5_ATTR_
static int count = 0;
static int count2 = 0;
- HDstrcpy(info->name, name);
+ strcpy(info->name, name);
switch (info->command) {
case RET_ZERO:
@@ -458,12 +458,12 @@ test_iter_attr(hid_t fapl, bool new_format)
CHECK(dataset, FAIL, "H5Dcreate2");
for (i = 0; i < NATTR; i++) {
- HDsnprintf(name, sizeof(name), "Attribute %02d", i);
+ snprintf(name, sizeof(name), "Attribute %02d", i);
attribute = H5Acreate2(dataset, name, H5T_NATIVE_INT, filespace, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attribute, FAIL, "H5Acreate2");
/* Keep a copy of the attribute names around for later */
- anames[i] = HDstrdup(name);
+ anames[i] = strdup(name);
CHECK_PTR(anames[i], "strdup");
ret = H5Aclose(attribute);
@@ -533,7 +533,7 @@ test_iter_attr(hid_t fapl, bool new_format)
if (!new_format) {
/* Verify that the correct name is retrieved */
if (idx > 0) {
- if (HDstrcmp(info.name, anames[(size_t)idx - 1]) != 0)
+ if (strcmp(info.name, anames[(size_t)idx - 1]) != 0)
TestErrPrintf(
"%u: Attribute iteration function didn't set names correctly, info.name = "
"'%s', anames[%u] = '%s'!\n",
@@ -567,7 +567,7 @@ test_iter_attr(hid_t fapl, bool new_format)
if (!new_format) {
/* Verify that the correct name is retrieved */
if (idx > 0) {
- if (HDstrcmp(info.name, anames[(size_t)idx - 1]) != 0)
+ if (strcmp(info.name, anames[(size_t)idx - 1]) != 0)
TestErrPrintf(
"%u: Attribute iteration function didn't set names correctly, info.name = "
"'%s', anames[%u] = '%s'!\n",
@@ -602,7 +602,7 @@ test_iter_attr(hid_t fapl, bool new_format)
H5_ATTR_PURE int
iter_strcmp2(const void *s1, const void *s2)
{
- return (HDstrcmp((const char *)s1, (const char *)s2));
+ return (strcmp((const char *)s1, (const char *)s2));
} /* end iter_strcmp2() */
/****************************************************************
@@ -624,7 +624,7 @@ liter_cb2(hid_t loc_id, const char *name, const H5L_info2_t H5_ATTR_UNUSED *link
return 1;
}
- if (HDstrcmp(name, test_info->name) != 0) {
+ if (strcmp(name, test_info->name) != 0) {
TestErrPrintf("name = '%s', test_info = '%s'\n", name, test_info->name);
return (H5_ITER_ERROR);
} /* end if */
@@ -691,10 +691,10 @@ test_iter_group_large(hid_t fapl)
/* Create a bunch of groups */
for (i = 0; i < ITER_NGROUPS; i++) {
- HDsnprintf(gname, sizeof(gname), "Group_%d", i);
+ snprintf(gname, sizeof(gname), "Group_%d", i);
/* Add the name to the list of objects in the root group */
- HDstrcpy(names[i].name, gname);
+ strcpy(names[i].name, gname);
names[i].type = H5O_TYPE_GROUP;
/* Create a group */
@@ -711,7 +711,7 @@ test_iter_group_large(hid_t fapl)
CHECK(dataset, FAIL, "H5Dcreate2");
/* Add the name to the list of objects in the root group */
- HDstrcpy(names[ITER_NGROUPS].name, "Dataset1");
+ strcpy(names[ITER_NGROUPS].name, "Dataset1");
names[ITER_NGROUPS].type = H5O_TYPE_DATASET;
/* Close Dataset */
@@ -741,7 +741,7 @@ test_iter_group_large(hid_t fapl)
CHECK(ret, FAIL, "H5Tcommit2");
/* Add the name to the list of objects in the root group */
- HDstrcpy(names[ITER_NGROUPS + 1].name, "Datatype1");
+ strcpy(names[ITER_NGROUPS + 1].name, "Datatype1");
names[ITER_NGROUPS + 1].type = H5O_TYPE_NAMED_DATATYPE;
/* Close datatype */
@@ -809,12 +809,12 @@ test_grp_memb_funcs(hid_t fapl)
CHECK(filespace, FAIL, "H5Screate");
for (i = 0; i < NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "Dataset %d", i);
+ snprintf(name, sizeof(name), "Dataset %d", i);
dataset = H5Dcreate2(file, name, datatype, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(dataset, FAIL, "H5Dcreate2");
/* Keep a copy of the dataset names around for later */
- dnames[i] = HDstrdup(name);
+ dnames[i] = strdup(name);
CHECK_PTR(dnames[i], "strdup");
ret = H5Dclose(dataset);
@@ -825,13 +825,13 @@ test_grp_memb_funcs(hid_t fapl)
grp = H5Gcreate2(file, "grp", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Gcreate2");
- dnames[NDATASETS] = HDstrdup("grp");
+ dnames[NDATASETS] = strdup("grp");
CHECK_PTR(dnames[NDATASETS], "strdup");
ret = H5Tcommit2(file, "dtype", datatype, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Tcommit2");
- dnames[NDATASETS + 1] = HDstrdup("dtype");
+ dnames[NDATASETS + 1] = strdup("dtype");
CHECK_PTR(dnames[NDATASETS], "strdup");
/* Close everything up */
@@ -880,18 +880,18 @@ test_grp_memb_funcs(hid_t fapl)
VERIFY(ret, name_len, "H5Lget_name_by_idx");
/* Keep a copy of the dataset names around for later */
- obj_names[i] = HDstrdup(dataset_name);
+ obj_names[i] = strdup(dataset_name);
CHECK_PTR(obj_names[i], "strdup");
ret = H5Oget_info_by_idx3(root_group, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, &oinfo,
H5O_INFO_BASIC, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_idx3");
- if (!HDstrcmp(dataset_name, "grp"))
+ if (!strcmp(dataset_name, "grp"))
VERIFY(oinfo.type, H5O_TYPE_GROUP, "H5Lget_name_by_idx");
- if (!HDstrcmp(dataset_name, "dtype"))
+ if (!strcmp(dataset_name, "dtype"))
VERIFY(oinfo.type, H5O_TYPE_NAMED_DATATYPE, "H5Lget_name_by_idx");
- if (!HDstrncmp(dataset_name, "Dataset", (size_t)7))
+ if (!strncmp(dataset_name, "Dataset", (size_t)7))
VERIFY(oinfo.type, H5O_TYPE_DATASET, "H5Lget_name_by_idx");
} /* end for */
@@ -909,8 +909,8 @@ test_grp_memb_funcs(hid_t fapl)
/* Compare object names */
for (i = 0; i < (int)ginfo.nlinks; i++) {
- ret = HDstrcmp(dnames[i], obj_names[i]);
- VERIFY(ret, 0, "HDstrcmp");
+ ret = strcmp(dnames[i], obj_names[i]);
+ VERIFY(ret, 0, "strcmp");
} /* end for */
ret = H5Gclose(root_group);
@@ -988,11 +988,11 @@ test_links(hid_t fapl)
CHECK(ret, FAIL, "H5Oget_info_by_idx3");
} /* end if */
- if (!HDstrcmp(obj_name, "g1.1"))
+ if (!strcmp(obj_name, "g1.1"))
VERIFY(oinfo.type, H5O_TYPE_GROUP, "H5Lget_name_by_idx");
- else if (!HDstrcmp(obj_name, "hardlink"))
+ else if (!strcmp(obj_name, "hardlink"))
VERIFY(oinfo.type, H5O_TYPE_GROUP, "H5Lget_name_by_idx");
- else if (!HDstrcmp(obj_name, "softlink"))
+ else if (!strcmp(obj_name, "softlink"))
VERIFY(linfo.type, H5L_TYPE_SOFT, "H5Lget_name_by_idx");
else
ERROR("unknown object name");
@@ -1030,7 +1030,7 @@ find_err_msg_cb(unsigned H5_ATTR_UNUSED n, const H5E_error2_t *err_desc, void *_
return H5_ITER_ERROR;
/* If the searched error message is found, stop the iteration */
- if (err_desc->desc != NULL && HDstrcmp(err_desc->desc, searched_err->message) == 0) {
+ if (err_desc->desc != NULL && strcmp(err_desc->desc, searched_err->message) == 0) {
searched_err->found = true;
status = H5_ITER_STOP;
}
@@ -1087,7 +1087,7 @@ test_corrupted_attnamelen(void)
/* Make sure the intended error was caught */
if (err_status == -1) {
/* Initialize client data */
- HDstrcpy(err_caught.message, err_message);
+ strcpy(err_caught.message, err_message);
err_caught.found = false;
/* Look for the correct error message */
@@ -1172,11 +1172,11 @@ test_links_deprec(hid_t fapl)
CHECK(ret, FAIL, "H5Oget_info_by_idx");
} /* end if */
- if (!HDstrcmp(obj_name, "g1.1"))
+ if (!strcmp(obj_name, "g1.1"))
VERIFY(oinfo.type, H5O_TYPE_GROUP, "H5Lget_name_by_idx");
- else if (!HDstrcmp(obj_name, "hardlink"))
+ else if (!strcmp(obj_name, "hardlink"))
VERIFY(oinfo.type, H5O_TYPE_GROUP, "H5Lget_name_by_idx");
- else if (!HDstrcmp(obj_name, "softlink"))
+ else if (!strcmp(obj_name, "softlink"))
VERIFY(linfo.type, H5L_TYPE_SOFT, "H5Lget_name_by_idx");
else
ERROR("unknown object name");
diff --git a/test/API/tmisc.c b/test/API/tmisc.c
index 6a061e3..4c87425 100644
--- a/test/API/tmisc.c
+++ b/test/API/tmisc.c
@@ -488,8 +488,8 @@ test_misc2_write_attribute(void)
hid_t type;
herr_t ret;
misc2_struct data, data_check;
- char *string_att1 = HDstrdup("string attribute in file one");
- char *string_att2 = HDstrdup("string attribute in file two");
+ char *string_att1 = strdup("string attribute in file one");
+ char *string_att2 = strdup("string attribute in file two");
memset(&data, 0, sizeof(data));
memset(&data_check, 0, sizeof(data_check));
@@ -1131,7 +1131,7 @@ test_misc6(void)
/* Loop through adding attributes to each dataset */
for (u = 0; u < MISC6_NUMATTR; u++) {
/* Create name for attribute */
- HDsnprintf(attr_name, sizeof(attr_name), "Attr#%u", u);
+ snprintf(attr_name, sizeof(attr_name), "Attr#%u", u);
/* Open the file */
loc_id = H5Fopen(MISC6_FILE, H5F_ACC_RDWR, H5P_DEFAULT);
@@ -2166,11 +2166,11 @@ test_misc12(void)
CHECK(ret, FAIL, "H5Dread");
for (i = 0; i < MISC12_SPACE1_DIM1; i++)
- if (HDstrcmp(wdata[i], rdata[i]) != 0)
+ if (strcmp(wdata[i], rdata[i]) != 0)
TestErrPrintf("Error on line %d: wdata[%d]=%s, rdata[%d]=%s\n", __LINE__, i, wdata[i], i,
rdata[i]);
for (; i < (MISC12_SPACE1_DIM1 + MISC12_APPEND_SIZE); i++)
- if (HDstrcmp(wdata1[i - MISC12_SPACE1_DIM1], rdata[i]) != 0)
+ if (strcmp(wdata1[i - MISC12_SPACE1_DIM1], rdata[i]) != 0)
TestErrPrintf("Error on line %d: wdata1[%d]=%s, rdata[%d]=%s\n", __LINE__, i - MISC12_SPACE1_DIM1,
wdata1[i - MISC12_SPACE1_DIM1], i, rdata[i]);
@@ -2389,7 +2389,7 @@ misc13_insert_user_block(const char *old_name, const char *new_name, const char
CHECK_PTR(user_block, "calloc");
/* Copy in the user block data */
- memcpy(user_block, str, HDstrlen(str));
+ memcpy(user_block, str, strlen(str));
/* Open the new file */
new_fp = fopen(new_name, "wb");
@@ -2925,13 +2925,13 @@ test_misc16(void)
/* Compare data read in */
for (i = 0; i < MISC16_SPACE_DIM; i++) {
- if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
+ if (strlen(wdata[i]) != strlen(rdata[i])) {
TestErrPrintf(
"Line %u: VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",
- (unsigned)__LINE__, (int)i, (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (unsigned)__LINE__, (int)i, (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i]));
continue;
} /* end if */
- if (HDstrcmp(wdata[i], rdata[i]) != 0) {
+ if (strcmp(wdata[i], rdata[i]) != 0) {
TestErrPrintf("Line %u: VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n",
(unsigned)__LINE__, (int)i, wdata[i], (int)i, rdata[i]);
continue;
@@ -3013,13 +3013,13 @@ test_misc17(void)
/* Compare data in the way of strings. */
for (i = 0; i < MISC17_SPACE_DIM1; i++) {
- if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
+ if (strlen(wdata[i]) != strlen(rdata[i])) {
TestErrPrintf(
"Line %u: VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",
- (unsigned)__LINE__, (int)i, (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (unsigned)__LINE__, (int)i, (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i]));
continue;
} /* end if */
- if (HDstrcmp(wdata[i], rdata[i]) != 0) {
+ if (strcmp(wdata[i], rdata[i]) != 0) {
TestErrPrintf("Line %u: VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n",
(unsigned)__LINE__, (int)i, wdata[i], (int)i, rdata[i]);
continue;
@@ -3133,7 +3133,7 @@ test_misc18(void)
/* Loop creating attributes on each dataset, flushing them to the file each time */
for (u = 0; u < 10; u++) {
/* Set up attribute name */
- HDsnprintf(attr_name, sizeof(attr_name), "Attr %u", u);
+ snprintf(attr_name, sizeof(attr_name), "Attr %u", u);
/* Create & close attribute on first dataset */
aid = H5Acreate2(did1, attr_name, H5T_STD_U32LE, sid, H5P_DEFAULT, H5P_DEFAULT);
@@ -5668,7 +5668,7 @@ test_misc30(void)
CHECK(ret, FAIL, "test_misc30_get_info");
}
- HDsnprintf(gname, sizeof(gname), "/g0/group%d", i);
+ snprintf(gname, sizeof(gname), "/g0/group%d", i);
gid = H5Gcreate2(fid, gname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(gid, FAIL, "H5Gcreate2");
diff --git a/test/API/trefer.c b/test/API/trefer.c
index b216161..69b9bbf 100644
--- a/test/API/trefer.c
+++ b/test/API/trefer.c
@@ -2126,19 +2126,19 @@ test_deref_iter_op(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2
/* Simple check for correct names */
if (*count == 0) {
- if (HDstrcmp(name, DSETNAME2) == 0)
+ if (strcmp(name, DSETNAME2) == 0)
ret_value = 0;
else
ret_value = -1;
} /* end if */
else if (*count == 1) {
- if (HDstrcmp(name, GROUPNAME2) == 0)
+ if (strcmp(name, GROUPNAME2) == 0)
ret_value = 0;
else
ret_value = -1;
} /* end if */
else if (*count == 2) {
- if (HDstrcmp(name, GROUPNAME3) == 0)
+ if (strcmp(name, GROUPNAME3) == 0)
ret_value = 0;
else
ret_value = -1;
@@ -3595,7 +3595,7 @@ test_reference(void)
} /* end low bound */
/* The following test is currently broken with the Direct VFD */
- if (HDstrcmp(env_h5_drvr, "direct") != 0) {
+ if (strcmp(env_h5_drvr, "direct") != 0) {
test_reference_obj_deleted(); /* Test H5R object reference code for deleted objects */
}
diff --git a/test/API/tselect.c b/test/API/tselect.c
index a246661..befa360 100644
--- a/test/API/tselect.c
+++ b/test/API/tselect.c
@@ -10920,15 +10920,13 @@ test_shape_same_dr__full_space_vs_slice(int test_num, int small_rank, int large_
assert(edge_size > 0);
assert(edge_size <= 1000);
- HDsnprintf(test_desc_0, sizeof(test_desc_0), "\tn-cube slice through m-cube (n <= m) test %d.\n",
- test_num);
+ snprintf(test_desc_0, sizeof(test_desc_0), "\tn-cube slice through m-cube (n <= m) test %d.\n", test_num);
MESSAGE(7, ("%s", test_desc_0));
/* This statement must be updated if SS_DR_MAX_RANK is changed */
- HDsnprintf(test_desc_1, sizeof(test_desc_1),
- "\t\tranks: %d/%d offset: %d dim_selected: %d/%d/%d/%d/%d.\n", small_rank, large_rank, offset,
- (int)dim_selected[0], (int)dim_selected[1], (int)dim_selected[2], (int)dim_selected[3],
- (int)dim_selected[4]);
+ snprintf(test_desc_1, sizeof(test_desc_1), "\t\tranks: %d/%d offset: %d dim_selected: %d/%d/%d/%d/%d.\n",
+ small_rank, large_rank, offset, (int)dim_selected[0], (int)dim_selected[1], (int)dim_selected[2],
+ (int)dim_selected[3], (int)dim_selected[4]);
MESSAGE(7, ("%s", test_desc_1));
/* copy the edge size into the dims array */
@@ -11180,16 +11178,16 @@ test_shape_same_dr__checkerboard(int test_num, int small_rank, int large_rank, i
assert(dims_selected >= 0);
assert(dims_selected <= large_rank);
- HDsnprintf(test_desc_0, sizeof(test_desc_0),
- "\tcheckerboard n-cube slice through m-cube (n <= m) test %d.\n", test_num);
+ snprintf(test_desc_0, sizeof(test_desc_0),
+ "\tcheckerboard n-cube slice through m-cube (n <= m) test %d.\n", test_num);
MESSAGE(7, ("%s", test_desc_0));
/* This statement must be updated if SS_DR_MAX_RANK is changed */
- HDsnprintf(test_desc_1, sizeof(test_desc_1),
- "\tranks: %d/%d edge/chkr size: %d/%d offset: %d dim_selected: %d/%d/%d/%d/%d:%d.\n",
- small_rank, large_rank, (int)edge_size, (int)checker_size, offset, (int)dim_selected[0],
- (int)dim_selected[1], (int)dim_selected[2], (int)dim_selected[3], (int)dim_selected[4],
- dims_selected);
+ snprintf(test_desc_1, sizeof(test_desc_1),
+ "\tranks: %d/%d edge/chkr size: %d/%d offset: %d dim_selected: %d/%d/%d/%d/%d:%d.\n", small_rank,
+ large_rank, (int)edge_size, (int)checker_size, offset, (int)dim_selected[0],
+ (int)dim_selected[1], (int)dim_selected[2], (int)dim_selected[3], (int)dim_selected[4],
+ dims_selected);
MESSAGE(7, ("%s", test_desc_1));
/* copy the edge size into the dims array */
@@ -11725,16 +11723,15 @@ test_shape_same_dr__irregular(int test_num, int small_rank, int large_rank, int
assert(dims_selected >= 0);
assert(dims_selected <= large_rank);
- HDsnprintf(test_desc_0, sizeof(test_desc_0),
- "\tirregular sub set of n-cube slice through m-cube (n <= m) test %d.\n", test_num);
+ snprintf(test_desc_0, sizeof(test_desc_0),
+ "\tirregular sub set of n-cube slice through m-cube (n <= m) test %d.\n", test_num);
MESSAGE(7, ("%s", test_desc_0));
/* This statement must be updated if SS_DR_MAX_RANK is changed */
- HDsnprintf(test_desc_1, sizeof(test_desc_1),
- "\tranks: %d/%d edge: %d s/p offset: %d/%d dim_selected: %d/%d/%d/%d/%d:%d.\n", small_rank,
- large_rank, edge_size, slice_offset, pattern_offset, (int)dim_selected[0],
- (int)dim_selected[1], (int)dim_selected[2], (int)dim_selected[3], (int)dim_selected[4],
- dims_selected);
+ snprintf(test_desc_1, sizeof(test_desc_1),
+ "\tranks: %d/%d edge: %d s/p offset: %d/%d dim_selected: %d/%d/%d/%d/%d:%d.\n", small_rank,
+ large_rank, edge_size, slice_offset, pattern_offset, (int)dim_selected[0], (int)dim_selected[1],
+ (int)dim_selected[2], (int)dim_selected[3], (int)dim_selected[4], dims_selected);
MESSAGE(7, ("%s", test_desc_1));
/* copy the edge size into the dims array */
@@ -16171,7 +16168,7 @@ test_select(void)
test_select_hyper_valid_combination(); /* Test different input combinations */
/* The following tests are currently broken with the Direct VFD */
- if (HDstrcmp(env_h5_drvr, "direct") != 0) {
+ if (strcmp(env_h5_drvr, "direct") != 0) {
test_select_hyper_and_2d(); /* Test hyperslab intersection (AND) code for 2-D dataset */
test_select_hyper_xor_2d(); /* Test hyperslab XOR code for 2-D dataset */
test_select_hyper_notb_2d(); /* Test hyperslab NOTB code for 2-D dataset */
diff --git a/test/API/tunicode.c b/test/API/tunicode.c
index 93e28e3..8b404f2 100644
--- a/test/API/tunicode.c
+++ b/test/API/tunicode.c
@@ -94,7 +94,7 @@ test_fl_string(hid_t fid, const char *string)
ret = H5Dread(dset_id, dtype_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf);
CHECK(ret, FAIL, "H5Dread");
- VERIFY(HDstrcmp(string, read_buf), 0, "strcmp");
+ VERIFY(strcmp(string, read_buf), 0, "strcmp");
/* Close all */
ret = H5Dclose(dset_id);
@@ -137,14 +137,14 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
* the right number of bytes (even or odd, depending on the test).
* We create a 'new_string' whose length is convenient by prepending
* an 'x' to 'string' when necessary. */
- length = HDstrlen(string);
+ length = strlen(string);
if (length % 2 != 1) {
- HDstrcpy(new_string, "x");
- HDstrcat(new_string, string);
+ strcpy(new_string, "x");
+ strcat(new_string, string);
length++;
}
else {
- HDstrcpy(new_string, string);
+ strcpy(new_string, string);
}
/* Convert a null-terminated string to a shorter and longer null
@@ -163,8 +163,8 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* Fill the buffer with two copies of the UTF-8 string, each with a
* terminating NULL. It will look like "abcdefg\0abcdefg\0". */
- HDstrncpy(buf, new_string, big_len);
- HDstrncpy(&buf[big_len], new_string, big_len);
+ strncpy(buf, new_string, big_len);
+ strncpy(&buf[big_len], new_string, big_len);
ret = H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Tconvert");
@@ -174,11 +174,11 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
* like; UTF-8 characters may well have been truncated.
* To check that the conversion worked properly, we'll build this
* string manually. */
- HDstrncpy(cmpbuf, new_string, small_len - 1);
+ strncpy(cmpbuf, new_string, small_len - 1);
cmpbuf[small_len - 1] = '\0';
- HDstrncpy(&cmpbuf[small_len], new_string, small_len - 1);
+ strncpy(&cmpbuf[small_len], new_string, small_len - 1);
cmpbuf[2 * small_len - 1] = '\0';
- HDstrcpy(&cmpbuf[2 * small_len], new_string);
+ strcpy(&cmpbuf[2 * small_len], new_string);
VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
@@ -190,8 +190,8 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* First fill the buffer with NULLs */
memset(cmpbuf, '\0', (size_t)LONG_BUF_SIZE);
/* Copy in the characters */
- HDstrncpy(cmpbuf, new_string, small_len - 1);
- HDstrncpy(&cmpbuf[big_len], new_string, small_len - 1);
+ strncpy(cmpbuf, new_string, small_len - 1);
+ strncpy(&cmpbuf[big_len], new_string, small_len - 1);
VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
@@ -203,14 +203,14 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* Now test null padding. Null-padded strings do *not* need
* terminating NULLs, so the sizes of the datatypes are slightly
* different and we want a string with an even number of characters. */
- length = HDstrlen(string);
+ length = strlen(string);
if (length % 2 != 0) {
- HDstrcpy(new_string, "x");
- HDstrcat(new_string, string);
+ strcpy(new_string, "x");
+ strcat(new_string, string);
length++;
}
else {
- HDstrcpy(new_string, string);
+ strcpy(new_string, string);
}
/* Create a src_type that holds the UTF-8 string */
@@ -225,8 +225,8 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* Fill the buffer with two copies of the UTF-8 string.
* It will look like "abcdefghabcdefgh". */
- HDstrncpy(buf, new_string, big_len);
- HDstrncpy(&buf[big_len], new_string, big_len);
+ strncpy(buf, new_string, big_len);
+ strncpy(&buf[big_len], new_string, big_len);
ret = H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Tconvert");
@@ -236,9 +236,9 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
* like; UTF-8 characters may well have been truncated.
* To check that the conversion worked properly, we'll build this
* string manually. */
- HDstrncpy(cmpbuf, new_string, small_len);
- HDstrncpy(&cmpbuf[small_len], new_string, small_len);
- HDstrncpy(&cmpbuf[2 * small_len], new_string, big_len);
+ strncpy(cmpbuf, new_string, small_len);
+ strncpy(&cmpbuf[small_len], new_string, small_len);
+ strncpy(&cmpbuf[2 * small_len], new_string, big_len);
VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
@@ -250,8 +250,8 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* First fill the buffer with NULLs */
memset(cmpbuf, '\0', (size_t)LONG_BUF_SIZE);
/* Copy in the characters */
- HDstrncpy(cmpbuf, new_string, small_len);
- HDstrncpy(&cmpbuf[big_len], new_string, small_len);
+ strncpy(cmpbuf, new_string, small_len);
+ strncpy(&cmpbuf[big_len], new_string, small_len);
VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
@@ -270,8 +270,8 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* Fill the buffer with two copies of the UTF-8 string.
* It will look like "abcdefghabcdefgh". */
- HDstrcpy(buf, new_string);
- HDstrcpy(&buf[big_len], new_string);
+ strcpy(buf, new_string);
+ strcpy(&buf[big_len], new_string);
ret = H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Tconvert");
@@ -281,9 +281,9 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
* like; UTF-8 characters may have been truncated.
* To check that the conversion worked properly, we'll build this
* string manually. */
- HDstrncpy(cmpbuf, new_string, small_len);
- HDstrncpy(&cmpbuf[small_len], new_string, small_len);
- HDstrncpy(&cmpbuf[2 * small_len], new_string, big_len);
+ strncpy(cmpbuf, new_string, small_len);
+ strncpy(&cmpbuf[small_len], new_string, small_len);
+ strncpy(&cmpbuf[2 * small_len], new_string, big_len);
VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
@@ -295,8 +295,8 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* First fill the buffer with spaces */
memset(cmpbuf, ' ', (size_t)LONG_BUF_SIZE);
/* Copy in the characters */
- HDstrncpy(cmpbuf, new_string, small_len);
- HDstrncpy(&cmpbuf[big_len], new_string, small_len);
+ strncpy(cmpbuf, new_string, small_len);
+ strncpy(&cmpbuf[big_len], new_string, small_len);
VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
@@ -340,14 +340,14 @@ test_vl_string(hid_t fid, const char *string)
/* Make certain the correct amount of memory will be used */
ret = H5Dvlen_get_buf_size(dset_id, type_id, space_id, &size);
CHECK(ret, FAIL, "H5Dvlen_get_buf_size");
- VERIFY(size, (hsize_t)HDstrlen(string) + 1, "H5Dvlen_get_buf_size");
+ VERIFY(size, (hsize_t)strlen(string) + 1, "H5Dvlen_get_buf_size");
/* Read dataset from disk */
ret = H5Dread(dset_id, type_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf);
CHECK(ret, FAIL, "H5Dread");
/* Compare data read in */
- VERIFY(HDstrcmp(string, read_buf[0]), 0, "strcmp");
+ VERIFY(strcmp(string, read_buf[0]), 0, "strcmp");
/* Reclaim the read VL data */
ret = H5Treclaim(type_id, space_id, H5P_DEFAULT, read_buf);
@@ -403,7 +403,7 @@ test_objnames(hid_t fid, const char *string)
ret = H5Gclose(grp_id);
CHECK(ret, FAIL, "H5Gclose");
#if 0
- VERIFY(HDstrcmp(string, read_buf), 0, "strcmp");
+ VERIFY(strcmp(string, read_buf), 0, "strcmp");
#endif
/* Create a new dataset with a UTF-8 name */
grp1_id = H5Gcreate2(fid, GROUP1_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -487,9 +487,9 @@ test_objnames(hid_t fid, const char *string)
ret = H5Lcreate_hard(fid, GROUP2_NAME, grp3_id, GROUP2_NAME, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Lcreate_hard");
- HDstrcpy(path_buf, GROUP2_NAME);
- HDstrcat(path_buf, "/");
- HDstrcat(path_buf, string);
+ strcpy(path_buf, GROUP2_NAME);
+ strcat(path_buf, "/");
+ strcat(path_buf, string);
ret = H5Lcreate_hard(grp3_id, path_buf, H5L_SAME_LOC, string, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Lcreate_hard");
@@ -535,7 +535,7 @@ test_attrname(hid_t fid, const char *string)
CHECK(attr_id, FAIL, "H5Acreate2");
size = H5Aget_name(attr_id, (size_t)MAX_STRING_LENGTH, read_buf);
CHECK(size, FAIL, "H5Aget_name");
- ret = HDstrcmp(read_buf, string);
+ ret = strcmp(read_buf, string);
VERIFY(ret, 0, "strcmp");
read_buf[0] = '\0';
@@ -544,7 +544,7 @@ test_attrname(hid_t fid, const char *string)
CHECK(ret, FAIL, "H5Awrite");
ret = H5Aread(attr_id, dtype_id, read_buf);
CHECK(ret, FAIL, "H5Aread");
- ret = HDstrcmp(read_buf, string);
+ ret = strcmp(read_buf, string);
VERIFY(ret, 0, "strcmp");
/* Clean up */
@@ -602,7 +602,7 @@ test_compound(hid_t fid, const char *string)
/* Check that the field name was stored correctly */
readbuf = H5Tget_member_name(s1_tid, 0);
- ret = HDstrcmp(readbuf, string);
+ ret = strcmp(readbuf, string);
VERIFY(ret, 0, "strcmp");
H5free_memory(readbuf);
@@ -685,7 +685,7 @@ test_enum(hid_t H5_ATTR_UNUSED fid, const char *string)
VERIFY(val, E1_WHITE, "H5Tenum_valueof");
ret = H5Tenum_nameof(type_id, &val, readbuf, (size_t)MAX_STRING_LENGTH);
CHECK(ret, FAIL, "H5Tenum_nameof");
- ret = HDstrcmp(readbuf, string);
+ ret = strcmp(readbuf, string);
VERIFY(ret, 0, "strcmp");
/* Close the datatype */
@@ -712,7 +712,7 @@ test_opaque(hid_t H5_ATTR_UNUSED fid, const char *string)
/* Read the tag back. */
read_buf = H5Tget_tag(type_id);
- ret = HDstrcmp(read_buf, string);
+ ret = strcmp(read_buf, string);
VERIFY(ret, 0, "H5Tget_tag");
H5free_memory(read_buf);
@@ -786,7 +786,7 @@ dump_string(const char *string)
printf("The string was:\n %s", string);
printf("Or in hex:\n");
- length = HDstrlen(string);
+ length = strlen(string);
for (x = 0; x < length; x++)
printf("%x ", string[x] & (0x000000FF));
diff --git a/test/API/tvlstr.c b/test/API/tvlstr.c
index f702cfd..a9375c8 100644
--- a/test/API/tvlstr.c
+++ b/test/API/tvlstr.c
@@ -186,7 +186,7 @@ test_vlstrings_basic(void)
/* Count the actual number of bytes used by the strings */
for (i = 0, str_used = 0; i < SPACE1_DIM1; i++)
- str_used += HDstrlen(wdata[i]) + 1;
+ str_used += strlen(wdata[i]) + 1;
/* Compare against the strings actually written */
VERIFY(size, (hsize_t)str_used, "H5Dvlen_get_buf_size");
@@ -200,12 +200,12 @@ test_vlstrings_basic(void)
/* Compare data read in */
for (i = 0; i < SPACE1_DIM1; i++) {
- if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
+ if (strlen(wdata[i]) != strlen(rdata[i])) {
TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", (int)i,
- (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i]));
continue;
} /* end if */
- if (HDstrcmp(wdata[i], rdata[i]) != 0) {
+ if (strcmp(wdata[i], rdata[i]) != 0) {
TestErrPrintf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n", (int)i, wdata[i],
(int)i, rdata[i]);
continue;
@@ -304,16 +304,16 @@ test_vlstrings_special(void)
/* Compare data read in */
for (i = 0; i < SPACE1_DIM1; i++) {
- if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
+ if (strlen(wdata[i]) != strlen(rdata[i])) {
TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", (int)i,
- (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i]));
continue;
} /* end if */
if ((wdata[i] == NULL && rdata[i] != NULL) || (rdata[i] == NULL && wdata[i] != NULL)) {
TestErrPrintf("VL data values don't match!\n");
continue;
} /* end if */
- if (HDstrcmp(wdata[i], rdata[i]) != 0) {
+ if (strcmp(wdata[i], rdata[i]) != 0) {
TestErrPrintf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n", (int)i, wdata[i],
(int)i, rdata[i]);
continue;
@@ -533,12 +533,12 @@ test_compact_vlstring(void)
/* Compare data read in */
for (i = 0; i < SPACE1_DIM1; i++) {
- if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
+ if (strlen(wdata[i]) != strlen(rdata[i])) {
TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", (int)i,
- (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i]));
continue;
} /* end if */
- if (HDstrcmp(wdata[i], rdata[i]) != 0) {
+ if (strcmp(wdata[i], rdata[i]) != 0) {
TestErrPrintf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n", (int)i, wdata[i],
(int)i, rdata[i]);
continue;
@@ -611,7 +611,7 @@ test_write_vl_string_attribute(void)
ret = H5Aread(att, type, &string_att_check);
CHECK(ret, FAIL, "H5Aread");
- if (HDstrcmp(string_att_check, string_att) != 0)
+ if (strcmp(string_att_check, string_att) != 0)
TestErrPrintf("VL string attributes don't match!, string_att=%s, string_att_check=%s\n", string_att,
string_att_check);
@@ -634,7 +634,7 @@ test_write_vl_string_attribute(void)
ret = H5Aread(att, type, &string_att_check);
CHECK(ret, FAIL, "H5Aread");
- if (HDstrcmp(string_att_check, string_att_write) != 0)
+ if (strcmp(string_att_check, string_att_write) != 0)
TestErrPrintf("VL string attributes don't match!, string_att_write=%s, string_att_check=%s\n",
string_att_write, string_att_check);
@@ -695,7 +695,7 @@ test_read_vl_string_attribute(void)
ret = H5Aread(att, type, &string_att_check);
CHECK(ret, FAIL, "H5Aread");
- if (HDstrcmp(string_att_check, string_att) != 0)
+ if (strcmp(string_att_check, string_att) != 0)
TestErrPrintf("VL string attributes don't match!, string_att=%s, string_att_check=%s\n", string_att,
string_att_check);
@@ -713,7 +713,7 @@ test_read_vl_string_attribute(void)
ret = H5Aread(att, type, &string_att_check);
CHECK(ret, FAIL, "H5Aread");
- if (HDstrcmp(string_att_check, string_att_write) != 0)
+ if (strcmp(string_att_check, string_att_write) != 0)
TestErrPrintf("VL string attributes don't match!, string_att_write=%s, string_att_check=%s\n",
string_att_write, string_att_check);
@@ -772,7 +772,7 @@ read_scalar_dset(hid_t file, hid_t type, hid_t space, char *name, char *data)
ret = H5Dclose(dset);
CHECK(ret, FAIL, "H5Dclose");
- if (HDstrcmp(data, data_read) != 0)
+ if (strcmp(data, data_read) != 0)
TestErrPrintf("Expected %s for dataset %s but read %s\n", data, name, data_read);
ret = H5Treclaim(type, space, H5P_DEFAULT, &data_read);
@@ -816,33 +816,33 @@ test_vl_rewrite(void)
/* Create in file 1 */
for (i = 0; i < REWRITE_NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "/set_%d", i);
+ snprintf(name, sizeof(name), "/set_%d", i);
write_scalar_dset(file1, type, space, name, name);
}
/* Effectively copy data from file 1 to 2 */
for (i = 0; i < REWRITE_NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "/set_%d", i);
+ snprintf(name, sizeof(name), "/set_%d", i);
read_scalar_dset(file1, type, space, name, name);
write_scalar_dset(file2, type, space, name, name);
}
/* Read back from file 2 */
for (i = 0; i < REWRITE_NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "/set_%d", i);
+ snprintf(name, sizeof(name), "/set_%d", i);
read_scalar_dset(file2, type, space, name, name);
} /* end for */
/* Remove from file 2. */
for (i = 0; i < REWRITE_NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "/set_%d", i);
+ snprintf(name, sizeof(name), "/set_%d", i);
ret = H5Ldelete(file2, name, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Ldelete");
} /* end for */
/* Effectively copy from file 1 to file 2 */
for (i = 0; i < REWRITE_NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "/set_%d", i);
+ snprintf(name, sizeof(name), "/set_%d", i);
read_scalar_dset(file1, type, space, name, name);
write_scalar_dset(file2, type, space, name, name);
} /* end for */
diff --git a/test/API/tvltypes.c b/test/API/tvltypes.c
index b4ccef7..9e6027c 100644
--- a/test/API/tvltypes.c
+++ b/test/API/tvltypes.c
@@ -1244,9 +1244,9 @@ test_vltypes_compound_vlstr(void)
wdata[i].v.p = (s2 *)malloc((i + L3_INCM) * sizeof(s2));
wdata[i].v.len = i + L3_INCM;
for (t1 = (s2 *)((wdata[i].v).p), j = 0; j < (i + L3_INCM); j++, t1++) {
- HDstrcat(str, "m");
- t1->string = (char *)malloc(HDstrlen(str) * sizeof(char) + 1);
- HDstrcpy(t1->string, str);
+ strcat(str, "m");
+ t1->string = (char *)malloc(strlen(str) * sizeof(char) + 1);
+ strcpy(t1->string, str);
/*t1->color = red;*/
t1->color = blue;
}
@@ -1387,7 +1387,7 @@ test_vltypes_compound_vlstr(void)
for (t1 = (s2 *)(wdata[i].v.p), t2 = (s2 *)(rdata[i].v.p), j = 0; j < rdata[i].v.len;
j++, t1++, t2++) {
- if (HDstrcmp(t1->string, t2->string) != 0) {
+ if (strcmp(t1->string, t2->string) != 0) {
TestErrPrintf("VL data values don't match!, t1->string=%s, t2->string=%s\n", t1->string,
t2->string);
continue;
@@ -1409,14 +1409,14 @@ test_vltypes_compound_vlstr(void)
CHECK(ret, FAIL, "H5Treclaim");
/* Use this part for new data */
- HDstrcpy(str, "bbbbbbbb\0");
+ strcpy(str, "bbbbbbbb\0");
for (i = 0; i < SPACE1_DIM1; i++) {
wdata2[i].v.p = (s2 *)malloc((i + 1) * sizeof(s2));
wdata2[i].v.len = i + 1;
for (t1 = (s2 *)(wdata2[i].v).p, j = 0; j < i + 1; j++, t1++) {
- HDstrcat(str, "pp");
- t1->string = (char *)malloc(HDstrlen(str) * sizeof(char) + 1);
- HDstrcpy(t1->string, str);
+ strcat(str, "pp");
+ t1->string = (char *)malloc(strlen(str) * sizeof(char) + 1);
+ strcpy(t1->string, str);
t1->color = green;
}
} /* end for */
@@ -1448,7 +1448,7 @@ test_vltypes_compound_vlstr(void)
for (t1 = (s2 *)(wdata2[i].v.p), t2 = (s2 *)(rdata2[i].v.p), j = 0; j < rdata2[i].v.len;
j++, t1++, t2++) {
- if (HDstrcmp(t1->string, t2->string) != 0) {
+ if (strcmp(t1->string, t2->string) != 0) {
TestErrPrintf("VL data values don't match!, t1->string=%s, t2->string=%s\n", t1->string,
t2->string);
continue;
@@ -2657,16 +2657,16 @@ test_vltypes_fill_value(void)
/* Layout specific actions */
switch (layout) {
case H5D_COMPACT:
- HDstrcpy(dset_name1, "dataset1-compact");
- HDstrcpy(dset_name2, "dataset2-compact");
+ strcpy(dset_name1, "dataset1-compact");
+ strcpy(dset_name2, "dataset2-compact");
dset_dspace_id = small_dspace_id;
ret = H5Pset_layout(tmp_dcpl_id, H5D_COMPACT);
CHECK(ret, FAIL, "H5Pset_layout");
break;
case H5D_CONTIGUOUS:
- HDstrcpy(dset_name1, "dataset1-contig");
- HDstrcpy(dset_name2, "dataset2-contig");
+ strcpy(dset_name1, "dataset1-contig");
+ strcpy(dset_name2, "dataset2-contig");
dset_dspace_id = large_dspace_id;
break;
@@ -2678,15 +2678,15 @@ test_vltypes_fill_value(void)
CHECK(ret, FAIL, "H5Pset_chunk");
#ifdef H5_HAVE_FILTER_DEFLATE
if (test_loop == 1) {
- HDstrcpy(dset_name1, "dataset1-chunked-compressed");
- HDstrcpy(dset_name2, "dataset2-chunked-compressed");
+ strcpy(dset_name1, "dataset1-chunked-compressed");
+ strcpy(dset_name2, "dataset2-chunked-compressed");
ret = H5Pset_deflate(tmp_dcpl_id, 3);
CHECK(ret, FAIL, "H5Pset_deflate");
} /* end if */
else {
#endif /* H5_HAVE_FILTER_DEFLATE */
- HDstrcpy(dset_name1, "dataset1-chunked");
- HDstrcpy(dset_name2, "dataset2-chunked");
+ strcpy(dset_name1, "dataset1-chunked");
+ strcpy(dset_name2, "dataset2-chunked");
#ifdef H5_HAVE_FILTER_DEFLATE
} /* end else */
#endif /* H5_HAVE_FILTER_DEFLATE */
@@ -2767,16 +2767,16 @@ test_vltypes_fill_value(void)
/* Layout specific actions */
switch (layout) {
case H5D_COMPACT:
- HDstrcpy(dset_name1, "dataset1-compact");
- HDstrcpy(dset_name2, "dataset2-compact");
+ strcpy(dset_name1, "dataset1-compact");
+ strcpy(dset_name2, "dataset2-compact");
dset_dspace_id = small_dspace_id;
dset_select_dspace_id = small_select_dspace_id;
dset_elmts = SPACE4_DIM_SMALL;
break;
case H5D_CONTIGUOUS:
- HDstrcpy(dset_name1, "dataset1-contig");
- HDstrcpy(dset_name2, "dataset2-contig");
+ strcpy(dset_name1, "dataset1-contig");
+ strcpy(dset_name2, "dataset2-contig");
dset_dspace_id = large_dspace_id;
dset_select_dspace_id = large_select_dspace_id;
dset_elmts = SPACE4_DIM_LARGE;
@@ -2785,13 +2785,13 @@ test_vltypes_fill_value(void)
case H5D_CHUNKED:
#ifdef H5_HAVE_FILTER_DEFLATE
if (test_loop == 1) {
- HDstrcpy(dset_name1, "dataset1-chunked-compressed");
- HDstrcpy(dset_name2, "dataset2-chunked-compressed");
+ strcpy(dset_name1, "dataset1-chunked-compressed");
+ strcpy(dset_name2, "dataset2-chunked-compressed");
} /* end if */
else {
#endif /* H5_HAVE_FILTER_DEFLATE */
- HDstrcpy(dset_name1, "dataset1-chunked");
- HDstrcpy(dset_name2, "dataset2-chunked");
+ strcpy(dset_name1, "dataset1-chunked");
+ strcpy(dset_name2, "dataset2-chunked");
#ifdef H5_HAVE_FILTER_DEFLATE
} /* end else */
#endif /* H5_HAVE_FILTER_DEFLATE */
@@ -2821,10 +2821,10 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 || HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 || strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -2844,11 +2844,10 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if ((i % 2) == select_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
- HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 || strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -2879,10 +2878,10 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 || HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 || strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -2902,11 +2901,10 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if ((i % 2) == select_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
- HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 || strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -2954,16 +2952,16 @@ test_vltypes_fill_value(void)
/* Layout specific actions */
switch (layout) {
case H5D_COMPACT:
- HDstrcpy(dset_name1, "dataset1-compact");
- HDstrcpy(dset_name2, "dataset2-compact");
+ strcpy(dset_name1, "dataset1-compact");
+ strcpy(dset_name2, "dataset2-compact");
dset_dspace_id = small_dspace_id;
dset_select_dspace_id = small_select_dspace_id;
dset_elmts = SPACE4_DIM_SMALL;
break;
case H5D_CONTIGUOUS:
- HDstrcpy(dset_name1, "dataset1-contig");
- HDstrcpy(dset_name2, "dataset2-contig");
+ strcpy(dset_name1, "dataset1-contig");
+ strcpy(dset_name2, "dataset2-contig");
dset_dspace_id = large_dspace_id;
dset_select_dspace_id = large_select_dspace_id;
dset_elmts = SPACE4_DIM_LARGE;
@@ -2972,13 +2970,13 @@ test_vltypes_fill_value(void)
case H5D_CHUNKED:
#ifdef H5_HAVE_FILTER_DEFLATE
if (test_loop == 1) {
- HDstrcpy(dset_name1, "dataset1-chunked-compressed");
- HDstrcpy(dset_name2, "dataset2-chunked-compressed");
+ strcpy(dset_name1, "dataset1-chunked-compressed");
+ strcpy(dset_name2, "dataset2-chunked-compressed");
} /* end if */
else {
#endif /* H5_HAVE_FILTER_DEFLATE */
- HDstrcpy(dset_name1, "dataset1-chunked");
- HDstrcpy(dset_name2, "dataset2-chunked");
+ strcpy(dset_name1, "dataset1-chunked");
+ strcpy(dset_name2, "dataset2-chunked");
#ifdef H5_HAVE_FILTER_DEFLATE
} /* end else */
#endif /* H5_HAVE_FILTER_DEFLATE */
@@ -3021,22 +3019,21 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if (i == single_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
- HDstrcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
- HDstrcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
- HDstrcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
- HDstrcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
- HDstrcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
+ if (strcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
+ strcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
+ strcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
+ strcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
+ strcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
+ strcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
} /* end if */
else {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
- HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 || strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -3057,23 +3054,23 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if (i == single_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
- HDstrcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
- HDstrcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
- HDstrcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
- HDstrcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
- HDstrcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
+ if (strcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
+ strcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
+ strcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
+ strcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
+ strcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
+ strcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
} /* end if */
else {
if ((i % 2) == select_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
- HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 ||
+ strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -3109,22 +3106,21 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if (i == single_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
- HDstrcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
- HDstrcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
- HDstrcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
- HDstrcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
- HDstrcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
+ if (strcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
+ strcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
+ strcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
+ strcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
+ strcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
+ strcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
} /* end if */
else {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
- HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 || strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -3145,23 +3141,23 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if (i == single_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
- HDstrcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
- HDstrcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
- HDstrcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
- HDstrcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
- HDstrcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
+ if (strcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
+ strcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
+ strcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
+ strcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
+ strcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
+ strcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
} /* end if */
else {
if ((i % 2) == select_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
- HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 ||
+ strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
diff --git a/test/accum.c b/test/accum.c
index 8b8e279..e3e79de 100644
--- a/test/accum.c
+++ b/test/accum.c
@@ -88,7 +88,7 @@ main(void)
H5F_t *f = NULL; /* File for all tests */
/* Test Setup */
- HDputs("Testing the metadata accumulator");
+ puts("Testing the metadata accumulator");
/* File access property list */
h5_reset();
@@ -147,7 +147,7 @@ main(void)
if (nerrors)
goto error;
- HDputs("All metadata accumulator tests passed.");
+ puts("All metadata accumulator tests passed.");
h5_cleanup(FILENAME, fapl);
return 0;
@@ -156,7 +156,7 @@ error:
if (api_ctx_pushed)
H5CX_pop(false);
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
return 1;
} /* end main() */
@@ -2070,7 +2070,7 @@ test_swmr_write_big(bool newest_format)
/* Not a Windows or POSIX system */
SKIPPED();
- HDputs(" Test skipped: Not a Windows or POSIX system.");
+ puts(" Test skipped: Not a Windows or POSIX system.");
return 0;
#else
@@ -2080,7 +2080,7 @@ test_swmr_write_big(bool newest_format)
driver = HDgetenv(HDF5_DRIVER);
if (!H5FD__supports_swmr_test(driver)) {
SKIPPED();
- HDputs(" Test skipped due to VFD not supporting SWMR I/O.");
+ puts(" Test skipped due to VFD not supporting SWMR I/O.");
return 0;
}
@@ -2215,7 +2215,7 @@ test_swmr_write_big(bool newest_format)
/* Fork child process to verify that the data at [1024, 2014] does get written to disk */
if ((pid = fork()) < 0) {
- HDperror("fork");
+ perror("fork");
FAIL_STACK_ERROR;
}
else if (0 == pid) { /* Child process */
@@ -2228,7 +2228,7 @@ test_swmr_write_big(bool newest_format)
char *const new_argv[] = {swmr_reader, NULL};
/* Run the reader */
status = execv(SWMR_READER, new_argv);
- printf("errno from execv = %s\n", HDstrerror(errno));
+ printf("errno from execv = %s\n", strerror(errno));
FAIL_STACK_ERROR;
} /* end if */
diff --git a/test/app_ref.c b/test/app_ref.c
index 7d46470..5e52fe7 100644
--- a/test/app_ref.c
+++ b/test/app_ref.c
@@ -101,8 +101,8 @@ main(void)
/* Don't run this test with the multi/split VFD. A bug in library shutdown
* ordering causes problems with the multi VFD when IDs are left dangling.
*/
- if (!HDstrcmp(env_h5_drvr, "multi") || !HDstrcmp(env_h5_drvr, "split")) {
- HDputs("\n -- SKIPPED for incompatible VFD --");
+ if (!strcmp(env_h5_drvr, "multi") || !strcmp(env_h5_drvr, "split")) {
+ puts("\n -- SKIPPED for incompatible VFD --");
return 0;
}
@@ -193,7 +193,7 @@ main(void)
error:
- HDputs("***** APPLICATION REFERENCE COUNT TESTS FAILED *****");
+ puts("***** APPLICATION REFERENCE COUNT TESTS FAILED *****");
return EXIT_FAILURE;
}
diff --git a/test/big.c b/test/big.c
index 748521e..fc422b1 100644
--- a/test/big.c
+++ b/test/big.c
@@ -263,7 +263,7 @@ enough_room(hid_t fapl)
/* Create files */
for (i = 0; i < NELMTS(fd); i++) {
- HDsnprintf(name, sizeof(name), filename, i);
+ snprintf(name, sizeof(name), filename, i);
if ((fd[i] = HDopen(name, O_RDWR | O_CREAT | O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0) {
goto done;
}
@@ -278,7 +278,7 @@ enough_room(hid_t fapl)
done:
for (i = 0; i < NELMTS(fd) && fd[i] >= 0; i++) {
- HDsnprintf(name, sizeof(name), filename, i);
+ snprintf(name, sizeof(name), filename, i);
if (HDclose(fd[i]) < 0)
ret_value = 0;
HDremove(name);
@@ -475,7 +475,7 @@ reader(char *filename, hid_t fapl)
FAIL_STACK_ERROR;
/* Read each region */
- while (HDfgets(ln, (int)sizeof(ln), script)) {
+ while (fgets(ln, (int)sizeof(ln), script)) {
if ('#' != ln[0])
break;
i = (int)strtol(ln + 1, &s, 10);
@@ -501,7 +501,7 @@ reader(char *filename, hid_t fapl)
}
else if (wrong) {
SKIPPED();
- HDputs(" Possible overlap with another region.");
+ puts(" Possible overlap with another region.");
nerrors++;
}
else {
@@ -576,7 +576,7 @@ test_sec2(hid_t fapl)
goto quit;
}
/* Test big file with the SEC2 driver */
- HDputs("Testing big file with the SEC2 Driver ");
+ puts("Testing big file with the SEC2 Driver ");
h5_fixname(FILENAME[1], fapl, filename, sizeof filename);
@@ -585,7 +585,7 @@ test_sec2(hid_t fapl)
if (reader(filename, fapl))
goto error;
- HDputs("Test passed with the SEC2 Driver.");
+ puts("Test passed with the SEC2 Driver.");
quit:
/* End with normal return code */
@@ -595,7 +595,7 @@ quit:
return 0;
error:
- HDputs("*** TEST FAILED ***");
+ puts("*** TEST FAILED ***");
return 1;
} /* end test_sec2() */
@@ -610,7 +610,7 @@ test_stdio(hid_t fapl)
fprintf(stdout, "Test for stdio is skipped because file system does not support big files.\n");
goto quit;
}
- HDputs("\nTesting big file with the STDIO Driver ");
+ puts("\nTesting big file with the STDIO Driver ");
h5_fixname(FILENAME[2], fapl, filename, sizeof filename);
@@ -618,7 +618,7 @@ test_stdio(hid_t fapl)
goto error;
if (reader(filename, fapl))
goto error;
- HDputs("Test passed with the STDIO Driver.");
+ puts("Test passed with the STDIO Driver.");
/* Flush stdout at the end of this test routine to ensure later
* output to stderr will not come out before it.
@@ -633,7 +633,7 @@ quit:
return 0;
error:
- HDputs("*** TEST FAILED ***");
+ puts("*** TEST FAILED ***");
fflush(stdout);
return 1;
} /* end test_stdio() */
@@ -644,7 +644,7 @@ test_family(hid_t fapl)
char filename[1024];
/* Test huge file with the family driver */
- HDputs("Testing big file with the Family Driver ");
+ puts("Testing big file with the Family Driver ");
if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
goto error;
@@ -656,14 +656,14 @@ test_family(hid_t fapl)
* We shouldn't run this test if the file system doesn't support holes
* because we would generate multi-gigabyte files.
*/
- HDputs("Checking if file system is adequate for this test...");
+ puts("Checking if file system is adequate for this test...");
if (!sparse_support) {
- HDputs("Test skipped because file system does not support holes.");
+ puts("Test skipped because file system does not support holes.");
usage();
goto quit;
}
if (!enough_room(fapl)) {
- HDputs("Test skipped because of quota (file size or num open files).");
+ puts("Test skipped because of quota (file size or num open files).");
usage();
goto quit;
}
@@ -677,7 +677,7 @@ test_family(hid_t fapl)
if (reader(filename, fapl))
goto error;
- HDputs("Test passed with the Family Driver.");
+ puts("Test passed with the Family Driver.");
quit:
/* End with normal return code */
@@ -687,7 +687,7 @@ quit:
return 0;
error:
- HDputs("*** TEST FAILED ***");
+ puts("*** TEST FAILED ***");
return 1;
} /* end test_family() */
@@ -713,7 +713,7 @@ main(int ac, char **av)
while (--ac > 0) {
av++;
- if (HDstrcmp("-fsize", *av) == 0) {
+ if (strcmp("-fsize", *av) == 0) {
/* specify a different family file size */
ac--;
av++;
@@ -726,11 +726,11 @@ main(int ac, char **av)
return 1;
}
}
- else if (HDstrcmp("-c", *av) == 0) {
+ else if (strcmp("-c", *av) == 0) {
/* turn off file system check before test */
cflag = 0;
}
- else if (HDstrcmp("-h", *av) == 0) {
+ else if (strcmp("-h", *av) == 0) {
usage();
return 0;
}
@@ -772,14 +772,14 @@ main(int ac, char **av)
goto error;
}
else
- HDputs("This VFD is not supported");
+ puts("This VFD is not supported");
/* End with normal exit code */
/* fapls are cleaned up in the vfd test code */
return 0;
error:
- HDputs("*** TEST FAILED ***");
+ puts("*** TEST FAILED ***");
if (fapl > 0)
H5Pclose(fapl);
return 1;
diff --git a/test/bittests.c b/test/bittests.c
index 5578c97..df42737 100644
--- a/test/bittests.c
+++ b/test/bittests.c
@@ -47,13 +47,13 @@ test_find(void)
n = H5T__bit_find(v1, (size_t)0, (size_t)0, H5T_BIT_LSB, true);
if (-1 != n) {
H5_FAILED();
- HDputs(" Zero length test failed (lsb)!");
+ puts(" Zero length test failed (lsb)!");
goto failed;
}
n = H5T__bit_find(v1, (size_t)0, (size_t)0, H5T_BIT_MSB, true);
if (-1 != n) {
H5_FAILED();
- HDputs(" Zero length test failed (msb)!");
+ puts(" Zero length test failed (msb)!");
goto failed;
}
@@ -62,13 +62,13 @@ test_find(void)
n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_LSB, true);
if (-1 != n) {
H5_FAILED();
- HDputs(" Zero buffer test failed (lsb)!");
+ puts(" Zero buffer test failed (lsb)!");
goto failed;
}
n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_MSB, true);
if (-1 != n) {
H5_FAILED();
- HDputs(" Zero buffer test failed (msb)!");
+ puts(" Zero buffer test failed (msb)!");
goto failed;
}
@@ -95,13 +95,13 @@ test_find(void)
n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_LSB, false);
if (-1 != n) {
H5_FAILED();
- HDputs(" One buffer test failed (lsb)!");
+ puts(" One buffer test failed (lsb)!");
goto failed;
}
n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_MSB, false);
if (-1 != n) {
H5_FAILED();
- HDputs(" One buffer test failed (msb)!");
+ puts(" One buffer test failed (msb)!");
goto failed;
}
@@ -170,12 +170,12 @@ test_copy(void)
break;
if (size > 0 && j >= (int)sizeof(v2)) {
H5_FAILED();
- HDputs(" Unabled to find copied region in destination");
+ puts(" Unabled to find copied region in destination");
goto failed;
}
if (0 == size && j < (int)sizeof(v2)) {
H5_FAILED();
- HDputs(" Found copied bits when we shouldn't have");
+ puts(" Found copied bits when we shouldn't have");
goto failed;
}
@@ -190,7 +190,7 @@ test_copy(void)
}
if (0 == size && n >= 0) {
H5_FAILED();
- HDputs(" Found copied bits and shouldn't have!");
+ puts(" Found copied bits and shouldn't have!");
goto failed;
}
n = H5T__bit_find(v2, d_offset, 8 * sizeof(v2) - d_offset, H5T_BIT_LSB, 0);
@@ -203,7 +203,7 @@ test_copy(void)
}
if (d_offset + size == 8 * sizeof(v2) && n >= 0) {
H5_FAILED();
- HDputs(" High-order zeros are present and shouldn't be!");
+ puts(" High-order zeros are present and shouldn't be!");
goto failed;
}
@@ -221,7 +221,7 @@ test_copy(void)
}
if (0 == size && n >= 0) {
H5_FAILED();
- HDputs(" Found copied bits but shouldn't have (reverse)!");
+ puts(" Found copied bits but shouldn't have (reverse)!");
goto failed;
}
n = H5T__bit_find(v2, (size_t)0, d_offset + size, H5T_BIT_MSB, 0);
@@ -234,7 +234,7 @@ test_copy(void)
}
if (0 == d_offset && n >= 0) {
H5_FAILED();
- HDputs(" Found leading original data but shouldn't have!");
+ puts(" Found leading original data but shouldn't have!");
goto failed;
}
}
@@ -677,12 +677,12 @@ test_set(void)
break;
if (size > 0 && j >= (int)sizeof(v2)) {
H5_FAILED();
- HDputs(" Unabled to find set region in buffer");
+ puts(" Unabled to find set region in buffer");
goto failed;
}
if (0 == size && j < (int)sizeof(v2)) {
H5_FAILED();
- HDputs(" Found set bits when we shouldn't have");
+ puts(" Found set bits when we shouldn't have");
goto failed;
}
@@ -697,7 +697,7 @@ test_set(void)
}
if (0 == size && n >= 0) {
H5_FAILED();
- HDputs(" Found set bits and shouldn't have!");
+ puts(" Found set bits and shouldn't have!");
goto failed;
}
n = H5T__bit_find(v2, d_offset, 8 * sizeof(v2) - d_offset, H5T_BIT_LSB, 0);
@@ -710,7 +710,7 @@ test_set(void)
}
if (d_offset + size == 8 * sizeof(v2) && n >= 0) {
H5_FAILED();
- HDputs(" High-order zeros are present and shouldn't be!");
+ puts(" High-order zeros are present and shouldn't be!");
goto failed;
}
@@ -728,7 +728,7 @@ test_set(void)
}
if (0 == size && n >= 0) {
H5_FAILED();
- HDputs(" Found set bits but shouldn't have (reverse)!");
+ puts(" Found set bits but shouldn't have (reverse)!");
goto failed;
}
n = H5T__bit_find(v2, (size_t)0, d_offset + size, H5T_BIT_MSB, 0);
@@ -741,7 +741,7 @@ test_set(void)
}
if (0 == d_offset && n >= 0) {
H5_FAILED();
- HDputs(" Found leading zeros but shouldn't have!");
+ puts(" Found leading zeros but shouldn't have!");
goto failed;
}
}
@@ -792,12 +792,12 @@ test_clear(void)
break;
if (size > 0 && j >= (int)sizeof(v2)) {
H5_FAILED();
- HDputs(" Unabled to find cleared region in buffer");
+ puts(" Unabled to find cleared region in buffer");
goto failed;
}
if (0 == size && j < (int)sizeof(v2)) {
H5_FAILED();
- HDputs(" Found cleared bits when we shouldn't have");
+ puts(" Found cleared bits when we shouldn't have");
goto failed;
}
@@ -812,7 +812,7 @@ test_clear(void)
}
if (0 == size && n >= 0) {
H5_FAILED();
- HDputs(" Found cleared bits and shouldn't have!");
+ puts(" Found cleared bits and shouldn't have!");
goto failed;
}
n = H5T__bit_find(v2, d_offset, 8 * sizeof(v2) - d_offset, H5T_BIT_LSB, 1);
@@ -825,7 +825,7 @@ test_clear(void)
}
if (d_offset + size == 8 * sizeof(v2) && n >= 0) {
H5_FAILED();
- HDputs(" High-order ones are present and shouldn't be!");
+ puts(" High-order ones are present and shouldn't be!");
goto failed;
}
@@ -843,7 +843,7 @@ test_clear(void)
}
if (0 == size && n >= 0) {
H5_FAILED();
- HDputs(" Found cleared bits but shouldn't have (reverse)!");
+ puts(" Found cleared bits but shouldn't have (reverse)!");
goto failed;
}
n = H5T__bit_find(v2, (size_t)0, d_offset + size, H5T_BIT_MSB, 1);
@@ -856,7 +856,7 @@ test_clear(void)
}
if (0 == d_offset && n >= 0) {
H5_FAILED();
- HDputs(" Found leading ones but shouldn't have!");
+ puts(" Found leading ones but shouldn't have!");
goto failed;
}
}
diff --git a/test/btree2.c b/test/btree2.c
index a167c2d..8970d89 100644
--- a/test/btree2.c
+++ b/test/btree2.c
@@ -9928,7 +9928,7 @@ main(void)
ExpressMode = GetTestExpress();
/* For the Direct I/O driver, skip intensive tests due to poor performance */
- if (!HDstrcmp(envval, "direct"))
+ if (!strcmp(envval, "direct"))
ExpressMode = 2;
if (ExpressMode > 1)
@@ -10038,14 +10038,14 @@ main(void)
if (nerrors)
goto error;
- HDputs("All v2 B-tree tests passed.");
+ puts("All v2 B-tree tests passed.");
h5_cleanup(FILENAME, fapl);
return 0;
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
H5E_BEGIN_TRY
{
diff --git a/test/cache.c b/test/cache.c
index c4642f7..4e62886 100644
--- a/test/cache.c
+++ b/test/cache.c
@@ -4355,20 +4355,20 @@ check_flush_cache__multi_entry_test(H5F_t *file_ptr, int test_num, unsigned int
if (cache_ptr == NULL) {
pass = false;
- HDsnprintf(msg, (size_t)128, "cache_ptr NULL on entry to single entry test #%d.", test_num);
+ snprintf(msg, (size_t)128, "cache_ptr NULL on entry to single entry test #%d.", test_num);
failure_mssg = msg;
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "cache not empty at beginning of multi entry test #%d.", test_num);
+ snprintf(msg, (size_t)128, "cache not empty at beginning of multi entry test #%d.", test_num);
failure_mssg = msg;
}
else if ((spec_size < 1) || (spec == NULL)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "missing/bad test spec on entry to multi entry test #%d.", test_num);
+ snprintf(msg, (size_t)128, "missing/bad test spec on entry to multi entry test #%d.", test_num);
failure_mssg = msg;
}
@@ -4380,8 +4380,7 @@ check_flush_cache__multi_entry_test(H5F_t *file_ptr, int test_num, unsigned int
(spec[u].entry_index > max_indices[spec[u].entry_type])) {
pass = false;
- HDsnprintf(msg, (size_t)128, "bad data in spec[%u] on entry to multi entry test #%d.", u,
- test_num);
+ snprintf(msg, (size_t)128, "bad data in spec[%u] on entry to multi entry test #%d.", u, test_num);
failure_mssg = msg;
}
u++;
@@ -4412,8 +4411,8 @@ check_flush_cache__multi_entry_test(H5F_t *file_ptr, int test_num, unsigned int
if (!pass) {
- HDsnprintf(msg, (size_t)128, "flush with flags 0x%x failed in multi entry test #%d.", flush_flags,
- test_num);
+ snprintf(msg, (size_t)128, "flush with flags 0x%x failed in multi entry test #%d.", flush_flags,
+ test_num);
failure_mssg = msg;
}
}
@@ -4428,8 +4427,8 @@ check_flush_cache__multi_entry_test(H5F_t *file_ptr, int test_num, unsigned int
(entry_ptr->destroyed != spec[u].expected_destroyed)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Bad status on entry %u after flush in multi entry test #%d.", u,
- test_num);
+ snprintf(msg, (size_t)128, "Bad status on entry %u after flush in multi entry test #%d.", u,
+ test_num);
failure_mssg = msg;
}
u++;
@@ -4443,8 +4442,8 @@ check_flush_cache__multi_entry_test(H5F_t *file_ptr, int test_num, unsigned int
((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)))) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected cache len/size after flush in multi entry test #%d.",
- test_num);
+ snprintf(msg, (size_t)128, "Unexpected cache len/size after flush in multi entry test #%d.",
+ test_num);
failure_mssg = msg;
}
}
@@ -4457,14 +4456,14 @@ check_flush_cache__multi_entry_test(H5F_t *file_ptr, int test_num, unsigned int
if (!pass) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Flush failed on cleanup in multi entry test #%d.", test_num);
+ snprintf(msg, (size_t)128, "Flush failed on cleanup in multi entry test #%d.", test_num);
failure_mssg = msg;
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected cache len/size after cleanup in multi entry test #%d.",
- test_num);
+ snprintf(msg, (size_t)128, "Unexpected cache len/size after cleanup in multi entry test #%d.",
+ test_num);
failure_mssg = msg;
}
}
@@ -4510,20 +4509,20 @@ check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num, unsigned i
if (cache_ptr == NULL) {
pass = false;
- HDsnprintf(msg, (size_t)128, "cache_ptr NULL on entry to pe multi entry test #%d.", test_num);
+ snprintf(msg, (size_t)128, "cache_ptr NULL on entry to pe multi entry test #%d.", test_num);
failure_mssg = msg;
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "cache not empty at beginning of pe multi entry test #%d.", test_num);
+ snprintf(msg, (size_t)128, "cache not empty at beginning of pe multi entry test #%d.", test_num);
failure_mssg = msg;
}
else if ((spec_size < 1) || (spec == NULL)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "missing/bad test spec on entry to pe multi entry test #%d.", test_num);
+ snprintf(msg, (size_t)128, "missing/bad test spec on entry to pe multi entry test #%d.", test_num);
failure_mssg = msg;
}
@@ -4536,8 +4535,8 @@ check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num, unsigned i
(spec[u].num_pins > MAX_PINS)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "bad data in spec[%u] on entry to pe multi entry test #%d.", u,
- test_num);
+ snprintf(msg, (size_t)128, "bad data in spec[%u] on entry to pe multi entry test #%d.", u,
+ test_num);
failure_mssg = msg;
}
u++;
@@ -4573,8 +4572,8 @@ check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num, unsigned i
if (!pass) {
- HDsnprintf(msg, (size_t)128, "flush with flags 0x%x failed in pe multi entry test #%d.",
- flush_flags, test_num);
+ snprintf(msg, (size_t)128, "flush with flags 0x%x failed in pe multi entry test #%d.",
+ flush_flags, test_num);
failure_mssg = msg;
}
}
@@ -4590,8 +4589,8 @@ check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num, unsigned i
(entry_ptr->destroyed != spec[u].expected_destroyed)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Bad status on entry %u after flush in pe multi entry test #%d.", u,
- test_num);
+ snprintf(msg, (size_t)128, "Bad status on entry %u after flush in pe multi entry test #%d.", u,
+ test_num);
failure_mssg = msg;
}
u++;
@@ -4605,8 +4604,8 @@ check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num, unsigned i
((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)))) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected cache len/size after flush in pe multi entry test #%d.",
- test_num);
+ snprintf(msg, (size_t)128, "Unexpected cache len/size after flush in pe multi entry test #%d.",
+ test_num);
failure_mssg = msg;
}
}
@@ -4619,14 +4618,14 @@ check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num, unsigned i
if (!pass) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Flush failed on cleanup in pe multi entry test #%d.", test_num);
+ snprintf(msg, (size_t)128, "Flush failed on cleanup in pe multi entry test #%d.", test_num);
failure_mssg = msg;
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
pass = false;
- HDsnprintf(msg, (size_t)128,
- "Unexpected cache len/size after cleanup in pe multi entry test #%d.", test_num);
+ snprintf(msg, (size_t)128, "Unexpected cache len/size after cleanup in pe multi entry test #%d.",
+ test_num);
failure_mssg = msg;
}
}
@@ -8041,20 +8040,20 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
if (cache_ptr == NULL) {
pass = false;
- HDsnprintf(msg, (size_t)128, "cache_ptr NULL on entry to flush op test #%d.", test_num);
+ snprintf(msg, (size_t)128, "cache_ptr NULL on entry to flush op test #%d.", test_num);
failure_mssg = msg;
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "cache not empty at beginning of flush op test #%d.", test_num);
+ snprintf(msg, (size_t)128, "cache not empty at beginning of flush op test #%d.", test_num);
failure_mssg = msg;
}
else if ((spec_size < 1) || (spec == NULL)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "missing/bad test spec on entry to flush op test #%d.", test_num);
+ snprintf(msg, (size_t)128, "missing/bad test spec on entry to flush op test #%d.", test_num);
failure_mssg = msg;
}
@@ -8068,7 +8067,7 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
(spec[i].num_flush_ops > MAX_FLUSH_OPS)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "bad data in spec[%d] on entry to flush op test #%d.", i, test_num);
+ snprintf(msg, (size_t)128, "bad data in spec[%d] on entry to flush op test #%d.", i, test_num);
failure_mssg = msg;
}
i++;
@@ -8083,7 +8082,7 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
(check[i].expected_size <= (size_t)0)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "bad data in check[%d] on entry to flush op test #%d.", i, test_num);
+ snprintf(msg, (size_t)128, "bad data in check[%d] on entry to flush op test #%d.", i, test_num);
failure_mssg = msg;
}
i++;
@@ -8127,8 +8126,8 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
(cache_ptr->index_size != init_expected_index_size)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected cache len/size before flush in flush op test #%d.",
- test_num);
+ snprintf(msg, (size_t)128, "Unexpected cache len/size before flush in flush op test #%d.",
+ test_num);
failure_mssg = msg;
}
}
@@ -8140,8 +8139,8 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
if (!pass) {
pass = false;
- HDsnprintf(msg, (size_t)128, "flush with flags 0x%x failed in flush op test #%d.", flush_flags,
- test_num);
+ snprintf(msg, (size_t)128, "flush with flags 0x%x failed in flush op test #%d.", flush_flags,
+ test_num);
failure_mssg = msg;
}
}
@@ -8157,7 +8156,7 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
(entry_ptr->destroyed != spec[i].expected_destroyed)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Bad status on entry %d after flush op test #%d.", i, test_num);
+ snprintf(msg, (size_t)128, "Bad status on entry %d after flush op test #%d.", i, test_num);
failure_mssg = msg;
}
i++;
@@ -8171,8 +8170,7 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
if (check[i].in_cache != entry_in_cache(cache_ptr, check[i].entry_type, check[i].entry_index)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Check1 failed on entry %d after flush op test #%d.", i,
- test_num);
+ snprintf(msg, (size_t)128, "Check1 failed on entry %d after flush op test #%d.", i, test_num);
failure_mssg = msg;
}
@@ -8194,8 +8192,7 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
(entry_ptr->destroyed != check[i].expected_destroyed)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Check2 failed on entry %d after flush op test #%d.", i,
- test_num);
+ snprintf(msg, (size_t)128, "Check2 failed on entry %d after flush op test #%d.", i, test_num);
failure_mssg = msg;
}
i++;
@@ -8211,8 +8208,8 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)))) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected cache len/size after flush in flush op test #%d.",
- test_num);
+ snprintf(msg, (size_t)128, "Unexpected cache len/size after flush in flush op test #%d.",
+ test_num);
failure_mssg = msg;
}
}
@@ -8224,15 +8221,15 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
if (!pass) {
- HDsnprintf(msg, (size_t)128, "Flush failed on cleanup in flush op test #%d.", test_num);
+ snprintf(msg, (size_t)128, "Flush failed on cleanup in flush op test #%d.", test_num);
failure_mssg = msg;
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0) ||
(cache_ptr->clean_index_size != 0) || (cache_ptr->dirty_index_size != 0)) {
pass = false;
- HDsnprintf(msg, (size_t)128,
- "Unexpected cache len/size/cs/ds after cleanup in flush op test #%d.", test_num);
+ snprintf(msg, (size_t)128, "Unexpected cache len/size/cs/ds after cleanup in flush op test #%d.",
+ test_num);
failure_mssg = msg;
}
}
@@ -10723,20 +10720,20 @@ check_flush_cache__single_entry_test(H5F_t *file_ptr, int test_num, int entry_ty
if (cache_ptr == NULL) {
pass = false;
- HDsnprintf(msg, (size_t)128, "cache_ptr NULL on entry to single entry test #%d.", test_num);
+ snprintf(msg, (size_t)128, "cache_ptr NULL on entry to single entry test #%d.", test_num);
failure_mssg = msg;
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "cache not empty at beginning of single entry test #%d.", test_num);
+ snprintf(msg, (size_t)128, "cache not empty at beginning of single entry test #%d.", test_num);
failure_mssg = msg;
}
else if ((entry_type < 0) || (entry_type >= NUMBER_OF_ENTRY_TYPES) || (entry_idx < 0) ||
(entry_idx > max_indices[entry_type])) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Bad parameters on entry to single entry test #%d.", test_num);
+ snprintf(msg, (size_t)128, "Bad parameters on entry to single entry test #%d.", test_num);
failure_mssg = msg;
}
@@ -10763,8 +10760,8 @@ check_flush_cache__single_entry_test(H5F_t *file_ptr, int test_num, int entry_ty
if (!pass) { /* construct and set actual failure message */
- HDsnprintf(msg, (size_t)128, "flush with flags 0x%x failed in single entry test #%d.",
- flush_flags, test_num);
+ snprintf(msg, (size_t)128, "flush with flags 0x%x failed in single entry test #%d.", flush_flags,
+ test_num);
failure_mssg = msg;
}
@@ -10773,8 +10770,8 @@ check_flush_cache__single_entry_test(H5F_t *file_ptr, int test_num, int entry_ty
(entry_ptr->destroyed != expected_destroyed)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected entry status after flush in single entry test #%d.",
- test_num);
+ snprintf(msg, (size_t)128, "Unexpected entry status after flush in single entry test #%d.",
+ test_num);
failure_mssg = msg;
}
else if ((((flush_flags & H5C__FLUSH_INVALIDATE_FLAG) == 0) &&
@@ -10783,8 +10780,8 @@ check_flush_cache__single_entry_test(H5F_t *file_ptr, int test_num, int entry_ty
((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)))) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected cache len/size after flush in single entry test #%d.",
- test_num);
+ snprintf(msg, (size_t)128, "Unexpected cache len/size after flush in single entry test #%d.",
+ test_num);
failure_mssg = msg;
}
}
@@ -10796,14 +10793,14 @@ check_flush_cache__single_entry_test(H5F_t *file_ptr, int test_num, int entry_ty
if (!pass) { /* construct and set actual failure message */
- HDsnprintf(msg, (size_t)128, "Flush failed on cleanup in single entry test #%d.", test_num);
+ snprintf(msg, (size_t)128, "Flush failed on cleanup in single entry test #%d.", test_num);
failure_mssg = msg;
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected cache len/size after cleanup in single entry test #%d.",
- test_num);
+ snprintf(msg, (size_t)128, "Unexpected cache len/size after cleanup in single entry test #%d.",
+ test_num);
failure_mssg = msg;
}
else {
@@ -10842,21 +10839,20 @@ check_flush_cache__pinned_single_entry_test(H5F_t *file_ptr, int test_num, int e
if (cache_ptr == NULL) {
pass = false;
- HDsnprintf(msg, (size_t)128, "cache_ptr NULL on entry to pinned single entry test #%d.", test_num);
+ snprintf(msg, (size_t)128, "cache_ptr NULL on entry to pinned single entry test #%d.", test_num);
failure_mssg = msg;
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "cache not empty at beginning of pinned single entry test #%d.",
- test_num);
+ snprintf(msg, (size_t)128, "cache not empty at beginning of pinned single entry test #%d.", test_num);
failure_mssg = msg;
}
else if ((entry_type < 0) || (entry_type >= NUMBER_OF_ENTRY_TYPES) || (entry_idx < 0) ||
(entry_idx > max_indices[entry_type])) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Bad parameters on entry to pinned single entry test #%d.", test_num);
+ snprintf(msg, (size_t)128, "Bad parameters on entry to pinned single entry test #%d.", test_num);
failure_mssg = msg;
}
@@ -10893,8 +10889,8 @@ check_flush_cache__pinned_single_entry_test(H5F_t *file_ptr, int test_num, int e
if (!pass) { /* construct and set the correct failure message */
- HDsnprintf(msg, (size_t)128, "flush with flags 0x%x failed in pinned single entry test #%d.",
- flush_flags, test_num);
+ snprintf(msg, (size_t)128, "flush with flags 0x%x failed in pinned single entry test #%d.",
+ flush_flags, test_num);
failure_mssg = msg;
}
else if ((entry_ptr->deserialized != expected_deserialized) ||
@@ -10902,8 +10898,8 @@ check_flush_cache__pinned_single_entry_test(H5F_t *file_ptr, int test_num, int e
(entry_ptr->destroyed != expected_destroyed)) {
pass = false;
- HDsnprintf(msg, (size_t)128,
- "Unexpected entry status after flush in pinned single entry test #%d.", test_num);
+ snprintf(msg, (size_t)128, "Unexpected entry status after flush in pinned single entry test #%d.",
+ test_num);
failure_mssg = msg;
}
else if ((((flush_flags & H5C__FLUSH_INVALIDATE_FLAG) == 0) &&
@@ -10912,8 +10908,8 @@ check_flush_cache__pinned_single_entry_test(H5F_t *file_ptr, int test_num, int e
((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)))) {
pass = false;
- HDsnprintf(msg, (size_t)128,
- "Unexpected cache len/size after flush in pinned single entry test #%d.", test_num);
+ snprintf(msg, (size_t)128,
+ "Unexpected cache len/size after flush in pinned single entry test #%d.", test_num);
failure_mssg = msg;
}
}
@@ -10941,15 +10937,14 @@ check_flush_cache__pinned_single_entry_test(H5F_t *file_ptr, int test_num, int e
if (!pass) {
- HDsnprintf(msg, (size_t)128, "Flush failed on cleanup in pinned single entry test #%d.",
- test_num);
+ snprintf(msg, (size_t)128, "Flush failed on cleanup in pinned single entry test #%d.", test_num);
failure_mssg = msg;
}
else if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0)) {
pass = false;
- HDsnprintf(msg, (size_t)128,
- "Unexpected cache len/size after cleanup in pinned single entry test #%d.", test_num);
+ snprintf(msg, (size_t)128,
+ "Unexpected cache len/size after cleanup in pinned single entry test #%d.", test_num);
failure_mssg = msg;
}
else {
@@ -11023,13 +11018,13 @@ check_get_entry_status(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 1.");
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 1.");
failure_mssg = msg;
}
else if (in_cache) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected status 1.");
+ snprintf(msg, (size_t)128, "Unexpected status 1.");
failure_mssg = msg;
}
}
@@ -11049,13 +11044,13 @@ check_get_entry_status(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 2.");
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 2.");
failure_mssg = msg;
}
else if (!in_cache || is_dirty || is_protected || is_pinned) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected status 2.");
+ snprintf(msg, (size_t)128, "Unexpected status 2.");
failure_mssg = msg;
}
}
@@ -11073,13 +11068,13 @@ check_get_entry_status(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 3.");
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 3.");
failure_mssg = msg;
}
else if (!in_cache || is_dirty || !is_protected || is_pinned) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected status 3.");
+ snprintf(msg, (size_t)128, "Unexpected status 3.");
failure_mssg = msg;
}
}
@@ -11097,13 +11092,13 @@ check_get_entry_status(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 4.");
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 4.");
failure_mssg = msg;
}
else if (!in_cache || is_dirty || is_protected || !is_pinned) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected status 4.");
+ snprintf(msg, (size_t)128, "Unexpected status 4.");
failure_mssg = msg;
}
}
@@ -11121,13 +11116,13 @@ check_get_entry_status(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 5.");
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 5.");
failure_mssg = msg;
}
else if (!in_cache || !is_dirty || is_protected || !is_pinned) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected status 5.");
+ snprintf(msg, (size_t)128, "Unexpected status 5.");
failure_mssg = msg;
}
}
@@ -11145,13 +11140,13 @@ check_get_entry_status(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 6.");
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 6.");
failure_mssg = msg;
}
else if (!in_cache || !is_dirty || is_protected || is_pinned) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected status 6.");
+ snprintf(msg, (size_t)128, "Unexpected status 6.");
failure_mssg = msg;
}
}
@@ -11230,19 +11225,19 @@ check_expunge_entry(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 1.");
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 1.");
failure_mssg = msg;
}
else if (in_cache) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected status 1.");
+ snprintf(msg, (size_t)128, "Unexpected status 1.");
failure_mssg = msg;
}
else if ((entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 1.");
+ snprintf(msg, (size_t)128, "Unexpected entry history 1.");
failure_mssg = msg;
}
}
@@ -11266,19 +11261,19 @@ check_expunge_entry(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 2.");
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 2.");
failure_mssg = msg;
}
else if (!in_cache || is_dirty || is_protected || is_pinned) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected status 2.");
+ snprintf(msg, (size_t)128, "Unexpected status 2.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 2.");
+ snprintf(msg, (size_t)128, "Unexpected entry history 2.");
failure_mssg = msg;
}
}
@@ -11304,19 +11299,19 @@ check_expunge_entry(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 3.");
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 3.");
failure_mssg = msg;
}
else if (in_cache) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected status 3.");
+ snprintf(msg, (size_t)128, "Unexpected status 3.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (!entry_ptr->destroyed)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 3.");
+ snprintf(msg, (size_t)128, "Unexpected entry history 3.");
failure_mssg = msg;
}
}
@@ -11340,19 +11335,19 @@ check_expunge_entry(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 4.");
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 4.");
failure_mssg = msg;
}
else if (in_cache) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected status 4.");
+ snprintf(msg, (size_t)128, "Unexpected status 4.");
failure_mssg = msg;
}
else if ((entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 4.");
+ snprintf(msg, (size_t)128, "Unexpected entry history 4.");
failure_mssg = msg;
}
}
@@ -11376,19 +11371,19 @@ check_expunge_entry(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 5.");
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 5.");
failure_mssg = msg;
}
else if (!in_cache || !is_dirty || is_protected || is_pinned) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected status 5.");
+ snprintf(msg, (size_t)128, "Unexpected status 5.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 5.");
+ snprintf(msg, (size_t)128, "Unexpected entry history 5.");
failure_mssg = msg;
}
}
@@ -11414,19 +11409,19 @@ check_expunge_entry(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 6.");
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 6.");
failure_mssg = msg;
}
else if (in_cache) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected status 6.");
+ snprintf(msg, (size_t)128, "Unexpected status 6.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (!entry_ptr->destroyed)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 6.");
+ snprintf(msg, (size_t)128, "Unexpected entry history 6.");
failure_mssg = msg;
}
}
@@ -11956,13 +11951,13 @@ check_move_entry__run_test(H5F_t *file_ptr, unsigned test_num, struct move_entry
if (cache_ptr == NULL) {
pass = false;
- HDsnprintf(msg, (size_t)128, "cache_ptr NULL on entry to move test #%u.", test_num);
+ snprintf(msg, (size_t)128, "cache_ptr NULL on entry to move test #%u.", test_num);
failure_mssg = msg;
}
else if (spec_ptr == NULL) {
pass = false;
- HDsnprintf(msg, (size_t)128, "spec_ptr NULL on entry to move test #%u.", test_num);
+ snprintf(msg, (size_t)128, "spec_ptr NULL on entry to move test #%u.", test_num);
failure_mssg = msg;
}
@@ -11976,7 +11971,7 @@ check_move_entry__run_test(H5F_t *file_ptr, unsigned test_num, struct move_entry
(!(entry_ptr->at_main_addr)) || (entry_ptr->addr != entry_ptr->main_addr)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "bad entry_ptr in move test #%u.", test_num);
+ snprintf(msg, (size_t)128, "bad entry_ptr in move test #%u.", test_num);
failure_mssg = msg;
}
}
@@ -12006,7 +12001,7 @@ check_move_entry__run_test(H5F_t *file_ptr, unsigned test_num, struct move_entry
if (!(entry_ptr->header.is_pinned)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Pinned entry not pinned after move in test #%u.", test_num);
+ snprintf(msg, (size_t)128, "Pinned entry not pinned after move in test #%u.", test_num);
failure_mssg = msg;
}
@@ -12023,8 +12018,8 @@ check_move_entry__run_test(H5F_t *file_ptr, unsigned test_num, struct move_entry
if (test_ptr == NULL) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Pinned entry not in pel after move in test #%u.",
- test_num);
+ snprintf(msg, (size_t)128, "Pinned entry not in pel after move in test #%u.",
+ test_num);
failure_mssg = msg;
}
} /* end else */
@@ -12037,7 +12032,7 @@ check_move_entry__run_test(H5F_t *file_ptr, unsigned test_num, struct move_entry
if (entry_ptr->header.is_pinned) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unpinned entry pinned after move in test #%u.", test_num);
+ snprintf(msg, (size_t)128, "Unpinned entry pinned after move in test #%u.", test_num);
failure_mssg = msg;
}
@@ -12047,8 +12042,7 @@ check_move_entry__run_test(H5F_t *file_ptr, unsigned test_num, struct move_entry
if ((entry_ptr->header.prev != NULL) ||
(cache_ptr->LRU_head_ptr != (H5C_cache_entry_t *)entry_ptr)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Entry not at head of LRU after move in test #%u.",
- test_num);
+ snprintf(msg, (size_t)128, "Entry not at head of LRU after move in test #%u.", test_num);
failure_mssg = msg;
}
} /* end else */
@@ -12058,8 +12052,7 @@ check_move_entry__run_test(H5F_t *file_ptr, unsigned test_num, struct move_entry
if (!(entry_ptr->header.is_protected)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Protected entry not protected after move in test #%u.",
- test_num);
+ snprintf(msg, (size_t)128, "Protected entry not protected after move in test #%u.", test_num);
failure_mssg = msg;
}
@@ -12070,8 +12063,8 @@ check_move_entry__run_test(H5F_t *file_ptr, unsigned test_num, struct move_entry
if (entry_ptr->header.is_protected) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unprotected entry not unprotected after move in test #%u.",
- test_num);
+ snprintf(msg, (size_t)128, "Unprotected entry not unprotected after move in test #%u.",
+ test_num);
failure_mssg = msg;
}
} /* end else */
@@ -12141,13 +12134,13 @@ check_pin_protected_entry(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5C_pin_protected_entry() reports failure.");
+ snprintf(msg, (size_t)128, "H5C_pin_protected_entry() reports failure.");
failure_mssg = msg;
}
else if (!(entry_ptr->header.is_pinned)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "entry not pinned when it should be.");
+ snprintf(msg, (size_t)128, "entry not pinned when it should be.");
failure_mssg = msg;
}
else {
@@ -12270,7 +12263,7 @@ check_resize_entry(unsigned paged)
(cache_ptr->slist_size != 0)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 1.");
+ snprintf(msg, (size_t)128, "Unexpected cache status 1.");
failure_mssg = msg;
}
}
@@ -12286,7 +12279,7 @@ check_resize_entry(unsigned paged)
(cache_ptr->slist_len != 0) || (cache_ptr->slist_size != 0)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 2.");
+ snprintf(msg, (size_t)128, "Unexpected cache status 2.");
failure_mssg = msg;
}
}
@@ -12299,19 +12292,19 @@ check_resize_entry(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 1.");
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 1.");
failure_mssg = msg;
}
else if (!in_cache || is_dirty || !is_protected || is_pinned) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected status 1.");
+ snprintf(msg, (size_t)128, "Unexpected status 1.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 1.");
+ snprintf(msg, (size_t)128, "Unexpected entry history 1.");
failure_mssg = msg;
}
}
@@ -12323,7 +12316,7 @@ check_resize_entry(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "error(s) in H5C_resize_entry().");
+ snprintf(msg, (size_t)128, "error(s) in H5C_resize_entry().");
failure_mssg = msg;
}
else {
@@ -12333,7 +12326,7 @@ check_resize_entry(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5C_unprotect() reports failure 1.");
+ snprintf(msg, (size_t)128, "H5C_unprotect() reports failure 1.");
failure_mssg = msg;
}
else {
@@ -12355,7 +12348,7 @@ check_resize_entry(unsigned paged)
((cache_ptr->slist_len != 1) || (cache_ptr->slist_size != (LARGE_ENTRY_SIZE / 2))))) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 3.");
+ snprintf(msg, (size_t)128, "Unexpected cache status 3.");
failure_mssg = msg;
}
}
@@ -12368,20 +12361,20 @@ check_resize_entry(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 2.");
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 2.");
failure_mssg = msg;
}
else if (!in_cache || !is_dirty || is_protected || is_pinned ||
(reported_entry_size != (LARGE_ENTRY_SIZE / 2))) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected status 2.");
+ snprintf(msg, (size_t)128, "Unexpected status 2.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 2.");
+ snprintf(msg, (size_t)128, "Unexpected entry history 2.");
failure_mssg = msg;
}
}
@@ -12398,7 +12391,7 @@ check_resize_entry(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "error(s) in H5C_resize_entry().");
+ snprintf(msg, (size_t)128, "error(s) in H5C_resize_entry().");
failure_mssg = msg;
}
else {
@@ -12408,7 +12401,7 @@ check_resize_entry(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5C_unprotect() reports failure 2.");
+ snprintf(msg, (size_t)128, "H5C_unprotect() reports failure 2.");
failure_mssg = msg;
}
else {
@@ -12430,7 +12423,7 @@ check_resize_entry(unsigned paged)
((cache_ptr->slist_len != 1) || (cache_ptr->slist_size != LARGE_ENTRY_SIZE)))) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 4.");
+ snprintf(msg, (size_t)128, "Unexpected cache status 4.");
failure_mssg = msg;
}
}
@@ -12443,20 +12436,20 @@ check_resize_entry(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 3.");
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 3.");
failure_mssg = msg;
}
else if (!in_cache || !is_dirty || is_protected || is_pinned ||
(reported_entry_size != LARGE_ENTRY_SIZE)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected status 3.");
+ snprintf(msg, (size_t)128, "Unexpected status 3.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 3.");
+ snprintf(msg, (size_t)128, "Unexpected entry history 3.");
failure_mssg = msg;
}
}
@@ -12475,7 +12468,7 @@ check_resize_entry(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5C_resize_entry() reports failure 1.");
+ snprintf(msg, (size_t)128, "H5C_resize_entry() reports failure 1.");
failure_mssg = msg;
}
}
@@ -12487,7 +12480,7 @@ check_resize_entry(unsigned paged)
((cache_ptr->slist_len != 1) || (cache_ptr->slist_size != (LARGE_ENTRY_SIZE / 4))))) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 5.");
+ snprintf(msg, (size_t)128, "Unexpected cache status 5.");
failure_mssg = msg;
}
}
@@ -12500,20 +12493,20 @@ check_resize_entry(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 4.");
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 4.");
failure_mssg = msg;
}
else if (!in_cache || !is_dirty || is_protected || !is_pinned ||
(reported_entry_size != (LARGE_ENTRY_SIZE / 4))) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected status 4.");
+ snprintf(msg, (size_t)128, "Unexpected status 4.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 4.");
+ snprintf(msg, (size_t)128, "Unexpected entry history 4.");
failure_mssg = msg;
}
}
@@ -12525,7 +12518,7 @@ check_resize_entry(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5C_resize_entry() reports failure 2.");
+ snprintf(msg, (size_t)128, "H5C_resize_entry() reports failure 2.");
failure_mssg = msg;
}
}
@@ -12537,7 +12530,7 @@ check_resize_entry(unsigned paged)
((cache_ptr->slist_len != 1) || (cache_ptr->slist_size != LARGE_ENTRY_SIZE)))) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 6.");
+ snprintf(msg, (size_t)128, "Unexpected cache status 6.");
failure_mssg = msg;
}
}
@@ -12550,20 +12543,20 @@ check_resize_entry(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 5.");
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 5.");
failure_mssg = msg;
}
else if (!in_cache || !is_dirty || is_protected || !is_pinned ||
(reported_entry_size != LARGE_ENTRY_SIZE)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected status 5.");
+ snprintf(msg, (size_t)128, "Unexpected status 5.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 5.");
+ snprintf(msg, (size_t)128, "Unexpected entry history 5.");
failure_mssg = msg;
}
}
@@ -12583,19 +12576,19 @@ check_resize_entry(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 6.");
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 6.");
failure_mssg = msg;
}
else if (in_cache) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected status 6.");
+ snprintf(msg, (size_t)128, "Unexpected status 6.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (!entry_ptr->destroyed)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 6.");
+ snprintf(msg, (size_t)128, "Unexpected entry history 6.");
failure_mssg = msg;
}
}
@@ -12606,7 +12599,7 @@ check_resize_entry(unsigned paged)
((cache_ptr->slist_enabled) && ((cache_ptr->slist_len != 0) || (cache_ptr->slist_size != 0)))) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 7.");
+ snprintf(msg, (size_t)128, "Unexpected cache status 7.");
failure_mssg = msg;
}
}
@@ -12619,7 +12612,7 @@ check_resize_entry(unsigned paged)
((cache_ptr->slist_enabled) && ((cache_ptr->slist_len != 0) || (cache_ptr->slist_size != 0)))) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 8.");
+ snprintf(msg, (size_t)128, "Unexpected cache status 8.");
failure_mssg = msg;
}
@@ -12647,7 +12640,7 @@ check_resize_entry(unsigned paged)
((cache_ptr->slist_len != 1) || (cache_ptr->slist_size != LARGE_ENTRY_SIZE)))) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 9.");
+ snprintf(msg, (size_t)128, "Unexpected cache status 9.");
failure_mssg = msg;
}
}
@@ -12664,7 +12657,7 @@ check_resize_entry(unsigned paged)
((cache_ptr->slist_len != 1) || (cache_ptr->slist_size != LARGE_ENTRY_SIZE)))) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 10.");
+ snprintf(msg, (size_t)128, "Unexpected cache status 10.");
failure_mssg = msg;
}
}
@@ -12677,19 +12670,19 @@ check_resize_entry(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 7.");
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 7.");
failure_mssg = msg;
}
else if (!in_cache || is_dirty || !is_protected || is_pinned) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected status 7.");
+ snprintf(msg, (size_t)128, "Unexpected status 7.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 7.");
+ snprintf(msg, (size_t)128, "Unexpected entry history 7.");
failure_mssg = msg;
}
}
@@ -12701,7 +12694,7 @@ check_resize_entry(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "error(s) in H5C_resize_entry().");
+ snprintf(msg, (size_t)128, "error(s) in H5C_resize_entry().");
failure_mssg = msg;
}
else {
@@ -12711,7 +12704,7 @@ check_resize_entry(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5C_unprotect() reports failure 3.");
+ snprintf(msg, (size_t)128, "H5C_unprotect() reports failure 3.");
failure_mssg = msg;
}
else {
@@ -12735,7 +12728,7 @@ check_resize_entry(unsigned paged)
(cache_ptr->slist_size != (LARGE_ENTRY_SIZE + (LARGE_ENTRY_SIZE / 2)))))) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 11.");
+ snprintf(msg, (size_t)128, "Unexpected cache status 11.");
failure_mssg = msg;
}
}
@@ -12748,20 +12741,20 @@ check_resize_entry(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 8.");
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 8.");
failure_mssg = msg;
}
else if (!in_cache || !is_dirty || is_protected || is_pinned ||
(reported_entry_size != (LARGE_ENTRY_SIZE / 2))) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected status 8.");
+ snprintf(msg, (size_t)128, "Unexpected status 8.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 8.");
+ snprintf(msg, (size_t)128, "Unexpected entry history 8.");
failure_mssg = msg;
}
}
@@ -12778,7 +12771,7 @@ check_resize_entry(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "error(s) in H5C_resize_entry().");
+ snprintf(msg, (size_t)128, "error(s) in H5C_resize_entry().");
failure_mssg = msg;
}
else {
@@ -12788,7 +12781,7 @@ check_resize_entry(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5C_unprotect() reports failure 4.");
+ snprintf(msg, (size_t)128, "H5C_unprotect() reports failure 4.");
failure_mssg = msg;
}
else {
@@ -12810,7 +12803,7 @@ check_resize_entry(unsigned paged)
((cache_ptr->slist_len != 2) || (cache_ptr->slist_size != 2 * LARGE_ENTRY_SIZE)))) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 12.");
+ snprintf(msg, (size_t)128, "Unexpected cache status 12.");
failure_mssg = msg;
}
}
@@ -12823,20 +12816,20 @@ check_resize_entry(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 9.");
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 9.");
failure_mssg = msg;
}
else if (!in_cache || !is_dirty || is_protected || is_pinned ||
(reported_entry_size != LARGE_ENTRY_SIZE)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected status 9.");
+ snprintf(msg, (size_t)128, "Unexpected status 9.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 9.");
+ snprintf(msg, (size_t)128, "Unexpected entry history 9.");
failure_mssg = msg;
}
}
@@ -12855,7 +12848,7 @@ check_resize_entry(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5C_resize_entry() reports failure 3.");
+ snprintf(msg, (size_t)128, "H5C_resize_entry() reports failure 3.");
failure_mssg = msg;
}
}
@@ -12869,7 +12862,7 @@ check_resize_entry(unsigned paged)
(cache_ptr->slist_size != (LARGE_ENTRY_SIZE + (LARGE_ENTRY_SIZE / 4)))))) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 13.");
+ snprintf(msg, (size_t)128, "Unexpected cache status 13.");
failure_mssg = msg;
}
}
@@ -12882,20 +12875,20 @@ check_resize_entry(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 10.");
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 10.");
failure_mssg = msg;
}
else if (!in_cache || !is_dirty || is_protected || !is_pinned ||
(reported_entry_size != (LARGE_ENTRY_SIZE / 4))) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected status 10.");
+ snprintf(msg, (size_t)128, "Unexpected status 10.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 10.");
+ snprintf(msg, (size_t)128, "Unexpected entry history 10.");
failure_mssg = msg;
}
}
@@ -12907,7 +12900,7 @@ check_resize_entry(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5C_resize_entry() reports failure 4.");
+ snprintf(msg, (size_t)128, "H5C_resize_entry() reports failure 4.");
failure_mssg = msg;
}
}
@@ -12919,7 +12912,7 @@ check_resize_entry(unsigned paged)
((cache_ptr->slist_len != 2) || (cache_ptr->slist_size != (2 * LARGE_ENTRY_SIZE))))) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 14.");
+ snprintf(msg, (size_t)128, "Unexpected cache status 14.");
failure_mssg = msg;
}
}
@@ -12932,20 +12925,20 @@ check_resize_entry(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 11.");
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 11.");
failure_mssg = msg;
}
else if (!in_cache || !is_dirty || is_protected || !is_pinned ||
(reported_entry_size != LARGE_ENTRY_SIZE)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected status 11.");
+ snprintf(msg, (size_t)128, "Unexpected status 11.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (entry_ptr->destroyed)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 11.");
+ snprintf(msg, (size_t)128, "Unexpected entry history 11.");
failure_mssg = msg;
}
}
@@ -12965,19 +12958,19 @@ check_resize_entry(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 12.");
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 12.");
failure_mssg = msg;
}
else if (in_cache) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected status 12.");
+ snprintf(msg, (size_t)128, "Unexpected status 12.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (!entry_ptr->destroyed)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 12.");
+ snprintf(msg, (size_t)128, "Unexpected entry history 12.");
failure_mssg = msg;
}
}
@@ -12989,7 +12982,7 @@ check_resize_entry(unsigned paged)
((cache_ptr->slist_len != 1) || (cache_ptr->slist_size != LARGE_ENTRY_SIZE)))) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 15.");
+ snprintf(msg, (size_t)128, "Unexpected cache status 15.");
failure_mssg = msg;
}
}
@@ -13012,7 +13005,7 @@ check_resize_entry(unsigned paged)
((cache_ptr->slist_enabled) && ((cache_ptr->slist_len != 0) || (cache_ptr->slist_size != 0)))) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 16.");
+ snprintf(msg, (size_t)128, "Unexpected cache status 16.");
failure_mssg = msg;
}
}
@@ -13139,7 +13132,7 @@ check_evictions_enabled(unsigned paged)
(cache_ptr->evictions_enabled != true)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 1.");
+ snprintf(msg, (size_t)128, "Unexpected cache status 1.");
failure_mssg = msg;
}
}
@@ -13155,7 +13148,7 @@ check_evictions_enabled(unsigned paged)
if ((result != SUCCEED) || (evictions_enabled != true)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected evictions enabled 1.");
+ snprintf(msg, (size_t)128, "Unexpected evictions enabled 1.");
failure_mssg = msg;
}
}
@@ -13183,7 +13176,7 @@ check_evictions_enabled(unsigned paged)
(cache_ptr->evictions_enabled != true)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 2.");
+ snprintf(msg, (size_t)128, "Unexpected cache status 2.");
failure_mssg = msg;
}
}
@@ -13209,7 +13202,7 @@ check_evictions_enabled(unsigned paged)
(cache_ptr->evictions_enabled != true)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 3.");
+ snprintf(msg, (size_t)128, "Unexpected cache status 3.");
failure_mssg = msg;
}
}
@@ -13227,19 +13220,19 @@ check_evictions_enabled(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 1.");
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 1.");
failure_mssg = msg;
}
else if (in_cache) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected status 1.");
+ snprintf(msg, (size_t)128, "Unexpected status 1.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (!entry_ptr->destroyed)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 1.");
+ snprintf(msg, (size_t)128, "Unexpected entry history 1.");
failure_mssg = msg;
}
}
@@ -13265,7 +13258,7 @@ check_evictions_enabled(unsigned paged)
(cache_ptr->evictions_enabled != true)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 4.");
+ snprintf(msg, (size_t)128, "Unexpected cache status 4.");
failure_mssg = msg;
}
}
@@ -13283,19 +13276,19 @@ check_evictions_enabled(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 2.");
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 2.");
failure_mssg = msg;
}
else if (in_cache) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected status 2.");
+ snprintf(msg, (size_t)128, "Unexpected status 2.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (!entry_ptr->destroyed)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 2.");
+ snprintf(msg, (size_t)128, "Unexpected entry history 2.");
failure_mssg = msg;
}
}
@@ -13311,7 +13304,7 @@ check_evictions_enabled(unsigned paged)
if (result != SUCCEED) {
pass = false;
- HDsnprintf(msg, (size_t)128, "can't disable evictions 1.");
+ snprintf(msg, (size_t)128, "can't disable evictions 1.");
failure_mssg = msg;
}
}
@@ -13328,7 +13321,7 @@ check_evictions_enabled(unsigned paged)
(cache_ptr->evictions_enabled != false)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 5.");
+ snprintf(msg, (size_t)128, "Unexpected cache status 5.");
failure_mssg = msg;
}
}
@@ -13355,7 +13348,7 @@ check_evictions_enabled(unsigned paged)
(cache_ptr->evictions_enabled != false)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 6.");
+ snprintf(msg, (size_t)128, "Unexpected cache status 6.");
failure_mssg = msg;
}
}
@@ -13381,7 +13374,7 @@ check_evictions_enabled(unsigned paged)
(cache_ptr->evictions_enabled != false)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 7.");
+ snprintf(msg, (size_t)128, "Unexpected cache status 7.");
failure_mssg = msg;
}
}
@@ -13397,7 +13390,7 @@ check_evictions_enabled(unsigned paged)
if (result != SUCCEED) {
pass = false;
- HDsnprintf(msg, (size_t)128, "can't enable evictions 1.");
+ snprintf(msg, (size_t)128, "can't enable evictions 1.");
failure_mssg = msg;
}
}
@@ -13424,7 +13417,7 @@ check_evictions_enabled(unsigned paged)
(cache_ptr->evictions_enabled != true)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 8.");
+ snprintf(msg, (size_t)128, "Unexpected cache status 8.");
failure_mssg = msg;
}
}
@@ -13454,7 +13447,7 @@ check_evictions_enabled(unsigned paged)
(cache_ptr->evictions_enabled != true)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 9.");
+ snprintf(msg, (size_t)128, "Unexpected cache status 9.");
failure_mssg = msg;
}
}
@@ -13472,19 +13465,19 @@ check_evictions_enabled(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 3.");
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 3.");
failure_mssg = msg;
}
else if (in_cache) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected status 3.");
+ snprintf(msg, (size_t)128, "Unexpected status 3.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (!entry_ptr->destroyed)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 3.");
+ snprintf(msg, (size_t)128, "Unexpected entry history 3.");
failure_mssg = msg;
}
}
@@ -13502,19 +13495,19 @@ check_evictions_enabled(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 4.");
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 4.");
failure_mssg = msg;
}
else if (in_cache) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected status 4.");
+ snprintf(msg, (size_t)128, "Unexpected status 4.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (!entry_ptr->destroyed)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 4.");
+ snprintf(msg, (size_t)128, "Unexpected entry history 4.");
failure_mssg = msg;
}
}
@@ -13530,7 +13523,7 @@ check_evictions_enabled(unsigned paged)
if (result != SUCCEED) {
pass = false;
- HDsnprintf(msg, (size_t)128, "can't disable evictions 2.");
+ snprintf(msg, (size_t)128, "can't disable evictions 2.");
failure_mssg = msg;
}
}
@@ -13559,7 +13552,7 @@ check_evictions_enabled(unsigned paged)
(cache_ptr->evictions_enabled != false)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 10.");
+ snprintf(msg, (size_t)128, "Unexpected cache status 10.");
failure_mssg = msg;
}
}
@@ -13575,7 +13568,7 @@ check_evictions_enabled(unsigned paged)
if (result != SUCCEED) {
pass = false;
- HDsnprintf(msg, (size_t)128, "can't enable evictions 2.");
+ snprintf(msg, (size_t)128, "can't enable evictions 2.");
failure_mssg = msg;
}
}
@@ -13601,7 +13594,7 @@ check_evictions_enabled(unsigned paged)
(cache_ptr->evictions_enabled != true)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected cache status 11.");
+ snprintf(msg, (size_t)128, "Unexpected cache status 11.");
failure_mssg = msg;
}
}
@@ -13619,19 +13612,19 @@ check_evictions_enabled(unsigned paged)
if (result < 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 5.");
+ snprintf(msg, (size_t)128, "H5C_get_entry_status() reports failure 5.");
failure_mssg = msg;
}
else if (in_cache) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected status 5.");
+ snprintf(msg, (size_t)128, "Unexpected status 5.");
failure_mssg = msg;
}
else if ((!entry_ptr->deserialized) || (entry_ptr->serialized) || (!entry_ptr->destroyed)) {
pass = false;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 5.");
+ snprintf(msg, (size_t)128, "Unexpected entry history 5.");
failure_mssg = msg;
}
}
@@ -13647,7 +13640,7 @@ check_evictions_enabled(unsigned paged)
if (result != SUCCEED) {
pass = false;
- HDsnprintf(msg, (size_t)128, "can't disable evictions 3.");
+ snprintf(msg, (size_t)128, "can't disable evictions 3.");
failure_mssg = msg;
}
}
@@ -33863,7 +33856,7 @@ main(void)
printf("=========================================\n");
if (!h5_using_default_driver(NULL)) {
- HDputs(" -- SKIPPED for incompatible VFD --");
+ puts(" -- SKIPPED for incompatible VFD --");
exit(EXIT_SUCCESS);
}
diff --git a/test/cache_api.c b/test/cache_api.c
index b2fa63b..746f2f0 100644
--- a/test/cache_api.c
+++ b/test/cache_api.c
@@ -1050,7 +1050,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
/* create the dataset */
if (pass) {
- HDsnprintf(dset_name, sizeof(dset_name), "/dset%03d", i);
+ snprintf(dset_name, sizeof(dset_name), "/dset%03d", i);
dataset_ids[i] = H5Dcreate2(file_id, dset_name, H5T_STD_I32BE, dataspace_id, H5P_DEFAULT,
properties, H5P_DEFAULT);
@@ -1750,7 +1750,7 @@ check_fapl_mdc_api_errs(void)
if (result >= 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5Pset_mdc_config() accepted invalid_configs[%d].", i);
+ snprintf(msg, (size_t)128, "H5Pset_mdc_config() accepted invalid_configs[%d].", i);
failure_mssg = msg;
}
i++;
@@ -1979,7 +1979,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
if (result >= 0) {
pass = false;
- HDsnprintf(msg, (size_t)128, "H5Fset_mdc_config() accepted invalid_configs[%d].", i);
+ snprintf(msg, (size_t)128, "H5Fset_mdc_config() accepted invalid_configs[%d].", i);
failure_mssg = msg;
}
i++;
diff --git a/test/cache_common.c b/test/cache_common.c
index 23fca65..02a216b 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -2261,15 +2261,15 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if ((!expected[i].in_cache) && ((expected[i].is_protected) || (expected[i].is_pinned))) {
pass = false;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf), "%d: Contradictory data in expected[%d].\n", tag, i);
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf), "%d: Contradictory data in expected[%d].\n", tag, i);
failure_mssg = tmp_msg_buf;
}
if ((!expected[i].in_cache) && (expected[i].is_dirty) && (!entry_ptr->expunged)) {
pass = false;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d: expected[%d] specs non-expunged, dirty, non-resident.\n", tag, i);
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d: expected[%d] specs non-expunged, dirty, non-resident.\n", tag, i);
failure_mssg = tmp_msg_buf;
}
@@ -2280,10 +2280,10 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (in_cache != expected[i].in_cache) {
pass = false;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) in cache actual/expected = %d/%d.\n", tag,
- (int)expected[i].entry_type, (int)expected[i].entry_index, (int)in_cache,
- (int)expected[i].in_cache);
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) in cache actual/expected = %d/%d.\n", tag,
+ (int)expected[i].entry_type, (int)expected[i].entry_index, (int)in_cache,
+ (int)expected[i].in_cache);
failure_mssg = tmp_msg_buf;
}
}
@@ -2293,10 +2293,10 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (entry_ptr->size != expected[i].size) {
pass = false;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) size actual/expected = %ld/%ld.\n", tag,
- (int)expected[i].entry_type, (int)expected[i].entry_index, (long)(entry_ptr->size),
- (long)expected[i].size);
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) size actual/expected = %ld/%ld.\n", tag,
+ (int)expected[i].entry_type, (int)expected[i].entry_index, (long)(entry_ptr->size),
+ (long)expected[i].size);
failure_mssg = tmp_msg_buf;
}
}
@@ -2306,10 +2306,10 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (entry_ptr->header.size != expected[i].size) {
pass = false;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) header size actual/expected = %ld/%ld.\n", tag,
- (int)expected[i].entry_type, (int)expected[i].entry_index,
- (long)(entry_ptr->header.size), (long)expected[i].size);
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) header size actual/expected = %ld/%ld.\n", tag,
+ (int)expected[i].entry_type, (int)expected[i].entry_index,
+ (long)(entry_ptr->header.size), (long)expected[i].size);
failure_mssg = tmp_msg_buf;
}
}
@@ -2319,10 +2319,10 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (entry_ptr->at_main_addr != expected[i].at_main_addr) {
pass = false;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) at main addr actual/expected = %d/%d.\n", tag,
- (int)expected[i].entry_type, (int)expected[i].entry_index,
- (int)(entry_ptr->at_main_addr), (int)expected[i].at_main_addr);
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) at main addr actual/expected = %d/%d.\n", tag,
+ (int)expected[i].entry_type, (int)expected[i].entry_index,
+ (int)(entry_ptr->at_main_addr), (int)expected[i].at_main_addr);
failure_mssg = tmp_msg_buf;
}
}
@@ -2332,10 +2332,10 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (entry_ptr->is_dirty != expected[i].is_dirty) {
pass = false;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) is_dirty actual/expected = %d/%d.\n", tag,
- (int)expected[i].entry_type, (int)expected[i].entry_index,
- (int)(entry_ptr->is_dirty), (int)expected[i].is_dirty);
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) is_dirty actual/expected = %d/%d.\n", tag,
+ (int)expected[i].entry_type, (int)expected[i].entry_index,
+ (int)(entry_ptr->is_dirty), (int)expected[i].is_dirty);
failure_mssg = tmp_msg_buf;
}
}
@@ -2345,10 +2345,10 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (entry_ptr->header.is_dirty != expected[i].is_dirty) {
pass = false;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) header is_dirty actual/expected = %d/%d.\n", tag,
- (int)expected[i].entry_type, (int)expected[i].entry_index,
- (int)(entry_ptr->header.is_dirty), (int)expected[i].is_dirty);
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) header is_dirty actual/expected = %d/%d.\n", tag,
+ (int)expected[i].entry_type, (int)expected[i].entry_index,
+ (int)(entry_ptr->header.is_dirty), (int)expected[i].is_dirty);
failure_mssg = tmp_msg_buf;
}
}
@@ -2358,10 +2358,10 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (entry_ptr->is_protected != expected[i].is_protected) {
pass = false;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) is_protected actual/expected = %d/%d.\n", tag,
- (int)expected[i].entry_type, (int)expected[i].entry_index,
- (int)(entry_ptr->is_protected), (int)expected[i].is_protected);
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) is_protected actual/expected = %d/%d.\n", tag,
+ (int)expected[i].entry_type, (int)expected[i].entry_index,
+ (int)(entry_ptr->is_protected), (int)expected[i].is_protected);
failure_mssg = tmp_msg_buf;
}
}
@@ -2371,10 +2371,10 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (entry_ptr->header.is_protected != expected[i].is_protected) {
pass = false;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) header is_protected actual/expected = %d/%d.\n", tag,
- (int)expected[i].entry_type, (int)expected[i].entry_index,
- (int)(entry_ptr->header.is_protected), (int)expected[i].is_protected);
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) header is_protected actual/expected = %d/%d.\n", tag,
+ (int)expected[i].entry_type, (int)expected[i].entry_index,
+ (int)(entry_ptr->header.is_protected), (int)expected[i].is_protected);
failure_mssg = tmp_msg_buf;
}
}
@@ -2384,10 +2384,10 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (entry_ptr->is_pinned != expected[i].is_pinned) {
pass = false;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) is_pinned actual/expected = %d/%d.\n", tag,
- (int)expected[i].entry_type, (int)expected[i].entry_index,
- (int)(entry_ptr->is_pinned), (int)expected[i].is_pinned);
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) is_pinned actual/expected = %d/%d.\n", tag,
+ (int)expected[i].entry_type, (int)expected[i].entry_index,
+ (int)(entry_ptr->is_pinned), (int)expected[i].is_pinned);
failure_mssg = tmp_msg_buf;
}
}
@@ -2397,10 +2397,10 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (entry_ptr->is_corked != expected[i].is_corked) {
pass = false;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) is_corked actual/expected = %d/%d.\n", tag,
- (int)expected[i].entry_type, (int)expected[i].entry_index,
- (int)(entry_ptr->is_corked), (int)expected[i].is_corked);
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) is_corked actual/expected = %d/%d.\n", tag,
+ (int)expected[i].entry_type, (int)expected[i].entry_index,
+ (int)(entry_ptr->is_corked), (int)expected[i].is_corked);
failure_mssg = tmp_msg_buf;
}
}
@@ -2410,10 +2410,10 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (entry_ptr->header.is_pinned != expected[i].is_pinned) {
pass = false;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) header is_pinned actual/expected = %d/%d.\n", tag,
- (int)expected[i].entry_type, (int)expected[i].entry_index,
- (int)(entry_ptr->header.is_pinned), (int)expected[i].is_pinned);
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) header is_pinned actual/expected = %d/%d.\n", tag,
+ (int)expected[i].entry_type, (int)expected[i].entry_index,
+ (int)(entry_ptr->header.is_pinned), (int)expected[i].is_pinned);
failure_mssg = tmp_msg_buf;
}
}
@@ -2425,12 +2425,12 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
(entry_ptr->destroyed != expected[i].destroyed)) {
pass = false;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d,%d) deserialized = %d(%d), serialized = %d(%d), dest = %d(%d)\n",
- tag, (int)expected[i].entry_type, (int)expected[i].entry_index,
- (int)(entry_ptr->deserialized), (int)(expected[i].deserialized),
- (int)(entry_ptr->serialized), (int)(expected[i].serialized),
- (int)(entry_ptr->destroyed), (int)(expected[i].destroyed));
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d,%d) deserialized = %d(%d), serialized = %d(%d), dest = %d(%d)\n", tag,
+ (int)expected[i].entry_type, (int)expected[i].entry_index,
+ (int)(entry_ptr->deserialized), (int)(expected[i].deserialized),
+ (int)(entry_ptr->serialized), (int)(expected[i].serialized),
+ (int)(entry_ptr->destroyed), (int)(expected[i].destroyed));
failure_mssg = tmp_msg_buf;
}
}
@@ -2441,20 +2441,20 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (pass) {
if (entry_ptr->flush_dep_npar != expected[i].flush_dep_npar) {
pass = false;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) flush_dep_npar actual/expected = %u/%u.\n", tag,
- expected[i].entry_type, expected[i].entry_index, entry_ptr->flush_dep_npar,
- expected[i].flush_dep_npar);
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) flush_dep_npar actual/expected = %u/%u.\n", tag,
+ expected[i].entry_type, expected[i].entry_index, entry_ptr->flush_dep_npar,
+ expected[i].flush_dep_npar);
failure_mssg = tmp_msg_buf;
} /* end if */
} /* end if */
if ((pass) && (in_cache)) {
if (entry_ptr->header.flush_dep_nparents != expected[i].flush_dep_npar) {
pass = false;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) header flush_dep_nparents actual/expected = %u/%u.\n", tag,
- expected[i].entry_type, expected[i].entry_index,
- entry_ptr->header.flush_dep_nparents, expected[i].flush_dep_npar);
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) header flush_dep_nparents actual/expected = %u/%u.\n", tag,
+ expected[i].entry_type, expected[i].entry_index,
+ entry_ptr->header.flush_dep_nparents, expected[i].flush_dep_npar);
failure_mssg = tmp_msg_buf;
} /* end if */
} /* end if */
@@ -2465,10 +2465,10 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
for (u = 0; u < entry_ptr->flush_dep_npar; u++) {
if (entry_ptr->flush_dep_par_type[u] != expected[i].flush_dep_par_type[u]) {
pass = false;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) flush_dep_par_type[%u] actual/expected = %d/%d.\n", tag,
- expected[i].entry_type, expected[i].entry_index, u,
- entry_ptr->flush_dep_par_type[u], expected[i].flush_dep_par_type[u]);
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) flush_dep_par_type[%u] actual/expected = %d/%d.\n", tag,
+ expected[i].entry_type, expected[i].entry_index, u,
+ entry_ptr->flush_dep_par_type[u], expected[i].flush_dep_par_type[u]);
failure_mssg = tmp_msg_buf;
} /* end if */
} /* end for */
@@ -2477,10 +2477,10 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
for (u = 0; u < entry_ptr->flush_dep_npar; u++) {
if (entry_ptr->flush_dep_par_idx[u] != expected[i].flush_dep_par_idx[u]) {
pass = false;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) flush_dep_par_idx[%u] actual/expected = %d/%d.\n", tag,
- expected[i].entry_type, expected[i].entry_index, u,
- entry_ptr->flush_dep_par_idx[u], expected[i].flush_dep_par_idx[u]);
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) flush_dep_par_idx[%u] actual/expected = %d/%d.\n", tag,
+ expected[i].entry_type, expected[i].entry_index, u,
+ entry_ptr->flush_dep_par_idx[u], expected[i].flush_dep_par_idx[u]);
failure_mssg = tmp_msg_buf;
} /* end if */
} /* end for */
@@ -2490,40 +2490,40 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (pass) {
if (entry_ptr->flush_dep_nchd != expected[i].flush_dep_nchd) {
pass = false;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) flush_dep_nchd actual/expected = %u/%u.\n", tag,
- expected[i].entry_type, expected[i].entry_index, entry_ptr->flush_dep_nchd,
- expected[i].flush_dep_nchd);
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) flush_dep_nchd actual/expected = %u/%u.\n", tag,
+ expected[i].entry_type, expected[i].entry_index, entry_ptr->flush_dep_nchd,
+ expected[i].flush_dep_nchd);
failure_mssg = tmp_msg_buf;
} /* end if */
} /* end if */
if ((pass) && (in_cache)) {
if (entry_ptr->header.flush_dep_nchildren != expected[i].flush_dep_nchd) {
pass = false;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) header flush_dep_nchildren actual/expected = %u/%u.\n", tag,
- expected[i].entry_type, expected[i].entry_index,
- entry_ptr->header.flush_dep_nchildren, expected[i].flush_dep_nchd);
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) header flush_dep_nchildren actual/expected = %u/%u.\n", tag,
+ expected[i].entry_type, expected[i].entry_index,
+ entry_ptr->header.flush_dep_nchildren, expected[i].flush_dep_nchd);
failure_mssg = tmp_msg_buf;
} /* end if */
} /* end if */
if (pass) {
if (entry_ptr->flush_dep_ndirty_chd != expected[i].flush_dep_ndirty_chd) {
pass = false;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) flush_dep_ndirty_chd actual/expected = %u/%u.\n", tag,
- expected[i].entry_type, expected[i].entry_index, entry_ptr->flush_dep_ndirty_chd,
- expected[i].flush_dep_ndirty_chd);
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) flush_dep_ndirty_chd actual/expected = %u/%u.\n", tag,
+ expected[i].entry_type, expected[i].entry_index, entry_ptr->flush_dep_ndirty_chd,
+ expected[i].flush_dep_ndirty_chd);
failure_mssg = tmp_msg_buf;
} /* end if */
} /* end if */
if ((pass) && (in_cache)) {
if (entry_ptr->header.flush_dep_ndirty_children != expected[i].flush_dep_ndirty_chd) {
pass = false;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) header flush_dep_ndirty_children actual/expected = %u/%u.\n",
- tag, expected[i].entry_type, expected[i].entry_index,
- entry_ptr->header.flush_dep_ndirty_children, expected[i].flush_dep_ndirty_chd);
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) header flush_dep_ndirty_children actual/expected = %u/%u.\n", tag,
+ expected[i].entry_type, expected[i].entry_index,
+ entry_ptr->header.flush_dep_ndirty_children, expected[i].flush_dep_ndirty_chd);
failure_mssg = tmp_msg_buf;
} /* end if */
} /* end if */
@@ -2532,10 +2532,10 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_
if (pass) {
if (expected[i].flush_order >= 0 && entry_ptr->flush_order != (unsigned)expected[i].flush_order) {
pass = false;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
- "%d entry (%d, %d) flush_order actual/expected = %u/%d.\n", tag,
- expected[i].entry_type, expected[i].entry_index, entry_ptr->flush_order,
- expected[i].flush_order);
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf),
+ "%d entry (%d, %d) flush_order actual/expected = %u/%d.\n", tag,
+ expected[i].entry_type, expected[i].entry_index, entry_ptr->flush_order,
+ expected[i].flush_order);
failure_mssg = tmp_msg_buf;
} /* end if */
} /* end if */
@@ -5073,7 +5073,7 @@ validate_mdc_config(hid_t file_id, H5AC_cache_config_t *ext_config_ptr, bool com
if (file_ptr == NULL) {
pass = false;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf), "Can't get file_ptr #%d.", test_num);
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf), "Can't get file_ptr #%d.", test_num);
failure_mssg = tmp_msg_buf;
}
else {
@@ -5088,7 +5088,7 @@ validate_mdc_config(hid_t file_id, H5AC_cache_config_t *ext_config_ptr, bool com
if (cache_ptr == NULL || cache_ptr->resize_ctl.version != H5C__CURR_AUTO_SIZE_CTL_VER) {
pass = false;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf), "Can't access cache resize_ctl #%d.", test_num);
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf), "Can't access cache resize_ctl #%d.", test_num);
failure_mssg = tmp_msg_buf;
}
}
@@ -5099,7 +5099,7 @@ validate_mdc_config(hid_t file_id, H5AC_cache_config_t *ext_config_ptr, bool com
if (!resize_configs_are_equal(&int_config, &cache_ptr->resize_ctl, compare_init)) {
pass = false;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf), "Unexpected internal config #%d.", test_num);
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf), "Unexpected internal config #%d.", test_num);
failure_mssg = tmp_msg_buf;
}
}
@@ -5112,7 +5112,7 @@ validate_mdc_config(hid_t file_id, H5AC_cache_config_t *ext_config_ptr, bool com
if (H5Fget_mdc_config(file_id, &scratch) < 0) {
pass = false;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf), "H5Fget_mdc_config() failed #%d.", test_num);
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf), "H5Fget_mdc_config() failed #%d.", test_num);
failure_mssg = tmp_msg_buf;
}
}
@@ -5133,7 +5133,7 @@ validate_mdc_config(hid_t file_id, H5AC_cache_config_t *ext_config_ptr, bool com
if (!CACHE_CONFIGS_EQUAL((*ext_config_ptr), scratch, false, compare_init)) {
pass = false;
- HDsnprintf(tmp_msg_buf, sizeof(tmp_msg_buf), "Unexpected external config #%d.", test_num);
+ snprintf(tmp_msg_buf, sizeof(tmp_msg_buf), "Unexpected external config #%d.", test_num);
failure_mssg = tmp_msg_buf;
}
}
diff --git a/test/cache_image.c b/test/cache_image.c
index 89b074c..4768916 100644
--- a/test/cache_image.c
+++ b/test/cache_image.c
@@ -157,7 +157,7 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
/* create the dataset */
if (pass) {
- HDsnprintf(dset_name, sizeof(dset_name), "/dset%03d", i);
+ snprintf(dset_name, sizeof(dset_name), "/dset%03d", i);
dataset_ids[i] = H5Dcreate2(file_id, dset_name, H5T_STD_I32BE, dataspace_id, H5P_DEFAULT,
properties, H5P_DEFAULT);
@@ -433,7 +433,7 @@ delete_datasets(hid_t file_id, int min_dset, int max_dset)
i = min_dset;
while ((pass) && (i <= max_dset)) {
- HDsnprintf(dset_name, sizeof(dset_name), "/dset%03d", i);
+ snprintf(dset_name, sizeof(dset_name), "/dset%03d", i);
if (H5Ldelete(file_id, dset_name, H5P_DEFAULT) < 0) {
@@ -1000,7 +1000,7 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
/* open the dataset */
if (pass) {
- HDsnprintf(dset_name, sizeof(dset_name), "/dset%03d", i);
+ snprintf(dset_name, sizeof(dset_name), "/dset%03d", i);
dataset_ids[i] = H5Dopen2(file_id, dset_name, H5P_DEFAULT);
if (dataset_ids[i] < 0) {
@@ -1261,7 +1261,7 @@ check_cache_image_ctl_flow_1(bool single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
@@ -1535,7 +1535,7 @@ check_cache_image_ctl_flow_2(bool single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
@@ -1796,7 +1796,7 @@ check_cache_image_ctl_flow_3(bool single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
@@ -2159,7 +2159,7 @@ check_cache_image_ctl_flow_4(bool single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
@@ -2485,7 +2485,7 @@ check_cache_image_ctl_flow_5(bool single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
@@ -2763,7 +2763,7 @@ check_cache_image_ctl_flow_6(bool single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
@@ -3046,7 +3046,7 @@ cache_image_smoke_check_1(bool single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
@@ -3454,7 +3454,7 @@ cache_image_smoke_check_2(bool single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
@@ -3749,7 +3749,7 @@ cache_image_smoke_check_3(bool single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
@@ -4125,7 +4125,7 @@ cache_image_smoke_check_4(bool single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
@@ -4518,7 +4518,7 @@ cache_image_smoke_check_5(bool single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
@@ -4572,7 +4572,7 @@ cache_image_smoke_check_5(bool single_file_vfd)
/* 2) Create a process specific group. */
if (pass) {
- HDsnprintf(process_group_name, sizeof(process_group_name), "/process_%d", min_group);
+ snprintf(process_group_name, sizeof(process_group_name), "/process_%d", min_group);
proc_gid = H5Gcreate2(file_id, process_group_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -4675,7 +4675,7 @@ cache_image_smoke_check_5(bool single_file_vfd)
if (pass) {
max_group++;
- HDsnprintf(process_group_name, sizeof(process_group_name), "/process_%d", max_group);
+ snprintf(process_group_name, sizeof(process_group_name), "/process_%d", max_group);
proc_gid = H5Gcreate2(file_id, process_group_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -4746,7 +4746,7 @@ cache_image_smoke_check_5(bool single_file_vfd)
/* 11) Validate all the zoos. */
i = min_group;
while (pass && i <= max_group) {
- HDsnprintf(process_group_name, sizeof(process_group_name), "/process_%d", i);
+ snprintf(process_group_name, sizeof(process_group_name), "/process_%d", i);
validate_zoo(file_id, process_group_name, i++);
}
@@ -4798,7 +4798,7 @@ cache_image_smoke_check_5(bool single_file_vfd)
i = min_group;
while ((pass) && (i <= max_group)) {
- HDsnprintf(process_group_name, sizeof(process_group_name), "/process_%d", i);
+ snprintf(process_group_name, sizeof(process_group_name), "/process_%d", i);
validate_zoo(file_id, process_group_name, i++);
}
@@ -4858,7 +4858,7 @@ cache_image_smoke_check_5(bool single_file_vfd)
*/
i = min_group;
while ((pass) && (i <= max_group)) {
- HDsnprintf(process_group_name, sizeof(process_group_name), "/process_%d", i);
+ snprintf(process_group_name, sizeof(process_group_name), "/process_%d", i);
validate_zoo(file_id, process_group_name, i++);
}
@@ -5011,7 +5011,7 @@ cache_image_smoke_check_6(bool single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
@@ -5400,7 +5400,7 @@ cache_image_api_error_check_1(bool single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
@@ -5765,7 +5765,7 @@ cache_image_api_error_check_2(bool single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
@@ -6163,7 +6163,7 @@ cache_image_api_error_check_3(bool single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
@@ -6443,7 +6443,7 @@ cache_image_api_error_check_4(bool single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
@@ -7011,7 +7011,7 @@ get_free_sections_test(bool single_file_vfd)
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
@@ -7450,14 +7450,14 @@ evict_on_close_test(bool H5_ATTR_PARALLEL_UNUSED single_file_vfd)
#ifdef H5_HAVE_PARALLEL
SKIPPED();
- HDputs(" EoC not supported in the parallel library.");
+ puts(" EoC not supported in the parallel library.");
return 0;
#else
/* Check for VFD that is a single file */
if (!single_file_vfd) {
SKIPPED();
- HDputs(" Cache image not supported with the current VFD.");
+ puts(" Cache image not supported with the current VFD.");
return 0;
}
diff --git a/test/cache_logging.c b/test/cache_logging.c
index 7113108..5372021 100644
--- a/test/cache_logging.c
+++ b/test/cache_logging.c
@@ -73,7 +73,7 @@ test_logging_api(void)
size = 999;
if (H5Pget_mdc_log_options(fapl, &is_enabled_out, location, &size, &start_on_access_out) < 0)
TEST_ERROR;
- if (size != HDstrlen(LOG_LOCATION) + 1)
+ if (size != strlen(LOG_LOCATION) + 1)
TEST_ERROR;
/* Check to make sure that the property list getter works */
@@ -82,7 +82,7 @@ test_logging_api(void)
if (H5Pget_mdc_log_options(fapl, &is_enabled_out, location, &size, &start_on_access_out) < 0)
TEST_ERROR;
if ((is_enabled != is_enabled_out) || (start_on_access != start_on_access_out) ||
- HDstrcmp(LOG_LOCATION, location) != 0)
+ strcmp(LOG_LOCATION, location) != 0)
TEST_ERROR;
/* Create a file */
@@ -110,7 +110,7 @@ test_logging_api(void)
/* Perform some manipulations */
for (i = 0; i < N_GROUPS; i++) {
memset(group_name, 0, sizeof(group_name));
- HDsnprintf(group_name, sizeof(group_name), "%d", i);
+ snprintf(group_name, sizeof(group_name), "%d", i);
if ((gid = H5Gcreate2(fid, group_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(gid) < 0)
diff --git a/test/cache_tagging.c b/test/cache_tagging.c
index 33cac8c..61b1dbe 100644
--- a/test/cache_tagging.c
+++ b/test/cache_tagging.c
@@ -805,7 +805,7 @@ check_multi_group_creation_tags(void)
for (i = 0; i < MULTIGROUPS; i++) {
- HDsnprintf(gname, sizeof(gname), "%d", i);
+ snprintf(gname, sizeof(gname), "%d", i);
if ((gid = H5Gcreate2(fid, gname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(gid) < 0)
@@ -827,7 +827,7 @@ check_multi_group_creation_tags(void)
for (i = 0; i < MULTIGROUPS; i++) {
/* Re-open the group */
- HDsnprintf(gname, sizeof(gname), "%d", i);
+ snprintf(gname, sizeof(gname), "%d", i);
if ((gid = H5Gopen2(fid, gname, H5P_DEFAULT)) < 0)
TEST_ERROR;
@@ -951,7 +951,7 @@ check_link_iteration_tags(void)
/* Create many datasets in root group */
for (i = 0; i < 500; i++) {
- HDsnprintf(dsetname, sizeof(dsetname), "Dset %d", i);
+ snprintf(dsetname, sizeof(dsetname), "Dset %d", i);
if ((did = H5Dcreate2(fid, dsetname, H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
0)
TEST_ERROR;
@@ -1111,7 +1111,7 @@ check_dense_attribute_tags(void)
for (i = 0; i < 50; i++) {
- HDsnprintf(attrname, sizeof(attrname), "attr %d", i);
+ snprintf(attrname, sizeof(attrname), "attr %d", i);
if ((aid = H5Acreate2(did, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Awrite(aid, H5T_NATIVE_UINT, &i) < 0)
@@ -4471,7 +4471,7 @@ main(void)
/* Only run with sec2/default driver */
if (!h5_using_default_driver(NULL)) {
- HDputs(" -- SKIPPED for incompatible VFD --");
+ puts(" -- SKIPPED for incompatible VFD --");
exit(EXIT_SUCCESS);
}
diff --git a/test/chunk_info.c b/test/chunk_info.c
index 7ccf5fa..9533b2a 100644
--- a/test/chunk_info.c
+++ b/test/chunk_info.c
@@ -434,7 +434,7 @@ verify_idx_nchunks(hid_t dset, hid_t dspace, H5D_chunk_index_t exp_idx_type, hsi
/* Ensure the correct chunk indexing scheme is used */
if (idx_type != exp_idx_type) {
char msg[256];
- HDsnprintf(msg, sizeof(msg), "Should be using %s.\n", index_type_str(idx_type));
+ snprintf(msg, sizeof(msg), "Should be using %s.\n", index_type_str(idx_type));
FAIL_PUTS_ERROR(msg);
}
diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c
index 018fa30..3ead12f 100644
--- a/test/cmpd_dset.c
+++ b/test/cmpd_dset.c
@@ -286,7 +286,7 @@ test_compound(char *filename, hid_t fapl)
s1[i].c[1] != s2[i].c[1] || s1[i].c[2] != s2[i].c[2] || s1[i].c[3] != s2[i].c[3] ||
s1[i].d != s2[i].d || s1[i].e != s2[i].e) {
H5_FAILED();
- HDputs(" Incorrect values read from the file");
+ puts(" Incorrect values read from the file");
goto error;
}
}
@@ -323,7 +323,7 @@ test_compound(char *filename, hid_t fapl)
s1[i].c[1] != s3[i].c[1] || s1[i].c[2] != s3[i].c[2] || s1[i].c[3] != s3[i].c[3] ||
s1[i].d != s3[i].d || s1[i].e != s3[i].e) {
H5_FAILED();
- HDputs(" Incorrect values read from the file");
+ puts(" Incorrect values read from the file");
goto error;
}
}
@@ -353,7 +353,7 @@ test_compound(char *filename, hid_t fapl)
for (i = 0; i < NX * NY; i++) {
if (s1[i].b != s4[i].b || s1[i].d != s4[i].d) {
H5_FAILED();
- HDputs(" Incorrect values read from the file");
+ puts(" Incorrect values read from the file");
goto error;
}
}
@@ -397,7 +397,7 @@ test_compound(char *filename, hid_t fapl)
s1[i].c[1] != s5[i].c[1] || s1[i].c[2] != s5[i].c[2] || s1[i].c[3] != s5[i].c[3] ||
s1[i].d != s5[i].d || s1[i].e != s5[i].e) {
H5_FAILED();
- HDputs(" Incorrect values read from the file");
+ puts(" Incorrect values read from the file");
goto error;
}
}
@@ -407,7 +407,7 @@ test_compound(char *filename, hid_t fapl)
if (s5[i].pre != 1000 + 4 * i || s5[i].mid1 != 1001 + 4 * i || s5[i].mid2 != 1002 + 4 * i ||
s5[i].post != 1003 + 4 * i) {
H5_FAILED();
- HDputs(" Memory values were clobbered");
+ puts(" Memory values were clobbered");
goto error;
}
}
@@ -466,7 +466,7 @@ test_compound(char *filename, hid_t fapl)
s1[i].c[1] != s6[i].c[1] || s1[i].c[2] != s6[i].c[2] || s1[i].c[3] != s6[i].c[3] ||
s1[i].d != s6[i].d || s1[i].e != s6[i].e) {
H5_FAILED();
- HDputs(" Incorrect values read from the file");
+ puts(" Incorrect values read from the file");
goto error;
}
}
@@ -476,7 +476,7 @@ test_compound(char *filename, hid_t fapl)
if (s6[i].pre != 1000 + 4 * i || s6[i].mid1 != 1001 + 4 * i || s6[i].mid2 != 1002 + 4 * i ||
s6[i].post != 1003 + 4 * i) {
H5_FAILED();
- HDputs(" Memory values were clobbered");
+ puts(" Memory values were clobbered");
goto error;
}
}
@@ -545,7 +545,7 @@ test_compound(char *filename, hid_t fapl)
s2[i].c[1] != s1[i].c[1] || s2[i].c[2] != s1[i].c[2] || s2[i].c[3] != s1[i].c[3] ||
s2[i].d != s1[i].d || s2[i].e != s1[i].e) {
H5_FAILED();
- HDputs(" Incorrect values read from file");
+ puts(" Incorrect values read from file");
goto error;
}
}
@@ -588,7 +588,7 @@ test_compound(char *filename, hid_t fapl)
if (ps8->a != ps1->a || ps8->b != ps1->b || ps8->c[0] != ps1->c[0] || ps8->c[1] != ps1->c[1] ||
ps8->c[2] != ps1->c[2] || ps8->c[3] != ps1->c[3] || ps8->d != ps1->d || ps8->e != ps1->e) {
H5_FAILED();
- HDputs(" Incorrect values read from file");
+ puts(" Incorrect values read from file");
goto error;
}
}
@@ -627,7 +627,7 @@ test_compound(char *filename, hid_t fapl)
ps2->c[1] != ps1->c[1] || ps2->c[2] != ps1->c[2] || ps2->c[3] != ps1->c[3] ||
ps2->d != ps1->d || ps2->e != ps1->e) {
H5_FAILED();
- HDputs(" Memory values clobbered");
+ puts(" Memory values clobbered");
goto error;
}
}
@@ -636,7 +636,7 @@ test_compound(char *filename, hid_t fapl)
ps2->c[1] != (unsigned)(-1) || ps2->c[2] != (unsigned)(-1) ||
ps2->c[3] != (unsigned)(-1) || ps2->d != (unsigned)(-1) || ps2->e != (unsigned)(-1)) {
H5_FAILED();
- HDputs(" Incorrect values read from file");
+ puts(" Incorrect values read from file");
goto error;
}
}
@@ -675,7 +675,7 @@ test_compound(char *filename, hid_t fapl)
ps5->c[2] != ps1->c[2] || ps5->c[3] != ps1->c[3] || ps5->mid2 != (unsigned)(-1) ||
ps5->d != ps1->d || ps5->e != ps1->e || ps5->post != (unsigned)(-1)) {
H5_FAILED();
- HDputs(" Memory values clobbered");
+ puts(" Memory values clobbered");
goto error;
}
}
@@ -686,7 +686,7 @@ test_compound(char *filename, hid_t fapl)
ps5->c[3] != (unsigned)(-1) || ps5->mid2 != (unsigned)(-1) || ps5->d != (unsigned)(-1) ||
ps5->e != (unsigned)(-1) || ps5->post != (unsigned)(-1)) {
H5_FAILED();
- HDputs(" Incorrect values read from file");
+ puts(" Incorrect values read from file");
goto error;
}
}
@@ -735,7 +735,7 @@ test_compound(char *filename, hid_t fapl)
ps1->c[1] != 8 * (i * NY + j) + 3 || ps1->c[2] != 8 * (i * NY + j) + 4 ||
ps1->c[3] != 8 * (i * NY + j) + 5 || ps1->e != 8 * (i * NY + j) + 7) {
H5_FAILED();
- HDputs(" Write clobbered values");
+ puts(" Write clobbered values");
goto error;
}
@@ -743,14 +743,14 @@ test_compound(char *filename, hid_t fapl)
j < f_offset[1] + h_size[1]) {
if (ps1->b != (unsigned)(-1) || ps1->d != (unsigned)(-1)) {
H5_FAILED();
- HDputs(" Wrong values written or read");
+ puts(" Wrong values written or read");
goto error;
}
}
else {
if (ps1->b != 8 * (i * NY + j) + 1 || ps1->d != 8 * (i * NY + j) + 6) {
H5_FAILED();
- HDputs(" Write clobbered values");
+ puts(" Write clobbered values");
goto error;
}
}
@@ -776,7 +776,7 @@ test_compound(char *filename, hid_t fapl)
return 0;
error:
- HDputs("*** DATASET TESTS FAILED ***");
+ puts("*** DATASET TESTS FAILED ***");
/* Release resources */
if (s1)
@@ -1414,7 +1414,7 @@ error:
free(rbuf);
free(rew_buf);
- HDputs("*** DATASET TESTS FAILED ***");
+ puts("*** DATASET TESTS FAILED ***");
return 1;
}
@@ -1613,7 +1613,7 @@ test_hdf5_dst_subset(char *filename, hid_t fapl)
return 0;
error:
- HDputs("*** DATASET TESTS FAILED ***");
+ puts("*** DATASET TESTS FAILED ***");
return 1;
}
@@ -1686,9 +1686,9 @@ test_pack_ooo(void)
for (extra_space = 0; extra_space < 2; extra_space++) {
if (extra_space)
- HDputs("With extra space at the end of compound...");
+ puts("With extra space at the end of compound...");
else
- HDputs("Without extra space at the end of compound...");
+ puts("Without extra space at the end of compound...");
TESTING("random member insertion with empty compound subtype");
@@ -1702,7 +1702,7 @@ test_pack_ooo(void)
/* Insert the compound members in the random order previously generated */
for (i = 0; i < PACK_NMEMBS; i++) {
- HDsnprintf(name, sizeof(name), "%05d", i);
+ snprintf(name, sizeof(name), "%05d", i);
if (i == sub_cmpd_order) {
if (H5Tinsert(cmpd, name, (size_t)(4 * order[i]), sub_cmpd) < 0)
PACK_OOO_ERROR
@@ -1735,7 +1735,7 @@ test_pack_ooo(void)
/* Insert the compound members in the random order previously generated */
for (i = 0; i < PACK_NMEMBS; i++) {
- HDsnprintf(name, sizeof(name), "%05d", i);
+ snprintf(name, sizeof(name), "%05d", i);
if (i == sub_cmpd_order) {
if (H5Tinsert(cmpd, name, (size_t)(4 * order[i]), sub_cmpd) < 0)
PACK_OOO_ERROR
@@ -1770,7 +1770,7 @@ test_pack_ooo(void)
/* Insert the compound members in reverse order, with compound last */
for (i = 0; i < PACK_NMEMBS; i++) {
- HDsnprintf(name, sizeof(name), "%05d", i);
+ snprintf(name, sizeof(name), "%05d", i);
if (i == PACK_NMEMBS - 1) {
if (H5Tinsert(cmpd, name, (size_t)(4 * (PACK_NMEMBS - i - 1)), sub_cmpd) < 0)
PACK_OOO_ERROR
@@ -1803,7 +1803,7 @@ test_pack_ooo(void)
/* Insert the compound members in reverse order, with compound last */
for (i = 0; i < PACK_NMEMBS; i++) {
- HDsnprintf(name, sizeof(name), "%05d", i);
+ snprintf(name, sizeof(name), "%05d", i);
if (i == PACK_NMEMBS - 1) {
if (H5Tinsert(cmpd, name, (size_t)(4 * (PACK_NMEMBS - i - 1)), sub_cmpd) < 0)
PACK_OOO_ERROR
@@ -1838,7 +1838,7 @@ test_pack_ooo(void)
/* Insert the compound members in forward order, with compound first */
for (i = 0; i < PACK_NMEMBS; i++) {
- HDsnprintf(name, sizeof(name), "%05d", i);
+ snprintf(name, sizeof(name), "%05d", i);
if (i == 0) {
if (H5Tinsert(cmpd, name, (size_t)(4 * i), sub_cmpd) < 0)
PACK_OOO_ERROR
@@ -1871,7 +1871,7 @@ test_pack_ooo(void)
/* Insert the compound members in forward order */
for (i = 0; i < PACK_NMEMBS; i++) {
- HDsnprintf(name, sizeof(name), "%05d", i);
+ snprintf(name, sizeof(name), "%05d", i);
if (i == 0) {
if (H5Tinsert(cmpd, name, (size_t)(4 * i), sub_cmpd) < 0)
PACK_OOO_ERROR
@@ -1898,7 +1898,7 @@ test_pack_ooo(void)
return 0;
error:
- HDputs("*** DATASET TESTS FAILED ***");
+ puts("*** DATASET TESTS FAILED ***");
return 1;
}
@@ -2138,7 +2138,7 @@ error:
H5Fclose(file);
}
H5E_END_TRY
- HDputs("*** DATASET TESTS FAILED ***");
+ puts("*** DATASET TESTS FAILED ***");
return 1;
} /* test_ooo_order */
@@ -2165,7 +2165,7 @@ main(int argc, char *argv[])
/* Turn off optimized compound converter? */
if (argc > 1) {
- if (argc > 2 || HDstrcmp("--noopt", argv[1]) != 0) {
+ if (argc > 2 || strcmp("--noopt", argv[1]) != 0) {
fprintf(stderr, "usage: %s [--noopt]\n", argv[0]);
exit(EXIT_FAILURE);
}
@@ -2178,21 +2178,21 @@ main(int argc, char *argv[])
h5_fixname(FILENAME[0], fapl_id, fname, sizeof(fname));
- HDputs("Testing compound dataset:");
+ puts("Testing compound dataset:");
nerrors += test_compound(fname, fapl_id);
- HDputs("Testing the optimization of when the source type is a subset of the dest:");
+ puts("Testing the optimization of when the source type is a subset of the dest:");
h5_fixname(FILENAME[1], fapl_id, fname, sizeof(fname));
nerrors += test_hdf5_src_subset(fname, fapl_id);
- HDputs("Testing the optimization of when the dest type is a subset of the source:");
+ puts("Testing the optimization of when the dest type is a subset of the source:");
h5_fixname(FILENAME[2], fapl_id, fname, sizeof(fname));
nerrors += test_hdf5_dst_subset(fname, fapl_id);
- HDputs("Testing that compound types can be packed out of order:");
+ puts("Testing that compound types can be packed out of order:");
nerrors += test_pack_ooo();
- HDputs("Testing compound member ordering:");
+ puts("Testing compound member ordering:");
nerrors += test_ooo_order(fname, fapl_id);
/* Verify symbol table messages are cached */
@@ -2204,6 +2204,6 @@ main(int argc, char *argv[])
}
h5_cleanup(FILENAME, fapl_id);
- HDputs("All compound dataset tests passed.");
+ puts("All compound dataset tests passed.");
return 0;
}
diff --git a/test/cmpd_dtransform.c b/test/cmpd_dtransform.c
index bb61110..8fd3788 100644
--- a/test/cmpd_dtransform.c
+++ b/test/cmpd_dtransform.c
@@ -46,8 +46,8 @@ main(void)
/* Compound datatype */
if (NULL == (atts = malloc(sizeof(att_t))))
TEST_ERROR;
- HDstrcpy(atts[0].name, "Name");
- HDstrcpy(atts[0].unit, "Unit");
+ strcpy(atts[0].name, "Name");
+ strcpy(atts[0].unit, "Unit");
/* String type */
if ((str_dtyp_id = H5Tcopy(H5T_C_S1)) < 0)
@@ -113,9 +113,9 @@ main(void)
FAIL_STACK_ERROR;
/* Verify attribute */
- if (HDstrcmp(atts_res[0].name, atts[0].name) != 0)
+ if (strcmp(atts_res[0].name, atts[0].name) != 0)
TEST_ERROR;
- if (HDstrcmp(atts_res[0].unit, atts[0].unit) != 0)
+ if (strcmp(atts_res[0].unit, atts[0].unit) != 0)
TEST_ERROR;
/* Read the data */
diff --git a/test/cork.c b/test/cork.c
index cec18f3..98abdec 100644
--- a/test/cork.c
+++ b/test/cork.c
@@ -390,7 +390,7 @@ verify_obj_dset_cork(bool swmr)
/* Attach 8 attributes to the dataset */
for (i = 0; i < 8; i++) {
- HDsnprintf(attrname, sizeof(attrname), "attr %d", i);
+ snprintf(attrname, sizeof(attrname), "attr %d", i);
if ((aid = H5Acreate2(did2, attrname, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Awrite(aid, H5T_NATIVE_INT, &i) < 0)
@@ -854,7 +854,7 @@ verify_group_cork(bool swmr)
/* Attach 8 attributes to the third group: GRP3 */
for (i = 0; i < 8; i++) {
- HDsnprintf(attrname, sizeof(attrname), "attr %d", i);
+ snprintf(attrname, sizeof(attrname), "attr %d", i);
if ((aid = H5Acreate2(gid3, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Awrite(aid, H5T_NATIVE_UINT, &i) < 0)
@@ -1069,7 +1069,7 @@ verify_named_cork(bool swmr)
/* Attach 8 attributes to datatype: DT3 */
for (i = 0; i < 8; i++) {
- HDsnprintf(attrname, sizeof(attrname), "attr %d", i);
+ snprintf(attrname, sizeof(attrname), "attr %d", i);
if ((aid = H5Acreate2(tid3, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Awrite(aid, H5T_NATIVE_UINT, &i) < 0)
@@ -2236,7 +2236,7 @@ main(void)
*/
driver = HDgetenv(HDF5_DRIVER);
if (!H5FD__supports_swmr_test(driver)) {
- HDputs("-- SKIPPED SWMR tests for SWMR-incompatible VFD --");
+ puts("-- SKIPPED SWMR tests for SWMR-incompatible VFD --");
continue;
}
}
diff --git a/test/cross_read.c b/test/cross_read.c
index 474452f..ce1f90b 100644
--- a/test/cross_read.c
+++ b/test/cross_read.c
@@ -274,7 +274,7 @@ check_file(char *filename)
nerrors += check_data_f(DATASETNAME16, fid);
#else /*H5_HAVE_FILTER_DEFLATE*/
SKIPPED();
- HDputs(not_supported);
+ puts(not_supported);
#endif /*H5_HAVE_FILTER_DEFLATE*/
TESTING("dataset of BE FLOAT with Deflate filter");
@@ -282,7 +282,7 @@ check_file(char *filename)
nerrors += check_data_f(DATASETNAME17, fid);
#else /*H5_HAVE_FILTER_DEFLATE*/
SKIPPED();
- HDputs(not_supported);
+ puts(not_supported);
#endif /*H5_HAVE_FILTER_DEFLATE*/
TESTING("dataset of LE FLOAT with Szip filter");
@@ -290,7 +290,7 @@ check_file(char *filename)
nerrors += check_data_f(DATASETNAME18, fid);
#else /*H5_HAVE_FILTER_SZIP*/
SKIPPED();
- HDputs(not_supported);
+ puts(not_supported);
#endif /*H5_HAVE_FILTER_SZIP*/
TESTING("dataset of BE FLOAT with Szip filter");
@@ -298,7 +298,7 @@ check_file(char *filename)
nerrors += check_data_f(DATASETNAME19, fid);
#else /*H5_HAVE_FILTER_SZIP*/
SKIPPED();
- HDputs(not_supported);
+ puts(not_supported);
#endif /*H5_HAVE_FILTER_SZIP*/
TESTING("dataset of LE FLOAT with Shuffle filter");
@@ -348,21 +348,21 @@ main(void)
* Skip tests for VFDs that aren't compatible with default VFD.
*/
if (h5_driver_is_default_vfd_compatible(H5P_DEFAULT, &driver_is_default_compatible) < 0) {
- HDputs(" -- couldn't check if VFD is compatible with default VFD --");
+ puts(" -- couldn't check if VFD is compatible with default VFD --");
exit(EXIT_SUCCESS);
}
if (!driver_is_default_compatible) {
- HDputs(" -- SKIPPED for incompatible VFD --");
+ puts(" -- SKIPPED for incompatible VFD --");
exit(EXIT_SUCCESS);
}
- HDputs("\n");
- HDputs("Testing reading data created on Linux");
+ puts("\n");
+ puts("Testing reading data created on Linux");
h5_fixname(FILENAME[1], H5P_DEFAULT, filename, sizeof(filename));
nerrors += check_file(filename);
- HDputs("\n");
- HDputs("Testing reading data created on Solaris");
+ puts("\n");
+ puts("Testing reading data created on Solaris");
h5_fixname(FILENAME[2], H5P_DEFAULT, filename, sizeof(filename));
nerrors += check_file(filename);
diff --git a/test/dangle.c b/test/dangle.c
index c589448..490bb2f 100644
--- a/test/dangle.c
+++ b/test/dangle.c
@@ -634,13 +634,13 @@ main(void)
/* Don't run this test with the multi/split VFD. A bug in library shutdown
* ordering causes problems with the multi VFD when IDs are left dangling.
*/
- if (!HDstrcmp(env_h5_drvr, "multi") || !HDstrcmp(env_h5_drvr, "split")) {
- HDputs(" -- SKIPPED for incompatible VFD --");
+ if (!strcmp(env_h5_drvr, "multi") || !strcmp(env_h5_drvr, "split")) {
+ puts(" -- SKIPPED for incompatible VFD --");
return 0;
}
/* Run tests w/weak file close */
- HDputs("Testing dangling objects with weak file close:");
+ puts("Testing dangling objects with weak file close:");
nerrors += test_dangle_dataset(H5F_CLOSE_WEAK);
nerrors += test_dangle_group(H5F_CLOSE_WEAK);
nerrors += test_dangle_datatype1(H5F_CLOSE_WEAK);
@@ -648,7 +648,7 @@ main(void)
nerrors += test_dangle_attribute(H5F_CLOSE_WEAK);
/* Run tests w/semi file close */
- HDputs("Testing dangling objects with semi file close:");
+ puts("Testing dangling objects with semi file close:");
nerrors += test_dangle_dataset(H5F_CLOSE_SEMI);
nerrors += test_dangle_group(H5F_CLOSE_SEMI);
nerrors += test_dangle_datatype1(H5F_CLOSE_SEMI);
@@ -656,7 +656,7 @@ main(void)
nerrors += test_dangle_attribute(H5F_CLOSE_SEMI);
/* Run tests w/strong file close */
- HDputs("Testing dangling objects with strong file close:");
+ puts("Testing dangling objects with strong file close:");
nerrors += test_dangle_dataset(H5F_CLOSE_STRONG);
nerrors += test_dangle_group(H5F_CLOSE_STRONG);
nerrors += test_dangle_datatype1(H5F_CLOSE_STRONG);
@@ -669,11 +669,11 @@ main(void)
/* Check for errors */
if (nerrors)
goto error;
- HDputs("All dangling ID tests passed.");
+ puts("All dangling ID tests passed.");
return 0;
error:
- HDputs("***** DANGLING ID TESTS FAILED *****");
+ puts("***** DANGLING ID TESTS FAILED *****");
return 1;
}
diff --git a/test/del_many_dense_attrs.c b/test/del_many_dense_attrs.c
index 478e63c..b0000f9 100644
--- a/test/del_many_dense_attrs.c
+++ b/test/del_many_dense_attrs.c
@@ -114,7 +114,7 @@ main(void)
/* Create attributes in the group */
for (i = ATTR_COUNT; i >= 0; i--) {
/* Set up the attribute name */
- HDsnprintf(aname, sizeof(aname), "%s%d", basename, i);
+ snprintf(aname, sizeof(aname), "%s%d", basename, i);
/* Create the attribute */
if ((aid = H5Acreate2(gid, aname, tid, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -160,7 +160,7 @@ main(void)
/* Delete the attributes */
for (i = 0; i <= ATTR_COUNT; i++) {
/* Set up the attribute name */
- HDsnprintf(aname, sizeof(aname), "%s%d", basename, i);
+ snprintf(aname, sizeof(aname), "%s%d", basename, i);
/* Delete the attribute */
if (H5Adelete(gid, aname) < 0)
diff --git a/test/direct_chunk.c b/test/direct_chunk.c
index e9756a9..548bfc3 100644
--- a/test/direct_chunk.c
+++ b/test/direct_chunk.c
@@ -2313,10 +2313,10 @@ main(void)
if (nerrors)
goto error;
- HDputs("All direct chunk read/write tests passed.");
+ puts("All direct chunk read/write tests passed.");
return EXIT_SUCCESS;
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
return EXIT_FAILURE;
}
diff --git a/test/dsets.c b/test/dsets.c
index 52cc452..ecf6db0 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -416,7 +416,7 @@ test_create(hid_t file)
H5E_END_TRY
if (dataset >= 0) {
H5_FAILED();
- HDputs(" Library allowed overwrite of existing dataset.");
+ puts(" Library allowed overwrite of existing dataset.");
goto error;
}
@@ -443,7 +443,7 @@ test_create(hid_t file)
H5E_END_TRY
if (dataset >= 0) {
H5_FAILED();
- HDputs(" Opened a non-existent dataset.");
+ puts(" Opened a non-existent dataset.");
goto error;
}
@@ -467,7 +467,7 @@ test_create(hid_t file)
H5E_END_TRY
if (dataset >= 0) {
H5_FAILED();
- HDputs(" Opened a dataset with incorrect chunking parameters.");
+ puts(" Opened a dataset with incorrect chunking parameters.");
goto error;
}
@@ -544,8 +544,8 @@ test_simple_io(const char *env_h5_drvr, hid_t fapl)
TESTING("simple I/O");
/* Can't run this test with multi-file VFDs because of HDopen/read/seek the file directly */
- if (HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
- HDstrcmp(env_h5_drvr, "family") != 0) {
+ if (strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0 &&
+ strcmp(env_h5_drvr, "family") != 0) {
h5_fixname(FILENAME[4], fapl, filename, sizeof filename);
/* Set up data array */
@@ -653,7 +653,7 @@ test_simple_io(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support continuous address space");
+ puts(" Current VFD doesn't support continuous address space");
} /* end else */
return SUCCEED;
@@ -705,8 +705,8 @@ test_userblock_offset(const char *env_h5_drvr, hid_t fapl, bool new_format)
TESTING("dataset offset with user block");
/* Can't run this test with multi-file VFDs because of HDopen/read/seek the file directly */
- if (HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
- HDstrcmp(env_h5_drvr, "family") != 0) {
+ if (strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0 &&
+ strcmp(env_h5_drvr, "family") != 0) {
h5_fixname(FILENAME[2], fapl, filename, sizeof filename);
/* Set up data array */
@@ -789,7 +789,7 @@ test_userblock_offset(const char *env_h5_drvr, hid_t fapl, bool new_format)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support continuous address space");
+ puts(" Current VFD doesn't support continuous address space");
} /* end else */
return SUCCEED;
@@ -1470,7 +1470,7 @@ test_conv_buffer(hid_t fid)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Library shouldn't allow conversion buffer too small");
+ puts(" Library shouldn't allow conversion buffer too small");
goto error;
}
@@ -1505,7 +1505,7 @@ test_conv_buffer(hid_t fid)
free(cf);
free(cfrR);
- HDputs(" PASSED");
+ puts(" PASSED");
return SUCCEED;
error:
@@ -1585,7 +1585,7 @@ test_tconv(hid_t file)
if (in[4 * i + 0] != out[4 * i + 3] || in[4 * i + 1] != out[4 * i + 2] ||
in[4 * i + 2] != out[4 * i + 1] || in[4 * i + 3] != out[4 * i + 0]) {
H5_FAILED();
- HDputs(" Read with byte order conversion failed.");
+ puts(" Read with byte order conversion failed.");
goto error;
}
}
@@ -1597,7 +1597,7 @@ test_tconv(hid_t file)
free(out);
free(in);
- HDputs(" PASSED");
+ puts(" PASSED");
return SUCCEED;
error:
@@ -2526,7 +2526,7 @@ test_filters(hid_t file)
* STEP 0: Test null I/O filter by itself.
*----------------------------------------------------------
*/
- HDputs("Testing 'null' filter");
+ puts("Testing 'null' filter");
if ((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto error;
if (H5Pset_chunk(dc, 2, chunk_size) < 0)
@@ -2548,7 +2548,7 @@ test_filters(hid_t file)
* STEP 1: Test Fletcher32 Checksum by itself.
*----------------------------------------------------------
*/
- HDputs("Testing Fletcher32 checksum(enabled for read)");
+ puts("Testing Fletcher32 checksum(enabled for read)");
if ((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto error;
if (H5Pset_chunk(dc, 2, chunk_size) < 0)
@@ -2562,23 +2562,23 @@ test_filters(hid_t file)
goto error;
if (fletcher32_size <= null_size) {
H5_FAILED();
- HDputs(" Size after checksumming is incorrect.");
+ puts(" Size after checksumming is incorrect.");
goto error;
} /* end if */
/* Disable checksum during read */
- HDputs("Testing Fletcher32 checksum(disabled for read)");
+ puts("Testing Fletcher32 checksum(disabled for read)");
if (test_filter_internal(file, DSET_FLETCHER32_NAME_2, dc, DISABLE_FLETCHER32, DATA_NOT_CORRUPTED,
&fletcher32_size) < 0)
goto error;
if (fletcher32_size <= null_size) {
H5_FAILED();
- HDputs(" Size after checksumming is incorrect.");
+ puts(" Size after checksumming is incorrect.");
goto error;
} /* end if */
/* Try to corrupt data and see if checksum fails */
- HDputs("Testing Fletcher32 checksum(when data is corrupted)");
+ puts("Testing Fletcher32 checksum(when data is corrupted)");
data_corrupt[0] = 52;
data_corrupt[1] = 33;
data_corrupt[2] = 27;
@@ -2592,7 +2592,7 @@ test_filters(hid_t file)
goto error;
if (fletcher32_size <= null_size) {
H5_FAILED();
- HDputs(" Size after checksumming is incorrect.");
+ puts(" Size after checksumming is incorrect.");
goto error;
} /* end if */
@@ -2605,7 +2605,7 @@ test_filters(hid_t file)
*----------------------------------------------------------
*/
#ifdef H5_HAVE_FILTER_DEFLATE
- HDputs("Testing deflate filter");
+ puts("Testing deflate filter");
if ((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto error;
if (H5Pset_chunk(dc, 2, chunk_size) < 0)
@@ -2622,7 +2622,7 @@ test_filters(hid_t file)
#else /* H5_HAVE_FILTER_DEFLATE */
TESTING("deflate filter");
SKIPPED();
- HDputs(" Deflate filter not enabled");
+ puts(" Deflate filter not enabled");
#endif /* H5_HAVE_FILTER_DEFLATE */
/*----------------------------------------------------------
@@ -2637,7 +2637,7 @@ test_filters(hid_t file)
if (H5Pset_chunk(dc, 2, chunk_size) < 0)
goto error;
- HDputs("");
+ puts("");
if (H5Pset_szip(dc, szip_options_mask, szip_pixels_per_block) < 0)
goto error;
if (test_filter_internal(file, DSET_SZIP_NAME, dc, DISABLE_FLETCHER32, DATA_NOT_CORRUPTED,
@@ -2653,7 +2653,7 @@ test_filters(hid_t file)
TESTING("szip filter (without encoder)");
if (h5_szip_can_encode() != 1) {
- HDputs("");
+ puts("");
if (test_filter_noencoder(NOENCODER_SZIP_DATASET) < 0)
goto error;
}
@@ -2664,14 +2664,14 @@ test_filters(hid_t file)
#else /* H5_HAVE_FILTER_SZIP */
TESTING("szip filter");
SKIPPED();
- HDputs(" Szip filter not enabled");
+ puts(" Szip filter not enabled");
#endif /* H5_HAVE_FILTER_SZIP */
/*----------------------------------------------------------
* STEP 4: Test shuffling by itself.
*----------------------------------------------------------
*/
- HDputs("Testing shuffle filter");
+ puts("Testing shuffle filter");
if ((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto error;
if (H5Pset_chunk(dc, 2, chunk_size) < 0)
@@ -2684,7 +2684,7 @@ test_filters(hid_t file)
goto error;
if (shuffle_size != null_size) {
H5_FAILED();
- HDputs(" Shuffled size not the same as uncompressed size.");
+ puts(" Shuffled size not the same as uncompressed size.");
goto error;
} /* end if */
@@ -2697,7 +2697,7 @@ test_filters(hid_t file)
*----------------------------------------------------------
*/
#ifdef H5_HAVE_FILTER_DEFLATE
- HDputs("Testing shuffle+deflate+checksum filters(checksum first)");
+ puts("Testing shuffle+deflate+checksum filters(checksum first)");
if ((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto error;
if (H5Pset_chunk(dc, 2, chunk_size) < 0)
@@ -2717,7 +2717,7 @@ test_filters(hid_t file)
if (H5Pclose(dc) < 0)
goto error;
- HDputs("Testing shuffle+deflate+checksum filters(checksum last)");
+ puts("Testing shuffle+deflate+checksum filters(checksum last)");
if ((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto error;
if (H5Pset_chunk(dc, 2, chunk_size) < 0)
@@ -2739,7 +2739,7 @@ test_filters(hid_t file)
#else /* H5_HAVE_FILTER_DEFLATE */
TESTING("shuffle+deflate+fletcher32 filters");
SKIPPED();
- HDputs(" Deflate filter not enabled");
+ puts(" Deflate filter not enabled");
#endif /* H5_HAVE_FILTER_DEFLATE */
/*----------------------------------------------------------
@@ -2760,7 +2760,7 @@ test_filters(hid_t file)
/* Make sure encoding is enabled */
if (h5_szip_can_encode() == 1) {
- HDputs("");
+ puts("");
if (H5Pset_szip(dc, szip_options_mask, szip_pixels_per_block) < 0)
goto error;
if (test_filter_internal(file, DSET_SHUF_SZIP_FLET_NAME, dc, ENABLE_FLETCHER32, DATA_NOT_CORRUPTED,
@@ -2774,7 +2774,7 @@ test_filters(hid_t file)
TESTING("shuffle+szip+checksum filters(checksum first, without encoder)");
if (h5_szip_can_encode() != 1) {
- HDputs("");
+ puts("");
if (test_filter_noencoder(NOENCODER_SZIP_SHUFF_FLETCH_DATASET) < 0)
goto error;
}
@@ -2790,7 +2790,7 @@ test_filters(hid_t file)
/* Make sure encoding is enabled */
if (h5_szip_can_encode() == 1) {
- HDputs("");
+ puts("");
if ((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto error;
if (H5Pset_chunk(dc, 2, chunk_size) < 0)
@@ -2817,7 +2817,7 @@ test_filters(hid_t file)
#else /* H5_HAVE_FILTER_SZIP */
TESTING("shuffle+szip+fletcher32 filters");
SKIPPED();
- HDputs(" szip filter not enabled");
+ puts(" szip filter not enabled");
#endif /* H5_HAVE_FILTER_SZIP */
return SUCCEED;
@@ -3196,7 +3196,7 @@ test_nbit_int(hid_t file)
double power;
size_t i, j;
- HDputs("Testing nbit filter");
+ puts("Testing nbit filter");
TESTING(" nbit int (setup)");
/* Define dataset datatype (integer), and set precision, offset */
@@ -4339,8 +4339,8 @@ test_nbit_compound_3(hid_t file)
power = pow(2.0, 17.0 - 1.0);
memset(&orig_data[i], 0, sizeof(orig_data[i]));
orig_data[i].i = (int)(HDrandom() % (long)power);
- HDstrcpy(orig_data[i].str, "fixed-length C string");
- orig_data[i].vl_str = HDstrdup("variable-length C string");
+ strcpy(orig_data[i].str, "fixed-length C string");
+ orig_data[i].vl_str = strdup("variable-length C string");
orig_data[i].v.p = malloc((size_t)(i + 1) * sizeof(unsigned int));
orig_data[i].v.len = (size_t)i + 1;
@@ -4380,9 +4380,9 @@ test_nbit_compound_3(hid_t file)
/* Check that the values read are the same as the values written */
for (i = 0; i < (size_t)size[0]; i++) {
- if (new_data[i].i != orig_data[i].i || HDstrcmp(new_data[i].str, orig_data[i].str) != 0 ||
- HDstrcmp(new_data[i].vl_str, orig_data[i].vl_str) != 0 ||
- new_data[i].v.len != orig_data[i].v.len || new_data[i].r != orig_data[i].r) {
+ if (new_data[i].i != orig_data[i].i || strcmp(new_data[i].str, orig_data[i].str) != 0 ||
+ strcmp(new_data[i].vl_str, orig_data[i].vl_str) != 0 || new_data[i].v.len != orig_data[i].v.len ||
+ new_data[i].r != orig_data[i].r) {
H5_FAILED();
printf(" Read different values than written.\n");
printf(" At index %lu\n", (unsigned long)i);
@@ -4846,7 +4846,7 @@ test_scaleoffset_int(hid_t file)
int new_data[2][5];
size_t i, j;
- HDputs("Testing scaleoffset filter");
+ puts("Testing scaleoffset filter");
TESTING(" scaleoffset int without fill value (setup)");
datatype = H5Tcopy(H5T_NATIVE_INT);
@@ -6415,11 +6415,11 @@ test_can_apply_szip(hid_t
}
else {
SKIPPED();
- HDputs(" Szip encoding is not enabled.");
+ puts(" Szip encoding is not enabled.");
}
#else /* H5_HAVE_FILTER_SZIP */
SKIPPED();
- HDputs(" Szip filter is not enabled.");
+ puts(" Szip filter is not enabled.");
#endif /* H5_HAVE_FILTER_SZIP */
return SUCCEED;
@@ -8376,7 +8376,7 @@ test_deprec(hid_t file)
H5E_END_TRY
if (dataset >= 0) {
H5_FAILED();
- HDputs(" Library allowed overwrite of existing dataset.");
+ puts(" Library allowed overwrite of existing dataset.");
goto error;
}
@@ -8401,7 +8401,7 @@ test_deprec(hid_t file)
H5E_END_TRY
if (dataset >= 0) {
H5_FAILED();
- HDputs(" Opened a non-existent dataset.");
+ puts(" Opened a non-existent dataset.");
goto error;
}
@@ -8454,7 +8454,7 @@ test_deprec(hid_t file)
H5E_END_TRY
if (dataset >= 0) {
H5_FAILED();
- HDputs(" Opened a dataset with incorrect chunking parameters.");
+ puts(" Opened a dataset with incorrect chunking parameters.");
goto error;
}
@@ -8518,7 +8518,7 @@ test_deprec(hid_t file)
if (H5Pset_filter(dcpl, H5Z_FILTER_DEPREC, 0, (size_t)0, NULL) < 0)
goto error;
- HDputs("");
+ puts("");
if (test_filter_internal(file, DSET_DEPREC_NAME_FILTER, dcpl, DISABLE_FLETCHER32, DATA_NOT_CORRUPTED,
&deprec_size) < 0)
goto error;
@@ -10095,7 +10095,7 @@ test_chunk_expand(hid_t fapl)
if (sizeof(size_t) <= 4 && low != H5F_LIBVER_LATEST) {
SKIPPED();
- HDputs(" Current machine can't test for error w/old file format");
+ puts(" Current machine can't test for error w/old file format");
} /* end if */
else {
/* Register "expansion" filter */
@@ -11903,7 +11903,7 @@ test_swmr_non_latest(const char *env_h5_driver, hid_t fapl)
*/
if (!H5FD__supports_swmr_test(env_h5_driver)) {
SKIPPED();
- HDputs(" Test skipped due to VFD not supporting SWMR I/O.");
+ puts(" Test skipped due to VFD not supporting SWMR I/O.");
return SUCCEED;
}
@@ -12173,7 +12173,7 @@ test_earray_hdr_fd(const char *env_h5_driver, hid_t fapl)
*/
if (!H5FD__supports_swmr_test(env_h5_driver)) {
SKIPPED();
- HDputs(" Test skipped due to VFD not supporting SWMR I/O.");
+ puts(" Test skipped due to VFD not supporting SWMR I/O.");
return SUCCEED;
}
@@ -12294,7 +12294,7 @@ test_farray_hdr_fd(const char *env_h5_driver, hid_t fapl)
*/
if (!H5FD__supports_swmr_test(env_h5_driver)) {
SKIPPED();
- HDputs(" Test skipped due to VFD not supporting SWMR I/O.");
+ puts(" Test skipped due to VFD not supporting SWMR I/O.");
return SUCCEED;
}
@@ -12421,7 +12421,7 @@ test_bt2_hdr_fd(const char *env_h5_driver, hid_t fapl)
*/
if (!H5FD__supports_swmr_test(env_h5_driver)) {
SKIPPED();
- HDputs(" Test skipped due to VFD not supporting SWMR I/O.");
+ puts(" Test skipped due to VFD not supporting SWMR I/O.");
return SUCCEED;
}
@@ -14385,10 +14385,10 @@ dls_01_main(void)
if (NULL == buffer)
TEST_ERROR;
- HDstrcpy(buffer, strings[0]);
- HDstrcpy(buffer + DLS_01_STR_SIZE, strings[1]);
- HDstrcpy(buffer + DLS_01_STR_SIZE * 2, strings[2]);
- HDstrcpy(buffer + DLS_01_STR_SIZE * 3, strings[3]);
+ strcpy(buffer, strings[0]);
+ strcpy(buffer + DLS_01_STR_SIZE, strings[1]);
+ strcpy(buffer + DLS_01_STR_SIZE * 2, strings[2]);
+ strcpy(buffer + DLS_01_STR_SIZE * 3, strings[3]);
fapl = H5Pcreate(H5P_FILE_ACCESS);
if (fapl <= 0)
@@ -15283,8 +15283,8 @@ test_0sized_dset_metadata_alloc(hid_t fapl_id)
continue;
/* Compose dataset name */
- HDsnprintf(dset_name, sizeof(dset_name), "/Dataset-%u-%u", (unsigned)alloc_time,
- (unsigned)layout);
+ snprintf(dset_name, sizeof(dset_name), "/Dataset-%u-%u", (unsigned)alloc_time,
+ (unsigned)layout);
/* Set up DCPL */
if ((dcpl_id_copy = H5Pcopy(dcpl_id)) < 0)
@@ -15432,7 +15432,7 @@ main(void)
envval = "nomatch";
/* Current VFD that does not support contiguous address space */
- contig_addr_vfd = (bool)(HDstrcmp(envval, "split") != 0 && HDstrcmp(envval, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(envval, "split") != 0 && strcmp(envval, "multi") != 0);
/* Set the random # seed */
HDsrandom((unsigned)HDtime(NULL));
@@ -15523,22 +15523,22 @@ main(void)
my_fapl = fapl2;
if (paged) {
my_fcpl = fcpl2;
- HDputs("\nTesting with new file format and paged aggregation");
+ puts("\nTesting with new file format and paged aggregation");
}
else {
my_fcpl = fcpl;
- HDputs("\nTesting with new file format and non-paged aggregation");
+ puts("\nTesting with new file format and non-paged aggregation");
}
} /* end if */
else {
my_fapl = fapl;
if (paged) {
my_fcpl = fcpl2;
- HDputs("Testing with old file format and paged aggregation:");
+ puts("Testing with old file format and paged aggregation:");
}
else {
my_fcpl = fcpl;
- HDputs("Testing with old file format and non-paged aggregation:");
+ puts("Testing with old file format and non-paged aggregation:");
}
} /* end else */
@@ -15549,7 +15549,7 @@ main(void)
if (true == minimized_ohdr) {
if (0 > H5Fset_dset_no_attrs_hint(file, true))
goto error;
- HDputs("(minimized dataset object headers with file setting)");
+ puts("(minimized dataset object headers with file setting)");
}
/* Cause the library to emit initial messages */
diff --git a/test/dt_arith.c b/test/dt_arith.c
index 0980150..ab89b68 100644
--- a/test/dt_arith.c
+++ b/test/dt_arith.c
@@ -403,10 +403,10 @@ static void
fpe_handler(int H5_ATTR_UNUSED signo)
{
SKIPPED();
- HDputs(" Test skipped due to SIGFPE.");
+ puts(" Test skipped due to SIGFPE.");
#ifndef HANDLE_SIGFPE
- HDputs(" Remaining tests could not be run.");
- HDputs(" Please turn off SIGFPE on overflows and try again.");
+ puts(" Remaining tests could not be run.");
+ puts(" Please turn off SIGFPE on overflows and try again.");
#endif
exit(255);
}
@@ -953,8 +953,8 @@ test_derived_flt(void)
/* Print errors */
if (0 == fails_this_test++) {
- HDsnprintf(str, sizeof(str),
- "\nTesting random sw derived floating-point -> derived floating-point conversions");
+ snprintf(str, sizeof(str),
+ "\nTesting random sw derived floating-point -> derived floating-point conversions");
printf("%-70s", str);
fflush(stdout);
H5_FAILED();
@@ -976,7 +976,7 @@ test_derived_flt(void)
printf(" %29d\n", *aligned);
if (fails_this_test >= max_fails) {
- HDputs(" maximum failures reached, aborting test...");
+ puts(" maximum failures reached, aborting test...");
goto error;
}
}
@@ -1122,8 +1122,8 @@ test_derived_flt(void)
/* Print errors */
if (0 == fails_this_test++) {
- HDsnprintf(str, sizeof(str),
- "\nTesting random sw derived floating-point -> derived floating-point conversions");
+ snprintf(str, sizeof(str),
+ "\nTesting random sw derived floating-point -> derived floating-point conversions");
printf("%-70s", str);
fflush(stdout);
H5_FAILED();
@@ -1141,7 +1141,7 @@ test_derived_flt(void)
printf("\n");
if (fails_this_test >= max_fails) {
- HDputs(" maximum failures reached, aborting test...");
+ puts(" maximum failures reached, aborting test...");
goto error;
}
}
@@ -1435,8 +1435,7 @@ test_derived_integer(void)
/* Print errors */
if (0 == fails_this_test++) {
- HDsnprintf(str, sizeof(str),
- "\nTesting random sw derived integer -> derived integer conversions");
+ snprintf(str, sizeof(str), "\nTesting random sw derived integer -> derived integer conversions");
printf("%-70s", str);
fflush(stdout);
H5_FAILED();
@@ -1454,7 +1453,7 @@ test_derived_integer(void)
printf("\n");
if (fails_this_test >= max_fails) {
- HDputs(" maximum failures reached, aborting test...");
+ puts(" maximum failures reached, aborting test...");
goto error;
}
}
@@ -1664,14 +1663,14 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
/* Sanity checks */
if (OTHER == src_type || OTHER == dst_type) {
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
printf("%-70s", str);
H5_FAILED();
- HDputs(" Unknown data type.");
+ puts(" Unknown data type.");
goto error;
}
else {
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
printf("%-70s", str);
fflush(stdout);
fails_this_test = 0;
@@ -2532,8 +2531,8 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
}
if (++fails_all_tests >= max_fails) {
- HDputs(" maximum failures reached, aborting test...");
- HDputs(" (dst is library's conversion output. ans is compiler's conversion output.)");
+ puts(" maximum failures reached, aborting test...");
+ puts(" (dst is library's conversion output. ans is compiler's conversion output.)");
goto done;
}
}
@@ -2667,26 +2666,26 @@ my_isnan(dtype_t type, void *val)
float x = 0.0;
memcpy(&x, val, sizeof(float));
- HDsnprintf(s, sizeof(s), "%g", (double)x);
+ snprintf(s, sizeof(s), "%g", (double)x);
}
else if (FLT_DOUBLE == type) {
double x = 0.0;
memcpy(&x, val, sizeof(double));
- HDsnprintf(s, sizeof(s), "%g", x);
+ snprintf(s, sizeof(s), "%g", x);
#if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE
}
else if (FLT_LDOUBLE == type) {
long double x = 0.0L;
memcpy(&x, val, sizeof(long double));
- HDsnprintf(s, sizeof(s), "%Lg", x);
+ snprintf(s, sizeof(s), "%Lg", x);
#endif
}
else {
return 0;
}
- if (HDstrstr(s, "NaN") || HDstrstr(s, "NAN") || HDstrstr(s, "nan"))
+ if (strstr(s, "NaN") || strstr(s, "NAN") || strstr(s, "nan"))
retval = 1;
}
@@ -2786,7 +2785,7 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
fflush(stdout);
fflush(stderr);
if ((child_pid = fork()) < 0) {
- HDperror("fork");
+ perror("fork");
return 1;
}
else if (child_pid > 0) {
@@ -2799,12 +2798,12 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
return WEXITSTATUS(status);
}
else if (WIFSIGNALED(status)) {
- HDsnprintf(str, sizeof(str), " Child caught signal %d.", WTERMSIG(status));
- HDputs(str);
+ snprintf(str, sizeof(str), " Child caught signal %d.", WTERMSIG(status));
+ puts(str);
return 1; /*child exit after catching non-SIGFPE signal */
}
else {
- HDputs(" Child didn't exit normally.");
+ puts(" Child didn't exit normally.");
return 1;
}
}
@@ -2857,39 +2856,37 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
/* Sanity checks */
if (sizeof(float) == sizeof(double))
- HDputs("Sizeof(float)==sizeof(double) - some tests may not be sensible.");
+ puts("Sizeof(float)==sizeof(double) - some tests may not be sensible.");
if (OTHER == src_type || OTHER == dst_type) {
- if (!HDstrcmp(name, "noop"))
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name,
- dst_type_name);
+ if (!strcmp(name, "noop"))
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
else if (run_test == TEST_SPECIAL)
- HDsnprintf(str, sizeof(str), "Testing %s special %s -> %s conversions", name, src_type_name,
- dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s special %s -> %s conversions", name, src_type_name,
+ dst_type_name);
else if (run_test == TEST_NORMAL)
- HDsnprintf(str, sizeof(str), "Testing %s normalized %s -> %s conversions", name, src_type_name,
- dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s normalized %s -> %s conversions", name, src_type_name,
+ dst_type_name);
else if (run_test == TEST_DENORM)
- HDsnprintf(str, sizeof(str), "Testing %s denormalized %s -> %s conversions", name, src_type_name,
- dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s denormalized %s -> %s conversions", name, src_type_name,
+ dst_type_name);
printf("%-70s", str);
H5_FAILED();
- HDputs(" Unknown data type.");
+ puts(" Unknown data type.");
goto error;
}
else {
- if (!HDstrcmp(name, "noop"))
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name,
- dst_type_name);
+ if (!strcmp(name, "noop"))
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
else if (run_test == TEST_SPECIAL)
- HDsnprintf(str, sizeof(str), "Testing %s special %s -> %s conversions", name, src_type_name,
- dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s special %s -> %s conversions", name, src_type_name,
+ dst_type_name);
else if (run_test == TEST_NORMAL)
- HDsnprintf(str, sizeof(str), "Testing %s normalized %s -> %s conversions", name, src_type_name,
- dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s normalized %s -> %s conversions", name, src_type_name,
+ dst_type_name);
else if (run_test == TEST_DENORM)
- HDsnprintf(str, sizeof(str), "Testing %s denormalized %s -> %s conversions", name, src_type_name,
- dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s denormalized %s -> %s conversions", name, src_type_name,
+ dst_type_name);
printf("%-70s", str);
fflush(stdout);
@@ -3244,10 +3241,10 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
* denormalized or special values, print out warning message.*/
if (++fails_all_tests >= max_fails) {
if (run_test == TEST_NORMAL)
- HDputs(" maximum failures reached, aborting test...");
+ puts(" maximum failures reached, aborting test...");
else if (run_test == TEST_DENORM || run_test == TEST_SPECIAL)
- HDputs(" maximum warnings reached, aborting test...");
- HDputs(" (dst is library's conversion output. ans is compiler's conversion output.)");
+ puts(" maximum warnings reached, aborting test...");
+ puts(" (dst is library's conversion output. ans is compiler's conversion output.)");
goto done;
}
@@ -3496,10 +3493,10 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
/* Sanity checks */
if (OTHER == src_type || OTHER == dst_type) {
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
printf("%-70s", str);
H5_FAILED();
- HDputs(" Unknown data type.");
+ puts(" Unknown data type.");
goto error;
}
@@ -3507,10 +3504,10 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
INT_INT == src_type || INT_UINT == src_type || INT_LONG == src_type || INT_ULONG == src_type ||
INT_LLONG == src_type || INT_ULLONG == src_type) &&
(FLT_FLOAT != dst_type && FLT_DOUBLE != dst_type && FLT_LDOUBLE != dst_type)) {
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
printf("%-70s", str);
H5_FAILED();
- HDputs(" 1. Not an integer-float conversion.");
+ puts(" 1. Not an integer-float conversion.");
goto error;
}
@@ -3518,31 +3515,31 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
(INT_SCHAR != dst_type && INT_UCHAR != dst_type && INT_SHORT != dst_type && INT_USHORT != dst_type &&
INT_INT != dst_type && INT_UINT != dst_type && INT_LONG != dst_type && INT_ULONG != dst_type &&
INT_LLONG != dst_type && INT_ULLONG != dst_type)) {
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
printf("%-70s", str);
H5_FAILED();
- HDputs(" 2. Not a float-integer conversion.");
+ puts(" 2. Not a float-integer conversion.");
goto error;
}
if (INT_SCHAR == src_type || INT_UCHAR == src_type || INT_SHORT == src_type || INT_USHORT == src_type ||
INT_INT == src_type || INT_UINT == src_type || INT_LONG == src_type || INT_ULONG == src_type ||
INT_LLONG == src_type || INT_ULLONG == src_type) {
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name);
printf("%-70s", str);
fflush(stdout);
fails_this_test = 0;
}
else {
if (run_test == TEST_NORMAL)
- HDsnprintf(str, sizeof(str), "Testing %s normalized %s -> %s conversions", name, src_type_name,
- dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s normalized %s -> %s conversions", name, src_type_name,
+ dst_type_name);
else if (run_test == TEST_DENORM)
- HDsnprintf(str, sizeof(str), "Testing %s denormalized %s -> %s conversions", name, src_type_name,
- dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s denormalized %s -> %s conversions", name, src_type_name,
+ dst_type_name);
else
- HDsnprintf(str, sizeof(str), "Testing %s special %s -> %s conversions", name, src_type_name,
- dst_type_name);
+ snprintf(str, sizeof(str), "Testing %s special %s -> %s conversions", name, src_type_name,
+ dst_type_name);
printf("%-70s", str);
fflush(stdout);
fails_this_test = 0;
@@ -4461,10 +4458,10 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
* denormalized or special values, print out warning message.*/
if (++fails_all_tests >= max_fails) {
if (run_test == TEST_NORMAL)
- HDputs(" maximum failures reached, aborting test...");
+ puts(" maximum failures reached, aborting test...");
else if (run_test == TEST_DENORM || run_test == TEST_SPECIAL)
- HDputs(" maximum warnings reached, aborting test...");
- HDputs(" (dst is library's conversion output. ans is compiler's conversion output.)");
+ puts(" maximum warnings reached, aborting test...");
+ puts(" (dst is library's conversion output. ans is compiler's conversion output.)");
goto done;
}
@@ -4771,7 +4768,7 @@ run_fp_tests(const char *name)
{
int nerrors = 0;
- if (!HDstrcmp(name, "noop")) {
+ if (!strcmp(name, "noop")) {
nerrors += test_conv_flt_1("noop", TEST_NOOP, H5T_NATIVE_FLOAT, H5T_NATIVE_FLOAT);
nerrors += test_conv_flt_1("noop", TEST_NOOP, H5T_NATIVE_DOUBLE, H5T_NATIVE_DOUBLE);
nerrors += test_conv_flt_1("noop", TEST_NOOP, H5T_NATIVE_LDOUBLE, H5T_NATIVE_LDOUBLE);
@@ -4800,11 +4797,11 @@ run_fp_tests(const char *name)
{
char str[256]; /*string */
- HDsnprintf(str, sizeof(str), "Testing %s denormalized %s -> %s conversions", name, "long double",
- "float");
+ snprintf(str, sizeof(str), "Testing %s denormalized %s -> %s conversions", name, "long double",
+ "float");
printf("%-70s", str);
SKIPPED();
- HDputs(" Test skipped due to the conversion problem on IBM ppc64le cpu.");
+ puts(" Test skipped due to the conversion problem on IBM ppc64le cpu.");
}
#endif
@@ -4824,11 +4821,11 @@ run_fp_tests(const char *name)
{
char str[256]; /*string */
- HDsnprintf(str, sizeof(str), "Testing %s special %s -> %s conversions", name, "long double",
- "float or double");
+ snprintf(str, sizeof(str), "Testing %s special %s -> %s conversions", name, "long double",
+ "float or double");
printf("%-70s", str);
SKIPPED();
- HDputs(" Test skipped due to the conversion problem on IBM ppc64le cpu.");
+ puts(" Test skipped due to the conversion problem on IBM ppc64le cpu.");
}
#endif
#endif
@@ -4900,11 +4897,10 @@ run_int_fp_conv(const char *name)
{
char str[256]; /*string */
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "(unsigned) long",
- "long double");
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "(unsigned) long", "long double");
printf("%-70s", str);
SKIPPED();
- HDputs(" Test skipped due to the special algorithm of hardware conversion.");
+ puts(" Test skipped due to the special algorithm of hardware conversion.");
}
#endif
#endif /* H5_SIZEOF_LONG!=H5_SIZEOF_INT */
@@ -4915,10 +4911,10 @@ run_int_fp_conv(const char *name)
{
char str[256]; /*hello string */
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "long long", "long double");
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "long long", "long double");
printf("%-70s", str);
SKIPPED();
- HDputs(" Test skipped due to compiler error in handling conversion.");
+ puts(" Test skipped due to compiler error in handling conversion.");
}
#endif /* H5_LLONG_TO_LDOUBLE_CORRECT */
#if H5_LLONG_TO_LDOUBLE_CORRECT
@@ -4927,11 +4923,11 @@ run_int_fp_conv(const char *name)
{
char str[256]; /*hello string */
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "unsigned long long",
- "long double");
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "unsigned long long",
+ "long double");
printf("%-70s", str);
SKIPPED();
- HDputs(" Test skipped due to compiler not handling conversion.");
+ puts(" Test skipped due to compiler not handling conversion.");
}
#endif /* H5_LLONG_TO_LDOUBLE_CORRECT */
#endif
@@ -4984,7 +4980,7 @@ run_fp_int_conv(const char *name)
#endif
#if H5_SIZEOF_LONG_LONG != H5_SIZEOF_LONG
- if (!HDstrcmp(name, "hw")) { /* Hardware conversion */
+ if (!strcmp(name, "hw")) { /* Hardware conversion */
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_LLONG);
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_LLONG);
}
@@ -5016,11 +5012,11 @@ run_fp_int_conv(const char *name)
#else
char str[256]; /*string */
- HDsnprintf(str, sizeof(str), "Testing %s special %s -> %s conversions", name, "long double",
- "signed and unsigned char, short, int, long");
+ snprintf(str, sizeof(str), "Testing %s special %s -> %s conversions", name, "long double",
+ "signed and unsigned char, short, int, long");
printf("%-70s", str);
SKIPPED();
- HDputs(" Test skipped due to the conversion problem on IBM ppc64le cpu.");
+ puts(" Test skipped due to the conversion problem on IBM ppc64le cpu.");
#endif
}
#if H5_SIZEOF_LONG != H5_SIZEOF_INT
@@ -5039,11 +5035,11 @@ run_fp_int_conv(const char *name)
{
char str[256]; /*string */
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "long double",
- "(unsigned) long");
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "long double",
+ "(unsigned) long");
printf("%-70s", str);
SKIPPED();
- HDputs(" Test skipped due to the special algorithm of hardware conversion.");
+ puts(" Test skipped due to the special algorithm of hardware conversion.");
}
#endif
#endif /*H5_SIZEOF_LONG!=H5_SIZEOF_INT */
@@ -5055,10 +5051,10 @@ run_fp_int_conv(const char *name)
{
char str[256]; /*string */
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "long double", "long long");
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "long double", "long long");
printf("%-70s", str);
SKIPPED();
- HDputs(" Test skipped due to hardware conversion error.");
+ puts(" Test skipped due to hardware conversion error.");
}
#endif /*H5_LDOUBLE_TO_LLONG_ACCURATE*/
#if defined(H5_LDOUBLE_TO_LLONG_ACCURATE)
@@ -5067,11 +5063,11 @@ run_fp_int_conv(const char *name)
{
char str[256]; /*string */
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "long double",
- "unsigned long long");
+ snprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, "long double",
+ "unsigned long long");
printf("%-70s", str);
SKIPPED();
- HDputs(" Test skipped due to hardware conversion error.");
+ puts(" Test skipped due to hardware conversion error.");
}
#endif /*H5_LDOUBLE_TO_LLONG_ACCURATE*/
#endif
diff --git a/test/dtransform.c b/test/dtransform.c
index c0d92dd..6ec48a6 100644
--- a/test/dtransform.c
+++ b/test/dtransform.c
@@ -857,12 +857,12 @@ test_getset(const hid_t dxpl_id_c_to_f)
TESTING("H5Pget_data_transform");
- if (NULL == (ptrgetTest = (char *)malloc(HDstrlen(simple) + 1)))
+ if (NULL == (ptrgetTest = (char *)malloc(strlen(simple) + 1)))
TEST_ERROR;
- if (H5Pget_data_transform(dxpl_id_c_to_f, ptrgetTest, HDstrlen(c_to_f) + 1) < 0)
+ if (H5Pget_data_transform(dxpl_id_c_to_f, ptrgetTest, strlen(c_to_f) + 1) < 0)
TEST_ERROR;
- if (HDstrcmp(c_to_f, ptrgetTest) != 0)
+ if (strcmp(c_to_f, ptrgetTest) != 0)
FAIL_PUTS_ERROR(" ERROR: Data transform failed to match what was set\n");
PASSED();
@@ -888,11 +888,11 @@ test_getset(const hid_t dxpl_id_c_to_f)
TESTING("H5Pget_data_transform, after resetting transform property");
- if (NULL == (ptrgetTest = (char *)calloc((size_t)1, HDstrlen(simple) + 1)))
+ if (NULL == (ptrgetTest = (char *)calloc((size_t)1, strlen(simple) + 1)))
TEST_ERROR;
- if (H5Pget_data_transform(dxpl_id_c_to_f, ptrgetTest, HDstrlen(simple) + 1) < 0)
+ if (H5Pget_data_transform(dxpl_id_c_to_f, ptrgetTest, strlen(simple) + 1) < 0)
TEST_ERROR;
- if (HDstrcmp(simple, ptrgetTest) != 0)
+ if (strcmp(simple, ptrgetTest) != 0)
FAIL_PUTS_ERROR(" ERROR: Data transform failed to match what was set\n");
PASSED();
@@ -919,7 +919,7 @@ test_set(void)
TESTING("H5Pget_data_transform (get before set)");
- if (NULL == (ptrgetTest = (char *)malloc(HDstrlen(str) + 1)))
+ if (NULL == (ptrgetTest = (char *)malloc(strlen(str) + 1)))
TEST_ERROR;
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
@@ -930,7 +930,7 @@ test_set(void)
H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
- if (H5Pget_data_transform(dxpl_id, ptrgetTest, HDstrlen(str) + 1) < 0)
+ if (H5Pget_data_transform(dxpl_id, ptrgetTest, strlen(str) + 1) < 0)
PASSED();
else
FAIL_PUTS_ERROR(" ERROR: Data transform get before set succeeded (it shouldn't have)\n");
diff --git a/test/dtypes.c b/test/dtypes.c
index 37be1ca..74b6f61 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -309,7 +309,7 @@ test_copy(void)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Should not be able to close a predefined type!");
+ puts(" Should not be able to close a predefined type!");
goto error;
}
@@ -1850,7 +1850,7 @@ test_compound_9(void)
goto error;
} /* end if */
- if (rdata.i1 != wdata.i1 || rdata.i2 != wdata.i2 || HDstrcmp(rdata.str, wdata.str) != 0) {
+ if (rdata.i1 != wdata.i1 || rdata.i2 != wdata.i2 || strcmp(rdata.str, wdata.str) != 0) {
H5_FAILED();
AT();
printf("incorrect read data\n");
@@ -1924,7 +1924,7 @@ test_compound_9(void)
goto error;
} /* end if */
- if (rdata.i1 != wdata.i1 || rdata.i2 != wdata.i2 || HDstrcmp(rdata.str, wdata.str) != 0) {
+ if (rdata.i1 != wdata.i1 || rdata.i2 != wdata.i2 || strcmp(rdata.str, wdata.str) != 0) {
H5_FAILED();
AT();
printf("incorrect read data\n");
@@ -1998,12 +1998,12 @@ test_compound_10(void)
for (i = 0; i < ARRAY_DIM; i++) {
wdata[i].i1 = i * 10 + i;
- wdata[i].str = HDstrdup("C string A");
+ wdata[i].str = strdup("C string A");
wdata[i].str[9] = (char)(wdata[i].str[9] + i);
wdata[i].i2 = i * 1000 + i * 10;
- wdata[i].text.p = (void *)HDstrdup("variable-length text A\0");
- len = wdata[i].text.len = HDstrlen((char *)wdata[i].text.p) + 1;
+ wdata[i].text.p = (void *)strdup("variable-length text A\0");
+ len = wdata[i].text.len = strlen((char *)wdata[i].text.p) + 1;
((char *)(wdata[i].text.p))[len - 2] = (char)(((char *)(wdata[i].text.p))[len - 2] + i);
((char *)(wdata[i].text.p))[len - 1] = '\0';
}
@@ -2109,7 +2109,7 @@ test_compound_10(void)
for (i = 0; i < ARRAY_DIM; i++) {
if (rdata[i].i1 != wdata[i].i1 || rdata[i].i2 != wdata[i].i2 ||
- HDstrcmp(rdata[i].str, wdata[i].str) != 0) {
+ strcmp(rdata[i].str, wdata[i].str) != 0) {
H5_FAILED();
AT();
printf("incorrect read data\n");
@@ -2125,7 +2125,7 @@ test_compound_10(void)
t1 = rdata[i].text.p;
t2 = wdata[i].text.p;
- if (HDstrcmp((char *)t1, (char *)t2) != 0) {
+ if (strcmp((char *)t1, (char *)t2) != 0) {
H5_FAILED();
AT();
printf("incorrect VL read data\n");
@@ -2264,7 +2264,7 @@ test_compound_11(void)
((big_t *)buf)[u].s1 = (char *)malloc((size_t)32);
if (!((big_t *)buf)[u].s1)
TEST_ERROR;
- HDsnprintf(((big_t *)buf)[u].s1, 32, "%u", (unsigned)u);
+ snprintf(((big_t *)buf)[u].s1, 32, "%u", (unsigned)u);
} /* end for */
/* Make copy of buffer before conversion */
@@ -2307,7 +2307,7 @@ test_compound_11(void)
((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
TEST_ERROR;
} /* end if */
- else if (HDstrcmp(((big_t *)buf_orig)[u].s1, ((little_t *)buf)[u].s1) != 0) {
+ else if (strcmp(((big_t *)buf_orig)[u].s1, ((little_t *)buf)[u].s1) != 0) {
printf("Error, line #%d: buf_orig[%u].s1=%s, buf[%u].s1=%s\n", __LINE__, (unsigned)u,
((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
TEST_ERROR;
@@ -2358,7 +2358,7 @@ test_compound_11(void)
((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
TEST_ERROR;
} /* end if */
- else if (HDstrcmp(((big_t *)buf_orig)[u].s1, ((little_t *)buf)[u].s1) != 0) {
+ else if (strcmp(((big_t *)buf_orig)[u].s1, ((little_t *)buf)[u].s1) != 0) {
printf("Error, line #%d: buf_orig[%u].s1=%s, buf[%u].s1=%s\n", __LINE__, (unsigned)u,
((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
TEST_ERROR;
@@ -2399,7 +2399,7 @@ test_compound_11(void)
((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
TEST_ERROR;
} /* end if */
- else if (HDstrcmp(((big_t *)buf_orig)[u].s1, ((little_t *)buf)[u].s1) != 0) {
+ else if (strcmp(((big_t *)buf_orig)[u].s1, ((little_t *)buf)[u].s1) != 0) {
printf("Error, line #%d: buf_orig[%u].s1=%s, buf[%u].s1=%s\n", __LINE__, (unsigned)u,
((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
TEST_ERROR;
@@ -2525,7 +2525,7 @@ test_compound_12(void)
H5E_END_TRY
if (ret >= 0) {
H5_FAILED();
- HDputs(" Tries to cut off the last member. Should have failed.");
+ puts(" Tries to cut off the last member. Should have failed.");
goto error;
}
@@ -2971,14 +2971,14 @@ test_compound_14(void)
goto error;
} /* end if */
- if (rdata1.c1 != wdata1.c1 || rdata1.c2 != wdata1.c2 || HDstrcmp(rdata1.str, wdata1.str) != 0) {
+ if (rdata1.c1 != wdata1.c1 || rdata1.c2 != wdata1.c2 || strcmp(rdata1.str, wdata1.str) != 0) {
H5_FAILED();
AT();
printf("incorrect read data\n");
goto error;
} /* end if */
- if (rdata2.c1 != wdata2.c1 || rdata2.c2 != wdata2.c2 || HDstrcmp(rdata2.str, wdata2.str) != 0 ||
+ if (rdata2.c1 != wdata2.c1 || rdata2.c2 != wdata2.c2 || strcmp(rdata2.str, wdata2.str) != 0 ||
rdata2.l1 != wdata2.l1 || rdata2.l2 != wdata2.l2 || rdata2.l3 != wdata2.l3 ||
rdata2.l4 != wdata2.l4) {
H5_FAILED();
@@ -3069,14 +3069,14 @@ test_compound_14(void)
goto error;
} /* end if */
- if (rdata1.c1 != wdata1.c1 || rdata1.c2 != wdata1.c2 || HDstrcmp(rdata1.str, wdata1.str) != 0) {
+ if (rdata1.c1 != wdata1.c1 || rdata1.c2 != wdata1.c2 || strcmp(rdata1.str, wdata1.str) != 0) {
H5_FAILED();
AT();
printf("incorrect read data\n");
goto error;
} /* end if */
- if (rdata2.c1 != wdata2.c1 || rdata2.c2 != wdata2.c2 || HDstrcmp(rdata2.str, wdata2.str) != 0 ||
+ if (rdata2.c1 != wdata2.c1 || rdata2.c2 != wdata2.c2 || strcmp(rdata2.str, wdata2.str) != 0 ||
rdata2.l1 != wdata2.l1 || rdata2.l2 != wdata2.l2 || rdata2.l3 != wdata2.l3 ||
rdata2.l4 != wdata2.l4) {
H5_FAILED();
@@ -4028,7 +4028,7 @@ test_query(void)
printf("Can't get name for enum member\n");
goto error;
} /* end if */
- if (HDstrcmp("YELLOW", enum_name) != 0) {
+ if (strcmp("YELLOW", enum_name) != 0) {
H5_FAILED();
printf("Incorrect name for enum member\n");
goto error;
@@ -4104,7 +4104,7 @@ test_transient(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Predefined types should not be modifiable!");
+ puts(" Predefined types should not be modifiable!");
goto error;
}
H5E_BEGIN_TRY
@@ -4114,7 +4114,7 @@ test_transient(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Predefined types should not be closable!");
+ puts(" Predefined types should not be closable!");
goto error;
}
@@ -4132,7 +4132,7 @@ test_transient(hid_t fapl)
H5E_END_TRY
if (ret_id >= 0) {
H5_FAILED();
- HDputs(" Attributes should not be allowed for transient types!");
+ puts(" Attributes should not be allowed for transient types!");
goto error;
}
@@ -4154,7 +4154,7 @@ test_transient(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Dataset datatypes should not be modifiable!");
+ puts(" Dataset datatypes should not be modifiable!");
goto error;
}
if (H5Tclose(t2) < 0)
@@ -4177,7 +4177,7 @@ test_transient(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Dataset datatypes should not be modifiable!");
+ puts(" Dataset datatypes should not be modifiable!");
goto error;
}
if (H5Tclose(t2) < 0)
@@ -4259,7 +4259,7 @@ test_named(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Predefined types should not be committable!");
+ puts(" Predefined types should not be committable!");
goto error;
}
@@ -4272,7 +4272,7 @@ test_named(hid_t fapl)
goto error;
if (0 == status) {
H5_FAILED();
- HDputs(" H5Tcommitted() returned false!");
+ puts(" H5Tcommitted() returned false!");
goto error;
}
@@ -4284,7 +4284,7 @@ test_named(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Committed type is not constant!");
+ puts(" Committed type is not constant!");
goto error;
}
@@ -4297,7 +4297,7 @@ test_named(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Committed types should not be recommitted!");
+ puts(" Committed types should not be recommitted!");
goto error;
}
@@ -4322,7 +4322,7 @@ test_named(hid_t fapl)
goto error;
if (status) {
H5_FAILED();
- HDputs(" Copying a named type should result in a transient type!");
+ puts(" Copying a named type should result in a transient type!");
goto error;
}
if (H5Tset_precision(t2, (size_t)256) < 0)
@@ -4341,7 +4341,7 @@ test_named(hid_t fapl)
goto error;
if (!status) {
H5_FAILED();
- HDputs(" Opened named types should be named types!");
+ puts(" Opened named types should be named types!");
goto error;
}
@@ -4356,7 +4356,7 @@ test_named(hid_t fapl)
goto error;
if (!status) {
H5_FAILED();
- HDputs(" Dataset type should be a named type!");
+ puts(" Dataset type should be a named type!");
goto error;
}
@@ -4375,7 +4375,7 @@ test_named(hid_t fapl)
goto error;
if (!status) {
H5_FAILED();
- HDputs(" Dataset type should be a named type!");
+ puts(" Dataset type should be a named type!");
goto error;
}
@@ -4401,7 +4401,7 @@ test_named(hid_t fapl)
goto error;
if (!status) {
H5_FAILED();
- HDputs(" Dataset type should be a named type!");
+ puts(" Dataset type should be a named type!");
goto error;
}
if (H5Tclose(t2) < 0)
@@ -4429,7 +4429,7 @@ test_named(hid_t fapl)
goto error;
if (status) {
H5_FAILED();
- HDputs(" Copied type should not be a named type!");
+ puts(" Copied type should not be a named type!");
goto error;
}
if ((dset = H5Dcreate2(file, "dset3", t2, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -4440,7 +4440,7 @@ test_named(hid_t fapl)
goto error;
if (status) {
H5_FAILED();
- HDputs(" Datatype from dataset using copied type should not be a named type!");
+ puts(" Datatype from dataset using copied type should not be a named type!");
goto error;
}
if (H5Tclose(t3) < 0)
@@ -4471,7 +4471,7 @@ test_named(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Types should not be committable to a read-only file!");
+ puts(" Types should not be committable to a read-only file!");
goto error;
}
@@ -4485,7 +4485,7 @@ test_named(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Types should not be committable to a read-only file!");
+ puts(" Types should not be committable to a read-only file!");
goto error;
}
@@ -4653,14 +4653,14 @@ test_conv_str_1(void)
goto error;
if (memcmp(buf, "abcd\0abcd\0abcdefghi\0", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Truncated C-string test failed");
+ puts(" Truncated C-string test failed");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
if (memcmp(buf, "abcd\0\0\0\0\0\0abcd\0\0\0\0\0\0", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Extended C-string test failed");
+ puts(" Extended C-string test failed");
goto error;
}
free(buf);
@@ -4684,14 +4684,14 @@ test_conv_str_1(void)
goto error;
if (memcmp(buf, "abcdeabcdeabcdefghij", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Truncated C buffer test failed");
+ puts(" Truncated C buffer test failed");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
if (memcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Extended C buffer test failed");
+ puts(" Extended C buffer test failed");
goto error;
}
free(buf);
@@ -4715,14 +4715,14 @@ test_conv_str_1(void)
goto error;
if (memcmp(buf, "abcdeabcdeabcdefghij", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Truncated Fortran-string test failed");
+ puts(" Truncated Fortran-string test failed");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
if (memcmp(buf, "abcde abcde ", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Extended Fortran-string test failed");
+ puts(" Extended Fortran-string test failed");
goto error;
}
free(buf);
@@ -4749,7 +4749,7 @@ test_conv_str_1(void)
goto error;
if (memcmp(buf, "abcdefghijabcdefghij", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Non-terminated string test 1");
+ puts(" Non-terminated string test 1");
goto error;
}
H5Tclose(dst_type);
@@ -4760,7 +4760,7 @@ test_conv_str_1(void)
goto error;
if (memcmp(buf, "abcd\0abcd\0abcdefghij", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Non-terminated string test 2");
+ puts(" Non-terminated string test 2");
goto error;
}
memcpy(buf, "abcdeabcdexxxxxxxxxx", (size_t)20);
@@ -4768,7 +4768,7 @@ test_conv_str_1(void)
goto error;
if (memcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Non-terminated string test 2");
+ puts(" Non-terminated string test 2");
goto error;
}
free(buf);
@@ -4792,14 +4792,14 @@ test_conv_str_1(void)
goto error;
if (memcmp(buf, "abcdefghi abcdefghi ", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" C string to Fortran test 1");
+ puts(" C string to Fortran test 1");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
if (memcmp(buf, "abcdefghi\0abcdefghi\0", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Fortran to C string test 1");
+ puts(" Fortran to C string test 1");
goto error;
}
if (H5Tclose(dst_type) < 0)
@@ -4811,14 +4811,14 @@ test_conv_str_1(void)
goto error;
if (memcmp(buf, "abcdeabcdeabcdefgh\0\0", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" C string to Fortran test 2");
+ puts(" C string to Fortran test 2");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
if (memcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Fortran to C string test 2");
+ puts(" Fortran to C string test 2");
goto error;
}
if (H5Tclose(src_type) < 0)
@@ -4834,14 +4834,14 @@ test_conv_str_1(void)
goto error;
if (memcmp(buf, "abcd abcd ", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" C string to Fortran test 3");
+ puts(" C string to Fortran test 3");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
if (memcmp(buf, "abcd\0abcd\0abcd ", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Fortran to C string test 3");
+ puts(" Fortran to C string test 3");
goto error;
}
free(buf);
@@ -4865,14 +4865,14 @@ test_conv_str_1(void)
goto error;
if (memcmp(buf, "abcdefghijabcdefghij", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" C buffer to Fortran test 1");
+ puts(" C buffer to Fortran test 1");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
if (memcmp(buf, "abcdefghijabcdefghij", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Fortran to C buffer test 1");
+ puts(" Fortran to C buffer test 1");
goto error;
}
if (H5Tclose(dst_type) < 0)
@@ -4884,14 +4884,14 @@ test_conv_str_1(void)
goto error;
if (memcmp(buf, "abcdeabcdeabcdefgh\0\0", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" C buffer to Fortran test 2");
+ puts(" C buffer to Fortran test 2");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
if (memcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Fortran to C buffer test 2");
+ puts(" Fortran to C buffer test 2");
goto error;
}
if (H5Tclose(src_type) < 0)
@@ -4907,14 +4907,14 @@ test_conv_str_1(void)
goto error;
if (memcmp(buf, "abcd abcd ", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" C buffer to Fortran test 3");
+ puts(" C buffer to Fortran test 3");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
if (memcmp(buf, "abcd\0abcd\0abcd ", (size_t)20) != 0) {
H5_FAILED();
- HDputs(" Fortran to C buffer test 3");
+ puts(" Fortran to C buffer test 3");
goto error;
}
if (H5Tclose(src_type) < 0)
@@ -4988,7 +4988,7 @@ test_conv_str_2(void)
} /* end for */
/* Do the conversions */
- HDsnprintf(s, sizeof(s), "Testing random string conversion speed");
+ snprintf(s, sizeof(s), "Testing random string conversion speed");
printf("%-70s", s);
fflush(stdout);
if (H5Tconvert(c_type, f_type, nelmts, buf, NULL, H5P_DEFAULT) < 0)
@@ -5196,14 +5196,14 @@ test_conv_enum_1(void)
buf[u] = HDrand() % 26;
/* Conversions */
- HDsnprintf(s, sizeof(s), "Testing random enum conversion O(N)");
+ snprintf(s, sizeof(s), "Testing random enum conversion O(N)");
printf("%-70s", s);
fflush(stdout);
if (H5Tconvert(t1, t2, nelmts, buf, NULL, H5P_DEFAULT) < 0)
goto error;
PASSED();
- HDsnprintf(s, sizeof(s), "Testing random enum conversion O(N log N)");
+ snprintf(s, sizeof(s), "Testing random enum conversion O(N log N)");
printf("%-70s", s);
fflush(stdout);
if (H5Tconvert(t2, t1, nelmts, buf, NULL, H5P_DEFAULT) < 0)
@@ -6802,7 +6802,7 @@ test_int_float_except(void)
PASSED();
#else /* H5_SIZEOF_INT==4 && H5_SIZEOF_FLOAT==4 */
SKIPPED();
- HDputs(" Test skipped due to int or float not 4 bytes.");
+ puts(" Test skipped due to int or float not 4 bytes.");
#endif /* H5_SIZEOF_INT==4 && H5_SIZEOF_FLOAT==4 */
return 0;
@@ -7388,7 +7388,7 @@ test_named_indirect_reopen(hid_t fapl)
TEST_ERROR;
if (NULL == (tag_ret = H5Tget_tag(type)))
TEST_ERROR;
- if (HDstrcmp(tag, tag_ret) != 0)
+ if (strcmp(tag, tag_ret) != 0)
TEST_ERROR;
H5free_memory(tag_ret);
tag_ret = NULL;
@@ -7404,7 +7404,7 @@ test_named_indirect_reopen(hid_t fapl)
TEST_ERROR;
if (NULL == (tag_ret = H5Tget_tag(type)))
TEST_ERROR;
- if (HDstrcmp(tag, tag_ret) != 0)
+ if (strcmp(tag, tag_ret) != 0)
TEST_ERROR;
H5free_memory(tag_ret);
tag_ret = NULL;
@@ -8042,7 +8042,7 @@ test_deprec(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Types should not be committable to a read-only file!");
+ puts(" Types should not be committable to a read-only file!");
goto error;
}
diff --git a/test/earray.c b/test/earray.c
index 5af1fa9..9cea8f4 100644
--- a/test/earray.c
+++ b/test/earray.c
@@ -753,7 +753,7 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
}
#else /* NDEBUG */
SKIPPED();
- HDputs(" Not tested when assertions are disabled");
+ puts(" Not tested when assertions are disabled");
#endif /* NDEBUG */
/*
@@ -2349,12 +2349,12 @@ main(void)
switch (curr_test) {
/* "Normal" testing parameters */
case EARRAY_TEST_NORMAL:
- HDputs("Testing with normal parameters");
+ puts("Testing with normal parameters");
break;
/* "Re-open array" testing parameters */
case EARRAY_TEST_REOPEN:
- HDputs("Testing with reopen array flag set");
+ puts("Testing with reopen array flag set");
tparam.reopen_array = EARRAY_TEST_REOPEN;
break;
@@ -2383,31 +2383,31 @@ main(void)
switch (curr_iter) {
/* "Forward" testing parameters */
case EARRAY_ITER_FW:
- HDputs("Testing with forward iteration");
+ puts("Testing with forward iteration");
tparam.eiter = &ea_iter_fw;
break;
/* "Reverse" testing parameters */
case EARRAY_ITER_RV:
- HDputs("Testing with reverse iteration");
+ puts("Testing with reverse iteration");
tparam.eiter = &ea_iter_rv;
break;
/* "Random" testing parameters */
case EARRAY_ITER_RND:
- HDputs("Testing with random iteration");
+ puts("Testing with random iteration");
tparam.eiter = &ea_iter_rnd;
break;
/* "Random #2" testing parameters */
case EARRAY_ITER_RND2:
- HDputs("Testing with random #2 iteration");
+ puts("Testing with random #2 iteration");
tparam.eiter = &ea_iter_rnd2;
break;
/* "Cyclic" testing parameters */
case EARRAY_ITER_CYC:
- HDputs("Testing with cyclic iteration");
+ puts("Testing with cyclic iteration");
tparam.eiter = &ea_iter_cyc;
break;
@@ -2429,16 +2429,15 @@ main(void)
/* Test first element in data block */
nelmts = (hsize_t)((hsize_t)1 + cparam.idx_blk_elmts + tparam.sblk_info[sblk].start_idx +
(tparam.sblk_info[sblk].dblk_nelmts * dblk));
- HDsnprintf(test_str, sizeof(test_str),
- "setting first element of array's data block #%llu",
- (unsigned long long)ndblks);
+ snprintf(test_str, sizeof(test_str), "setting first element of array's data block #%llu",
+ (unsigned long long)ndblks);
nerrors += test_set_elmts(fapl, &cparam, &tparam, nelmts, test_str);
/* Test all elements in data block */
nelmts = (hsize_t)(cparam.idx_blk_elmts + tparam.sblk_info[sblk].start_idx +
(tparam.sblk_info[sblk].dblk_nelmts * (dblk + 1)));
- HDsnprintf(test_str, sizeof(test_str), "setting all elements of array's data block #%llu",
- (unsigned long long)ndblks);
+ snprintf(test_str, sizeof(test_str), "setting all elements of array's data block #%llu",
+ (unsigned long long)ndblks);
nerrors += test_set_elmts(fapl, &cparam, &tparam, nelmts, test_str);
/* Increment data block being tested */
@@ -2481,7 +2480,7 @@ main(void)
if (nerrors)
goto error;
- HDputs("All extensible array tests passed.");
+ puts("All extensible array tests passed.");
/* Clean up file used */
h5_cleanup(FILENAME, fapl);
@@ -2489,7 +2488,7 @@ main(void)
return 0;
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
H5E_BEGIN_TRY
{
diff --git a/test/efc.c b/test/efc.c
index b177b2a..484320d 100644
--- a/test/efc.c
+++ b/test/efc.c
@@ -2642,7 +2642,7 @@ main(void)
int i; /* iterator */
/* Test Setup */
- HDputs("Testing the external file cache");
+ puts("Testing the external file cache");
/* Create property lists */
fcpl_id = H5Pcreate(H5P_FILE_CREATE);
@@ -2695,7 +2695,7 @@ main(void)
if (nerrors)
goto error;
- HDputs("All external file cache tests passed.");
+ puts("All external file cache tests passed.");
h5_clean_files(FILENAME, fapl_id);
@@ -2706,7 +2706,7 @@ main(void)
return EXIT_SUCCESS;
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
H5E_BEGIN_TRY
{
diff --git a/test/enc_dec_plist.c b/test/enc_dec_plist.c
index 14cb78e..e643b1b 100644
--- a/test/enc_dec_plist.c
+++ b/test/enc_dec_plist.c
@@ -187,9 +187,9 @@ main(void)
/* Display testing info */
low_string = h5_get_version_string(low);
high_string = h5_get_version_string(high);
- HDsnprintf(msg, sizeof(msg),
- "Testing ENCODE/DECODE with file version bounds: (%s, %s):", low_string, high_string);
- HDputs(msg);
+ snprintf(msg, sizeof(msg),
+ "Testing ENCODE/DECODE with file version bounds: (%s, %s):", low_string, high_string);
+ puts(msg);
if (VERBOSE_MED)
printf("Encode/Decode DCPLs\n");
diff --git a/test/enc_dec_plist_cross_platform.c b/test/enc_dec_plist_cross_platform.c
index 81464cb..b9dc16a 100644
--- a/test/enc_dec_plist_cross_platform.c
+++ b/test/enc_dec_plist_cross_platform.c
@@ -170,8 +170,8 @@ test_plists(const char *filename_prefix)
for (config_1 = 0; config_1 < (NCONFIG - 1); config_1++)
for (config_2 = config_1 + 1; config_2 < NCONFIG; config_2++) {
/* Generate filename for file 1 */
- if (HDsnprintf(filename, sizeof(filename), "%s%s%s", filename_prefix,
- config_1 & CONFIG_64 ? "64" : "32", config_1 & CONFIG_LE ? "le" : "be") < 0)
+ if (snprintf(filename, sizeof(filename), "%s%s%s", filename_prefix,
+ config_1 & CONFIG_64 ? "64" : "32", config_1 & CONFIG_LE ? "le" : "be") < 0)
TEST_ERROR;
/* Read file 1 */
@@ -186,8 +186,8 @@ test_plists(const char *filename_prefix)
HDclose(fd_1);
/* Generate filename for file 2 */
- if (HDsnprintf(filename, sizeof(filename), "%s%s%s", filename_prefix,
- config_2 & CONFIG_64 ? "64" : "32", config_2 & CONFIG_LE ? "le" : "be") < 0)
+ if (snprintf(filename, sizeof(filename), "%s%s%s", filename_prefix,
+ config_2 & CONFIG_64 ? "64" : "32", config_2 & CONFIG_LE ? "le" : "be") < 0)
TEST_ERROR;
/* Read file 1 */
diff --git a/test/enum.c b/test/enum.c
index 8ee0606..b64355c 100644
--- a/test/enum.c
+++ b/test/enum.c
@@ -808,12 +808,12 @@ main(void)
if (nerrors)
goto error;
- HDputs("All enum tests passed.");
+ puts("All enum tests passed.");
h5_cleanup(FILENAME, fapl_id);
return EXIT_SUCCESS;
error:
- HDputs("*** ENUM TESTS FAILED ***");
+ puts("*** ENUM TESTS FAILED ***");
return EXIT_FAILURE;
}
diff --git a/test/error_test.c b/test/error_test.c
index b1c45ef..9fe8117 100644
--- a/test/error_test.c
+++ b/test/error_test.c
@@ -175,15 +175,15 @@ error:
static herr_t
init_error(void)
{
- ssize_t cls_size = (ssize_t)HDstrlen(ERR_CLS_NAME) + 1;
- ssize_t msg_size = (ssize_t)HDstrlen(ERR_MIN_SUBROUTINE_MSG) + 1;
+ ssize_t cls_size = (ssize_t)strlen(ERR_CLS_NAME) + 1;
+ ssize_t msg_size = (ssize_t)strlen(ERR_MIN_SUBROUTINE_MSG) + 1;
char *cls_name = NULL;
char *msg = NULL;
H5E_type_t msg_type;
- if (NULL == (cls_name = (char *)malloc(HDstrlen(ERR_CLS_NAME) + 1)))
+ if (NULL == (cls_name = (char *)malloc(strlen(ERR_CLS_NAME) + 1)))
TEST_ERROR;
- if (NULL == (msg = (char *)malloc(HDstrlen(ERR_MIN_SUBROUTINE_MSG) + 1)))
+ if (NULL == (msg = (char *)malloc(strlen(ERR_MIN_SUBROUTINE_MSG) + 1)))
TEST_ERROR;
if ((ERR_CLS = H5Eregister_class(ERR_CLS_NAME, PROG_NAME, PROG_VERS)) < 0)
@@ -191,7 +191,7 @@ init_error(void)
if (cls_size != H5Eget_class_name(ERR_CLS, cls_name, (size_t)cls_size) + 1)
TEST_ERROR;
- if (HDstrcmp(ERR_CLS_NAME, cls_name) != 0)
+ if (strcmp(ERR_CLS_NAME, cls_name) != 0)
TEST_ERROR;
if ((ERR_MAJ_TEST = H5Ecreate_msg(ERR_CLS, H5E_MAJOR, ERR_MAJ_TEST_MSG)) < 0)
@@ -216,7 +216,7 @@ init_error(void)
TEST_ERROR;
if (msg_type != H5E_MINOR)
TEST_ERROR;
- if (HDstrcmp(msg, ERR_MIN_SUBROUTINE_MSG) != 0)
+ if (strcmp(msg, ERR_MIN_SUBROUTINE_MSG) != 0)
TEST_ERROR;
/* Register another class for later testing. */
@@ -293,7 +293,7 @@ long_desc_cb(unsigned H5_ATTR_UNUSED n, const H5E_error2_t *err_desc, void *clie
{
char *real_desc = (char *)client_data;
- if (err_desc->desc != NULL && HDstrcmp(err_desc->desc, real_desc) == 0)
+ if (err_desc->desc != NULL && strcmp(err_desc->desc, real_desc) == 0)
return 0;
else
return -1;
@@ -345,10 +345,10 @@ test_long_desc(void)
long_desc) < 0)
TEST_ERROR;
- /* Create the string that should be in the description. Must use HDsnprintf here
+ /* Create the string that should be in the description. Must use snprintf here
* because snprintf is _snprintf on Windows
*/
- HDsnprintf(full_desc, (size_t)(LONG_DESC_SIZE + 128), format, long_desc);
+ snprintf(full_desc, (size_t)(LONG_DESC_SIZE + 128), format, long_desc);
/* Make certain that the description is correct */
if (H5Ewalk2(H5E_DEFAULT, H5E_WALK_UPWARD, long_desc_cb, full_desc) < 0)
@@ -879,7 +879,7 @@ main(void)
* the test file was pre-generated.
*/
h5_fixname(DATAFILE, H5P_DEFAULT, filename, sizeof filename);
- if (!h5_using_default_driver(env_h5_drvr) && HDstrcmp(env_h5_drvr, "stdio")) {
+ if (!h5_using_default_driver(env_h5_drvr) && strcmp(env_h5_drvr, "stdio")) {
/* If not using the library's default VFD or the stdio VFD, force
* the library's default VFD here. The test file was pre-generated
* and can cause issues with many VFDs.
diff --git a/test/event_set.c b/test/event_set.c
index 31bbab8..52aa6ba 100644
--- a/test/event_set.c
+++ b/test/event_set.c
@@ -681,11 +681,11 @@ main(void)
goto error;
/* Report status */
- HDputs("All event set tests passed.");
+ puts("All event set tests passed.");
exit(EXIT_SUCCESS);
error:
- HDputs("***** EVENT SET TESTS FAILED *****");
+ puts("***** EVENT SET TESTS FAILED *****");
exit(EXIT_FAILURE);
} /* end main() */
diff --git a/test/evict_on_close.c b/test/evict_on_close.c
index 4a386e0..9ca7f9f 100644
--- a/test/evict_on_close.c
+++ b/test/evict_on_close.c
@@ -184,7 +184,7 @@ generate_eoc_test_file(hid_t fapl_id)
/* Create the group name */
memset(subgroup_name, '\0', SUBGROUP_NAME_SIZE);
- if (HDsnprintf(subgroup_name, (size_t)(SUBGROUP_NAME_SIZE - 1), "%d", i) < 0)
+ if (snprintf(subgroup_name, (size_t)(SUBGROUP_NAME_SIZE - 1), "%d", i) < 0)
TEST_ERROR;
if ((gid2 = H5Gcreate2(gid1, subgroup_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -279,7 +279,7 @@ generate_eoc_test_file(hid_t fapl_id)
/* Create the group name */
memset(subgroup_name, '\0', SUBGROUP_NAME_SIZE);
- if (HDsnprintf(subgroup_name, (size_t)(SUBGROUP_NAME_SIZE - 1), "%d", i) < 0)
+ if (snprintf(subgroup_name, (size_t)(SUBGROUP_NAME_SIZE - 1), "%d", i) < 0)
TEST_ERROR;
if ((gid2 = H5Gcreate2(gid1, subgroup_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -620,7 +620,7 @@ check_group_layout(hid_t fid, const char *group_name)
/* Create the group name */
memset(subgroup_name, '\0', SUBGROUP_NAME_SIZE);
- if (HDsnprintf(subgroup_name, (size_t)(SUBGROUP_NAME_SIZE - 1), "%d", i) < 0)
+ if (snprintf(subgroup_name, (size_t)(SUBGROUP_NAME_SIZE - 1), "%d", i) < 0)
TEST_ERROR;
if ((gid2 = H5Gopen2(gid1, subgroup_name, H5P_DEFAULT)) < 0)
diff --git a/test/external.c b/test/external.c
index 3d1d308..30abc00 100644
--- a/test/external.c
+++ b/test/external.c
@@ -139,7 +139,7 @@ test_non_extendible(hid_t file)
FAIL_STACK_ERROR;
if (1 != n) {
H5_FAILED();
- HDputs(" Returned external count is wrong.");
+ puts(" Returned external count is wrong.");
printf(" got: %d\n ans: 1\n", n);
goto error;
}
@@ -149,13 +149,13 @@ test_non_extendible(hid_t file)
FAIL_STACK_ERROR;
if (file_offset != 0) {
H5_FAILED();
- HDputs(" Wrong file offset.");
+ puts(" Wrong file offset.");
printf(" got: %lu\n ans: 0\n", (unsigned long)file_offset);
goto error;
}
if (file_size != (max_size[0] * sizeof(int))) {
H5_FAILED();
- HDputs(" Wrong file size.");
+ puts(" Wrong file size.");
printf(" got: %" PRIuHSIZE "\n ans: %" PRIuHSIZE "\n", file_size, max_size[0] * sizeof(int));
goto error;
}
@@ -396,7 +396,7 @@ test_unlimited(hid_t file)
FAIL_STACK_ERROR;
if (1 != n) {
H5_FAILED();
- HDputs(" Returned external count is wrong.");
+ puts(" Returned external count is wrong.");
printf(" got: %d\n ans: 1\n", n);
goto error;
} /* end if */
@@ -405,13 +405,13 @@ test_unlimited(hid_t file)
FAIL_STACK_ERROR;
if (file_offset != 0) {
H5_FAILED();
- HDputs(" Wrong file offset.");
+ puts(" Wrong file offset.");
printf(" got: %lu\n ans: 0\n", (unsigned long)file_offset);
goto error;
}
if (H5F_UNLIMITED != file_size) {
H5_FAILED();
- HDputs(" Wrong file size.");
+ puts(" Wrong file size.");
printf(" got: %lu\n ans: INF\n", (unsigned long)file_size);
goto error;
}
@@ -457,7 +457,7 @@ add_external_files(hid_t dcpl_id, unsigned int n_external_files, off_t offset, h
return -1;
}
for (i = 0; i < n_external_files; i++) {
- if (HDsnprintf(exname, AEF_EXNAME_MAX_LEN, "ext%d.data", i + 1) > AEF_EXNAME_MAX_LEN) {
+ if (snprintf(exname, AEF_EXNAME_MAX_LEN, "ext%d.data", i + 1) > AEF_EXNAME_MAX_LEN) {
fprintf(stderr, "External file %d overflows name buffer\n", i + 1);
fflush(stderr);
return -1;
@@ -705,7 +705,7 @@ test_read_file_set(hid_t fapl)
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
FAIL_STACK_ERROR;
for (i = 0; i < N_EXT_FILES; i++) {
- HDsnprintf(filename, sizeof(filename), "extern_%dr.raw", (int)i + 1);
+ snprintf(filename, sizeof(filename), "extern_%dr.raw", (int)i + 1);
if (H5Pset_external(dcpl, filename, (off_t)(i * GARBAGE_PER_FILE), (hsize_t)sizeof(part)) < 0)
FAIL_STACK_ERROR;
}
@@ -818,7 +818,7 @@ test_write_file_set(hid_t fapl)
for (i = 0; i < N_EXT_FILES; i++) {
hsize_t size;
- HDsnprintf(filename, sizeof(filename), "extern_%dw.raw", (int)i + 1);
+ snprintf(filename, sizeof(filename), "extern_%dw.raw", (int)i + 1);
if (i != N_EXT_FILES - 1)
size = (hsize_t)sizeof(part);
@@ -849,8 +849,8 @@ test_write_file_set(hid_t fapl)
for (i = 0; i < N_EXT_FILES; i++) {
char name1[64], name2[64];
- HDsnprintf(name1, sizeof(name1), "extern_%dr.raw", i + 1);
- HDsnprintf(name2, sizeof(name2), "extern_%dw.raw", i + 1);
+ snprintf(name1, sizeof(name1), "extern_%dr.raw", i + 1);
+ snprintf(name2, sizeof(name2), "extern_%dw.raw", i + 1);
if (!files_have_same_contents(name1, name2))
FAIL_PUTS_ERROR(" Output differs from expected value.");
} /* end for */
@@ -942,11 +942,11 @@ test_path_absolute(hid_t fapl)
if (NULL == HDgetcwd(cwdpath, sizeof(cwdpath)))
TEST_ERROR;
for (i = 0; i < N_EXT_FILES; i++) {
- HDsnprintf(filename, sizeof(filename), "%s%sextern_%zur.raw", cwdpath, H5_DIR_SEPS, i + 1);
+ snprintf(filename, sizeof(filename), "%s%sextern_%zur.raw", cwdpath, H5_DIR_SEPS, i + 1);
#if defined(H5_HAVE_WINDOW_PATH)
/* For windows, test path-absolute case (\dir\file.raw) for the second file */
if (i == 1)
- HDsnprintf(filename, sizeof(filename), "%s%sextern_%zur.raw", cwdpath + 2, H5_DIR_SEPS, i + 1);
+ snprintf(filename, sizeof(filename), "%s%sextern_%zur.raw", cwdpath + 2, H5_DIR_SEPS, i + 1);
#endif
if (H5Pset_external(dcpl, filename, (off_t)(i * GARBAGE_PER_FILE), (hsize_t)sizeof(part)) < 0)
FAIL_STACK_ERROR;
@@ -1037,7 +1037,7 @@ test_path_relative(hid_t fapl)
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
FAIL_STACK_ERROR;
for (i = 0; i < N_EXT_FILES; i++) {
- HDsnprintf(filename, sizeof(filename), "extern_%dr.raw", (int)i + 1);
+ snprintf(filename, sizeof(filename), "extern_%dr.raw", (int)i + 1);
if (H5Pset_external(dcpl, filename, (off_t)(i * GARBAGE_PER_FILE), (hsize_t)sizeof(part)) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -1131,7 +1131,7 @@ test_path_relative_cwd(hid_t fapl)
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
FAIL_STACK_ERROR;
for (i = 0; i < N_EXT_FILES; i++) {
- HDsnprintf(filename, sizeof(filename), "..%sextern_%dr.raw", H5_DIR_SEPS, (int)i + 1);
+ snprintf(filename, sizeof(filename), "..%sextern_%dr.raw", H5_DIR_SEPS, (int)i + 1);
if (H5Pset_external(dcpl, filename, (off_t)(i * GARBAGE_PER_FILE), (hsize_t)sizeof(part)) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -1145,7 +1145,7 @@ test_path_relative_cwd(hid_t fapl)
FAIL_STACK_ERROR;
if (H5Pget_efile_prefix(dapl, buffer, sizeof(buffer)) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(buffer, "${ORIGIN}") != 0)
+ if (strcmp(buffer, "${ORIGIN}") != 0)
FAIL_PUTS_ERROR("efile prefix not set correctly");
if ((dapl2 = H5Pcopy(dapl)) < 0)
FAIL_STACK_ERROR;
@@ -1315,7 +1315,7 @@ test_h5d_get_access_plist(hid_t fapl_id)
TEST_ERROR;
if (H5Pget_efile_prefix(dapl_id, buffer, (size_t)64) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(buffer, "someprefix") != 0)
+ if (strcmp(buffer, "someprefix") != 0)
FAIL_PUTS_ERROR("external file prefix from dapl incorrect");
/* Close everything */
@@ -1383,7 +1383,7 @@ main(void)
/* The file format doesn't matter for this test */
nerrors += test_h5d_get_access_plist(fapl_id_new);
- HDputs("");
+ puts("");
/* Test with old & new format groups */
for (latest_format = false; latest_format <= true; latest_format++) {
@@ -1391,11 +1391,11 @@ main(void)
/* Set the fapl for different file formats */
if (latest_format) {
- HDputs("\nTesting with the latest file format:");
+ puts("\nTesting with the latest file format:");
current_fapl_id = fapl_id_new;
}
else {
- HDputs("Testing with the default file format:");
+ puts("Testing with the default file format:");
current_fapl_id = fapl_id_old;
}
@@ -1444,7 +1444,7 @@ main(void)
if (H5Pclose(fapl_id_new) < 0)
FAIL_STACK_ERROR;
- HDputs("All external storage tests passed.");
+ puts("All external storage tests passed.");
/* Clean up files used by file set tests */
if (h5_cleanup(EXT_FNAME, fapl_id_old)) {
diff --git a/test/external_common.c b/test/external_common.c
index eb9c89a..8f0b7b9 100644
--- a/test/external_common.c
+++ b/test/external_common.c
@@ -52,9 +52,9 @@ reset_raw_data_files(bool is_env)
/* Open file */
if (is_env)
- HDsnprintf(filename, sizeof(filename), "extern_env_%lur.raw", (unsigned long)i + 1);
+ snprintf(filename, sizeof(filename), "extern_env_%lur.raw", (unsigned long)i + 1);
else
- HDsnprintf(filename, sizeof(filename), "extern_%lur.raw", (unsigned long)i + 1);
+ snprintf(filename, sizeof(filename), "extern_%lur.raw", (unsigned long)i + 1);
if ((fd = HDopen(filename, O_RDWR | O_CREAT | O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0)
goto error;
@@ -89,9 +89,9 @@ reset_raw_data_files(bool is_env)
/* Open file */
if (is_env)
- HDsnprintf(filename, sizeof(filename), "extern_env_%luw.raw", (unsigned long)i + 1);
+ snprintf(filename, sizeof(filename), "extern_env_%luw.raw", (unsigned long)i + 1);
else
- HDsnprintf(filename, sizeof(filename), "extern_%luw.raw", (unsigned long)i + 1);
+ snprintf(filename, sizeof(filename), "extern_%luw.raw", (unsigned long)i + 1);
if ((fd = HDopen(filename, O_RDWR | O_CREAT | O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0)
goto error;
diff --git a/test/external_env.c b/test/external_env.c
index 6067326..6d6146a 100644
--- a/test/external_env.c
+++ b/test/external_env.c
@@ -67,7 +67,7 @@ test_path_env(hid_t fapl)
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
FAIL_STACK_ERROR;
for (i = 0; i < N_EXT_FILES; i++) {
- HDsnprintf(filename, sizeof(filename), "..%sextern_env_%dr.raw", H5_DIR_SEPS, (int)i + 1);
+ snprintf(filename, sizeof(filename), "..%sextern_env_%dr.raw", H5_DIR_SEPS, (int)i + 1);
if (H5Pset_external(dcpl, filename, (off_t)(i * GARBAGE_PER_FILE), (hsize_t)sizeof(part)) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -83,7 +83,7 @@ test_path_env(hid_t fapl)
FAIL_STACK_ERROR;
if (H5Pget_efile_prefix(dapl, buffer, sizeof(buffer)) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(buffer, "someprefix") != 0)
+ if (strcmp(buffer, "someprefix") != 0)
FAIL_PUTS_ERROR("efile prefix not set correctly");
/* Create dataset */
@@ -161,11 +161,11 @@ main(void)
/* Set the fapl for different file formats */
if (latest_format) {
- HDputs("\nTesting with the latest file format:");
+ puts("\nTesting with the latest file format:");
current_fapl_id = fapl_id_new;
} /* end if */
else {
- HDputs("Testing with the default file format:");
+ puts("Testing with the default file format:");
current_fapl_id = fapl_id_old;
} /* end else */
@@ -179,7 +179,7 @@ main(void)
if (H5Pclose(fapl_id_new) < 0)
FAIL_STACK_ERROR;
- HDputs("All external storage tests passed.");
+ puts("All external storage tests passed.");
/* Clean up files used by file set tests */
if (h5_cleanup(EXT_ENV_FNAME, fapl_id_old)) {
diff --git a/test/farray.c b/test/farray.c
index d9c2d03..791cb54 100644
--- a/test/farray.c
+++ b/test/farray.c
@@ -491,7 +491,7 @@ test_create(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t H5_ATTR_UNUSE
}
#else /* NDEBUG */
SKIPPED();
- HDputs(" Not tested when assertions are disabled");
+ puts(" Not tested when assertions are disabled");
#endif /* NDEBUG */
/*
@@ -1678,12 +1678,12 @@ main(void)
switch (curr_test) {
/* "Normal" testing parameters */
case FARRAY_TEST_NORMAL:
- HDputs("Testing with NORMAL PARAMETERS");
+ puts("Testing with NORMAL PARAMETERS");
break;
/* "Re-open array" testing parameters */
case FARRAY_TEST_REOPEN:
- HDputs("Testing with reopen array flag set");
+ puts("Testing with reopen array flag set");
tparam.reopen_array = FARRAY_TEST_REOPEN;
break;
@@ -1710,25 +1710,25 @@ main(void)
switch (curr_iter) {
/* "Forward" testing parameters */
case FARRAY_ITER_FW:
- HDputs("Testing with forward iteration");
+ puts("Testing with forward iteration");
tparam.fiter = &fa_iter_fw;
break;
/* "Reverse" testing parameters */
case FARRAY_ITER_RV:
- HDputs("Testing with reverse iteration");
+ puts("Testing with reverse iteration");
tparam.fiter = &fa_iter_rv;
break;
/* "Random" testing parameters */
case FARRAY_ITER_RND:
- HDputs("Testing with random iteration");
+ puts("Testing with random iteration");
tparam.fiter = &fa_iter_rnd;
break;
/* "Cyclic" testing parameters */
case FARRAY_ITER_CYC:
- HDputs("Testing with cyclic iteration");
+ puts("Testing with cyclic iteration");
tparam.fiter = &fa_iter_cyc;
break;
@@ -1782,7 +1782,7 @@ main(void)
if (nerrors)
goto error;
- HDputs("All fixed array tests passed.");
+ puts("All fixed array tests passed.");
/* Clean up file used */
h5_cleanup(FILENAME, fapl);
@@ -1790,7 +1790,7 @@ main(void)
exit(EXIT_SUCCESS);
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
H5E_BEGIN_TRY
{
diff --git a/test/fheap.c b/test/fheap.c
index 7042e79..337e387 100644
--- a/test/fheap.c
+++ b/test/fheap.c
@@ -517,7 +517,7 @@ begin_test(fheap_test_param_t *tparam, const char *base_desc, fheap_heap_ids_t *
*/
size_t test_desc_len = strlen(base_desc) + sizeof(" ") + strlen(del_str);
test_desc = H5MM_malloc(test_desc_len);
- (void)HDsnprintf(test_desc, test_desc_len, "%s %s", base_desc, del_str);
+ (void)snprintf(test_desc, test_desc_len, "%s %s", base_desc, del_str);
TESTING(test_desc);
H5MM_xfree(test_desc);
@@ -7449,7 +7449,7 @@ test_man_incr_insert_remove(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_
if (H5HF_remove(fh, heap_id[j]) < 0)
FAIL_STACK_ERROR;
- HDsnprintf(obj2.b, sizeof(obj2.b), "%s%2d", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", j);
+ snprintf(obj2.b, sizeof(obj2.b), "%s%2d", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", j);
if (H5HF_insert(fh, (sizeof(obj2)), &obj2, heap_id[j]) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -7460,7 +7460,7 @@ test_man_incr_insert_remove(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_
/* Insert object */
memset(heap_id[i], 0, id_len);
- HDsnprintf(obj1.b, sizeof(obj1.b), "%s%2d", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", i);
+ snprintf(obj1.b, sizeof(obj1.b), "%s%2d", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", i);
if (H5HF_insert(fh, (sizeof(obj1)), &obj1, heap_id[i]) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -15968,7 +15968,7 @@ main(void)
envval = "nomatch";
/* Current VFD that does not support contiguous address space */
- contig_addr_vfd = (bool)(HDstrcmp(envval, "split") != 0 && HDstrcmp(envval, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(envval, "split") != 0 && strcmp(envval, "multi") != 0);
/* Reset library */
h5_reset();
@@ -16112,12 +16112,12 @@ main(void)
switch (curr_test) {
/* "Normal" testing parameters */
case FHEAP_TEST_NORMAL:
- HDputs("Testing with normal parameters");
+ puts("Testing with normal parameters");
break;
/* "Re-open heap" testing parameters */
case FHEAP_TEST_REOPEN:
- HDputs("Testing with reopen heap flag set");
+ puts("Testing with reopen heap flag set");
tparam.reopen_heap = FHEAP_TEST_REOPEN;
break;
@@ -16149,12 +16149,12 @@ main(void)
switch (fill) {
/* "Bulk fill" heap blocks with 'large' objects */
case FHEAP_TEST_FILL_LARGE:
- HDputs("Bulk-filling blocks w/large objects");
+ puts("Bulk-filling blocks w/large objects");
break;
/* "Bulk fill" heap blocks with 'single' objects */
case FHEAP_TEST_FILL_SINGLE:
- HDputs("Bulk-filling blocks w/single object");
+ puts("Bulk-filling blocks w/single object");
break;
/* An unknown test? */
@@ -16354,12 +16354,12 @@ main(void)
switch (id_len) {
/* Use "normal" form for 'huge' object's heap IDs */
case 0:
- HDputs("Using 'normal' heap ID format for 'huge' objects");
+ puts("Using 'normal' heap ID format for 'huge' objects");
break;
/* Use "direct" form for 'huge' object's heap IDs */
case 1:
- HDputs("Using 'direct' heap ID format for 'huge' objects");
+ puts("Using 'direct' heap ID format for 'huge' objects");
/* Adjust actual length of heap IDs for directly storing 'huge' object's file
* offset & length in heap ID */
@@ -16369,8 +16369,8 @@ main(void)
/* Use "direct" storage for 'huge' objects and larger IDs for 'tiny' objects */
case 2:
small_cparam.id_len = 37;
- HDputs("Using 'direct' heap ID format for 'huge' objects and larger IDs for "
- "'tiny' objects");
+ puts("Using 'direct' heap ID format for 'huge' objects and larger IDs for "
+ "'tiny' objects");
tparam.actual_id_len = 37;
break;
@@ -16436,7 +16436,7 @@ main(void)
printf("***Express test mode on. Some tests skipped\n");
else {
/* Random tests using "small" heap creation parameters */
- HDputs("Using 'small' heap creation parameters");
+ puts("Using 'small' heap creation parameters");
/* (reduce size of tests when re-opening each time) */
/* XXX: Try to speed things up enough that these tests don't have to be reduced when
@@ -16458,7 +16458,7 @@ main(void)
fapl, &small_cparam, &tparam);
/* Random tests using "large" heap creation parameters */
- HDputs("Using 'large' heap creation parameters");
+ puts("Using 'large' heap creation parameters");
tparam.actual_id_len = LARGE_HEAP_ID_LEN;
/* (reduce size of tests when re-opening each time) */
@@ -16513,7 +16513,7 @@ main(void)
if (nerrors)
goto error;
- HDputs("All fractal heap tests passed.");
+ puts("All fractal heap tests passed.");
/* Release space for the shared objects */
H5MM_xfree(shared_wobj_g);
@@ -16538,7 +16538,7 @@ main(void)
return 0;
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
H5E_BEGIN_TRY
{
H5MM_xfree(shared_wobj_g);
diff --git a/test/file_image.c b/test/file_image.c
index b80eef0..b7d3c27 100644
--- a/test/file_image.c
+++ b/test/file_image.c
@@ -552,10 +552,10 @@ test_core(void)
VERIFY(tmp != NULL, "h5_fixname failed");
/* Append ".copy" to the filename from the source directory */
- VERIFY(HDstrlen(filename) < (1023 - 5), "file name too long.");
- HDstrncpy(copied_filename, filename, (size_t)1023);
+ VERIFY(strlen(filename) < (1023 - 5), "file name too long.");
+ strncpy(copied_filename, filename, (size_t)1023);
copied_filename[1023] = '\0';
- HDstrcat(copied_filename, ".copy");
+ strcat(copied_filename, ".copy");
/* Make a copy of the data file from svn. */
ret = h5_make_local_copy(filename, copied_filename);
@@ -714,7 +714,7 @@ test_get_file_image(const char *test_banner, const int file_name_num, hid_t fapl
/* setup the file name */
h5_fixname(FILENAME2[file_name_num], fapl, file_name, sizeof(file_name));
- VERIFY(HDstrlen(file_name) > 0, "h5_fixname failed");
+ VERIFY(strlen(file_name) > 0, "h5_fixname failed");
fcpl = H5Pcreate(H5P_FILE_CREATE);
VERIFY(fcpl >= 0, "H5Pcreate");
@@ -783,7 +783,7 @@ test_get_file_image(const char *test_banner, const int file_name_num, hid_t fapl
file_size = 0;
do {
- HDsnprintf(member_file_name, (size_t)1024, file_name, i);
+ snprintf(member_file_name, (size_t)1024, file_name, i);
/* get the size of the member file */
result = HDstat(member_file_name, &stat_buf);
@@ -811,7 +811,7 @@ test_get_file_image(const char *test_banner, const int file_name_num, hid_t fapl
while (size_remaining > 0) {
/* construct the member file name */
- HDsnprintf(member_file_name, 1024, file_name, i);
+ snprintf(member_file_name, 1024, file_name, i);
/* open the test file using standard I/O calls */
fd = HDopen(member_file_name, O_RDONLY);
@@ -994,7 +994,7 @@ test_get_file_image_error_rejection(void)
/* setup the file name */
h5_fixname(FILENAME2[6], fapl_id, file_name, sizeof(file_name));
- VERIFY(HDstrlen(file_name) > 0, "h5_fixname failed");
+ VERIFY(strlen(file_name) > 0, "h5_fixname failed");
/* create the file */
file_id = H5Fcreate(file_name, 0, H5P_DEFAULT, fapl_id);
@@ -1126,7 +1126,7 @@ test_get_file_image_error_rejection(void)
/* setup the file name */
h5_fixname(FILENAME2[4], fapl_id, file_name, sizeof(file_name));
- VERIFY(HDstrlen(file_name) > 0, "h5_fixname failed");
+ VERIFY(strlen(file_name) > 0, "h5_fixname failed");
/* create the file */
file_id = H5Fcreate(file_name, 0, H5P_DEFAULT, fapl_id);
@@ -1188,7 +1188,7 @@ test_get_file_image_error_rejection(void)
/* setup the file name */
h5_fixname(FILENAME2[5], fapl_id, file_name, sizeof(file_name));
- VERIFY(HDstrlen(file_name) > 0, "h5_fixname failed");
+ VERIFY(strlen(file_name) > 0, "h5_fixname failed");
/* create the file */
file_id = H5Fcreate(file_name, 0, H5P_DEFAULT, fapl_id);
@@ -1248,7 +1248,7 @@ test_get_file_image_error_rejection(void)
VERIFY(err >= 0, "H5Pset_fapl_family failed");
h5_fixname(FILENAME2[3], fapl_id, file_name, sizeof(file_name));
- VERIFY(HDstrlen(file_name) > 0, "h5_fixname failed");
+ VERIFY(strlen(file_name) > 0, "h5_fixname failed");
/* create the file */
file_id = H5Fcreate(file_name, 0, H5P_DEFAULT, fapl_id);
diff --git a/test/filenotclosed.c b/test/filenotclosed.c
index 48758af..a838a89 100644
--- a/test/filenotclosed.c
+++ b/test/filenotclosed.c
@@ -72,10 +72,10 @@ main(void)
* Further investigation is needed to resolve the test failure with the
* split/multi driver. Please see HDFFV-10160.
*/
- contig_addr_vfd = (bool)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
if (!contig_addr_vfd) {
SKIPPED();
- HDputs(" Temporary skipped for a spilt/multi driver");
+ puts(" Temporary skipped for a spilt/multi driver");
exit(EXIT_SUCCESS);
}
@@ -135,6 +135,6 @@ main(void)
exit(EXIT_SUCCESS);
error:
- HDputs("*** TEST FAILED ***");
+ puts("*** TEST FAILED ***");
exit(EXIT_FAILURE);
}
diff --git a/test/fillval.c b/test/fillval.c
index 555a4ed..2e8cb47 100644
--- a/test/fillval.c
+++ b/test/fillval.c
@@ -190,7 +190,7 @@ test_getset(void)
H5E_END_TRY
if (fill_i != 0) {
H5_FAILED();
- HDputs(" H5Pget_fill_value() should return default 0");
+ puts(" H5Pget_fill_value() should return default 0");
goto error;
}
@@ -209,8 +209,8 @@ test_getset(void)
goto error;
if (fill_ss.v1 != fill_ss_rd.v1 || fill_ss.v2 != fill_ss_rd.v2) {
H5_FAILED();
- HDputs(" Failed to get fill value using same data type that was ");
- HDputs(" used to set the fill value.");
+ puts(" Failed to get fill value using same data type that was ");
+ puts(" used to set the fill value.");
goto error;
}
@@ -221,8 +221,8 @@ test_getset(void)
goto error;
if (fill_ss.v1 != fill_si.v1 || fill_ss.v2 != fill_si.v2) {
H5_FAILED();
- HDputs(" Failed to get fill value using a data type other than what");
- HDputs(" was used to set the fill value.");
+ puts(" Failed to get fill value using a data type other than what");
+ puts(" was used to set the fill value.");
goto error;
}
@@ -235,7 +235,7 @@ test_getset(void)
goto error;
if (fill_si.v1 != fill_ss.v1 || fill_si.v2 != fill_ss.v2) {
H5_FAILED();
- HDputs(" Resetting the fill value was unsuccessful.");
+ puts(" Resetting the fill value was unsuccessful.");
goto error;
}
@@ -305,7 +305,7 @@ test_getset_vl(hid_t fapl)
TEST_ERROR;
/* Verify that the fill value is the original value */
- if (HDstrcmp(f2, orig_fill_value) != 0)
+ if (strcmp(f2, orig_fill_value) != 0)
TEST_ERROR;
/* Release the fill value retrieved */
@@ -347,7 +347,7 @@ test_getset_vl(hid_t fapl)
TEST_ERROR;
/* Verify that the fill value is the original value */
- if (HDstrcmp(f2, orig_fill_value) != 0)
+ if (strcmp(f2, orig_fill_value) != 0)
TEST_ERROR;
/* Release the fill value retrieved */
@@ -663,12 +663,12 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
goto error;
if (alloc_time != H5D_ALLOC_TIME_LATE) {
H5_FAILED();
- HDputs(" Got non-H5D_ALLOC_TIME_LATE space allocation time.");
+ puts(" Got non-H5D_ALLOC_TIME_LATE space allocation time.");
printf(" Got %d\n", alloc_time);
}
if (fill_time != H5D_FILL_TIME_ALLOC) {
H5_FAILED();
- HDputs(" Got non-H5D_FILL_TIME_ALLOC fill value write time.");
+ puts(" Got non-H5D_FILL_TIME_ALLOC fill value write time.");
printf(" Got %d\n", fill_time);
}
if (H5Dclose(dset3) < 0)
@@ -683,7 +683,7 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
goto error;
if (layout == H5D_CONTIGUOUS && allocation != H5D_SPACE_STATUS_NOT_ALLOCATED) {
H5_FAILED();
- HDputs(" Got allocated space instead of unallocated.");
+ puts(" Got allocated space instead of unallocated.");
printf(" Got %d\n", allocation);
goto error;
}
@@ -695,12 +695,12 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
goto error;
if (alloc_time != H5D_ALLOC_TIME_LATE) {
H5_FAILED();
- HDputs(" Got non-H5D_ALLOC_TIME_LATE space allocation time.");
+ puts(" Got non-H5D_ALLOC_TIME_LATE space allocation time.");
printf(" Got %d\n", alloc_time);
}
if (fill_time != H5D_FILL_TIME_NEVER) {
H5_FAILED();
- HDputs(" Got non-H5D_FILL_TIME_NEVER fill value write time.");
+ puts(" Got non-H5D_FILL_TIME_NEVER fill value write time.");
printf(" Got %d\n", fill_time);
}
if (H5Dclose(dset4) < 0)
@@ -718,7 +718,7 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
if (!H5_FLT_ABS_EQUAL(rd_c.a, 0) || !H5_DBL_ABS_EQUAL(rd_c.y, fill_ctype.y) || rd_c.x != 0 ||
rd_c.z != '\0') {
H5_FAILED();
- HDputs(" Got wrong fill value");
+ puts(" Got wrong fill value");
printf(" Got rd_c.a=%f, rd_c.y=%f and rd_c.x=%d, rd_c.z=%c\n", (double)rd_c.a, rd_c.y, rd_c.x,
rd_c.z);
}
@@ -747,14 +747,14 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
goto error;
if (alloc_time != H5D_ALLOC_TIME_EARLY) {
H5_FAILED();
- HDputs(" Got non-H5D_ALLOC_TIME_EARLY space allocation time.");
+ puts(" Got non-H5D_ALLOC_TIME_EARLY space allocation time.");
printf(" Got %d\n", alloc_time);
}
if (H5Pget_fill_time(dcpl, &fill_time) < 0)
goto error;
if (fill_time != H5D_FILL_TIME_NEVER) {
H5_FAILED();
- HDputs(" Got non-H5D_FILL_TIME_NEVER fill value write time.");
+ puts(" Got non-H5D_FILL_TIME_NEVER fill value write time.");
printf(" Got %d\n", fill_time);
}
if (H5Dclose(dset5) < 0)
@@ -787,14 +787,14 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
goto error;
if (alloc_time != H5D_ALLOC_TIME_EARLY) {
H5_FAILED();
- HDputs(" Got non-H5D_ALLOC_TIME_EARLY space allocation time.");
+ puts(" Got non-H5D_ALLOC_TIME_EARLY space allocation time.");
printf(" Got %d\n", alloc_time);
}
if (H5Pget_fill_time(dcpl, &fill_time) < 0)
goto error;
if (fill_time != H5D_FILL_TIME_ALLOC) {
H5_FAILED();
- HDputs(" Got non-H5D_FILL_TIME_ALLOC fill value write time.");
+ puts(" Got non-H5D_FILL_TIME_ALLOC fill value write time.");
printf(" Got %d\n", fill_time);
}
if (H5Dclose(dset6) < 0)
@@ -812,7 +812,7 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
if (!H5_FLT_ABS_EQUAL(rd_c.a, 0) || !H5_DBL_ABS_EQUAL(rd_c.y, fill_ctype.y) || rd_c.x != 0 ||
rd_c.z != '\0') {
H5_FAILED();
- HDputs(" Got wrong fill value");
+ puts(" Got wrong fill value");
printf(" Got rd_c.a=%f, rd_c.y=%f and rd_c.x=%d, rd_c.z=%c\n", (double)rd_c.a, rd_c.y, rd_c.x,
rd_c.z);
}
@@ -901,7 +901,7 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, H5D_f
fill_c.z = ((comp_datatype *)_fillval)->z;
}
else {
- HDputs("Invalid type for test");
+ puts("Invalid type for test");
goto error;
}
@@ -1482,8 +1482,8 @@ test_extend_init_cmpd_vl(void *_buf, size_t nelmts, const void *_val)
*buf = *val;
/* Deep copy string fields */
- buf->a = HDstrdup(val->a);
- buf->b = HDstrdup(val->b);
+ buf->a = strdup(val->a);
+ buf->b = strdup(val->b);
buf++;
nelmts--;
@@ -1511,8 +1511,8 @@ test_extend_verify_cmpd_vl(unsigned lineno, const hsize_t *offset, const void *_
(const comp_vl_datatype *)_compare_val; /* Value to compare against */
/* Verify value */
- if ((test_val->x != compare_val->x) || HDstrcmp(test_val->a, compare_val->a) != 0 ||
- HDstrcmp(test_val->b, compare_val->b) != 0 || (test_val->y != compare_val->y)) {
+ if ((test_val->x != compare_val->x) || strcmp(test_val->a, compare_val->a) != 0 ||
+ strcmp(test_val->b, compare_val->b) != 0 || (test_val->y != compare_val->y)) {
fprintf(stdout, "%u: Value read was not expected.\n", lineno);
fprintf(stdout,
" Elmt = {%" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
@@ -1587,8 +1587,8 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, const hsize_t
unsigned i, j; /* Local index variables */
/* Set vl datatype init value strings */
- init_val_c.a = HDstrdup("baz");
- init_val_c.b = HDstrdup("mumble");
+ init_val_c.a = strdup("baz");
+ init_val_c.b = strdup("mumble");
/* Make copy of dataset creation property list */
if ((dcpl = H5Pcopy(_dcpl)) < 0)
@@ -2052,8 +2052,8 @@ test_extend(hid_t fapl, const char *base_name, H5D_layout_t layout)
TESTING("contiguous dataset extend");
/* Set vl datatype fill value strings */
- fillval_c.a = HDstrdup("foo");
- fillval_c.b = HDstrdup("bar");
+ fillval_c.a = strdup("foo");
+ fillval_c.b = strdup("bar");
/* Create dataset creation property list */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
@@ -2112,7 +2112,7 @@ test_extend(hid_t fapl, const char *base_name, H5D_layout_t layout)
*/
if (H5D_CONTIGUOUS == layout) {
SKIPPED();
- HDputs(" Not implemented yet -- needs H5S_SELECT_DIFF operator");
+ puts(" Not implemented yet -- needs H5S_SELECT_DIFF operator");
goto skip;
}
#endif
@@ -2226,7 +2226,7 @@ test_compatible(void)
goto error;
if (dims[0] != 8 || dims[1] != 8) {
H5_FAILED();
- HDputs(" Got a different dimension size than what was set.");
+ puts(" Got a different dimension size than what was set.");
printf(" Got dims[0]=%ld, dims[1]=%ld, set 8x8\n", (long)dims[0], (long)dims[1]);
goto error;
}
@@ -2238,7 +2238,7 @@ test_compatible(void)
goto error;
if (val_rd != 0) {
H5_FAILED();
- HDputs(" Got a different value than what was set.");
+ puts(" Got a different value than what was set.");
printf(" Got %ld, set 0\n", (long)val_rd);
goto error;
}
@@ -2279,7 +2279,7 @@ test_compatible(void)
goto error;
if (dims[0] != 8 || dims[1] != 8) {
H5_FAILED();
- HDputs(" Got a different dimension size than what was set.");
+ puts(" Got a different dimension size than what was set.");
printf(" Got dims[0]=%ld, dims[1]=%ld, set 8x8\n", (long)dims[0], (long)dims[1]);
goto error;
}
@@ -2291,7 +2291,7 @@ test_compatible(void)
goto error;
if (val_rd != fill_val) {
H5_FAILED();
- HDputs(" Got a different value than what was set.");
+ puts(" Got a different value than what was set.");
printf(" Got %ld, set %ld\n", (long)val_rd, (long)fill_val);
goto error;
}
@@ -2613,11 +2613,11 @@ main(int argc, char *argv[])
if (argc >= 2) {
test_contig = test_chunk = test_compact = 0;
for (argno = 1; argno < argc; argno++) {
- if (!HDstrcmp(argv[argno], "contiguous"))
+ if (!strcmp(argv[argno], "contiguous"))
test_contig = 1;
- else if (!HDstrcmp(argv[argno], "chunked"))
+ else if (!strcmp(argv[argno], "chunked"))
test_chunk = 1;
- else if (!HDstrcmp(argv[argno], "compact"))
+ else if (!strcmp(argv[argno], "compact"))
test_compact = 1;
else {
fprintf(stderr, "usage: %s [contiguous] [chunked] [compact]\n", argv[0]);
@@ -2650,11 +2650,11 @@ main(int argc, char *argv[])
/* Set the FAPL for the type of format */
if (new_format) {
- HDputs("\nTesting with new file format:");
+ puts("\nTesting with new file format:");
my_fapl = fapl2;
} /* end if */
else {
- HDputs("Testing with old file format:");
+ puts("Testing with old file format:");
my_fapl = fapl;
} /* end else */
@@ -2692,7 +2692,7 @@ main(int argc, char *argv[])
if (nerrors)
goto error;
- HDputs("All fill value tests passed.");
+ puts("All fill value tests passed.");
if (h5_cleanup(FILENAME, fapl))
HDremove(FILE_NAME_RAW);
@@ -2700,6 +2700,6 @@ main(int argc, char *argv[])
exit(EXIT_SUCCESS);
error:
- HDputs("***** FILL VALUE TESTS FAILED *****");
+ puts("***** FILL VALUE TESTS FAILED *****");
exit(EXIT_FAILURE);
}
diff --git a/test/filter_fail.c b/test/filter_fail.c
index feecf48..1029617 100644
--- a/test/filter_fail.c
+++ b/test/filter_fail.c
@@ -159,7 +159,7 @@ test_filter_write(char *file_name, hid_t my_fapl, bool cache_enabled)
H5E_END_TRY
if (ret >= 0) {
H5_FAILED();
- HDputs(" Data writing is supposed to fail because the chunk can't be written to file.");
+ puts(" Data writing is supposed to fail because the chunk can't be written to file.");
TEST_ERROR;
}
}
@@ -180,7 +180,7 @@ test_filter_write(char *file_name, hid_t my_fapl, bool cache_enabled)
H5E_END_TRY
if (ret >= 0) {
H5_FAILED();
- HDputs(" Dataset is supposed to fail because the chunk can't be flushed to file.");
+ puts(" Dataset is supposed to fail because the chunk can't be flushed to file.");
TEST_ERROR;
}
}
diff --git a/test/filter_plugin.c b/test/filter_plugin.c
index 779db78..1571bf2 100644
--- a/test/filter_plugin.c
+++ b/test/filter_plugin.c
@@ -374,13 +374,13 @@ ensure_filter_works(hid_t fid, const char *name, hid_t dcpl_id)
/* Save the data written to the file for later comparison when the file
* is reopened for read test.
*/
- if (!HDstrcmp(name, DSET_DEFLATE_NAME))
+ if (!strcmp(name, DSET_DEFLATE_NAME))
save_array = &orig_deflate_g;
- else if (!HDstrcmp(name, DSET_FILTER1_NAME))
+ else if (!strcmp(name, DSET_FILTER1_NAME))
save_array = &orig_dynlib1_g;
- else if (!HDstrcmp(name, DSET_FILTER2_NAME))
+ else if (!strcmp(name, DSET_FILTER2_NAME))
save_array = &orig_dynlib2_g;
- else if (!HDstrcmp(name, DSET_FILTER3_NAME))
+ else if (!strcmp(name, DSET_FILTER3_NAME))
save_array = &orig_dynlib4_g;
else
TEST_ERROR;
@@ -448,7 +448,7 @@ test_dataset_write_with_filters(hid_t fid)
* STEP 1: Test deflation by itself.
*----------------------------------------------------------
*/
- HDputs("Testing dataset writes with deflate filter");
+ puts("Testing dataset writes with deflate filter");
#ifdef H5_HAVE_FILTER_DEFLATE
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
TEST_ERROR;
@@ -467,14 +467,14 @@ test_dataset_write_with_filters(hid_t fid)
TEST_ERROR;
#else /* H5_HAVE_FILTER_DEFLATE */
SKIPPED();
- HDputs(" Deflate filter not enabled");
+ puts(" Deflate filter not enabled");
#endif /* H5_HAVE_FILTER_DEFLATE */
/*----------------------------------------------------------
* STEP 2: Test filter plugin 1 by itself.
*----------------------------------------------------------
*/
- HDputs(" dataset writes with filter plugin 1");
+ puts(" dataset writes with filter plugin 1");
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
TEST_ERROR;
if (H5Pset_chunk(dcpl_id, 2, chunk_sizes_g) < 0)
@@ -506,7 +506,7 @@ test_dataset_write_with_filters(hid_t fid)
* STEP 3: Test filter plugin 2 by itself.
*----------------------------------------------------------
*/
- HDputs(" dataset writes with filter plugin 2");
+ puts(" dataset writes with filter plugin 2");
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
TEST_ERROR;
if (H5Pset_chunk(dcpl_id, 2, chunk_sizes_g) < 0)
@@ -534,7 +534,7 @@ test_dataset_write_with_filters(hid_t fid)
* (This filter plugin makes HDF5 API calls)
*----------------------------------------------------------
*/
- HDputs(" dataset writes with filter plugin 3");
+ puts(" dataset writes with filter plugin 3");
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
TEST_ERROR;
if (H5Pset_chunk(dcpl_id, 2, chunk_sizes_g) < 0)
@@ -656,7 +656,7 @@ test_dataset_read_with_filters(hid_t fid)
#else /* H5_HAVE_FILTER_DEFLATE */
SKIPPED();
- HDputs(" Deflate filter not enabled");
+ puts(" Deflate filter not enabled");
#endif /* H5_HAVE_FILTER_DEFLATE */
/*----------------------------------------------------------
@@ -849,8 +849,8 @@ test_creating_groups_using_plugins(hid_t fid)
for (i = 0; i < N_SUBGROUPS; i++) {
char *sp = subgroup_name;
- sp += HDsnprintf(subgroup_name, sizeof(subgroup_name), SUBGROUP_PREFIX);
- HDsprintf(sp, "%d", i);
+ sp += snprintf(subgroup_name, sizeof(subgroup_name), SUBGROUP_PREFIX);
+ sprintf(sp, "%d", i);
if ((sub_gid = H5Gcreate2(gid, subgroup_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
@@ -908,8 +908,8 @@ test_opening_groups_using_plugins(hid_t fid)
for (i = 0; i < N_SUBGROUPS; i++) {
char *sp = subgroup_name;
- sp += HDsnprintf(subgroup_name, sizeof(subgroup_name), SUBGROUP_PREFIX);
- HDsprintf(sp, "%d", i);
+ sp += snprintf(subgroup_name, sizeof(subgroup_name), SUBGROUP_PREFIX);
+ sprintf(sp, "%d", i);
if ((sub_gid = H5Gopen2(gid, subgroup_name, H5P_DEFAULT)) < 0)
TEST_ERROR;
@@ -958,7 +958,7 @@ test_path_api_calls(void)
char path[256];
char temp_name[256];
- HDputs("Testing access to the filter path table");
+ puts("Testing access to the filter path table");
if (H5Zfilter_avail(FILTER1_ID) != true)
TEST_ERROR;
@@ -1017,7 +1017,7 @@ test_path_api_calls(void)
/* Add a bunch of paths to the path table */
for (u = 0; u < n_starting_paths; u++) {
- HDsnprintf(path, sizeof(path), "a_path_%u", u);
+ snprintf(path, sizeof(path), "a_path_%u", u);
if (H5PLappend(path) < 0) {
fprintf(stderr, " at %u: %s\n", u, path);
TEST_ERROR;
@@ -1063,7 +1063,7 @@ test_path_api_calls(void)
fprintf(stderr, " get 0 len: %zd : %s\n", path_len, path);
TEST_ERROR;
}
- if (HDstrcmp(path, "a_path_0") != 0) {
+ if (strcmp(path, "a_path_0") != 0) {
fprintf(stderr, " get 0: %s\n", path);
TEST_ERROR;
}
@@ -1075,7 +1075,7 @@ test_path_api_calls(void)
/* Get path at index 1 */
if ((path_len = H5PLget(1, path, 256)) <= 0)
TEST_ERROR;
- if (HDstrcmp(path, "a_path_1") != 0) {
+ if (strcmp(path, "a_path_1") != 0) {
fprintf(stderr, " get 1: %s\n", path);
TEST_ERROR;
}
@@ -1083,8 +1083,8 @@ test_path_api_calls(void)
/* Get path at the last index */
if ((path_len = H5PLget(n_starting_paths - 1, path, 256)) <= 0)
TEST_ERROR;
- HDsnprintf(temp_name, sizeof(temp_name), "a_path_%u", n_starting_paths - 1);
- if (HDstrcmp(path, temp_name) != 0) {
+ snprintf(temp_name, sizeof(temp_name), "a_path_%u", n_starting_paths - 1);
+ if (strcmp(path, temp_name) != 0) {
fprintf(stderr, " get %u: %s\n", n_starting_paths - 1, path);
TEST_ERROR;
}
@@ -1121,7 +1121,7 @@ test_path_api_calls(void)
/* Verify that the entries were moved */
if ((path_len = H5PLget(8, path, 256)) <= 0)
TEST_ERROR;
- if (HDstrcmp(path, "a_path_9") != 0) {
+ if (strcmp(path, "a_path_9") != 0) {
fprintf(stderr, " get 8: %s\n", path);
TEST_ERROR;
}
@@ -1137,7 +1137,7 @@ test_path_api_calls(void)
TESTING(" prepend");
/* Prepend one path */
- HDsnprintf(path, sizeof(path), "a_path_%d", n_starting_paths + 1);
+ snprintf(path, sizeof(path), "a_path_%d", n_starting_paths + 1);
if (H5PLprepend(path) < 0) {
fprintf(stderr, " prepend %u: %s\n", n_starting_paths + 1, path);
TEST_ERROR;
@@ -1152,7 +1152,7 @@ test_path_api_calls(void)
/* Verify that the entries were moved */
if (H5PLget(8, path, 256) <= 0)
TEST_ERROR;
- if (HDstrcmp(path, "a_path_7") != 0) {
+ if (strcmp(path, "a_path_7") != 0) {
fprintf(stderr, " get 8: %s\n", path);
TEST_ERROR;
}
@@ -1160,8 +1160,8 @@ test_path_api_calls(void)
/* Verify that the path was inserted at index zero */
if (H5PLget(0, path, 256) <= 0)
TEST_ERROR;
- HDsnprintf(temp_name, sizeof(temp_name), "a_path_%d", n_starting_paths + 1);
- if (HDstrcmp(path, temp_name) != 0) {
+ snprintf(temp_name, sizeof(temp_name), "a_path_%d", n_starting_paths + 1);
+ if (strcmp(path, temp_name) != 0) {
fprintf(stderr, " get 0: %s\n", path);
TEST_ERROR;
}
@@ -1175,7 +1175,7 @@ test_path_api_calls(void)
TESTING(" replace");
/* Replace one path at index 1 */
- HDsnprintf(path, sizeof(path), "a_path_%u", n_starting_paths + 4);
+ snprintf(path, sizeof(path), "a_path_%u", n_starting_paths + 4);
if (H5PLreplace(path, 1) < 0) {
fprintf(stderr, " replace 1: %s\n", path);
TEST_ERROR;
@@ -1194,8 +1194,8 @@ test_path_api_calls(void)
/* Check path at index 0 */
if (H5PLget(0, path, 256) <= 0)
TEST_ERROR;
- HDsnprintf(temp_name, sizeof(temp_name), "a_path_%u", n_starting_paths + 1);
- if (HDstrcmp(path, temp_name) != 0) {
+ snprintf(temp_name, sizeof(temp_name), "a_path_%u", n_starting_paths + 1);
+ if (strcmp(path, temp_name) != 0) {
fprintf(stderr, " get 0: %s\n", path);
TEST_ERROR;
}
@@ -1203,7 +1203,7 @@ test_path_api_calls(void)
/* Check path at index 2 */
if (H5PLget(2, path, 256) <= 0)
TEST_ERROR;
- if (HDstrcmp(path, "a_path_1") != 0) {
+ if (strcmp(path, "a_path_1") != 0) {
fprintf(stderr, " get 2: %s\n", path);
TEST_ERROR;
}
@@ -1227,7 +1227,7 @@ test_path_api_calls(void)
/* Verify that the entries were moved */
if (H5PLget(4, path, 256) <= 0)
TEST_ERROR;
- if (HDstrcmp(path, "a_path_4") != 0) {
+ if (strcmp(path, "a_path_4") != 0) {
fprintf(stderr, " get 4: %s\n", path);
TEST_ERROR;
}
@@ -1242,7 +1242,7 @@ test_path_api_calls(void)
TESTING(" insert");
/* Insert one path at index 3*/
- HDsnprintf(path, sizeof(path), "a_path_%d", n_starting_paths + 5);
+ snprintf(path, sizeof(path), "a_path_%d", n_starting_paths + 5);
if (H5PLinsert(path, 3) < 0) {
fprintf(stderr, " insert 3: %s\n", path);
TEST_ERROR;
@@ -1251,7 +1251,7 @@ test_path_api_calls(void)
/* Verify that the entries were moved */
if (H5PLget(4, path, 256) <= 0)
TEST_ERROR;
- if (HDstrcmp(path, "a_path_2") != 0) {
+ if (strcmp(path, "a_path_2") != 0) {
fprintf(stderr, " get 4: %s\n", path);
TEST_ERROR;
}
@@ -1315,7 +1315,7 @@ test_filter_numbers(void)
unsigned int flags;
unsigned int filter_config;
- HDputs("Testing filter number handling");
+ puts("Testing filter number handling");
/* Check that out-of-range filter numbers are handled correctly */
TESTING(" Filter # out of range");
@@ -1462,7 +1462,7 @@ main(void)
/* Set the FAPL for the type of format */
if (new_format) {
- HDputs("\nTesting with new file format:");
+ puts("\nTesting with new file format:");
/* Copy the file access property list and set the latest file format on it */
if ((new_ff_fapl_id = H5Pcopy(old_ff_fapl_id)) < 0)
TEST_ERROR;
@@ -1472,7 +1472,7 @@ main(void)
my_fapl_id = new_ff_fapl_id;
}
else {
- HDputs("Testing with old file format:");
+ puts("Testing with old file format:");
my_fapl_id = old_ff_fapl_id;
}
@@ -1504,7 +1504,7 @@ main(void)
/* ENSURE THAT READING FROM DATASETS AND OPENING GROUPS WORKS */
/*******************************************************************/
- HDputs("\nTesting reading data with with dynamic plugin filters:");
+ puts("\nTesting reading data with with dynamic plugin filters:");
/* Close the library so that all loaded plugin libraries are unloaded */
h5_reset();
diff --git a/test/flush1.c b/test/flush1.c
index c1ae676..4adddab 100644
--- a/test/flush1.c
+++ b/test/flush1.c
@@ -74,7 +74,7 @@ create_file(const char *filename, hid_t fapl_id, bool swmr)
if ((top_gid = H5Gcreate2(fid, "top_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
STACK_ERROR;
for (i = 0; i < NGROUPS; i++) {
- HDsnprintf(group_name, sizeof(group_name), "group%02d", i);
+ snprintf(group_name, sizeof(group_name), "group%02d", i);
if ((gid = H5Gcreate2(top_gid, group_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
STACK_ERROR;
if (H5Gclose(gid) < 0)
diff --git a/test/flush2.c b/test/flush2.c
index 21534fe..c807612 100644
--- a/test/flush2.c
+++ b/test/flush2.c
@@ -134,7 +134,7 @@ file_ok(const char *filename, hid_t fapl_id, bool check_second_dset)
if ((top_gid = H5Gopen2(fid, "top_group", H5P_DEFAULT)) < 0)
goto error;
for (i = 0; i < NGROUPS; i++) {
- HDsnprintf(group_name, sizeof(group_name), "group%02d", i);
+ snprintf(group_name, sizeof(group_name), "group%02d", i);
if ((gid = H5Gopen2(top_gid, group_name, H5P_DEFAULT)) < 0)
goto error;
if (H5Gclose(gid) < 0)
@@ -288,7 +288,7 @@ main(void)
if (file_ok(filename, fapl_id, check_second_dset)) {
#if defined H5_HAVE_WIN32_API && !defined(hdf5_EXPORTS)
SKIPPED();
- HDputs(" the DLL will flush the file even when calling _exit, skip this test temporarily");
+ puts(" the DLL will flush the file even when calling _exit, skip this test temporarily");
#else
TEST_ERROR;
#endif
@@ -315,7 +315,7 @@ main(void)
if (file_ok(filename, fapl_id, check_second_dset)) {
#if defined H5_HAVE_WIN32_API && !defined(hdf5_EXPORTS)
SKIPPED();
- HDputs(" the DLL will flush the file even when calling _exit, skip this test temporarily");
+ puts(" the DLL will flush the file even when calling _exit, skip this test temporarily");
#else
TEST_ERROR;
#endif
@@ -374,7 +374,7 @@ main(void)
if (file_ok(filename, fapl_id, check_second_dset)) {
#if defined H5_HAVE_WIN32_API && !defined(hdf5_EXPORTS)
SKIPPED();
- HDputs(" the DLL will flush the file even when calling _exit, skip this test temporarily");
+ puts(" the DLL will flush the file even when calling _exit, skip this test temporarily");
#else
TEST_ERROR;
#endif
@@ -403,7 +403,7 @@ main(void)
if (file_ok(filename, fapl_id, check_second_dset)) {
#if defined H5_HAVE_WIN32_API && !defined(hdf5_EXPORTS)
SKIPPED();
- HDputs(" the DLL will flush the file even when calling _exit, skip this test temporarily");
+ puts(" the DLL will flush the file even when calling _exit, skip this test temporarily");
#else
TEST_ERROR;
#endif
diff --git a/test/flushrefresh.c b/test/flushrefresh.c
index bec2cd1..ce94026 100644
--- a/test/flushrefresh.c
+++ b/test/flushrefresh.c
@@ -1068,13 +1068,13 @@ flush_verification(const char *obj_pathname, const char *expected)
H5E_END_TRY
/* Compare to expected result */
- if (HDstrcmp(expected, FLUSHED) == 0) {
+ if (strcmp(expected, FLUSHED) == 0) {
if ((oid < 0) || (status < 0)) {
fprintf(stderr, "Error! %s should be on disk, but was NOT!\n", obj_pathname);
PROCESS_ERROR;
} /* end if */
}
- else if (HDstrcmp(expected, NOT_FLUSHED) == 0) {
+ else if (strcmp(expected, NOT_FLUSHED) == 0) {
if ((oid > 0) || (status > 0)) {
fprintf(stderr, "Error! %s not expected to be flushed, but it was found on disk!\n",
obj_pathname);
@@ -1265,20 +1265,20 @@ refresh_verification(const char *obj_pathname)
* test cases is easy). */
do {
- if ((HDstrcmp(obj_pathname, D1) == 0) || (HDstrcmp(obj_pathname, D2) == 0)) {
+ if ((strcmp(obj_pathname, D1) == 0) || (strcmp(obj_pathname, D2) == 0)) {
if (H5Drefresh(oid) < 0)
PROCESS_ERROR;
} /* end if */
- else if ((HDstrcmp(obj_pathname, G1) == 0) || (HDstrcmp(obj_pathname, G2) == 0)) {
+ else if ((strcmp(obj_pathname, G1) == 0) || (strcmp(obj_pathname, G2) == 0)) {
if (H5Grefresh(oid) < 0)
PROCESS_ERROR;
} /* end if */
- else if ((HDstrcmp(obj_pathname, T1) == 0) || (HDstrcmp(obj_pathname, T2) == 0)) {
+ else if ((strcmp(obj_pathname, T1) == 0) || (strcmp(obj_pathname, T2) == 0)) {
if (H5Trefresh(oid) < 0)
PROCESS_ERROR;
} /* end if */
- else if ((HDstrcmp(obj_pathname, D3) == 0) || (HDstrcmp(obj_pathname, G3) == 0) ||
- (HDstrcmp(obj_pathname, T3) == 0)) {
+ else if ((strcmp(obj_pathname, D3) == 0) || (strcmp(obj_pathname, G3) == 0) ||
+ (strcmp(obj_pathname, T3) == 0)) {
if (H5Orefresh(oid) < 0)
PROCESS_ERROR;
} /* end if */
diff --git a/test/freespace.c b/test/freespace.c
index 67b4ffc..b278d2a 100644
--- a/test/freespace.c
+++ b/test/freespace.c
@@ -2910,7 +2910,7 @@ main(void)
if (nerrors)
goto error;
- HDputs("All free-space tests passed.");
+ puts("All free-space tests passed.");
/* Pop API context */
if (api_ctx_pushed && H5CX_pop(false) < 0)
@@ -2921,7 +2921,7 @@ main(void)
exit(EXIT_SUCCESS);
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
H5E_BEGIN_TRY
{
H5Pclose(fapl);
diff --git a/test/gen_bad_ohdr.c b/test/gen_bad_ohdr.c
index d81ba8b..a464867 100644
--- a/test/gen_bad_ohdr.c
+++ b/test/gen_bad_ohdr.c
@@ -109,7 +109,7 @@ error:
}
H5E_END_TRY
#else /* H5O_ENABLE_BAD_MESG_COUNT */
- HDputs("H5O_BAD_MESG_COUNT compiler macro not defined!");
+ puts("H5O_BAD_MESG_COUNT compiler macro not defined!");
#endif /* H5O_ENABLE_BAD_MESG_COUNT */
return 1;
}
diff --git a/test/gen_bogus.c b/test/gen_bogus.c
index c8f335d..67fc630 100644
--- a/test/gen_bogus.c
+++ b/test/gen_bogus.c
@@ -176,7 +176,7 @@ error:
}
H5E_END_TRY
#else /* H5O_ENABLE_BOGUS */
- HDputs("H5O_ENABLE_BOGUS compiler macro not defined!");
+ puts("H5O_ENABLE_BOGUS compiler macro not defined!");
#endif /* H5O_ENABLE_BOGUS */
return 1;
}
diff --git a/test/gen_cross.c b/test/gen_cross.c
index f7a9710..77e321e 100644
--- a/test/gen_cross.c
+++ b/test/gen_cross.c
@@ -879,7 +879,7 @@ create_deflate_dsets_float(hid_t fid, hid_t fsid, hid_t msid)
#else /* H5_HAVE_FILTER_DEFLATE */
const char *not_supported = "Deflate filter is not enabled. Can't create the dataset.";
- HDputs(not_supported);
+ puts(not_supported);
#endif /* H5_HAVE_FILTER_DEFLATE */
return 0;
@@ -1263,7 +1263,7 @@ main(void)
if (create_szip_dsets_float(file, filespace, memspace) < 0)
TEST_ERROR;
#else /* H5_HAVE_FILTER_SZIP */
- HDputs("Szip filter is not enabled. Can't create the dataset.");
+ puts("Szip filter is not enabled. Can't create the dataset.");
#endif /* H5_HAVE_FILTER_SZIP */
/* Create a dataset of FLOAT with shuffle filter */
diff --git a/test/gen_plist.c b/test/gen_plist.c
index a15b424..ba16a4f 100644
--- a/test/gen_plist.c
+++ b/test/gen_plist.c
@@ -455,8 +455,8 @@ encode_plist(hid_t plist_id, int little_endian, int word_length, const char *fil
char filename[1024];
/* Generate filename */
- if ((ret = HDsnprintf(filename, sizeof(filename), "%s%d%s", filename_prefix, word_length,
- little_endian ? "le" : "be")) < 0)
+ if ((ret = snprintf(filename, sizeof(filename), "%s%d%s", filename_prefix, word_length,
+ little_endian ? "le" : "be")) < 0)
assert(ret > 0);
/* first call to encode returns only the size of the buffer needed */
diff --git a/test/genall5.c b/test/genall5.c
index 0365259..67e76d1 100644
--- a/test/genall5.c
+++ b/test/genall5.c
@@ -294,7 +294,7 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
while ((pass) && (u < nlinks)) {
char linkname[16];
- HDsnprintf(linkname, sizeof(linkname), "%u", u);
+ snprintf(linkname, sizeof(linkname), "%u", u);
if (0 == (u % 3)) {
ret = H5Lcreate_soft(group_name, gid, linkname, H5P_DEFAULT, H5P_DEFAULT);
@@ -459,7 +459,7 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
char linkname[16];
htri_t link_exists;
- HDsnprintf(linkname, sizeof(linkname), "%u", u);
+ snprintf(linkname, sizeof(linkname), "%u", u);
link_exists = H5Lexists(gid, linkname, H5P_DEFAULT);
if (link_exists < 0) {
@@ -499,12 +499,12 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
pass = false;
failure_mssg = "vrfy_ns_grp_c: H5L_TYPE_SOFT != lnk_info.type";
}
- else if ((HDstrlen(group_name) + 1) != lnk_info.u.val_size) {
+ else if ((strlen(group_name) + 1) != lnk_info.u.val_size) {
pass = false;
- failure_mssg = "vrfy_ns_grp_c: (HDstrlen(group_name) + 1) != lnk_info.u.val_size";
+ failure_mssg = "vrfy_ns_grp_c: (strlen(group_name) + 1) != lnk_info.u.val_size";
}
assert(H5L_TYPE_SOFT == lnk_info.type);
- assert((HDstrlen(group_name) + 1) == lnk_info.u.val_size);
+ assert((strlen(group_name) + 1) == lnk_info.u.val_size);
slinkval = (char *)malloc(lnk_info.u.val_size);
@@ -519,12 +519,12 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
pass = false;
failure_mssg = "vrfy_ns_grp_c: H5Lget_val() failed";
}
- else if (0 != HDstrcmp(slinkval, group_name)) {
+ else if (0 != strcmp(slinkval, group_name)) {
pass = false;
- failure_mssg = "vrfy_ns_grp_c: 0 != HDstrcmp(slinkval, group_name)";
+ failure_mssg = "vrfy_ns_grp_c: 0 != strcmp(slinkval, group_name)";
}
assert(ret >= 0);
- assert(0 == HDstrcmp(slinkval, group_name));
+ assert(0 == strcmp(slinkval, group_name));
free(slinkval);
} /* end if */
@@ -592,17 +592,17 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks)
pass = false;
failure_mssg = "vrfy_ns_grp_c: H5Lunpack_elink_val() failed.";
}
- else if (0 != HDstrcmp(file, "external.h5")) {
+ else if (0 != strcmp(file, "external.h5")) {
pass = false;
- failure_mssg = "vrfy_ns_grp_c: 0 != HDstrcmp(file, \"external.h5\")";
+ failure_mssg = "vrfy_ns_grp_c: 0 != strcmp(file, \"external.h5\")";
}
- else if (0 != HDstrcmp(path, "/ext")) {
+ else if (0 != strcmp(path, "/ext")) {
pass = false;
- failure_mssg = "vrfy_ns_grp_c: 0 != HDstrcmp(path, \"/ext\")";
+ failure_mssg = "vrfy_ns_grp_c: 0 != strcmp(path, \"/ext\")";
}
assert(ret >= 0);
- assert(0 == HDstrcmp(file, "external.h5"));
- assert(0 == HDstrcmp(path, "/ext"));
+ assert(0 == strcmp(file, "external.h5"));
+ assert(0 == strcmp(path, "/ext"));
free(elinkval);
} /* end else */
@@ -697,7 +697,7 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
while ((pass) && (u < nlinks)) {
char linkname[16];
- HDsnprintf(linkname, sizeof(linkname), "%u", u);
+ snprintf(linkname, sizeof(linkname), "%u", u);
if (0 == (u % 3)) {
ret = H5Lcreate_soft(group_name, gid, linkname, H5P_DEFAULT, H5P_DEFAULT);
@@ -862,7 +862,7 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
char linkname[16];
htri_t link_exists;
- HDsnprintf(linkname, sizeof(linkname), "%u", u);
+ snprintf(linkname, sizeof(linkname), "%u", u);
link_exists = H5Lexists(gid, linkname, H5P_DEFAULT);
if (link_exists < 0) {
@@ -902,12 +902,12 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
pass = false;
failure_mssg = "vrfy_ns_grp_d: H5L_TYPE_SOFT != lnk_info.type";
}
- else if ((HDstrlen(group_name) + 1) != lnk_info.u.val_size) {
+ else if ((strlen(group_name) + 1) != lnk_info.u.val_size) {
pass = false;
failure_mssg = "vrfy_ns_grp_d: H5L_TYPE_SOFT != lnk_info.type";
}
assert(H5L_TYPE_SOFT == lnk_info.type);
- assert((HDstrlen(group_name) + 1) == lnk_info.u.val_size);
+ assert((strlen(group_name) + 1) == lnk_info.u.val_size);
slinkval = (char *)malloc(lnk_info.u.val_size);
@@ -922,12 +922,12 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
pass = false;
failure_mssg = "vrfy_ns_grp_d: H5Lget_val() failed";
}
- else if (0 != HDstrcmp(slinkval, group_name)) {
+ else if (0 != strcmp(slinkval, group_name)) {
pass = false;
- failure_mssg = "vrfy_ns_grp_d: 0 != HDstrcmp(slinkval, group_name)";
+ failure_mssg = "vrfy_ns_grp_d: 0 != strcmp(slinkval, group_name)";
}
assert(ret >= 0);
- assert(0 == HDstrcmp(slinkval, group_name));
+ assert(0 == strcmp(slinkval, group_name));
free(slinkval);
} /* end if */
@@ -994,17 +994,17 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks)
pass = false;
failure_mssg = "vrfy_ns_grp_d: H5Lunpack_elink_val failed.";
}
- else if (0 != HDstrcmp(file, "external.h5")) {
+ else if (0 != strcmp(file, "external.h5")) {
pass = false;
- failure_mssg = "vrfy_ns_grp_d: 0 != HDstrcmp(file, \"external.h5\").";
+ failure_mssg = "vrfy_ns_grp_d: 0 != strcmp(file, \"external.h5\").";
}
- else if (0 != HDstrcmp(path, "/ext")) {
+ else if (0 != strcmp(path, "/ext")) {
pass = false;
- failure_mssg = "vrfy_ns_grp_d: 0 != HDstrcmp(path, \"/ext\")";
+ failure_mssg = "vrfy_ns_grp_d: 0 != strcmp(path, \"/ext\")";
}
assert(ret >= 0);
- assert(0 == HDstrcmp(file, "external.h5"));
- assert(0 == HDstrcmp(path, "/ext"));
+ assert(0 == strcmp(file, "external.h5"));
+ assert(0 == strcmp(path, "/ext"));
free(elinkval);
} /* end else */
@@ -1291,7 +1291,7 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
while ((pass) && (u < nlinks)) {
char linkname[32];
- HDsnprintf(linkname, sizeof(linkname), "ln%d_%u", proc_num, u);
+ snprintf(linkname, sizeof(linkname), "ln%d_%u", proc_num, u);
if (0 == (u % 2)) {
ret = H5Lcreate_soft(group_name, gid, linkname, H5P_DEFAULT, H5P_DEFAULT);
@@ -1446,7 +1446,7 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
char linkname[32];
htri_t link_exists;
- HDsnprintf(linkname, sizeof(linkname), "ln%d_%u", proc_num, u);
+ snprintf(linkname, sizeof(linkname), "ln%d_%u", proc_num, u);
link_exists = H5Lexists(gid, linkname, H5P_DEFAULT);
if (link_exists < 0) {
@@ -1481,12 +1481,12 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
pass = false;
failure_mssg = "vrfy_os_grp_n: H5L_TYPE_SOFT != lnk_info.type";
}
- else if ((HDstrlen(group_name) + 1) != lnk_info.u.val_size) {
+ else if ((strlen(group_name) + 1) != lnk_info.u.val_size) {
pass = false;
- failure_mssg = "vrfy_os_grp_n: (HDstrlen(group_name) + 1) != lnk_info.u.val_size";
+ failure_mssg = "vrfy_os_grp_n: (strlen(group_name) + 1) != lnk_info.u.val_size";
}
assert(H5L_TYPE_SOFT == lnk_info.type);
- assert((HDstrlen(group_name) + 1) == lnk_info.u.val_size);
+ assert((strlen(group_name) + 1) == lnk_info.u.val_size);
slinkval = (char *)malloc(lnk_info.u.val_size);
@@ -1502,12 +1502,12 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
pass = false;
failure_mssg = "vrfy_os_grp_n: H5Lget_val() failed";
}
- else if (0 != HDstrcmp(slinkval, group_name)) {
+ else if (0 != strcmp(slinkval, group_name)) {
pass = false;
- failure_mssg = "vrfy_os_grp_n: 0 != HDstrcmp(slinkval, group_name)";
+ failure_mssg = "vrfy_os_grp_n: 0 != strcmp(slinkval, group_name)";
}
assert(ret >= 0);
- assert(0 == HDstrcmp(slinkval, group_name));
+ assert(0 == strcmp(slinkval, group_name));
free(slinkval);
} /* end if */
@@ -2996,27 +2996,27 @@ create_zoo(hid_t fid, const char *base_path, int proc_num)
/* Add & verify an empty "new style" group */
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/A", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/A", base_path);
+ assert(strlen(full_path) < 1024);
ns_grp_0(fid, full_path);
}
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/A", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/A", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_ns_grp_0(fid, full_path);
}
/* Add & verify a compact "new style" group (3 link messages) */
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/B", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/B", base_path);
+ assert(strlen(full_path) < 1024);
ns_grp_c(fid, full_path, 3);
}
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/B", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/B", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_ns_grp_c(fid, full_path, 3);
}
@@ -3024,27 +3024,27 @@ create_zoo(hid_t fid, const char *base_path, int proc_num)
* fractal heap)
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/C", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/C", base_path);
+ assert(strlen(full_path) < 1024);
ns_grp_d(fid, full_path, 300);
}
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/C", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/C", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_ns_grp_d(fid, full_path, 300);
}
/* Add & verify an empty "old style" group to file */
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/D", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/D", base_path);
+ assert(strlen(full_path) < 1024);
os_grp_0(fid, full_path);
}
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/D", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/D", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_os_grp_0(fid, full_path);
}
@@ -3052,14 +3052,14 @@ create_zoo(hid_t fid, const char *base_path, int proc_num)
* local heap) to file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/E", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/E", base_path);
+ assert(strlen(full_path) < 1024);
os_grp_n(fid, full_path, proc_num, 300);
}
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/E", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/E", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_os_grp_n(fid, full_path, proc_num, 300);
}
@@ -3067,14 +3067,14 @@ create_zoo(hid_t fid, const char *base_path, int proc_num)
* to file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/F", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/F", base_path);
+ assert(strlen(full_path) < 1024);
ds_ctg_i(fid, full_path, false);
}
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/F", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/F", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_ds_ctg_i(fid, full_path, false);
}
@@ -3082,14 +3082,14 @@ create_zoo(hid_t fid, const char *base_path, int proc_num)
* to file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/G", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/G", base_path);
+ assert(strlen(full_path) < 1024);
ds_ctg_i(fid, full_path, true);
}
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/G", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/G", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_ds_ctg_i(fid, full_path, true);
}
@@ -3097,14 +3097,14 @@ create_zoo(hid_t fid, const char *base_path, int proc_num)
* to file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/H", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/H", base_path);
+ assert(strlen(full_path) < 1024);
ds_chk_i(fid, full_path, false);
}
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/H", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/H", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_ds_chk_i(fid, full_path, false);
}
@@ -3112,14 +3112,14 @@ create_zoo(hid_t fid, const char *base_path, int proc_num)
* to file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/I", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/I", base_path);
+ assert(strlen(full_path) < 1024);
ds_chk_i(fid, full_path, true);
}
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/I", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/I", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_ds_chk_i(fid, full_path, true);
}
@@ -3127,14 +3127,14 @@ create_zoo(hid_t fid, const char *base_path, int proc_num)
* to file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/J", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/J", base_path);
+ assert(strlen(full_path) < 1024);
ds_cpt_i(fid, full_path, false);
}
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/J", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/J", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_ds_cpt_i(fid, full_path, false);
}
@@ -3142,14 +3142,14 @@ create_zoo(hid_t fid, const char *base_path, int proc_num)
* to file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/K", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/K", base_path);
+ assert(strlen(full_path) < 1024);
ds_cpt_i(fid, full_path, true);
}
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/K", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/K", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_ds_cpt_i(fid, full_path, true);
}
@@ -3157,14 +3157,14 @@ create_zoo(hid_t fid, const char *base_path, int proc_num)
* (but no data) to file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/L", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/L", base_path);
+ assert(strlen(full_path) < 1024);
ds_ctg_v(fid, full_path, false);
}
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/L", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/L", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_ds_ctg_v(fid, full_path, false);
}
@@ -3172,14 +3172,14 @@ create_zoo(hid_t fid, const char *base_path, int proc_num)
* (and data) to file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/M", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/M", base_path);
+ assert(strlen(full_path) < 1024);
ds_ctg_v(fid, full_path, true);
}
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/M", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/M", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_ds_ctg_v(fid, full_path, true);
}
@@ -3218,15 +3218,15 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num)
/* validate an empty "new style" group */
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/A", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/A", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_ns_grp_0(fid, full_path);
}
/* validate a compact "new style" group (3 link messages) */
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/B", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/B", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_ns_grp_c(fid, full_path, 3);
}
@@ -3234,15 +3234,15 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num)
* fractal heap)
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/C", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/C", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_ns_grp_d(fid, full_path, 300);
}
/* validate an empty "old style" group in file */
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/D", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/D", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_os_grp_0(fid, full_path);
}
@@ -3250,8 +3250,8 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num)
* local heap)
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/E", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/E", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_os_grp_n(fid, full_path, proc_num, 300);
}
@@ -3259,8 +3259,8 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num)
* in file.
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/F", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/F", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_ds_ctg_i(fid, full_path, false);
}
@@ -3268,8 +3268,8 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num)
* in file.
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/G", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/G", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_ds_ctg_i(fid, full_path, true);
}
@@ -3277,8 +3277,8 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num)
* in file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/H", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/H", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_ds_chk_i(fid, full_path, false);
}
@@ -3286,8 +3286,8 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num)
* in file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/I", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/I", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_ds_chk_i(fid, full_path, true);
}
@@ -3295,8 +3295,8 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num)
* in file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/J", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/J", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_ds_cpt_i(fid, full_path, false);
}
@@ -3304,8 +3304,8 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num)
* in file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/K", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/K", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_ds_cpt_i(fid, full_path, true);
}
@@ -3313,8 +3313,8 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num)
* (but no data) to file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/L", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/L", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_ds_ctg_v(fid, full_path, false);
}
@@ -3322,8 +3322,8 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num)
* (and data) to file
*/
if (pass) {
- HDsnprintf(full_path, sizeof(full_path), "%s/M", base_path);
- assert(HDstrlen(full_path) < 1024);
+ snprintf(full_path, sizeof(full_path), "%s/M", base_path);
+ assert(strlen(full_path) < 1024);
vrfy_ds_ctg_v(fid, full_path, true);
}
diff --git a/test/getname.c b/test/getname.c
index 644596a..6802ae3 100644
--- a/test/getname.c
+++ b/test/getname.c
@@ -64,15 +64,15 @@ check_name(hid_t id, const char *chk_name, const char *chk_user_path)
TEST_ERROR;
/* Check on name from H5Iget_name() */
- if (HDstrcmp(name, chk_name) != 0)
+ if (strcmp(name, chk_name) != 0)
goto error;
/* Check on user path */
- if (HDstrcmp(user_path, chk_user_path) != 0)
+ if (strcmp(user_path, chk_user_path) != 0)
goto error;
/* Check that if user path is hidden, the name from H5Iget_name() and the user path should be different */
- if (user_path_hidden && !HDstrcmp(chk_name, chk_user_path))
+ if (user_path_hidden && !strcmp(chk_name, chk_user_path))
TEST_ERROR;
/* Everything matches */
@@ -1435,7 +1435,7 @@ test_main(hid_t file_id, hid_t fapl)
/* Check that name is longer */
if (name_len <= SMALL_NAME_BUF_SIZE)
TEST_ERROR;
- if (HDstrcmp(name2, "/") != 0)
+ if (strcmp(name2, "/") != 0)
TEST_ERROR;
}
@@ -1477,7 +1477,7 @@ test_main(hid_t file_id, hid_t fapl)
TEST_ERROR;
/* Verify */
- if (HDstrcmp(name3, "/g17") != 0)
+ if (strcmp(name3, "/g17") != 0)
TEST_ERROR;
*name3 = '\0';
@@ -1487,7 +1487,7 @@ test_main(hid_t file_id, hid_t fapl)
TEST_ERROR;
/* Verify */
- if (HDstrcmp(name3, "/g") != 0)
+ if (strcmp(name3, "/g") != 0)
TEST_ERROR;
free(name3);
@@ -3306,7 +3306,7 @@ test_obj_ref(hid_t fapl)
namelen = H5Iget_name(dataset2, (char *)buf, sizeof(buf));
if (H5Dclose(dataset2) < 0)
FAIL_STACK_ERROR;
- if (!((HDstrcmp(buf, "/Dataset3") == 0) && (namelen == 9)))
+ if (!((strcmp(buf, "/Dataset3") == 0) && (namelen == 9)))
TEST_ERROR;
*buf = '\0';
@@ -3320,7 +3320,7 @@ test_obj_ref(hid_t fapl)
TEST_ERROR;
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[0], (char *)buf, sizeof(buf));
- if (!((HDstrcmp(buf, "/Dataset3") == 0) && (namelen == 9)))
+ if (!((strcmp(buf, "/Dataset3") == 0) && (namelen == 9)))
TEST_ERROR;
PASSED();
@@ -3332,11 +3332,11 @@ test_obj_ref(hid_t fapl)
namelen = H5Iget_name(dataset2, (char *)buf, sizeof(buf));
if (H5Dclose(dataset2) < 0)
FAIL_STACK_ERROR;
- if (!((HDstrcmp(buf, "/Group1/Dataset2") == 0) && (namelen == 16)))
+ if (!((strcmp(buf, "/Group1/Dataset2") == 0) && (namelen == 16)))
TEST_ERROR;
*buf = '\0';
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[1], (char *)buf, sizeof(buf));
- if (!((HDstrcmp(buf, "/Group1/Dataset2") == 0) && (namelen == 16)))
+ if (!((strcmp(buf, "/Group1/Dataset2") == 0) && (namelen == 16)))
TEST_ERROR;
PASSED();
@@ -3348,11 +3348,11 @@ test_obj_ref(hid_t fapl)
namelen = H5Iget_name(group, (char *)buf, sizeof(buf));
if (H5Gclose(group) < 0)
FAIL_STACK_ERROR;
- if (!((HDstrcmp(buf, "/Group1") == 0) && (namelen == 7)))
+ if (!((strcmp(buf, "/Group1") == 0) && (namelen == 7)))
TEST_ERROR;
*buf = '\0';
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[2], (char *)buf, sizeof(buf));
- if (!((HDstrcmp(buf, "/Group1") == 0) && (namelen == 7)))
+ if (!((strcmp(buf, "/Group1") == 0) && (namelen == 7)))
TEST_ERROR;
PASSED();
@@ -3364,11 +3364,11 @@ test_obj_ref(hid_t fapl)
namelen = H5Iget_name(tid1, (char *)buf, sizeof(buf));
if (H5Tclose(tid1) < 0)
FAIL_STACK_ERROR;
- if (!((HDstrcmp(buf, "/Group1/Datatype1") == 0) && (namelen == 17)))
+ if (!((strcmp(buf, "/Group1/Datatype1") == 0) && (namelen == 17)))
TEST_ERROR;
*buf = '\0';
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[3], (char *)buf, sizeof(buf));
- if (!((HDstrcmp(buf, "/Group1/Datatype1") == 0) && (namelen == 17)))
+ if (!((strcmp(buf, "/Group1/Datatype1") == 0) && (namelen == 17)))
TEST_ERROR;
PASSED();
@@ -3380,11 +3380,11 @@ test_obj_ref(hid_t fapl)
namelen = H5Iget_name(dataset2, (char *)buf, sizeof(buf));
if (H5Dclose(dataset2) < 0)
FAIL_STACK_ERROR;
- if (!((HDstrcmp(buf, "/Group1/Group2/Dataset4") == 0) && (namelen == 23)))
+ if (!((strcmp(buf, "/Group1/Group2/Dataset4") == 0) && (namelen == 23)))
TEST_ERROR;
*buf = '\0';
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[4], (char *)buf, sizeof(buf));
- if (!((HDstrcmp(buf, "/Group1/Group2/Dataset4") == 0) && (namelen == 23)))
+ if (!((strcmp(buf, "/Group1/Group2/Dataset4") == 0) && (namelen == 23)))
TEST_ERROR;
PASSED();
@@ -3396,11 +3396,11 @@ test_obj_ref(hid_t fapl)
namelen = H5Iget_name(group, (char *)buf, sizeof(buf));
if (H5Gclose(group) < 0)
FAIL_STACK_ERROR;
- if (!((HDstrcmp(buf, "/Group1/Group2") == 0) && (namelen == 14)))
+ if (!((strcmp(buf, "/Group1/Group2") == 0) && (namelen == 14)))
TEST_ERROR;
*buf = '\0';
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[5], (char *)buf, sizeof(buf));
- if (!((HDstrcmp(buf, "/Group1/Group2") == 0) && (namelen == 14)))
+ if (!((strcmp(buf, "/Group1/Group2") == 0) && (namelen == 14)))
TEST_ERROR;
PASSED();
@@ -3412,11 +3412,11 @@ test_obj_ref(hid_t fapl)
namelen = H5Iget_name(dataset2, (char *)buf, sizeof(buf));
if (H5Dclose(dataset2) < 0)
FAIL_STACK_ERROR;
- if (!((HDstrcmp(buf, "/Group1/Dataset5") == 0) && (namelen == 16)))
+ if (!((strcmp(buf, "/Group1/Dataset5") == 0) && (namelen == 16)))
TEST_ERROR;
*buf = '\0';
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[6], (char *)buf, sizeof(buf));
- if (!((HDstrcmp(buf, "/Group1/Dataset5") == 0) && (namelen == 16)))
+ if (!((strcmp(buf, "/Group1/Dataset5") == 0) && (namelen == 16)))
TEST_ERROR;
PASSED();
@@ -3428,11 +3428,11 @@ test_obj_ref(hid_t fapl)
namelen = H5Iget_name(group, (char *)buf, sizeof(buf));
if (H5Gclose(group) < 0)
FAIL_STACK_ERROR;
- if (!((HDstrcmp(buf, "/") == 0) && (namelen == 1)))
+ if (!((strcmp(buf, "/") == 0) && (namelen == 1)))
TEST_ERROR;
*buf = '\0';
namelen = H5Rget_name(dataset, H5R_OBJECT, &wbuf[7], (char *)buf, sizeof(buf));
- if (!((HDstrcmp(buf, "/") == 0) && (namelen == 1)))
+ if (!((strcmp(buf, "/") == 0) && (namelen == 1)))
TEST_ERROR;
PASSED();
@@ -3600,7 +3600,7 @@ test_reg_ref(hid_t fapl)
TEST_ERROR;
name_size1 = H5Rget_name(dsetr_id, H5R_DATASET_REGION, &ref_out[0], (char *)buf1, NAME_BUF_SIZE);
- if (!((HDstrcmp(buf1, "/MATRIX") == 0) && (name_size1 == 7)))
+ if (!((strcmp(buf1, "/MATRIX") == 0) && (name_size1 == 7)))
TEST_ERROR;
PASSED();
@@ -3612,7 +3612,7 @@ test_reg_ref(hid_t fapl)
/* Get name of the dataset the first region reference points using H5Iget_name */
*buf2 = '\0';
name_size2 = H5Iget_name(dsetv_id, (char *)buf2, NAME_BUF_SIZE);
- if (!((HDstrcmp(buf2, "/MATRIX") == 0) && (name_size2 == 7)))
+ if (!((strcmp(buf2, "/MATRIX") == 0) && (name_size2 == 7)))
TEST_ERROR;
if (H5Dclose(dsetv_id) < 0)
@@ -3624,7 +3624,7 @@ test_reg_ref(hid_t fapl)
TESTING("H5Rget_name to get name from region reference(pnt selec)");
*buf1 = '\0';
name_size1 = H5Rget_name(dsetr_id, H5R_DATASET_REGION, &ref_out[1], (char *)buf1, NAME_BUF_SIZE);
- if (!((HDstrcmp(buf1, "/MATRIX") == 0) && (name_size1 == 7)))
+ if (!((strcmp(buf1, "/MATRIX") == 0) && (name_size1 == 7)))
TEST_ERROR;
PASSED();
@@ -3637,7 +3637,7 @@ test_reg_ref(hid_t fapl)
/* Get name of the dataset the first region reference points using H5Iget_name */
*buf2 = '\0';
name_size2 = H5Iget_name(dsetv_id, (char *)buf2, NAME_BUF_SIZE);
- if (!((HDstrcmp(buf2, "/MATRIX") == 0) && (name_size2 == 7)))
+ if (!((strcmp(buf2, "/MATRIX") == 0) && (name_size2 == 7)))
TEST_ERROR;
if (H5Dclose(dsetv_id) < 0)
@@ -3713,7 +3713,7 @@ test_elinks(hid_t fapl)
*name = '\0';
name_cached = false;
namelen = H5I__get_name_test(group, (char *)name, sizeof(name), &name_cached);
- if (!((HDstrcmp(name, "/Group2") == 0) && (namelen == 7) && name_cached))
+ if (!((strcmp(name, "/Group2") == 0) && (namelen == 7) && name_cached))
TEST_ERROR;
/* Close Group */
@@ -3728,7 +3728,7 @@ test_elinks(hid_t fapl)
*name = '\0';
name_cached = false;
namelen = H5I__get_name_test(group, (char *)name, sizeof(name), &name_cached);
- if (!((HDstrcmp(name, "/Group2") == 0) && (namelen == 7) && name_cached))
+ if (!((strcmp(name, "/Group2") == 0) && (namelen == 7) && name_cached))
TEST_ERROR;
/* Close Group */
@@ -3788,7 +3788,7 @@ main(void)
if (nerrors)
goto error;
- HDputs("All getname tests passed.");
+ puts("All getname tests passed.");
h5_cleanup(FILENAME, fapl);
@@ -3801,7 +3801,7 @@ error:
}
H5E_END_TRY
- HDputs("***** GET NAME TESTS FAILED *****");
+ puts("***** GET NAME TESTS FAILED *****");
return 1;
}
diff --git a/test/gheap.c b/test/gheap.c
index 00012e6..782c80c 100644
--- a/test/gheap.c
+++ b/test/gheap.c
@@ -38,9 +38,9 @@
nerrors++; \
if (nerrors <= GHEAP_REPEATED_ERR_LIM) { \
H5_FAILED(); \
- HDputs(MSG); \
+ puts(MSG); \
if (nerrors == GHEAP_REPEATED_ERR_LIM) \
- HDputs(" Suppressing further errors..."); \
+ puts(" Suppressing further errors..."); \
} /* end if */ \
} while (0) /* end GHEAP_REPEATED_ERR */
@@ -84,7 +84,7 @@ test_1(hid_t fapl)
goto error;
if (NULL == (f = (H5F_t *)H5VL_object(file))) {
H5_FAILED();
- HDputs(" Unable to create file");
+ puts(" Unable to create file");
goto error;
}
@@ -100,12 +100,12 @@ test_1(hid_t fapl)
status = H5HG_insert(f, size, out, obj + u);
if (status < 0) {
H5_FAILED();
- HDputs(" Unable to insert object into global heap");
+ puts(" Unable to insert object into global heap");
nerrors++;
}
else if (u && H5_addr_gt(obj[u - 1].addr, obj[u].addr)) {
H5_FAILED();
- HDputs(" Collection addresses are not monotonically increasing");
+ puts(" Collection addresses are not monotonically increasing");
nerrors++;
}
}
@@ -119,12 +119,12 @@ test_1(hid_t fapl)
H5Eclear2(H5E_DEFAULT);
if (NULL == H5HG_read(f, obj + u, in, NULL)) {
H5_FAILED();
- HDputs(" Unable to read object");
+ puts(" Unable to read object");
nerrors++;
}
else if (memcmp(in, out, size) != 0) {
H5_FAILED();
- HDputs(" Value read doesn't match value written");
+ puts(" Value read doesn't match value written");
nerrors++;
}
}
@@ -189,7 +189,7 @@ test_2(hid_t fapl)
goto error;
if (NULL == (f = (H5F_t *)H5VL_object(file))) {
H5_FAILED();
- HDputs(" Unable to create file");
+ puts(" Unable to create file");
goto error;
}
@@ -202,7 +202,7 @@ test_2(hid_t fapl)
H5Eclear2(H5E_DEFAULT);
if (H5HG_insert(f, size, out, obj + u) < 0) {
H5_FAILED();
- HDputs(" Unable to insert object into global heap");
+ puts(" Unable to insert object into global heap");
nerrors++;
}
}
@@ -216,12 +216,12 @@ test_2(hid_t fapl)
H5Eclear2(H5E_DEFAULT);
if (NULL == H5HG_read(f, obj + u, in, NULL)) {
H5_FAILED();
- HDputs(" Unable to read object");
+ puts(" Unable to read object");
nerrors++;
}
else if (memcmp(in, out, size) != 0) {
H5_FAILED();
- HDputs(" Value read doesn't match value written");
+ puts(" Value read doesn't match value written");
nerrors++;
}
}
@@ -286,7 +286,7 @@ test_3(hid_t fapl)
goto error;
if (NULL == (f = (H5F_t *)H5VL_object(file))) {
H5_FAILED();
- HDputs(" Unable to create file");
+ puts(" Unable to create file");
goto error;
}
@@ -298,7 +298,7 @@ test_3(hid_t fapl)
status = H5HG_insert(f, size, out, obj + u);
if (status < 0) {
H5_FAILED();
- HDputs(" Unable to insert object into global heap");
+ puts(" Unable to insert object into global heap");
nerrors++;
}
}
@@ -308,7 +308,7 @@ test_3(hid_t fapl)
status = H5HG_remove(f, obj + u);
if (status < 0) {
H5_FAILED();
- HDputs(" Unable to remove object");
+ puts(" Unable to remove object");
nerrors++;
}
}
@@ -374,7 +374,7 @@ test_4(hid_t fapl)
goto error;
if (NULL == (f = (H5F_t *)H5VL_object(file))) {
H5_FAILED();
- HDputs(" Unable to create file");
+ puts(" Unable to create file");
goto error;
}
@@ -386,7 +386,7 @@ test_4(hid_t fapl)
status = H5HG_insert(f, size, out, obj + u);
if (status < 0) {
H5_FAILED();
- HDputs(" Unable to insert object into global heap");
+ puts(" Unable to insert object into global heap");
nerrors++;
}
@@ -399,7 +399,7 @@ test_4(hid_t fapl)
status = H5HG_remove(f, obj + u - 1);
if (status < 0) {
H5_FAILED();
- HDputs(" Unable to remove object");
+ puts(" Unable to remove object");
nerrors++;
}
memset(obj + u - 1, 0, sizeof *obj);
@@ -465,7 +465,7 @@ test_ooo_indices(hid_t fapl)
goto error;
if (NULL == (f = (H5F_t *)H5VL_object(file))) {
H5_FAILED();
- HDputs(" Unable to create file");
+ puts(" Unable to create file");
goto error;
}
@@ -509,7 +509,7 @@ test_ooo_indices(hid_t fapl)
goto error;
if (NULL == (f = (H5F_t *)H5VL_object(file))) {
H5_FAILED();
- HDputs(" Unable to open file");
+ puts(" Unable to open file");
goto error;
} /* end if */
@@ -519,7 +519,7 @@ test_ooo_indices(hid_t fapl)
goto error;
if (i != j) {
H5_FAILED();
- HDputs(" Incorrect read value");
+ puts(" Incorrect read value");
goto error;
}
}
@@ -582,7 +582,7 @@ main(void)
if (nerrors)
goto error;
- HDputs("All global heap tests passed.");
+ puts("All global heap tests passed.");
/* Pop API context */
if (api_ctx_pushed && H5CX_pop(false) < 0)
@@ -602,6 +602,6 @@ error:
if (api_ctx_pushed)
H5CX_pop(false);
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
exit(EXIT_FAILURE);
} /* end main() */
diff --git a/test/h5test.c b/test/h5test.c
index 50d5de6..21585f7 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -494,7 +494,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
if (!driver_env_var)
driver_env_var = HDF5_DRIVER;
#endif
- if (driver_env_var && !HDstrcmp(driver_env_var, "split")) {
+ if (driver_env_var && !strcmp(driver_env_var, "split")) {
/* split VFD */
if (subst_for_superblock)
suffix = ".h5.meta";
@@ -588,7 +588,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
/* This is a parallel system */
char *subdir;
- if (!HDstrcmp(prefix, HDF5_PARAPREFIX)) {
+ if (!strcmp(prefix, HDF5_PARAPREFIX)) {
/*
* If the prefix specifies the HDF5_PARAPREFIX directory, then
* default to using the "/tmp/$USER" or "/tmp/$LOGIN"
@@ -613,11 +613,11 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
if (!fullname[0]) {
/* We didn't append the prefix yet */
- HDstrncpy(fullname, prefix, size);
+ strncpy(fullname, prefix, size);
fullname[size - 1] = '\0';
}
- if (HDstrlen(fullname) + HDstrlen(base_name) + 1 < size) {
+ if (strlen(fullname) + strlen(base_name) + 1 < size) {
/*
* Append the base_name with a slash first. Multiple
* slashes are handled below.
@@ -632,10 +632,10 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
* subdirectory. Default to PREFIX's original
* prefix value.
*/
- HDstrcpy(fullname, prefix);
+ strcpy(fullname, prefix);
- HDstrcat(fullname, "/");
- HDstrcat(fullname, base_name);
+ strcat(fullname, "/");
+ strcat(fullname, base_name);
}
else {
/* Buffer is too small */
@@ -643,25 +643,25 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu
}
}
else {
- if (HDsnprintf(fullname, size, "%s/%s", prefix, base_name) == (int)size)
+ if (snprintf(fullname, size, "%s/%s", prefix, base_name) == (int)size)
/* Buffer is too small */
return NULL;
}
}
- else if (HDstrlen(base_name) >= size) {
+ else if (strlen(base_name) >= size) {
/* Buffer is too small */
return NULL;
}
else {
- HDstrcpy(fullname, base_name);
+ strcpy(fullname, base_name);
}
/* Append a suffix */
if (suffix) {
- if (HDstrlen(fullname) + HDstrlen(suffix) >= size)
+ if (strlen(fullname) + strlen(suffix) >= size)
return NULL;
- HDstrcat(fullname, suffix);
+ strcat(fullname, suffix);
}
/* Remove any double slashes in the filename */
@@ -695,7 +695,7 @@ h5_rmprefix(const char *filename)
{
const char *ret_ptr;
- if ((ret_ptr = HDstrstr(filename, ":")) == NULL)
+ if ((ret_ptr = strstr(filename, ":")) == NULL)
ret_ptr = filename;
else
ret_ptr++;
@@ -804,12 +804,12 @@ h5_get_libver_fapl(hid_t fapl)
* If it's nothing (environment variable was whitespace)
* just return the default fapl.
*/
- HDstrncpy(buf, env, sizeof(buf));
+ strncpy(buf, env, sizeof(buf));
buf[sizeof(buf) - 1] = '\0';
if (NULL == (tok = HDstrtok_r(buf, " \t\n\r", &lasts)))
goto done;
- if (!HDstrcmp(tok, "latest")) {
+ if (!strcmp(tok, "latest")) {
/* use the latest format */
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
goto error;
@@ -928,7 +928,7 @@ h5_set_info_object(void)
if ((envp = HDgetenv("HDF5_MPI_INFO")) != NULL) {
char *next, *valp;
- valp = envp = next = HDstrdup(envp);
+ valp = envp = next = strdup(envp);
if (!valp)
return 0;
@@ -945,7 +945,7 @@ h5_set_info_object(void)
valp++;
/* copy key/value pair into temporary buffer */
- len = HDstrcspn(valp, ";");
+ len = strcspn(valp, ";");
next = &valp[len];
if (NULL == (key_val = (char *)calloc(1, len + 1)))
return -1;
@@ -954,7 +954,7 @@ h5_set_info_object(void)
if (*next == ';')
++next;
- namep = HDstrncpy(key_val, valp, len);
+ namep = strncpy(key_val, valp, len);
/* pass up any beginning whitespaces */
while (*namep && (*namep == ' ' || *namep == '\t'))
@@ -964,13 +964,13 @@ h5_set_info_object(void)
continue; /* was all white space, so move to next k/v pair */
/* eat up any ending white spaces */
- endp = &namep[HDstrlen(namep) - 1];
+ endp = &namep[strlen(namep) - 1];
while (endp && (*endp == ' ' || *endp == '\t'))
*endp-- = '\0';
/* find the '=' */
- valp = HDstrchr(namep, '=');
+ valp = strchr(namep, '=');
if (valp != NULL) { /* it's a valid key/value pairing */
char *tmp_val = valp + 1;
@@ -1089,17 +1089,17 @@ h5_get_file_size(const char *filename, hid_t fapl)
char *driver_env_var = NULL;
driver_env_var = HDgetenv(HDF5_DRIVER);
- if (driver_env_var && !HDstrcmp(driver_env_var, "split")) {
+ if (driver_env_var && !strcmp(driver_env_var, "split")) {
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) {
if (mt != H5FD_MEM_DRAW && mt != H5FD_MEM_SUPER)
continue;
/* Create the filename to query */
if (mt == H5FD_MEM_DRAW) {
- HDsnprintf(temp, sizeof temp, "%s.raw", filename);
+ snprintf(temp, sizeof temp, "%s.raw", filename);
}
else {
- HDsnprintf(temp, sizeof temp, "%s.meta", filename);
+ snprintf(temp, sizeof temp, "%s.meta", filename);
}
/* Check for existence of file */
@@ -1114,10 +1114,10 @@ h5_get_file_size(const char *filename, hid_t fapl)
} /* end for */
}
else {
- assert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES);
+ assert(strlen(multi_letters) == H5FD_MEM_NTYPES);
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) {
/* Create the filename to query */
- HDsnprintf(temp, sizeof temp, "%s-%c.h5", filename, multi_letters[mt]);
+ snprintf(temp, sizeof temp, "%s-%c.h5", filename, multi_letters[mt]);
/* Check for existence of file */
if (0 == HDaccess(temp, F_OK)) {
@@ -1159,7 +1159,7 @@ h5_get_file_size(const char *filename, hid_t fapl)
/* Try all filenames possible, until we find one that's missing */
for (j = 0; /*void*/; j++) {
/* Create the filename to query */
- HDsnprintf(temp, sizeof temp, filename, j);
+ snprintf(temp, sizeof temp, filename, j);
/* Check for existence of file */
if (HDaccess(temp, F_OK) < 0)
@@ -1216,7 +1216,7 @@ print_func(const char *format, ...)
int ret_value;
va_start(arglist, format);
- ret_value = HDvprintf(format, arglist);
+ ret_value = vprintf(format, arglist);
va_end(arglist);
return ret_value;
}
@@ -1304,7 +1304,7 @@ getenv_all(MPI_Comm comm, int root, const char *name)
if (mpi_rank == root) {
env = HDgetenv(name);
if (env) {
- len = (int)HDstrlen(env);
+ len = (int)strlen(env);
MPI_Bcast(&len, 1, MPI_INT, root, comm);
MPI_Bcast(env, len, MPI_CHAR, root, comm);
}
@@ -1319,7 +1319,7 @@ getenv_all(MPI_Comm comm, int root, const char *name)
if (len >= 0) {
if (env == NULL)
env = (char *)malloc((size_t)len + 1);
- else if (HDstrlen(env) < (size_t)len)
+ else if (strlen(env) < (size_t)len)
env = (char *)realloc(env, (size_t)len + 1);
MPI_Bcast(env, len, MPI_CHAR, root, comm);
@@ -1894,9 +1894,9 @@ H5_get_srcdir_filename(const char *filename)
/* Build path to test file. We're checking the length so suppress
* the gcc format-truncation warning.
*/
- if ((HDstrlen(srcdir) + HDstrlen(filename) + 1) < sizeof(srcdir_testpath)) {
+ if ((strlen(srcdir) + strlen(filename) + 1) < sizeof(srcdir_testpath)) {
H5_GCC_DIAG_OFF("format-truncation")
- HDsnprintf(srcdir_testpath, sizeof(srcdir_testpath), "%s%s", srcdir, filename);
+ snprintf(srcdir_testpath, sizeof(srcdir_testpath), "%s%s", srcdir, filename);
H5_GCC_DIAG_ON("format-truncation")
return srcdir_testpath;
}
@@ -1924,8 +1924,8 @@ H5_get_srcdir(void)
srcdir = config_srcdir;
/* Build path to all test files */
- if ((HDstrlen(srcdir) + 2) < sizeof(srcdir_path)) {
- HDsnprintf(srcdir_path, sizeof(srcdir_path), "%s/", srcdir);
+ if ((strlen(srcdir) + 2) < sizeof(srcdir_path)) {
+ snprintf(srcdir_path, sizeof(srcdir_path), "%s/", srcdir);
return (srcdir_path);
} /* end if */
else
@@ -2079,7 +2079,7 @@ h5_using_default_driver(const char *drv_name)
drv_name = HDgetenv(HDF5_DRIVER);
if (drv_name)
- return (!HDstrcmp(drv_name, "sec2") || !HDstrcmp(drv_name, "nomatch"));
+ return (!strcmp(drv_name, "sec2") || !strcmp(drv_name, "nomatch"));
return ret_val;
}
@@ -2201,13 +2201,13 @@ h5_driver_uses_multiple_files(const char *drv_name, unsigned flags)
if (drv_name) {
if ((flags & H5_EXCLUDE_MULTIPART_DRIVERS) == 0) {
- if (!HDstrcmp(drv_name, "split") || !HDstrcmp(drv_name, "multi") ||
- !HDstrcmp(drv_name, "family") || !HDstrcmp(drv_name, H5FD_SUBFILING_NAME))
+ if (!strcmp(drv_name, "split") || !strcmp(drv_name, "multi") || !strcmp(drv_name, "family") ||
+ !strcmp(drv_name, H5FD_SUBFILING_NAME))
return true;
}
if ((flags & H5_EXCLUDE_NON_MULTIPART_DRIVERS) == 0) {
- if (!HDstrcmp(drv_name, "splitter"))
+ if (!strcmp(drv_name, "splitter"))
return true;
}
}
diff --git a/test/h5test.h b/test/h5test.h
index 98190d2..8bba077 100644
--- a/test/h5test.h
+++ b/test/h5test.h
@@ -113,30 +113,30 @@ H5TEST_DLLVAR MPI_Info h5_io_info_g; /* MPI INFO object for IO */
} while (0)
#define PASSED() \
do { \
- HDputs(" PASSED"); \
+ puts(" PASSED"); \
fflush(stdout); \
n_tests_passed_g++; \
} while (0)
#define H5_FAILED() \
do { \
- HDputs("*FAILED*"); \
+ puts("*FAILED*"); \
fflush(stdout); \
n_tests_failed_g++; \
} while (0)
#define H5_WARNING() \
do { \
- HDputs("*WARNING*"); \
+ puts("*WARNING*"); \
fflush(stdout); \
} while (0)
#define SKIPPED() \
do { \
- HDputs(" -SKIP-"); \
+ puts(" -SKIP-"); \
fflush(stdout); \
n_tests_skipped_g++; \
} while (0)
#define PUTS_ERROR(s) \
do { \
- HDputs(s); \
+ puts(s); \
AT(); \
goto error; \
} while (0)
@@ -162,7 +162,7 @@ H5TEST_DLLVAR MPI_Info h5_io_info_g; /* MPI INFO object for IO */
do { \
H5_FAILED(); \
AT(); \
- HDputs(s); \
+ puts(s); \
goto error; \
} while (0)
@@ -172,7 +172,7 @@ H5TEST_DLLVAR MPI_Info h5_io_info_g; /* MPI INFO object for IO */
#define TESTING_MULTIPART(WHAT) \
do { \
printf("Testing %-62s", WHAT); \
- HDputs(""); \
+ puts(""); \
fflush(stdout); \
} while (0)
diff --git a/test/hdfs.c b/test/hdfs.c
index c308d8c..fe876fa 100644
--- a/test/hdfs.c
+++ b/test/hdfs.c
@@ -274,7 +274,7 @@
*----------------------------------------------------------------------------
*/
#define JSVERIFY_STR(expected, actual, reason) \
- if (HDstrcmp((actual), (expected)) != 0) { \
+ if (strcmp((actual), (expected)) != 0) { \
JSERR_STR((expected), (actual), (reason)); \
goto error; \
} /* JSVERIFY_STR */
@@ -313,7 +313,7 @@
*----------------------------------------------------------------------------
*/
#define JSVERIFY_STR(actual, expected, reason) \
- if (HDstrcmp((actual), (expected)) != 0) { \
+ if (strcmp((actual), (expected)) != 0) { \
JSERR_STR((expected), (actual), (reason)); \
goto error; \
} /* JSVERIFY_STR */
@@ -374,7 +374,7 @@ test_fapl_config_validation(void)
#ifndef H5_HAVE_LIBHDFS
TESTING("HDFS fapl configuration validation");
SKIPPED();
- HDputs(" HDFS VFD is not enabled");
+ puts(" HDFS VFD is not enabled");
fflush(stdout);
return 0;
@@ -579,7 +579,7 @@ test_hdfs_fapl(void)
#ifndef H5_HAVE_LIBHDFS
TESTING("HDFS fapl ");
SKIPPED();
- HDputs(" HDFS VFD is not enabled");
+ puts(" HDFS VFD is not enabled");
fflush(stdout);
return 0;
@@ -662,7 +662,7 @@ test_vfd_open(void)
#ifndef H5_HAVE_LIBHDFS
TESTING("HDFS VFD-level open");
SKIPPED();
- HDputs(" HDFS VFD is not enabled");
+ puts(" HDFS VFD is not enabled");
fflush(stdout);
return 0;
@@ -915,7 +915,7 @@ test_eof_eoa(void)
#ifndef H5_HAVE_LIBHDFS
TESTING("HDFS eof/eoa gets and sets");
SKIPPED();
- HDputs(" HDFS VFD is not enabled");
+ puts(" HDFS VFD is not enabled");
fflush(stdout);
return 0;
@@ -1025,7 +1025,7 @@ test_H5FDread_without_eoa_set_fails(void)
#ifndef H5_HAVE_LIBHDFS
TESTING("HDFS VFD read-eoa temporal coupling library limitation");
SKIPPED();
- HDputs(" HDFS VFD is not enabled");
+ puts(" HDFS VFD is not enabled");
fflush(stdout);
return 0;
@@ -1124,7 +1124,7 @@ test_read(void)
#ifndef H5_HAVE_LIBHDFS
TESTING("HDFS VFD read/range-gets");
SKIPPED();
- HDputs(" HDFS VFD is not enabled");
+ puts(" HDFS VFD is not enabled");
fflush(stdout);
return 0;
@@ -1331,7 +1331,7 @@ test_noops_and_autofails(void)
#ifndef H5_HAVE_LIBHDFS
TESTING("HDFS VFD always-fail and no-op routines");
SKIPPED();
- HDputs(" HDFS VFD is not enabled");
+ puts(" HDFS VFD is not enabled");
fflush(stdout);
return 0;
@@ -1467,7 +1467,7 @@ test_H5F_integration(void)
#ifndef H5_HAVE_LIBHDFS
TESTING("HDFS file access through HD5F library (H5F API)");
SKIPPED();
- HDputs(" HDFS VFD is not enabled");
+ puts(" HDFS VFD is not enabled");
fflush(stdout);
return 0;
@@ -1581,11 +1581,11 @@ main(void)
hdfs_namenode_name_env = HDgetenv("HDFS_TEST_NAMENODE_NAME");
if (hdfs_namenode_name_env == NULL || hdfs_namenode_name_env[0] == '\0') {
- HDstrncpy(hdfs_namenode_name, "localhost", HDFS_NAMENODE_NAME_MAX_SIZE);
+ strncpy(hdfs_namenode_name, "localhost", HDFS_NAMENODE_NAME_MAX_SIZE);
}
else {
- HDstrncpy(/* TODO: error-check? */
- default_fa.namenode_name, hdfs_namenode_name_env, HDFS_NAMENODE_NAME_MAX_SIZE);
+ strncpy(/* TODO: error-check? */
+ default_fa.namenode_name, hdfs_namenode_name_env, HDFS_NAMENODE_NAME_MAX_SIZE);
}
#endif /* H5_HAVE_LIBHDFS */
diff --git a/test/hyperslab.c b/test/hyperslab.c
index e2ca4f1..2777e04 100644
--- a/test/hyperslab.c
+++ b/test/hyperslab.c
@@ -148,19 +148,19 @@ test_fill(size_t nx, size_t ny, size_t nz, size_t di, size_t dj, size_t dk, size
if (0 == ny) {
ndims = 1;
ny = nz = 1;
- HDsnprintf(dim, sizeof(dim), "%lu", (unsigned long)nx);
+ snprintf(dim, sizeof(dim), "%lu", (unsigned long)nx);
} /* end if */
else {
ndims = 2;
nz = 1;
- HDsnprintf(dim, sizeof(dim), "%lux%lu", (unsigned long)nx, (unsigned long)ny);
+ snprintf(dim, sizeof(dim), "%lux%lu", (unsigned long)nx, (unsigned long)ny);
} /* end else */
} /* end if */
else {
ndims = 3;
- HDsnprintf(dim, sizeof(dim), "%lux%lux%lu", (unsigned long)nx, (unsigned long)ny, (unsigned long)nz);
+ snprintf(dim, sizeof(dim), "%lux%lux%lu", (unsigned long)nx, (unsigned long)ny, (unsigned long)nz);
} /* end else */
- HDsnprintf(s, sizeof(s), "Testing hyperslab fill %-11s variable hyperslab", dim);
+ snprintf(s, sizeof(s), "Testing hyperslab fill %-11s variable hyperslab", dim);
printf("%-70s", s);
fflush(stdout);
@@ -303,17 +303,17 @@ test_copy(int mode, size_t nx, size_t ny, size_t nz, size_t di, size_t dj, size_
if (0 == ny) {
ndims = 1;
ny = nz = 1;
- HDsnprintf(dim, sizeof(dim), "%lu", (unsigned long)nx);
+ snprintf(dim, sizeof(dim), "%lu", (unsigned long)nx);
} /* end if */
else {
ndims = 2;
nz = 1;
- HDsnprintf(dim, sizeof(dim), "%lux%lu", (unsigned long)nx, (unsigned long)ny);
+ snprintf(dim, sizeof(dim), "%lux%lu", (unsigned long)nx, (unsigned long)ny);
} /* end else */
} /* end if */
else {
ndims = 3;
- HDsnprintf(dim, sizeof(dim), "%lux%lux%lu", (unsigned long)nx, (unsigned long)ny, (unsigned long)nz);
+ snprintf(dim, sizeof(dim), "%lux%lux%lu", (unsigned long)nx, (unsigned long)ny, (unsigned long)nz);
} /* end else */
switch (mode) {
@@ -346,7 +346,7 @@ test_copy(int mode, size_t nx, size_t ny, size_t nz, size_t di, size_t dj, size_
HDabort();
} /* end switch */
- HDsnprintf(s, sizeof(s), "Testing hyperslab copy %-11s %s", dim, sub);
+ snprintf(s, sizeof(s), "Testing hyperslab copy %-11s %s", dim, sub);
printf("%-70s", s);
fflush(stdout);
@@ -597,15 +597,15 @@ test_multifill(size_t nx)
s[0] = '\0';
for (i = 0; i < nx; i++) {
if (dst[i].left != 3333333)
- HDsnprintf(s, sizeof(s), "bad dst[%lu].left", (unsigned long)i);
+ snprintf(s, sizeof(s), "bad dst[%lu].left", (unsigned long)i);
else if (!H5_DBL_ABS_EQUAL(dst[i].mid, fill.mid))
/* Check if two DOUBLE values are equal. If their difference
* is smaller than the EPSILON value for double, they are
* considered equal. See the definition in h5test.h.
*/
- HDsnprintf(s, sizeof(s), "bad dst[%lu].mid", (unsigned long)i);
+ snprintf(s, sizeof(s), "bad dst[%lu].mid", (unsigned long)i);
else if (dst[i].right != 4444444)
- HDsnprintf(s, sizeof(s), "bad dst[%lu].right", (unsigned long)i);
+ snprintf(s, sizeof(s), "bad dst[%lu].right", (unsigned long)i);
if (s[0]) {
H5_FAILED();
if (!HDisatty(1)) {
@@ -744,8 +744,7 @@ test_transpose(size_t nx, size_t ny)
char s[256];
hsize_t i, j;
- HDsnprintf(s, sizeof(s), "Testing 2d transpose by stride %4lux%-lud", (unsigned long)nx,
- (unsigned long)ny);
+ snprintf(s, sizeof(s), "Testing 2d transpose by stride %4lux%-lud", (unsigned long)nx, (unsigned long)ny);
printf("%-70s", s);
fflush(stdout);
@@ -840,8 +839,8 @@ test_sub_super(size_t nx, size_t ny)
hsize_t i, j;
char s[256];
- HDsnprintf(s, sizeof(s), "Testing image sampling %4lux%-4lu to %4lux%-4lu ", (unsigned long)(2 * nx),
- (unsigned long)(2 * ny), (unsigned long)nx, (unsigned long)ny);
+ snprintf(s, sizeof(s), "Testing image sampling %4lux%-4lu to %4lux%-4lu ", (unsigned long)(2 * nx),
+ (unsigned long)(2 * ny), (unsigned long)nx, (unsigned long)ny);
printf("%-70s", s);
fflush(stdout);
@@ -890,8 +889,8 @@ test_sub_super(size_t nx, size_t ny)
* Test replicating pixels to produce an image twice as large in each
* dimension.
*/
- HDsnprintf(s, sizeof(s), "Testing image sampling %4lux%-4lu to %4lux%-4lu ", (unsigned long)nx,
- (unsigned long)ny, (unsigned long)(2 * nx), (unsigned long)(2 * ny));
+ snprintf(s, sizeof(s), "Testing image sampling %4lux%-4lu to %4lux%-4lu ", (unsigned long)nx,
+ (unsigned long)ny, (unsigned long)(2 * nx), (unsigned long)(2 * ny));
printf("%-70s", s);
fflush(stdout);
@@ -917,17 +916,17 @@ test_sub_super(size_t nx, size_t ny)
for (i = 0; i < nx; i++) {
for (j = 0; j < ny; j++) {
if (half[i * ny + j] != twice[4 * i * ny + 2 * j])
- HDsnprintf(s, sizeof(s), "half[%lu][%lu] != twice[%lu][%lu]", (unsigned long)i,
- (unsigned long)j, (unsigned long)i * 2, (unsigned long)j * 2);
+ snprintf(s, sizeof(s), "half[%lu][%lu] != twice[%lu][%lu]", (unsigned long)i,
+ (unsigned long)j, (unsigned long)i * 2, (unsigned long)j * 2);
else if (half[i * ny + j] != twice[4 * i * ny + 2 * j + 1])
- HDsnprintf(s, sizeof(s), "half[%lu][%lu] != twice[%lu][%lu]", (unsigned long)i,
- (unsigned long)j, (unsigned long)i * 2, (unsigned long)j * 2 + 1);
+ snprintf(s, sizeof(s), "half[%lu][%lu] != twice[%lu][%lu]", (unsigned long)i,
+ (unsigned long)j, (unsigned long)i * 2, (unsigned long)j * 2 + 1);
else if (half[i * ny + j] != twice[(2 * i + 1) * 2 * ny + 2 * j])
- HDsnprintf(s, sizeof(s), "half[%lu][%lu] != twice[%lu][%lu]", (unsigned long)i,
- (unsigned long)j, (unsigned long)i * 2 + 1, (unsigned long)j * 2);
+ snprintf(s, sizeof(s), "half[%lu][%lu] != twice[%lu][%lu]", (unsigned long)i,
+ (unsigned long)j, (unsigned long)i * 2 + 1, (unsigned long)j * 2);
else if (half[i * ny + j] != twice[(2 * i + 1) * 2 * ny + 2 * j + 1])
- HDsnprintf(s, sizeof(s), "half[%lu][%lu] != twice[%lu][%lu]", (unsigned long)i,
- (unsigned long)j, (unsigned long)i * 2 + 1, (unsigned long)j * 2 + 1);
+ snprintf(s, sizeof(s), "half[%lu][%lu] != twice[%lu][%lu]", (unsigned long)i,
+ (unsigned long)j, (unsigned long)i * 2 + 1, (unsigned long)j * 2 + 1);
if (s[0]) {
H5_FAILED();
if (!HDisatty(1)) {
@@ -982,7 +981,7 @@ test_array_fill(size_t lo, size_t hi)
size_t u, v, w; /* Local index variables */
char s[256];
- HDsnprintf(s, sizeof(s), "array filling %4lu-%-4lu elements", (unsigned long)lo, (unsigned long)hi);
+ snprintf(s, sizeof(s), "array filling %4lu-%-4lu elements", (unsigned long)lo, (unsigned long)hi);
TESTING(s);
/* Initialize */
@@ -1043,8 +1042,8 @@ test_array_offset_n_calc(size_t n, size_t x, size_t y, size_t z)
hsize_t new_coords[ARRAY_OFFSET_NDIMS]; /* X, Y & X coordinates of offset */
char s[256];
- HDsnprintf(s, sizeof(s), "array offset %4lux%4lux%4lu elements", (unsigned long)z, (unsigned long)y,
- (unsigned long)x);
+ snprintf(s, sizeof(s), "array offset %4lux%4lux%4lu elements", (unsigned long)z, (unsigned long)y,
+ (unsigned long)x);
TESTING(s);
/* Initialize */
@@ -1126,9 +1125,9 @@ main(int argc, char *argv[])
int i;
for (i = 1, size_of_test = 0; i < argc; i++) {
- if (!HDstrcmp(argv[i], "small"))
+ if (!strcmp(argv[i], "small"))
size_of_test |= TEST_SMALL;
- else if (!HDstrcmp(argv[i], "medium"))
+ else if (!strcmp(argv[i], "medium"))
size_of_test |= TEST_MEDIUM;
else {
printf("unrecognized argument: %s\n", argv[i]);
diff --git a/test/istore.c b/test/istore.c
index 323b7d7..921d200 100644
--- a/test/istore.c
+++ b/test/istore.c
@@ -194,7 +194,7 @@ test_create(hid_t f, const char *prefix)
dims[u] = my_chunk_dims[u] = 2;
/* Create chunked dataset of this dimensionality */
- HDsnprintf(name, sizeof name, "%s_%02u", prefix, u);
+ snprintf(name, sizeof name, "%s_%02u", prefix, u);
if ((dataset = new_object(f, name, (int)u, dims, my_chunk_dims)) < 0)
return FAIL;
@@ -240,21 +240,20 @@ test_extend(hid_t f, const char *prefix, size_t nx, size_t ny, size_t nz)
if (!ny) {
ndims = 1;
ny = nz = 1;
- HDsnprintf(dims, sizeof(dims), "%lu", (unsigned long)nx);
+ snprintf(dims, sizeof(dims), "%lu", (unsigned long)nx);
}
else {
ndims = 2;
nz = 1;
- HDsnprintf(dims, sizeof(dims), "%lux%lu", (unsigned long)nx, (unsigned long)ny);
+ snprintf(dims, sizeof(dims), "%lux%lu", (unsigned long)nx, (unsigned long)ny);
}
}
else {
ndims = 3;
- HDsnprintf(dims, sizeof(dims), "%lux%lux%lu", (unsigned long)nx, (unsigned long)ny,
- (unsigned long)nz);
+ snprintf(dims, sizeof(dims), "%lux%lux%lu", (unsigned long)nx, (unsigned long)ny, (unsigned long)nz);
}
- HDsnprintf(s, sizeof(s), "istore extend: %s", dims);
+ snprintf(s, sizeof(s), "istore extend: %s", dims);
TESTING(s);
buf = (uint8_t *)malloc(nx * ny * nz);
check = (uint8_t *)malloc(nx * ny * nz);
@@ -268,7 +267,7 @@ test_extend(hid_t f, const char *prefix, size_t nx, size_t ny, size_t nz)
max_corner[2] = 0;
/* Build the new empty object */
- HDsnprintf(name, sizeof(name), "%s_%s", prefix, dims);
+ snprintf(name, sizeof(name), "%s_%s", prefix, dims);
if ((dataset = new_object(f, name, ndims, whole_size, whole_size)) < 0) {
fprintf(stderr, " Cannot create %u-d object `%s'\n", ndims, name);
goto error;
@@ -433,21 +432,20 @@ test_sparse(hid_t f, const char *prefix, size_t nblocks, size_t nx, size_t ny, s
if (!ny) {
ndims = 1;
ny = nz = 1;
- HDsnprintf(dims, sizeof(dims), "%lu", (unsigned long)nx);
+ snprintf(dims, sizeof(dims), "%lu", (unsigned long)nx);
}
else {
ndims = 2;
nz = 1;
- HDsnprintf(dims, sizeof(dims), "%lux%lu", (unsigned long)nx, (unsigned long)ny);
+ snprintf(dims, sizeof(dims), "%lux%lu", (unsigned long)nx, (unsigned long)ny);
}
}
else {
ndims = 3;
- HDsnprintf(dims, sizeof(dims), "%lux%lux%lu", (unsigned long)nx, (unsigned long)ny,
- (unsigned long)nz);
+ snprintf(dims, sizeof(dims), "%lux%lux%lu", (unsigned long)nx, (unsigned long)ny, (unsigned long)nz);
}
- HDsnprintf(s, sizeof(s), "istore sparse: %s", dims);
+ snprintf(s, sizeof(s), "istore sparse: %s", dims);
TESTING(s);
if (skip_test) {
SKIPPED();
@@ -466,7 +464,7 @@ test_sparse(hid_t f, const char *prefix, size_t nblocks, size_t nx, size_t ny, s
size[2] = nz;
/* Build the new empty object */
- HDsnprintf(name, sizeof(name), "%s_%s", prefix, dims);
+ snprintf(name, sizeof(name), "%s_%s", prefix, dims);
if ((dataset = new_object(f, name, ndims, whole_size, chunk_dims)) < 0) {
printf(" Cannot create %u-d object `%s'\n", ndims, name);
goto error;
@@ -559,13 +557,13 @@ main(int argc, char *argv[])
else {
int i;
for (i = 1, size_of_test = 0; i < argc; i++) {
- if (!HDstrcmp(argv[i], "small")) {
+ if (!strcmp(argv[i], "small")) {
size_of_test |= TEST_SMALL;
}
- else if (!HDstrcmp(argv[i], "medium")) {
+ else if (!strcmp(argv[i], "medium")) {
size_of_test |= TEST_MEDIUM;
}
- else if (!HDstrcmp(argv[i], "large")) {
+ else if (!strcmp(argv[i], "large")) {
size_of_test |= TEST_LARGE;
}
else {
diff --git a/test/lheap.c b/test/lheap.c
index 182966b..7b98634 100644
--- a/test/lheap.c
+++ b/test/lheap.c
@@ -91,13 +91,13 @@ main(void)
goto error;
}
for (i = 0; i < NOBJS; i++) {
- HDsnprintf(buf, sizeof(buf), "%03d-", i);
+ snprintf(buf, sizeof(buf), "%03d-", i);
for (j = 4; j < i; j++)
buf[j] = (char)('0' + j % 10);
if (j > 4)
buf[j] = '\0';
- if (H5HL_insert(f, heap, HDstrlen(buf) + 1, buf, &obj[i]) < 0) {
+ if (H5HL_insert(f, heap, strlen(buf) + 1, buf, &obj[i]) < 0) {
H5_FAILED();
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
@@ -131,7 +131,7 @@ main(void)
goto error;
}
for (i = 0; i < NOBJS; i++) {
- HDsnprintf(buf, sizeof(buf), "%03d-", i);
+ snprintf(buf, sizeof(buf), "%03d-", i);
for (j = 4; j < i; j++)
buf[j] = (char)('0' + j % 10);
if (j > 4)
@@ -149,7 +149,7 @@ main(void)
goto error;
}
- if (HDstrcmp(s, buf) != 0) {
+ if (strcmp(s, buf) != 0) {
H5_FAILED();
printf(" i=%d, heap offset=%lu\n", i, (unsigned long)(obj[i]));
printf(" got: \"%s\"\n", s);
@@ -204,13 +204,13 @@ main(void)
FAIL_STACK_ERROR;
api_ctx_pushed = false;
- HDputs("All local heap tests passed.");
+ puts("All local heap tests passed.");
h5_cleanup(FILENAME, fapl);
return EXIT_SUCCESS;
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
H5E_BEGIN_TRY
{
H5Fclose(file);
diff --git a/test/links.c b/test/links.c
index 188711f..d707430 100644
--- a/test/links.c
+++ b/test/links.c
@@ -400,9 +400,9 @@ const H5L_class_t UD_plist_class[1] = {{
static void
fix_ext_filename(char *path_name, char *cwd, const char *file_name)
{
- HDstrcpy(path_name, cwd);
- HDstrcat(path_name, "/");
- HDstrcat(path_name, file_name);
+ strcpy(path_name, cwd);
+ strcat(path_name, "/");
+ strcat(path_name, file_name);
}
/*-------------------------------------------------------------------------
@@ -650,8 +650,8 @@ cklinks(hid_t fapl, bool new_format)
FAIL_STACK_ERROR;
if (token_cmp) {
H5_FAILED();
- HDputs(" Hard link test failed. Link seems not to point to the ");
- HDputs(" expected file location.");
+ puts(" Hard link test failed. Link seems not to point to the ");
+ puts(" expected file location.");
TEST_ERROR;
} /* end if */
if (H5Lexists(file, "/", H5P_DEFAULT) != true)
@@ -671,7 +671,7 @@ cklinks(hid_t fapl, bool new_format)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" H5Lexists() should have failed for a path with missing components.");
+ puts(" H5Lexists() should have failed for a path with missing components.");
TEST_ERROR;
} /* end if */
H5E_BEGIN_TRY
@@ -681,7 +681,7 @@ cklinks(hid_t fapl, bool new_format)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" H5Lexists() should have failed for a path with missing components.");
+ puts(" H5Lexists() should have failed for a path with missing components.");
TEST_ERROR;
} /* end if */
@@ -697,15 +697,15 @@ cklinks(hid_t fapl, bool new_format)
FAIL_STACK_ERROR;
if (token_cmp) {
H5_FAILED();
- HDputs(" Soft link test failed. Link seems not to point to the ");
- HDputs(" expected file location.");
+ puts(" Soft link test failed. Link seems not to point to the ");
+ puts(" expected file location.");
TEST_ERROR;
} /* end if */
if (H5Lget_val(file, "grp1/soft", linkval, sizeof linkval, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(linkval, "/d1") != 0) {
+ if (strcmp(linkval, "/d1") != 0) {
H5_FAILED();
- HDputs(" Soft link test failed. Wrong link value");
+ puts(" Soft link test failed. Wrong link value");
TEST_ERROR;
} /* end if */
if (H5Lexists(file, "grp1/soft", H5P_DEFAULT) != true)
@@ -719,7 +719,7 @@ cklinks(hid_t fapl, bool new_format)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" H5Oget_info_by_name() should have failed for a dangling link.");
+ puts(" H5Oget_info_by_name() should have failed for a dangling link.");
TEST_ERROR;
} /* end if */
if (H5Lget_info2(file, "grp1/dangle", &linfo, H5P_DEFAULT) < 0)
@@ -734,9 +734,9 @@ cklinks(hid_t fapl, bool new_format)
printf(" %d: Can't retrieve link value\n", __LINE__);
TEST_ERROR;
} /* end if */
- if (HDstrcmp(linkval, "foobar") != 0) {
+ if (strcmp(linkval, "foobar") != 0) {
H5_FAILED();
- HDputs(" Dangling link test failed. Wrong link value");
+ puts(" Dangling link test failed. Wrong link value");
TEST_ERROR;
} /* end if */
if (H5Lexists(file, "grp1/dangle", H5P_DEFAULT) != true)
@@ -750,7 +750,7 @@ cklinks(hid_t fapl, bool new_format)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" H5Oget_info_by_name() should have failed for a recursive link.");
+ puts(" H5Oget_info_by_name() should have failed for a recursive link.");
TEST_ERROR;
} /* end if */
if (H5Lget_info2(file, "grp1/recursive", &linfo, H5P_DEFAULT) < 0)
@@ -765,9 +765,9 @@ cklinks(hid_t fapl, bool new_format)
printf(" %d: Can't retrieve link value\n", __LINE__);
TEST_ERROR;
} /* end if */
- if (HDstrcmp(linkval, "/grp1/recursive") != 0) {
+ if (strcmp(linkval, "/grp1/recursive") != 0) {
H5_FAILED();
- HDputs(" Recursive link test failed. Wrong link value");
+ puts(" Recursive link test failed. Wrong link value");
TEST_ERROR;
} /* end if */
@@ -835,8 +835,8 @@ ck_new_links(hid_t fapl, bool new_format)
TEST_ERROR;
if (token_cmp1 || token_cmp2) {
H5_FAILED();
- HDputs(" Hard link test failed. Link seems not to point to the ");
- HDputs(" expected file location.");
+ puts(" Hard link test failed. Link seems not to point to the ");
+ puts(" expected file location.");
TEST_ERROR;
}
@@ -1064,7 +1064,7 @@ toomany(hid_t fapl, bool new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/hard21") != 0)
+ if (strcmp(objname, "/hard21") != 0)
TEST_ERROR;
/* Create object in hard-linked group */
@@ -1087,7 +1087,7 @@ toomany(hid_t fapl, bool new_format)
H5E_END_TRY
if (gid >= 0) {
H5_FAILED();
- HDputs(" Should have failed for sequence of too many nested links.");
+ puts(" Should have failed for sequence of too many nested links.");
TEST_ERROR;
} /* end if */
@@ -1098,7 +1098,7 @@ toomany(hid_t fapl, bool new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/soft16") != 0)
+ if (strcmp(objname, "/soft16") != 0)
TEST_ERROR;
/* Create object using soft links */
@@ -1436,7 +1436,7 @@ test_move(hid_t fapl, bool new_format)
H5E_END_TRY
if (moved_grp >= 0) {
H5_FAILED();
- HDputs(" Group still in original location?");
+ puts(" Group still in original location?");
TEST_ERROR;
} /* end if */
@@ -1969,7 +1969,7 @@ test_deprec(hid_t fapl, bool new_format)
FAIL_STACK_ERROR;
if (H5Gget_comment(file_id, "group1", sizeof(tmpstr), tmpstr) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(tmpstr, "comment") != 0)
+ if (strcmp(tmpstr, "comment") != 0)
TEST_ERROR;
/* Create links using H5Glink and H5Glink2 */
@@ -1985,7 +1985,7 @@ test_deprec(hid_t fapl, bool new_format)
/* Test getting the names for objects */
if (H5Gget_objname_by_idx(group1_id, (hsize_t)0, tmpstr, sizeof(tmpstr)) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(tmpstr, "link_to_group2") != 0)
+ if (strcmp(tmpstr, "link_to_group2") != 0)
TEST_ERROR;
H5E_BEGIN_TRY
{
@@ -2024,8 +2024,8 @@ test_deprec(hid_t fapl, bool new_format)
if (memcmp(&sb_hard1.objno, sb_hard2.objno, sizeof(sb_hard1.objno)) != 0) {
H5_FAILED();
- HDputs(" Hard link test failed. Link seems not to point to the ");
- HDputs(" expected file location.");
+ puts(" Hard link test failed. Link seems not to point to the ");
+ puts(" expected file location.");
TEST_ERROR;
} /* end if */
@@ -2037,8 +2037,8 @@ test_deprec(hid_t fapl, bool new_format)
if (memcmp(&sb_hard1.objno, sb_hard2.objno, sizeof(sb_hard1.objno)) != 0) {
H5_FAILED();
- HDputs(" Hard link test failed. Link seems not to point to the ");
- HDputs(" expected file location.");
+ puts(" Hard link test failed. Link seems not to point to the ");
+ puts(" expected file location.");
TEST_ERROR;
} /* end if */
@@ -2047,12 +2047,12 @@ test_deprec(hid_t fapl, bool new_format)
FAIL_STACK_ERROR;
if (sb_soft1.type != H5G_LINK)
TEST_ERROR;
- if (sb_soft1.linklen != HDstrlen("link_to_group1") + 1)
+ if (sb_soft1.linklen != strlen("link_to_group1") + 1)
TEST_ERROR;
if (H5Gget_linkval(group2_id, "soft_link_to_group1", sb_soft1.linklen, tmpstr) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp("link_to_group1", tmpstr) != 0)
+ if (strcmp("link_to_group1", tmpstr) != 0)
TEST_ERROR;
/* Test non-existing links with H5Gget_objinfo */
@@ -2068,12 +2068,12 @@ test_deprec(hid_t fapl, bool new_format)
FAIL_STACK_ERROR;
if (sb_soft2.type != H5G_LINK)
TEST_ERROR;
- if (sb_soft2.linklen != HDstrlen("dangle") + 1)
+ if (sb_soft2.linklen != strlen("dangle") + 1)
TEST_ERROR;
if (H5Gget_linkval(group2_id, "dangle_soft_link", sb_soft2.linklen, tmpstr) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp("dangle", tmpstr) != 0)
+ if (strcmp("dangle", tmpstr) != 0)
TEST_ERROR;
/* Test H5Gmove and H5Gmove2 */
@@ -2170,8 +2170,8 @@ cklinks_deprec(hid_t fapl, bool new_format)
} /* end if */
if (H5_addr_ne(oinfo1.addr, oinfo2.addr)) {
H5_FAILED();
- HDputs(" Hard link test failed. Link seems not to point to the ");
- HDputs(" expected file location.");
+ puts(" Hard link test failed. Link seems not to point to the ");
+ puts(" expected file location.");
TEST_ERROR;
} /* end if */
if (H5Lexists(file, "/", H5P_DEFAULT) != true)
@@ -2191,7 +2191,7 @@ cklinks_deprec(hid_t fapl, bool new_format)
H5E_END_TRY
if (exists >= 0) {
H5_FAILED();
- HDputs(" H5Lexists() should have failed for a path with missing components.");
+ puts(" H5Lexists() should have failed for a path with missing components.");
TEST_ERROR;
} /* end if */
H5E_BEGIN_TRY
@@ -2201,7 +2201,7 @@ cklinks_deprec(hid_t fapl, bool new_format)
H5E_END_TRY
if (exists >= 0) {
H5_FAILED();
- HDputs(" H5Lexists() should have failed for a path with missing components.");
+ puts(" H5Lexists() should have failed for a path with missing components.");
TEST_ERROR;
} /* end if */
@@ -2215,15 +2215,15 @@ cklinks_deprec(hid_t fapl, bool new_format)
} /* end if */
if (H5_addr_ne(oinfo1.addr, oinfo2.addr)) {
H5_FAILED();
- HDputs(" Soft link test failed. Link seems not to point to the ");
- HDputs(" expected file location.");
+ puts(" Soft link test failed. Link seems not to point to the ");
+ puts(" expected file location.");
TEST_ERROR;
} /* end if */
if (H5Lget_val(file, "grp1/soft", linkval, sizeof linkval, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(linkval, "/d1") != 0) {
+ if (strcmp(linkval, "/d1") != 0) {
H5_FAILED();
- HDputs(" Soft link test failed. Wrong link value");
+ puts(" Soft link test failed. Wrong link value");
TEST_ERROR;
} /* end if */
if (H5Lexists(file, "grp1/soft", H5P_DEFAULT) != true)
@@ -2237,7 +2237,7 @@ cklinks_deprec(hid_t fapl, bool new_format)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" H5Oget_info_by_name() should have failed for a dangling link.");
+ puts(" H5Oget_info_by_name() should have failed for a dangling link.");
TEST_ERROR;
} /* end if */
if (H5Lget_info1(file, "grp1/dangle", &linfo, H5P_DEFAULT) < 0)
@@ -2252,9 +2252,9 @@ cklinks_deprec(hid_t fapl, bool new_format)
printf(" %d: Can't retrieve link value\n", __LINE__);
TEST_ERROR;
} /* end if */
- if (HDstrcmp(linkval, "foobar") != 0) {
+ if (strcmp(linkval, "foobar") != 0) {
H5_FAILED();
- HDputs(" Dangling link test failed. Wrong link value");
+ puts(" Dangling link test failed. Wrong link value");
TEST_ERROR;
} /* end if */
if (H5Lexists(file, "grp1/dangle", H5P_DEFAULT) != true)
@@ -2268,7 +2268,7 @@ cklinks_deprec(hid_t fapl, bool new_format)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" H5Oget_info_by_name() should have failed for a recursive link.");
+ puts(" H5Oget_info_by_name() should have failed for a recursive link.");
TEST_ERROR;
} /* end if */
if (H5Lget_info1(file, "grp1/recursive", &linfo, H5P_DEFAULT) < 0)
@@ -2283,9 +2283,9 @@ cklinks_deprec(hid_t fapl, bool new_format)
printf(" %d: Can't retrieve link value\n", __LINE__);
TEST_ERROR;
} /* end if */
- if (HDstrcmp(linkval, "/grp1/recursive") != 0) {
+ if (strcmp(linkval, "/grp1/recursive") != 0) {
H5_FAILED();
- HDputs(" Recursive link test failed. Wrong link value");
+ puts(" Recursive link test failed. Wrong link value");
TEST_ERROR;
} /* end if */
@@ -2813,21 +2813,21 @@ external_link_root_deprec(hid_t fapl, bool new_format)
goto error;
if (H5L_TYPE_EXTERNAL != linfo.type) {
H5_FAILED();
- HDputs(" Unexpected object type - should have been an external link");
+ puts(" Unexpected object type - should have been an external link");
goto error;
}
if (H5Lget_val(fid, "ext_link", objname, sizeof(objname), H5P_DEFAULT) < 0)
TEST_ERROR;
if (H5Lunpack_elink_val(objname, linfo.u.val_size, NULL, &file, &path) < 0)
TEST_ERROR;
- if (HDstrcmp(file, filename1) != 0) {
+ if (strcmp(file, filename1) != 0) {
H5_FAILED();
- HDputs(" External link file name incorrect");
+ puts(" External link file name incorrect");
goto error;
}
- if (HDstrcmp(path, "/") != 0) {
+ if (strcmp(path, "/") != 0) {
H5_FAILED();
- HDputs(" External link path incorrect");
+ puts(" External link path incorrect");
goto error;
}
@@ -2841,21 +2841,21 @@ external_link_root_deprec(hid_t fapl, bool new_format)
goto error;
if (H5L_TYPE_EXTERNAL != linfo.type) {
H5_FAILED();
- HDputs(" Unexpected object type - should have been an external link");
+ puts(" Unexpected object type - should have been an external link");
goto error;
}
if (H5Lget_val(fid, "ext_link", objname, sizeof(objname), H5P_DEFAULT) < 0)
TEST_ERROR;
if (H5Lunpack_elink_val(objname, linfo.u.val_size, NULL, &file, &path) < 0)
TEST_ERROR;
- if (HDstrcmp(file, filename1) != 0) {
+ if (strcmp(file, filename1) != 0) {
H5_FAILED();
- HDputs(" External link file name incorrect");
+ puts(" External link file name incorrect");
goto error;
}
- if (HDstrcmp(path, "/") != 0) {
+ if (strcmp(path, "/") != 0) {
H5_FAILED();
- HDputs(" External link path incorrect");
+ puts(" External link path incorrect");
goto error;
}
@@ -2872,7 +2872,7 @@ external_link_root_deprec(hid_t fapl, bool new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/") != 0)
+ if (strcmp(objname, "/") != 0)
TEST_ERROR;
/* Create object in external file */
@@ -2917,11 +2917,11 @@ external_link_root_deprec(hid_t fapl, bool new_format)
/* Check names */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/new_group") != 0)
+ if (strcmp(objname, "/new_group") != 0)
TEST_ERROR;
if (H5Iget_name(gid2, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/newer_group") != 0)
+ if (strcmp(objname, "/newer_group") != 0)
TEST_ERROR;
/* Close opened objects */
@@ -3019,11 +3019,11 @@ external_link_query_deprec(hid_t fapl, bool new_format)
/* Get size of buffer for external link */
if (H5Lget_info1(fid, "src", &li, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (li.u.val_size != (1 + (HDstrlen(filename2) + 1) + (HDstrlen("/dst") + 1)))
+ if (li.u.val_size != (1 + (strlen(filename2) + 1) + (strlen("/dst") + 1)))
TEST_ERROR;
if (H5L_TYPE_EXTERNAL != li.type) {
H5_FAILED();
- HDputs(" Unexpected link class - should have been an external link");
+ puts(" Unexpected link class - should have been an external link");
goto error;
}
@@ -3052,11 +3052,11 @@ external_link_query_deprec(hid_t fapl, bool new_format)
/* Get size of buffer for external link */
if (H5Lget_info1(fid, "src", &li, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (li.u.val_size != (1 + (HDstrlen(filename2) + 1) + (HDstrlen("/dst") + 1)))
+ if (li.u.val_size != (1 + (strlen(filename2) + 1) + (strlen("/dst") + 1)))
TEST_ERROR;
if (H5L_TYPE_EXTERNAL != li.type) {
H5_FAILED();
- HDputs(" Unexpected link class - should have been an external link");
+ puts(" Unexpected link class - should have been an external link");
goto error;
}
@@ -3069,9 +3069,9 @@ external_link_query_deprec(hid_t fapl, bool new_format)
TEST_ERROR;
/* Compare the file and object names */
- if (HDstrcmp(file_name, filename2) != 0)
+ if (strcmp(file_name, filename2) != 0)
TEST_ERROR;
- if (HDstrcmp(object_name, "/dst") != 0)
+ if (strcmp(object_name, "/dst") != 0)
TEST_ERROR;
/* Query information about object that external link points to */
@@ -3079,7 +3079,7 @@ external_link_query_deprec(hid_t fapl, bool new_format)
FAIL_STACK_ERROR;
if (H5O_TYPE_GROUP != oi.type) {
H5_FAILED();
- HDputs(" Unexpected object type - should have been a group");
+ puts(" Unexpected object type - should have been a group");
goto error;
}
@@ -3267,7 +3267,7 @@ external_link_closing_deprec(hid_t fapl, bool new_format)
FAIL_STACK_ERROR;
if (H5Oget_comment_by_name(fid1, "elink/elink/elink/group1_moved", buf, sizeof(buf), H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(buf, "comment") != 0)
+ if (strcmp(buf, "comment") != 0)
TEST_ERROR;
/* Test H5*open */
@@ -3686,7 +3686,7 @@ ud_hard_links_deprec(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/group") != 0)
+ if (strcmp(objname, "/group") != 0)
TEST_ERROR;
/* Create object in group */
@@ -3706,7 +3706,7 @@ ud_hard_links_deprec(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/group/new_group") != 0)
+ if (strcmp(objname, "/group/new_group") != 0)
TEST_ERROR;
/* Close opened object */
@@ -3721,7 +3721,7 @@ ud_hard_links_deprec(hid_t fapl)
TEST_ERROR;
if (UD_HARD_TYPE != li.type) {
H5_FAILED();
- HDputs(" Unexpected link class - should have been a UD hard link");
+ puts(" Unexpected link class - should have been a UD hard link");
goto error;
} /* end if */
@@ -3869,7 +3869,7 @@ ud_link_reregister_deprec(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/" REREG_TARGET_NAME) != 0)
+ if (strcmp(objname, "/" REREG_TARGET_NAME) != 0)
TEST_ERROR;
/* Create object in group */
@@ -3889,7 +3889,7 @@ ud_link_reregister_deprec(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/rereg_target/new_group") != 0)
+ if (strcmp(objname, "/rereg_target/new_group") != 0)
TEST_ERROR;
/* Close opened object */
@@ -4026,14 +4026,14 @@ ud_callbacks_deprec(hid_t fapl, bool new_format)
TEST_ERROR;
if (UD_CB_TYPE != li.type) {
H5_FAILED();
- HDputs(" Unexpected link class - should have been a UD hard link");
+ puts(" Unexpected link class - should have been a UD hard link");
goto error;
}
/* Fill the query buffer */
if (H5Lget_val(fid, UD_CB_LINK_NAME, query_buf, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(query_buf, "query succeeded") != 0)
+ if (strcmp(query_buf, "query succeeded") != 0)
TEST_ERROR;
/* Move the link */
@@ -4233,7 +4233,7 @@ lapl_nlinks_deprec(hid_t fapl, bool new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/soft17") != 0)
+ if (strcmp(objname, "/soft17") != 0)
TEST_ERROR;
/* Create group using soft link */
@@ -4266,7 +4266,7 @@ lapl_nlinks_deprec(hid_t fapl, bool new_format)
H5E_END_TRY
if (gid >= 0) {
H5_FAILED();
- HDputs(" Should have failed for sequence of too many nested links.");
+ puts(" Should have failed for sequence of too many nested links.");
goto error;
}
@@ -4277,7 +4277,7 @@ lapl_nlinks_deprec(hid_t fapl, bool new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/soft4") != 0)
+ if (strcmp(objname, "/soft4") != 0)
TEST_ERROR;
/* Test other functions that should use a LAPL */
@@ -4597,7 +4597,7 @@ corder_create_compact_deprec(hid_t fapl)
/* Create several links, but keep group in compact form */
for (u = 0; u < max_compact; u++) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(group_id2) < 0)
@@ -4650,7 +4650,7 @@ corder_create_compact_deprec(hid_t fapl)
H5L_info1_t linfo; /* Link information */
/* Retrieve information for link */
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if (H5Lget_info1(group_id, objname, &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -4741,7 +4741,7 @@ corder_create_dense_deprec(hid_t fapl)
/* Create several links, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(group_id2) < 0)
@@ -4759,7 +4759,7 @@ corder_create_dense_deprec(hid_t fapl)
} /* end for */
/* Create another link, to push group into dense form */
- HDsnprintf(objname, sizeof(objname), "filler %u", max_compact);
+ snprintf(objname, sizeof(objname), "filler %u", max_compact);
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(group_id2) < 0)
@@ -4813,7 +4813,7 @@ corder_create_dense_deprec(hid_t fapl)
H5L_info1_t linfo; /* Link information */
/* Retrieve information for link */
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if (H5Lget_info1(group_id, objname, &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -4868,7 +4868,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, b
H5L_info1_t linfo; /* Link info struct */
/* Make link value for increasing/native order queries */
- HDsnprintf(valname, sizeof(valname), "value %02u", (unsigned)n);
+ snprintf(valname, sizeof(valname), "value %02u", (unsigned)n);
/* Verify the link information for first link, in increasing creation order */
memset(&linfo, 0, sizeof(linfo));
@@ -4891,7 +4891,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, b
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end if */
@@ -4900,7 +4900,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, b
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, tmpname, (size_t)NAME_BUF_SIZE,
H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(linkname, tmpname) != 0)
+ if (strcmp(linkname, tmpname) != 0)
TEST_ERROR;
/* Don't test "native" order if there is no creation order index, since
@@ -4930,7 +4930,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, b
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, n, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end if */
@@ -4939,7 +4939,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, b
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, n, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(linkname, tmpname) != 0)
+ if (strcmp(linkname, tmpname) != 0)
TEST_ERROR;
} /* end if */
@@ -4964,7 +4964,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, b
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end if */
@@ -4973,7 +4973,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, b
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(linkname, tmpname) != 0)
+ if (strcmp(linkname, tmpname) != 0)
TEST_ERROR;
/* Verify the link information for first link, in increasing link name order */
@@ -4996,7 +4996,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, b
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, tmpval, (size_t)NAME_BUF_SIZE,
H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end if */
@@ -5005,7 +5005,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, b
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, tmpname, (size_t)NAME_BUF_SIZE,
H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(linkname, tmpname) != 0)
+ if (strcmp(linkname, tmpname) != 0)
TEST_ERROR;
/* Don't test "native" order queries on link name order, since there's not
@@ -5032,7 +5032,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, b
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end if */
@@ -5041,7 +5041,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, b
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(linkname, tmpname) != 0)
+ if (strcmp(linkname, tmpname) != 0)
TEST_ERROR;
/* Success */
@@ -5145,7 +5145,7 @@ link_info_by_idx_deprec(hid_t fapl)
/* Create several links, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Check for creating hard or soft link */
if (hard_link) {
@@ -5160,7 +5160,7 @@ link_info_by_idx_deprec(hid_t fapl)
} /* end if */
else {
/* Make value for link */
- HDsnprintf(valname, sizeof(valname), "value %02u", u);
+ snprintf(valname, sizeof(valname), "value %02u", u);
/* Create soft link */
if (H5Lcreate_soft(valname, group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
@@ -5205,7 +5205,7 @@ link_info_by_idx_deprec(hid_t fapl)
/* Create more links, to push group into dense form */
for (; u < (max_compact * 2); u++) {
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Check for creating hard or soft link */
if (hard_link) {
@@ -5220,7 +5220,7 @@ link_info_by_idx_deprec(hid_t fapl)
} /* end if */
else {
/* Make value for link */
- HDsnprintf(valname, sizeof(valname), "value %02u", u);
+ snprintf(valname, sizeof(valname), "value %02u", u);
/* Create soft link */
if (H5Lcreate_soft(valname, group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
@@ -5337,7 +5337,7 @@ link_info_by_idx_old_deprec(hid_t fapl)
/* Create several links */
for (u = 0; u < CORDER_NLINKS; u++) {
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Check for creating hard or soft link */
if (hard_link) {
@@ -5358,7 +5358,7 @@ link_info_by_idx_old_deprec(hid_t fapl)
} /* end if */
else {
/* Make value for link */
- HDsnprintf(valname, sizeof(valname), "value %02u", u);
+ snprintf(valname, sizeof(valname), "value %02u", u);
/* Create soft link */
if (H5Lcreate_soft(valname, group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
@@ -5371,10 +5371,10 @@ link_info_by_idx_old_deprec(hid_t fapl)
unsigned dec_u = CORDER_NLINKS - (u + 1); /* Decreasing mapped index */
/* Make link name for increasing/native order queries */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Make link value for increasing/native order queries */
- HDsnprintf(valname, sizeof(valname), "value %02u", u);
+ snprintf(valname, sizeof(valname), "value %02u", u);
/* Verify link information (in increasing order) */
if (hard_link) {
@@ -5388,7 +5388,7 @@ link_info_by_idx_old_deprec(hid_t fapl)
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)u, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end else */
@@ -5396,7 +5396,7 @@ link_info_by_idx_old_deprec(hid_t fapl)
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)u, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, tmpname) != 0)
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
/* Verify link information (in native order - native is increasing) */
@@ -5411,7 +5411,7 @@ link_info_by_idx_old_deprec(hid_t fapl)
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)u, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end else */
@@ -5419,14 +5419,14 @@ link_info_by_idx_old_deprec(hid_t fapl)
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)u, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, tmpname) != 0)
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
/* Make link name for decreasing order queries */
- HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u);
+ snprintf(objname, sizeof(objname), "filler %02u", dec_u);
/* Make link value for decreasing order queries */
- HDsnprintf(valname, sizeof(valname), "value %02u", dec_u);
+ snprintf(valname, sizeof(valname), "value %02u", dec_u);
/* Verify link information (in decreasing order) */
if (hard_link) {
@@ -5440,7 +5440,7 @@ link_info_by_idx_old_deprec(hid_t fapl)
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)u, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end else */
@@ -5448,7 +5448,7 @@ link_info_by_idx_old_deprec(hid_t fapl)
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)u, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, tmpname) != 0)
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -5618,7 +5618,7 @@ delete_by_idx_deprec(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -5671,10 +5671,10 @@ delete_by_idx_deprec(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", (u + 1));
+ snprintf(objname, sizeof(objname), "filler %02u", (u + 1));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u", (max_compact - (u + 2)));
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u", (max_compact - (u + 2)));
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -5691,7 +5691,7 @@ delete_by_idx_deprec(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -5745,10 +5745,10 @@ delete_by_idx_deprec(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", (u + 1));
+ snprintf(objname, sizeof(objname), "filler %02u", (u + 1));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u", ((max_compact * 2) - (u + 2)));
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u", ((max_compact * 2) - (u + 2)));
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -5778,7 +5778,7 @@ delete_by_idx_deprec(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -5823,11 +5823,11 @@ delete_by_idx_deprec(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 1));
+ snprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 1));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u",
- ((max_compact * 2) - ((u * 2) + 2)));
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u",
+ ((max_compact * 2) - ((u * 2) + 2)));
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -5857,11 +5857,11 @@ delete_by_idx_deprec(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 3));
+ snprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 3));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u",
- ((max_compact * 2) - ((u * 2) + 4)));
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u",
+ ((max_compact * 2) - ((u * 2) + 4)));
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -5964,7 +5964,7 @@ delete_by_idx_old_deprec(hid_t fapl)
H5O_info1_t oi; /* Buffer for querying object's info */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create group */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -6025,10 +6025,10 @@ delete_by_idx_old_deprec(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", (u + 1));
+ snprintf(objname, sizeof(objname), "filler %02u", (u + 1));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u);
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u", dec_u);
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -6056,7 +6056,7 @@ delete_by_idx_old_deprec(hid_t fapl)
H5O_info1_t oi; /* Buffer for querying object's info */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create group */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -6099,10 +6099,10 @@ delete_by_idx_old_deprec(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 1));
+ snprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 1));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u);
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u", dec_u);
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -6133,10 +6133,10 @@ delete_by_idx_old_deprec(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 3));
+ snprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 3));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u);
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u", dec_u);
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -6217,8 +6217,8 @@ link_iterate_deprec_cb(hid_t group_id, const char *link_name, const H5L_info1_t
} /* end if */
/* Verify name of link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", (unsigned)my_info.corder);
- if (HDstrcmp(link_name, objname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u", (unsigned)my_info.corder);
+ if (strcmp(link_name, objname) != 0)
return H5_ITER_ERROR;
/* Check if we've visited this link before */
@@ -6574,7 +6574,7 @@ link_iterate_deprec(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -6607,7 +6607,7 @@ link_iterate_deprec(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -6713,9 +6713,9 @@ link_iterate_old_deprec_cb(hid_t group_id, const char *link_name, const H5L_info
} /* end if */
/* Verify name of link */
- HDsnprintf(objname, sizeof(objname), "filler %02u",
- (info ? (unsigned)op_data->curr : (unsigned)((op_data->ncalled - 1) + op_data->nskipped)));
- if (HDstrcmp(link_name, objname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u",
+ (info ? (unsigned)op_data->curr : (unsigned)((op_data->ncalled - 1) + op_data->nskipped)));
+ if (strcmp(link_name, objname) != 0)
return H5_ITER_ERROR;
/* Check if we've visited this link before */
@@ -7006,7 +7006,7 @@ link_iterate_old_deprec(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -7132,21 +7132,21 @@ external_link_root(hid_t fapl, bool new_format)
goto error;
if (H5L_TYPE_EXTERNAL != linfo.type) {
H5_FAILED();
- HDputs(" Unexpected object type - should have been an external link");
+ puts(" Unexpected object type - should have been an external link");
goto error;
}
if (H5Lget_val(fid, "ext_link", objname, sizeof(objname), H5P_DEFAULT) < 0)
TEST_ERROR;
if (H5Lunpack_elink_val(objname, linfo.u.val_size, NULL, &file, &path) < 0)
TEST_ERROR;
- if (HDstrcmp(file, filename1) != 0) {
+ if (strcmp(file, filename1) != 0) {
H5_FAILED();
- HDputs(" External link file name incorrect");
+ puts(" External link file name incorrect");
goto error;
}
- if (HDstrcmp(path, "/") != 0) {
+ if (strcmp(path, "/") != 0) {
H5_FAILED();
- HDputs(" External link path incorrect");
+ puts(" External link path incorrect");
goto error;
}
@@ -7160,21 +7160,21 @@ external_link_root(hid_t fapl, bool new_format)
goto error;
if (H5L_TYPE_EXTERNAL != linfo.type) {
H5_FAILED();
- HDputs(" Unexpected object type - should have been an external link");
+ puts(" Unexpected object type - should have been an external link");
goto error;
}
if (H5Lget_val(fid, "ext_link", objname, sizeof(objname), H5P_DEFAULT) < 0)
TEST_ERROR;
if (H5Lunpack_elink_val(objname, linfo.u.val_size, NULL, &file, &path) < 0)
TEST_ERROR;
- if (HDstrcmp(file, filename1) != 0) {
+ if (strcmp(file, filename1) != 0) {
H5_FAILED();
- HDputs(" External link file name incorrect");
+ puts(" External link file name incorrect");
goto error;
}
- if (HDstrcmp(path, "/") != 0) {
+ if (strcmp(path, "/") != 0) {
H5_FAILED();
- HDputs(" External link path incorrect");
+ puts(" External link path incorrect");
goto error;
}
@@ -7191,7 +7191,7 @@ external_link_root(hid_t fapl, bool new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/") != 0)
+ if (strcmp(objname, "/") != 0)
TEST_ERROR;
/* Create object in external file */
@@ -7236,11 +7236,11 @@ external_link_root(hid_t fapl, bool new_format)
/* Check names */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/new_group") != 0)
+ if (strcmp(objname, "/new_group") != 0)
TEST_ERROR;
if (H5Iget_name(gid2, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/newer_group") != 0)
+ if (strcmp(objname, "/newer_group") != 0)
TEST_ERROR;
/* Close opened objects */
@@ -7362,7 +7362,7 @@ external_link_path(hid_t fapl, bool new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/A/B/C") != 0)
+ if (strcmp(objname, "/A/B/C") != 0)
TEST_ERROR;
/* Create object in external file */
@@ -7392,7 +7392,7 @@ external_link_path(hid_t fapl, bool new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/A/B/C/new_group") != 0)
+ if (strcmp(objname, "/A/B/C/new_group") != 0)
TEST_ERROR;
/* Close opened object */
@@ -7534,7 +7534,7 @@ external_link_mult(hid_t fapl, bool new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/A/B/C") != 0)
+ if (strcmp(objname, "/A/B/C") != 0)
TEST_ERROR;
/* Create object in external file */
@@ -7564,7 +7564,7 @@ external_link_mult(hid_t fapl, bool new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/A/B/C/new_group") != 0)
+ if (strcmp(objname, "/A/B/C/new_group") != 0)
TEST_ERROR;
/* Close opened object */
@@ -7680,7 +7680,7 @@ external_link_self(hid_t fapl, bool new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/X") != 0)
+ if (strcmp(objname, "/X") != 0)
TEST_ERROR;
/* Create object through external link */
@@ -7702,7 +7702,7 @@ external_link_self(hid_t fapl, bool new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/X/new_group") != 0)
+ if (strcmp(objname, "/X/new_group") != 0)
TEST_ERROR;
/* Close opened object */
@@ -7882,7 +7882,7 @@ external_link_pingpong(hid_t fapl, bool new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/final") != 0)
+ if (strcmp(objname, "/final") != 0)
TEST_ERROR;
/* Create object in external file */
@@ -7912,7 +7912,7 @@ external_link_pingpong(hid_t fapl, bool new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/final/new_group") != 0)
+ if (strcmp(objname, "/final/new_group") != 0)
TEST_ERROR;
/* Close opened object */
@@ -8074,7 +8074,7 @@ external_link_toomany(hid_t fapl, bool new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/final") != 0)
+ if (strcmp(objname, "/final") != 0)
TEST_ERROR;
/* Create object in external file */
@@ -8173,7 +8173,7 @@ external_link_dangling(hid_t fapl, bool new_format)
H5E_END_TRY
if (gid >= 0) {
H5_FAILED();
- HDputs(" Should have failed for sequence of too many nested links.");
+ puts(" Should have failed for sequence of too many nested links.");
goto error;
}
@@ -8185,7 +8185,7 @@ external_link_dangling(hid_t fapl, bool new_format)
H5E_END_TRY
if (gid >= 0) {
H5_FAILED();
- HDputs(" Should have failed for sequence of too many nested links.");
+ puts(" Should have failed for sequence of too many nested links.");
goto error;
}
@@ -8197,7 +8197,7 @@ external_link_dangling(hid_t fapl, bool new_format)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(
+ puts(
" Retrieving name of object by index through dangling file external link should have failed.");
} /* end if */
@@ -8298,7 +8298,7 @@ external_link_prefix(hid_t fapl, bool new_format)
/* should be able to find the target file from pathnames set via H5Pset_elink_prefix() */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in tmp_links directory.");
+ puts(" Should have found the file in tmp_links directory.");
goto error;
}
@@ -8395,7 +8395,7 @@ external_link_abs_mainpath(hid_t fapl, bool new_format)
/* should be able to find the target file from absolute path set for main file */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in tmp_links directory.");
+ puts(" Should have found the file in tmp_links directory.");
goto error;
}
@@ -8483,7 +8483,7 @@ external_link_rel_mainpath(hid_t fapl, bool new_format)
/* should be able to find the target file from the main file's relative pathname */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in current working directory");
+ puts(" Should have found the file in current working directory");
goto error;
}
@@ -8576,7 +8576,7 @@ external_link_cwd(hid_t fapl, bool new_format)
/* should be able to find the target file from the current working directory */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in current working directory");
+ puts(" Should have found the file in current working directory");
goto error;
}
@@ -8674,7 +8674,7 @@ external_link_abstar(hid_t fapl, bool new_format)
/* should be able to find the target file with absolute path */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in tmp_links directory.");
+ puts(" Should have found the file in tmp_links directory.");
goto error;
}
@@ -8772,7 +8772,7 @@ external_link_abstar_cur(hid_t fapl, bool new_format)
/* should be able to find the target file from main file's current working directory */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in current working directory.");
+ puts(" Should have found the file in current working directory.");
goto error;
}
@@ -8853,7 +8853,7 @@ external_link_reltar(hid_t fapl, bool new_format)
/* Open object through external link */
if ((gid = H5Gopen2(fid, "ext_link", H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDputs(" Should have found the file in tmp_links directory.");
+ puts(" Should have found the file in tmp_links directory.");
goto error;
} /* end if */
@@ -8953,7 +8953,7 @@ external_link_chdir(hid_t fapl, bool new_format)
*/
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in tmp_links directory.");
+ puts(" Should have found the file in tmp_links directory.");
goto error;
}
@@ -9056,27 +9056,27 @@ external_set_elink_fapl1(hid_t fapl, bool new_format)
memb_map[H5FD_MEM_GHEAP] = H5FD_MEM_GHEAP;
memb_map[H5FD_MEM_LHEAP] = H5FD_MEM_LHEAP;
- HDsnprintf(sv[H5FD_MEM_SUPER], sizeof(sv[H5FD_MEM_SUPER]), "%%s-%c.h5", 's');
+ snprintf(sv[H5FD_MEM_SUPER], sizeof(sv[H5FD_MEM_SUPER]), "%%s-%c.h5", 's');
memb_name[H5FD_MEM_SUPER] = sv[H5FD_MEM_SUPER];
memb_addr[H5FD_MEM_SUPER] = 0;
- HDsnprintf(sv[H5FD_MEM_BTREE], sizeof(sv[H5FD_MEM_BTREE]), "%%s-%c.h5", 'b');
+ snprintf(sv[H5FD_MEM_BTREE], sizeof(sv[H5FD_MEM_BTREE]), "%%s-%c.h5", 'b');
memb_name[H5FD_MEM_BTREE] = sv[H5FD_MEM_BTREE];
memb_addr[H5FD_MEM_BTREE] = HADDR_MAX / 6;
- HDsnprintf(sv[H5FD_MEM_DRAW], sizeof(sv[H5FD_MEM_DRAW]), "%%s-%c.h5", 'r');
+ snprintf(sv[H5FD_MEM_DRAW], sizeof(sv[H5FD_MEM_DRAW]), "%%s-%c.h5", 'r');
memb_name[H5FD_MEM_DRAW] = sv[H5FD_MEM_DRAW];
memb_addr[H5FD_MEM_DRAW] = HADDR_MAX / 3;
- HDsnprintf(sv[H5FD_MEM_GHEAP], sizeof(sv[H5FD_MEM_GHEAP]), "%%s-%c.h5", 'g');
+ snprintf(sv[H5FD_MEM_GHEAP], sizeof(sv[H5FD_MEM_GHEAP]), "%%s-%c.h5", 'g');
memb_name[H5FD_MEM_GHEAP] = sv[H5FD_MEM_GHEAP];
memb_addr[H5FD_MEM_GHEAP] = HADDR_MAX / 2;
- HDsnprintf(sv[H5FD_MEM_LHEAP], sizeof(sv[H5FD_MEM_LHEAP]), "%%s-%c.h5", 'l');
+ snprintf(sv[H5FD_MEM_LHEAP], sizeof(sv[H5FD_MEM_LHEAP]), "%%s-%c.h5", 'l');
memb_name[H5FD_MEM_LHEAP] = sv[H5FD_MEM_LHEAP];
memb_addr[H5FD_MEM_LHEAP] = (HADDR_MAX / 3) * 2;
- HDsnprintf(sv[H5FD_MEM_OHDR], sizeof(sv[H5FD_MEM_OHDR]), "%%s-%c.h5", 'o');
+ snprintf(sv[H5FD_MEM_OHDR], sizeof(sv[H5FD_MEM_OHDR]), "%%s-%c.h5", 'o');
memb_name[H5FD_MEM_OHDR] = sv[H5FD_MEM_OHDR];
memb_addr[H5FD_MEM_OHDR] = (HADDR_MAX / 6) * 5;
@@ -9134,7 +9134,7 @@ external_set_elink_fapl1(hid_t fapl, bool new_format)
/* should succeed in opening the target object A in the current working directory */
if (oidA < 0) {
H5_FAILED();
- HDputs(" Should succeed in opening family target file A in current working directory");
+ puts(" Should succeed in opening family target file A in current working directory");
goto error;
}
@@ -9150,7 +9150,7 @@ external_set_elink_fapl1(hid_t fapl, bool new_format)
/* should succeed in opening the target object B in the current working directory */
if (oidB < 0) {
H5_FAILED();
- HDputs(" Should succeed in opening multi target file B in current working directory");
+ puts(" Should succeed in opening multi target file B in current working directory");
goto error;
}
@@ -9341,7 +9341,7 @@ external_set_elink_fapl2(hid_t fapl, bool new_format)
did = H5Dopen2(fid, "ext_link", dapl_id);
if (did < 0) {
H5_FAILED();
- HDputs(" Should succeed in opening the target dataset");
+ puts(" Should succeed in opening the target dataset");
goto error;
}
@@ -9846,13 +9846,13 @@ external_set_elink_cb_cb(const char *parent_file, const char *parent_group, cons
set_elink_cb_t *op_data = (set_elink_cb_t *)_op_data;
/* Verify file and object names are correct */
- if (HDstrcmp(parent_file, op_data->parent_file) != 0)
+ if (strcmp(parent_file, op_data->parent_file) != 0)
return FAIL;
- if (HDstrcmp(parent_group, "/group1") != 0)
+ if (strcmp(parent_group, "/group1") != 0)
return FAIL;
- if (HDstrcmp(target_file, op_data->target_file) != 0)
+ if (strcmp(target_file, op_data->target_file) != 0)
return FAIL;
- if (HDstrcmp(target_obj, "/") != 0)
+ if (strcmp(target_obj, "/") != 0)
return FAIL;
/* Set flags to be read-write */
@@ -10124,9 +10124,9 @@ external_link_win1(hid_t fapl, bool new_format)
TEST_ERROR;
/* set up name for target link: "/CWD/tmp_links/extlinks10" */
- HDstrcpy(tmpname, &cwdpath[2]); /* stripped the drive letter to make it rel drive but absolute path */
- HDstrcat(tmpname, "/");
- HDstrcat(tmpname, FILENAME[30]);
+ strcpy(tmpname, &cwdpath[2]); /* stripped the drive letter to make it rel drive but absolute path */
+ strcat(tmpname, "/");
+ strcat(tmpname, FILENAME[30]);
h5_fixname(tmpname, fapl, filename2, sizeof filename2);
/* set up name for target file: "extlinks10" */
@@ -10162,7 +10162,7 @@ external_link_win1(hid_t fapl, bool new_format)
/* should be able to find the target file via main file's CWD*/
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in CWD.");
+ puts(" Should have found the file in CWD.");
goto error;
}
@@ -10220,10 +10220,9 @@ external_link_win2(hid_t fapl, bool new_format)
TEST_ERROR;
/* set up name for target link: "/CWD/tmp_links/extlinks11" */
- HDstrcpy(tmpname,
- &cwdpath[2]); /* stripped the drive letter to make it relative drive but absolute path */
- HDstrcat(tmpname, "/");
- HDstrcat(tmpname, FILENAME[31]);
+ strcpy(tmpname, &cwdpath[2]); /* stripped the drive letter to make it relative drive but absolute path */
+ strcat(tmpname, "/");
+ strcat(tmpname, FILENAME[31]);
h5_fixname(tmpname, fapl, filename2, sizeof filename2);
/* set up name for target file: "tmp_links/extlinks11" */
@@ -10259,7 +10258,7 @@ external_link_win2(hid_t fapl, bool new_format)
/* should be able to find the target file directly */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in tmp_links.");
+ puts(" Should have found the file in tmp_links.");
goto error;
}
@@ -10317,7 +10316,7 @@ external_link_win3(hid_t fapl, bool new_format)
/* set up name for target link: "<drive-letter>:tmp_links/extlinks12" */
drive = HDgetdrive();
- HDsnprintf(tmpname, sizeof(tmpname), "%c:%s", (drive + 'A' - 1), FILENAME[32]);
+ snprintf(tmpname, sizeof(tmpname), "%c:%s", (drive + 'A' - 1), FILENAME[32]);
h5_fixname(tmpname, fapl, filename2, sizeof filename2);
/* set up name for target file: "tmp_links/extlinks12" */
@@ -10353,7 +10352,7 @@ external_link_win3(hid_t fapl, bool new_format)
/* should be able to find the target file directly */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in tmp_links.");
+ puts(" Should have found the file in tmp_links.");
goto error;
}
@@ -10404,11 +10403,11 @@ external_link_win4(hid_t fapl, bool new_format)
/* set up name for main file: "<drive-letter>:tmp_links/extlinks0" */
drive = HDgetdrive();
- HDsnprintf(tmpname, sizeof(tmpname), "%c:%s", (drive + 'A' - 1), FILENAME[13]);
+ snprintf(tmpname, sizeof(tmpname), "%c:%s", (drive + 'A' - 1), FILENAME[13]);
h5_fixname(tmpname, fapl, filename1, sizeof filename1);
/* set up name for target link: "<drive-letter>:extlinks13" */
- HDsnprintf(tmpname, sizeof(tmpname), "%c:%s", (drive + 'A' - 1), FILENAME[33]);
+ snprintf(tmpname, sizeof(tmpname), "%c:%s", (drive + 'A' - 1), FILENAME[33]);
h5_fixname(tmpname, fapl, filename2, sizeof filename2);
/* set up name for target file: "tmp_links/extlinks13" */
@@ -10444,7 +10443,7 @@ external_link_win4(hid_t fapl, bool new_format)
/* should be able to find the target file via main file's absolute drive/relative path */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in CWD.");
+ puts(" Should have found the file in CWD.");
goto error;
}
@@ -10503,13 +10502,13 @@ external_link_win5(hid_t fapl, bool new_format)
drive += 1;
/* set up name for main file: "/CWD/extlinks0" */
- HDstrcpy(tmpname, &cwdpath[2]); /* stripped the drive letter to make it rel drive but absolute path */
- HDstrcat(tmpname, "/");
- HDstrcat(tmpname, FILENAME[12]);
+ strcpy(tmpname, &cwdpath[2]); /* stripped the drive letter to make it rel drive but absolute path */
+ strcat(tmpname, "/");
+ strcat(tmpname, FILENAME[12]);
h5_fixname(tmpname, fapl, filename1, sizeof filename1);
/* set up name for target link: "<drive-letter+1>:tmp_links/extlinks14" */
- HDsnprintf(tmpname, sizeof(tmpname), "%c:%s", (drive + 'A' - 1), FILENAME[35]);
+ snprintf(tmpname, sizeof(tmpname), "%c:%s", (drive + 'A' - 1), FILENAME[35]);
h5_fixname(tmpname, fapl, filename2, sizeof filename2);
/* set up name for target file: "tmp_links/extlinks14" */
@@ -10545,7 +10544,7 @@ external_link_win5(hid_t fapl, bool new_format)
/* should be able to find the target file via main file's rel drive/abs path */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in CWD.");
+ puts(" Should have found the file in CWD.");
goto error;
}
@@ -10607,7 +10606,7 @@ external_link_win6(hid_t fapl, bool new_format)
h5_fixname(FILENAME[12], fapl, filename1, sizeof filename1);
/* set up name for target link: "<drive-letter+1>:tmp_links/extlinks15" */
- HDsnprintf(tmpname, sizeof(tmpname), "%c:%s", (drive + 'A' - 1), FILENAME[36]);
+ snprintf(tmpname, sizeof(tmpname), "%c:%s", (drive + 'A' - 1), FILENAME[36]);
h5_fixname(tmpname, fapl, filename2, sizeof filename2);
/* set up name for target file: "tmp/extlinks15" */
@@ -10643,7 +10642,7 @@ external_link_win6(hid_t fapl, bool new_format)
/* should be able to find the target file via target file's rel path in current drive */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in tmp_links.");
+ puts(" Should have found the file in tmp_links.");
goto error;
}
@@ -10700,9 +10699,9 @@ external_link_win7(hid_t fapl, bool new_format)
TEST_ERROR;
/* set up name for target link: "\\127.0.0.1\c$/tmp_links/extlinks10" */
- HDstrcpy(tmpname, "\\\\127.0.0.1\\c$"); /* absolute path */
- HDstrcat(tmpname, "/");
- HDstrcat(tmpname, FILENAME[30]);
+ strcpy(tmpname, "\\\\127.0.0.1\\c$"); /* absolute path */
+ strcat(tmpname, "/");
+ strcat(tmpname, FILENAME[30]);
h5_fixname(tmpname, fapl, filename2, sizeof filename2);
/* set up name for target file: "extlinks15" */
@@ -10738,7 +10737,7 @@ external_link_win7(hid_t fapl, bool new_format)
/* should be able to find the target file via main file's local host/main drive*/
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in local host/main drive.");
+ puts(" Should have found the file in local host/main drive.");
goto error;
}
@@ -10802,7 +10801,7 @@ external_link_win8(hid_t fapl, bool new_format)
/* set up name for target link: "<drive-letter>:\CWD\extlinks10" */
drive = HDgetdrive();
- HDsnprintf(tmpname, sizeof(tmpname), "\\\\?\\%c:%s\\%s", (drive + 'A' - 1), &cwdpath[2], FILENAME[30]);
+ snprintf(tmpname, sizeof(tmpname), "\\\\?\\%c:%s\\%s", (drive + 'A' - 1), &cwdpath[2], FILENAME[30]);
h5_fixname(tmpname, fapl, filename2, sizeof filename2);
/* set up name for target file: "extlinks10" */
@@ -10838,7 +10837,7 @@ external_link_win8(hid_t fapl, bool new_format)
/* should be able to find the target file directly */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in tmp_links.");
+ puts(" Should have found the file in tmp_links.");
goto error;
}
@@ -10895,9 +10894,9 @@ external_link_win9(hid_t fapl, bool new_format)
TEST_ERROR;
/* set up name for target link: "\\?\UNC\127.0.0.1\c$/tmp_links/extlinks10" */
- HDstrcpy(tmpname, "\\\\?\\UNC\127.0.0.1\\c$"); /* absolute path */
- HDstrcat(tmpname, "/");
- HDstrcat(tmpname, FILENAME[30]);
+ strcpy(tmpname, "\\\\?\\UNC\127.0.0.1\\c$"); /* absolute path */
+ strcat(tmpname, "/");
+ strcat(tmpname, FILENAME[30]);
h5_fixname(tmpname, fapl, filename2, sizeof filename2);
/* set up name for target file: "extlinks15" */
@@ -10933,7 +10932,7 @@ external_link_win9(hid_t fapl, bool new_format)
/* should be able to find the target file via main file's local host/main drive*/
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in local host/main drive.");
+ puts(" Should have found the file in local host/main drive.");
goto error;
}
@@ -11006,7 +11005,7 @@ external_link_recursive(hid_t fapl, bool new_format)
H5E_END_TRY
if (gid >= 0) {
H5_FAILED();
- HDputs(" Should have failed for recursive external links.");
+ puts(" Should have failed for recursive external links.");
goto error;
}
@@ -11070,11 +11069,11 @@ external_link_query(hid_t fapl, bool new_format)
/* Get size of buffer for external link */
if (H5Lget_info2(fid, "src", &li, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (li.u.val_size != (1 + (HDstrlen(filename2) + 1) + (HDstrlen("/dst") + 1)))
+ if (li.u.val_size != (1 + (strlen(filename2) + 1) + (strlen("/dst") + 1)))
TEST_ERROR;
if (H5L_TYPE_EXTERNAL != li.type) {
H5_FAILED();
- HDputs(" Unexpected link class - should have been an external link");
+ puts(" Unexpected link class - should have been an external link");
goto error;
}
@@ -11103,11 +11102,11 @@ external_link_query(hid_t fapl, bool new_format)
/* Get size of buffer for external link */
if (H5Lget_info2(fid, "src", &li, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (li.u.val_size != (1 + (HDstrlen(filename2) + 1) + (HDstrlen("/dst") + 1)))
+ if (li.u.val_size != (1 + (strlen(filename2) + 1) + (strlen("/dst") + 1)))
TEST_ERROR;
if (H5L_TYPE_EXTERNAL != li.type) {
H5_FAILED();
- HDputs(" Unexpected link class - should have been an external link");
+ puts(" Unexpected link class - should have been an external link");
goto error;
}
@@ -11120,9 +11119,9 @@ external_link_query(hid_t fapl, bool new_format)
TEST_ERROR;
/* Compare the file and object names */
- if (HDstrcmp(file_name, filename2) != 0)
+ if (strcmp(file_name, filename2) != 0)
TEST_ERROR;
- if (HDstrcmp(object_name, "/dst") != 0)
+ if (strcmp(object_name, "/dst") != 0)
TEST_ERROR;
/* Query information about object that external link points to */
@@ -11130,7 +11129,7 @@ external_link_query(hid_t fapl, bool new_format)
FAIL_STACK_ERROR;
if (H5O_TYPE_GROUP != oi.type) {
H5_FAILED();
- HDputs(" Unexpected object type - should have been a group");
+ puts(" Unexpected object type - should have been a group");
goto error;
}
@@ -11341,7 +11340,7 @@ external_link_unlink_dense(hid_t fapl, bool new_format)
/* Create enough objects in the root group to change it into a "dense" group */
for (u = 0; u < max_compact; u++) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if ((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(gid2) < 0)
@@ -11396,7 +11395,7 @@ external_link_unlink_dense(hid_t fapl, bool new_format)
/* Remove enough objects in the root group to change it into a "compact" group */
for (u = 0; u < ((max_compact - min_dense) + 1); u++) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if (H5Ldelete(gid, objname, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -11519,7 +11518,7 @@ external_link_move(hid_t fapl, bool new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(objname, "/dst") != 0)
+ if (strcmp(objname, "/dst") != 0)
TEST_ERROR;
/* Create object in external file */
@@ -11579,7 +11578,7 @@ external_link_move(hid_t fapl, bool new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(objname, "/dst") != 0)
+ if (strcmp(objname, "/dst") != 0)
TEST_ERROR;
/* Create object in external file */
@@ -11626,7 +11625,7 @@ external_link_move(hid_t fapl, bool new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(objname, "/dst") != 0)
+ if (strcmp(objname, "/dst") != 0)
TEST_ERROR;
/* Move external link back to original location */
@@ -11636,7 +11635,7 @@ external_link_move(hid_t fapl, bool new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(objname, "/dst") != 0)
+ if (strcmp(objname, "/dst") != 0)
TEST_ERROR;
/* Create object in external file */
@@ -11737,7 +11736,7 @@ external_link_ride(hid_t fapl, bool new_format)
/* Create enough objects in the root group to change it into a "dense" group */
for (u = 0; u < (max_compact + 1); u++) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if ((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(gid2) < 0)
@@ -11810,7 +11809,7 @@ external_link_ride(hid_t fapl, bool new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/dst") != 0)
+ if (strcmp(objname, "/dst") != 0)
TEST_ERROR;
/* Create object in external file */
@@ -11831,7 +11830,7 @@ external_link_ride(hid_t fapl, bool new_format)
/* Remove enough objects in the root group to change it into a "compact" group */
for (u = 0; u < ((max_compact - min_dense) + 3); u++) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if (H5Ldelete(gid, objname, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -11859,7 +11858,7 @@ external_link_ride(hid_t fapl, bool new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/dst") != 0)
+ if (strcmp(objname, "/dst") != 0)
TEST_ERROR;
/* Create object in external file */
@@ -12054,7 +12053,7 @@ external_link_closing(hid_t fapl, bool new_format)
FAIL_STACK_ERROR;
if (H5Oget_comment_by_name(fid1, "elink/elink/elink/group1_moved", buf, sizeof(buf), H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(buf, "comment") != 0)
+ if (strcmp(buf, "comment") != 0)
TEST_ERROR;
/* Test H5*open */
@@ -12397,7 +12396,7 @@ external_link_strong(hid_t fapl, bool new_format)
FAIL_STACK_ERROR;
if (H5Iget_name(gid2, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/A/B/C") != 0)
+ if (strcmp(objname, "/A/B/C") != 0)
TEST_ERROR;
if (H5Gclose(gid2) < 0)
TEST_ERROR;
@@ -12471,11 +12470,11 @@ external_symlink(const char *env_h5_drvr, hid_t fapl, bool new_format)
/* Skip test when using VFDs that can't provide a POSIX compatible file
* descriptor.
*/
- have_posix_compat_vfd = (bool)(!HDstrcmp(env_h5_drvr, "sec2") || !HDstrcmp(env_h5_drvr, "core") ||
- !HDstrcmp(env_h5_drvr, "nomatch"));
+ have_posix_compat_vfd = (bool)(!strcmp(env_h5_drvr, "sec2") || !strcmp(env_h5_drvr, "core") ||
+ !strcmp(env_h5_drvr, "nomatch"));
if (!have_posix_compat_vfd) {
SKIPPED();
- HDputs(" Current VFD doesn't support POSIX I/O calls");
+ puts(" Current VFD doesn't support POSIX I/O calls");
return SUCCEED;
}
@@ -12716,7 +12715,7 @@ error:
#else /* H5_HAVE_SYMLINK */
SKIPPED();
- HDputs(" Current file system or operating system doesn't support symbolic links");
+ puts(" Current file system or operating system doesn't support symbolic links");
return SUCCEED;
#endif /* H5_HAVE_SYMLINK */
@@ -13770,7 +13769,7 @@ external_link_public_macros(hid_t fapl, bool new_format)
if (H5L_TYPE_EXTERNAL != linfo.type) {
H5_FAILED();
- HDputs(" Unexpected object type - should have been an external link");
+ puts(" Unexpected object type - should have been an external link");
goto error;
}
@@ -13780,22 +13779,22 @@ external_link_public_macros(hid_t fapl, bool new_format)
if (H5Lunpack_elink_val(objname, linfo.u.val_size, &flags, &file, &path) < 0)
TEST_ERROR;
- if (HDstrcmp(file, filename1) != 0) {
+ if (strcmp(file, filename1) != 0) {
H5_FAILED();
- HDputs(" External link file name incorrect");
+ puts(" External link file name incorrect");
goto error;
}
- if (HDstrcmp(path, "/") != 0) {
+ if (strcmp(path, "/") != 0) {
H5_FAILED();
- HDputs(" External link path incorrect");
+ puts(" External link path incorrect");
goto error;
}
/* External link version & flags */
if (flags != ((H5L_EXT_VERSION << 4) | H5L_EXT_FLAGS_ALL)) {
H5_FAILED();
- HDputs(" External link version or flags are incorrect");
+ puts(" External link version or flags are incorrect");
goto error;
}
@@ -14070,7 +14069,7 @@ ud_hard_links(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/group") != 0)
+ if (strcmp(objname, "/group") != 0)
TEST_ERROR;
/* Create object in group */
@@ -14090,7 +14089,7 @@ ud_hard_links(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/group/new_group") != 0)
+ if (strcmp(objname, "/group/new_group") != 0)
TEST_ERROR;
/* Close opened object */
@@ -14105,7 +14104,7 @@ ud_hard_links(hid_t fapl)
TEST_ERROR;
if (UD_HARD_TYPE != li.type) {
H5_FAILED();
- HDputs(" Unexpected link class - should have been a UD hard link");
+ puts(" Unexpected link class - should have been a UD hard link");
goto error;
} /* end if */
@@ -14281,7 +14280,7 @@ ud_link_reregister(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/" REREG_TARGET_NAME) != 0)
+ if (strcmp(objname, "/" REREG_TARGET_NAME) != 0)
TEST_ERROR;
/* Create object in group */
@@ -14301,7 +14300,7 @@ ud_link_reregister(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/rereg_target/new_group") != 0)
+ if (strcmp(objname, "/rereg_target/new_group") != 0)
TEST_ERROR;
/* Close opened object */
@@ -14390,9 +14389,9 @@ UD_cb_create(const char *link_name, hid_t loc_group, const void *udata, size_t u
if (lcpl_id < 0)
TEST_ERROR;
- if (HDstrcmp(link_name, UD_CB_LINK_NAME) != 0 && HDstrcmp(link_name, NEW_UD_CB_LINK_NAME) != 0)
+ if (strcmp(link_name, UD_CB_LINK_NAME) != 0 && strcmp(link_name, NEW_UD_CB_LINK_NAME) != 0)
TEST_ERROR;
- if (HDstrcmp((const char *)udata, UD_CB_TARGET) != 0)
+ if (strcmp((const char *)udata, UD_CB_TARGET) != 0)
TEST_ERROR;
if (udata_size != UD_CB_TARGET_LEN)
TEST_ERROR;
@@ -14417,9 +14416,9 @@ UD_cb_traverse(const char *link_name, hid_t cur_group, const void *udata, size_t
if (udata_size > 0 && !udata)
TEST_ERROR;
- if (HDstrcmp(link_name, UD_CB_LINK_NAME) != 0 && HDstrcmp(link_name, NEW_UD_CB_LINK_NAME) != 0)
+ if (strcmp(link_name, UD_CB_LINK_NAME) != 0 && strcmp(link_name, NEW_UD_CB_LINK_NAME) != 0)
TEST_ERROR;
- if (HDstrcmp((const char *)udata, UD_CB_TARGET) != 0)
+ if (strcmp((const char *)udata, UD_CB_TARGET) != 0)
TEST_ERROR;
if (udata_size != UD_CB_TARGET_LEN)
TEST_ERROR;
@@ -14444,9 +14443,9 @@ UD_cb_move(const char *new_name, hid_t new_loc, const void *udata, size_t udata_
if (udata_size > 0 && !udata)
TEST_ERROR;
- if (HDstrcmp(new_name, NEW_UD_CB_LINK_NAME) != 0)
+ if (strcmp(new_name, NEW_UD_CB_LINK_NAME) != 0)
TEST_ERROR;
- if (HDstrcmp((const char *)udata, UD_CB_TARGET) != 0)
+ if (strcmp((const char *)udata, UD_CB_TARGET) != 0)
TEST_ERROR;
if (udata_size != UD_CB_TARGET_LEN)
TEST_ERROR;
@@ -14468,9 +14467,9 @@ UD_cb_delete(const char *link_name, hid_t file, const void *udata, size_t udata_
if (udata_size > 0 && !udata)
TEST_ERROR;
- if (HDstrcmp(link_name, UD_CB_LINK_NAME) != 0 && HDstrcmp(link_name, NEW_UD_CB_LINK_NAME) != 0)
+ if (strcmp(link_name, UD_CB_LINK_NAME) != 0 && strcmp(link_name, NEW_UD_CB_LINK_NAME) != 0)
TEST_ERROR;
- if (HDstrcmp((const char *)udata, UD_CB_TARGET) != 0)
+ if (strcmp((const char *)udata, UD_CB_TARGET) != 0)
TEST_ERROR;
if (udata_size != UD_CB_TARGET_LEN)
TEST_ERROR;
@@ -14490,9 +14489,9 @@ UD_cb_query(const char *link_name, const void *udata, size_t udata_size, void *b
if (udata_size > 0 && !udata)
TEST_ERROR;
- if (HDstrcmp(link_name, UD_CB_LINK_NAME) != 0)
+ if (strcmp(link_name, UD_CB_LINK_NAME) != 0)
TEST_ERROR;
- if (HDstrcmp((const char *)udata, UD_CB_TARGET) != 0)
+ if (strcmp((const char *)udata, UD_CB_TARGET) != 0)
TEST_ERROR;
if (udata_size != UD_CB_TARGET_LEN)
TEST_ERROR;
@@ -14500,7 +14499,7 @@ UD_cb_query(const char *link_name, const void *udata, size_t udata_size, void *b
if (buf) {
if (buf_size < 16)
TEST_ERROR;
- HDstrcpy((char *)buf, "query succeeded");
+ strcpy((char *)buf, "query succeeded");
} /* end if */
/* There are 15 characters and a NULL in "query succeeded" */
@@ -14582,14 +14581,14 @@ ud_callbacks(hid_t fapl, bool new_format)
TEST_ERROR;
if (UD_CB_TYPE != li.type) {
H5_FAILED();
- HDputs(" Unexpected link class - should have been a UD hard link");
+ puts(" Unexpected link class - should have been a UD hard link");
goto error;
}
/* Fill the query buffer */
if (H5Lget_val(fid, UD_CB_LINK_NAME, query_buf, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(query_buf, "query succeeded") != 0)
+ if (strcmp(query_buf, "query succeeded") != 0)
TEST_ERROR;
/* Move the link */
@@ -14767,7 +14766,7 @@ lapl_udata(hid_t fapl, bool new_format)
/* Create a non-default lapl with a new property pointing to group a*/
if ((plist_id = H5Pcreate(H5P_LINK_ACCESS)) < 0)
TEST_ERROR;
- HDstrcpy(group_a_name, "group_a");
+ strcpy(group_a_name, "group_a");
if (H5Pinsert2(plist_id, DEST_PROP_NAME, (size_t)NAME_BUF_SIZE, group_a_name, NULL, NULL, NULL, NULL,
NULL, NULL) < 0)
TEST_ERROR;
@@ -14789,7 +14788,7 @@ lapl_udata(hid_t fapl, bool new_format)
TEST_ERROR;
/* Now use the same ud link to access group_b */
- HDstrcpy(group_b_name, "group_b");
+ strcpy(group_b_name, "group_b");
if (H5Pset(plist_id, DEST_PROP_NAME, group_b_name) < 0)
TEST_ERROR;
@@ -14945,7 +14944,7 @@ UD_cbsucc_query(const char H5_ATTR_UNUSED *link_name, const void H5_ATTR_UNUSED
*/
if (buf != NULL && buf_size >= 8)
- HDstrcpy((char *)buf, "succeed");
+ strcpy((char *)buf, "succeed");
return 8;
} /* end UD_cbsucc_query() */
@@ -15103,8 +15102,8 @@ ud_link_errors(hid_t fapl, bool new_format)
H5E_END_TRY
/* Create a user-defined link to the group. */
- HDstrcpy(group_name, "/group");
- if (H5Lcreate_ud(fid, "/ud_link", (H5L_type_t)UD_CBFAIL_TYPE, &group_name, HDstrlen(group_name) + 1,
+ strcpy(group_name, "/group");
+ if (H5Lcreate_ud(fid, "/ud_link", (H5L_type_t)UD_CBFAIL_TYPE, &group_name, strlen(group_name) + 1,
H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
@@ -15182,7 +15181,7 @@ ud_link_errors(hid_t fapl, bool new_format)
TEST_ERROR;
if (H5Lget_val(fid, "ud_link", query_buf, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(query_buf, "succeed") != 0)
+ if (strcmp(query_buf, "succeed") != 0)
TEST_ERROR;
/* Moving and copying should both succeed */
@@ -15324,7 +15323,7 @@ lapl_nlinks(hid_t fapl, bool new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/soft17") != 0)
+ if (strcmp(objname, "/soft17") != 0)
TEST_ERROR;
/* Create group using soft link */
@@ -15357,7 +15356,7 @@ lapl_nlinks(hid_t fapl, bool new_format)
H5E_END_TRY
if (gid >= 0) {
H5_FAILED();
- HDputs(" Should have failed for sequence of too many nested links.");
+ puts(" Should have failed for sequence of too many nested links.");
goto error;
}
@@ -15368,7 +15367,7 @@ lapl_nlinks(hid_t fapl, bool new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/soft4") != 0)
+ if (strcmp(objname, "/soft4") != 0)
TEST_ERROR;
/* Test other functions that should use a LAPL */
@@ -15828,7 +15827,7 @@ visit_link_cb(hid_t H5_ATTR_UNUSED group_id, const char *name, const H5L_info2_t
lvisit_ud_t *op_data = (lvisit_ud_t *)_op_data;
/* Check for correct link information */
- if (HDstrcmp(op_data->info[op_data->idx].path, name) != 0)
+ if (strcmp(op_data->info[op_data->idx].path, name) != 0)
return (H5_ITER_ERROR);
if (op_data->info[op_data->idx].type != linfo->type)
return (H5_ITER_ERROR);
@@ -16019,7 +16018,7 @@ visit_obj_cb(hid_t H5_ATTR_UNUSED group_id, const char *name, const H5O_info2_t
ovisit_ud_t *op_data = (ovisit_ud_t *)_op_data;
/* Check for correct object information */
- if (HDstrcmp(op_data->info[op_data->idx].path, name) != 0)
+ if (strcmp(op_data->info[op_data->idx].path, name) != 0)
return (H5_ITER_ERROR);
if (op_data->info[op_data->idx].type != oinfo->type)
return (H5_ITER_ERROR);
@@ -16556,13 +16555,13 @@ link_filters(hid_t fapl, bool new_format)
if (H5Pget_filter_by_id2(gcpl2, H5Z_FILTER_RESERVED + 42, &flags_out, &cd_nelmts, &cd_value_out,
(size_t)24, name_out, &filter_config_out) < 0)
TEST_ERROR;
- if (flags_out != 0 || cd_value_out != cd_value || HDstrcmp(filter_class.name, name_out) != 0 ||
+ if (flags_out != 0 || cd_value_out != cd_value || strcmp(filter_class.name, name_out) != 0 ||
filter_config_out != (H5Z_FILTER_CONFIG_ENCODE_ENABLED | H5Z_FILTER_CONFIG_DECODE_ENABLED))
TEST_ERROR;
if (H5Pget_filter2(gcpl2, (unsigned)(nfilters - 1), &flags_out, &cd_nelmts, &cd_value_out, (size_t)24,
name_out, &filter_config_out) < 0)
TEST_ERROR;
- if (flags_out != 0 || cd_value_out != cd_value || HDstrcmp(filter_class.name, name_out) != 0 ||
+ if (flags_out != 0 || cd_value_out != cd_value || strcmp(filter_class.name, name_out) != 0 ||
filter_config_out != (H5Z_FILTER_CONFIG_ENCODE_ENABLED | H5Z_FILTER_CONFIG_DECODE_ENABLED))
TEST_ERROR;
@@ -16573,7 +16572,7 @@ link_filters(hid_t fapl, bool new_format)
if (H5Pget_filter_by_id2(gcpl2, H5Z_FILTER_RESERVED + 42, &flags_out, &cd_nelmts, &cd_value_out,
(size_t)24, name_out, &filter_config_out) < 0)
TEST_ERROR;
- if (flags_out != 0 || cd_value_out != cd_value || HDstrcmp(filter_class.name, name_out) != 0 ||
+ if (flags_out != 0 || cd_value_out != cd_value || strcmp(filter_class.name, name_out) != 0 ||
filter_config_out != (H5Z_FILTER_CONFIG_ENCODE_ENABLED | H5Z_FILTER_CONFIG_DECODE_ENABLED))
TEST_ERROR;
@@ -17142,7 +17141,7 @@ corder_create_empty(hid_t fapl)
H5E_END_TRY
if (ret > 0) {
H5_FAILED();
- HDputs(
+ puts(
" H5Pset_link_create_order() should have failed for a creation order index with no tracking.");
TEST_ERROR;
} /* end if */
@@ -17283,7 +17282,7 @@ corder_create_compact(hid_t fapl)
/* Create several links, but keep group in compact form */
for (u = 0; u < max_compact; u++) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(group_id2) < 0)
@@ -17336,7 +17335,7 @@ corder_create_compact(hid_t fapl)
H5L_info2_t linfo; /* Link information */
/* Retrieve information for link */
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if (H5Lget_info2(group_id, objname, &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -17427,7 +17426,7 @@ corder_create_dense(hid_t fapl)
/* Create several links, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(group_id2) < 0)
@@ -17445,7 +17444,7 @@ corder_create_dense(hid_t fapl)
} /* end for */
/* Create another link, to push group into dense form */
- HDsnprintf(objname, sizeof(objname), "filler %u", max_compact);
+ snprintf(objname, sizeof(objname), "filler %u", max_compact);
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(group_id2) < 0)
@@ -17499,7 +17498,7 @@ corder_create_dense(hid_t fapl)
H5L_info2_t linfo; /* Link information */
/* Retrieve information for link */
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if (H5Lget_info2(group_id, objname, &linfo, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -17614,7 +17613,7 @@ corder_transition(hid_t fapl)
/* Create several links, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(group_id2) < 0)
@@ -17622,7 +17621,7 @@ corder_transition(hid_t fapl)
} /* end for */
/* Create another link, to push group into dense form */
- HDsnprintf(objname, sizeof(objname), "filler %u", max_compact);
+ snprintf(objname, sizeof(objname), "filler %u", max_compact);
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(group_id2) < 0)
@@ -17644,7 +17643,7 @@ corder_transition(hid_t fapl)
/* Delete several links from group, until it resumes compact form */
for (u = max_compact; u >= min_dense; u--) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if (H5Ldelete(group_id, objname, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -17664,7 +17663,7 @@ corder_transition(hid_t fapl)
} /* end for */
/* Delete another link, to push group into compact form */
- HDsnprintf(objname, sizeof(objname), "filler %u", (min_dense - 1));
+ snprintf(objname, sizeof(objname), "filler %u", (min_dense - 1));
if (H5Ldelete(group_id, objname, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -17680,7 +17679,7 @@ corder_transition(hid_t fapl)
/* Re-add links to get back into dense form */
for (u = (min_dense - 1); u < (max_compact + 1); u++) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(group_id2) < 0)
@@ -17733,7 +17732,7 @@ corder_transition(hid_t fapl)
/* Delete several links from group, until it resumes compact form */
for (u = max_compact; u >= min_dense; u--) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if (H5Ldelete(group_id, objname, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -17753,7 +17752,7 @@ corder_transition(hid_t fapl)
} /* end for */
/* Delete another link, to push group into compact form */
- HDsnprintf(objname, sizeof(objname), "filler %u", (min_dense - 1));
+ snprintf(objname, sizeof(objname), "filler %u", (min_dense - 1));
if (H5Ldelete(group_id, objname, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -17769,7 +17768,7 @@ corder_transition(hid_t fapl)
/* Re-add links to get back into dense form */
for (u = (min_dense - 1); u < (max_compact + 1); u++) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(group_id2) < 0)
@@ -17792,11 +17791,11 @@ corder_transition(hid_t fapl)
/* Delete all the links */
for (u = max_compact; u > 0; u--) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if (H5Ldelete(group_id, objname, H5P_DEFAULT) < 0)
TEST_ERROR;
} /* end for */
- HDsnprintf(objname, sizeof(objname), "filler %u", (unsigned)0);
+ snprintf(objname, sizeof(objname), "filler %u", (unsigned)0);
if (H5Ldelete(group_id, objname, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -17908,7 +17907,7 @@ corder_delete(hid_t fapl)
/* Create links until the group is in dense form */
for (u = 0; u < max_compact * 2; u++) {
- HDsnprintf(objname, sizeof(objname), "filler %u", u);
+ snprintf(objname, sizeof(objname), "filler %u", u);
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
if (H5Gclose(group_id2) < 0)
@@ -18001,7 +18000,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, bool har
H5L_info2_t linfo; /* Link info struct */
/* Make link value for increasing/native order queries */
- HDsnprintf(valname, sizeof(valname), "value %02u", (unsigned)n);
+ snprintf(valname, sizeof(valname), "value %02u", (unsigned)n);
/* Verify the link information for first link, in increasing creation order */
memset(&linfo, 0, sizeof(linfo));
@@ -18024,7 +18023,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, bool har
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end if */
@@ -18033,7 +18032,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, bool har
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, tmpname, (size_t)NAME_BUF_SIZE,
H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(linkname, tmpname) != 0)
+ if (strcmp(linkname, tmpname) != 0)
TEST_ERROR;
/* Don't test "native" order if there is no creation order index, since
@@ -18063,7 +18062,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, bool har
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, n, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end if */
@@ -18072,7 +18071,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, bool har
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, n, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(linkname, tmpname) != 0)
+ if (strcmp(linkname, tmpname) != 0)
TEST_ERROR;
} /* end if */
@@ -18097,7 +18096,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, bool har
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end if */
@@ -18106,7 +18105,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, bool har
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(linkname, tmpname) != 0)
+ if (strcmp(linkname, tmpname) != 0)
TEST_ERROR;
/* Verify the link information for first link, in increasing link name order */
@@ -18129,7 +18128,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, bool har
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, tmpval, (size_t)NAME_BUF_SIZE,
H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end if */
@@ -18138,7 +18137,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, bool har
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, tmpname, (size_t)NAME_BUF_SIZE,
H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(linkname, tmpname) != 0)
+ if (strcmp(linkname, tmpname) != 0)
TEST_ERROR;
/* Don't test "native" order queries on link name order, since there's not
@@ -18165,7 +18164,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, bool har
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end if */
@@ -18174,7 +18173,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, bool har
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(linkname, tmpname) != 0)
+ if (strcmp(linkname, tmpname) != 0)
TEST_ERROR;
/* Success */
@@ -18274,7 +18273,7 @@ link_info_by_idx(hid_t fapl)
/* Create several links, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Check for creating hard or soft link */
if (hard_link) {
@@ -18289,7 +18288,7 @@ link_info_by_idx(hid_t fapl)
} /* end if */
else {
/* Make value for link */
- HDsnprintf(valname, sizeof(valname), "value %02u", u);
+ snprintf(valname, sizeof(valname), "value %02u", u);
/* Create soft link */
if (H5Lcreate_soft(valname, group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
@@ -18334,7 +18333,7 @@ link_info_by_idx(hid_t fapl)
/* Create more links, to push group into dense form */
for (; u < (max_compact * 2); u++) {
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Check for creating hard or soft link */
if (hard_link) {
@@ -18349,7 +18348,7 @@ link_info_by_idx(hid_t fapl)
} /* end if */
else {
/* Make value for link */
- HDsnprintf(valname, sizeof(valname), "value %02u", u);
+ snprintf(valname, sizeof(valname), "value %02u", u);
/* Create soft link */
if (H5Lcreate_soft(valname, group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
@@ -18477,7 +18476,7 @@ link_info_by_idx_old(hid_t fapl)
/* Create several links */
for (u = 0; u < CORDER_NLINKS; u++) {
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Check for creating hard or soft link */
if (hard_link) {
@@ -18499,7 +18498,7 @@ link_info_by_idx_old(hid_t fapl)
} /* end if */
else {
/* Make value for link */
- HDsnprintf(valname, sizeof(valname), "value %02u", u);
+ snprintf(valname, sizeof(valname), "value %02u", u);
/* Create soft link */
if (H5Lcreate_soft(valname, group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
@@ -18512,10 +18511,10 @@ link_info_by_idx_old(hid_t fapl)
unsigned dec_u = CORDER_NLINKS - (u + 1); /* Decreasing mapped index */
/* Make link name for increasing/native order queries */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Make link value for increasing/native order queries */
- HDsnprintf(valname, sizeof(valname), "value %02u", u);
+ snprintf(valname, sizeof(valname), "value %02u", u);
/* Verify link information (in increasing order) */
if (hard_link) {
@@ -18531,7 +18530,7 @@ link_info_by_idx_old(hid_t fapl)
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)u, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end else */
@@ -18539,7 +18538,7 @@ link_info_by_idx_old(hid_t fapl)
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)u, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, tmpname) != 0)
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
/* Verify link information (in native order - native is increasing) */
@@ -18556,7 +18555,7 @@ link_info_by_idx_old(hid_t fapl)
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)u, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end else */
@@ -18564,14 +18563,14 @@ link_info_by_idx_old(hid_t fapl)
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)u, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, tmpname) != 0)
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
/* Make link name for decreasing order queries */
- HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u);
+ snprintf(objname, sizeof(objname), "filler %02u", dec_u);
/* Make link value for decreasing order queries */
- HDsnprintf(valname, sizeof(valname), "value %02u", dec_u);
+ snprintf(valname, sizeof(valname), "value %02u", dec_u);
/* Verify link information (in decreasing order) */
if (hard_link) {
@@ -18587,7 +18586,7 @@ link_info_by_idx_old(hid_t fapl)
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)u, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(valname, tmpval) != 0)
+ if (strcmp(valname, tmpval) != 0)
TEST_ERROR;
} /* end else */
@@ -18595,7 +18594,7 @@ link_info_by_idx_old(hid_t fapl)
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)u, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, tmpname) != 0)
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -18765,7 +18764,7 @@ delete_by_idx(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -18818,10 +18817,10 @@ delete_by_idx(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", (u + 1));
+ snprintf(objname, sizeof(objname), "filler %02u", (u + 1));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u", (max_compact - (u + 2)));
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u", (max_compact - (u + 2)));
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -18838,7 +18837,7 @@ delete_by_idx(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -18892,10 +18891,10 @@ delete_by_idx(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", (u + 1));
+ snprintf(objname, sizeof(objname), "filler %02u", (u + 1));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u", ((max_compact * 2) - (u + 2)));
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u", ((max_compact * 2) - (u + 2)));
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -18925,7 +18924,7 @@ delete_by_idx(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -18970,11 +18969,11 @@ delete_by_idx(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 1));
+ snprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 1));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u",
- ((max_compact * 2) - ((u * 2) + 2)));
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u",
+ ((max_compact * 2) - ((u * 2) + 2)));
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -19004,11 +19003,11 @@ delete_by_idx(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 3));
+ snprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 3));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u",
- ((max_compact * 2) - ((u * 2) + 4)));
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u",
+ ((max_compact * 2) - ((u * 2) + 4)));
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -19120,7 +19119,7 @@ delete_by_idx_old(hid_t fapl)
H5O_info2_t oi; /* Buffer for querying object's info */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create group */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -19186,10 +19185,10 @@ delete_by_idx_old(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", (u + 1));
+ snprintf(objname, sizeof(objname), "filler %02u", (u + 1));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u);
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u", dec_u);
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -19217,7 +19216,7 @@ delete_by_idx_old(hid_t fapl)
H5O_info2_t oi; /* Buffer for querying object's info */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create group */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -19265,10 +19264,10 @@ delete_by_idx_old(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 1));
+ snprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 1));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u);
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u", dec_u);
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -19303,10 +19302,10 @@ delete_by_idx_old(hid_t fapl)
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
if (order == H5_ITER_INC)
- HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 3));
+ snprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 3));
else
- HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u);
- if (HDstrcmp(objname, tmpname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u", dec_u);
+ if (strcmp(objname, tmpname) != 0)
TEST_ERROR;
} /* end for */
@@ -19391,8 +19390,8 @@ link_iterate_cb(hid_t group_id, const char *link_name, const H5L_info2_t *info,
} /* end if */
/* Verify name of link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", (unsigned)my_info.corder);
- if (HDstrcmp(link_name, objname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u", (unsigned)my_info.corder);
+ if (strcmp(link_name, objname) != 0)
return H5_ITER_ERROR;
/* Check if we've visited this link before */
@@ -19759,7 +19758,7 @@ link_iterate(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -19792,7 +19791,7 @@ link_iterate(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -19902,9 +19901,9 @@ link_iterate_old_cb(hid_t group_id, const char *link_name, const H5L_info2_t *in
} /* end if */
/* Verify name of link */
- HDsnprintf(objname, sizeof(objname), "filler %02u",
- (info ? (unsigned)op_data->curr : (unsigned)((op_data->ncalled - 1) + op_data->nskipped)));
- if (HDstrcmp(link_name, objname) != 0)
+ snprintf(objname, sizeof(objname), "filler %02u",
+ (info ? (unsigned)op_data->curr : (unsigned)((op_data->ncalled - 1) + op_data->nskipped)));
+ if (strcmp(link_name, objname) != 0)
return H5_ITER_ERROR;
/* Check if we've visited this link before */
@@ -20203,7 +20202,7 @@ link_iterate_old(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -20347,7 +20346,7 @@ open_by_idx_check(hid_t main_group_id, hid_t soft_group_id, hid_t mount_file_id,
/* Mount a file over a group in main group */
mnt_idx = 2;
- HDsnprintf(mntname, sizeof(mntname), "/%s/filler %02u", CORDER_GROUP_NAME, mnt_idx);
+ snprintf(mntname, sizeof(mntname), "/%s/filler %02u", CORDER_GROUP_NAME, mnt_idx);
if (H5Fmount(main_group_id, mntname, mount_file_id, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -20524,7 +20523,7 @@ open_by_idx(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -20541,7 +20540,7 @@ open_by_idx(hid_t fapl)
TEST_ERROR;
/* Create soft link in another group, to objects in main group */
- HDsnprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
+ snprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
if (H5Lcreate_soft(valname, soft_group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
}
@@ -20568,7 +20567,7 @@ open_by_idx(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -20585,7 +20584,7 @@ open_by_idx(hid_t fapl)
TEST_ERROR;
/* Create soft link in another group, to objects in main group */
- HDsnprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
+ snprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
if (H5Lcreate_soft(valname, soft_group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
} /* end for */
@@ -20728,7 +20727,7 @@ open_by_idx_check_old(hid_t main_group_id, hid_t soft_group_id, hid_t mount_file
/* Mount a file over a group in main group */
mnt_idx = 2;
- HDsnprintf(mntname, sizeof(mntname), "/%s/filler %02u", CORDER_GROUP_NAME, mnt_idx);
+ snprintf(mntname, sizeof(mntname), "/%s/filler %02u", CORDER_GROUP_NAME, mnt_idx);
if (H5Fmount(main_group_id, mntname, mount_file_id, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -20839,7 +20838,7 @@ open_by_idx_old(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -20855,7 +20854,7 @@ open_by_idx_old(hid_t fapl)
TEST_ERROR;
/* Create soft link in another group, to objects in main group */
- HDsnprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
+ snprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
if (H5Lcreate_soft(valname, soft_group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
} /* end for */
@@ -20949,7 +20948,7 @@ object_info_check(hid_t main_group_id, hid_t soft_group_id, H5_index_t idx_type,
/* Open each object in group by name and check that it's the correct one */
for (u = 0; u < max_links; u++) {
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Query the object's information, by name */
if (H5Oget_info_by_name3(group_id, objname, &oinfo, H5O_INFO_BASIC | H5O_INFO_NUM_ATTRS,
@@ -21148,7 +21147,7 @@ object_info(hid_t fapl)
hid_t attr_id; /* Attribute ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -21163,7 +21162,7 @@ object_info(hid_t fapl)
/* Create attributes on new object */
for (v = 0; v < u; v++) {
/* Make name for attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", v);
+ snprintf(attrname, sizeof(attrname), "attr %02u", v);
/* Create attribute */
if ((attr_id = H5Acreate2(group_id2, attrname, H5T_NATIVE_INT, space_id, H5P_DEFAULT,
@@ -21180,7 +21179,7 @@ object_info(hid_t fapl)
TEST_ERROR;
/* Create soft link in another group, to objects in main group */
- HDsnprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
+ snprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
if (H5Lcreate_soft(valname, soft_group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
} /* end for */
@@ -21209,7 +21208,7 @@ object_info(hid_t fapl)
hid_t attr_id; /* Attribute ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
@@ -21224,7 +21223,7 @@ object_info(hid_t fapl)
/* Create attributes on new object */
for (v = 0; v < u; v++) {
/* Make name for attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", v);
+ snprintf(attrname, sizeof(attrname), "attr %02u", v);
/* Create attribute */
if ((attr_id = H5Acreate2(group_id2, attrname, H5T_NATIVE_INT, space_id, H5P_DEFAULT,
@@ -21241,7 +21240,7 @@ object_info(hid_t fapl)
TEST_ERROR;
/* Create soft link in another group, to objects in main group */
- HDsnprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
+ snprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
if (H5Lcreate_soft(valname, soft_group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
} /* end for */
@@ -21338,7 +21337,7 @@ object_info_check_old(hid_t main_group_id, hid_t soft_group_id, H5_index_t idx_t
int cmp_value; /* Token comparison value */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Query the object's information, by name */
if (H5Oget_info_by_name3(group_id, objname, &oinfo, H5O_INFO_BASIC | H5O_INFO_NUM_ATTRS,
@@ -21466,7 +21465,7 @@ object_info_old(hid_t fapl)
hid_t attr_id; /* Attribute ID */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -21480,7 +21479,7 @@ object_info_old(hid_t fapl)
/* Create attributes on new object */
for (v = 0; v < u; v++) {
/* Make name for attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", v);
+ snprintf(attrname, sizeof(attrname), "attr %02u", v);
/* Create attribute */
if ((attr_id = H5Acreate2(group_id2, attrname, H5T_NATIVE_INT, space_id, H5P_DEFAULT,
@@ -21497,7 +21496,7 @@ object_info_old(hid_t fapl)
TEST_ERROR;
/* Create soft link in another group, to objects in main group */
- HDsnprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
+ snprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
if (H5Lcreate_soft(valname, soft_group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
} /* end for */
@@ -21698,7 +21697,7 @@ group_info(hid_t fapl)
hid_t group_id2, group_id3; /* Group IDs */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0)
@@ -21743,7 +21742,7 @@ group_info(hid_t fapl)
/* Create objects in new group created */
for (v = 0; v <= u; v++) {
/* Make name for link */
- HDsnprintf(objname2, sizeof(objname2), "filler %02u", v);
+ snprintf(objname2, sizeof(objname2), "filler %02u", v);
/* Create hard link, with group object */
if ((group_id3 =
@@ -21854,7 +21853,7 @@ group_info(hid_t fapl)
TEST_ERROR;
/* Create soft link in another group, to objects in main group */
- HDsnprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
+ snprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
if (H5Lcreate_soft(valname, soft_group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -21890,7 +21889,7 @@ group_info(hid_t fapl)
hid_t group_id2, group_id3; /* Group IDs */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0)
@@ -21935,7 +21934,7 @@ group_info(hid_t fapl)
/* Create objects in new group created */
for (v = 0; v <= u; v++) {
/* Make name for link */
- HDsnprintf(objname2, sizeof(objname2), "filler %02u", v);
+ snprintf(objname2, sizeof(objname2), "filler %02u", v);
/* Create hard link, with group object */
if ((group_id3 =
@@ -22046,7 +22045,7 @@ group_info(hid_t fapl)
TEST_ERROR;
/* Create soft link in another group, to objects in main group */
- HDsnprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
+ snprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
if (H5Lcreate_soft(valname, soft_group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -22178,7 +22177,7 @@ group_info_old(hid_t fapl)
hid_t group_id2, group_id3; /* Group IDs */
/* Make name for link */
- HDsnprintf(objname, sizeof(objname), "filler %02u", u);
+ snprintf(objname, sizeof(objname), "filler %02u", u);
/* Create hard link, with group object */
if ((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -22223,7 +22222,7 @@ group_info_old(hid_t fapl)
/* Create objects in new group created */
for (v = 0; v <= u; v++) {
/* Make name for link */
- HDsnprintf(objname2, sizeof(objname2), "filler %02u", v);
+ snprintf(objname2, sizeof(objname2), "filler %02u", v);
/* Create hard link, with group object */
if ((group_id3 = H5Gcreate2(group_id2, objname2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -22333,7 +22332,7 @@ group_info_old(hid_t fapl)
TEST_ERROR;
/* Create soft link in another group, to objects in main group */
- HDsnprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
+ snprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname);
if (H5Lcreate_soft(valname, soft_group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -22727,7 +22726,7 @@ main(void)
#endif /* H5_NO_DEPRECATED_SYMBOLS */
/* Skip external link tests for splitter VFD, which has external link-related bugs */
- if (HDstrcmp(env_h5_drvr, "splitter")) {
+ if (strcmp(env_h5_drvr, "splitter")) {
/* tests for external link */
/* Test external file cache first, so it sees the default efc setting on the fapl
@@ -22954,6 +22953,6 @@ main(void)
exit(EXIT_SUCCESS);
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
exit(EXIT_FAILURE);
} /* end main() */
diff --git a/test/links_env.c b/test/links_env.c
index c043281..3c67623 100644
--- a/test/links_env.c
+++ b/test/links_env.c
@@ -63,7 +63,7 @@ external_link_env(hid_t fapl, bool new_format)
if ((envval = HDgetenv("HDF5_EXT_PREFIX")) == NULL)
envval = "nomatch";
- if (HDstrcmp(envval, ".:tmp_links_env") != 0)
+ if (strcmp(envval, ".:tmp_links_env") != 0)
TEST_ERROR;
/* Set up name for main file:"extlinks_env0" */
@@ -109,7 +109,7 @@ external_link_env(hid_t fapl, bool new_format)
/* Should be able to find the target file from pathnames set via HDF5_EXT_PREFIX */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in tmp_links_env directory.");
+ puts(" Should have found the file in tmp_links_env directory.");
goto error;
}
@@ -154,8 +154,8 @@ main(void)
env_h5_drvr = "nomatch";
/* Splitter VFD has issues with external links */
- if (!HDstrcmp(env_h5_drvr, "splitter")) {
- HDputs(" -- SKIPPED for incompatible VFD --");
+ if (!strcmp(env_h5_drvr, "splitter")) {
+ puts(" -- SKIPPED for incompatible VFD --");
exit(EXIT_SUCCESS);
}
@@ -189,6 +189,6 @@ main(void)
exit(EXIT_SUCCESS);
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
exit(EXIT_FAILURE);
} /* end main() */
diff --git a/test/mf.c b/test/mf.c
index 5a7aa6d..6399caf 100644
--- a/test/mf.c
+++ b/test/mf.c
@@ -228,8 +228,8 @@ test_mf_eoa(const char *env_h5_drvr, hid_t fapl)
/* Skip test when using VFDs that has different address spaces for each
* type of metadata allocation. Also skip test for Direct VFD.
*/
- suitable_vfd = (bool)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
- HDstrcmp(env_h5_drvr, "direct") != 0);
+ suitable_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0 &&
+ strcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
/* Set the filename to use for this test */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -324,7 +324,7 @@ test_mf_eoa(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support continuous address space");
+ puts(" Current VFD doesn't support continuous address space");
} /* end else */
return (0);
@@ -377,8 +377,8 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
/* Skip test when using VFDs that has different address spaces for each
* type of metadata allocation. Also skip test for Direct VFD.
*/
- suitable_vfd = (bool)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
- HDstrcmp(env_h5_drvr, "direct") != 0);
+ suitable_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0 &&
+ strcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -472,7 +472,7 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
TESTING("H5MF_try_shrink() of file allocation: test 2");
@@ -522,7 +522,7 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
TESTING("H5MF_try_shrink() of file allocation: test 3");
@@ -567,7 +567,7 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
TESTING("H5MF_try_shrink() of file allocation: test 4");
@@ -615,7 +615,7 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
return (0);
@@ -665,8 +665,8 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl)
/* Skip test when using VFDs that has different address spaces for each
* type of metadata allocation. Also skip test for Direct VFD.
*/
- suitable_vfd = (bool)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
- HDstrcmp(env_h5_drvr, "direct") != 0);
+ suitable_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0 &&
+ strcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -758,7 +758,7 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
TESTING("H5MF_try_extend() of file allocation: test 2");
@@ -822,7 +822,7 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
return (0);
@@ -1031,7 +1031,7 @@ test_mf_tmp(const char *env_h5_drvr, hid_t fapl, bool new_format)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support continuous address space");
+ puts(" Current VFD doesn't support continuous address space");
} /* end else */
return (0);
@@ -2017,7 +2017,7 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl)
TESTING("A free-space section absorbs an aggregator: test 1");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (bool)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -2082,7 +2082,7 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
TESTING("A free-space section absorbs an aggregator: test 2");
@@ -2144,7 +2144,7 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
return (0);
@@ -2193,8 +2193,8 @@ test_mf_aggr_alloc1(const char *env_h5_drvr, hid_t fapl)
TESTING("H5MF_alloc() of meta/sdata aggregator:test 1");
/* Skip test when using VFDs that don't use the metadata aggregator. Also skip test for Direct VFD. */
- suitable_vfd = (bool)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
- HDstrcmp(env_h5_drvr, "direct") != 0);
+ suitable_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0 &&
+ strcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -2289,7 +2289,7 @@ test_mf_aggr_alloc1(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
return (0);
@@ -2345,8 +2345,8 @@ test_mf_aggr_alloc2(const char *env_h5_drvr, hid_t fapl)
TESTING("H5MF_alloc() of meta/sdata aggregator:test 2");
/* Skip test when using VFDs that don't use the metadata aggregator. Also skip test for Direct VFD. */
- suitable_vfd = (bool)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
- HDstrcmp(env_h5_drvr, "direct") != 0);
+ suitable_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0 &&
+ strcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -2434,7 +2434,7 @@ test_mf_aggr_alloc2(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
return (0);
@@ -2504,7 +2504,7 @@ test_mf_aggr_alloc3(const char *env_h5_drvr, hid_t fapl)
TESTING("H5MF_alloc() of meta/sdata aggregator: test 3");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (bool)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -2600,7 +2600,7 @@ test_mf_aggr_alloc3(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
return (0);
@@ -2672,7 +2672,7 @@ test_mf_aggr_alloc4(const char *env_h5_drvr, hid_t fapl)
TESTING("H5MF_alloc() of meta/sdata aggregator:test 4");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (bool)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -2768,7 +2768,7 @@ test_mf_aggr_alloc4(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
return (0);
@@ -2821,7 +2821,7 @@ test_mf_aggr_alloc5(const char *env_h5_drvr, hid_t fapl)
TESTING("H5MF_alloc() of meta/sdata aggregator:test 5");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (bool)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -2894,7 +2894,7 @@ test_mf_aggr_alloc5(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
return (0);
@@ -2959,7 +2959,7 @@ test_mf_aggr_alloc6(const char *env_h5_drvr, hid_t fapl)
TESTING("H5MF_alloc() of meta/sdata aggregator:test 6");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (bool)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -3057,7 +3057,7 @@ test_mf_aggr_alloc6(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
return (0);
@@ -3133,7 +3133,7 @@ test_mf_aggr_alloc7(const char *env_h5_drvr, hid_t fapl)
TESTING("H5MF_alloc() of meta/sdata aggregator:test 7");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (bool)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -3249,7 +3249,7 @@ test_mf_aggr_alloc7(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
return (0);
@@ -3304,7 +3304,7 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
TESTING("H5MF_try_extend() of meta/sdata aggregator: test 1");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (bool)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -3408,7 +3408,7 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
TESTING("H5MF_try_extend() of meta/sdata aggregator: test 2");
@@ -3478,7 +3478,7 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
TESTING("H5MF_try_extend() of meta/sdata aggregator: test 3");
@@ -3548,7 +3548,7 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
return (0);
@@ -3602,7 +3602,7 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl)
TESTING("H5MF_try_shrink() of meta/sdata aggregator: test 1");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (bool)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -3660,7 +3660,7 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
TESTING("H5MF_try_shrink() of meta/sdata aggregator: test 2");
@@ -3725,7 +3725,7 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
TESTING("H5MF_try_shrink() of meta/sdata aggregator: test 3");
@@ -3788,7 +3788,7 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support metadata aggregator");
+ puts(" Current VFD doesn't support metadata aggregator");
} /* end else */
return (0);
@@ -3857,8 +3857,8 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
* don't push mis-aligned space fragments on the file free space list.
* Also skip test for Direct VFD.
*/
- suitable_vfd = (bool)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
- HDstrcmp(env_h5_drvr, "multi") != 0 && HDstrcmp(env_h5_drvr, "direct") != 0);
+ suitable_vfd = (bool)(strcmp(env_h5_drvr, "stdio") != 0 && strcmp(env_h5_drvr, "split") != 0 &&
+ strcmp(env_h5_drvr, "multi") != 0 && strcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -3963,7 +3963,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support mis-aligned fragments");
+ puts(" Current VFD doesn't support mis-aligned fragments");
} /* end else */
TESTING("H5MF_try_shrink() of file allocation with alignment: test 2");
@@ -4021,7 +4021,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support mis-aligned fragments");
+ puts(" Current VFD doesn't support mis-aligned fragments");
} /* end else */
TESTING("H5MF_try_extend() of file allocation with alignment: test 3");
@@ -4082,7 +4082,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support mis-aligned fragments");
+ puts(" Current VFD doesn't support mis-aligned fragments");
} /* end else */
if (fapl1 >= 0 && H5Pclose(fapl1) < 0)
@@ -4307,8 +4307,8 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
* don't push mis-aligned space fragments on the file free space list
* Also skip test for Direct VFD.
*/
- suitable_vfd = (bool)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
- HDstrcmp(env_h5_drvr, "multi") != 0 && HDstrcmp(env_h5_drvr, "direct") != 0);
+ suitable_vfd = (bool)(strcmp(env_h5_drvr, "stdio") != 0 && strcmp(env_h5_drvr, "split") != 0 &&
+ strcmp(env_h5_drvr, "multi") != 0 && strcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
if ((file_size = h5_get_file_size(filename, new_fapl)) < 0)
TEST_ERROR;
@@ -4380,7 +4380,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support mis-aligned fragments");
+ puts(" Current VFD doesn't support mis-aligned fragments");
} /* end else */
return (0);
@@ -4514,8 +4514,8 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
* don't push mis-aligned space fragments on the file free space list.
* Also skip test for Direct VFD.
*/
- suitable_vfd = (bool)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
- HDstrcmp(env_h5_drvr, "multi") != 0 && HDstrcmp(env_h5_drvr, "direct") != 0);
+ suitable_vfd = (bool)(strcmp(env_h5_drvr, "stdio") != 0 && strcmp(env_h5_drvr, "split") != 0 &&
+ strcmp(env_h5_drvr, "multi") != 0 && strcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -4656,7 +4656,7 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support mis-aligned fragments");
+ puts(" Current VFD doesn't support mis-aligned fragments");
} /* end else */
return (0);
@@ -4777,8 +4777,8 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
* don't push mis-aligned space fragments on the file free space list.
* Also skip test for Direct VFD.
*/
- suitable_vfd = (bool)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
- HDstrcmp(env_h5_drvr, "multi") != 0 && HDstrcmp(env_h5_drvr, "direct") != 0);
+ suitable_vfd = (bool)(strcmp(env_h5_drvr, "stdio") != 0 && strcmp(env_h5_drvr, "split") != 0 &&
+ strcmp(env_h5_drvr, "multi") != 0 && strcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -4950,7 +4950,7 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support mis-aligned fragments");
+ puts(" Current VFD doesn't support mis-aligned fragments");
} /* end else */
return (0);
@@ -5123,8 +5123,8 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
* don't push mis-aligned space fragments on the file free space list.
* Also skip test for Direct VFD.
*/
- suitable_vfd = (bool)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
- HDstrcmp(env_h5_drvr, "multi") != 0 && HDstrcmp(env_h5_drvr, "direct") != 0);
+ suitable_vfd = (bool)(strcmp(env_h5_drvr, "stdio") != 0 && strcmp(env_h5_drvr, "split") != 0 &&
+ strcmp(env_h5_drvr, "multi") != 0 && strcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -5336,7 +5336,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support mis-aligned fragments");
+ puts(" Current VFD doesn't support mis-aligned fragments");
} /* end else */
return (0);
@@ -5437,8 +5437,8 @@ test_mf_align_alloc4(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
* don't push mis-aligned space fragments on the file free space list.
* Also skip test for Direct VFD.
*/
- suitable_vfd = (bool)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
- HDstrcmp(env_h5_drvr, "multi") != 0 && HDstrcmp(env_h5_drvr, "direct") != 0);
+ suitable_vfd = (bool)(strcmp(env_h5_drvr, "stdio") != 0 && strcmp(env_h5_drvr, "split") != 0 &&
+ strcmp(env_h5_drvr, "multi") != 0 && strcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -5552,7 +5552,7 @@ test_mf_align_alloc4(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support mis-aligned fragments");
+ puts(" Current VFD doesn't support mis-aligned fragments");
} /* end else */
return (0);
@@ -5656,8 +5656,8 @@ test_mf_align_alloc5(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
* don't push mis-aligned space fragments on the file free space list.
* Also skip test for Direct VFD.
*/
- suitable_vfd = (bool)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
- HDstrcmp(env_h5_drvr, "multi") != 0 && HDstrcmp(env_h5_drvr, "direct") != 0);
+ suitable_vfd = (bool)(strcmp(env_h5_drvr, "stdio") != 0 && strcmp(env_h5_drvr, "split") != 0 &&
+ strcmp(env_h5_drvr, "multi") != 0 && strcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -5782,7 +5782,7 @@ test_mf_align_alloc5(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support mis-aligned fragments");
+ puts(" Current VFD doesn't support mis-aligned fragments");
} /* end else */
return (0);
@@ -5927,8 +5927,8 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
* don't push mis-aligned space fragments on the file free space list.
* Also skip test for Direct VFD.
*/
- suitable_vfd = (bool)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
- HDstrcmp(env_h5_drvr, "multi") != 0 && HDstrcmp(env_h5_drvr, "direct") != 0);
+ suitable_vfd = (bool)(strcmp(env_h5_drvr, "stdio") != 0 && strcmp(env_h5_drvr, "split") != 0 &&
+ strcmp(env_h5_drvr, "multi") != 0 && strcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -6097,7 +6097,7 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
} /* end if */
else {
SKIPPED();
- HDputs(" Current VFD doesn't support mis-aligned fragments");
+ puts(" Current VFD doesn't support mis-aligned fragments");
} /* end else */
return 0;
@@ -6147,9 +6147,9 @@ test_mf_bug1(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR;
/* Check for split or multi driver */
- if (!HDstrcmp(env_h5_drvr, "split"))
+ if (!strcmp(env_h5_drvr, "split"))
split = true;
- else if (!HDstrcmp(env_h5_drvr, "multi"))
+ else if (!strcmp(env_h5_drvr, "multi"))
multi = true;
/* Add alignment to member files for split/multi driver */
@@ -6583,22 +6583,22 @@ error:
memb_map[H5FD_MEM_DRAW] = H5FD_MEM_DRAW; \
memb_map[H5FD_MEM_GHEAP] = H5FD_MEM_GHEAP; \
memb_map[H5FD_MEM_LHEAP] = H5FD_MEM_LHEAP; \
- HDsnprintf(sv[H5FD_MEM_SUPER], 64, "%%s-%c.h5", 's'); \
+ snprintf(sv[H5FD_MEM_SUPER], 64, "%%s-%c.h5", 's'); \
memb_name[H5FD_MEM_SUPER] = sv[H5FD_MEM_SUPER]; \
memb_addr[H5FD_MEM_SUPER] = 0; \
- HDsnprintf(sv[H5FD_MEM_BTREE], 64, "%%s-%c.h5", 'b'); \
+ snprintf(sv[H5FD_MEM_BTREE], 64, "%%s-%c.h5", 'b'); \
memb_name[H5FD_MEM_BTREE] = sv[H5FD_MEM_BTREE]; \
memb_addr[H5FD_MEM_BTREE] = HADDR_MAX / 6; \
- HDsnprintf(sv[H5FD_MEM_DRAW], 64, "%%s-%c.h5", 'r'); \
+ snprintf(sv[H5FD_MEM_DRAW], 64, "%%s-%c.h5", 'r'); \
memb_name[H5FD_MEM_DRAW] = sv[H5FD_MEM_DRAW]; \
memb_addr[H5FD_MEM_DRAW] = HADDR_MAX / 3; \
- HDsnprintf(sv[H5FD_MEM_GHEAP], 64, "%%s-%c.h5", 'g'); \
+ snprintf(sv[H5FD_MEM_GHEAP], 64, "%%s-%c.h5", 'g'); \
memb_name[H5FD_MEM_GHEAP] = sv[H5FD_MEM_GHEAP]; \
memb_addr[H5FD_MEM_GHEAP] = HADDR_MAX / 2; \
- HDsnprintf(sv[H5FD_MEM_LHEAP], 64, "%%s-%c.h5", 'l'); \
+ snprintf(sv[H5FD_MEM_LHEAP], 64, "%%s-%c.h5", 'l'); \
memb_name[H5FD_MEM_LHEAP] = sv[H5FD_MEM_LHEAP]; \
memb_addr[H5FD_MEM_LHEAP] = HADDR_MAX * 2 / 3; \
- HDsnprintf(sv[H5FD_MEM_OHDR], 64, "%%s-%c.h5", 'o'); \
+ snprintf(sv[H5FD_MEM_OHDR], 64, "%%s-%c.h5", 'o'); \
memb_name[H5FD_MEM_OHDR] = sv[H5FD_MEM_OHDR]; \
memb_addr[H5FD_MEM_OHDR] = HADDR_MAX * 5 / 6; \
}
@@ -6949,7 +6949,7 @@ test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, bool new_format)
else
TESTING("File's free-space is persistent with old library format");
- if (HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0) {
+ if (strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0) {
/* File creation property list template */
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
@@ -7084,7 +7084,7 @@ test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, bool new_format)
}
else {
SKIPPED();
- HDputs(" Current VFD doesn't support persisting free-space or paged aggregation strategy");
+ puts(" Current VFD doesn't support persisting free-space or paged aggregation strategy");
}
return (0);
@@ -7126,7 +7126,7 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, bool new_format)
TESTING("File's free-space is going away with old library format");
/* Current VFD that does not support contiguous address space */
- contig_addr_vfd = (bool)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
@@ -7273,7 +7273,7 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, bool new_format)
}
else {
SKIPPED();
- HDputs(" Current VFD doesn't support persistent free-space manager");
+ puts(" Current VFD doesn't support persistent free-space manager");
}
return (0);
@@ -7317,7 +7317,7 @@ test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, bool new_format
TESTING("File space strategy/persisting/threshold with old library format");
/* Current VFD that does not support contiguous address space */
- contig_addr_vfd = (bool)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -7487,7 +7487,7 @@ test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, bool new_format)
TESTING("File space merge/shrink for section size < threshold with old library format");
/* Current VFD that does not support contiguous address space */
- contig_addr_vfd = (bool)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -7819,9 +7819,9 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
TESTING("Paged aggregation for file space: H5MF_alloc/H5MF_xfree");
/* Check for split or multi driver */
- if (!HDstrcmp(env_h5_drvr, "split"))
+ if (!strcmp(env_h5_drvr, "split"))
split = true;
- else if (!HDstrcmp(env_h5_drvr, "multi"))
+ else if (!strcmp(env_h5_drvr, "multi"))
multi = true;
if (!multi && !split) {
@@ -8002,7 +8002,7 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
}
else {
SKIPPED();
- HDputs(" Current VFD doesn't support persisting free-space or paged aggregation strategy");
+ puts(" Current VFD doesn't support persisting free-space or paged aggregation strategy");
}
return (0);
@@ -8048,7 +8048,7 @@ test_page_try_shrink(const char *env_h5_drvr, hid_t fapl)
TESTING("Paged aggregation for file space: H5MF_try_shrink()");
/* Current VFD that does not support continuous address space */
- contig_addr_vfd = (bool)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
@@ -8132,7 +8132,7 @@ test_page_try_shrink(const char *env_h5_drvr, hid_t fapl)
}
else {
SKIPPED();
- HDputs(" Current VFD doesn't support paged aggregation");
+ puts(" Current VFD doesn't support paged aggregation");
}
return (0);
@@ -8175,8 +8175,8 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
TESTING("Paged aggregation for file space: H5MF_try_extend() a small block");
/* Current VFD that does not support continuous address space */
- contig_addr_vfd = (bool)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
- HDstrcmp(env_h5_drvr, "family") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0 &&
+ strcmp(env_h5_drvr, "family") != 0);
if (contig_addr_vfd) {
@@ -8310,7 +8310,7 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
}
else {
SKIPPED();
- HDputs(" Current VFD doesn't support paged aggregation");
+ puts(" Current VFD doesn't support paged aggregation");
}
return (0);
@@ -8352,7 +8352,7 @@ test_page_large_try_extend(const char *env_h5_drvr, hid_t fapl)
TESTING("Paged aggregation for file space: H5MF_try_extend() a large block");
/* Current VFD that does not support continuous address space */
- contig_addr_vfd = (bool)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
@@ -8471,7 +8471,7 @@ test_page_large_try_extend(const char *env_h5_drvr, hid_t fapl)
}
else {
SKIPPED();
- HDputs(" Current VFD doesn't support paged aggregation strategy");
+ puts(" Current VFD doesn't support paged aggregation strategy");
}
return (0);
@@ -8514,7 +8514,7 @@ test_page_large(const char *env_h5_drvr, hid_t fapl)
TESTING("Paged aggregation for file space: large allocations and de-allocations");
/* Current VFD that does not support continuous address space */
- contig_addr_vfd = (bool)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
@@ -8625,7 +8625,7 @@ test_page_large(const char *env_h5_drvr, hid_t fapl)
}
else {
SKIPPED();
- HDputs(" Current VFD doesn't support paged aggregation strategy");
+ puts(" Current VFD doesn't support paged aggregation strategy");
}
return (0);
@@ -8666,11 +8666,11 @@ test_page_small(const char *env_h5_drvr, hid_t fapl)
TESTING("Paged aggregation for file space: small allocations and de-allocations");
- if (!HDstrcmp(env_h5_drvr, "split"))
+ if (!strcmp(env_h5_drvr, "split"))
split = true;
- else if (!HDstrcmp(env_h5_drvr, "multi"))
+ else if (!strcmp(env_h5_drvr, "multi"))
multi = true;
- else if (!HDstrcmp(env_h5_drvr, "family"))
+ else if (!strcmp(env_h5_drvr, "family"))
family = true;
if (!multi && !split) {
@@ -8794,7 +8794,7 @@ test_page_small(const char *env_h5_drvr, hid_t fapl)
}
else {
SKIPPED();
- HDputs(" Current VFD doesn't support paged aggregation strategy");
+ puts(" Current VFD doesn't support paged aggregation strategy");
}
return (0);
@@ -8839,9 +8839,9 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
TESTING("Paged aggregation and H5Pset_alignment: verify proper alignment is used");
/* Check for split or multi driver */
- if (!HDstrcmp(env_h5_drvr, "split"))
+ if (!strcmp(env_h5_drvr, "split"))
split = true;
- else if (!HDstrcmp(env_h5_drvr, "multi"))
+ else if (!strcmp(env_h5_drvr, "multi"))
multi = true;
if (!multi && !split) {
@@ -9106,7 +9106,7 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
}
else {
SKIPPED();
- HDputs(" Current VFD doesn't support persisting free-space or paged aggregation strategy");
+ puts(" Current VFD doesn't support persisting free-space or paged aggregation strategy");
}
return (0);
@@ -9268,12 +9268,12 @@ main(void)
if (nerrors)
goto error;
- HDputs("All free-space manager tests for file memory passed.");
+ puts("All free-space manager tests for file memory passed.");
return (0);
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
H5E_BEGIN_TRY
{
H5Pclose(fapl);
diff --git a/test/mirror_vfd.c b/test/mirror_vfd.c
index 4e14948..f7f88de 100644
--- a/test/mirror_vfd.c
+++ b/test/mirror_vfd.c
@@ -143,9 +143,9 @@ populate_filepath(const char *dirname, const char *basename, hid_t fapl_id, char
if (NULL == (path = calloc(H5FD_SPLITTER_PATH_MAX, sizeof(char))))
TEST_ERROR;
- if (HDsnprintf(path, H5FD_SPLITTER_PATH_MAX, "%s%s%s", dirname,
- (dirname[HDstrlen(dirname)] == '/') ? "" : "/", /* slash iff needed */
- basename) > H5FD_SPLITTER_PATH_MAX)
+ if (snprintf(path, H5FD_SPLITTER_PATH_MAX, "%s%s%s", dirname,
+ (dirname[strlen(dirname)] == '/') ? "" : "/", /* slash iff needed */
+ basename) > H5FD_SPLITTER_PATH_MAX)
TEST_ERROR;
if (h5suffix == true) {
@@ -192,7 +192,7 @@ build_paths(const char *basename, H5FD_splitter_vfd_config_t *splitter_config,
if (basename == NULL || *basename == 0)
TEST_ERROR;
- if (HDsnprintf(baselogname, H5FD_SPLITTER_PATH_MAX, "%s_err.log", basename) > H5FD_SPLITTER_PATH_MAX)
+ if (snprintf(baselogname, H5FD_SPLITTER_PATH_MAX, "%s_err.log", basename) > H5FD_SPLITTER_PATH_MAX)
TEST_ERROR;
if (populate_filepath(MIRROR_WO_DIR, baselogname, splitter_config->wo_fapl_id, names->log, false) < 0)
@@ -248,7 +248,7 @@ test_fapl_configuration(void)
if (SERVER_HANDSHAKE_PORT != fa_out.handshake_port)
TEST_ERROR;
- if (HDstrncmp(SERVER_IP_ADDRESS, (const char *)fa_out.remote_ip, H5FD_MIRROR_MAX_IP_LEN))
+ if (strncmp(SERVER_IP_ADDRESS, (const char *)fa_out.remote_ip, H5FD_MIRROR_MAX_IP_LEN))
TEST_ERROR;
if (H5Pclose(fapl_id) < 0)
@@ -936,7 +936,7 @@ test_encdec_open(H5FD_mirror_xmit_t xmit_mock)
TEST_ERROR;
if (xmit_out->size_t_blob != xmit_in->size_t_blob)
TEST_ERROR;
- if (HDstrncmp(xmit_out->filename, xmit_in->filename, H5FD_MIRROR_XMIT_FILEPATH_MAX) != 0) {
+ if (strncmp(xmit_out->filename, xmit_in->filename, H5FD_MIRROR_XMIT_FILEPATH_MAX) != 0) {
PRINT_BUFFER_DIFF(xmit_out->filename, xmit_in->filename, H5FD_MIRROR_XMIT_FILEPATH_MAX);
TEST_ERROR;
}
@@ -965,7 +965,7 @@ test_encdec_open(H5FD_mirror_xmit_t xmit_mock)
/* Update expected "filepath" in structure */
for (size_t i = 0x20; i < H5FD_MIRROR_XMIT_FILEPATH_MAX + 0x20; i++)
xmit_in->filename[i - 0x20] = (i > 0xFF) ? 0 : (char)i;
- if (HDstrncmp(xmit_out->filename, xmit_in->filename, H5FD_MIRROR_XMIT_FILEPATH_MAX) != 0) {
+ if (strncmp(xmit_out->filename, xmit_in->filename, H5FD_MIRROR_XMIT_FILEPATH_MAX) != 0) {
PRINT_BUFFER_DIFF(xmit_out->filename, xmit_in->filename, H5FD_MIRROR_XMIT_FILEPATH_MAX);
TEST_ERROR;
}
@@ -1056,7 +1056,7 @@ test_encdec_reply(H5FD_mirror_xmit_t xmit_mock)
TEST_ERROR;
if (xmit_out.status != xmit_in.status)
TEST_ERROR;
- if (HDstrncmp(xmit_out.message, xmit_in.message, H5FD_MIRROR_STATUS_MESSAGE_MAX) != 0) {
+ if (strncmp(xmit_out.message, xmit_in.message, H5FD_MIRROR_STATUS_MESSAGE_MAX) != 0) {
PRINT_BUFFER_DIFF(xmit_out.message, xmit_in.message, H5FD_MIRROR_STATUS_MESSAGE_MAX);
TEST_ERROR;
}
@@ -1081,7 +1081,7 @@ test_encdec_reply(H5FD_mirror_xmit_t xmit_mock)
/* Update expected "message" in structure */
for (i = 0x10; i < H5FD_MIRROR_STATUS_MESSAGE_MAX + 0x10; i++)
xmit_in.message[i - 0x10] = (i > 0xFF) ? 0 : (char)i;
- if (HDstrncmp(xmit_out.message, xmit_in.message, H5FD_MIRROR_STATUS_MESSAGE_MAX) != 0) {
+ if (strncmp(xmit_out.message, xmit_in.message, H5FD_MIRROR_STATUS_MESSAGE_MAX) != 0) {
PRINT_BUFFER_DIFF(xmit_out.message, xmit_in.message, H5FD_MIRROR_STATUS_MESSAGE_MAX);
TEST_ERROR;
}
@@ -1234,7 +1234,7 @@ create_mirroring_split_fapl(const char *basename, struct mirrortest_filenames *n
mirror_conf.magic = H5FD_MIRROR_FAPL_MAGIC;
mirror_conf.version = H5FD_MIRROR_CURR_FAPL_T_VERSION;
mirror_conf.handshake_port = opts->portno;
- if (HDstrncpy(mirror_conf.remote_ip, opts->ip, H5FD_MIRROR_MAX_IP_LEN) == NULL)
+ if (strncpy(mirror_conf.remote_ip, opts->ip, H5FD_MIRROR_MAX_IP_LEN) == NULL)
TEST_ERROR;
if ((splitter_config->wo_fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0)
TEST_ERROR;
@@ -1246,9 +1246,9 @@ create_mirroring_split_fapl(const char *basename, struct mirrortest_filenames *n
TEST_ERROR;
/* Set file paths for w/o and logfile */
- if (HDstrncpy(splitter_config->wo_path, (const char *)names->wo, H5FD_SPLITTER_PATH_MAX) == NULL)
+ if (strncpy(splitter_config->wo_path, (const char *)names->wo, H5FD_SPLITTER_PATH_MAX) == NULL)
TEST_ERROR;
- if (HDstrncpy(splitter_config->log_file_path, (const char *)names->log, H5FD_SPLITTER_PATH_MAX) == NULL)
+ if (strncpy(splitter_config->log_file_path, (const char *)names->log, H5FD_SPLITTER_PATH_MAX) == NULL)
TEST_ERROR;
/* Create Splitter FAPL */
@@ -1452,21 +1452,21 @@ _create_chunking_ids(hid_t file_id, unsigned min_dset, unsigned max_dset, hsize_
/* Create dataspace IDs */
for (unsigned m = min_dset; m <= max_dset; m++) {
if ((dataspace_ids[m] = H5Screate_simple(2, dset_dims, NULL)) < 0) {
- HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to create dataspace ID %d\n", m);
+ snprintf(mesg, MIRR_MESG_SIZE, "unable to create dataspace ID %d\n", m);
FAIL_PUTS_ERROR(mesg);
}
}
/* Create dataset IDs */
for (unsigned m = min_dset; m <= max_dset; m++) {
- if (HDsnprintf(dset_name, DSET_NAME_LEN, "/dset%03d", m) > DSET_NAME_LEN) {
- HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to compose dset name %d\n", m);
+ if (snprintf(dset_name, DSET_NAME_LEN, "/dset%03d", m) > DSET_NAME_LEN) {
+ snprintf(mesg, MIRR_MESG_SIZE, "unable to compose dset name %d\n", m);
FAIL_PUTS_ERROR(mesg);
}
if ((dataset_ids[m] = H5Dcreate2(file_id, dset_name, H5T_STD_I32BE, dataspace_ids[m], H5P_DEFAULT,
dcpl_id, H5P_DEFAULT)) < 0) {
- HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to create dset ID %d\n", m);
+ snprintf(mesg, MIRR_MESG_SIZE, "unable to create dset ID %d\n", m);
FAIL_PUTS_ERROR(mesg);
}
}
@@ -1474,7 +1474,7 @@ _create_chunking_ids(hid_t file_id, unsigned min_dset, unsigned max_dset, hsize_
/* Get file space IDs */
for (unsigned m = min_dset; m <= max_dset; m++) {
if ((filespace_ids[m] = H5Dget_space(dataset_ids[m])) < 0) {
- HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to create filespace ID %d\n", m);
+ snprintf(mesg, MIRR_MESG_SIZE, "unable to create filespace ID %d\n", m);
FAIL_PUTS_ERROR(mesg);
}
}
@@ -1522,13 +1522,13 @@ _open_chunking_ids(hid_t file_id, unsigned min_dset, unsigned max_dset, hsize_t
/* Open dataset IDs */
for (unsigned m = min_dset; m <= max_dset; m++) {
- if (HDsnprintf(dset_name, DSET_NAME_LEN, "/dset%03d", m) > DSET_NAME_LEN) {
- HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to compose dset name %d\n", m);
+ if (snprintf(dset_name, DSET_NAME_LEN, "/dset%03d", m) > DSET_NAME_LEN) {
+ snprintf(mesg, MIRR_MESG_SIZE, "unable to compose dset name %d\n", m);
FAIL_PUTS_ERROR(mesg);
}
if ((dataset_ids[m] = H5Dopen2(file_id, dset_name, H5P_DEFAULT)) < 0) {
- HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to open dset ID %d\n", m);
+ snprintf(mesg, MIRR_MESG_SIZE, "unable to open dset ID %d\n", m);
FAIL_PUTS_ERROR(mesg);
}
}
@@ -1536,7 +1536,7 @@ _open_chunking_ids(hid_t file_id, unsigned min_dset, unsigned max_dset, hsize_t
/* Open filespace IDs */
for (unsigned m = min_dset; m <= max_dset; m++) {
if ((filespace_ids[m] = H5Dget_space(dataset_ids[m])) < 0) {
- HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to get filespace ID %d\n", m);
+ snprintf(mesg, MIRR_MESG_SIZE, "unable to get filespace ID %d\n", m);
FAIL_PUTS_ERROR(mesg);
}
}
@@ -1575,16 +1575,16 @@ _close_chunking_ids(unsigned min_dset, unsigned max_dset, hid_t *dataspace_ids,
LOGPRINT(3, "closing ids[%d]\n", m);
if (dataspace_ids) {
if (H5Sclose(dataspace_ids[m]) < 0) {
- HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to close dataspace_id[%d]\n", m);
+ snprintf(mesg, MIRR_MESG_SIZE, "unable to close dataspace_id[%d]\n", m);
FAIL_PUTS_ERROR(mesg);
}
}
if (H5Dclose(dataset_ids[m]) < 0) {
- HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to close dataset_id[%d]\n", m);
+ snprintf(mesg, MIRR_MESG_SIZE, "unable to close dataset_id[%d]\n", m);
FAIL_PUTS_ERROR(mesg);
}
if (H5Sclose(filespace_ids[m]) < 0) {
- HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to close filespace_id[%d]\n", m);
+ snprintf(mesg, MIRR_MESG_SIZE, "unable to close filespace_id[%d]\n", m);
FAIL_PUTS_ERROR(mesg);
}
}
@@ -1635,7 +1635,7 @@ _verify_datasets(unsigned min_dset, unsigned max_dset, hid_t *filespace_ids, hid
if (H5Dread(dataset_ids[m], H5T_NATIVE_INT, memspace_id, filespace_ids[m], H5P_DEFAULT,
data_chunk) < 0) {
- HDsnprintf(mesg, MIRR_MESG_SIZE, " H5Dread() [%d][%d][%d]\n", i, j, m);
+ snprintf(mesg, MIRR_MESG_SIZE, " H5Dread() [%d][%d][%d]\n", i, j, m);
FAIL_PUTS_ERROR(mesg);
}
@@ -1643,8 +1643,8 @@ _verify_datasets(unsigned min_dset, unsigned max_dset, hid_t *filespace_ids, hid
for (l = 0; l < CHUNK_DIM; l++) {
if ((unsigned)data_chunk[k][l] !=
((DSET_DIM * DSET_DIM * m) + (DSET_DIM * (i + k)) + j + l)) {
- HDsnprintf(mesg, MIRR_MESG_SIZE, " MISMATCH [%d][%d][%d][%d][%d]\n", i, j, m,
- k, l);
+ snprintf(mesg, MIRR_MESG_SIZE, " MISMATCH [%d][%d][%d][%d][%d]\n", i, j, m,
+ k, l);
FAIL_PUTS_ERROR(mesg);
}
}
@@ -2059,7 +2059,7 @@ test_vanishing_datasets(const struct mt_opts *opts)
/* Delete datasets */
if (i >= max_at_one_time) {
- if (HDsnprintf(namebuf, DSET_NAME_LEN, "/dset%02d", (i - max_at_one_time)) > DSET_NAME_LEN)
+ if (snprintf(namebuf, DSET_NAME_LEN, "/dset%02d", (i - max_at_one_time)) > DSET_NAME_LEN)
TEST_ERROR;
if (H5Ldelete(file_id, namebuf, H5P_DEFAULT) < 0)
TEST_ERROR;
@@ -2067,7 +2067,7 @@ test_vanishing_datasets(const struct mt_opts *opts)
/* Write to datasets */
if (i < (max_loops - max_at_one_time)) {
- if (HDsnprintf(namebuf, DSET_NAME_LEN, "/dset%02d", i) > DSET_NAME_LEN)
+ if (snprintf(namebuf, DSET_NAME_LEN, "/dset%02d", i) > DSET_NAME_LEN)
TEST_ERROR;
if ((dset_id = H5Dcreate2(file_id, namebuf, H5T_STD_U32LE, dspace_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
@@ -2191,7 +2191,7 @@ test_concurrent_access(const struct mt_opts *opts)
char name[16] = "";
hid_t fapl_id = H5I_INVALID_HID;
- HDsnprintf(name, 15, "concurrent%d", i);
+ snprintf(name, 15, "concurrent%d", i);
if ((fapl_id = create_mirroring_split_fapl(name, &bundle[i].names, opts)) < 0)
TEST_ERROR;
bundle[i].fapl_id = fapl_id;
@@ -2296,12 +2296,12 @@ parse_args(int argc, char **argv, struct mt_opts *opts)
int i = 0;
opts->portno = SERVER_HANDSHAKE_PORT;
- HDstrncpy(opts->ip, SERVER_IP_ADDRESS, H5FD_MIRROR_MAX_IP_LEN);
+ strncpy(opts->ip, SERVER_IP_ADDRESS, H5FD_MIRROR_MAX_IP_LEN);
for (i = 1; i < argc; i++) { /* start with first possible option argument */
- if (!HDstrncmp(argv[i], "--ip=", 5))
- HDstrncpy(opts->ip, argv[i] + 5, H5FD_MIRROR_MAX_IP_LEN);
- else if (!HDstrncmp(argv[i], "--port=", 7))
+ if (!strncmp(argv[i], "--ip=", 5))
+ strncpy(opts->ip, argv[i] + 5, H5FD_MIRROR_MAX_IP_LEN);
+ else if (!strncmp(argv[i], "--port=", 7))
opts->portno = atoi(argv[i] + 7);
else {
printf("Unrecognized option: '%s'\n", argv[i]);
@@ -2310,8 +2310,8 @@ parse_args(int argc, char **argv, struct mt_opts *opts)
} /* end for each argument from command line */
/* Auto-replace 'localhost' with numeric IP */
- if (!HDstrncmp(opts->ip, "localhost", 10)) /* include NUL terminator */
- HDstrncpy(opts->ip, "127.0.0.1", H5FD_MIRROR_MAX_IP_LEN);
+ if (!strncmp(opts->ip, "localhost", 10)) /* include NUL terminator */
+ strncpy(opts->ip, "127.0.0.1", H5FD_MIRROR_MAX_IP_LEN);
return 0;
} /* end parse_args() */
@@ -2346,7 +2346,7 @@ confirm_server(struct mt_opts *opts)
while (1) {
if (connect(live_socket, (struct sockaddr *)&target_addr, (socklen_t)sizeof(target_addr)) < 0) {
if (attempt > 10) {
- printf("ERROR connect() (%d)\n%s\n", errno, HDstrerror(errno));
+ printf("ERROR connect() (%d)\n%s\n", errno, strerror(errno));
return -1;
}
@@ -2359,7 +2359,7 @@ confirm_server(struct mt_opts *opts)
attempt++;
HDsleep(1);
- printf("attempt #%u: ERROR connect() (%d)\n%s\n", attempt, errno, HDstrerror(errno));
+ printf("attempt #%u: ERROR connect() (%d)\n%s\n", attempt, errno, strerror(errno));
/* Re-open socket for retry */
live_socket = socket(AF_INET, SOCK_STREAM, 0);
@@ -2374,7 +2374,7 @@ confirm_server(struct mt_opts *opts)
/* Request confirmation from the server */
if (HDwrite(live_socket, "CONFIRM", 8) == -1) {
- printf("ERROR write() (%d)\n%s\n", errno, HDstrerror(errno));
+ printf("ERROR write() (%d)\n%s\n", errno, strerror(errno));
return -1;
}
@@ -2383,7 +2383,7 @@ confirm_server(struct mt_opts *opts)
printf("ERROR read() can't receive data\n");
return -1;
}
- if (HDstrncmp("ALIVE", mybuf, 6)) {
+ if (strncmp("ALIVE", mybuf, 6)) {
printf("ERROR read() didn't receive data from server\n");
return -1;
}
diff --git a/test/mount.c b/test/mount.c
index 21ccfbf..bc619b1 100644
--- a/test/mount.c
+++ b/test/mount.c
@@ -190,7 +190,7 @@ test_illegal(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Mounting a file on itself should have failed.");
+ puts(" Mounting a file on itself should have failed.");
TEST_ERROR;
} /* end if */
@@ -210,7 +210,7 @@ test_illegal(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Mounting two files at one mount point should have failed.");
+ puts(" Mounting two files at one mount point should have failed.");
TEST_ERROR;
} /* end if */
if (H5Funmount(mnt, ".") < 0)
@@ -235,7 +235,7 @@ test_illegal(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Mounting same file opened twice at one mount point should have failed.");
+ puts(" Mounting same file opened twice at one mount point should have failed.");
TEST_ERROR;
} /* end if */
if (H5Funmount(mnt, ".") < 0)
@@ -253,7 +253,7 @@ test_illegal(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Creating a cycle with mount points should have failed.");
+ puts(" Creating a cycle with mount points should have failed.");
TEST_ERROR;
} /* end if */
if (H5Funmount(file1, "/mnt1") < 0)
@@ -474,7 +474,7 @@ test_hide(hid_t fapl)
H5E_END_TRY
if (grp >= 0) {
H5_FAILED();
- HDputs(" Name is still accessible under mount point.");
+ puts(" Name is still accessible under mount point.");
TEST_ERROR;
}
@@ -499,7 +499,7 @@ test_hide(hid_t fapl)
if (!same_obj) {
H5_FAILED();
- HDputs(" Hard link failed for hidden object.");
+ puts(" Hard link failed for hidden object.");
TEST_ERROR;
}
@@ -583,7 +583,7 @@ test_assoc(hid_t fapl)
if (!same_obj) {
H5_FAILED();
- HDputs(" Association failed.");
+ puts(" Association failed.");
TEST_ERROR;
} /* end if */
@@ -714,7 +714,7 @@ test_move(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Moving an object across files shouldn't have been possible");
+ puts(" Moving an object across files shouldn't have been possible");
TEST_ERROR;
} /* end if */
@@ -935,7 +935,7 @@ test_unlink(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Incorrect traversal from mount point!");
+ puts(" Incorrect traversal from mount point!");
TEST_ERROR;
} /* end if */
@@ -956,7 +956,7 @@ test_unlink(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Traversal through mount point should not have worked!");
+ puts(" Traversal through mount point should not have worked!");
TEST_ERROR;
} /* end if */
H5E_BEGIN_TRY
@@ -966,7 +966,7 @@ test_unlink(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Traversal through mount point should not have worked!");
+ puts(" Traversal through mount point should not have worked!");
TEST_ERROR;
} /* end if */
@@ -1122,7 +1122,7 @@ test_interlink(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Interfile hard link should not have been allowed!");
+ puts(" Interfile hard link should not have been allowed!");
TEST_ERROR;
} /* end if */
@@ -1134,7 +1134,7 @@ test_interlink(hid_t fapl)
H5E_END_TRY
if (status >= 0) {
H5_FAILED();
- HDputs(" Interfile renaming should not have been allowed!");
+ puts(" Interfile renaming should not have been allowed!");
TEST_ERROR;
} /* end if */
@@ -1157,7 +1157,7 @@ test_interlink(hid_t fapl)
H5E_END_TRY
if (dset >= 0) {
H5_FAILED();
- HDputs(" Dataset and shared type must be in the same file!");
+ puts(" Dataset and shared type must be in the same file!");
TEST_ERROR;
} /* end if */
@@ -1168,7 +1168,7 @@ test_interlink(hid_t fapl)
FAIL_STACK_ERROR;
#else /* NOT_NOW */
SKIPPED();
- HDputs(" Test skipped due file pointer sharing issue (Jira 7638).");
+ puts(" Test skipped due file pointer sharing issue (Jira 7638).");
#endif /* NOT_NOW */
/* Shut down */
@@ -1309,7 +1309,7 @@ test_close(hid_t fapl)
FAIL_STACK_ERROR;
if (H5Oget_info_by_name3(file2, "/mnt1", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDputs(" File1 contents are not accessible!");
+ puts(" File1 contents are not accessible!");
TEST_ERROR;
} /* end if */
if (H5Fclose(file2) < 0)
@@ -1506,7 +1506,7 @@ test_mount_after_close(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidABMX, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(objname, "/A/B/M/X") != 0)
+ if (strcmp(objname, "/A/B/M/X") != 0)
TEST_ERROR;
/* Close object in mounted file */
@@ -1521,7 +1521,7 @@ test_mount_after_close(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidABC, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(objname, "/A/B/C") != 0)
+ if (strcmp(objname, "/A/B/C") != 0)
TEST_ERROR;
/* Close object in mounted file */
@@ -1536,7 +1536,7 @@ test_mount_after_close(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidABT, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(objname, "/A/B/T") != 0)
+ if (strcmp(objname, "/A/B/T") != 0)
TEST_ERROR;
/* Close object in original file */
@@ -1551,7 +1551,7 @@ test_mount_after_close(hid_t fapl)
*objname = '\0';
if (H5Iget_name(didABMXYD, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(objname, "/A/B/M/X/Y/D") != 0)
+ if (strcmp(objname, "/A/B/M/X/Y/D") != 0)
TEST_ERROR;
/* Close object in mounted file */
@@ -1721,7 +1721,7 @@ test_mount_after_unmount(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidAMXX, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/A/M/X/X") != 0)
+ if (strcmp(objname, "/A/M/X/X") != 0)
TEST_ERROR;
/* Open group in mounted file #2 */
@@ -1741,7 +1741,7 @@ test_mount_after_unmount(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidAMXMY, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/A/M/X/M/Y") != 0)
+ if (strcmp(objname, "/A/M/X/M/Y") != 0)
TEST_ERROR;
/* Unmount second file */
@@ -1752,7 +1752,7 @@ test_mount_after_unmount(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidAMXMY, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/X/M/Y") != 0)
+ if (strcmp(objname, "/X/M/Y") != 0)
TEST_ERROR;
/* Rename object in file #3 that is "disconnected" from name hierarchy */
@@ -1772,7 +1772,7 @@ test_mount_after_unmount(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidAMXMY, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/X/M/Z") != 0)
+ if (strcmp(objname, "/X/M/Z") != 0)
TEST_ERROR;
/* Mount fourth file */
@@ -1788,7 +1788,7 @@ test_mount_after_unmount(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidBMZ, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(objname, "/B/M/Z") != 0)
+ if (strcmp(objname, "/B/M/Z") != 0)
TEST_ERROR;
/* Unmount third file */
@@ -2756,7 +2756,7 @@ test_acc_perm(hid_t fapl)
/* Get and verify file name */
if (H5Fget_name(gidA, name, NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(name, filename1) != 0)
+ if (strcmp(name, filename1) != 0)
TEST_ERROR;
if ((fid2 = H5Fopen(filename2, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
@@ -2765,7 +2765,7 @@ test_acc_perm(hid_t fapl)
/* Get and verify file name */
if (H5Fget_name(fid2, name, NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(name, filename2) != 0)
+ if (strcmp(name, filename2) != 0)
TEST_ERROR;
/* Mount files together */
@@ -2775,7 +2775,7 @@ test_acc_perm(hid_t fapl)
/* Get and verify file name */
if (H5Fget_name(fid2, name, NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(name, filename2) != 0)
+ if (strcmp(name, filename2) != 0)
TEST_ERROR;
/* Open group in mounted file */
@@ -2785,7 +2785,7 @@ test_acc_perm(hid_t fapl)
/* Get and verify file name */
if (H5Fget_name(gidAM, name, NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(name, filename2) != 0)
+ if (strcmp(name, filename2) != 0)
TEST_ERROR;
/* Attempt to create objects in read only file (should fail) */
@@ -2831,7 +2831,7 @@ test_acc_perm(hid_t fapl)
/* Get and verify file name */
if (H5Fget_name(gidAMZ, name, NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(name, filename3) != 0)
+ if (strcmp(name, filename3) != 0)
TEST_ERROR;
/* Close object in file #3 */
@@ -3024,7 +3024,7 @@ test_mult_mount(hid_t fapl)
*name = '\0';
if (H5Iget_name(gidAMT, name, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(name, "/A/M/T") != 0)
+ if (strcmp(name, "/A/M/T") != 0)
TEST_ERROR;
/* Create object in file #3 */
@@ -3042,7 +3042,7 @@ test_mult_mount(hid_t fapl)
*name = '\0';
if (H5Iget_name(gidBS, name, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(name, "/B/S") != 0)
+ if (strcmp(name, "/B/S") != 0)
TEST_ERROR;
/* Re-open object created in file #3 through file #1 mount path */
@@ -3219,7 +3219,7 @@ test_nested_survive(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidAM, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR;
- if (name_len == 0 || HDstrcmp(name, "/A/M") != 0)
+ if (name_len == 0 || strcmp(name, "/A/M") != 0)
TEST_ERROR;
/* Unmount file #2 from file #1 */
@@ -3230,7 +3230,7 @@ test_nested_survive(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidAM, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR;
- if (name_len != 0 || HDstrcmp(name, "") != 0)
+ if (name_len != 0 || strcmp(name, "") != 0)
TEST_ERROR;
/* Open object in file #3 through file #1 mount path (should fail) */
@@ -3250,7 +3250,7 @@ test_nested_survive(hid_t fapl)
*name = '\0';
if (H5Iget_name(gidMS, name, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(name, "/M/S") != 0)
+ if (strcmp(name, "/M/S") != 0)
TEST_ERROR;
/* Close group in file #3 */
@@ -3269,7 +3269,7 @@ test_nested_survive(hid_t fapl)
*name = '\0';
if (H5Iget_name(gidAMS, name, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR;
- if (HDstrcmp(name, "/A/M/S") != 0)
+ if (strcmp(name, "/A/M/S") != 0)
TEST_ERROR;
/* Close group in file #3 */
@@ -3413,7 +3413,7 @@ test_close_parent(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidM, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR;
- if (name_len == 0 || HDstrcmp(name, "/A/M") != 0)
+ if (name_len == 0 || strcmp(name, "/A/M") != 0)
TEST_ERROR;
/* Unmount file #2 from file #1, closing file #1 */
@@ -3424,7 +3424,7 @@ test_close_parent(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidM, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR;
- if (name_len == 0 || HDstrcmp(name, "/M") != 0)
+ if (name_len == 0 || strcmp(name, "/M") != 0)
TEST_ERROR;
/* Just file #2's underlying shared file should be open still */
@@ -3687,7 +3687,7 @@ test_cut_graph(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidM, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR;
- if (name_len == 0 || HDstrcmp(name, "/A/E/M") != 0)
+ if (name_len == 0 || strcmp(name, "/A/E/M") != 0)
TEST_ERROR;
/* Open object in file #7 */
@@ -3698,7 +3698,7 @@ test_cut_graph(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidQ, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR;
- if (name_len == 0 || HDstrcmp(name, "/B/I/Q") != 0)
+ if (name_len == 0 || strcmp(name, "/B/I/Q") != 0)
TEST_ERROR;
/* Close file #1 */
@@ -3758,7 +3758,7 @@ test_cut_graph(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidK, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR;
- if (name_len == 0 || HDstrcmp(name, "/D/K") != 0)
+ if (name_len == 0 || strcmp(name, "/D/K") != 0)
TEST_ERROR;
if (H5Gclose(gidK) < 0)
@@ -3781,7 +3781,7 @@ test_cut_graph(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidO, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR;
- if (name_len == 0 || HDstrcmp(name, "/B/H/O") != 0)
+ if (name_len == 0 || strcmp(name, "/B/H/O") != 0)
TEST_ERROR;
if (H5Gclose(gidO) < 0)
@@ -3791,14 +3791,14 @@ test_cut_graph(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidM, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR;
- if (name_len == 0 || HDstrcmp(name, "/E/M") != 0)
+ if (name_len == 0 || strcmp(name, "/E/M") != 0)
TEST_ERROR;
/* Check the name of "Q" is still defined */
*name = '\0';
if ((name_len = H5Iget_name(gidQ, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR;
- if (name_len == 0 || HDstrcmp(name, "/B/I/Q") != 0)
+ if (name_len == 0 || strcmp(name, "/B/I/Q") != 0)
TEST_ERROR;
/* Check that all seven underlying files are still opened */
@@ -3823,7 +3823,7 @@ test_cut_graph(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidQ, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR;
- if (name_len == 0 || HDstrcmp(name, "/I/Q") != 0)
+ if (name_len == 0 || strcmp(name, "/I/Q") != 0)
TEST_ERROR;
/* Open object in file #6 from file #7 */
@@ -3834,7 +3834,7 @@ test_cut_graph(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidO, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR;
- if (name_len == 0 || HDstrcmp(name, "/H/O") != 0)
+ if (name_len == 0 || strcmp(name, "/H/O") != 0)
TEST_ERROR;
if (H5Gclose(gidO) < 0)
@@ -3998,7 +3998,7 @@ test_symlink(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidL, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR;
- if (name_len == 0 || HDstrcmp(name, "/L") != 0)
+ if (name_len == 0 || strcmp(name, "/L") != 0)
TEST_ERROR;
/* Close file #1 */
@@ -4501,12 +4501,12 @@ main(void)
if (nerrors)
goto error;
- HDputs("All mount tests passed.");
+ puts("All mount tests passed.");
h5_cleanup(FILENAME, fapl);
return 0;
error:
- HDputs("***** MOUNT ERRORS *****");
+ puts("***** MOUNT ERRORS *****");
return 1;
}
diff --git a/test/mtime.c b/test/mtime.c
index 252eebf..60bfaaa 100644
--- a/test/mtime.c
+++ b/test/mtime.c
@@ -96,26 +96,26 @@ main(void)
/* Compare object tokens & times from the two ways of calling H5Oget_info() */
if (token_cmp || oi1.ctime != oi2.ctime) {
H5_FAILED();
- HDputs(" Calling H5Oget_info() with the dataset ID returned");
- HDputs(" different values than calling it with a file and dataset");
- HDputs(" name.");
+ puts(" Calling H5Oget_info() with the dataset ID returned");
+ puts(" different values than calling it with a file and dataset");
+ puts(" name.");
goto error;
}
/* Compare times -- they must be within 60 seconds of one another */
if (0 == oi1.ctime) {
SKIPPED();
- HDputs(" The modification time could not be decoded on this OS.");
- HDputs(" Modification times will be maintained in the file but");
- HDputs(" cannot be queried on this system. See H5O_mtime_decode().");
+ puts(" The modification time could not be decoded on this OS.");
+ puts(" Modification times will be maintained in the file but");
+ puts(" cannot be queried on this system. See H5O_mtime_decode().");
return 0;
}
else if (fabs(HDdifftime(now, oi1.ctime)) > 60.0) {
H5_FAILED();
tm = HDlocaltime(&(oi1.ctime));
- HDstrftime((char *)buf1, sizeof buf1, "%Y-%m-%d %H:%M:%S", tm);
+ strftime((char *)buf1, sizeof buf1, "%Y-%m-%d %H:%M:%S", tm);
tm = HDlocaltime(&now);
- HDstrftime((char *)buf2, sizeof buf2, "%Y-%m-%d %H:%M:%S", tm);
+ strftime((char *)buf2, sizeof buf2, "%Y-%m-%d %H:%M:%S", tm);
printf(" got: %s\n ans: %s\n", buf1, buf2);
goto error;
}
@@ -138,7 +138,7 @@ main(void)
H5_FAILED();
/* If this fails, examine H5Omtime.c. Modification time is very
* system dependent (e.g., on Windows DST must be hardcoded). */
- HDputs(" Old modification time incorrect");
+ puts(" Old modification time incorrect");
goto error;
}
if (H5Fclose(file) < 0)
@@ -168,7 +168,7 @@ main(void)
TEST_ERROR;
if (oi2.ctime != MTIME2) {
H5_FAILED();
- HDputs(" Modification time incorrect.");
+ puts(" Modification time incorrect.");
goto error;
}
if (H5Fclose(file) < 0)
@@ -188,7 +188,7 @@ main(void)
TEST_ERROR;
/* All looks good */
- HDputs("All modification time tests passed.");
+ puts("All modification time tests passed.");
h5_cleanup(FILENAME, fapl);
return EXIT_SUCCESS;
diff --git a/test/ntypes.c b/test/ntypes.c
index e234cf4..f36a600 100644
--- a/test/ntypes.c
+++ b/test/ntypes.c
@@ -2048,13 +2048,13 @@ test_vlstr_dtype(hid_t file)
/* Compare data read in */
for (i = 0; i < SPACE1_DIM1; i++) {
- if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
+ if (strlen(wdata[i]) != strlen(rdata[i])) {
H5_FAILED();
printf(" VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", (int)i,
- (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i]));
goto error;
} /* end if */
- if (HDstrcmp(wdata[i], rdata[i]) != 0) {
+ if (strcmp(wdata[i], rdata[i]) != 0) {
H5_FAILED();
printf(" VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n", (int)i, wdata[i], (int)i,
rdata[i]);
@@ -2176,13 +2176,13 @@ test_str_dtype(hid_t file)
/* Compare data read in */
for (i = 0; i < SPACE1_DIM1; i++) {
- if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
+ if (strlen(wdata[i]) != strlen(rdata[i])) {
H5_FAILED();
printf(" data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", (int)i,
- (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i]));
goto error;
} /* end if */
- if (HDstrcmp(wdata[i], rdata[i]) != 0) {
+ if (strcmp(wdata[i], rdata[i]) != 0) {
H5_FAILED();
printf(" data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n", (int)i, wdata[i], (int)i,
rdata[i]);
diff --git a/test/objcopy.c b/test/objcopy.c
index 92a5955..2afff4b 100644
--- a/test/objcopy.c
+++ b/test/objcopy.c
@@ -619,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);
@@ -685,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);
@@ -1551,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 */
@@ -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++)
@@ -4848,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++)
@@ -6835,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;
@@ -6915,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 */
@@ -7164,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++) {
@@ -7795,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,
@@ -8078,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;
@@ -16239,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)
@@ -17185,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;
}
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;
} /* 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 */
@@ -17292,7 +17292,7 @@ main(void)
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,
"H5Ocopy(): expand soft and external links");
@@ -17407,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
diff --git a/test/objcopy_ref.c b/test/objcopy_ref.c
index 40f91e8..58326d5 100644
--- a/test/objcopy_ref.c
+++ b/test/objcopy_ref.c
@@ -488,7 +488,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);
@@ -1272,7 +1272,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 */
@@ -1870,50 +1870,50 @@ 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;
}
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;
} /* 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 */
@@ -1934,7 +1934,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
diff --git a/test/ohdr.c b/test/ohdr.c
index db302ef..7d8eb75 100644
--- a/test/ohdr.c
+++ b/test/ohdr.c
@@ -542,9 +542,9 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl)
/* create a different name for a local copy of the data file to be
opened with rd/wr file permissions in case build and test are
done in the source directory. */
- HDstrncpy(testfile, FILE_BOGUS, TESTFILE_LEN);
+ strncpy(testfile, FILE_BOGUS, TESTFILE_LEN);
testfile[TESTFILE_LEN - 1] = '\0';
- HDstrncat(testfile, ".copy", sizeof(testfile) - HDstrlen(testfile) - 1);
+ strncat(testfile, ".copy", sizeof(testfile) - strlen(testfile) - 1);
/* Make a copy of the data file from svn. */
if (h5_make_local_copy(FILE_BOGUS, testfile) < 0)
@@ -945,7 +945,7 @@ test_minimized_dset_ohdr_attribute_addition(hid_t fapl_id)
* ADD A (STRING) ATTRIBUTE AND MANIPULATE IT *
**********************************************/
- buf_size = HDstrlen(ATTR_LONG) + 1;
+ buf_size = strlen(ATTR_LONG) + 1;
if (NULL == (in_buf = (char *)calloc(buf_size, sizeof(char))))
TEST_ERROR;
if (NULL == (out_buf = (char *)calloc(buf_size, sizeof(char))))
@@ -964,7 +964,7 @@ test_minimized_dset_ohdr_attribute_addition(hid_t fapl_id)
TEST_ERROR;
/* Write attribute data */
- HDstrcpy(in_buf, ATTR_SHORT);
+ strcpy(in_buf, ATTR_SHORT);
if (H5Awrite(aid, H5T_NATIVE_CHAR, in_buf) < 0)
TEST_ERROR;
@@ -975,12 +975,12 @@ test_minimized_dset_ohdr_attribute_addition(hid_t fapl_id)
/* Read the data back and verify */
if (H5Aread(aid, H5T_NATIVE_CHAR, out_buf) < 0)
TEST_ERROR;
- if (HDstrcmp(in_buf, out_buf) != 0)
+ if (strcmp(in_buf, out_buf) != 0)
TEST_ERROR;
/* modify the string attribute */
memset(in_buf, 0, buf_size);
- HDstrcpy(in_buf, ATTR_LONG);
+ strcpy(in_buf, ATTR_LONG);
if (H5Awrite(aid, H5T_NATIVE_CHAR, in_buf) < 0)
TEST_ERROR;
@@ -990,7 +990,7 @@ test_minimized_dset_ohdr_attribute_addition(hid_t fapl_id)
/* Read the data back and verify */
if (H5Aread(aid, H5T_NATIVE_CHAR, out_buf) < 0)
TEST_ERROR;
- if (HDstrcmp(in_buf, out_buf) != 0)
+ if (strcmp(in_buf, out_buf) != 0)
TEST_ERROR;
/* Close */
@@ -1010,7 +1010,7 @@ test_minimized_dset_ohdr_attribute_addition(hid_t fapl_id)
for (i = 0; i < N_ATTRS; i++) {
/* Set the attribute's name */
- if (HDsnprintf(attr_name, ATTR_NAME_MAX, "int_attr_%d", i) < 0)
+ if (snprintf(attr_name, ATTR_NAME_MAX, "int_attr_%d", i) < 0)
TEST_ERROR;
/* Create an integer attribute on the dataset */
@@ -1876,8 +1876,8 @@ main(void)
/* Display info about testing */
low_string = h5_get_version_string(low);
high_string = h5_get_version_string(high);
- HDsnprintf(msg, sizeof(msg), "Using file format version: (%s, %s)", low_string, high_string);
- HDputs(msg);
+ snprintf(msg, sizeof(msg), "Using file format version: (%s, %s)", low_string, high_string);
+ puts(msg);
/* test on object continuation block */
if (test_cont(filename, fapl) < 0)
@@ -2084,23 +2084,23 @@ main(void)
/* Test reading datasets with undefined object header messages
* and the various "fail/mark if unknown" object header message flags
*/
- HDputs("Accessing objects with unknown header messages: H5O_BOGUS_VALID_ID");
+ puts("Accessing objects with unknown header messages: H5O_BOGUS_VALID_ID");
if (single_file_vfd) {
if (test_unknown(H5O_BOGUS_VALID_ID, filename, fapl) < 0)
TEST_ERROR;
} /* end if */
else {
SKIPPED();
- HDputs(" Unknown header message test not supported with the current VFD.");
+ puts(" Unknown header message test not supported with the current VFD.");
} /* end else */
- HDputs("Accessing objects with unknown header messages: H5O_BOGUS_INVALID_ID");
+ puts("Accessing objects with unknown header messages: H5O_BOGUS_INVALID_ID");
if (single_file_vfd) {
if (test_unknown(H5O_BOGUS_INVALID_ID, filename, fapl) < 0)
TEST_ERROR;
} /* end if */
else {
SKIPPED();
- HDputs(" Unknown header message test not supported with the current VFD.");
+ puts(" Unknown header message test not supported with the current VFD.");
} /* end else */
/* Test object header creation metadata cache issues */
@@ -2140,19 +2140,19 @@ main(void)
TEST_ERROR;
}
else
- HDputs("Skipped SWMR tests for SWMR-incompatible VFD");
+ puts("Skipped SWMR tests for SWMR-incompatible VFD");
/* Pop API context */
if (api_ctx_pushed && H5CX_pop(false) < 0)
FAIL_STACK_ERROR;
api_ctx_pushed = false;
- HDputs("All object header tests passed.");
+ puts("All object header tests passed.");
h5_cleanup(FILENAME, fapl);
return 0;
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
H5E_BEGIN_TRY
{
H5Fclose(file);
diff --git a/test/onion.c b/test/onion.c
index e3b0ae7..bbbcaf5 100644
--- a/test/onion.c
+++ b/test/onion.c
@@ -119,15 +119,15 @@ onion_filepaths_init(const char *basename)
if (NULL == (paths->canon = malloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE)))
TEST_ERROR;
- HDsnprintf(paths->canon, ONION_TEST_FIXNAME_SIZE, "%s", basename);
+ snprintf(paths->canon, ONION_TEST_FIXNAME_SIZE, "%s", basename);
if (NULL == (paths->onion = malloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE)))
TEST_ERROR;
- HDsnprintf(paths->onion, ONION_TEST_FIXNAME_SIZE, "%s.onion", paths->canon);
+ snprintf(paths->onion, ONION_TEST_FIXNAME_SIZE, "%s.onion", paths->canon);
if (NULL == (paths->recovery = malloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE)))
TEST_ERROR;
- HDsnprintf(paths->recovery, ONION_TEST_FIXNAME_SIZE, "%s.onion.recovery", paths->canon);
+ snprintf(paths->recovery, ONION_TEST_FIXNAME_SIZE, "%s.onion.recovery", paths->canon);
return paths;
@@ -848,7 +848,7 @@ test_fapl(void)
TEST_ERROR;
if (0 != info_out.force_write_open)
TEST_ERROR;
- if (HDstrcmp(info_in.comment, info_out.comment))
+ if (strcmp(info_in.comment, info_out.comment))
TEST_ERROR;
/* Cleanup */
@@ -1328,7 +1328,7 @@ test_revision_record_encode_decode(void)
};
size_t exp_size = H5FD_ONION_ENCODED_SIZE_REVISION_RECORD +
(H5FD_ONION_ENCODED_SIZE_INDEX_ENTRY * record.archival_index.n_entries) +
- HDstrlen("Example comment message.") + 1;
+ strlen("Example comment message.") + 1;
r_out.archival_index.list = NULL;
r_out.comment = NULL;
@@ -1478,15 +1478,15 @@ test_revision_record_encode_decode(void)
TEST_ERROR;
if (record.checksum != r_out.checksum)
TEST_ERROR;
- if (HDstrncmp(record.time_of_creation, r_out.time_of_creation, 16) != 0)
+ if (strncmp(record.time_of_creation, r_out.time_of_creation, 16) != 0)
TEST_ERROR;
if (record.comment_size != r_out.comment_size)
TEST_ERROR;
- if (record.comment_size != HDstrlen(r_out.comment) + 1)
+ if (record.comment_size != strlen(r_out.comment) + 1)
TEST_ERROR;
- if (HDstrlen(record.comment) != HDstrlen(r_out.comment))
+ if (strlen(record.comment) != strlen(r_out.comment))
TEST_ERROR;
- if (HDstrcmp(record.comment, r_out.comment) != 0)
+ if (strcmp(record.comment, r_out.comment) != 0)
TEST_ERROR;
if (H5FD_ONION_ARCHIVAL_INDEX_VERSION_CURR != r_out.archival_index.version)
@@ -1766,9 +1766,9 @@ verify_history_as_expected_onion(H5FD_t *raw_file, struct expected_history *filt
TEST_ERROR;
}
else {
- if (HDstrlen(rev_out.comment) != HDstrlen(erp->comment))
+ if (strlen(rev_out.comment) != strlen(erp->comment))
TEST_ERROR;
- if (HDstrcmp(rev_out.comment, erp->comment) != 0)
+ if (strcmp(rev_out.comment, erp->comment) != 0)
TEST_ERROR;
}
if (erp->n_index_entries != (uint64_t)(-1) &&
@@ -2585,7 +2585,7 @@ do_onion_open_and_writes(const char *filename, H5FD_onion_fapl_info_t *onion_inf
onion_info_p->revision_num = about[i].revision_num;
if (about[i].comment != NULL) {
- j = MIN(HDstrlen(about[i].comment), H5FD_ONION_FAPL_INFO_COMMENT_MAX_LEN);
+ j = MIN(strlen(about[i].comment), H5FD_ONION_FAPL_INFO_COMMENT_MAX_LEN);
memcpy(onion_info_p->comment, about[i].comment, j);
}
onion_info_p->comment[j] = '\0';
@@ -2615,7 +2615,7 @@ do_onion_open_and_writes(const char *filename, H5FD_onion_fapl_info_t *onion_inf
if (memcmp(buf_vfy, wi->buf, wi->size) != 0) {
const unsigned char *_buf = wi->buf;
size_t z = 0;
- HDputs("i exp act");
+ puts("i exp act");
for (z = 0; z < wi->size; z++)
printf("%02zx %c %c\n", z, _buf[z], buf_vfy[z]);
fflush(stdout);
@@ -2746,7 +2746,7 @@ test_page_aligned_history_create(void)
if (memcmp(a_list_s, buf + a_off, a_list_size_s) != 0) {
size_t k;
printf("aoff: %" PRIu64 "\n", a_off);
- HDputs("i exp act");
+ puts("i exp act");
for (k = 0; k < b_list_size_s; k++) {
printf("%3zu:: %c : %c\n", k, (k < a_off) ? ' ' : a_list_s[k - a_off], buf[k]);
}
@@ -2756,7 +2756,7 @@ test_page_aligned_history_create(void)
if (memcmp(b_list_s, buf, a_off) != 0) {
size_t k;
printf("aoff: %" PRIu64 "\n", a_off);
- HDputs("i exp act");
+ puts("i exp act");
for (k = 0; k < b_list_size_s; k++) {
printf("%3zu:: %c : %c\n", k, (k < a_off) ? b_list_s[k] : ' ', buf[k]);
}
@@ -4921,9 +4921,9 @@ main(void)
env_h5_drvr = HDgetenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
- if ((0 != HDstrcmp(env_h5_drvr, "nomatch")) && (0 != HDstrcmp(env_h5_drvr, "sec2"))) {
+ if ((0 != strcmp(env_h5_drvr, "nomatch")) && (0 != strcmp(env_h5_drvr, "sec2"))) {
SKIPPED();
- HDputs("Onion VFD test skipped due to non-sec2 default VFD");
+ puts("Onion VFD test skipped due to non-sec2 default VFD");
exit(EXIT_SUCCESS);
}
diff --git a/test/page_buffer.c b/test/page_buffer.c
index 4cc1478..65f2038 100644
--- a/test/page_buffer.c
+++ b/test/page_buffer.c
@@ -116,28 +116,28 @@ create_file(char *filename, hid_t fcpl, hid_t fapl)
for (i = 0; i < NUM_DSETS; i++) {
- HDsnprintf(dset_name, sizeof(dset_name), "D1dset%d", i);
+ snprintf(dset_name, sizeof(dset_name), "D1dset%d", i);
if ((dset_id = H5Dcreate2(grp_id, dset_name, H5T_NATIVE_INT, filespace, H5P_DEFAULT, dcpl,
H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
if (H5Dclose(dset_id) < 0)
FAIL_STACK_ERROR;
- HDsnprintf(dset_name, sizeof(dset_name), "D2dset%d", i);
+ snprintf(dset_name, sizeof(dset_name), "D2dset%d", i);
if ((dset_id = H5Dcreate2(grp_id, dset_name, H5T_NATIVE_INT, filespace, H5P_DEFAULT, dcpl,
H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
if (H5Dclose(dset_id) < 0)
FAIL_STACK_ERROR;
- HDsnprintf(dset_name, sizeof(dset_name), "D3dset%d", i);
+ snprintf(dset_name, sizeof(dset_name), "D3dset%d", i);
if ((dset_id = H5Dcreate2(grp_id, dset_name, H5T_NATIVE_INT, filespace, H5P_DEFAULT, dcpl,
H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
if (H5Dclose(dset_id) < 0)
FAIL_STACK_ERROR;
- HDsnprintf(dset_name, sizeof(dset_name), "dset%d", i);
+ snprintf(dset_name, sizeof(dset_name), "dset%d", i);
if ((dset_id = H5Dcreate2(grp_id, dset_name, H5T_NATIVE_INT, filespace, H5P_DEFAULT, dcpl,
H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
@@ -162,13 +162,13 @@ create_file(char *filename, hid_t fcpl, hid_t fapl)
}
}
- HDsnprintf(dset_name, sizeof(dset_name), "D1dset%d", i);
+ snprintf(dset_name, sizeof(dset_name), "D1dset%d", i);
if (H5Ldelete(grp_id, dset_name, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- HDsnprintf(dset_name, sizeof(dset_name), "D2dset%d", i);
+ snprintf(dset_name, sizeof(dset_name), "D2dset%d", i);
if (H5Ldelete(grp_id, dset_name, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- HDsnprintf(dset_name, sizeof(dset_name), "D3dset%d", i);
+ snprintf(dset_name, sizeof(dset_name), "D3dset%d", i);
if (H5Ldelete(grp_id, dset_name, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
}
@@ -252,7 +252,7 @@ open_file(char *filename, hid_t fapl, hsize_t page_size, size_t page_buffer_size
for (i = 0; i < NUM_DSETS; i++) {
- HDsnprintf(dset_name, sizeof(dset_name), "dset%d", i);
+ snprintf(dset_name, sizeof(dset_name), "dset%d", i);
if ((dset_id = H5Dopen2(grp_id, dset_name, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
@@ -311,9 +311,9 @@ set_multi_split(const char *env_h5_drvr, hid_t fapl, hsize_t pagesize)
H5FD_mem_t mt;
/* Check for split or multi driver */
- if (!HDstrcmp(env_h5_drvr, "split"))
+ if (!strcmp(env_h5_drvr, "split"))
split = true;
- else if (!HDstrcmp(env_h5_drvr, "multi"))
+ else if (!strcmp(env_h5_drvr, "multi"))
multi = true;
if (split || multi) {
@@ -2080,10 +2080,10 @@ main(void)
* Page buffering depends on paged aggregation which is
* currently disabled for multi/split drivers.
*/
- if ((0 == HDstrcmp(env_h5_drvr, "multi")) || (0 == HDstrcmp(env_h5_drvr, "split"))) {
+ if ((0 == strcmp(env_h5_drvr, "multi")) || (0 == strcmp(env_h5_drvr, "split"))) {
SKIPPED();
- HDputs("Skip page buffering test because paged aggregation is disabled for multi/split drivers");
+ puts("Skip page buffering test because paged aggregation is disabled for multi/split drivers");
exit(EXIT_SUCCESS);
} /* end if */
@@ -2099,7 +2099,7 @@ main(void)
#ifdef H5_HAVE_PARALLEL
- HDputs("Page Buffering is disabled for parallel.");
+ puts("Page Buffering is disabled for parallel.");
nerrors += verify_page_buffering_disabled(fapl, env_h5_drvr);
#else /* H5_HAVE_PARALLEL */
@@ -2122,7 +2122,7 @@ main(void)
FAIL_STACK_ERROR;
api_ctx_pushed = false;
- HDputs("All Page Buffering tests passed.");
+ puts("All Page Buffering tests passed.");
exit(EXIT_SUCCESS);
diff --git a/test/reserved.c b/test/reserved.c
index f9d1c7f..ff37baf 100644
--- a/test/reserved.c
+++ b/test/reserved.c
@@ -64,7 +64,7 @@ rsrv_heap(void)
}
H5E_END_TRY
- HDsnprintf(dset_name, sizeof(dset_name), "Dset %d", i);
+ snprintf(dset_name, sizeof(dset_name), "Dset %d", i);
H5E_BEGIN_TRY
{
@@ -108,7 +108,7 @@ rsrv_heap(void)
if (H5open() < 0)
TEST_ERROR;
- HDsnprintf(dset_name, sizeof(dset_name), "Dset %d", i - 2);
+ snprintf(dset_name, sizeof(dset_name), "Dset %d", i - 2);
file_id = H5Fopen(filename, H5F_ACC_RDONLY, H5P_DEFAULT);
if (file_id < 0)
@@ -205,7 +205,7 @@ rsrv_ohdr(void)
} /* end for */
for (i = 0; i < 2000; i++) {
- HDsnprintf(attrname, sizeof(attrname), "attr %d", i);
+ snprintf(attrname, sizeof(attrname), "attr %d", i);
H5E_BEGIN_TRY
{
aid = H5Screate_simple(2, dims, NULL);
@@ -470,8 +470,8 @@ main(void)
if (envval == NULL)
envval = "nomatch";
/* QAK: should be able to use the core driver? */
- if (HDstrcmp(envval, "core") && HDstrcmp(envval, "split") && HDstrcmp(envval, "multi") &&
- HDstrcmp(envval, "family")) {
+ if (strcmp(envval, "core") && strcmp(envval, "split") && strcmp(envval, "multi") &&
+ strcmp(envval, "family")) {
num_errs += rsrv_ohdr();
num_errs += rsrv_heap();
num_errs += rsrv_vlen();
@@ -479,14 +479,14 @@ main(void)
if (num_errs > 0)
printf("**** %d FAILURE%s! ****\n", num_errs, num_errs == 1 ? "" : "S");
else
- HDputs("All address space reservation tests passed.");
+ puts("All address space reservation tests passed.");
fapl = h5_fileaccess();
h5_cleanup(FILENAME, fapl);
return num_errs;
}
else {
- HDputs("All address space reservation tests skipped - Incompatible with current Virtual File Driver");
+ puts("All address space reservation tests skipped - Incompatible with current Virtual File Driver");
}
#endif /* BROKEN */
diff --git a/test/ros3.c b/test/ros3.c
index 994c588..5ab2dec 100644
--- a/test/ros3.c
+++ b/test/ros3.c
@@ -288,7 +288,7 @@ jserr_str(const char *expected, const char *actual, const char *reason)
*----------------------------------------------------------------------------
*/
#define JSVERIFY_STR(expected, actual, reason) \
- if (HDstrcmp((actual), (expected)) != 0) { \
+ if (strcmp((actual), (expected)) != 0) { \
JSERR_STR((expected), (actual), (reason)); \
goto error; \
} /* JSVERIFY_STR */
@@ -327,7 +327,7 @@ jserr_str(const char *expected, const char *actual, const char *reason)
*----------------------------------------------------------------------------
*/
#define JSVERIFY_STR(actual, expected, reason) \
- if (HDstrcmp((actual), (expected)) != 0) { \
+ if (strcmp((actual), (expected)) != 0) { \
JSERR_STR((expected), (actual), (reason)); \
goto error; \
} /* JSVERIFY_STR */
@@ -521,7 +521,7 @@ test_fapl_config_validation(void)
if (false == s3_test_bucket_defined) {
SKIPPED();
- HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
fflush(stdout);
return 0;
}
@@ -796,7 +796,7 @@ test_vfd_open(void)
if (false == s3_test_bucket_defined) {
SKIPPED();
- HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
fflush(stdout);
return 0;
}
@@ -936,14 +936,14 @@ test_eof_eoa(void)
if (s3_test_credentials_loaded == 0) {
SKIPPED();
- HDputs(" s3 credentials are not loaded");
+ puts(" s3 credentials are not loaded");
fflush(stdout);
return 0;
}
if (false == s3_test_bucket_defined) {
SKIPPED();
- HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
fflush(stdout);
return 0;
}
@@ -1044,14 +1044,14 @@ test_H5FDread_without_eoa_set_fails(void)
if (s3_test_credentials_loaded == 0) {
SKIPPED();
- HDputs(" s3 credentials are not loaded");
+ puts(" s3 credentials are not loaded");
fflush(stdout);
return 0;
}
if (false == s3_test_bucket_defined) {
SKIPPED();
- HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
fflush(stdout);
return 0;
}
@@ -1215,14 +1215,14 @@ test_read(void)
if (s3_test_credentials_loaded == 0) {
SKIPPED();
- HDputs(" s3 credentials are not loaded");
+ puts(" s3 credentials are not loaded");
fflush(stdout);
return 0;
}
if (false == s3_test_bucket_defined) {
SKIPPED();
- HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
fflush(stdout);
return 0;
}
@@ -1356,7 +1356,7 @@ test_noops_and_autofails(void)
if (false == s3_test_bucket_defined) {
SKIPPED();
- HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
fflush(stdout);
return 0;
}
@@ -1473,14 +1473,14 @@ test_cmp(void)
if (s3_test_credentials_loaded == 0) {
SKIPPED();
- HDputs(" s3 credentials are not loaded");
+ puts(" s3 credentials are not loaded");
fflush(stdout);
return 0;
}
if (false == s3_test_bucket_defined) {
SKIPPED();
- HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
fflush(stdout);
return 0;
}
@@ -1594,14 +1594,14 @@ test_H5F_integration(void)
if (s3_test_credentials_loaded == 0) {
SKIPPED();
- HDputs(" s3 credentials are not loaded");
+ puts(" s3 credentials are not loaded");
fflush(stdout);
return 0;
}
if (false == s3_test_bucket_defined) {
SKIPPED();
- HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
fflush(stdout);
return 0;
}
@@ -1701,31 +1701,31 @@ main(void)
"variable 'HDF5_ROS3_TEST_BUCKET_URL'!\n");
}
else {
- HDstrncpy(s3_test_bucket_url, bucket_url_env, S3_TEST_MAX_URL_SIZE);
+ strncpy(s3_test_bucket_url, bucket_url_env, S3_TEST_MAX_URL_SIZE);
s3_test_bucket_defined = true;
}
- if (S3_TEST_MAX_URL_SIZE < HDsnprintf(url_text_restricted, (size_t)S3_TEST_MAX_URL_SIZE, "%s/%s",
- (const char *)s3_test_bucket_url,
- (const char *)S3_TEST_RESOURCE_TEXT_RESTRICTED)) {
+ if (S3_TEST_MAX_URL_SIZE < snprintf(url_text_restricted, (size_t)S3_TEST_MAX_URL_SIZE, "%s/%s",
+ (const char *)s3_test_bucket_url,
+ (const char *)S3_TEST_RESOURCE_TEXT_RESTRICTED)) {
printf("* ros3 setup failed (text_restricted) ! *\n");
return 1;
}
- if (S3_TEST_MAX_URL_SIZE < HDsnprintf(url_text_public, (size_t)S3_TEST_MAX_URL_SIZE, "%s/%s",
- (const char *)s3_test_bucket_url,
- (const char *)S3_TEST_RESOURCE_TEXT_PUBLIC)) {
+ if (S3_TEST_MAX_URL_SIZE < snprintf(url_text_public, (size_t)S3_TEST_MAX_URL_SIZE, "%s/%s",
+ (const char *)s3_test_bucket_url,
+ (const char *)S3_TEST_RESOURCE_TEXT_PUBLIC)) {
printf("* ros3 setup failed (text_public) ! *\n");
return 1;
}
- if (S3_TEST_MAX_URL_SIZE < HDsnprintf(url_h5_public, (size_t)S3_TEST_MAX_URL_SIZE, "%s/%s",
- (const char *)s3_test_bucket_url,
- (const char *)S3_TEST_RESOURCE_H5_PUBLIC)) {
+ if (S3_TEST_MAX_URL_SIZE < snprintf(url_h5_public, (size_t)S3_TEST_MAX_URL_SIZE, "%s/%s",
+ (const char *)s3_test_bucket_url,
+ (const char *)S3_TEST_RESOURCE_H5_PUBLIC)) {
printf("* ros3 setup failed (h5_public) ! *\n");
return 1;
}
- if (S3_TEST_MAX_URL_SIZE < HDsnprintf(url_missing, S3_TEST_MAX_URL_SIZE, "%s/%s",
- (const char *)s3_test_bucket_url,
- (const char *)S3_TEST_RESOURCE_MISSING)) {
+ if (S3_TEST_MAX_URL_SIZE < snprintf(url_missing, S3_TEST_MAX_URL_SIZE, "%s/%s",
+ (const char *)s3_test_bucket_url,
+ (const char *)S3_TEST_RESOURCE_MISSING)) {
printf("* ros3 setup failed (missing) ! *\n");
return 1;
}
@@ -1745,12 +1745,11 @@ main(void)
if (SUCCEED == H5FD_s3comms_load_aws_profile(S3_TEST_PROFILE_NAME, s3_test_aws_access_key_id,
s3_test_aws_secret_access_key, s3_test_aws_region)) {
s3_test_credentials_loaded = 1;
- HDstrncpy(restricted_access_fa.aws_region, (const char *)s3_test_aws_region,
- H5FD_ROS3_MAX_REGION_LEN);
- HDstrncpy(restricted_access_fa.secret_id, (const char *)s3_test_aws_access_key_id,
- H5FD_ROS3_MAX_SECRET_ID_LEN);
- HDstrncpy(restricted_access_fa.secret_key, (const char *)s3_test_aws_secret_access_key,
- H5FD_ROS3_MAX_SECRET_KEY_LEN);
+ strncpy(restricted_access_fa.aws_region, (const char *)s3_test_aws_region, H5FD_ROS3_MAX_REGION_LEN);
+ strncpy(restricted_access_fa.secret_id, (const char *)s3_test_aws_access_key_id,
+ H5FD_ROS3_MAX_SECRET_ID_LEN);
+ strncpy(restricted_access_fa.secret_key, (const char *)s3_test_aws_secret_access_key,
+ H5FD_ROS3_MAX_SECRET_KEY_LEN);
}
/******************
diff --git a/test/s3comms.c b/test/s3comms.c
index ca79217..b9b2802 100644
--- a/test/s3comms.c
+++ b/test/s3comms.c
@@ -281,7 +281,7 @@ jserr_str(const char *expected, const char *actual, const char *reason)
*----------------------------------------------------------------------------
*/
#define JSVERIFY_STR(expected, actual, reason) \
- if (HDstrcmp((actual), (expected)) != 0) { \
+ if (strcmp((actual), (expected)) != 0) { \
JSERR_STR((expected), (actual), (reason)); \
goto error; \
} /* JSVERIFY_STR */
@@ -323,7 +323,7 @@ jserr_str(const char *expected, const char *actual, const char *reason)
*----------------------------------------------------------------------------
*/
#define JSVERIFY_STR(actual, expected, reason) \
- if (HDstrcmp((actual), (expected)) != 0) { \
+ if (strcmp((actual), (expected)) != 0) { \
JSERR_STR((expected), (actual), (reason)); \
goto error; \
} /* JSVERIFY_STR */
@@ -1188,8 +1188,8 @@ test_HMAC_SHA256(void)
SHA256_DIGEST_LENGTH,
"AWS4-HMAC-SHA256\n20130524T000000Z\n20130524/us-east-1/s3/"
"aws4_request\n7344ae5b7ee6c3e7e6b0fe0640412a37625d1fbfff95c48bbb2dc43964946972",
- HDstrlen("AWS4-HMAC-SHA256\n20130524T000000Z\n20130524/us-east-1/s3/"
- "aws4_request\n7344ae5b7ee6c3e7e6b0fe0640412a37625d1fbfff95c48bbb2dc43964946972"),
+ strlen("AWS4-HMAC-SHA256\n20130524T000000Z\n20130524/us-east-1/s3/"
+ "aws4_request\n7344ae5b7ee6c3e7e6b0fe0640412a37625d1fbfff95c48bbb2dc43964946972"),
"f0e8bdb87c964420e857bd35b5d6ed310bd44f0170aba48dd91039c6036bdb41",
SHA256_DIGEST_LENGTH * 2 + 1, /* +1 for null terminator */
},
@@ -1228,7 +1228,7 @@ test_HMAC_SHA256(void)
cases[i].msg);
if (cases[i].ret == SUCCEED) {
#ifdef VERBOSE
- if (0 != HDstrncmp(cases[i].exp, dest, HDstrlen(cases[i].exp))) {
+ if (0 != strncmp(cases[i].exp, dest, strlen(cases[i].exp))) {
/* print out how wrong things are, and then fail
*/
dest = (char *)realloc(dest, cases[i].dest_size + 1);
@@ -1240,7 +1240,7 @@ test_HMAC_SHA256(void)
#else /* VERBOSE not defined */
/* simple pass/fail test
*/
- JSVERIFY(0, HDstrncmp(cases[i].exp, dest, HDstrlen(cases[i].exp)), NULL);
+ JSVERIFY(0, strncmp(cases[i].exp, dest, strlen(cases[i].exp)), NULL);
#endif /* VERBOSE */
}
free(dest);
@@ -1313,7 +1313,7 @@ test_nlowercase(void)
JSVERIFY(SUCCEED, H5FD_s3comms_nlowercase(dest, cases[i].in, cases[i].len), cases[i].in)
if (cases[i].len > 0) {
- JSVERIFY(0, HDstrncmp(dest, cases[i].exp, cases[i].len), NULL)
+ JSVERIFY(0, strncmp(dest, cases[i].exp, cases[i].len), NULL)
}
free(dest);
} /* end for each testcase */
@@ -1679,7 +1679,7 @@ test_percent_encode_char(void)
JSVERIFY(SUCCEED, H5FD_s3comms_percent_encode_char(dest, (const unsigned char)cases[i].c, &dest_len),
NULL)
JSVERIFY(cases[i].exp_len, dest_len, NULL)
- JSVERIFY(0, HDstrncmp(dest, cases[i].exp, dest_len), NULL)
+ JSVERIFY(0, strncmp(dest, cases[i].exp, dest_len), NULL)
JSVERIFY_STR(cases[i].exp, dest, NULL)
}
@@ -1713,13 +1713,13 @@ test_s3r_get_filesize(void)
*/
if (false == s3_test_bucket_defined) {
SKIPPED();
- HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
fflush(stdout);
return 0;
}
- FAIL_IF(S3_TEST_MAX_URL_SIZE < HDsnprintf(url_raven, S3_TEST_MAX_URL_SIZE, "%s/%s", s3_test_bucket_url,
- S3_TEST_RESOURCE_TEXT_PUBLIC));
+ FAIL_IF(S3_TEST_MAX_URL_SIZE < snprintf(url_raven, S3_TEST_MAX_URL_SIZE, "%s/%s", s3_test_bucket_url,
+ S3_TEST_RESOURCE_TEXT_PUBLIC));
JSVERIFY(0, H5FD_s3comms_s3r_get_filesize(NULL), "filesize of the null handle should be 0")
@@ -1769,13 +1769,13 @@ test_s3r_open(void)
if (s3_test_credentials_loaded == 0) {
SKIPPED();
- HDputs(" s3 credentials are not loaded");
+ puts(" s3 credentials are not loaded");
fflush(stdout);
return 0;
}
if (false == s3_test_bucket_defined) {
SKIPPED();
- HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
fflush(stdout);
return 0;
}
@@ -1784,14 +1784,14 @@ test_s3r_open(void)
* PRE-TEST SETUP *
******************/
- FAIL_IF(S3_TEST_MAX_URL_SIZE < HDsnprintf(url_shakespeare, S3_TEST_MAX_URL_SIZE, "%s/%s",
- s3_test_bucket_url, S3_TEST_RESOURCE_TEXT_RESTRICTED));
+ FAIL_IF(S3_TEST_MAX_URL_SIZE < snprintf(url_shakespeare, S3_TEST_MAX_URL_SIZE, "%s/%s",
+ s3_test_bucket_url, S3_TEST_RESOURCE_TEXT_RESTRICTED));
- FAIL_IF(S3_TEST_MAX_URL_SIZE < HDsnprintf(url_missing, S3_TEST_MAX_URL_SIZE, "%s/%s", s3_test_bucket_url,
- S3_TEST_RESOURCE_MISSING));
+ FAIL_IF(S3_TEST_MAX_URL_SIZE < snprintf(url_missing, S3_TEST_MAX_URL_SIZE, "%s/%s", s3_test_bucket_url,
+ S3_TEST_RESOURCE_MISSING));
- FAIL_IF(S3_TEST_MAX_URL_SIZE < HDsnprintf(url_raven, S3_TEST_MAX_URL_SIZE, "%s/%s", s3_test_bucket_url,
- S3_TEST_RESOURCE_TEXT_PUBLIC));
+ FAIL_IF(S3_TEST_MAX_URL_SIZE < snprintf(url_raven, S3_TEST_MAX_URL_SIZE, "%s/%s", s3_test_bucket_url,
+ S3_TEST_RESOURCE_TEXT_PUBLIC));
/* Set given bucket url with invalid/inactive port number for badport.
* Note, this sort of micro-management of parsed_url_t is not advised
@@ -1800,17 +1800,17 @@ test_s3r_open(void)
if (purl->port == NULL) {
purl->port = (char *)H5MM_malloc(sizeof(char) * 5);
FAIL_IF(purl->port == NULL);
- FAIL_IF(5 < HDsnprintf(purl->port, 5, "9000"))
+ FAIL_IF(5 < snprintf(purl->port, 5, "9000"))
}
- else if (HDstrcmp(purl->port, "9000") != 0) {
- FAIL_IF(5 < HDsnprintf(purl->port, 5, "9000"))
+ else if (strcmp(purl->port, "9000") != 0) {
+ FAIL_IF(5 < snprintf(purl->port, 5, "9000"))
}
else {
- FAIL_IF(5 < HDsnprintf(purl->port, 5, "1234"))
+ FAIL_IF(5 < snprintf(purl->port, 5, "1234"))
}
- FAIL_IF(S3_TEST_MAX_URL_SIZE < HDsnprintf(url_raven_badport, S3_TEST_MAX_URL_SIZE, "%s://%s:%s/%s",
- purl->scheme, purl->host, purl->port,
- S3_TEST_RESOURCE_TEXT_PUBLIC));
+ FAIL_IF(S3_TEST_MAX_URL_SIZE < snprintf(url_raven_badport, S3_TEST_MAX_URL_SIZE, "%s://%s:%s/%s",
+ purl->scheme, purl->host, purl->port,
+ S3_TEST_RESOURCE_TEXT_PUBLIC));
curl_global_init(CURL_GLOBAL_DEFAULT);
curl_ready = true;
@@ -1971,15 +1971,15 @@ test_s3r_read(void)
*/
if (false == s3_test_bucket_defined) {
SKIPPED();
- HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
fflush(stdout);
return 0;
}
curl_global_init(CURL_GLOBAL_DEFAULT);
curl_ready = true;
- FAIL_IF(S3_TEST_MAX_URL_SIZE < HDsnprintf(url_raven, S3_TEST_MAX_URL_SIZE, "%s/%s", s3_test_bucket_url,
- S3_TEST_RESOURCE_TEXT_PUBLIC));
+ FAIL_IF(S3_TEST_MAX_URL_SIZE < snprintf(url_raven, S3_TEST_MAX_URL_SIZE, "%s/%s", s3_test_bucket_url,
+ S3_TEST_RESOURCE_TEXT_PUBLIC));
for (i = 0; i < S3COMMS_TEST_BUFFER_SIZE; i++)
buffer[i] = '\0';
@@ -2032,7 +2032,7 @@ test_s3r_read(void)
JSVERIFY(SUCCEED, H5FD_s3comms_s3r_read(handle, (haddr_t)6370, (size_t)0, buffer), NULL)
JSVERIFY(
0,
- HDstrncmp(
+ strncmp(
buffer,
"And my soul from out that shadow that lies floating on the floor\nShall be lifted—nevermore!\n",
94),
@@ -2049,7 +2049,7 @@ test_s3r_read(void)
H5FD_s3comms_s3r_read(handle, (haddr_t)6400, (size_t)100, /* 6400+100 > 6464 */
buffer),
NULL)
- JSVERIFY(0, HDstrcmp("", buffer), NULL)
+ JSVERIFY(0, strcmp("", buffer), NULL)
/************************
* read starts past eof *
@@ -2059,14 +2059,14 @@ test_s3r_read(void)
H5FD_s3comms_s3r_read(handle, (haddr_t)1200699, /* 1200699 > 6464 */
(size_t)100, buffer),
NULL)
- JSVERIFY(0, HDstrcmp("", buffer), NULL)
+ JSVERIFY(0, strcmp("", buffer), NULL)
/**********************
* read starts on eof *
**********************/
JSVERIFY(FAIL, H5FD_s3comms_s3r_read(handle, (haddr_t)6464, (size_t)0, buffer), NULL)
- JSVERIFY(0, HDstrcmp("", buffer), NULL)
+ JSVERIFY(0, strcmp("", buffer), NULL)
/*************
* TEAR DOWN *
@@ -2153,7 +2153,7 @@ test_signing_key(void)
JSVERIFY(SUCCEED, H5FD_s3comms_signing_key(key, cases[i].secret_key, cases[i].region, cases[i].when),
NULL)
- JSVERIFY(0, HDstrncmp((const char *)cases[i].exp, (const char *)key, SHA256_DIGEST_LENGTH),
+ JSVERIFY(0, strncmp((const char *)cases[i].exp, (const char *)key, SHA256_DIGEST_LENGTH),
(const char *)cases[i].exp)
free(key);
@@ -2324,12 +2324,12 @@ test_trim(void)
assert(str == NULL);
str = (char *)malloc(sizeof(char) * cases[i].in_len);
assert(str != NULL);
- HDstrncpy(str, cases[i].in, cases[i].in_len);
+ strncpy(str, cases[i].in, cases[i].in_len);
JSVERIFY(SUCCEED, H5FD_s3comms_trim(dest, str, cases[i].in_len, &dest_len), NULL)
JSVERIFY(cases[i].exp_len, dest_len, cases[i].in)
if (dest_len > 0) {
- JSVERIFY(0, HDstrncmp(cases[i].exp, dest, dest_len), cases[i].exp)
+ JSVERIFY(0, strncmp(cases[i].exp, dest, dest_len), cases[i].exp)
}
free(str);
str = NULL;
@@ -2439,8 +2439,8 @@ test_uriencode(void)
JSVERIFY(SUCCEED,
H5FD_s3comms_uriencode(dest, cases[i].str, str_len, cases[i].encode_slash, &dest_written),
NULL);
- JSVERIFY(HDstrlen(cases[i].expected), dest_written, NULL)
- JSVERIFY(0, HDstrncmp(dest, cases[i].expected, dest_written), cases[i].expected);
+ JSVERIFY(strlen(cases[i].expected), dest_written, NULL)
+ JSVERIFY(0, strncmp(dest, cases[i].expected, dest_written), cases[i].expected);
free(dest);
dest = NULL;
@@ -2526,7 +2526,7 @@ main(void)
"variable 'HDF5_ROS3_TEST_BUCKET_URL'!\n");
}
else {
- HDstrncpy(s3_test_bucket_url, bucket_url_env, S3_TEST_MAX_URL_SIZE);
+ strncpy(s3_test_bucket_url, bucket_url_env, S3_TEST_MAX_URL_SIZE);
s3_test_bucket_defined = true;
}
diff --git a/test/select_io_dset.c b/test/select_io_dset.c
index 1e11941..4c67190 100644
--- a/test/select_io_dset.c
+++ b/test/select_io_dset.c
@@ -141,8 +141,8 @@ test_no_type_conv(hid_t fid, unsigned chunked, unsigned dtrans, unsigned mwbuf)
}
/* Generate dataset name */
- HDsnprintf(dset_name, sizeof(dset_name), "no_tconv_%s_%s_%s", chunked ? "chunked" : "contig",
- dtrans ? "xform" : "noxform", mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_name, sizeof(dset_name), "no_tconv_%s_%s_%s", chunked ? "chunked" : "contig",
+ dtrans ? "xform" : "noxform", mwbuf ? "mwbuf" : "nomwbuf");
/* Create dataset */
if ((did = H5Dcreate2(fid, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
@@ -299,8 +299,8 @@ test_no_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
}
/* Generate dataset name */
- HDsnprintf(dset_name, sizeof(dset_name), "no_size_change_%s_%s", chunked ? "chunked" : "contig",
- mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_name, sizeof(dset_name), "no_size_change_%s_%s", chunked ? "chunked" : "contig",
+ mwbuf ? "mwbuf" : "nomwbuf");
/* Create 1d dataset */
if ((did = H5Dcreate2(fid, dset_name, H5T_STD_I32BE, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
@@ -431,8 +431,8 @@ test_larger_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsign
}
/* Generate dataset name */
- HDsnprintf(dset_name, sizeof(dset_name), "larger_no_bkg_%s_%s_%s", chunked ? "chunked" : "contig",
- dtrans ? "xform" : "noxform", mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_name, sizeof(dset_name), "larger_no_bkg_%s_%s_%s", chunked ? "chunked" : "contig",
+ dtrans ? "xform" : "noxform", mwbuf ? "mwbuf" : "nomwbuf");
/* Create dataset */
if ((did = H5Dcreate2(fid, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
@@ -573,8 +573,8 @@ test_smaller_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsig
}
/* Generate dataset name */
- HDsnprintf(dset_name, sizeof(dset_name), "smaller_no_bkg_%s_%s_%s", chunked ? "chunked" : "contig",
- dtrans ? "xform" : "noxform", mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_name, sizeof(dset_name), "smaller_no_bkg_%s_%s_%s", chunked ? "chunked" : "contig",
+ dtrans ? "xform" : "noxform", mwbuf ? "mwbuf" : "nomwbuf");
/* Create 1d chunked dataset with/without data transform */
if ((did = H5Dcreate2(fid, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
@@ -774,8 +774,8 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Case 5(a) */
/* Generate dataset name */
- HDsnprintf(dset_name, sizeof(dset_name), "cmpd_with_bkg_%s_%s", chunked ? "chunked" : "contig",
- mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_name, sizeof(dset_name), "cmpd_with_bkg_%s_%s", chunked ? "chunked" : "contig",
+ mwbuf ? "mwbuf" : "nomwbuf");
/* Create 1d dataset */
if ((did = H5Dcreate2(fid, dset_name, s1_tid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
@@ -1101,8 +1101,8 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m
FAIL_STACK_ERROR;
/* Generate dataset name */
- HDsnprintf(dset_names[i], sizeof(dset_names[i]), "multi_dset%d_%s_%s_%s", i,
- chunked ? "chunked" : "contig", dtrans ? "xform" : "noxform", mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_names[i], sizeof(dset_names[i]), "multi_dset%d_%s_%s_%s", i,
+ chunked ? "chunked" : "contig", dtrans ? "xform" : "noxform", mwbuf ? "mwbuf" : "nomwbuf");
/* Create ith dataset */
if ((dset_dids[i] =
@@ -1431,8 +1431,8 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
FAIL_STACK_ERROR;
/* Generate dataset name */
- HDsnprintf(dset_names[i], sizeof(dset_names[i]), "multi_cmpd_dset%d_%s_%s", i,
- chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_names[i], sizeof(dset_names[i]), "multi_cmpd_dset%d_%s_%s", i,
+ chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
/* Create ith dataset */
if ((dset_dids[i] =
@@ -1865,8 +1865,8 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
FAIL_STACK_ERROR;
/* Generate dataset name */
- HDsnprintf(dset_names[i], sizeof(dset_names[i]), "multi_size_dset%d_%s_%s", i,
- chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_names[i], sizeof(dset_names[i]), "multi_size_dset%d_%s_%s", i,
+ chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
/* Create ith dataset */
if ((dset_dids[i] = H5Dcreate2(fid, dset_names[i], H5T_STD_I32BE, file_sids[i], H5P_DEFAULT, dcpl,
@@ -2332,24 +2332,24 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf)
mm = HDrandom() % (int)ndsets;
if (mm == 0) {
dset_types[i] = DSET_WITH_NO_CONV;
- HDsnprintf(dset_names[i], sizeof(dset_names[i]), "multi_all_nconv_dset%d_%s_%s", i,
- chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_names[i], sizeof(dset_names[i]), "multi_all_nconv_dset%d_%s_%s", i,
+ chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
if ((dset_dids[i] = H5Dcreate2(fid, dset_names[i], H5T_NATIVE_INT, file_sids[i], H5P_DEFAULT,
dcpl, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
}
else if (mm == 1) {
dset_types[i] = DSET_WITH_CONV_AND_NO_BKG;
- HDsnprintf(dset_names[i], sizeof(dset_names[i]), "multi_all_conv_nbkg_dset%d_%s_%s", i,
- chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_names[i], sizeof(dset_names[i]), "multi_all_conv_nbkg_dset%d_%s_%s", i,
+ chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
if ((dset_dids[i] = H5Dcreate2(fid, dset_names[i], H5T_NATIVE_LONG, file_sids[i], H5P_DEFAULT,
dcpl, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
}
else {
dset_types[i] = DSET_WITH_CONV_AND_BKG;
- HDsnprintf(dset_names[i], sizeof(dset_names[i]), "multi_all_conv_bkg_dset%d_%s_%s", i,
- chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
+ snprintf(dset_names[i], sizeof(dset_names[i]), "multi_all_conv_bkg_dset%d_%s_%s", i,
+ chunked ? "chunked" : "contig", mwbuf ? "mwbuf" : "nomwbuf");
if ((dset_dids[i] = H5Dcreate2(fid, dset_names[i], s1_tid, file_sids[i], H5P_DEFAULT, dcpl,
H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
@@ -2860,7 +2860,7 @@ test_no_selection_io_cause_mode(const char *filename, hid_t fapl, uint32_t test_
/* The split and multi driver are not compatible with page buffering. No message since the other
* cases aren't skipped. */
env_h5_drvr = HDgetenv(HDF5_DRIVER);
- if (env_h5_drvr && (!HDstrcmp(env_h5_drvr, "split") || !HDstrcmp(env_h5_drvr, "multi")))
+ if (env_h5_drvr && (!strcmp(env_h5_drvr, "split") || !strcmp(env_h5_drvr, "multi")))
return 0;
}
diff --git a/test/set_extent.c b/test/set_extent.c
index 7b7bcbd..08b96a5 100644
--- a/test/set_extent.c
+++ b/test/set_extent.c
@@ -117,7 +117,7 @@ main(void)
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
/* Current VFD that does not support contiguous address space */
- contig_addr_vfd = (bool)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
/* Initialize random number seed */
HDsrandom((unsigned)HDtime(NULL));
@@ -155,11 +155,11 @@ main(void)
/* Set the FAPL for the chunk cache settings */
if (chunk_cache) {
- HDputs(" and chunk cache enabled:");
+ puts(" and chunk cache enabled:");
my_fapl = fapl;
} /* end if */
else {
- HDputs(" and chunk cache disabled:");
+ puts(" and chunk cache disabled:");
my_fapl = fapl2;
} /* end else */
@@ -209,7 +209,7 @@ main(void)
if (nerrors)
goto error;
- HDputs("All H5Dset_extent tests passed.");
+ puts("All H5Dset_extent tests passed.");
return 0;
diff --git a/test/stab.c b/test/stab.c
index 15432ee..e43e9c0 100644
--- a/test/stab.c
+++ b/test/stab.c
@@ -125,9 +125,9 @@ test_misc(hid_t fcpl, hid_t fapl, bool new_format)
TEST_ERROR;
if (H5Oget_comment_by_name(g3, "././.", comment, sizeof comment, H5P_DEFAULT) < 0)
TEST_ERROR;
- if (HDstrcmp(comment, "hello world") != 0) {
+ if (strcmp(comment, "hello world") != 0) {
H5_FAILED();
- HDputs(" Read the wrong comment string from the group.");
+ puts(" Read the wrong comment string from the group.");
printf(" got: \"%s\"\n ans: \"hello world\"\n", comment);
TEST_ERROR;
}
@@ -210,7 +210,7 @@ test_long(hid_t fcpl, hid_t fapl, bool new_format)
name1[LONG_NAME_LEN - 1] = '\0';
name2Len = (2 * LONG_NAME_LEN) + 2;
name2 = (char *)malloc(name2Len);
- HDsnprintf(name2, name2Len, "%s/%s", name1, name1);
+ snprintf(name2, name2Len, "%s/%s", name1, name1);
/* Create groups */
if ((g1 = H5Gcreate2(fid, name1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -296,7 +296,7 @@ test_large(hid_t fcpl, hid_t fapl, bool new_format)
if (H5G__has_stab_test(cwg) != false)
TEST_ERROR;
for (i = 0; i < LARGE_NOBJS; i++) {
- HDsnprintf(name, sizeof(name), "%05d%05d", (HDrandom() % 100000), i);
+ snprintf(name, sizeof(name), "%05d%05d", (HDrandom() % 100000), i);
if ((dir = H5Gcreate2(cwg, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if (H5Gclose(dir) < 0)
@@ -435,7 +435,7 @@ lifecycle(hid_t fcpl, hid_t fapl2)
TEST_ERROR;
/* Create first "bottom" group */
- HDsnprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, (unsigned)0);
+ snprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, (unsigned)0);
if ((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
@@ -458,7 +458,7 @@ lifecycle(hid_t fcpl, hid_t fapl2)
/* Create several more bottom groups, to push the top group almost to a symbol table */
/* (Start counting at '1', since we've already created one bottom group */
for (u = 1; u < LIFECYCLE_MAX_COMPACT; u++) {
- HDsnprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, u);
+ snprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, u);
if ((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
@@ -494,7 +494,7 @@ lifecycle(hid_t fcpl, hid_t fapl2)
TEST_ERROR;
/* Create one more "bottom" group, which should push top group into using a symbol table */
- HDsnprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, u);
+ snprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, u);
if ((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
@@ -528,7 +528,7 @@ lifecycle(hid_t fcpl, hid_t fapl2)
/* Unlink objects from top group */
while (u >= LIFECYCLE_MIN_DENSE) {
- HDsnprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, u);
+ snprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, u);
if (H5Ldelete(gid, objname, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
@@ -545,7 +545,7 @@ lifecycle(hid_t fcpl, hid_t fapl2)
TEST_ERROR;
/* Unlink one more object from the group, which should transform back to using links */
- HDsnprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, u);
+ snprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, u);
if (H5Ldelete(gid, objname, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
u--;
@@ -559,11 +559,11 @@ lifecycle(hid_t fcpl, hid_t fapl2)
TEST_ERROR;
/* Unlink last two objects from top group */
- HDsnprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, u);
+ snprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, u);
if (H5Ldelete(gid, objname, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
u--;
- HDsnprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, u);
+ snprintf(objname, sizeof(objname), LIFECYCLE_BOTTOM_GROUP, u);
if (H5Ldelete(gid, objname, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
@@ -818,7 +818,7 @@ read_old(void)
/* Create a bunch of objects in the group */
for (u = 0; u < READ_OLD_NGROUPS; u++) {
- HDsnprintf(objname, sizeof(objname), "Group %u", u);
+ snprintf(objname, sizeof(objname), "Group %u", u);
if ((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
@@ -842,7 +842,7 @@ read_old(void)
/* Delete new objects from old group */
for (u = 0; u < READ_OLD_NGROUPS; u++) {
- HDsnprintf(objname, sizeof(objname), "Group %u", u);
+ snprintf(objname, sizeof(objname), "Group %u", u);
if (H5Ldelete(gid, objname, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -951,7 +951,7 @@ no_compact(hid_t fcpl, hid_t fapl2)
TEST_ERROR;
/* Create first "bottom" group */
- HDsnprintf(objname, sizeof(objname), NO_COMPACT_BOTTOM_GROUP, (unsigned)0);
+ snprintf(objname, sizeof(objname), NO_COMPACT_BOTTOM_GROUP, (unsigned)0);
if ((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
@@ -972,7 +972,7 @@ no_compact(hid_t fcpl, hid_t fapl2)
TEST_ERROR;
/* Unlink object from top group */
- HDsnprintf(objname, sizeof(objname), NO_COMPACT_BOTTOM_GROUP, (unsigned)0);
+ snprintf(objname, sizeof(objname), NO_COMPACT_BOTTOM_GROUP, (unsigned)0);
if (H5Ldelete(gid, objname, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
@@ -1250,7 +1250,7 @@ old_api(hid_t fapl)
(void)fapl;
SKIPPED();
- HDputs(" Deprecated API symbols not enabled");
+ puts(" Deprecated API symbols not enabled");
#endif /* H5_NO_DEPRECATED_SYMBOLS */
return 0;
@@ -1386,7 +1386,7 @@ main(void)
env_h5_drvr = "nomatch";
/* VFD that does not support contiguous address space */
- contig_addr_vfd = (bool)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
/* Reset library */
h5_reset();
@@ -1465,7 +1465,7 @@ main(void)
if (nerrors)
goto error;
- HDputs("All symbol table tests passed.");
+ puts("All symbol table tests passed.");
/* Cleanup */
if (GetTestCleanup()) {
@@ -1477,6 +1477,6 @@ main(void)
return 0;
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
return 1;
}
diff --git a/test/swmr.c b/test/swmr.c
index f448d16..e7eec67 100644
--- a/test/swmr.c
+++ b/test/swmr.c
@@ -142,7 +142,7 @@ test_metadata_read_attempts(hid_t in_fapl)
if (!compat_w_default_vfd) {
SKIPPED();
- HDputs(" The current VFD is not compatible with the default VFD.");
+ puts(" The current VFD is not compatible with the default VFD.");
return 0;
}
@@ -2411,7 +2411,7 @@ test_start_swmr_write_concur(hid_t H5_ATTR_UNUSED in_fapl, bool new_format)
}
SKIPPED();
- HDputs(" Test skipped due to fork or waitpid not defined.");
+ puts(" Test skipped due to fork or waitpid not defined.");
return 0;
} /* test_start_swmr_write_concur() */
@@ -3247,13 +3247,13 @@ tssw_persist_dapl_verify(hid_t did, hid_t vdsid1, hid_t vdsid2, hsize_t boundary
/* Get efile prefix property and verify */
if (H5Pget_efile_prefix(dapl, efile_prefix_out, sizeof(efile_prefix_out)) < 0)
TEST_ERROR;
- if (HDstrncmp(efile_prefix, efile_prefix_out, sizeof(efile_prefix_out)))
+ if (strncmp(efile_prefix, efile_prefix_out, sizeof(efile_prefix_out)))
TEST_ERROR;
/* Get virtual prefix property and verify */
if (H5Pget_virtual_prefix(vds_dapl1, virtual_prefix_out, sizeof(virtual_prefix_out)) < 0)
TEST_ERROR;
- if (HDstrncmp(virtual_prefix, virtual_prefix_out, sizeof(virtual_prefix_out)))
+ if (strncmp(virtual_prefix, virtual_prefix_out, sizeof(virtual_prefix_out)))
TEST_ERROR;
/* Get virtual printf gap property and verify */
@@ -5188,7 +5188,7 @@ test_file_lock_concur(hid_t H5_ATTR_UNUSED in_fapl)
/* Output message about test being performed */
TESTING("File open with different combinations of flags--concurrent access");
SKIPPED();
- HDputs(" Test skipped due to fork or waitpid not defined.");
+ puts(" Test skipped due to fork or waitpid not defined.");
return 0;
} /* end test_file_lock_concur() */
@@ -5581,7 +5581,7 @@ test_file_lock_swmr_concur(hid_t H5_ATTR_UNUSED in_fapl)
/* Output message about test being performed */
TESTING("File open with different combintations of flags + SWMR flags--concurrent access");
SKIPPED();
- HDputs(" Test skipped due to fork or waitpid not defined.");
+ puts(" Test skipped due to fork or waitpid not defined.");
return 0;
} /* end test_file_lock_swmr_concur() */
@@ -6608,7 +6608,7 @@ test_file_locking(hid_t in_fapl, bool turn_locking_on, bool env_var_override)
else
TESTING("File locking: OFF");
SKIPPED();
- HDputs(" Test skipped due to fork or waitpid not defined.");
+ puts(" Test skipped due to fork or waitpid not defined.");
return 0;
#else /* !(defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID)) */
hid_t fid = H5I_INVALID_HID; /* File ID */
@@ -7083,7 +7083,7 @@ test_refresh_concur(hid_t H5_ATTR_UNUSED in_fapl, bool new_format)
}
SKIPPED();
- HDputs(" Test skipped due to fork or waitpid not defined.");
+ puts(" Test skipped due to fork or waitpid not defined.");
return 0;
} /* test_refresh_concur() */
@@ -7753,7 +7753,7 @@ main(void)
* disabled.
*/
lock_env_var = HDgetenv(HDF5_USE_FILE_LOCKING);
- if (lock_env_var && !HDstrcmp(lock_env_var, "FALSE"))
+ if (lock_env_var && !strcmp(lock_env_var, "FALSE"))
use_file_locking = false;
else
use_file_locking = true;
@@ -7828,7 +7828,7 @@ main(void)
/* Tests SWMR VFD compatibility flag.
* Only needs to run when the VFD is the default (sec2).
*/
- if (NULL == driver || !HDstrcmp(driver, "") || !HDstrcmp(driver, "sec2"))
+ if (NULL == driver || !strcmp(driver, "") || !strcmp(driver, "sec2"))
nerrors += test_swmr_vfd_flag();
/* Test multiple opens via different locking flags */
diff --git a/test/swmr_common.c b/test/swmr_common.c
index ef4c550..dd7dd8e 100644
--- a/test/swmr_common.c
+++ b/test/swmr_common.c
@@ -181,7 +181,7 @@ generate_name(char *name_buf, size_t name_buf_length, unsigned level, unsigned c
{
assert(name_buf);
- HDsnprintf(name_buf, name_buf_length, "%u-%04u", level, count);
+ snprintf(name_buf, name_buf_length, "%u-%04u", level, count);
return 0;
} /* end generate_name() */
@@ -209,7 +209,7 @@ generate_symbols(void)
char name_buf[64];
generate_name(name_buf, sizeof(name_buf), u, v);
- symbol_info[u][v].name = HDstrdup(name_buf);
+ symbol_info[u][v].name = strdup(name_buf);
symbol_info[u][v].dsid = -1;
symbol_info[u][v].nrecords = 0;
} /* end for */
diff --git a/test/swmr_generator.c b/test/swmr_generator.c
index 68b7a40..0259a30 100644
--- a/test/swmr_generator.c
+++ b/test/swmr_generator.c
@@ -115,7 +115,7 @@ gen_skeleton(const char *filename, bool verbose, bool swmr_write, int comp_level
* With one unlimited dimension, we get the extensible array index
* type, with two unlimited dimensions, we get a v2 B-tree.
*/
- if (!HDstrcmp(index_type, "b2"))
+ if (!strcmp(index_type, "b2"))
max_dims[0] = H5S_UNLIMITED;
/* Create file creation property list */
@@ -285,7 +285,7 @@ main(int argc, char *argv[])
/* Chunk index type */
case 'i':
index_type = argv[u + 1];
- if (HDstrcmp(index_type, "ea") != 0 && HDstrcmp(index_type, "b2") != 0)
+ if (strcmp(index_type, "ea") != 0 && strcmp(index_type, "b2") != 0)
usage();
u += 2;
break;
diff --git a/test/swmr_reader.c b/test/swmr_reader.c
index c4e206d..18f204d 100644
--- a/test/swmr_reader.c
+++ b/test/swmr_reader.c
@@ -278,7 +278,7 @@ read_records(const char *filename, bool verbose, FILE *verbose_file, unsigned ra
if (use_log_vfd) {
char verbose_name[1024];
- HDsnprintf(verbose_name, sizeof(verbose_name), "swmr_reader.log.%u", random_seed);
+ snprintf(verbose_name, sizeof(verbose_name), "swmr_reader.log.%u", random_seed);
H5Pset_fapl_log(fapl, verbose_name, H5FD_LOG_ALL, (size_t)(512 * 1024 * 1024));
} /* end if */
@@ -481,7 +481,7 @@ main(int argc, char *argv[])
if (verbose) {
char verbose_name[1024];
- HDsnprintf(verbose_name, sizeof(verbose_name), "swmr_reader.out.%u", random_seed);
+ snprintf(verbose_name, sizeof(verbose_name), "swmr_reader.out.%u", random_seed);
if (NULL == (verbose_file = fopen(verbose_name, "w"))) {
fprintf(stderr, "Can't open verbose output file!\n");
exit(EXIT_FAILURE);
diff --git a/test/swmr_start_write.c b/test/swmr_start_write.c
index 267b4ce..6254da8 100644
--- a/test/swmr_start_write.c
+++ b/test/swmr_start_write.c
@@ -155,7 +155,7 @@ create_datasets(hid_t fid, int comp_level, bool verbose, FILE *verbose_file, con
* With one unlimited dimension, we get the extensible array index
* type, with two unlimited dimensions, we get a v-2 B-tree.
*/
- if (!HDstrcmp(index_type, "b2"))
+ if (!strcmp(index_type, "b2"))
max_dims[0] = H5S_UNLIMITED;
/* Create dataspace for creating datasets */
@@ -384,7 +384,7 @@ main(int argc, char *argv[])
/* Chunk index type */
case 'i':
index_type = argv[u + 1];
- if (HDstrcmp(index_type, "ea") != 0 && HDstrcmp(index_type, "b2") != 0)
+ if (strcmp(index_type, "ea") != 0 && strcmp(index_type, "b2") != 0)
usage();
u += 2;
break;
@@ -448,7 +448,7 @@ main(int argc, char *argv[])
if (verbose) {
char verbose_name[1024];
- HDsnprintf(verbose_name, sizeof(verbose_name), "swmr_writer.out.%u", random_seed);
+ snprintf(verbose_name, sizeof(verbose_name), "swmr_writer.out.%u", random_seed);
if (NULL == (verbose_file = fopen(verbose_name, "w"))) {
fprintf(stderr, "Can't open verbose output file!\n");
exit(EXIT_FAILURE);
diff --git a/test/swmr_writer.c b/test/swmr_writer.c
index c66a09d..7fe1a31 100644
--- a/test/swmr_writer.c
+++ b/test/swmr_writer.c
@@ -90,7 +90,7 @@ open_skeleton(const char *filename, bool verbose, FILE *verbose_file, unsigned r
if (use_log_vfd) {
char verbose_name[1024];
- HDsnprintf(verbose_name, sizeof(verbose_name), "swmr_writer.log.%u", random_seed);
+ snprintf(verbose_name, sizeof(verbose_name), "swmr_writer.log.%u", random_seed);
H5Pset_fapl_log(fapl, verbose_name, H5FD_LOG_ALL, (size_t)(512 * 1024 * 1024));
} /* end if */
@@ -356,7 +356,7 @@ main(int argc, char *argv[])
if (verbose) {
char verbose_name[1024];
- HDsnprintf(verbose_name, sizeof(verbose_name), "swmr_writer.out.%u", random_seed);
+ snprintf(verbose_name, sizeof(verbose_name), "swmr_writer.out.%u", random_seed);
if (NULL == (verbose_file = fopen(verbose_name, "w"))) {
fprintf(stderr, "Can't open verbose output file!\n");
exit(EXIT_FAILURE);
diff --git a/test/tarray.c b/test/tarray.c
index 3cfa2c8..494b65c 100644
--- a/test/tarray.c
+++ b/test/tarray.c
@@ -686,7 +686,7 @@ test_array_compound_atomic(void)
/* Check the 1st field's name */
mname = H5Tget_member_name(tid2, 0);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "i") != 0)
+ if (strcmp(mname, "i") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -705,7 +705,7 @@ test_array_compound_atomic(void)
/* Check the 2nd field's name */
mname = H5Tget_member_name(tid2, 1);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "f") != 0)
+ if (strcmp(mname, "f") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -908,7 +908,7 @@ test_array_compound_array(void)
/* Check the 1st field's name */
mname = H5Tget_member_name(tid2, 0);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "i") != 0)
+ if (strcmp(mname, "i") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -927,7 +927,7 @@ test_array_compound_array(void)
/* Check the 2nd field's name */
mname = H5Tget_member_name(tid2, 1);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "f") != 0)
+ if (strcmp(mname, "f") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -1664,9 +1664,9 @@ test_array_bkg(void)
for (i = 0; i < dtsinfo->nsubfields; i++)
dtsinfo->name[i] = (char *)calloc((size_t)20, sizeof(char));
- HDstrcpy(dtsinfo->name[0], "One");
- HDstrcpy(dtsinfo->name[1], "Two");
- HDstrcpy(dtsinfo->name[2], "Three");
+ strcpy(dtsinfo->name[0], "One");
+ strcpy(dtsinfo->name[1], "Two");
+ strcpy(dtsinfo->name[2], "Three");
/* Create file */
/* ----------- */
@@ -1966,7 +1966,7 @@ test_compat(void)
/* Check the 1st field's name */
mname = H5Tget_member_name(tid1, 0);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "i") != 0)
+ if (strcmp(mname, "i") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -1985,7 +1985,7 @@ test_compat(void)
/* Check the 2nd field's name */
mname = H5Tget_member_name(tid1, 1);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "f") != 0)
+ if (strcmp(mname, "f") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -2004,7 +2004,7 @@ test_compat(void)
/* Check the 3rd field's name */
mname = H5Tget_member_name(tid1, 2);
CHECK_PTR(mname, "H5Tget_member_name");
- if (HDstrcmp(mname, "l") != 0)
+ if (strcmp(mname, "l") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -2047,7 +2047,7 @@ test_compat(void)
/* Check the 1st field's name */
mname = H5Tget_member_name(tid1, 0);
CHECK_PTR(mname, "H5Tget_member_name");
- if (mname && HDstrcmp(mname, "i") != 0)
+ if (mname && strcmp(mname, "i") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
if (mname)
H5free_memory(mname);
@@ -2067,7 +2067,7 @@ test_compat(void)
/* Check the 2nd field's name */
mname = H5Tget_member_name(tid1, 1);
CHECK_PTR(mname, "H5Tget_member_name");
- if (mname && HDstrcmp(mname, "f") != 0)
+ if (mname && strcmp(mname, "f") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
if (mname)
H5free_memory(mname);
@@ -2115,7 +2115,7 @@ test_compat(void)
/* Check the 3rd field's name */
mname = H5Tget_member_name(tid1, 2);
CHECK_PTR(mname, "H5Tget_member_name");
- if (mname && HDstrcmp(mname, "l") != 0)
+ if (mname && strcmp(mname, "l") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
if (mname)
H5free_memory(mname);
@@ -2163,7 +2163,7 @@ test_compat(void)
/* Check the 4th field's name */
mname = H5Tget_member_name(tid1, 3);
CHECK_PTR(mname, "H5Tget_member_name");
- if (mname && HDstrcmp(mname, "d") != 0)
+ if (mname && strcmp(mname, "d") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
if (mname)
H5free_memory(mname);
diff --git a/test/tattr.c b/test/tattr.c
index a246cf2..2e391c5 100644
--- a/test/tattr.c
+++ b/test/tattr.c
@@ -308,8 +308,8 @@ test_attr_basic_write(hid_t fapl)
if (attr_name) {
ret = (herr_t)H5Aget_name(attr, (size_t)(attr_name_size + 1), attr_name);
CHECK(ret, FAIL, "H5Aget_name");
- ret = HDstrcmp(attr_name, ATTR_TMP_NAME);
- VERIFY(ret, 0, "HDstrcmp");
+ ret = strcmp(attr_name, ATTR_TMP_NAME);
+ VERIFY(ret, 0, "strcmp");
free(attr_name);
attr_name = NULL;
@@ -345,8 +345,8 @@ test_attr_basic_write(hid_t fapl)
if (attr_name) {
ret = (herr_t)H5Aget_name(attr2, (size_t)(attr_name_size + 1), attr_name);
CHECK(ret, FAIL, "H5Aget_name");
- ret = HDstrcmp(attr_name, ATTR1A_NAME);
- VERIFY(ret, 0, "HDstrcmp");
+ ret = strcmp(attr_name, ATTR1A_NAME);
+ VERIFY(ret, 0, "strcmp");
free(attr_name);
attr_name = NULL;
@@ -870,8 +870,8 @@ test_attr_compound_read(hid_t fapl)
VERIFY(fields, 3, "H5Tget_nmembers");
for (i = 0; i < fields; i++) {
fieldname = H5Tget_member_name(type, (unsigned)i);
- if (!(HDstrcmp(fieldname, ATTR4_FIELDNAME1) != 0 || HDstrcmp(fieldname, ATTR4_FIELDNAME2) != 0 ||
- HDstrcmp(fieldname, ATTR4_FIELDNAME3) != 0))
+ if (!(strcmp(fieldname, ATTR4_FIELDNAME1) != 0 || strcmp(fieldname, ATTR4_FIELDNAME2) != 0 ||
+ strcmp(fieldname, ATTR4_FIELDNAME3) != 0))
TestErrPrintf("invalid field name for field #%d: %s\n", i, fieldname);
H5free_memory(fieldname);
} /* end for */
@@ -930,8 +930,8 @@ test_attr_compound_read(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR4_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR4_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR4_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR4_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR4_NAME);
/* Close attribute datatype */
@@ -1305,16 +1305,16 @@ test_attr_mult_read(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR1_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR1_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR1_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR1_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR1_NAME);
/* Verify Name with too small of a buffer */
- name_len = H5Aget_name(attr, HDstrlen(ATTR1_NAME), attr_name);
- VERIFY(name_len, HDstrlen(ATTR1_NAME), "H5Aget_name");
- HDstrcpy(temp_name, ATTR1_NAME); /* make a copy of the name */
- temp_name[HDstrlen(ATTR1_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
- if (HDstrcmp(attr_name, temp_name) != 0)
+ name_len = H5Aget_name(attr, strlen(ATTR1_NAME), attr_name);
+ VERIFY(name_len, strlen(ATTR1_NAME), "H5Aget_name");
+ strcpy(temp_name, ATTR1_NAME); /* make a copy of the name */
+ temp_name[strlen(ATTR1_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
+ if (strcmp(attr_name, temp_name) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, temp_name);
/* Close attribute */
@@ -1363,16 +1363,16 @@ test_attr_mult_read(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR2_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR2_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR2_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR2_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR2_NAME);
/* Verify Name with too small of a buffer */
- name_len = H5Aget_name(attr, HDstrlen(ATTR2_NAME), attr_name);
- VERIFY(name_len, HDstrlen(ATTR2_NAME), "H5Aget_name");
- HDstrcpy(temp_name, ATTR2_NAME); /* make a copy of the name */
- temp_name[HDstrlen(ATTR2_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
- if (HDstrcmp(attr_name, temp_name) != 0)
+ name_len = H5Aget_name(attr, strlen(ATTR2_NAME), attr_name);
+ VERIFY(name_len, strlen(ATTR2_NAME), "H5Aget_name");
+ strcpy(temp_name, ATTR2_NAME); /* make a copy of the name */
+ temp_name[strlen(ATTR2_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
+ if (strcmp(attr_name, temp_name) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, temp_name);
/* Close attribute */
@@ -1425,16 +1425,16 @@ test_attr_mult_read(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR3_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR3_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR3_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR3_NAME);
/* Verify Name with too small of a buffer */
- name_len = H5Aget_name(attr, HDstrlen(ATTR3_NAME), attr_name);
- VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name");
- HDstrcpy(temp_name, ATTR3_NAME); /* make a copy of the name */
- temp_name[HDstrlen(ATTR3_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
- if (HDstrcmp(attr_name, temp_name) != 0)
+ name_len = H5Aget_name(attr, strlen(ATTR3_NAME), attr_name);
+ VERIFY(name_len, strlen(ATTR3_NAME), "H5Aget_name");
+ strcpy(temp_name, ATTR3_NAME); /* make a copy of the name */
+ temp_name[strlen(ATTR3_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
+ if (strcmp(attr_name, temp_name) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, temp_name);
/* Close attribute */
@@ -1463,19 +1463,19 @@ attr_op1(hid_t H5_ATTR_UNUSED loc_id, const char *name, const H5A_info_t H5_ATTR
switch (*count) {
case 0:
- if (HDstrcmp(name, ATTR1_NAME) != 0)
+ if (strcmp(name, ATTR1_NAME) != 0)
TestErrPrintf("attribute name different: name=%s, should be %s\n", name, ATTR1_NAME);
(*count)++;
break;
case 1:
- if (HDstrcmp(name, ATTR2_NAME) != 0)
+ if (strcmp(name, ATTR2_NAME) != 0)
TestErrPrintf("attribute name different: name=%s, should be %s\n", name, ATTR2_NAME);
(*count)++;
break;
case 2:
- if (HDstrcmp(name, ATTR3_NAME) != 0)
+ if (strcmp(name, ATTR3_NAME) != 0)
TestErrPrintf("attribute name different: name=%s, should be %s\n", name, ATTR3_NAME);
(*count)++;
break;
@@ -1620,8 +1620,8 @@ test_attr_delete(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR1_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR1_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR1_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR1_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR1_NAME);
/* Close attribute */
@@ -1635,8 +1635,8 @@ test_attr_delete(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR3_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR3_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR3_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR3_NAME);
/* Close attribute */
@@ -1659,8 +1659,8 @@ test_attr_delete(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
- VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR3_NAME) != 0)
+ VERIFY(name_len, strlen(ATTR3_NAME), "H5Aget_name");
+ if (strcmp(attr_name, ATTR3_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR3_NAME);
/* Close attribute */
@@ -2126,7 +2126,7 @@ test_attr_dense_verify(hid_t loc_id, unsigned max_attr)
/* Re-open all the attributes by name and verify the data */
for (u = 0; u < max_attr; u++) {
/* Open attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Aopen(loc_id, attrname, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Aopen");
@@ -2151,10 +2151,10 @@ test_attr_dense_verify(hid_t loc_id, unsigned max_attr)
CHECK(attr, FAIL, "H5Aopen_by_idx");
/* Verify Name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, check_name);
- VERIFY(name_len, HDstrlen(attrname), "H5Aget_name");
- if (HDstrcmp(check_name, attrname) != 0)
+ VERIFY(name_len, strlen(attrname), "H5Aget_name");
+ if (strcmp(check_name, attrname) != 0)
TestErrPrintf("attribute name different: attrname = '%s', should be '%s'\n", check_name,
attrname);
@@ -2251,7 +2251,7 @@ test_attr_dense_create(hid_t fcpl, hid_t fapl)
/* Add attributes, until just before converting to dense storage */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -2270,7 +2270,7 @@ test_attr_dense_create(hid_t fcpl, hid_t fapl)
/* Add one more attribute, to push into "dense" storage */
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -2397,7 +2397,7 @@ test_attr_dense_open(hid_t fcpl, hid_t fapl)
/* Add attributes, until just before converting to dense storage */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -2420,7 +2420,7 @@ test_attr_dense_open(hid_t fcpl, hid_t fapl)
/* Add one more attribute, to push into "dense" storage */
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -2559,7 +2559,7 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
/* Add attributes, until well into dense storage */
for (u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -2604,7 +2604,7 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
/* Delete attributes until the attributes revert to compact storage again */
for (u--; u >= min_dense; u--) {
/* Delete attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
@@ -2618,7 +2618,7 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Delete one more attribute, which should cause reversion to compact storage */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
@@ -2631,7 +2631,7 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "test_attr_dense_verify");
/* Delete another attribute, to verify deletion in compact storage */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (u - 1));
+ snprintf(attrname, sizeof(attrname), "attr %02u", (u - 1));
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
@@ -2760,7 +2760,7 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
/* Add attributes, until well into dense storage */
for (u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, H5I_INVALID_HID, "H5Acreate2");
@@ -2773,7 +2773,7 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
/* Rename attribute */
- HDsnprintf(new_attrname, sizeof(new_attrname), "new attr %02u", u);
+ snprintf(new_attrname, sizeof(new_attrname), "new attr %02u", u);
/* Rename attribute */
ret = H5Arename_by_name(fid, DSET1_NAME, attrname, new_attrname, H5P_DEFAULT);
@@ -2826,7 +2826,7 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
unsigned value; /* Attribute value */
/* Open attribute */
- HDsnprintf(attrname, sizeof(attrname), "new attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "new attr %02u", u);
attr = H5Aopen(dataset, attrname, H5P_DEFAULT);
CHECK(attr, H5I_INVALID_HID, "H5Aopen");
@@ -2950,7 +2950,7 @@ test_attr_dense_unlink(hid_t fcpl, hid_t fapl)
/* Add attributes, until well into dense storage */
for (u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3093,7 +3093,7 @@ test_attr_dense_limits(hid_t fcpl, hid_t fapl)
/* Create attribute */
u = 0;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3113,7 +3113,7 @@ test_attr_dense_limits(hid_t fcpl, hid_t fapl)
/* Create attribute */
u = 1;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3143,7 +3143,7 @@ test_attr_dense_limits(hid_t fcpl, hid_t fapl)
/* Delete attribute */
u = 0;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
@@ -3252,7 +3252,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
/* Add attributes, until just before converting to dense storage */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3275,7 +3275,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
CHECK(sid2, FAIL, "H5Screate_simple");
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3558,7 +3558,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
/* Delete a few attributes until the storage switches to compact */
for (u = min_dense - 1; u <= max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
add_attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(add_attr, FAIL, "H5Acreate2");
@@ -3626,7 +3626,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
/* Add attributes, until just before converting to dense storage */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(gid1, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3792,7 +3792,7 @@ test_attr_big(hid_t fcpl, hid_t fapl)
/* Create attribute */
u = 0;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3810,7 +3810,7 @@ test_attr_big(hid_t fcpl, hid_t fapl)
/* Create attribute */
u = 1;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3828,7 +3828,7 @@ test_attr_big(hid_t fcpl, hid_t fapl)
/* Create attribute */
u = 2;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, big_sid, H5P_DEFAULT, H5P_DEFAULT);
if (low == H5F_LIBVER_LATEST) {
CHECK(attr, FAIL, "H5Acreate2");
@@ -3851,7 +3851,7 @@ test_attr_big(hid_t fcpl, hid_t fapl)
/* Create attribute */
u = 3;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, big_sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3873,7 +3873,7 @@ test_attr_big(hid_t fcpl, hid_t fapl)
/* Delete attribute */
u = 1;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
@@ -3887,7 +3887,7 @@ test_attr_big(hid_t fcpl, hid_t fapl)
/* Delete attribute */
u = 3;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
@@ -3901,7 +3901,7 @@ test_attr_big(hid_t fcpl, hid_t fapl)
/* Delete attribute */
u = 2;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
@@ -3915,7 +3915,7 @@ test_attr_big(hid_t fcpl, hid_t fapl)
/* Delete attribute */
u = 0;
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
@@ -4022,7 +4022,7 @@ test_attr_null_space(hid_t fcpl, hid_t fapl)
/* Add attribute with 'null' dataspace */
/* Create attribute */
- HDstrcpy(attrname, "null attr");
+ strcpy(attrname, "null attr");
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, null_sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -4062,7 +4062,7 @@ test_attr_null_space(hid_t fcpl, hid_t fapl)
/* Add another attribute with 'null' dataspace */
/* Create attribute */
- HDstrcpy(attrname, "null attr #2");
+ strcpy(attrname, "null attr #2");
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, null_sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -4096,7 +4096,7 @@ test_attr_null_space(hid_t fcpl, hid_t fapl)
CHECK(dataset, FAIL, "H5Dopen2");
/* Open first attribute */
- HDstrcpy(attrname, "null attr #2");
+ strcpy(attrname, "null attr #2");
attr = H5Aopen(dataset, attrname, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Aopen");
@@ -4134,7 +4134,7 @@ test_attr_null_space(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
/* Open second attribute */
- HDstrcpy(attrname, "null attr");
+ strcpy(attrname, "null attr");
attr = H5Aopen(dataset, attrname, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Aopen");
@@ -4318,7 +4318,7 @@ test_attr_many(bool new_format, hid_t fcpl, hid_t fapl)
/* Create many attributes */
for (u = 0; u < nattr; u++) {
- HDsnprintf(attrname, sizeof(attrname), "a-%06u", u);
+ snprintf(attrname, sizeof(attrname), "a-%06u", u);
exists = H5Aexists(gid, attrname);
VERIFY(exists, false, "H5Aexists");
@@ -4370,7 +4370,7 @@ test_attr_many(bool new_format, hid_t fcpl, hid_t fapl)
for (u = 0; u < nattr; u++) {
unsigned value; /* Attribute value */
- HDsnprintf(attrname, sizeof(attrname), "a-%06u", u);
+ snprintf(attrname, sizeof(attrname), "a-%06u", u);
exists = H5Aexists(gid, attrname);
VERIFY(exists, true, "H5Aexists");
@@ -4622,7 +4622,7 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl)
/* Create several attributes, but keep storage in compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -4711,7 +4711,7 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl)
H5A_info_t ainfo; /* Attribute information */
/* Retrieve information for attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Aget_info_by_name(my_dataset, ".", attrname, &ainfo, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_info_by_name");
@@ -4826,7 +4826,7 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
/* Create several attributes, but keep storage in compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -4849,7 +4849,7 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
} /* end for */
/* Create another attribute, to push into dense storage */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", max_compact);
+ snprintf(attrname, sizeof(attrname), "attr %02u", max_compact);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -4942,7 +4942,7 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
H5A_info_t ainfo; /* Attribute information */
/* Retrieve information for attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Aget_info_by_name(my_dataset, ".", attrname, &ainfo, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_info_by_name");
@@ -5215,7 +5215,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
/* Create several attributes, but keep storage in compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5238,7 +5238,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
} /* end for */
/* Create another attribute, to push into dense storage */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", max_compact);
+ snprintf(attrname, sizeof(attrname), "attr %02u", max_compact);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5266,7 +5266,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
/* Delete several attributes from object, until attribute storage resumes compact form */
for (u = max_compact; u >= min_dense; u--) {
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
@@ -5286,7 +5286,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
} /* end for */
/* Delete another attribute, to push attribute storage into compact form */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (min_dense - 1));
+ snprintf(attrname, sizeof(attrname), "attr %02u", (min_dense - 1));
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
@@ -5302,7 +5302,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
/* Re-add attributes to get back into dense form */
for (u = (min_dense - 1); u < (max_compact + 1); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5389,7 +5389,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
/* Delete several attributes from object, until attribute storage resumes compact form */
for (u = max_compact; u >= min_dense; u--) {
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
@@ -5409,7 +5409,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
} /* end for */
/* Delete another attribute, to push attribute storage into compact form */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (min_dense - 1));
+ snprintf(attrname, sizeof(attrname), "attr %02u", (min_dense - 1));
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
@@ -5425,7 +5425,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
/* Re-add attributes to get back into dense form */
for (u = (min_dense - 1); u < (max_compact + 1); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5454,11 +5454,11 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
/* Delete all attributes */
for (u = max_compact; u > 0; u--) {
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
} /* end for */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", 0);
+ snprintf(attrname, sizeof(attrname), "attr %02u", 0);
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
} /* end for */
@@ -5576,7 +5576,7 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl)
/* Create attributes, until attribute storage is in dense form */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5698,7 +5698,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, bool use_i
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname) != 0)
+ if (strcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
/* Don't test "native" order if there is no creation order index, since
@@ -5724,7 +5724,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, bool use_i
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, n, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname) != 0)
+ if (strcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
} /* end if */
@@ -5745,7 +5745,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, bool use_i
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname) != 0)
+ if (strcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
/* Verify the information for first attribute, in increasing name order */
@@ -5765,7 +5765,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, bool use_i
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname) != 0)
+ if (strcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
/* Don't test "native" order queries on link name order, since there's not
@@ -5789,7 +5789,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, bool use_i
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname) != 0)
+ if (strcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
/* Retrieve current # of errors */
@@ -5918,7 +5918,7 @@ test_attr_info_by_idx(bool new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5970,7 +5970,7 @@ test_attr_info_by_idx(bool new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for (; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -6432,7 +6432,7 @@ test_attr_delete_by_idx(bool new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -6511,10 +6511,10 @@ test_attr_delete_by_idx(bool new_format, hid_t fcpl, hid_t fapl)
ret = (herr_t)H5Aget_name_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0,
tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
if (order == H5_ITER_INC)
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (u + 1));
+ snprintf(attrname, sizeof(attrname), "attr %02u", (u + 1));
else
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (max_compact - (u + 2)));
- ret = HDstrcmp(attrname, tmpname);
+ snprintf(attrname, sizeof(attrname), "attr %02u", (max_compact - (u + 2)));
+ ret = strcmp(attrname, tmpname);
VERIFY(ret, 0, "H5Aget_name_by_idx");
} /* end for */
@@ -6549,7 +6549,7 @@ test_attr_delete_by_idx(bool new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for (u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -6643,11 +6643,10 @@ test_attr_delete_by_idx(bool new_format, hid_t fcpl, hid_t fapl)
ret = (herr_t)H5Aget_name_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0,
tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
if (order == H5_ITER_INC)
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (u + 1));
+ snprintf(attrname, sizeof(attrname), "attr %02u", (u + 1));
else
- HDsnprintf(attrname, sizeof(attrname), "attr %02u",
- ((max_compact * 2) - (u + 2)));
- ret = HDstrcmp(attrname, tmpname);
+ snprintf(attrname, sizeof(attrname), "attr %02u", ((max_compact * 2) - (u + 2)));
+ ret = strcmp(attrname, tmpname);
VERIFY(ret, 0, "H5Aget_name_by_idx");
} /* end for */
@@ -6692,7 +6691,7 @@ test_attr_delete_by_idx(bool new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, to push into dense form */
for (u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -6761,11 +6760,11 @@ test_attr_delete_by_idx(bool new_format, hid_t fcpl, hid_t fapl)
ret = (herr_t)H5Aget_name_by_idx(my_dataset, ".", idx_type, order, (hsize_t)u,
tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
if (order == H5_ITER_INC)
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", ((u * 2) + 1));
+ snprintf(attrname, sizeof(attrname), "attr %02u", ((u * 2) + 1));
else
- HDsnprintf(attrname, sizeof(attrname), "attr %02u",
- ((max_compact * 2) - ((u * 2) + 2)));
- ret = HDstrcmp(attrname, tmpname);
+ snprintf(attrname, sizeof(attrname), "attr %02u",
+ ((max_compact * 2) - ((u * 2) + 2)));
+ ret = strcmp(attrname, tmpname);
VERIFY(ret, 0, "H5Aget_name_by_idx");
} /* end for */
} /* end for */
@@ -6814,11 +6813,11 @@ test_attr_delete_by_idx(bool new_format, hid_t fcpl, hid_t fapl)
ret = (herr_t)H5Aget_name_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0,
tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
if (order == H5_ITER_INC)
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", ((u * 2) + 3));
+ snprintf(attrname, sizeof(attrname), "attr %02u", ((u * 2) + 3));
else
- HDsnprintf(attrname, sizeof(attrname), "attr %02u",
- ((max_compact * 2) - ((u * 2) + 4)));
- ret = HDstrcmp(attrname, tmpname);
+ snprintf(attrname, sizeof(attrname), "attr %02u",
+ ((max_compact * 2) - ((u * 2) + 4)));
+ ret = strcmp(attrname, tmpname);
VERIFY(ret, 0, "H5Aget_name_by_idx");
} /* end for */
@@ -6902,8 +6901,8 @@ attr_iterate2_cb(hid_t loc_id, const char *attr_name, const H5A_info_t *info, vo
} /* end if */
/* Verify name of link */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", (unsigned)my_info.corder);
- if (HDstrcmp(attr_name, attrname) != 0)
+ snprintf(attrname, sizeof(attrname), "attr %02u", (unsigned)my_info.corder);
+ if (strcmp(attr_name, attrname) != 0)
return (H5_ITER_ERROR);
/* Check if we've visited this link before */
@@ -7420,7 +7419,7 @@ test_attr_iterate2(bool new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -7504,7 +7503,7 @@ test_attr_iterate2(bool new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for (u = max_compact; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -7809,7 +7808,7 @@ test_attr_open_by_idx(bool new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -7872,7 +7871,7 @@ test_attr_open_by_idx(bool new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for (u = max_compact; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr =
H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -7978,7 +7977,7 @@ attr_open_check(hid_t fid, const char *dsetname, hid_t obj_id, unsigned max_attr
/* Open each attribute on object by index and check that it's the correct one */
for (u = 0; u < max_attrs; u++) {
/* Open the attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr_id = H5Aopen(obj_id, attrname, H5P_DEFAULT);
CHECK(attr_id, FAIL, "H5Aopen");
@@ -8159,7 +8158,7 @@ test_attr_open_by_name(bool new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -8237,7 +8236,7 @@ test_attr_open_by_name(bool new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for (u = max_compact; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -8432,7 +8431,7 @@ test_attr_create_by_name(bool new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, up to limit of compact form */
for (u = 0; u < max_compact; u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate_by_name(fid, dsetname, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate_by_name");
@@ -8489,7 +8488,7 @@ test_attr_create_by_name(bool new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for (u = max_compact; u < (max_compact * 2); u++) {
/* Create attribute */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
attr = H5Acreate_by_name(fid, dsetname, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate_by_name");
@@ -8714,7 +8713,7 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
/* Add attributes to each dataset, until after converting to dense storage */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
/* Alternate between creating "small" & "big" attributes */
if (u % 2) {
@@ -9051,7 +9050,7 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
/* Add attributes to each dataset, until after converting to dense storage */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
/* Alternate between creating "small" & "big" attributes */
if (u % 2) {
@@ -9156,7 +9155,7 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
VERIFY(is_dense, true, "H5O__is_attr_dense_test");
/* Create new attribute name */
- HDsnprintf(attrname2, sizeof(attrname2), "new attr %02u", u);
+ snprintf(attrname2, sizeof(attrname2), "new attr %02u", u);
/* Change second dataset's attribute's name */
ret = H5Arename_by_name(fid, DSET2_NAME, attrname, attrname2, H5P_DEFAULT);
@@ -9498,7 +9497,7 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
/* Add attributes to each dataset, until after converting to dense storage */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
/* Alternate between creating "small" & "big" attributes */
if (u % 2) {
@@ -9606,7 +9605,7 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
/* Delete attributes from second dataset */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
/* Delete second dataset's attribute */
ret = H5Adelete_by_name(fid, DSET2_NAME, attrname, H5P_DEFAULT);
@@ -9870,7 +9869,7 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
/* Add attributes to each dataset, until after converting to dense storage */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
/* Alternate between creating "small" & "big" attributes */
if (u % 2) {
@@ -9994,7 +9993,7 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
/* Check ref count on attributes of first dataset */
for (u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr %02u", u);
+ snprintf(attrname, sizeof(attrname), "attr %02u", u);
/* Open attribute on first dataset */
attr = H5Aopen(dataset, attrname, H5P_DEFAULT);
@@ -10267,7 +10266,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl)
/* Create attributes on group */
for (i = 0; i < BUG2_NATTR; i++) {
- HDsnprintf(aname, sizeof(aname), "%03u", i);
+ snprintf(aname, sizeof(aname), "%03u", i);
aid = H5Acreate2(gid, aname, H5T_STD_I32LE, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
@@ -10277,7 +10276,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl)
/* Delete every other attribute */
for (i = 1; i < BUG2_NATTR; i += 2) {
- HDsnprintf(aname, sizeof(aname), "%03u", i);
+ snprintf(aname, sizeof(aname), "%03u", i);
ret = H5Adelete(gid, aname);
CHECK(ret, FAIL, "H5Adelete");
}
@@ -10301,7 +10300,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl)
/* Open an attribute in the middle */
i = (BUG2_NATTR / 4) * 2;
- HDsnprintf(aname, sizeof(aname), "%03u", i);
+ snprintf(aname, sizeof(aname), "%03u", i);
aid = H5Aopen(gid, aname, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Aopen");
@@ -10344,7 +10343,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl)
/* Create attributes on group */
for (i = 0; i < BUG2_NATTR2; i++) {
- HDsnprintf(aname, sizeof(aname), "%03u", i);
+ snprintf(aname, sizeof(aname), "%03u", i);
aid = H5Acreate2(gid, aname, H5T_STD_I32LE, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
@@ -10354,7 +10353,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl)
/* Delete every other attribute */
for (i = 0; i < BUG2_NATTR2; i++) {
- HDsnprintf(aname, sizeof(aname), "%03u", i);
+ snprintf(aname, sizeof(aname), "%03u", i);
ret = H5Adelete(gid, aname);
CHECK(ret, FAIL, "H5Adelete");
}
@@ -11212,7 +11211,7 @@ test_attr_bug9(hid_t fcpl, hid_t fapl)
/* Create enough attributes to cause a change to dense storage */
for (i = 0; i < max_compact + 1; i++) {
/* Create attribute */
- HDsnprintf(aname, sizeof(aname), "%u", i);
+ snprintf(aname, sizeof(aname), "%u", i);
aid = H5Acreate2(gid, aname, H5T_NATIVE_CHAR, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
diff --git a/test/tcoords.c b/test/tcoords.c
index 4f6ea24..1a3a8b3 100644
--- a/test/tcoords.c
+++ b/test/tcoords.c
@@ -87,9 +87,9 @@ test_singleEnd_selElements(hid_t file, bool is_chunked)
/* Construct dataset's name */
memset(dset_name, 0, (size_t)NAME_LEN);
- HDstrcat(dset_name, SINGLE_END_DSET);
+ strcat(dset_name, SINGLE_END_DSET);
if (is_chunked)
- HDstrcat(dset_name, "_chunked");
+ strcat(dset_name, "_chunked");
did = H5Dcreate2(file, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, plid, H5P_DEFAULT);
CHECK(did, FAIL, "H5Dcreate2");
@@ -259,9 +259,9 @@ test_singleEnd_selHyperslab(hid_t file, bool is_chunked)
/* Construct dataset's name */
memset(dset_name, 0, NAME_LEN);
- HDstrcat(dset_name, SINGLE_END_DSET);
+ strcat(dset_name, SINGLE_END_DSET);
if (is_chunked)
- HDstrcat(dset_name, "_chunked");
+ strcat(dset_name, "_chunked");
/* Dataspace for the dataset in file */
sid = H5Screate_simple(4, da_dims, da_dims);
@@ -462,9 +462,9 @@ test_multiple_ends(hid_t file, bool is_chunked)
/* Construct dataset's name */
memset(dset_name, 0, NAME_LEN);
- HDstrcat(dset_name, MULTI_ENDS_SEL_HYPER_DSET);
+ strcat(dset_name, MULTI_ENDS_SEL_HYPER_DSET);
if (is_chunked)
- HDstrcat(dset_name, "_chunked");
+ strcat(dset_name, "_chunked");
did = H5Dcreate2(file, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, plid, H5P_DEFAULT);
CHECK(did, FAIL, "H5Dcreate2");
diff --git a/test/testframe.c b/test/testframe.c
index 44c1701..310886f 100644
--- a/test/testframe.c
+++ b/test/testframe.c
@@ -69,11 +69,11 @@ AddTest(const char *TheName, void (*TheCall)(void), void (*Cleanup)(void), const
const void *Parameters)
{
/* Sanity checking */
- if (HDstrlen(TheDescr) >= MAXTESTDESC) {
+ if (strlen(TheDescr) >= MAXTESTDESC) {
printf("Test description ('%s') too long, increase MAXTESTDESC(%d).\n", TheDescr, MAXTESTDESC);
exit(EXIT_FAILURE);
}
- if (HDstrlen(TheName) >= MAXTESTNAME) {
+ if (strlen(TheName) >= MAXTESTNAME) {
printf("Test name too long, increase MAXTESTNAME(%d).\n", MAXTESTNAME);
exit(EXIT_FAILURE);
}
@@ -96,13 +96,13 @@ AddTest(const char *TheName, void (*TheCall)(void), void (*Cleanup)(void), const
}
/* Set up test function */
- HDstrcpy(Test[Index].Description, TheDescr);
+ strcpy(Test[Index].Description, TheDescr);
if (*TheName != '-') {
- HDstrcpy(Test[Index].Name, TheName);
+ strcpy(Test[Index].Name, TheName);
Test[Index].SkipFlag = 0;
}
else { /* skip test by default */
- HDstrcpy(Test[Index].Name, TheName + 1);
+ strcpy(Test[Index].Name, TheName + 1);
Test[Index].SkipFlag = 1;
}
Test[Index].Call = TheCall;
@@ -214,7 +214,7 @@ TestParseCmdLine(int argc, char *argv[])
int ret_code;
while ((void)argv++, --argc > 0) {
- if ((HDstrcmp(*argv, "-verbose") == 0) || (HDstrcmp(*argv, "-v") == 0)) {
+ if ((strcmp(*argv, "-verbose") == 0) || (strcmp(*argv, "-v") == 0)) {
if (argc > 0) {
--argc;
++argv;
@@ -225,7 +225,7 @@ TestParseCmdLine(int argc, char *argv[])
exit(EXIT_FAILURE);
}
}
- else if (((HDstrcmp(*argv, "-exclude") == 0) || (HDstrcmp(*argv, "-x") == 0))) {
+ else if (((strcmp(*argv, "-exclude") == 0) || (strcmp(*argv, "-x") == 0))) {
if (argc > 0) {
--argc;
++argv;
@@ -236,7 +236,7 @@ TestParseCmdLine(int argc, char *argv[])
exit(EXIT_FAILURE);
}
}
- else if (((HDstrcmp(*argv, "-begin") == 0) || (HDstrcmp(*argv, "-b") == 0))) {
+ else if (((strcmp(*argv, "-begin") == 0) || (strcmp(*argv, "-b") == 0))) {
if (argc > 0) {
--argc;
++argv;
@@ -247,7 +247,7 @@ TestParseCmdLine(int argc, char *argv[])
exit(EXIT_FAILURE);
}
}
- else if (((HDstrcmp(*argv, "-only") == 0) || (HDstrcmp(*argv, "-o") == 0))) {
+ else if (((strcmp(*argv, "-only") == 0) || (strcmp(*argv, "-o") == 0))) {
if (argc > 0) {
unsigned Loop;
@@ -267,15 +267,15 @@ TestParseCmdLine(int argc, char *argv[])
exit(EXIT_FAILURE);
}
}
- else if ((HDstrcmp(*argv, "-summary") == 0) || (HDstrcmp(*argv, "-s") == 0))
+ else if ((strcmp(*argv, "-summary") == 0) || (strcmp(*argv, "-s") == 0))
Summary = 1;
- else if (HDstrcmp(*argv, "-enable-error-stack") == 0)
+ else if (strcmp(*argv, "-enable-error-stack") == 0)
enable_error_stack = 1;
- else if ((HDstrcmp(*argv, "-help") == 0) || (HDstrcmp(*argv, "-h") == 0)) {
+ else if ((strcmp(*argv, "-help") == 0) || (strcmp(*argv, "-h") == 0)) {
TestUsage();
exit(EXIT_SUCCESS);
}
- else if ((HDstrcmp(*argv, "-cleanoff") == 0) || (HDstrcmp(*argv, "-c") == 0))
+ else if ((strcmp(*argv, "-cleanoff") == 0) || (strcmp(*argv, "-c") == 0))
SetTestNoCleanup();
else {
/* non-standard option. Break out. */
@@ -447,11 +447,11 @@ GetTestExpress(void)
/* Check if HDF5TestExpress is set to override the default level */
env_val = HDgetenv("HDF5TestExpress");
if (env_val) {
- if (HDstrcmp(env_val, "0") == 0)
+ if (strcmp(env_val, "0") == 0)
express_val = 0;
- else if (HDstrcmp(env_val, "1") == 0)
+ else if (strcmp(env_val, "1") == 0)
express_val = 1;
- else if (HDstrcmp(env_val, "2") == 0)
+ else if (strcmp(env_val, "2") == 0)
express_val = 2;
else
express_val = 3;
@@ -570,7 +570,7 @@ TestErrPrintf(const char *format, ...)
/* Print the requested information */
va_start(arglist, format);
- ret_value = HDvprintf(format, arglist);
+ ret_value = vprintf(format, arglist);
va_end(arglist);
/* Return the length of the string produced (like printf() does) */
@@ -592,14 +592,14 @@ SetTest(const char *testname, int action)
switch (action) {
case SKIPTEST:
for (Loop = 0; Loop < Index; Loop++)
- if (HDstrcmp(testname, Test[Loop].Name) == 0) {
+ if (strcmp(testname, Test[Loop].Name) == 0) {
Test[Loop].SkipFlag = 1;
break;
}
break;
case BEGINTEST:
for (Loop = 0; Loop < Index; Loop++) {
- if (HDstrcmp(testname, Test[Loop].Name) != 0)
+ if (strcmp(testname, Test[Loop].Name) != 0)
Test[Loop].SkipFlag = 1;
else {
/* Found it. Set it to run. Done. */
@@ -610,7 +610,7 @@ SetTest(const char *testname, int action)
break;
case ONLYTEST:
for (Loop = 0; Loop < Index; Loop++) {
- if (HDstrcmp(testname, Test[Loop].Name) == 0) {
+ if (strcmp(testname, Test[Loop].Name) == 0) {
/* Found it. Set it to run. Break to skip the rest. */
Test[Loop].SkipFlag = 0;
break;
diff --git a/test/testhdf5.h b/test/testhdf5.h
index 1ebd619..75c94ee 100644
--- a/test/testhdf5.h
+++ b/test/testhdf5.h
@@ -135,7 +135,7 @@
"%s \n", \
(where), (int)__LINE__, __FILE__, x); \
} \
- if (HDstrcmp(x, val) != 0) { \
+ if (strcmp(x, val) != 0) { \
TestErrPrintf("*** UNEXPECTED VALUE from %s should be %s, but is %s at line %4d " \
"in %s\n", \
where, val, x, (int)__LINE__, __FILE__); \
diff --git a/test/testmeta.c b/test/testmeta.c
index 048e3a6..14388f0 100644
--- a/test/testmeta.c
+++ b/test/testmeta.c
@@ -82,7 +82,7 @@ main(void)
for (i = 0; i < NEXTARRAYS; i++) {
/* Create dataset */
- HDsnprintf(name, sizeof(name), "/ExtArray%06d", i);
+ snprintf(name, sizeof(name), "/ExtArray%06d", i);
dataset_id =
H5Dcreate2(file_id, name, H5T_NATIVE_FLOAT, dataspace_id, H5P_DEFAULT, prop_id, H5P_DEFAULT);
@@ -107,7 +107,7 @@ main(void)
floatval = (float)j;
/* Create group to hold data arrays for this object */
- HDsnprintf(name, sizeof(name), "/DataArray/%06d", j);
+ snprintf(name, sizeof(name), "/DataArray/%06d", j);
group_id = H5Gcreate2(file_id, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (group_id < 0) {
fprintf(stderr, "Failed to create DataArray group.\n");
@@ -123,7 +123,7 @@ main(void)
dataspace_id = H5Screate_simple(1, dims, maxdims);
/* Create dataset */
- HDsnprintf(name, sizeof(name), "DataArray%06d", i);
+ snprintf(name, sizeof(name), "DataArray%06d", i);
dataset_id = H5Dcreate2(group_id, name, H5T_NATIVE_FLOAT, dataspace_id, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT);
if (dataset_id < 0) {
@@ -169,7 +169,7 @@ main(void)
/* Extend attribute arrays */
for (i = 0; i < NEXTARRAYS; i++) {
/* Open extendable dataset */
- HDsnprintf(name, sizeof(name), "/ExtArray%06d", i);
+ snprintf(name, sizeof(name), "/ExtArray%06d", i);
dataset_id = H5Dopen2(file_id, name, H5P_DEFAULT);
if (dataset_id < 0) {
fprintf(stderr, "Failed to open ExtArray dataset.\n");
diff --git a/test/tfile.c b/test/tfile.c
index d5d4899..e5183bb 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -1188,14 +1188,14 @@ test_get_obj_ids(void)
/* creates NGROUPS groups under the root group */
for (m = 0; m < NGROUPS; m++) {
- HDsnprintf(gname, sizeof(gname), "group%d", m);
+ snprintf(gname, sizeof(gname), "group%d", m);
gid[m] = H5Gcreate2(fid, gname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(gid[m], FAIL, "H5Gcreate2");
}
/* create NDSETS datasets under the root group */
for (n = 0; n < NDSETS; n++) {
- HDsnprintf(dname, sizeof(dname), "dataset%d", n);
+ snprintf(dname, sizeof(dname), "dataset%d", n);
dset[n] = H5Dcreate2(fid, dname, H5T_NATIVE_INT, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(dset[n], FAIL, "H5Dcreate2");
}
@@ -1255,7 +1255,7 @@ test_get_obj_ids(void)
/* Open NDSETS datasets under the root group */
for (n = 0; n < NDSETS; n++) {
- HDsnprintf(dname, sizeof(dname), "dataset%d", n);
+ snprintf(dname, sizeof(dname), "dataset%d", n);
dset[n] = H5Dopen2(fid, dname, H5P_DEFAULT);
CHECK(dset[n], FAIL, "H5Dcreate2");
}
@@ -1797,7 +1797,7 @@ test_file_is_accessible(const char *env_h5_drvr)
/* This test is not currently working for the family VFD.
* There are failures when creating files with userblocks.
*/
- if (0 != HDstrcmp(env_h5_drvr, "family")) {
+ if (0 != strcmp(env_h5_drvr, "family")) {
/* Create a file creation property list with a non-default user block size */
fcpl_id = H5Pcreate(H5P_FILE_CREATE);
CHECK(fcpl_id, H5I_INVALID_HID, "H5Pcreate");
@@ -3005,8 +3005,8 @@ test_userblock_file_size(const char *env_h5_drvr)
herr_t ret; /* Generic return value */
/* Don't run with multi/split, family or direct drivers */
- if (!HDstrcmp(env_h5_drvr, "multi") || !HDstrcmp(env_h5_drvr, "split") ||
- !HDstrcmp(env_h5_drvr, "family") || !HDstrcmp(env_h5_drvr, "direct"))
+ if (!strcmp(env_h5_drvr, "multi") || !strcmp(env_h5_drvr, "split") || !strcmp(env_h5_drvr, "family") ||
+ !strcmp(env_h5_drvr, "direct"))
return;
/* Output message about test being performed */
@@ -4049,7 +4049,7 @@ test_filespace_info(const char *env_h5_drvr)
MESSAGE(5, ("Testing file creation public routines: H5Pget/set_file_space_strategy & "
"H5Pget/set_file_space_page_size\n"));
- contig_addr_vfd = (bool)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
+ contig_addr_vfd = (bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0);
fapl = h5_fileaccess();
h5_fixname(FILESPACE_NAME[0], fapl, filename, sizeof filename);
@@ -4458,8 +4458,8 @@ test_file_freespace(const char *env_h5_drvr)
hsize_t expected_fs_del; /* Freespace expected after delete */
herr_t ret; /* Return value */
- split_vfd = !HDstrcmp(env_h5_drvr, "split");
- multi_vfd = !HDstrcmp(env_h5_drvr, "multi");
+ split_vfd = !strcmp(env_h5_drvr, "split");
+ multi_vfd = !strcmp(env_h5_drvr, "multi");
if (!split_vfd && !multi_vfd) {
fapl = h5_fileaccess();
@@ -4546,7 +4546,7 @@ test_file_freespace(const char *env_h5_drvr)
/* Create datasets in file */
for (u = 0; u < 10; u++) {
- HDsnprintf(name, sizeof(name), "Dataset %u", u);
+ snprintf(name, sizeof(name), "Dataset %u", u);
dset = H5Dcreate2(file, name, H5T_STD_U32LE, dspace, H5P_DEFAULT, dcpl, H5P_DEFAULT);
CHECK(dset, FAIL, "H5Dcreate2");
@@ -4569,7 +4569,7 @@ test_file_freespace(const char *env_h5_drvr)
/* Delete datasets in file */
for (k = 9; k >= 0; k--) {
- HDsnprintf(name, sizeof(name), "Dataset %u", (unsigned)k);
+ snprintf(name, sizeof(name), "Dataset %u", (unsigned)k);
ret = H5Ldelete(file, name, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Ldelete");
} /* end for */
@@ -4634,8 +4634,8 @@ test_sects_freespace(const char *env_h5_drvr, bool new_format)
/* Output message about test being performed */
MESSAGE(5, ("Testing H5Fget_free_sections()--free-space section info in the file\n"));
- split_vfd = !HDstrcmp(env_h5_drvr, "split");
- multi_vfd = !HDstrcmp(env_h5_drvr, "multi");
+ split_vfd = !strcmp(env_h5_drvr, "split");
+ multi_vfd = !strcmp(env_h5_drvr, "multi");
if (!split_vfd && !multi_vfd) {
@@ -4697,7 +4697,7 @@ test_sects_freespace(const char *env_h5_drvr, bool new_format)
/* Create datasets in file */
for (u = 0; u < 10; u++) {
- HDsnprintf(name, sizeof(name), "Dataset %u", u);
+ snprintf(name, sizeof(name), "Dataset %u", u);
dset = H5Dcreate2(file, name, H5T_STD_U32LE, dspace, H5P_DEFAULT, dcpl, H5P_DEFAULT);
CHECK(dset, FAIL, "H5Dcreate2");
@@ -4715,7 +4715,7 @@ test_sects_freespace(const char *env_h5_drvr, bool new_format)
/* Delete odd-numbered datasets in file */
for (u = 0; u < 10; u++) {
- HDsnprintf(name, sizeof(name), "Dataset %u", u);
+ snprintf(name, sizeof(name), "Dataset %u", u);
if (u % 2) {
ret = H5Ldelete(file, name, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Ldelete");
@@ -7687,7 +7687,7 @@ test_incr_filesize(void)
/* Create datasets in file */
for (u = 0; u < 10; u++) {
- HDsnprintf(name, sizeof(name), "Dataset %u", u);
+ snprintf(name, sizeof(name), "Dataset %u", u);
dset = H5Dcreate2(fid, name, H5T_STD_U32LE, dspace, H5P_DEFAULT, dcpl, H5P_DEFAULT);
CHECK(dset, FAIL, "H5Dcreate2");
diff --git a/test/tgenprop.c b/test/tgenprop.c
index b4bd6c3..586ab33 100644
--- a/test/tgenprop.c
+++ b/test/tgenprop.c
@@ -94,7 +94,7 @@ test_genprop_basic_class(void)
/* Check class name */
name = H5Pget_class_name(cid1);
CHECK_PTR(name, "H5Pget_class_name");
- if (HDstrcmp(name, CLASS1_NAME) != 0)
+ if (strcmp(name, CLASS1_NAME) != 0)
TestErrPrintf("Class names don't match!, name=%s, CLASS1_NAME=%s\n", name, CLASS1_NAME);
H5free_memory(name);
@@ -125,7 +125,7 @@ test_genprop_basic_class(void)
/* Check class name */
name = H5Pget_class_name(cid1);
CHECK_PTR(name, "H5Pget_class_name");
- if (HDstrcmp(name, CLASS2_NAME) != 0)
+ if (strcmp(name, CLASS2_NAME) != 0)
TestErrPrintf("Class names don't match!, name=%s, CLASS2_NAME=%s\n", name, CLASS2_NAME);
H5free_memory(name);
@@ -313,7 +313,7 @@ test_genprop_iter1(hid_t H5_ATTR_UNUSED id, const char *name, void *iter_data)
{
iter_data_t *idata = (iter_data_t *)iter_data;
- return HDstrcmp(name, idata->names[idata->iter_count++]);
+ return strcmp(name, idata->names[idata->iter_count++]);
}
/****************************************************************
@@ -868,7 +868,7 @@ test_genprop_iter2(hid_t H5_ATTR_UNUSED id, const char *name, void *iter_data)
{
iter_data_t *idata = (iter_data_t *)iter_data;
- return HDstrcmp(name, idata->names[idata->iter_count++]);
+ return strcmp(name, idata->names[idata->iter_count++]);
}
/****************************************************************
@@ -1026,7 +1026,7 @@ test_genprop_prop_crt_cb1(const char *name, size_t size, void *def_value)
{
/* Set the information from the creation call */
prop1_cb_info.crt_count++;
- prop1_cb_info.crt_name = HDstrdup(name);
+ prop1_cb_info.crt_name = strdup(name);
prop1_cb_info.crt_value = malloc(size);
memcpy(prop1_cb_info.crt_value, def_value, size);
@@ -1045,7 +1045,7 @@ test_genprop_prop_set_cb1(hid_t plist_id, const char *name, size_t size, void *v
prop1_cb_info.set_count++;
prop1_cb_info.set_plist_id = plist_id;
if (prop1_cb_info.set_name == NULL)
- prop1_cb_info.set_name = HDstrdup(name);
+ prop1_cb_info.set_name = strdup(name);
if (prop1_cb_info.set_value == NULL)
prop1_cb_info.set_value = malloc(size);
memcpy(prop1_cb_info.set_value, value, size);
@@ -1065,7 +1065,7 @@ test_genprop_prop_get_cb1(hid_t plist_id, const char *name, size_t size, void *v
prop1_cb_info.get_count++;
prop1_cb_info.get_plist_id = plist_id;
if (prop1_cb_info.get_name == NULL)
- prop1_cb_info.get_name = HDstrdup(name);
+ prop1_cb_info.get_name = strdup(name);
if (prop1_cb_info.get_value == NULL)
prop1_cb_info.get_value = malloc(size);
memcpy(prop1_cb_info.get_value, value, size);
@@ -1084,7 +1084,7 @@ test_genprop_prop_cop_cb1(const char *name, size_t size, void *value)
/* Set the information from the get call */
prop1_cb_info.cop_count++;
if (prop1_cb_info.cop_name == NULL)
- prop1_cb_info.cop_name = HDstrdup(name);
+ prop1_cb_info.cop_name = strdup(name);
if (prop1_cb_info.cop_value == NULL)
prop1_cb_info.cop_value = malloc(size);
memcpy(prop1_cb_info.cop_value, value, size);
@@ -1131,7 +1131,7 @@ test_genprop_prop_cls_cb1(const char *name, size_t size, void *value)
/* Set the information from the close call */
prop1_cb_info.cls_count++;
if (prop1_cb_info.cls_name == NULL)
- prop1_cb_info.cls_name = HDstrdup(name);
+ prop1_cb_info.cls_name = strdup(name);
if (prop1_cb_info.cls_value == NULL)
prop1_cb_info.cls_value = malloc(size);
memcpy(prop1_cb_info.cls_value, value, size);
@@ -1150,7 +1150,7 @@ test_genprop_prop_del_cb2(hid_t plist_id, const char *name, size_t size, void *v
/* Set the information from the delete call */
prop2_cb_info.del_count++;
prop2_cb_info.del_plist_id = plist_id;
- prop2_cb_info.del_name = HDstrdup(name);
+ prop2_cb_info.del_name = strdup(name);
prop2_cb_info.del_value = malloc(size);
memcpy(prop2_cb_info.del_value, value, size);
@@ -1238,7 +1238,7 @@ test_genprop_list_callback(void)
/* Verify creation callback information for properties tracked */
VERIFY(prop1_cb_info.crt_count, 1, "H5Pcreate");
- if (HDstrcmp(prop1_cb_info.crt_name, PROP1_NAME) != 0)
+ if (strcmp(prop1_cb_info.crt_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop1_cb_info.crt_value, PROP1_DEF_VALUE, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
@@ -1274,7 +1274,7 @@ test_genprop_list_callback(void)
/* Verify get callback information for properties tracked */
VERIFY(prop1_cb_info.get_count, 1, "H5Pget");
VERIFY(prop1_cb_info.get_plist_id, lid1, "H5Pget");
- if (HDstrcmp(prop1_cb_info.get_name, PROP1_NAME) != 0)
+ if (strcmp(prop1_cb_info.get_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop1_cb_info.get_value, PROP1_DEF_VALUE, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
@@ -1286,7 +1286,7 @@ test_genprop_list_callback(void)
/* Verify set callback information for properties tracked */
VERIFY(prop1_cb_info.set_count, 1, "H5Pset");
VERIFY(prop1_cb_info.set_plist_id, lid1, "H5Pset");
- if (HDstrcmp(prop1_cb_info.set_name, PROP1_NAME) != 0)
+ if (strcmp(prop1_cb_info.set_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop1_cb_info.set_value, &prop1_new_value, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
@@ -1309,7 +1309,7 @@ test_genprop_list_callback(void)
/* Verify get callback information again for properties tracked */
VERIFY(prop1_cb_info.get_count, 2, "H5Pget");
VERIFY(prop1_cb_info.get_plist_id, lid1, "H5Pget");
- if (HDstrcmp(prop1_cb_info.get_name, PROP1_NAME) != 0)
+ if (strcmp(prop1_cb_info.get_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop1_cb_info.get_value, &prop1_new_value, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
@@ -1321,7 +1321,7 @@ test_genprop_list_callback(void)
/* Verify delete callback information for properties tracked */
VERIFY(prop2_cb_info.del_count, 1, "H5Premove");
VERIFY(prop2_cb_info.del_plist_id, lid1, "H5Premove");
- if (HDstrcmp(prop2_cb_info.del_name, PROP2_NAME) != 0)
+ if (strcmp(prop2_cb_info.del_name, PROP2_NAME) != 0)
TestErrPrintf("Property #2 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop2_cb_info.del_value, PROP2_DEF_VALUE, PROP2_SIZE) != 0)
TestErrPrintf("Property #2 value doesn't match!, line=%d\n", __LINE__);
@@ -1332,7 +1332,7 @@ test_genprop_list_callback(void)
/* Verify copy callback information for properties tracked */
VERIFY(prop1_cb_info.cop_count, 1, "H5Pcopy");
- if (HDstrcmp(prop1_cb_info.cop_name, PROP1_NAME) != 0)
+ if (strcmp(prop1_cb_info.cop_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop1_cb_info.cop_value, &prop1_new_value, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
@@ -1355,7 +1355,7 @@ test_genprop_list_callback(void)
/* Verify close callback information for properties tracked */
VERIFY(prop1_cb_info.cls_count, 1, "H5Pclose");
- if (HDstrcmp(prop1_cb_info.cls_name, PROP1_NAME) != 0)
+ if (strcmp(prop1_cb_info.cls_name, PROP1_NAME) != 0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n", __LINE__);
if (memcmp(prop1_cb_info.cls_value, &prop1_new_value, PROP1_SIZE) != 0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n", __LINE__);
@@ -1809,7 +1809,7 @@ test_genprop_path(void)
/* Get full path for first class */
path = H5P__get_class_path_test(cid1);
CHECK_PTR(path, "H5P__get_class_path_test");
- if (HDstrcmp(path, CLASS1_PATH) != 0)
+ if (strcmp(path, CLASS1_PATH) != 0)
TestErrPrintf("Class names don't match!, path=%s, CLASS1_PATH=%s\n", path, CLASS1_PATH);
H5free_memory(path);
@@ -1825,7 +1825,7 @@ test_genprop_path(void)
/* Get full path for second class */
path = H5P__get_class_path_test(cid2);
CHECK_PTR(path, "H5P__get_class_path_test");
- if (HDstrcmp(path, CLASS2_PATH) != 0)
+ if (strcmp(path, CLASS2_PATH) != 0)
TestErrPrintf("Class names don't match!, path=%s, CLASS2_PATH=%s\n", path, CLASS2_PATH);
/* Open a copy of the class with the path name */
@@ -1886,7 +1886,7 @@ test_genprop_refcount(void)
/* Check class name */
name = H5Pget_class_name(cid1);
CHECK_PTR(name, "H5Pget_class_name");
- if (HDstrcmp(name, CLASS1_NAME) != 0)
+ if (strcmp(name, CLASS1_NAME) != 0)
TestErrPrintf("Class names don't match!, name=%s, CLASS1_NAME=%s\n", name, CLASS1_NAME);
H5free_memory(name);
@@ -1905,7 +1905,7 @@ test_genprop_refcount(void)
/* Check class name */
name = H5Pget_class_name(cid1);
CHECK_PTR(name, "H5Pget_class_name");
- if (HDstrcmp(name, CLASS1_NAME) != 0)
+ if (strcmp(name, CLASS1_NAME) != 0)
TestErrPrintf("Class names don't match!, name=%s, CLASS1_NAME=%s\n", name, CLASS1_NAME);
H5free_memory(name);
@@ -1916,7 +1916,7 @@ test_genprop_refcount(void)
/* Check class name */
name = H5Pget_class_name(cid1);
CHECK_PTR(name, "H5Pget_class_name");
- if (HDstrcmp(name, CLASS1_NAME) != 0)
+ if (strcmp(name, CLASS1_NAME) != 0)
TestErrPrintf("Class names don't match!, name=%s, CLASS1_NAME=%s\n", name, CLASS1_NAME);
H5free_memory(name);
diff --git a/test/th5_system.c b/test/th5_system.c
index 33728ca..eb6787f 100644
--- a/test/th5_system.c
+++ b/test/th5_system.c
@@ -50,7 +50,7 @@ test_h5_dirname(void)
/* Check that H5_dirname fails for a NULL dirname pointer */
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "topdir%sunderdir%sfinaldir", H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "topdir%sunderdir%sfinaldir", H5_DIR_SEPS, H5_DIR_SEPS);
H5E_BEGIN_TRY
{
ret = H5_dirname(path, NULL);
@@ -72,7 +72,7 @@ test_h5_dirname(void)
* doesn't contain the system file separator character
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "testdirname");
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "testdirname");
ret = H5_dirname(path, &dirname);
VERIFY_STR(dirname, ".", "comparing H5_dirname with non-separated path to \".\"");
H5MM_free(dirname);
@@ -82,7 +82,7 @@ test_h5_dirname(void)
* for the simple path containing just the system file separator
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, H5_DIR_SEPS);
ret = H5_dirname(path, &dirname);
VERIFY_STR(dirname, H5_DIR_SEPS, "comparing H5_dirname with file separator path to file separator");
H5MM_free(dirname);
@@ -93,7 +93,7 @@ test_h5_dirname(void)
* component
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stestdir", H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stestdir", H5_DIR_SEPS);
ret = H5_dirname(path, &dirname);
VERIFY_STR(dirname, H5_DIR_SEPS, "comparing H5_dirname with leading separator path to file separator");
H5MM_free(dirname);
@@ -104,8 +104,8 @@ test_h5_dirname(void)
* a path component
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%s%s%s%stestdir", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
- H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%s%s%s%stestdir", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
+ H5_DIR_SEPS);
ret = H5_dirname(path, &dirname);
VERIFY_STR(dirname, H5_DIR_SEPS, "comparing H5_dirname with leading separators path to file separator");
H5MM_free(dirname);
@@ -115,7 +115,7 @@ test_h5_dirname(void)
* contains a path component and a trailing separator
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "testdir%s", H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "testdir%s", H5_DIR_SEPS);
ret = H5_dirname(path, &dirname);
VERIFY_STR(dirname, ".", "comparing H5_dirname with trailing separator path to \".\"");
H5MM_free(dirname);
@@ -125,8 +125,8 @@ test_h5_dirname(void)
* contains a path component and several trailing separators
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "testdir%s%s%s%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
- H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "testdir%s%s%s%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
+ H5_DIR_SEPS);
ret = H5_dirname(path, &dirname);
VERIFY_STR(dirname, ".", "comparing H5_dirname with trailing separators path to \".\"");
H5MM_free(dirname);
@@ -137,7 +137,7 @@ test_h5_dirname(void)
* component and a trailing separator
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stestdir%s", H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stestdir%s", H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_dirname(path, &dirname);
VERIFY_STR(dirname, H5_DIR_SEPS,
"comparing H5_dirname with leading and trailing separator path to file separator");
@@ -149,8 +149,8 @@ test_h5_dirname(void)
* path component and a trailing separator
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%s%s%s%stestdir%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
- H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%s%s%s%stestdir%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
+ H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_dirname(path, &dirname);
VERIFY_STR(
dirname, H5_DIR_SEPS,
@@ -163,8 +163,8 @@ test_h5_dirname(void)
* component and several trailing separators
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stestdir%s%s%s%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
- H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stestdir%s%s%s%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
+ H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_dirname(path, &dirname);
VERIFY_STR(dirname, H5_DIR_SEPS,
"comparing H5_dirname with leading separator and trailing separators path to file separator");
@@ -176,8 +176,8 @@ test_h5_dirname(void)
* path component and several trailing separators
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%s%s%s%stestdir%s%s%s%s", H5_DIR_SEPS, H5_DIR_SEPS,
- H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%s%s%s%stestdir%s%s%s%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
+ H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_dirname(path, &dirname);
VERIFY_STR(dirname, H5_DIR_SEPS,
"comparing H5_dirname with leading and trailing separators path to file separator");
@@ -188,7 +188,7 @@ test_h5_dirname(void)
* "normal" pathname that has no leading separator
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "topdir%sunderdir", H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "topdir%sunderdir", H5_DIR_SEPS);
ret = H5_dirname(path, &dirname);
VERIFY_STR(dirname, "topdir", "comparing H5_dirname with normal path to proper dirname");
H5MM_free(dirname);
@@ -198,7 +198,7 @@ test_h5_dirname(void)
* "normal" pathname that has a leading separator
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stopdir%sunderdir", H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stopdir%sunderdir", H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_dirname(path, &dirname);
VERIFY_STR(dirname, H5_DIR_SEPS "topdir", "comparing H5_dirname with normal path to proper dirname");
H5MM_free(dirname);
@@ -208,7 +208,7 @@ test_h5_dirname(void)
* "normal" pathname that has a leading and trailing separator
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stopdir%sunderdir%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stopdir%sunderdir%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_dirname(path, &dirname);
VERIFY_STR(dirname, H5_DIR_SEPS "topdir", "comparing H5_dirname with normal path to proper dirname");
H5MM_free(dirname);
@@ -218,8 +218,8 @@ test_h5_dirname(void)
* contrived pathname
*/
dirname = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stopdir%sunderdir%s%s%sfinaldir%s", H5_DIR_SEPS, H5_DIR_SEPS,
- H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stopdir%sunderdir%s%s%sfinaldir%s", H5_DIR_SEPS, H5_DIR_SEPS,
+ H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_dirname(path, &dirname);
VERIFY_STR(dirname, H5_DIR_SEPS "topdir" H5_DIR_SEPS "underdir",
"comparing H5_dirname with contrived path to proper dirname");
@@ -254,7 +254,7 @@ test_h5_basename(void)
/* Check that H5_basename fails for a NULL basename pointer */
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "topdir%sunderdir%sfinaldir", H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "topdir%sunderdir%sfinaldir", H5_DIR_SEPS, H5_DIR_SEPS);
H5E_BEGIN_TRY
{
ret = H5_basename(path, NULL);
@@ -276,7 +276,7 @@ test_h5_basename(void)
* path that doesn't contain the system file separator character
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "testdirname");
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "testdirname");
ret = H5_basename(path, &basename);
VERIFY_STR(basename, "testdirname", "comparing H5_basename with non-separated path to same path");
H5MM_free(basename);
@@ -286,7 +286,7 @@ test_h5_basename(void)
* for the simple path containing just the system file separator
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, H5_DIR_SEPS);
ret = H5_basename(path, &basename);
VERIFY_STR(basename, H5_DIR_SEPS, "comparing H5_basename with file separator path to file separator");
H5MM_free(basename);
@@ -297,7 +297,7 @@ test_h5_basename(void)
* component
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stestdir", H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stestdir", H5_DIR_SEPS);
ret = H5_basename(path, &basename);
VERIFY_STR(basename, "testdir",
"comparing H5_basename with leading separator path to filename component");
@@ -309,8 +309,8 @@ test_h5_basename(void)
* component
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%s%s%s%stestdir", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
- H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%s%s%s%stestdir", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
+ H5_DIR_SEPS);
ret = H5_basename(path, &basename);
VERIFY_STR(basename, "testdir",
"comparing H5_basename with leading separators path to filename component");
@@ -321,7 +321,7 @@ test_h5_basename(void)
* path which contains a path component and a trailing separator
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "testdir%s", H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "testdir%s", H5_DIR_SEPS);
ret = H5_basename(path, &basename);
VERIFY_STR(basename, "testdir",
"comparing H5_basename with trailing separator path to filename component");
@@ -333,8 +333,8 @@ test_h5_basename(void)
* separators
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "testdir%s%s%s%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
- H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "testdir%s%s%s%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
+ H5_DIR_SEPS);
ret = H5_basename(path, &basename);
VERIFY_STR(basename, "testdir",
"comparing H5_basename with trailing separators path to filename component");
@@ -346,7 +346,7 @@ test_h5_basename(void)
* and a trailing separator
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stestdir%s", H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stestdir%s", H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_basename(path, &basename);
VERIFY_STR(basename, "testdir",
"comparing H5_basename with leading and trailing separator path to filename component");
@@ -358,8 +358,8 @@ test_h5_basename(void)
* component and a trailing separator
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%s%s%s%stestdir%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
- H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%s%s%s%stestdir%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
+ H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_basename(path, &basename);
VERIFY_STR(
basename, "testdir",
@@ -372,8 +372,8 @@ test_h5_basename(void)
* and several trailing separators
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stestdir%s%s%s%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
- H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stestdir%s%s%s%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
+ H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_basename(path, &basename);
VERIFY_STR(
basename, "testdir",
@@ -386,8 +386,8 @@ test_h5_basename(void)
* component and several trailing separators
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%s%s%s%stestdir%s%s%s%s", H5_DIR_SEPS, H5_DIR_SEPS,
- H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%s%s%s%stestdir%s%s%s%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS,
+ H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_basename(path, &basename);
VERIFY_STR(basename, "testdir",
"comparing H5_basename with leading and trailing separators path to filename component");
@@ -398,7 +398,7 @@ test_h5_basename(void)
* a "normal" pathname that has no leading separator
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "topdir%sunderdir", H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "topdir%sunderdir", H5_DIR_SEPS);
ret = H5_basename(path, &basename);
VERIFY_STR(basename, "underdir", "comparing H5_basename with normal path to proper basename");
H5MM_free(basename);
@@ -408,7 +408,7 @@ test_h5_basename(void)
* a "normal" pathname that has a leading separator
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stopdir%sunderdir", H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stopdir%sunderdir", H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_basename(path, &basename);
VERIFY_STR(basename, "underdir", "comparing H5_basename with normal path to proper basename");
H5MM_free(basename);
@@ -418,7 +418,7 @@ test_h5_basename(void)
* a "normal" pathname that has a leading and trailing separator
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stopdir%sunderdir%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stopdir%sunderdir%s", H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_basename(path, &basename);
VERIFY_STR(basename, "underdir", "comparing H5_basename with normal path to proper basename");
H5MM_free(basename);
@@ -428,8 +428,8 @@ test_h5_basename(void)
* contrived pathname
*/
basename = NULL;
- HDsnprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stopdir%sunderdir%s%s%sfinaldir%s", H5_DIR_SEPS, H5_DIR_SEPS,
- H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS);
+ snprintf(path, H5_SYSTEM_TEST_PATH_MAX, "%stopdir%sunderdir%s%s%sfinaldir%s", H5_DIR_SEPS, H5_DIR_SEPS,
+ H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS, H5_DIR_SEPS);
ret = H5_basename(path, &basename);
VERIFY_STR(basename, "finaldir", "comparing H5_basename with contrived path to proper basename");
H5MM_free(basename);
@@ -532,7 +532,7 @@ test_h5_strndup(void)
str = H5MM_xfree(str);
/* Check that H5_strndup correctly performs identical copies */
- str = H5_strndup(teststr, HDstrlen(teststr));
+ str = H5_strndup(teststr, strlen(teststr));
CHECK_PTR(str, "H5_strndup for identical copy");
if (str)
VERIFY_STR(str, teststr, "comparing H5_strndup for identical copy to original string");
@@ -542,7 +542,7 @@ test_h5_strndup(void)
* Check that H5_strndup correctly performs copies when
* `n` is greater than the original string
*/
- str = H5_strndup(teststr, HDstrlen(teststr) + 2);
+ str = H5_strndup(teststr, strlen(teststr) + 2);
CHECK_PTR(str, "H5_strndup for larger 'n'");
if (str)
VERIFY_STR(str, teststr, "comparing H5_strndup with larger 'n' value to original string");
diff --git a/test/th5o.c b/test/th5o.c
index b0fde40..17cfad7 100644
--- a/test/th5o.c
+++ b/test/th5o.c
@@ -1203,7 +1203,7 @@ test_h5o_comment(void)
len = H5Oget_comment(fid, check_comment, (size_t)comment_len + 1);
CHECK(len, FAIL, "H5Oget_comment");
- ret_value = HDstrcmp(file_comment, check_comment);
+ ret_value = strcmp(file_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment");
/* Open the group */
@@ -1217,7 +1217,7 @@ test_h5o_comment(void)
len = H5Oget_comment(grp, check_comment, (size_t)comment_len + 1);
CHECK(len, FAIL, "H5Oget_comment");
- ret_value = HDstrcmp(grp_comment, check_comment);
+ ret_value = strcmp(grp_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment");
/* Open the datatype */
@@ -1231,7 +1231,7 @@ test_h5o_comment(void)
len = H5Oget_comment(dtype, check_comment, (size_t)comment_len + 1);
CHECK(len, FAIL, "H5Oget_comment");
- ret_value = HDstrcmp(dtype_comment, check_comment);
+ ret_value = strcmp(dtype_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment");
/* Open the dataset */
@@ -1245,7 +1245,7 @@ test_h5o_comment(void)
len = H5Oget_comment(dset, check_comment, (size_t)comment_len + 1);
CHECK(ret, len, "H5Oget_comment");
- ret_value = HDstrcmp(dset_comment, check_comment);
+ ret_value = strcmp(dset_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment");
/* Close the IDs */
@@ -1378,7 +1378,7 @@ test_h5o_comment_by_name(void)
len = H5Oget_comment_by_name(fid, ".", check_comment, (size_t)comment_len + 1, H5P_DEFAULT);
CHECK(len, FAIL, "H5Oget_comment_by_name");
- ret_value = HDstrcmp(file_comment, check_comment);
+ ret_value = strcmp(file_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment_by_name");
/* Open the group */
@@ -1392,7 +1392,7 @@ test_h5o_comment_by_name(void)
len = H5Oget_comment_by_name(fid, "group", check_comment, (size_t)comment_len + 1, H5P_DEFAULT);
CHECK(len, FAIL, "H5Oget_comment_by_name");
- ret_value = HDstrcmp(grp_comment, check_comment);
+ ret_value = strcmp(grp_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment_by_name");
/* Getting the comment on the datatype and verify it */
@@ -1402,7 +1402,7 @@ test_h5o_comment_by_name(void)
len = H5Oget_comment_by_name(grp, "datatype", check_comment, (size_t)comment_len + 1, H5P_DEFAULT);
CHECK(len, FAIL, "H5Oget_comment");
- ret_value = HDstrcmp(dtype_comment, check_comment);
+ ret_value = strcmp(dtype_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment_by_name");
/* Getting the comment on the dataset and verify it */
@@ -1412,7 +1412,7 @@ test_h5o_comment_by_name(void)
len = H5Oget_comment_by_name(fid, "dataset", check_comment, (size_t)comment_len + 1, H5P_DEFAULT);
CHECK(len, FAIL, "H5Oget_comment_by_name");
- ret_value = HDstrcmp(dset_comment, check_comment);
+ ret_value = strcmp(dset_comment, check_comment);
VERIFY(ret_value, 0, "H5Oget_comment_by_name");
/* Close the IDs */
@@ -1699,16 +1699,16 @@ visit_obj_cb(hid_t group_id, const char *name, const H5O_info1_t *oinfo1, void H
H5O_info1_t oinfo2; /* Object info structs */
/* Verify the object info for "group1", "group2" and the root group */
- if (!(HDstrcmp(name, "group1"))) {
+ if (!(strcmp(name, "group1"))) {
H5Oget_info_by_name2(group_id, name, &oinfo2, H5O_INFO_NUM_ATTRS, H5P_DEFAULT);
VERIFY(oinfo1->num_attrs, oinfo2.num_attrs, "obj info from H5Ovisit1");
}
- else if (!(HDstrcmp(name, "group2"))) {
+ else if (!(strcmp(name, "group2"))) {
H5Oget_info_by_name2(group_id, name, &oinfo2, H5O_INFO_HDR, H5P_DEFAULT);
VERIFY(oinfo1->hdr.nmesgs, oinfo2.hdr.nmesgs, "obj info from H5Ovisit1/H5Oget_info2");
VERIFY(oinfo1->hdr.nchunks, oinfo2.hdr.nchunks, "obj info from H5Ovisit1/H5Oget_info2");
}
- else if (!(HDstrcmp(name, "."))) {
+ else if (!(strcmp(name, "."))) {
H5Oget_info_by_name2(group_id, name, &oinfo2, H5O_INFO_META_SIZE, H5P_DEFAULT);
VERIFY(oinfo1->meta_size.obj.index_size, oinfo2.meta_size.obj.index_size,
"obj info from H5Ovisit1/H5Oget_info2");
@@ -1761,7 +1761,7 @@ test_h5o_getinfo_visit(void)
/* Attach 10 attributes to "group1" */
for (j = 0; j < 10; j++) {
/* Create the attribute name */
- HDsnprintf(attrname, sizeof(attrname), "attr%u", j);
+ snprintf(attrname, sizeof(attrname), "attr%u", j);
/* Create the attribute */
aid = H5Acreate2(gid1, attrname, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
diff --git a/test/thread_id.c b/test/thread_id.c
index d42a483..ed1e0a8 100644
--- a/test/thread_id.c
+++ b/test/thread_id.c
@@ -36,9 +36,9 @@ my_errx(int code, const char *fmt, ...)
(void)fprintf(stderr, "thread_id: ");
va_start(ap, fmt);
- (void)HDvfprintf(stderr, fmt, ap);
+ (void)vfprintf(stderr, fmt, ap);
va_end(ap);
- (void)HDfputc('\n', stderr);
+ (void)fputc('\n', stderr);
exit(code);
}
@@ -96,7 +96,7 @@ barrier_lock(pthread_barrier_t *barrier)
int rc;
if ((rc = pthread_mutex_lock(&barrier->mtx)) != 0) {
- my_errx(EXIT_FAILURE, "%s: pthread_mutex_lock: %s", __func__, HDstrerror(rc));
+ my_errx(EXIT_FAILURE, "%s: pthread_mutex_lock: %s", __func__, strerror(rc));
}
}
@@ -106,7 +106,7 @@ barrier_unlock(pthread_barrier_t *barrier)
int rc;
if ((rc = pthread_mutex_unlock(&barrier->mtx)) != 0) {
- my_errx(EXIT_FAILURE, "%s: pthread_mutex_unlock: %s", __func__, HDstrerror(rc));
+ my_errx(EXIT_FAILURE, "%s: pthread_mutex_unlock: %s", __func__, strerror(rc));
}
}
@@ -178,15 +178,15 @@ my_err(int code, const char *fmt, ...)
(void)fprintf(stderr, "thread_id: ");
va_start(ap, fmt);
- (void)HDvfprintf(stderr, fmt, ap);
+ (void)vfprintf(stderr, fmt, ap);
va_end(ap);
- (void)fprintf(stderr, ": %s\n", HDstrerror(errno_copy));
+ (void)fprintf(stderr, ": %s\n", strerror(errno_copy));
exit(code);
}
#define threads_failure(_call, _result) \
do { \
- my_errx(EXIT_FAILURE, "%s.%d: " #_call ": %s", __func__, __LINE__, HDstrerror(_result)); \
+ my_errx(EXIT_FAILURE, "%s.%d: " #_call ": %s", __func__, __LINE__, strerror(_result)); \
} while (false)
#define NTHREADS 5
@@ -204,7 +204,7 @@ atomic_printf(const char *fmt, ...)
ssize_t nprinted, nwritten;
va_start(ap, fmt);
- nprinted = HDvsnprintf(buf, sizeof(buf), fmt, ap);
+ nprinted = vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap);
if (nprinted == -1)
diff --git a/test/timer.c b/test/timer.c
index 9d92d0d..e992cba 100644
--- a/test/timer.c
+++ b/test/timer.c
@@ -35,55 +35,55 @@ test_time_formatting(void)
/* < 0, N/A */
s = H5_timer_get_time_string(-1.0);
- if (NULL == s || HDstrcmp(s, "N/A") != 0)
+ if (NULL == s || strcmp(s, "N/A") != 0)
TEST_ERROR;
free(s);
/* 0 0 */
s = H5_timer_get_time_string(0.0);
- if (NULL == s || HDstrcmp(s, "0.0 s") != 0)
+ if (NULL == s || strcmp(s, "0.0 s") != 0)
TEST_ERROR;
free(s);
/* < 1 us nanoseconds */
s = H5_timer_get_time_string(123.0E-9);
- if (NULL == s || HDstrcmp(s, "123 ns") != 0)
+ if (NULL == s || strcmp(s, "123 ns") != 0)
TEST_ERROR;
free(s);
/* < 1 ms microseconds */
s = H5_timer_get_time_string(23.456E-6);
- if (NULL == s || HDstrcmp(s, "23.5 us") != 0)
+ if (NULL == s || strcmp(s, "23.5 us") != 0)
TEST_ERROR;
free(s);
/* < 1 s milliseconds */
s = H5_timer_get_time_string(4.56789E-3);
- if (NULL == s || HDstrcmp(s, "4.6 ms") != 0)
+ if (NULL == s || strcmp(s, "4.6 ms") != 0)
TEST_ERROR;
free(s);
/* < 1 min seconds */
s = H5_timer_get_time_string(3.14);
- if (NULL == s || HDstrcmp(s, "3.14 s") != 0)
+ if (NULL == s || strcmp(s, "3.14 s") != 0)
TEST_ERROR;
free(s);
/* < 1 hr mins, secs */
s = H5_timer_get_time_string(2521.0);
- if (NULL == s || HDstrcmp(s, "42 m 1 s") != 0)
+ if (NULL == s || strcmp(s, "42 m 1 s") != 0)
TEST_ERROR;
free(s);
/* < 1 d hrs, mins, secs */
s = H5_timer_get_time_string(9756.0);
- if (NULL == s || HDstrcmp(s, "2 h 42 m 36 s") != 0)
+ if (NULL == s || strcmp(s, "2 h 42 m 36 s") != 0)
TEST_ERROR;
free(s);
/* > 1 d days, hrs, mins, secs */
s = H5_timer_get_time_string(280802.0);
- if (NULL == s || HDstrcmp(s, "3 d 6 h 0 m 2 s") != 0)
+ if (NULL == s || strcmp(s, "3 d 6 h 0 m 2 s") != 0)
TEST_ERROR;
free(s);
diff --git a/test/titerate.c b/test/titerate.c
index 43f3ddc..57b4d06 100644
--- a/test/titerate.c
+++ b/test/titerate.c
@@ -74,7 +74,7 @@ herr_t aiter_cb(hid_t group, const char *name, const H5A_info_t *ainfo, v
H5_ATTR_PURE int
iter_strcmp(const void *s1, const void *s2)
{
- return (HDstrcmp(*(const char *const *)s1, *(const char *const *)s2));
+ return (strcmp(*(const char *const *)s1, *(const char *const *)s2));
}
/****************************************************************
@@ -90,7 +90,7 @@ liter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2_t H5_ATTR
static int count = 0;
static int count2 = 0;
- HDstrcpy(info->name, name);
+ strcpy(info->name, name);
switch (info->command) {
case RET_ZERO:
@@ -155,12 +155,12 @@ test_iter_group(hid_t fapl, bool new_format)
CHECK(filespace, FAIL, "H5Screate");
for (i = 0; i < NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "Dataset %d", i);
+ snprintf(name, sizeof(name), "Dataset %d", i);
dataset = H5Dcreate2(file, name, datatype, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(dataset, FAIL, "H5Dcreate2");
/* Keep a copy of the dataset names around for later */
- lnames[i] = HDstrdup(name);
+ lnames[i] = strdup(name);
CHECK_PTR(lnames[i], "strdup");
ret = H5Dclose(dataset);
@@ -171,13 +171,13 @@ test_iter_group(hid_t fapl, bool new_format)
grp = H5Gcreate2(file, "grp", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Gcreate2");
- lnames[NDATASETS] = HDstrdup("grp");
+ lnames[NDATASETS] = strdup("grp");
CHECK_PTR(lnames[NDATASETS], "strdup");
ret = H5Tcommit2(file, "dtype", datatype, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Tcommit2");
- lnames[NDATASETS + 1] = HDstrdup("dtype");
+ lnames[NDATASETS + 1] = strdup("dtype");
CHECK_PTR(lnames[NDATASETS], "strdup");
/* Close everything up */
@@ -319,7 +319,7 @@ test_iter_group(hid_t fapl, bool new_format)
TestErrPrintf("Group iteration function walked too far!\n");
/* Verify that the correct name is retrieved */
- if (HDstrcmp(info.name, lnames[(size_t)(idx - 1)]) != 0)
+ if (strcmp(info.name, lnames[(size_t)(idx - 1)]) != 0)
TestErrPrintf(
"Group iteration function didn't return name correctly for link - lnames[%u] = '%s'!\n",
(unsigned)(idx - 1), lnames[(size_t)(idx - 1)]);
@@ -348,7 +348,7 @@ test_iter_group(hid_t fapl, bool new_format)
TestErrPrintf("Group iteration function walked too far!\n");
/* Verify that the correct name is retrieved */
- if (HDstrcmp(info.name, lnames[(size_t)(idx - 1)]) != 0)
+ if (strcmp(info.name, lnames[(size_t)(idx - 1)]) != 0)
TestErrPrintf(
"Group iteration function didn't return name correctly for link - lnames[%u] = '%s'!\n",
(unsigned)(idx - 1), lnames[(size_t)(idx - 1)]);
@@ -379,7 +379,7 @@ aiter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5A_info_t H5_ATTR_
static int count = 0;
static int count2 = 0;
- HDstrcpy(info->name, name);
+ strcpy(info->name, name);
switch (info->command) {
case RET_ZERO:
@@ -435,12 +435,12 @@ test_iter_attr(hid_t fapl, bool new_format)
CHECK(dataset, FAIL, "H5Dcreate2");
for (i = 0; i < NATTR; i++) {
- HDsnprintf(name, sizeof(name), "Attribute %02d", i);
+ snprintf(name, sizeof(name), "Attribute %02d", i);
attribute = H5Acreate2(dataset, name, H5T_NATIVE_INT, filespace, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attribute, FAIL, "H5Acreate2");
/* Keep a copy of the attribute names around for later */
- anames[i] = HDstrdup(name);
+ anames[i] = strdup(name);
CHECK_PTR(anames[i], "strdup");
ret = H5Aclose(attribute);
@@ -509,7 +509,7 @@ test_iter_attr(hid_t fapl, bool new_format)
/* Don't check name when new format is used */
if (!new_format) {
/* Verify that the correct name is retrieved */
- if (HDstrcmp(info.name, anames[(size_t)idx - 1]) != 0)
+ if (strcmp(info.name, anames[(size_t)idx - 1]) != 0)
TestErrPrintf("%u: Attribute iteration function didn't set names correctly, info.name = "
"'%s', anames[%u] = '%s'!\n",
__LINE__, info.name, (unsigned)(idx - 1), anames[(size_t)idx - 1]);
@@ -538,7 +538,7 @@ test_iter_attr(hid_t fapl, bool new_format)
/* Don't check name when new format is used */
if (!new_format) {
/* Verify that the correct name is retrieved */
- if (HDstrcmp(info.name, anames[(size_t)idx - 1]) != 0)
+ if (strcmp(info.name, anames[(size_t)idx - 1]) != 0)
TestErrPrintf("%u: Attribute iteration function didn't set names correctly, info.name = "
"'%s', anames[%u] = '%s'!\n",
__LINE__, info.name, (unsigned)(idx - 1), anames[(size_t)idx - 1]);
@@ -569,7 +569,7 @@ test_iter_attr(hid_t fapl, bool new_format)
H5_ATTR_PURE int
iter_strcmp2(const void *s1, const void *s2)
{
- return (HDstrcmp((const char *)s1, (const char *)s2));
+ return (strcmp((const char *)s1, (const char *)s2));
} /* end iter_strcmp2() */
/****************************************************************
@@ -584,7 +584,7 @@ liter_cb2(hid_t loc_id, const char *name, const H5L_info2_t H5_ATTR_UNUSED *link
H5O_info2_t oinfo;
herr_t ret; /* Generic return value */
- if (HDstrcmp(name, test_info->name) != 0) {
+ if (strcmp(name, test_info->name) != 0) {
TestErrPrintf("name = '%s', test_info = '%s'\n", name, test_info->name);
return (H5_ITER_ERROR);
} /* end if */
@@ -648,10 +648,10 @@ test_iter_group_large(hid_t fapl)
/* Create a bunch of groups */
for (i = 0; i < ITER_NGROUPS; i++) {
- HDsnprintf(gname, sizeof(gname), "Group_%d", i);
+ snprintf(gname, sizeof(gname), "Group_%d", i);
/* Add the name to the list of objects in the root group */
- HDstrcpy(names[i].name, gname);
+ strcpy(names[i].name, gname);
names[i].type = H5O_TYPE_GROUP;
/* Create a group */
@@ -668,7 +668,7 @@ test_iter_group_large(hid_t fapl)
CHECK(dataset, FAIL, "H5Dcreate2");
/* Add the name to the list of objects in the root group */
- HDstrcpy(names[ITER_NGROUPS].name, "Dataset1");
+ strcpy(names[ITER_NGROUPS].name, "Dataset1");
names[ITER_NGROUPS].type = H5O_TYPE_DATASET;
/* Close Dataset */
@@ -698,7 +698,7 @@ test_iter_group_large(hid_t fapl)
CHECK(ret, FAIL, "H5Tcommit2");
/* Add the name to the list of objects in the root group */
- HDstrcpy(names[ITER_NGROUPS + 1].name, "Datatype1");
+ strcpy(names[ITER_NGROUPS + 1].name, "Datatype1");
names[ITER_NGROUPS + 1].type = H5O_TYPE_NAMED_DATATYPE;
/* Close datatype */
@@ -765,12 +765,12 @@ test_grp_memb_funcs(hid_t fapl)
CHECK(filespace, FAIL, "H5Screate");
for (i = 0; i < NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "Dataset %d", i);
+ snprintf(name, sizeof(name), "Dataset %d", i);
dataset = H5Dcreate2(file, name, datatype, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(dataset, FAIL, "H5Dcreate2");
/* Keep a copy of the dataset names around for later */
- dnames[i] = HDstrdup(name);
+ dnames[i] = strdup(name);
CHECK_PTR(dnames[i], "strdup");
ret = H5Dclose(dataset);
@@ -781,13 +781,13 @@ test_grp_memb_funcs(hid_t fapl)
grp = H5Gcreate2(file, "grp", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Gcreate2");
- dnames[NDATASETS] = HDstrdup("grp");
+ dnames[NDATASETS] = strdup("grp");
CHECK_PTR(dnames[NDATASETS], "strdup");
ret = H5Tcommit2(file, "dtype", datatype, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Tcommit2");
- dnames[NDATASETS + 1] = HDstrdup("dtype");
+ dnames[NDATASETS + 1] = strdup("dtype");
CHECK_PTR(dnames[NDATASETS], "strdup");
/* Close everything up */
@@ -836,18 +836,18 @@ test_grp_memb_funcs(hid_t fapl)
VERIFY(ret, name_len, "H5Lget_name_by_idx");
/* Keep a copy of the dataset names around for later */
- obj_names[i] = HDstrdup(dataset_name);
+ obj_names[i] = strdup(dataset_name);
CHECK_PTR(obj_names[i], "strdup");
ret = H5Oget_info_by_idx3(root_group, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, &oinfo,
H5O_INFO_BASIC, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_idx3");
- if (!HDstrcmp(dataset_name, "grp"))
+ if (!strcmp(dataset_name, "grp"))
VERIFY(oinfo.type, H5O_TYPE_GROUP, "H5Lget_name_by_idx");
- if (!HDstrcmp(dataset_name, "dtype"))
+ if (!strcmp(dataset_name, "dtype"))
VERIFY(oinfo.type, H5O_TYPE_NAMED_DATATYPE, "H5Lget_name_by_idx");
- if (!HDstrncmp(dataset_name, "Dataset", (size_t)7))
+ if (!strncmp(dataset_name, "Dataset", (size_t)7))
VERIFY(oinfo.type, H5O_TYPE_DATASET, "H5Lget_name_by_idx");
} /* end for */
@@ -865,8 +865,8 @@ test_grp_memb_funcs(hid_t fapl)
/* Compare object names */
for (i = 0; i < (int)ginfo.nlinks; i++) {
- ret = HDstrcmp(dnames[i], obj_names[i]);
- VERIFY(ret, 0, "HDstrcmp");
+ ret = strcmp(dnames[i], obj_names[i]);
+ VERIFY(ret, 0, "strcmp");
} /* end for */
ret = H5Gclose(root_group);
@@ -944,11 +944,11 @@ test_links(hid_t fapl)
CHECK(ret, FAIL, "H5Oget_info_by_idx3");
} /* end if */
- if (!HDstrcmp(obj_name, "g1.1"))
+ if (!strcmp(obj_name, "g1.1"))
VERIFY(oinfo.type, H5O_TYPE_GROUP, "H5Lget_name_by_idx");
- else if (!HDstrcmp(obj_name, "hardlink"))
+ else if (!strcmp(obj_name, "hardlink"))
VERIFY(oinfo.type, H5O_TYPE_GROUP, "H5Lget_name_by_idx");
- else if (!HDstrcmp(obj_name, "softlink"))
+ else if (!strcmp(obj_name, "softlink"))
VERIFY(linfo.type, H5L_TYPE_SOFT, "H5Lget_name_by_idx");
else
ERROR("unknown object name");
@@ -985,7 +985,7 @@ find_err_msg_cb(unsigned H5_ATTR_UNUSED n, const H5E_error2_t *err_desc, void *_
return H5_ITER_ERROR;
/* If the searched error message is found, stop the iteration */
- if (err_desc->desc != NULL && HDstrcmp(err_desc->desc, searched_err->message) == 0) {
+ if (err_desc->desc != NULL && strcmp(err_desc->desc, searched_err->message) == 0) {
searched_err->found = true;
status = H5_ITER_STOP;
}
@@ -1043,7 +1043,7 @@ test_corrupted_attnamelen(void)
/* Make sure the intended error was caught */
if (err_status == -1) {
/* Initialize client data */
- HDstrcpy(err_caught.message, err_message);
+ strcpy(err_caught.message, err_message);
err_caught.found = false;
/* Look for the correct error message */
@@ -1126,11 +1126,11 @@ test_links_deprec(hid_t fapl)
CHECK(ret, FAIL, "H5Oget_info_by_idx");
} /* end if */
- if (!HDstrcmp(obj_name, "g1.1"))
+ if (!strcmp(obj_name, "g1.1"))
VERIFY(oinfo.type, H5O_TYPE_GROUP, "H5Lget_name_by_idx");
- else if (!HDstrcmp(obj_name, "hardlink"))
+ else if (!strcmp(obj_name, "hardlink"))
VERIFY(oinfo.type, H5O_TYPE_GROUP, "H5Lget_name_by_idx");
- else if (!HDstrcmp(obj_name, "softlink"))
+ else if (!strcmp(obj_name, "softlink"))
VERIFY(linfo.type, H5L_TYPE_SOFT, "H5Lget_name_by_idx");
else
ERROR("unknown object name");
diff --git a/test/tmisc.c b/test/tmisc.c
index 97224ee..c43f54f 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -448,8 +448,8 @@ test_misc2_write_attribute(void)
hid_t type;
herr_t ret;
misc2_struct data, data_check;
- char *string_att1 = HDstrdup("string attribute in file one");
- char *string_att2 = HDstrdup("string attribute in file two");
+ char *string_att1 = strdup("string attribute in file one");
+ char *string_att2 = strdup("string attribute in file two");
type = misc2_create_type();
@@ -1088,7 +1088,7 @@ test_misc6(void)
/* Loop through adding attributes to each dataset */
for (u = 0; u < MISC6_NUMATTR; u++) {
/* Create name for attribute */
- HDsnprintf(attr_name, sizeof(attr_name), "Attr#%u", u);
+ snprintf(attr_name, sizeof(attr_name), "Attr#%u", u);
/* Open the file */
loc_id = H5Fopen(MISC6_FILE, H5F_ACC_RDWR, H5P_DEFAULT);
@@ -2115,11 +2115,11 @@ test_misc12(void)
CHECK(ret, FAIL, "H5Dread");
for (i = 0; i < MISC12_SPACE1_DIM1; i++)
- if (HDstrcmp(wdata[i], rdata[i]) != 0)
+ if (strcmp(wdata[i], rdata[i]) != 0)
TestErrPrintf("Error on line %d: wdata[%d]=%s, rdata[%d]=%s\n", __LINE__, i, wdata[i], i,
rdata[i]);
for (; i < (MISC12_SPACE1_DIM1 + MISC12_APPEND_SIZE); i++)
- if (HDstrcmp(wdata1[i - MISC12_SPACE1_DIM1], rdata[i]) != 0)
+ if (strcmp(wdata1[i - MISC12_SPACE1_DIM1], rdata[i]) != 0)
TestErrPrintf("Error on line %d: wdata1[%d]=%s, rdata[%d]=%s\n", __LINE__, i - MISC12_SPACE1_DIM1,
wdata1[i - MISC12_SPACE1_DIM1], i, rdata[i]);
@@ -2338,7 +2338,7 @@ misc13_insert_user_block(const char *old_name, const char *new_name, const char
CHECK_PTR(user_block, "calloc");
/* Copy in the user block data */
- memcpy(user_block, str, HDstrlen(str));
+ memcpy(user_block, str, strlen(str));
/* Open the new file */
new_fp = fopen(new_name, "wb");
@@ -2869,13 +2869,13 @@ test_misc16(void)
/* Compare data read in */
for (i = 0; i < MISC16_SPACE_DIM; i++) {
- if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
+ if (strlen(wdata[i]) != strlen(rdata[i])) {
TestErrPrintf(
"Line %u: VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",
- (unsigned)__LINE__, (int)i, (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (unsigned)__LINE__, (int)i, (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i]));
continue;
} /* end if */
- if (HDstrcmp(wdata[i], rdata[i]) != 0) {
+ if (strcmp(wdata[i], rdata[i]) != 0) {
TestErrPrintf("Line %u: VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n",
(unsigned)__LINE__, (int)i, wdata[i], (int)i, rdata[i]);
continue;
@@ -2954,13 +2954,13 @@ test_misc17(void)
/* Compare data in the way of strings. */
for (i = 0; i < MISC17_SPACE_DIM1; i++) {
- if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
+ if (strlen(wdata[i]) != strlen(rdata[i])) {
TestErrPrintf(
"Line %u: VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",
- (unsigned)__LINE__, (int)i, (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (unsigned)__LINE__, (int)i, (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i]));
continue;
} /* end if */
- if (HDstrcmp(wdata[i], rdata[i]) != 0) {
+ if (strcmp(wdata[i], rdata[i]) != 0) {
TestErrPrintf("Line %u: VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n",
(unsigned)__LINE__, (int)i, wdata[i], (int)i, rdata[i]);
continue;
@@ -3066,7 +3066,7 @@ test_misc18(void)
/* Loop creating attributes on each dataset, flushing them to the file each time */
for (u = 0; u < 10; u++) {
/* Set up attribute name */
- HDsnprintf(attr_name, sizeof(attr_name), "Attr %u", u);
+ snprintf(attr_name, sizeof(attr_name), "Attr %u", u);
/* Create & close attribute on first dataset */
aid = H5Acreate2(did1, attr_name, H5T_STD_U32LE, sid, H5P_DEFAULT, H5P_DEFAULT);
@@ -5572,7 +5572,7 @@ test_misc30(void)
CHECK(ret, FAIL, "test_misc30_get_info");
}
- HDsnprintf(gname, sizeof(gname), "/g0/group%d", i);
+ snprintf(gname, sizeof(gname), "/g0/group%d", i);
gid = H5Gcreate2(fid, gname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(gid, FAIL, "H5Gcreate2");
diff --git a/test/trefer.c b/test/trefer.c
index a8bef09..d69e4b1 100644
--- a/test/trefer.c
+++ b/test/trefer.c
@@ -2121,19 +2121,19 @@ test_deref_iter_op(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2
/* Simple check for correct names */
if (*count == 0) {
- if (HDstrcmp(name, DSETNAME2) == 0)
+ if (strcmp(name, DSETNAME2) == 0)
ret_value = 0;
else
ret_value = -1;
} /* end if */
else if (*count == 1) {
- if (HDstrcmp(name, GROUPNAME2) == 0)
+ if (strcmp(name, GROUPNAME2) == 0)
ret_value = 0;
else
ret_value = -1;
} /* end if */
else if (*count == 2) {
- if (HDstrcmp(name, GROUPNAME3) == 0)
+ if (strcmp(name, GROUPNAME3) == 0)
ret_value = 0;
else
ret_value = -1;
@@ -3588,7 +3588,7 @@ test_reference(void)
} /* end low bound */
/* The following test is currently broken with the Direct VFD */
- if (HDstrcmp(env_h5_drvr, "direct") != 0) {
+ if (strcmp(env_h5_drvr, "direct") != 0) {
test_reference_obj_deleted(); /* Test H5R object reference code for deleted objects */
}
diff --git a/test/trefer_deprec.c b/test/trefer_deprec.c
index a84815f..5bb1f13 100644
--- a/test/trefer_deprec.c
+++ b/test/trefer_deprec.c
@@ -437,7 +437,7 @@ test_reference_obj(void)
CHECK(size, FAIL, "H5Oget_comment");
/* Check for correct comment value */
- if (HDstrcmp(write_comment, read_comment) != 0)
+ if (strcmp(write_comment, read_comment) != 0)
TestErrPrintf("Error! Incorrect group comment, wanted: %s, got: %s\n", write_comment, read_comment);
/* Close group */
@@ -1355,19 +1355,19 @@ test_deref_iter_op(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2
/* Simple check for correct names */
if (*count == 0) {
- if (HDstrcmp(name, DSETNAME2) == 0)
+ if (strcmp(name, DSETNAME2) == 0)
ret_value = 0;
else
ret_value = -1;
} /* end if */
else if (*count == 1) {
- if (HDstrcmp(name, GROUPNAME2) == 0)
+ if (strcmp(name, GROUPNAME2) == 0)
ret_value = 0;
else
ret_value = -1;
} /* end if */
else if (*count == 2) {
- if (HDstrcmp(name, GROUPNAME3) == 0)
+ if (strcmp(name, GROUPNAME3) == 0)
ret_value = 0;
else
ret_value = -1;
diff --git a/test/trefstr.c b/test/trefstr.c
index 1895fb6..cd7ddcb 100644
--- a/test/trefstr.c
+++ b/test/trefstr.c
@@ -235,7 +235,7 @@ test_refstr_wrap(void)
MESSAGE(5, ("Testing Wrapping Ref-Counted Strings\n"));
/* Initialize buffer */
- HDstrcpy(buf, "foo");
+ strcpy(buf, "foo");
/* Wrap ref-counted string around existing buffer */
rs = H5RS_wrap(buf);
@@ -245,8 +245,8 @@ test_refstr_wrap(void)
s = H5RS_get_str(rs);
CHECK_PTR(s, "H5RS_get_str");
CHECK_PTR_EQ(s, buf, "wrapping");
- cmp = HDstrcmp(s, buf);
- VERIFY(cmp, 0, "HDstrcmp");
+ cmp = strcmp(s, buf);
+ VERIFY(cmp, 0, "strcmp");
/* Increment reference count (should duplicate string) */
ret = H5RS_incr(rs);
@@ -261,7 +261,7 @@ test_refstr_wrap(void)
if (s == buf)
TestErrPrintf("%d: Should not have gotten the same pointer from reference-counted string!\n",
__LINE__);
- cmp = HDstrcmp(s, buf);
+ cmp = strcmp(s, buf);
if (cmp <= 0)
TestErrPrintf("%d: string comparison incorrect!\n", __LINE__);
@@ -302,9 +302,9 @@ test_refstr_asprintf_cat(void)
/* Get pointer to raw string in ref-counted string */
s = H5RS_get_str(rs);
CHECK_PTR(s, "H5RS_get_str");
- HDsnprintf(buf, sizeof(buf), "%d-%s", (int)10, "foo");
- cmp = HDstrcmp(s, buf);
- VERIFY(cmp, 0, "HDstrcmp");
+ snprintf(buf, sizeof(buf), "%d-%s", (int)10, "foo");
+ cmp = strcmp(s, buf);
+ VERIFY(cmp, 0, "strcmp");
/* Append more output to ref-counted string */
ret = H5RS_asprintf_cat(rs, "-%f", (double)20.0);
@@ -313,9 +313,9 @@ test_refstr_asprintf_cat(void)
/* Get pointer to raw string in ref-counted string */
s = H5RS_get_str(rs);
CHECK_PTR(s, "H5RS_get_str");
- HDsnprintf(buf, sizeof(buf), "%d-%s-%f", (int)10, "foo", (double)20.0);
- cmp = HDstrcmp(s, buf);
- VERIFY(cmp, 0, "HDstrcmp");
+ snprintf(buf, sizeof(buf), "%d-%s-%f", (int)10, "foo", (double)20.0);
+ cmp = strcmp(s, buf);
+ VERIFY(cmp, 0, "strcmp");
/* Decrement reference count for string */
ret = H5RS_decr(rs);
@@ -353,9 +353,9 @@ test_refstr_acat(void)
/* Get pointer to raw string in ref-counted string */
s = H5RS_get_str(rs);
CHECK_PTR(s, "H5RS_get_str");
- HDsnprintf(buf, sizeof(buf), "%s", "foo");
- cmp = HDstrcmp(s, buf);
- VERIFY(cmp, 0, "HDstrcmp");
+ snprintf(buf, sizeof(buf), "%s", "foo");
+ cmp = strcmp(s, buf);
+ VERIFY(cmp, 0, "strcmp");
/* Append another string to ref-counted string */
ret = H5RS_acat(rs, "bar");
@@ -364,9 +364,9 @@ test_refstr_acat(void)
/* Get pointer to raw string in ref-counted string */
s = H5RS_get_str(rs);
CHECK_PTR(s, "H5RS_get_str");
- HDsnprintf(buf, sizeof(buf), "%s", "foobar");
- cmp = HDstrcmp(s, buf);
- VERIFY(cmp, 0, "HDstrcmp");
+ snprintf(buf, sizeof(buf), "%s", "foobar");
+ cmp = strcmp(s, buf);
+ VERIFY(cmp, 0, "strcmp");
/* Append a large string to ref-counted string */
large_str = malloc(1024);
@@ -379,14 +379,14 @@ test_refstr_acat(void)
/* Get pointer to raw string in ref-counted string */
s = H5RS_get_str(rs);
CHECK_PTR(s, "H5RS_get_str");
- HDsnprintf(buf, sizeof(buf), "%s", "foobar");
+ snprintf(buf, sizeof(buf), "%s", "foobar");
large_str2 = malloc(1024 + 6);
CHECK_PTR(large_str2, "malloc");
- HDstrcpy(large_str2, "foobar");
+ strcpy(large_str2, "foobar");
memset(&large_str2[6], 'a', 1024);
large_str2[1029] = '\0';
- cmp = HDstrcmp(s, large_str2);
- VERIFY(cmp, 0, "HDstrcmp");
+ cmp = strcmp(s, large_str2);
+ VERIFY(cmp, 0, "strcmp");
/* Decrement reference count for string */
ret = H5RS_decr(rs);
@@ -426,9 +426,9 @@ test_refstr_ancat(void)
/* Get pointer to raw string in ref-counted string */
s = H5RS_get_str(rs);
CHECK_PTR(s, "H5RS_get_str");
- HDstrcpy(buf, "fo");
- cmp = HDstrcmp(s, buf);
- VERIFY(cmp, 0, "HDstrcmp");
+ strcpy(buf, "fo");
+ cmp = strcmp(s, buf);
+ VERIFY(cmp, 0, "strcmp");
/* Append another string to ref-counted string */
ret = H5RS_ancat(rs, "bar", 2);
@@ -437,9 +437,9 @@ test_refstr_ancat(void)
/* Get pointer to raw string in ref-counted string */
s = H5RS_get_str(rs);
CHECK_PTR(s, "H5RS_get_str");
- HDstrcpy(buf, "foba");
- cmp = HDstrcmp(s, buf);
- VERIFY(cmp, 0, "HDstrcmp");
+ strcpy(buf, "foba");
+ cmp = strcmp(s, buf);
+ VERIFY(cmp, 0, "strcmp");
/* Decrement reference count for string */
ret = H5RS_decr(rs);
@@ -475,9 +475,9 @@ test_refstr_aputc(void)
/* Get pointer to raw string in ref-counted string */
s = H5RS_get_str(rs);
CHECK_PTR(s, "H5RS_get_str");
- HDstrcpy(buf, "f");
- cmp = HDstrcmp(s, buf);
- VERIFY(cmp, 0, "HDstrcmp");
+ strcpy(buf, "f");
+ cmp = strcmp(s, buf);
+ VERIFY(cmp, 0, "strcmp");
/* Append another character to ref-counted string */
ret = H5RS_aputc(rs, 'o');
@@ -486,9 +486,9 @@ test_refstr_aputc(void)
/* Get pointer to raw string in ref-counted string */
s = H5RS_get_str(rs);
CHECK_PTR(s, "H5RS_get_str");
- HDstrcpy(buf, "fo");
- cmp = HDstrcmp(s, buf);
- VERIFY(cmp, 0, "HDstrcmp");
+ strcpy(buf, "fo");
+ cmp = strcmp(s, buf);
+ VERIFY(cmp, 0, "strcmp");
/* Decrement reference count for string */
ret = H5RS_decr(rs);
diff --git a/test/tselect.c b/test/tselect.c
index fa93c21..c8450cc 100644
--- a/test/tselect.c
+++ b/test/tselect.c
@@ -10909,15 +10909,13 @@ test_shape_same_dr__full_space_vs_slice(int test_num, int small_rank, int large_
assert(edge_size > 0);
assert(edge_size <= 1000);
- HDsnprintf(test_desc_0, sizeof(test_desc_0), "\tn-cube slice through m-cube (n <= m) test %d.\n",
- test_num);
+ snprintf(test_desc_0, sizeof(test_desc_0), "\tn-cube slice through m-cube (n <= m) test %d.\n", test_num);
MESSAGE(7, ("%s", test_desc_0));
/* This statement must be updated if SS_DR_MAX_RANK is changed */
- HDsnprintf(test_desc_1, sizeof(test_desc_1),
- "\t\tranks: %d/%d offset: %d dim_selected: %d/%d/%d/%d/%d.\n", small_rank, large_rank, offset,
- (int)dim_selected[0], (int)dim_selected[1], (int)dim_selected[2], (int)dim_selected[3],
- (int)dim_selected[4]);
+ snprintf(test_desc_1, sizeof(test_desc_1), "\t\tranks: %d/%d offset: %d dim_selected: %d/%d/%d/%d/%d.\n",
+ small_rank, large_rank, offset, (int)dim_selected[0], (int)dim_selected[1], (int)dim_selected[2],
+ (int)dim_selected[3], (int)dim_selected[4]);
MESSAGE(7, ("%s", test_desc_1));
/* copy the edge size into the dims array */
@@ -11169,16 +11167,16 @@ test_shape_same_dr__checkerboard(int test_num, int small_rank, int large_rank, i
assert(dims_selected >= 0);
assert(dims_selected <= large_rank);
- HDsnprintf(test_desc_0, sizeof(test_desc_0),
- "\tcheckerboard n-cube slice through m-cube (n <= m) test %d.\n", test_num);
+ snprintf(test_desc_0, sizeof(test_desc_0),
+ "\tcheckerboard n-cube slice through m-cube (n <= m) test %d.\n", test_num);
MESSAGE(7, ("%s", test_desc_0));
/* This statement must be updated if SS_DR_MAX_RANK is changed */
- HDsnprintf(test_desc_1, sizeof(test_desc_1),
- "\tranks: %d/%d edge/chkr size: %d/%d offset: %d dim_selected: %d/%d/%d/%d/%d:%d.\n",
- small_rank, large_rank, (int)edge_size, (int)checker_size, offset, (int)dim_selected[0],
- (int)dim_selected[1], (int)dim_selected[2], (int)dim_selected[3], (int)dim_selected[4],
- dims_selected);
+ snprintf(test_desc_1, sizeof(test_desc_1),
+ "\tranks: %d/%d edge/chkr size: %d/%d offset: %d dim_selected: %d/%d/%d/%d/%d:%d.\n", small_rank,
+ large_rank, (int)edge_size, (int)checker_size, offset, (int)dim_selected[0],
+ (int)dim_selected[1], (int)dim_selected[2], (int)dim_selected[3], (int)dim_selected[4],
+ dims_selected);
MESSAGE(7, ("%s", test_desc_1));
/* copy the edge size into the dims array */
@@ -11714,16 +11712,15 @@ test_shape_same_dr__irregular(int test_num, int small_rank, int large_rank, int
assert(dims_selected >= 0);
assert(dims_selected <= large_rank);
- HDsnprintf(test_desc_0, sizeof(test_desc_0),
- "\tirregular sub set of n-cube slice through m-cube (n <= m) test %d.\n", test_num);
+ snprintf(test_desc_0, sizeof(test_desc_0),
+ "\tirregular sub set of n-cube slice through m-cube (n <= m) test %d.\n", test_num);
MESSAGE(7, ("%s", test_desc_0));
/* This statement must be updated if SS_DR_MAX_RANK is changed */
- HDsnprintf(test_desc_1, sizeof(test_desc_1),
- "\tranks: %d/%d edge: %d s/p offset: %d/%d dim_selected: %d/%d/%d/%d/%d:%d.\n", small_rank,
- large_rank, edge_size, slice_offset, pattern_offset, (int)dim_selected[0],
- (int)dim_selected[1], (int)dim_selected[2], (int)dim_selected[3], (int)dim_selected[4],
- dims_selected);
+ snprintf(test_desc_1, sizeof(test_desc_1),
+ "\tranks: %d/%d edge: %d s/p offset: %d/%d dim_selected: %d/%d/%d/%d/%d:%d.\n", small_rank,
+ large_rank, edge_size, slice_offset, pattern_offset, (int)dim_selected[0], (int)dim_selected[1],
+ (int)dim_selected[2], (int)dim_selected[3], (int)dim_selected[4], dims_selected);
MESSAGE(7, ("%s", test_desc_1));
/* copy the edge size into the dims array */
@@ -16127,7 +16124,7 @@ test_select(void)
test_select_hyper_valid_combination(); /* Test different input combinations */
/* The following tests are currently broken with the Direct VFD */
- if (HDstrcmp(env_h5_drvr, "direct") != 0) {
+ if (strcmp(env_h5_drvr, "direct") != 0) {
test_select_hyper_and_2d(); /* Test hyperslab intersection (AND) code for 2-D dataset */
test_select_hyper_xor_2d(); /* Test hyperslab XOR code for 2-D dataset */
test_select_hyper_notb_2d(); /* Test hyperslab NOTB code for 2-D dataset */
diff --git a/test/tsohm.c b/test/tsohm.c
index bcd540f..e507fb9 100644
--- a/test/tsohm.c
+++ b/test/tsohm.c
@@ -604,7 +604,7 @@ size1_helper(hid_t file, const char *filename, hid_t fapl_id, bool test_file_clo
printf("Can't read data\n"); \
goto error; \
} \
- if ((rdata.i1 != wdata.i1) || (rdata.i2 != wdata.i2) || HDstrcmp(rdata.str, wdata.str) != 0) { \
+ if ((rdata.i1 != wdata.i1) || (rdata.i2 != wdata.i2) || strcmp(rdata.str, wdata.str) != 0) { \
H5_FAILED(); \
AT(); \
printf("incorrect read data\n"); \
@@ -621,7 +621,7 @@ size1_helper(hid_t file, const char *filename, hid_t fapl_id, bool test_file_clo
/* Initialize wdata */
memset(&wdata, 0, sizeof(wdata));
wdata.i1 = 11;
- HDstrcpy(wdata.str, "string");
+ strcpy(wdata.str, "string");
wdata.i2 = 22;
wdata.i3 = 33;
wdata.i4 = 44;
@@ -1486,7 +1486,7 @@ size2_verify_plist2(hid_t plist)
static void
size2_dump_struct(const char *name, size2_helper_struct *sizes)
{
- HDputs(name);
+ puts(name);
printf(" empty size: %llu\n", (unsigned long long)sizes->empty_size);
printf(" first dataset: %llu \tdelta: %llu\n", (unsigned long long)sizes->first_dset,
(unsigned long long)(sizes->first_dset - sizes->empty_size));
@@ -1631,8 +1631,8 @@ size2_helper(hid_t fcpl_id, int test_file_closing, size2_helper_struct *ret_size
/* Set up attribute data */
memset(attr_string1, 0, (size_t)NAME_BUF_SIZE);
memset(attr_string2, 0, (size_t)NAME_BUF_SIZE);
- HDstrcpy(attr_string1, LONG_STRING);
- HDstrcpy(attr_string2, LONG_STRING);
+ strcpy(attr_string1, LONG_STRING);
+ strcpy(attr_string2, LONG_STRING);
attr_string2[1] = '1'; /* The second string starts "01 index..." */
/* Set up attribute metadata */
@@ -1788,7 +1788,7 @@ size2_helper(hid_t fcpl_id, int test_file_closing, size2_helper_struct *ret_size
group_id = H5Gopen2(file_id, "group", H5P_DEFAULT);
CHECK_I(group_id, "H5Gopen2");
- HDstrcpy(attr_name, "00 index");
+ strcpy(attr_name, "00 index");
for (x = 0; x < NUM_ATTRIBUTES; ++x) {
/* Create a unique name and value for each attribute */
@@ -2038,8 +2038,8 @@ size2_verify(void)
memset(attr_string, 0, (size_t)NAME_BUF_SIZE);
memset(attr_correct_string, 0, (size_t)NAME_BUF_SIZE);
- HDstrcpy(attr_correct_string, LONG_STRING);
- HDstrcpy(attr_name, "00 index");
+ strcpy(attr_correct_string, LONG_STRING);
+ strcpy(attr_name, "00 index");
for (x = 0; x < NUM_ATTRIBUTES; ++x) {
/* Create the name and correct value for each attribute */
diff --git a/test/ttsafe.c b/test/ttsafe.c
index d6e9d9b..ce53cce 100644
--- a/test/ttsafe.c
+++ b/test/ttsafe.c
@@ -81,7 +81,7 @@ gen_name(int value)
length = num_digits(MAX_NUM_NAME - 1);
temp = (char *)malloc(NAME_OFFSET + length + 1);
- temp = HDstrcpy(temp, "attrib");
+ temp = strcpy(temp, "attrib");
temp[NAME_OFFSET + length] = '\0';
for (i = (int)(length - 1); i >= 0; i--) {
diff --git a/test/tunicode.c b/test/tunicode.c
index b7e2015..705bdfd 100644
--- a/test/tunicode.c
+++ b/test/tunicode.c
@@ -94,7 +94,7 @@ test_fl_string(hid_t fid, const char *string)
ret = H5Dread(dset_id, dtype_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf);
CHECK(ret, FAIL, "H5Dread");
- VERIFY(HDstrcmp(string, read_buf), 0, "strcmp");
+ VERIFY(strcmp(string, read_buf), 0, "strcmp");
/* Close all */
ret = H5Dclose(dset_id);
@@ -137,14 +137,14 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
* the right number of bytes (even or odd, depending on the test).
* We create a 'new_string' whose length is convenient by prepending
* an 'x' to 'string' when necessary. */
- length = HDstrlen(string);
+ length = strlen(string);
if (length % 2 != 1) {
- HDstrcpy(new_string, "x");
- HDstrcat(new_string, string);
+ strcpy(new_string, "x");
+ strcat(new_string, string);
length++;
}
else {
- HDstrcpy(new_string, string);
+ strcpy(new_string, string);
}
/* Convert a null-terminated string to a shorter and longer null
@@ -163,8 +163,8 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* Fill the buffer with two copies of the UTF-8 string, each with a
* terminating NULL. It will look like "abcdefg\0abcdefg\0". */
- HDstrncpy(buf, new_string, big_len);
- HDstrncpy(&buf[big_len], new_string, big_len);
+ strncpy(buf, new_string, big_len);
+ strncpy(&buf[big_len], new_string, big_len);
ret = H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Tconvert");
@@ -174,11 +174,11 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
* like; UTF-8 characters may well have been truncated.
* To check that the conversion worked properly, we'll build this
* string manually. */
- HDstrncpy(cmpbuf, new_string, small_len - 1);
+ strncpy(cmpbuf, new_string, small_len - 1);
cmpbuf[small_len - 1] = '\0';
- HDstrncpy(&cmpbuf[small_len], new_string, small_len - 1);
+ strncpy(&cmpbuf[small_len], new_string, small_len - 1);
cmpbuf[2 * small_len - 1] = '\0';
- HDstrcpy(&cmpbuf[2 * small_len], new_string);
+ strcpy(&cmpbuf[2 * small_len], new_string);
VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
@@ -190,8 +190,8 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* First fill the buffer with NULLs */
memset(cmpbuf, '\0', (size_t)LONG_BUF_SIZE);
/* Copy in the characters */
- HDstrncpy(cmpbuf, new_string, small_len - 1);
- HDstrncpy(&cmpbuf[big_len], new_string, small_len - 1);
+ strncpy(cmpbuf, new_string, small_len - 1);
+ strncpy(&cmpbuf[big_len], new_string, small_len - 1);
VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
@@ -203,14 +203,14 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* Now test null padding. Null-padded strings do *not* need
* terminating NULLs, so the sizes of the datatypes are slightly
* different and we want a string with an even number of characters. */
- length = HDstrlen(string);
+ length = strlen(string);
if (length % 2 != 0) {
- HDstrcpy(new_string, "x");
- HDstrcat(new_string, string);
+ strcpy(new_string, "x");
+ strcat(new_string, string);
length++;
}
else {
- HDstrcpy(new_string, string);
+ strcpy(new_string, string);
}
/* Create a src_type that holds the UTF-8 string */
@@ -225,8 +225,8 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* Fill the buffer with two copies of the UTF-8 string.
* It will look like "abcdefghabcdefgh". */
- HDstrncpy(buf, new_string, big_len);
- HDstrncpy(&buf[big_len], new_string, big_len);
+ strncpy(buf, new_string, big_len);
+ strncpy(&buf[big_len], new_string, big_len);
ret = H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Tconvert");
@@ -236,9 +236,9 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
* like; UTF-8 characters may well have been truncated.
* To check that the conversion worked properly, we'll build this
* string manually. */
- HDstrncpy(cmpbuf, new_string, small_len);
- HDstrncpy(&cmpbuf[small_len], new_string, small_len);
- HDstrncpy(&cmpbuf[2 * small_len], new_string, big_len);
+ strncpy(cmpbuf, new_string, small_len);
+ strncpy(&cmpbuf[small_len], new_string, small_len);
+ strncpy(&cmpbuf[2 * small_len], new_string, big_len);
VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
@@ -250,8 +250,8 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* First fill the buffer with NULLs */
memset(cmpbuf, '\0', (size_t)LONG_BUF_SIZE);
/* Copy in the characters */
- HDstrncpy(cmpbuf, new_string, small_len);
- HDstrncpy(&cmpbuf[big_len], new_string, small_len);
+ strncpy(cmpbuf, new_string, small_len);
+ strncpy(&cmpbuf[big_len], new_string, small_len);
VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
@@ -270,8 +270,8 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* Fill the buffer with two copies of the UTF-8 string.
* It will look like "abcdefghabcdefgh". */
- HDstrcpy(buf, new_string);
- HDstrcpy(&buf[big_len], new_string);
+ strcpy(buf, new_string);
+ strcpy(&buf[big_len], new_string);
ret = H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Tconvert");
@@ -281,9 +281,9 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
* like; UTF-8 characters may have been truncated.
* To check that the conversion worked properly, we'll build this
* string manually. */
- HDstrncpy(cmpbuf, new_string, small_len);
- HDstrncpy(&cmpbuf[small_len], new_string, small_len);
- HDstrncpy(&cmpbuf[2 * small_len], new_string, big_len);
+ strncpy(cmpbuf, new_string, small_len);
+ strncpy(&cmpbuf[small_len], new_string, small_len);
+ strncpy(&cmpbuf[2 * small_len], new_string, big_len);
VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
@@ -295,8 +295,8 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string)
/* First fill the buffer with spaces */
memset(cmpbuf, ' ', (size_t)LONG_BUF_SIZE);
/* Copy in the characters */
- HDstrncpy(cmpbuf, new_string, small_len);
- HDstrncpy(&cmpbuf[big_len], new_string, small_len);
+ strncpy(cmpbuf, new_string, small_len);
+ strncpy(&cmpbuf[big_len], new_string, small_len);
VERIFY(memcmp(buf, cmpbuf, 2 * big_len), 0, "memcmp");
@@ -340,14 +340,14 @@ test_vl_string(hid_t fid, const char *string)
/* Make certain the correct amount of memory will be used */
ret = H5Dvlen_get_buf_size(dset_id, type_id, space_id, &size);
CHECK(ret, FAIL, "H5Dvlen_get_buf_size");
- VERIFY(size, (hsize_t)HDstrlen(string) + 1, "H5Dvlen_get_buf_size");
+ VERIFY(size, (hsize_t)strlen(string) + 1, "H5Dvlen_get_buf_size");
/* Read dataset from disk */
ret = H5Dread(dset_id, type_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf);
CHECK(ret, FAIL, "H5Dread");
/* Compare data read in */
- VERIFY(HDstrcmp(string, read_buf[0]), 0, "strcmp");
+ VERIFY(strcmp(string, read_buf[0]), 0, "strcmp");
/* Reclaim the read VL data */
ret = H5Treclaim(type_id, space_id, H5P_DEFAULT, read_buf);
@@ -399,7 +399,7 @@ test_objnames(hid_t fid, const char *string)
ret = H5Gclose(grp_id);
CHECK(ret, FAIL, "H5Gclose");
- VERIFY(HDstrcmp(string, read_buf), 0, "strcmp");
+ VERIFY(strcmp(string, read_buf), 0, "strcmp");
/* Create a new dataset with a UTF-8 name */
grp1_id = H5Gcreate2(fid, GROUP1_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -483,9 +483,9 @@ test_objnames(hid_t fid, const char *string)
ret = H5Lcreate_hard(fid, GROUP2_NAME, grp3_id, GROUP2_NAME, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Lcreate_hard");
- HDstrcpy(path_buf, GROUP2_NAME);
- HDstrcat(path_buf, "/");
- HDstrcat(path_buf, string);
+ strcpy(path_buf, GROUP2_NAME);
+ strcat(path_buf, "/");
+ strcat(path_buf, string);
ret = H5Lcreate_hard(grp3_id, path_buf, H5L_SAME_LOC, string, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Lcreate_hard");
@@ -531,7 +531,7 @@ test_attrname(hid_t fid, const char *string)
CHECK(attr_id, FAIL, "H5Acreate2");
size = H5Aget_name(attr_id, (size_t)MAX_STRING_LENGTH, read_buf);
CHECK(size, FAIL, "H5Aget_name");
- ret = HDstrcmp(read_buf, string);
+ ret = strcmp(read_buf, string);
VERIFY(ret, 0, "strcmp");
read_buf[0] = '\0';
@@ -540,7 +540,7 @@ test_attrname(hid_t fid, const char *string)
CHECK(ret, FAIL, "H5Awrite");
ret = H5Aread(attr_id, dtype_id, read_buf);
CHECK(ret, FAIL, "H5Aread");
- ret = HDstrcmp(read_buf, string);
+ ret = strcmp(read_buf, string);
VERIFY(ret, 0, "strcmp");
/* Clean up */
@@ -598,7 +598,7 @@ test_compound(hid_t fid, const char *string)
/* Check that the field name was stored correctly */
readbuf = H5Tget_member_name(s1_tid, 0);
- ret = HDstrcmp(readbuf, string);
+ ret = strcmp(readbuf, string);
VERIFY(ret, 0, "strcmp");
H5free_memory(readbuf);
@@ -681,7 +681,7 @@ test_enum(hid_t H5_ATTR_UNUSED fid, const char *string)
VERIFY(val, E1_WHITE, "H5Tenum_valueof");
ret = H5Tenum_nameof(type_id, &val, readbuf, (size_t)MAX_STRING_LENGTH);
CHECK(ret, FAIL, "H5Tenum_nameof");
- ret = HDstrcmp(readbuf, string);
+ ret = strcmp(readbuf, string);
VERIFY(ret, 0, "strcmp");
/* Close the datatype */
@@ -708,7 +708,7 @@ test_opaque(hid_t H5_ATTR_UNUSED fid, const char *string)
/* Read the tag back. */
read_buf = H5Tget_tag(type_id);
- ret = HDstrcmp(read_buf, string);
+ ret = strcmp(read_buf, string);
VERIFY(ret, 0, "H5Tget_tag");
H5free_memory(read_buf);
@@ -782,7 +782,7 @@ dump_string(const char *string)
printf("The string was:\n %s", string);
printf("Or in hex:\n");
- length = HDstrlen(string);
+ length = strlen(string);
for (x = 0; x < length; x++)
printf("%x ", string[x] & (0x000000FF));
diff --git a/test/tvlstr.c b/test/tvlstr.c
index be951dd..a3ea041 100644
--- a/test/tvlstr.c
+++ b/test/tvlstr.c
@@ -186,7 +186,7 @@ test_vlstrings_basic(void)
/* Count the actual number of bytes used by the strings */
for (i = 0, str_used = 0; i < SPACE1_DIM1; i++)
- str_used += HDstrlen(wdata[i]) + 1;
+ str_used += strlen(wdata[i]) + 1;
/* Compare against the strings actually written */
VERIFY(size, (hsize_t)str_used, "H5Dvlen_get_buf_size");
@@ -200,12 +200,12 @@ test_vlstrings_basic(void)
/* Compare data read in */
for (i = 0; i < SPACE1_DIM1; i++) {
- if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
+ if (strlen(wdata[i]) != strlen(rdata[i])) {
TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", (int)i,
- (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i]));
continue;
} /* end if */
- if (HDstrcmp(wdata[i], rdata[i]) != 0) {
+ if (strcmp(wdata[i], rdata[i]) != 0) {
TestErrPrintf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n", (int)i, wdata[i],
(int)i, rdata[i]);
continue;
@@ -304,16 +304,16 @@ test_vlstrings_special(void)
/* Compare data read in */
for (i = 0; i < SPACE1_DIM1; i++) {
- if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
+ if (strlen(wdata[i]) != strlen(rdata[i])) {
TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", (int)i,
- (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i]));
continue;
} /* end if */
if ((wdata[i] == NULL && rdata[i] != NULL) || (rdata[i] == NULL && wdata[i] != NULL)) {
TestErrPrintf("VL data values don't match!\n");
continue;
} /* end if */
- if (HDstrcmp(wdata[i], rdata[i]) != 0) {
+ if (strcmp(wdata[i], rdata[i]) != 0) {
TestErrPrintf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n", (int)i, wdata[i],
(int)i, rdata[i]);
continue;
@@ -533,12 +533,12 @@ test_compact_vlstring(void)
/* Compare data read in */
for (i = 0; i < SPACE1_DIM1; i++) {
- if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
+ if (strlen(wdata[i]) != strlen(rdata[i])) {
TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", (int)i,
- (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i]));
continue;
} /* end if */
- if (HDstrcmp(wdata[i], rdata[i]) != 0) {
+ if (strcmp(wdata[i], rdata[i]) != 0) {
TestErrPrintf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n", (int)i, wdata[i],
(int)i, rdata[i]);
continue;
@@ -611,7 +611,7 @@ test_write_vl_string_attribute(void)
ret = H5Aread(att, type, &string_att_check);
CHECK(ret, FAIL, "H5Aread");
- if (HDstrcmp(string_att_check, string_att) != 0)
+ if (strcmp(string_att_check, string_att) != 0)
TestErrPrintf("VL string attributes don't match!, string_att=%s, string_att_check=%s\n", string_att,
string_att_check);
@@ -634,7 +634,7 @@ test_write_vl_string_attribute(void)
ret = H5Aread(att, type, &string_att_check);
CHECK(ret, FAIL, "H5Aread");
- if (HDstrcmp(string_att_check, string_att_write) != 0)
+ if (strcmp(string_att_check, string_att_write) != 0)
TestErrPrintf("VL string attributes don't match!, string_att_write=%s, string_att_check=%s\n",
string_att_write, string_att_check);
@@ -695,7 +695,7 @@ test_read_vl_string_attribute(void)
ret = H5Aread(att, type, &string_att_check);
CHECK(ret, FAIL, "H5Aread");
- if (HDstrcmp(string_att_check, string_att) != 0)
+ if (strcmp(string_att_check, string_att) != 0)
TestErrPrintf("VL string attributes don't match!, string_att=%s, string_att_check=%s\n", string_att,
string_att_check);
@@ -713,7 +713,7 @@ test_read_vl_string_attribute(void)
ret = H5Aread(att, type, &string_att_check);
CHECK(ret, FAIL, "H5Aread");
- if (HDstrcmp(string_att_check, string_att_write) != 0)
+ if (strcmp(string_att_check, string_att_write) != 0)
TestErrPrintf("VL string attributes don't match!, string_att_write=%s, string_att_check=%s\n",
string_att_write, string_att_check);
@@ -772,7 +772,7 @@ read_scalar_dset(hid_t file, hid_t type, hid_t space, char *name, char *data)
ret = H5Dclose(dset);
CHECK(ret, FAIL, "H5Dclose");
- if (HDstrcmp(data, data_read) != 0)
+ if (strcmp(data, data_read) != 0)
TestErrPrintf("Expected %s for dataset %s but read %s\n", data, name, data_read);
ret = H5Treclaim(type, space, H5P_DEFAULT, &data_read);
@@ -816,33 +816,33 @@ test_vl_rewrite(void)
/* Create in file 1 */
for (i = 0; i < REWRITE_NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "/set_%d", i);
+ snprintf(name, sizeof(name), "/set_%d", i);
write_scalar_dset(file1, type, space, name, name);
}
/* Effectively copy data from file 1 to 2 */
for (i = 0; i < REWRITE_NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "/set_%d", i);
+ snprintf(name, sizeof(name), "/set_%d", i);
read_scalar_dset(file1, type, space, name, name);
write_scalar_dset(file2, type, space, name, name);
}
/* Read back from file 2 */
for (i = 0; i < REWRITE_NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "/set_%d", i);
+ snprintf(name, sizeof(name), "/set_%d", i);
read_scalar_dset(file2, type, space, name, name);
} /* end for */
/* Remove from file 2. */
for (i = 0; i < REWRITE_NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "/set_%d", i);
+ snprintf(name, sizeof(name), "/set_%d", i);
ret = H5Ldelete(file2, name, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Ldelete");
} /* end for */
/* Effectively copy from file 1 to file 2 */
for (i = 0; i < REWRITE_NDATASETS; i++) {
- HDsnprintf(name, sizeof(name), "/set_%d", i);
+ snprintf(name, sizeof(name), "/set_%d", i);
read_scalar_dset(file1, type, space, name, name);
write_scalar_dset(file2, type, space, name, name);
} /* end for */
diff --git a/test/tvltypes.c b/test/tvltypes.c
index 9e3c7a7..4c88130 100644
--- a/test/tvltypes.c
+++ b/test/tvltypes.c
@@ -1241,9 +1241,9 @@ test_vltypes_compound_vlstr(void)
wdata[i].v.p = (s2 *)malloc((i + L3_INCM) * sizeof(s2));
wdata[i].v.len = i + L3_INCM;
for (t1 = (s2 *)((wdata[i].v).p), j = 0; j < (i + L3_INCM); j++, t1++) {
- HDstrcat(str, "m");
- t1->string = (char *)malloc(HDstrlen(str) * sizeof(char) + 1);
- HDstrcpy(t1->string, str);
+ strcat(str, "m");
+ t1->string = (char *)malloc(strlen(str) * sizeof(char) + 1);
+ strcpy(t1->string, str);
/*t1->color = red;*/
t1->color = blue;
}
@@ -1384,7 +1384,7 @@ test_vltypes_compound_vlstr(void)
for (t1 = (s2 *)(wdata[i].v.p), t2 = (s2 *)(rdata[i].v.p), j = 0; j < rdata[i].v.len;
j++, t1++, t2++) {
- if (HDstrcmp(t1->string, t2->string) != 0) {
+ if (strcmp(t1->string, t2->string) != 0) {
TestErrPrintf("VL data values don't match!, t1->string=%s, t2->string=%s\n", t1->string,
t2->string);
continue;
@@ -1406,14 +1406,14 @@ test_vltypes_compound_vlstr(void)
CHECK(ret, FAIL, "H5Treclaim");
/* Use this part for new data */
- HDstrcpy(str, "bbbbbbbb\0");
+ strcpy(str, "bbbbbbbb\0");
for (i = 0; i < SPACE1_DIM1; i++) {
wdata2[i].v.p = (s2 *)malloc((i + 1) * sizeof(s2));
wdata2[i].v.len = i + 1;
for (t1 = (s2 *)(wdata2[i].v).p, j = 0; j < i + 1; j++, t1++) {
- HDstrcat(str, "pp");
- t1->string = (char *)malloc(HDstrlen(str) * sizeof(char) + 1);
- HDstrcpy(t1->string, str);
+ strcat(str, "pp");
+ t1->string = (char *)malloc(strlen(str) * sizeof(char) + 1);
+ strcpy(t1->string, str);
t1->color = green;
}
} /* end for */
@@ -1445,7 +1445,7 @@ test_vltypes_compound_vlstr(void)
for (t1 = (s2 *)(wdata2[i].v.p), t2 = (s2 *)(rdata2[i].v.p), j = 0; j < rdata2[i].v.len;
j++, t1++, t2++) {
- if (HDstrcmp(t1->string, t2->string) != 0) {
+ if (strcmp(t1->string, t2->string) != 0) {
TestErrPrintf("VL data values don't match!, t1->string=%s, t2->string=%s\n", t1->string,
t2->string);
continue;
@@ -2654,16 +2654,16 @@ test_vltypes_fill_value(void)
/* Layout specific actions */
switch (layout) {
case H5D_COMPACT:
- HDstrcpy(dset_name1, "dataset1-compact");
- HDstrcpy(dset_name2, "dataset2-compact");
+ strcpy(dset_name1, "dataset1-compact");
+ strcpy(dset_name2, "dataset2-compact");
dset_dspace_id = small_dspace_id;
ret = H5Pset_layout(tmp_dcpl_id, H5D_COMPACT);
CHECK(ret, FAIL, "H5Pset_layout");
break;
case H5D_CONTIGUOUS:
- HDstrcpy(dset_name1, "dataset1-contig");
- HDstrcpy(dset_name2, "dataset2-contig");
+ strcpy(dset_name1, "dataset1-contig");
+ strcpy(dset_name2, "dataset2-contig");
dset_dspace_id = large_dspace_id;
break;
@@ -2675,15 +2675,15 @@ test_vltypes_fill_value(void)
CHECK(ret, FAIL, "H5Pset_chunk");
#ifdef H5_HAVE_FILTER_DEFLATE
if (test_loop == 1) {
- HDstrcpy(dset_name1, "dataset1-chunked-compressed");
- HDstrcpy(dset_name2, "dataset2-chunked-compressed");
+ strcpy(dset_name1, "dataset1-chunked-compressed");
+ strcpy(dset_name2, "dataset2-chunked-compressed");
ret = H5Pset_deflate(tmp_dcpl_id, 3);
CHECK(ret, FAIL, "H5Pset_deflate");
} /* end if */
else {
#endif /* H5_HAVE_FILTER_DEFLATE */
- HDstrcpy(dset_name1, "dataset1-chunked");
- HDstrcpy(dset_name2, "dataset2-chunked");
+ strcpy(dset_name1, "dataset1-chunked");
+ strcpy(dset_name2, "dataset2-chunked");
#ifdef H5_HAVE_FILTER_DEFLATE
} /* end else */
#endif /* H5_HAVE_FILTER_DEFLATE */
@@ -2764,16 +2764,16 @@ test_vltypes_fill_value(void)
/* Layout specific actions */
switch (layout) {
case H5D_COMPACT:
- HDstrcpy(dset_name1, "dataset1-compact");
- HDstrcpy(dset_name2, "dataset2-compact");
+ strcpy(dset_name1, "dataset1-compact");
+ strcpy(dset_name2, "dataset2-compact");
dset_dspace_id = small_dspace_id;
dset_select_dspace_id = small_select_dspace_id;
dset_elmts = SPACE4_DIM_SMALL;
break;
case H5D_CONTIGUOUS:
- HDstrcpy(dset_name1, "dataset1-contig");
- HDstrcpy(dset_name2, "dataset2-contig");
+ strcpy(dset_name1, "dataset1-contig");
+ strcpy(dset_name2, "dataset2-contig");
dset_dspace_id = large_dspace_id;
dset_select_dspace_id = large_select_dspace_id;
dset_elmts = SPACE4_DIM_LARGE;
@@ -2782,13 +2782,13 @@ test_vltypes_fill_value(void)
case H5D_CHUNKED:
#ifdef H5_HAVE_FILTER_DEFLATE
if (test_loop == 1) {
- HDstrcpy(dset_name1, "dataset1-chunked-compressed");
- HDstrcpy(dset_name2, "dataset2-chunked-compressed");
+ strcpy(dset_name1, "dataset1-chunked-compressed");
+ strcpy(dset_name2, "dataset2-chunked-compressed");
} /* end if */
else {
#endif /* H5_HAVE_FILTER_DEFLATE */
- HDstrcpy(dset_name1, "dataset1-chunked");
- HDstrcpy(dset_name2, "dataset2-chunked");
+ strcpy(dset_name1, "dataset1-chunked");
+ strcpy(dset_name2, "dataset2-chunked");
#ifdef H5_HAVE_FILTER_DEFLATE
} /* end else */
#endif /* H5_HAVE_FILTER_DEFLATE */
@@ -2818,10 +2818,10 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 || HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 || strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -2841,11 +2841,10 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if ((i % 2) == select_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
- HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 || strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -2876,10 +2875,10 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 || HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 || strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -2899,11 +2898,10 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if ((i % 2) == select_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
- HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 || strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -2951,16 +2949,16 @@ test_vltypes_fill_value(void)
/* Layout specific actions */
switch (layout) {
case H5D_COMPACT:
- HDstrcpy(dset_name1, "dataset1-compact");
- HDstrcpy(dset_name2, "dataset2-compact");
+ strcpy(dset_name1, "dataset1-compact");
+ strcpy(dset_name2, "dataset2-compact");
dset_dspace_id = small_dspace_id;
dset_select_dspace_id = small_select_dspace_id;
dset_elmts = SPACE4_DIM_SMALL;
break;
case H5D_CONTIGUOUS:
- HDstrcpy(dset_name1, "dataset1-contig");
- HDstrcpy(dset_name2, "dataset2-contig");
+ strcpy(dset_name1, "dataset1-contig");
+ strcpy(dset_name2, "dataset2-contig");
dset_dspace_id = large_dspace_id;
dset_select_dspace_id = large_select_dspace_id;
dset_elmts = SPACE4_DIM_LARGE;
@@ -2969,13 +2967,13 @@ test_vltypes_fill_value(void)
case H5D_CHUNKED:
#ifdef H5_HAVE_FILTER_DEFLATE
if (test_loop == 1) {
- HDstrcpy(dset_name1, "dataset1-chunked-compressed");
- HDstrcpy(dset_name2, "dataset2-chunked-compressed");
+ strcpy(dset_name1, "dataset1-chunked-compressed");
+ strcpy(dset_name2, "dataset2-chunked-compressed");
} /* end if */
else {
#endif /* H5_HAVE_FILTER_DEFLATE */
- HDstrcpy(dset_name1, "dataset1-chunked");
- HDstrcpy(dset_name2, "dataset2-chunked");
+ strcpy(dset_name1, "dataset1-chunked");
+ strcpy(dset_name2, "dataset2-chunked");
#ifdef H5_HAVE_FILTER_DEFLATE
} /* end else */
#endif /* H5_HAVE_FILTER_DEFLATE */
@@ -3018,22 +3016,21 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if (i == single_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
- HDstrcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
- HDstrcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
- HDstrcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
- HDstrcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
- HDstrcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
+ if (strcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
+ strcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
+ strcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
+ strcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
+ strcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
+ strcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
} /* end if */
else {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
- HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 || strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -3054,23 +3051,23 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if (i == single_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
- HDstrcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
- HDstrcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
- HDstrcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
- HDstrcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
- HDstrcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
+ if (strcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
+ strcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
+ strcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
+ strcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
+ strcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
+ strcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
} /* end if */
else {
if ((i % 2) == select_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
- HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 ||
+ strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -3106,22 +3103,21 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if (i == single_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
- HDstrcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
- HDstrcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
- HDstrcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
- HDstrcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
- HDstrcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
+ if (strcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
+ strcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
+ strcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
+ strcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
+ strcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
+ strcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
} /* end if */
else {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
- HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 || strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -3142,23 +3138,23 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if (i == single_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
- HDstrcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
- HDstrcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
- HDstrcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
- HDstrcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
- HDstrcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
+ if (strcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
+ strcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
+ strcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
+ strcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
+ strcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
+ strcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
} /* end if */
else {
if ((i % 2) == select_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
- HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
- HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
- HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
+ if (strcmp(rbuf[i].str_id, "foobar") != 0 || strcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || strcmp(rbuf[i].str_orig, "\0") != 0 ||
+ strcmp(rbuf[i].str_stat, "dead") != 0 ||
+ strcmp(rbuf[i].str_form, "liquid") != 0 ||
+ strcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
diff --git a/test/twriteorder.c b/test/twriteorder.c
index b5ae2ea..9bfe87b 100644
--- a/test/twriteorder.c
+++ b/test/twriteorder.c
@@ -379,7 +379,7 @@ main(int argc, char *argv[])
if (launch_g == UC_READWRITE) {
/* fork process */
if ((childpid = fork()) < 0) {
- HDperror("fork");
+ perror("fork");
Hgoto_error(1);
}
}
@@ -417,7 +417,7 @@ main(int argc, char *argv[])
/* ================================================ */
if (launch_g == UC_READWRITE) {
if ((tmppid = waitpid(childpid, &child_status, child_wait_option)) < 0) {
- HDperror("waitpid");
+ perror("waitpid");
Hgoto_error(1);
}
if (WIFEXITED(child_status)) {
diff --git a/test/unlink.c b/test/unlink.c
index 4c4b9cf..ae8da98 100644
--- a/test/unlink.c
+++ b/test/unlink.c
@@ -165,12 +165,12 @@ test_many(hid_t file)
/* Create a bunch of names and unlink them in order */
TESTING("forward unlink");
for (i = 0; i < how_many; i++) {
- HDsnprintf(name, sizeof(name), "obj_%05d", i);
+ snprintf(name, sizeof(name), "obj_%05d", i);
if (H5Lcreate_hard(work, "/test_many_foo", H5L_SAME_LOC, name, H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
for (i = 0; i < how_many; i++) {
- HDsnprintf(name, sizeof(name), "obj_%05d", i);
+ snprintf(name, sizeof(name), "obj_%05d", i);
if (H5Ldelete(work, name, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -179,12 +179,12 @@ test_many(hid_t file)
/* Create a bunch of names and unlink them in reverse order */
TESTING("backward unlink");
for (i = 0; i < how_many; i++) {
- HDsnprintf(name, sizeof(name), "obj_%05d", i);
+ snprintf(name, sizeof(name), "obj_%05d", i);
if (H5Lcreate_hard(work, "/test_many_foo", H5L_SAME_LOC, name, H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
for (i = (how_many - 1); i >= 0; --i) {
- HDsnprintf(name, sizeof(name), "obj_%05d", i);
+ snprintf(name, sizeof(name), "obj_%05d", i);
if (H5Ldelete(work, name, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -193,15 +193,15 @@ test_many(hid_t file)
/* Create a bunch of names and unlink them from both directions */
TESTING("inward unlink");
for (i = 0; i < how_many; i++) {
- HDsnprintf(name, sizeof(name), "obj_%05d", i);
+ snprintf(name, sizeof(name), "obj_%05d", i);
if (H5Lcreate_hard(work, "/test_many_foo", H5L_SAME_LOC, name, H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
for (i = 0; i < how_many; i++) {
if (i % 2)
- HDsnprintf(name, sizeof(name), "obj_%05d", how_many - (1 + i / 2));
+ snprintf(name, sizeof(name), "obj_%05d", how_many - (1 + i / 2));
else
- HDsnprintf(name, sizeof(name), "obj_%05d", i / 2);
+ snprintf(name, sizeof(name), "obj_%05d", i / 2);
if (H5Ldelete(work, name, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -210,15 +210,15 @@ test_many(hid_t file)
/* Create a bunch of names and unlink them from the midle */
TESTING("outward unlink");
for (i = 0; i < how_many; i++) {
- HDsnprintf(name, sizeof(name), "obj_%05d", i);
+ snprintf(name, sizeof(name), "obj_%05d", i);
if (H5Lcreate_hard(work, "/test_many_foo", H5L_SAME_LOC, name, H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
for (i = (how_many - 1); i >= 0; --i) {
if (i % 2)
- HDsnprintf(name, sizeof(name), "obj_%05d", how_many - (1 + i / 2));
+ snprintf(name, sizeof(name), "obj_%05d", how_many - (1 + i / 2));
else
- HDsnprintf(name, sizeof(name), "obj_%05d", i / 2);
+ snprintf(name, sizeof(name), "obj_%05d", i / 2);
if (H5Ldelete(work, name, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -485,7 +485,7 @@ check_new_move(hid_t fapl)
/* Check soft links */
if (H5Lget_val(file, "group2/soft", linkval, sizeof(linkval), H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
- if (HDstrcmp(linkval, "/group1/group_move") != 0)
+ if (strcmp(linkval, "/group1/group_move") != 0)
FAIL_PUTS_ERROR(" Soft link test failed. Wrong link value");
/* Cleanup */
@@ -545,7 +545,7 @@ test_filespace(hid_t fapl)
size_t rdcc_nbytes;
double rdcc_w0;
- HDputs("Testing file space gets reused:");
+ puts("Testing file space gets reused:");
/* Open file */
h5_fixname(FILENAME[4], fapl, filename, sizeof filename);
@@ -902,7 +902,7 @@ test_filespace(hid_t fapl)
/* Alternate adding attributes to each one */
for (u = 0; u < FILESPACE_NATTR; u++) {
/* Set the name of the attribute to create */
- HDsnprintf(objname, sizeof(objname), "%s %u", ATTRNAME, u);
+ snprintf(objname, sizeof(objname), "%s %u", ATTRNAME, u);
/* Create an attribute on the first dataset */
if ((attr = H5Acreate2(dataset, objname, H5T_NATIVE_INT, attr_space, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -1034,7 +1034,7 @@ test_filespace(hid_t fapl)
/* Create a many groups to remove */
for (u = 0; u < UNLINK_NGROUPS; u++) {
- HDsnprintf(objname, sizeof(objname), "%s %u", GROUPNAME, u);
+ snprintf(objname, sizeof(objname), "%s %u", GROUPNAME, u);
if ((group = H5Gcreate2(file, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
if (H5Gclose(group) < 0)
@@ -1044,7 +1044,7 @@ test_filespace(hid_t fapl)
/* Remove the all the groups */
/* (Remove them in reverse order just to make file size calculation easier -QAK) */
for (u = UNLINK_NGROUPS; u > 0; u--) {
- HDsnprintf(objname, sizeof(objname), "%s %u", GROUPNAME, (u - 1));
+ snprintf(objname, sizeof(objname), "%s %u", GROUPNAME, (u - 1));
if (H5Ldelete(file, objname, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -1112,21 +1112,21 @@ test_filespace(hid_t fapl)
/* Create a complex group hierarchy to remove */
for (u = 0; u < FILESPACE_TOP_GROUPS; u++) {
/* Create group */
- HDsnprintf(objname, sizeof(objname), "%s %u", GROUPNAME, u);
+ snprintf(objname, sizeof(objname), "%s %u", GROUPNAME, u);
if ((group = H5Gcreate2(file, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
/* Create nested groups inside top groups */
for (v = 0; v < FILESPACE_NESTED_GROUPS; v++) {
/* Create group */
- HDsnprintf(objname, sizeof(objname), "%s %u", GROUP2NAME, v);
+ snprintf(objname, sizeof(objname), "%s %u", GROUP2NAME, v);
if ((group2 = H5Gcreate2(group, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
/* Create datasets inside nested groups */
for (w = 0; w < FILESPACE_NDATASETS; w++) {
/* Create & close a dataset */
- HDsnprintf(objname, sizeof(objname), "%s %u", DATASETNAME, w);
+ snprintf(objname, sizeof(objname), "%s %u", DATASETNAME, w);
if ((dataset = H5Dcreate2(group2, objname, H5T_NATIVE_INT, space, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
@@ -1148,21 +1148,21 @@ test_filespace(hid_t fapl)
/* (Remove them in reverse order just to make file size calculation easier -QAK) */
for (u = FILESPACE_TOP_GROUPS; u > 0; u--) {
/* Open group */
- HDsnprintf(objname, sizeof(objname), "%s %u", GROUPNAME, (u - 1));
+ snprintf(objname, sizeof(objname), "%s %u", GROUPNAME, (u - 1));
if ((group = H5Gopen2(file, objname, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
/* Open nested groups inside top groups */
for (v = 0; v < FILESPACE_NESTED_GROUPS; v++) {
/* Create group */
- HDsnprintf(objname, sizeof(objname), "%s %u", GROUP2NAME, v);
+ snprintf(objname, sizeof(objname), "%s %u", GROUP2NAME, v);
if ((group2 = H5Gopen2(group, objname, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
/* Remove datasets inside nested groups */
for (w = 0; w < FILESPACE_NDATASETS; w++) {
/* Remove dataset */
- HDsnprintf(objname, sizeof(objname), "%s %u", DATASETNAME, w);
+ snprintf(objname, sizeof(objname), "%s %u", DATASETNAME, w);
if (H5Ldelete(group2, objname, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -1172,7 +1172,7 @@ test_filespace(hid_t fapl)
FAIL_STACK_ERROR;
/* Remove nested group */
- HDsnprintf(objname, sizeof(objname), "%s %u", GROUP2NAME, v);
+ snprintf(objname, sizeof(objname), "%s %u", GROUP2NAME, v);
if (H5Ldelete(group, objname, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -1182,7 +1182,7 @@ test_filespace(hid_t fapl)
FAIL_STACK_ERROR;
/* Remove top group */
- HDsnprintf(objname, sizeof(objname), "%s %u", GROUPNAME, (u - 1));
+ snprintf(objname, sizeof(objname), "%s %u", GROUPNAME, (u - 1));
if (H5Ldelete(file, objname, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -1461,7 +1461,7 @@ test_create_unlink(const char *msg, hid_t fapl)
/* Create a many groups to remove */
for (u = 0; u < UNLINK_NGROUPS; u++) {
- HDsnprintf(groupname, sizeof(groupname), "%s %u", GROUPNAME, u);
+ snprintf(groupname, sizeof(groupname), "%s %u", GROUPNAME, u);
if ((group = H5Gcreate2(file, groupname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
printf("group %s creation failed\n", groupname);
@@ -1476,7 +1476,7 @@ test_create_unlink(const char *msg, hid_t fapl)
/* Remove the all the groups */
for (u = 0; u < UNLINK_NGROUPS; u++) {
- HDsnprintf(groupname, sizeof(groupname), "%s %u", GROUPNAME, u);
+ snprintf(groupname, sizeof(groupname), "%s %u", GROUPNAME, u);
if (H5Ldelete(file, groupname, H5P_DEFAULT) < 0) {
H5_FAILED();
printf("Unlinking group %s failed\n", groupname);
@@ -1665,7 +1665,7 @@ delete_node(hid_t pid, hid_t id)
return (-1);
/* If this object is the right-most child, try opening the previous object */
- if (HDstrcmp(name, "/Zone81") == 0) {
+ if (strcmp(name, "/Zone81") == 0) {
hid_t gid;
if ((gid = H5Gopen2(pid, "/Zone80", H5P_DEFAULT)) < 0)
@@ -1709,7 +1709,7 @@ test_unlink_rightleaf(hid_t fid)
/* Create all the groups */
for (n = 0; n < ngroups; n++) {
- HDsnprintf(name, sizeof(name), "Zone%d", n + 1);
+ snprintf(name, sizeof(name), "Zone%d", n + 1);
if ((gids[n] = H5Gcreate2(rootid, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
} /* end for */
@@ -1718,7 +1718,7 @@ test_unlink_rightleaf(hid_t fid)
for (n = 0; n < ngroups; n++) {
if (delete_node(rootid, gids[n]) < 0)
TEST_ERROR;
- HDsnprintf(name, sizeof(name), "Zone%d", n + 1);
+ snprintf(name, sizeof(name), "Zone%d", n + 1);
if ((gids[n] = H5Gcreate2(rootid, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
} /* end for */
@@ -1793,7 +1793,7 @@ test_unlink_rightnode(hid_t fid)
/* Create all the groups */
for (n = 0; n < ngroups; n++) {
- HDsnprintf(name, sizeof(name), "ZoneB%d", n + 1);
+ snprintf(name, sizeof(name), "ZoneB%d", n + 1);
if ((gids[n] = H5Gcreate2(rootid, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -1880,7 +1880,7 @@ test_unlink_middlenode(hid_t fid)
/* Create all the groups */
for (n = 0; n < ngroups; n++) {
- HDsnprintf(name, sizeof(name), "ZoneC%d", n + 1);
+ snprintf(name, sizeof(name), "ZoneC%d", n + 1);
if ((gids[n] = H5Gcreate2(rootid, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
} /* end for */
@@ -2587,7 +2587,7 @@ test_full_group_compact(hid_t fapl)
/* Create several objects to link to */
for (u = 0; u < FULL_GROUP_NUM_KEEP; u++) {
- HDsnprintf(objname, sizeof(objname), "keep %u\n", u);
+ snprintf(objname, sizeof(objname), "keep %u\n", u);
if ((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
if (H5Gclose(gid2) < 0)
@@ -2624,15 +2624,15 @@ test_full_group_compact(hid_t fapl)
/* Create hard links to objects in group to keep */
for (u = 0; u < FULL_GROUP_NUM_KEEP; u++) {
- HDsnprintf(objname, sizeof(objname), "/keep/keep %u\n", u);
- HDsnprintf(objname2, sizeof(objname2), "keep %u\n", u);
+ snprintf(objname, sizeof(objname), "/keep/keep %u\n", u);
+ snprintf(objname2, sizeof(objname2), "keep %u\n", u);
if (H5Lcreate_hard(file_id, objname, gid, objname2, H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
/* Create several objects to delete */
for (u = 0; u < FULL_GROUP_NUM_DELETE_COMPACT; u++) {
- HDsnprintf(objname, sizeof(objname), "delete %u\n", u);
+ snprintf(objname, sizeof(objname), "delete %u\n", u);
if ((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
if (H5Gclose(gid2) < 0)
@@ -2653,7 +2653,7 @@ test_full_group_compact(hid_t fapl)
/* Check reference count on objects to keep */
for (u = 0; u < FULL_GROUP_NUM_KEEP; u++) {
- HDsnprintf(objname, sizeof(objname), "/keep/keep %u\n", u);
+ snprintf(objname, sizeof(objname), "/keep/keep %u\n", u);
if (H5Oget_info_by_name3(file_id, objname, &oi, H5O_INFO_BASIC, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
if (oi.rc != 2)
@@ -2674,7 +2674,7 @@ test_full_group_compact(hid_t fapl)
/* Check reference count on objects to keep */
for (u = 0; u < FULL_GROUP_NUM_KEEP; u++) {
- HDsnprintf(objname, sizeof(objname), "/keep/keep %u\n", u);
+ snprintf(objname, sizeof(objname), "/keep/keep %u\n", u);
if (H5Oget_info_by_name3(file_id, objname, &oi, H5O_INFO_BASIC, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
if (oi.rc != 1)
@@ -2746,7 +2746,7 @@ test_full_group_dense(hid_t fapl)
/* Create several objects to link to */
for (u = 0; u < FULL_GROUP_NUM_KEEP; u++) {
- HDsnprintf(objname, sizeof(objname), "keep %u\n", u);
+ snprintf(objname, sizeof(objname), "keep %u\n", u);
if ((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
if (H5Gclose(gid2) < 0)
@@ -2798,15 +2798,15 @@ test_full_group_dense(hid_t fapl)
/* Create hard links to objects in group to keep */
for (u = 0; u < FULL_GROUP_NUM_KEEP; u++) {
- HDsnprintf(objname, sizeof(objname), "/keep/keep %u\n", u);
- HDsnprintf(objname2, sizeof(objname2), "keep %u\n", u);
+ snprintf(objname, sizeof(objname), "/keep/keep %u\n", u);
+ snprintf(objname2, sizeof(objname2), "keep %u\n", u);
if (H5Lcreate_hard(file_id, objname, gid, objname2, H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
} /* end for */
/* Create several objects to delete */
for (u = 0; u < FULL_GROUP_NUM_DELETE_DENSE; u++) {
- HDsnprintf(objname, sizeof(objname), "delete %u\n", u);
+ snprintf(objname, sizeof(objname), "delete %u\n", u);
if ((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
if (H5Gclose(gid2) < 0)
@@ -2827,7 +2827,7 @@ test_full_group_dense(hid_t fapl)
/* Check reference count on objects to keep */
for (u = 0; u < FULL_GROUP_NUM_KEEP; u++) {
- HDsnprintf(objname, sizeof(objname), "/keep/keep %u\n", u);
+ snprintf(objname, sizeof(objname), "/keep/keep %u\n", u);
if (H5Oget_info_by_name3(file_id, objname, &oi, H5O_INFO_BASIC, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
if (oi.rc != 2)
@@ -2848,7 +2848,7 @@ test_full_group_dense(hid_t fapl)
/* Check reference count on objects to keep */
for (u = 0; u < FULL_GROUP_NUM_KEEP; u++) {
- HDsnprintf(objname, sizeof(objname), "/keep/keep %u\n", u);
+ snprintf(objname, sizeof(objname), "/keep/keep %u\n", u);
if (H5Oget_info_by_name3(file_id, objname, &oi, H5O_INFO_BASIC, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR;
if (oi.rc != 1)
@@ -2926,11 +2926,11 @@ main(void)
/* Set the FAPL for the type of format */
if (new_format) {
- HDputs("\nTesting with new group format:");
+ puts("\nTesting with new group format:");
my_fapl = fapl2;
} /* end if */
else {
- HDputs("Testing with old group format:");
+ puts("Testing with old group format:");
my_fapl = fapl;
} /* end else */
@@ -3017,7 +3017,7 @@ main(void)
exit(EXIT_FAILURE);
}
- HDputs("All unlink tests passed.");
+ puts("All unlink tests passed.");
h5_cleanup(FILENAME, fapl);
diff --git a/test/unregister.c b/test/unregister.c
index 10e194c..e1576c0 100644
--- a/test/unregister.c
+++ b/test/unregister.c
@@ -133,7 +133,7 @@ test_unregister_filters(hid_t fapl_id)
/* Create multiple groups under the main group */
for (i = 0; i < GROUP_ITERATION; i++) {
- HDsnprintf(group_name, sizeof(group_name), "group_%d", i);
+ snprintf(group_name, sizeof(group_name), "group_%d", i);
if ((gid_loop = H5Gcreate2(gid, group_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
if (H5Gclose(gid_loop) < 0)
diff --git a/test/use_append_chunk.c b/test/use_append_chunk.c
index b5fb938..3b3d69c 100644
--- a/test/use_append_chunk.c
+++ b/test/use_append_chunk.c
@@ -168,7 +168,7 @@ main(int argc, char *argv[])
/* ============ */
if (UC_opts.launch == UC_READWRITE) {
if ((childpid = fork()) < 0) {
- HDperror("fork");
+ perror("fork");
Hgoto_error(1);
}
}
@@ -241,7 +241,7 @@ main(int argc, char *argv[])
/* ================================================ */
if (UC_opts.launch == UC_READWRITE) {
if ((tmppid = waitpid(childpid, &child_status, child_wait_option)) < 0) {
- HDperror("waitpid");
+ perror("waitpid");
Hgoto_error(1);
}
diff --git a/test/use_append_chunk_mirror.c b/test/use_append_chunk_mirror.c
index 9fc5622..e9e2726 100644
--- a/test/use_append_chunk_mirror.c
+++ b/test/use_append_chunk_mirror.c
@@ -169,7 +169,7 @@ main(int argc, char *argv[])
mirr_fa.magic = H5FD_MIRROR_FAPL_MAGIC;
mirr_fa.version = H5FD_MIRROR_CURR_FAPL_T_VERSION;
mirr_fa.handshake_port = SERVER_PORT;
- HDstrncpy(mirr_fa.remote_ip, SERVER_IP, H5FD_MIRROR_MAX_IP_LEN);
+ strncpy(mirr_fa.remote_ip, SERVER_IP, H5FD_MIRROR_MAX_IP_LEN);
if (NULL == (split_fa = calloc(1, sizeof(H5FD_splitter_vfd_config_t)))) {
fprintf(stderr, "can't allocate memory for splitter config\n");
@@ -182,7 +182,7 @@ main(int argc, char *argv[])
split_fa->version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION;
split_fa->log_file_path[0] = '\0'; /* none */
split_fa->ignore_wo_errs = false;
- HDstrncpy(split_fa->wo_path, MIRROR_FILE_NAME, H5FD_SPLITTER_PATH_MAX);
+ strncpy(split_fa->wo_path, MIRROR_FILE_NAME, H5FD_SPLITTER_PATH_MAX);
/* Determine the need to send/wait message file*/
if (UC_opts.launch == UC_READWRITE) {
@@ -259,7 +259,7 @@ main(int argc, char *argv[])
/* ============ */
if (UC_opts.launch == UC_READWRITE) {
if ((childpid = fork()) < 0) {
- HDperror("fork");
+ perror("fork");
Hgoto_error(1);
}
}
@@ -354,7 +354,7 @@ main(int argc, char *argv[])
/* ================================================ */
if (UC_opts.launch == UC_READWRITE) {
if ((tmppid = waitpid(childpid, &child_status, child_wait_option)) < 0) {
- HDperror("waitpid");
+ perror("waitpid");
Hgoto_error(1);
}
diff --git a/test/use_append_mchunks.c b/test/use_append_mchunks.c
index 1c5bf41..ab6a5e5 100644
--- a/test/use_append_mchunks.c
+++ b/test/use_append_mchunks.c
@@ -162,7 +162,7 @@ main(int argc, char *argv[])
/* ============ */
if (UC_opts.launch == UC_READWRITE) {
if ((childpid = fork()) < 0) {
- HDperror("fork");
+ perror("fork");
Hgoto_error(1);
}
}
@@ -236,7 +236,7 @@ main(int argc, char *argv[])
/* ================================================ */
if (UC_opts.launch == UC_READWRITE) {
if ((tmppid = waitpid(childpid, &child_status, child_wait_option)) < 0) {
- HDperror("waitpid");
+ perror("waitpid");
Hgoto_error(1);
}
diff --git a/test/use_common.c b/test/use_common.c
index a58f8db..a782eec 100644
--- a/test/use_common.c
+++ b/test/use_common.c
@@ -69,7 +69,7 @@ parse_option(int argc, char *const argv[], options_t *opts)
exit(EXIT_SUCCESS);
break;
case 'f': /* usecase data file name */
- opts->filename = HDstrdup(optarg);
+ opts->filename = strdup(optarg);
break;
case 'i': /* iterations */
if ((opts->iterations = atoi(optarg)) <= 0) {
@@ -137,12 +137,12 @@ parse_option(int argc, char *const argv[], options_t *opts)
/* set test file name if not given */
if (!opts->filename) {
/* default data file name is <progname>.h5 */
- if ((opts->filename = (char *)malloc(HDstrlen(opts->progname) + 4)) == NULL) {
+ if ((opts->filename = (char *)malloc(strlen(opts->progname) + 4)) == NULL) {
fprintf(stderr, "malloc: failed\n");
Hgoto_error(-1);
}
- HDstrcpy(opts->filename, opts->progname);
- HDstrcat(opts->filename, ".h5");
+ strcpy(opts->filename, opts->progname);
+ strcat(opts->filename, ".h5");
}
done:
diff --git a/test/use_disable_mdc_flushes.c b/test/use_disable_mdc_flushes.c
index c2f1bb3..b8b5b7f 100644
--- a/test/use_disable_mdc_flushes.c
+++ b/test/use_disable_mdc_flushes.c
@@ -149,12 +149,12 @@ parse_option(int argc, char *const argv[])
/* set test file name if not given */
if (!filename_g) {
/* default data file name is <progname>.h5 */
- if ((filename_g = (char *)malloc(HDstrlen(progname_g) + 4)) == NULL) {
+ if ((filename_g = (char *)malloc(strlen(progname_g) + 4)) == NULL) {
fprintf(stderr, "malloc: failed\n");
Hgoto_error(-1);
}
- HDstrcpy(filename_g, progname_g);
- HDstrcat(filename_g, ".h5");
+ strcpy(filename_g, progname_g);
+ strcat(filename_g, ".h5");
}
done:
diff --git a/test/vds.c b/test/vds.c
index 354600e..167fbff 100644
--- a/test/vds.c
+++ b/test/vds.c
@@ -53,7 +53,7 @@ static const char *FILENAME[] = {"vds_virt_0", "vds_virt_1", "vds_src_0", "vds_
#define PRINT_CONFIG(...) \
do { \
printf("Config: " __VA_ARGS__); \
- HDputs(""); \
+ puts(""); \
} while (0)
#else /* VDS_TEST_VERBOSE */
@@ -65,7 +65,7 @@ char vds_test_str_g[128] = "";
/* Replacement for TESTING_2 for non-verbose-output */
#define TESTING_2_SUPPRESSED(WHAT) \
do { \
- HDsnprintf(vds_test_str_g, sizeof(vds_test_str_g), WHAT); \
+ snprintf(vds_test_str_g, sizeof(vds_test_str_g), WHAT); \
} while (0)
/* Suppress output from PASSED() */
@@ -84,7 +84,7 @@ char vds_test_str_g[128] = "";
/* Replacement for printf for printing configuration for non-verbose output */
#define PRINT_CONFIG(...) \
do { \
- HDsnprintf(vds_config_str_g, sizeof(vds_config_str_g), __VA_ARGS__); \
+ snprintf(vds_config_str_g, sizeof(vds_config_str_g), __VA_ARGS__); \
} while (0)
#endif /* VDS_TEST_VERBOSE */
@@ -309,27 +309,27 @@ vds_check_mapping(hid_t dcpl, size_t i, hid_t vspace, hid_t srcspace, const char
/* Check filename */
if ((str_len = H5Pget_virtual_filename(dcpl, i, NULL, (size_t)0)) < 0)
TEST_ERROR;
- if ((size_t)str_len != HDstrlen(filename))
+ if ((size_t)str_len != strlen(filename))
TEST_ERROR;
assert((size_t)str_len < sizeof(name_out));
if ((str_len = H5Pget_virtual_filename(dcpl, i, name_out, sizeof(name_out))) < 0)
TEST_ERROR;
- if ((size_t)str_len != HDstrlen(filename))
+ if ((size_t)str_len != strlen(filename))
TEST_ERROR;
- if (HDstrncmp(name_out, filename, (size_t)str_len + 1) != 0)
+ if (strncmp(name_out, filename, (size_t)str_len + 1) != 0)
TEST_ERROR;
/* Check dsetname */
if ((str_len = H5Pget_virtual_dsetname(dcpl, i, NULL, (size_t)0)) < 0)
TEST_ERROR;
- if ((size_t)str_len != HDstrlen(dsetname))
+ if ((size_t)str_len != strlen(dsetname))
TEST_ERROR;
assert((size_t)str_len < sizeof(name_out));
if ((str_len = H5Pget_virtual_dsetname(dcpl, i, name_out, sizeof(name_out))) < 0)
TEST_ERROR;
- if ((size_t)str_len != HDstrlen(dsetname))
+ if ((size_t)str_len != strlen(dsetname))
TEST_ERROR;
- if (HDstrncmp(name_out, dsetname, (size_t)str_len + 1) != 0)
+ if (strncmp(name_out, dsetname, (size_t)str_len + 1) != 0)
TEST_ERROR;
return 0;
@@ -1062,9 +1062,9 @@ test_api(test_api_config_t config, hid_t fapl, H5F_libver_t low)
TEST_ERROR;
/* Create file and dataset names */
- (void)HDsnprintf(tmp_filename, sizeof(tmp_filename), "src_file%u", i);
+ (void)snprintf(tmp_filename, sizeof(tmp_filename), "src_file%u", i);
tmp_filename[sizeof(tmp_filename) - 1] = '\0';
- (void)HDsnprintf(tmp_dsetname, sizeof(tmp_dsetname), "src_dset%u", i);
+ (void)snprintf(tmp_dsetname, sizeof(tmp_dsetname), "src_dset%u", i);
tmp_dsetname[sizeof(tmp_dsetname) - 1] = '\0';
/* Add virtual layout mapping */
@@ -1086,11 +1086,11 @@ test_api(test_api_config_t config, hid_t fapl, H5F_libver_t low)
/* Verify virtual layout */
for (i = 0; i < LIST_DOUBLE_SIZE; i++) {
/* Generate source file name */
- (void)HDsnprintf(tmp_filename, sizeof(tmp_filename), "src_file%u", i);
+ (void)snprintf(tmp_filename, sizeof(tmp_filename), "src_file%u", i);
tmp_filename[sizeof(tmp_filename) - 1] = '\0';
/* Generate source dset name */
- (void)HDsnprintf(tmp_dsetname, sizeof(tmp_dsetname), "src_dset%u", i);
+ (void)snprintf(tmp_dsetname, sizeof(tmp_dsetname), "src_dset%u", i);
tmp_dsetname[sizeof(tmp_dsetname) - 1] = '\0';
/* Check that the mapping in the DCPL is correct */
@@ -1247,7 +1247,7 @@ test_vds_prefix_first(unsigned config, hid_t vds_fapl, hid_t src_fapl)
if (H5Pget_virtual_prefix(dapl, buffer, sizeof(buffer)) < 0)
TEST_ERROR_SUPPRESSED;
- if (HDstrcmp(buffer, TMPDIR) != 0)
+ if (strcmp(buffer, TMPDIR) != 0)
FAIL_PUTS_ERROR("vds prefix not set correctly");
/* Create source dataspace */
@@ -12336,8 +12336,8 @@ main(void)
* doesn't support parallel reads and the splitter VFD has external
* link-related bugs.
*/
- if (driver_is_parallel || !HDstrcmp(env_h5_drvr, "splitter")) {
- HDputs(" -- SKIPPED for incompatible VFD --");
+ if (driver_is_parallel || !strcmp(env_h5_drvr, "splitter")) {
+ puts(" -- SKIPPED for incompatible VFD --");
exit(EXIT_SUCCESS);
}
@@ -12376,10 +12376,10 @@ main(void)
/* Display testing info */
low_string = h5_get_version_string(low);
high_string = h5_get_version_string(high);
- HDsnprintf(msg, sizeof(msg),
- "Testing virtual dataset I/O with file version bounds: (%s, %s):", low_string,
- high_string);
- HDputs(msg);
+ snprintf(msg, sizeof(msg),
+ "Testing virtual dataset I/O with file version bounds: (%s, %s):", low_string,
+ high_string);
+ puts(msg);
for (test_api_config = (int)TEST_API_BASIC; test_api_config < (int)TEST_API_NTESTS;
test_api_config++)
@@ -12387,7 +12387,7 @@ main(void)
TESTING_2("Virtual dataset I/O");
#ifdef VDS_TEST_VERBOSE
- HDputs("");
+ puts("");
#else /* VDS_TEST_VERBOSE */
tmp_nerrors = nerrors;
#endif /* VDS_TEST_VERBOSE */
diff --git a/test/vds_env.c b/test/vds_env.c
index fc75f95..bf30697 100644
--- a/test/vds_env.c
+++ b/test/vds_env.c
@@ -111,7 +111,7 @@ test_vds_prefix_second(unsigned config, hid_t fapl)
if (H5Pget_virtual_prefix(dapl, buffer, sizeof(buffer)) < 0)
TEST_ERROR;
- if (HDstrcmp(buffer, "someprefix") != 0)
+ if (strcmp(buffer, "someprefix") != 0)
FAIL_PUTS_ERROR("vds prefix not set correctly");
/* Create source dataspace */
@@ -347,8 +347,8 @@ main(void)
* doesn't support parallel reads and the splitter VFD has external
* link-related bugs.
*/
- if (driver_is_parallel || !HDstrcmp(env_h5_drvr, "splitter")) {
- HDputs(" -- SKIPPED for incompatible VFD --");
+ if (driver_is_parallel || !strcmp(env_h5_drvr, "splitter")) {
+ puts(" -- SKIPPED for incompatible VFD --");
exit(EXIT_SUCCESS);
}
@@ -378,10 +378,9 @@ main(void)
/* Display testing info */
low_string = h5_get_version_string(low);
high_string = h5_get_version_string(high);
- HDsnprintf(msg, sizeof(msg),
- "Testing virtual dataset with file version bounds: (%s, %s):", low_string,
- high_string);
- HDputs(msg);
+ snprintf(msg, sizeof(msg),
+ "Testing virtual dataset with file version bounds: (%s, %s):", low_string, high_string);
+ puts(msg);
for (bit_config = 0; bit_config < TEST_IO_NTESTS; bit_config++) {
printf("Config: %s%s%s\n", bit_config & TEST_IO_CLOSE_SRC ? "closed source dataset, " : "",
diff --git a/test/vfd.c b/test/vfd.c
index a09ce23..ca748c0 100644
--- a/test/vfd.c
+++ b/test/vfd.c
@@ -932,7 +932,7 @@ test_family_opens(char *fname, hid_t fa_pl)
int i;
/* Case 1: reopen file with 1st member file name and default property list */
- HDsnprintf(first_name, sizeof(first_name), fname, 0);
+ snprintf(first_name, sizeof(first_name), fname, 0);
H5E_BEGIN_TRY
{
@@ -964,7 +964,7 @@ test_family_opens(char *fname, hid_t fa_pl)
TEST_ERROR;
/* Case 4: reopen file with wrong name template */
- HDstrcpy(wrong_name, fname);
+ strcpy(wrong_name, fname);
for (i = 0; i < 1024; i++)
if (wrong_name[i] == '5') {
wrong_name[i] = '4';
@@ -1232,19 +1232,19 @@ test_family_compat(void)
h5_fixname(FILENAME[3], fapl, newname, sizeof(newname));
pathname[0] = '\0';
- HDstrcat(pathname, filename);
+ strcat(pathname, filename);
/* The following code makes the copies of the family files in the source directory.
* Since we're going to open the files with write mode, this protects the original
* files.
*/
- HDsnprintf(newname_individual, sizeof(newname_individual), newname, counter);
- HDsnprintf(pathname_individual, sizeof(pathname_individual), pathname, counter);
+ snprintf(newname_individual, sizeof(newname_individual), newname, counter);
+ snprintf(pathname_individual, sizeof(pathname_individual), pathname, counter);
while (h5_make_local_copy(pathname_individual, newname_individual) >= 0) {
counter++;
- HDsnprintf(newname_individual, sizeof(newname_individual), newname, counter);
- HDsnprintf(pathname_individual, sizeof(pathname_individual), pathname, counter);
+ snprintf(newname_individual, sizeof(newname_individual), newname, counter);
+ snprintf(pathname_individual, sizeof(pathname_individual), pathname, counter);
} /* end while */
/* Make sure we can open the file. Use the read and write mode to flush the
@@ -1437,8 +1437,8 @@ test_multi_opens(char *fname)
char sf_name[1024]; /*name string "multi_file-s.h5"*/
/* Case: reopen with the name of super file and default property list */
- HDsnprintf(super_name, sizeof(super_name), "%%s-%c.h5", 's');
- HDsnprintf(sf_name, sizeof(sf_name), super_name, fname);
+ snprintf(super_name, sizeof(super_name), "%%s-%c.h5", 's');
+ snprintf(sf_name, sizeof(sf_name), super_name, fname);
H5E_BEGIN_TRY
{
@@ -1512,19 +1512,19 @@ test_multi(void)
memb_map[H5FD_MEM_BTREE] = H5FD_MEM_BTREE;
memb_map[H5FD_MEM_GHEAP] = H5FD_MEM_GHEAP;
- HDsnprintf(sv[H5FD_MEM_SUPER], 32, "%%s-%c.h5", 's');
+ snprintf(sv[H5FD_MEM_SUPER], 32, "%%s-%c.h5", 's');
memb_name[H5FD_MEM_SUPER] = sv[H5FD_MEM_SUPER];
memb_addr[H5FD_MEM_SUPER] = 0;
- HDsnprintf(sv[H5FD_MEM_BTREE], 32, "%%s-%c.h5", 'b');
+ snprintf(sv[H5FD_MEM_BTREE], 32, "%%s-%c.h5", 'b');
memb_name[H5FD_MEM_BTREE] = sv[H5FD_MEM_BTREE];
memb_addr[H5FD_MEM_BTREE] = HADDR_MAX / 4;
- HDsnprintf(sv[H5FD_MEM_DRAW], 32, "%%s-%c.h5", 'r');
+ snprintf(sv[H5FD_MEM_DRAW], 32, "%%s-%c.h5", 'r');
memb_name[H5FD_MEM_DRAW] = sv[H5FD_MEM_DRAW];
memb_addr[H5FD_MEM_DRAW] = HADDR_MAX / 2;
- HDsnprintf(sv[H5FD_MEM_GHEAP], 32, "%%s-%c.h5", 'g');
+ snprintf(sv[H5FD_MEM_GHEAP], 32, "%%s-%c.h5", 'g');
memb_name[H5FD_MEM_GHEAP] = sv[H5FD_MEM_GHEAP];
memb_addr[H5FD_MEM_GHEAP] = (HADDR_MAX / 4) * 3;
@@ -1641,7 +1641,7 @@ test_multi(void)
if ((atype = H5Tcopy(H5T_C_S1)) < 0)
TEST_ERROR;
- if (H5Tset_size(atype, HDstrlen(meta) + 1) < 0)
+ if (H5Tset_size(atype, strlen(meta) + 1) < 0)
TEST_ERROR;
if (H5Tset_strpad(atype, H5T_STR_NULLTERM) < 0)
@@ -1758,12 +1758,12 @@ test_multi_compat(void)
memb_map[H5FD_MEM_DRAW] = H5FD_MEM_DRAW;
memb_fapl[H5FD_MEM_SUPER] = H5P_DEFAULT;
- HDsnprintf(sv[H5FD_MEM_SUPER], 32, "%%s-%c.h5", 's');
+ snprintf(sv[H5FD_MEM_SUPER], 32, "%%s-%c.h5", 's');
memb_name[H5FD_MEM_SUPER] = sv[H5FD_MEM_SUPER];
memb_addr[H5FD_MEM_SUPER] = 0;
memb_fapl[H5FD_MEM_DRAW] = H5P_DEFAULT;
- HDsnprintf(sv[H5FD_MEM_DRAW], 32, "%%s-%c.h5", 'r');
+ snprintf(sv[H5FD_MEM_DRAW], 32, "%%s-%c.h5", 'r');
memb_name[H5FD_MEM_DRAW] = sv[H5FD_MEM_DRAW];
memb_addr[H5FD_MEM_DRAW] = HADDR_MAX / 2;
@@ -1775,12 +1775,12 @@ test_multi_compat(void)
/* Make copy for the data file in the build directory, to protect the
* original file in the source directory
*/
- HDsnprintf(filename_s, sizeof(filename_s), "%s-%c.h5", MULTI_COMPAT_BASENAME, 's');
- HDsnprintf(newname_s, sizeof(newname_s), "%s-%c.h5", FILENAME[9], 's');
+ snprintf(filename_s, sizeof(filename_s), "%s-%c.h5", MULTI_COMPAT_BASENAME, 's');
+ snprintf(newname_s, sizeof(newname_s), "%s-%c.h5", FILENAME[9], 's');
h5_make_local_copy(filename_s, newname_s);
- HDsnprintf(filename_r, sizeof(filename_r), "%s-%c.h5", MULTI_COMPAT_BASENAME, 'r');
- HDsnprintf(newname_r, sizeof(newname_r), "%s-%c.h5", FILENAME[9], 'r');
+ snprintf(filename_r, sizeof(filename_r), "%s-%c.h5", MULTI_COMPAT_BASENAME, 'r');
+ snprintf(newname_r, sizeof(newname_r), "%s-%c.h5", FILENAME[9], 'r');
h5_make_local_copy(filename_r, newname_r);
/* Reopen the file for read only. Verify 1.8 library can open file
@@ -2295,9 +2295,9 @@ test_ros3(void)
/* need a macro to compare instances of H5FD_ros3_fapl_t */
if ((test_ros3_fa.version != ros3_fa_0.version) ||
(test_ros3_fa.authenticate != ros3_fa_0.authenticate) ||
- (HDstrcmp(test_ros3_fa.aws_region, ros3_fa_0.aws_region) != 0) ||
- (HDstrcmp(test_ros3_fa.secret_id, ros3_fa_0.secret_id) != 0) ||
- (HDstrcmp(test_ros3_fa.secret_key, ros3_fa_0.secret_key) != 0))
+ (strcmp(test_ros3_fa.aws_region, ros3_fa_0.aws_region) != 0) ||
+ (strcmp(test_ros3_fa.secret_id, ros3_fa_0.secret_id) != 0) ||
+ (strcmp(test_ros3_fa.secret_key, ros3_fa_0.secret_key) != 0))
TEST_ERROR;
h5_fixname(FILENAME[10], fapl_id, filename, sizeof(filename));
@@ -2399,8 +2399,8 @@ compare_splitter_config_info(hid_t fapl_id, H5FD_splitter_vfd_config_t *info)
SPLITTER_TEST_FAULT("Write-Only driver mismatch\n");
}
}
- if ((HDstrlen(info->wo_path) != HDstrlen(fetched_info->wo_path)) ||
- HDstrncmp(info->wo_path, fetched_info->wo_path, H5FD_SPLITTER_PATH_MAX) != 0) {
+ if ((strlen(info->wo_path) != strlen(fetched_info->wo_path)) ||
+ strncmp(info->wo_path, fetched_info->wo_path, H5FD_SPLITTER_PATH_MAX) != 0) {
fprintf(stderr, "MISMATCH: '%s' :: '%s'\n", info->wo_path, fetched_info->wo_path);
HEXPRINT(H5FD_SPLITTER_PATH_MAX, info->wo_path);
HEXPRINT(H5FD_SPLITTER_PATH_MAX, fetched_info->wo_path);
@@ -2622,7 +2622,7 @@ driver_is_splitter_compatible(hid_t fapl_id)
vfd_config->ignore_wo_errs = false;
vfd_config->rw_fapl_id = H5P_DEFAULT;
vfd_config->wo_fapl_id = fapl_id;
- HDstrncpy(vfd_config->wo_path, "nonesuch", H5FD_SPLITTER_PATH_MAX);
+ strncpy(vfd_config->wo_path, "nonesuch", H5FD_SPLITTER_PATH_MAX);
vfd_config->log_file_path[0] = '\0';
H5E_BEGIN_TRY
@@ -3705,7 +3705,7 @@ test_ctl(void)
hid_t sub_fapl_id = H5I_INVALID_HID;
TESTING("VFD ctl callback");
- HDputs("");
+ puts("");
/* Register VFD for test */
if ((driver_id = H5FDregister(&H5FD_ctl_test_vfd_g)) < 0)
@@ -4519,7 +4519,7 @@ test_vector_io(const char *vfd_name)
void *f_read_bufs_1[VECTOR_LEN]; /* fixed read bufs vector */
void *f_read_bufs_2[VECTOR_LEN]; /* fixed read bufs vector */
- HDsnprintf(test_title, sizeof(test_title), "vector I/O with %s VFD", vfd_name);
+ snprintf(test_title, sizeof(test_title), "vector I/O with %s VFD", vfd_name);
TESTING(test_title);
@@ -4528,14 +4528,14 @@ test_vector_io(const char *vfd_name)
if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0)
TEST_ERROR;
- if (HDstrcmp(vfd_name, "sec2") == 0) {
+ if (strcmp(vfd_name, "sec2") == 0) {
if (H5Pset_fapl_sec2(fapl_id) < 0)
TEST_ERROR;
h5_fixname(FILENAME[0], fapl_id, filename, sizeof(filename));
}
- else if (HDstrcmp(vfd_name, "stdio") == 0) {
+ else if (strcmp(vfd_name, "stdio") == 0) {
if (H5Pset_fapl_stdio(fapl_id) < 0)
TEST_ERROR;
@@ -5052,7 +5052,7 @@ test_selection_io(const char *vfd_name)
int *erbufs[2] = {erbuf1, erbuf2[0]}; /* Array of expected read buffers */
int shorten_element_sizes; /* Whether to shorten the element sizes array */
- HDsnprintf(test_title, sizeof(test_title), "selection I/O with %s VFD", vfd_name);
+ snprintf(test_title, sizeof(test_title), "selection I/O with %s VFD", vfd_name);
TESTING(test_title);
@@ -5061,14 +5061,14 @@ test_selection_io(const char *vfd_name)
if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0)
TEST_ERROR;
- if (HDstrcmp(vfd_name, "sec2") == 0) {
+ if (strcmp(vfd_name, "sec2") == 0) {
if (H5Pset_fapl_sec2(fapl_id) < 0)
TEST_ERROR;
h5_fixname(FILENAME[0], fapl_id, filename, sizeof(filename));
}
- else if (HDstrcmp(vfd_name, "stdio") == 0) {
+ else if (strcmp(vfd_name, "stdio") == 0) {
if (H5Pset_fapl_stdio(fapl_id) < 0)
TEST_ERROR;
diff --git a/test/vfd_plugin.c b/test/vfd_plugin.c
index 21ef9bd..8bfc09f 100644
--- a/test/vfd_plugin.c
+++ b/test/vfd_plugin.c
@@ -297,7 +297,7 @@ test_get_config_str(void)
TEST_ERROR;
if (0 != config_str_len)
TEST_ERROR;
- if (HDstrlen(config_str_buf) > 0)
+ if (strlen(config_str_buf) > 0)
TEST_ERROR;
/* Set a new configuration string on the FAPL and retrieve it */
@@ -305,9 +305,9 @@ test_get_config_str(void)
TEST_ERROR;
if ((config_str_len = H5Pget_driver_config_str(fapl_id, config_str_buf, 128)) < 0)
TEST_ERROR;
- if (HDstrlen(config_str) != config_str_len)
+ if (strlen(config_str) != config_str_len)
TEST_ERROR;
- if (HDstrncmp(config_str_buf, config_str, 128))
+ if (strncmp(config_str_buf, config_str, 128))
TEST_ERROR;
if (H5Pclose(fapl_id) < 0)
@@ -355,7 +355,7 @@ test_env_var(void)
TEST_ERROR;
if (0 != config_str_len)
TEST_ERROR;
- if (HDstrlen(config_str_buf) > 0)
+ if (strlen(config_str_buf) > 0)
TEST_ERROR;
/* Set default driver and driver configuration using environment variables */
@@ -382,9 +382,9 @@ test_env_var(void)
memset(config_str_buf, 0, 128);
if ((config_str_len = H5Pget_driver_config_str(H5P_FILE_ACCESS_DEFAULT, config_str_buf, 128)) < 0)
TEST_ERROR;
- if (HDstrlen(config_str) != config_str_len)
+ if (strlen(config_str) != config_str_len)
TEST_ERROR;
- if (HDstrncmp(config_str_buf, config_str, 128))
+ if (strncmp(config_str_buf, config_str, 128))
TEST_ERROR;
/* Unset environment variables */
@@ -420,7 +420,7 @@ main(void)
h5_reset();
- HDputs("Testing VFD plugin functionality.");
+ puts("Testing VFD plugin functionality.");
nerrors += (test_set_by_name() < 0) ? 1 : 0;
nerrors += (test_set_by_value() < 0) ? 1 : 0;
@@ -433,7 +433,7 @@ main(void)
exit(EXIT_FAILURE);
}
- HDputs("All VFD plugin tests passed.");
+ puts("All VFD plugin tests passed.");
exit(EXIT_SUCCESS);
}
diff --git a/test/vol.c b/test/vol.c
index ae9d3dc..b8c1e03 100644
--- a/test/vol.c
+++ b/test/vol.c
@@ -517,7 +517,7 @@ reg_opt_link_optional(void *obj, const H5VL_loc_params_t *loc_params, H5VL_optio
return -1;
if (loc_params->obj_type != H5I_GROUP)
return -1;
- if (HDstrcmp(loc_params->loc_data.loc_by_name.name, ".") != 0)
+ if (strcmp(loc_params->loc_data.loc_by_name.name, ".") != 0)
return -1;
if (loc_params->loc_data.loc_by_name.lapl_id != H5P_LINK_ACCESS_DEFAULT)
return -1;
@@ -587,7 +587,7 @@ fake_vol_info_to_str(const void *info, char **str)
if (NULL == (*str = (char *)calloc(1, str_size)))
return FAIL;
- HDsnprintf(*str, str_size, "%d", val);
+ snprintf(*str, str_size, "%d", val);
return ret_value;
} /* end fake_vol_info_to_str() */
@@ -913,10 +913,10 @@ test_basic_file_operation(const char *env_h5_drvr)
TEST_ERROR;
/* Can't compare VFD properties for several VFDs */
- if ((bool)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
- HDstrcmp(env_h5_drvr, "family") != 0 && HDstrcmp(env_h5_drvr, "direct") != 0 &&
- HDstrcmp(env_h5_drvr, "core") != 0 && HDstrcmp(env_h5_drvr, "core_paged") != 0 &&
- HDstrcmp(env_h5_drvr, "mpio") != 0 && HDstrcmp(env_h5_drvr, "splitter") != 0)) {
+ if ((bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0 &&
+ strcmp(env_h5_drvr, "family") != 0 && strcmp(env_h5_drvr, "direct") != 0 &&
+ strcmp(env_h5_drvr, "core") != 0 && strcmp(env_h5_drvr, "core_paged") != 0 &&
+ strcmp(env_h5_drvr, "mpio") != 0 && strcmp(env_h5_drvr, "splitter") != 0)) {
/* H5Fget_access_plist */
if ((fapl_id2 = H5Fget_access_plist(fid)) < 0)
TEST_ERROR;
@@ -937,8 +937,8 @@ test_basic_file_operation(const char *env_h5_drvr)
TEST_ERROR;
/* Can't retrieve VFD handle for split / multi / family VFDs */
- if ((bool)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
- HDstrcmp(env_h5_drvr, "family") != 0)) {
+ if ((bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0 &&
+ strcmp(env_h5_drvr, "family") != 0)) {
/* H5Fget_vfd_handle */
if (H5Fget_vfd_handle(fid, H5P_DEFAULT, &os_file_handle) < 0)
TEST_ERROR;
@@ -977,10 +977,10 @@ test_basic_file_operation(const char *env_h5_drvr)
TEST_ERROR;
/* Can't compare VFD properties for several VFDs */
- if ((bool)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
- HDstrcmp(env_h5_drvr, "family") != 0 && HDstrcmp(env_h5_drvr, "direct") != 0 &&
- HDstrcmp(env_h5_drvr, "core") != 0 && HDstrcmp(env_h5_drvr, "core_paged") != 0 &&
- HDstrcmp(env_h5_drvr, "mpio") != 0 && HDstrcmp(env_h5_drvr, "splitter") != 0)) {
+ if ((bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0 &&
+ strcmp(env_h5_drvr, "family") != 0 && strcmp(env_h5_drvr, "direct") != 0 &&
+ strcmp(env_h5_drvr, "core") != 0 && strcmp(env_h5_drvr, "core_paged") != 0 &&
+ strcmp(env_h5_drvr, "mpio") != 0 && strcmp(env_h5_drvr, "splitter") != 0)) {
/* H5Fget_access_plist */
if ((fapl_id2 = H5Fget_access_plist(fid)) < 0)
TEST_ERROR;
@@ -994,10 +994,10 @@ test_basic_file_operation(const char *env_h5_drvr)
TEST_ERROR;
/* Can't compare VFD properties for several VFDs */
- if ((bool)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
- HDstrcmp(env_h5_drvr, "family") != 0 && HDstrcmp(env_h5_drvr, "direct") != 0 &&
- HDstrcmp(env_h5_drvr, "core") != 0 && HDstrcmp(env_h5_drvr, "core_paged") != 0 &&
- HDstrcmp(env_h5_drvr, "mpio") != 0 && HDstrcmp(env_h5_drvr, "splitter") != 0)) {
+ if ((bool)(strcmp(env_h5_drvr, "split") != 0 && strcmp(env_h5_drvr, "multi") != 0 &&
+ strcmp(env_h5_drvr, "family") != 0 && strcmp(env_h5_drvr, "direct") != 0 &&
+ strcmp(env_h5_drvr, "core") != 0 && strcmp(env_h5_drvr, "core_paged") != 0 &&
+ strcmp(env_h5_drvr, "mpio") != 0 && strcmp(env_h5_drvr, "splitter") != 0)) {
/* H5Fget_access_plist */
if ((fapl_id2 = H5Fget_access_plist(fid_reopen)) < 0)
TEST_ERROR;
@@ -1733,7 +1733,7 @@ exercise_reg_opt_oper(hid_t fake_vol_id, hid_t reg_opt_vol_id, H5VL_subclass_t s
herr_t ret = SUCCEED;
/* Test registering optional operation */
- HDsnprintf(op_name, sizeof(op_name), "%s-op1", subcls_name);
+ snprintf(op_name, sizeof(op_name), "%s-op1", subcls_name);
if (H5VLregister_opt_operation(subcls, op_name, &op_val) < 0)
TEST_ERROR;
@@ -1752,7 +1752,7 @@ exercise_reg_opt_oper(hid_t fake_vol_id, hid_t reg_opt_vol_id, H5VL_subclass_t s
TEST_ERROR;
/* Test registering second optional operation */
- HDsnprintf(op_name, sizeof(op_name), "%s-op2", subcls_name);
+ snprintf(op_name, sizeof(op_name), "%s-op2", subcls_name);
if (H5VLregister_opt_operation(subcls, op_name, &op_val2) < 0)
TEST_ERROR;
@@ -2095,7 +2095,7 @@ test_async_vol_props(void)
/* Override possible environment variable & re-initialize default VOL connector */
conn_env_str = HDgetenv(HDF5_VOL_CONNECTOR);
if (conn_env_str) {
- if (NULL == (conn_env_str = HDstrdup(conn_env_str)))
+ if (NULL == (conn_env_str = strdup(conn_env_str)))
TEST_ERROR;
if (HDunsetenv(HDF5_VOL_CONNECTOR) < 0)
TEST_ERROR;
@@ -2257,7 +2257,7 @@ test_vol_cap_flags(void)
/* If using the native VOL by default, check flags again with H5P_DEFAULT */
vol_env = HDgetenv(HDF5_VOL_CONNECTOR);
- if (!vol_env || (0 == HDstrcmp(vol_env, "native"))) {
+ if (!vol_env || (0 == strcmp(vol_env, "native"))) {
H5VL_class_t *cls;
hid_t connector_id;
@@ -2343,7 +2343,7 @@ test_get_vol_name(void)
conn_env_str = "native";
/* Skip the connectors other than the native and pass_through connector */
- if (HDstrcmp(conn_env_str, "native") && HDstrcmp(conn_env_str, "pass_through")) {
+ if (strcmp(conn_env_str, "native") && strcmp(conn_env_str, "pass_through")) {
SKIPPED();
printf(" only test the native or internal pass_through connector\n");
return SUCCEED;
@@ -2361,8 +2361,8 @@ test_get_vol_name(void)
TEST_ERROR;
/* When comparing the pass_through connector, ignore the rest information (under_vol=0;under_info={}) */
- if ((!HDstrcmp(conn_env_str, "native") && HDstrcmp(vol_name, "native")) ||
- (!HDstrcmp(conn_env_str, "pass_through") && HDstrcmp(vol_name, "pass_through")))
+ if ((!strcmp(conn_env_str, "native") && strcmp(vol_name, "native")) ||
+ (!strcmp(conn_env_str, "pass_through") && strcmp(vol_name, "pass_through")))
TEST_ERROR;
if (H5Fclose(file_id) < 0)
@@ -2635,7 +2635,7 @@ main(void)
h5_reset();
- HDputs("Testing basic Virtual Object Layer (VOL) functionality.");
+ puts("Testing basic Virtual Object Layer (VOL) functionality.");
nerrors += test_vol_registration() < 0 ? 1 : 0;
nerrors += test_register_opt_operation() < 0 ? 1 : 0;
@@ -2659,7 +2659,7 @@ main(void)
exit(EXIT_FAILURE);
}
- HDputs("All Virtual Object Layer (VOL) tests passed.");
+ puts("All Virtual Object Layer (VOL) tests passed.");
exit(EXIT_SUCCESS);
diff --git a/test/vol_plugin.c b/test/vol_plugin.c
index ae115e4..af46f34 100644
--- a/test/vol_plugin.c
+++ b/test/vol_plugin.c
@@ -334,7 +334,7 @@ main(void)
h5_reset();
- HDputs("Testing VOL connector plugin functionality.");
+ puts("Testing VOL connector plugin functionality.");
nerrors += test_registration_by_name() < 0 ? 1 : 0;
nerrors += test_registration_by_value() < 0 ? 1 : 0;
@@ -346,7 +346,7 @@ main(void)
exit(EXIT_FAILURE);
}
- HDputs("All VOL connector plugin tests passed.");
+ puts("All VOL connector plugin tests passed.");
exit(EXIT_SUCCESS);