summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-03-30 18:10:36 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-03-30 18:10:36 (GMT)
commit944cbb940009119de7ccae8a42734b38d03ea2c7 (patch)
treeb9d49b1c9264e988c533a53c3052abf4d292faf5 /src
parent4c14a0e3db852b6f1e9811a7396d85cc81c85ea8 (diff)
downloadhdf5-944cbb940009119de7ccae8a42734b38d03ea2c7.zip
hdf5-944cbb940009119de7ccae8a42734b38d03ea2c7.tar.gz
hdf5-944cbb940009119de7ccae8a42734b38d03ea2c7.tar.bz2
TRILAB-192 merging warnings changes from develop
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt6
-rw-r--r--src/H5Fsuper.c213
-rw-r--r--src/H5Odeprec.c1
-rw-r--r--src/H5Oint.c757
-rw-r--r--src/H5Rint.c37
5 files changed, 512 insertions, 502 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 09a18c3..664eb2d 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1075,6 +1075,9 @@ if (NOT ONLY_SHARED_LIBS)
PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
+ target_compile_options(${HDF5_LIB_TARGET}
+ PRIVATE "${HDF5_CMAKE_C_FLAGS}"
+ )
target_compile_definitions(${HDF5_LIB_TARGET}
PUBLIC
${HDF_EXTRA_C_FLAGS}
@@ -1111,6 +1114,9 @@ if (BUILD_SHARED_LIBS)
PUBLIC "$<$<BOOL:${HDF5_ENABLE_HDFS}>:${HDFS_INCLUDE_DIR}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
+ target_compile_options(${HDF5_LIBSH_TARGET}
+ PRIVATE "${HDF5_CMAKE_C_FLAGS}"
+ )
target_compile_definitions(${HDF5_LIBSH_TARGET}
PUBLIC
"H5_BUILT_AS_DYNAMIC_LIB"
diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c
index a1b29d5..bc7391c 100644
--- a/src/H5Fsuper.c
+++ b/src/H5Fsuper.c
@@ -54,6 +54,7 @@
/********************/
static herr_t H5F__super_ext_create(H5F_t *f, H5O_loc_t *ext_ptr);
static herr_t H5F__update_super_ext_driver_msg(H5F_t *f);
+herr_t H5O__fsinfo_set_version(H5F_t *f, H5O_fsinfo_t *fsinfo);
/*********************/
@@ -88,7 +89,7 @@ static const unsigned H5O_fsinfo_ver_bounds[] = {
H5O_FSINFO_VERSION_LATEST /* H5F_LIBVER_LATEST */
};
-
+
/*-------------------------------------------------------------------------
* Function: H5F__super_ext_create
*
@@ -141,7 +142,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5F__super_ext_create() */
-
+
/*-------------------------------------------------------------------------
* Function: H5F_super_ext_open
*
@@ -179,7 +180,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5F_super_ext_open() */
-
+
/*-------------------------------------------------------------------------
* Function: H5F__super_ext_close
*
@@ -232,14 +233,14 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5F__super_ext_close() */
-
+
/*-------------------------------------------------------------------------
* Function: H5F__update_super_ext_driver_msg
*
- * Purpose: Update the superblock extension file driver info message if
+ * Purpose: Update the superblock extension file driver info message if
* we are using a V 2 superblock. Observe that the function
* is a NO-OP if the file driver info message does not exist.
- * This is necessary, as the function is called whenever the
+ * This is necessary, as the function is called whenever the
* EOA is updated, and were it to create the file driver info
* message, it would find itself in an infinite recursion.
*
@@ -279,8 +280,8 @@ H5F__update_super_ext_driver_msg(H5F_t *f)
/* Check for driver info */
H5_CHECKED_ASSIGN(driver_size, size_t, H5FD_sb_size(f->shared->lf), hsize_t);
- /* Nothing to do unless there is both driver info and
- * the driver info superblock extension message has
+ /* Nothing to do unless there is both driver info and
+ * the driver info superblock extension message has
* already been created.
*/
if(driver_size > 0) {
@@ -296,7 +297,7 @@ H5F__update_super_ext_driver_msg(H5F_t *f)
/* Write the message to the superblock extension.
*
- * Note that the superblock extension and the
+ * Note that the superblock extension and the
* file driver info message must already exist.
*/
drvinfo.len = driver_size;
@@ -312,7 +313,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F__update_super_ext_driver_msg() */
-
+
/*-------------------------------------------------------------------------
* Function: H5F__super_read
*
@@ -351,7 +352,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
FUNC_ENTER_PACKAGE_TAG(H5AC__SUPERBLOCK_TAG)
/* initialize the drvinfo to NULL -- we will overwrite this if there
- * is a driver information block
+ * is a driver information block
*/
f->shared->drvinfo = NULL;
@@ -443,7 +444,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
HGOTO_ERROR(H5E_FILE, H5E_BADTYPE, FAIL, "can't get property list")
/* Make certain we can read the fixed-size portion of the superblock */
- if(H5F__set_eoa(f, H5FD_MEM_SUPER,
+ if(H5F__set_eoa(f, H5FD_MEM_SUPER,
(haddr_t)(H5F_SUPERBLOCK_FIXED_SIZE + H5F_SUPERBLOCK_MINIMAL_VARLEN_SIZE)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "set end of space allocation request failed")
@@ -463,12 +464,12 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
if(NULL == (sblock = (H5F_super_t *)H5AC_protect(f, H5AC_SUPERBLOCK, (haddr_t)0, &udata, rw_flags)))
HGOTO_ERROR(H5E_FILE, H5E_CANTPROTECT, FAIL, "unable to load superblock")
- /*
+ /*
* When opening a file with SWMR-write access, the library will first
- * check to ensure that superblock version 3 is used. Otherwise fail
+ * check to ensure that superblock version 3 is used. Otherwise fail
* file open.
*
- * Then the library will upgrade the file's low_bound depending on
+ * Then the library will upgrade the file's low_bound depending on
* superblock version as follows:
* --version 0 or 1: no change to low_bound
* --version 2: upgrade low_bound to at least V18
@@ -601,8 +602,8 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
* as the file can appear truncated if only part of it has been
* been flushed to disk by the SWMR writer process.
*/
- /* The EOF check is also skipped when the private property
- * H5F_ACS_SKIP_EOF_CHECK_NAME exists in the fapl.
+ /* The EOF check is also skipped when the private property
+ * H5F_ACS_SKIP_EOF_CHECK_NAME exists in the fapl.
* This property is enabled by the tool h5clear with these
* two options: (1) --filesize (2) --increment
*/
@@ -613,7 +614,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get skip EOF check value")
if(H5F_INTENT(f) & H5F_ACC_SWMR_READ) {
- /*
+ /*
* When the file is opened for SWMR read access, skip the check if:
* --the file is already marked for SWMR writing and
* --the file has version 3 superblock for SWMR support
@@ -655,10 +656,10 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
drvrinfo_udata.f = f;
drvrinfo_udata.driver_addr = sblock->driver_addr;
- /* extend EOA so we can read at least the fixed sized
- * portion of the driver info block
+ /* extend EOA so we can read at least the fixed sized
+ * portion of the driver info block
*/
- if(H5FD_set_eoa(f->shared->lf, H5FD_MEM_SUPER, sblock->driver_addr + H5F_DRVINFOBLOCK_HDR_SIZE) < 0) /* will extend eoa later if required */
+ if(H5FD_set_eoa(f->shared->lf, H5FD_MEM_SUPER, sblock->driver_addr + H5F_DRVINFOBLOCK_HDR_SIZE) < 0) /* will extend eoa later if required */
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "set end of space allocation request failed")
/* Look up the driver info block */
@@ -671,7 +672,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
if(((rw_flags & H5AC__READ_ONLY_FLAG) == 0) && H5F_HAS_FEATURE(f, H5FD_FEAT_DIRTY_DRVRINFO_LOAD))
drvinfo_flags |= H5AC__DIRTIED_FLAG;
- /* set the pin entry flag so that the driver information block
+ /* set the pin entry flag so that the driver information block
* cache entry will be pinned in the cache.
*/
drvinfo_flags |= H5AC__PIN_ENTRY_FLAG;
@@ -857,7 +858,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
/* As "eoa_pre_fsm_fsalloc" may be undefined for a crashed file
* with persistent free space managers, therefore, set
- * "first_alloc_dealloc" when the condition
+ * "first_alloc_dealloc" when the condition
* "dropping free-space to the floor is true.
* This will ensure that no action is done to settle things on file
* close via H5MF_settle_meta_data_fsm() and H5MF_settle_raw_data_fsm().
@@ -871,9 +872,9 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
f->shared->fs_addr[u] = fsinfo.fs_addr[u - 1];
/* If the following two conditions are true:
- * (1) file is persisting free-space
+ * (1) file is persisting free-space
* (2) dropping free-space to the floor (null_fsm_addr)
- * nullify the addresses of the FSMs
+ * nullify the addresses of the FSMs
*/
if(f->shared->fs_persist && null_fsm_addr)
for(u = 0; u < NELMTS(fsinfo.fs_addr); u++)
@@ -888,7 +889,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
#if 1 /* bug fix test code -- tidy this up if all goes well */ /* JRM */
/* KLUGE ALERT!!
*
- * H5F__super_ext_write_msg() expects f->shared->sblock to
+ * H5F__super_ext_write_msg() expects f->shared->sblock to
* be set -- verify that it is NULL, and then set it.
* Set it back to NULL when we are done.
*/
@@ -925,12 +926,12 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
/* if the metadata cache image superblock extension message exists,
* read its contents and pass the data on to the metadata cache.
* Given this data, the cache will load and decode the metadata
- * cache image block, decoded it and load its contents into the
- * the cache on the test protect call.
+ * cache image block, decoded it and load its contents into the
+ * the cache on the test protect call.
*
- * Further, if the file is opened R/W, the metadata cache will
+ * Further, if the file is opened R/W, the metadata cache will
* delete the metadata cache image superblock extension and free
- * the cache image block. Don't do this now as f->shared
+ * the cache image block. Don't do this now as f->shared
* is not fully setup, which complicates matters.
*/
@@ -979,20 +980,20 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
/* Write driver info information to the superblock extension */
#if 1 /* bug fix test code -- tidy this up if all goes well */ /* JRM */
- /* KLUGE ALERT!!
- *
- * H5F__super_ext_write_msg() expects f->shared->sblock to
- * be set -- verify that it is NULL, and then set it.
- * Set it back to NULL when we are done.
- */
- HDassert(f->shared->sblock == NULL);
- f->shared->sblock = sblock;
+ /* KLUGE ALERT!!
+ *
+ * H5F__super_ext_write_msg() expects f->shared->sblock to
+ * be set -- verify that it is NULL, and then set it.
+ * Set it back to NULL when we are done.
+ */
+ HDassert(f->shared->sblock == NULL);
+ f->shared->sblock = sblock;
#endif /* JRM */
- if(H5F__super_ext_write_msg(f, H5O_DRVINFO_ID, &drvinfo, FALSE, H5O_MSG_NO_FLAGS_SET) < 0)
+ if(H5F__super_ext_write_msg(f, H5O_DRVINFO_ID, &drvinfo, FALSE, H5O_MSG_NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL, "error in writing message to superblock extension")
#if 1 /* bug fix test code -- tidy this up if all goes well */ /* JRM */
- f->shared->sblock = NULL;
+ f->shared->sblock = NULL;
#endif /* JRM */
} /* end if */
@@ -1025,10 +1026,10 @@ done:
if(sblock && H5AC_unprotect(f, H5AC_SUPERBLOCK, (haddr_t)0, sblock, sblock_flags) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTUNPROTECT, FAIL, "unable to close superblock")
- /* If we have failed, make sure no entries are left in the
+ /* If we have failed, make sure no entries are left in the
* metadata cache, so that it can be shut down and discarded.
*/
- if(ret_value < 0) {
+ if(ret_value < 0) {
/* Unpin and discard drvinfo cache entry */
if(f->shared->drvinfo) {
if(H5AC_unpin_entry(f->shared->drvinfo) < 0)
@@ -1054,7 +1055,7 @@ done:
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5F__super_read() */
-
+
/*-------------------------------------------------------------------------
* Function: H5F__super_init
*
@@ -1118,10 +1119,10 @@ H5F__super_init(H5F_t *f)
if(!(f->shared->fs_strategy == H5F_FILE_SPACE_STRATEGY_DEF &&
f->shared->fs_persist == H5F_FREE_SPACE_PERSIST_DEF &&
f->shared->fs_threshold == H5F_FREE_SPACE_THRESHOLD_DEF &&
- f->shared->fs_page_size == H5F_FILE_SPACE_PAGE_SIZE_DEF))
+ f->shared->fs_page_size == H5F_FILE_SPACE_PAGE_SIZE_DEF))
non_default_fs_settings = TRUE;
- /*
+ /*
* When creating a file with write access, the library will:
* -- set superblock version to 0, 1 or 2 based on feature enabled
* -- no change to low_bound
@@ -1130,9 +1131,9 @@ H5F__super_init(H5F_t *f)
* -- set superblock version to 3
* -- upgrade low_bound to at least V110
*
- * Then the library will finalize superblock version to that allowed by
+ * Then the library will finalize superblock version to that allowed by
* low_bound if that is higher.
- * Lastly, the library will check to ensure the superblock version does not
+ * Lastly, the library will check to ensure the superblock version does not
* exceed the version allowed by high_bound. Otherwise fail file open.
*
* For details, please see RFC:Setting Bounds for Object Creation in HDF5 1.10.0.
@@ -1142,12 +1143,12 @@ H5F__super_init(H5F_t *f)
* the status_flags field in the superblock. The problem is discussed in
* jira issue SWMR-79 and also in the RFC: File Format Changes in HDF5 1.10.0.
* The file's low_bound is upgraded for SWMR so that the library will
- * use the best format versions available in 1.10.
- * Due to the possible upgrade, the fapl returned from H5Fget_access_plist()
+ * use the best format versions available in 1.10.
+ * Due to the possible upgrade, the fapl returned from H5Fget_access_plist()
* might indicate a low_bound higher than what the user originally set.
*/
- /*
+ /*
* Creating a file with SWMR-write access will
* upgrade superblock version and low_bound
*/
@@ -1158,10 +1159,10 @@ H5F__super_init(H5F_t *f)
/* Bump superblock version to create superblock extension for SOHM info */
} else if(f->shared->sohm_nindexes > 0)
super_vers = HDF5_SUPERBLOCK_VERSION_2;
- /*
- * Bump superblock version to create superblock extension for:
- * -- non-default file space strategy or
- * -- non-default persisting free-space or
+ /*
+ * Bump superblock version to create superblock extension for:
+ * -- non-default file space strategy or
+ * -- non-default persisting free-space or
* -- non-default free-space threshold or
* -- non-default page_size
*/
@@ -1238,7 +1239,7 @@ H5F__super_init(H5F_t *f)
/* Compute the size of the driver information block */
H5_CHECKED_ASSIGN(driver_size, size_t, H5FD_sb_size(f->shared->lf), hsize_t);
- /* The following code sets driver_size to the valued needed
+ /* The following code sets driver_size to the valued needed
* for the driver info block, and sets the driver info block
* address regardless of the version of the superblock.
*/
@@ -1279,7 +1280,7 @@ H5F__super_init(H5F_t *f)
/* Allocate space for the superblock */
if(HADDR_UNDEF == H5MF_alloc(f, H5FD_MEM_SUPER, superblock_size))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for superblock")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for superblock")
/* set the drvinfo filed to NULL -- will overwrite this later if needed */
f->shared->drvinfo = NULL;
@@ -1330,7 +1331,7 @@ H5F__super_init(H5F_t *f)
* be tuned if more information is added to the superblock
* extension.
*/
- if(H5F__super_ext_create(f, &ext_loc) < 0)
+ if(H5F__super_ext_create(f, &ext_loc) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTCREATE, FAIL, "unable to create superblock extension")
ext_created = TRUE;
@@ -1403,7 +1404,7 @@ H5F__super_init(H5F_t *f)
if(H5O_msg_create(&ext_loc, H5O_FSINFO_ID, H5O_MSG_FLAG_DONTSHARE | H5O_MSG_FLAG_MARK_IF_UNKNOWN, H5O_UPDATE_TIME, &fsinfo) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to update free-space info header message")
- } /* end if */
+ } /* end if */
} /* end if */
else {
/* Check for creating an "old-style" driver info block */
@@ -1486,7 +1487,7 @@ done:
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5F__super_init() */
-
+
/*-------------------------------------------------------------------------
* Function: H5F_eoa_dirty
*
@@ -1516,8 +1517,8 @@ H5F_eoa_dirty(H5F_t *f)
if(H5F_super_dirty(f) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, FAIL, "unable to mark superblock as dirty")
- /* If the driver information block exists, mark it dirty as well
- * so that the change in eoa will be reflected there as well if
+ /* If the driver information block exists, mark it dirty as well
+ * so that the change in eoa will be reflected there as well if
* appropriate.
*/
if(f->shared->drvinfo) {
@@ -1533,7 +1534,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5F_eoa_dirty() */
-
+
/*-------------------------------------------------------------------------
* Function: H5F_super_dirty
*
@@ -1567,7 +1568,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5F_super_dirty() */
-
+
/*-------------------------------------------------------------------------
* Function: H5F__super_free
*
@@ -1598,7 +1599,7 @@ H5F__super_free(H5F_super_t *sblock)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5F__super_free() */
-
+
/*-------------------------------------------------------------------------
* Function: H5F__super_size
*
@@ -1627,7 +1628,7 @@ H5F__super_size(H5F_t *f, hsize_t *super_size, hsize_t *super_ext_size)
/* Set the superblock size */
if(super_size)
- *super_size = (hsize_t)H5F_SUPERBLOCK_SIZE(f->shared->sblock);
+ *super_size = (hsize_t)H5F_SUPERBLOCK_SIZE(f->shared->sblock);
/* Set the superblock extension size */
if(super_ext_size) {
@@ -1663,7 +1664,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5F__super_size() */
-
+
/*-------------------------------------------------------------------------
* Function: H5F__super_ext_write_msg()
*
@@ -1682,9 +1683,9 @@ H5F__super_ext_write_msg(H5F_t *f, unsigned id, void *mesg,
H5AC_ring_t orig_ring = H5AC_RING_INV; /* Original ring value */
hbool_t ext_created = FALSE; /* Whether superblock extension was created */
hbool_t ext_opened = FALSE; /* Whether superblock extension was opened */
- H5O_loc_t ext_loc; /* "Object location" for superblock extension */
- htri_t status; /* Indicate whether the message exists or not */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_loc_t ext_loc; /* "Object location" for superblock extension */
+ htri_t status; /* Indicate whether the message exists or not */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1703,8 +1704,8 @@ H5F__super_ext_write_msg(H5F_t *f, unsigned id, void *mesg,
} /* end if */
else {
HDassert(may_create);
- if(H5F__super_ext_create(f, &ext_loc) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTCREATE, FAIL, "unable to create file's superblock extension")
+ if(H5F__super_ext_create(f, &ext_loc) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTCREATE, FAIL, "unable to create file's superblock extension")
ext_created = TRUE;
} /* end else */
HDassert(H5F_addr_defined(ext_loc.addr));
@@ -1712,24 +1713,24 @@ H5F__super_ext_write_msg(H5F_t *f, unsigned id, void *mesg,
/* Check if message with ID does not exist in the object header */
if((status = H5O_msg_exists(&ext_loc, id)) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to check object header for message or message exists")
+ HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to check object header for message or message exists")
/* Check for creating vs. writing */
if(may_create) {
if(status)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "Message should not exist")
- /* Create the message with ID in the superblock extension */
- if(H5O_msg_create(&ext_loc, id, (mesg_flags | H5O_MSG_FLAG_DONTSHARE), H5O_UPDATE_TIME, mesg) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to create the message in object header")
+ /* Create the message with ID in the superblock extension */
+ if(H5O_msg_create(&ext_loc, id, (mesg_flags | H5O_MSG_FLAG_DONTSHARE), H5O_UPDATE_TIME, mesg) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to create the message in object header")
} /* end if */
else {
if(!status)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "Message should exist")
- /* Update the message with ID in the superblock extension */
- if(H5O_msg_write(&ext_loc, id, (mesg_flags | H5O_MSG_FLAG_DONTSHARE), H5O_UPDATE_TIME, mesg) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to write the message in object header")
+ /* Update the message with ID in the superblock extension */
+ if(H5O_msg_write(&ext_loc, id, (mesg_flags | H5O_MSG_FLAG_DONTSHARE), H5O_UPDATE_TIME, mesg) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to write the message in object header")
} /* end else */
done:
@@ -1748,7 +1749,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5F__super_ext_write_msg() */
-
+
/*-------------------------------------------------------------------------
* Function: H5F__super_ext_remove_msg
*
@@ -1764,11 +1765,11 @@ herr_t
H5F__super_ext_remove_msg(H5F_t *f, unsigned id)
{
H5AC_ring_t orig_ring = H5AC_RING_INV; /* Original ring value */
- H5O_loc_t ext_loc; /* "Object location" for superblock extension */
+ H5O_loc_t ext_loc; /* "Object location" for superblock extension */
hbool_t ext_opened = FALSE; /* Whether the superblock extension was opened */
- int null_count = 0; /* # of null messages */
+ int null_count = 0; /* # of null messages */
htri_t status; /* Indicate whether the message exists or not */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1780,34 +1781,34 @@ H5F__super_ext_remove_msg(H5F_t *f, unsigned id)
/* Open superblock extension object header */
if(H5F_super_ext_open(f, f->shared->sblock->ext_addr, &ext_loc) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "error in starting file's superblock extension")
+ HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "error in starting file's superblock extension")
ext_opened = TRUE;
/* Check if message with ID exists in the object header */
if((status = H5O_msg_exists(&ext_loc, id)) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to check object header for message")
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to check object header for message")
else if(status) { /* message exists */
- H5O_hdr_info_t hdr_info; /* Object header info for superblock extension */
-
- /* Remove the message */
- if(H5O_msg_remove(&ext_loc, id, H5O_ALL, TRUE) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to delete free-space manager info message")
-
- /* Get info for the superblock extension's object header */
- if(H5O_get_hdr_info(&ext_loc, &hdr_info) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to retrieve superblock extension info")
-
- /* If the object header is an empty base chunk, remove superblock extension */
- if(hdr_info.nchunks == 1) {
- if((null_count = H5O_msg_count(&ext_loc, H5O_NULL_ID)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTCOUNT, FAIL, "unable to count messages")
- else if((unsigned)null_count == hdr_info.nmesgs) {
- HDassert(H5F_addr_defined(ext_loc.addr));
- if(H5O_delete(f, ext_loc.addr) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTCOUNT, FAIL, "unable to count messages")
- f->shared->sblock->ext_addr = HADDR_UNDEF;
- } /* end if */
- } /* end if */
+ H5O_hdr_info_t hdr_info; /* Object header info for superblock extension */
+
+ /* Remove the message */
+ if(H5O_msg_remove(&ext_loc, id, H5O_ALL, TRUE) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to delete free-space manager info message")
+
+ /* Get info for the superblock extension's object header */
+ if(H5O_get_hdr_info(&ext_loc, &hdr_info) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to retrieve superblock extension info")
+
+ /* If the object header is an empty base chunk, remove superblock extension */
+ if(hdr_info.nchunks == 1) {
+ if((null_count = H5O_msg_count(&ext_loc, H5O_NULL_ID)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTCOUNT, FAIL, "unable to count messages")
+ else if((unsigned)null_count == hdr_info.nmesgs) {
+ HDassert(H5F_addr_defined(ext_loc.addr));
+ if(H5O_delete(f, ext_loc.addr) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTCOUNT, FAIL, "unable to count messages")
+ f->shared->sblock->ext_addr = HADDR_UNDEF;
+ } /* end if */
+ } /* end if */
} /* end if */
done:
@@ -1822,7 +1823,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5F__super_ext_remove_msg() */
-
+
/*-------------------------------------------------------------------------
* Function: H5O__fsinfo_set_version
*
diff --git a/src/H5Odeprec.c b/src/H5Odeprec.c
index 33ed787..0e12904 100644
--- a/src/H5Odeprec.c
+++ b/src/H5Odeprec.c
@@ -32,6 +32,7 @@
/* Headers */
/***********/
#include "H5private.h" /* Generic Functions */
+#include "H5CXprivate.h" /* API Contexts */
#include "H5Eprivate.h" /* Error handling */
#include "H5Opkg.h" /* Object headers */
diff --git a/src/H5Oint.c b/src/H5Oint.c
index 39ebfd8..ee266b9 100644
--- a/src/H5Oint.c
+++ b/src/H5Oint.c
@@ -31,6 +31,7 @@
/* Headers */
/***********/
#include "H5private.h" /* Generic Functions */
+#include "H5CXprivate.h" /* API Contexts */
#include "H5Eprivate.h" /* Error handling */
#include "H5Fprivate.h" /* File access */
#include "H5FLprivate.h" /* Free lists */
@@ -57,7 +58,7 @@
/* User data for recursive traversal over objects from a group */
typedef struct {
hid_t obj_id; /* The ID for the starting group */
- H5G_loc_t *start_loc; /* Location of starting group */
+ H5G_loc_t *start_loc; /* Location of starting group */
H5SL_t *visited; /* Skip list for tracking visited nodes */
H5O_iterate_t op; /* Application callback */
void *op_data; /* Application's op data */
@@ -97,36 +98,36 @@ hbool_t H5_PKG_INIT_VAR = FALSE;
* message.
*/
const H5O_msg_class_t *const H5O_msg_class_g[] = {
- H5O_MSG_NULL, /*0x0000 Null */
- H5O_MSG_SDSPACE, /*0x0001 Dataspace */
- H5O_MSG_LINFO, /*0x0002 Link information */
- H5O_MSG_DTYPE, /*0x0003 Datatype */
- H5O_MSG_FILL, /*0x0004 Old data storage -- fill value */
- H5O_MSG_FILL_NEW, /*0x0005 New data storage -- fill value */
- H5O_MSG_LINK, /*0x0006 Link */
- H5O_MSG_EFL, /*0x0007 Data storage -- external data files */
- H5O_MSG_LAYOUT, /*0x0008 Data Layout */
+ H5O_MSG_NULL, /*0x0000 Null */
+ H5O_MSG_SDSPACE, /*0x0001 Dataspace */
+ H5O_MSG_LINFO, /*0x0002 Link information */
+ H5O_MSG_DTYPE, /*0x0003 Datatype */
+ H5O_MSG_FILL, /*0x0004 Old data storage -- fill value */
+ H5O_MSG_FILL_NEW, /*0x0005 New data storage -- fill value */
+ H5O_MSG_LINK, /*0x0006 Link */
+ H5O_MSG_EFL, /*0x0007 Data storage -- external data files */
+ H5O_MSG_LAYOUT, /*0x0008 Data Layout */
#ifdef H5O_ENABLE_BOGUS
- H5O_MSG_BOGUS_VALID, /*0x0009 "Bogus valid" (for testing) */
+ H5O_MSG_BOGUS_VALID, /*0x0009 "Bogus valid" (for testing) */
#else /* H5O_ENABLE_BOGUS */
- NULL, /*0x0009 "Bogus valid" (for testing) */
+ NULL, /*0x0009 "Bogus valid" (for testing) */
#endif /* H5O_ENABLE_BOGUS */
- H5O_MSG_GINFO, /*0x000A Group information */
- H5O_MSG_PLINE, /*0x000B Data storage -- filter pipeline */
- H5O_MSG_ATTR, /*0x000C Attribute */
- H5O_MSG_NAME, /*0x000D Object name */
- H5O_MSG_MTIME, /*0x000E Object modification date and time */
- H5O_MSG_SHMESG, /*0x000F File-wide shared message table */
- H5O_MSG_CONT, /*0x0010 Object header continuation */
- H5O_MSG_STAB, /*0x0011 Symbol table */
- H5O_MSG_MTIME_NEW, /*0x0012 New Object modification date and time */
- H5O_MSG_BTREEK, /*0x0013 Non-default v1 B-tree 'K' values */
- H5O_MSG_DRVINFO, /*0x0014 Driver info settings */
- H5O_MSG_AINFO, /*0x0015 Attribute information */
- H5O_MSG_REFCOUNT, /*0x0016 Object's ref. count */
- H5O_MSG_FSINFO, /*0x0017 Free-space manager info */
+ H5O_MSG_GINFO, /*0x000A Group information */
+ H5O_MSG_PLINE, /*0x000B Data storage -- filter pipeline */
+ H5O_MSG_ATTR, /*0x000C Attribute */
+ H5O_MSG_NAME, /*0x000D Object name */
+ H5O_MSG_MTIME, /*0x000E Object modification date and time */
+ H5O_MSG_SHMESG, /*0x000F File-wide shared message table */
+ H5O_MSG_CONT, /*0x0010 Object header continuation */
+ H5O_MSG_STAB, /*0x0011 Symbol table */
+ H5O_MSG_MTIME_NEW, /*0x0012 New Object modification date and time */
+ H5O_MSG_BTREEK, /*0x0013 Non-default v1 B-tree 'K' values */
+ H5O_MSG_DRVINFO, /*0x0014 Driver info settings */
+ H5O_MSG_AINFO, /*0x0015 Attribute information */
+ H5O_MSG_REFCOUNT, /*0x0016 Object's ref. count */
+ H5O_MSG_FSINFO, /*0x0017 Free-space manager info */
H5O_MSG_MDCI, /*0x0018 Metadata cache image */
- H5O_MSG_UNKNOWN /*0x0019 Placeholder for unknown message */
+ H5O_MSG_UNKNOWN /*0x0019 Placeholder for unknown message */
};
/* Format version bounds for object header */
@@ -174,20 +175,20 @@ H5FL_EXTERN(H5_obj_t);
* datatype message is a datatype but only some of them are datasets.
*/
static const H5O_obj_class_t *const H5O_obj_class_g[] = {
- H5O_OBJ_DATATYPE, /* Datatype object (H5O_TYPE_NAMED_DATATYPE - 2) */
- H5O_OBJ_DATASET, /* Dataset object (H5O_TYPE_DATASET - 1) */
- H5O_OBJ_GROUP, /* Group object (H5O_TYPE_GROUP - 0) */
+ H5O_OBJ_DATATYPE, /* Datatype object (H5O_TYPE_NAMED_DATATYPE - 2) */
+ H5O_OBJ_DATASET, /* Dataset object (H5O_TYPE_DATASET - 1) */
+ H5O_OBJ_GROUP, /* Group object (H5O_TYPE_GROUP - 0) */
};
-
+
/*-------------------------------------------------------------------------
- * Function: H5O__init_package
+ * Function: H5O__init_package
*
- * Purpose: Initialize information specific to H5O interface.
+ * Purpose: Initialize information specific to H5O interface.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, January 18, 2007
*
*-------------------------------------------------------------------------
@@ -206,7 +207,7 @@ H5O__init_package(void)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__init_package() */
-
+
/*-------------------------------------------------------------------------
* Function: H5O_set_version
*
@@ -253,24 +254,24 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_set_version() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_create
+ * Function: H5O_create
*
- * Purpose: Creates a new object header. Allocates space for it and
+ * Purpose: Creates a new object header. Allocates space for it and
* then calls an initialization function. The object header
* is opened for write access and should eventually be
* closed by calling H5O_close().
*
- * Return: Success: Non-negative, the ENT argument contains
- * information about the object header,
- * including its address.
+ * Return: Success: Non-negative, the ENT argument contains
+ * information about the object header,
+ * including its address.
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Aug 5 1997
+ * Programmer: Robb Matzke
+ * matzke@llnl.gov
+ * Aug 5 1997
*
*-------------------------------------------------------------------------
*/
@@ -312,7 +313,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_create() */
-
+
/*-----------------------------------------------------------------------------
* Function: H5O__create_ohdr
*
@@ -377,7 +378,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5O__create_ohdr() */
-
+
/*-----------------------------------------------------------------------------
* Function: H5O__apply_ohdr
*
@@ -548,17 +549,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__apply_ohdr() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_open
+ * Function: H5O_open
*
- * Purpose: Opens an object header which is described by the symbol table
- * entry OBJ_ENT.
+ * Purpose: Opens an object header which is described by the symbol table
+ * entry OBJ_ENT.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Monday, January 5, 1998
+ * Programmer: Robb Matzke
+ * Monday, January 5, 1998
*
* Modification:
* Raymond Lu
@@ -585,7 +586,7 @@ H5O_open(H5O_loc_t *loc)
/* Turn off the variable for holding file or increment open-lock counters */
if(loc->holding_file)
- loc->holding_file = FALSE;
+ loc->holding_file = FALSE;
else
H5F_INCR_NOPEN_OBJS(loc->file);
@@ -593,17 +594,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_open() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_open_name
+ * Function: H5O_open_name
*
- * Purpose: Opens an object within an HDF5 file.
+ * Purpose: Opens an object within an HDF5 file.
*
- * Return: Success: An open object identifier
- * Failure: Negative
+ * Return: Success: An open object identifier
+ * Failure: Negative
*
- * Programmer: Quincey Koziol
- * March 5 2007
+ * Programmer: Quincey Koziol
+ * March 5 2007
*
*-------------------------------------------------------------------------
*/
@@ -611,8 +612,8 @@ hid_t
H5O_open_name(const H5G_loc_t *loc, const char *name, hbool_t app_ref)
{
H5G_loc_t obj_loc; /* Location used to open group */
- H5G_name_t obj_path; /* Opened object group hier. path */
- H5O_loc_t obj_oloc; /* Opened object object location */
+ H5G_name_t obj_path; /* Opened object group hier. path */
+ H5O_loc_t obj_oloc; /* Opened object object location */
hbool_t loc_found = FALSE; /* Entry at 'name' found */
hid_t ret_value = H5I_INVALID_HID;
@@ -644,17 +645,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_open_name() */
-
+
/*-------------------------------------------------------------------------
* Function: H5O__open_by_idx
*
* Purpose: Internal routine to open an object by index within group
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Quincey Koziol
- * December 28, 2017
+ * Programmer: Quincey Koziol
+ * December 28, 2017
*
*-------------------------------------------------------------------------
*/
@@ -663,10 +664,10 @@ H5O__open_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type,
H5_iter_order_t order, hsize_t n)
{
H5G_loc_t obj_loc; /* Location used to open group */
- H5G_name_t obj_path; /* Opened object group hier. path */
- H5O_loc_t obj_oloc; /* Opened object object location */
+ H5G_name_t obj_path; /* Opened object group hier. path */
+ H5O_loc_t obj_oloc; /* Opened object object location */
hbool_t loc_found = FALSE; /* Entry at 'name' found */
- hid_t ret_value = H5I_INVALID_HID; /* Return value */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
FUNC_ENTER_PACKAGE
@@ -696,17 +697,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__open_by_idx() */
-
+
/*-------------------------------------------------------------------------
* Function: H5O__open_by_addr
*
* Purpose: Internal routine to open an object by its address
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Quincey Koziol
- * December 28, 2017
+ * Programmer: Quincey Koziol
+ * December 28, 2017
*
*-------------------------------------------------------------------------
*/
@@ -714,9 +715,9 @@ hid_t
H5O__open_by_addr(const H5G_loc_t *loc, haddr_t addr)
{
H5G_loc_t obj_loc; /* Location used to open group */
- H5G_name_t obj_path; /* Opened object group hier. path */
- H5O_loc_t obj_oloc; /* Opened object object location */
- hid_t ret_value = H5I_INVALID_HID; /* Return value */
+ H5G_name_t obj_path; /* Opened object group hier. path */
+ H5O_loc_t obj_oloc; /* Opened object object location */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
FUNC_ENTER_PACKAGE
@@ -739,17 +740,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__open_by_addr() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O__open_by_loc
+ * Function: H5O__open_by_loc
*
- * Purpose: Opens an object and returns an ID given its group loction.
+ * Purpose: Opens an object and returns an ID given its group loction.
*
- * Return: Success: Open object identifier
- * Failure: Negative
+ * Return: Success: Open object identifier
+ * Failure: Negative
*
- * Programmer: James Laird
- * July 25 2006
+ * Programmer: James Laird
+ * July 25 2006
*
*-------------------------------------------------------------------------
*/
@@ -757,7 +758,7 @@ hid_t
H5O__open_by_loc(const H5G_loc_t *obj_loc, hbool_t app_ref)
{
const H5O_obj_class_t *obj_class; /* Class of object for location */
- hid_t ret_value = H5I_INVALID_HID; /* Return value */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
FUNC_ENTER_PACKAGE
@@ -776,16 +777,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__open_by_loc() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_close
+ * Function: H5O_close
*
- * Purpose: Closes an object header that was previously open.
+ * Purpose: Closes an object header that was previously open.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Monday, January 5, 1998
+ * Programmer: Robb Matzke
+ * Monday, January 5, 1998
*
*-------------------------------------------------------------------------
*/
@@ -818,8 +819,8 @@ H5O_close(H5O_loc_t *loc, hbool_t *file_closed /*out*/)
if(H5F_FILE_ID(loc->file)< 0 && 1 == H5F_NREFS(loc->file))
HDfprintf(H5DEBUG(O), "< %a auto %lu remaining\n",
loc->addr, (unsigned long)H5F_NOPEN_OBJS(loc->file));
- else
- HDfprintf(H5DEBUG(O), "< %a\n", loc->addr);
+ else
+ HDfprintf(H5DEBUG(O), "< %a\n", loc->addr);
}
#endif
@@ -840,20 +841,20 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_close() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O__link_oh
+ * Function: H5O__link_oh
*
- * Purpose: Adjust the link count for an open object header by adding
- * ADJUST to the link count.
+ * Purpose: Adjust the link count for an open object header by adding
+ * ADJUST to the link count.
*
- * Return: Success: New link count
+ * Return: Success: New link count
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Aug 5 1997
+ * Programmer: Robb Matzke
+ * matzke@llnl.gov
+ * Aug 5 1997
*
*-------------------------------------------------------------------------
*/
@@ -861,7 +862,7 @@ int
H5O__link_oh(H5F_t *f, int adjust, H5O_t *oh, hbool_t *deleted)
{
haddr_t addr = H5O_OH_GET_ADDR(oh); /* Object header address */
- int ret_value = -1; /* Return value */
+ int ret_value = -1; /* Return value */
FUNC_ENTER_PACKAGE
@@ -955,29 +956,29 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__link_oh() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_link
+ * Function: H5O_link
*
- * Purpose: Adjust the link count for an object header by adding
- * ADJUST to the link count.
+ * Purpose: Adjust the link count for an object header by adding
+ * ADJUST to the link count.
*
- * Return: Success: New link count
+ * Return: Success: New link count
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Aug 5 1997
+ * Programmer: Robb Matzke
+ * matzke@llnl.gov
+ * Aug 5 1997
*
*-------------------------------------------------------------------------
*/
int
H5O_link(const H5O_loc_t *loc, int adjust)
{
- H5O_t *oh = NULL;
+ H5O_t *oh = NULL;
hbool_t deleted = FALSE; /* Whether the object was deleted */
- int ret_value = -1; /* Return value */
+ int ret_value = -1; /* Return value */
FUNC_ENTER_NOAPI_TAG(loc->addr, FAIL)
@@ -1003,21 +1004,21 @@ done:
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5O_link() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_protect
+ * Function: H5O_protect
*
- * Purpose: Wrapper around H5AC_protect for use during a H5O_protect->
+ * Purpose: Wrapper around H5AC_protect for use during a H5O_protect->
* H5O_msg_append->...->H5O_msg_append->H5O_unprotect sequence of calls
* during an object's creation.
*
- * Return: Success: Pointer to the object header structure for the
+ * Return: Success: Pointer to the object header structure for the
* object.
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Dec 31 2002
+ * Programmer: Quincey Koziol
+ * koziol@ncsa.uiuc.edu
+ * Dec 31 2002
*
*-------------------------------------------------------------------------
*/
@@ -1189,21 +1190,21 @@ done:
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5O_protect() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_pin
+ * Function: H5O_pin
*
- * Purpose: Pin an object header down for use during a sequence of message
+ * Purpose: Pin an object header down for use during a sequence of message
* operations, which prevents the object header from being
* evicted from the cache.
*
- * Return: Success: Pointer to the object header structure for the
+ * Return: Success: Pointer to the object header structure for the
* object.
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Jul 13 2008
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Jul 13 2008
*
*-------------------------------------------------------------------------
*/
@@ -1238,19 +1239,19 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_pin() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_unpin
+ * Function: H5O_unpin
*
- * Purpose: Unpin an object header, allowing it to be evicted from the
+ * Purpose: Unpin an object header, allowing it to be evicted from the
* metadata cache.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Jul 13 2008
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Jul 13 2008
*
*-------------------------------------------------------------------------
*/
@@ -1273,20 +1274,20 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_unpin() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_unprotect
+ * Function: H5O_unprotect
*
- * Purpose: Wrapper around H5AC_unprotect for use during a H5O_protect->
+ * Purpose: Wrapper around H5AC_unprotect for use during a H5O_protect->
* H5O_msg_append->...->H5O_msg_append->H5O_unprotect sequence of calls
* during an object's creation.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Dec 31 2002
+ * Programmer: Quincey Koziol
+ * koziol@ncsa.uiuc.edu
+ * Dec 31 2002
*
*-------------------------------------------------------------------------
*/
@@ -1330,17 +1331,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_unprotect() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_touch_oh
+ * Function: H5O_touch_oh
*
- * Purpose: If FORCE is non-zero then create a modification time message
- * unless one already exists. Then update any existing
- * modification time message with the current time.
+ * Purpose: If FORCE is non-zero then create a modification time message
+ * unless one already exists. Then update any existing
+ * modification time message with the current time.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, July 27, 1998
*
*-------------------------------------------------------------------------
@@ -1350,7 +1351,7 @@ H5O_touch_oh(H5F_t *f, H5O_t *oh, hbool_t force)
{
H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk that message is in */
hbool_t chk_dirtied = FALSE; /* Flag for unprotecting chunk */
- time_t now; /* Current time */
+ time_t now; /* Current time */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1365,7 +1366,7 @@ H5O_touch_oh(H5F_t *f, H5O_t *oh, hbool_t force)
/* Check version, to determine how to store time information */
if(oh->version == H5O_VERSION_1) {
- size_t idx; /* Index of modification time message to update */
+ size_t idx; /* Index of modification time message to update */
/* Look for existing message */
for(idx = 0; idx < oh->nmesgs; idx++)
@@ -1424,18 +1425,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_touch_oh() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_touch
+ * Function: H5O_touch
*
- * Purpose: Touch an object by setting the modification time to the
- * current time and marking the object as dirty. Unless FORCE
- * is non-zero, nothing happens if there is no MTIME message in
- * the object header.
+ * Purpose: Touch an object by setting the modification time to the
+ * current time and marking the object as dirty. Unless FORCE
+ * is non-zero, nothing happens if there is no MTIME message in
+ * the object header.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, July 27, 1998
*
*-------------------------------------------------------------------------
@@ -1443,8 +1444,8 @@ done:
herr_t
H5O_touch(const H5O_loc_t *loc, hbool_t force)
{
- H5O_t *oh = NULL; /* Object header to modify */
- unsigned oh_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting object header */
+ H5O_t *oh = NULL; /* Object header to modify */
+ unsigned oh_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting object header */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1471,15 +1472,15 @@ done:
} /* end H5O_touch() */
#ifdef H5O_ENABLE_BOGUS
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_bogus_oh
+ * Function: H5O_bogus_oh
*
- * Purpose: Create a "bogus" message unless one already exists.
+ * Purpose: Create a "bogus" message unless one already exists.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* <koziol@ncsa.uiuc.edu>
* Tuesday, January 21, 2003
*
@@ -1488,8 +1489,8 @@ done:
herr_t
H5O_bogus_oh(H5F_t *f, H5O_t *oh, unsigned bogus_id, unsigned mesg_flags)
{
- size_t idx; /* Local index variable */
- H5O_msg_class_t *type; /* Message class type */
+ size_t idx; /* Local index variable */
+ H5O_msg_class_t *type; /* Message class type */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1507,25 +1508,25 @@ H5O_bogus_oh(H5F_t *f, H5O_t *oh, unsigned bogus_id, unsigned mesg_flags)
H5O_bogus_t *bogus; /* Pointer to the bogus information */
/* Allocate the native message in memory */
- if(NULL == (bogus = H5MM_malloc(sizeof(H5O_bogus_t))))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "memory allocation failed for 'bogus' message")
+ if(NULL == (bogus = H5MM_malloc(sizeof(H5O_bogus_t))))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "memory allocation failed for 'bogus' message")
/* Update the native value */
bogus->u = H5O_BOGUS_VALUE;
- if(bogus_id == H5O_BOGUS_VALID_ID)
- type = H5O_MSG_BOGUS_VALID;
- else if(bogus_id == H5O_BOGUS_INVALID_ID)
- type = H5O_MSG_BOGUS_INVALID;
- else
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "invalid ID for 'bogus' message")
+ if(bogus_id == H5O_BOGUS_VALID_ID)
+ type = H5O_MSG_BOGUS_VALID;
+ else if(bogus_id == H5O_BOGUS_INVALID_ID)
+ type = H5O_MSG_BOGUS_INVALID;
+ else
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "invalid ID for 'bogus' message")
/* Allocate space in the object header for bogus message */
- if(H5O__msg_alloc(f, oh, type, &mesg_flags, bogus, &idx) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to allocate space for 'bogus' message")
+ if(H5O__msg_alloc(f, oh, type, &mesg_flags, bogus, &idx) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to allocate space for 'bogus' message")
/* Point to "bogus" information (take it over) */
- oh->mesg[idx].native = bogus;
+ oh->mesg[idx].native = bogus;
/* Set the appropriate flags for the message */
oh->mesg[idx].flags = mesg_flags;
@@ -1540,20 +1541,20 @@ done:
} /* end H5O_bogus_oh() */
#endif /* H5O_ENABLE_BOGUS */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_delete
+ * Function: H5O_delete
*
- * Purpose: Delete an object header from a file. This frees the file
+ * Purpose: Delete an object header from a file. This frees the file
* space used for the object header (and it's continuation blocks)
* and also walks through each header message and asks it to
* remove all the pieces of the file referenced by the header.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Mar 19 2003
+ * Programmer: Quincey Koziol
+ * koziol@ncsa.uiuc.edu
+ * Mar 19 2003
*
*-------------------------------------------------------------------------
*/
@@ -1602,21 +1603,21 @@ done:
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5O_delete() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O__delete_oh
+ * Function: H5O__delete_oh
*
- * Purpose: Internal function to:
+ * Purpose: Internal function to:
* Delete an object header from a file. This frees the file
* space used for the object header (and it's continuation blocks)
* and also walks through each header message and asks it to
* remove all the pieces of the file referenced by the header.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Mar 19 2003
+ * Programmer: Quincey Koziol
+ * koziol@ncsa.uiuc.edu
+ * Mar 19 2003
*
*-------------------------------------------------------------------------
*/
@@ -1624,7 +1625,7 @@ static herr_t
H5O__delete_oh(H5F_t *f, H5O_t *oh)
{
H5O_mesg_t *curr_msg; /* Pointer to current message being operated on */
- unsigned u;
+ unsigned u;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1646,16 +1647,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__delete_oh() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_obj_type
+ * Function: H5O_obj_type
*
- * Purpose: Retrieves the type of object pointed to by `loc'.
+ * Purpose: Retrieves the type of object pointed to by `loc'.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, November 4, 1998
*
*-------------------------------------------------------------------------
@@ -1663,7 +1664,7 @@ done:
herr_t
H5O_obj_type(const H5O_loc_t *loc, H5O_type_t *obj_type)
{
- H5O_t *oh = NULL; /* Object header for location */
+ H5O_t *oh = NULL; /* Object header for location */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_TAG(loc->addr, FAIL)
@@ -1678,21 +1679,21 @@ H5O_obj_type(const H5O_loc_t *loc, H5O_type_t *obj_type)
done:
if(oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
+ HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5O_obj_type() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O__obj_type_real
+ * Function: H5O__obj_type_real
*
- * Purpose: Returns the type of object pointed to by `oh'.
+ * Purpose: Returns the type of object pointed to by `oh'.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, November 21, 2005
*
*-------------------------------------------------------------------------
@@ -1724,16 +1725,16 @@ H5O__obj_type_real(const H5O_t *oh, H5O_type_t *obj_type)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__obj_type_real() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O__obj_class
+ * Function: H5O__obj_class
*
- * Purpose: Returns the class of object pointed to by `loc'.
+ * Purpose: Returns the class of object pointed to by `loc'.
*
- * Return: Success: An object class
- * Failure: NULL
+ * Return: Success: An object class
+ * Failure: NULL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, November 6, 2006
*
*-------------------------------------------------------------------------
@@ -1741,7 +1742,7 @@ H5O__obj_type_real(const H5O_t *oh, H5O_type_t *obj_type)
const H5O_obj_class_t *
H5O__obj_class(const H5O_loc_t *loc)
{
- H5O_t *oh = NULL; /* Object header for location */
+ H5O_t *oh = NULL; /* Object header for location */
const H5O_obj_class_t *ret_value = NULL; /* Return value */
FUNC_ENTER_STATIC_TAG(loc->addr)
@@ -1756,21 +1757,21 @@ H5O__obj_class(const H5O_loc_t *loc)
done:
if(oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, NULL, "unable to release object header")
+ HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, NULL, "unable to release object header")
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5O__obj_class() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O__obj_class_real
+ * Function: H5O__obj_class_real
*
- * Purpose: Returns the class of object pointed to by `oh'.
+ * Purpose: Returns the class of object pointed to by `oh'.
*
- * Return: Success: An object class
- * Failure: NULL
+ * Return: Success: An object class
+ * Failure: NULL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, November 21, 2005
*
*-------------------------------------------------------------------------
@@ -1778,7 +1779,7 @@ done:
static const H5O_obj_class_t *
H5O__obj_class_real(const H5O_t *oh)
{
- size_t i; /* Local index variable */
+ size_t i; /* Local index variable */
const H5O_obj_class_t *ret_value = NULL; /* Return value */
FUNC_ENTER_STATIC
@@ -1789,7 +1790,7 @@ H5O__obj_class_real(const H5O_t *oh)
/* Test whether entry qualifies as a particular type of object */
/* (Note: loop is in reverse order, to test specific objects first) */
for(i = NELMTS(H5O_obj_class_g); i > 0; --i) {
- htri_t isa; /* Is entry a particular type? */
+ htri_t isa; /* Is entry a particular type? */
if((isa = (H5O_obj_class_g[i - 1]->isa)(oh)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to determine object type")
@@ -1804,17 +1805,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__obj_class_real() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_get_loc
+ * Function: H5O_get_loc
*
- * Purpose: Gets the object location for an object given its ID.
+ * Purpose: Gets the object location for an object given its ID.
*
- * Return: Success: Pointer to H5O_loc_t
- * Failure: NULL
+ * Return: Success: Pointer to H5O_loc_t
+ * Failure: NULL
*
- * Programmer: James Laird
- * July 25 2006
+ * Programmer: James Laird
+ * July 25 2006
*
*-------------------------------------------------------------------------
*/
@@ -1862,16 +1863,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_get_loc() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_loc_reset
+ * Function: H5O_loc_reset
*
- * Purpose: Reset a object location to an empty state
+ * Purpose: Reset a object location to an empty state
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, September 19, 2005
*
*-------------------------------------------------------------------------
@@ -1891,16 +1892,16 @@ H5O_loc_reset(H5O_loc_t *loc)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_loc_reset() */
-
+
/*-------------------------------------------------------------------------
* Function: H5O_loc_copy
*
* Purpose: Copy object location information
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* koziol@ncsa.uiuc.edu
* Monday, September 19, 2005
*
@@ -1942,17 +1943,17 @@ H5O_loc_copy(H5O_loc_t *dst, H5O_loc_t *src, H5_copy_depth_t depth)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_loc_copy() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_loc_hold_file
+ * Function: H5O_loc_hold_file
*
- * Purpose: Have this object header hold a file open until it is
+ * Purpose: Have this object header hold a file open until it is
* released.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: James Laird
+ * Programmer: James Laird
* Wednesday, August 16, 2006
*
*-------------------------------------------------------------------------
@@ -1975,18 +1976,18 @@ H5O_loc_hold_file(H5O_loc_t *loc)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_loc_hold_file() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_loc_free
+ * Function: H5O_loc_free
*
- * Purpose: Release resources used by this object header location.
+ * Purpose: Release resources used by this object header location.
* Not to be confused with H5O_close; this is used on
* locations that don't correspond to open objects.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: James Laird
+ * Programmer: James Laird
* Wednesday, August 16, 2006
*
*-------------------------------------------------------------------------
@@ -2015,17 +2016,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_loc_free() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_get_hdr_info
+ * Function: H5O_get_hdr_info
*
- * Purpose: Retrieve the object header information for an object
+ * Purpose: Retrieve the object header information for an object
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Quincey Koziol
- * September 22 2009
+ * Programmer: Quincey Koziol
+ * September 22 2009
*
*-------------------------------------------------------------------------
*/
@@ -2054,22 +2055,22 @@ H5O_get_hdr_info(const H5O_loc_t *loc, H5O_hdr_info_t *hdr)
done:
if(oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_PROTECT, FAIL, "unable to release object header")
+ HDONE_ERROR(H5E_OHDR, H5E_PROTECT, FAIL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_get_hdr_info() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O__get_hdr_info_real
+ * Function: H5O__get_hdr_info_real
*
- * Purpose: Internal routine to retrieve the object header information for an object
+ * Purpose: Internal routine to retrieve the object header information for an object
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Quincey Koziol
- * September 22 2009
+ * Programmer: Quincey Koziol
+ * September 22 2009
*
*-------------------------------------------------------------------------
*/
@@ -2077,7 +2078,7 @@ static herr_t
H5O__get_hdr_info_real(const H5O_t *oh, H5O_hdr_info_t *hdr)
{
const H5O_mesg_t *curr_msg; /* Pointer to current message being operated on */
- const H5O_chunk_t *curr_chunk; /* Pointer to current message being operated on */
+ const H5O_chunk_t *curr_chunk; /* Pointer to current message being operated on */
unsigned u; /* Local index variable */
FUNC_ENTER_STATIC_NOERR
@@ -2140,16 +2141,16 @@ H5O__get_hdr_info_real(const H5O_t *oh, H5O_hdr_info_t *hdr)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__get_hdr_info_real() */
-
+
/*-------------------------------------------------------------------------
* Function: H5O_get_info
*
* Purpose: Retrieve the information for an object
*
* Note: Add a parameter "fields" to indicate selection of object info.
- *
- * Return: Success: Non-negative
- * Failure: Negative
+ *
+ * Return: Success: Non-negative
+ * Failure: Negative
*
* Programmer: Quincey Koziol
* November 21 2006
@@ -2193,7 +2194,7 @@ H5O_get_info(const H5O_loc_t *loc, H5O_info_t *oinfo, unsigned fields)
/* Set the object's reference count */
oinfo->rc = oh->nlink;
- }
+ }
/* Get time information, if requested */
if(fields & H5O_INFO_TIME) {
@@ -2270,7 +2271,7 @@ done:
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5O_get_info() */
-
+
/*-------------------------------------------------------------------------
* Function: H5O__get_info_by_idx
*
@@ -2280,8 +2281,8 @@ done:
*
* Note: Add a parameter "fields" to indicate selection of object info.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
* Programmer: Quincey Koziol
* December 28, 2017
@@ -2293,10 +2294,10 @@ H5O__get_info_by_idx(const H5G_loc_t *loc, const char *group_name, H5_index_t id
H5_iter_order_t order, hsize_t n, H5O_info_t *oinfo, unsigned fields)
{
H5G_loc_t obj_loc; /* Location used to open group */
- H5G_name_t obj_path; /* Opened object group hier. path */
- H5O_loc_t obj_oloc; /* Opened object object location */
+ H5G_name_t obj_path; /* Opened object group hier. path */
+ H5O_loc_t obj_oloc; /* Opened object object location */
hbool_t loc_found = FALSE; /* Entry at 'name' found */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -2327,17 +2328,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__get_info_by_idx() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_get_create_plist
+ * Function: H5O_get_create_plist
*
- * Purpose: Retrieve the object creation properties for an object
+ * Purpose: Retrieve the object creation properties for an object
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Quincey Koziol
- * November 28 2006
+ * Programmer: Quincey Koziol
+ * November 28 2006
*
*-------------------------------------------------------------------------
*/
@@ -2382,17 +2383,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_get_create_plist() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_get_nlinks
+ * Function: H5O_get_nlinks
*
- * Purpose: Retrieve the number of link messages read in from the file
+ * Purpose: Retrieve the number of link messages read in from the file
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Quincey Koziol
- * March 11 2007
+ * Programmer: Quincey Koziol
+ * March 11 2007
*
*-------------------------------------------------------------------------
*/
@@ -2422,17 +2423,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_get_nlinks() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_obj_create
+ * Function: H5O_obj_create
*
- * Purpose: Creates an object, in an abstract manner.
+ * Purpose: Creates an object, in an abstract manner.
*
- * Return: Success: Pointer to object opened
- * Failure: NULL
+ * Return: Success: Pointer to object opened
+ * Failure: NULL
*
- * Programmer: Quincey Koziol
- * April 9 2007
+ * Programmer: Quincey Koziol
+ * April 9 2007
*
*-------------------------------------------------------------------------
*/
@@ -2453,7 +2454,7 @@ H5O_obj_create(H5F_t *f, H5O_type_t obj_type, void *crt_info, H5G_loc_t *obj_loc
/* Iterate through the object classes */
for(u = 0; u < NELMTS(H5O_obj_class_g); u++) {
/* Check for correct type of object to create */
- if(H5O_obj_class_g[u]->type == obj_type) {
+ if(H5O_obj_class_g[u]->type == obj_type) {
/* Call the object class's 'create' routine */
HDassert(H5O_obj_class_g[u]->create);
if(NULL == (ret_value = H5O_obj_class_g[u]->create(f, crt_info, obj_loc)))
@@ -2469,21 +2470,21 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_obj_create() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_get_oh_addr
+ * Function: H5O_get_oh_addr
*
- * Purpose: Retrieve the address of the object header
+ * Purpose: Retrieve the address of the object header
*
- * Note: This routine participates in the "Inlining C struct access"
- * pattern, don't call it directly, use the appropriate macro
- * defined in H5Oprivate.h.
+ * Note: This routine participates in the "Inlining C struct access"
+ * pattern, don't call it directly, use the appropriate macro
+ * defined in H5Oprivate.h.
*
- * Return: Success: Valid haddr_t
- * Failure: HADDR_UNDEF
+ * Return: Success: Valid haddr_t
+ * Failure: HADDR_UNDEF
*
- * Programmer: Quincey Koziol
- * March 15 2007
+ * Programmer: Quincey Koziol
+ * March 15 2007
*
*-------------------------------------------------------------------------
*/
@@ -2499,7 +2500,7 @@ H5O_get_oh_addr(const H5O_t *oh)
FUNC_LEAVE_NOAPI(oh->chunk[0].addr)
} /* end H5O_get_oh_addr() */
-
+
/*-------------------------------------------------------------------------
* Function: H5O_get_oh_flags
*
@@ -2516,7 +2517,7 @@ H5O_get_oh_flags(const H5O_t *oh)
FUNC_LEAVE_NOAPI(oh->flags); /* flags can be 0 */
} /* H5O_get_oh_flags() */
-
+
/*-------------------------------------------------------------------------
* Function: H5O_get_oh_mtime
*
@@ -2538,7 +2539,7 @@ H5O_get_oh_mtime(const H5O_t *oh)
FUNC_LEAVE_NOAPI(oh->mtime);
} /* H5O_get_oh_mtime() */
-
+
/*-------------------------------------------------------------------------
* Function: H5O_get_oh_version
*
@@ -2556,17 +2557,17 @@ H5O_get_oh_version(const H5O_t *oh)
FUNC_LEAVE_NOAPI(oh->version);
} /* H5O_get_oh_version() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_get_rc_and_type
+ * Function: H5O_get_rc_and_type
*
- * Purpose: Retrieve an object's reference count and type
+ * Purpose: Retrieve an object's reference count and type
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Quincey Koziol
- * November 4 2007
+ * Programmer: Quincey Koziol
+ * November 4 2007
*
*-------------------------------------------------------------------------
*/
@@ -2601,7 +2602,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_get_rc_and_type() */
-
+
/*-------------------------------------------------------------------------
* Function: H5O__free_visit_visited
*
@@ -2610,7 +2611,7 @@ done:
* Return: Non-negative on success, negative on failure
*
* Programmer: Quincey Koziol
- * Nov 25, 2007
+ * Nov 25, 2007
*
*-------------------------------------------------------------------------
*/
@@ -2624,17 +2625,17 @@ H5O__free_visit_visited(void *item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSE
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__free_visit_visited() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O__visit_cb
+ * Function: H5O__visit_cb
*
* Purpose: Callback function for recursively visiting objects from a group
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Quincey Koziol
- * Nov 25, 2007
+ * Programmer: Quincey Koziol
+ * Nov 25, 2007
*
*-------------------------------------------------------------------------
*/
@@ -2644,8 +2645,8 @@ H5O__visit_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info_t *li
{
H5O_iter_visit_ud_t *udata = (H5O_iter_visit_ud_t *)_udata; /* User data for callback */
H5G_loc_t obj_loc; /* Location of object */
- H5G_name_t obj_path; /* Object's group hier. path */
- H5O_loc_t obj_oloc; /* Object's object location */
+ H5G_name_t obj_path; /* Object's group hier. path */
+ H5O_loc_t obj_oloc; /* Object's object location */
hbool_t obj_found = FALSE; /* Object at 'name' found */
herr_t ret_value = H5_ITER_CONT; /* Return value */
@@ -2716,9 +2717,9 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__visit_cb() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O__visit
+ * Function: H5O__visit
*
* Purpose: Recursively visit an object and all the objects reachable
* from it. If the starting object is a group, all the objects
@@ -2739,14 +2740,14 @@ done:
* Note: Add a parameter "fields" to indicate selection of object info.
*
* Return: Success: The return value of the first operator that
- * returns non-zero, or zero if all members were
- * processed with no operator returning non-zero.
+ * returns non-zero, or zero if all members were
+ * processed with no operator returning non-zero.
*
* Failure: Negative if something goes wrong within the
- * library, or the negative value returned by one
- * of the operators.
+ * library, or the negative value returned by one
+ * of the operators.
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* November 24 2007
*
*-------------------------------------------------------------------------
@@ -2756,7 +2757,7 @@ H5O__visit(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
H5_iter_order_t order, H5O_iterate_t op, void *op_data, unsigned fields)
{
H5O_iter_visit_ud_t udata; /* User data for callback */
- H5G_loc_t loc; /* Location of reference object */
+ H5G_loc_t loc; /* Location of reference object */
H5G_loc_t obj_loc; /* Location used to open object */
H5G_name_t obj_path; /* Opened object group hier. path */
H5O_loc_t obj_oloc; /* Opened object object location */
@@ -2803,7 +2804,7 @@ H5O__visit(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
/* Check for object being a group */
if(oinfo.type == H5O_TYPE_GROUP) {
- H5G_loc_t start_loc; /* Location of starting group */
+ H5G_loc_t start_loc; /* Location of starting group */
/* Get the location of the starting group */
if(H5G_loc(obj_id, &start_loc) < 0)
@@ -2856,17 +2857,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__visit() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O__inc_rc
+ * Function: H5O__inc_rc
*
- * Purpose: Increments the reference count on an object header
+ * Purpose: Increments the reference count on an object header
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Jul 13 2008
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Jul 13 2008
*
*-------------------------------------------------------------------------
*/
@@ -2892,17 +2893,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__inc_rc() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O__dec_rc
+ * Function: H5O__dec_rc
*
- * Purpose: Decrements the reference count on an object header
+ * Purpose: Decrements the reference count on an object header
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Jul 13 2008
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Jul 13 2008
*
*-------------------------------------------------------------------------
*/
@@ -2928,7 +2929,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__dec_rc() */
-
+
/*-------------------------------------------------------------------------
* Function: H5O_dec_rc_by_loc
*
@@ -2971,16 +2972,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_dec_rc_by_loc() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_get_proxy
+ * Function: H5O_get_proxy
*
- * Purpose: Retrieve the proxy for the object header.
+ * Purpose: Retrieve the proxy for the object header.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * July 24 2016
+ * Programmer: Quincey Koziol
+ * July 24 2016
*
*-------------------------------------------------------------------------
*/
@@ -2995,24 +2996,24 @@ H5O_get_proxy(const H5O_t *oh)
FUNC_LEAVE_NOAPI(oh->proxy)
} /* end H5O_get_proxy() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O__free
+ * Function: H5O__free
*
- * Purpose: Destroys an object header.
+ * Purpose: Destroys an object header.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Jan 15 2003
+ * Programmer: Quincey Koziol
+ * koziol@ncsa.uiuc.edu
+ * Jan 15 2003
*
*-------------------------------------------------------------------------
*/
herr_t
H5O__free(H5O_t *oh)
{
- unsigned u; /* Local index variable */
+ unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
diff --git a/src/H5Rint.c b/src/H5Rint.c
index 4334faa..4056716 100644
--- a/src/H5Rint.c
+++ b/src/H5Rint.c
@@ -23,6 +23,7 @@
/***********/
#include "H5private.h" /* Generic Functions */
#include "H5ACprivate.h" /* Metadata cache */
+#include "H5CXprivate.h" /* API Contexts */
#include "H5Dprivate.h" /* Datasets */
#include "H5Eprivate.h" /* Error handling */
#include "H5Gprivate.h" /* Groups */
@@ -77,7 +78,7 @@ static const H5I_class_t H5I_REFERENCE_CLS[1] = {{
/* Flag indicating "top" of interface has been initialized */
static hbool_t H5R_top_package_initialize_s = FALSE;
-
+
/*--------------------------------------------------------------------------
NAME
H5R__init_package -- Initialize interface-specific information
@@ -108,7 +109,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5R__init_package() */
-
+
/*--------------------------------------------------------------------------
NAME
H5R_top_term_package
@@ -130,7 +131,7 @@ done:
int
H5R_top_term_package(void)
{
- int n = 0;
+ int n = 0;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -138,7 +139,7 @@ H5R_top_term_package(void)
if (H5I_nmembers(H5I_REFERENCE) > 0) {
(void)H5I_clear_type(H5I_REFERENCE, FALSE, FALSE);
n++;
- }
+ }
/* Mark closed */
if (0 == n)
@@ -148,7 +149,7 @@ H5R_top_term_package(void)
FUNC_LEAVE_NOAPI(n)
} /* end H5R_top_term_package() */
-
+
/*--------------------------------------------------------------------------
NAME
H5R_term_package
@@ -172,7 +173,7 @@ H5R_top_term_package(void)
int
H5R_term_package(void)
{
- int n = 0;
+ int n = 0;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -192,7 +193,7 @@ H5R_term_package(void)
FUNC_LEAVE_NOAPI(n)
} /* end H5R_term_package() */
-
+
/*--------------------------------------------------------------------------
NAME
H5R__create
@@ -224,9 +225,9 @@ herr_t
H5R__create(void *_ref, H5G_loc_t *loc, const char *name, H5R_type_t ref_type,
H5S_t *space)
{
- H5G_loc_t obj_loc; /* Group hier. location of object */
- H5G_name_t path; /* Object group hier. path */
- H5O_loc_t oloc; /* Object object location */
+ H5G_loc_t obj_loc; /* Group hier. location of object */
+ H5G_name_t path; /* Object group hier. path */
+ H5O_loc_t oloc; /* Object object location */
hbool_t obj_found = FALSE; /* Object location found */
herr_t ret_value = SUCCEED; /* Return value */
@@ -341,7 +342,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5R__create() */
-
+
/*--------------------------------------------------------------------------
NAME
H5R__dereference
@@ -380,7 +381,7 @@ H5R__dereference(H5F_t *file, hid_t oapl_id, H5R_type_t ref_type,
H5O_loc_t oloc; /* Object location */
H5G_name_t path; /* Path of object */
H5G_loc_t loc; /* Group location */
- unsigned rc; /* Reference count of object */
+ unsigned rc; /* Reference count of object */
H5O_type_t obj_type; /* Type of object */
hid_t ret_value = H5I_INVALID_HID; /* Return value */
@@ -510,7 +511,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5R__dereference() */
-
+
/*--------------------------------------------------------------------------
NAME
H5R__get_region
@@ -540,7 +541,7 @@ H5R__get_region(H5F_t *file, const void *_ref)
H5HG_t hobjid; /* Heap object ID */
uint8_t *buf = NULL; /* Buffer to store serialized selection in */
H5S_t *ds = NULL; /* Temporary pointer to dataspace */
- H5S_t *ret_value = NULL; /* Return value */
+ H5S_t *ret_value = NULL; /* Return value */
FUNC_ENTER_PACKAGE
@@ -587,7 +588,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5R__get_region() */
-
+
/*--------------------------------------------------------------------------
NAME
H5R__get_obj_type
@@ -598,7 +599,7 @@ done:
H5F_t *file; IN: File the object being dereferenced is within
H5R_type_t ref_type; IN: Type of reference to query
void *ref; IN: Reference to query.
- H5O_type_t *obj_type; OUT: The type of the object, set on success
+ H5O_type_t *obj_type; OUT: The type of the object, set on success
RETURNS
Non-negative on success/Negative on failure
@@ -615,7 +616,7 @@ H5R__get_obj_type(H5F_t *file, H5R_type_t ref_type, const void *_ref,
H5O_type_t *obj_type)
{
H5O_loc_t oloc; /* Object location */
- unsigned rc; /* Reference count of object */
+ unsigned rc; /* Reference count of object */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -676,7 +677,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5R__get_obj_type() */
-
+
/*--------------------------------------------------------------------------
NAME
H5R__get_name