diff options
Diffstat (limited to 'tools/test')
25 files changed, 1482 insertions, 1485 deletions
diff --git a/tools/test/h5copy/h5copygentest.c b/tools/test/h5copy/h5copygentest.c index 93289ad..899eaa7 100644 --- a/tools/test/h5copy/h5copygentest.c +++ b/tools/test/h5copy/h5copygentest.c @@ -238,10 +238,10 @@ gent_named_vl(hid_t loc_id) /* allocate and initialize VL dataset to write */ buf[0].len = 1; - buf[0].p = HDmalloc(1 * sizeof(int)); + buf[0].p = malloc(1 * sizeof(int)); ((int *)buf[0].p)[0] = 1; buf[1].len = 2; - buf[1].p = HDmalloc(2 * sizeof(int)); + buf[1].p = malloc(2 * sizeof(int)); ((int *)buf[1].p)[0] = 2; ((int *)buf[1].p)[1] = 3; @@ -284,16 +284,16 @@ gent_nested_vl(hid_t loc_id) /* allocate and initialize VL dataset to write */ buf[0].len = 1; - buf[0].p = HDmalloc(1 * sizeof(hvl_t)); + buf[0].p = malloc(1 * sizeof(hvl_t)); tvl = (hvl_t *)buf[0].p; - tvl->p = HDmalloc(1 * sizeof(int)); + tvl->p = malloc(1 * sizeof(int)); tvl->len = 1; ((int *)tvl->p)[0] = 1; buf[1].len = 1; - buf[1].p = HDmalloc(1 * sizeof(hvl_t)); + buf[1].p = malloc(1 * sizeof(hvl_t)); tvl = (hvl_t *)buf[1].p; - tvl->p = HDmalloc(2 * sizeof(int)); + tvl->p = malloc(2 * sizeof(int)); tvl->len = 2; ((int *)tvl->p)[0] = 2; ((int *)tvl->p)[1] = 3; @@ -512,21 +512,21 @@ gen_obj_ref(hid_t loc_id) * add dataset */ sid = H5Screate_simple(1, dims1, NULL); if (sid < 0) { - HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__); ret = FAIL; goto out; } oid = H5Dcreate2(loc_id, OBJ_REF_DS, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (oid < 0) { - HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__); ret = FAIL; goto out; } status = H5Dwrite(oid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -538,7 +538,7 @@ gen_obj_ref(hid_t loc_id) * add group */ oid = H5Gcreate2(loc_id, OBJ_REF_GRP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (oid < 0) { - HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -546,34 +546,34 @@ gen_obj_ref(hid_t loc_id) status = H5Rcreate(&or_data[0], loc_id, OBJ_REF_DS, H5R_OBJECT, (hid_t)-1); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } status = H5Rcreate(&or_data[1], loc_id, OBJ_REF_GRP, H5R_OBJECT, (hid_t)-1); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } sid = H5Screate_simple(1, dims2, NULL); if (sid < 0) { - HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__); ret = FAIL; goto out; } oid = H5Dcreate2(loc_id, "Dset_OBJREF", H5T_STD_REF_OBJ, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (oid < 0) { - HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__); ret = FAIL; goto out; } status = H5Dwrite(oid, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, or_data); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -612,7 +612,7 @@ gen_region_ref(hid_t loc_id) sid = H5Screate_simple(2, dims2, NULL); if (sid < 0) { - HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -620,7 +620,7 @@ gen_region_ref(hid_t loc_id) /* create normal dataset which is referred */ oid2 = H5Dcreate2(loc_id, REG_REF_DS2, H5T_STD_I8LE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (oid2 < 0) { - HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -628,7 +628,7 @@ gen_region_ref(hid_t loc_id) /* write values to dataset */ status = H5Dwrite(oid2, H5T_NATIVE_CHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, data); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -636,7 +636,7 @@ gen_region_ref(hid_t loc_id) /* select elements space for reference */ status = H5Sselect_elements(sid, H5S_SELECT_SET, 4, coords[0]); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -644,7 +644,7 @@ gen_region_ref(hid_t loc_id) /* create region reference from elements space */ status = H5Rcreate(&rr_data[0], loc_id, REG_REF_DS2, H5R_DATASET_REGION, sid); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -652,7 +652,7 @@ gen_region_ref(hid_t loc_id) /* select hyperslab space for reference */ status = H5Sselect_hyperslab(sid, H5S_SELECT_SET, start, stride, count, block); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Sselect_hyperslab failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Sselect_hyperslab failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -660,7 +660,7 @@ gen_region_ref(hid_t loc_id) /* create region reference from hyperslab space */ status = H5Rcreate(&rr_data[1], loc_id, REG_REF_DS2, H5R_DATASET_REGION, sid); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -670,7 +670,7 @@ gen_region_ref(hid_t loc_id) /* Create dataspace. */ sid = H5Screate_simple(1, dims1, NULL); if (sid < 0) { - HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -678,7 +678,7 @@ gen_region_ref(hid_t loc_id) /* create region reference dataset */ oid1 = H5Dcreate2(loc_id, REG_REF_DS1, H5T_STD_REF_DSETREG, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (oid1 < 0) { - HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -686,7 +686,7 @@ gen_region_ref(hid_t loc_id) /* write data as region references */ status = H5Dwrite(oid1, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, rr_data); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -716,11 +716,11 @@ Test_Obj_Copy(void) unsigned new_format; /* New format or old format */ if ((fapl_new = H5Pcreate(H5P_FILE_ACCESS)) < 0) { - HDfprintf(stderr, "Error: H5Pcreate failed.\n"); + fprintf(stderr, "Error: H5Pcreate failed.\n"); goto out; } if (H5Pset_libver_bounds(fapl_new, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) { - HDfprintf(stderr, "Error: H5Pset_libver_bounds failed.\n"); + fprintf(stderr, "Error: H5Pset_libver_bounds failed.\n"); goto out; } @@ -734,7 +734,7 @@ Test_Obj_Copy(void) else fid = H5Fcreate(HDF_FILE1_NEW, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); if (fid < 0) { - HDfprintf(stderr, "Error: H5Fcreate failed.\n"); + fprintf(stderr, "Error: H5Fcreate failed.\n"); goto out; } @@ -772,19 +772,19 @@ Test_Ref_Copy(void) fid = H5Fcreate(HDF_FILE2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); if (fid < 0) { - HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", HDF_FILE2); + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", HDF_FILE2); goto out; } /* add object reference */ status = gen_obj_ref(fid); if (status < 0) - HDfprintf(stderr, "Failed to generate object reference.\n"); + fprintf(stderr, "Failed to generate object reference.\n"); /* add region reference */ status = gen_region_ref(fid); if (status < 0) - HDfprintf(stderr, "Failed to generate region reference.\n"); + fprintf(stderr, "Failed to generate region reference.\n"); out: /*----------------------------------------------------------------------- @@ -815,7 +815,7 @@ gen_extlink_trg(hid_t loc_id) * target file */ gid = H5Gcreate2(loc_id, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (gid < 0) { - HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -830,7 +830,7 @@ gen_extlink_trg(hid_t loc_id) tid = H5Tcopy(H5T_NATIVE_INT); status = H5Tcommit2(loc_id, "datatype", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -863,7 +863,7 @@ gen_extlink_src(hid_t loc_id) *------------------------------------------------------------------------*/ gid = H5Gcreate2(loc_id, "/group_ext", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (gid < 0) { - HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -874,7 +874,7 @@ gen_extlink_src(hid_t loc_id) /* link to dataset */ status = H5Lcreate_external(HDF_EXT_TRG_FILE, "/simple", gid, "extlink_dset", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -882,7 +882,7 @@ gen_extlink_src(hid_t loc_id) /* link to group */ status = H5Lcreate_external(HDF_EXT_TRG_FILE, "/group", gid, "extlink_grp", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -891,7 +891,7 @@ gen_extlink_src(hid_t loc_id) status = H5Lcreate_external(HDF_EXT_TRG_FILE, "/datatype", gid, "extlink_datatype", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -899,7 +899,7 @@ gen_extlink_src(hid_t loc_id) /* dangling link - no obj*/ status = H5Lcreate_external(HDF_EXT_TRG_FILE, "notyet", gid, "extlink_notyet1", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -907,7 +907,7 @@ gen_extlink_src(hid_t loc_id) /* dangling link - no file */ status = H5Lcreate_external("notyet_file.h5", "notyet", gid, "extlink_notyet2", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -934,25 +934,25 @@ Test_Extlink_Copy(void) fid1 = H5Fcreate(HDF_EXT_SRC_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); if (fid1 < 0) { - HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", HDF_EXT_SRC_FILE); + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", HDF_EXT_SRC_FILE); goto out; } fid2 = H5Fcreate(HDF_EXT_TRG_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); if (fid2 < 0) { - HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", HDF_EXT_TRG_FILE); + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", HDF_EXT_TRG_FILE); goto out; } /* add links to source external link file */ status = gen_extlink_src(fid1); if (status < 0) - HDfprintf(stderr, "Error: %s> gen_extlink_src failed.\n", HDF_EXT_SRC_FILE); + fprintf(stderr, "Error: %s> gen_extlink_src failed.\n", HDF_EXT_SRC_FILE); /* add objs to target external link file */ status = gen_extlink_trg(fid2); if (status < 0) - HDfprintf(stderr, "Error: %s> gen_extlink_trg failed.\n", HDF_EXT_TRG_FILE); + fprintf(stderr, "Error: %s> gen_extlink_trg failed.\n", HDF_EXT_TRG_FILE); out: /*----------------------------------------------------------------------- diff --git a/tools/test/h5diff/h5diffgentest.c b/tools/test/h5diff/h5diffgentest.c index c59d3b5..5749d29 100644 --- a/tools/test/h5diff/h5diffgentest.c +++ b/tools/test/h5diff/h5diffgentest.c @@ -120,7 +120,7 @@ size_t H5TOOLS_MALLOCSIZE = (128 * 1024 * 1024); #define ONE_DIM_SIZE 16 /* Error macros */ -#define AT() HDprintf("ERROR at %s:%d in %s()...\n", __FILE__, __LINE__, __func__); +#define AT() printf("ERROR at %s:%d in %s()...\n", __FILE__, __LINE__, __func__); #define PROGRAM_ERROR \ do { \ AT(); \ @@ -334,17 +334,17 @@ onion_filepaths_init(const char *basename) { struct onion_filepaths *paths = NULL; - if (NULL == (paths = HDcalloc(1, sizeof(struct onion_filepaths)))) + if (NULL == (paths = calloc(1, sizeof(struct onion_filepaths)))) goto error; if (NULL == (paths->canon = HDstrdup(basename))) goto error; - if (NULL == (paths->onion = HDmalloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE))) + if (NULL == (paths->onion = malloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE))) goto error; HDsnprintf(paths->onion, ONION_TEST_FIXNAME_SIZE, "%s.onion", paths->canon); - if (NULL == (paths->recovery = HDmalloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE))) + if (NULL == (paths->recovery = malloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE))) goto error; HDsnprintf(paths->recovery, ONION_TEST_FIXNAME_SIZE, "%s.onion.recovery", paths->canon); @@ -352,10 +352,10 @@ onion_filepaths_init(const char *basename) error: if (paths != NULL) { - HDfree(paths->canon); - HDfree(paths->onion); - HDfree(paths->recovery); - HDfree(paths); + free(paths->canon); + free(paths->onion); + free(paths->recovery); + free(paths); } return NULL; } @@ -364,10 +364,10 @@ static void onion_filepaths_destroy(struct onion_filepaths *s) { if (s) { - HDfree(s->canon); - HDfree(s->onion); - HDfree(s->recovery); - HDfree(s); + free(s->canon); + free(s->onion); + free(s->recovery); + free(s); } } @@ -1000,11 +1000,11 @@ test_basic(const char *fname1, const char *fname2, const char *fname3) /* create the empty file */ if ((fid1 = H5Fcreate(fname3, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { - HDfprintf(stderr, "empty file (%s) creation failed.\n", fname3); + fprintf(stderr, "empty file (%s) creation failed.\n", fname3); goto out; } if (H5Fclose(fid1) < 0) { - HDfprintf(stderr, "empty file (%s) close failed.\n", fname3); + fprintf(stderr, "empty file (%s) close failed.\n", fname3); goto out; } @@ -1734,7 +1734,7 @@ test_attributes_verbose_level(const char *fname1, const char *fname2) * Create file1 *-----------------------------------------------------------------------*/ if ((fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { - HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); status = FAIL; goto out; } @@ -1744,28 +1744,28 @@ test_attributes_verbose_level(const char *fname1, const char *fname2) */ f1_gid = H5Gcreate2(fid1, "g", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (f1_gid < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); status = FAIL; goto out; } f1_gid2 = H5Gcreate2(fid1, "g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (f1_gid2 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); status = FAIL; goto out; } f1_gid3 = H5Gcreate2(fid1, "g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (f1_gid3 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); status = FAIL; goto out; } f1_gid4 = H5Gcreate2(fid1, "g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (f1_gid4 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); status = FAIL; goto out; } @@ -1776,13 +1776,13 @@ test_attributes_verbose_level(const char *fname1, const char *fname2) f1_sid = H5Screate_simple(1, dset_dims, NULL); f1_did = H5Dcreate2(fid1, "dset", H5T_NATIVE_INT, f1_sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (f1_did == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1); + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } status = H5Dwrite(f1_did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset_data); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1); status = FAIL; goto out; } @@ -1793,7 +1793,7 @@ test_attributes_verbose_level(const char *fname1, const char *fname2) f1_tid = H5Tcopy(H5T_NATIVE_INT); status = H5Tcommit2(fid1, "ntype", f1_tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Tcommit2 failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Tcommit2 failed.\n", fname1); status = FAIL; goto out; } @@ -1802,7 +1802,7 @@ test_attributes_verbose_level(const char *fname1, const char *fname2) * Create file2 *-----------------------------------------------------------------------*/ if ((fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { - HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2); status = FAIL; goto out; } @@ -1812,28 +1812,28 @@ test_attributes_verbose_level(const char *fname1, const char *fname2) */ f2_gid = H5Gcreate2(fid2, "g", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (f2_gid < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); status = FAIL; goto out; } f2_gid2 = H5Gcreate2(fid2, "g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (f2_gid2 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); status = FAIL; goto out; } f2_gid3 = H5Gcreate2(fid2, "g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (f2_gid3 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); status = FAIL; goto out; } f2_gid4 = H5Gcreate2(fid2, "g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (f2_gid4 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); status = FAIL; goto out; } @@ -1844,13 +1844,13 @@ test_attributes_verbose_level(const char *fname1, const char *fname2) f2_sid = H5Screate_simple(1, dset_dims, NULL); f2_did = H5Dcreate2(fid2, "dset", H5T_NATIVE_INT, f2_sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (f2_did == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2); + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } status = H5Dwrite(f2_did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset_data); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname2); status = FAIL; goto out; } @@ -1861,7 +1861,7 @@ test_attributes_verbose_level(const char *fname1, const char *fname2) f2_tid = H5Tcopy(H5T_NATIVE_INT); status = H5Tcommit2(fid2, "ntype", f2_tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Tcommit2 failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Tcommit2 failed.\n", fname2); status = FAIL; goto out; } @@ -2093,7 +2093,7 @@ test_link_name(const char *fname1) *------------------------------------------------------------------------*/ fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); if (fid1 < 0) { - HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); status = FAIL; goto out; } @@ -2103,14 +2103,14 @@ test_link_name(const char *fname1) *------------------------------------------------------------------------*/ gid1 = H5Gcreate2(fid1, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (gid1 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); status = FAIL; goto out; } gid2 = H5Gcreate2(fid1, "group_longname", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (gid2 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); status = FAIL; goto out; } @@ -2120,14 +2120,14 @@ test_link_name(const char *fname1) *------------------------------------------------------------------------*/ status = H5Lcreate_soft("group", fid1, "link_g1", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("group_longname", fid1, "link_g2", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } @@ -2168,7 +2168,7 @@ test_soft_links(const char *fname1) *------------------------------------------------------------------------*/ fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); if (fid1 < 0) { - HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); status = FAIL; goto out; } @@ -2178,7 +2178,7 @@ test_soft_links(const char *fname1) *------------------------------------------------------------------------*/ gid1 = H5Gcreate2(fid1, "target_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (gid1 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); status = FAIL; goto out; } @@ -2189,21 +2189,21 @@ test_soft_links(const char *fname1) /* file1 */ status = write_dset(fid1, 2, dims2, "target_dset1", H5T_NATIVE_INT, data1); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1); + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } status = write_dset(fid1, 2, dims2, "target_dset2", H5T_NATIVE_INT, data2); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1); + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } status = write_dset(gid1, 2, dims2, "dset", H5T_NATIVE_INT, data1); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1); + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } @@ -2214,42 +2214,42 @@ test_soft_links(const char *fname1) /* file 1 */ status = H5Lcreate_soft("/target_dset1", fid1, "softlink_dset1_1", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("/target_dset1", fid1, "softlink_dset1_2", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("/target_dset2", fid1, "softlink_dset2", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("/target_group", fid1, "softlink_group1", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("/target_group", fid1, "softlink_group2", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("/no_obj", fid1, "softlink_noexist", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } @@ -2290,7 +2290,7 @@ test_linked_softlinks(const char *fname1) *------------------------------------------------------------------------*/ fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); if (fid1 < 0) { - HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); status = FAIL; goto out; } @@ -2300,21 +2300,21 @@ test_linked_softlinks(const char *fname1) *------------------------------------------------------------------------*/ gid1 = H5Gcreate2(fid1, "target_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (gid1 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); status = FAIL; goto out; } gid2 = H5Gcreate2(fid1, "target_group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (gid2 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); status = FAIL; goto out; } gid3 = H5Gcreate2(fid1, "target_group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (gid3 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); status = FAIL; goto out; } @@ -2325,20 +2325,20 @@ test_linked_softlinks(const char *fname1) /* file1 */ status = write_dset(fid1, 2, dims2, "target_dset1", H5T_NATIVE_INT, data1); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1); + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } status = write_dset(fid1, 2, dims2, "target_dset2", H5T_NATIVE_INT, data2); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1); + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } status = write_dset(gid1, 2, dims2, "dset", H5T_NATIVE_INT, data1); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1); + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } @@ -2350,84 +2350,84 @@ test_linked_softlinks(const char *fname1) * file 1 */ status = H5Lcreate_soft("/target_dset1", fid1, "softlink1_to_dset1", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("softlink1_to_dset1", fid1, "softlink1_to_slink1", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("softlink1_to_slink1", fid1, "softlink1_to_slink2", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("/target_dset2", fid1, "softlink2_to_dset2", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("softlink2_to_dset2", fid1, "softlink2_to_slink1", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("softlink2_to_slink1", fid1, "softlink2_to_slink2", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("target_group1", fid1, "softlink3_to_group1", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("softlink3_to_group1", fid1, "softlink3_to_slink1", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("softlink3_to_slink1", fid1, "softlink3_to_slink2", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("target_group2", fid1, "softlink4_to_group2", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("softlink4_to_group2", fid1, "softlink4_to_slink1", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("softlink4_to_slink1", fid1, "softlink4_to_slink2", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } @@ -2473,7 +2473,7 @@ test_external_links(const char *fname1, const char *fname2) /* source file */ fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); if (fid1 < 0) { - HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); status = FAIL; goto out; } @@ -2481,7 +2481,7 @@ test_external_links(const char *fname1, const char *fname2) /* target file */ fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); if (fid2 < 0) { - HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2); status = FAIL; goto out; } @@ -2493,14 +2493,14 @@ test_external_links(const char *fname1, const char *fname2) * target file */ gid1 = H5Gcreate2(fid2, "target_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (gid1 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); status = FAIL; goto out; } gid2 = H5Gcreate2(fid2, "target_group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (gid2 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); status = FAIL; goto out; } @@ -2511,21 +2511,21 @@ test_external_links(const char *fname1, const char *fname2) * target file */ status = write_dset(fid2, 2, dims2, "target_dset1", H5T_NATIVE_INT, data1); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2); + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } status = write_dset(gid1, 2, dims2, "x_dset", H5T_NATIVE_INT, data1); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2); + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } status = write_dset(gid2, 2, dims2, "x_dset", H5T_NATIVE_INT, data2); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2); + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } @@ -2538,7 +2538,7 @@ test_external_links(const char *fname1, const char *fname2) status = H5Lcreate_external(fname2, "/target_group/x_dset", fid1, "ext_link_dset1", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); status = FAIL; goto out; } @@ -2546,35 +2546,35 @@ test_external_links(const char *fname1, const char *fname2) status = H5Lcreate_external(fname2, "/target_group2/x_dset", fid1, "ext_link_dset2", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_external(fname2, "/target_group", fid1, "/ext_link_grp1", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_external(fname2, "/target_group2", fid1, "/ext_link_grp2", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_external(fname2, "no_obj", fid1, "ext_link_noexist1", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_external("no_file.h5", "no_obj", fid1, "ext_link_noexist2", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); status = FAIL; goto out; } @@ -2620,7 +2620,7 @@ test_ext2soft_links(const char *fname1, const char *fname2) /* source file */ fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); if (fid1 < 0) { - HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); status = FAIL; goto out; } @@ -2628,7 +2628,7 @@ test_ext2soft_links(const char *fname1, const char *fname2) /* target file */ fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); if (fid2 < 0) { - HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2); status = FAIL; goto out; } @@ -2639,7 +2639,7 @@ test_ext2soft_links(const char *fname1, const char *fname2) /* target file */ gid2 = H5Gcreate2(fid2, "target_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (gid2 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); status = FAIL; goto out; } @@ -2651,14 +2651,14 @@ test_ext2soft_links(const char *fname1, const char *fname2) * target file */ status = write_dset(fid2, 2, dims2, "dset1", H5T_NATIVE_INT, data2); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2); + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } status = write_dset(fid2, 2, dims2, "dset2", H5T_NATIVE_INT, data1); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2); + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } @@ -2670,14 +2670,14 @@ test_ext2soft_links(const char *fname1, const char *fname2) * target file */ status = H5Lcreate_soft("/dset1", fid2, "softlink_to_dset1", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); status = FAIL; goto out; } status = H5Lcreate_soft("/dset2", fid2, "softlink_to_dset2", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); status = FAIL; goto out; } @@ -2689,7 +2689,7 @@ test_ext2soft_links(const char *fname1, const char *fname2) * source file */ status = H5Lcreate_external(fname2, "/target_group", fid1, "ext_link", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); status = FAIL; goto out; } @@ -2697,7 +2697,7 @@ test_ext2soft_links(const char *fname1, const char *fname2) status = H5Lcreate_external(fname2, "/softlink_to_dset1", fid1, "ext_link_to_slink1", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); status = FAIL; goto out; } @@ -2705,7 +2705,7 @@ test_ext2soft_links(const char *fname1, const char *fname2) status = H5Lcreate_external(fname2, "/softlink_to_dset2", fid1, "ext_link_to_slink2", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); status = FAIL; goto out; } @@ -2838,14 +2838,14 @@ test_dangle_links(const char *fname1, const char *fname2) *------------------------------------------------------------------------*/ fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); if (fid1 < 0) { - HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); status = FAIL; goto out; } fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); if (fid2 < 0) { - HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2); status = FAIL; goto out; } @@ -2856,14 +2856,14 @@ test_dangle_links(const char *fname1, const char *fname2) /* file1 */ status = write_dset(fid1, 2, dims2, "dset1", H5T_NATIVE_INT, data1); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1); + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } status = write_dset(fid1, 2, dims2, "dset2", H5T_NATIVE_INT, data2); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1); + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } @@ -2871,14 +2871,14 @@ test_dangle_links(const char *fname1, const char *fname2) /* file2 */ status = write_dset(fid2, 2, dims2, "dset1", H5T_NATIVE_INT, data1); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2); + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } status = write_dset(fid2, 2, dims2, "dset2", H5T_NATIVE_INT, data2); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2); + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } @@ -2889,28 +2889,28 @@ test_dangle_links(const char *fname1, const char *fname2) /* file 1 */ status = H5Lcreate_soft("no_obj", fid1, "soft_link1", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("/dset1", fid1, "soft_link2", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("no_obj", fid1, "soft_link3", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("no_obj1", fid1, "soft_link4", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } @@ -2918,28 +2918,28 @@ test_dangle_links(const char *fname1, const char *fname2) /* file 2 */ status = H5Lcreate_soft("no_obj", fid2, "soft_link1", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); status = FAIL; goto out; } status = H5Lcreate_soft("no_obj", fid2, "soft_link2", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); status = FAIL; goto out; } status = H5Lcreate_soft("/dset2", fid2, "soft_link3", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); status = FAIL; goto out; } status = H5Lcreate_soft("no_obj2", fid2, "soft_link4", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); status = FAIL; goto out; } @@ -2950,28 +2950,28 @@ test_dangle_links(const char *fname1, const char *fname2) /* file1 */ status = H5Lcreate_external(fname2, "no_obj", fid1, "ext_link1", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_external(fname2, "/dset1", fid1, "ext_link2", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_external(fname2, "no_obj", fid1, "ext_link3", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_external("no_file.h5", "no_obj", fid1, "ext_link4", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); status = FAIL; goto out; } @@ -2979,28 +2979,28 @@ test_dangle_links(const char *fname1, const char *fname2) /* file2 */ status = H5Lcreate_external(fname1, "no_obj", fid2, "ext_link1", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2); status = FAIL; goto out; } status = H5Lcreate_external(fname1, "no_obj", fid2, "ext_link2", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2); status = FAIL; goto out; } status = H5Lcreate_external(fname1, "/dset2", fid2, "ext_link3", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2); status = FAIL; goto out; } status = H5Lcreate_external("no_file.h5", "no_obj", fid2, "ext_link4", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2); status = FAIL; goto out; } @@ -3044,14 +3044,14 @@ test_group_recurse(const char *fname1, const char *fname2) *------------------------------------------------------------------------*/ fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); if (fid1 < 0) { - HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); status = FAIL; goto out; } fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); if (fid2 < 0) { - HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2); status = FAIL; goto out; } @@ -3062,28 +3062,28 @@ test_group_recurse(const char *fname1, const char *fname2) /* file1 */ gid1_f1 = H5Gcreate2(fid1, "/grp1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (gid1_f1 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); status = FAIL; goto out; } gid2_f1 = H5Gcreate2(fid1, "/grp1/grp2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (gid2_f1 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); status = FAIL; goto out; } gid3_f1 = H5Gcreate2(fid1, "/grp1/grp2/grp3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (gid3_f1 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); status = FAIL; goto out; } gid10_f1 = H5Gcreate2(fid1, "/grp10", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (gid10_f1 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); status = FAIL; goto out; } @@ -3091,28 +3091,28 @@ test_group_recurse(const char *fname1, const char *fname2) /* file2 */ gid1_f2 = H5Gcreate2(fid2, "/grp1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (gid1_f2 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); status = FAIL; goto out; } gid2_f2 = H5Gcreate2(fid2, "/grp1/grp2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (gid2_f2 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); status = FAIL; goto out; } gid3_f2 = H5Gcreate2(fid2, "/grp1/grp2/grp3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (gid3_f2 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); status = FAIL; goto out; } gid11_f2 = H5Gcreate2(fid2, "/grp11", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (gid11_f2 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); status = FAIL; goto out; } @@ -3123,21 +3123,21 @@ test_group_recurse(const char *fname1, const char *fname2) /* file1 */ status = write_dset(fid1, 2, dims2, "dset1", H5T_NATIVE_INT, data1); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1); + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } status = write_dset(fid1, 2, dims2, "dset2", H5T_NATIVE_INT, data2); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1); + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } status = write_dset(fid1, 2, dims2, "dset3", H5T_NATIVE_INT, data3); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1); + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } @@ -3145,21 +3145,21 @@ test_group_recurse(const char *fname1, const char *fname2) /* file2 */ status = write_dset(fid2, 2, dims2, "dset1", H5T_NATIVE_INT, data1); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2); + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } status = write_dset(fid2, 2, dims2, "dset2", H5T_NATIVE_INT, data2); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2); + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } status = write_dset(fid2, 2, dims2, "dset3", H5T_NATIVE_INT, data3); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2); + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } @@ -3170,54 +3170,54 @@ test_group_recurse(const char *fname1, const char *fname2) /* file1 */ status = write_dset(gid1_f1, 2, dims2, "dset1", H5T_NATIVE_INT, data1); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1); + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } status = write_dset(gid2_f1, 2, dims2, "dset1", H5T_NATIVE_INT, data1); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1); + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } status = write_dset(gid2_f1, 2, dims2, "dset2", H5T_NATIVE_INT, data2); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1); + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } status = write_dset(gid3_f1, 2, dims2, "dset1", H5T_NATIVE_INT, data1); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1); + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } status = write_dset(gid3_f1, 2, dims2, "dset2", H5T_NATIVE_INT, data2); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1); + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } status = write_dset(gid3_f1, 2, dims2, "dset3", H5T_NATIVE_INT, data3); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1); + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } status = write_dset(gid10_f1, 2, dims2, "dset4", H5T_NATIVE_INT, data1); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1); + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } status = write_dset(gid10_f1, 2, dims2, "dset5", H5T_NATIVE_INT, data3); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1); + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } @@ -3225,54 +3225,54 @@ test_group_recurse(const char *fname1, const char *fname2) /* file2 */ status = write_dset(gid1_f2, 2, dims2, "dset1", H5T_NATIVE_INT, data1); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2); + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } status = write_dset(gid2_f2, 2, dims2, "dset1", H5T_NATIVE_INT, data1); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2); + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } status = write_dset(gid2_f2, 2, dims2, "dset2", H5T_NATIVE_INT, data2); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2); + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } status = write_dset(gid3_f2, 2, dims2, "dset1", H5T_NATIVE_INT, data1); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2); + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } status = write_dset(gid3_f2, 2, dims2, "dset2", H5T_NATIVE_INT, data2); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2); + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } status = write_dset(gid3_f2, 2, dims2, "dset3", H5T_NATIVE_INT, data3); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2); + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } status = write_dset(gid11_f2, 2, dims2, "dset4", H5T_NATIVE_INT, data1); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2); + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } status = write_dset(gid11_f2, 2, dims2, "dset5", H5T_NATIVE_INT, data2); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2); + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } @@ -3283,28 +3283,28 @@ test_group_recurse(const char *fname1, const char *fname2) /* file 1 */ status = H5Lcreate_soft("/grp1", fid1, "slink_grp1", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("/grp1/grp2", fid1, "slink_grp2", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("/grp1/grp2/grp3", fid1, "slink_grp3", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_soft("/grp10", fid1, "slink_grp10", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname1); status = FAIL; goto out; } @@ -3312,28 +3312,28 @@ test_group_recurse(const char *fname1, const char *fname2) /* file 2 */ status = H5Lcreate_soft("/grp1", fid2, "slink_grp1", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); status = FAIL; goto out; } status = H5Lcreate_soft("/grp1/grp2", fid2, "slink_grp2", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); status = FAIL; goto out; } status = H5Lcreate_soft("/grp1/grp2/grp3", fid2, "slink_grp3", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); status = FAIL; goto out; } status = H5Lcreate_soft("/grp11", fid2, "slink_grp11", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", fname2); status = FAIL; goto out; } @@ -3344,21 +3344,21 @@ test_group_recurse(const char *fname1, const char *fname2) /* file1 */ status = H5Lcreate_external(fname2, "/grp1", fid1, "elink_grp1", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_external(fname2, "/grp1/grp2", fid1, "elink_grp2", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); status = FAIL; goto out; } status = H5Lcreate_external(fname2, "/grp1/grp2/grp3", fid1, "elink_grp3", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); status = FAIL; goto out; } @@ -3366,21 +3366,21 @@ test_group_recurse(const char *fname1, const char *fname2) /* file2 */ status = H5Lcreate_external(fname1, "/grp1", fid2, "elink_grp1", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2); status = FAIL; goto out; } status = H5Lcreate_external(fname1, "/grp1/grp2", fid2, "elink_grp2", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2); status = FAIL; goto out; } status = H5Lcreate_external(fname1, "/grp1/grp2/grp3", fid2, "elink_grp3", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2); status = FAIL; goto out; } @@ -3392,14 +3392,14 @@ test_group_recurse(const char *fname1, const char *fname2) /* file1 */ status = H5Lcreate_external(fname2, "/grp11", gid10_f1, "elink_grp_circle", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname1); status = FAIL; goto out; } /* file2 */ status = H5Lcreate_external(fname1, "/grp10", gid11_f2, "elink_grp_circle", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", fname2); status = FAIL; goto out; } @@ -3474,28 +3474,28 @@ test_group_recurse2(void) *------------------------------------------------------------------------*/ grp1 = H5Gcreate2(fileid1, "/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (grp1 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT); status = FAIL; goto out; } grp2 = H5Gcreate2(grp1, "g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (grp2 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT); status = FAIL; goto out; } grp3 = H5Gcreate2(grp2, "g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (grp3 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT); status = FAIL; goto out; } grp4 = H5Gcreate2(grp3, "g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (grp4 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT); status = FAIL; goto out; } @@ -3570,7 +3570,7 @@ test_group_recurse2(void) /* link to dset1 */ status = H5Lcreate_soft(GRP_R_DSETNAME1, fileid1, "soft_dset1", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", GRP_RECURSE1_EXT); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", GRP_RECURSE1_EXT); status = FAIL; goto out; } @@ -3594,7 +3594,7 @@ test_group_recurse2(void) */ grp4 = H5Gcreate2(fileid4, "/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (grp4 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE2_EXT3); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE2_EXT3); status = FAIL; goto out; } @@ -3628,14 +3628,14 @@ test_group_recurse2(void) */ grp2 = H5Gcreate2(fileid3, "g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (grp2 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE2_EXT2); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE2_EXT2); status = FAIL; goto out; } grp3 = H5Gcreate2(grp2, "g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (grp3 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE2_EXT2); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE2_EXT2); status = FAIL; goto out; } @@ -3659,7 +3659,7 @@ test_group_recurse2(void) */ status = H5Lcreate_external(GRP_RECURSE2_EXT3, "/g4", fileid3, "/g2/g3/g4", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", GRP_RECURSE2_EXT2); + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", GRP_RECURSE2_EXT2); status = FAIL; goto out; } @@ -3680,7 +3680,7 @@ test_group_recurse2(void) */ grp1 = H5Gcreate2(fileid2, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (grp1 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", GRP_RECURSE1_EXT); status = FAIL; goto out; } @@ -3704,7 +3704,7 @@ test_group_recurse2(void) /* link to dset1 */ status = H5Lcreate_soft(GRP_R_DSETNAME1, fileid2, "soft_dset1", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", GRP_RECURSE2_EXT1); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", GRP_RECURSE2_EXT1); status = FAIL; goto out; } @@ -3714,7 +3714,7 @@ test_group_recurse2(void) */ status = H5Lcreate_external(GRP_RECURSE2_EXT2, "/g2", fileid2, "/g1/g2", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", GRP_RECURSE2_EXT1); + fprintf(stderr, "Error: %s> H5Lcreate_external failed.\n", GRP_RECURSE2_EXT1); status = FAIL; goto out; } @@ -3768,14 +3768,14 @@ test_exclude_obj1(const char *fname1, const char *fname2) *------------------------------------------------------------------------*/ fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); if (fid1 < 0) { - HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); status = FAIL; goto out; } fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); if (fid2 < 0) { - HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2); status = FAIL; goto out; } @@ -3786,7 +3786,7 @@ test_exclude_obj1(const char *fname1, const char *fname2) /* file1 */ gid1 = H5Gcreate2(fid1, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (gid1 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); status = FAIL; goto out; } @@ -3795,7 +3795,7 @@ test_exclude_obj1(const char *fname1, const char *fname2) gid2 = H5Gcreate2(fid2, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (gid2 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); status = FAIL; goto out; } @@ -3806,21 +3806,21 @@ test_exclude_obj1(const char *fname1, const char *fname2) /* file1 */ status = write_dset(fid1, 2, dims2, "dset1", H5T_NATIVE_INT, data1); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1); + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } status = write_dset(gid1, 2, dims2, "dset2", H5T_NATIVE_INT, data1); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1); + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } status = write_dset(gid1, 2, dims2, "dset3", H5T_NATIVE_INT, data1); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1); + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } @@ -3828,21 +3828,21 @@ test_exclude_obj1(const char *fname1, const char *fname2) /* file2 */ status = write_dset(fid2, 2, dims2, "dset1", H5T_NATIVE_INT, data1); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2); + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } status = write_dset(gid2, 2, dims2, "dset2", H5T_NATIVE_INT, data1); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2); + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } status = write_dset(gid2, 2, dims2, "dset3", H5T_NATIVE_INT, data2); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2); + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } @@ -3890,14 +3890,14 @@ test_exclude_obj2(const char *fname1, const char *fname2) *------------------------------------------------------------------------*/ fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); if (fid1 < 0) { - HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); status = FAIL; goto out; } fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); if (fid2 < 0) { - HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2); status = FAIL; goto out; } @@ -3908,7 +3908,7 @@ test_exclude_obj2(const char *fname1, const char *fname2) /* file1 */ gid1 = H5Gcreate2(fid1, "group10", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (gid1 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); status = FAIL; goto out; } @@ -3916,7 +3916,7 @@ test_exclude_obj2(const char *fname1, const char *fname2) /* file2 */ gid2 = H5Gcreate2(fid2, "group10", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (gid2 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); status = FAIL; goto out; } @@ -3925,7 +3925,7 @@ test_exclude_obj2(const char *fname1, const char *fname2) gid3 = H5Gcreate2(fid2, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (gid3 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname2); status = FAIL; goto out; } @@ -3936,21 +3936,21 @@ test_exclude_obj2(const char *fname1, const char *fname2) /* file1 */ status = write_dset(fid1, 2, dims2, "dset10", H5T_NATIVE_INT, data1); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1); + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } status = write_dset(fid1, 2, dims2, "dset1", H5T_NATIVE_INT, data1); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1); + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } status = write_dset(gid1, 2, dims2, "dset2", H5T_NATIVE_INT, data1); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1); + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } @@ -3958,21 +3958,21 @@ test_exclude_obj2(const char *fname1, const char *fname2) /* file2 */ status = write_dset(fid2, 2, dims2, "dset10", H5T_NATIVE_INT, data1); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2); + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } status = write_dset(gid2, 2, dims2, "dset2", H5T_NATIVE_INT, data1); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2); + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } status = write_dset(gid3, 2, dims2, "dset3", H5T_NATIVE_INT, data2); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2); + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } @@ -4019,14 +4019,14 @@ test_exclude_obj3(const char *fname1, const char *fname2) *------------------------------------------------------------------------*/ fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); if (fid1 < 0) { - HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); status = FAIL; goto out; } fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); if (fid2 < 0) { - HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2); status = FAIL; goto out; } @@ -4037,7 +4037,7 @@ test_exclude_obj3(const char *fname1, const char *fname2) /* file1 */ gid1 = H5Gcreate2(fid1, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (gid1 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); status = FAIL; goto out; } @@ -4048,14 +4048,14 @@ test_exclude_obj3(const char *fname1, const char *fname2) /* file1 */ status = write_dset(fid1, 2, dims2, "dset1", H5T_NATIVE_INT, data1); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1); + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } status = write_dset(gid1, 2, dims2, "dset", H5T_NATIVE_INT, data1); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname1); + fprintf(stderr, "Error: %s> write_dset failed\n", fname1); status = FAIL; goto out; } @@ -4063,7 +4063,7 @@ test_exclude_obj3(const char *fname1, const char *fname2) /* file2 */ status = write_dset(fid2, 2, dims2, "dset1", H5T_NATIVE_INT, data1); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname2); + fprintf(stderr, "Error: %s> write_dset failed\n", fname2); status = FAIL; goto out; } @@ -4374,7 +4374,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new if (is_file_new == 1) { fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); if (fid1 < 0) { - HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); status = FAIL; goto out; } @@ -4382,7 +4382,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new else { fid1 = H5Fopen(fname1, H5F_ACC_RDWR, H5P_DEFAULT); if (fid1 < 0) { - HDfprintf(stderr, "Error: %s> H5Fopen failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Fopen failed.\n", fname1); status = FAIL; goto out; } @@ -4393,7 +4393,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new *------------------------------------------------------------------------*/ gid = H5Gcreate2(fid1, grp_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (gid < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1); status = FAIL; goto out; } @@ -4403,7 +4403,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new *------------------------------------------------------------------------*/ sid_vlen_str = H5Screate_simple(STR_RANK, dims_vlen_str, NULL); if (sid_vlen_str < 0) { - HDfprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1); status = FAIL; goto out; } @@ -4411,7 +4411,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new tid_vlen_str = H5Tcopy(H5T_C_S1); status = H5Tset_size(tid_vlen_str, H5T_VARIABLE); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Tset_size failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Tset_size failed.\n", fname1); status = FAIL; goto out; } @@ -4421,7 +4421,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new *------------------------------------------------------------------------*/ sid_fixlen_str = H5Screate_simple(STR_RANK, dims_fixlen_str, NULL); if (sid_fixlen_str < 0) { - HDfprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1); status = FAIL; goto out; } @@ -4429,7 +4429,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new tid_fixlen_str = H5Tcopy(H5T_C_S1); status = H5Tset_size(tid_fixlen_str, FIXLEN_STR_SIZE); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Tset_size failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Tset_size failed.\n", fname1); status = FAIL; goto out; } @@ -4439,7 +4439,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new *------------------------------------------------------------------------*/ sid_vlen_str_array = H5Screate_simple(STR_RANK, dims_vlen_str_array, NULL); if (sid_vlen_str_array < 0) { - HDfprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1); status = FAIL; goto out; } @@ -4447,7 +4447,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new tid_vlen_str_array_pre = H5Tcopy(H5T_C_S1); status = H5Tset_size(tid_vlen_str_array_pre, H5T_VARIABLE); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Tset_size failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Tset_size failed.\n", fname1); status = FAIL; goto out; } @@ -4455,7 +4455,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new /* Create the array data type for the string array */ tid_vlen_str_array = H5Tarray_create2(tid_vlen_str_array_pre, COMP_RANK, dims_vlen_str_array); if (tid_vlen_str_array < 0) { - HDfprintf(stderr, "Error: %s> H5Tarray_create2 failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Tarray_create2 failed.\n", fname1); status = FAIL; goto out; } @@ -4465,7 +4465,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new *------------------------------------------------------------------------*/ sid_fixlen_str_array = H5Screate_simple(STR_RANK, dims_fixlen_str_array, NULL); if (sid_fixlen_str_array < 0) { - HDfprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1); status = FAIL; goto out; } @@ -4473,14 +4473,14 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new tid_fixlen_str_array_pre = H5Tcopy(H5T_C_S1); status = H5Tset_size(tid_fixlen_str_array_pre, FIXLEN_STR_ARRY_SIZE); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Tset_size failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Tset_size failed.\n", fname1); status = FAIL; goto out; } /* Create the array data type for the string array */ tid_fixlen_str_array = H5Tarray_create2(tid_fixlen_str_array_pre, COMP_RANK, dims_fixlen_str_array); if (tid_fixlen_str_array < 0) { - HDfprintf(stderr, "Error: %s> H5Tarray_create2 failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Tarray_create2 failed.\n", fname1); status = FAIL; goto out; } @@ -4490,7 +4490,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new *------------------------------------------------------------------------*/ sid_comp = H5Screate_simple(COMP_RANK, dims_comp, NULL); if (sid_comp < 0) { - HDfprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Screate_simple failed.\n", fname1); status = FAIL; goto out; } @@ -4604,7 +4604,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new did_comp = H5Dcreate2(gid, "Compound_dset1", tid1_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); status = H5Dwrite(did_comp, tid1_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp1_buf); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1); status = FAIL; goto out; } @@ -4614,7 +4614,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new did_comp = H5Dcreate2(gid, "Compound_dset2", tid2_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); status = H5Dwrite(did_comp, tid2_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp2_buf); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1); status = FAIL; goto out; } @@ -4624,7 +4624,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new did_comp = H5Dcreate2(gid, "Compound_dset3", tid3_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); status = H5Dwrite(did_comp, tid3_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp3_buf); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1); status = FAIL; goto out; } @@ -4634,7 +4634,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new did_comp = H5Dcreate2(gid, "Compound_dset4", tid4_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); status = H5Dwrite(did_comp, tid4_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp4_buf); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1); status = FAIL; goto out; } @@ -4644,7 +4644,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new did_comp = H5Dcreate2(gid, "Compound_dset5", tid5_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); status = H5Dwrite(did_comp, tid5_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp5_buf); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1); status = FAIL; goto out; } @@ -4654,7 +4654,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new did_comp = H5Dcreate2(gid, "Compound_dset6", tid6_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); status = H5Dwrite(did_comp, tid6_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp6_buf); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1); status = FAIL; goto out; } @@ -4664,7 +4664,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new did_comp = H5Dcreate2(gid, "Compound_dset7", tid7_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); status = H5Dwrite(did_comp, tid7_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp7_buf); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1); status = FAIL; goto out; } @@ -4674,7 +4674,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new did_comp = H5Dcreate2(gid, "Compound_dset8", tid8_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); status = H5Dwrite(did_comp, tid8_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp8_buf); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1); status = FAIL; goto out; } @@ -4690,7 +4690,7 @@ test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new status = H5Dwrite(did_comp, tid9_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp9_buf); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1); status = FAIL; goto out; } @@ -4813,14 +4813,14 @@ test_enums(const char *fname) enum_val = 0; status = H5Tenum_insert(tid, "YIN", &enum_val); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Tenum_insert failed.\n", fname); + fprintf(stderr, "Error: %s> H5Tenum_insert failed.\n", fname); status = FAIL; goto out; } enum_val = 1; status = H5Tenum_insert(tid, "YANG", &enum_val); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Tenum_insert failed.\n", fname); + fprintf(stderr, "Error: %s> H5Tenum_insert failed.\n", fname); status = FAIL; goto out; } @@ -4831,13 +4831,13 @@ test_enums(const char *fname) status = write_dset(fid, 1, &dims, "dset1", tid, data1); if (status < 0) { - HDfprintf(stderr, "Error: %s> write_dset failed.\n", fname); + fprintf(stderr, "Error: %s> write_dset failed.\n", fname); status = FAIL; goto out; } status = write_dset(fid, 1, &dims, "dset2", tid, data2); if (status < 0) { - HDfprintf(stderr, "Error: %s> write_dset failed.\n", fname); + fprintf(stderr, "Error: %s> write_dset failed.\n", fname); status = FAIL; goto out; } @@ -5020,7 +5020,7 @@ test_comps_vlen(const char *fname, const char *dset, const char *attr, int diff, /* Allocate and initialize VL data to write */ for (i = 0; i < SDIM_DSET; i++) { wdata[i].i1 = (int)i; - wdata[i].vl.p = HDmalloc((i + 1) * sizeof(cmpd2_t)); + wdata[i].vl.p = malloc((i + 1) * sizeof(cmpd2_t)); wdata[i].vl.len = i + 1; for (j = 0; j < (i + 1); j++) { ((cmpd2_t *)wdata[i].vl.p)[j].i2 = (int)(i * 10 + (unsigned)diff); @@ -5141,7 +5141,7 @@ test_comps_array_vlen(const char *fname, const char *dset, const char *attr, int /* Allocate and initialize VL data to write in compound2 */ for (j = 0; j < SDIM_CMPD_ARRAY; j++) { wdata[i].cmpd2[j].i2 = (int)(j * 10); - wdata[i].cmpd2[j].vl.p = HDmalloc((j + 1) * sizeof(cmpd3_t)); + wdata[i].cmpd2[j].vl.p = malloc((j + 1) * sizeof(cmpd3_t)); wdata[i].cmpd2[j].vl.len = j + 1; for (k = 0; k < (j + 1); k++) { /* Initialize data of compound3 */ @@ -5280,7 +5280,7 @@ test_comps_vlen_arry(const char *fname, const char *dset, const char *attr, int for (i = 0; i < SDIM_DSET; i++) { /* compound 1 data */ wdata[i].i1 = (int)i; - wdata[i].vl.p = HDmalloc((i + 1) * sizeof(cmpd2_t)); + wdata[i].vl.p = malloc((i + 1) * sizeof(cmpd2_t)); wdata[i].vl.len = i + 1; for (j = 0; j < (i + 1); j++) { /* compound2 data */ @@ -5470,7 +5470,7 @@ test_data_nocomparables(const char *fname, int make_diffs) *------------------------------------------------------------------------*/ fid = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); if (fid < 0) { - HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname); + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname); status = FAIL; goto out; } @@ -5480,14 +5480,14 @@ test_data_nocomparables(const char *fname, int make_diffs) *------------------------------------------------------------------------*/ gid1 = H5Gcreate2(fid, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (gid1 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname); status = FAIL; goto out; } gid2 = H5Gcreate2(fid, "g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (gid2 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname); status = FAIL; goto out; } @@ -5500,13 +5500,13 @@ test_data_nocomparables(const char *fname, int make_diffs) /* dset1 */ if ((did1 = H5Dcreate2(gid1, "dset1", tid_dset1, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { - HDfprintf(stderr, "Error: %s> H5Dcreate2 failed.\n", "dset1"); + fprintf(stderr, "Error: %s> H5Dcreate2 failed.\n", "dset1"); status = FAIL; goto out; } if (H5Dwrite(did1, tid_dset1, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset_data_ptr1) < 0) { - HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", "dset1"); + fprintf(stderr, "Error: %s> H5Dwrite failed.\n", "dset1"); status = FAIL; goto out; } @@ -5515,7 +5515,7 @@ test_data_nocomparables(const char *fname, int make_diffs) /* dset2 */ status = write_dset(gid1, 1, dims1_1, "dset2", H5T_NATIVE_INT, dset_data_ptr2); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname); + fprintf(stderr, "Error: %s> write_dset failed\n", fname); goto out; } @@ -5525,13 +5525,13 @@ test_data_nocomparables(const char *fname, int make_diffs) /* --------- * dset1 */ if ((did2 = H5Dcreate2(gid2, "dset1", H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { - HDfprintf(stderr, "Error: %s> H5Dcreate2 failed.\n", "dset1"); + fprintf(stderr, "Error: %s> H5Dcreate2 failed.\n", "dset1"); status = FAIL; goto out; } if (H5Dwrite(did2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset_data_ptr3) < 0) { - HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", "dset1"); + fprintf(stderr, "Error: %s> H5Dwrite failed.\n", "dset1"); status = FAIL; goto out; } @@ -5551,7 +5551,7 @@ test_data_nocomparables(const char *fname, int make_diffs) * dset2 */ status = write_dset(gid2, 1, dims1_1, "dset2", H5T_NATIVE_INT, dset_data_ptr3); if (status == FAIL) { - HDfprintf(stderr, "Error: %s> write_dset failed\n", fname); + fprintf(stderr, "Error: %s> write_dset failed\n", fname); goto out; } @@ -5755,14 +5755,14 @@ test_objs_strings(const char *fname1, const char *fname2) /* file1 */ fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); if (fid1 < 0) { - HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1); goto out; } /* file2 */ fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); if (fid2 < 0) { - HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2); + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2); goto out; } @@ -6088,10 +6088,10 @@ write_attr_strings(hid_t loc_id, const char *dset_name, hid_t fid, /* Allocate and initialize VL dataset to write */ buf5[0].len = 1; - buf5[0].p = HDmalloc(1 * sizeof(int)); + buf5[0].p = malloc(1 * sizeof(int)); ((int *)buf5[0].p)[0] = 1; buf5[1].len = 2; - buf5[1].p = HDmalloc(2 * sizeof(int)); + buf5[1].p = malloc(2 * sizeof(int)); ((int *)buf5[1].p)[0] = 2; ((int *)buf5[1].p)[1] = 3; @@ -6349,7 +6349,7 @@ write_attr_strings(hid_t loc_id, const char *dset_name, hid_t fid, n = 0; for (i = 0; i < 3; i++) { for (j = 0; j < 2; j++) { - buf52[i][j].p = HDmalloc((size_t)(i + 1) * sizeof(int)); + buf52[i][j].p = malloc((size_t)(i + 1) * sizeof(int)); buf52[i][j].len = (size_t)(i + 1); for (l = 0; l < i + 1; l++) if (make_diffs) @@ -6748,7 +6748,7 @@ write_attr_strings(hid_t loc_id, const char *dset_name, hid_t fid, for (i = 0; i < 4; i++) for (j = 0; j < 3; j++) for (k = 0; k < 2; k++) { - buf53[i][j][k].p = HDmalloc((size_t)(i + 1) * sizeof(int)); + buf53[i][j][k].p = malloc((size_t)(i + 1) * sizeof(int)); buf53[i][j][k].len = (size_t)(i + 1); for (l = 0; l < i + 1; l++) if (make_diffs) @@ -7074,10 +7074,10 @@ write_attr_in(hid_t loc_id, const char *dset_name, hid_t fid, /* Allocate and initialize VL dataset to write */ buf5[0].len = 1; - buf5[0].p = HDmalloc(1 * sizeof(int)); + buf5[0].p = malloc(1 * sizeof(int)); ((int *)buf5[0].p)[0] = 1; buf5[1].len = 2; - buf5[1].p = HDmalloc(2 * sizeof(int)); + buf5[1].p = malloc(2 * sizeof(int)); ((int *)buf5[1].p)[0] = 2; ((int *)buf5[1].p)[1] = 3; @@ -7338,7 +7338,7 @@ write_attr_in(hid_t loc_id, const char *dset_name, hid_t fid, n = 0; for (i = 0; i < 3; i++) { for (j = 0; j < 2; j++) { - buf52[i][j].p = HDmalloc((size_t)(i + 1) * sizeof(int)); + buf52[i][j].p = malloc((size_t)(i + 1) * sizeof(int)); buf52[i][j].len = (size_t)(i + 1); for (l = 0; l < i + 1; l++) if (make_diffs) @@ -7738,7 +7738,7 @@ write_attr_in(hid_t loc_id, const char *dset_name, hid_t fid, for (i = 0; i < 4; i++) for (j = 0; j < 3; j++) for (k = 0; k < 2; k++) { - buf53[i][j][k].p = HDmalloc((size_t)(i + 1) * sizeof(int)); + buf53[i][j][k].p = malloc((size_t)(i + 1) * sizeof(int)); buf53[i][j][k].len = (size_t)(i + 1); for (l = 0; l < i + 1; l++) if (make_diffs) @@ -8041,10 +8041,10 @@ write_dset_in(hid_t loc_id, const char *dset_name, hid_t fid, /* Allocate and initialize VL dataset to write */ buf5[0].len = 1; - buf5[0].p = HDmalloc(1 * sizeof(int)); + buf5[0].p = malloc(1 * sizeof(int)); ((int *)buf5[0].p)[0] = 1; buf5[1].len = 2; - buf5[1].p = HDmalloc(2 * sizeof(int)); + buf5[1].p = malloc(2 * sizeof(int)); ((int *)buf5[1].p)[0] = 2; ((int *)buf5[1].p)[1] = 3; @@ -8058,9 +8058,9 @@ write_dset_in(hid_t loc_id, const char *dset_name, hid_t fid, tid = H5Tvlen_create(H5T_NATIVE_INT); did = H5Dcreate2(loc_id, "vlen", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); status = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf5); - HDassert(status >= 0); + assert(status >= 0); status = H5Treclaim(tid, sid, H5P_DEFAULT, buf5); - HDassert(status >= 0); + assert(status >= 0); status = H5Dclose(did); status = H5Tclose(tid); status = H5Sclose(sid); @@ -8091,7 +8091,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, hid_t fid, /* allocate and initialize array data to write */ size = (H5TOOLS_MALLOCSIZE / sizeof(double) + 1) * sizeof(double); - dbuf = (double *)HDmalloc(size); + dbuf = (double *)malloc(size); for (jj = 0; jj < (H5TOOLS_MALLOCSIZE / sizeof(double) + 1); jj++) dbuf[jj] = (double)jj; @@ -8114,7 +8114,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, hid_t fid, H5Dclose(ldid); H5Tclose(ltid); H5Sclose(lsid); - HDfree(dbuf); + free(dbuf); } /*------------------------------------------------------------------------- @@ -8229,7 +8229,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, hid_t fid, n = 0; for (i = 0; i < 3; i++) for (j = 0; j < 2; j++) { - buf52[i][j].p = HDmalloc((size_t)(i + 1) * sizeof(int)); + buf52[i][j].p = malloc((size_t)(i + 1) * sizeof(int)); buf52[i][j].len = (size_t)(i + 1); for (l = 0; l < i + 1; l++) { if (make_diffs) @@ -8408,7 +8408,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, hid_t fid, for (i = 0; i < 4; i++) for (j = 0; j < 3; j++) for (k = 0; k < 2; k++) { - buf53[i][j][k].p = HDmalloc((size_t)(i + 1) * sizeof(int)); + buf53[i][j][k].p = malloc((size_t)(i + 1) * sizeof(int)); buf53[i][j][k].len = (size_t)(i + 1); for (l = 0; l < i + 1; l++) { if (make_diffs) @@ -8500,10 +8500,10 @@ gen_datareg(hid_t fid, int make_diffs /* flag to modify data buffers */) int i; /* allocate the buffer for write the references */ - rbuf = (hdset_reg_ref_t *)HDcalloc((size_t)2, sizeof(hdset_reg_ref_t)); + rbuf = (hdset_reg_ref_t *)calloc((size_t)2, sizeof(hdset_reg_ref_t)); /* allocate the buffer for write the data dataset */ - buf = (int *)HDmalloc(10 * 10 * sizeof(int)); + buf = (int *)malloc(10 * 10 * sizeof(int)); for (i = 0; i < 10 * 10; i++) buf[i] = i; @@ -8512,7 +8512,7 @@ gen_datareg(hid_t fid, int make_diffs /* flag to modify data buffers */) sid1 = H5Screate_simple(2, dims1, NULL); did1 = H5Dcreate2(fid, "dsetref", H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); status = H5Dwrite(did1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf); - HDassert(status >= 0); + assert(status >= 0); /* create the reference dataset */ sid2 = H5Screate_simple(1, dims2, NULL); @@ -8533,12 +8533,12 @@ gen_datareg(hid_t fid, int make_diffs /* flag to modify data buffers */) } status = H5Sselect_hyperslab(sid1, H5S_SELECT_SET, start, NULL, count, NULL); - HDassert(status >= 0); + assert(status >= 0); H5Sget_select_npoints(sid1); /* store first dataset region */ status = H5Rcreate(&rbuf[0], fid, "dsetref", H5R_DATASET_REGION, sid1); - HDassert(status >= 0); + assert(status >= 0); /* select sequence of five points for second reference */ coord[0][0] = 6; @@ -8567,20 +8567,20 @@ gen_datareg(hid_t fid, int make_diffs /* flag to modify data buffers */) /* write */ status = H5Dwrite(did2, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf); - HDassert(status >= 0); + assert(status >= 0); /* close, free memory buffers */ status = H5Dclose(did1); - HDassert(status >= 0); + assert(status >= 0); status = H5Sclose(sid1); - HDassert(status >= 0); + assert(status >= 0); status = H5Dclose(did2); - HDassert(status >= 0); + assert(status >= 0); status = H5Sclose(sid2); - HDassert(status >= 0); + assert(status >= 0); - HDfree(rbuf); - HDfree(buf); + free(rbuf); + free(buf); } /*------------------------------------------------------------------------- @@ -8631,7 +8631,7 @@ test_hyperslab(const char *fname, int make_diffs /* flag to modify data buffers goto out; /* create a evenly divided buffer from 0 to 127 */ - buf = (char *)HDmalloc((size_t)(nelmts * size)); + buf = (char *)malloc((size_t)(nelmts * size)); s = 1024 * 1024 / 127; for (i = 0, j = 0, c = 0; i < 1024 * 1024; j++, i++) { if (j == s) { @@ -8640,11 +8640,11 @@ test_hyperslab(const char *fname, int make_diffs /* flag to modify data buffers } /* set the hyperslab values */ - HDmemset(buf, c, nelmts); + memset(buf, c, nelmts); /* make a different hyperslab at this position */ if (make_diffs && i == 512 * 512) - HDmemset(buf, 0, nelmts); + memset(buf, 0, nelmts); hs_start[0] = (unsigned long long)i * GBLL / (1024 * 1024); if (H5Sselect_hyperslab(f_sid, H5S_SELECT_SET, hs_start, NULL, hs_size, NULL) < 0) @@ -8656,7 +8656,7 @@ test_hyperslab(const char *fname, int make_diffs /* flag to modify data buffers goto out; } } - HDfree(buf); + free(buf); buf = NULL; /* close */ diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c index 1fd512c..3628a4a 100644 --- a/tools/test/h5dump/h5dumpgentest.c +++ b/tools/test/h5dump/h5dumpgentest.c @@ -470,13 +470,13 @@ gent_dataset(void) int i, j; /* Set up data arrays */ - dset1_data = (int *)HDcalloc(10 * 20, sizeof(int)); - dset1 = (int **)HDcalloc(10, sizeof(dset1_data)); + dset1_data = (int *)calloc(10 * 20, sizeof(int)); + dset1 = (int **)calloc(10, sizeof(dset1_data)); for (i = 0; i < 10; i++) dset1[i] = dset1_data + (i * 20); - dset2_data = (double *)HDcalloc(30 * 20, sizeof(double)); - dset2 = (double **)HDcalloc(30, sizeof(dset2_data)); + dset2_data = (double *)calloc(30 * 20, sizeof(double)); + dset2 = (double **)calloc(30, sizeof(dset2_data)); for (i = 0; i < 30; i++) dset2[i] = dset2_data + (i * 20); @@ -512,10 +512,10 @@ gent_dataset(void) H5Dclose(dataset); H5Fclose(fid); - HDfree(dset1); - HDfree(dset1_data); - HDfree(dset2); - HDfree(dset2_data); + free(dset1); + free(dset1_data); + free(dset2); + free(dset2_data); } static void @@ -683,7 +683,7 @@ gent_softlink2(void) /* Create a new file */ fileid1 = H5Fcreate(FILE4_1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); if (fileid1 < 0) { - HDfprintf(stderr, "Error: %s> H5Fcreate failed.\n", FILE4_1); + fprintf(stderr, "Error: %s> H5Fcreate failed.\n", FILE4_1); status = FAIL; goto out; } @@ -693,14 +693,14 @@ gent_softlink2(void) *------------------------------------------------------------------------*/ gid1 = H5Gcreate2(fileid1, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (gid1 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", FILE4_1); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", FILE4_1); status = FAIL; goto out; } gid2 = H5Gcreate2(fileid1, "group_empty", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (gid2 < 0) { - HDfprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", FILE4_1); + fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", FILE4_1); status = FAIL; goto out; } @@ -711,7 +711,7 @@ gent_softlink2(void) datatype = H5Tcopy(H5T_NATIVE_INT); status = H5Tcommit2(fileid1, "dtype", datatype, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Tcommit2 failed.\n", FILE4_1); + fprintf(stderr, "Error: %s> H5Tcommit2 failed.\n", FILE4_1); status = FAIL; goto out; } @@ -737,14 +737,14 @@ gent_softlink2(void) /* Create a new dataset as sample object */ dset1 = H5Dcreate2(fileid1, "/dset1", H5T_NATIVE_INT, dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (dset1 < 0) { - HDfprintf(stderr, "Error: %s> H5Dcreate2 failed.\n", FILE4_1); + fprintf(stderr, "Error: %s> H5Dcreate2 failed.\n", FILE4_1); status = FAIL; goto out; } status = H5Dwrite(dset1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data1); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", FILE4_1); + fprintf(stderr, "Error: %s> H5Dwrite failed.\n", FILE4_1); status = FAIL; goto out; } @@ -755,14 +755,14 @@ gent_softlink2(void) /* Create a new dataset as sample object */ dset2 = H5Dcreate2(fileid1, "/dset2", H5T_NATIVE_INT, dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (dset2 < 0) { - HDfprintf(stderr, "Error: %s> H5Dcreate2 failed.\n", FILE4_1); + fprintf(stderr, "Error: %s> H5Dcreate2 failed.\n", FILE4_1); status = FAIL; goto out; } status = H5Dwrite(dset2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data2); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Dwrite failed.\n", FILE4_1); + fprintf(stderr, "Error: %s> H5Dwrite failed.\n", FILE4_1); status = FAIL; goto out; } @@ -776,7 +776,7 @@ gent_softlink2(void) /* link to dset1 */ status = H5Lcreate_soft("/dset1", fileid1, "soft_dset1", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1); status = FAIL; goto out; } @@ -784,7 +784,7 @@ gent_softlink2(void) /* link to data type */ status = H5Lcreate_soft("/dtype", fileid1, "soft_dtype", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1); status = FAIL; goto out; } @@ -792,7 +792,7 @@ gent_softlink2(void) /* link to group1 */ status = H5Lcreate_soft("/group1", fileid1, "soft_group1", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1); status = FAIL; goto out; } @@ -800,7 +800,7 @@ gent_softlink2(void) /* link to empty group */ status = H5Lcreate_soft("/group_empty", fileid1, "soft_empty_grp", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1); status = FAIL; goto out; } @@ -808,7 +808,7 @@ gent_softlink2(void) /* dangling link */ status = H5Lcreate_soft("not_yet", fileid1, "soft_dangle", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1); status = FAIL; goto out; } @@ -819,7 +819,7 @@ gent_softlink2(void) /* link to dset1 */ status = H5Lcreate_soft("/dset1", gid1, "soft_dset1", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1); status = FAIL; goto out; } @@ -827,7 +827,7 @@ gent_softlink2(void) /* link to dset2 */ status = H5Lcreate_soft("/dset2", gid1, "soft_dset2", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1); status = FAIL; goto out; } @@ -835,7 +835,7 @@ gent_softlink2(void) /* link to data type */ status = H5Lcreate_soft("/dtype", gid1, "soft_dtype", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1); status = FAIL; goto out; } @@ -843,7 +843,7 @@ gent_softlink2(void) /* link to empty group */ status = H5Lcreate_soft("/group_empty", gid1, "soft_empty_grp", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1); status = FAIL; goto out; } @@ -851,7 +851,7 @@ gent_softlink2(void) /* dangling link */ status = H5Lcreate_soft("not_yet", gid1, "soft_dangle", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1); + fprintf(stderr, "Error: %s> H5Lcreate_soft failed.\n", FILE4_1); status = FAIL; goto out; } @@ -861,31 +861,31 @@ out: * Close/release resources. */ if (dataspace >= 0 && H5Sclose(dataspace) < 0) { - HDfprintf(stderr, "Error: %s> H5Sclose failed.\n", FILE4_1); + fprintf(stderr, "Error: %s> H5Sclose failed.\n", FILE4_1); status = FAIL; } if (gid1 >= 0 && H5Gclose(gid1) < 0) { - HDfprintf(stderr, "Error: %s> H5Gclose failed.\n", FILE4_1); + fprintf(stderr, "Error: %s> H5Gclose failed.\n", FILE4_1); status = FAIL; } if (gid2 >= 0 && H5Gclose(gid2) < 0) { - HDfprintf(stderr, "Error: %s> H5Gclose failed.\n", FILE4_1); + fprintf(stderr, "Error: %s> H5Gclose failed.\n", FILE4_1); status = FAIL; } if (datatype >= 0 && H5Tclose(datatype) < 0) { - HDfprintf(stderr, "Error: %s> H5Tclose failed.\n", FILE4_1); + fprintf(stderr, "Error: %s> H5Tclose failed.\n", FILE4_1); status = FAIL; } if (dset1 >= 0 && H5Dclose(dset1) < 0) { - HDfprintf(stderr, "Error: %s> H5Dclose failed.\n", FILE4_1); + fprintf(stderr, "Error: %s> H5Dclose failed.\n", FILE4_1); status = FAIL; } if (dset2 >= 0 && H5Dclose(dset2) < 0) { - HDfprintf(stderr, "Error: %s> H5Dclose failed.\n", FILE4_1); + fprintf(stderr, "Error: %s> H5Dclose failed.\n", FILE4_1); status = FAIL; } if (fileid1 >= 0 && H5Fclose(fileid1) < 0) { - HDfprintf(stderr, "Error: %s> H5Fclose failed.\n", FILE4_1); + fprintf(stderr, "Error: %s> H5Fclose failed.\n", FILE4_1); status = FAIL; } @@ -1750,9 +1750,9 @@ gent_many(void) /* Create links to external and UD links */ ret = H5Lcreate_soft("/g8/elink", fid, "/g7/slink5", H5P_DEFAULT, H5P_DEFAULT); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Lcreate_soft("/g8/udlink", fid, "/g7/slink6", H5P_DEFAULT, H5P_DEFAULT); - HDassert(ret >= 0); + assert(ret >= 0); H5Fclose(fid); } @@ -1808,8 +1808,8 @@ gent_str(void) hsize_t mdims[2]; /* Set up data array */ - comp1_data = (compound_t *)HDcalloc(3 * 6, sizeof(compound_t)); - comp1 = (compound_t **)HDcalloc(3, sizeof(comp1_data)); + comp1_data = (compound_t *)calloc(3 * 6, sizeof(compound_t)); + comp1 = (compound_t **)calloc(3, sizeof(comp1_data)); for (i = 0; i < 3; i++) comp1[i] = comp1_data + (i * 6); @@ -1909,8 +1909,8 @@ gent_str(void) H5Fclose(fid); - HDfree(comp1); - HDfree(comp1_data); + free(comp1); + free(comp1_data); } /* @@ -2126,9 +2126,9 @@ gent_objref(void) uint64_t supports_comments = 0; /* Allocate write & read buffers */ - wbuf = (hobj_ref_t *)HDmalloc(sizeof(hobj_ref_t) * SPACE1_DIM1); - rbuf = (hobj_ref_t *)HDmalloc(sizeof(hobj_ref_t) * SPACE1_DIM1); - tbuf = (hobj_ref_t *)HDmalloc(sizeof(hobj_ref_t) * SPACE1_DIM1); + wbuf = (hobj_ref_t *)malloc(sizeof(hobj_ref_t) * SPACE1_DIM1); + rbuf = (hobj_ref_t *)malloc(sizeof(hobj_ref_t) * SPACE1_DIM1); + tbuf = (hobj_ref_t *)malloc(sizeof(hobj_ref_t) * SPACE1_DIM1); /* Create file */ fid1 = H5Fcreate(FILE16, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); @@ -2211,9 +2211,9 @@ gent_objref(void) H5Fclose(fid1); /* Free memory buffers */ - HDfree(wbuf); - HDfree(rbuf); - HDfree(tbuf); + free(wbuf); + free(rbuf); + free(tbuf); } static void @@ -2240,10 +2240,10 @@ gent_datareg(void) int i; /* counting variables */ /* Allocate write & read buffers */ - wbuf = (hdset_reg_ref_t *)HDcalloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1); - rbuf = (hdset_reg_ref_t *)HDmalloc(sizeof(hdset_reg_ref_t) * SPACE1_DIM1); - dwbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); - drbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), SPACE2_DIM1 * SPACE2_DIM2); + wbuf = (hdset_reg_ref_t *)calloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1); + rbuf = (hdset_reg_ref_t *)malloc(sizeof(hdset_reg_ref_t) * SPACE1_DIM1); + dwbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); + drbuf = (uint8_t *)calloc(sizeof(uint8_t), SPACE2_DIM1 * SPACE2_DIM2); /* Create file */ fid1 = H5Fcreate(FILE17, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); @@ -2331,10 +2331,10 @@ gent_datareg(void) H5Fclose(fid1); /* Free memory buffers */ - HDfree(wbuf); - HDfree(rbuf); - HDfree(dwbuf); - HDfree(drbuf); + free(wbuf); + free(rbuf); + free(dwbuf); + free(drbuf); } static void @@ -2364,10 +2364,10 @@ gent_attrreg(void) int i; /* counting variables */ /* Allocate write & read buffers */ - wbuf = (hdset_reg_ref_t *)HDcalloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1); - rbuf = (hdset_reg_ref_t *)HDmalloc(sizeof(hdset_reg_ref_t) * SPACE1_DIM1); - dwbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); - drbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), SPACE2_DIM1 * SPACE2_DIM2); + wbuf = (hdset_reg_ref_t *)calloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1); + rbuf = (hdset_reg_ref_t *)malloc(sizeof(hdset_reg_ref_t) * SPACE1_DIM1); + dwbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); + drbuf = (uint8_t *)calloc(sizeof(uint8_t), SPACE2_DIM1 * SPACE2_DIM2); /* Create file */ fid1 = H5Fcreate(FILE64, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); @@ -2464,10 +2464,10 @@ gent_attrreg(void) H5Fclose(fid1); /* Free memory buffers */ - HDfree(wbuf); - HDfree(rbuf); - HDfree(dwbuf); - HDfree(drbuf); + free(wbuf); + free(rbuf); + free(dwbuf); + free(drbuf); } /*taken from Elena's compound test file*/ @@ -2560,7 +2560,7 @@ gent_nestcomp(void) */ status = H5Dwrite(dataset, s2_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, s1); if (status < 0) - HDfprintf(stderr, "gent_nestcomp H5Dwrite failed\n"); + fprintf(stderr, "gent_nestcomp H5Dwrite failed\n"); /* * Release resources @@ -2695,7 +2695,7 @@ gent_vldatatypes(void) for (i = 0; i < SPACE1_DIM1; i++) { int j; - wdata[i].p = HDmalloc((size_t)(i + 1) * sizeof(int)); + wdata[i].p = malloc((size_t)(i + 1) * sizeof(int)); wdata[i].len = (size_t)(i + 1); for (j = 0; j < i + 1; j++) @@ -2707,22 +2707,22 @@ gent_vldatatypes(void) type = H5Tvlen_create(H5T_NATIVE_INT); dset = H5Dcreate2(file, "Dataset1.0", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); ret = H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Treclaim(type, space, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Dclose(dset); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(type); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Sclose(space); - HDassert(ret >= 0); + assert(ret >= 0); /* Allocate and initialize VL dataset to write */ for (i = 0; i < SPACE1_DIM1; i++) { int j; - wdata[i].p = HDmalloc((size_t)(i + 1) * sizeof(float)); + wdata[i].p = malloc((size_t)(i + 1) * sizeof(float)); wdata[i].len = (size_t)(i + 1); for (j = 0; j < i + 1; j++) @@ -2734,19 +2734,19 @@ gent_vldatatypes(void) type = H5Tvlen_create(H5T_NATIVE_FLOAT); dset = H5Dcreate2(file, "Dataset2.0", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); ret = H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Treclaim(type, space, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Dclose(dset); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(type); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Sclose(space); - HDassert(ret >= 0); + assert(ret >= 0); /* Allocate and initialize a scalar VL dataset to write */ - adata.p = HDmalloc(37 * sizeof(int)); + adata.p = malloc(37 * sizeof(int)); adata.len = 37; for (i = 0; i < 37; i++) @@ -2757,18 +2757,18 @@ gent_vldatatypes(void) type = H5Tvlen_create(H5T_NATIVE_INT); dset = H5Dcreate2(file, "Dataset3.0", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); ret = H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, &adata); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Treclaim(type, space, H5P_DEFAULT, &adata); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Dclose(dset); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(type); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Sclose(space); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Fclose(file); - HDassert(ret >= 0); + assert(ret >= 0); } static void @@ -2786,16 +2786,16 @@ gent_vldatatypes2(void) /* Allocate and initialize VL data to write */ for (i = 0; i < SPACE1_DIM1; i++) { - wdata[i].p = (hvl_t *)HDmalloc((i + 1) * sizeof(hvl_t)); + wdata[i].p = (hvl_t *)malloc((i + 1) * sizeof(hvl_t)); if (wdata[i].p == NULL) { - HDprintf("Cannot allocate memory for VL data! i=%u\n", i); + printf("Cannot allocate memory for VL data! i=%u\n", i); return; } /* end if */ wdata[i].len = i + 1; for (t1 = (hvl_t *)wdata[i].p, j = 0; j < (i + 1); j++, t1++) { - t1->p = (unsigned *)HDmalloc((j + 1) * sizeof(unsigned)); + t1->p = (unsigned *)malloc((j + 1) * sizeof(unsigned)); if (t1->p == NULL) { - HDprintf("Cannot allocate memory for VL data! i=%u, j=%u\n", i, j); + printf("Cannot allocate memory for VL data! i=%u, j=%u\n", i, j); return; } /* end if */ t1->len = j + 1; @@ -2821,23 +2821,23 @@ gent_vldatatypes2(void) /* Write dataset to disk */ ret = H5Dwrite(dataset, tid2, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); /* Reclaim the write VL data */ ret = H5Treclaim(tid2, sid1, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); /* Close Dataset */ ret = H5Dclose(dataset); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid2); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Sclose(sid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Fclose(fid1); - HDassert(ret >= 0); + assert(ret >= 0); } static void @@ -2861,7 +2861,7 @@ gent_vldatatypes3(void) for (i = 0; i < SPACE1_DIM1; i++) { wdata[i].i = (int)(i * 10); wdata[i].f = (float)((float)(i * 20) / 3.0F); - wdata[i].v.p = HDmalloc((size_t)(i + 1) * sizeof(unsigned int)); + wdata[i].v.p = malloc((size_t)(i + 1) * sizeof(unsigned int)); wdata[i].v.len = (size_t)(i + 1); for (j = 0; j < (i + 1); j++) ((unsigned int *)wdata[i].v.p)[j] = i * 10 + j; @@ -2881,34 +2881,34 @@ gent_vldatatypes3(void) /* Insert fields */ ret = H5Tinsert(tid2, "i", HOFFSET(s1, i), H5T_NATIVE_INT); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tinsert(tid2, "f", HOFFSET(s1, f), H5T_NATIVE_FLOAT); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tinsert(tid2, "v", HOFFSET(s1, v), tid1); - HDassert(ret >= 0); + assert(ret >= 0); /* Create a dataset */ dataset = H5Dcreate2(fid1, "Dataset1", tid2, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* Write dataset to disk */ ret = H5Dwrite(dataset, tid2, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); /* Reclaim the write VL data */ ret = H5Treclaim(tid2, sid1, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); /* Close Dataset */ ret = H5Dclose(dataset); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid2); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Sclose(sid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Fclose(fid1); - HDassert(ret >= 0); + assert(ret >= 0); } static void @@ -2929,7 +2929,7 @@ gent_vldatatypes4(void) /* Allocate and initialize VL data to write */ for (i = 0; i < SPACE1_DIM1; i++) { - wdata[i].p = HDmalloc((i + 1) * sizeof(s1)); + wdata[i].p = malloc((i + 1) * sizeof(s1)); wdata[i].len = i + 1; for (j = 0; j < (i + 1); j++) { ((s1 *)wdata[i].p)[j].i = (int)(i * 10 + j); @@ -2948,9 +2948,9 @@ gent_vldatatypes4(void) /* Insert fields */ ret = H5Tinsert(tid2, "i", HOFFSET(s1, i), H5T_NATIVE_INT); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tinsert(tid2, "f", HOFFSET(s1, f), H5T_NATIVE_FLOAT); - HDassert(ret >= 0); + assert(ret >= 0); /* Create a datatype to refer to */ tid1 = H5Tvlen_create(tid2); @@ -2960,23 +2960,23 @@ gent_vldatatypes4(void) /* Write dataset to disk */ ret = H5Dwrite(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); /* Reclaim the write VL data */ ret = H5Treclaim(tid1, sid1, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); /* Close Dataset */ ret = H5Dclose(dataset); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid2); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Sclose(sid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Fclose(fid1); - HDassert(ret >= 0); + assert(ret >= 0); } /* Generate a variable-length dataset with NULL values in it */ @@ -3000,7 +3000,7 @@ gent_vldatatypes5(void) } /* end if */ else { wdata[i].len = (size_t)(i + 5); - wdata[i].p = HDmalloc(sizeof(unsigned) * (size_t)(i + 5)); + wdata[i].p = malloc(sizeof(unsigned) * (size_t)(i + 5)); for (j = 0; j < i + 5; j++) ((unsigned *)wdata[i].p)[j] = (unsigned)(j * 2); } /* end else */ @@ -3008,37 +3008,37 @@ gent_vldatatypes5(void) /* Create file */ fid1 = H5Fcreate(FILE43, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(fid1 > 0); + assert(fid1 > 0); /* Create dataspace for datasets */ sid1 = H5Screate_simple(SPACE1_RANK, dims1, NULL); - HDassert(sid1 > 0); + assert(sid1 > 0); /* Create a datatype to refer to */ tid1 = H5Tvlen_create(H5T_NATIVE_UINT); - HDassert(tid1 > 0); + assert(tid1 > 0); /* Create a dataset */ dataset = H5Dcreate2(fid1, F43_DSETNAME, tid1, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - HDassert(dataset > 0); + assert(dataset > 0); ret = H5Dwrite(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Dclose(dataset); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Treclaim(tid1, sid1, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Sclose(sid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Fclose(fid1); - HDassert(ret >= 0); + assert(ret >= 0); } /* This is big enough to make h5dump to use hyperslap to read @@ -3079,8 +3079,8 @@ gent_array1_big(void) block[0] = 1; /* Allocate write & read buffers */ - wbuf = (hdset_reg_ref_t *)HDcalloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1); - wdata = (int *)HDmalloc(sizeof(int) * (size_t)(SPACE_ARRAY1BIG_DIM * ARRAY1BIG_DIM)); + wbuf = (hdset_reg_ref_t *)calloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1); + wdata = (int *)malloc(sizeof(int) * (size_t)(SPACE_ARRAY1BIG_DIM * ARRAY1BIG_DIM)); /* Allocate and initialize array data to write */ for (i = 0; i < SPACE_ARRAY1BIG_DIM; i++) @@ -3104,7 +3104,7 @@ gent_array1_big(void) /* Write dataset to disk */ ret = H5Dwrite(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); /*--------------------------- * Region Reference dataset @@ -3128,17 +3128,17 @@ gent_array1_big(void) /* Close Dataset */ ret = H5Dclose(dataset); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Sclose(sid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Fclose(fid1); - HDassert(ret >= 0); + assert(ret >= 0); /* Release memory */ - HDfree(wbuf); - HDfree(wdata); + free(wbuf); + free(wdata); } static void @@ -3173,17 +3173,17 @@ gent_array1(void) /* Write dataset to disk */ ret = H5Dwrite(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); /* Close Dataset */ ret = H5Dclose(dataset); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Sclose(sid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Fclose(fid1); - HDassert(ret >= 0); + assert(ret >= 0); } static void @@ -3220,17 +3220,17 @@ gent_array2(void) /* Write dataset to disk */ ret = H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); /* Close Dataset */ ret = H5Dclose(dataset); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Sclose(sid); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Fclose(fid); - HDassert(ret >= 0); + assert(ret >= 0); } static void @@ -3272,19 +3272,19 @@ gent_array3(void) /* Write dataset to disk */ ret = H5Dwrite(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); /* Close Dataset */ ret = H5Dclose(dataset); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid2); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Sclose(sid); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Fclose(fid); - HDassert(ret >= 0); + assert(ret >= 0); } static void @@ -3323,35 +3323,35 @@ gent_array4(void) /* Insert integer field */ ret = H5Tinsert(tid2, "i", HOFFSET(s2_t, i), H5T_NATIVE_INT); - HDassert(ret >= 0); + assert(ret >= 0); /* Insert float field */ ret = H5Tinsert(tid2, "f", HOFFSET(s2_t, f), H5T_NATIVE_FLOAT); - HDassert(ret >= 0); + assert(ret >= 0); /* Create an array datatype to refer to */ tid1 = H5Tarray_create2(tid2, ARRAY1_RANK, tdims1); /* Close compound datatype */ ret = H5Tclose(tid2); - HDassert(ret >= 0); + assert(ret >= 0); /* Create a dataset */ dataset = H5Dcreate2(fid1, "Dataset1", tid1, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* Write dataset to disk */ ret = H5Dwrite(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); /* Close Dataset */ ret = H5Dclose(dataset); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Sclose(sid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Fclose(fid1); - HDassert(ret >= 0); + assert(ret >= 0); } static void @@ -3392,42 +3392,42 @@ gent_array5(void) /* Insert integer field */ ret = H5Tinsert(tid2, "i", HOFFSET(s2_t, i), H5T_NATIVE_INT); - HDassert(ret >= 0); + assert(ret >= 0); /* Create an array of floats datatype */ tid3 = H5Tarray_create2(H5T_NATIVE_FLOAT, ARRAY1_RANK, tdims1); /* Insert float array field */ ret = H5Tinsert(tid2, "f", HOFFSET(s2_t, f), tid3); - HDassert(ret >= 0); + assert(ret >= 0); /* Close array of floats field datatype */ ret = H5Tclose(tid3); - HDassert(ret >= 0); + assert(ret >= 0); /* Create an array datatype to refer to */ tid1 = H5Tarray_create2(tid2, ARRAY1_RANK, tdims1); /* Close compound datatype */ ret = H5Tclose(tid2); - HDassert(ret >= 0); + assert(ret >= 0); /* Create a dataset */ dataset = H5Dcreate2(fid1, "Dataset1", tid1, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* Write dataset to disk */ ret = H5Dwrite(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); /* Close Dataset */ ret = H5Dclose(dataset); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Sclose(sid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Fclose(fid1); - HDassert(ret >= 0); + assert(ret >= 0); } static void @@ -3447,7 +3447,7 @@ gent_array6(void) /* Initialize array data to write */ for (i = 0; i < SPACE1_DIM1; i++) for (j = 0; j < ARRAY1_DIM1; j++) { - wdata[i][j].p = HDmalloc((size_t)(i + j + 1) * sizeof(unsigned int)); + wdata[i][j].p = malloc((size_t)(i + j + 1) * sizeof(unsigned int)); wdata[i][j].len = (size_t)(i + j + 1); for (k = 0; k < (i + j + 1); k++) ((unsigned int *)wdata[i][j].p)[k] = (unsigned)(i * 100 + j * 10 + k); @@ -3467,28 +3467,28 @@ gent_array6(void) /* Close VL datatype */ ret = H5Tclose(tid2); - HDassert(ret >= 0); + assert(ret >= 0); /* Create a dataset */ dataset = H5Dcreate2(fid1, "Dataset1", tid1, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* Write dataset to disk */ ret = H5Dwrite(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); /* Reclaim the write VL data */ ret = H5Treclaim(tid1, sid1, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); /* Close Dataset */ ret = H5Dclose(dataset); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Sclose(sid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Fclose(fid1); - HDassert(ret >= 0); + assert(ret >= 0); } static void @@ -3509,7 +3509,7 @@ gent_array7(void) /* Initialize array data to write */ for (i = 0; i < SPACE1_DIM1; i++) for (j = 0; j < ARRAY1_DIM1; j++) { - wdata[i][j].p = HDmalloc((size_t)(i + j + 1) * (sizeof(unsigned int) * ARRAY1_DIM1)); + wdata[i][j].p = malloc((size_t)(i + j + 1) * (sizeof(unsigned int) * ARRAY1_DIM1)); wdata[i][j].len = (size_t)(i + j + 1); for (k = 0; k < (i + j + 1); k++) for (l = 0; l < ARRAY1_DIM1; l++) @@ -3531,35 +3531,35 @@ gent_array7(void) /* Close nested array datatype */ ret = H5Tclose(tid3); - HDassert(ret >= 0); + assert(ret >= 0); /* Create an array datatype to refer to */ tid1 = H5Tarray_create2(tid2, ARRAY1_RANK, tdims1); /* Close VL datatype */ ret = H5Tclose(tid2); - HDassert(ret >= 0); + assert(ret >= 0); /* Create a dataset */ dataset = H5Dcreate2(fid1, "Dataset1", tid1, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* Write dataset to disk */ ret = H5Dwrite(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); /* Reclaim the write VL data */ ret = H5Treclaim(tid1, sid1, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); /* Close Dataset */ ret = H5Dclose(dataset); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Sclose(sid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Fclose(fid1); - HDassert(ret >= 0); + assert(ret >= 0); } /* Test the boundary of the display output buffer at the reallocation event */ @@ -3577,8 +3577,8 @@ gent_array8(void) unsigned int i; /* Allocate data buffer */ - wdata = (int *)HDmalloc(F64_DIM1 * sizeof(int)); - HDassert(wdata); + wdata = (int *)malloc(F64_DIM1 * sizeof(int)); + assert(wdata); /* * Initialize data. i is the element in the dataspace, j and k the @@ -3610,21 +3610,21 @@ gent_array8(void) dset = H5Dcreate2(file, F64_DATASET, filetype, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (dset >= 0) status = H5Dwrite(dset, filetype, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); - HDassert(status >= 0); + assert(status >= 0); } /* * Close and release resources. */ status = H5Dclose(dset); - HDassert(status >= 0); + assert(status >= 0); status = H5Sclose(space); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(filetype); - HDassert(status >= 0); + assert(status >= 0); status = H5Fclose(file); - HDassert(status >= 0); - HDfree(wdata); + assert(status >= 0); + free(wdata); } static void @@ -3648,30 +3648,30 @@ gent_empty(void) dset = H5Dcreate2(file, "Dataset1.0", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* Don't write any data */ ret = H5Dclose(dset); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(type); - HDassert(ret >= 0); + assert(ret >= 0); /* write out an empty native integer dataset dataset */ dset = H5Dcreate2(file, "Dataset2.0", H5T_NATIVE_INT, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* Don't write any data */ ret = H5Dclose(dset); - HDassert(ret >= 0); + assert(ret >= 0); /* write out an empty native floating-point dataset dataset */ dset = H5Dcreate2(file, "Dataset3.0", H5T_NATIVE_FLOAT, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* Don't write any data */ ret = H5Dclose(dset); - HDassert(ret >= 0); + assert(ret >= 0); /* write out an empty array dataset */ type = H5Tarray_create2(H5T_NATIVE_INT, SPACE1_RANK, dims); dset = H5Dcreate2(file, "Dataset4.0", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* Don't write any data */ ret = H5Dclose(dset); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(type); - HDassert(ret >= 0); + assert(ret >= 0); /* write out an empty compound dataset */ type = H5Tcreate(H5T_COMPOUND, sizeof(empty_struct)); @@ -3681,15 +3681,15 @@ gent_empty(void) dset = H5Dcreate2(file, "Dataset5.0", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* Don't write any data */ ret = H5Dclose(dset); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(type); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Sclose(space); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Fclose(file); - HDassert(ret >= 0); + assert(ret >= 0); } static void @@ -3869,26 +3869,26 @@ gent_multi(void) char *sv_data = NULL; haddr_t memb_addr[H5FD_MEM_NTYPES]; - sv_data = (char *)HDcalloc(H5FD_MEM_NTYPES * 1024, sizeof(char)); - sv = (char **)HDcalloc(H5FD_MEM_NTYPES, sizeof(sv_data)); + sv_data = (char *)calloc(H5FD_MEM_NTYPES * 1024, sizeof(char)); + sv = (char **)calloc(H5FD_MEM_NTYPES, sizeof(sv_data)); for (i = 0; i < H5FD_MEM_NTYPES; i++) sv[i] = sv_data + (i * 1024); fapl = H5Pcreate(H5P_FILE_ACCESS); - HDmemset(memb_map, 0, sizeof memb_map); - HDmemset(memb_fapl, 0, sizeof memb_fapl); - HDmemset(memb_name, 0, sizeof memb_name); - HDmemset(memb_addr, 0, sizeof memb_addr); + memset(memb_map, 0, sizeof memb_map); + memset(memb_fapl, 0, sizeof memb_fapl); + memset(memb_name, 0, sizeof memb_name); + memset(memb_addr, 0, sizeof memb_addr); - HDassert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES); + assert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES); for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) { memb_fapl[mt] = H5P_DEFAULT; memb_map[mt] = mt; HDsprintf(sv[mt], "%%s-%c.h5", multi_letters[mt]); memb_name[mt] = sv[mt]; - /*HDprintf("memb_name[%d]=%s, memb_map[%d]=%d; ", mt, memb_name[mt], mt, memb_map[mt]);*/ + /*printf("memb_name[%d]=%s, memb_map[%d]=%d; ", mt, memb_name[mt], mt, memb_map[mt]);*/ memb_addr[mt] = (haddr_t)MAX(mt - 1, 0) * (HADDR_MAX / 10); } memb_map[H5FD_MEM_DEFAULT] = H5FD_MEM_SUPER; @@ -3914,8 +3914,8 @@ gent_multi(void) H5Fclose(fid); H5Pclose(fapl); - HDfree(sv); - HDfree(sv_data); + free(sv); + free(sv_data); } static void @@ -4157,10 +4157,10 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da /* Allocate and initialize VL dataset to write */ buf5[0].len = 1; - buf5[0].p = HDmalloc(1 * sizeof(int)); + buf5[0].p = malloc(1 * sizeof(int)); ((int *)buf5[0].p)[0] = 1; buf5[1].len = 2; - buf5[1].p = HDmalloc(2 * sizeof(int)); + buf5[1].p = malloc(2 * sizeof(int)); ((int *)buf5[1].p)[0] = 2; ((int *)buf5[1].p)[1] = 3; @@ -4168,9 +4168,9 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da tid = H5Tvlen_create(H5T_NATIVE_INT); aid = H5Acreate2(loc_id, "vlen", tid, sid, H5P_DEFAULT, H5P_DEFAULT); status = H5Awrite(aid, tid, buf5); - HDassert(status >= 0); + assert(status >= 0); status = H5Treclaim(tid, sid, H5P_DEFAULT, buf5); - HDassert(status >= 0); + assert(status >= 0); status = H5Aclose(aid); status = H5Tclose(tid); status = H5Sclose(sid); @@ -4266,7 +4266,7 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da for (j = 0; j < 2; j++) { int l; - buf52[i][j].p = HDmalloc((size_t)(i + 1) * sizeof(int)); + buf52[i][j].p = malloc((size_t)(i + 1) * sizeof(int)); buf52[i][j].len = (size_t)(i + 1); for (l = 0; l < i + 1; l++) ((int *)buf52[i][j].p)[l] = n++; @@ -4277,9 +4277,9 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da tid = H5Tvlen_create(H5T_NATIVE_INT); aid = H5Acreate2(loc_id, "vlen2D", tid, sid, H5P_DEFAULT, H5P_DEFAULT); status = H5Awrite(aid, tid, buf52); - HDassert(status >= 0); + assert(status >= 0); status = H5Treclaim(tid, sid, H5P_DEFAULT, buf52); - HDassert(status >= 0); + assert(status >= 0); status = H5Aclose(aid); status = H5Tclose(tid); status = H5Sclose(sid); @@ -4396,7 +4396,7 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da for (k = 0; k < 2; k++) { int l; - buf53[i][j][k].p = HDmalloc((size_t)(i + 1) * sizeof(int)); + buf53[i][j][k].p = malloc((size_t)(i + 1) * sizeof(int)); buf53[i][j][k].len = (size_t)(i + 1); for (l = 0; l < i + 1; l++) ((int *)buf53[i][j][k].p)[l] = n++; @@ -4408,9 +4408,9 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da tid = H5Tvlen_create(H5T_NATIVE_INT); aid = H5Acreate2(loc_id, "vlen3D", tid, sid, H5P_DEFAULT, H5P_DEFAULT); status = H5Awrite(aid, tid, buf53); - HDassert(status >= 0); + assert(status >= 0); status = H5Treclaim(tid, sid, H5P_DEFAULT, buf53); - HDassert(status >= 0); + assert(status >= 0); status = H5Aclose(aid); status = H5Tclose(tid); status = H5Sclose(sid); @@ -4586,10 +4586,10 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da /* Allocate and initialize VL dataset to write */ buf5[0].len = 1; - buf5[0].p = HDmalloc(1 * sizeof(int)); + buf5[0].p = malloc(1 * sizeof(int)); ((int *)buf5[0].p)[0] = 1; buf5[1].len = 2; - buf5[1].p = HDmalloc(2 * sizeof(int)); + buf5[1].p = malloc(2 * sizeof(int)); ((int *)buf5[1].p)[0] = 2; ((int *)buf5[1].p)[1] = 3; @@ -4597,9 +4597,9 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da tid = H5Tvlen_create(H5T_NATIVE_INT); did = H5Dcreate2(loc_id, "vlen", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); status = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf5); - HDassert(status >= 0); + assert(status >= 0); status = H5Treclaim(tid, sid, H5P_DEFAULT, buf5); - HDassert(status >= 0); + assert(status >= 0); status = H5Dclose(did); status = H5Tclose(tid); status = H5Sclose(sid); @@ -4695,7 +4695,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da for (j = 0; j < 2; j++) { int l; - buf52[i][j].p = HDmalloc((size_t)(i + 1) * sizeof(int)); + buf52[i][j].p = malloc((size_t)(i + 1) * sizeof(int)); buf52[i][j].len = (size_t)(i + 1); for (l = 0; l < i + 1; l++) ((int *)buf52[i][j].p)[l] = n++; @@ -4705,9 +4705,9 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da tid = H5Tvlen_create(H5T_NATIVE_INT); did = H5Dcreate2(loc_id, "vlen2D", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); status = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf52); - HDassert(status >= 0); + assert(status >= 0); status = H5Treclaim(tid, sid, H5P_DEFAULT, buf52); - HDassert(status >= 0); + assert(status >= 0); status = H5Dclose(did); status = H5Tclose(tid); status = H5Sclose(sid); @@ -4832,7 +4832,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da for (k = 0; k < 2; k++) { int l; - buf53[i][j][k].p = HDmalloc(((size_t)i + 1) * sizeof(int)); + buf53[i][j][k].p = malloc(((size_t)i + 1) * sizeof(int)); buf53[i][j][k].len = (size_t)(i + 1); for (l = 0; l < i + 1; l++) ((int *)buf53[i][j][k].p)[l] = n++; @@ -4842,9 +4842,9 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da tid = H5Tvlen_create(H5T_NATIVE_INT); did = H5Dcreate2(loc_id, "vlen3D", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); status = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf53); - HDassert(status >= 0); + assert(status >= 0); status = H5Treclaim(tid, sid, H5P_DEFAULT, buf53); - HDassert(status >= 0); + assert(status >= 0); status = H5Dclose(did); status = H5Tclose(tid); status = H5Sclose(sid); @@ -4915,7 +4915,7 @@ gent_attr_all(void) sid = H5Screate_simple(1, dims, NULL); did = H5Dcreate2(fid, "dset", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); status = H5Sclose(sid); - HDassert(status >= 0); + assert(status >= 0); /* Create groups */ group_id = H5Gcreate2(fid, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); @@ -4940,17 +4940,17 @@ gent_attr_all(void) /* Close */ status = H5Dclose(did); - HDassert(status >= 0); + assert(status >= 0); status = H5Gclose(group_id); - HDassert(status >= 0); + assert(status >= 0); status = H5Gclose(group2_id); - HDassert(status >= 0); + assert(status >= 0); status = H5Gclose(root_id); - HDassert(status >= 0); + assert(status >= 0); /* Close file */ status = H5Fclose(fid); - HDassert(status >= 0); + assert(status >= 0); } /*------------------------------------------------------------------------- @@ -5091,65 +5091,65 @@ gent_compound_complex(void) /* Create the dataspace */ dataspace = H5Screate_simple(F41_RANK, dim, NULL); - HDassert(dataspace >= 0); + assert(dataspace >= 0); /* Create the file */ datafile = H5Fcreate(FILE41, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(datafile >= 0); + assert(datafile >= 0); /* Copy the array data type for the string array */ array_tid = H5Tcopy(H5T_C_S1); - HDassert(array_tid >= 0); + assert(array_tid >= 0); /* Set the string array size to Variable */ status = H5Tset_size(array_tid, H5T_VARIABLE); - HDassert(status >= 0); + assert(status >= 0); /* Create the array data type for the string array */ str_array_id = H5Tarray_create2(array_tid, F41_ARRAY_RANK, array_dimb); - HDassert(str_array_id >= 0); + assert(str_array_id >= 0); /* Copy the array data type for the character array */ array1_tid = H5Tcopy(H5T_C_S1); - HDassert(array1_tid >= 0); + assert(array1_tid >= 0); /* Set the character array size */ status = H5Tset_size(array1_tid, F41_ARRAY_DIMc); - HDassert(status >= 0); + assert(status >= 0); /* Create the array data type for the character array */ array2_tid = H5Tarray_create2(H5T_NATIVE_SHORT, F41_ARRAY_RANKd, array_dimd); - HDassert(array2_tid >= 0); + assert(array2_tid >= 0); /* Create the array data type for the character array */ array4_tid = H5Tarray_create2(H5T_NATIVE_DOUBLE, F41_ARRAY_RANK, array_dimf); - HDassert(array4_tid >= 0); + assert(array4_tid >= 0); /* Create the memory data type */ Array1Structid = H5Tcreate(H5T_COMPOUND, sizeof(Array1Struct)); - HDassert(Array1Structid >= 0); + assert(Array1Structid >= 0); /* Insert the arrays and variables into the structure */ status = H5Tinsert(Array1Structid, "a_name", HOFFSET(Array1Struct, a), H5T_NATIVE_INT); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, "b_name", HOFFSET(Array1Struct, b), str_array_id); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, "c_name", HOFFSET(Array1Struct, c), array1_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, "d_name", HOFFSET(Array1Struct, d), array2_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, "e_name", HOFFSET(Array1Struct, e), H5T_NATIVE_FLOAT); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, "f_name", HOFFSET(Array1Struct, f), array4_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, "g_name", HOFFSET(Array1Struct, g), H5T_NATIVE_CHAR); - HDassert(status >= 0); + assert(status >= 0); /* Create the dataset */ dataset = H5Dcreate2(datafile, F41_DATASETNAME, Array1Structid, dataspace, H5P_DEFAULT, H5P_DEFAULT, @@ -5157,35 +5157,35 @@ gent_compound_complex(void) /* Write data to the dataset */ status = H5Dwrite(dataset, Array1Structid, H5S_ALL, H5S_ALL, H5P_DEFAULT, Array1); - HDassert(status >= 0); + assert(status >= 0); /* Release resources */ status = H5Tclose(Array1Structid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(array_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(array1_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(array2_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(array4_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(str_array_id); - HDassert(status >= 0); + assert(status >= 0); status = H5Sclose(dataspace); - HDassert(status >= 0); + assert(status >= 0); status = H5Dclose(dataset); - HDassert(status >= 0); + assert(status >= 0); status = H5Fclose(datafile); - HDassert(status >= 0); + assert(status >= 0); } static void @@ -5202,7 +5202,7 @@ gent_named_dtype_attr(void) /* Create a file */ fid = H5Fcreate(FILE42, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(fid > 0); + assert(fid > 0); /*------------------------------------------------------------------------- * datatype @@ -5211,27 +5211,27 @@ gent_named_dtype_attr(void) /* Create a datatype to commit and use */ tid = H5Tcopy(H5T_NATIVE_INT); - HDassert(tid > 0); + assert(tid > 0); /* Commit datatype to file */ ret = H5Tcommit2(fid, F42_TYPENAME, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - HDassert(ret >= 0); + assert(ret >= 0); /* Create a hard link to the datatype */ ret = H5Lcreate_hard(fid, F42_TYPENAME, fid, F42_LINKNAME, H5P_DEFAULT, H5P_DEFAULT); - HDassert(ret >= 0); + assert(ret >= 0); /* Create a scalar dataspace used for all objects */ sid = H5Screate(H5S_SCALAR); - HDassert(sid > 0); + assert(sid > 0); /* Create attribute on committed datatype */ aid = H5Acreate2(tid, F42_ATTRNAME, H5T_STD_I32LE, sid, H5P_DEFAULT, H5P_DEFAULT); - HDassert(aid > 0); + assert(aid > 0); /* Write data into the attribute */ ret = H5Awrite(aid, H5T_NATIVE_INT, &data); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * dataset @@ -5240,15 +5240,15 @@ gent_named_dtype_attr(void) /* Create dataset */ did = H5Dcreate2(fid, F42_DSETNAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - HDassert(did > 0); + assert(did > 0); /* Create attribute on dataset */ aid = H5Acreate2(did, F42_ATTRNAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT); - HDassert(aid > 0); + assert(aid > 0); /* Write data into the attribute */ ret = H5Awrite(aid, H5T_NATIVE_INT, &data); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * group @@ -5257,15 +5257,15 @@ gent_named_dtype_attr(void) /* Create a group */ gid = H5Gcreate2(fid, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - HDassert(gid > 0); + assert(gid > 0); /* Create attribute on group */ aid = H5Acreate2(gid, F42_ATTRNAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT); - HDassert(aid > 0); + assert(aid > 0); /* Write data into the attribute */ ret = H5Awrite(aid, H5T_NATIVE_INT, &data); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * close @@ -5274,23 +5274,23 @@ gent_named_dtype_attr(void) /* Close attribute */ ret = H5Aclose(aid); - HDassert(ret >= 0); + assert(ret >= 0); /* Close dataset */ ret = H5Dclose(did); - HDassert(ret >= 0); + assert(ret >= 0); /* Close dataspace */ ret = H5Sclose(sid); - HDassert(ret >= 0); + assert(ret >= 0); /* Close datatype */ ret = H5Tclose(tid); - HDassert(ret >= 0); + assert(ret >= 0); /* Close file */ ret = H5Fclose(fid); - HDassert(ret >= 0); + assert(ret >= 0); } /*------------------------------------------------------------------------- @@ -5423,25 +5423,25 @@ make_external(hid_t fid) dcpl = H5Pcreate(H5P_DATASET_CREATE); ret = H5Pset_external(dcpl, "ext1.bin", (off_t)0, size); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Pset_external(dcpl, "ext2.bin", (off_t)0, size); - HDassert(ret >= 0); + assert(ret >= 0); sid = H5Screate_simple(1, cur_size, max_size); - HDassert(ret >= 0); + assert(ret >= 0); dsid = H5Dcreate2(fid, "external", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT); - HDassert(ret >= 0); + assert(ret >= 0); H5Dclose(dsid); - HDassert(ret >= 0); + assert(ret >= 0); H5Sclose(sid); - HDassert(ret >= 0); + assert(ret >= 0); H5Pclose(dcpl); - HDassert(ret >= 0); + assert(ret >= 0); } /*------------------------------------------------------------------------- @@ -5477,7 +5477,7 @@ gent_filters(void) /* create a file */ fid = H5Fcreate(FILE44, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(fid >= 0); + assert(fid >= 0); /* Check if we support comments in the current VOL connector */ H5VLquery_optional(fid, H5VL_SUBCLS_OBJECT, H5VL_NATIVE_OBJECT_SET_COMMENT, &supports_comments); @@ -5494,40 +5494,40 @@ gent_filters(void) *------------------------------------------------------------------------- */ ret = H5Pset_layout(dcpl, H5D_COMPACT); - HDassert(ret >= 0); + assert(ret >= 0); ret = make_dset(fid, "compact", sid, H5T_NATIVE_INT, dcpl, buf1); - HDassert(ret >= 0); + assert(ret >= 0); if (supports_comments & H5VL_OPT_QUERY_SUPPORTED) { ret = H5Oset_comment_by_name(fid, "compact", "This is a dataset with compact storage", H5P_DEFAULT); - HDassert(ret >= 0); + assert(ret >= 0); } ret = H5Pset_layout(dcpl, H5D_CONTIGUOUS); - HDassert(ret >= 0); + assert(ret >= 0); ret = make_dset(fid, "contiguous", sid, H5T_NATIVE_INT, dcpl, buf1); - HDassert(ret >= 0); + assert(ret >= 0); if (supports_comments & H5VL_OPT_QUERY_SUPPORTED) { ret = H5Oset_comment_by_name(fid, "contiguous", "This is a dataset with contiguous storage", H5P_DEFAULT); - HDassert(ret >= 0); + assert(ret >= 0); } ret = H5Pset_layout(dcpl, H5D_CHUNKED); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Pset_chunk(dcpl, SPACE2_RANK, chunk_dims); - HDassert(ret >= 0); + assert(ret >= 0); ret = make_dset(fid, "chunked", sid, H5T_NATIVE_INT, dcpl, buf1); - HDassert(ret >= 0); + assert(ret >= 0); if (supports_comments & H5VL_OPT_QUERY_SUPPORTED) { ret = H5Oset_comment_by_name(fid, "chunked", "This is a dataset with chunked storage", H5P_DEFAULT); - HDassert(ret >= 0); + assert(ret >= 0); } /*------------------------------------------------------------------------- @@ -5537,7 +5537,7 @@ gent_filters(void) /* set up chunk */ ret = H5Pset_chunk(dcpl, SPACE2_RANK, chunk_dims); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * SZIP @@ -5547,14 +5547,14 @@ gent_filters(void) if (h5tools_can_encode(H5Z_FILTER_SZIP) == 1) { /* remove the filters from the dcpl */ ret = H5Premove_filter(dcpl, H5Z_FILTER_ALL); - HDassert(ret >= 0); + assert(ret >= 0); /* set szip data */ ret = H5Pset_szip(dcpl, szip_options_mask, szip_pixels_per_block); - HDassert(ret >= 0); + assert(ret >= 0); ret = make_dset(fid, "szip", sid, H5T_NATIVE_INT, dcpl, buf1); - HDassert(ret >= 0); + assert(ret >= 0); } #endif /* H5_HAVE_FILTER_SZIP */ @@ -5565,14 +5565,14 @@ gent_filters(void) #if defined(H5_HAVE_FILTER_DEFLATE) /* remove the filters from the dcpl */ ret = H5Premove_filter(dcpl, H5Z_FILTER_ALL); - HDassert(ret >= 0); + assert(ret >= 0); /* set deflate data */ ret = H5Pset_deflate(dcpl, 9); - HDassert(ret >= 0); + assert(ret >= 0); ret = make_dset(fid, "deflate", sid, H5T_NATIVE_INT, dcpl, buf1); - HDassert(ret >= 0); + assert(ret >= 0); #endif /*------------------------------------------------------------------------- @@ -5582,14 +5582,14 @@ gent_filters(void) /* remove the filters from the dcpl */ ret = H5Premove_filter(dcpl, H5Z_FILTER_ALL); - HDassert(ret >= 0); + assert(ret >= 0); /* set the shuffle filter */ ret = H5Pset_shuffle(dcpl); - HDassert(ret >= 0); + assert(ret >= 0); ret = make_dset(fid, "shuffle", sid, H5T_NATIVE_INT, dcpl, buf1); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * checksum @@ -5598,14 +5598,14 @@ gent_filters(void) /* remove the filters from the dcpl */ ret = H5Premove_filter(dcpl, H5Z_FILTER_ALL); - HDassert(ret >= 0); + assert(ret >= 0); /* set the checksum filter */ ret = H5Pset_fletcher32(dcpl); - HDassert(ret >= 0); + assert(ret >= 0); ret = make_dset(fid, "fletcher32", sid, H5T_NATIVE_INT, dcpl, buf1); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * nbit @@ -5614,16 +5614,16 @@ gent_filters(void) /* remove the filters from the dcpl */ ret = H5Premove_filter(dcpl, H5Z_FILTER_ALL); - HDassert(ret >= 0); + assert(ret >= 0); /* set the checksum filter */ ret = H5Pset_nbit(dcpl); - HDassert(ret >= 0); + assert(ret >= 0); tid = H5Tcopy(H5T_NATIVE_INT); H5Tset_precision(tid, H5Tget_size(tid) - 1); ret = make_dset(fid, "nbit", sid, tid, dcpl, buf1); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * scaleoffset @@ -5632,14 +5632,14 @@ gent_filters(void) /* remove the filters from the dcpl */ ret = H5Premove_filter(dcpl, H5Z_FILTER_ALL); - HDassert(ret >= 0); + assert(ret >= 0); /* set the scaleoffset filter */ ret = H5Pset_scaleoffset(dcpl, H5Z_SO_INT, (int)H5Tget_size(H5T_NATIVE_INT)); - HDassert(ret >= 0); + assert(ret >= 0); ret = make_dset(fid, "scaleoffset", sid, H5T_NATIVE_INT, dcpl, buf1); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * all filters @@ -5647,37 +5647,37 @@ gent_filters(void) */ /* remove the filters from the dcpl */ ret = H5Premove_filter(dcpl, H5Z_FILTER_ALL); - HDassert(ret >= 0); + assert(ret >= 0); /* set the shuffle filter */ ret = H5Pset_shuffle(dcpl); - HDassert(ret >= 0); + assert(ret >= 0); #ifdef H5_HAVE_FILTER_SZIP if (h5tools_can_encode(H5Z_FILTER_SZIP) == 1) { szip_options_mask = H5_SZIP_CHIP_OPTION_MASK | H5_SZIP_EC_OPTION_MASK; /* set szip data */ ret = H5Pset_szip(dcpl, szip_options_mask, szip_pixels_per_block); - HDassert(ret >= 0); + assert(ret >= 0); } #endif /* H5_HAVE_FILTER_SZIP */ #if defined(H5_HAVE_FILTER_DEFLATE) /* set deflate data */ ret = H5Pset_deflate(dcpl, 5); - HDassert(ret >= 0); + assert(ret >= 0); #endif /* set the checksum filter */ ret = H5Pset_fletcher32(dcpl); - HDassert(ret >= 0); + assert(ret >= 0); /* set the nbit filter */ ret = H5Pset_nbit(dcpl); - HDassert(ret >= 0); + assert(ret >= 0); ret = make_dset(fid, "all", sid, H5T_NATIVE_INT, dcpl, buf1); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * user defined filter @@ -5685,20 +5685,20 @@ gent_filters(void) */ /* remove the filters from the dcpl */ ret = H5Premove_filter(dcpl, H5Z_FILTER_ALL); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Zregister(H5Z_MYFILTER); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Pset_filter(dcpl, MYFILTER_ID, 0, 0, NULL); - HDassert(ret >= 0); + assert(ret >= 0); ret = make_dset(fid, "myfilter", sid, H5T_NATIVE_INT, dcpl, buf1); - HDassert(ret >= 0); + assert(ret >= 0); /* remove the filters from the dcpl */ ret = H5Premove_filter(dcpl, H5Z_FILTER_ALL); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * make an external dataset @@ -5711,27 +5711,27 @@ gent_filters(void) *------------------------------------------------------------------------- */ ret = H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_EARLY); - HDassert(ret >= 0); + assert(ret >= 0); ret = make_dset(fid, "alloc_time_early", sid, H5T_NATIVE_INT, dcpl, buf1); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * H5D_ALLOC_TIME_INCR *------------------------------------------------------------------------- */ ret = H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_INCR); - HDassert(ret >= 0); + assert(ret >= 0); ret = make_dset(fid, "alloc_time_incr", sid, H5T_NATIVE_INT, dcpl, buf1); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * H5D_ALLOC_TIME_LATE *------------------------------------------------------------------------- */ ret = H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_LATE); - HDassert(ret >= 0); + assert(ret >= 0); ret = make_dset(fid, "alloc_time_late", sid, H5T_NATIVE_INT, dcpl, buf1); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * commit a H5G_TYPE type with a comment @@ -5739,28 +5739,28 @@ gent_filters(void) */ tid = H5Tcopy(H5T_STD_B8LE); ret = H5Tcommit2(fid, "mytype", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - HDassert(ret >= 0); + assert(ret >= 0); if (supports_comments & H5VL_OPT_QUERY_SUPPORTED) { ret = H5Oset_comment_by_name(fid, "mytype", "This is a committed datatype", H5P_DEFAULT); - HDassert(ret >= 0); + assert(ret >= 0); } ret = H5Tclose(tid); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * close *------------------------------------------------------------------------- */ ret = H5Sclose(sid); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Pclose(dcpl); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Fclose(fid); - HDassert(ret >= 0); + assert(ret >= 0); } /*------------------------------------------------------------------------- @@ -5825,7 +5825,7 @@ gent_fcontents(void) /* create a file */ fid = H5Fcreate(FILE46, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(fid >= 0); + assert(fid >= 0); write_dset(fid, 1, dims, "dset", H5T_NATIVE_INT, buf); @@ -5851,27 +5851,27 @@ gent_fcontents(void) /* hard link to "dset" */ ret = H5Lcreate_hard(fid, "/dset", H5L_SAME_LOC, "dset3", H5P_DEFAULT, H5P_DEFAULT); - HDassert(ret >= 0); + assert(ret >= 0); /* hard link to "dset" */ ret = H5Lcreate_hard(fid, "/dset", H5L_SAME_LOC, "dset4", H5P_DEFAULT, H5P_DEFAULT); - HDassert(ret >= 0); + assert(ret >= 0); /* soft link to itself */ ret = H5Lcreate_soft("mylink", fid, "mylink", H5P_DEFAULT, H5P_DEFAULT); - HDassert(ret >= 0); + assert(ret >= 0); /* soft link to "dset" */ ret = H5Lcreate_soft("/dset", fid, "softlink", H5P_DEFAULT, H5P_DEFAULT); - HDassert(ret >= 0); + assert(ret >= 0); /* dangling external link */ ret = H5Lcreate_external("fname", "oname", fid, "extlink", H5P_DEFAULT, H5P_DEFAULT); - HDassert(ret >= 0); + assert(ret >= 0); /* dangling udlink */ ret = H5Lcreate_ud(fid, "udlink", (H5L_type_t)MY_LINKCLASS, NULL, 0, H5P_DEFAULT, H5P_DEFAULT); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * datatypes @@ -5879,19 +5879,19 @@ gent_fcontents(void) */ tid = H5Tcopy(H5T_NATIVE_INT); ret = H5Tcommit2(fid, "mytype", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid); - HDassert(ret >= 0); + assert(ret >= 0); /* no name datatype */ tid = H5Tcopy(H5T_NATIVE_INT); ret = H5Tcommit2(fid, "mytype2", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - HDassert(ret >= 0); + assert(ret >= 0); write_dset(fid, 1, dims, "dsetmytype2", tid, buf); ret = H5Ldelete(fid, "mytype2", H5P_DEFAULT); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * close @@ -5899,14 +5899,14 @@ gent_fcontents(void) */ ret = H5Fclose(fid); - HDassert(ret >= 0); + assert(ret >= 0); /* create a file for the bootblock test */ fid = H5Fcreate(FILE47, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(fid >= 0); + assert(fid >= 0); ret = H5Fclose(fid); - HDassert(ret >= 0); + assert(ret >= 0); } /*------------------------------------------------------------------------- @@ -5943,7 +5943,7 @@ gent_fvalues(void) /* create a file */ fid = H5Fcreate(FILE48, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(fid >= 0); + assert(fid >= 0); /* create a space */ sid = H5Screate_simple(1, dims, NULL); @@ -5957,42 +5957,42 @@ gent_fvalues(void) *------------------------------------------------------------------------- */ ret = H5Pset_fill_time(dcpl, H5D_FILL_TIME_IFSET); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fillval1); - HDassert(ret >= 0); + assert(ret >= 0); ret = make_dset(fid, "fill_time_ifset", sid, H5T_NATIVE_INT, dcpl, buf); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * H5D_FILL_TIME_NEVER *------------------------------------------------------------------------- */ ret = H5Pset_fill_time(dcpl, H5D_FILL_TIME_NEVER); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fillval1); - HDassert(ret >= 0); + assert(ret >= 0); ret = make_dset(fid, "fill_time_never", sid, H5T_NATIVE_INT, dcpl, buf); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * H5D_FILL_TIME_ALLOC *------------------------------------------------------------------------- */ ret = H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fillval1); - HDassert(ret >= 0); + assert(ret >= 0); ret = make_dset(fid, "fill_time_alloc", sid, H5T_NATIVE_INT, dcpl, buf); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Pclose(dcpl); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * dataset with no fill value @@ -6009,23 +6009,23 @@ gent_fvalues(void) H5Tinsert(tid, "a", HOFFSET(c_t, a), H5T_NATIVE_CHAR); H5Tinsert(tid, "b", HOFFSET(c_t, b), H5T_NATIVE_DOUBLE); ret = H5Pset_fill_value(dcpl, tid, &fillval2); - HDassert(ret >= 0); + assert(ret >= 0); ret = make_dset(fid, "fill_compound", sid, tid, dcpl, buf2); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Pclose(dcpl); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * dataset with a H5T_VLEN fill value *------------------------------------------------------------------------- */ buf3[0].len = 1; - buf3[0].p = HDmalloc(1 * sizeof(int)); + buf3[0].p = malloc(1 * sizeof(int)); ((int *)buf3[0].p)[0] = 1; buf3[1].len = 2; - buf3[1].p = HDmalloc(2 * sizeof(int)); + buf3[1].p = malloc(2 * sizeof(int)); ((int *)buf3[1].p)[0] = 2; ((int *)buf3[1].p)[1] = 3; @@ -6035,17 +6035,17 @@ gent_fvalues(void) fillval3.p = NULL; fillval3.len = 0; ret = H5Pset_fill_value(dcpl, tid, &fillval3); - HDassert(ret >= 0); + assert(ret >= 0); did = H5Dcreate2(fid, "fill_vlen", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); ret = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf3); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Treclaim(tid, sid, H5P_DEFAULT, buf3); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Dclose(did); ret = H5Tclose(tid); ret = H5Pclose(dcpl); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * dataset with a H5T_ARRAY fill value @@ -6060,9 +6060,9 @@ gent_fvalues(void) *------------------------------------------------------------------------- */ ret = H5Sclose(sid); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Fclose(fid); - HDassert(ret >= 0); + assert(ret >= 0); } /*------------------------------------------------------------------------- @@ -6105,7 +6105,7 @@ gent_string(void) /* create a file */ fid = H5Fcreate(FILE49, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(fid >= 0); + assert(fid >= 0); /*------------------------------------------------------------------------- * str1 @@ -6114,11 +6114,11 @@ gent_string(void) tid = H5Tcopy(H5T_C_S1); ret = H5Tset_size(tid, sizeof(buf1)); - HDassert(ret >= 0); + assert(ret >= 0); write_dset(fid, 1, dims1, "str1", tid, buf1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * str2 @@ -6127,16 +6127,16 @@ gent_string(void) sid = H5Screate_simple(SPACE1_RANK, dims2, NULL); tid = H5Tcopy(H5T_C_S1); ret = H5Tset_size(tid, H5T_VARIABLE); - HDassert(ret >= 0); + assert(ret >= 0); did = H5Dcreate2(fid, "str2", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); ret = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Dclose(did); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Sclose(sid); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * str3 @@ -6149,13 +6149,13 @@ gent_string(void) H5Tinsert(tid, "a", HOFFSET(c_t, a), H5T_NATIVE_INT); H5Tinsert(tid, "str", HOFFSET(c_t, str), str_tid); ret = make_dset(fid, "str3", sid, tid, H5P_DEFAULT, &buf3); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(str_tid); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Sclose(sid); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * str4 @@ -6164,14 +6164,14 @@ gent_string(void) sid = H5Screate_simple(SPACE1_RANK, dims4, NULL); ret = make_dset(fid, "str4", sid, H5T_NATIVE_CHAR, H5P_DEFAULT, buf4); ret = H5Sclose(sid); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * close *------------------------------------------------------------------------- */ ret = H5Fclose(fid); - HDassert(ret >= 0); + assert(ret >= 0); } /*------------------------------------------------------------------------- @@ -6215,7 +6215,7 @@ gent_aindices(void) /* create a file */ fid = H5Fcreate(FILE50, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(fid >= 0); + assert(fid >= 0); /*------------------------------------------------------------------------- * root datasets @@ -6248,7 +6248,7 @@ gent_aindices(void) *------------------------------------------------------------------------- */ ret = H5Fclose(fid); - HDassert(ret >= 0); + assert(ret >= 0); } /*------------------------------------------------------------------------- @@ -6269,37 +6269,37 @@ gent_longlinks(void) /* Create files */ fid = H5Fcreate(FILE51, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(fid >= 0); + assert(fid >= 0); /* Create group with short name in file (used as target for hard links) */ gid = H5Gcreate2(fid, "grp1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - HDassert(gid >= 0); + assert(gid >= 0); /* Construct very long file name */ - objname = (char *)HDmalloc((size_t)(F51_MAX_NAME_LEN + 1)); - HDassert(objname); + objname = (char *)malloc((size_t)(F51_MAX_NAME_LEN + 1)); + assert(objname); for (u = 0; u < F51_MAX_NAME_LEN; u++) objname[u] = 'a'; objname[F51_MAX_NAME_LEN] = '\0'; /* Create hard link to existing object */ - HDassert(H5Lcreate_hard(fid, "grp1", fid, objname, H5P_DEFAULT, H5P_DEFAULT) >= 0); + assert(H5Lcreate_hard(fid, "grp1", fid, objname, H5P_DEFAULT, H5P_DEFAULT) >= 0); /* Create soft link to existing object */ objname[0] = 'b'; - HDassert(H5Lcreate_soft("grp1", fid, objname, H5P_DEFAULT, H5P_DEFAULT) >= 0); + assert(H5Lcreate_soft("grp1", fid, objname, H5P_DEFAULT, H5P_DEFAULT) >= 0); /* Create group with long name in existing group */ gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - HDassert(gid2 >= 0); + assert(gid2 >= 0); /* Close objects */ - HDassert(H5Gclose(gid2) >= 0); - HDassert(H5Gclose(gid) >= 0); - HDassert(H5Fclose(fid) >= 0); + assert(H5Gclose(gid2) >= 0); + assert(H5Gclose(gid) >= 0); + assert(H5Fclose(fid) >= 0); /* Release memory */ - HDfree(objname); + free(objname); } /*------------------------------------------------------------------------- @@ -6349,7 +6349,7 @@ gent_ldouble(void) return 0; error: - HDprintf("error !\n"); + printf("error !\n"); return -1; } @@ -6400,7 +6400,7 @@ gent_ldouble_scalar(void) return 0; error: - HDprintf("error !\n"); + printf("error !\n"); return -1; } @@ -6494,7 +6494,7 @@ gent_bigdims(void) /* create a file */ fid = H5Fcreate(FILE56, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(fid >= 0); + assert(fid >= 0); /* create dataset */ if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) @@ -6520,7 +6520,7 @@ gent_bigdims(void) if ((m_sid = H5Screate_simple(1, hs_size, hs_size)) < 0) goto out; - buf = (char *)HDmalloc((unsigned)(nelmts * size)); + buf = (char *)malloc((unsigned)(nelmts * size)); for (i = 0, c = 0; i < nelmts; i++, c++) { buf[i] = c; @@ -6531,7 +6531,7 @@ gent_bigdims(void) if (H5Dwrite(did, H5T_NATIVE_SCHAR, m_sid, f_sid, H5P_DEFAULT, buf) < 0) goto out; - HDfree(buf); + free(buf); buf = NULL; /* close */ @@ -6552,12 +6552,12 @@ gent_bigdims(void) did = H5I_INVALID_HID; ret = H5Fclose(fid); - HDassert(ret >= 0); + assert(ret >= 0); return; out: - HDprintf("Error.....\n"); + printf("Error.....\n"); H5E_BEGIN_TRY { H5Pclose(dcpl); @@ -6586,20 +6586,20 @@ gent_hyperslab(void) int i; int H5_ATTR_NDEBUG_UNUSED ret; - buf = (double *)HDmalloc(32 * 4097 * sizeof(double)); + buf = (double *)malloc(32 * 4097 * sizeof(double)); for (i = 0; i < 32 * 4097; i++) buf[i] = 1; /* create a file */ fid = H5Fcreate(FILE57, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(fid >= 0); + assert(fid >= 0); write_dset(fid, 2, dims, "stripmine", H5T_NATIVE_DOUBLE, buf); ret = H5Fclose(fid); - HDassert(ret >= 0); + assert(ret >= 0); - HDfree(buf); + free(buf); } /*------------------------------------------------------------------------- @@ -6744,7 +6744,7 @@ gent_group_creation_order(void) return; out: - HDprintf("Error.....\n"); + printf("Error.....\n"); H5E_BEGIN_TRY { H5Gclose(gid); @@ -7000,7 +7000,7 @@ gent_attr_creation_order(void) return; out: - HDprintf("Error.....\n"); + printf("Error.....\n"); H5E_BEGIN_TRY { H5Gclose(gid); @@ -7479,15 +7479,15 @@ gent_packedbits(void) H5Dclose(dataset); H5Fclose(fid); - HDfree(dsetu8); - HDfree(dsetu16); - HDfree(dsetu32); - HDfree(dsetu64); - HDfree(dset8); - HDfree(dset16); - HDfree(dset32); - HDfree(dset64); - HDfree(dsetdbl); + free(dsetu8); + free(dsetu16); + free(dsetu32); + free(dsetu64); + free(dset8); + free(dset16); + free(dset32); + free(dset64); + free(dsetdbl); } /*------------------------------------------------------------------------- @@ -7733,15 +7733,15 @@ gent_attr_intsize(void) H5Gclose(root); H5Fclose(fid); - HDfree(dsetu8); - HDfree(dsetu16); - HDfree(dsetu32); - HDfree(dsetu64); - HDfree(dset8); - HDfree(dset16); - HDfree(dset32); - HDfree(dset64); - HDfree(dsetdbl); + free(dsetu8); + free(dsetu16); + free(dsetu32); + free(dsetu64); + free(dset8); + free(dset16); + free(dset32); + free(dset64); + free(dsetdbl); } static void @@ -7858,17 +7858,17 @@ gent_charsets(void) sid = H5Screate_simple(1, dim, NULL); fid = H5Fcreate(FILE68, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); status = H5Tset_cset(ascii_dtid, H5T_CSET_ASCII); - HDassert(status >= 0); + assert(status >= 0); H5Tinsert(charset_dtid, "ascii", HOFFSET(CharSetInfo, ascii_p_), ascii_dtid); status = H5Tset_cset(utf8_dtid, H5T_CSET_UTF8); - HDassert(status >= 0); + assert(status >= 0); H5Tinsert(charset_dtid, "utf8", HOFFSET(CharSetInfo, utf8_p_), utf8_dtid); did = H5Dcreate2(fid, "CharSets", charset_dtid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); status = H5Dwrite(did, charset_dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, writeData); - HDassert(status >= 0); + assert(status >= 0); H5Tclose(charset_dtid); H5Tclose(ascii_dtid); @@ -7925,8 +7925,8 @@ gent_compound_intsizes(void) int m, n, o; /* Array init loop vars */ /* Allocate buffer */ - Array1 = (Array1Struct *)HDmalloc(sizeof(Array1Struct) * F70_LENGTH); - HDassert(Array1); + Array1 = (Array1Struct *)malloc(sizeof(Array1Struct) * F70_LENGTH); + assert(Array1); /* Initialize the data in the arrays/datastructure */ for (m = 0; m < F70_LENGTH; m++) { @@ -8038,128 +8038,128 @@ gent_compound_intsizes(void) /* Create the array data type for the 8 bits signed int array */ array8_tid = H5Tarray_create2(H5T_NATIVE_SCHAR, F70_ARRAY_RANK, array_dim8); - HDassert(array8_tid >= 0); + assert(array8_tid >= 0); /* Create the array data type for the 16 bits signed int array */ array16_tid = H5Tarray_create2(H5T_NATIVE_SHORT, F70_ARRAY_RANK, array_dim16); - HDassert(array16_tid >= 0); + assert(array16_tid >= 0); /* Create the array data type for the 32 bits signed int array */ array32_tid = H5Tarray_create2(H5T_NATIVE_INT, F70_ARRAY_RANK, array_dim32); - HDassert(array32_tid >= 0); + assert(array32_tid >= 0); /* Create the array data type for the 64 bits signed int array */ array64_tid = H5Tarray_create2(H5T_NATIVE_LONG, F70_ARRAY_RANK, array_dim64); - HDassert(array64_tid >= 0); + assert(array64_tid >= 0); /* Create the array data type for the 8 bits signed int array */ arrayu8_tid = H5Tarray_create2(H5T_NATIVE_UCHAR, F70_ARRAY_RANK, array_dim8); - HDassert(arrayu8_tid >= 0); + assert(arrayu8_tid >= 0); /* Create the array data type for the 16 bits signed int array */ arrayu16_tid = H5Tarray_create2(H5T_NATIVE_USHORT, F70_ARRAY_RANK, array_dim16); - HDassert(arrayu16_tid >= 0); + assert(arrayu16_tid >= 0); /* Create the array data type for the 32 bits signed int array */ arrayu32_tid = H5Tarray_create2(H5T_NATIVE_UINT, F70_ARRAY_RANK, array_dim32); - HDassert(arrayu32_tid >= 0); + assert(arrayu32_tid >= 0); /* Create the array data type for the 64 bits signed int array */ arrayu64_tid = H5Tarray_create2(H5T_NATIVE_ULONG, F70_ARRAY_RANK, array_dim64); - HDassert(arrayu64_tid >= 0); + assert(arrayu64_tid >= 0); /* Create the array data type for the 32 bits double array */ arraydbl_tid = H5Tarray_create2(H5T_NATIVE_DOUBLE, F70_ARRAY_RANK, array_dim8); - HDassert(arraydbl_tid >= 0); + assert(arraydbl_tid >= 0); /* Create the dataspace */ space = H5Screate_simple(F70_RANK, dim, NULL); - HDassert(space >= 0); + assert(space >= 0); /* Create the file */ fid = H5Fcreate(FILE70, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(fid >= 0); + assert(fid >= 0); /* Create the memory data type */ Array1Structid = H5Tcreate(H5T_COMPOUND, sizeof(Array1Struct)); - HDassert(Array1Structid >= 0); + assert(Array1Structid >= 0); /* Insert the arrays and variables into the structure */ status = H5Tinsert(Array1Structid, F70_DATASETU08, HOFFSET(Array1Struct, dsetu8), arrayu8_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, F70_DATASETU16, HOFFSET(Array1Struct, dsetu16), arrayu16_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, F70_DATASETU32, HOFFSET(Array1Struct, dsetu32), arrayu32_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, F70_DATASETU64, HOFFSET(Array1Struct, dsetu64), arrayu64_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, F70_DATASETS08, HOFFSET(Array1Struct, dset8), array8_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, F70_DATASETS16, HOFFSET(Array1Struct, dset16), array16_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, F70_DATASETS32, HOFFSET(Array1Struct, dset32), array32_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, F70_DATASETS64, HOFFSET(Array1Struct, dset64), array64_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, F70_DUMMYDBL, HOFFSET(Array1Struct, dsetdbl), arraydbl_tid); - HDassert(status >= 0); + assert(status >= 0); /* Create the dataset */ dataset = H5Dcreate2(fid, F70_DATASETNAME, Array1Structid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* Write data to the dataset */ status = H5Dwrite(dataset, Array1Structid, H5S_ALL, H5S_ALL, H5P_DEFAULT, Array1); - HDassert(status >= 0); + assert(status >= 0); /* Release resources */ status = H5Tclose(Array1Structid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(arrayu8_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(arrayu16_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(arrayu32_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(arrayu64_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(array8_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(array16_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(array32_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(array64_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(arraydbl_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Sclose(space); - HDassert(status >= 0); + assert(status >= 0); status = H5Dclose(dataset); - HDassert(status >= 0); + assert(status >= 0); status = H5Fclose(fid); - HDassert(status >= 0); + assert(status >= 0); - HDfree(Array1); + free(Array1); } static void @@ -8208,7 +8208,7 @@ gent_compound_attr_intsizes(void) int m, n, o; /* Array init loop vars */ - Array1 = (Array1Struct *)HDcalloc(F70_LENGTH, sizeof(Array1Struct)); + Array1 = (Array1Struct *)calloc(F70_LENGTH, sizeof(Array1Struct)); /* Initialize the data in the arrays/datastructure */ for (m = 0; m < F70_LENGTH; m++) { @@ -8328,79 +8328,79 @@ gent_compound_attr_intsizes(void) /* Create the array data type for the 8 bits signed int array */ array8_tid = H5Tarray_create2(H5T_NATIVE_SCHAR, F70_ARRAY_RANK, array_dim8); - HDassert(array8_tid >= 0); + assert(array8_tid >= 0); /* Create the array data type for the 16 bits signed int array */ array16_tid = H5Tarray_create2(H5T_NATIVE_SHORT, F70_ARRAY_RANK, array_dim16); - HDassert(array16_tid >= 0); + assert(array16_tid >= 0); /* Create the array data type for the 32 bits signed int array */ array32_tid = H5Tarray_create2(H5T_NATIVE_INT, F70_ARRAY_RANK, array_dim32); - HDassert(array32_tid >= 0); + assert(array32_tid >= 0); /* Create the array data type for the 64 bits signed int array */ array64_tid = H5Tarray_create2(H5T_NATIVE_LONG, F70_ARRAY_RANK, array_dim64); - HDassert(array64_tid >= 0); + assert(array64_tid >= 0); /* Create the array data type for the 8 bits signed int array */ arrayu8_tid = H5Tarray_create2(H5T_NATIVE_UCHAR, F70_ARRAY_RANK, array_dim8); - HDassert(arrayu8_tid >= 0); + assert(arrayu8_tid >= 0); /* Create the array data type for the 16 bits signed int array */ arrayu16_tid = H5Tarray_create2(H5T_NATIVE_USHORT, F70_ARRAY_RANK, array_dim16); - HDassert(arrayu16_tid >= 0); + assert(arrayu16_tid >= 0); /* Create the array data type for the 32 bits signed int array */ arrayu32_tid = H5Tarray_create2(H5T_NATIVE_UINT, F70_ARRAY_RANK, array_dim32); - HDassert(arrayu32_tid >= 0); + assert(arrayu32_tid >= 0); /* Create the array data type for the 64 bits signed int array */ arrayu64_tid = H5Tarray_create2(H5T_NATIVE_ULONG, F70_ARRAY_RANK, array_dim64); - HDassert(arrayu64_tid >= 0); + assert(arrayu64_tid >= 0); /* Create the array data type for the 32 bits double array */ arraydbl_tid = H5Tarray_create2(H5T_NATIVE_DOUBLE, F70_ARRAY_RANK, array_dim8); - HDassert(arraydbl_tid >= 0); + assert(arraydbl_tid >= 0); /* Create the dataspace */ space = H5Screate_simple(F70_RANK, dim, NULL); - HDassert(space >= 0); + assert(space >= 0); /* Create the file */ fid = H5Fcreate(FILE71, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(fid >= 0); + assert(fid >= 0); /* Create the memory data type */ Array1Structid = H5Tcreate(H5T_COMPOUND, sizeof(Array1Struct)); - HDassert(Array1Structid >= 0); + assert(Array1Structid >= 0); /* Insert the arrays and variables into the structure */ status = H5Tinsert(Array1Structid, F70_DATASETU08, HOFFSET(Array1Struct, dsetu8), arrayu8_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, F70_DATASETU16, HOFFSET(Array1Struct, dsetu16), arrayu16_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, F70_DATASETU32, HOFFSET(Array1Struct, dsetu32), arrayu32_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, F70_DATASETU64, HOFFSET(Array1Struct, dsetu64), arrayu64_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, F70_DATASETS08, HOFFSET(Array1Struct, dset8), array8_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, F70_DATASETS16, HOFFSET(Array1Struct, dset16), array16_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, F70_DATASETS32, HOFFSET(Array1Struct, dset32), array32_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, F70_DATASETS64, HOFFSET(Array1Struct, dset64), array64_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, F70_DUMMYDBL, HOFFSET(Array1Struct, dsetdbl), arraydbl_tid); - HDassert(status >= 0); + assert(status >= 0); root = H5Gopen2(fid, "/", H5P_DEFAULT); @@ -8409,49 +8409,49 @@ gent_compound_attr_intsizes(void) /* Write data to the attribute */ status = H5Awrite(attr, Array1Structid, Array1); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(arrayu8_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(arrayu16_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(arrayu32_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(arrayu64_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(array8_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(array16_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(array32_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(array64_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(arraydbl_tid); - HDassert(status >= 0); + assert(status >= 0); /* Release resources */ status = H5Tclose(Array1Structid); - HDassert(status >= 0); + assert(status >= 0); status = H5Sclose(space); - HDassert(status >= 0); + assert(status >= 0); status = H5Aclose(attr); - HDassert(status >= 0); + assert(status >= 0); status = H5Fclose(fid); - HDassert(status >= 0); + assert(status >= 0); - HDfree(Array1); + free(Array1); } static void @@ -8854,15 +8854,15 @@ gent_intscalars(void) H5Dclose(dataset); H5Fclose(fid); - HDfree(dsetu8); - HDfree(dsetu16); - HDfree(dsetu32); - HDfree(dsetu64); - HDfree(dset8); - HDfree(dset16); - HDfree(dset32); - HDfree(dset64); - HDfree(dsetdbl); + free(dsetu8); + free(dsetu16); + free(dsetu32); + free(dsetu64); + free(dset8); + free(dset16); + free(dset32); + free(dset64); + free(dsetdbl); } /*------------------------------------------------------------------------- @@ -9118,15 +9118,15 @@ gent_attr_intscalars(void) H5Gclose(root); H5Fclose(fid); - HDfree(dsetu8); - HDfree(dsetu16); - HDfree(dsetu32); - HDfree(dsetu64); - HDfree(dset8); - HDfree(dset16); - HDfree(dset32); - HDfree(dset64); - HDfree(dsetdbl); + free(dsetu8); + free(dsetu16); + free(dsetu32); + free(dsetu64); + free(dset8); + free(dset16); + free(dset32); + free(dset64); + free(dsetdbl); } /*------------------------------------------------------------------------- @@ -9229,8 +9229,8 @@ gent_compound_int_array(void) int m, n; /* Array init loop vars */ /* Allocate buffer */ - Cmpd1 = (Cmpd1Struct *)HDmalloc(sizeof(Cmpd1Struct) * F76_LENGTH); - HDassert(Cmpd1); + Cmpd1 = (Cmpd1Struct *)malloc(sizeof(Cmpd1Struct) * F76_LENGTH); + assert(Cmpd1); /* Initialize the data in the arrays/datastructure */ for (m = 0; m < F76_LENGTH; m++) { @@ -9316,128 +9316,128 @@ gent_compound_int_array(void) /* Create the array data type for the 8 bits signed int array */ array8_tid = H5Tarray_create2(H5T_NATIVE_SCHAR, F76_ARRAY_RANK, array_dim8); - HDassert(array8_tid >= 0); + assert(array8_tid >= 0); /* Create the array data type for the 16 bits signed int array */ array16_tid = H5Tarray_create2(H5T_NATIVE_SHORT, F76_ARRAY_RANK, array_dim16); - HDassert(array16_tid >= 0); + assert(array16_tid >= 0); /* Create the array data type for the 32 bits signed int array */ array32_tid = H5Tarray_create2(H5T_NATIVE_INT, F76_ARRAY_RANK, array_dim32); - HDassert(array32_tid >= 0); + assert(array32_tid >= 0); /* Create the array data type for the 64 bits signed int array */ array64_tid = H5Tarray_create2(H5T_NATIVE_LONG, F76_ARRAY_RANK, array_dim64); - HDassert(array64_tid >= 0); + assert(array64_tid >= 0); /* Create the array data type for the 8 bits signed int array */ arrayu8_tid = H5Tarray_create2(H5T_NATIVE_UCHAR, F76_ARRAY_RANK, array_dim8); - HDassert(arrayu8_tid >= 0); + assert(arrayu8_tid >= 0); /* Create the array data type for the 16 bits signed int array */ arrayu16_tid = H5Tarray_create2(H5T_NATIVE_USHORT, F76_ARRAY_RANK, array_dim16); - HDassert(arrayu16_tid >= 0); + assert(arrayu16_tid >= 0); /* Create the array data type for the 32 bits signed int array */ arrayu32_tid = H5Tarray_create2(H5T_NATIVE_UINT, F76_ARRAY_RANK, array_dim32); - HDassert(arrayu32_tid >= 0); + assert(arrayu32_tid >= 0); /* Create the array data type for the 64 bits signed int array */ arrayu64_tid = H5Tarray_create2(H5T_NATIVE_ULONG, F76_ARRAY_RANK, array_dim64); - HDassert(arrayu64_tid >= 0); + assert(arrayu64_tid >= 0); /* Create the array data type for the 32 bits double array */ arraydbl_tid = H5Tarray_create2(H5T_NATIVE_DOUBLE, F76_ARRAY_RANK, array_dim8); - HDassert(arraydbl_tid >= 0); + assert(arraydbl_tid >= 0); /* Create the dataspace */ space = H5Screate_simple(F76_RANK, dim, NULL); - HDassert(space >= 0); + assert(space >= 0); /* Create the file */ fid = H5Fcreate(FILE76, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(fid >= 0); + assert(fid >= 0); /* Create the memory data type */ Cmpd1Structid = H5Tcreate(H5T_COMPOUND, sizeof(Cmpd1Struct)); - HDassert(Cmpd1Structid >= 0); + assert(Cmpd1Structid >= 0); /* Insert the arrays and variables into the structure */ status = H5Tinsert(Cmpd1Structid, F76_DATASETU08, HOFFSET(Cmpd1Struct, dsetu8), arrayu8_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd1Structid, F76_DATASETU16, HOFFSET(Cmpd1Struct, dsetu16), arrayu16_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd1Structid, F76_DATASETU32, HOFFSET(Cmpd1Struct, dsetu32), arrayu32_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd1Structid, F76_DATASETU64, HOFFSET(Cmpd1Struct, dsetu64), arrayu64_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd1Structid, F76_DATASETS08, HOFFSET(Cmpd1Struct, dset8), array8_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd1Structid, F76_DATASETS16, HOFFSET(Cmpd1Struct, dset16), array16_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd1Structid, F76_DATASETS32, HOFFSET(Cmpd1Struct, dset32), array32_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd1Structid, F76_DATASETS64, HOFFSET(Cmpd1Struct, dset64), array64_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd1Structid, F76_DUMMYDBL, HOFFSET(Cmpd1Struct, dsetdbl), arraydbl_tid); - HDassert(status >= 0); + assert(status >= 0); /* Create the dataset */ dataset = H5Dcreate2(fid, F76_DATASETNAME, Cmpd1Structid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* Write data to the dataset */ status = H5Dwrite(dataset, Cmpd1Structid, H5S_ALL, H5S_ALL, H5P_DEFAULT, Cmpd1); - HDassert(status >= 0); + assert(status >= 0); /* Release resources */ status = H5Tclose(Cmpd1Structid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(arrayu8_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(arrayu16_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(arrayu32_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(arrayu64_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(array8_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(array16_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(array32_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(array64_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(arraydbl_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Sclose(space); - HDassert(status >= 0); + assert(status >= 0); status = H5Dclose(dataset); - HDassert(status >= 0); + assert(status >= 0); status = H5Fclose(fid); - HDassert(status >= 0); + assert(status >= 0); - HDfree(Cmpd1); + free(Cmpd1); } static void @@ -9487,10 +9487,10 @@ gent_compound_ints(void) int m; /* Array init loop vars */ /* Allocate buffers */ - Cmpd1 = (Cmpd1Struct *)HDmalloc(sizeof(Cmpd1Struct) * F77_LENGTH); - HDassert(Cmpd1); - Cmpd2 = (Cmpd2Struct *)HDmalloc(sizeof(Cmpd2Struct) * F77_LENGTH); - HDassert(Cmpd2); + Cmpd1 = (Cmpd1Struct *)malloc(sizeof(Cmpd1Struct) * F77_LENGTH); + assert(Cmpd1); + Cmpd2 = (Cmpd2Struct *)malloc(sizeof(Cmpd2Struct) * F77_LENGTH); + assert(Cmpd2); /* Initialize the data in the arrays/datastructure */ for (m = 0; m < F77_LENGTH; m++) { @@ -9558,119 +9558,119 @@ gent_compound_ints(void) /* Create the dataspace */ space = H5Screate_simple(F76_RANK, dim, NULL); - HDassert(space >= 0); + assert(space >= 0); /* Create the file */ fid = H5Fcreate(FILE77, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(fid >= 0); + assert(fid >= 0); /* Create the memory data type */ Cmpd1Structid = H5Tcreate(H5T_COMPOUND, sizeof(Cmpd1Struct)); - HDassert(Cmpd1Structid >= 0); + assert(Cmpd1Structid >= 0); /* Insert the arrays and variables into the structure */ status = H5Tinsert(Cmpd1Structid, F76_DATASETU08, HOFFSET(Cmpd1Struct, dsetu8), H5T_NATIVE_UCHAR); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd1Structid, F76_DATASETU16, HOFFSET(Cmpd1Struct, dsetu16), H5T_NATIVE_USHORT); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd1Structid, F76_DATASETU32, HOFFSET(Cmpd1Struct, dsetu32), H5T_NATIVE_UINT); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd1Structid, F76_DATASETU64, HOFFSET(Cmpd1Struct, dsetu64), H5T_NATIVE_ULONG); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd1Structid, F76_DATASETS08, HOFFSET(Cmpd1Struct, dset8), H5T_NATIVE_SCHAR); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd1Structid, F76_DATASETS16, HOFFSET(Cmpd1Struct, dset16), H5T_NATIVE_SHORT); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd1Structid, F76_DATASETS32, HOFFSET(Cmpd1Struct, dset32), H5T_NATIVE_INT); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd1Structid, F76_DATASETS64, HOFFSET(Cmpd1Struct, dset64), H5T_NATIVE_LONG); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd1Structid, F76_DUMMYDBL, HOFFSET(Cmpd1Struct, dsetdbl), H5T_NATIVE_DOUBLE); - HDassert(status >= 0); + assert(status >= 0); /* Create the dataset */ dataset = H5Dcreate2(fid, F77_DATASETNAME1, Cmpd1Structid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* Write data to the dataset */ status = H5Dwrite(dataset, Cmpd1Structid, H5S_ALL, H5S_ALL, H5P_DEFAULT, Cmpd1); - HDassert(status >= 0); + assert(status >= 0); /* Release resources */ status = H5Tclose(Cmpd1Structid); - HDassert(status >= 0); + assert(status >= 0); status = H5Sclose(space); - HDassert(status >= 0); + assert(status >= 0); status = H5Dclose(dataset); - HDassert(status >= 0); + assert(status >= 0); /* Create the dataspace */ space = H5Screate_simple(F76_RANK, dim, NULL); - HDassert(space >= 0); + assert(space >= 0); /* Create the memory data type */ Cmpd2Structid = H5Tcreate(H5T_COMPOUND, sizeof(Cmpd2Struct)); - HDassert(Cmpd2Structid >= 0); + assert(Cmpd2Structid >= 0); /* Insert the arrays and variables into the structure */ status = H5Tinsert(Cmpd2Structid, F76_DATASETU64, HOFFSET(Cmpd2Struct, dsetu64), H5T_NATIVE_ULONG); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd2Structid, F76_DATASETU32, HOFFSET(Cmpd2Struct, dsetu32), H5T_NATIVE_UINT); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd2Structid, F76_DATASETU16, HOFFSET(Cmpd2Struct, dsetu16), H5T_NATIVE_USHORT); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd2Structid, F76_DATASETU08, HOFFSET(Cmpd2Struct, dsetu8), H5T_NATIVE_UCHAR); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd2Structid, F76_DATASETS64, HOFFSET(Cmpd2Struct, dset64), H5T_NATIVE_LONG); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd2Structid, F76_DATASETS32, HOFFSET(Cmpd2Struct, dset32), H5T_NATIVE_INT); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd2Structid, F76_DATASETS16, HOFFSET(Cmpd2Struct, dset16), H5T_NATIVE_SHORT); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd2Structid, F76_DATASETS08, HOFFSET(Cmpd2Struct, dset8), H5T_NATIVE_SCHAR); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd2Structid, F76_DUMMYDBL, HOFFSET(Cmpd2Struct, dsetdbl), H5T_NATIVE_DOUBLE); - HDassert(status >= 0); + assert(status >= 0); /* Create the dataset */ dataset = H5Dcreate2(fid, F77_DATASETNAME2, Cmpd2Structid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* Write data to the dataset */ status = H5Dwrite(dataset, Cmpd2Structid, H5S_ALL, H5S_ALL, H5P_DEFAULT, Cmpd2); - HDassert(status >= 0); + assert(status >= 0); /* Release resources */ status = H5Tclose(Cmpd2Structid); - HDassert(status >= 0); + assert(status >= 0); status = H5Sclose(space); - HDassert(status >= 0); + assert(status >= 0); status = H5Dclose(dataset); - HDassert(status >= 0); + assert(status >= 0); status = H5Fclose(fid); - HDassert(status >= 0); + assert(status >= 0); - HDfree(Cmpd1); - HDfree(Cmpd2); + free(Cmpd1); + free(Cmpd2); } /*------------------------------------------------------------------------- @@ -9958,15 +9958,15 @@ gent_intattrscalars(void) H5Dclose(dataset); H5Fclose(fid); - HDfree(dsetu8); - HDfree(dsetu16); - HDfree(dsetu32); - HDfree(dsetu64); - HDfree(dset8); - HDfree(dset16); - HDfree(dset32); - HDfree(dset64); - HDfree(dsetdbl); + free(dsetu8); + free(dsetu16); + free(dsetu32); + free(dsetu64); + free(dset8); + free(dset16); + free(dset32); + free(dset64); + free(dsetdbl); } /*------------------------------------------------------------------------- @@ -10049,15 +10049,15 @@ gent_intsattrs(void) dset64 = malloc(sizeof(*dset64)); dsetdbl = malloc(sizeof(*dsetdbl)); - asetu8 = HDcalloc(F66_XDIM * F66_YDIM8, sizeof(uint8_t)); - asetu16 = HDcalloc(F66_XDIM * F66_YDIM16, sizeof(uint16_t)); - asetu32 = HDcalloc(F66_XDIM * F66_YDIM32, sizeof(uint32_t)); - asetu64 = HDcalloc(F66_XDIM * F66_YDIM64, sizeof(uint64_t)); - aset8 = HDcalloc(F66_XDIM * F66_YDIM8, sizeof(int8_t)); - aset16 = HDcalloc(F66_XDIM * F66_YDIM16, sizeof(int16_t)); - aset32 = HDcalloc(F66_XDIM * F66_YDIM32, sizeof(int32_t)); - aset64 = HDcalloc(F66_XDIM * F66_YDIM64, sizeof(int64_t)); - asetdbl = HDcalloc(F66_XDIM * F66_YDIM8, sizeof(double)); + asetu8 = calloc(F66_XDIM * F66_YDIM8, sizeof(uint8_t)); + asetu16 = calloc(F66_XDIM * F66_YDIM16, sizeof(uint16_t)); + asetu32 = calloc(F66_XDIM * F66_YDIM32, sizeof(uint32_t)); + asetu64 = calloc(F66_XDIM * F66_YDIM64, sizeof(uint64_t)); + aset8 = calloc(F66_XDIM * F66_YDIM8, sizeof(int8_t)); + aset16 = calloc(F66_XDIM * F66_YDIM16, sizeof(int16_t)); + aset32 = calloc(F66_XDIM * F66_YDIM32, sizeof(int32_t)); + aset64 = calloc(F66_XDIM * F66_YDIM64, sizeof(int64_t)); + asetdbl = calloc(F66_XDIM * F66_YDIM8, sizeof(double)); fid = H5Fcreate(FILE79, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); @@ -10309,25 +10309,25 @@ gent_intsattrs(void) H5Dclose(dataset); H5Fclose(fid); - HDfree(dsetu8); - HDfree(dsetu16); - HDfree(dsetu32); - HDfree(dsetu64); - HDfree(dset8); - HDfree(dset16); - HDfree(dset32); - HDfree(dset64); - HDfree(dsetdbl); - - HDfree(asetu8); - HDfree(asetu16); - HDfree(asetu32); - HDfree(asetu64); - HDfree(aset8); - HDfree(aset16); - HDfree(aset32); - HDfree(aset64); - HDfree(asetdbl); + free(dsetu8); + free(dsetu16); + free(dsetu32); + free(dsetu64); + free(dset8); + free(dset16); + free(dset32); + free(dset64); + free(dsetdbl); + + free(asetu8); + free(asetu16); + free(asetu32); + free(asetu64); + free(aset8); + free(aset16); + free(aset32); + free(aset64); + free(asetdbl); } /*------------------------------------------------------------------------- @@ -10374,9 +10374,9 @@ gent_floatsattrs(void) dset64 = malloc(sizeof(*dset64)); dset128 = malloc(sizeof(*dset128)); - aset32 = HDcalloc(F89_XDIM * F89_YDIM32, sizeof(float)); - aset64 = HDcalloc(F89_XDIM * F89_YDIM64, sizeof(double)); - aset128 = HDcalloc(F89_XDIM * F89_YDIM128, sizeof(long double)); + aset32 = calloc(F89_XDIM * F89_YDIM32, sizeof(float)); + aset64 = calloc(F89_XDIM * F89_YDIM64, sizeof(double)); + aset128 = calloc(F89_XDIM * F89_YDIM128, sizeof(long double)); fid = H5Fcreate(FILE89, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); @@ -10473,13 +10473,13 @@ gent_floatsattrs(void) error: H5Fclose(fid); - HDfree(dset32); - HDfree(dset64); - HDfree(dset128); + free(dset32); + free(dset64); + free(dset128); - HDfree(aset32); - HDfree(aset64); - HDfree(aset128); + free(aset32); + free(aset64); + free(aset128); } static void @@ -10754,8 +10754,8 @@ gent_compound_complex2(void) hsize_t nelmts = F82_DIM32; /* Allocate buffer */ - buf = (compound *)HDmalloc(sizeof(compound) * F82_DIM32); - HDassert(buf); + buf = (compound *)malloc(sizeof(compound) * F82_DIM32); + assert(buf); file = H5Fcreate(FILE82, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); @@ -10930,7 +10930,7 @@ gent_compound_complex2(void) } if (H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - HDfprintf(stderr, "gent_tcompound_complex2 H5Dwrite failed\n"); + fprintf(stderr, "gent_tcompound_complex2 H5Dwrite failed\n"); H5Dclose(dset); } @@ -11010,7 +11010,7 @@ gent_compound_complex2(void) */ H5Fclose(file); - HDfree(buf); + free(buf); } /*------------------------------------------------------------------------- @@ -11061,7 +11061,7 @@ gent_vlenstr_array(void) if ((dset = H5Dcreate2(file, F83_DATASETNAME, type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) { if (H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buffer) < 0) - HDfprintf(stderr, "gent_vlenstr_array H5Dwrite failed\n"); + fprintf(stderr, "gent_vlenstr_array H5Dwrite failed\n"); H5Dclose(dset); } @@ -11083,7 +11083,7 @@ gent_vlenstr_array(void) if ((dset = H5Dcreate2(file, F83_DATASETNAME2, type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) { if (H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) - HDfprintf(stderr, "gent_vlenstr_array H5Dwrite failed\n"); + fprintf(stderr, "gent_vlenstr_array H5Dwrite failed\n"); H5Dclose(dset); } @@ -11124,54 +11124,54 @@ gent_udfilter(void) /* create a file */ fid = H5Fcreate(FILE84, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(fid >= 0); + assert(fid >= 0); /* create a space */ sid = H5Screate_simple(SPACE2_RANK, dims1, NULL); dcpl = H5Pcreate(H5P_DATASET_CREATE); - HDassert(dcpl >= 0); + assert(dcpl >= 0); ret = H5Pset_layout(dcpl, H5D_CHUNKED); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Pset_chunk(dcpl, SPACE2_RANK, chunk_dims); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Zregister(H5Z_DYNLIBUD); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Pset_filter(dcpl, H5Z_FILTER_DYNLIBUD, H5Z_FLAG_MANDATORY, 0, NULL); - HDassert(ret >= 0); + assert(ret >= 0); /* create the dataset */ dsid = H5Dcreate2(fid, "dynlibud", H5T_STD_I32LE, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT); - HDassert(dsid >= 0); + assert(dsid >= 0); /* write */ ret = H5Dwrite(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf1); - HDassert(ret >= 0); + assert(ret >= 0); /* close */ ret = H5Dclose(dsid); - HDassert(ret >= 0); + assert(ret >= 0); /* remove the filters from the dcpl */ ret = H5Premove_filter(dcpl, H5Z_FILTER_ALL); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * close *------------------------------------------------------------------------- */ ret = H5Sclose(sid); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Pclose(dcpl); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Fclose(fid); - HDassert(ret >= 0); + assert(ret >= 0); } /*------------------------------------------------------------------------- @@ -11367,17 +11367,17 @@ onion_filepaths_init(const char *basename) { struct onion_filepaths *paths = NULL; - if (NULL == (paths = HDcalloc(1, sizeof(struct onion_filepaths)))) + if (NULL == (paths = calloc(1, sizeof(struct onion_filepaths)))) goto error; if (NULL == (paths->canon = HDstrdup(basename))) goto error; - if (NULL == (paths->onion = HDmalloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE))) + if (NULL == (paths->onion = malloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE))) goto error; HDsnprintf(paths->onion, ONION_TEST_FIXNAME_SIZE, "%s.onion", paths->canon); - if (NULL == (paths->recovery = HDmalloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE))) + if (NULL == (paths->recovery = malloc(sizeof(char) * ONION_TEST_FIXNAME_SIZE))) goto error; HDsnprintf(paths->recovery, ONION_TEST_FIXNAME_SIZE, "%s.onion.recovery", paths->canon); @@ -11385,10 +11385,10 @@ onion_filepaths_init(const char *basename) error: if (paths != NULL) { - HDfree(paths->canon); - HDfree(paths->onion); - HDfree(paths->recovery); - HDfree(paths); + free(paths->canon); + free(paths->onion); + free(paths->recovery); + free(paths); } return NULL; } @@ -11397,10 +11397,10 @@ static void onion_filepaths_destroy(struct onion_filepaths *s) { if (s) { - HDfree(s->canon); - HDfree(s->onion); - HDfree(s->recovery); - HDfree(s); + free(s->canon); + free(s->onion); + free(s->recovery); + free(s); } } diff --git a/tools/test/h5format_convert/h5fc_chk_idx.c b/tools/test/h5format_convert/h5fc_chk_idx.c index 97688ad..49fbbab 100644 --- a/tools/test/h5format_convert/h5fc_chk_idx.c +++ b/tools/test/h5format_convert/h5fc_chk_idx.c @@ -25,7 +25,7 @@ static void usage(void); static void usage(void) { - HDfprintf(stdout, "Usage: h5fc_chk_idx file_name dataset_pathname\n"); + fprintf(stdout, "Usage: h5fc_chk_idx file_name dataset_pathname\n"); } /* usage() */ /*------------------------------------------------------------------------- @@ -51,7 +51,7 @@ main(int argc, char *argv[]) /* h5fc_chk_idx fname dname */ if (argc != 3) { usage(); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ /* Duplicate the file name & dataset name */ @@ -60,40 +60,40 @@ main(int argc, char *argv[]) /* Try opening the file */ if ((fid = h5tools_fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT, FALSE, NULL, (size_t)0)) < 0) { - HDfprintf(stderr, "h5fc_chk_idx: unable to open the file\n"); - HDexit(EXIT_FAILURE); + fprintf(stderr, "h5fc_chk_idx: unable to open the file\n"); + exit(EXIT_FAILURE); } /* end if */ /* Open the dataset */ if ((did = H5Dopen2(fid, dname, H5P_DEFAULT)) < 0) { - HDfprintf(stderr, "h5fc_chk_idx: unable to open the dataset\n"); - HDexit(EXIT_FAILURE); + fprintf(stderr, "h5fc_chk_idx: unable to open the dataset\n"); + exit(EXIT_FAILURE); } /* end if */ /* Get the dataset's chunk indexing type */ if (H5Dget_chunk_index_type(did, &idx_type) < 0) { - HDfprintf(stderr, "h5fc_chk_idx: unable to get chunk index type for the dataset\n"); - HDexit(EXIT_FAILURE); + fprintf(stderr, "h5fc_chk_idx: unable to get chunk index type for the dataset\n"); + exit(EXIT_FAILURE); } /* end if */ /* Close the dataset */ if (H5Dclose(did) < 0) { - HDfprintf(stderr, "h5fc_chk_idx: unable to close the dataset\n"); - HDexit(EXIT_FAILURE); + fprintf(stderr, "h5fc_chk_idx: unable to close the dataset\n"); + exit(EXIT_FAILURE); } /* end if */ /* Close the file */ if (H5Fclose(fid) < 0) { - HDfprintf(stderr, "h5fc_chk_idx_type: cannot close the file\n"); - HDexit(EXIT_FAILURE); + fprintf(stderr, "h5fc_chk_idx_type: cannot close the file\n"); + exit(EXIT_FAILURE); } /* end if */ /* Return success when the chunk indexing type is version 1 B-tree */ if (idx_type == H5D_CHUNK_IDX_BTREE) - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); else { - HDfprintf(stderr, "Error: chunk indexing type is %d\n", idx_type); - HDexit(EXIT_FAILURE); + fprintf(stderr, "Error: chunk indexing type is %d\n", idx_type); + exit(EXIT_FAILURE); } /* end if */ } /* main() */ diff --git a/tools/test/h5format_convert/h5fc_gentest.c b/tools/test/h5format_convert/h5fc_gentest.c index 26ee4ca..56287cf 100644 --- a/tools/test/h5format_convert/h5fc_gentest.c +++ b/tools/test/h5format_convert/h5fc_gentest.c @@ -423,8 +423,8 @@ gen_err_level(const char *fname) goto error; /* Initialize data buffer */ - buf = (unsigned char *)HDmalloc(NUM * sizeof(unsigned char *)); - HDmemset(buf, 42, NUM * sizeof(unsigned char)); + buf = (unsigned char *)malloc(NUM * sizeof(unsigned char *)); + memset(buf, 42, NUM * sizeof(unsigned char)); /* Create the test file */ if ((fid = H5Fcreate(fname, H5F_ACC_TRUNC, fcpl, fapl)) < 0) @@ -797,7 +797,7 @@ main(void) for (i = 0; i < 8; i++) { char filename[50]; - HDmemset(filename, 0, sizeof(filename)); + memset(filename, 0, sizeof(filename)); if (!new_format) HDstrcat(filename, "old_"); HDstrcat(filename, FILENAME[i]); diff --git a/tools/test/h5import/h5importtest.c b/tools/test/h5import/h5importtest.c index b05ea82..1919e5b 100644 --- a/tools/test/h5import/h5importtest.c +++ b/tools/test/h5import/h5importtest.c @@ -159,12 +159,12 @@ main(void) *------------------------------------------------------------------------- */ - sp = HDfopen("txtin8.txt", "w"); + sp = fopen("txtin8.txt", "w"); for (k = 0; k < npln; k++) { for (i = 0; i < nrow; i++) { for (j = 0; j < ncol; j++) - (void)HDfprintf(sp, "%10u", b8i3[k][i][j]); - (void)HDfprintf(sp, "\n"); + (void)fprintf(sp, "%10u", b8i3[k][i][j]); + (void)fprintf(sp, "\n"); } } (void)HDfclose(sp); @@ -174,12 +174,12 @@ main(void) *------------------------------------------------------------------------- */ - sp = HDfopen("txtin16.txt", "w"); + sp = fopen("txtin16.txt", "w"); for (k = 0; k < npln; k++) { for (i = 0; i < nrow; i++) { for (j = 0; j < ncol; j++) - (void)HDfprintf(sp, "%10u", b16i3[k][i][j]); - (void)HDfprintf(sp, "\n"); + (void)fprintf(sp, "%10u", b16i3[k][i][j]); + (void)fprintf(sp, "\n"); } } (void)HDfclose(sp); @@ -189,12 +189,12 @@ main(void) *------------------------------------------------------------------------- */ - sp = HDfopen("txtin32.txt", "w"); + sp = fopen("txtin32.txt", "w"); for (k = 0; k < npln; k++) { for (i = 0; i < nrow; i++) { for (j = 0; j < ncol; j++) - (void)HDfprintf(sp, "%10d", b32i3[k][i][j]); - (void)HDfprintf(sp, "\n"); + (void)fprintf(sp, "%10d", b32i3[k][i][j]); + (void)fprintf(sp, "\n"); } } (void)HDfclose(sp); @@ -205,7 +205,7 @@ main(void) *------------------------------------------------------------------------- */ - sp = HDfopen("binin32.bin", OPEN_FLAGS); + sp = fopen("binin32.bin", OPEN_FLAGS); for (k = 0; k < npln; k++) { for (i = 0; i < nrow; i++) { for (j = 0; j < ncol; j++) { @@ -215,17 +215,17 @@ main(void) } (void)HDfclose(sp); - sp = HDfopen("binin32.conf", "w"); - (void)HDfprintf(sp, "PATH /int/bin/32-bit\n"); - (void)HDfprintf(sp, "INPUT-CLASS IN\n"); - (void)HDfprintf(sp, "INPUT-SIZE 32\n"); - (void)HDfprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order); - (void)HDfprintf(sp, "RANK 3\n"); - (void)HDfprintf(sp, "OUTPUT-ARCHITECTURE STD\n"); - (void)HDfprintf(sp, "OUTPUT-BYTE-ORDER BE\n"); - (void)HDfprintf(sp, "DIMENSION-SIZES 5 3 4\n"); - (void)HDfprintf(sp, "CHUNKED-DIMENSION-SIZES 1 2 1\n"); - (void)HDfprintf(sp, "\n"); + sp = fopen("binin32.conf", "w"); + (void)fprintf(sp, "PATH /int/bin/32-bit\n"); + (void)fprintf(sp, "INPUT-CLASS IN\n"); + (void)fprintf(sp, "INPUT-SIZE 32\n"); + (void)fprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order); + (void)fprintf(sp, "RANK 3\n"); + (void)fprintf(sp, "OUTPUT-ARCHITECTURE STD\n"); + (void)fprintf(sp, "OUTPUT-BYTE-ORDER BE\n"); + (void)fprintf(sp, "DIMENSION-SIZES 5 3 4\n"); + (void)fprintf(sp, "CHUNKED-DIMENSION-SIZES 1 2 1\n"); + (void)fprintf(sp, "\n"); (void)HDfclose(sp); /*------------------------------------------------------------------------- @@ -233,7 +233,7 @@ main(void) *------------------------------------------------------------------------- */ - sp = HDfopen("binuin32.bin", OPEN_FLAGS); + sp = fopen("binuin32.bin", OPEN_FLAGS); for (k = 0; k < npln; k++) { for (i = 0; i < nrow; i++) { for (j = 0; j < ncol; j++) { @@ -243,16 +243,16 @@ main(void) } (void)HDfclose(sp); - sp = HDfopen("binuin32.conf", "w"); - (void)HDfprintf(sp, "PATH /int/buin/32-bit\n"); - (void)HDfprintf(sp, "INPUT-CLASS UIN\n"); - (void)HDfprintf(sp, "INPUT-SIZE 32\n"); - (void)HDfprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order); - (void)HDfprintf(sp, "RANK 3\n"); - (void)HDfprintf(sp, "OUTPUT-ARCHITECTURE STD\n"); - (void)HDfprintf(sp, "OUTPUT-BYTE-ORDER LE\n"); - (void)HDfprintf(sp, "DIMENSION-SIZES 5 3 4\n"); - (void)HDfprintf(sp, "\n"); + sp = fopen("binuin32.conf", "w"); + (void)fprintf(sp, "PATH /int/buin/32-bit\n"); + (void)fprintf(sp, "INPUT-CLASS UIN\n"); + (void)fprintf(sp, "INPUT-SIZE 32\n"); + (void)fprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order); + (void)fprintf(sp, "RANK 3\n"); + (void)fprintf(sp, "OUTPUT-ARCHITECTURE STD\n"); + (void)fprintf(sp, "OUTPUT-BYTE-ORDER LE\n"); + (void)fprintf(sp, "DIMENSION-SIZES 5 3 4\n"); + (void)fprintf(sp, "\n"); (void)HDfclose(sp); /*------------------------------------------------------------------------- @@ -260,7 +260,7 @@ main(void) *------------------------------------------------------------------------- */ - sp = HDfopen("binin16.bin", OPEN_FLAGS); + sp = fopen("binin16.bin", OPEN_FLAGS); for (k = 0; k < npln; k++) { for (i = 0; i < nrow; i++) { for (j = 0; j < ncol; j++) { @@ -270,25 +270,25 @@ main(void) } (void)HDfclose(sp); - sp = HDfopen("binin16.conf", "w"); - (void)HDfprintf(sp, "PATH /int/bin/16-bit\n"); - (void)HDfprintf(sp, "INPUT-CLASS IN\n"); - (void)HDfprintf(sp, "INPUT-SIZE 16\n"); - (void)HDfprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order); - (void)HDfprintf(sp, "RANK 3\n"); - (void)HDfprintf(sp, "OUTPUT-ARCHITECTURE STD\n"); - (void)HDfprintf(sp, "OUTPUT-BYTE-ORDER LE\n"); - (void)HDfprintf(sp, "DIMENSION-SIZES 2 3 4\n"); - (void)HDfprintf(sp, "CHUNKED-DIMENSION-SIZES 2 2 2\n"); - (void)HDfprintf(sp, "MAXIMUM-DIMENSIONS -1 -1 8\n"); - (void)HDfprintf(sp, "\n"); + sp = fopen("binin16.conf", "w"); + (void)fprintf(sp, "PATH /int/bin/16-bit\n"); + (void)fprintf(sp, "INPUT-CLASS IN\n"); + (void)fprintf(sp, "INPUT-SIZE 16\n"); + (void)fprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order); + (void)fprintf(sp, "RANK 3\n"); + (void)fprintf(sp, "OUTPUT-ARCHITECTURE STD\n"); + (void)fprintf(sp, "OUTPUT-BYTE-ORDER LE\n"); + (void)fprintf(sp, "DIMENSION-SIZES 2 3 4\n"); + (void)fprintf(sp, "CHUNKED-DIMENSION-SIZES 2 2 2\n"); + (void)fprintf(sp, "MAXIMUM-DIMENSIONS -1 -1 8\n"); + (void)fprintf(sp, "\n"); (void)HDfclose(sp); /*------------------------------------------------------------------------- * TOOLTEST binuin16.bin -c binuin16.conf -o binuin16.h5 *------------------------------------------------------------------------- */ - sp = HDfopen("binuin16.bin", OPEN_FLAGS); + sp = fopen("binuin16.bin", OPEN_FLAGS); for (k = 0; k < npln; k++) { for (i = 0; i < nrow; i++) { for (j = 0; j < ncol; j++) { @@ -298,18 +298,18 @@ main(void) } (void)HDfclose(sp); - sp = HDfopen("binuin16.conf", "w"); - (void)HDfprintf(sp, "PATH /int/buin/16-bit\n"); - (void)HDfprintf(sp, "INPUT-CLASS UIN\n"); - (void)HDfprintf(sp, "INPUT-SIZE 16\n"); - (void)HDfprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order); - (void)HDfprintf(sp, "RANK 3\n"); - (void)HDfprintf(sp, "OUTPUT-ARCHITECTURE STD\n"); - (void)HDfprintf(sp, "OUTPUT-BYTE-ORDER BE\n"); - (void)HDfprintf(sp, "DIMENSION-SIZES 2 3 4\n"); - (void)HDfprintf(sp, "CHUNKED-DIMENSION-SIZES 2 2 2\n"); - (void)HDfprintf(sp, "MAXIMUM-DIMENSIONS -1 -1 8\n"); - (void)HDfprintf(sp, "\n"); + sp = fopen("binuin16.conf", "w"); + (void)fprintf(sp, "PATH /int/buin/16-bit\n"); + (void)fprintf(sp, "INPUT-CLASS UIN\n"); + (void)fprintf(sp, "INPUT-SIZE 16\n"); + (void)fprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order); + (void)fprintf(sp, "RANK 3\n"); + (void)fprintf(sp, "OUTPUT-ARCHITECTURE STD\n"); + (void)fprintf(sp, "OUTPUT-BYTE-ORDER BE\n"); + (void)fprintf(sp, "DIMENSION-SIZES 2 3 4\n"); + (void)fprintf(sp, "CHUNKED-DIMENSION-SIZES 2 2 2\n"); + (void)fprintf(sp, "MAXIMUM-DIMENSIONS -1 -1 8\n"); + (void)fprintf(sp, "\n"); (void)HDfclose(sp); /*------------------------------------------------------------------------- @@ -317,7 +317,7 @@ main(void) *------------------------------------------------------------------------- */ - sp = HDfopen("binin8.bin", OPEN_FLAGS); + sp = fopen("binin8.bin", OPEN_FLAGS); for (k = 0; k < npln; k++) { for (i = 0; i < nrow; i++) { for (j = 0; j < ncol; j++) { @@ -327,21 +327,21 @@ main(void) } (void)HDfclose(sp); - sp = HDfopen("binin8.conf", "w"); - (void)HDfprintf(sp, "PATH /int/bin/8-bit\n"); - (void)HDfprintf(sp, "INPUT-CLASS IN\n"); - (void)HDfprintf(sp, "INPUT-SIZE 8\n"); - (void)HDfprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order); - (void)HDfprintf(sp, "RANK 3\n"); - (void)HDfprintf(sp, "OUTPUT-CLASS IN\n"); - (void)HDfprintf(sp, "OUTPUT-SIZE 16\n"); - (void)HDfprintf(sp, "OUTPUT-ARCHITECTURE STD\n"); - (void)HDfprintf(sp, "OUTPUT-BYTE-ORDER LE\n"); - (void)HDfprintf(sp, "DIMENSION-SIZES 5 3 4\n"); - (void)HDfprintf(sp, "CHUNKED-DIMENSION-SIZES 2 2 2\n"); - (void)HDfprintf(sp, "MAXIMUM-DIMENSIONS -1 -1 -1\n"); - (void)HDfprintf(sp, "COMPRESSION-PARAM 3\n"); - (void)HDfprintf(sp, "\n"); + sp = fopen("binin8.conf", "w"); + (void)fprintf(sp, "PATH /int/bin/8-bit\n"); + (void)fprintf(sp, "INPUT-CLASS IN\n"); + (void)fprintf(sp, "INPUT-SIZE 8\n"); + (void)fprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order); + (void)fprintf(sp, "RANK 3\n"); + (void)fprintf(sp, "OUTPUT-CLASS IN\n"); + (void)fprintf(sp, "OUTPUT-SIZE 16\n"); + (void)fprintf(sp, "OUTPUT-ARCHITECTURE STD\n"); + (void)fprintf(sp, "OUTPUT-BYTE-ORDER LE\n"); + (void)fprintf(sp, "DIMENSION-SIZES 5 3 4\n"); + (void)fprintf(sp, "CHUNKED-DIMENSION-SIZES 2 2 2\n"); + (void)fprintf(sp, "MAXIMUM-DIMENSIONS -1 -1 -1\n"); + (void)fprintf(sp, "COMPRESSION-PARAM 3\n"); + (void)fprintf(sp, "\n"); (void)HDfclose(sp); #endif /* UNICOS */ @@ -355,7 +355,7 @@ main(void) * binary 64-bit file - rank 2 & 3 */ - sp = HDfopen("binfp64.bin", OPEN_FLAGS); + sp = fopen("binfp64.bin", OPEN_FLAGS); for (k = 0; k < npln; k++) { for (i = 0; i < nrow; i++) { for (j = 0; j < ncol; j++) { @@ -365,19 +365,19 @@ main(void) } (void)HDfclose(sp); - sp = HDfopen("binfp64.conf", "w"); - (void)HDfprintf(sp, "PATH /fp/bin/64-bit\n"); - (void)HDfprintf(sp, "INPUT-CLASS FP\n"); - (void)HDfprintf(sp, "INPUT-SIZE 64\n"); - (void)HDfprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order); - (void)HDfprintf(sp, "RANK 3\n"); - (void)HDfprintf(sp, "OUTPUT-ARCHITECTURE IEEE\n"); - (void)HDfprintf(sp, "OUTPUT-BYTE-ORDER LE\n"); - (void)HDfprintf(sp, "DIMENSION-SIZES 5 3 4\n"); - (void)HDfprintf(sp, "CHUNKED-DIMENSION-SIZES 2 2 2\n"); - (void)HDfprintf(sp, "MAXIMUM-DIMENSIONS -1 6 7\n"); - (void)HDfprintf(sp, "COMPRESSION-PARAM 8\n"); - (void)HDfprintf(sp, "\n"); + sp = fopen("binfp64.conf", "w"); + (void)fprintf(sp, "PATH /fp/bin/64-bit\n"); + (void)fprintf(sp, "INPUT-CLASS FP\n"); + (void)fprintf(sp, "INPUT-SIZE 64\n"); + (void)fprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order); + (void)fprintf(sp, "RANK 3\n"); + (void)fprintf(sp, "OUTPUT-ARCHITECTURE IEEE\n"); + (void)fprintf(sp, "OUTPUT-BYTE-ORDER LE\n"); + (void)fprintf(sp, "DIMENSION-SIZES 5 3 4\n"); + (void)fprintf(sp, "CHUNKED-DIMENSION-SIZES 2 2 2\n"); + (void)fprintf(sp, "MAXIMUM-DIMENSIONS -1 6 7\n"); + (void)fprintf(sp, "COMPRESSION-PARAM 8\n"); + (void)fprintf(sp, "\n"); (void)HDfclose(sp); /*------------------------------------------------------------------------- @@ -389,25 +389,25 @@ main(void) /* test CR+LF (13,10) and EOF (26) in windows */ char bin8w[4] = {13, 10, 26, 0}; - sp = HDfopen("binin8w.bin", OPEN_FLAGS); + sp = fopen("binin8w.bin", OPEN_FLAGS); for (i = 0; i < 4; i++) { char c = bin8w[i]; if (HDfwrite(&c, sizeof(char), 1, sp) != 1) - HDprintf("error writing file\n"); + printf("error writing file\n"); } HDfclose(sp); - sp = HDfopen("binin8w.conf", "w"); - (void)HDfprintf(sp, "INPUT-CLASS IN\n"); - (void)HDfprintf(sp, "INPUT-SIZE 8\n"); - (void)HDfprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order); - (void)HDfprintf(sp, "RANK 1\n"); - (void)HDfprintf(sp, "OUTPUT-CLASS IN\n"); - (void)HDfprintf(sp, "OUTPUT-SIZE 8\n"); - (void)HDfprintf(sp, "OUTPUT-ARCHITECTURE STD\n"); - (void)HDfprintf(sp, "OUTPUT-BYTE-ORDER LE\n"); - (void)HDfprintf(sp, "DIMENSION-SIZES 4\n"); - (void)HDfprintf(sp, "\n"); + sp = fopen("binin8w.conf", "w"); + (void)fprintf(sp, "INPUT-CLASS IN\n"); + (void)fprintf(sp, "INPUT-SIZE 8\n"); + (void)fprintf(sp, "INPUT-BYTE-ORDER %s\n", machine_order); + (void)fprintf(sp, "RANK 1\n"); + (void)fprintf(sp, "OUTPUT-CLASS IN\n"); + (void)fprintf(sp, "OUTPUT-SIZE 8\n"); + (void)fprintf(sp, "OUTPUT-ARCHITECTURE STD\n"); + (void)fprintf(sp, "OUTPUT-BYTE-ORDER LE\n"); + (void)fprintf(sp, "DIMENSION-SIZES 4\n"); + (void)fprintf(sp, "\n"); (void)HDfclose(sp); } return (EXIT_SUCCESS); diff --git a/tools/test/h5jam/getub.c b/tools/test/h5jam/getub.c index c01df38..96ee5cd 100644 --- a/tools/test/h5jam/getub.c +++ b/tools/test/h5jam/getub.c @@ -35,9 +35,9 @@ static struct h5_long_options l_opts[] = {{"c", require_arg, 'c'}, /* input file static void usage(const char *prog) { - HDfflush(stdout); - HDfprintf(stdout, "usage: %s -c nb file] \n", prog); - HDfprintf(stdout, " print first 'nb' byts of file to stdoug.\n"); + fflush(stdout); + fprintf(stdout, "usage: %s -c nb file] \n", prog); + fprintf(stdout, " print first 'nb' byts of file to stdoug.\n"); } /*------------------------------------------------------------------------- @@ -64,14 +64,14 @@ parse_command_line(int argc, const char *const *argv) case '?': default: usage(h5tools_getprogname()); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end switch */ } /* end while */ if (argc <= H5_optind) { error_msg("missing file name\n"); usage(h5tools_getprogname()); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end if */ } /* end parse_command_line() */ @@ -120,7 +120,7 @@ main(int argc, char *argv[]) goto error; } /* end if */ - if (NULL == (buf = (char *)HDmalloc((unsigned)(size + 1)))) { + if (NULL == (buf = (char *)malloc((unsigned)(size + 1)))) { error_msg("can't allocate buffer \n"); goto error; } /* end if */ @@ -137,15 +137,15 @@ main(int argc, char *argv[]) } /* end if */ /* close things and exit */ - HDfree(filename); - HDfree(buf); + free(filename); + free(buf); HDclose(fd); return EXIT_SUCCESS; error: - HDfree(filename); - HDfree(buf); + free(filename); + free(buf); if (fd >= 0) HDclose(fd); return EXIT_FAILURE; diff --git a/tools/test/h5jam/h5jamgentest.c b/tools/test/h5jam/h5jamgentest.c index bfeb92d..3bb332c 100644 --- a/tools/test/h5jam/h5jamgentest.c +++ b/tools/test/h5jam/h5jamgentest.c @@ -326,7 +326,7 @@ gent_ub(const char *filename, size_t ub_size, size_t ub_fill) goto error; /* Fill buf with pattern */ - HDmemset(buf, '\0', ub_size); + memset(buf, '\0', ub_size); bp = buf; for (u = 0; u < ub_fill; u++) *bp++ = pattern[u % 10]; @@ -369,7 +369,7 @@ create_textfile(const char *name, size_t size) if ((fd = HDcreat(name, 0777)) < 0) goto error; - if (NULL == (buf = (char *)HDcalloc(size, 1))) + if (NULL == (buf = (char *)calloc(size, 1))) goto error; /* Fill buf with pattern */ @@ -380,13 +380,13 @@ create_textfile(const char *name, size_t size) if (HDwrite(fd, buf, size) < 0) goto error; - HDfree(buf); + free(buf); HDclose(fd); return SUCCEED; error: - HDfree(buf); + free(buf); if (fd >= 0) HDclose(fd); @@ -420,6 +420,6 @@ main(void) return EXIT_SUCCESS; error: - HDfprintf(stderr, "h5jam test generator FAILED\n"); + fprintf(stderr, "h5jam test generator FAILED\n"); return EXIT_FAILURE; } diff --git a/tools/test/h5jam/tellub.c b/tools/test/h5jam/tellub.c index d0e717a..501ecc5 100644 --- a/tools/test/h5jam/tellub.c +++ b/tools/test/h5jam/tellub.c @@ -37,11 +37,11 @@ static struct h5_long_options l_opts[] = {{"help", no_arg, 'h'}, {"hel", no_arg, static void usage(const char *prog) { - HDfflush(stdout); - HDfprintf(stdout, "usage: %s h5_file\n", prog); - HDfprintf(stdout, " Check that h5_fil is HDF5 file and print size of user block \n"); - HDfprintf(stdout, " %s -h\n", prog); - HDfprintf(stdout, " Print a usage message and exit\n"); + fflush(stdout); + fprintf(stdout, "usage: %s h5_file\n", prog); + fprintf(stdout, " Check that h5_fil is HDF5 file and print size of user block \n"); + fprintf(stdout, " %s -h\n", prog); + fprintf(stdout, " Print a usage message and exit\n"); } /* end usage() */ /*------------------------------------------------------------------------- @@ -85,7 +85,7 @@ static void leave(int ret) { h5tools_close(); - HDexit(ret); + exit(ret); } /*------------------------------------------------------------------------- @@ -156,7 +156,7 @@ main(int argc, char *argv[]) goto done; } - HDprintf("%ld\n", (long)usize); + printf("%ld\n", (long)usize); done: H5Pclose(plist); diff --git a/tools/test/h5repack/h5repackgentest.c b/tools/test/h5repack/h5repackgentest.c index bc22e8d..8910abb 100644 --- a/tools/test/h5repack/h5repackgentest.c +++ b/tools/test/h5repack/h5repackgentest.c @@ -329,19 +329,19 @@ main(void) for (i = 0; i < 2; i++) { hbool_t external = (i & 1) ? TRUE : FALSE; if (generate_int32le_1d(external) < 0) - HDprintf("A generate_int32le_1d failed!\n"); + printf("A generate_int32le_1d failed!\n"); if (generate_int32le_2d(external) < 0) - HDprintf("A generate_int32le_2d failed!\n"); + printf("A generate_int32le_2d failed!\n"); if (generate_int32le_3d(external) < 0) - HDprintf("A generate_int32le_3d failed!\n"); + printf("A generate_int32le_3d failed!\n"); if (generate_uint8be(external) < 0) - HDprintf("A generate_uint8be failed!\n"); + printf("A generate_uint8be failed!\n"); if (generate_f32le(external) < 0) - HDprintf("A generate_f32le failed!\n"); + printf("A generate_f32le failed!\n"); } /* end for external data storage or not */ diff --git a/tools/test/h5repack/h5repacktst.c b/tools/test/h5repack/h5repacktst.c index d8a4732..1c47827 100644 --- a/tools/test/h5repack/h5repacktst.c +++ b/tools/test/h5repack/h5repacktst.c @@ -194,8 +194,8 @@ main(void) h5tools_init(); /* initialize */ - HDmemset(&diff_options, 0, sizeof(diff_opt_t)); - HDmemset(&pack_options, 0, sizeof(pack_opt_t)); + memset(&diff_options, 0, sizeof(diff_opt_t)); + memset(&pack_options, 0, sizeof(pack_opt_t)); /* run tests */ puts("Testing h5repack:"); @@ -222,7 +222,7 @@ main(void) */ TESTING(" files with file space info setting--no options (-S, -P, -T, -G) are set"); j = 0; /* #0 */ - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + assert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); fname = H5REPACK_FSPACE_FNAMES[j]; if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; @@ -239,7 +239,7 @@ main(void) TESTING(" files with file space info setting--all options -S, -P, -T, -G are set"); ++j; /* #1 */ - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + assert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); fname = H5REPACK_FSPACE_FNAMES[j]; if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; @@ -259,7 +259,7 @@ main(void) TESTING(" files with file space info setting--options -S and -T are set"); ++j; /* #2 */ - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + assert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); fname = H5REPACK_FSPACE_FNAMES[j]; if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; @@ -278,7 +278,7 @@ main(void) if (h5_using_default_driver(NULL)) { TESTING(" files with file space info setting-- options -S and -P are set & -L"); ++j; /* #3 */ - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + assert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); fname = H5REPACK_FSPACE_FNAMES[j]; if (h5repack_init(&pack_options, 0, TRUE) < 0) GOERROR; @@ -296,7 +296,7 @@ main(void) TESTING(" files with file space info setting-- options -P and -T are set & -L"); ++j; /* #4 */ - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + assert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); fname = H5REPACK_FSPACE_FNAMES[j]; if (h5repack_init(&pack_options, 0, TRUE) < 0) GOERROR; @@ -314,7 +314,7 @@ main(void) TESTING(" files with file space info setting-- options -S and -G are set & -L"); ++j; /* #5 */ - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + assert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); fname = H5REPACK_FSPACE_FNAMES[j]; if (h5repack_init(&pack_options, 0, TRUE) < 0) GOERROR; @@ -332,7 +332,7 @@ main(void) TESTING(" files with file space info setting-- options -S, -P, -T, -G are set"); ++j; /* #6 */ - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + assert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); fname = H5REPACK_FSPACE_FNAMES[j]; if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; @@ -352,7 +352,7 @@ main(void) TESTING(" files with file space info setting-- options -S, -T, -G are set & -L"); ++j; /* #7 */ - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + assert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); fname = H5REPACK_FSPACE_FNAMES[j]; if (h5repack_init(&pack_options, 0, TRUE) < 0) GOERROR; @@ -2040,7 +2040,7 @@ make_testfiles(void) * default: strategy=FSM_AGGR, persist=FALSE, threshold=1 * default: inpage=4096 */ - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + assert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) return -1; if (H5Fclose(fid) < 0) @@ -2061,7 +2061,7 @@ make_testfiles(void) return -1; if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1) < 0) return -1; - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + assert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, fapl)) < 0) return -1; if (H5Fclose(fid) < 0) @@ -2080,7 +2080,7 @@ make_testfiles(void) return -1; if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1) < 0) return -1; - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + assert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, H5P_DEFAULT)) < 0) return -1; if (H5Fclose(fid) < 0) @@ -2103,7 +2103,7 @@ make_testfiles(void) return -1; if (H5Pset_file_space_page_size(fcpl, (hsize_t)8192) < 0) return -1; - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + assert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, fapl)) < 0) return -1; if (H5Fclose(fid) < 0) @@ -2125,7 +2125,7 @@ make_testfiles(void) return -1; if (H5Pset_file_space_page_size(fcpl, (hsize_t)FS_PAGESIZE_DEF) < 0) return -1; - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + assert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, H5P_DEFAULT)) < 0) return -1; if (H5Fclose(fid) < 0) @@ -2145,7 +2145,7 @@ make_testfiles(void) return -1; if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_AGGR, FALSE, (hsize_t)1) < 0) return -1; - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + assert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, fapl)) < 0) return -1; if (H5Fclose(fid) < 0) @@ -2168,7 +2168,7 @@ make_testfiles(void) return -1; if (H5Pset_file_space_page_size(fcpl, (hsize_t)8192) < 0) return -1; - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + assert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, H5P_DEFAULT)) < 0) return -1; if (H5Fclose(fid) < 0) @@ -2505,7 +2505,7 @@ make_szip(hid_t loc_id) if (H5Pclose(dcpl) < 0) goto error; - HDfree(buf); + free(buf); return 0; @@ -2517,7 +2517,7 @@ error: } H5E_END_TRY; - HDfree(buf); + free(buf); return -1; } @@ -2590,7 +2590,7 @@ make_deflate(hid_t loc_id) if (H5Pclose(dcpl) < 0) goto error; - HDfree(buf); + free(buf); return 0; @@ -2602,7 +2602,7 @@ error: } H5E_END_TRY; - HDfree(buf); + free(buf); return -1; } @@ -2660,7 +2660,7 @@ make_shuffle(hid_t loc_id) if (H5Pclose(dcpl) < 0) goto error; - HDfree(buf); + free(buf); return 0; @@ -2672,7 +2672,7 @@ error: } H5E_END_TRY; - HDfree(buf); + free(buf); return -1; } @@ -2733,7 +2733,7 @@ make_fletcher32(hid_t loc_id) if (H5Pclose(dcpl) < 0) goto error; - HDfree(buf); + free(buf); return 0; @@ -2745,7 +2745,7 @@ error: } H5E_END_TRY; - HDfree(buf); + free(buf); return -1; } @@ -2838,7 +2838,7 @@ make_nbit(hid_t loc_id) if (H5Tclose(dtid) < 0) goto error; - HDfree(buf); + free(buf); return 0; @@ -2853,7 +2853,7 @@ error: } H5E_END_TRY; - HDfree(buf); + free(buf); return -1; } @@ -2940,7 +2940,7 @@ make_scaleoffset(hid_t loc_id) if (H5Pclose(dcpl) < 0) goto error; - HDfree(buf); + free(buf); return 0; @@ -2955,7 +2955,7 @@ error: } H5E_END_TRY; - HDfree(buf); + free(buf); return -1; } @@ -3124,7 +3124,7 @@ make_all_filters(hid_t loc_id) if (H5Pclose(dcpl) < 0) goto error; - HDfree(buf); + free(buf); return 0; @@ -3139,7 +3139,7 @@ error: } H5E_END_TRY; - HDfree(buf); + free(buf); return -1; } @@ -3321,7 +3321,7 @@ make_layout(hid_t loc_id) if (H5Pclose(dcpl) < 0) goto error; - HDfree(buf); + free(buf); return 0; @@ -3333,7 +3333,7 @@ error: } H5E_END_TRY; - HDfree(buf); + free(buf); return -1; } @@ -3406,7 +3406,7 @@ error: } H5E_END_TRY; - HDfree(s_buf); + free(s_buf); return (ret_value); @@ -3533,8 +3533,8 @@ make_layout3(hid_t loc_id) if (H5Pclose(dcpl3) < 0) goto error; - HDfree(buf1); - HDfree(buf2); + free(buf1); + free(buf2); return 0; @@ -3549,8 +3549,8 @@ error: } H5E_END_TRY; - HDfree(buf1); - HDfree(buf2); + free(buf1); + free(buf2); return -1; } @@ -3656,14 +3656,14 @@ make_big(hid_t loc_id) goto out; /* initialize buffer to 0 */ - buf = (signed char *)HDcalloc(nelmts, size); + buf = (signed char *)calloc(nelmts, size); if (H5Sselect_hyperslab(f_sid, H5S_SELECT_SET, hs_start, NULL, hs_size, NULL) < 0) goto out; if (H5Dwrite(did, H5T_NATIVE_SCHAR, m_sid, f_sid, H5P_DEFAULT, buf) < 0) goto out; - HDfree(buf); + free(buf); buf = NULL; /* close */ @@ -3787,7 +3787,7 @@ make_userblock(void) /* Write userblock data */ nwritten = HDwrite(fd, ub, (size_t)USERBLOCK_SIZE); - HDassert(nwritten == USERBLOCK_SIZE); + assert(nwritten == USERBLOCK_SIZE); /* Close file */ HDclose(fd); @@ -3852,7 +3852,7 @@ verify_userblock(const char *filename) /* Read userblock data */ nread = HDread(fd, ub, (size_t)USERBLOCK_SIZE); - HDassert(nread == USERBLOCK_SIZE); + assert(nread == USERBLOCK_SIZE); /* Verify userblock data */ for (u = 0; u < USERBLOCK_SIZE; u++) @@ -3902,7 +3902,7 @@ make_userblock_file(void) /* write userblock data */ nwritten = HDwrite(fd, ub, (size_t)USERBLOCK_SIZE); - HDassert(nwritten == USERBLOCK_SIZE); + assert(nwritten == USERBLOCK_SIZE); /* close file */ HDclose(fd); @@ -4116,10 +4116,10 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da /* Allocate and initialize VL dataset to write */ buf5[0].len = 1; - buf5[0].p = HDmalloc(1 * sizeof(int)); + buf5[0].p = malloc(1 * sizeof(int)); ((int *)buf5[0].p)[0] = 1; buf5[1].len = 2; - buf5[1].p = HDmalloc(2 * sizeof(int)); + buf5[1].p = malloc(2 * sizeof(int)); ((int *)buf5[1].p)[0] = 2; ((int *)buf5[1].p)[1] = 3; @@ -4175,10 +4175,10 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da /* allocate and initialize array data to write */ size = (TEST_BUFSIZE / sizeof(double) + 1) * sizeof(double); - dbuf = (double *)HDmalloc(size); + dbuf = (double *)malloc(size); if (NULL == dbuf) { - HDprintf("\nError: Cannot allocate memory for \"arrayd\" data buffer size %dMB.\n", - (int)size / 1000000); + printf("\nError: Cannot allocate memory for \"arrayd\" data buffer size %dMB.\n", + (int)size / 1000000); goto out; } @@ -4192,16 +4192,16 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da /* create a type larger than TEST_BUFSIZE */ if ((tid = H5Tarray_create2(H5T_NATIVE_DOUBLE, 1, tdims)) < 0) { - HDfree(dbuf); + free(dbuf); goto out; } size = H5Tget_size(tid); if ((sid = H5Screate_simple(1, sdims, NULL)) < 0) { - HDfree(dbuf); + free(dbuf); goto out; } if ((did = H5Dcreate2(loc_id, "arrayd", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { - HDfree(dbuf); + free(dbuf); goto out; } #if defined(WRITE_ARRAY) @@ -4212,7 +4212,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da H5Dclose(did); H5Tclose(tid); H5Sclose(sid); - HDfree(dbuf); + free(dbuf); } /*------------------------------------------------------------------------- @@ -4243,7 +4243,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da */ if (make_diffs) { - HDmemset(buf12, 'z', sizeof buf12); + memset(buf12, 'z', sizeof buf12); } if ((tid = H5Tcopy(H5T_C_S1)) < 0) @@ -4261,7 +4261,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da */ if (make_diffs) { - HDmemset(buf22, 0, sizeof buf22); + memset(buf22, 0, sizeof buf22); } if ((tid = H5Tcopy(H5T_STD_B8LE)) < 0) @@ -4290,7 +4290,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da */ if (make_diffs) { - HDmemset(buf32, 0, sizeof buf32); + memset(buf32, 0, sizeof buf32); } if ((tid = H5Tcreate(H5T_COMPOUND, sizeof(s_t))) < 0) @@ -4343,7 +4343,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da for (j = 0; j < 2; j++) { unsigned l; - buf52[i][j].p = HDmalloc((i + 1) * sizeof(int)); + buf52[i][j].p = malloc((i + 1) * sizeof(int)); buf52[i][j].len = (size_t)(i + 1); for (l = 0; l < i + 1; l++) { if (make_diffs) @@ -4377,7 +4377,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da */ if (make_diffs) { - HDmemset(buf62, 0, sizeof buf62); + memset(buf62, 0, sizeof buf62); } if ((tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray)) < 0) @@ -4393,8 +4393,8 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da */ if (make_diffs) { - HDmemset(buf72, 0, sizeof buf72); - HDmemset(buf82, 0, sizeof buf82); + memset(buf72, 0, sizeof buf72); + memset(buf82, 0, sizeof buf82); } if ((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) @@ -4431,7 +4431,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da */ if (make_diffs) { - HDmemset(buf13, 'z', sizeof buf13); + memset(buf13, 'z', sizeof buf13); } if ((tid = H5Tcopy(H5T_C_S1)) < 0) @@ -4552,7 +4552,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da for (k = 0; k < 2; k++) { unsigned l; - buf53[i][j][k].p = HDmalloc((i + 1) * sizeof(int)); + buf53[i][j][k].p = malloc((i + 1) * sizeof(int)); buf53[i][j][k].len = (size_t)(i + 1); for (l = 0; l < i + 1; l++) { if (make_diffs) @@ -4676,8 +4676,8 @@ make_dset_reg_ref(hid_t loc_id) int retval = -1; /* return value */ /* Allocate write & read buffers */ - wbuf = (hdset_reg_ref_t *)HDcalloc(sizeof(hdset_reg_ref_t), (size_t)SPACE1_DIM1); - dwbuf = (int *)HDmalloc(sizeof(int) * SPACE2_DIM1 * SPACE2_DIM2); + wbuf = (hdset_reg_ref_t *)calloc(sizeof(hdset_reg_ref_t), (size_t)SPACE1_DIM1); + dwbuf = (int *)malloc(sizeof(int) * SPACE2_DIM1 * SPACE2_DIM2); /* Create dataspace for datasets */ if ((sid2 = H5Screate_simple(SPACE2_RANK, dims2, NULL)) < 0) @@ -4738,9 +4738,9 @@ make_dset_reg_ref(hid_t loc_id) out: if (wbuf) - HDfree(wbuf); + free(wbuf); if (dwbuf) - HDfree(dwbuf); + free(dwbuf); H5E_BEGIN_TRY { @@ -5008,10 +5008,10 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da /* Allocate and initialize VL dataset to write */ buf5[0].len = 1; - buf5[0].p = HDmalloc(1 * sizeof(int)); + buf5[0].p = malloc(1 * sizeof(int)); ((int *)buf5[0].p)[0] = 1; buf5[1].len = 2; - buf5[1].p = HDmalloc(2 * sizeof(int)); + buf5[1].p = malloc(2 * sizeof(int)); ((int *)buf5[1].p)[0] = 2; ((int *)buf5[1].p)[1] = 3; @@ -5124,7 +5124,7 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da *------------------------------------------------------------------------- */ if (make_diffs) { - HDmemset(buf12, 'z', sizeof buf12); + memset(buf12, 'z', sizeof buf12); } /* @@ -5163,7 +5163,7 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da */ if (make_diffs) { - HDmemset(buf22, 0, sizeof buf22); + memset(buf22, 0, sizeof buf22); } /* @@ -5221,7 +5221,7 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da *------------------------------------------------------------------------- */ if (make_diffs) { - HDmemset(buf32, 0, sizeof buf32); + memset(buf32, 0, sizeof buf32); } /* @@ -5314,7 +5314,7 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da for (j = 0; j < 2; j++) { unsigned l; - buf52[i][j].p = HDmalloc((i + 1) * sizeof(int)); + buf52[i][j].p = malloc((i + 1) * sizeof(int)); buf52[i][j].len = (size_t)(i + 1); for (l = 0; l < i + 1; l++) if (make_diffs) @@ -5366,7 +5366,7 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da */ if (make_diffs) { - HDmemset(buf62, 0, sizeof buf62); + memset(buf62, 0, sizeof buf62); } /* buf62[6][3]= {{1,2,3},{4,5,6},{7,8,9},{10,11,12},{13,14,15},{16,17,18}}; @@ -5408,8 +5408,8 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da */ if (make_diffs) { - HDmemset(buf72, 0, sizeof buf72); - HDmemset(buf82, 0, sizeof buf82); + memset(buf72, 0, sizeof buf72); + memset(buf82, 0, sizeof buf82); } /* Attribute: <integer2D> and <integer2D> @@ -5449,7 +5449,7 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da */ if (make_diffs) { - HDmemset(buf13, 'z', sizeof buf13); + memset(buf13, 'z', sizeof buf13); } /* @@ -5759,7 +5759,7 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da for (k = 0; k < 2; k++) { unsigned l; - buf53[i][j][k].p = HDmalloc((i + 1) * sizeof(int)); + buf53[i][j][k].p = malloc((i + 1) * sizeof(int)); buf53[i][j][k].len = (size_t)i + 1; for (l = 0; l < i + 1; l++) if (make_diffs) @@ -6202,7 +6202,7 @@ add_attr_with_objref(hid_t file_id, hid_t obj_id) /* ref to dset */ status = H5Rcreate(&data_attr_objref[0], file_id, NAME_OBJ_DS1, H5R_OBJECT, (hid_t)-1); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6210,7 +6210,7 @@ add_attr_with_objref(hid_t file_id, hid_t obj_id) /* ref to group */ status = H5Rcreate(&data_attr_objref[1], file_id, NAME_OBJ_GRP, H5R_OBJECT, (hid_t)-1); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6218,7 +6218,7 @@ add_attr_with_objref(hid_t file_id, hid_t obj_id) /* ref to datatype */ status = H5Rcreate(&data_attr_objref[2], file_id, NAME_OBJ_NDTYPE, H5R_OBJECT, (hid_t)-1); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6226,7 +6226,7 @@ add_attr_with_objref(hid_t file_id, hid_t obj_id) /* create attr with obj ref type */ status = make_attr(obj_id, 1, dim_attr_objref, "Attr_OBJREF", H5T_STD_REF_OBJ, data_attr_objref); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> make_attr failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> make_attr failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6266,7 +6266,7 @@ add_attr_with_regref(hid_t file_id, hid_t obj_id) */ sid_regrefed_dset = H5Screate_simple(2, dim_regrefed_dset, NULL); if (sid_regrefed_dset < 0) { - HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6274,7 +6274,7 @@ add_attr_with_regref(hid_t file_id, hid_t obj_id) /* select elements space for reference */ status = H5Sselect_elements(sid_regrefed_dset, H5S_SELECT_SET, (size_t)3, coords_regrefed_dset[0]); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6282,7 +6282,7 @@ add_attr_with_regref(hid_t file_id, hid_t obj_id) /* create region reference from elements space */ status = H5Rcreate(&data_attr_regref[0], file_id, NAME_OBJ_DS2, H5R_DATASET_REGION, sid_regrefed_dset); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6290,7 +6290,7 @@ add_attr_with_regref(hid_t file_id, hid_t obj_id) /* create attr with region ref type */ status = make_attr(obj_id, 1, dim_attr_regref, "Attr_REGREF", H5T_STD_REF_DSETREG, data_attr_regref); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> make_attr failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> make_attr failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6335,21 +6335,21 @@ gen_refered_objs(hid_t loc_id) */ sid = H5Screate_simple(1, dims1, NULL); if (sid < 0) { - HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__); ret = FAIL; goto out; } did1 = H5Dcreate2(loc_id, NAME_OBJ_DS1, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (did1 < 0) { - HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__); ret = FAIL; goto out; } status = H5Dwrite(did1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6360,7 +6360,7 @@ gen_refered_objs(hid_t loc_id) */ gid = H5Gcreate2(loc_id, NAME_OBJ_GRP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (gid < 0) { - HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6372,7 +6372,7 @@ gen_refered_objs(hid_t loc_id) tid = H5Tcopy(H5T_NATIVE_INT); status = H5Tcommit2(loc_id, NAME_OBJ_NDTYPE, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6383,7 +6383,7 @@ gen_refered_objs(hid_t loc_id) */ sid2 = H5Screate_simple(2, dims2, NULL); if (sid2 < 0) { - HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6391,7 +6391,7 @@ gen_refered_objs(hid_t loc_id) /* create normal dataset which is referred */ did2 = H5Dcreate2(loc_id, NAME_OBJ_DS2, H5T_STD_I8LE, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (did2 < 0) { - HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6399,7 +6399,7 @@ gen_refered_objs(hid_t loc_id) /* write values to dataset */ status = H5Dwrite(did2, H5T_NATIVE_CHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, data2); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6455,7 +6455,7 @@ gen_obj_ref(hid_t loc_id) /* obj ref to dataset */ status = H5Rcreate(&objref_buf[0], loc_id, NAME_OBJ_DS1, H5R_OBJECT, (hid_t)-1); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6463,7 +6463,7 @@ gen_obj_ref(hid_t loc_id) /* obj ref to group */ status = H5Rcreate(&objref_buf[1], loc_id, NAME_OBJ_GRP, H5R_OBJECT, (hid_t)-1); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6471,7 +6471,7 @@ gen_obj_ref(hid_t loc_id) /* obj ref to named-datatype */ status = H5Rcreate(&objref_buf[2], loc_id, NAME_OBJ_NDTYPE, H5R_OBJECT, (hid_t)-1); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6481,21 +6481,21 @@ gen_obj_ref(hid_t loc_id) */ sid = H5Screate_simple(1, dims_dset_objref, NULL); if (sid < 0) { - HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__); ret = FAIL; goto out; } oid = H5Dcreate2(loc_id, "Dset_OBJREF", H5T_STD_REF_OBJ, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (oid < 0) { - HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__); ret = FAIL; goto out; } status = H5Dwrite(oid, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, objref_buf); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6507,7 +6507,7 @@ gen_obj_ref(hid_t loc_id) /* add attribute with obj ref */ status = add_attr_with_objref(loc_id, oid); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> add_attr_with_objref failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> add_attr_with_objref failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6515,7 +6515,7 @@ gen_obj_ref(hid_t loc_id) /* add attribute with region ref */ status = add_attr_with_regref(loc_id, oid); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> add_attr_with_regref failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> add_attr_with_regref failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6567,7 +6567,7 @@ gen_region_ref(hid_t loc_id) sid_trg = H5Screate_simple(2, dims_trg, NULL); if (sid_trg < 0) { - HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6575,7 +6575,7 @@ gen_region_ref(hid_t loc_id) /* select elements space for reference */ status = H5Sselect_elements(sid_trg, H5S_SELECT_SET, (size_t)4, coords[0]); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6583,7 +6583,7 @@ gen_region_ref(hid_t loc_id) /* create region reference from elements space */ status = H5Rcreate(&rr_data[0], loc_id, NAME_OBJ_DS2, H5R_DATASET_REGION, sid_trg); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6591,7 +6591,7 @@ gen_region_ref(hid_t loc_id) /* select hyperslab space for reference */ status = H5Sselect_hyperslab(sid_trg, H5S_SELECT_SET, start, stride, count, block); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Sselect_hyperslab failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Sselect_hyperslab failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6599,7 +6599,7 @@ gen_region_ref(hid_t loc_id) /* create region reference from hyperslab space */ status = H5Rcreate(&rr_data[1], loc_id, NAME_OBJ_DS2, H5R_DATASET_REGION, sid_trg); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6607,7 +6607,7 @@ gen_region_ref(hid_t loc_id) /* Create dataspace. */ sid_ref = H5Screate_simple(1, dims1, NULL); if (sid_ref < 0) { - HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6616,7 +6616,7 @@ gen_region_ref(hid_t loc_id) oid_ref = H5Dcreate2(loc_id, REG_REF_DS1, H5T_STD_REF_DSETREG, sid_ref, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (oid_ref < 0) { - HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6624,7 +6624,7 @@ gen_region_ref(hid_t loc_id) /* write data as region references */ status = H5Dwrite(oid_ref, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, rr_data); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6636,7 +6636,7 @@ gen_region_ref(hid_t loc_id) /* add attribute with obj ref */ status = add_attr_with_objref(loc_id, oid_ref); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> add_attr_with_objref failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> add_attr_with_objref failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6644,7 +6644,7 @@ gen_region_ref(hid_t loc_id) /* add attribute with region ref */ status = add_attr_with_regref(loc_id, oid_ref); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> add_attr_with_regref failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> add_attr_with_regref failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6677,21 +6677,21 @@ make_references(hid_t loc_id) /* add target objects */ status = gen_refered_objs(loc_id); if (status == FAIL) { - HDfprintf(stderr, "Failed to generate referenced object.\n"); + fprintf(stderr, "Failed to generate referenced object.\n"); ret = FAIL; } /* add object reference */ status = gen_obj_ref(loc_id); if (status == FAIL) { - HDfprintf(stderr, "Failed to generate object reference.\n"); + fprintf(stderr, "Failed to generate object reference.\n"); ret = FAIL; } /* add region reference */ status = gen_region_ref(loc_id); if (status == FAIL) { - HDfprintf(stderr, "Failed to generate region reference.\n"); + fprintf(stderr, "Failed to generate region reference.\n"); ret = FAIL; } @@ -6811,7 +6811,7 @@ make_complex_attr_references(hid_t loc_id) objdid = H5Dcreate2(loc_id, NAME_OBJ_DS1, H5T_NATIVE_INT, objsid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); status = H5Dwrite(objdid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, obj_data[0]); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6820,7 +6820,7 @@ make_complex_attr_references(hid_t loc_id) objtid = H5Tcopy(H5T_NATIVE_INT); status = H5Tcommit2(loc_id, NAME_OBJ_NDTYPE, objtid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6831,7 +6831,7 @@ make_complex_attr_references(hid_t loc_id) * compound type which contain obj and region reference */ main_gid = H5Gcreate2(loc_id, "group_main", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (main_gid < 0) { - HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6846,7 +6846,7 @@ make_complex_attr_references(hid_t loc_id) status = H5Dwrite(main_did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, obj_data[0]); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6869,7 +6869,7 @@ make_complex_attr_references(hid_t loc_id) /* references to dataset */ status = H5Rcreate(&(comp_objref_data[0].val_objref), loc_id, NAME_OBJ_DS1, H5R_OBJECT, (hid_t)-1); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6878,7 +6878,7 @@ make_complex_attr_references(hid_t loc_id) /* references to group */ status = H5Rcreate(&(comp_objref_data[1].val_objref), loc_id, NAME_OBJ_GRP, H5R_OBJECT, (hid_t)-1); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6887,7 +6887,7 @@ make_complex_attr_references(hid_t loc_id) /* references to datatype */ status = H5Rcreate(&(comp_objref_data[2].val_objref), loc_id, NAME_OBJ_NDTYPE, H5R_OBJECT, (hid_t)-1); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6901,7 +6901,7 @@ make_complex_attr_references(hid_t loc_id) H5Acreate2(main_did, "Comp_OBJREF", comp_objref_tid, comp_objref_attr_sid, H5P_DEFAULT, H5P_DEFAULT); status = H5Awrite(comp_objref_aid, comp_objref_tid, comp_objref_data); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Awrite failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Awrite failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6922,13 +6922,13 @@ make_complex_attr_references(hid_t loc_id) */ status = H5Sselect_elements(objsid, H5S_SELECT_SET, (size_t)4, coords[0]); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", __func__, __LINE__); ret = FAIL; goto out; } status = H5Rcreate(&(comp_regref_data[0].val_regref), loc_id, NAME_OBJ_DS1, H5R_DATASET_REGION, objsid); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6942,7 +6942,7 @@ make_complex_attr_references(hid_t loc_id) H5Acreate2(main_did, "Comp_REGREF", comp_regref_tid, comp_regref_attr_sid, H5P_DEFAULT, H5P_DEFAULT); status = H5Awrite(comp_regref_aid, comp_regref_tid, comp_regref_data); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Awrite failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Awrite failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6954,11 +6954,11 @@ make_complex_attr_references(hid_t loc_id) * prepare vlen data */ vlen_objref_data[0].len = LEN0_VLEN_OBJREF; - vlen_objref_data[0].p = HDmalloc(vlen_objref_data[0].len * sizeof(hobj_ref_t)); + vlen_objref_data[0].p = malloc(vlen_objref_data[0].len * sizeof(hobj_ref_t)); vlen_objref_data[1].len = LEN1_VLEN_OBJREF; - vlen_objref_data[1].p = HDmalloc(vlen_objref_data[1].len * sizeof(hobj_ref_t)); + vlen_objref_data[1].p = malloc(vlen_objref_data[1].len * sizeof(hobj_ref_t)); vlen_objref_data[2].len = LEN2_VLEN_OBJREF; - vlen_objref_data[2].p = HDmalloc(vlen_objref_data[2].len * sizeof(hobj_ref_t)); + vlen_objref_data[2].p = malloc(vlen_objref_data[2].len * sizeof(hobj_ref_t)); /* * create obj references @@ -6967,7 +6967,7 @@ make_complex_attr_references(hid_t loc_id) status = H5Rcreate(&((hobj_ref_t *)vlen_objref_data[0].p)[0], loc_id, NAME_OBJ_DS1, H5R_OBJECT, (hid_t)-1); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6975,7 +6975,7 @@ make_complex_attr_references(hid_t loc_id) status = H5Rcreate(&((hobj_ref_t *)vlen_objref_data[1].p)[0], loc_id, NAME_OBJ_GRP, H5R_OBJECT, (hid_t)-1); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6983,7 +6983,7 @@ make_complex_attr_references(hid_t loc_id) status = H5Rcreate(&((hobj_ref_t *)vlen_objref_data[2].p)[0], loc_id, NAME_OBJ_NDTYPE, H5R_OBJECT, (hid_t)-1); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -7001,7 +7001,7 @@ make_complex_attr_references(hid_t loc_id) H5P_DEFAULT, H5P_DEFAULT); status = H5Awrite(vlen_objref_attr_id, vlen_objref_attr_tid, vlen_objref_data); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Awrite failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Awrite failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -7009,7 +7009,7 @@ make_complex_attr_references(hid_t loc_id) /* close resource for vlen data */ status = H5Treclaim(vlen_objref_attr_tid, vlen_objref_attr_sid, H5P_DEFAULT, vlen_objref_data); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Treclaim failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Treclaim failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -7022,21 +7022,21 @@ make_complex_attr_references(hid_t loc_id) * prepare vlen data */ vlen_regref_data[0].len = LEN0_VLEN_REGREF; - vlen_regref_data[0].p = HDmalloc(vlen_regref_data[0].len * sizeof(hdset_reg_ref_t)); + vlen_regref_data[0].p = malloc(vlen_regref_data[0].len * sizeof(hdset_reg_ref_t)); /* * create region reference */ status = H5Sselect_elements(objsid, H5S_SELECT_SET, (size_t)4, coords[0]); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", __func__, __LINE__); ret = FAIL; goto out; } status = H5Rcreate(&((hdset_reg_ref_t *)vlen_regref_data[0].p)[0], loc_id, NAME_OBJ_DS1, H5R_DATASET_REGION, objsid); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -7054,7 +7054,7 @@ make_complex_attr_references(hid_t loc_id) H5P_DEFAULT, H5P_DEFAULT); status = H5Awrite(vlen_regref_attr_id, vlen_regref_attr_tid, vlen_regref_data); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Awrite failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Awrite failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -7062,7 +7062,7 @@ make_complex_attr_references(hid_t loc_id) /* close resource for vlen data */ status = H5Treclaim(vlen_regref_attr_tid, vlen_regref_attr_sid, H5P_DEFAULT, vlen_regref_data); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Treclaim failed.\n", __func__, __LINE__); + fprintf(stderr, "Error: %s %d> H5Treclaim failed.\n", __func__, __LINE__); ret = FAIL; goto out; } diff --git a/tools/test/h5repack/testh5repack_detect_szip.c b/tools/test/h5repack/testh5repack_detect_szip.c index b2be484..02a6d2b 100644 --- a/tools/test/h5repack/testh5repack_detect_szip.c +++ b/tools/test/h5repack/testh5repack_detect_szip.c @@ -44,10 +44,10 @@ main(void) #ifdef H5_HAVE_FILTER_SZIP if (h5tools_can_encode(H5Z_FILTER_SZIP) == 1) { - HDprintf("yes\n"); + printf("yes\n"); return (1); } #endif /* H5_HAVE_FILTER_SZIP */ - HDprintf("no\n"); + printf("no\n"); return (0); } diff --git a/tools/test/h5stat/h5stat_gentest.c b/tools/test/h5stat/h5stat_gentest.c index a8aefba..acd3a03 100644 --- a/tools/test/h5stat/h5stat_gentest.c +++ b/tools/test/h5stat/h5stat_gentest.c @@ -626,6 +626,6 @@ main(void) return EXIT_SUCCESS; error: - HDfprintf(stderr, "h5stat test generator FAILED\n"); + fprintf(stderr, "h5stat test generator FAILED\n"); return EXIT_FAILURE; } diff --git a/tools/test/misc/clear_open_chk.c b/tools/test/misc/clear_open_chk.c index 37e7307..ec86ec4 100644 --- a/tools/test/misc/clear_open_chk.c +++ b/tools/test/misc/clear_open_chk.c @@ -18,9 +18,9 @@ static void usage(void); static void usage(void) { - HDfprintf(stdout, "\n"); - HDfprintf(stdout, "Usage error!\n"); - HDfprintf(stdout, "Usage: clear_open_chk filename\n"); + fprintf(stdout, "\n"); + fprintf(stdout, "Usage error!\n"); + fprintf(stdout, "Usage: clear_open_chk filename\n"); } /* usage() */ /*------------------------------------------------------------------------- @@ -45,7 +45,7 @@ main(int argc, char *argv[]) /* Check the # of arguments */ if (argc != 2) { usage(); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* Get the file name */ @@ -53,18 +53,18 @@ main(int argc, char *argv[]) /* Try opening the file */ if ((fid = h5tools_fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT, FALSE, NULL, (size_t)0)) < 0) { - HDfprintf(stderr, "clear_open_chk: unable to open the file\n"); - HDfree(fname); - HDexit(EXIT_FAILURE); + fprintf(stderr, "clear_open_chk: unable to open the file\n"); + free(fname); + exit(EXIT_FAILURE); } - HDfree(fname); + free(fname); /* Close the file */ if (H5Fclose(fid) < 0) { - HDfprintf(stderr, "clear_open_chk: cannot close the file\n"); - HDexit(EXIT_FAILURE); + fprintf(stderr, "clear_open_chk: cannot close the file\n"); + exit(EXIT_FAILURE); } /* Return success */ - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } /* main() */ diff --git a/tools/test/misc/h5clear_gentest.c b/tools/test/misc/h5clear_gentest.c index 666a3f7..15804fe 100644 --- a/tools/test/misc/h5clear_gentest.c +++ b/tools/test/misc/h5clear_gentest.c @@ -124,7 +124,7 @@ gen_cache_image_file(const char *fname) if (H5Fclose(fid) < 0) goto error; - HDfree(buf); + free(buf); return 0; @@ -140,7 +140,7 @@ error: } H5E_END_TRY; - HDfree(buf); + free(buf); return 1; } /* gen_cache_image_file() */ @@ -600,10 +600,10 @@ main(void) fflush(stderr); /* Not going through library closing by calling _exit(0) with success */ - HD_exit(0); + _exit(0); error: /* Exit with failure */ - HD_exit(1); + _exit(1); } diff --git a/tools/test/misc/h5perf_gentest.c b/tools/test/misc/h5perf_gentest.c index 5b898db..cf91c79 100644 --- a/tools/test/misc/h5perf_gentest.c +++ b/tools/test/misc/h5perf_gentest.c @@ -85,20 +85,20 @@ main(int argc, char *argv[]) else if (strcmp(argv[i], "-z") == 0) z = 1; else if (strcmp(argv[i], "-h") == 0) { - HDprintf("\nOPTONS:\n"); - HDprintf("\t-f F:\tname of the test file (default: %s).\n", FNAME); - HDprintf("\t-g N:\tnumber of top level groups (default: %d).\n", NGROUPS); - HDprintf("\t-d N:\tnumber of datasets (default: %d).\n", NDSETS); - HDprintf("\t-a N:\tnumber of attributes (default: %d).\n", NATTRS); - HDprintf("\t-r N:\tnumber of rows in the large compound dataset (default: %d).\n", NROWS); - HDprintf("\t-s N:\tsize of dim0 in datasets (default: %d).\n", DIM0); - HDprintf("\t-c N:\tchunk size of dim0 (default: %d).\n", (DIM0 / 10 + 1)); - HDprintf("\t-v N:\tmax vlen size (default: %d).\n", MAXVLEN); - HDprintf("\t-l:\tuse latest format (default: no).\n"); - HDprintf("\t-z:\tuse gzip compression (default: no).\n"); - HDprintf("\t-h:\tthis help information.\n"); - HDprintf("Example:\n"); - HDprintf("\t./a.out -f test.h5 -g 10000 -d 5000 -a 500 -r 10000 -s 200 -c 20 -v 40 -l -z\n\n"); + printf("\nOPTONS:\n"); + printf("\t-f F:\tname of the test file (default: %s).\n", FNAME); + printf("\t-g N:\tnumber of top level groups (default: %d).\n", NGROUPS); + printf("\t-d N:\tnumber of datasets (default: %d).\n", NDSETS); + printf("\t-a N:\tnumber of attributes (default: %d).\n", NATTRS); + printf("\t-r N:\tnumber of rows in the large compound dataset (default: %d).\n", NROWS); + printf("\t-s N:\tsize of dim0 in datasets (default: %d).\n", DIM0); + printf("\t-c N:\tchunk size of dim0 (default: %d).\n", (DIM0 / 10 + 1)); + printf("\t-v N:\tmax vlen size (default: %d).\n", MAXVLEN); + printf("\t-l:\tuse latest format (default: no).\n"); + printf("\t-z:\tuse gzip compression (default: no).\n"); + printf("\t-h:\tthis help information.\n"); + printf("Example:\n"); + printf("\t./a.out -f test.h5 -g 10000 -d 5000 -a 500 -r 10000 -s 200 -c 20 -v 40 -l -z\n\n"); exit(0); } } diff --git a/tools/test/misc/h5repart_gentest.c b/tools/test/misc/h5repart_gentest.c index 04ac8e7..df1c312 100644 --- a/tools/test/misc/h5repart_gentest.c +++ b/tools/test/misc/h5repart_gentest.c @@ -36,13 +36,13 @@ main(void) hsize_t dims[2] = {FAMILY_NUMBER, FAMILY_SIZE}; /* Set up data array */ - if (NULL == (buf_data = (int *)HDcalloc(FAMILY_NUMBER * FAMILY_SIZE, sizeof(int)))) { - HDperror("HDcalloc"); - HDexit(EXIT_FAILURE); + if (NULL == (buf_data = (int *)calloc(FAMILY_NUMBER * FAMILY_SIZE, sizeof(int)))) { + HDperror("calloc"); + exit(EXIT_FAILURE); } - if (NULL == (buf = (int **)HDcalloc(FAMILY_NUMBER, sizeof(buf_data)))) { - HDperror("HDcalloc"); - HDexit(EXIT_FAILURE); + if (NULL == (buf = (int **)calloc(FAMILY_NUMBER, sizeof(buf_data)))) { + HDperror("calloc"); + exit(EXIT_FAILURE); } for (i = 0; i < FAMILY_NUMBER; i++) buf[i] = buf_data + (i * FAMILY_SIZE); @@ -50,28 +50,28 @@ main(void) /* Set property list and file name for FAMILY driver */ if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) { HDperror("H5Pcreate"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if (H5Pset_fapl_family(fapl, (hsize_t)FAMILY_SIZE, H5P_DEFAULT) < 0) { HDperror("H5Pset_fapl_family"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if ((file = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) { HDperror("H5Fcreate"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* Create and write dataset */ if ((space = H5Screate_simple(2, dims, NULL)) < 0) { HDperror("H5Screate_simple"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if ((dset = H5Dcreate2(file, dname, H5T_NATIVE_INT, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { HDperror("H5Dcreate2"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } for (i = 0; i < FAMILY_NUMBER; i++) @@ -80,34 +80,34 @@ main(void) if (H5Dwrite(dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_data) < 0) { HDperror("H5Dwrite"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if (H5Sclose(space) < 0) { HDperror("H5Sclose"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if (H5Dclose(dset) < 0) { HDperror("H5Dclose"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if (H5Pclose(fapl) < 0) { HDperror("H5Pclose"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } if (H5Fclose(file) < 0) { HDperror("H5Fclose"); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } - HDfree(buf); - HDfree(buf_data); + free(buf); + free(buf_data); HDputs(" PASSED"); - HDfflush(stdout); + fflush(stdout); return EXIT_SUCCESS; } diff --git a/tools/test/misc/repart_test.c b/tools/test/misc/repart_test.c index 5c3ebf2..5951fd2 100644 --- a/tools/test/misc/repart_test.c +++ b/tools/test/misc/repart_test.c @@ -142,10 +142,10 @@ main(void) if (nerrors) goto error; - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); error: nerrors = MAX(1, nerrors); - HDprintf("***** %d FAMILY FILE TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S"); - HDexit(EXIT_FAILURE); + printf("***** %d FAMILY FILE TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S"); + exit(EXIT_FAILURE); } /* end main() */ diff --git a/tools/test/misc/talign.c b/tools/test/misc/talign.c index 7764e34..f8fe076 100644 --- a/tools/test/misc/talign.c +++ b/tools/test/misc/talign.c @@ -51,7 +51,7 @@ main(void) int result = 0; herr_t error = 1; - HDprintf("%-70s", "Testing alignment in compound datatypes"); + printf("%-70s", "Testing alignment in compound datatypes"); HDstrcpy(string5, "Hi!"); HDunlink(fname); @@ -122,7 +122,7 @@ main(void) H5Dclose(set); /* Now open the set, and read it back in */ - data = (char *)HDmalloc(H5Tget_size(fix)); + data = (char *)malloc(H5Tget_size(fix)); if (!data) { HDperror("malloc() failed"); @@ -146,39 +146,39 @@ out: result = 1; mname = H5Tget_member_name(fix, 0); - HDprintf("%14s (%2d) %6s = %s\n", mname ? mname : "(null)", (int)H5Tget_member_offset(fix, 0), - string5, (char *)(data + H5Tget_member_offset(fix, 0))); + printf("%14s (%2d) %6s = %s\n", mname ? mname : "(null)", (int)H5Tget_member_offset(fix, 0), string5, + (char *)(data + H5Tget_member_offset(fix, 0))); if (mname) H5free_memory(mname); fptr = (float *)((void *)(data + H5Tget_member_offset(fix, 1))); mname = H5Tget_member_name(fix, 1); - HDprintf("Data comparison:\n" - "%14s (%2d) %6f = %f\n" - " %6f = %f\n", - mname ? mname : "(null)", (int)H5Tget_member_offset(fix, 1), (double)fok[0], (double)fptr[0], - (double)fok[1], (double)fptr[1]); + printf("Data comparison:\n" + "%14s (%2d) %6f = %f\n" + " %6f = %f\n", + mname ? mname : "(null)", (int)H5Tget_member_offset(fix, 1), (double)fok[0], (double)fptr[0], + (double)fok[1], (double)fptr[1]); if (mname) H5free_memory(mname); fptr = (float *)((void *)(data + H5Tget_member_offset(fix, 2))); mname = H5Tget_member_name(fix, 2); - HDprintf("%14s (%2d) %6f = %f\n" - " %6f = %6f\n", - mname ? mname : "(null)", (int)H5Tget_member_offset(fix, 2), (double)fnok[0], - (double)fptr[0], (double)fnok[1], (double)fptr[1]); + printf("%14s (%2d) %6f = %f\n" + " %6f = %6f\n", + mname ? mname : "(null)", (int)H5Tget_member_offset(fix, 2), (double)fnok[0], (double)fptr[0], + (double)fnok[1], (double)fptr[1]); if (mname) H5free_memory(mname); fptr = (float *)((void *)(data + H5Tget_member_offset(fix, 1))); - HDprintf("\n" - "Short circuit\n" - " %6f = %f\n" - " %6f = %f\n" - " %6f = %f\n" - " %6f = %f\n", - (double)fok[0], (double)fptr[0], (double)fok[1], (double)fptr[1], (double)fnok[0], - (double)fptr[2], (double)fnok[1], (double)fptr[3]); + printf("\n" + "Short circuit\n" + " %6f = %f\n" + " %6f = %f\n" + " %6f = %f\n" + " %6f = %f\n", + (double)fok[0], (double)fptr[0], (double)fok[1], (double)fptr[1], (double)fnok[0], + (double)fptr[2], (double)fnok[1], (double)fptr[3]); HDputs("*FAILED - compound type alignmnent problem*"); } else { @@ -186,7 +186,7 @@ out: } if (data) - HDfree(data); + free(data); H5Sclose(spc); H5Tclose(cs6); H5Tclose(cmp); @@ -197,6 +197,6 @@ out: H5Pclose(plist); H5Fclose(fil); HDunlink(fname); - HDfflush(stdout); + fflush(stdout); return result; } diff --git a/tools/test/perform/chunk_cache.c b/tools/test/perform/chunk_cache.c index 9f6554d..289d7c0 100644 --- a/tools/test/perform/chunk_cache.c +++ b/tools/test/perform/chunk_cache.c @@ -134,7 +134,7 @@ create_dset1(hid_t file) H5Dclose(dataset); H5Pclose(dcpl); H5Sclose(dataspace); - HDfree(data); + free(data); return 0; error: @@ -145,7 +145,7 @@ error: H5Sclose(dataspace); } H5E_END_TRY; - HDfree(data); + free(data); return 1; } @@ -198,7 +198,7 @@ create_dset2(hid_t file) H5Dclose(dataset); H5Pclose(dcpl); H5Sclose(dataspace); - HDfree(data); + free(data); return 0; @@ -210,7 +210,7 @@ error: H5Sclose(dataspace); } H5E_END_TRY; - HDfree(data); + free(data); return 1; } @@ -264,13 +264,12 @@ check_partial_chunks_perf(hid_t file) end_t = H5_get_time(); if ((end_t - start_t) > 0.0) - HDprintf("1. Partial chunks: total read time is %lf; number of bytes being read from file is %zu\n", - (end_t - start_t), nbytes_global); + printf("1. Partial chunks: total read time is %lf; number of bytes being read from file is %zu\n", + (end_t - start_t), nbytes_global); else - HDprintf( - "1. Partial chunks: no total read time because timer is not available; number of bytes being " - "read from file is %zu\n", - nbytes_global); + printf("1. Partial chunks: no total read time because timer is not available; number of bytes being " + "read from file is %zu\n", + nbytes_global); H5Dclose(dataset); H5Sclose(filespace); @@ -343,13 +342,12 @@ check_hash_value_perf(hid_t file) end_t = H5_get_time(); if ((end_t - start_t) > 0.0) - HDprintf("2. Hash value: total read time is %lf; number of bytes being read from file is %zu\n", - (end_t - start_t), nbytes_global); + printf("2. Hash value: total read time is %lf; number of bytes being read from file is %zu\n", + (end_t - start_t), nbytes_global); else - HDprintf( - "2. Hash value: no total read time because timer is not available; number of bytes being read " - "from file is %zu\n", - nbytes_global); + printf("2. Hash value: no total read time because timer is not available; number of bytes being read " + "from file is %zu\n", + nbytes_global); H5Dclose(dataset); H5Sclose(filespace); @@ -407,6 +405,6 @@ main(void) return 0; error: - HDfprintf(stderr, "*** ERRORS DETECTED ***\n"); + fprintf(stderr, "*** ERRORS DETECTED ***\n"); return 1; } diff --git a/tools/test/perform/direct_write_perf.c b/tools/test/perform/direct_write_perf.c index 0d94cf5..7772324 100644 --- a/tools/test/perform/direct_write_perf.c +++ b/tools/test/perform/direct_write_perf.c @@ -693,7 +693,7 @@ main(void) int main(void) { - HDfprintf(stdout, "No compression IO performance because zlib was not configured\n"); + fprintf(stdout, "No compression IO performance because zlib was not configured\n"); return EXIT_SUCCESS; } diff --git a/tools/test/perform/iopipe.c b/tools/test/perform/iopipe.c index c61e6a9..c184917 100644 --- a/tools/test/perform/iopipe.c +++ b/tools/test/perform/iopipe.c @@ -73,9 +73,9 @@ print_stats(const char *prefix, H5_bandwidth(bw, sizeof(bw), (double)nbytes, e_time); #ifdef H5_HAVE_GETRUSAGE - HDprintf(HEADING "%1.2fuser %1.2fsystem %1.2felapsed %s\n", prefix, u_time, s_time, e_time, bw); + printf(HEADING "%1.2fuser %1.2fsystem %1.2felapsed %s\n", prefix, u_time, s_time, e_time, bw); #else - HDprintf(HEADING "%1.2felapsed %s\n", prefix, e_time, bw); + printf(HEADING "%1.2felapsed %s\n", prefix, e_time, bw); #endif } @@ -100,10 +100,10 @@ synchronize(void) int H5_ATTR_NDEBUG_UNUSED status; status = HDsystem("sync"); - HDassert(status >= 0); + assert(status >= 0); status = HDsystem("df >/dev/null"); - HDassert(status >= 0); + assert(status >= 0); #endif } @@ -146,23 +146,23 @@ main(void) * Win32 version 5.0 compiler. * 1998-11-06 ptl */ - HDprintf("I/O request size is %1.1fMB\n", (double)(hssize_t)(size[0] * size[1]) / 1024.0 * 1024.0); + printf("I/O request size is %1.1fMB\n", (double)(hssize_t)(size[0] * size[1]) / 1024.0 * 1024.0); /* Open the files */ file = H5Fcreate(HDF5_FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(file >= 0); + assert(file >= 0); fd = HDopen(RAW_FILE_NAME, O_RDWR | O_CREAT | O_TRUNC, 0666); - HDassert(fd >= 0); + assert(fd >= 0); /* Create the dataset */ file_space = H5Screate_simple(2, size, size); - HDassert(file_space >= 0); + assert(file_space >= 0); dset = H5Dcreate2(file, "dset", H5T_NATIVE_UCHAR, file_space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - HDassert(dset >= 0); - the_data = (unsigned char *)HDmalloc((size_t)(size[0] * size[1])); + assert(dset >= 0); + the_data = (unsigned char *)malloc((size_t)(size[0] * size[1])); /* initial fill for lazy malloc */ - HDmemset(the_data, 0xAA, (size_t)(size[0] * size[1])); + memset(the_data, 0xAA, (size_t)(size[0] * size[1])); /* Fill raw */ synchronize(); @@ -170,11 +170,11 @@ main(void) HDgetrusage(RUSAGE_SELF, &r_start); #endif t_start = H5_get_time(); - HDfprintf(stderr, HEADING, "fill raw"); + fprintf(stderr, HEADING, "fill raw"); for (u = 0; u < nwrite; u++) { HDputc(PROGRESS, stderr); - HDfflush(stderr); - HDmemset(the_data, 0xAA, (size_t)(size[0] * size[1])); + fflush(stderr); + memset(the_data, 0xAA, (size_t)(size[0] * size[1])); } #ifdef H5_HAVE_GETRUSAGE HDgetrusage(RUSAGE_SELF, &r_stop); @@ -193,12 +193,12 @@ main(void) HDgetrusage(RUSAGE_SELF, &r_start); #endif t_start = H5_get_time(); - HDfprintf(stderr, HEADING, "fill hdf5"); + fprintf(stderr, HEADING, "fill hdf5"); for (u = 0; u < nread; u++) { HDputc(PROGRESS, stderr); - HDfflush(stderr); + fflush(stderr); status = H5Dread(dset, H5T_NATIVE_UCHAR, file_space, file_space, H5P_DEFAULT, the_data); - HDassert(status >= 0); + assert(status >= 0); } #ifdef H5_HAVE_GETRUSAGE HDgetrusage(RUSAGE_SELF, &r_stop); @@ -217,14 +217,14 @@ main(void) HDgetrusage(RUSAGE_SELF, &r_start); #endif t_start = H5_get_time(); - HDfprintf(stderr, HEADING, "out raw"); + fprintf(stderr, HEADING, "out raw"); for (u = 0; u < nwrite; u++) { HDputc(PROGRESS, stderr); - HDfflush(stderr); + fflush(stderr); offset = HDlseek(fd, (off_t)0, SEEK_SET); - HDassert(0 == offset); + assert(0 == offset); n = HDwrite(fd, the_data, (size_t)(size[0] * size[1])); - HDassert(n >= 0 && (size_t)n == (size[0] * size[1])); + assert(n >= 0 && (size_t)n == (size[0] * size[1])); } #ifdef H5_HAVE_GETRUSAGE HDgetrusage(RUSAGE_SELF, &r_stop); @@ -243,12 +243,12 @@ main(void) HDgetrusage(RUSAGE_SELF, &r_start); #endif t_start = H5_get_time(); - HDfprintf(stderr, HEADING, "out hdf5"); + fprintf(stderr, HEADING, "out hdf5"); for (u = 0; u < nwrite; u++) { HDputc(PROGRESS, stderr); - HDfflush(stderr); + fflush(stderr); status = H5Dwrite(dset, H5T_NATIVE_UCHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, the_data); - HDassert(status >= 0); + assert(status >= 0); } #ifdef H5_HAVE_GETRUSAGE HDgetrusage(RUSAGE_SELF, &r_stop); @@ -267,14 +267,14 @@ main(void) HDgetrusage(RUSAGE_SELF, &r_start); #endif t_start = H5_get_time(); - HDfprintf(stderr, HEADING, "in raw"); + fprintf(stderr, HEADING, "in raw"); for (u = 0; u < nread; u++) { HDputc(PROGRESS, stderr); - HDfflush(stderr); + fflush(stderr); offset = HDlseek(fd, (off_t)0, SEEK_SET); - HDassert(0 == offset); + assert(0 == offset); n = HDread(fd, the_data, (size_t)(size[0] * size[1])); - HDassert(n >= 0 && (size_t)n == (size[0] * size[1])); + assert(n >= 0 && (size_t)n == (size[0] * size[1])); } #ifdef H5_HAVE_GETRUSAGE HDgetrusage(RUSAGE_SELF, &r_stop); @@ -293,12 +293,12 @@ main(void) HDgetrusage(RUSAGE_SELF, &r_start); #endif t_start = H5_get_time(); - HDfprintf(stderr, HEADING, "in hdf5"); + fprintf(stderr, HEADING, "in hdf5"); for (u = 0; u < nread; u++) { HDputc(PROGRESS, stderr); - HDfflush(stderr); + fflush(stderr); status = H5Dread(dset, H5T_NATIVE_UCHAR, file_space, file_space, H5P_DEFAULT, the_data); - HDassert(status >= 0); + assert(status >= 0); } #ifdef H5_HAVE_GETRUSAGE HDgetrusage(RUSAGE_SELF, &r_stop); @@ -312,22 +312,22 @@ main(void) t_start, t_stop, (size_t)(nread * size[0] * size[1])); /* Read hyperslab */ - HDassert(size[0] > 20 && size[1] > 20); + assert(size[0] > 20 && size[1] > 20); start[0] = start[1] = 10; count[0] = count[1] = size[0] - 20; status = H5Sselect_hyperslab(file_space, H5S_SELECT_SET, start, NULL, count, NULL); - HDassert(status >= 0); + assert(status >= 0); synchronize(); #ifdef H5_HAVE_GETRUSAGE HDgetrusage(RUSAGE_SELF, &r_start); #endif t_start = H5_get_time(); - HDfprintf(stderr, HEADING, "in hdf5 partial"); + fprintf(stderr, HEADING, "in hdf5 partial"); for (u = 0; u < nread; u++) { HDputc(PROGRESS, stderr); - HDfflush(stderr); + fflush(stderr); status = H5Dread(dset, H5T_NATIVE_UCHAR, file_space, file_space, H5P_DEFAULT, the_data); - HDassert(status >= 0); + assert(status >= 0); } #ifdef H5_HAVE_GETRUSAGE HDgetrusage(RUSAGE_SELF, &r_stop); @@ -347,7 +347,7 @@ main(void) H5Sclose(file_space); H5Fclose(file); - HDfree(the_data); + free(the_data); return 0; } diff --git a/tools/test/perform/overhead.c b/tools/test/perform/overhead.c index 257d3ec..82c7131 100644 --- a/tools/test/perform/overhead.c +++ b/tools/test/perform/overhead.c @@ -67,8 +67,8 @@ typedef enum fill_t { FILL_ALL, FILL_FORWARD, FILL_REVERSE, FILL_INWARD, FILL_OU static void usage(const char *prog) { - HDfprintf(stderr, "usage: %s [STYLE|cache] [LEFT [MIDDLE [RIGHT]]]\n", prog); - HDfprintf(stderr, "\ + fprintf(stderr, "usage: %s [STYLE|cache] [LEFT [MIDDLE [RIGHT]]]\n", prog); + fprintf(stderr, "\ STYLE is the order that the dataset is filled and should be one of:\n\ forward -- Fill the dataset from lowest address to highest\n\ address. This style tests the right split ratio.\n\ @@ -230,7 +230,7 @@ test(fill_t fill_style, const double splits[], hbool_t verbose, hbool_t use_rdcc abort(); default: /* unknown request */ - HDfprintf(stderr, "Unknown fill style\n"); + fprintf(stderr, "Unknown fill style\n"); goto error; break; } @@ -286,7 +286,7 @@ test(fill_t fill_style, const double splits[], hbool_t verbose, hbool_t use_rdcc abort(); default: /* unknown request */ - HDfprintf(stderr, "Unknown fill style\n"); + fprintf(stderr, "Unknown fill style\n"); goto error; break; } @@ -394,6 +394,6 @@ main(int argc, char *argv[]) return 0; error: - HDfprintf(stderr, "*** ERRORS DETECTED ***\n"); + fprintf(stderr, "*** ERRORS DETECTED ***\n"); return 1; } diff --git a/tools/test/perform/perf_meta.c b/tools/test/perform/perf_meta.c index 6e62f6a..37a1ffd 100644 --- a/tools/test/perform/perf_meta.c +++ b/tools/test/perform/perf_meta.c @@ -399,8 +399,7 @@ create_attrs_1(void) attr_t.avg = attr_t.total / (NUM_ATTRS * NUM_DSETS); /* Print out the performance result */ - HDfprintf(stderr, "1. Create %d attributes for each of %d existing datasets\n", NUM_ATTRS, - NUM_DSETS); + fprintf(stderr, "1. Create %d attributes for each of %d existing datasets\n", NUM_ATTRS, NUM_DSETS); print_perf(open_t, close_t, attr_t); } @@ -500,7 +499,7 @@ create_attrs_2(void) attr_t.avg = attr_t.total / (NUM_ATTRS * NUM_DSETS); /* Print out the performance result */ - HDfprintf(stderr, "2. Create %d attributes for each of %d new datasets\n", NUM_ATTRS, NUM_DSETS); + fprintf(stderr, "2. Create %d attributes for each of %d new datasets\n", NUM_ATTRS, NUM_DSETS); print_perf(create_t, close_t, attr_t); } @@ -608,8 +607,8 @@ create_attrs_3(void) attr_t.avg = attr_t.total / (NUM_ATTRS * NUM_DSETS); /* Print out the performance result */ - HDfprintf(stderr, "3. Create %d attributes for each of %d existing datasets for %d times\n", - BATCH_ATTRS, NUM_DSETS, loop_num); + fprintf(stderr, "3. Create %d attributes for each of %d existing datasets for %d times\n", + BATCH_ATTRS, NUM_DSETS, loop_num); print_perf(open_t, close_t, attr_t); } @@ -715,13 +714,13 @@ perf(p_time *perf_t, double start_t, double end_t) void print_perf(p_time open_t, p_time close_t, p_time attr_t) { - HDfprintf(stderr, "\t%s:\t\tavg=%.6fs;\tmax=%.6fs;\tmin=%.6fs\n", open_t.func, open_t.avg, open_t.max, - open_t.min); - HDfprintf(stderr, "\tH5Dclose:\t\tavg=%.6fs;\tmax=%.6fs;\tmin=%.6fs\n", close_t.avg, close_t.max, - close_t.min); + fprintf(stderr, "\t%s:\t\tavg=%.6fs;\tmax=%.6fs;\tmin=%.6fs\n", open_t.func, open_t.avg, open_t.max, + open_t.min); + fprintf(stderr, "\tH5Dclose:\t\tavg=%.6fs;\tmax=%.6fs;\tmin=%.6fs\n", close_t.avg, close_t.max, + close_t.min); if (NUM_ATTRS) - HDfprintf(stderr, "\tH5A(create & close):\tavg=%.6fs;\tmax=%.6fs;\tmin=%.6fs\n", attr_t.avg, - attr_t.max, attr_t.min); + fprintf(stderr, "\tH5A(create & close):\tavg=%.6fs;\tmax=%.6fs;\tmin=%.6fs\n", attr_t.avg, attr_t.max, + attr_t.min); } /*------------------------------------------------------------------------- @@ -761,7 +760,7 @@ main(int argc, char **argv) #ifdef H5_HAVE_PARALLEL if (facc_type == FACC_DEFAULT || (facc_type != FACC_DEFAULT && MAINPROCESS)) #endif /*H5_HAVE_PARALLEL*/ - HDfprintf(stderr, "\t\tPerformance result of metadata for datasets and attributes\n\n"); + fprintf(stderr, "\t\tPerformance result of metadata for datasets and attributes\n\n"); fapl = H5Pcreate(H5P_FILE_ACCESS); #ifdef H5_HAVE_PARALLEL diff --git a/tools/test/perform/zip_perf.c b/tools/test/perform/zip_perf.c index 256289c..00b3140 100644 --- a/tools/test/perform/zip_perf.c +++ b/tools/test/perform/zip_perf.c @@ -84,13 +84,13 @@ error(const char *fmt, ...) va_list ap; va_start(ap, fmt); - HDfprintf(stderr, "%s: error: ", prog); + fprintf(stderr, "%s: error: ", prog); H5_GCC_CLANG_DIAG_OFF("format-nonliteral") HDvfprintf(stderr, fmt, ap); H5_GCC_CLANG_DIAG_ON("format-nonliteral") - HDfprintf(stderr, "\n"); + fprintf(stderr, "\n"); va_end(ap); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* @@ -104,7 +104,7 @@ cleanup(void) { if (!HDgetenv(HDF5_NOCLEANUP)) HDunlink(filename); - HDfree(filename); + free(filename); } static void @@ -117,7 +117,7 @@ write_file(Bytef *source, uLongf sourceLen) /* destination buffer needs to be at least 0.1% larger than sourceLen * plus 12 bytes */ destLen = (uLongf)((double)sourceLen + ((double)sourceLen * 0.1)) + 12; - dest = (Bytef *)HDmalloc(destLen); + dest = (Bytef *)malloc(destLen); if (!dest) error("out of memory"); @@ -130,7 +130,7 @@ write_file(Bytef *source, uLongf sourceLen) ((double)timer_start.tv_sec + ((double)timer_start.tv_usec) / MICROSECOND); if (report_once_flag) { - HDfprintf(stdout, "\tCompression Ratio: %g\n", ((double)destLen) / (double)sourceLen); + fprintf(stdout, "\tCompression Ratio: %g\n", ((double)destLen) / (double)sourceLen); report_once_flag = 0; } @@ -151,7 +151,7 @@ write_file(Bytef *source, uLongf sourceLen) d_ptr += rc; } - HDfree(dest); + free(dest); } /* @@ -211,9 +211,9 @@ get_unique_name(void) if (prefix) /* 2 = 1 for '/' + 1 for null terminator */ - filename = (char *)HDmalloc(HDstrlen(prefix) + HDstrlen(ZIP_PERF_FILE) + 2); + filename = (char *)malloc(HDstrlen(prefix) + HDstrlen(ZIP_PERF_FILE) + 2); else - filename = (char *)HDmalloc(HDstrlen(ZIP_PERF_FILE) + 1); + filename = (char *)malloc(HDstrlen(ZIP_PERF_FILE) + 1); if (!filename) error("out of memory"); @@ -235,30 +235,30 @@ get_unique_name(void) static void usage(void) { - HDfprintf(stdout, "usage: %s [OPTIONS]\n", prog); - HDfprintf(stdout, " OPTIONS\n"); - HDfprintf(stdout, " -h, --help Print this usage message and exit\n"); - HDfprintf(stdout, " -1...-9 Level of compression, from 1 to 9\n"); - HDfprintf(stdout, " -c P, --compressability=P Percentage of compressability of the random\n"); - HDfprintf(stdout, " data you want [default: 0]"); - HDfprintf(stdout, " -s S, --file-size=S Maximum size of uncompressed file [default: 64M]\n"); - HDfprintf(stdout, " -B S, --max-buffer_size=S Maximum size of buffer [default: 1M]\n"); - HDfprintf(stdout, " -b S, --min-buffer_size=S Minimum size of buffer [default: 128K]\n"); - HDfprintf(stdout, " -p D, --prefix=D The directory prefix to place the file\n"); - HDfprintf(stdout, " -r, --random-test Use random data to write to the file\n"); - HDfprintf(stdout, " [default: no]\n"); - HDfprintf(stdout, "\n"); - HDfprintf(stdout, " D - a directory which exists\n"); - HDfprintf(stdout, " P - a number between 0 and 100\n"); - HDfprintf(stdout, " S - is a size specifier, an integer >=0 followed by a size indicator:\n"); - HDfprintf(stdout, "\n"); - HDfprintf(stdout, " K - Kilobyte (%d)\n", ONE_KB); - HDfprintf(stdout, " M - Megabyte (%d)\n", ONE_MB); - HDfprintf(stdout, " G - Gigabyte (%d)\n", ONE_GB); - HDfprintf(stdout, "\n"); - HDfprintf(stdout, " Example: 37M = 37 Megabytes = %d bytes\n", 37 * ONE_MB); - HDfprintf(stdout, "\n"); - HDfflush(stdout); + fprintf(stdout, "usage: %s [OPTIONS]\n", prog); + fprintf(stdout, " OPTIONS\n"); + fprintf(stdout, " -h, --help Print this usage message and exit\n"); + fprintf(stdout, " -1...-9 Level of compression, from 1 to 9\n"); + fprintf(stdout, " -c P, --compressability=P Percentage of compressability of the random\n"); + fprintf(stdout, " data you want [default: 0]"); + fprintf(stdout, " -s S, --file-size=S Maximum size of uncompressed file [default: 64M]\n"); + fprintf(stdout, " -B S, --max-buffer_size=S Maximum size of buffer [default: 1M]\n"); + fprintf(stdout, " -b S, --min-buffer_size=S Minimum size of buffer [default: 128K]\n"); + fprintf(stdout, " -p D, --prefix=D The directory prefix to place the file\n"); + fprintf(stdout, " -r, --random-test Use random data to write to the file\n"); + fprintf(stdout, " [default: no]\n"); + fprintf(stdout, "\n"); + fprintf(stdout, " D - a directory which exists\n"); + fprintf(stdout, " P - a number between 0 and 100\n"); + fprintf(stdout, " S - is a size specifier, an integer >=0 followed by a size indicator:\n"); + fprintf(stdout, "\n"); + fprintf(stdout, " K - Kilobyte (%d)\n", ONE_KB); + fprintf(stdout, " M - Megabyte (%d)\n", ONE_MB); + fprintf(stdout, " G - Gigabyte (%d)\n", ONE_GB); + fprintf(stdout, "\n"); + fprintf(stdout, " Example: 37M = 37 Megabytes = %d bytes\n", 37 * ONE_MB); + fprintf(stdout, "\n"); + fflush(stdout); } /* @@ -319,7 +319,7 @@ fill_with_random_data(Bytef *src, uLongf src_len) Bytef *buf = src; int fd = HDopen("/dev/urandom", O_RDONLY, 0); - HDfprintf(stdout, "Using /dev/urandom for random data\n"); + fprintf(stdout, "Using /dev/urandom for random data\n"); if (fd < 0) error(HDstrerror(errno)); @@ -339,7 +339,7 @@ fill_with_random_data(Bytef *src, uLongf src_len) HDclose(fd); } else { - HDfprintf(stdout, "Using random() for random data\n"); + fprintf(stdout, "Using random() for random data\n"); for (u = 0; u < src_len; ++u) src[u] = (Bytef)(0xff & HDrandom()); @@ -348,7 +348,7 @@ fill_with_random_data(Bytef *src, uLongf src_len) if (compress_percent) { size_t s = (size_t)((src_len * (uLongf)compress_percent) / 100); - HDmemset(src, '\0', s); + memset(src, '\0', s); } } @@ -364,7 +364,7 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size, unsigned long unsigned long i, iters; iters = file_size / src_len; - src = (Bytef *)HDcalloc(1, sizeof(Bytef) * src_len); + src = (Bytef *)calloc(1, sizeof(Bytef) * src_len); if (!src) { cleanup(); @@ -376,21 +376,21 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size, unsigned long if (random_test) fill_with_random_data(src, src_len); - HDfprintf(stdout, "Buffer size == "); + fprintf(stdout, "Buffer size == "); if (src_len >= ONE_KB && (src_len % ONE_KB) == 0) { if (src_len >= ONE_MB && (src_len % ONE_MB) == 0) { - HDfprintf(stdout, "%ldMB", src_len / ONE_MB); + fprintf(stdout, "%ldMB", src_len / ONE_MB); } else { - HDfprintf(stdout, "%ldKB", src_len / ONE_KB); + fprintf(stdout, "%ldKB", src_len / ONE_KB); } } else { - HDfprintf(stdout, "%ld", src_len); + fprintf(stdout, "%ld", src_len); } - HDfprintf(stdout, "\n"); + fprintf(stdout, "\n"); /* do uncompressed data write */ HDgettimeofday(&timer_start, NULL); @@ -424,8 +424,8 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size, unsigned long total_time = ((double)timer_stop.tv_sec + ((double)timer_stop.tv_usec) / (double)MICROSECOND) - ((double)timer_start.tv_sec + ((double)timer_start.tv_usec) / (double)MICROSECOND); - HDfprintf(stdout, "\tUncompressed Write Time: %.2fs\n", total_time); - HDfprintf(stdout, "\tUncompressed Write Throughput: %.2fMB/s\n", MB_PER_SEC(file_size, total_time)); + fprintf(stdout, "\tUncompressed Write Time: %.2fs\n", total_time); + fprintf(stdout, "\tUncompressed Write Throughput: %.2fMB/s\n", MB_PER_SEC(file_size, total_time)); HDunlink(filename); @@ -447,12 +447,12 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size, unsigned long total_time = ((double)timer_stop.tv_sec + ((double)timer_stop.tv_usec) / (double)MICROSECOND) - ((double)timer_start.tv_sec + ((double)timer_start.tv_usec) / (double)MICROSECOND); - HDfprintf(stdout, "\tCompressed Write Time: %.2fs\n", total_time); - HDfprintf(stdout, "\tCompressed Write Throughput: %.2fMB/s\n", MB_PER_SEC(file_size, total_time)); - HDfprintf(stdout, "\tCompression Time: %gs\n", compression_time); + fprintf(stdout, "\tCompressed Write Time: %.2fs\n", total_time); + fprintf(stdout, "\tCompressed Write Throughput: %.2fMB/s\n", MB_PER_SEC(file_size, total_time)); + fprintf(stdout, "\tCompression Time: %gs\n", compression_time); HDunlink(filename); - HDfree(src); + free(src); } } @@ -527,12 +527,12 @@ main(int argc, char *argv[]) if (min_buf_size > max_buf_size) error("minimum buffer size (%d) exceeds maximum buffer size (%d)", min_buf_size, max_buf_size); - HDfprintf(stdout, "Filesize: %ld\n", file_size); + fprintf(stdout, "Filesize: %ld\n", file_size); if (compress_level == Z_DEFAULT_COMPRESSION) - HDfprintf(stdout, "Compression Level: 6\n"); + fprintf(stdout, "Compression Level: 6\n"); else - HDfprintf(stdout, "Compression Level: %d\n", compress_level); + fprintf(stdout, "Compression Level: %d\n", compress_level); get_unique_name(); do_write_test(file_size, min_buf_size, max_buf_size); @@ -552,7 +552,7 @@ main(int argc, char *argv[]) int main(void) { - HDfprintf(stdout, "No compression IO performance because zlib was not configured\n"); + fprintf(stdout, "No compression IO performance because zlib was not configured\n"); return EXIT_SUCCESS; } |