summaryrefslogtreecommitdiffstats
path: root/test/API/tattr.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/API/tattr.c')
-rw-r--r--test/API/tattr.c279
1 files changed, 139 insertions, 140 deletions
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");