summaryrefslogtreecommitdiffstats
path: root/hl/test/test_ds.c
diff options
context:
space:
mode:
Diffstat (limited to 'hl/test/test_ds.c')
-rw-r--r--hl/test/test_ds.c472
1 files changed, 236 insertions, 236 deletions
diff --git a/hl/test/test_ds.c b/hl/test/test_ds.c
index 9792441..f85ed81 100644
--- a/hl/test/test_ds.c
+++ b/hl/test/test_ds.c
@@ -214,11 +214,11 @@ main(void)
if (nerrors)
goto error;
- HDprintf("All dimension scales tests passed.\n");
+ printf("All dimension scales tests passed.\n");
return 0;
error:
- HDprintf("***** %d DIMENSION SCALES TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
+ printf("***** %d DIMENSION SCALES TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
return 1;
}
@@ -245,7 +245,7 @@ create_test_file(const char *fileext)
{
char filename[65];
- HDsnprintf(filename, sizeof(filename), "%s%s%s", FILENAME, fileext, FILEEXT);
+ snprintf(filename, sizeof(filename), "%s%s%s", FILENAME, fileext, FILEEXT);
return H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
}
@@ -255,7 +255,7 @@ open_test_file(const char *fileext)
{
char filename[65];
- HDsnprintf(filename, sizeof(filename), "%s%s%s", FILENAME, fileext, FILEEXT);
+ snprintf(filename, sizeof(filename), "%s%s%s", FILENAME, fileext, FILEEXT);
return H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT);
}
@@ -284,7 +284,7 @@ create_char_dataset(hid_t fid, const char *dsidx, int fulldims)
char s33_wbuf[DIM3_SIZE] = {6, 6, 6, 12, 12, 12, 53, 53, 53, 120, 120, 120};
char name[64];
- HDsnprintf(name, sizeof(name), "%s%s", DATASET_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DATASET_NAME, dsidx);
/* make a dataset */
if (H5LTmake_dataset_char(fid, name, rank, dims, NULL) >= 0) {
@@ -338,7 +338,7 @@ create_short_dataset(hid_t fid, const char *dsidx, int fulldims)
short s33_wbuf[DIM3_SIZE] = {6, 6, 6, 12, 12, 12, 53, 53, 53, 140, 140, 140};
char name[64];
- HDsnprintf(name, sizeof(name), "%s%s", DATASET_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DATASET_NAME, dsidx);
/* make a dataset */
if (H5LTmake_dataset_short(fid, name, rank, dims, NULL) >= 0) {
@@ -387,7 +387,7 @@ create_int_dataset(hid_t fid, const char *dsidx, int fulldims)
int s22_wbuf[DIM2_SIZE] = {5, 10, 50, 300};
char name[64];
- HDsnprintf(name, sizeof(name), "%s%s", DATASET_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DATASET_NAME, dsidx);
/* make a dataset */
if (H5LTmake_dataset_int(fid, name, rank, dims, NULL) >= 0) {
@@ -497,7 +497,7 @@ create_float_dataset(hid_t fid, const char *dsidx, int fulldims)
float s22_wbuf[DIM2_SIZE] = {5, 10, 50, 300};
char name[64];
- HDsnprintf(name, sizeof(name), "%s%s", DATASET_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DATASET_NAME, dsidx);
/* make a dataset */
if (H5LTmake_dataset_float(fid, name, rank, dims, NULL) >= 0) {
@@ -533,14 +533,14 @@ create_DS1_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_di
{
char name[64];
- HDsnprintf(name, sizeof(name), "%s%s", DS_1_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_1_NAME, dsidx);
/* make a DS dataset for the first dimension */
if (H5LTmake_dataset_char(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
if (s1_wbuf != NULL) {
- HDsnprintf(name, sizeof(name), "%s%s", DS_11_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_11_NAME, dsidx);
/* make a DS dataset with an alternate scale for the first dimension */
if (H5LTmake_dataset_char(fid, name, rankds, s_dim, s1_wbuf) < 0)
@@ -560,14 +560,14 @@ create_DS2_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_di
{
char name[64];
- HDsnprintf(name, sizeof(name), "%s%s", DS_2_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_2_NAME, dsidx);
/* make a DS dataset for the second dimension */
if (H5LTmake_dataset_char(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
if (s1_wbuf != NULL) {
- HDsnprintf(name, sizeof(name), "%s%s", DS_21_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_21_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
if (H5LTmake_dataset_char(fid, name, rankds, s_dim, s1_wbuf) < 0)
@@ -575,7 +575,7 @@ create_DS2_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_di
}
if (s2_wbuf != NULL) {
- HDsnprintf(name, sizeof(name), "%s%s", DS_22_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_22_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
if (H5LTmake_dataset_char(fid, name, rankds, s_dim, s2_wbuf) < 0)
@@ -595,14 +595,14 @@ create_DS3_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_di
{
char name[64];
- HDsnprintf(name, sizeof(name), "%s%s", DS_3_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_3_NAME, dsidx);
/* make a DS dataset for the first dimension */
if (H5LTmake_dataset_char(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
if (s1_wbuf != NULL) {
- HDsnprintf(name, sizeof(name), "%s%s", DS_31_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_31_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
if (H5LTmake_dataset_char(fid, name, rankds, s_dim, s1_wbuf) < 0)
@@ -610,7 +610,7 @@ create_DS3_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_di
}
if (s2_wbuf != NULL) {
- HDsnprintf(name, sizeof(name), "%s%s", DS_32_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_32_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
if (H5LTmake_dataset_char(fid, name, rankds, s_dim, s2_wbuf) < 0)
@@ -618,7 +618,7 @@ create_DS3_char_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_di
}
if (s3_wbuf != NULL) {
- HDsnprintf(name, sizeof(name), "%s%s", DS_33_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_33_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
if (H5LTmake_dataset_char(fid, name, rankds, s_dim, s3_wbuf) < 0)
@@ -638,14 +638,14 @@ create_DS1_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_d
{
char name[64];
- HDsnprintf(name, sizeof(name), "%s%s", DS_1_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_1_NAME, dsidx);
/* make a DS dataset for the first dimension */
if (H5LTmake_dataset_short(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
if (s1_wbuf != NULL) {
- HDsnprintf(name, sizeof(name), "%s%s", DS_11_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_11_NAME, dsidx);
/* make a DS dataset with an alternate scale for the first dimension */
if (H5LTmake_dataset_short(fid, name, rankds, s_dim, s1_wbuf) < 0)
@@ -665,14 +665,14 @@ create_DS2_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_d
{
char name[64];
- HDsnprintf(name, sizeof(name), "%s%s", DS_2_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_2_NAME, dsidx);
/* make a DS dataset for the second dimension */
if (H5LTmake_dataset_short(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
if (s1_wbuf != NULL) {
- HDsnprintf(name, sizeof(name), "%s%s", DS_21_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_21_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
if (H5LTmake_dataset_short(fid, name, rankds, s_dim, s1_wbuf) < 0)
@@ -680,7 +680,7 @@ create_DS2_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_d
}
if (s2_wbuf != NULL) {
- HDsnprintf(name, sizeof(name), "%s%s", DS_22_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_22_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
if (H5LTmake_dataset_short(fid, name, rankds, s_dim, s2_wbuf) < 0)
@@ -700,14 +700,14 @@ create_DS3_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_d
{
char name[64];
- HDsnprintf(name, sizeof(name), "%s%s", DS_3_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_3_NAME, dsidx);
/* make a DS dataset for the first dimension */
if (H5LTmake_dataset_short(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
if (s1_wbuf != NULL) {
- HDsnprintf(name, sizeof(name), "%s%s", DS_31_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_31_NAME, dsidx);
/* make a DS dataset for the first dimension */
if (H5LTmake_dataset_short(fid, name, rankds, s_dim, s1_wbuf) < 0)
@@ -715,7 +715,7 @@ create_DS3_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_d
}
if (s2_wbuf != NULL) {
- HDsnprintf(name, sizeof(name), "%s%s", DS_32_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_32_NAME, dsidx);
/* make a DS dataset for the first dimension */
if (H5LTmake_dataset_short(fid, name, rankds, s_dim, s2_wbuf) < 0)
@@ -723,7 +723,7 @@ create_DS3_short_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_d
}
if (s3_wbuf != NULL) {
- HDsnprintf(name, sizeof(name), "%s%s", DS_33_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_33_NAME, dsidx);
/* make a DS dataset for the first dimension */
if (H5LTmake_dataset_short(fid, name, rankds, s_dim, s3_wbuf) < 0)
@@ -742,14 +742,14 @@ create_DS1_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim
{
char name[64];
- HDsnprintf(name, sizeof(name), "%s%s", DS_1_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_1_NAME, dsidx);
/* make a DS dataset for the first dimension */
if (H5LTmake_dataset_int(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
if (s1_wbuf != NULL) {
- HDsnprintf(name, sizeof(name), "%s%s", DS_11_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_11_NAME, dsidx);
/* make a DS dataset with an alternate scale for the first dimension */
if (H5LTmake_dataset_int(fid, name, rankds, s_dim, s1_wbuf) < 0)
@@ -769,14 +769,14 @@ create_DS2_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim
{
char name[64];
- HDsnprintf(name, sizeof(name), "%s%s", DS_2_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_2_NAME, dsidx);
/* make a DS dataset for the second dimension */
if (H5LTmake_dataset_int(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
if (s1_wbuf != NULL) {
- HDsnprintf(name, sizeof(name), "%s%s", DS_21_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_21_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
if (H5LTmake_dataset_int(fid, name, rankds, s_dim, s1_wbuf) < 0)
@@ -784,7 +784,7 @@ create_DS2_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim
}
if (s2_wbuf != NULL) {
- HDsnprintf(name, sizeof(name), "%s%s", DS_22_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_22_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
if (H5LTmake_dataset_int(fid, name, rankds, s_dim, s2_wbuf) < 0)
@@ -804,14 +804,14 @@ create_DS3_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim
{
char name[64];
- HDsnprintf(name, sizeof(name), "%s%s", DS_3_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_3_NAME, dsidx);
/* make a DS dataset for the first dimension */
if (H5LTmake_dataset_int(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
if (s1_wbuf != NULL) {
- HDsnprintf(name, sizeof(name), "%s%s", DS_31_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_31_NAME, dsidx);
/* make a DS dataset with an alternate scale for the first dimension */
if (H5LTmake_dataset_int(fid, name, rankds, s_dim, s1_wbuf) < 0)
@@ -819,7 +819,7 @@ create_DS3_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim
}
if (s2_wbuf != NULL) {
- HDsnprintf(name, sizeof(name), "%s%s", DS_32_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_32_NAME, dsidx);
/* make a DS dataset with an alternate scale for the first dimension */
if (H5LTmake_dataset_int(fid, name, rankds, s_dim, s2_wbuf) < 0)
@@ -827,7 +827,7 @@ create_DS3_int_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_dim
}
if (s3_wbuf != NULL) {
- HDsnprintf(name, sizeof(name), "%s%s", DS_33_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_33_NAME, dsidx);
/* make a DS dataset with an alternate scale for the first dimension */
if (H5LTmake_dataset_int(fid, name, rankds, s_dim, s3_wbuf) < 0)
@@ -847,14 +847,14 @@ create_DS1_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_di
{
char name[64];
- HDsnprintf(name, sizeof(name), "%s%s", DS_1_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_1_NAME, dsidx);
/* make a DS dataset for the first dimension */
if (H5LTmake_dataset_long(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
if (s1_wbuf != NULL) {
- HDsnprintf(name, sizeof(name), "%s%s", DS_11_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_11_NAME, dsidx);
/* make a DS dataset with an alternate scale for the first dimension */
if (H5LTmake_dataset_long(fid, name, rankds, s_dim, s1_wbuf) < 0)
@@ -874,14 +874,14 @@ create_DS2_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_di
{
char name[64];
- HDsnprintf(name, sizeof(name), "%s%s", DS_2_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_2_NAME, dsidx);
/* make a DS dataset for the second dimension */
if (H5LTmake_dataset_long(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
if (s1_wbuf != NULL) {
- HDsnprintf(name, sizeof(name), "%s%s", DS_21_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_21_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
if (H5LTmake_dataset_long(fid, name, rankds, s_dim, s1_wbuf) < 0)
@@ -889,7 +889,7 @@ create_DS2_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_di
}
if (s2_wbuf != NULL) {
- HDsnprintf(name, sizeof(name), "%s%s", DS_22_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_22_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
if (H5LTmake_dataset_long(fid, name, rankds, s_dim, s2_wbuf) < 0)
@@ -909,14 +909,14 @@ create_DS3_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_di
{
char name[64];
- HDsnprintf(name, sizeof(name), "%s%s", DS_3_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_3_NAME, dsidx);
/* make a DS dataset for the first dimension */
if (H5LTmake_dataset_long(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
if (s1_wbuf != NULL) {
- HDsnprintf(name, sizeof(name), "%s%s", DS_31_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_31_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
if (H5LTmake_dataset_long(fid, name, rankds, s_dim, s1_wbuf) < 0)
@@ -924,7 +924,7 @@ create_DS3_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_di
}
if (s2_wbuf != NULL) {
- HDsnprintf(name, sizeof(name), "%s%s", DS_32_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_32_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
if (H5LTmake_dataset_long(fid, name, rankds, s_dim, s2_wbuf) < 0)
@@ -932,7 +932,7 @@ create_DS3_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_di
}
if (s3_wbuf != NULL) {
- HDsnprintf(name, sizeof(name), "%s%s", DS_33_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_33_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
if (H5LTmake_dataset_long(fid, name, rankds, s_dim, s3_wbuf) < 0)
@@ -952,14 +952,14 @@ create_DS4_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_di
{
char name[64];
- HDsnprintf(name, sizeof(name), "%s%s", DS_4_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_4_NAME, dsidx);
/* make a DS dataset for the first dimension */
if (H5LTmake_dataset_long(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
if (s1_wbuf != NULL) {
- HDsnprintf(name, sizeof(name), "%s%s", DS_41_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_41_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
if (H5LTmake_dataset_long(fid, name, rankds, s_dim, s1_wbuf) < 0)
@@ -967,7 +967,7 @@ create_DS4_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_di
}
if (s2_wbuf != NULL) {
- HDsnprintf(name, sizeof(name), "%s%s", DS_42_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_42_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
if (H5LTmake_dataset_long(fid, name, rankds, s_dim, s2_wbuf) < 0)
@@ -975,7 +975,7 @@ create_DS4_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_di
}
if (s3_wbuf != NULL) {
- HDsnprintf(name, sizeof(name), "%s%s", DS_43_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_43_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
if (H5LTmake_dataset_long(fid, name, rankds, s_dim, s3_wbuf) < 0)
@@ -983,7 +983,7 @@ create_DS4_long_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_di
}
if (s4_wbuf != NULL) {
- HDsnprintf(name, sizeof(name), "%s%s", DS_44_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_44_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
if (H5LTmake_dataset_long(fid, name, rankds, s_dim, s4_wbuf) < 0)
@@ -1003,14 +1003,14 @@ create_DS1_float_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_d
{
char name[64];
- HDsnprintf(name, sizeof(name), "%s%s", DS_1_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_1_NAME, dsidx);
/* make a DS dataset for the first dimension */
if (H5LTmake_dataset_float(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
if (s1_wbuf != NULL) {
- HDsnprintf(name, sizeof(name), "%s%s", DS_11_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_11_NAME, dsidx);
/* make a DS dataset with an alternate scale for the first dimension */
if (H5LTmake_dataset_float(fid, name, rankds, s_dim, s1_wbuf) < 0)
@@ -1030,14 +1030,14 @@ create_DS2_float_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_d
{
char name[64];
- HDsnprintf(name, sizeof(name), "%s%s", DS_2_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_2_NAME, dsidx);
/* make a DS dataset for the second dimension */
if (H5LTmake_dataset_float(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
if (s1_wbuf != NULL) {
- HDsnprintf(name, sizeof(name), "%s%s", DS_21_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_21_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
if (H5LTmake_dataset_float(fid, name, rankds, s_dim, s1_wbuf) < 0)
@@ -1045,7 +1045,7 @@ create_DS2_float_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_d
}
if (s2_wbuf != NULL) {
- HDsnprintf(name, sizeof(name), "%s%s", DS_22_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_22_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
if (H5LTmake_dataset_float(fid, name, rankds, s_dim, s2_wbuf) < 0)
@@ -1065,14 +1065,14 @@ create_DS3_float_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_d
{
char name[64];
- HDsnprintf(name, sizeof(name), "%s%s", DS_3_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_3_NAME, dsidx);
/* make a DS dataset for the first dimension */
if (H5LTmake_dataset_float(fid, name, rankds, s_dim, s_wbuf) < 0)
return FAIL;
if (s1_wbuf != NULL) {
- HDsnprintf(name, sizeof(name), "%s%s", DS_31_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_31_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
if (H5LTmake_dataset_float(fid, name, rankds, s_dim, s1_wbuf) < 0)
@@ -1080,7 +1080,7 @@ create_DS3_float_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_d
}
if (s2_wbuf != NULL) {
- HDsnprintf(name, sizeof(name), "%s%s", DS_32_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_32_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
if (H5LTmake_dataset_float(fid, name, rankds, s_dim, s2_wbuf) < 0)
@@ -1088,7 +1088,7 @@ create_DS3_float_datasets(hid_t fid, const char *dsidx, int rankds, hsize_t *s_d
}
if (s3_wbuf != NULL) {
- HDsnprintf(name, sizeof(name), "%s%s", DS_33_NAME, dsidx);
+ snprintf(name, sizeof(name), "%s%s", DS_33_NAME, dsidx);
/* make a DS dataset with an alternate scale for the second dimension */
if (H5LTmake_dataset_float(fid, name, rankds, s_dim, s3_wbuf) < 0)
@@ -1111,7 +1111,7 @@ test_attach_scale(hid_t fid, hid_t did, const char *name, unsigned int idx)
ret_value = SUCCEED;
}
else if (H5DSis_attached(did, dsid, idx) == 0) {
- HDprintf(" scale not attached ");
+ printf(" scale not attached ");
}
}
}
@@ -1175,13 +1175,13 @@ test_cmp_scalename(hid_t fid, hid_t did, const char *name, const char *scalename
if ((dsid = H5Dopen2(fid, name, H5P_DEFAULT)) >= 0) {
if (H5DSis_attached(did, dsid, idx) == 1) {
if ((name_len = H5DSget_scale_name(dsid, NULL, (size_t)0)) > 0) {
- name_out = (char *)HDmalloc(((size_t)name_len + 1) * sizeof(char));
+ name_out = (char *)malloc(((size_t)name_len + 1) * sizeof(char));
if (name_out != NULL) {
if (H5DSget_scale_name(dsid, name_out, (size_t)name_len + 1) >= 0) {
- if (HDstrncmp(scalename, name_out, (size_t)name_len) == 0) {
+ if (strncmp(scalename, name_out, (size_t)name_len) == 0) {
ret_value = SUCCEED;
}
- HDfree(name_out);
+ free(name_out);
name_out = NULL;
}
}
@@ -1219,14 +1219,14 @@ test_detachscales(void)
/* make datasets; they are three dimensional*/
for (i = 0; i < 2; i++) {
- HDsnprintf(dname, sizeof(dname), "D%d", i);
+ snprintf(dname, sizeof(dname), "D%d", i);
if (H5LTmake_dataset_int(fid, dname, rank3, dims, buf) < 0)
goto out;
}
/* create datasets and make them dim. scales */
for (i = 0; i < 4; i++) {
- HDsnprintf(dname, sizeof(dname), "DS%d", i);
+ snprintf(dname, sizeof(dname), "DS%d", i);
if (H5LTmake_dataset_int(fid, dname, rank1, dims, buf) < 0)
goto out;
}
@@ -1234,7 +1234,7 @@ test_detachscales(void)
two scales attached */
if ((did = H5Dopen2(fid, "D0", H5P_DEFAULT)) >= 0) {
for (i = 0; i < 4; i++) {
- HDsnprintf(dname, sizeof(dname), "DS%d", i);
+ snprintf(dname, sizeof(dname), "DS%d", i);
if ((dsid = H5Dopen2(fid, dname, H5P_DEFAULT)) < 0)
goto out;
if (H5DSattach_scale(did, dsid, (unsigned int)i % 3) < 0)
@@ -1251,7 +1251,7 @@ test_detachscales(void)
/* attach scales to the second dataset */
if ((did = H5Dopen2(fid, "D1", H5P_DEFAULT)) >= 0) {
for (i = 0; i < 3; i++) {
- HDsnprintf(dname, sizeof(dname), "DS%d", i);
+ snprintf(dname, sizeof(dname), "DS%d", i);
if ((dsid = H5Dopen2(fid, dname, H5P_DEFAULT)) < 0)
goto out;
if (H5DSattach_scale(did, dsid, (unsigned int)i) < 0)
@@ -1272,7 +1272,7 @@ test_detachscales(void)
goto out;
for (i = 0; i < 2; i++) {
- HDsnprintf(dname, sizeof(dname), "D%d", i);
+ snprintf(dname, sizeof(dname), "D%d", i);
if ((did = H5Dopen2(fid, dname, H5P_DEFAULT)) < 0)
goto out;
if (H5DSdetach_scale(did, dsid, (unsigned int)0) < 0)
@@ -1302,7 +1302,7 @@ test_detachscales(void)
sure that attribute "DIMENSION_LIST" doesn't exist anymore */
if ((did = H5Dopen2(fid, "D0", H5P_DEFAULT)) >= 0) {
for (i = 1; i < 4; i++) {
- HDsnprintf(dname, sizeof(dname), "DS%d", i);
+ snprintf(dname, sizeof(dname), "DS%d", i);
if ((dsid = H5Dopen2(fid, dname, H5P_DEFAULT)) < 0)
goto out;
if (H5DSdetach_scale(did, dsid, (unsigned int)i % 3) < 0)
@@ -1346,7 +1346,7 @@ test_char_attachscales(const char *fileext)
char dsname[32];
char scalename[32];
- HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "ac");
+ snprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "ac");
HL_TESTING2("test_char_attachscales");
@@ -1358,15 +1358,15 @@ test_char_attachscales(const char *fileext)
goto out;
if ((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "ac");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "ac");
if (test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "ac");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "ac");
if (test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "ac");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "ac");
if (test_attach_scale(fid, did, scalename, DIM2) < 0)
goto out;
@@ -1402,7 +1402,7 @@ test_short_attachscales(const char *fileext)
char dsname[32];
char scalename[32];
- HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "as");
+ snprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "as");
HL_TESTING2("test_short_attachscales");
@@ -1414,39 +1414,39 @@ test_short_attachscales(const char *fileext)
goto out;
if ((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "as");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "as");
if (test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_11_NAME, "as");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_11_NAME, "as");
if (test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "as");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "as");
if (test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_21_NAME, "as");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_21_NAME, "as");
if (test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_22_NAME, "as");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_22_NAME, "as");
if (test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "as");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "as");
if (test_attach_scale(fid, did, scalename, DIM2) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_31_NAME, "as");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_31_NAME, "as");
if (test_attach_scale(fid, did, scalename, DIM2) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_32_NAME, "as");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_32_NAME, "as");
if (test_attach_scale(fid, did, scalename, DIM2) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_33_NAME, "as");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_33_NAME, "as");
if (test_attach_scale(fid, did, scalename, DIM2) < 0)
goto out;
@@ -1482,7 +1482,7 @@ test_int_attachscales(const char *fileext)
char dsname[32];
char scalename[32];
- HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "a");
+ snprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "a");
HL_TESTING2("test_int_attachscales");
@@ -1494,23 +1494,23 @@ test_int_attachscales(const char *fileext)
goto out;
if ((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "a");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "a");
if (test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_11_NAME, "a");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_11_NAME, "a");
if (test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "a");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "a");
if (test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_21_NAME, "a");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_21_NAME, "a");
if (test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_22_NAME, "a");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_22_NAME, "a");
if (test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
@@ -1546,7 +1546,7 @@ test_long_attachscales(const char *fileext)
char dsname[32];
char scalename[32];
- HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "al");
+ snprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "al");
HL_TESTING2("test_long_attachscales");
@@ -1558,19 +1558,19 @@ test_long_attachscales(const char *fileext)
goto out;
if ((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "al");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "al");
if (test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "al");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "al");
if (test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "al");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "al");
if (test_attach_scale(fid, did, scalename, DIM2) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_4_NAME, "al");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_4_NAME, "al");
if (test_attach_scale(fid, did, scalename, DIM3) < 0)
goto out;
@@ -1606,7 +1606,7 @@ test_duplicatelong_attachscales(const char *fileext)
char dsname[32];
char scalename[32];
- HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "al2");
+ snprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "al2");
HL_TESTING2("test_duplicatelong_attachscales");
@@ -1618,19 +1618,19 @@ test_duplicatelong_attachscales(const char *fileext)
goto out;
if ((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "al");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "al");
if (test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "al");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "al");
if (test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "al");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "al");
if (test_attach_scale(fid, did, scalename, DIM2) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_4_NAME, "al");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_4_NAME, "al");
if (test_attach_scale(fid, did, scalename, DIM3) < 0)
goto out;
@@ -1666,7 +1666,7 @@ test_float_attachscales(const char *fileext)
char dsname[32];
char scalename[32];
- HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "af");
+ snprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "af");
HL_TESTING2("test_float_attachscales");
@@ -1678,23 +1678,23 @@ test_float_attachscales(const char *fileext)
goto out;
if ((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "af");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "af");
if (test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_11_NAME, "af");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_11_NAME, "af");
if (test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "af");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "af");
if (test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_21_NAME, "af");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_21_NAME, "af");
if (test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_22_NAME, "af");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_22_NAME, "af");
if (test_attach_scale(fid, did, scalename, DIM1) < 0)
goto out;
@@ -1731,7 +1731,7 @@ test_numberofscales(const char *fileext)
char dsname[32];
char scalename[32];
- HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "a");
+ snprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "a");
HL_TESTING2("test_numberofscales");
@@ -1757,7 +1757,7 @@ test_numberofscales(const char *fileext)
else
goto out;
- HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "b");
+ snprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "b");
/* make a dataset */
if (create_int_dataset(fid, "b", 1) < 0)
@@ -1765,7 +1765,7 @@ test_numberofscales(const char *fileext)
/* make a DS dataset for the first dimension */
if ((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "b");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "b");
if (test_attach_scale(fid, did, scalename, DIM0) < 0)
goto out;
@@ -1814,31 +1814,31 @@ test_char_scalenames(const char *fileext)
char scalename[32];
char name[32];
- HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "ac");
+ snprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "ac");
if ((fid = open_test_file(fileext)) < 0)
goto out;
HL_TESTING2("set char scale/cmp scale name");
if ((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "ac");
- HDsnprintf(name, sizeof(name), "%s%s", SCALE_1_NAME, "ac");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "ac");
+ snprintf(name, sizeof(name), "%s%s", SCALE_1_NAME, "ac");
if (test_set_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
if (test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "ac");
- HDsnprintf(name, sizeof(name), "%s%s", SCALE_2_NAME, "ac");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "ac");
+ snprintf(name, sizeof(name), "%s%s", SCALE_2_NAME, "ac");
if (test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
if (test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "ac");
- HDsnprintf(name, sizeof(name), "%s%s", SCALE_3_NAME, "ac");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "ac");
+ snprintf(name, sizeof(name), "%s%s", SCALE_3_NAME, "ac");
if (test_set_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
@@ -1878,79 +1878,79 @@ test_short_scalenames(const char *fileext)
char scalename[32];
char name[32];
- HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "as");
+ snprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "as");
if ((fid = open_test_file(fileext)) < 0)
goto out;
HL_TESTING2("set short scale/cmp scale name");
if ((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "as");
- HDsnprintf(name, sizeof(name), "%s%s", SCALE_1_NAME, "as");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "as");
+ snprintf(name, sizeof(name), "%s%s", SCALE_1_NAME, "as");
if (test_set_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
if (test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_11_NAME, "as");
- HDsnprintf(name, sizeof(name), "%s%s", SCALE_11_NAME, "as");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_11_NAME, "as");
+ snprintf(name, sizeof(name), "%s%s", SCALE_11_NAME, "as");
if (test_set_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
if (test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "as");
- HDsnprintf(name, sizeof(name), "%s%s", SCALE_2_NAME, "as");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "as");
+ snprintf(name, sizeof(name), "%s%s", SCALE_2_NAME, "as");
if (test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
if (test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_21_NAME, "as");
- HDsnprintf(name, sizeof(name), "%s%s", SCALE_21_NAME, "as");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_21_NAME, "as");
+ snprintf(name, sizeof(name), "%s%s", SCALE_21_NAME, "as");
if (test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
if (test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_22_NAME, "as");
- HDsnprintf(name, sizeof(name), "%s%s", SCALE_22_NAME, "as");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_22_NAME, "as");
+ snprintf(name, sizeof(name), "%s%s", SCALE_22_NAME, "as");
if (test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
if (test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "as");
- HDsnprintf(name, sizeof(name), "%s%s", SCALE_3_NAME, "as");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "as");
+ snprintf(name, sizeof(name), "%s%s", SCALE_3_NAME, "as");
if (test_set_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
if (test_cmp_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_31_NAME, "as");
- HDsnprintf(name, sizeof(name), "%s%s", SCALE_31_NAME, "as");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_31_NAME, "as");
+ snprintf(name, sizeof(name), "%s%s", SCALE_31_NAME, "as");
if (test_set_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
if (test_cmp_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_32_NAME, "as");
- HDsnprintf(name, sizeof(name), "%s%s", SCALE_32_NAME, "as");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_32_NAME, "as");
+ snprintf(name, sizeof(name), "%s%s", SCALE_32_NAME, "as");
if (test_set_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
if (test_cmp_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_33_NAME, "as");
- HDsnprintf(name, sizeof(name), "%s%s", SCALE_33_NAME, "as");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_33_NAME, "as");
+ snprintf(name, sizeof(name), "%s%s", SCALE_33_NAME, "as");
if (test_set_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
@@ -1990,47 +1990,47 @@ test_int_scalenames(const char *fileext)
char scalename[32];
char name[32];
- HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "a");
+ snprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "a");
if ((fid = open_test_file(fileext)) < 0)
goto out;
HL_TESTING2("set int scale/cmp scale name");
if ((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "a");
- HDsnprintf(name, sizeof(name), "%s%s", SCALE_1_NAME, "a");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "a");
+ snprintf(name, sizeof(name), "%s%s", SCALE_1_NAME, "a");
if (test_set_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
if (test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_11_NAME, "a");
- HDsnprintf(name, sizeof(name), "%s%s", SCALE_11_NAME, "a");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_11_NAME, "a");
+ snprintf(name, sizeof(name), "%s%s", SCALE_11_NAME, "a");
if (test_set_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
if (test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "a");
- HDsnprintf(name, sizeof(name), "%s%s", SCALE_2_NAME, "a");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "a");
+ snprintf(name, sizeof(name), "%s%s", SCALE_2_NAME, "a");
if (test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
if (test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_21_NAME, "a");
- HDsnprintf(name, sizeof(name), "%s%s", SCALE_21_NAME, "a");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_21_NAME, "a");
+ snprintf(name, sizeof(name), "%s%s", SCALE_21_NAME, "a");
if (test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
if (test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_22_NAME, "a");
- HDsnprintf(name, sizeof(name), "%s%s", SCALE_22_NAME, "a");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_22_NAME, "a");
+ snprintf(name, sizeof(name), "%s%s", SCALE_22_NAME, "a");
if (test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
@@ -2070,39 +2070,39 @@ test_long_scalenames(const char *fileext)
char scalename[32];
char name[32];
- HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "al");
+ snprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "al");
if ((fid = open_test_file(fileext)) < 0)
goto out;
HL_TESTING2("set long scale/cmp scale name");
if ((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "al");
- HDsnprintf(name, sizeof(name), "%s%s", SCALE_1_NAME, "al");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "al");
+ snprintf(name, sizeof(name), "%s%s", SCALE_1_NAME, "al");
if (test_set_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
if (test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "al");
- HDsnprintf(name, sizeof(name), "%s%s", SCALE_2_NAME, "al");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "al");
+ snprintf(name, sizeof(name), "%s%s", SCALE_2_NAME, "al");
if (test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
if (test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "al");
- HDsnprintf(name, sizeof(name), "%s%s", SCALE_3_NAME, "al");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "al");
+ snprintf(name, sizeof(name), "%s%s", SCALE_3_NAME, "al");
if (test_set_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
if (test_cmp_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_4_NAME, "al");
- HDsnprintf(name, sizeof(name), "%s%s", SCALE_4_NAME, "al");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_4_NAME, "al");
+ snprintf(name, sizeof(name), "%s%s", SCALE_4_NAME, "al");
if (test_set_scalename(fid, did, scalename, name, DIM3) < 0)
goto out;
@@ -2142,39 +2142,39 @@ test_samelong_scalenames(const char *fileext)
char scalename[32];
char name[32];
- HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "al2");
+ snprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "al2");
if ((fid = open_test_file(fileext)) < 0)
goto out;
HL_TESTING2("set same long scale/cmp scale name");
if ((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "al");
- HDsnprintf(name, sizeof(name), "%s%s", DS_1_NAME, "al");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "al");
+ snprintf(name, sizeof(name), "%s%s", DS_1_NAME, "al");
if (test_set_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
if (test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "al");
- HDsnprintf(name, sizeof(name), "%s%s", DS_2_NAME, "al");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "al");
+ snprintf(name, sizeof(name), "%s%s", DS_2_NAME, "al");
if (test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
if (test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "al");
- HDsnprintf(name, sizeof(name), "%s%s", DS_3_NAME, "al");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_3_NAME, "al");
+ snprintf(name, sizeof(name), "%s%s", DS_3_NAME, "al");
if (test_set_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
if (test_cmp_scalename(fid, did, scalename, name, DIM2) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_4_NAME, "al");
- HDsnprintf(name, sizeof(name), "%s%s", DS_4_NAME, "al");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_4_NAME, "al");
+ snprintf(name, sizeof(name), "%s%s", DS_4_NAME, "al");
if (test_set_scalename(fid, did, scalename, name, DIM3) < 0)
goto out;
@@ -2214,47 +2214,47 @@ test_float_scalenames(const char *fileext)
char scalename[32];
char name[32];
- HDsnprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "af");
+ snprintf(dsname, sizeof(dsname), "%s%s", DATASET_NAME, "af");
if ((fid = open_test_file(fileext)) < 0)
goto out;
HL_TESTING2("set float scale/cmp scale name");
if ((did = H5Dopen2(fid, dsname, H5P_DEFAULT)) >= 0) {
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "af");
- HDsnprintf(name, sizeof(name), "%s%s", SCALE_1_NAME, "af");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_1_NAME, "af");
+ snprintf(name, sizeof(name), "%s%s", SCALE_1_NAME, "af");
if (test_set_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
if (test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_11_NAME, "af");
- HDsnprintf(name, sizeof(name), "%s%s", SCALE_11_NAME, "af");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_11_NAME, "af");
+ snprintf(name, sizeof(name), "%s%s", SCALE_11_NAME, "af");
if (test_set_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
if (test_cmp_scalename(fid, did, scalename, name, DIM0) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "af");
- HDsnprintf(name, sizeof(name), "%s%s", SCALE_2_NAME, "af");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_2_NAME, "af");
+ snprintf(name, sizeof(name), "%s%s", SCALE_2_NAME, "af");
if (test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
if (test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_21_NAME, "af");
- HDsnprintf(name, sizeof(name), "%s%s", SCALE_21_NAME, "af");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_21_NAME, "af");
+ snprintf(name, sizeof(name), "%s%s", SCALE_21_NAME, "af");
if (test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
if (test_cmp_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
- HDsnprintf(scalename, sizeof(scalename), "%s%s", DS_22_NAME, "af");
- HDsnprintf(name, sizeof(name), "%s%s", SCALE_22_NAME, "af");
+ snprintf(scalename, sizeof(scalename), "%s%s", DS_22_NAME, "af");
+ snprintf(name, sizeof(name), "%s%s", SCALE_22_NAME, "af");
if (test_set_scalename(fid, did, scalename, name, DIM1) < 0)
goto out;
@@ -2371,7 +2371,7 @@ test_simple(void)
char snames[3];
int i, j;
- HDprintf("Testing API functions\n");
+ printf("Testing API functions\n");
/*-------------------------------------------------------------------------
* create a file for the test
@@ -2983,10 +2983,10 @@ test_simple(void)
if ((sid = H5Screate_simple(rank, dims, NULL)) < 0)
goto out;
for (i = 0; i < 5; i++) {
- HDsnprintf(dname, sizeof(dname), "dset_%d", i);
+ snprintf(dname, sizeof(dname), "dset_%d", i);
if ((did = H5Dcreate2(gid, dname, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
- HDsnprintf(sname, sizeof(sname), "ds_%d", i);
+ snprintf(sname, sizeof(sname), "ds_%d", i);
if ((dsid = H5Dcreate2(gid, sname, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
if (H5DSset_scale(dsid, "scale") < 0)
@@ -3003,11 +3003,11 @@ test_simple(void)
*/
for (i = 0; i < 5; i++) {
- HDsnprintf(dname, sizeof(dname), "dset_%d", i);
+ snprintf(dname, sizeof(dname), "dset_%d", i);
if ((did = H5Dopen2(gid, dname, H5P_DEFAULT)) < 0)
goto out;
for (j = 0; j < 5; j++) {
- HDsnprintf(sname, sizeof(sname), "ds_%d", j);
+ snprintf(sname, sizeof(sname), "ds_%d", j);
if ((dsid = H5Dopen2(gid, sname, H5P_DEFAULT)) < 0)
goto out;
if (H5DSattach_scale(did, dsid, DIM0) < 0)
@@ -3025,11 +3025,11 @@ test_simple(void)
*/
for (i = 0; i < 5; i++) {
- HDsnprintf(dname, sizeof(dname), "dset_%d", i);
+ snprintf(dname, sizeof(dname), "dset_%d", i);
if ((did = H5Dopen2(gid, dname, H5P_DEFAULT)) < 0)
goto out;
for (j = 0; j < 5; j++) {
- HDsnprintf(sname, sizeof(sname), "ds_%d", j);
+ snprintf(sname, sizeof(sname), "ds_%d", j);
if ((dsid = H5Dopen2(gid, sname, H5P_DEFAULT)) < 0)
goto out;
if (H5DSdetach_scale(did, dsid, DIM0) < 0)
@@ -3047,11 +3047,11 @@ test_simple(void)
*/
for (i = 0; i < 5; i++) {
- HDsnprintf(dname, sizeof(dname), "dset_%d", i);
+ snprintf(dname, sizeof(dname), "dset_%d", i);
if ((did = H5Dopen2(gid, dname, H5P_DEFAULT)) < 0)
goto out;
for (j = 0; j < 5; j++) {
- HDsnprintf(sname, sizeof(sname), "ds_%d", j);
+ snprintf(sname, sizeof(sname), "ds_%d", j);
if ((dsid = H5Dopen2(gid, sname, H5P_DEFAULT)) < 0)
goto out;
if (H5DSattach_scale(did, dsid, DIM0) < 0)
@@ -3145,9 +3145,9 @@ test_simple(void)
goto out;
if (H5DSget_label(did, DIM1, dim1_label, sizeof(dim1_label)) < 0)
goto out;
- if (HDstrncmp(DIM0_LABEL, dim0_label, sizeof(dim0_label)) != 0)
+ if (strncmp(DIM0_LABEL, dim0_label, sizeof(dim0_label)) != 0)
goto out;
- if (HDstrncmp(DIM1_LABEL, dim1_label, sizeof(dim1_label)) != 0)
+ if (strncmp(DIM1_LABEL, dim1_label, sizeof(dim1_label)) != 0)
goto out;
/*-------------------------------------------------------------------------
@@ -3161,24 +3161,24 @@ test_simple(void)
goto out;
/* allocate */
- dim0_labeld = (char *)HDmalloc((size_t)dim0_label_size * sizeof(char));
- dim1_labeld = (char *)HDmalloc((size_t)dim1_label_size * sizeof(char));
+ dim0_labeld = (char *)malloc((size_t)dim0_label_size * sizeof(char));
+ dim1_labeld = (char *)malloc((size_t)dim1_label_size * sizeof(char));
if (dim0_labeld == NULL || dim1_labeld == NULL)
goto out;
if (H5DSget_label(did, DIM0, dim0_labeld, (size_t)dim0_label_size) < 0)
goto out;
if (H5DSget_label(did, DIM1, dim1_labeld, (size_t)dim1_label_size) < 0)
goto out;
- if (HDstrncmp(DIM0_LABEL, dim0_labeld, (size_t)(dim0_label_size - 1)) != 0)
+ if (strncmp(DIM0_LABEL, dim0_labeld, (size_t)(dim0_label_size - 1)) != 0)
goto out;
- if (HDstrncmp(DIM1_LABEL, dim1_labeld, (size_t)(dim1_label_size - 1)) != 0)
+ if (strncmp(DIM1_LABEL, dim1_labeld, (size_t)(dim1_label_size - 1)) != 0)
goto out;
if (dim0_labeld) {
- HDfree(dim0_labeld);
+ free(dim0_labeld);
dim0_labeld = NULL;
}
if (dim1_labeld) {
- HDfree(dim1_labeld);
+ free(dim1_labeld);
dim1_labeld = NULL;
}
@@ -3191,9 +3191,9 @@ test_simple(void)
goto out;
if (H5DSget_label(did, DIM1, dim1_labels, sizeof(dim1_labels)) < 0)
goto out;
- if (HDstrncmp(DIM0_LABEL, dim0_labels, sizeof(dim0_labels) - 1) != 0)
+ if (strncmp(DIM0_LABEL, dim0_labels, sizeof(dim0_labels) - 1) != 0)
goto out;
- if (HDstrncmp(DIM1_LABEL, dim1_labels, sizeof(dim1_labels) - 1) != 0)
+ if (strncmp(DIM1_LABEL, dim1_labels, sizeof(dim1_labels) - 1) != 0)
goto out;
if (H5Dclose(did))
goto out;
@@ -3225,7 +3225,7 @@ test_simple(void)
goto out;
/* allocate a buffer */
- name_out = (char *)HDmalloc(((size_t)name_len + 1) * sizeof(char));
+ name_out = (char *)malloc(((size_t)name_len + 1) * sizeof(char));
if (name_out == NULL)
goto out;
@@ -3233,10 +3233,10 @@ test_simple(void)
if (H5DSget_scale_name(dsid, name_out, (size_t)name_len + 1) < 0)
goto out;
- if (HDstrncmp("Latitude set 0", name_out, (size_t)name_len) != 0)
+ if (strncmp("Latitude set 0", name_out, (size_t)name_len) != 0)
goto out;
if (name_out) {
- HDfree(name_out);
+ free(name_out);
name_out = NULL;
}
@@ -3249,7 +3249,7 @@ test_simple(void)
if (H5DSget_scale_name(dsid, sname, sizeof(sname)) < 0)
goto out;
- if (HDstrncmp("Latitude set 0", sname, sizeof(sname)) != 0)
+ if (strncmp("Latitude set 0", sname, sizeof(sname)) != 0)
goto out;
/*-------------------------------------------------------------------------
@@ -3261,7 +3261,7 @@ test_simple(void)
if (H5DSget_scale_name(dsid, snames, sizeof(snames)) < 0)
goto out;
- if (HDstrncmp("Latitude set 0", snames, sizeof(snames) - 1) != 0)
+ if (strncmp("Latitude set 0", snames, sizeof(snames) - 1) != 0)
goto out;
if (H5Dclose(dsid))
goto out;
@@ -3497,7 +3497,7 @@ test_simple(void)
goto out;
break;
default:
- HDassert(0);
+ assert(0);
break;
} /*switch*/
} /*for*/
@@ -3627,7 +3627,7 @@ read_scale(hid_t dset, unsigned dim, hid_t scale_id, void *visitor_data)
goto out;
if (nelmts) {
- buf = (char *)HDmalloc(((size_t)nelmts * size));
+ buf = (char *)malloc(((size_t)nelmts * size));
if (buf == NULL)
goto out;
if (H5Dread(scale_id, mtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
@@ -3635,7 +3635,7 @@ read_scale(hid_t dset, unsigned dim, hid_t scale_id, void *visitor_data)
for (i = 0; i < nelmts; i++) {
if (buf[i] != data[i]) {
- HDprintf("read and write buffers differ\n");
+ printf("read and write buffers differ\n");
goto out;
}
}
@@ -3649,7 +3649,7 @@ read_scale(hid_t dset, unsigned dim, hid_t scale_id, void *visitor_data)
if (H5Tclose(mtid) < 0)
goto out;
if (buf)
- HDfree(buf);
+ free(buf);
return ret;
@@ -3661,7 +3661,7 @@ out:
H5Tclose(tid);
H5Tclose(mtid);
if (buf) {
- HDfree(buf);
+ free(buf);
}
}
H5E_END_TRY
@@ -3839,7 +3839,7 @@ test_errors(void)
hid_t sidds = -1; /* space ID */
hsize_t pal_dims[] = {9, 3};
- HDprintf("Testing error conditions\n");
+ printf("Testing error conditions\n");
/*-------------------------------------------------------------------------
* create a file, spaces, dataset and group ids
@@ -4213,7 +4213,7 @@ test_iterators(void)
char dname[30]; /* dataset name */
int i;
- HDprintf("Testing iterators\n");
+ printf("Testing iterators\n");
/*-------------------------------------------------------------------------
* create a file, spaces, dataset and group ids
@@ -4291,7 +4291,7 @@ test_iterators(void)
for (i = 0; i < 100; i++) {
/* make a DS */
- HDsnprintf(dname, sizeof(dname), "ds_%d", i);
+ snprintf(dname, sizeof(dname), "ds_%d", i);
if (H5LTmake_dataset_int(fid, dname, rankds, s1_dim, NULL) < 0)
goto out;
/* open */
@@ -4403,7 +4403,7 @@ test_rank(void)
float buff[1] = {1};
int i;
- HDprintf("Testing ranks\n");
+ printf("Testing ranks\n");
/*-------------------------------------------------------------------------
* create a file, a dataset, scales
@@ -4441,7 +4441,7 @@ test_rank(void)
goto out;
for (i = 0; i < 3; i++) {
- HDsnprintf(name, sizeof(name), "ds_a_%d", i);
+ snprintf(name, sizeof(name), "ds_a_%d", i);
if ((dsid = H5Dopen2(fid, name, H5P_DEFAULT)) < 0)
goto out;
if (H5DSattach_scale(did, dsid, (unsigned)i) < 0)
@@ -4468,7 +4468,7 @@ test_rank(void)
goto out;
for (i = 0; i < 3; i++) {
- HDsnprintf(name, sizeof(name), "ds_a_%d", i);
+ snprintf(name, sizeof(name), "ds_a_%d", i);
if ((dsid = H5Dopen2(fid, name, H5P_DEFAULT)) < 0)
goto out;
if (H5DSdetach_scale(did, dsid, (unsigned)i) < 0)
@@ -4494,7 +4494,7 @@ test_rank(void)
goto out;
for (i = 0; i < 3; i++) {
- HDsnprintf(name, sizeof(name), "ds_a_%d", i);
+ snprintf(name, sizeof(name), "ds_a_%d", i);
if ((dsid = H5Dopen2(fid, name, H5P_DEFAULT)) < 0)
goto out;
if (H5DSset_scale(dsid, name) < 0)
@@ -4511,9 +4511,9 @@ test_rank(void)
goto out;
if (H5DSget_label(did, (unsigned)i, namel, sizeof(namel)) < 0)
goto out;
- if (HDstrncmp(name, names, sizeof(names)) != 0)
+ if (strncmp(name, names, sizeof(names)) != 0)
goto out;
- if (HDstrncmp(name, namel, sizeof(namel)) != 0)
+ if (strncmp(name, namel, sizeof(namel)) != 0)
goto out;
}
@@ -4610,7 +4610,7 @@ test_types(void)
const char *s1_str = "ABC";
const char *s2_str = "ABCD";
- HDprintf("Testing scales with several datatypes\n");
+ printf("Testing scales with several datatypes\n");
/*-------------------------------------------------------------------------
* create a file for the test
@@ -4788,7 +4788,7 @@ test_data(void)
hsize_t londims[1]; /* array to hold dimensions */
float fill = -99; /* fill value */
- HDprintf("Testing reading ASCII data and generate HDF5 data with scales\n");
+ printf("Testing reading ASCII data and generate HDF5 data with scales\n");
/*-------------------------------------------------------------------------
* create a file for the test
@@ -4818,7 +4818,7 @@ test_data(void)
if (H5LTmake_dataset_float(fid, "lat", 1, latdims, latbuf) < 0)
goto out;
- HDfree(latbuf);
+ free(latbuf);
latbuf = NULL;
/* read the longitude */
@@ -4829,7 +4829,7 @@ test_data(void)
if (H5LTmake_dataset_float(fid, "lon", 1, londims, lonbuf) < 0)
goto out;
- HDfree(lonbuf);
+ free(lonbuf);
lonbuf = NULL;
/* make a dataset for the data. a fill value is set */
@@ -4849,7 +4849,7 @@ test_data(void)
if (H5Dwrite(did, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, vals) < 0)
goto out;
- HDfree(vals);
+ free(vals);
vals = NULL;
if (H5Dclose(did) < 0)
@@ -4924,11 +4924,11 @@ out:
H5_FAILED();
if (latbuf)
- HDfree(latbuf);
+ free(latbuf);
if (lonbuf)
- HDfree(lonbuf);
+ free(lonbuf);
if (vals)
- HDfree(vals);
+ free(vals);
return FAIL;
}
@@ -4957,44 +4957,44 @@ read_data(const char *fname, int ndims, hsize_t *dims, float **buf)
const char *data_file = H5_get_srcdir_filename(fname);
/* read first data file */
- f = HDfopen(data_file, "r");
+ f = fopen(data_file, "r");
if (f == NULL) {
- HDprintf("Could not open file %s\n", data_file);
+ printf("Could not open file %s\n", data_file);
return -1;
}
for (i = 0, nelms = 1; i < ndims; i++) {
- if (HDfscanf(f, "%s %u", str, &j) && HDferror(f)) {
- HDprintf("fscanf error in file %s\n", data_file);
- HDfclose(f);
+ if (fscanf(f, "%s %u", str, &j) && ferror(f)) {
+ printf("fscanf error in file %s\n", data_file);
+ fclose(f);
return -1;
} /* end if */
- if (HDfscanf(f, "%d", &n) < 0 && HDferror(f)) {
- HDprintf("fscanf error in file %s\n", data_file);
- HDfclose(f);
+ if (fscanf(f, "%d", &n) < 0 && ferror(f)) {
+ printf("fscanf error in file %s\n", data_file);
+ fclose(f);
return -1;
} /* end if */
dims[i] = (hsize_t)n;
nelms *= (size_t)n;
}
- *buf = (float *)HDmalloc(nelms * sizeof(float));
+ *buf = (float *)malloc(nelms * sizeof(float));
if (*buf == NULL) {
- HDprintf("memory allocation failed\n");
- HDfclose(f);
+ printf("memory allocation failed\n");
+ fclose(f);
return -1;
}
for (j = 0; j < nelms; j++) {
- if (HDfscanf(f, "%f", &val) < 0 && HDferror(f)) {
- HDprintf("fscanf error in file %s\n", data_file);
- HDfclose(f);
+ if (fscanf(f, "%f", &val) < 0 && ferror(f)) {
+ printf("fscanf error in file %s\n", data_file);
+ fclose(f);
return -1;
} /* end if */
(*buf)[j] = val;
}
- HDfclose(f);
+ fclose(f);
return 1;
}
@@ -5018,7 +5018,7 @@ test_errors2(void)
int nscales; /* number of scales in DIM */
int count; /* visitor data */
- HDprintf("Testing parameter errors\n");
+ printf("Testing parameter errors\n");
/*-------------------------------------------------------------------------
* create a file, a dataset, scales
@@ -5100,7 +5100,7 @@ test_errors2(void)
goto out;
if ((label_len = H5DSget_label(did, 0, NULL, 0)) < 0)
goto out;
- if (label_len != HDstrlen("label"))
+ if (label_len != strlen("label"))
goto out;
if (H5DSget_label(did, 0, lbuf, sizeof(lbuf)) < 0)
goto out;