From 0a4834c2645b5d6f2fbe6ae6d04733e59792d9f8 Mon Sep 17 00:00:00 2001 From: Jacob Smith Date: Thu, 13 Dec 2018 14:02:29 -0600 Subject: Reformat to be more consistent with existing code. Fix a few typos. --- src/H5Dint.c | 150 ++++++++----------------------- src/H5F.c | 33 ++----- src/H5Oint.c | 162 ++++++++++----------------------- src/H5Pdcpl.c | 32 +++---- src/H5VLnative.c | 3 +- test/dsets.c | 8 +- test/links.c | 16 ++-- test/tattr.c | 15 +--- test/tfile.c | 101 ++++++--------------- test/tsohm.c | 266 +++++++++++++------------------------------------------ 10 files changed, 204 insertions(+), 582 deletions(-) diff --git a/src/H5Dint.c b/src/H5Dint.c index 793b3ed..44c40b0 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -676,10 +676,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5D__use_minimized_dset_headers( \ - H5F_t *file, \ - H5D_t *dset, \ - hbool_t *minimize) +H5D__use_minimized_dset_headers(H5F_t *file, H5D_t *dset, hbool_t *minimize) { H5P_genplist_t *plist = NULL; herr_t ret_value = SUCCEED; @@ -692,15 +689,12 @@ H5D__use_minimized_dset_headers( \ plist = H5P_object_verify(dset->shared->dcpl_id, H5P_DATASET_CREATE); if (NULL == plist) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, - "problem getting dcpl") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "problem getting dcpl") if (FAIL == H5P_get(plist, H5D_CRT_MIN_DSET_HDR_SIZE_NAME, minimize)) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, - "can't get minimize value from dcpl") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get minimize value from dcpl") - if (FALSE == *minimize) { + if (FALSE == *minimize) *minimize = H5F_get_min_dset_ohdr(file); - } done: if (FAIL == ret_value) @@ -722,10 +716,7 @@ done: *------------------------------------------------------------------------- */ static size_t -H5D__calculate_minimum_header_size( \ - H5F_t *file, \ - H5D_t *dset, \ - H5O_t *ohdr) +H5D__calculate_minimum_header_size(H5F_t *file, H5D_t *dset, H5O_t *ohdr) { H5T_t *type = NULL; H5O_fill_t *fill_prop = NULL; @@ -744,47 +735,22 @@ H5D__calculate_minimum_header_size( \ use_at_least_v18 = (H5F_LOW_BOUND(file) >= H5F_LIBVER_V18); /* Datatype message size */ - ret_value += H5O_msg_size_oh( - file, - ohdr, - H5O_DTYPE_ID, - type, - 0); + ret_value += H5O_msg_size_oh(file, ohdr, H5O_DTYPE_ID, type, 0); /* Shared Dataspace message size */ - ret_value += H5O_msg_size_oh( - file, - ohdr, - H5O_SDSPACE_ID, - dset->shared->space, - 0); + ret_value += H5O_msg_size_oh(file, ohdr, H5O_SDSPACE_ID, dset->shared->space, 0); /* "Layout" message size */ - ret_value += H5O_msg_size_oh( - file, - ohdr, - H5O_LAYOUT_ID, - &dset->shared->layout, - 0); + ret_value += H5O_msg_size_oh(file, ohdr, H5O_LAYOUT_ID, &dset->shared->layout, 0); /* Fill Value message size */ - ret_value += H5O_msg_size_oh( - file, - ohdr, - H5O_FILL_NEW_ID, - fill_prop, - 0); + ret_value += H5O_msg_size_oh(file, ohdr, H5O_FILL_NEW_ID, fill_prop, 0); /* "Continuation" message size */ /* message pointer "continuation" is unused by raw get function, however, * a null pointer would be intercepted by an assert in H5O_msg_size_oh(). */ - ret_value += H5O_msg_size_oh( - file, - ohdr, - H5O_CONT_ID, - continuation, - 0); + ret_value += H5O_msg_size_oh(file, ohdr, H5O_CONT_ID, continuation, 0); /* Fill Value (backwards compatability) message size */ if (fill_prop->buf && !use_at_least_v18) { @@ -796,51 +762,28 @@ H5D__calculate_minimum_header_size( \ H5O_msg_reset_share(H5O_FILL_ID, &old_fill_prop); - ret_value += H5O_msg_size_oh( - file, - ohdr, - H5O_FILL_ID, - &old_fill_prop, - 0); + ret_value += H5O_msg_size_oh(file, ohdr, H5O_FILL_ID, &old_fill_prop, 0); } /* Filter/Pipeline message size */ if (H5D_CHUNKED == dset->shared->layout.type) { H5O_pline_t *pline = &dset->shared->dcpl_cache.pline; - if (pline->nused > 0) { - ret_value += H5O_msg_size_oh( - file, - ohdr, - H5O_PLINE_ID, - pline, - 0); - } + if (pline->nused > 0) + ret_value += H5O_msg_size_oh(file, ohdr, H5O_PLINE_ID, pline, 0); } /* External File Link message size */ - if (dset->shared->dcpl_cache.efl.nused > 0) { - ret_value += H5O_msg_size_oh( - file, - ohdr, - H5O_EFL_ID, - &dset->shared->dcpl_cache.efl, - 0); - } + if (dset->shared->dcpl_cache.efl.nused > 0) + ret_value += H5O_msg_size_oh(file, ohdr, H5O_EFL_ID, &dset->shared->dcpl_cache.efl, 0); /* Modification Time message size */ if (H5O_HDR_STORE_TIMES & H5O_OH_GET_FLAGS(ohdr)) { - /* TODO: 1 -> H5O_VERSION_1 in H5Opkg.h */ - HDassert(H5O_OH_GET_VERSION(ohdr) >= 1); + HDassert(H5O_OH_GET_VERSION(ohdr) >= 1); /* 1 :: H5O_VERSION_1 (H5Opkg.h) */ if (H5O_OH_GET_VERSION(ohdr) == 1) { /* v1 object headers store modification time as a message */ time_t mtime; - ret_value += H5O_msg_size_oh( - file, - ohdr, - H5O_MTIME_NEW_ID, - &mtime, - 0); + ret_value += H5O_msg_size_oh(file, ohdr, H5O_MTIME_NEW_ID, &mtime, 0); } } @@ -862,10 +805,7 @@ H5D__calculate_minimum_header_size( \ *------------------------------------------------------------------------- */ static herr_t -H5D__prepare_minimized_oh( \ - H5F_t *file, \ - H5D_t *dset, \ - H5O_loc_t *oloc) +H5D__prepare_minimized_oh(H5F_t *file, H5D_t *dset, H5O_loc_t *oloc) { H5O_t *oh = NULL; size_t ohdr_size = 0; @@ -879,20 +819,12 @@ H5D__prepare_minimized_oh( \ oh = H5O__create_ohdr(file, dset->shared->dcpl_id); if (NULL == oh) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, - "can't instantiate object header") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "can't instantiate object header") ohdr_size = H5D__calculate_minimum_header_size(file, dset, oh); - if (FAIL == H5O__apply_ohdr( - file, - oh, - dset->shared->dcpl_id, - ohdr_size, - (size_t)1, - oloc)) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, - "can't apply object header to file") + if (FAIL == H5O__apply_ohdr(file, oh, dset->shared->dcpl_id, ohdr_size, (size_t)1, oloc)) + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "can't apply object header to file") done: FUNC_LEAVE_NOAPI(ret_value); @@ -911,18 +843,18 @@ done: static herr_t H5D__update_oh_info(H5F_t *file, H5D_t *dset, hid_t dapl_id) { - H5O_t *oh = NULL; /* Pointer to dataset's object header */ - size_t ohdr_size = H5D_MINHDR_SIZE; /* Size of dataset's object header */ - H5O_loc_t *oloc = NULL; /* Dataset's object location */ - H5O_layout_t *layout; /* Dataset's layout information */ - H5T_t *type; /* Dataset's datatype */ - H5O_fill_t *fill_prop; /* Pointer to dataset's fill value information */ - H5D_fill_value_t fill_status; /* Fill value status */ - hbool_t fill_changed = FALSE; /* Flag indicating the fill value was changed */ - hbool_t layout_init = FALSE; /* Flag to indicate that chunk information was initialized */ - hbool_t use_at_least_v18; /* Flag indicating to use at least v18 format versions */ - hbool_t minimize_header = FALSE; - herr_t ret_value = SUCCEED; /* Return value */ + H5O_t *oh = NULL; /* Pointer to dataset's object header */ + size_t ohdr_size = H5D_MINHDR_SIZE; /* Size of dataset's object header */ + H5O_loc_t *oloc = NULL; /* Dataset's object location */ + H5O_layout_t *layout; /* Dataset's layout information */ + H5T_t *type; /* Dataset's datatype */ + H5O_fill_t *fill_prop; /* Pointer to dataset's fill value information */ + H5D_fill_value_t fill_status; /* Fill value status */ + hbool_t fill_changed = FALSE; /* Flag indicating the fill value was changed */ + hbool_t layout_init = FALSE; /* Flag to indicate that chunk information was initialized */ + hbool_t use_at_least_v18; /* Flag indicating to use at least v18 format versions */ + hbool_t minimize_header = FALSE; + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -991,12 +923,10 @@ H5D__update_oh_info(H5F_t *file, H5D_t *dset, hid_t dapl_id) } /* end if */ if (FAIL == H5D__use_minimized_dset_headers(file, dset, &minimize_header)) - HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, FAIL, - "can't get minimize settings") + HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, FAIL, "can't get minimize settings") if (TRUE == minimize_header) { if (FAIL == H5D__prepare_minimized_oh(file, dset, oloc)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, - "can't create minimized dataset object header") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create minimized dataset object header") } else { /* Add the dataset's raw data size to the size of the header, if the * raw data will be stored as compact @@ -1005,14 +935,8 @@ H5D__update_oh_info(H5F_t *file, H5D_t *dset, hid_t dapl_id) ohdr_size += layout->storage.u.compact.size; /* Create an object header for the dataset */ - if (0 > H5O_create( - file, - ohdr_size, - (size_t)1, - dset->shared->dcpl_id, - oloc/*out*/)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, - "unable to create dataset object header") + if (0 > H5O_create(file, ohdr_size, (size_t)1, dset->shared->dcpl_id, oloc/*out*/)) + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create dataset object header") } /* If use minimum/standard object header space */ HDassert(file == dset->oloc.file); diff --git a/src/H5F.c b/src/H5F.c index 3cf912d..55e258b 100644 --- a/src/H5F.c +++ b/src/H5F.c @@ -1843,8 +1843,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5Fget_dset_no_attrs_hint(hid_t file_id, - hbool_t *minimize) +H5Fget_dset_no_attrs_hint(hid_t file_id, hbool_t *minimize) { H5VL_object_t *vol_obj = NULL; herr_t ret_value = SUCCEED; @@ -1853,23 +1852,14 @@ H5Fget_dset_no_attrs_hint(hid_t file_id, H5TRACE2("e", "i*b", file_id, minimize); if (NULL == minimize) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "out pointer 'minimize' cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "out pointer 'minimize' cannot be NULL") vol_obj = (H5VL_object_t *)H5I_object(file_id); if (NULL == vol_obj) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier") - if (0 > H5VL_file_get( - vol_obj, - H5VL_FILE_GET_MIN_DSET_OHDR_FLAG, - H5P_DATASET_XFER_DEFAULT, - H5_REQUEST_NULL, - minimize)) - { - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, - "unable to get file's dataset header minimization flag") - } + if (0 > H5VL_file_get(vol_obj, H5VL_FILE_GET_MIN_DSET_OHDR_FLAG, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, minimize)) + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get file's dataset header minimization flag") done: FUNC_LEAVE_API(ret_value) @@ -1897,8 +1887,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5Fset_dset_no_attrs_hint(hid_t file_id, - hbool_t minimize) +H5Fset_dset_no_attrs_hint(hid_t file_id, hbool_t minimize) { H5VL_object_t *vol_obj = NULL; herr_t ret_value = SUCCEED; @@ -1910,16 +1899,8 @@ H5Fset_dset_no_attrs_hint(hid_t file_id, if (NULL == vol_obj) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier") - if (0 > H5VL_file_optional( - vol_obj, - H5P_DATASET_XFER_DEFAULT, - H5_REQUEST_NULL, - H5VL_FILE_SET_MIN_DSET_OHDR_FLAG, - minimize)) - { - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, - "unable to set file's dataset header minimization flag") - } + if (0 > H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_SET_MIN_DSET_OHDR_FLAG, minimize)) + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set file's dataset header minimization flag") done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5Oint.c b/src/H5Oint.c index aa96cb4..0020642 100644 --- a/src/H5Oint.c +++ b/src/H5Oint.c @@ -276,7 +276,7 @@ done: * matzke@llnl.gov * Aug 5 1997 * - * Changes: 17 August 2018 + * Changes: 2018 August 17 * Jacob Smith * Refactor out the operations into two separate steps -- * preparation and application -- to facilitate overriding the @@ -287,12 +287,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5O_create( \ - H5F_t *f, \ - size_t size_hint, \ - size_t initial_rc, \ - hid_t ocpl_id, \ - H5O_loc_t *loc) /*out*/ +H5O_create(H5F_t *f, size_t size_hint, size_t initial_rc, hid_t ocpl_id, H5O_loc_t *loc /*out*/) { H5O_t *oh = NULL; herr_t ret_value = SUCCEED; @@ -308,31 +303,16 @@ H5O_create( \ */ oh = H5O__create_ohdr(f, ocpl_id); if (NULL == oh) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, - "Can't instantiate object header") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "Can't instantiate object header") /* apply object header information to file */ - if (0 > H5O__apply_ohdr( - f, - oh, - ocpl_id, - size_hint, - initial_rc, - loc)) - { - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, - "Can't apply object header to file") - } + if (0 > H5O__apply_ohdr(f, oh, ocpl_id, size_hint, initial_rc, loc)) + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "Can't apply object header to file") done: - if (FAIL == ret_value && - NULL != oh && - 0 > H5O__free(oh)) - { - HDONE_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, - "can't delete object header") - } + if ((FAIL == ret_value) && (NULL != oh) && (0 > H5O__free(oh))) + HDONE_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "can't delete object header") FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_create() */ @@ -347,14 +327,12 @@ done: * Failure: NULL * * Programmer: Jacob Smith - * 17 August 2018 + * 2018 August 17 * *----------------------------------------------------------------------------- */ H5O_t * -H5O__create_ohdr( \ - H5F_t *f, \ - hid_t ocpl_id) +H5O__create_ohdr(H5F_t *f, hid_t ocpl_id) { H5P_genplist_t *oc_plist; H5O_t *oh = NULL; /* Object header in Freelist */ @@ -368,43 +346,33 @@ H5O__create_ohdr( \ /* Check for invalid access request */ if (0 == (H5F_INTENT(f) & H5F_ACC_RDWR)) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, - "no write intent on file") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "no write intent on file") oh = H5FL_CALLOC(H5O_t); if (NULL == oh) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, - "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") oc_plist = (H5P_genplist_t *)H5I_object(ocpl_id); if (NULL == oc_plist) - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, NULL, - "not a property list") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, NULL, "not a property list") /* Get any object header status flags set by properties */ if (0 > H5P_get(oc_plist, H5O_CRT_OHDR_FLAGS_NAME, &oh_flags)) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, - "can't get object header flags") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get object header flags") if (0 > H5O_set_version(f, oh, oh_flags, H5F_STORE_MSG_CRT_IDX(f))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, NULL, - "can't set version of object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, NULL, "can't set version of object header") oh->flags = oh_flags; ret_value = oh; done: - if (NULL == ret_value && - NULL != oh && - 0 > H5O__free(oh)) - { - HDONE_ERROR(H5E_OHDR, H5E_CANTFREE, NULL, - "can't delete object header") - } + if ((NULL == ret_value) && (NULL != oh) && (0 > H5O__free(oh))) + HDONE_ERROR(H5E_OHDR, H5E_CANTFREE, NULL, "can't delete object header") FUNC_LEAVE_NOAPI(ret_value) -} /* H5O__create_ohdr */ +} /* H5O__create_ohdr() */ /*----------------------------------------------------------------------------- @@ -414,21 +382,15 @@ done: * Record some information at `loc_out`. * * Return: Success: SUCCEED (0) (non-negative value) - * Failure: FAI (-1) (negative value) + * Failure: FAIL (-1) (negative value) * * Programmer: Jacob Smith - * 17 August 2018 + * 2018 August 17 * *----------------------------------------------------------------------------- */ herr_t -H5O__apply_ohdr( \ - H5F_t *f, \ - H5O_t *oh, \ - hid_t ocpl_id, \ - size_t size_hint, \ - size_t initial_rc, \ - H5O_loc_t *loc_out) +H5O__apply_ohdr(H5F_t *f, H5O_t *oh, hid_t ocpl_id, size_t size_hint, size_t initial_rc, H5O_loc_t *loc_out) { haddr_t oh_addr; size_t oh_size; @@ -451,32 +413,25 @@ H5O__apply_ohdr( \ oh->swmr_write = !!(H5F_INTENT(f) & H5F_ACC_SWMR_WRITE); /* funky cast */ #ifdef H5O_ENABLE_BAD_MESG_COUNT - if (0 < H5P_exist_plist(oc_plist, H5O_BAD_MESG_COUNT_NAME)) { - /* Set bad message count flag -- from property list */ - if (0 > H5P_get(oc_plist, - H5O_BAD_MESG_COUNT_NAME, - &oh->store_bad_mesg_count)) - { - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, - "can't get bad message count flag") - } - } + /* Check whether the "bad message count" property is set */ + if (0 < H5P_exist_plist(oc_plist, H5O_BAD_MESG_COUNT_NAME)) + /* Get bad message count flag -- from property list */ + if (0 > H5P_get(oc_plist, H5O_BAD_MESG_COUNT_NAME, &oh->store_bad_mesg_count)) + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get bad message count flag") #endif /* H5O_ENABLE_BAD_MESG_COUNT */ /* Create object header proxy if doing SWMR writes */ if (oh->swmr_write) { oh->proxy = H5AC_proxy_entry_create(); if (NULL == oh->proxy) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCREATE, FAIL, - "can't create object header proxy") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCREATE, FAIL, "can't create object header proxy") } else { oh->proxy = NULL; } oc_plist = (H5P_genplist_t *)H5I_object(ocpl_id); if (NULL == oc_plist) - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, - "not a property list") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a property list") /* Initialize version-specific fields */ if (oh->version > H5O_VERSION_1) { @@ -490,28 +445,15 @@ H5O__apply_ohdr( \ /* flag to record message creation indices */ oh->flags |= H5O_HDR_ATTR_CRT_ORDER_TRACKED; - /* Set attribute storage phase change values -- from property list */ - if (0 > H5P_get(oc_plist, - H5O_CRT_ATTR_MAX_COMPACT_NAME, - &oh->max_compact)) - { - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, - "can't get max. # of compact attributes") - } - if (0 > H5P_get(oc_plist, - H5O_CRT_ATTR_MIN_DENSE_NAME, - &oh->min_dense)) - { - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, - "can't get min. # of dense attributes") - } + /* Get attribute storage phase change values -- from property list */ + if (0 > H5P_get(oc_plist, H5O_CRT_ATTR_MAX_COMPACT_NAME, &oh->max_compact)) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get max. # of compact attributes") + if (0 > H5P_get(oc_plist, H5O_CRT_ATTR_MIN_DENSE_NAME, &oh->min_dense)) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get min. # of dense attributes") /* Check for non-default attribute storage phase change values */ - if (H5O_CRT_ATTR_MAX_COMPACT_DEF != oh->max_compact || \ - H5O_CRT_ATTR_MIN_DENSE_DEF != oh->min_dense ) - { + if (H5O_CRT_ATTR_MAX_COMPACT_DEF != oh->max_compact || H5O_CRT_ATTR_MIN_DENSE_DEF != oh->min_dense ) oh->flags |= H5O_HDR_ATTR_STORE_PHASE_CHANGE; - } /* Determine correct value for chunk #0 size bits */ /* Avoid compiler warning on 32-bit machines */ @@ -536,16 +478,14 @@ H5O__apply_ohdr( \ /* Allocate disk space for header and first chunk */ oh_addr = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)oh_size); if (HADDR_UNDEF == oh_addr) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "file allocation failed for object header") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for object header") /* Create the chunk list */ oh->nchunks = 1; oh->alloc_nchunks = 1; oh->chunk = H5FL_SEQ_MALLOC(H5O_chunk_t, (size_t)oh->alloc_nchunks); if (NULL == oh->chunk) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") /* Initialize the first chunk */ oh->chunk[0].addr = oh_addr; @@ -556,8 +496,7 @@ H5O__apply_ohdr( \ /* (including space for serializing the object header prefix */ oh->chunk[0].image = H5FL_BLK_CALLOC(chunk_image, oh_size); if(NULL == oh->chunk[0].image) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") oh->chunk[0].chunk_proxy = NULL; /* Put magic # for object header in first chunk */ @@ -569,17 +508,13 @@ H5O__apply_ohdr( \ oh->alloc_nmesgs = H5O_NMESGS; oh->mesg = H5FL_SEQ_CALLOC(H5O_mesg_t, oh->alloc_nmesgs); if (NULL == oh->mesg) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") /* Initialize the initial "null" message; covers the entire first chunk */ oh->mesg[0].type = H5O_MSG_NULL; oh->mesg[0].dirty = TRUE; oh->mesg[0].native = NULL; - oh->mesg[0].raw = oh->chunk[0].image \ - + H5O_SIZEOF_HDR(oh) \ - - H5O_SIZEOF_CHKSUM_OH(oh) \ - + H5O_SIZEOF_MSGHDR_OH(oh); + oh->mesg[0].raw = oh->chunk[0].image + H5O_SIZEOF_HDR(oh) - H5O_SIZEOF_CHKSUM_OH(oh) + H5O_SIZEOF_MSGHDR_OH(oh); oh->mesg[0].raw_size = size_hint - (size_t)H5O_SIZEOF_MSGHDR_OH(oh); oh->mesg[0].chunkno = 0; @@ -595,10 +530,8 @@ H5O__apply_ohdr( \ /* Cache object header */ if (0 > H5AC_insert_entry(f, H5AC_OHDR, oh_addr, oh, insert_flags)) - HGOTO_ERROR_TAG(H5E_OHDR, H5E_CANTINSERT, FAIL, - "unable to cache object header") + HGOTO_ERROR_TAG(H5E_OHDR, H5E_CANTINSERT, FAIL, "unable to cache object header") - /* TODO: is this relevant to the BEGIN/END TAG region? if not, delete */ /* Reset object header pointer, now that it's been inserted into the cache */ oh = NULL; @@ -610,12 +543,11 @@ H5O__apply_ohdr( \ loc_out->addr = oh_addr; if (0 > H5O_open(loc_out)) - HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, - "unable to open object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open object header") done: FUNC_LEAVE_NOAPI(ret_value); -} /* H5O__apply_ohdr */ +} /* H5O__apply_ohdr() */ /*------------------------------------------------------------------------- @@ -2574,7 +2506,7 @@ H5O_get_oh_addr(const H5O_t *oh) * Function: H5O_get_oh_flags * * Programmer: Jacob Smith - * 17 August 2018 + * 2018 August 17 * *------------------------------------------------------------------------- */ @@ -2584,7 +2516,7 @@ H5O_get_oh_flags(const H5O_t *oh) FUNC_ENTER_NOAPI_NOINIT_NOERR HDassert(oh); FUNC_LEAVE_NOAPI(oh->flags); /* flags can be 0 */ -} +} /* H5O_get_oh_flags() */ /*------------------------------------------------------------------------- @@ -2595,7 +2527,7 @@ H5O_get_oh_flags(const H5O_t *oh) * to the header in question. * * Programmer: Jacob Smith - * 17 August 2018 + * 2018 August 17 * *------------------------------------------------------------------------- */ @@ -2606,14 +2538,14 @@ H5O_get_oh_mtime(const H5O_t *oh) HDassert(oh); HDassert(oh->mtime); FUNC_LEAVE_NOAPI(oh->mtime); -} +} /* H5O_get_oh_mtime() */ /*------------------------------------------------------------------------- * Function: H5O_get_oh_version * * Programmer: Jacob Smith - * 17 August 2018 + * 2018 August 17 * *------------------------------------------------------------------------- */ @@ -2624,7 +2556,7 @@ H5O_get_oh_version(const H5O_t *oh) HDassert(oh); HDassert(oh->version); FUNC_LEAVE_NOAPI(oh->version); -} +} /* H5O_get_oh_version() */ /*------------------------------------------------------------------------- diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index adb63c7..5f13bb5 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -3790,15 +3790,14 @@ done: * Success: Non-negative value (SUCCEED) * * Programmer: Jacob Smith - * 14 August 2018 + * 2018 August 14 * * Modifications: None. * *----------------------------------------------------------------------------- */ herr_t -H5Pget_dset_no_attrs_hint(hid_t dcpl_id, - hbool_t *minimize) +H5Pget_dset_no_attrs_hint(hid_t dcpl_id, hbool_t *minimize) { hbool_t setting = FALSE; H5P_genplist_t *plist = NULL; @@ -3808,23 +3807,20 @@ H5Pget_dset_no_attrs_hint(hid_t dcpl_id, H5TRACE2("e", "i*b", dcpl_id, minimize); if (NULL == minimize) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "receiving pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "receiving pointer cannot be NULL") plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE); if (NULL == plist) - HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, - "can't find object for ID") + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") if (0 > H5P_peek(plist, H5D_CRT_MIN_DSET_HDR_SIZE_NAME, &setting)) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, - "can't get dset oh minimize flag value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get dset oh minimize flag value") *minimize = setting; done: FUNC_LEAVE_API(ret_value) -} /* H5Pget_dset_no_attrs_hint */ +} /* H5Pget_dset_no_attrs_hint() */ /*----------------------------------------------------------------------------- @@ -3841,15 +3837,14 @@ done: * Success: Non-negative value (SUCCEED) * * Programmer: Jacob Smith - * 14 August 2018 + * 2018 August 14 * * Modifications: None. * *----------------------------------------------------------------------------- */ herr_t -H5Pset_dset_no_attrs_hint(hid_t dcpl_id, - hbool_t minimize) +H5Pset_dset_no_attrs_hint(hid_t dcpl_id, hbool_t minimize) { H5P_genplist_t *plist = NULL; hbool_t prev_set = FALSE; @@ -3860,18 +3855,15 @@ H5Pset_dset_no_attrs_hint(hid_t dcpl_id, plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE); if (NULL == plist) - HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, - "can't find object for ID") + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") if (0 > H5P_peek(plist, H5D_CRT_MIN_DSET_HDR_SIZE_NAME, &prev_set)) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, - "can't get extant dset oh minimize flag value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get extant dset oh minimize flag value") if (0 > H5P_poke(plist, H5D_CRT_MIN_DSET_HDR_SIZE_NAME, &minimize)) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, - "can't get dset oh minimize flag value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't get dset oh minimize flag value") done: FUNC_LEAVE_API(ret_value) -} /* H5Pset_dset_no_attrs_hint */ +} /* H5Pset_dset_no_attrs_hint() */ diff --git a/src/H5VLnative.c b/src/H5VLnative.c index 5368d41..6469f76 100644 --- a/src/H5VLnative.c +++ b/src/H5VLnative.c @@ -2116,8 +2116,7 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR { int minimize = va_arg(arguments, int); /* int to satisfy va_arg */ if (0 > H5F_set_min_dset_ohdr(f, (hbool_t)minimize)) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, - "cannot set file's dataset object header minimization flag") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "cannot set file's dataset object header minimization flag") break; } diff --git a/test/dsets.c b/test/dsets.c index 292ea06..0b6d0ad 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -13057,7 +13057,7 @@ test_versionbounds(void) * Failure/error: -1 * * Programmer: Jacob Smith - * 15 Aug 2018 + * 2018 August 15 * * Changes: None. *----------------------------------------------------------------------------- @@ -13075,11 +13075,7 @@ test_object_header_minimization_dcpl(void) /* SETUP */ /*********/ - file_id = H5Fcreate( - "some_arbitrary_filename", - H5F_ACC_TRUNC, - H5P_DEFAULT, - H5P_DEFAULT); + file_id = H5Fcreate("some_arbitrary_filename", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); if (0 > file_id) FAIL_PUTS_ERROR("unable to create test file\n"); diff --git a/test/links.c b/test/links.c index b1fd9a3..959fb13 100644 --- a/test/links.c +++ b/test/links.c @@ -3760,11 +3760,10 @@ external_set_elink_fapl2(hid_t fapl, hbool_t new_format) if((space = H5Screate_simple(2, dims, NULL)) < 0) TEST_ERROR /* Create dataset creation property list */ - if (dcpl_g == H5P_DEFAULT) { + if (dcpl_g == H5P_DEFAULT) dcpl = H5Pcreate(H5P_DATASET_CREATE); - } else { + else dcpl = H5Pcopy(dcpl_g); - } if (0 > dcpl) TEST_ERROR; if(H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_LATE) < 0) TEST_ERROR; @@ -7521,11 +7520,10 @@ external_link_with_committed_datatype(hid_t fapl, hbool_t new_format) if((sid2 = H5Screate_simple(2, dims, NULL)) < 0) FAIL_STACK_ERROR - if (dcpl_g == H5P_DEFAULT) { + if (dcpl_g == H5P_DEFAULT) dcpl = H5Pcreate(H5P_DATASET_CREATE); - } else { + else dcpl = H5Pcopy(dcpl_g); - } if (0 > dcpl) FAIL_STACK_ERROR if(H5Pset_chunk(dcpl, 2, chunks) < 0) FAIL_STACK_ERROR @@ -14941,7 +14939,8 @@ main(void) } /* always enter tests without external cache */ - if(H5Pset_elink_file_cache_size(my_fapl, 0) < 0) TEST_ERROR + if(H5Pset_elink_file_cache_size(my_fapl, 0) < 0) + TEST_ERROR /* General tests... (on both old & new format groups */ nerrors += mklinks(my_fapl, new_format) < 0 ? 1 : 0; @@ -15089,7 +15088,8 @@ main(void) nerrors += group_info_old(fapl) < 0 ? 1 : 0; if (minimize_dset_oh) { - if (0 > H5Pclose(dcpl_g)) TEST_ERROR; + if (0 > H5Pclose(dcpl_g)) + TEST_ERROR; dcpl_g = -1; } } /* [un]minimized dataset object headers */ diff --git a/test/tattr.c b/test/tattr.c index e373e91..d21256e 100644 --- a/test/tattr.c +++ b/test/tattr.c @@ -2432,10 +2432,7 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl) */ fcpl = H5Pcopy(fcpl); CHECK(fcpl, FAIL, "H5Pcopy"); - ret = H5Pset_file_space_strategy( - fcpl, - H5F_FSPACE_STRATEGY_FSM_AGGR, - TRUE, 1); + ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, 1); CHECK(ret, FAIL, "H5Pset_file_space_strategy"); } fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl, fapl); @@ -2630,10 +2627,7 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl) */ fcpl = H5Pcopy(fcpl); CHECK(fcpl, FAIL, "H5Pcopy"); - ret = H5Pset_file_space_strategy( - fcpl, - H5F_FSPACE_STRATEGY_FSM_AGGR, - TRUE, 1); + ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, 1); CHECK(ret, FAIL, "H5Pset_file_space_strategy"); } fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl, fapl); @@ -2808,10 +2802,7 @@ test_attr_dense_unlink(hid_t fcpl, hid_t fapl) */ fcpl = H5Pcopy(fcpl); CHECK(fcpl, FAIL, "H5Pcopy"); - ret = H5Pset_file_space_strategy( - fcpl, - H5F_FSPACE_STRATEGY_FSM_AGGR, - TRUE, 1); + ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, 1); CHECK(ret, FAIL, "H5Pset_file_space_strategy"); } fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl, fapl); diff --git a/test/tfile.c b/test/tfile.c index b2c3e1b..5cb5517 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -7153,10 +7153,10 @@ test_incr_filesize(void) static void test_min_dset_ohdr(void) { - const char _filename[] = "min_dset_ohdr_testfile"; + const char basename[] = "min_dset_ohdr_testfile"; char filename[FILENAME_LEN] = ""; - hid_t file_id = -1; - hid_t file2_id = -1; + hid_t file_id = -1; + hid_t file2_id = -1; hbool_t minimize; MESSAGE(5, ("Testing dataset object header minimization\n")); @@ -7165,13 +7165,9 @@ test_min_dset_ohdr(void) /* SETUP */ /*********/ - h5_fixname(_filename, H5P_DEFAULT, filename, sizeof(filename)); + h5_fixname(basename, H5P_DEFAULT, filename, sizeof(filename)); - file_id = H5Fcreate( - filename, - H5F_ACC_TRUNC, - H5P_DEFAULT, - H5P_DEFAULT); + file_id = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); CHECK_I(file_id, "H5Fcreate"); /*********/ @@ -7181,96 +7177,51 @@ test_min_dset_ohdr(void) /*---------------------------------------- * TEST default value */ - VERIFY(H5Fget_dset_no_attrs_hint(file_id, &minimize), - SUCCEED, - "H5Fget_dset_no_attrs_hint"); - VERIFY(minimize, - FALSE, - "getting default dset minimize flag value"); + VERIFY(H5Fget_dset_no_attrs_hint(file_id, &minimize), SUCCEED, "H5Fget_dset_no_attrs_hint"); + VERIFY(minimize, FALSE, "getting default dset minimize flag value"); /*---------------------------------------- * TEST set to TRUE */ - VERIFY(H5Fset_dset_no_attrs_hint(file_id, TRUE), - SUCCEED, - "H5Fset_dset_no_attrs_hint"); - VERIFY(H5Fget_dset_no_attrs_hint(file_id, &minimize), - SUCCEED, - "H5Fget_dset_no_attrs_hint"); - VERIFY(minimize, - TRUE, - "getting set-TRUE dset minimize flag value"); + VERIFY(H5Fset_dset_no_attrs_hint(file_id, TRUE), SUCCEED, "H5Fset_dset_no_attrs_hint"); + VERIFY(H5Fget_dset_no_attrs_hint(file_id, &minimize), SUCCEED, "H5Fget_dset_no_attrs_hint"); + VERIFY(minimize, TRUE, "getting set-TRUE dset minimize flag value"); /*---------------------------------------- * TEST second file open on same filename */ - file2_id = H5Fopen( - filename, - H5F_ACC_RDWR, - H5P_DEFAULT); + file2_id = H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT); CHECK_I(file2_id, "H5Fopen"); /* verify TRUE setting on second open */ - VERIFY(H5Fget_dset_no_attrs_hint(file_id, &minimize), - SUCCEED, - "H5Fget_dset_no_attrs_hint"); - VERIFY(minimize, - TRUE, - "getting set-TRUE dset minimize flag value"); + VERIFY(H5Fget_dset_no_attrs_hint(file_id, &minimize), SUCCEED, "H5Fget_dset_no_attrs_hint"); + VERIFY(minimize, TRUE, "getting set-TRUE dset minimize flag value"); /* re-set to FALSE on first open */ - VERIFY(H5Fset_dset_no_attrs_hint(file_id, FALSE), - SUCCEED, - "H5Fset_dset_no_attrs_hint"); + VERIFY(H5Fset_dset_no_attrs_hint(file_id, FALSE), SUCCEED, "H5Fset_dset_no_attrs_hint"); /* verify FALSE set on both opens */ - VERIFY(H5Fget_dset_no_attrs_hint(file_id, &minimize), - SUCCEED, - "H5Fget_dset_no_attrs_hint"); - VERIFY(minimize, - FALSE, - "getting set-FALSE dset minimize flag value"); - VERIFY(H5Fget_dset_no_attrs_hint(file2_id, &minimize), - SUCCEED, - "H5Fget_dset_no_attrs_hint"); - VERIFY(minimize, - FALSE, - "getting set-FALSE dset minimize flag value"); + VERIFY(H5Fget_dset_no_attrs_hint(file_id, &minimize), SUCCEED, "H5Fget_dset_no_attrs_hint"); + VERIFY(minimize, FALSE, "getting set-FALSE dset minimize flag value"); + VERIFY(H5Fget_dset_no_attrs_hint(file2_id, &minimize), SUCCEED, "H5Fget_dset_no_attrs_hint"); + VERIFY(minimize, FALSE, "getting set-FALSE dset minimize flag value"); /* re-set to TRUE on second open */ - VERIFY(H5Fset_dset_no_attrs_hint(file2_id, TRUE), - SUCCEED, - "H5Fset_dset_no_attrs_hint"); + VERIFY(H5Fset_dset_no_attrs_hint(file2_id, TRUE), SUCCEED, "H5Fset_dset_no_attrs_hint"); /* verify TRUE set on both opens */ - VERIFY(H5Fget_dset_no_attrs_hint(file_id, &minimize), - SUCCEED, - "H5Fget_dset_no_attrs_hint"); - VERIFY(minimize, - TRUE, - "getting set-FALSE dset minimize flag value"); - VERIFY(H5Fget_dset_no_attrs_hint(file2_id, &minimize), - SUCCEED, - "H5Fget_dset_no_attrs_hint"); - VERIFY(minimize, - TRUE, - "getting set-FALSE dset minimize flag value"); + VERIFY(H5Fget_dset_no_attrs_hint(file_id, &minimize), SUCCEED, "H5Fget_dset_no_attrs_hint"); + VERIFY(minimize, TRUE, "getting set-FALSE dset minimize flag value"); + VERIFY(H5Fget_dset_no_attrs_hint(file2_id, &minimize), SUCCEED, "H5Fget_dset_no_attrs_hint"); + VERIFY(minimize, TRUE, "getting set-FALSE dset minimize flag value"); /*---------------------------------------- * TEST error cases */ H5E_BEGIN_TRY { - VERIFY(H5Fset_dset_no_attrs_hint(-1, TRUE), - FAIL, - "trying to set with invalid file ID"); - - VERIFY(H5Fget_dset_no_attrs_hint(-1, &minimize), - FAIL, - "trying to get with invalid file ID"); - - VERIFY(H5Fget_dset_no_attrs_hint(file_id, NULL), - FAIL, - "trying to get with invalid pointer"); + VERIFY(H5Fset_dset_no_attrs_hint(-1, TRUE), FAIL, "trying to set with invalid file ID"); + VERIFY(H5Fget_dset_no_attrs_hint(-1, &minimize), FAIL, "trying to get with invalid file ID"); + VERIFY(H5Fget_dset_no_attrs_hint(file_id, NULL), FAIL, "trying to get with invalid pointer"); } H5E_END_TRY; /************/ diff --git a/test/tsohm.c b/test/tsohm.c index 32ac1e5..bd73d00 100644 --- a/test/tsohm.c +++ b/test/tsohm.c @@ -182,13 +182,7 @@ static void test_sohm_extlink(void); ** ****************************************************************/ static void -verify_fcpl_values( - hid_t fcpl_id, - const unsigned nindexes_expected, - const unsigned *flags_expected, - const unsigned *minsizes_expected, - unsigned l2b, - unsigned b2l) +verify_fcpl_values(hid_t fcpl_id, const unsigned nindexes_expected, const unsigned *flags_expected, const unsigned *minsizes_expected, unsigned l2b, unsigned b2l) { unsigned nindexes_actual; unsigned list_size; @@ -601,10 +595,7 @@ error: *------------------------------------------------------------------------- */ static hid_t -size1_helper(hid_t file, - const char *filename, - hid_t fapl_id, - int test_file_closing) +size1_helper(hid_t file, const char *filename, hid_t fapl_id, int test_file_closing) { dtype1_struct wdata; dtype1_struct rdata; @@ -628,22 +619,12 @@ size1_helper(hid_t file, #define TSOHM_S1H_VERIFY_DATA(dset_id, dtype_id) \ { \ HDmemset(&rdata, 0, sizeof(rdata)); \ - if (0 > H5Dread( \ - (dset_id), \ - (dtype_id), \ - H5S_ALL, \ - H5S_ALL, \ - H5P_DEFAULT, \ - &rdata)) \ - { \ + if (0 > H5Dread((dset_id), (dtype_id), H5S_ALL, H5S_ALL, H5P_DEFAULT, &rdata)) { \ H5_FAILED(); AT(); \ printf("Can't read data\n"); \ goto error; \ } \ - if (rdata.i1 != wdata.i1 || \ - rdata.i2 != wdata.i2 || \ - HDstrcmp(rdata.str, wdata.str)) \ - { \ + if ((rdata.i1 != wdata.i1) || (rdata.i2 != wdata.i2) || HDstrcmp(rdata.str, wdata.str)) { \ H5_FAILED(); AT(); \ printf("incorrect read data\n"); \ goto error; \ @@ -763,12 +744,7 @@ size1_helper(hid_t file, *---------------------------------------------------------------------------- */ static h5_stat_size_t -getsize_testsize1( - const char *filename, - hid_t fcpl_id, - hid_t fapl_id, - unsigned open_close, - H5O_info_t *oinfo) +getsize_testsize1(const char *filename, hid_t fcpl_id, hid_t fapl_id, unsigned open_close, H5O_info_t *oinfo) { hid_t file = -1; herr_t ret; @@ -779,12 +755,7 @@ getsize_testsize1( file = size1_helper(file, FILENAME, fapl_id, open_close); CHECK_I(file, "size1_helper"); - ret = H5Oget_info_by_name2( - file, - DSETNAME[0], - oinfo, - H5O_INFO_HDR, - H5P_DEFAULT); + ret = H5Oget_info_by_name2(file, DSETNAME[0], oinfo, H5O_INFO_HDR, H5P_DEFAULT); CHECK_I(ret, "H5Oget_info_by_name"); ret = H5Fclose(file); @@ -802,11 +773,6 @@ getsize_testsize1( * Programmer: James Laird * Monday, April 10, 2006 * - * Modifications: - * 2018 November 1 - Jacob Smith - * Heavily refactored to re-use and loop over patterns of - * file creation, setup, and size read. - * *------------------------------------------------------------------------- */ static void @@ -871,20 +837,13 @@ test_sohm_size1(void) /* Tests one index holding only datatype messages */ ret = H5Pset_shared_mesg_nindexes(fcpl_id, num_indexes); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); - ret = H5Pset_shared_mesg_index( - fcpl_id, - 0, - index_flags, - min_mesg_size); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, index_flags, min_mesg_size); CHECK_I(ret, "H5Pset_shared_mesg_index"); if (use_btree) { ret = H5Pset_shared_mesg_phase_change(fcpl_id, 0, 0); } else { - ret = H5Pset_shared_mesg_phase_change( - fcpl_id, - list_max, - btree_min); + ret = H5Pset_shared_mesg_phase_change(fcpl_id, list_max, btree_min); } CHECK_I(ret, "H5Pset_shared_mesg_phase_change"); } else { @@ -901,14 +860,8 @@ test_sohm_size1(void) file_sizes[size_index++] = h5_get_file_size(FILENAME, fapl_id); /* size of populated file, with different populating behaviors */ - for (open_close = 0; open_close < 2; open_close++) { - file_sizes[size_index++] = getsize_testsize1( - FILENAME, - fcpl_id, - fapl_id, - open_close, - &oinfo); - } + for (open_close = 0; open_close < 2; open_close++) + file_sizes[size_index++] = getsize_testsize1(FILENAME, fcpl_id, fapl_id, open_close, &oinfo); oh_sizes[oh_size_index++] = oinfo.hdr.space.total; ret = H5Pclose(fcpl_id); @@ -1061,12 +1014,7 @@ test_sohm_size_consistency_open_create(void) CHECK_I(file, "size1_helper"); /* Get the size of a dataset object header */ - ret = H5Oget_info_by_name2( - file, - DSETNAME[0], - &oinfo, - H5O_INFO_HDR, - H5P_DEFAULT); + ret = H5Oget_info_by_name2(file, DSETNAME[0], &oinfo, H5O_INFO_HDR, H5P_DEFAULT); CHECK_I(ret, "H5Oget_info_by_name"); oh_size_open = oinfo.hdr.space.total; @@ -1081,12 +1029,7 @@ test_sohm_size_consistency_open_create(void) CHECK_I(file, "size1_helper"); /* Get the size of a dataset object header */ - ret = H5Oget_info_by_name2( - file, - DSETNAME[0], - &oinfo, - H5O_INFO_HDR, - H5P_DEFAULT); + ret = H5Oget_info_by_name2(file, DSETNAME[0], &oinfo, H5O_INFO_HDR, H5P_DEFAULT); CHECK_I(ret, "H5Oget_info_by_name"); oh_size_create = oinfo.hdr.space.total; @@ -1117,11 +1060,6 @@ test_sohm_size_consistency_open_create(void) * Programmer: James Laird * Thursday, November 30, 2006 * - * Modifications: - * 2018 November 2 - Jacob Smith - * Heavily refactored to re-use and loop over patterns of - * file creation, setup, and size read. - * *------------------------------------------------------------------------- */ static void @@ -1161,12 +1099,7 @@ sohm_attr_helper(hid_t fcpl_id) hid_t attr_read_id; /* create group in file with name unique to op_index */ - group_id = H5Gcreate2( - file_id, - groupnames[op_index], - H5P_DEFAULT, - H5P_DEFAULT, - H5P_DEFAULT); + group_id = H5Gcreate2(file_id, groupnames[op_index], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); CHECK_I(group_id, "H5Gcreate2"); type_id = H5Tcopy(H5T_NATIVE_INT); @@ -1176,23 +1109,11 @@ sohm_attr_helper(hid_t fcpl_id) * Only do this ONCE. */ if (op_index == 1) { - ret = H5Tcommit2( - file_id, - "datatype", - type_id, - H5P_DEFAULT, - H5P_DEFAULT, - H5P_DEFAULT); + ret = H5Tcommit2(file_id, "datatype", type_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); CHECK_I(ret, "H5Tcommit2"); } - attr_id = H5Acreate2( - group_id, - "attribute", - type_id, - space_id, - H5P_DEFAULT, - H5P_DEFAULT); + attr_id = H5Acreate2(group_id, "attribute", type_id, space_id, H5P_DEFAULT, H5P_DEFAULT); CHECK_I(attr_id, "H5Acreate2"); if (op_index == 2) { @@ -1249,12 +1170,6 @@ sohm_attr_helper(hid_t fcpl_id) * Programmer: James Laird * Thursday, November 30, 2006 * - * Modifications: - * 2018 November 5 - Jacob Smith - * Heavy refactoring. - * Add test for duplicate flag in separate index. - * Add test for 'missing' flag index. - * *------------------------------------------------------------------------- */ static void @@ -1439,34 +1354,23 @@ size2_verify_plist1(hid_t plist) /* Hardcoded to correspond to dcpl1_id created in size2_helper */ /* Check filters */ cd_nelmts = 1; - filter = H5Pget_filter2(plist, 0, NULL, &cd_nelmts, &cd_value, - (size_t)NAME_BUF_SIZE, name, NULL); + filter = H5Pget_filter2(plist, 0, NULL, &cd_nelmts, &cd_value, (size_t)NAME_BUF_SIZE, name, NULL); CHECK_I(filter, "H5Pget_filter2"); VERIFY(filter, H5Z_FILTER_SHUFFLE, "H5Pget_filter2"); cd_nelmts = 1; - filter = H5Pget_filter2(plist, 1, NULL, &cd_nelmts, &cd_value, - (size_t)NAME_BUF_SIZE, name, NULL); + filter = H5Pget_filter2(plist, 1, NULL, &cd_nelmts, &cd_value, (size_t)NAME_BUF_SIZE, name, NULL); CHECK_I(filter, "H5Pget_filter2"); VERIFY(filter, H5Z_FILTER_DEFLATE, "H5Pget_filter2"); VERIFY(cd_value, 1, "H5Pget_filter2"); cd_nelmts = 1; - filter = H5Pget_filter2( - plist, - 2, - NULL, - &cd_nelmts, - &cd_value, - (size_t)NAME_BUF_SIZE, - name, - NULL); + filter = H5Pget_filter2(plist, 2, NULL, &cd_nelmts, &cd_value, (size_t)NAME_BUF_SIZE, name, NULL); CHECK_I(filter, "H5Pget_filter2"); VERIFY(filter, H5Z_FILTER_SHUFFLE, "H5Pget_filter2"); cd_nelmts = 1; - filter = H5Pget_filter2(plist, 3, NULL, &cd_nelmts, &cd_value, - (size_t)NAME_BUF_SIZE, name, NULL); + filter = H5Pget_filter2(plist, 3, NULL, &cd_nelmts, &cd_value, (size_t)NAME_BUF_SIZE, name, NULL); CHECK_I(filter, "H5Pget_filter2"); VERIFY(filter, H5Z_FILTER_FLETCHER32, "H5Pget_filter2"); @@ -1514,36 +1418,31 @@ size2_verify_plist2(hid_t plist) /* Hardcoded to correspond to dcpl1_id created in size2_helper */ /* Check filters */ cd_nelmts = 1; - filter = H5Pget_filter2(plist, 0, NULL, &cd_nelmts, &cd_value, - (size_t)NAME_BUF_SIZE, name, NULL); + filter = H5Pget_filter2(plist, 0, NULL, &cd_nelmts, &cd_value, (size_t)NAME_BUF_SIZE, name, NULL); CHECK_I(filter, "H5Pget_filter2"); VERIFY(filter, H5Z_FILTER_DEFLATE, "H5Pget_filter2"); VERIFY(cd_value, 1, "H5Pget_filter2"); cd_nelmts = 1; - filter = H5Pget_filter2(plist, 1, NULL, &cd_nelmts, &cd_value, - (size_t)NAME_BUF_SIZE, name, NULL); + filter = H5Pget_filter2(plist, 1, NULL, &cd_nelmts, &cd_value, (size_t)NAME_BUF_SIZE, name, NULL); CHECK_I(filter, "H5Pget_filter2"); VERIFY(filter, H5Z_FILTER_DEFLATE, "H5Pget_filter2"); VERIFY(cd_value, 2, "H5Pget_filter2"); cd_nelmts = 1; - filter = H5Pget_filter2(plist, 2, NULL, &cd_nelmts, &cd_value, - (size_t)NAME_BUF_SIZE, name, NULL); + filter = H5Pget_filter2(plist, 2, NULL, &cd_nelmts, &cd_value, (size_t)NAME_BUF_SIZE, name, NULL); CHECK_I(filter, "H5Pget_filter2"); VERIFY(filter, H5Z_FILTER_DEFLATE, "H5Pget_filter2"); VERIFY(cd_value, 2, "H5Pget_filter2"); cd_nelmts = 1; - filter = H5Pget_filter2(plist, 3, NULL, &cd_nelmts, &cd_value, - (size_t)NAME_BUF_SIZE, name, NULL); + filter = H5Pget_filter2(plist, 3, NULL, &cd_nelmts, &cd_value, (size_t)NAME_BUF_SIZE, name, NULL); CHECK_I(filter, "H5Pget_filter2"); VERIFY(filter, H5Z_FILTER_DEFLATE, "H5Pget_filter2"); VERIFY(cd_value, 1, "H5Pget_filter2"); cd_nelmts = 1; - filter = H5Pget_filter2(plist, 4, NULL, &cd_nelmts, &cd_value, - (size_t)NAME_BUF_SIZE, name, NULL); + filter = H5Pget_filter2(plist, 4, NULL, &cd_nelmts, &cd_value, (size_t)NAME_BUF_SIZE, name, NULL); CHECK_I(filter, "H5Pget_filter2"); VERIFY(filter, H5Z_FILTER_DEFLATE, "H5Pget_filter2"); VERIFY(cd_value, 5, "H5Pget_filter2"); @@ -1584,29 +1483,14 @@ static void size2_dump_struct(const char *name, size2_helper_struct *sizes) { puts(name); - printf(" empty size: %llu\n", - (unsigned long long)sizes->empty_size); - printf(" first dataset: %llu \tdelta: %llu\n", - (unsigned long long)sizes->first_dset, - (unsigned long long)(sizes->first_dset - sizes->empty_size)); - printf("second dataset: %llu \tdelta: %llu\n", - (unsigned long long)sizes->second_dset, - (unsigned long long)(sizes->second_dset - sizes->first_dset)); - printf(" dsets 1: %llu \tdelta: %llu\n", - (unsigned long long)sizes->dsets1, - (unsigned long long)(sizes->dsets1 - sizes->second_dset)); - printf(" dsets 2: %llu \tdelta: %llu\n", - (unsigned long long)sizes->dsets2, - (unsigned long long)(sizes->dsets2 - sizes->dsets1)); - printf(" interleaved: %llu \tdelta: %llu\n", - (unsigned long long)sizes->interleaved, - (unsigned long long)(sizes->interleaved - sizes->dsets2)); - printf(" attributes: %llu \tdelta: %llu\n", - (unsigned long long)sizes->attrs1, - (unsigned long long)(sizes->attrs1 - sizes->interleaved)); - printf(" attributes 2: %llu \tdelta: %llu\n", - (unsigned long long)sizes->attrs2, - (unsigned long long)(sizes->attrs2 - sizes->attrs1)); + printf(" empty size: %llu\n", (unsigned long long)sizes->empty_size); + printf(" first dataset: %llu \tdelta: %llu\n", (unsigned long long)sizes->first_dset, (unsigned long long)(sizes->first_dset - sizes->empty_size)); + printf("second dataset: %llu \tdelta: %llu\n", (unsigned long long)sizes->second_dset, (unsigned long long)(sizes->second_dset - sizes->first_dset)); + printf(" dsets 1: %llu \tdelta: %llu\n", (unsigned long long)sizes->dsets1, (unsigned long long)(sizes->dsets1 - sizes->second_dset)); + printf(" dsets 2: %llu \tdelta: %llu\n", (unsigned long long)sizes->dsets2, (unsigned long long)(sizes->dsets2 - sizes->dsets1)); + printf(" interleaved: %llu \tdelta: %llu\n", (unsigned long long)sizes->interleaved, (unsigned long long)(sizes->interleaved - sizes->dsets2)); + printf(" attributes: %llu \tdelta: %llu\n", (unsigned long long)sizes->attrs1, (unsigned long long)(sizes->attrs1 - sizes->interleaved)); + printf(" attributes 2: %llu \tdelta: %llu\n", (unsigned long long)sizes->attrs2, (unsigned long long)(sizes->attrs2 - sizes->attrs1)); } /* size2_dump_struct */ #endif /* NOT_NOW */ @@ -1634,10 +1518,7 @@ size2_dump_struct(const char *name, size2_helper_struct *sizes) *------------------------------------------------------------------------- */ static int -size2_helper( \ - hid_t fcpl_id, \ - int test_file_closing, \ - size2_helper_struct *ret_sizes) +size2_helper(hid_t fcpl_id, int test_file_closing, size2_helper_struct *ret_sizes) { hid_t file_id = -1; hid_t dtype1_id = -1; @@ -2838,32 +2719,13 @@ delete_helper_write(hid_t file_id, hid_t *dspace_id, hid_t *dcpl_id, int x) char wdata; herr_t ret; - dset_id = H5Dcreate2( - file_id, - DSETNAME[x], - H5T_NATIVE_CHAR, - dspace_id[x], - H5P_DEFAULT, - dcpl_id[x], - H5P_DEFAULT); + dset_id = H5Dcreate2(file_id, DSETNAME[x], H5T_NATIVE_CHAR, dspace_id[x], H5P_DEFAULT, dcpl_id[x], H5P_DEFAULT); CHECK_I(dset_id, "H5Dcreate2"); wdata = (char)(x + 'a'); - ret = H5Dwrite( - dset_id, - H5T_NATIVE_CHAR, - dspace_id[x], - dspace_id[x], - H5P_DEFAULT, - &wdata); + ret = H5Dwrite(dset_id, H5T_NATIVE_CHAR, dspace_id[x], dspace_id[x], H5P_DEFAULT, &wdata); CHECK_I(ret, "H5Dwrite"); - attr_id = H5Acreate2( - dset_id, - "attr_name", - H5T_NATIVE_CHAR, - dspace_id[x], - H5P_DEFAULT, - H5P_DEFAULT); + attr_id = H5Acreate2(dset_id, "attr_name", H5T_NATIVE_CHAR, dspace_id[x], H5P_DEFAULT, H5P_DEFAULT); CHECK_I(attr_id, "H5Acreate2"); ret = H5Awrite(attr_id, H5T_NATIVE_CHAR, &wdata); CHECK_I(ret, "H5Awrite"); @@ -2899,13 +2761,7 @@ delete_helper_read(hid_t file_id, hid_t *dspace_id, int x) dset_id = H5Dopen2(file_id, DSETNAME[x], H5P_DEFAULT); CHECK_I(dset_id, "H5Dopen2"); rdata = '\0'; - ret = H5Dread( - dset_id, - H5T_NATIVE_CHAR, - dspace_id[x], - dspace_id[x], - H5P_DEFAULT, - &rdata); + ret = H5Dread(dset_id, H5T_NATIVE_CHAR, dspace_id[x], dspace_id[x], H5P_DEFAULT, &rdata); CHECK_I(ret, "H5Dread"); VERIFY(rdata, (x + 'a'), "H5Dread"); @@ -3491,7 +3347,7 @@ verify_dataset_extension(hid_t fcpl_id, hbool_t close_reopen) hsize_t *space_dims[3]; /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * Macro: TSOHM_EDH_VERIFY_SPACES + * Macro: TSOHM_VDE_VERIFY_SPACES * * Purpose: Encapsulate a common pattern * Open, read-verify, and close the dataspaces for datasets 1-3 @@ -3500,7 +3356,7 @@ verify_dataset_extension(hid_t fcpl_id, hbool_t close_reopen) * 2018 November 5 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ -#define TSOHM_EDH_VERIFY_SPACES(dims) \ +#define TSOHM_VDE_VERIFY_SPACES(dims) \ { \ /* Open dataspaces \ */ \ @@ -3535,10 +3391,10 @@ verify_dataset_extension(hid_t fcpl_id, hbool_t close_reopen) CHECK_I(H5Sclose(space1_id), "H5Sclose"); \ CHECK_I(H5Sclose(space2_id), "H5Sclose"); \ CHECK_I(H5Sclose(space3_id), "H5Sclose"); \ -} /* define TSOHM_EDH_VERIFY_SPACES */ +} /* define TSOHM_VDE_VERIFY_SPACES */ /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * Macro: TSOHM_EDH_CLOSE_REOPEN_FILE_AND_DSETS() + * Macro: TSOHM_VDE_CLOSE_REOPEN_FILE_AND_DSETS() * * Purpose: Encapsulate a common pattern * Wrapper to close and reopen file and datasets: @@ -3551,7 +3407,7 @@ verify_dataset_extension(hid_t fcpl_id, hbool_t close_reopen) * 2018 November 5 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ -#define TSOHM_EDH_CLOSE_REOPEN_FILE_AND_DSETS(n) \ +#define TSOHM_VDE_CLOSE_REOPEN_FILE_AND_DSETS(n) \ { \ CHECK_I(H5Dclose(dset1_id), "H5Dclose"); \ if ((n) > 1) \ @@ -3572,7 +3428,7 @@ verify_dataset_extension(hid_t fcpl_id, hbool_t close_reopen) dset3_id = H5Dopen2(file_id, "dataset3", H5P_DEFAULT); \ CHECK_I(dset3_id, "H5Dopen2"); \ } \ -} /* define TSOHM_EDH_CLOSE_REOPEN_FILE_AND_DSETS */ +} /* define TSOHM_VDE_CLOSE_REOPEN_FILE_AND_DSETS */ /* Remember the current # of reported errors */ old_nerrs = GetTestNumErrs(); @@ -3592,48 +3448,48 @@ verify_dataset_extension(hid_t fcpl_id, hbool_t close_reopen) dset1_id = H5Dcreate2(file_id, "dataset", H5T_NATIVE_LONG, orig_space_id, H5P_DEFAULT, dcpl_id, H5P_DEFAULT); CHECK_I(dset1_id, "H5Dcreate2"); if(close_reopen) - TSOHM_EDH_CLOSE_REOPEN_FILE_AND_DSETS(1); + TSOHM_VDE_CLOSE_REOPEN_FILE_AND_DSETS(1); /* Create another dataset starting with the same dataspace */ dset2_id = H5Dcreate2(file_id, "dataset2", H5T_NATIVE_LONG, orig_space_id, H5P_DEFAULT, dcpl_id, H5P_DEFAULT); CHECK_I(dset2_id, "H5Dcreate2"); if (close_reopen) - TSOHM_EDH_CLOSE_REOPEN_FILE_AND_DSETS(2); + TSOHM_VDE_CLOSE_REOPEN_FILE_AND_DSETS(2); /* Create a third dataset with the same dataspace */ dset3_id = H5Dcreate2(file_id, "dataset3", H5T_NATIVE_LONG, orig_space_id, H5P_DEFAULT, dcpl_id, H5P_DEFAULT); CHECK_I(dset3_id, "H5Dcreate2"); if (close_reopen) - TSOHM_EDH_CLOSE_REOPEN_FILE_AND_DSETS(3); + TSOHM_VDE_CLOSE_REOPEN_FILE_AND_DSETS(3); /* Extend the first dataset */ ret = H5Dset_extent(dset1_id, dims2); CHECK_I(ret, "H5Dset_extent"); if (close_reopen) - TSOHM_EDH_CLOSE_REOPEN_FILE_AND_DSETS(3); + TSOHM_VDE_CLOSE_REOPEN_FILE_AND_DSETS(3); space_dims[0] = dims2; space_dims[1] = dims1; space_dims[2] = dims1; - TSOHM_EDH_VERIFY_SPACES(space_dims); + TSOHM_VDE_VERIFY_SPACES(space_dims); /* Extend the second dataset */ ret = H5Dset_extent(dset2_id, dims2); CHECK_I(ret, "H5Dset_extent"); if(close_reopen) - TSOHM_EDH_CLOSE_REOPEN_FILE_AND_DSETS(3); + TSOHM_VDE_CLOSE_REOPEN_FILE_AND_DSETS(3); space_dims[1] = dims2; - TSOHM_EDH_VERIFY_SPACES(space_dims); + TSOHM_VDE_VERIFY_SPACES(space_dims); /* Extend the third dataset */ ret = H5Dset_extent(dset3_id, dims2); CHECK_I(ret, "H5Dset_extent"); if(close_reopen) - TSOHM_EDH_CLOSE_REOPEN_FILE_AND_DSETS(3); + TSOHM_VDE_CLOSE_REOPEN_FILE_AND_DSETS(3); space_dims[2] = dims2; - TSOHM_EDH_VERIFY_SPACES(space_dims); + TSOHM_VDE_VERIFY_SPACES(space_dims); /* Close the datasets and file */ ret = H5Dclose(dset1_id); @@ -3656,13 +3512,13 @@ verify_dataset_extension(hid_t fcpl_id, hbool_t close_reopen) dset1_id = H5Dcreate2(file_id, "dataset", H5T_NATIVE_LONG, orig_space_id, H5P_DEFAULT, dcpl_id, H5P_DEFAULT); CHECK_I(dset1_id, "H5Dcreate2"); if (close_reopen) - TSOHM_EDH_CLOSE_REOPEN_FILE_AND_DSETS(1); + TSOHM_VDE_CLOSE_REOPEN_FILE_AND_DSETS(1); /* Extend the first dataset */ ret = H5Dset_extent(dset1_id, dims2); CHECK_I(ret, "H5Dset_extent"); if (close_reopen) - TSOHM_EDH_CLOSE_REOPEN_FILE_AND_DSETS(1); + TSOHM_VDE_CLOSE_REOPEN_FILE_AND_DSETS(1); /* Create the second dataset. Its dataspace will be unshared and then * become shared when extended. @@ -3670,13 +3526,13 @@ verify_dataset_extension(hid_t fcpl_id, hbool_t close_reopen) dset2_id = H5Dcreate2(file_id, "dataset2", H5T_NATIVE_LONG, orig_space_id, H5P_DEFAULT, dcpl_id, H5P_DEFAULT); CHECK_I(dset2_id, "H5Dcreate2"); if (close_reopen) - TSOHM_EDH_CLOSE_REOPEN_FILE_AND_DSETS(2); + TSOHM_VDE_CLOSE_REOPEN_FILE_AND_DSETS(2); /* Extend the second dataset */ ret = H5Dset_extent(dset2_id, dims2); CHECK_I(ret, "H5Dset_extent"); if (close_reopen) - TSOHM_EDH_CLOSE_REOPEN_FILE_AND_DSETS(2); + TSOHM_VDE_CLOSE_REOPEN_FILE_AND_DSETS(2); /* Create the third dataset. Its dataspace will be unshared and then * become shared when extended. @@ -3684,15 +3540,15 @@ verify_dataset_extension(hid_t fcpl_id, hbool_t close_reopen) dset3_id = H5Dcreate2(file_id, "dataset3", H5T_NATIVE_LONG, orig_space_id, H5P_DEFAULT, dcpl_id, H5P_DEFAULT); CHECK_I(dset3_id, "H5Dcreate2"); if(close_reopen) - TSOHM_EDH_CLOSE_REOPEN_FILE_AND_DSETS(3); + TSOHM_VDE_CLOSE_REOPEN_FILE_AND_DSETS(3); /* Extend the third dataset */ ret = H5Dset_extent(dset3_id, dims2); CHECK_I(ret, "H5Dset_extent"); if(close_reopen) - TSOHM_EDH_CLOSE_REOPEN_FILE_AND_DSETS(3); + TSOHM_VDE_CLOSE_REOPEN_FILE_AND_DSETS(3); - TSOHM_EDH_VERIFY_SPACES(space_dims); + TSOHM_VDE_VERIFY_SPACES(space_dims); /* Close the datasets and file */ ret = H5Dclose(dset1_id); @@ -3716,8 +3572,8 @@ verify_dataset_extension(hid_t fcpl_id, hbool_t close_reopen) else return(-1); /* macros are exclusive to this function */ -#undef TSOHM_EDH_CLOSE_REOPEN_FILE_AND_DSETS -#undef TSOHM_EDH_VERIFY_SPACES +#undef TSOHM_VDE_CLOSE_REOPEN_FILE_AND_DSETS +#undef TSOHM_VDE_VERIFY_SPACES } /* verify_dataset_extension */ -- cgit v0.12