summaryrefslogtreecommitdiffstats
path: root/hl/test
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-07-27 23:38:50 (GMT)
committerGitHub <noreply@github.com>2023-07-27 23:38:50 (GMT)
commite286b6e706b28330a64115c13c11ae832536b857 (patch)
treea7fdc80d328010b9c6671829f8b19ea433a4380c /hl/test
parent41a6b581aef055821796fc9d31f58778dc1c4197 (diff)
downloadhdf5-e286b6e706b28330a64115c13c11ae832536b857.zip
hdf5-e286b6e706b28330a64115c13c11ae832536b857.tar.gz
hdf5-e286b6e706b28330a64115c13c11ae832536b857.tar.bz2
Sync high-level library with develop (#3298)
Diffstat (limited to 'hl/test')
-rw-r--r--hl/test/gen_test_ds.c10
-rw-r--r--hl/test/gen_test_ld.c6
-rw-r--r--hl/test/h5hltest.h8
-rw-r--r--hl/test/test_ds.c450
-rw-r--r--hl/test/test_dset_append.c16
-rw-r--r--hl/test/test_file_image.c12
-rw-r--r--hl/test/test_h5do_compat.c12
-rw-r--r--hl/test/test_image.c72
-rw-r--r--hl/test/test_ld.c57
-rw-r--r--hl/test/test_lite.c79
-rw-r--r--hl/test/test_packet.c4
-rw-r--r--hl/test/test_packet_vlen.c40
-rw-r--r--hl/test/test_table.c36
13 files changed, 401 insertions, 401 deletions
diff --git a/hl/test/gen_test_ds.c b/hl/test/gen_test_ds.c
index 27a98e7..438a35a 100644
--- a/hl/test/gen_test_ds.c
+++ b/hl/test/gen_test_ds.c
@@ -336,7 +336,7 @@ out:
H5Dclose(did);
H5Fclose(fid);
}
- H5E_END_TRY;
+ H5E_END_TRY
H5_FAILED();
@@ -400,7 +400,7 @@ out:
H5Dclose(did);
H5Fclose(fid);
}
- H5E_END_TRY;
+ H5E_END_TRY
H5_FAILED();
@@ -480,7 +480,7 @@ out:
H5Dclose(did);
H5Fclose(fid);
}
- H5E_END_TRY;
+ H5E_END_TRY
H5_FAILED();
@@ -561,7 +561,7 @@ out:
H5Dclose(did);
H5Fclose(fid);
}
- H5E_END_TRY;
+ H5E_END_TRY
H5_FAILED();
@@ -609,7 +609,7 @@ out:
H5Dclose(did);
H5Fclose(fid);
}
- H5E_END_TRY;
+ H5E_END_TRY
H5_FAILED();
diff --git a/hl/test/gen_test_ld.c b/hl/test/gen_test_ld.c
index 8eacf55..7eefd5c 100644
--- a/hl/test/gen_test_ld.c
+++ b/hl/test/gen_test_ld.c
@@ -103,7 +103,7 @@ generate_dset(hid_t fid, const char *dname, int ndims, hsize_t *dims, hsize_t *m
goto done;
/* Set up dataset's creation properties */
- if (!HDstrcmp(dname, DSET_NONE))
+ if (!strcmp(dname, DSET_NONE))
dcpl = H5P_DEFAULT;
else {
hsize_t chunk_dims[H5S_MAX_RANK]; /* Dimension sizes for chunks */
@@ -116,11 +116,11 @@ generate_dset(hid_t fid, const char *dname, int ndims, hsize_t *dims, hsize_t *m
goto done;
} /* end else */
- if (!HDstrcmp(dname, DSET_ALLOC_LATE)) {
+ if (!strcmp(dname, DSET_ALLOC_LATE)) {
if (H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_LATE) < 0)
goto done;
} /* end if */
- else if (!HDstrcmp(dname, DSET_ALLOC_EARLY)) {
+ else if (!strcmp(dname, DSET_ALLOC_EARLY)) {
if (H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_EARLY) < 0)
goto done;
} /* end if */
diff --git a/hl/test/h5hltest.h b/hl/test/h5hltest.h
index 6f31050..3d58ed6 100644
--- a/hl/test/h5hltest.h
+++ b/hl/test/h5hltest.h
@@ -27,13 +27,13 @@
/* Macros used in HL tests */
#define HL_TESTING2(WHAT) \
do { \
- HDprintf("Testing %-62s", WHAT); \
- HDfflush(stdout); \
+ printf("Testing %-62s", WHAT); \
+ fflush(stdout); \
} while (0)
#define HL_TESTING3(WHAT) \
do { \
- HDprintf("Testing %-62s", WHAT); \
- HDfflush(stdout); \
+ printf("Testing %-62s", WHAT); \
+ fflush(stdout); \
} while (0)
/* Implements verbose 'assert' with 'goto error' exit */
diff --git a/hl/test/test_ds.c b/hl/test/test_ds.c
index 3d31786..f85ed81 100644
--- a/hl/test/test_ds.c
+++ b/hl/test/test_ds.c
@@ -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)
@@ -1178,7 +1178,7 @@ test_cmp_scalename(hid_t fid, hid_t did, const char *name, const char *scalename
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;
}
free(name_out);
@@ -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)
@@ -1331,7 +1331,7 @@ out:
H5Dclose(dsid);
H5Fclose(fid);
}
- H5E_END_TRY;
+ H5E_END_TRY
H5_FAILED();
@@ -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;
@@ -1387,7 +1387,7 @@ out:
H5Dclose(did);
H5Fclose(fid);
}
- H5E_END_TRY;
+ H5E_END_TRY
H5_FAILED();
@@ -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;
@@ -1467,7 +1467,7 @@ out:
H5Dclose(did);
H5Fclose(fid);
}
- H5E_END_TRY;
+ H5E_END_TRY
H5_FAILED();
@@ -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;
@@ -1531,7 +1531,7 @@ out:
H5Dclose(did);
H5Fclose(fid);
}
- H5E_END_TRY;
+ H5E_END_TRY
H5_FAILED();
@@ -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;
@@ -1591,7 +1591,7 @@ out:
H5Dclose(did);
H5Fclose(fid);
}
- H5E_END_TRY;
+ H5E_END_TRY
H5_FAILED();
@@ -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;
@@ -1651,7 +1651,7 @@ out:
H5Dclose(did);
H5Fclose(fid);
}
- H5E_END_TRY;
+ H5E_END_TRY
H5_FAILED();
@@ -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;
@@ -1715,7 +1715,7 @@ out:
H5Dclose(did);
H5Fclose(fid);
}
- H5E_END_TRY;
+ H5E_END_TRY
H5_FAILED();
@@ -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;
@@ -1798,7 +1798,7 @@ out:
H5Dclose(did);
H5Fclose(fid);
}
- H5E_END_TRY;
+ H5E_END_TRY
H5_FAILED();
@@ -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;
@@ -1862,7 +1862,7 @@ out:
H5Dclose(did);
H5Fclose(fid);
}
- H5E_END_TRY;
+ H5E_END_TRY
H5_FAILED();
@@ -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;
@@ -1974,7 +1974,7 @@ out:
H5Dclose(did);
H5Fclose(fid);
}
- H5E_END_TRY;
+ H5E_END_TRY
H5_FAILED();
@@ -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;
@@ -2054,7 +2054,7 @@ out:
H5Dclose(did);
H5Fclose(fid);
}
- H5E_END_TRY;
+ H5E_END_TRY
H5_FAILED();
@@ -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;
@@ -2126,7 +2126,7 @@ out:
H5Dclose(did);
H5Fclose(fid);
}
- H5E_END_TRY;
+ H5E_END_TRY
H5_FAILED();
@@ -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;
@@ -2198,7 +2198,7 @@ out:
H5Dclose(did);
H5Fclose(fid);
}
- H5E_END_TRY;
+ H5E_END_TRY
H5_FAILED();
@@ -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;
@@ -2278,7 +2278,7 @@ out:
H5Dclose(did);
H5Fclose(fid);
}
- H5E_END_TRY;
+ H5E_END_TRY
H5_FAILED();
@@ -2327,7 +2327,7 @@ out:
H5Dclose(did);
H5Fclose(fid);
}
- H5E_END_TRY;
+ H5E_END_TRY
H5_FAILED();
@@ -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;
/*-------------------------------------------------------------------------
@@ -3169,9 +3169,9 @@ test_simple(void)
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) {
free(dim0_labeld);
@@ -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;
@@ -3233,7 +3233,7 @@ 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) {
free(name_out);
@@ -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;
@@ -3530,7 +3530,7 @@ out:
H5Sclose(sid);
H5Gclose(gid);
}
- H5E_END_TRY;
+ H5E_END_TRY
H5_FAILED();
return FAIL;
}
@@ -3664,7 +3664,7 @@ out:
free(buf);
}
}
- H5E_END_TRY;
+ H5E_END_TRY
return FAIL;
}
@@ -3749,7 +3749,7 @@ out:
{
H5Sclose(sid);
}
- H5E_END_TRY;
+ H5E_END_TRY
return FAIL;
}
@@ -4189,7 +4189,7 @@ out:
H5Gclose(gid);
H5Fclose(fid);
}
- H5E_END_TRY;
+ H5E_END_TRY
H5_FAILED();
return FAIL;
}
@@ -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 */
@@ -4374,7 +4374,7 @@ out:
H5Dclose(did);
H5Fclose(fid);
}
- H5E_END_TRY;
+ H5E_END_TRY
H5_FAILED();
return FAIL;
}
@@ -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;
}
@@ -4583,7 +4583,7 @@ out:
H5Sclose(sid);
H5Fclose(fid);
}
- H5E_END_TRY;
+ H5E_END_TRY
H5_FAILED();
return FAIL;
}
@@ -4762,7 +4762,7 @@ out:
H5Dclose(dsid);
H5Fclose(fid);
}
- H5E_END_TRY;
+ H5E_END_TRY
H5_FAILED();
return FAIL;
}
@@ -4920,7 +4920,7 @@ out:
H5Dclose(dsid);
H5Fclose(fid);
}
- H5E_END_TRY;
+ H5E_END_TRY
H5_FAILED();
if (latbuf)
@@ -4964,14 +4964,14 @@ read_data(const char *fname, int ndims, hsize_t *dims, float **buf)
}
for (i = 0, nelms = 1; i < ndims; i++) {
- if (HDfscanf(f, "%s %u", str, &j) && HDferror(f)) {
+ if (fscanf(f, "%s %u", str, &j) && ferror(f)) {
printf("fscanf error in file %s\n", data_file);
- HDfclose(f);
+ fclose(f);
return -1;
} /* end if */
- if (HDfscanf(f, "%d", &n) < 0 && HDferror(f)) {
+ if (fscanf(f, "%d", &n) < 0 && ferror(f)) {
printf("fscanf error in file %s\n", data_file);
- HDfclose(f);
+ fclose(f);
return -1;
} /* end if */
dims[i] = (hsize_t)n;
@@ -4982,19 +4982,19 @@ read_data(const char *fname, int ndims, hsize_t *dims, float **buf)
if (*buf == NULL) {
printf("memory allocation failed\n");
- HDfclose(f);
+ fclose(f);
return -1;
}
for (j = 0; j < nelms; j++) {
- if (HDfscanf(f, "%f", &val) < 0 && HDferror(f)) {
+ if (fscanf(f, "%f", &val) < 0 && ferror(f)) {
printf("fscanf error in file %s\n", data_file);
- HDfclose(f);
+ fclose(f);
return -1;
} /* end if */
(*buf)[j] = val;
}
- HDfclose(f);
+ fclose(f);
return 1;
}
@@ -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;
@@ -5187,7 +5187,7 @@ out:
H5Dclose(dsid);
H5Fclose(fid);
}
- H5E_END_TRY;
+ H5E_END_TRY
H5_FAILED();
return FAIL;
}
@@ -5428,7 +5428,7 @@ out:
H5Gclose(gid);
H5Fclose(fid);
}
- H5E_END_TRY;
+ H5E_END_TRY
H5_FAILED();
return FAIL;
}
diff --git a/hl/test/test_dset_append.c b/hl/test/test_dset_append.c
index d6f103e..4b07582 100644
--- a/hl/test/test_dset_append.c
+++ b/hl/test/test_dset_append.c
@@ -120,7 +120,7 @@ error:
H5Dclose(did);
H5Pclose(ffapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
return 1;
} /* test_dataset_append_notset() */
@@ -292,7 +292,7 @@ error:
H5Dclose(did);
H5Pclose(ffapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
return 1;
} /* test_dataset_append_rows_columns() */
@@ -426,7 +426,7 @@ error:
H5Dclose(did);
H5Pclose(ffapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
return 1;
} /* test_dataset_append_rows() */
@@ -561,7 +561,7 @@ error:
H5Dclose(did);
H5Pclose(ffapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
return 1;
} /* test_dataset_append_columns() */
@@ -722,7 +722,7 @@ error:
H5Dclose(did);
H5Pclose(ffapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
return 1;
} /* test_dataset_append_BUG1() */
@@ -883,7 +883,7 @@ error:
H5Dclose(did);
H5Pclose(ffapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
return 1;
} /* test_dataset_append_BUG2() */
@@ -1040,7 +1040,7 @@ error:
H5Dclose(did);
H5Pclose(ffapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
return 1;
} /* test_dataset_append_less() */
@@ -1195,7 +1195,7 @@ error:
H5Dclose(did);
H5Pclose(ffapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
return 1;
} /* test_dataset_append_vary() */
diff --git a/hl/test/test_file_image.c b/hl/test/test_file_image.c
index e7d830b..9cb7f45 100644
--- a/hl/test/test_file_image.c
+++ b/hl/test/test_file_image.c
@@ -114,7 +114,7 @@ test_file_image(size_t open_images, size_t nflags, const unsigned *flags)
FAIL_PUTS_ERROR("malloc() failed");
/* create file name */
- HDsnprintf(filename[i], filenamelength, "image_file%d.h5", (int)i);
+ snprintf(filename[i], filenamelength, "image_file%d.h5", (int)i);
/* create file */
if ((file_id[i] = H5Fcreate(filename[i], H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -335,7 +335,7 @@ test_file_image(size_t open_images, size_t nflags, const unsigned *flags)
{
status1 = H5Dwrite(dset_id[i], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data1);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(status1 < 0, "H5Dwrite() should have failed");
@@ -344,7 +344,7 @@ test_file_image(size_t open_images, size_t nflags, const unsigned *flags)
{
status1 = H5Dset_extent(dset_id[i], dims4);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(status1 < 0, "H5Dset_extent() should have failed");
@@ -353,7 +353,7 @@ test_file_image(size_t open_images, size_t nflags, const unsigned *flags)
{
status1 = H5Dwrite(dset_id[i], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data4);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(status1 < 0, "H5Dwrite() should have failed");
@@ -408,13 +408,13 @@ test_file_image(size_t open_images, size_t nflags, const unsigned *flags)
status2 = H5Fflush(file_id[i], H5F_SCOPE_GLOBAL);
VERIFY(status1 < 0 || status2 < 0, "writing and flushing attr should have failed");
- } H5E_END_TRY;
+ } H5E_END_TRY
/* close attr and attr_space -- expect errors on close */
H5E_BEGIN_TRY {
H5Sclose(attr_space_id);
H5Aclose(attr_id);
- } H5E_END_TRY;
+ } H5E_END_TRY
#endif
if (H5Dclose(dset_id[i]) < 0)
FAIL_PUTS_ERROR("H5Dclose() failed");
diff --git a/hl/test/test_h5do_compat.c b/hl/test/test_h5do_compat.c
index bf48e9b..3d26f7e 100644
--- a/hl/test/test_h5do_compat.c
+++ b/hl/test/test_h5do_compat.c
@@ -84,7 +84,7 @@ error:
H5Sclose(sid);
H5Pclose(dcpl_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
return H5I_INVALID_HID;
@@ -223,7 +223,7 @@ error:
H5Sclose(mem_sid);
H5Sclose(file_sid);
}
- H5E_END_TRY;
+ H5E_END_TRY
H5_FAILED();
return 1;
@@ -247,8 +247,8 @@ main(void)
{
#ifdef H5_NO_DEPRECATED_SYMBOLS
- HDputs("Direct chunk read/write wrapper tests SKIPPED.");
- HDputs("(Backward compatibility not configured)");
+ puts("Direct chunk read/write wrapper tests SKIPPED.");
+ puts("(Backward compatibility not configured)");
return EXIT_SUCCESS;
#else
@@ -275,11 +275,11 @@ main(void)
if (nerrors)
goto error;
- HDputs("All direct chunk read/write wrapper tests passed.");
+ puts("All direct chunk read/write wrapper tests passed.");
return EXIT_SUCCESS;
error:
- HDputs("*** TESTS FAILED ***");
+ puts("*** TESTS FAILED ***");
return EXIT_FAILURE;
#endif /* H5_NO_DEPRECATED_SYMBOLS */
} /* end main() */
diff --git a/hl/test/test_image.c b/hl/test/test_image.c
index 6541ef5..b9f290e 100644
--- a/hl/test/test_image.c
+++ b/hl/test/test_image.c
@@ -304,7 +304,7 @@ out:
{
H5Fclose(fid);
}
- H5E_END_TRY;
+ H5E_END_TRY
H5_FAILED();
return FAIL;
}
@@ -494,7 +494,7 @@ out:
{
H5Fclose(fid);
}
- H5E_END_TRY;
+ H5E_END_TRY
H5_FAILED();
return FAIL;
@@ -579,11 +579,11 @@ test_generate(void)
!
*/
- if (HDfscanf(f, "%d %d %d", &imax, &jmax, &kmax) < 0 && HDferror(f)) {
+ if (fscanf(f, "%d %d %d", &imax, &jmax, &kmax) < 0 && ferror(f)) {
printf("fscanf error in file %s.\n", data_file);
goto out;
} /* end if */
- if (HDfscanf(f, "%f %f %f", &valex, &xmin, &xmax) < 0 && HDferror(f)) {
+ if (fscanf(f, "%f %f %f", &valex, &xmin, &xmax) < 0 && ferror(f)) {
printf("fscanf error in file %s.\n", data_file);
goto out;
} /* end if */
@@ -614,13 +614,13 @@ test_generate(void)
goto out;
for (i = 0; i < n_elements; i++) {
- if (HDfscanf(f, "%f ", &value) < 0 && HDferror(f)) {
+ if (fscanf(f, "%f ", &value) < 0 && ferror(f)) {
printf("fscanf error in file %s.\n", data_file);
goto out;
} /* end if */
data[i] = value;
}
- HDfclose(f);
+ fclose(f);
f = NULL;
/*-------------------------------------------------------------------------
@@ -730,9 +730,9 @@ out:
{
H5Fclose(fid);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (f)
- HDfclose(f);
+ fclose(f);
H5_FAILED();
return retval;
}
@@ -778,32 +778,32 @@ read_data(const char *fname, /*IN*/
goto out;
}
- if (HDfscanf(f, "%s", str) < 0 && HDferror(f)) {
+ if (fscanf(f, "%s", str) < 0 && ferror(f)) {
printf("fscanf error in file %s.\n", data_file);
goto out;
} /* end if */
- if (HDfscanf(f, "%d", &color_planes) < 0 && HDferror(f)) {
+ if (fscanf(f, "%d", &color_planes) < 0 && ferror(f)) {
printf("fscanf error in file %s.\n", data_file);
goto out;
} /* end if */
- if (HDfscanf(f, "%s", str) < 0 && HDferror(f)) {
+ if (fscanf(f, "%s", str) < 0 && ferror(f)) {
printf("fscanf error in file %s.\n", data_file);
goto out;
} /* end if */
- if (HDfscanf(f, "%d", &h) < 0 && HDferror(f)) {
+ if (fscanf(f, "%d", &h) < 0 && ferror(f)) {
printf("fscanf error in file %s.\n", data_file);
goto out;
} /* end if */
- if (HDfscanf(f, "%s", str) < 0 && HDferror(f)) {
+ if (fscanf(f, "%s", str) < 0 && ferror(f)) {
printf("fscanf error in file %s.\n", data_file);
goto out;
} /* end if */
- if (HDfscanf(f, "%d", &w) < 0 && HDferror(f)) {
+ if (fscanf(f, "%d", &w) < 0 && ferror(f)) {
printf("fscanf error in file %s.\n", data_file);
goto out;
} /* end if */
@@ -837,7 +837,7 @@ read_data(const char *fname, /*IN*/
/* Read data elements */
for (i = 0; i < n_elements; i++) {
- if (HDfscanf(f, "%d", &n) < 0 && HDferror(f)) {
+ if (fscanf(f, "%d", &n) < 0 && ferror(f)) {
printf("fscanf error in file %s.\n", data_file);
goto out;
} /* end if */
@@ -849,7 +849,7 @@ read_data(const char *fname, /*IN*/
out:
if (f)
- HDfclose(f);
+ fclose(f);
return ret_val;
} /* end read_data() */
@@ -895,34 +895,34 @@ read_palette(const char *fname, rgb_t *palette, size_t palette_size)
}
/* read the file ident string */
- if (HDfgets(buffer, sizeof(buffer), file) == NULL) {
- HDfclose(file);
+ if (fgets(buffer, sizeof(buffer), file) == NULL) {
+ fclose(file);
return -1;
}
/* ensure it matches the palette file ident string */
- if (HDstrncmp(buffer, STRING_JASC, sizeof(STRING_JASC) - 1) != 0 &&
- HDstrncmp(buffer, STRING_CWPAL, sizeof(STRING_CWPAL) - 1) != 0) {
- HDfclose(file);
+ if (strncmp(buffer, STRING_JASC, sizeof(STRING_JASC) - 1) != 0 &&
+ strncmp(buffer, STRING_CWPAL, sizeof(STRING_CWPAL) - 1) != 0) {
+ fclose(file);
return -1;
}
/* read the version string */
- if (HDfgets(buffer, sizeof(buffer), file) == NULL) {
- HDfclose(file);
+ if (fgets(buffer, sizeof(buffer), file) == NULL) {
+ fclose(file);
return -1;
}
/* ensure it matches the palette file version string */
- if (HDstrncmp(buffer, VERSION_JASC, sizeof(VERSION_JASC) - 1) != 0 &&
- HDstrncmp(buffer, VERSION_CWPAL, sizeof(VERSION_CWPAL) - 1) != 0) {
- HDfclose(file);
+ if (strncmp(buffer, VERSION_JASC, sizeof(VERSION_JASC) - 1) != 0 &&
+ strncmp(buffer, VERSION_CWPAL, sizeof(VERSION_CWPAL) - 1) != 0) {
+ fclose(file);
return -1;
}
/* read the number of colors */
- if (HDfgets(buffer, sizeof(buffer), file) == NULL) {
- HDfclose(file);
+ if (fgets(buffer, sizeof(buffer), file) == NULL) {
+ fclose(file);
return -1;
}
@@ -930,27 +930,27 @@ read_palette(const char *fname, rgb_t *palette, size_t palette_size)
check for missing version or number of colors
in this case it reads the first entry
*/
- if (HDstrlen(buffer) > 4) {
- HDfclose(file);
+ if (strlen(buffer) > 4) {
+ fclose(file);
return -1;
}
- if (HDsscanf(buffer, "%u", &nentries) != 1) {
- HDfclose(file);
+ if (sscanf(buffer, "%u", &nentries) != 1) {
+ fclose(file);
return -1;
}
/* ensure there are a sensible number of colors in the palette */
if ((nentries > 256) || (nentries > palette_size)) {
- HDfclose(file);
+ fclose(file);
return (-1);
}
/* read the palette entries */
for (u = 0; u < nentries; u++) {
/* extract the red, green and blue color components. */
- if (HDfscanf(file, "%u %u %u", &red, &green, &blue) != 3) {
- HDfclose(file);
+ if (fscanf(file, "%u %u %u", &red, &green, &blue) != 3) {
+ fclose(file);
return -1;
}
/* store this palette entry */
@@ -960,7 +960,7 @@ read_palette(const char *fname, rgb_t *palette, size_t palette_size)
}
/* close file */
- HDfclose(file);
+ fclose(file);
return (int)nentries;
}
diff --git a/hl/test/test_ld.c b/hl/test/test_ld.c
index 64bf09f..b0579d5 100644
--- a/hl/test/test_ld.c
+++ b/hl/test/test_ld.c
@@ -52,7 +52,7 @@
* Varies from 10->13; 10->9, 10->10, 10->1, 10->11
*/
#define ONE_NTESTS 5
-int one_tests[ONE_NTESTS] = {3, -1, 0, -9, 1};
+static int one_tests[ONE_NTESTS] = {3, -1, 0, -9, 1};
/*
* Test variations (retained original) for two-dimensional dataset:
@@ -61,7 +61,8 @@ int one_tests[ONE_NTESTS] = {3, -1, 0, -9, 1};
* {4,10}->{4,12}; {4,10}->{4,9}; {4,10}->{4,10}
*/
#define TWO_NTESTS 9
-int two_tests[TWO_NTESTS][2] = {{2, 2}, {2, -1}, {2, 0}, {-1, 2}, {-1, -1}, {-1, 0}, {0, 2}, {0, -1}, {0, 0}};
+static int two_tests[TWO_NTESTS][2] = {{2, 2}, {2, -1}, {2, 0}, {-1, 2}, {-1, -1},
+ {-1, 0}, {0, 2}, {0, -1}, {0, 0}};
/* Verify that the two input values are the same */
#define VERIFY_EQUAL(_x, _y) \
@@ -210,12 +211,12 @@ typedef struct test_valid_fields2 {
/* Temporary buffers for tests: test_LD_elmts_one() & test_LD_elmts_two() */
#define TEST_BUF_SIZE 100
-int *iibuf; /* buffer for storing retrieved elements */
-int *ibuf; /* buffer for storing retrieved elements (integer) */
-set_t *cbuf; /* buffer for storing retrieved elements (compound) */
-set_t *ccbuf; /* buffer for storing retrieved elements (compound) */
-test_valid_fields1 *vbuf1; /* buffer for storing retrieved elements (FIELDS1) */
-test_valid_fields2 *vbuf2; /* buffer for storing retrieved elements (FIELDS2) */
+static int *iibuf; /* buffer for storing retrieved elements */
+static int *ibuf; /* buffer for storing retrieved elements (integer) */
+static set_t *cbuf; /* buffer for storing retrieved elements (compound) */
+static set_t *ccbuf; /* buffer for storing retrieved elements (compound) */
+static test_valid_fields1 *vbuf1; /* buffer for storing retrieved elements (FIELDS1) */
+static test_valid_fields2 *vbuf2; /* buffer for storing retrieved elements (FIELDS2) */
/*
*********************************************************************************
@@ -255,7 +256,7 @@ test_LD_dims_params(const char *file)
{
ret = H5LDget_dset_dims(invalid_id, one_cur_dims);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY_EQUAL(ret, FAIL)
/*
@@ -267,7 +268,7 @@ test_LD_dims_params(const char *file)
{
ret = H5LDget_dset_dims(did, NULL);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY_EQUAL(ret, FAIL)
if (H5Dclose(did) < 0)
FAIL_STACK_ERROR;
@@ -336,7 +337,7 @@ error:
H5Dclose(did);
H5Fclose(fid);
}
- H5E_END_TRY;
+ H5E_END_TRY
return (-1);
} /* test_LD_dims_params() */
@@ -481,7 +482,7 @@ error:
H5Dclose(did);
H5Fclose(fid);
}
- H5E_END_TRY;
+ H5E_END_TRY
return (-1);
} /* test_LD_dims() */
@@ -545,7 +546,7 @@ test_LD_size(const char *file)
{
dsize = H5LDget_dset_type_size(invalid_id, NULL);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY_EQUAL(dsize, 0)
/*
@@ -822,7 +823,7 @@ error:
H5Dclose(did);
H5Fclose(fid);
}
- H5E_END_TRY;
+ H5E_END_TRY
return (-1);
} /* test_LD_size() */
@@ -928,7 +929,7 @@ test_LD_elmts_invalid(const char *file)
{
ret = H5LDget_dset_elmts(invalid_id, prev_dims, cur_dims, NULL, tbuf);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY_EQUAL(ret, FAIL)
/* Open dataset: DSET_CMPD */
@@ -964,7 +965,7 @@ error:
H5Dclose(did);
H5Fclose(fid);
}
- H5E_END_TRY;
+ H5E_END_TRY
return (-1);
} /* test_LD_elmts_invalid() */
@@ -1048,27 +1049,27 @@ test_LD_elmts_one(const char *file, const char *dname, const char *fields)
FAIL_STACK_ERROR;
/* Initialize data */
- if (!HDstrcmp(dname, DSET_CMPD) || !HDstrcmp(dname, DSET_CMPD_ESC)) {
+ if (!strcmp(dname, DSET_CMPD) || !strcmp(dname, DSET_CMPD_ESC)) {
if (H5Dwrite(did, dtype, H5S_ALL, H5S_ALL, H5P_DEFAULT, cbuf) < 0)
FAIL_STACK_ERROR;
} /* end if */
- else if (!HDstrcmp(dname, DSET_ONE)) {
+ else if (!strcmp(dname, DSET_ONE)) {
if (H5Dwrite(did, dtype, H5S_ALL, H5S_ALL, H5P_DEFAULT, ibuf) < 0)
FAIL_STACK_ERROR;
} /* end if */
/* There are changes in dimension sizes */
if (one_tests[i] > 0) {
- if (!HDstrcmp(dname, DSET_CMPD) || !HDstrcmp(dname, DSET_CMPD_ESC)) {
+ if (!strcmp(dname, DSET_CMPD) || !strcmp(dname, DSET_CMPD_ESC)) {
if (fields) {
- if (!HDstrcmp(fields, VALID_FIELDS1) || !HDstrcmp(fields, VALID_ESC_FIELDS1)) {
+ if (!strcmp(fields, VALID_FIELDS1) || !strcmp(fields, VALID_ESC_FIELDS1)) {
/* Retrieve the elmemts in BUF */
if (H5LDget_dset_elmts(did, prev_dims, ext_dims, fields, vbuf1) < 0)
TEST_ERROR;
for (j = 0; j < one_tests[i]; j++)
VERIFY_ELMTS_VALID1(vbuf1[j], cbuf[prev_dims[0] + (hsize_t)j])
} /* end if */
- else if (!HDstrcmp(fields, VALID_FIELDS2) || !HDstrcmp(fields, VALID_ESC_FIELDS2)) {
+ else if (!strcmp(fields, VALID_FIELDS2) || !strcmp(fields, VALID_ESC_FIELDS2)) {
/* Retrieve the elmemts in BUF */
if (H5LDget_dset_elmts(did, prev_dims, ext_dims, fields, vbuf2) < 0)
TEST_ERROR;
@@ -1122,7 +1123,7 @@ error:
H5Dclose(did);
H5Fclose(fid);
}
- H5E_END_TRY;
+ H5E_END_TRY
return (-1);
} /* test_LD_elmts_one() */
@@ -1260,11 +1261,11 @@ test_LD_elmts_two(const char *file, const char *dname, const char *fields)
FAIL_STACK_ERROR;
/* Initialize data */
- if (!HDstrcmp(dname, DSET_CMPD_TWO)) {
+ if (!strcmp(dname, DSET_CMPD_TWO)) {
if (H5Dwrite(did, dtype, H5S_ALL, H5S_ALL, H5P_DEFAULT, cbuf) < 0)
FAIL_STACK_ERROR;
} /* end if */
- else if (!HDstrcmp(dname, DSET_TWO)) {
+ else if (!strcmp(dname, DSET_TWO)) {
if (H5Dwrite(did, dtype, H5S_ALL, H5S_ALL, H5P_DEFAULT, ibuf) < 0)
FAIL_STACK_ERROR;
} /* end else-if */
@@ -1273,16 +1274,16 @@ test_LD_elmts_two(const char *file, const char *dname, const char *fields)
/* There are changes in dimension sizes */
if (two_tests[i][0] > 0 || two_tests[i][1] > 0) {
- if (!HDstrcmp(dname, DSET_CMPD_TWO)) {
+ if (!strcmp(dname, DSET_CMPD_TWO)) {
if (fields) {
- if (!HDstrcmp(fields, VALID_FIELDS1) || !HDstrcmp(fields, VALID_ESC_FIELDS1)) {
+ if (!strcmp(fields, VALID_FIELDS1) || !strcmp(fields, VALID_ESC_FIELDS1)) {
/* Retrieve the elmemts in BUF */
if (H5LDget_dset_elmts(did, prev_dims, ext_dims, fields, vbuf1) < 0)
TEST_ERROR;
if (verify_elmts_two(TWO_CMPD_VALID1, ext_dims, prev_dims, vbuf1, cbuf) < 0)
TEST_ERROR;
} /* end if */
- else if (!HDstrcmp(fields, VALID_FIELDS2) || !HDstrcmp(fields, VALID_ESC_FIELDS2)) {
+ else if (!strcmp(fields, VALID_FIELDS2) || !strcmp(fields, VALID_ESC_FIELDS2)) {
/* Retrieve the elmemts in BUF */
if (H5LDget_dset_elmts(did, prev_dims, ext_dims, fields, vbuf2) < 0)
TEST_ERROR;
@@ -1336,7 +1337,7 @@ error:
H5Dclose(did);
H5Fclose(fid);
}
- H5E_END_TRY;
+ H5E_END_TRY
return (-1);
} /* test_LD_elmts_two() */
diff --git a/hl/test/test_lite.c b/hl/test/test_lite.c
index 6ff3134..9bbad45 100644
--- a/hl/test/test_lite.c
+++ b/hl/test/test_lite.c
@@ -345,7 +345,7 @@ test_dsets(void)
if (H5LTread_dataset_string(file_id, DSET7_NAME, data_string_out) < 0)
goto out;
- if (HDstrcmp(data_string_in, data_string_out) != 0)
+ if (strcmp(data_string_in, data_string_out) != 0)
goto out;
/*-------------------------------------------------------------------------
@@ -521,7 +521,7 @@ make_attributes(hid_t loc_id, const char *obj_name)
if (H5LTget_attribute_string(loc_id, obj_name, ATTR1_NAME, attr_str_out) < 0)
return -1;
- if (HDstrcmp(attr_str_in, attr_str_out) != 0) {
+ if (strcmp(attr_str_in, attr_str_out) != 0) {
return -1;
}
@@ -1098,7 +1098,7 @@ test_integers(void)
free(dt_str);
goto out;
}
- if (HDstrcmp(dt_str, "H5T_STD_I8BE") != 0) {
+ if (strcmp(dt_str, "H5T_STD_I8BE") != 0) {
free(dt_str);
goto out;
}
@@ -1156,7 +1156,7 @@ test_fps(void)
free(dt_str);
goto out;
}
- if (HDstrcmp(dt_str, "H5T_IEEE_F32BE") != 0) {
+ if (strcmp(dt_str, "H5T_IEEE_F32BE") != 0) {
free(dt_str);
goto out;
}
@@ -1227,8 +1227,8 @@ test_strings(void)
free(dt_str);
goto out;
}
- if (HDstrcmp(dt_str, "H5T_STRING {\n STRSIZE 13;\n STRPAD H5T_STR_NULLTERM;\n CSET "
- "H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }") != 0) {
+ if (strcmp(dt_str, "H5T_STRING {\n STRSIZE 13;\n STRPAD H5T_STR_NULLTERM;\n CSET "
+ "H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }") != 0) {
printf("dt=\n%s\n", dt_str);
free(dt_str);
goto out;
@@ -1262,8 +1262,8 @@ test_strings(void)
free(dt_str);
goto out;
}
- if (HDstrcmp(dt_str, "H5T_STRING {\n STRSIZE H5T_VARIABLE;\n STRPAD H5T_STR_NULLPAD;\n "
- "CSET H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }") != 0) {
+ if (strcmp(dt_str, "H5T_STRING {\n STRSIZE H5T_VARIABLE;\n STRPAD H5T_STR_NULLPAD;\n "
+ "CSET H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }") != 0) {
printf("dt=\n%s\n", dt_str);
free(dt_str);
goto out;
@@ -1279,10 +1279,10 @@ test_strings(void)
free(dt_str);
goto out;
}
- if (HDstrncmp(dt_str,
- "H5T_STRING {\n STRSIZE H5T_VARIABLE;\n STRPAD H5T_STR_NULLPAD;\n CSET "
- "H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }",
- str_len - 1) != 0) {
+ if (strncmp(dt_str,
+ "H5T_STRING {\n STRSIZE H5T_VARIABLE;\n STRPAD H5T_STR_NULLPAD;\n CSET "
+ "H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }",
+ str_len - 1) != 0) {
printf("dt=\n%s\n", dt_str);
free(dt_str);
goto out;
@@ -1299,13 +1299,13 @@ test_strings(void)
goto out;
}
/* check the truncated string */
- if (HDstrlen(dt_str) != str_len - 1)
+ if (strlen(dt_str) != str_len - 1)
goto out;
- str_len = HDstrlen(dt_str);
- if (HDstrncmp(dt_str,
- "H5T_STRING {\n STRSIZE H5T_VARIABLE;\n STRPAD H5T_STR_NULLPAD;\n CSET "
- "H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }",
- str_len) != 0) {
+ str_len = strlen(dt_str);
+ if (strncmp(dt_str,
+ "H5T_STRING {\n STRSIZE H5T_VARIABLE;\n STRPAD H5T_STR_NULLPAD;\n CSET "
+ "H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }",
+ str_len) != 0) {
printf("dt=\n%s\n", dt_str);
free(dt_str);
goto out;
@@ -1364,9 +1364,8 @@ test_opaques(void)
free(dt_str);
goto out;
}
- if (HDstrcmp(
- dt_str,
- "H5T_OPAQUE {\n OPQ_SIZE 19;\n OPQ_TAG \"This is a tag for opaque type\";\n }") !=
+ if (strcmp(dt_str,
+ "H5T_OPAQUE {\n OPQ_SIZE 19;\n OPQ_TAG \"This is a tag for opaque type\";\n }") !=
0) {
printf("dt=\n%s\n", dt_str);
free(dt_str);
@@ -1421,7 +1420,7 @@ test_enums(void)
if (H5Tenum_nameof(dtype, &value1, name1, size) < 0)
goto out;
- if (HDstrcmp(name1, "BLUE") != 0)
+ if (strcmp(name1, "BLUE") != 0)
goto out;
if (H5Tenum_valueof(dtype, name2, &value2) < 0)
@@ -1444,9 +1443,9 @@ test_enums(void)
free(dt_str);
goto out;
}
- if (HDstrcmp(dt_str,
- "H5T_ENUM {\n H5T_STD_I32LE;\n \"RED\" 5;\n \"GREEN\" "
- " 6;\n \"BLUE\" 7;\n \"WHITE\" 8;\n }") != 0) {
+ if (strcmp(dt_str,
+ "H5T_ENUM {\n H5T_STD_I32LE;\n \"RED\" 5;\n \"GREEN\" "
+ " 6;\n \"BLUE\" 7;\n \"WHITE\" 8;\n }") != 0) {
printf("dt=\n%s\n", dt_str);
free(dt_str);
@@ -1508,7 +1507,7 @@ test_variables(void)
free(dt_str);
goto out;
}
- if (HDstrcmp(dt_str, "H5T_VLEN {\n H5T_VLEN {\n H5T_STD_I32BE\n }\n }") != 0) {
+ if (strcmp(dt_str, "H5T_VLEN {\n H5T_VLEN {\n H5T_STD_I32BE\n }\n }") != 0) {
printf("dt=\n%s\n", dt_str);
free(dt_str);
goto out;
@@ -1570,9 +1569,9 @@ test_arrays(void)
free(dt_str);
goto out;
}
- if (HDstrcmp(dt_str, "H5T_ARRAY {\n [5][7][13] H5T_ARRAY {\n [17][19] H5T_COMPOUND {\n "
- " H5T_STD_I8BE \"arr_compound_1\" : 0;\n H5T_STD_I32BE "
- "\"arr_compound_2\" : 1;\n }\n }\n }") != 0) {
+ if (strcmp(dt_str, "H5T_ARRAY {\n [5][7][13] H5T_ARRAY {\n [17][19] H5T_COMPOUND {\n "
+ " H5T_STD_I8BE \"arr_compound_1\" : 0;\n H5T_STD_I32BE "
+ "\"arr_compound_2\" : 1;\n }\n }\n }") != 0) {
printf("dt=\n%s\n", dt_str);
free(dt_str);
goto out;
@@ -1631,8 +1630,8 @@ test_compounds(void)
free(dt_str);
goto out;
}
- if (HDstrcmp(dt_str, "H5T_COMPOUND {\n H5T_STD_I16BE \"one_field\" : 2;\n H5T_STD_U8LE "
- "\"two_field\" : 6;\n }") != 0) {
+ if (strcmp(dt_str, "H5T_COMPOUND {\n H5T_STD_I16BE \"one_field\" : 2;\n H5T_STD_U8LE "
+ "\"two_field\" : 6;\n }") != 0) {
printf("dt=\n%s\n", dt_str);
free(dt_str);
goto out;
@@ -1651,7 +1650,7 @@ test_compounds(void)
if ((memb_name = H5Tget_member_name(dtype, 1)) == NULL)
goto out;
- if (HDstrcmp(memb_name, "i16_field") != 0) {
+ if (strcmp(memb_name, "i16_field") != 0) {
H5free_memory(memb_name);
goto out;
}
@@ -1729,7 +1728,7 @@ test_compound_bug(void)
if ((memb_name = H5Tget_member_name(dtype, 2)) == NULL)
goto out;
- if (HDstrcmp(memb_name, "sub") != 0) {
+ if (strcmp(memb_name, "sub") != 0) {
H5free_memory(memb_name);
goto out;
}
@@ -1765,8 +1764,8 @@ test_compound_bug(void)
if ((memb_name = H5Tget_member_name(dtype, 1)) == NULL)
goto out;
- if (HDstrcmp(memb_name, "desc____________________________________________________________________________"
- "_____________") != 0) {
+ if (strcmp(memb_name, "desc____________________________________________________________________________"
+ "_____________") != 0) {
H5free_memory(memb_name);
goto out;
}
@@ -1825,9 +1824,9 @@ test_complicated_compound(void)
*/
if ((line = (char *)calloc(size, sizeof(char))) == NULL)
goto out;
- if (HDfgets(line, (int)size, fp) == NULL)
+ if (fgets(line, (int)size, fp) == NULL)
goto out;
- while (HDstrlen(line) == size - 1) {
+ while (strlen(line) == size - 1) {
size *= 2;
if (line)
free(line);
@@ -1835,11 +1834,11 @@ test_complicated_compound(void)
goto out;
if (HDfseek(fp, 0L, SEEK_SET) != 0)
goto out;
- if (HDfgets(line, (int)size, fp) == NULL)
+ if (fgets(line, (int)size, fp) == NULL)
goto out;
}
- HDfclose(fp);
+ fclose(fp);
fp = NULL;
if ((dtype = H5LTtext_to_dtype(line, H5LT_DDL)) < 0)
@@ -1867,7 +1866,7 @@ out:
if (line)
free(line);
if (fp)
- HDfclose(fp);
+ fclose(fp);
H5_FAILED();
return -1;
diff --git a/hl/test/test_packet.c b/hl/test/test_packet.c
index d4af45e..8baa38c 100644
--- a/hl/test/test_packet.c
+++ b/hl/test/test_packet.c
@@ -58,7 +58,7 @@ static particle_t testPart[NRECORDS] = {{"zero", 0, 0, 0.0F, 0.0}, {"one", 10
static int
cmp_par(size_t i, size_t j, particle_t *rbuf, particle_t *wbuf)
{
- if ((HDstrcmp(rbuf[i].name, wbuf[j].name) != 0) || rbuf[i].lati != wbuf[j].lati ||
+ if ((strcmp(rbuf[i].name, wbuf[j].name) != 0) || rbuf[i].lati != wbuf[j].lati ||
rbuf[i].longi != wbuf[j].longi || !H5_FLT_ABS_EQUAL(rbuf[i].pressure, wbuf[j].pressure) ||
!H5_DBL_ABS_EQUAL(rbuf[i].temperature, wbuf[j].temperature)) {
return FAIL;
@@ -982,7 +982,7 @@ main(void)
/* create a file using default properties */
fid = H5Fcreate(TEST_FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- HDputs("Testing packet table");
+ puts("Testing packet table");
/* Test packet table with fixed length */
if (test_packet_table(fid) < 0)
diff --git a/hl/test/test_packet_vlen.c b/hl/test/test_packet_vlen.c
index bf95859..99a5dbe 100644
--- a/hl/test/test_packet_vlen.c
+++ b/hl/test/test_packet_vlen.c
@@ -109,7 +109,7 @@ test_VLof_atomic(void)
if (ret < 0)
goto error;
- HDsnprintf(msg, sizeof(msg), "The number of packets in the packet table must be %u\n", NRECORDS);
+ snprintf(msg, sizeof(msg), "The number of packets in the packet table must be %u\n", NRECORDS);
VERIFY(count == NRECORDS, msg);
/* Read all five packets back */
@@ -246,7 +246,7 @@ test_VLof_comptype(void)
if (ret < 0)
goto error;
- HDsnprintf(msg, sizeof(msg), "The number of packets in the packet table must be %u\n", NRECORDS);
+ snprintf(msg, sizeof(msg), "The number of packets in the packet table must be %u\n", NRECORDS);
VERIFY(count == NRECORDS, msg);
/* Read all five packets back */
@@ -418,7 +418,7 @@ test_compound_VL_VLtype(void)
if (ret < 0)
goto error;
- HDsnprintf(msg, sizeof(msg), "The number of packets in the packet table must be %u\n", NRECORDS);
+ snprintf(msg, sizeof(msg), "The number of packets in the packet table must be %u\n", NRECORDS);
VERIFY(count == NRECORDS, msg);
/* Read all five packets back */
@@ -582,7 +582,7 @@ test_VLof_VLtype(void)
if (ret < 0)
goto error;
- HDsnprintf(msg, sizeof(msg), "The number of packets in the packet table must be %u\n", NRECORDS);
+ snprintf(msg, sizeof(msg), "The number of packets in the packet table must be %u\n", NRECORDS);
VERIFY(count == NRECORDS, msg);
/* Read all five packets back */
@@ -652,9 +652,9 @@ verify_ptlengthtype(hid_t fid, const char *table_name, herr_t expected_value)
ret = SUCCEED;
else {
char lenthtype[20];
- HDstrcpy(lenthtype, "fixed-length");
+ strcpy(lenthtype, "fixed-length");
if (expected_value == 1)
- HDstrcpy(lenthtype, "variable-length");
+ strcpy(lenthtype, "variable-length");
fprintf(stderr, "\nPacket table '%s' should be %s but is not\n", table_name, lenthtype);
ret = FAIL;
}
@@ -763,7 +763,7 @@ error: /* An error has occurred. Clean up and exit. */
*/
#define ATTR_RANK 1
#define ATTR_DIM 3
-int attr_data[ATTR_DIM] = {256, 11945, -22107}; /* values to be written to attr */
+static int attr_data[ATTR_DIM] = {256, 11945, -22107}; /* values to be written to attr */
static int
adding_attribute(hid_t fid, const char *table_name, const char *attr_name)
@@ -969,7 +969,7 @@ error: /* An error has occurred. Clean up and exit. */
*-------------------------------------------------------------------------
*/
static herr_t
-verify_accessors(hid_t fid, const char *table_name, hbool_t uses_vlen_type)
+verify_accessors(hid_t fid, const char *table_name, bool uses_vlen_type)
{
hid_t ptable = H5I_INVALID_HID; /* Packet table identifier */
hid_t dset_id = H5I_INVALID_HID; /* Dataset associated with the pt */
@@ -990,7 +990,7 @@ verify_accessors(hid_t fid, const char *table_name, hbool_t uses_vlen_type)
*buf = '\0';
if ((name_size = H5Iget_name(dset_id, (char *)buf, NAME_BUF_SIZE)) < 0)
goto error;
- VERIFY(HDstrcmp(buf, table_name), "Names of dataset and packet table don't match");
+ VERIFY(strcmp(buf, table_name), "Names of dataset and packet table don't match");
/* Get the packet table's datatype ID */
if ((dtype_id = H5PTget_type(ptable)) < 0)
@@ -1006,10 +1006,10 @@ verify_accessors(hid_t fid, const char *table_name, hbool_t uses_vlen_type)
* expected_value passed in, then print the error message.
*/
char lenthtype[20];
- if (uses_vlen_type == TRUE)
- HDstrcpy(lenthtype, "variable-length");
+ if (uses_vlen_type == true)
+ strcpy(lenthtype, "variable-length");
else
- HDstrcpy(lenthtype, "fixed-length");
+ strcpy(lenthtype, "fixed-length");
fprintf(stderr, "\nThe dataset '%s' should be %s but is not\n", table_name, lenthtype);
goto error;
}
@@ -1050,11 +1050,11 @@ test_accessors(void)
if (fid < 0)
goto error;
- ret = verify_accessors(fid, PT_VLEN_ATOMIC, TRUE);
+ ret = verify_accessors(fid, PT_VLEN_ATOMIC, true);
if (ret < 0)
goto error;
- ret = verify_accessors(fid, PT_FIXED_LEN, FALSE);
+ ret = verify_accessors(fid, PT_FIXED_LEN, false);
if (ret < 0)
goto error;
@@ -1144,7 +1144,7 @@ testfl_VLof_atomic(void)
if (ret < 0)
goto error;
- HDsnprintf(msg, sizeof(msg), "The number of packets in the packet table must be %u\n", NRECORDS);
+ snprintf(msg, sizeof(msg), "The number of packets in the packet table must be %u\n", NRECORDS);
VERIFY(count == NRECORDS, msg);
/* Read all five packets back */
@@ -1281,7 +1281,7 @@ testfl_VLof_comptype(void)
if (ret < 0)
goto error;
- HDsnprintf(msg, sizeof(msg), "The number of packets in the packet table must be %u\n", NRECORDS);
+ snprintf(msg, sizeof(msg), "The number of packets in the packet table must be %u\n", NRECORDS);
VERIFY(count == NRECORDS, msg);
/* Read all five packets back */
@@ -1452,7 +1452,7 @@ testfl_compound_VL_VLtype(void)
if (ret < 0)
goto error;
- HDsnprintf(msg, sizeof(msg), "The number of packets in the packet table must be %u\n", NRECORDS);
+ snprintf(msg, sizeof(msg), "The number of packets in the packet table must be %u\n", NRECORDS);
VERIFY(count == NRECORDS, msg);
/* Read all five packets back */
@@ -1616,7 +1616,7 @@ testfl_VLof_VLtype(void)
if (ret < 0)
goto error;
- HDsnprintf(msg, sizeof(msg), "The number of packets in the packet table must be %u\n", NRECORDS);
+ snprintf(msg, sizeof(msg), "The number of packets in the packet table must be %u\n", NRECORDS);
VERIFY(count == NRECORDS, msg);
/* Read all five packets back */
@@ -1682,7 +1682,7 @@ test_packet_table_with_varlen(void)
if (H5Fclose(fid) < 0)
return FAIL;
- HDputs("Testing packet table with various variable-length datatypes");
+ puts("Testing packet table with various variable-length datatypes");
/* If any test fails, move on to subsequent test, but status will indicate
there is a failure. */
@@ -1730,7 +1730,7 @@ test_packet_table_with_varlen(void)
if (H5Fclose(fid) < 0)
return FAIL;
- HDputs("Testing packet table with various variable-length datatypes - H5PTcreate_fl");
+ puts("Testing packet table with various variable-length datatypes - H5PTcreate_fl");
/* If any test fails, move on to subsequent test, but status will indicate
there is a failure. */
diff --git a/hl/test/test_table.c b/hl/test/test_table.c
index 06e07b8..c475e7f 100644
--- a/hl/test/test_table.c
+++ b/hl/test/test_table.c
@@ -150,7 +150,7 @@ h5file_open(const char *fname, unsigned flags)
static int
cmp_par(hsize_t i, hsize_t j, particle_t *rbuf, particle_t *wbuf)
{
- if ((HDstrcmp(rbuf[i].name, wbuf[j].name) != 0) || rbuf[i].lati != wbuf[j].lati ||
+ if ((strcmp(rbuf[i].name, wbuf[j].name) != 0) || rbuf[i].lati != wbuf[j].lati ||
rbuf[i].longi != wbuf[j].longi || !H5_FLT_ABS_EQUAL(rbuf[i].pressure, wbuf[j].pressure) ||
!H5_DBL_ABS_EQUAL(rbuf[i].temperature, wbuf[j].temperature)) {
fprintf(stderr, "read and write buffers have differences\n");
@@ -477,9 +477,9 @@ test_table(hid_t fid, int do_write)
*-------------------------------------------------------------------------
*/
if (do_write)
- HDstrcpy(tname, "table2");
+ strcpy(tname, "table2");
else
- HDstrcpy(tname, "table1");
+ strcpy(tname, "table1");
rstart = 0;
rrecords = 8;
@@ -617,7 +617,7 @@ test_table(hid_t fid, int do_write)
wbufd[i].longi = wbuf[i].longi;
wbufd[i].pressure = wbuf[i].pressure;
wbufd[i].temperature = wbuf[i].temperature;
- HDstrcpy(wbufd[i].name, wbuf[i].name);
+ strcpy(wbufd[i].name, wbuf[i].name);
}
if (H5TBmake_table(TITLE, fid, "table3", FIELDS, RECORDS, type_size_mem, field_names, field_offset,
@@ -823,7 +823,7 @@ test_table(hid_t fid, int do_write)
nrecords = 3;
if (H5TBdelete_record(fid, "table", start, nrecords) < 0)
goto out;
- ;
+
/* Get table info */
if (H5TBget_table_info(fid, "table", &nfields_out, &nrecords_out) < 0)
goto out;
@@ -1130,7 +1130,7 @@ test_table(hid_t fid, int do_write)
/* Compare the extracted table with the initial values */
for (i = 0; i < NRECORDS; i++) {
- if ((HDstrcmp(namepre_out[i].name, namepre_in[i].name) != 0) ||
+ if ((strcmp(namepre_out[i].name, namepre_in[i].name) != 0) ||
!H5_FLT_ABS_EQUAL(namepre_out[i].pressure, namepre_in[i].pressure)) {
goto out;
}
@@ -1138,7 +1138,7 @@ test_table(hid_t fid, int do_write)
/* reset buffer */
for (i = 0; i < NRECORDS; i++) {
- HDstrcpy(namepre_out[i].name, "\0");
+ strcpy(namepre_out[i].name, "\0");
namepre_out[i].pressure = -1;
}
@@ -1155,7 +1155,7 @@ test_table(hid_t fid, int do_write)
/* Compare the extracted table with the initial values */
for (i = 0; i < 3; i++) {
hsize_t iistart = start;
- if ((HDstrcmp(namepre_out[i].name, namepre_in[iistart + i].name) != 0) ||
+ if ((strcmp(namepre_out[i].name, namepre_in[iistart + i].name) != 0) ||
!H5_FLT_ABS_EQUAL(namepre_out[i].pressure, namepre_in[iistart + i].pressure)) {
goto out;
}
@@ -1318,7 +1318,7 @@ test_table(hid_t fid, int do_write)
/* compare the extracted table with the initial values */
for (i = 0; i < NRECORDS; i++) {
- if ((HDstrcmp(namepre_out[i].name, namepre_in[i].name) != 0) ||
+ if ((strcmp(namepre_out[i].name, namepre_in[i].name) != 0) ||
!H5_FLT_ABS_EQUAL(namepre_out[i].pressure, namepre_in[i].pressure)) {
goto out;
}
@@ -1326,7 +1326,7 @@ test_table(hid_t fid, int do_write)
/* reset buffer */
for (i = 0; i < NRECORDS; i++) {
- HDstrcpy(namepre_out[i].name, "\0");
+ strcpy(namepre_out[i].name, "\0");
namepre_out[i].pressure = -1;
}
@@ -1347,7 +1347,7 @@ test_table(hid_t fid, int do_write)
/* compare the extracted table with the initial values */
for (i = 0; i < 3; i++) {
int iistart = (int)start;
- if ((HDstrcmp(namepre_out[i].name, wbuf[iistart + (int)i].name) != 0) ||
+ if ((strcmp(namepre_out[i].name, wbuf[iistart + (int)i].name) != 0) ||
!H5_FLT_ABS_EQUAL(namepre_out[i].pressure, wbuf[iistart + (int)i].pressure)) {
goto out;
}
@@ -1383,7 +1383,7 @@ test_table(hid_t fid, int do_write)
/* compare the extracted table with the original array */
for (i = 0; i < NRECORDS; i++) {
- if ((HDstrcmp(rbuf2[i].name, wbuf[i].name) != 0) || rbuf2[i].lati != wbuf[i].lati ||
+ if ((strcmp(rbuf2[i].name, wbuf[i].name) != 0) || rbuf2[i].lati != wbuf[i].lati ||
rbuf2[i].longi != wbuf[i].longi || !H5_FLT_ABS_EQUAL(rbuf2[i].pressure, wbuf[i].pressure) ||
!H5_DBL_ABS_EQUAL(rbuf2[i].temperature, wbuf[i].temperature) ||
rbuf2[i].new_field != buf_new[i]) {
@@ -1419,7 +1419,7 @@ test_table(hid_t fid, int do_write)
/* compare the extracted table with the original array */
for (i = 0; i < NRECORDS; i++) {
- if ((HDstrcmp(rbuf3[i].name, wbuf[i].name) != 0) || rbuf3[i].lati != wbuf[i].lati ||
+ if ((strcmp(rbuf3[i].name, wbuf[i].name) != 0) || rbuf3[i].lati != wbuf[i].lati ||
rbuf3[i].longi != wbuf[i].longi ||
!H5_DBL_ABS_EQUAL(rbuf3[i].temperature, wbuf[i].temperature)) {
goto out;
@@ -1473,7 +1473,7 @@ test_table(hid_t fid, int do_write)
goto out;
for (i = 0; i < NFIELDS; i++) {
- if ((HDstrcmp(field_names[i], names_out[i]) != 0)) {
+ if ((strcmp(field_names[i], names_out[i]) != 0)) {
goto out;
}
}
@@ -1515,7 +1515,7 @@ main(void)
/* create a file using default properties */
fid = H5Fcreate("test_table.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- HDputs("Testing table with file creation mode (read/write in native architecture):");
+ puts("Testing table with file creation mode (read/write in native architecture):");
/* test, do write */
if (test_table(fid, 1) < 0)
@@ -1528,7 +1528,7 @@ main(void)
* test2: open a file written in test1 on a big-endian machine
*-------------------------------------------------------------------------
*/
- HDputs("Testing table with file open mode (read big-endian data):");
+ puts("Testing table with file open mode (read big-endian data):");
fid = h5file_open(TEST_FILE_BE, flags);
@@ -1543,7 +1543,7 @@ main(void)
* test3: open a file written in test1 on a little-endian machine
*-------------------------------------------------------------------------
*/
- HDputs("Testing table with file open mode (read little-endian data):");
+ puts("Testing table with file open mode (read little-endian data):");
fid = h5file_open(TEST_FILE_LE, flags);
@@ -1558,7 +1558,7 @@ main(void)
* test4: open a file written in test1 on the Cray T3 machine
*-------------------------------------------------------------------------
*/
- HDputs("Testing table with file open mode (read Cray data):");
+ puts("Testing table with file open mode (read Cray data):");
fid = h5file_open(TEST_FILE_CRAY, flags);