summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-09-21 17:17:19 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-09-21 17:17:19 (GMT)
commitd8aa6761758bcaf29486b4ece50ebb761ca11c8e (patch)
tree21a2408718692aedfcc87569a0ca69aabe2792df /src
parent2862c93a2bd863a44ffe4e9664905090bc58f9ed (diff)
parentf03758613a6ec83e5ddd664590d162ccc888f13e (diff)
downloadhdf5-d8aa6761758bcaf29486b4ece50ebb761ca11c8e.zip
hdf5-d8aa6761758bcaf29486b4ece50ebb761ca11c8e.tar.gz
hdf5-d8aa6761758bcaf29486b4ece50ebb761ca11c8e.tar.bz2
Merging in latest from upstream (HDFFV/hdf5:refs/heads/develop)
* commit 'f03758613a6ec83e5ddd664590d162ccc888f13e': Snapshot version 1.11 release 2. Normalization with vol_integration (test code and H5Xtest.c)
Diffstat (limited to 'src')
-rw-r--r--src/H5ACprivate.h2
-rw-r--r--src/H5Atest.c34
-rw-r--r--src/H5Ctest.c2
-rw-r--r--src/H5Dtest.c8
-rw-r--r--src/H5EApkg.h4
-rw-r--r--src/H5EAtest.c16
-rw-r--r--src/H5Edeprec.c10
-rw-r--r--src/H5FApkg.h4
-rw-r--r--src/H5FAtest.c25
-rw-r--r--src/H5FDspace.c1
-rw-r--r--src/H5FSpkg.h4
-rw-r--r--src/H5FStest.c20
-rw-r--r--src/H5Fpkg.h10
-rw-r--r--src/H5Ftest.c105
-rw-r--r--src/H5Gpkg.h3
-rw-r--r--src/H5Gtest.c80
-rw-r--r--src/H5HLdbg.c46
-rw-r--r--src/H5Ipublic.h2
-rw-r--r--src/H5MF.c3
-rw-r--r--src/H5MFprivate.h3
-rw-r--r--src/H5Opkg.h19
-rw-r--r--src/H5Otest.c130
-rw-r--r--src/H5PBprivate.h6
-rw-r--r--src/H5Ppkg.h4
-rw-r--r--src/H5Ptest.c40
-rw-r--r--src/H5SMtest.c2
-rw-r--r--src/H5TS.c6
-rw-r--r--src/H5TSprivate.h1
-rw-r--r--src/H5public.h4
29 files changed, 286 insertions, 308 deletions
diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h
index 99cc0e9..0e8620d 100644
--- a/src/H5ACprivate.h
+++ b/src/H5ACprivate.h
@@ -435,7 +435,7 @@ H5_DLL herr_t H5AC_get_mdc_image_info(H5AC_t *cache_ptr, haddr_t *image_addr,
/* Tag & Ring routines */
H5_DLL void H5AC_tag(haddr_t metadata_tag, haddr_t *prev_tag);
H5_DLL herr_t H5AC_flush_tagged_metadata(H5F_t *f, haddr_t metadata_tag);
-H5_DLL herr_t H5AC_evict_tagged_metadata(H5F_t * f, haddr_t metadata_tag, hbool_t match_global);
+H5_DLL herr_t H5AC_evict_tagged_metadata(H5F_t *f, haddr_t metadata_tag, hbool_t match_global);
H5_DLL herr_t H5AC_retag_copied_metadata(const H5F_t *f, haddr_t metadata_tag);
H5_DLL herr_t H5AC_ignore_tags(const H5F_t *f);
H5_DLL herr_t H5AC_cork(H5F_t *f, haddr_t obj_addr, unsigned action, hbool_t *corked);
diff --git a/src/H5Atest.c b/src/H5Atest.c
index 31fbe8e..36c3d35 100644
--- a/src/H5Atest.c
+++ b/src/H5Atest.c
@@ -13,11 +13,9 @@
/*-------------------------------------------------------------------------
*
- * Created: H5Atest.c
- * Dec 18 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Created: H5Atest.c
*
- * Purpose: Attribute testing routines.
+ * Purpose: Attribute testing routines.
*
*-------------------------------------------------------------------------
*/
@@ -27,19 +25,19 @@
/****************/
#include "H5Amodule.h" /* This source code file is part of the H5A module */
-#define H5A_TESTING /*suppress warning about H5A testing funcs*/
+#define H5A_TESTING /* Suppress warning about H5A testing funcs */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Apkg.h" /* Attributes */
-#include "H5ACprivate.h" /* Metadata cache */
-#include "H5CXprivate.h" /* API Contexts */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Iprivate.h" /* IDs */
-#include "H5SMprivate.h" /* Shared object header messages */
+#include "H5private.h" /* Generic Functions */
+#include "H5Apkg.h" /* Attributes */
+#include "H5ACprivate.h" /* Metadata cache */
+#include "H5CXprivate.h" /* API Contexts */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Iprivate.h" /* IDs */
+#include "H5SMprivate.h" /* Shared object header messages */
/****************/
@@ -78,12 +76,11 @@
/*-------------------------------------------------------------------------
- * Function: H5A__is_shared_test
+ * Function: H5A__is_shared_test
*
* Purpose: Check if an attribute is shared
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: TRUE/FALSE/FAIL
*
* Programmer: Quincey Koziol
* Dec 19, 2006
@@ -111,12 +108,11 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5A__get_shared_rc_test
+ * Function: H5A__get_shared_rc_test
*
* Purpose: Retrieve the refcount for a shared attribute
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* Dec 19, 2006
@@ -127,7 +123,7 @@ herr_t
H5A__get_shared_rc_test(hid_t attr_id, hsize_t *ref_count)
{
H5A_t *attr; /* Attribute object for ID */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
diff --git a/src/H5Ctest.c b/src/H5Ctest.c
index 2cd0a5d..9da6350 100644
--- a/src/H5Ctest.c
+++ b/src/H5Ctest.c
@@ -143,7 +143,7 @@ H5C__verify_cork_tag_test(hid_t fid, haddr_t tag, hbool_t status)
/* Get file pointer */
if(NULL == (f = (H5F_t *)H5I_object_verify(fid, H5I_FILE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file")
/* Get cache pointer */
cache = f->shared->cache;
diff --git a/src/H5Dtest.c b/src/H5Dtest.c
index c2b6199..ac1d05a 100644
--- a/src/H5Dtest.c
+++ b/src/H5Dtest.c
@@ -28,10 +28,10 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Dpkg.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Iprivate.h" /* IDs */
+#include "H5private.h" /* Generic Functions */
+#include "H5Dpkg.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Iprivate.h" /* IDs */
/****************/
diff --git a/src/H5EApkg.h b/src/H5EApkg.h
index fb9afc0..0adcde2 100644
--- a/src/H5EApkg.h
+++ b/src/H5EApkg.h
@@ -469,8 +469,8 @@ H5_DLL herr_t H5EA__dblock_debug(H5F_t *f, haddr_t addr,
/* Testing routines */
#ifdef H5EA_TESTING
-H5_DLL herr_t H5EA_get_cparam_test(const H5EA_t *ea, H5EA_create_t *cparam);
-H5_DLL int H5EA_cmp_cparam_test(const H5EA_create_t *cparam1, const H5EA_create_t *cparam2);
+H5_DLL herr_t H5EA__get_cparam_test(const H5EA_t *ea, H5EA_create_t *cparam);
+H5_DLL int H5EA__cmp_cparam_test(const H5EA_create_t *cparam1, const H5EA_create_t *cparam2);
#endif /* H5EA_TESTING */
#endif /* _H5EApkg_H */
diff --git a/src/H5EAtest.c b/src/H5EAtest.c
index 3da7996..7c02e16 100644
--- a/src/H5EAtest.c
+++ b/src/H5EAtest.c
@@ -401,7 +401,7 @@ END_FUNC(STATIC) /* end H5EA__test_dst_dbg_context() */
/*-------------------------------------------------------------------------
- * Function: H5EA_get_cparam_test
+ * Function: H5EA__get_cparam_test
*
* Purpose: Retrieve the parameters used to create the extensible array
*
@@ -413,9 +413,9 @@ END_FUNC(STATIC) /* end H5EA__test_dst_dbg_context() */
*
*-------------------------------------------------------------------------
*/
-BEGIN_FUNC(PRIV, NOERR,
+BEGIN_FUNC(PKG, NOERR,
herr_t, SUCCEED, -,
-H5EA_get_cparam_test(const H5EA_t *ea, H5EA_create_t *cparam))
+H5EA__get_cparam_test(const H5EA_t *ea, H5EA_create_t *cparam))
/* Check arguments. */
HDassert(ea);
@@ -429,11 +429,11 @@ H5EA_get_cparam_test(const H5EA_t *ea, H5EA_create_t *cparam))
cparam->data_blk_min_elmts = ea->hdr->cparam.data_blk_min_elmts;
cparam->max_dblk_page_nelmts_bits = ea->hdr->cparam.max_dblk_page_nelmts_bits;
-END_FUNC(PRIV) /* end H5EA_get_cparam_test() */
+END_FUNC(PKG) /* end H5EA__get_cparam_test() */
/*-------------------------------------------------------------------------
- * Function: H5EA_cmp_cparam_test
+ * Function: H5EA__cmp_cparam_test
*
* Purpose: Compare the parameters used to create the extensible array
*
@@ -445,9 +445,9 @@ END_FUNC(PRIV) /* end H5EA_get_cparam_test() */
*
*-------------------------------------------------------------------------
*/
-BEGIN_FUNC(PRIV, ERRCATCH,
+BEGIN_FUNC(PKG, ERRCATCH,
int, 0, -,
-H5EA_cmp_cparam_test(const H5EA_create_t *cparam1, const H5EA_create_t *cparam2))
+H5EA__cmp_cparam_test(const H5EA_create_t *cparam1, const H5EA_create_t *cparam2))
/* Check arguments. */
HDassert(cparam1);
@@ -481,5 +481,5 @@ H5EA_cmp_cparam_test(const H5EA_create_t *cparam1, const H5EA_create_t *cparam2)
CATCH
-END_FUNC(PRIV) /* end H5EA_cmp_cparam_test() */
+END_FUNC(PKG) /* end H5EA__cmp_cparam_test() */
diff --git a/src/H5Edeprec.c b/src/H5Edeprec.c
index 603d448..4462303 100644
--- a/src/H5Edeprec.c
+++ b/src/H5Edeprec.c
@@ -227,7 +227,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5Eclear1
*
- * Purpose: This function is for backward compatbility.
+ * Purpose: This function is for backward compatibility.
* Clears the error stack for the specified error stack.
*
* Return: SUCCEED/FAIL
@@ -258,7 +258,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5Eprint1
*
- * Purpose: This function is for backward compatbility.
+ * Purpose: This function is for backward compatibility.
* Prints the error stack in some default way. This is just a
* convenience function for H5Ewalk() with a function that
* prints error messages. Users are encouraged to write there
@@ -296,7 +296,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5Ewalk1
*
- * Purpose: This function is for backward compatbility.
+ * Purpose: This function is for backward compatibility.
* Walks the error stack for the current thread and calls some
* function for each error along the way.
*
@@ -335,7 +335,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5Eget_auto1
*
- * Purpose: This function is for backward compatbility.
+ * Purpose: This function is for backward compatibility.
* Returns the current settings for the automatic error stack
* traversal function and its data for specific error stack.
* Either (or both) arguments may be null in which case the
@@ -381,7 +381,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5Eset_auto1
*
- * Purpose: This function is for backward compatbility.
+ * Purpose: This function is for backward compatibility.
* Turns on or off automatic printing of errors for certain
* error stack. When turned on (non-null FUNC pointer) any
* API function which returns an error indication will first
diff --git a/src/H5FApkg.h b/src/H5FApkg.h
index 720c046..6ce899e 100644
--- a/src/H5FApkg.h
+++ b/src/H5FApkg.h
@@ -307,8 +307,8 @@ H5_DLL herr_t H5FA__dblock_debug(H5F_t *f, haddr_t addr, FILE *stream,
/* Testing routines */
#ifdef H5FA_TESTING
-H5_DLL herr_t H5FA_get_cparam_test(const H5FA_t *ea, H5FA_create_t *cparam);
-H5_DLL int H5FA_cmp_cparam_test(const H5FA_create_t *cparam1, const H5FA_create_t *cparam2);
+H5_DLL herr_t H5FA__get_cparam_test(const H5FA_t *ea, H5FA_create_t *cparam);
+H5_DLL int H5FA__cmp_cparam_test(const H5FA_create_t *cparam1, const H5FA_create_t *cparam2);
#endif /* H5FA_TESTING */
#endif /* _H5FApkg_H */
diff --git a/src/H5FAtest.c b/src/H5FAtest.c
index 4b03036..27cd8b7 100644
--- a/src/H5FAtest.c
+++ b/src/H5FAtest.c
@@ -70,12 +70,9 @@ typedef struct H5FA__test_ctx_t {
static void *H5FA__test_crt_context(void *udata);
static herr_t H5FA__test_dst_context(void *ctx);
static herr_t H5FA__test_fill(void *nat_blk, size_t nelmts);
-static herr_t H5FA__test_encode(void *raw, const void *elmt, size_t nelmts,
- void *ctx);
-static herr_t H5FA__test_decode(const void *raw, void *elmt, size_t nelmts,
- void *ctx);
-static herr_t H5FA__test_debug(FILE *stream, int indent, int fwidth,
- hsize_t idx, const void *elmt);
+static herr_t H5FA__test_encode(void *raw, const void *elmt, size_t nelmts, void *ctx);
+static herr_t H5FA__test_decode(const void *raw, void *elmt, size_t nelmts, void *ctx);
+static herr_t H5FA__test_debug(FILE *stream, int indent, int fwidth, hsize_t idx, const void *elmt);
static void *H5FA__test_crt_dbg_context(H5F_t *f, haddr_t obj_addr);
@@ -361,7 +358,7 @@ END_FUNC(STATIC) /* end H5FA__test_crt_dbg_context() */
/*-------------------------------------------------------------------------
- * Function: H5FA_get_cparam_test
+ * Function: H5FA__get_cparam_test
*
* Purpose: Retrieve the parameters used to create the fixed array
*
@@ -372,9 +369,9 @@ END_FUNC(STATIC) /* end H5FA__test_crt_dbg_context() */
*
*-------------------------------------------------------------------------
*/
-BEGIN_FUNC(PRIV, NOERR,
+BEGIN_FUNC(PKG, NOERR,
herr_t, SUCCEED, -,
-H5FA_get_cparam_test(const H5FA_t *fa, H5FA_create_t *cparam))
+H5FA__get_cparam_test(const H5FA_t *fa, H5FA_create_t *cparam))
/* Check arguments. */
HDassert(fa);
@@ -384,11 +381,11 @@ H5FA_get_cparam_test(const H5FA_t *fa, H5FA_create_t *cparam))
cparam->raw_elmt_size = fa->hdr->cparam.raw_elmt_size;
cparam->nelmts = fa->hdr->cparam.nelmts;
-END_FUNC(PRIV) /* end H5FA_get_cparam_test() */
+END_FUNC(PKG) /* end H5FA__get_cparam_test() */
/*-------------------------------------------------------------------------
- * Function: H5FA_cmp_cparam_test
+ * Function: H5FA__cmp_cparam_test
*
* Purpose: Compare the parameters used to create the fixed array
*
@@ -399,9 +396,9 @@ END_FUNC(PRIV) /* end H5FA_get_cparam_test() */
*
*-------------------------------------------------------------------------
*/
-BEGIN_FUNC(PRIV, ERRCATCH,
+BEGIN_FUNC(PKG, ERRCATCH,
int, 0, -,
-H5FA_cmp_cparam_test(const H5FA_create_t *cparam1, const H5FA_create_t *cparam2))
+H5FA__cmp_cparam_test(const H5FA_create_t *cparam1, const H5FA_create_t *cparam2))
/* Check arguments. */
HDassert(cparam1);
@@ -415,5 +412,5 @@ H5FA_cmp_cparam_test(const H5FA_create_t *cparam1, const H5FA_create_t *cparam2)
CATCH
-END_FUNC(PRIV) /* end H5FA_cmp_cparam_test() */
+END_FUNC(PKG) /* end H5FA__cmp_cparam_test() */
diff --git a/src/H5FDspace.c b/src/H5FDspace.c
index e158a44..69fcb96 100644
--- a/src/H5FDspace.c
+++ b/src/H5FDspace.c
@@ -38,6 +38,7 @@
#include "H5Fprivate.h" /* File access */
#include "H5FDpkg.h" /* File Drivers */
#include "H5FDmulti.h" /* Usage-partitioned file family */
+#include "H5FLprivate.h" /* Free lists */
/****************/
diff --git a/src/H5FSpkg.h b/src/H5FSpkg.h
index a5896ee..f160055 100644
--- a/src/H5FSpkg.h
+++ b/src/H5FSpkg.h
@@ -242,8 +242,8 @@ H5_DLL void H5FS__sect_assert(const H5FS_t *fspace);
/* Testing routines */
#ifdef H5FS_TESTING
-H5_DLL herr_t H5FS_get_cparam_test(const H5FS_t *fh, H5FS_create_t *cparam);
-H5_DLL int H5FS_cmp_cparam_test(const H5FS_create_t *cparam1, const H5FS_create_t *cparam2);
+H5_DLL herr_t H5FS__get_cparam_test(const H5FS_t *fh, H5FS_create_t *cparam);
+H5_DLL int H5FS__cmp_cparam_test(const H5FS_create_t *cparam1, const H5FS_create_t *cparam2);
#endif /* H5FS_TESTING */
#endif /* _H5FSpkg_H */
diff --git a/src/H5FStest.c b/src/H5FStest.c
index 5ab0219..120a9a8 100644
--- a/src/H5FStest.c
+++ b/src/H5FStest.c
@@ -69,7 +69,7 @@
/*-------------------------------------------------------------------------
- * Function: H5FS_get_cparam_test
+ * Function: H5FS__get_cparam_test
*
* Purpose: Retrieve the parameters used to create the free-space manager
* similar to H5HF_get_cparam_test()
@@ -82,9 +82,9 @@
*-------------------------------------------------------------------------
*/
herr_t
-H5FS_get_cparam_test(const H5FS_t *frsp, H5FS_create_t *cparam)
+H5FS__get_cparam_test(const H5FS_t *frsp, H5FS_create_t *cparam)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
HDassert(frsp);
@@ -97,16 +97,16 @@ H5FS_get_cparam_test(const H5FS_t *frsp, H5FS_create_t *cparam)
cparam->max_sect_size = frsp->max_sect_size;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* H5FS_get_cparam_test() */
+} /* H5FS__get_cparam_test() */
/*-------------------------------------------------------------------------
- * Function: H5FS_cmp_cparam_test
+ * Function: H5FS__cmp_cparam_test
*
* Purpose: Compare the parameters used to create the free space manager
* similar to H5HF_cmp_cparam_test()
*
- * Return: SUCCEED/FAIL
+ * Return: A value like strcmp()
*
* Programmer: Vailin Choi
* August 25th, 2008
@@ -114,11 +114,11 @@ H5FS_get_cparam_test(const H5FS_t *frsp, H5FS_create_t *cparam)
*-------------------------------------------------------------------------
*/
int
-H5FS_cmp_cparam_test(const H5FS_create_t *cparam1, const H5FS_create_t *cparam2)
+H5FS__cmp_cparam_test(const H5FS_create_t *cparam1, const H5FS_create_t *cparam2)
{
- int ret_value = SUCCEED; /* Return value */
+ int ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments. */
HDassert(cparam1);
@@ -151,5 +151,5 @@ H5FS_cmp_cparam_test(const H5FS_create_t *cparam1, const H5FS_create_t *cparam2)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5FS_cmp_cparam_test */
+} /* H5FS__cmp_cparam_test */
diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h
index 2e8a793..3716c66 100644
--- a/src/H5Fpkg.h
+++ b/src/H5Fpkg.h
@@ -30,7 +30,7 @@
#include "H5Fprivate.h"
/* Other public headers needed by this file */
-#include "H5Bpublic.h" /* B-tree header, for H5B_NUM_BTREE_ID */
+#include "H5Bpublic.h" /* B-tree header (for H5B_NUM_BTREE_ID) */
/* Other private headers needed by this file */
#include "H5private.h" /* Generic Functions */
@@ -462,10 +462,10 @@ H5_DLL herr_t H5F__evict_cache_entries(H5F_t *f);
/* Testing functions */
#ifdef H5F_TESTING
-H5_DLL herr_t H5F_get_sohm_mesg_count_test(hid_t fid, unsigned type_id, size_t *mesg_count);
-H5_DLL herr_t H5F_check_cached_stab_test(hid_t file_id);
-H5_DLL herr_t H5F_get_maxaddr_test(hid_t file_id, haddr_t *maxaddr);
-H5_DLL herr_t H5F_get_sbe_addr_test(hid_t file_id, haddr_t *sbe_addr);
+H5_DLL herr_t H5F__get_sohm_mesg_count_test(hid_t fid, unsigned type_id, size_t *mesg_count);
+H5_DLL herr_t H5F__check_cached_stab_test(hid_t file_id);
+H5_DLL herr_t H5F__get_maxaddr_test(hid_t file_id, haddr_t *maxaddr);
+H5_DLL herr_t H5F__get_sbe_addr_test(hid_t file_id, haddr_t *sbe_addr);
#endif /* H5F_TESTING */
#endif /* _H5Fpkg_H */
diff --git a/src/H5Ftest.c b/src/H5Ftest.c
index bdecad2..df9c933 100644
--- a/src/H5Ftest.c
+++ b/src/H5Ftest.c
@@ -26,24 +26,24 @@
/* Module Setup */
/****************/
-#include "H5Fmodule.h" /* This source code file is part of the H5F module */
-#define H5F_TESTING /*suppress warning about H5F testing funcs*/
-#define H5G_FRIEND /*suppress error about including H5Gpkg */
-#define H5G_TESTING /*suppress warning about H5G testing funcs*/
-#define H5SM_FRIEND /*suppress error about including H5SMpkg */
-#define H5SM_TESTING /*suppress warning about H5SM testing funcs*/
+#include "H5Fmodule.h" /* This source code file is part of the H5F module */
+#define H5F_TESTING /* Suppress warning about H5F testing funcs */
+#define H5G_FRIEND /* Suppress error about including H5Gpkg.h */
+#define H5G_TESTING /* Suppress warning about H5G testing funcs */
+#define H5SM_FRIEND /* Suppress error about including H5SMpkg.h */
+#define H5SM_TESTING /* Suppress warning about H5SM testing funcs */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5CXprivate.h" /* API Contexts */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
-#include "H5Gpkg.h" /* Groups */
-#include "H5Iprivate.h" /* IDs */
-#include "H5SMpkg.h" /* Shared object header messages */
+#include "H5private.h" /* Generic Functions */
+#include "H5CXprivate.h" /* API Contexts */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fpkg.h" /* File access */
+#include "H5Gpkg.h" /* Groups */
+#include "H5Iprivate.h" /* IDs */
+#include "H5SMpkg.h" /* Shared object header messages */
/****************/
@@ -82,31 +82,29 @@
/*-------------------------------------------------------------------------
- * Function: H5F_get_sohm_mesg_count_test
+ * Function: H5F__get_sohm_mesg_count_test
*
* Purpose: Retrieve the number of shared messages of a given type in a file
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * Jan 3, 2007
+ * Programmer: Quincey Koziol
+ * Jan 3, 2007
*
*-------------------------------------------------------------------------
*/
herr_t
-H5F_get_sohm_mesg_count_test(hid_t file_id, unsigned type_id,
- size_t *mesg_count)
+H5F__get_sohm_mesg_count_test(hid_t file_id, unsigned type_id, size_t *mesg_count)
{
- H5F_t *file; /* File info */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5F_t *file; /* File info */
+ hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/* Check arguments */
if(NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file")
/* Push API context */
if(H5CX_push() < 0)
@@ -122,19 +120,18 @@ done:
HDONE_ERROR(H5E_FILE, H5E_CANTRESET, FAIL, "can't reset API context")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5F_get_sohm_mesg_count_test() */
+} /* end H5F__get_sohm_mesg_count_test() */
/*-------------------------------------------------------------------------
- * Function: H5F_check_cached_stab_test
+ * Function: H5F__check_cached_stab_test
*
* Purpose: Check that a file's superblock contains a cached symbol
* table entry, that the entry matches that in the root
* group's object header, and check that the addresses are
* valid.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
* Programmer: Neil Fortner
* Mar 31, 2009
@@ -142,17 +139,17 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5F_check_cached_stab_test(hid_t file_id)
+H5F__check_cached_stab_test(hid_t file_id)
{
- H5F_t *file; /* File info */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5F_t *file; /* File info */
+ hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/* Check arguments */
if(NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file")
/* Push API context */
if(H5CX_push() < 0)
@@ -168,16 +165,15 @@ done:
HDONE_ERROR(H5E_FILE, H5E_CANTRESET, FAIL, "can't reset API context")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5F_check_cached_stab_test() */
+} /* end H5F__check_cached_stab_test() */
/*-------------------------------------------------------------------------
- * Function: H5F_get_maxaddr_test
+ * Function: H5F__get_maxaddr_test
*
* Purpose: Retrieve the maximum address for a file
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* Jun 10, 2009
@@ -185,33 +181,32 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5F_get_maxaddr_test(hid_t file_id, haddr_t *maxaddr)
+H5F__get_maxaddr_test(hid_t file_id, haddr_t *maxaddr)
{
- H5F_t *file; /* File info */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5F_t *file; /* File info */
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/* Check arguments */
if(NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file")
/* Retrieve maxaddr for file */
*maxaddr = file->shared->maxaddr;
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5F_get_maxaddr_test() */
+} /* end H5F__get_maxaddr_test() */
/*-------------------------------------------------------------------------
- * Function: H5F_get_sbe_addr_test
+ * Function: H5F__get_sbe_addr_test
*
* Purpose: Retrieve the address of a superblock extension's object header
- * for a file
+ * for a file
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* Jul 10, 2016
@@ -219,21 +214,21 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5F_get_sbe_addr_test(hid_t file_id, haddr_t *sbe_addr)
+H5F__get_sbe_addr_test(hid_t file_id, haddr_t *sbe_addr)
{
- H5F_t *file; /* File info */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5F_t *file; /* File info */
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/* Check arguments */
if(NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file")
/* Retrieve maxaddr for file */
*sbe_addr = file->shared->sblock->ext_addr;
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5F_get_sbe_addr_test() */
+} /* end H5F__get_sbe_addr_test() */
diff --git a/src/H5Gpkg.h b/src/H5Gpkg.h
index b89777d..ae697ad 100644
--- a/src/H5Gpkg.h
+++ b/src/H5Gpkg.h
@@ -429,8 +429,7 @@ H5_DLL herr_t H5G__link_sort_table(H5G_link_table_t *ltable, H5_index_t idx_type
H5_DLL herr_t H5G__link_iterate_table(const H5G_link_table_t *ltable,
hsize_t skip, hsize_t *last_lnk, const H5G_lib_iterate_t op, void *op_data);
H5_DLL herr_t H5G__link_release_table(H5G_link_table_t *ltable);
-H5_DLL herr_t H5G__link_name_replace(H5F_t *file, H5RS_str_t *grp_full_path_r,
- const H5O_link_t *lnk);
+H5_DLL herr_t H5G__link_name_replace(H5F_t *file, H5RS_str_t *grp_full_path_r, const H5O_link_t *lnk);
/* Functions that understand "compact" link storage */
H5_DLL herr_t H5G__compact_insert(const H5O_loc_t *grp_oloc, H5O_link_t *obj_lnk);
diff --git a/src/H5Gtest.c b/src/H5Gtest.c
index f2f3e3a..1899606 100644
--- a/src/H5Gtest.c
+++ b/src/H5Gtest.c
@@ -28,13 +28,13 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5CXprivate.h" /* API Contexts */
-#include "H5Dprivate.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Gpkg.h" /* Groups */
-#include "H5HLprivate.h" /* Local Heaps */
-#include "H5Iprivate.h" /* IDs */
+#include "H5private.h" /* Generic Functions */
+#include "H5CXprivate.h" /* API Contexts */
+#include "H5Dprivate.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Gpkg.h" /* Groups */
+#include "H5HLprivate.h" /* Local Heaps */
+#include "H5Iprivate.h" /* IDs */
/****************/
/* Local Macros */
@@ -80,7 +80,7 @@
htri_t H5G__is_empty_test(gid)
hid_t gid; IN: group to check
RETURNS
- Non-negative TRUE/FALSE on success, negative on failure
+ TRUE/FALSE on success, FAIL on failure
DESCRIPTION
Checks to see if the group has no link messages and no symbol table message
and no "dense" link storage
@@ -114,7 +114,7 @@ H5G__is_empty_test(hid_t gid)
/* Check if the group has any link messages */
if((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_LINK_ID)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
if(msg_exists > 0) {
/* Sanity check that new group format shouldn't have old messages */
if((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_STAB_ID)) < 0)
@@ -127,7 +127,7 @@ H5G__is_empty_test(hid_t gid)
/* Check for a link info message */
if((linfo_exists = H5O_msg_exists(&(grp->oloc), H5O_LINFO_ID)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
if(linfo_exists > 0) {
H5O_linfo_t linfo; /* Link info message */
@@ -158,7 +158,7 @@ H5G__is_empty_test(hid_t gid)
/* Check if the group has a symbol table message */
if((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_STAB_ID)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
if(msg_exists > 0) {
H5O_stab_t stab; /* Info about local heap & B-tree */
hsize_t nlinks; /* Number of links in the group */
@@ -202,7 +202,7 @@ done:
hid_t gid; IN: group to check
unsigned *nmsgs; OUT: # of link messages in header
RETURNS
- Non-negative TRUE/FALSE on success, negative on failure
+ TRUE/FALSE on success, FAIL on failure
DESCRIPTION
Checks to see if the group has link messages and how many.
GLOBAL VARIABLES
@@ -232,15 +232,15 @@ H5G__has_links_test(hid_t gid, unsigned *nmsgs)
/* Check if the group has any link messages */
if((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_LINK_ID)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
if(msg_exists == 0)
HGOTO_DONE(FALSE)
/* Check if the group has a symbol table message */
if((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_STAB_ID)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
if(msg_exists > 0)
- HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "both symbol table and link messages found")
+ HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "both symbol table and link messages found")
/* Check if we should retrieve the number of link messages */
if(nmsgs) {
@@ -269,7 +269,7 @@ done:
htri_t H5G__has_stab_test(gid)
hid_t gid; IN: group to check
RETURNS
- Non-negative TRUE/FALSE on success, negative on failure
+ TRUE/FALSE on success, FAIL on failure
DESCRIPTION
Checks to see if the group has a symbol table message.
GLOBAL VARIABLES
@@ -299,15 +299,15 @@ H5G__has_stab_test(hid_t gid)
/* Check if the group has a symbol table message */
if((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_STAB_ID)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
if(msg_exists == 0)
HGOTO_DONE(FALSE)
/* Check if the group has any link messages */
if((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_LINK_ID)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
if(msg_exists > 0)
- HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "both symbol table and link messages found")
+ HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "both symbol table and link messages found")
done:
if(api_ctx_pushed && H5CX_pop() < 0)
@@ -326,7 +326,7 @@ done:
htri_t H5G__is_new_dense_test(gid)
hid_t gid; IN: group to check
RETURNS
- Non-negative TRUE/FALSE on success, negative on failure
+ TRUE/FALSE on success, FAIL on failure
DESCRIPTION
Checks to see if the group is in the "new" format for groups (link messages/
fractal heap+v2 B-tree) and if it is in "dense" storage form (ie. it has
@@ -358,19 +358,19 @@ H5G__is_new_dense_test(hid_t gid)
/* Check if the group has a symbol table message */
if((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_STAB_ID)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
if(msg_exists > 0)
HGOTO_DONE(FALSE)
/* Check if the group has any link messages */
if((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_LINK_ID)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
if(msg_exists > 0)
HGOTO_DONE(FALSE)
/* Check if the group has link info message */
if((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_LINFO_ID)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
if(msg_exists > 0) {
H5O_linfo_t linfo; /* Link info message */
@@ -404,7 +404,7 @@ done:
hsize_t *name_count; OUT: Number of links in name index
hsize_t *corder_count; OUT: Number of links in creation order index
RETURNS
- Non-negative on success, negative on failure
+ SUCCEED/FAIL
DESCRIPTION
Currently, just retrieves the number of links in each index and returns
them.
@@ -495,7 +495,7 @@ done:
hid_t gid; IN: group to check
size_t *lheap_size; OUT: Size of local heap
RETURNS
- Non-negative on success, negative on failure
+ SUCCEED/FAIL
DESCRIPTION
Checks the size of the local heap for a group
GLOBAL VARIABLES
@@ -525,11 +525,11 @@ H5G__lheap_size_test(hid_t gid, size_t *lheap_size)
/* Make certain the group has a symbol table message */
if(NULL == H5O_msg_read(&(grp->oloc), H5O_STAB_ID, &stab))
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read symbol table message")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read symbol table message")
/* Check the size of the local heap for the group */
if(H5HL_get_size(grp->oloc.file, stab.heap_addr, lheap_size) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTGETSIZE, FAIL, "can't query local heap size")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGETSIZE, FAIL, "can't query local heap size")
done:
if(api_ctx_pushed && H5CX_pop() < 0)
@@ -551,7 +551,7 @@ done:
size_t *user_path_len; OUT: Size of user path
unsigned *obj_hidden; OUT: Whether object is hidden
RETURNS
- Non-negative on success, negative on failure
+ SUCCEED/FAIL
DESCRIPTION
Retrieves the user path for an ID. A zero for the length is returned in
the case of no user path.
@@ -648,15 +648,14 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G__verify_cached_stab_test
+ * Function: H5G__verify_cached_stab_test
*
* Purpose: Check that a that the provided group entry contains a
* cached symbol table entry, that the entry matches that in
* the provided group's object header, and check that the
* addresses are valid.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
* Programmer: Neil Fortner
* Mar 31, 2009
@@ -666,9 +665,9 @@ done:
herr_t
H5G__verify_cached_stab_test(H5O_loc_t *grp_oloc, H5G_entry_t *ent)
{
- H5O_stab_t stab; /* Symbol table */
- H5HL_t *heap = NULL; /* Pointer to local heap */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5O_stab_t stab; /* Symbol table */
+ H5HL_t *heap = NULL; /* Pointer to local heap */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE_TAG(grp_oloc->addr)
@@ -681,7 +680,8 @@ H5G__verify_cached_stab_test(H5O_loc_t *grp_oloc, H5G_entry_t *ent)
HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "unable to read symbol table message")
/* Verify that the cached symbol table info matches the symbol table message
- * in the object header */
+ * in the object header.
+ */
if((ent->cache.stab.btree_addr != stab.btree_addr)
|| (ent->cache.stab.heap_addr != stab.heap_addr))
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "cached stab info does not match object header")
@@ -711,7 +711,7 @@ done:
* group with a symbol table, and that that information is
* correct.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: H5_ITER_STOP/H5_ITER_CONT/H5_ITER_ERROR
*
* Programmer: Neil Fortner
* Apr 8, 2011
@@ -732,9 +732,7 @@ H5G__verify_cached_stabs_test_cb(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key,
FUNC_ENTER_STATIC
- /*
- * Check arguments.
- */
+ /* Check arguments */
HDassert(f);
HDassert(H5F_addr_defined(addr));
@@ -749,7 +747,7 @@ H5G__verify_cached_stabs_test_cb(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key,
targ_oloc.holding_file = FALSE;
/* Iterate over entries */
- for(i=0; i<sn->nsyms; i++) {
+ for(i = 0; i < sn->nsyms; i++) {
/* Update oloc address */
targ_oloc.addr = sn->entry[i].header;
@@ -773,7 +771,7 @@ H5G__verify_cached_stabs_test_cb(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key,
if((sn->entry[i].cache.stab.btree_addr != stab.btree_addr)
|| (sn->entry[i].cache.stab.heap_addr != stab.heap_addr))
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, H5_ITER_ERROR, "cached symbol table information is incorrect")
- } /* end if */
+ }
else if(sn->entry[i].type == H5G_CACHED_STAB)
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, H5_ITER_ERROR, "nonexistent STAB message is cached")
diff --git a/src/H5HLdbg.c b/src/H5HLdbg.c
index e4e6fa8..edb0261 100644
--- a/src/H5HLdbg.c
+++ b/src/H5HLdbg.c
@@ -76,10 +76,10 @@ H5HL_debug(H5F_t *f, haddr_t addr, FILE * stream, int indent, int fwidth))
"Data bytes allocated for heap:",
h->dblk_size);
- /*
- * Traverse the free list and check that all free blocks fall within
+ /* Traverse the free list and check that all free blocks fall within
* the heap and that no two free blocks point to the same region of
- * the heap. */
+ * the heap.
+ */
if(NULL == (marker = (uint8_t *)H5MM_calloc(h->dblk_size)))
H5E_THROW(H5E_CANTALLOC, "memory allocation failed");
@@ -88,35 +88,30 @@ H5HL_debug(H5F_t *f, haddr_t addr, FILE * stream, int indent, int fwidth))
char temp_str[32];
HDsnprintf(temp_str, sizeof(temp_str), "Block #%d:", free_block);
- HDfprintf(stream, "%*s%-*s %8Zu, %8Zu\n", indent+3, "", MAX(0,fwidth-9),
- temp_str,
- freelist->offset, freelist->size);
- if((freelist->offset + freelist->size) > h->dblk_size)
- HDfprintf(stream, "***THAT FREE BLOCK IS OUT OF BOUNDS!\n");
- else {
+ HDfprintf(stream, "%*s%-*s %8Zu, %8Zu\n", indent+3, "", MAX(0,fwidth-9), temp_str, freelist->offset, freelist->size);
+ if((freelist->offset + freelist->size) > h->dblk_size)
+ HDfprintf(stream, "***THAT FREE BLOCK IS OUT OF BOUNDS!\n");
+ else {
int overlap = 0;
size_t i;
- for(i = 0; i < freelist->size; i++) {
- if(marker[freelist->offset + i])
- overlap++;
- marker[freelist->offset + i] = 1;
- } /* end for */
- if(overlap)
- HDfprintf(stream, "***THAT FREE BLOCK OVERLAPPED A PREVIOUS ONE!\n");
- else
- amount_free += freelist->size;
- } /* end for */
+ for(i = 0; i < freelist->size; i++) {
+ if(marker[freelist->offset + i])
+ overlap++;
+ marker[freelist->offset + i] = 1;
+ } /* end for */
+ if(overlap)
+ HDfprintf(stream, "***THAT FREE BLOCK OVERLAPPED A PREVIOUS ONE!\n");
+ else
+ amount_free += freelist->size;
+ } /* end else */
} /* end for */
if(h->dblk_size)
- HDfprintf(stream, "%*s%-*s %.2f%%\n", indent, "", fwidth,
- "Percent of heap used:",
- ((double)100.0f * (double)(h->dblk_size - amount_free) / (double)h->dblk_size));
+ HDfprintf(stream, "%*s%-*s %.2f%%\n", indent, "", fwidth, "Percent of heap used:",
+ ((double)100.0f * (double)(h->dblk_size - amount_free) / (double)h->dblk_size));
- /*
- * Print the data in a VMS-style octal dump.
- */
+ /* Print the data in a VMS-style octal dump */
H5_buffer_dump(stream, indent, h->dblk_image, marker, (size_t)0, h->dblk_size);
CATCH
@@ -127,3 +122,4 @@ CATCH
H5E_THROW(H5E_CANTFREE, "can't free marker buffer");
END_FUNC(PRIV) /* end H5HL_debug() */
+
diff --git a/src/H5Ipublic.h b/src/H5Ipublic.h
index c737bbe..c471e5a 100644
--- a/src/H5Ipublic.h
+++ b/src/H5Ipublic.h
@@ -66,7 +66,7 @@ typedef int64_t hid_t;
* can be removed from the ID type. If the function returns negative
* (failure) then the object will remain in the ID type.
*/
-typedef herr_t (*H5I_free_t)(void*);
+typedef herr_t (*H5I_free_t)(void *);
/* Type of the function to compare objects & keys */
typedef int (*H5I_search_func_t)(void *obj, hid_t id, void *key);
diff --git a/src/H5MF.c b/src/H5MF.c
index 65b27db..0d368d4 100644
--- a/src/H5MF.c
+++ b/src/H5MF.c
@@ -2291,6 +2291,7 @@ H5MF_get_freespace(H5F_t *f, hsize_t *tot_space, hsize_t *meta_size)
needed_ring = H5AC_RING_MDFSM;
else
needed_ring = H5AC_RING_RDFSM;
+
if(needed_ring != curr_ring) {
H5AC_set_ring(needed_ring, NULL);
curr_ring = needed_ring;
@@ -2320,6 +2321,7 @@ H5MF_get_freespace(H5F_t *f, hsize_t *tot_space, hsize_t *meta_size)
needed_ring = H5AC_RING_MDFSM;
else
needed_ring = H5AC_RING_RDFSM;
+
if(needed_ring != curr_ring) {
H5AC_set_ring(needed_ring, &curr_ring);
curr_ring = needed_ring;
@@ -2435,6 +2437,7 @@ H5MF_get_free_sections(H5F_t *f, H5FD_mem_t type, size_t nsects, H5F_sect_info_t
needed_ring = H5AC_RING_MDFSM;
else
needed_ring = H5AC_RING_RDFSM;
+
if(needed_ring != curr_ring) {
H5AC_set_ring(needed_ring, &curr_ring);
curr_ring = needed_ring;
diff --git a/src/H5MFprivate.h b/src/H5MFprivate.h
index 58e5054..bd57f05 100644
--- a/src/H5MFprivate.h
+++ b/src/H5MFprivate.h
@@ -60,8 +60,7 @@ H5_DLL herr_t H5MF_xfree(H5F_t *f, H5FD_mem_t type, haddr_t addr,
hsize_t size);
H5_DLL herr_t H5MF_try_extend(H5F_t *f, H5FD_mem_t type, haddr_t addr,
hsize_t size, hsize_t extra_requested);
-H5_DLL htri_t H5MF_try_shrink(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr,
- hsize_t size);
+H5_DLL htri_t H5MF_try_shrink(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size);
H5_DLL ssize_t H5MF_get_free_sections(H5F_t *f, H5FD_mem_t type, size_t nsects,
H5F_sect_info_t *sect_info);
diff --git a/src/H5Opkg.h b/src/H5Opkg.h
index 19d90c5..059b46a 100644
--- a/src/H5Opkg.h
+++ b/src/H5Opkg.h
@@ -648,16 +648,15 @@ H5_DLLVAR const unsigned H5O_pline_ver_bounds[H5F_LIBVER_NBOUNDS];
/* Testing functions */
#ifdef H5O_TESTING
-H5_DLL htri_t H5O_is_attr_empty_test(hid_t oid);
-H5_DLL htri_t H5O_is_attr_dense_test(hid_t oid);
-H5_DLL herr_t H5O_num_attrs_test(hid_t oid, hsize_t *nattrs);
-H5_DLL herr_t H5O_attr_dense_info_test(hid_t oid, hsize_t *name_count, hsize_t *corder_count);
-H5_DLL herr_t H5O_check_msg_marked_test(hid_t oid, hbool_t flag_val);
-H5_DLL herr_t H5O_expunge_chunks_test(const H5O_loc_t *oloc);
-H5_DLL herr_t H5O_get_rc(const H5O_loc_t *oloc, unsigned *rc);
-H5_DLL herr_t H5O_msg_get_chunkno_test(hid_t oid, unsigned msg_type,
- unsigned *chunk_num);
-H5_DLL herr_t H5O_msg_move_to_new_chunk_test(hid_t oid, unsigned msg_type);
+H5_DLL htri_t H5O__is_attr_empty_test(hid_t oid);
+H5_DLL htri_t H5O__is_attr_dense_test(hid_t oid);
+H5_DLL herr_t H5O__num_attrs_test(hid_t oid, hsize_t *nattrs);
+H5_DLL herr_t H5O__attr_dense_info_test(hid_t oid, hsize_t *name_count, hsize_t *corder_count);
+H5_DLL herr_t H5O__check_msg_marked_test(hid_t oid, hbool_t flag_val);
+H5_DLL herr_t H5O__expunge_chunks_test(const H5O_loc_t *oloc);
+H5_DLL herr_t H5O__get_rc_test(const H5O_loc_t *oloc, unsigned *rc);
+H5_DLL herr_t H5O__msg_get_chunkno_test(hid_t oid, unsigned msg_type, unsigned *chunk_num);
+H5_DLL herr_t H5O__msg_move_to_new_chunk_test(hid_t oid, unsigned msg_type);
#endif /* H5O_TESTING */
/* Object header debugging routines */
diff --git a/src/H5Otest.c b/src/H5Otest.c
index 32b31f2..7cb7b3d 100644
--- a/src/H5Otest.c
+++ b/src/H5Otest.c
@@ -75,11 +75,11 @@
/*--------------------------------------------------------------------------
NAME
- H5O_is_attr_dense_test
+ H5O__is_attr_dense_test
PURPOSE
Determine whether attributes for an object are stored "densely"
USAGE
- htri_t H5O_is_attr_dense_test(oid)
+ htri_t H5O__is_attr_dense_test(oid)
hid_t oid; IN: object to check
RETURNS
Non-negative TRUE/FALSE on success, negative on failure
@@ -93,7 +93,7 @@
REVISION LOG
--------------------------------------------------------------------------*/
htri_t
-H5O_is_attr_dense_test(hid_t oid)
+H5O__is_attr_dense_test(hid_t oid)
{
H5O_t *oh = NULL; /* Object header */
H5O_ainfo_t ainfo; /* Attribute information for object */
@@ -101,7 +101,7 @@ H5O_is_attr_dense_test(hid_t oid)
hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
htri_t ret_value = FAIL; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
/* Get object location for object */
if(NULL == (loc = H5O_get_loc(oid)))
@@ -114,7 +114,7 @@ H5O_is_attr_dense_test(hid_t oid)
/* Get the object header */
if(NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
/* Check for attribute info stored */
ainfo.fheap_addr = HADDR_UNDEF;
@@ -136,21 +136,21 @@ H5O_is_attr_dense_test(hid_t oid)
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")
if(api_ctx_pushed && H5CX_pop() < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTRESET, FAIL, "can't reset API context")
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5O_is_attr_dense_test() */
+} /* H5O__is_attr_dense_test() */
/*--------------------------------------------------------------------------
NAME
- H5O_is_attr_empty_test
+ H5O__is_attr_empty_test
PURPOSE
Determine whether there are any attributes for an object
USAGE
- htri_t H5O_is_attr_empty_test(oid)
+ htri_t H5O__is_attr_empty_test(oid)
hid_t oid; IN: object to check
RETURNS
Non-negative TRUE/FALSE on success, negative on failure
@@ -163,7 +163,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
htri_t
-H5O_is_attr_empty_test(hid_t oid)
+H5O__is_attr_empty_test(hid_t oid)
{
H5O_t *oh = NULL; /* Object header */
H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
@@ -174,7 +174,7 @@ H5O_is_attr_empty_test(hid_t oid)
hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
htri_t ret_value = FAIL; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
/* Get object location for object */
if(NULL == (loc = H5O_get_loc(oid)))
@@ -187,7 +187,7 @@ H5O_is_attr_empty_test(hid_t oid)
/* Get the object header */
if(NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
/* Check for attribute info stored */
if(oh->version > H5O_VERSION_1) {
@@ -237,21 +237,21 @@ done:
if(bt2_name && H5B2_close(bt2_name) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for name index")
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")
if(api_ctx_pushed && H5CX_pop() < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTRESET, FAIL, "can't reset API context")
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5O_is_attr_empty_test() */
+} /* H5O__is_attr_empty_test() */
/*--------------------------------------------------------------------------
NAME
- H5O_num_attrs_test
+ H5O__num_attrs_test
PURPOSE
Determine whether there are any attributes for an object
USAGE
- herr_t H5O_num_attrs_test(oid, nattrs)
+ herr_t H5O__num_attrs_test(oid, nattrs)
hid_t oid; IN: object to check
hsize_t *nattrs; OUT: Number of attributes on object
RETURNS
@@ -265,7 +265,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5O_num_attrs_test(hid_t oid, hsize_t *nattrs)
+H5O__num_attrs_test(hid_t oid, hsize_t *nattrs)
{
H5O_t *oh = NULL; /* Object header */
H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
@@ -275,7 +275,7 @@ H5O_num_attrs_test(hid_t oid, hsize_t *nattrs)
hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
/* Get object location for object */
if(NULL == (loc = H5O_get_loc(oid)))
@@ -288,7 +288,7 @@ H5O_num_attrs_test(hid_t oid, hsize_t *nattrs)
/* Get the object header */
if(NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
/* Check for attribute info stored */
ainfo.fheap_addr = HADDR_UNDEF;
@@ -335,21 +335,21 @@ done:
if(bt2_name && H5B2_close(bt2_name) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for name index")
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")
if(api_ctx_pushed && H5CX_pop() < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTRESET, FAIL, "can't reset API context")
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5O_num_attrs_test() */
+} /* H5O__num_attrs_test() */
/*--------------------------------------------------------------------------
NAME
- H5O_attr_dense_info_test
+ H5O__attr_dense_info_test
PURPOSE
Retrieve information about the state of the "dense" storage for attributes
USAGE
- herr_t H5O_attr_dense_info_test(oid, name_count, corder_count)
+ herr_t H5O__attr_dense_info_test(oid, name_count, corder_count)
hid_t oid; IN: Object to check
hsize_t *name_count; OUT: Number of attributes in name index
hsize_t *corder_count; OUT: Number of attributes in creation order index
@@ -365,7 +365,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5O_attr_dense_info_test(hid_t oid, hsize_t *name_count, hsize_t *corder_count)
+H5O__attr_dense_info_test(hid_t oid, hsize_t *name_count, hsize_t *corder_count)
{
H5O_t *oh = NULL; /* Object header */
H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
@@ -375,7 +375,7 @@ H5O_attr_dense_info_test(hid_t oid, hsize_t *name_count, hsize_t *corder_count)
hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
/* Get object location for object */
if(NULL == (loc = H5O_get_loc(oid)))
@@ -391,7 +391,7 @@ H5O_attr_dense_info_test(hid_t oid, hsize_t *name_count, hsize_t *corder_count)
/* Get the object header */
if(NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
- HGOTO_ERROR_TAG(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
+ HGOTO_ERROR_TAG(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
/* Check for attribute info stored */
ainfo.fheap_addr = HADDR_UNDEF;
@@ -438,22 +438,22 @@ done:
if(bt2_corder && H5B2_close(bt2_corder) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for creation order index")
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")
if(api_ctx_pushed && H5CX_pop() < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTRESET, FAIL, "can't reset API context")
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5O_attr_dense_info_test() */
+} /* H5O__attr_dense_info_test() */
/*--------------------------------------------------------------------------
NAME
- H5O_check_msg_marked_test
+ H5O__check_msg_marked_test
PURPOSE
Check if an unknown message with the "mark if unknown" flag actually gets
marked.
USAGE
- herr_t H5O_check_msg_marked_test(oid, flag_val)
+ herr_t H5O__check_msg_marked_test(oid, flag_val)
hid_t oid; IN: Object to check
hbool_t flag_val; IN: Desired flag value
RETURNS
@@ -468,7 +468,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5O_check_msg_marked_test(hid_t oid, hbool_t flag_val)
+H5O__check_msg_marked_test(hid_t oid, hbool_t flag_val)
{
H5O_t *oh = NULL; /* Object header */
H5O_loc_t *loc; /* Pointer to object's location */
@@ -476,7 +476,7 @@ H5O_check_msg_marked_test(hid_t oid, hbool_t flag_val)
unsigned idx; /* Index of message */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
/* Get object location for object */
if(NULL == (loc = H5O_get_loc(oid)))
@@ -484,11 +484,11 @@ H5O_check_msg_marked_test(hid_t oid, hbool_t flag_val)
/* Get the object header */
if(NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
/* Locate "unknown" message */
for(idx = 0, idx_msg = &oh->mesg[0]; idx < oh->nmesgs; idx++, idx_msg++)
- if(idx_msg->type->id == H5O_UNKNOWN_ID) {
+ if(idx_msg->type->id == H5O_UNKNOWN_ID) {
/* Check for "unknown" message having the correct flags */
if(((idx_msg->flags & H5O_MSG_FLAG_WAS_UNKNOWN) > 0) != flag_val)
HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "'unknown' message has incorrect 'was unknown' flag value")
@@ -503,15 +503,15 @@ H5O_check_msg_marked_test(hid_t oid, hbool_t flag_val)
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(ret_value)
-} /* H5O_check_msg_marked_test() */
+} /* H5O__check_msg_marked_test() */
/*--------------------------------------------------------------------------
NAME
- H5O_expunge_chunks_test
+ H5O__expunge_chunks_test
PURPOSE
Expunge all the chunks for an object header from the cache.
USAGE
@@ -529,7 +529,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5O_expunge_chunks_test(const H5O_loc_t *loc)
+H5O__expunge_chunks_test(const H5O_loc_t *loc)
{
H5O_t *oh = NULL; /* Object header */
haddr_t chk_addr[16]; /* Array of chunk addresses */
@@ -537,11 +537,11 @@ H5O_expunge_chunks_test(const H5O_loc_t *loc)
size_t u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
/* Get the object header */
if(NULL == (oh = H5O_protect(loc, H5AC__NO_FLAGS_SET, FALSE)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header")
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header")
/* Safety check */
nchunks = oh->nchunks;
@@ -553,7 +553,7 @@ H5O_expunge_chunks_test(const H5O_loc_t *loc)
/* Release the object header */
if(H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header")
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header")
/* Iterate over all the saved chunk addresses, evicting them from the cache */
/* (in reverse order, so that chunk #0 is unpinned) */
@@ -563,16 +563,16 @@ H5O_expunge_chunks_test(const H5O_loc_t *loc)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5O_expunge_chunks_test() */
+} /* H5O__expunge_chunks_test() */
/*--------------------------------------------------------------------------
NAME
- H5O_get_rc
+ H5O__get_rc_test
PURPOSE
Retrieve the refcount for the object header
USAGE
- herr_t H5O_expunge_chunks_test(loc, rc)
+ herr_t H5O__get_rc_test(loc, rc)
const H5O_loc_t *loc; IN: Object location for object header to query
unsigned *rc; OUT: Pointer to refcount for object header
RETURNS
@@ -587,12 +587,12 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5O_get_rc(const H5O_loc_t *loc, unsigned *rc)
+H5O__get_rc_test(const H5O_loc_t *loc, unsigned *rc)
{
H5O_t *oh = NULL; /* Object header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(loc);
@@ -600,7 +600,7 @@ H5O_get_rc(const H5O_loc_t *loc, unsigned *rc)
/* Get the object header */
if(NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header")
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header")
/* Save the refcount for the object header */
*rc = oh->nlink;
@@ -608,19 +608,19 @@ H5O_get_rc(const H5O_loc_t *loc, unsigned *rc)
done:
/* Release the object header */
if(oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header")
+ HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header")
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5O_expunge_chunks_test() */
+} /* H5O__get_rc_test() */
/*--------------------------------------------------------------------------
NAME
- H5O_msg_get_chunkno_test
+ H5O__msg_get_chunkno_test
PURPOSE
Retrieve the chunk number for an object header message of a given type.
USAGE
- herr_t H5O_check_msg_marked_test(oid, chunk_num)
+ herr_t H5O__msg_get_chunkno_test(oid, msg_type, chunk_num)
hid_t oid; IN: Object to check
unsigned msg_type; IN: Object header message type to check
unsigned *chunk_num; OUT: Object header chunk that the message is in
@@ -636,7 +636,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5O_msg_get_chunkno_test(hid_t oid, unsigned msg_type, unsigned *chunk_num)
+H5O__msg_get_chunkno_test(hid_t oid, unsigned msg_type, unsigned *chunk_num)
{
H5O_t *oh = NULL; /* Object header */
H5O_loc_t *loc; /* Pointer to object's location */
@@ -645,7 +645,7 @@ H5O_msg_get_chunkno_test(hid_t oid, unsigned msg_type, unsigned *chunk_num)
hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
/* Get object location for object */
if(NULL == (loc = H5O_get_loc(oid)))
@@ -658,11 +658,11 @@ H5O_msg_get_chunkno_test(hid_t oid, unsigned msg_type, unsigned *chunk_num)
/* Get the object header */
if(NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
/* Locate first message of given type */
for(idx = 0, idx_msg = &oh->mesg[0]; idx < oh->nmesgs; idx++, idx_msg++)
- if(idx_msg->type->id == msg_type) {
+ if(idx_msg->type->id == msg_type) {
/* Set the chunk number for the message */
*chunk_num = idx_msg->chunkno;
@@ -676,21 +676,21 @@ H5O_msg_get_chunkno_test(hid_t oid, unsigned msg_type, unsigned *chunk_num)
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")
if(api_ctx_pushed && H5CX_pop() < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTRESET, FAIL, "can't reset API context")
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5O_msg_get_chunkno_test() */
+} /* H5O__msg_get_chunkno_test() */
/*--------------------------------------------------------------------------
NAME
- H5O_msg_move_to_new_chunk_test
+ H5O__msg_move_to_new_chunk_test
PURPOSE
Move a message into a new chunk
USAGE
- herr_t H5O_msg_move_to_new_chunk_test(oid, msg_type)
+ herr_t H5O__msg_move_to_new_chunk_test(oid, msg_type)
hid_t oid; IN: Object to check
unsigned msg_type; IN: Object header message type to check
RETURNS
@@ -704,7 +704,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5O_msg_move_to_new_chunk_test(hid_t oid, unsigned msg_type)
+H5O__msg_move_to_new_chunk_test(hid_t oid, unsigned msg_type)
{
H5O_t *oh = NULL; /* Object header */
H5O_loc_t *loc; /* Pointer to object's location */
@@ -713,7 +713,7 @@ H5O_msg_move_to_new_chunk_test(hid_t oid, unsigned msg_type)
hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
/* Get object location for object */
if(NULL == (loc = H5O_get_loc(oid)))
@@ -726,11 +726,11 @@ H5O_msg_move_to_new_chunk_test(hid_t oid, unsigned msg_type)
/* Get the object header */
if(NULL == (oh = H5O_protect(loc, H5AC__NO_FLAGS_SET, FALSE)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
/* Locate first message of given type */
for(idx = 0, curr_msg = &oh->mesg[0]; idx < oh->nmesgs; idx++, curr_msg++)
- if(curr_msg->type->id == msg_type) {
+ if(curr_msg->type->id == msg_type) {
H5O_msg_alloc_info_t found_msg; /* Information about message to move */
unsigned msg_chunkno = curr_msg->chunkno; /* Chunk that the message is in */
uint8_t *end_chunk_data = (oh->chunk[msg_chunkno].image + oh->chunk[msg_chunkno].size) - (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[msg_chunkno].gap); /* End of message data in chunk */
@@ -784,10 +784,10 @@ H5O_msg_move_to_new_chunk_test(hid_t oid, unsigned msg_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")
if(api_ctx_pushed && H5CX_pop() < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTRESET, FAIL, "can't reset API context")
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5O_msg_get_chunkno_test() */
+} /* H5O__msg_get_chunkno_test() */
diff --git a/src/H5PBprivate.h b/src/H5PBprivate.h
index aef87e1..b94b845 100644
--- a/src/H5PBprivate.h
+++ b/src/H5PBprivate.h
@@ -91,10 +91,8 @@ H5_DLL herr_t H5PB_dest(H5F_t *f);
H5_DLL herr_t H5PB_add_new_page(H5F_t *f, H5FD_mem_t type, haddr_t page_addr);
H5_DLL herr_t H5PB_update_entry(H5PB_t *page_buf, haddr_t addr, size_t size, const void *buf);
H5_DLL herr_t H5PB_remove_entry(const H5F_t *f, haddr_t addr);
-H5_DLL herr_t H5PB_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size,
- void *buf/*out*/);
-H5_DLL herr_t H5PB_write(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size,
- const void *buf);
+H5_DLL herr_t H5PB_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size, void *buf/*out*/);
+H5_DLL herr_t H5PB_write(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size, const void *buf);
/* Statistics routines */
H5_DLL herr_t H5PB_reset_stats(H5PB_t *page_buf);
diff --git a/src/H5Ppkg.h b/src/H5Ppkg.h
index 60b2363..19ff7f9 100644
--- a/src/H5Ppkg.h
+++ b/src/H5Ppkg.h
@@ -200,8 +200,8 @@ H5_DLL herr_t H5P_get_filter(const struct H5Z_filter_info_t *filter,
/* Testing functions */
#ifdef H5P_TESTING
-H5_DLL char *H5P_get_class_path_test(hid_t pclass_id);
-H5_DLL hid_t H5P_open_class_path_test(const char *path);
+H5_DLL char *H5P__get_class_path_test(hid_t pclass_id);
+H5_DLL hid_t H5P__open_class_path_test(const char *path);
#endif /* H5P_TESTING */
#endif /* _H5Ppkg_H */
diff --git a/src/H5Ptest.c b/src/H5Ptest.c
index 475a164..075040d 100644
--- a/src/H5Ptest.c
+++ b/src/H5Ptest.c
@@ -35,11 +35,11 @@
/*--------------------------------------------------------------------------
NAME
- H5P_get_class_path_test
+ H5P__get_class_path_test
PURPOSE
Routine to query the full path of a generic property list class
USAGE
- char *H5P_get_class_name_test(pclass_id)
+ char *H5P__get_class_name_test(pclass_id)
hid_t pclass_id; IN: Property class to query
RETURNS
Success: Pointer to a malloc'ed string containing the full path of class
@@ -51,17 +51,17 @@
GLOBAL VARIABLES
COMMENTS, BUGS, ASSUMPTIONS
- DO NOT USE THIS FUNCTION FOR ANYTHING EXCEPT TESTING H5P_get_class_path()
+ DO NOT USE THIS FUNCTION FOR ANYTHING EXCEPT TESTING H5P__get_class_path()
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
char *
-H5P_get_class_path_test(hid_t pclass_id)
+H5P__get_class_path_test(hid_t pclass_id)
{
H5P_genclass_t *pclass; /* Property class to query */
char *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI(NULL)
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
if(NULL == (pclass = (H5P_genclass_t *)H5I_object_verify(pclass_id, H5I_GENPROP_CLS)))
@@ -73,53 +73,53 @@ H5P_get_class_path_test(hid_t pclass_id)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5P_get_class_path_test() */
+} /* H5P__get_class_path_test() */
/*--------------------------------------------------------------------------
NAME
- H5P_open_class_path_test
+ H5P__open_class_path_test
PURPOSE
Routine to open a [copy of] a class with its full path name
USAGE
- hid_t H5P_open_class_name_test(path)
+ hid_t H5P__open_class_name_test(path)
const char *path; IN: Full path name of class to open [copy of]
RETURNS
Success: ID of generic property class
- Failure: NULL
+ Failure: H5I_INVALID_HID
DESCRIPTION
This routine opens [a copy] of the class indicated by the full path.
GLOBAL VARIABLES
COMMENTS, BUGS, ASSUMPTIONS
- DO NOT USE THIS FUNCTION FOR ANYTHING EXCEPT TESTING H5P_open_class_path()
+ DO NOT USE THIS FUNCTION FOR ANYTHING EXCEPT TESTING H5P__open_class_path()
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
hid_t
-H5P_open_class_path_test(const char *path)
+H5P__open_class_path_test(const char *path)
{
H5P_genclass_t *pclass = NULL; /* Property class to query */
hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
- if (NULL == path || *path=='\0')
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid class path");
+ if(NULL == path || *path=='\0')
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid class path");
/* Open the property list class */
- if ((pclass=H5P_open_class_path(path))==NULL)
- HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "unable to find class with full path");
+ if(NULL == (pclass = H5P_open_class_path(path)))
+ HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, H5I_INVALID_HID, "unable to find class with full path");
/* Get an atom for the class */
- if ((ret_value=H5I_register(H5I_GENPROP_CLS, pclass, TRUE))<0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to atomize property list class");
+ if((ret_value = H5I_register(H5I_GENPROP_CLS, pclass, TRUE)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to atomize property list class");
done:
- if(ret_value<0 && pclass)
+ if(H5I_INVALID_HID == ret_value && pclass)
H5P_close_class(pclass);
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5P_open_class_path_test() */
+} /* H5P__open_class_path_test() */
diff --git a/src/H5SMtest.c b/src/H5SMtest.c
index 490265c..0a6149d 100644
--- a/src/H5SMtest.c
+++ b/src/H5SMtest.c
@@ -113,7 +113,7 @@ H5SM__get_mesg_count_test(H5F_t *f, unsigned type_id, size_t *mesg_count)
done:
/* Release resources */
if(table && H5AC_unprotect(f, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), table, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table")
+ HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table")
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5SM__get_mesg_count_test() */
diff --git a/src/H5TS.c b/src/H5TS.c
index d239e09..10e14d5 100644
--- a/src/H5TS.c
+++ b/src/H5TS.c
@@ -359,7 +359,6 @@ H5TS_win32_process_enter(PINIT_ONCE InitOnce, PVOID Parameter, PVOID *lpContex)
ret_value = FALSE;
#endif /* H5_HAVE_CODESTACK */
- /* Set up thread local storage */
if(TLS_OUT_OF_INDEXES == (H5TS_apictx_key_g = TlsAlloc()))
ret_value = FALSE;
@@ -428,12 +427,9 @@ H5TS_win32_process_exit(void)
/* Clean up per-process thread local storage */
TlsFree(H5TS_errstk_key_g);
-
#ifdef H5_HAVE_CODESTACK
TlsFree(H5TS_funcstk_key_g);
#endif /* H5_HAVE_CODESTACK */
-
- /* Clean up per-process thread local storage */
TlsFree(H5TS_apictx_key_g);
return;
@@ -479,7 +475,6 @@ H5TS_win32_thread_exit(void)
LocalFree((HLOCAL)lpvData);
#endif /* H5_HAVE_CODESTACK */
- /* Clean up per-thread thread local storage */
lpvData = TlsGetValue(H5TS_apictx_key_g);
if(lpvData)
LocalFree((HLOCAL)lpvData);
@@ -534,3 +529,4 @@ H5TS_create_thread(void *(*func)(void *), H5TS_attr_t *attr, void *udata)
} /* H5TS_create_thread */
#endif /* H5_HAVE_THREADSAFE */
+
diff --git a/src/H5TSprivate.h b/src/H5TSprivate.h
index 8d74676..9e093a6 100644
--- a/src/H5TSprivate.h
+++ b/src/H5TSprivate.h
@@ -128,3 +128,4 @@ H5_DLL H5TS_thread_t H5TS_create_thread(void *(*func)(void *), H5TS_attr_t * att
#endif /* c_plusplus || __cplusplus */
#endif /* H5TSprivate_H_ */
+
diff --git a/src/H5public.h b/src/H5public.h
index a4c80cd..c247e57 100644
--- a/src/H5public.h
+++ b/src/H5public.h
@@ -93,10 +93,10 @@ extern "C" {
/* Version numbers */
#define H5_VERS_MAJOR 1 /* For major interface/format changes */
#define H5_VERS_MINOR 11 /* For minor interface/format changes */
-#define H5_VERS_RELEASE 2 /* For tweaks, bug-fixes, or development */
+#define H5_VERS_RELEASE 3 /* For tweaks, bug-fixes, or development */
#define H5_VERS_SUBRELEASE "" /* For pre-releases like snap0 */
/* Empty string for real releases. */
-#define H5_VERS_INFO "HDF5 library version: 1.11.2" /* Full version string */
+#define H5_VERS_INFO "HDF5 library version: 1.11.3" /* Full version string */
#define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \
H5_VERS_RELEASE)