summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2020-08-16 19:25:09 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2020-08-16 19:25:09 (GMT)
commitcba993c3492d773e5d0923257382eca17e594910 (patch)
tree21dc90a495f4c44b844463a85a988907838a09dc
parent0ba794be38b908271e6a2d8f5e231e4b097f25e5 (diff)
downloadhdf5-cba993c3492d773e5d0923257382eca17e594910.zip
hdf5-cba993c3492d773e5d0923257382eca17e594910.tar.gz
hdf5-cba993c3492d773e5d0923257382eca17e594910.tar.bz2
Minor normalizations with develop
-rw-r--r--src/H5.c20
-rw-r--r--src/H5A.c285
-rw-r--r--src/H5Abtree2.c3
-rw-r--r--src/H5Adense.c14
-rw-r--r--src/H5Adeprec.c16
-rw-r--r--src/H5Aint.c2
-rw-r--r--src/H5Amodule.h2
-rw-r--r--src/H5Apublic.h18
-rw-r--r--src/H5B.c72
-rw-r--r--src/H5B2leaf.c16
-rw-r--r--src/H5B2module.h2
-rw-r--r--src/H5B2stat.c2
-rw-r--r--src/H5B2test.c2
-rw-r--r--src/H5Bcache.c7
-rw-r--r--src/H5Cmodule.h2
-rw-r--r--src/H5Dvirtual.c2
-rw-r--r--src/H5E.c50
-rw-r--r--src/H5EA.c13
-rw-r--r--src/H5EAcache.c31
-rw-r--r--src/H5EAdbg.c2
-rw-r--r--src/H5EAdblkpage.c7
-rw-r--r--src/H5Edeprec.c14
-rw-r--r--src/H5Emodule.h2
-rw-r--r--src/H5Epkg.h2
-rw-r--r--src/H5Eprivate.h2
-rw-r--r--src/H5FA.c3
-rw-r--r--src/H5FAcache.c18
-rw-r--r--src/H5FAhdr.c4
-rw-r--r--src/H5FAint.c2
-rw-r--r--src/H5FAstat.c6
-rw-r--r--src/H5FAtest.c2
-rw-r--r--src/H5FDcore.c34
-rw-r--r--src/H5FDcore.h2
-rw-r--r--src/H5FDdirect.h2
-rw-r--r--src/H5FDfamily.c312
-rw-r--r--src/H5FDfamily.h2
-rw-r--r--src/H5FDmpi.h2
-rw-r--r--src/H5FDmpio.h2
-rw-r--r--src/H5FDmulti.c21
-rw-r--r--src/H5FDmulti.h2
-rw-r--r--src/H5FDpkg.h2
-rw-r--r--src/H5FDprivate.h2
-rw-r--r--src/H5FDpublic.h2
-rw-r--r--src/H5FDsec2.c189
-rw-r--r--src/H5FDsec2.h2
-rw-r--r--src/H5FDstdio.h2
-rw-r--r--src/H5FDtest.c1
-rw-r--r--src/H5FDwindows.h4
-rw-r--r--src/H5FLprivate.h4
-rw-r--r--src/H5MP.c28
-rw-r--r--src/H5MPpkg.h2
-rw-r--r--src/H5MPprivate.h2
-rw-r--r--src/H5MPtest.c18
-rw-r--r--src/H5Omodule.h2
-rw-r--r--src/H5PBmodule.h2
-rw-r--r--src/H5PLpath.c72
-rw-r--r--src/H5PLpkg.h6
-rw-r--r--src/H5PLplugin_cache.c5
-rw-r--r--src/H5Pmodule.h2
-rw-r--r--src/H5Pocpl.c75
-rw-r--r--src/H5SLmodule.h2
-rw-r--r--src/H5SMmodule.h2
-rw-r--r--src/H5SMpkg.h2
-rw-r--r--src/H5SMprivate.h2
-rw-r--r--src/H5ST.c72
-rw-r--r--src/H5Smodule.h2
-rw-r--r--src/H5T.c30
-rw-r--r--src/H5TSprivate.h2
-rw-r--r--src/H5Tcommit.c161
-rw-r--r--src/H5Tcompound.c22
-rw-r--r--src/H5Tcset.c8
-rw-r--r--src/H5Tdeprec.c28
-rw-r--r--src/H5Tenum.c76
-rw-r--r--src/H5Tfields.c33
-rw-r--r--src/H5Tfixed.c9
-rw-r--r--src/H5Tfloat.c4
-rw-r--r--src/H5Tmodule.h2
-rw-r--r--src/H5Tnative.c26
-rw-r--r--src/H5Toffset.c20
-rw-r--r--src/H5Toh.c2
-rw-r--r--src/H5Topaque.c4
-rw-r--r--src/H5Torder.c14
-rw-r--r--src/H5Tpad.c8
-rw-r--r--src/H5Tpkg.h62
-rw-r--r--src/H5Tprecis.c50
-rw-r--r--src/H5Tprivate.h2
-rw-r--r--src/H5Tstrpad.c8
-rw-r--r--src/H5Tvisit.c2
-rw-r--r--src/H5Tvlen.c194
-rw-r--r--src/H5Zfletcher32.c27
-rw-r--r--src/H5Zmodule.h2
-rw-r--r--src/H5Znbit.c268
-rw-r--r--src/H5Zprivate.h2
-rw-r--r--src/H5Zscaleoffset.c192
-rw-r--r--src/H5Zshuffle.c34
-rw-r--r--src/H5Zszip.c50
-rw-r--r--src/H5Ztrans.c346
-rw-r--r--src/H5checksum.c22
-rw-r--r--src/H5dbg.c79
-rw-r--r--src/H5detect.c81
-rw-r--r--tools/test/h5dump/errfiles/tattr-3.err2
101 files changed, 1510 insertions, 1868 deletions
diff --git a/src/H5.c b/src/H5.c
index 03fe535..6d3c335 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -50,9 +50,9 @@
/********************/
/* Local Prototypes */
/********************/
-static void H5_debug_mask(const char*);
+static void H5__debug_mask(const char*);
#ifdef H5_HAVE_PARALLEL
-static int H5_mpi_delete_cb(MPI_Comm comm, int keyval, void *attr_val, int *flag);
+static int H5__mpi_delete_cb(MPI_Comm comm, int keyval, void *attr_val, int *flag);
#endif /*H5_HAVE_PARALLEL*/
/*********************/
@@ -139,7 +139,7 @@ H5_init_library(void)
int key_val;
if(MPI_SUCCESS != (mpi_code = MPI_Comm_create_keyval(MPI_COMM_NULL_COPY_FN,
- (MPI_Comm_delete_attr_function *)H5_mpi_delete_cb,
+ (MPI_Comm_delete_attr_function *)H5__mpi_delete_cb,
&key_val, NULL)))
HMPI_GOTO_ERROR(FAIL, "MPI_Comm_create_keyval failed", mpi_code)
@@ -227,8 +227,8 @@ H5_init_library(void)
HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to initialize FS interface")
/* Debugging? */
- H5_debug_mask("-all");
- H5_debug_mask(HDgetenv("HDF5_DEBUG"));
+ H5__debug_mask("-all");
+ H5__debug_mask(HDgetenv("HDF5_DEBUG"));
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -628,7 +628,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5_debug_mask
+ * Function: H5__debug_mask
*
* Purpose: Set runtime debugging flags according to the string S. The
* string should contain file numbers and package names
@@ -651,7 +651,7 @@ done:
*-------------------------------------------------------------------------
*/
static void
-H5_debug_mask(const char *s)
+H5__debug_mask(const char *s)
{
FILE *stream = stderr;
char pkg_name[32], *rest;
@@ -727,12 +727,12 @@ H5_debug_mask(const char *s)
return;
-} /* end H5_debug_mask() */
+} /* end H5__debug_mask() */
#ifdef H5_HAVE_PARALLEL
/*-------------------------------------------------------------------------
- * Function: H5_mpi_delete_cb
+ * Function: H5__mpi_delete_cb
*
* Purpose: Callback attribute on MPI_COMM_SELF to terminate the HDF5
* library when the communicator is destroyed, i.e. on MPI_Finalize.
@@ -741,7 +741,7 @@ H5_debug_mask(const char *s)
*
*-------------------------------------------------------------------------
*/
-static int H5_mpi_delete_cb(MPI_Comm H5_ATTR_UNUSED comm, int H5_ATTR_UNUSED keyval, void H5_ATTR_UNUSED *attr_val, int H5_ATTR_UNUSED *flag)
+static int H5__mpi_delete_cb(MPI_Comm H5_ATTR_UNUSED comm, int H5_ATTR_UNUSED keyval, void H5_ATTR_UNUSED *attr_val, int H5_ATTR_UNUSED *flag)
{
H5_term_library();
return MPI_SUCCESS;
diff --git a/src/H5A.c b/src/H5A.c
index 1bbbbc1..b93cd8b 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -31,7 +31,6 @@
#include "H5MMprivate.h" /* Memory management */
#include "H5Opkg.h" /* Object headers */
#include "H5Sprivate.h" /* Dataspace functions */
-#include "H5SMprivate.h" /* Shared Object Header Messages */
/****************/
@@ -123,7 +122,7 @@ H5A__init_package(void)
* Create attribute ID type.
*/
if(H5I_register_type(H5I_ATTR_CLS) < 0)
- HGOTO_ERROR(H5E_INTERNAL, H5E_CANTINIT, FAIL, "unable to initialize interface")
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "unable to initialize interface")
/* Mark "top" of interface as initialized, too */
H5A_top_package_initialize_s = TRUE;
@@ -258,39 +257,42 @@ H5Acreate2(hid_t loc_id, const char *attr_name, hid_t type_id, hid_t space_id,
H5S_t *space; /* Dataspace to use for attribute */
hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE6("i", "i*siiii", loc_id, attr_name, type_id, space_id, acpl_id, aapl_id);
/* Check arguments */
if(H5I_ATTR == H5I_get_type(loc_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "location is not valid for an attribute")
if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a location")
if(0 == (H5F_INTENT(loc.oloc->file) & H5F_ACC_RDWR))
- HGOTO_ERROR(H5E_ARGS, H5E_WRITEERROR, FAIL, "no write intent on file")
- if(!attr_name || !*attr_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name")
+ HGOTO_ERROR(H5E_ARGS, H5E_WRITEERROR, H5I_INVALID_HID, "no write intent on file")
+ if(!attr_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "attr_name parameter cannot be NULL")
+ if(!*attr_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "attr_name parameter cannot be an empty string")
if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a type")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a type")
if(NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a dataspace")
/* Verify access property list and set up collective metadata if appropriate */
if(H5CX_set_apl(&aapl_id, H5P_CLS_AACC, loc_id, TRUE) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info")
- /* Go do the real work for attaching the attribute to the object */
+ /* Create the attribute */
if(NULL == (attr = H5A__create(&loc, attr_name, type, space, acpl_id)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "unable to create attribute")
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, H5I_INVALID_HID, "unable to create attribute")
/* Register the new attribute and get an ID for it */
if((ret_value = H5I_register(H5I_ATTR, attr, TRUE)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register attribute for ID")
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register attribute for ID")
done:
/* Cleanup on failure */
- if(ret_value < 0 && attr && H5A__close(attr) < 0)
- HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "can't close attribute")
+ if(H5I_INVALID_HID == ret_value)
+ if(attr && H5A__close(attr) < 0)
+ HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, H5I_INVALID_HID, "can't close attribute")
FUNC_LEAVE_API(ret_value)
} /* H5Acreate2() */
@@ -313,7 +315,7 @@ done:
hid_t aapl_id; IN: Attribute access property list
hid_t lapl_id; IN: Link access property list
RETURNS
- Non-negative on success/Negative on failure
+ Non-negative on success/H5I_INVALID_HID on failure
DESCRIPTION
This function creates an attribute which is attached to the object
@@ -335,27 +337,27 @@ H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
H5G_loc_t loc; /* Object location */
H5T_t *type; /* Datatype to use for attribute */
H5S_t *space; /* Dataspace to use for attribute */
- hid_t ret_value; /* Return value */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE8("i", "i*s*siiiii", loc_id, obj_name, attr_name, type_id, space_id,
acpl_id, aapl_id, lapl_id);
/* Check arguments */
if(H5I_ATTR == H5I_get_type(loc_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "location is not valid for an attribute")
if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a location")
if(0 == (H5F_INTENT(loc.oloc->file) & H5F_ACC_RDWR))
- HGOTO_ERROR(H5E_ARGS, H5E_WRITEERROR, FAIL, "no write intent on file")
+ HGOTO_ERROR(H5E_ARGS, H5E_WRITEERROR, H5I_INVALID_HID, "no write intent on file")
if(!obj_name || !*obj_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "no object name")
if(!attr_name || !*attr_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "no attribute name")
if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a type")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a type")
if(NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a dataspace")
/* Verify access property list and set up collective metadata if appropriate */
if(H5CX_set_apl(&aapl_id, H5P_CLS_AACC, loc_id, TRUE) < 0)
@@ -363,22 +365,23 @@ H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
if(H5P_DEFAULT != lapl_id) {
if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not link access property list ID")
H5CX_set_lapl(lapl_id);
} /* end if */
- /* Create the attribute on the object */
+ /* Create the attribute */
if(NULL == (attr = H5A__create_by_name(&loc, obj_name, attr_name, type, space, acpl_id)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "unable to create attribute")
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, H5I_INVALID_HID, "unable to create attribute")
/* Register the new attribute and get an ID for it */
if((ret_value = H5I_register(H5I_ATTR, attr, TRUE)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register attribute for ID")
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register attribute for ID")
done:
/* Cleanup on failure */
- if(ret_value < 0 && attr && H5A__close(attr) < 0)
- HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "can't close attribute")
+ if(H5I_INVALID_HID == ret_value)
+ if(attr && H5A__close(attr) < 0)
+ HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, H5I_INVALID_HID, "can't close attribute")
FUNC_LEAVE_API(ret_value)
} /* H5Acreate_by_name() */
@@ -395,7 +398,7 @@ done:
const char *attr_name; IN: Name of attribute to locate and open
hid_t aapl_id; IN: Attribute access property list
RETURNS
- ID of attribute on success, negative on failure
+ ID of attribute on success, H5I_INVALID_HID on failure
DESCRIPTION
This function opens an existing attribute for access. The attribute
@@ -408,36 +411,38 @@ H5Aopen(hid_t loc_id, const char *attr_name, hid_t aapl_id)
{
H5G_loc_t loc; /* Object location */
H5A_t *attr = NULL; /* Attribute opened */
- hid_t ret_value;
+ hid_t ret_value = H5I_INVALID_HID;
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE3("i", "i*si", loc_id, attr_name, aapl_id);
- /* check arguments */
+ /* Check arguments */
if(H5I_ATTR == H5I_get_type(loc_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "location is not valid for an attribute")
if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!attr_name || !*attr_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a location")
+ if(!attr_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be NULL")
+ if(!*attr_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be an empty string")
/* Verify access property list and set up collective metadata if appropriate */
if(H5CX_set_apl(&aapl_id, H5P_CLS_AACC, loc_id, FALSE) < 0)
- HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access property list info")
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info")
- /* Read in attribute from object header */
+ /* Open the attribute */
if(NULL == (attr = H5A__open(&loc, attr_name)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to load attribute info from object header for attribute: '%s'", attr_name)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open attribute: '%s'", attr_name)
/* Register the attribute and get an ID for it */
if((ret_value = H5I_register(H5I_ATTR, attr, TRUE)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register attribute for ID")
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register attribute for ID")
done:
/* Cleanup on failure */
- if(ret_value < 0)
+ if(H5I_INVALID_HID == ret_value)
if(attr && H5A__close(attr) < 0)
- HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "can't close attribute")
+ HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, H5I_INVALID_HID, "can't close attribute")
FUNC_LEAVE_API(ret_value)
} /* H5Aopen() */
@@ -819,20 +824,20 @@ ssize_t
H5Aget_name(hid_t attr_id, size_t buf_size, char *buf)
{
H5A_t *my_attr; /* Attribute object for ID */
- ssize_t ret_value;
+ ssize_t ret_value = -1;
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API((-1))
H5TRACE3("Zs", "iz*s", attr_id, buf_size, buf);
/* check arguments */
if(NULL == (my_attr = (H5A_t *)H5I_object_verify(attr_id, H5I_ATTR)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an attribute")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "not an attribute")
if(!buf && buf_size)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid buffer")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "buf cannot be NULL if buf_size is non-zero")
- /* Call private function in turn */
+ /* Get the attribute name */
if(0 > (ret_value = H5A__get_name(my_attr, buf_size, buf)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get attribute name")
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, (-1), "unable to get attribute name")
done:
FUNC_LEAVE_API(ret_value)
@@ -871,15 +876,15 @@ H5Aget_name_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
/* Check args */
if(H5I_ATTR == H5I_get_type(loc_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
if(!obj_name || !*obj_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
if(idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
if(order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
/* Verify access property list and set up collective metadata if appropriate */
if(H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
@@ -974,7 +979,7 @@ H5Aget_info(hid_t attr_id, H5A_info_t *ainfo)
/* Get the attribute information */
if(H5A__get_info(attr, ainfo) < 0)
- HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to get attribute info")
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to get attribute info")
done:
FUNC_LEAVE_API(ret_value)
@@ -1007,13 +1012,13 @@ H5Aget_info_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
/* Check args */
if(H5I_ATTR == H5I_get_type(loc_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
if(!obj_name || !*obj_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name")
if(!attr_name || !*attr_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name")
if(NULL == ainfo)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid info pointer")
@@ -1027,7 +1032,7 @@ H5Aget_info_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
/* Get the attribute information */
if(H5A__get_info(attr, ainfo) < 0)
- HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to get attribute info")
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to get attribute info")
done:
/* Release resources */
@@ -1066,15 +1071,15 @@ H5Aget_info_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
/* Check args */
if(H5I_ATTR == H5I_get_type(loc_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
if(!obj_name || !*obj_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
if(idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
if(order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
if(NULL == ainfo)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid info pointer")
@@ -1088,7 +1093,7 @@ H5Aget_info_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
/* Get the attribute information */
if(H5A__get_info(attr, ainfo) < 0)
- HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to get attribute info")
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to get attribute info")
done:
/* Release resources */
@@ -1100,12 +1105,12 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Arename
+ * Function: H5Arename
*
* Purpose: Rename an attribute
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
* Programmer: Raymond Lu
* October 23, 2002
@@ -1120,24 +1125,30 @@ H5Arename(hid_t loc_id, const char *old_name, const char *new_name)
FUNC_ENTER_API(FAIL)
H5TRACE3("e", "i*s*s", loc_id, old_name, new_name);
- /* check arguments */
- if(!old_name || !new_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "name is nil")
+ /* Check arguments */
if(H5I_ATTR == H5I_get_type(loc_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
+ if(!old_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "old attribute name cannot be NULL")
+ if(!*old_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "old attribute name cannot be an empty string")
+ if(!new_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "new attribute name cannot be NULL")
+ if(!*new_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "new attribute name cannot be an empty string")
/* Avoid thrashing things if the names are the same */
if(HDstrcmp(old_name, new_name)) {
H5G_loc_t loc; /* Object location */
if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
- /* Set up collective metadata if appropriate */
- if(H5CX_set_loc(loc_id) < 0)
- HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set collective metadata read")
+ /* Set up collective metadata if appropriate */
+ if(H5CX_set_loc(loc_id) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set collective metadata read")
- /* Call private attribute rename routine */
+ /* Rename the attribute */
if(H5O__attr_rename(loc.oloc, old_name, new_name) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTRENAME, FAIL, "can't rename attribute")
} /* end if */
@@ -1148,12 +1159,12 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Arename_by_name
+ * Function: H5Arename_by_name
*
* Purpose: Rename an attribute
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
* Programmer: Quincey Koziol
* February 20, 2007
@@ -1172,13 +1183,13 @@ H5Arename_by_name(hid_t loc_id, const char *obj_name, const char *old_attr_name,
/* check arguments */
if(H5I_ATTR == H5I_get_type(loc_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
if(!obj_name || !*obj_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name")
if(!old_attr_name || !*old_attr_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no old attribute name")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no old attribute name")
if(!new_attr_name || !*new_attr_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no new attribute name")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no new attribute name")
/* Avoid thrashing things if the names are the same */
if(HDstrcmp(old_attr_name, new_attr_name)) {
@@ -1191,7 +1202,7 @@ H5Arename_by_name(hid_t loc_id, const char *obj_name, const char *old_attr_name,
if(H5G_loc(loc_id, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- /* Call private attribute rename routine */
+ /* Rename the attribute */
if(H5A__rename_by_name(loc, obj_name, old_attr_name, new_attr_name) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTRENAME, FAIL, "can't rename attribute")
} /* end if */
@@ -1246,20 +1257,20 @@ herr_t
H5Aiterate2(hid_t loc_id, H5_index_t idx_type, H5_iter_order_t order,
hsize_t *idx, H5A_operator2_t op, void *op_data)
{
- herr_t ret_value; /* Return value */
+ herr_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE6("e", "iIiIo*hx*x", loc_id, idx_type, order, idx, op, op_data);
/* check arguments */
if(H5I_ATTR == H5I_get_type(loc_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
if(idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
if(order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
- /* Call attribute iteration routine */
+ /* Iterate over attributes */
if((ret_value = H5A__iterate(loc_id, idx_type, order, idx, op, op_data)) < 0)
HERROR(H5E_ATTR, H5E_BADITER, "error iterating over attributes");
@@ -1316,32 +1327,32 @@ H5Aiterate_by_name(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
H5_iter_order_t order, hsize_t *idx, H5A_operator2_t op, void *op_data,
hid_t lapl_id)
{
- H5G_loc_t loc; /* Object location */
- herr_t ret_value; /* Return value */
+ H5G_loc_t loc; /* Object location */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE8("e", "i*sIiIo*hx*xi", loc_id, obj_name, idx_type, order, idx, op,
op_data, lapl_id);
- /* check arguments */
+ /* Check arguments */
if(H5I_ATTR == H5I_get_type(loc_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
if(!obj_name || !*obj_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name")
if(idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
if(order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
/* Verify access property list and set up collective metadata if appropriate */
if(H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access property list info")
- /* Call attribute iteration by name routine */
+ /* Iterate over attributes */
if((ret_value = H5A__iterate_by_name(&loc, obj_name, idx_type, order, idx, op, op_data)) < 0)
- HERROR(H5E_ATTR, H5E_BADITER, "error iterating over attributes");
+ HERROR(H5E_ATTR, H5E_BADITER, "attribute iteration failed");
done:
FUNC_LEAVE_API(ret_value)
@@ -1366,24 +1377,26 @@ herr_t
H5Adelete(hid_t loc_id, const char *name)
{
H5G_loc_t loc; /* Object location */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*s", loc_id, name);
- /* check arguments */
+ /* Check arguments */
if(H5I_ATTR == H5I_get_type(loc_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!name || !*name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if(!name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be NULL")
+ if(!*name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be an empty string")
/* Set up collective metadata if appropriate */
if(H5CX_set_loc(loc_id) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set collective metadata read")
- /* Delete the attribute from the location */
+ /* Delete the attribute */
if(H5O__attr_remove(loc.oloc, name) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute")
@@ -1413,26 +1426,26 @@ H5Adelete_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
hid_t lapl_id)
{
H5G_loc_t loc; /* Object location */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE4("e", "i*s*si", loc_id, obj_name, attr_name, lapl_id);
- /* check arguments */
+ /* Check arguments */
if(H5I_ATTR == H5I_get_type(loc_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
if(!obj_name || !*obj_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name")
if(!attr_name || !*attr_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name")
/* Verify access property list and set up collective metadata if appropriate */
if(H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, TRUE) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access property list info")
- /* Delete the attribute from the location */
+ /* Delete the attribute */
if(H5A__delete_by_name(&loc, obj_name, attr_name) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute")
@@ -1470,28 +1483,28 @@ H5Adelete_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
H5_iter_order_t order, hsize_t n, hid_t lapl_id)
{
H5G_loc_t loc; /* Object location */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE6("e", "i*sIiIohi", loc_id, obj_name, idx_type, order, n, lapl_id);
/* check arguments */
if(H5I_ATTR == H5I_get_type(loc_id))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
if(!obj_name || !*obj_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name")
if(idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
if(order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
/* Verify access property list and set up collective metadata if appropriate */
if(H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, TRUE) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access property list info")
- /* Delete the attribute from the location */
+ /* Delete the attribute */
if(H5A__delete_by_idx(&loc, obj_name, idx_type, order, n) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute")
@@ -1523,7 +1536,7 @@ H5Aclose(hid_t attr_id)
FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", attr_id);
- /* check arguments */
+ /* Check arguments */
if(NULL == H5I_object_verify(attr_id, H5I_ATTR))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an attribute")
@@ -1554,17 +1567,17 @@ htri_t
H5Aexists(hid_t obj_id, const char *attr_name)
{
H5G_loc_t loc; /* Object location */
- htri_t ret_value; /* Return value */
+ htri_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("t", "i*s", obj_id, attr_name);
- /* check arguments */
- if (H5I_ATTR == H5I_get_type(obj_id))
+ /* Check arguments */
+ if(H5I_ATTR == H5I_get_type(obj_id))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
- if (H5G_loc(obj_id, &loc) < 0)
+ if(H5G_loc(obj_id, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if (!attr_name || !*attr_name)
+ if(!attr_name || !*attr_name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name")
/* Check if the attribute exists */
@@ -1594,26 +1607,26 @@ H5Aexists_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
hid_t lapl_id)
{
H5G_loc_t loc; /* Object location */
- htri_t ret_value; /* Return value */
+ htri_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE4("t", "i*s*si", loc_id, obj_name, attr_name, lapl_id);
/* check arguments */
- if (H5I_ATTR == H5I_get_type(loc_id))
+ if(H5I_ATTR == H5I_get_type(loc_id))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute")
- if (H5G_loc(loc_id, &loc) < 0)
+ if(H5G_loc(loc_id, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if (!obj_name || !*obj_name)
+ if(!obj_name || !*obj_name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name")
- if (!attr_name || !*attr_name)
+ if(!attr_name || !*attr_name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name")
/* Verify access property list and set up collective metadata if appropriate */
if(H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access property list info")
- if ((ret_value = H5A__exists_by_name(loc, obj_name, attr_name)) < 0)
+ if((ret_value = H5A__exists_by_name(loc, obj_name, attr_name)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to determine if attribute exists")
done:
diff --git a/src/H5Abtree2.c b/src/H5Abtree2.c
index 3377aa2..843799e 100644
--- a/src/H5Abtree2.c
+++ b/src/H5Abtree2.c
@@ -15,7 +15,7 @@
*
* Created: H5Abtree2.c
* Dec 4 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: v2 B-tree callbacks for indexing attributes on objects
*
@@ -152,7 +152,6 @@ const H5B2_class_t H5A_BT2_CORDER[1]={{ /* B-tree class information */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 4 2006
*
*-------------------------------------------------------------------------
diff --git a/src/H5Adense.c b/src/H5Adense.c
index 031efcf..bb7f122 100644
--- a/src/H5Adense.c
+++ b/src/H5Adense.c
@@ -15,7 +15,7 @@
*
* Created: H5Adense.c
* Dec 4 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Routines for operating on "dense" attribute storage
* for an object.
@@ -209,9 +209,6 @@ H5A__dense_create(H5F_t *f, H5O_ainfo_t *ainfo)
/* Retrieve the heap's address in the file */
if(H5HF_get_heap_addr(fheap, &ainfo->fheap_addr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGETSIZE, FAIL, "can't get fractal heap address")
-#ifdef QAK
-HDfprintf(stderr, "%s: ainfo->fheap_addr = %a\n", FUNC, ainfo->fheap_addr);
-#endif /* QAK */
#ifndef NDEBUG
{
@@ -221,9 +218,6 @@ HDfprintf(stderr, "%s: ainfo->fheap_addr = %a\n", FUNC, ainfo->fheap_addr);
if(H5HF_get_id_len(fheap, &fheap_id_len) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGETSIZE, FAIL, "can't get fractal heap ID length")
HDassert(fheap_id_len == H5O_FHEAP_ID_LEN);
-#ifdef QAK
-HDfprintf(stderr, "%s: fheap_id_len = %Zu\n", FUNC, fheap_id_len);
-#endif /* QAK */
}
#endif /* NDEBUG */
@@ -243,9 +237,6 @@ HDfprintf(stderr, "%s: fheap_id_len = %Zu\n", FUNC, fheap_id_len);
/* Retrieve the v2 B-tree's address in the file */
if(H5B2_get_addr(bt2_name, &ainfo->name_bt2_addr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get v2 B-tree address for name index")
-#ifdef QAK
-HDfprintf(stderr, "%s: ainfo->name_bt2_addr = %a\n", FUNC, ainfo->name_bt2_addr);
-#endif /* QAK */
/* Check if we should create a creation order index v2 B-tree */
if(ainfo->index_corder) {
@@ -264,9 +255,6 @@ HDfprintf(stderr, "%s: ainfo->name_bt2_addr = %a\n", FUNC, ainfo->name_bt2_addr)
/* Retrieve the v2 B-tree's address in the file */
if(H5B2_get_addr(bt2_corder, &ainfo->corder_bt2_addr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get v2 B-tree address for creation order index")
-#ifdef QAK
-HDfprintf(stderr, "%s: ainfo->corder_bt2_addr = %a\n", FUNC, ainfo->corder_bt2_addr);
-#endif /* QAK */
} /* end if */
done:
diff --git a/src/H5Adeprec.c b/src/H5Adeprec.c
index 99c1c0c..616256e 100644
--- a/src/H5Adeprec.c
+++ b/src/H5Adeprec.c
@@ -15,7 +15,7 @@
*
* Created: H5Adeprec.c
* November 27 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Deprecated functions from the H5A interface. These
* functions are here for compatibility purposes and may be
@@ -36,13 +36,13 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Apkg.h" /* Attributes */
-#include "H5CXprivate.h" /* API Contexts */
-#include "H5Dprivate.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Iprivate.h" /* IDs */
-#include "H5Opkg.h" /* Object headers */
+#include "H5private.h" /* Generic Functions */
+#include "H5Apkg.h" /* Attributes */
+#include "H5CXprivate.h" /* API Contexts */
+#include "H5Dprivate.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Iprivate.h" /* IDs */
+#include "H5Opkg.h" /* Object headers */
/****************/
diff --git a/src/H5Aint.c b/src/H5Aint.c
index 3b6b7a2..4ff3311 100644
--- a/src/H5Aint.c
+++ b/src/H5Aint.c
@@ -15,7 +15,7 @@
*
* Created: H5Aint.c
* Dec 18 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Internal routines for managing attributes.
*
diff --git a/src/H5Amodule.h b/src/H5Amodule.h
index 8ed056b..6b835e1 100644
--- a/src/H5Amodule.h
+++ b/src/H5Amodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5Apublic.h b/src/H5Apublic.h
index 586940b..7162f6e 100644
--- a/src/H5Apublic.h
+++ b/src/H5Apublic.h
@@ -22,10 +22,6 @@
#include "H5Opublic.h" /* Object Headers */
#include "H5Tpublic.h" /* Datatypes */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/* Information struct for attribute (for H5Aget_info/H5Aget_info_by_idx) */
typedef struct {
hbool_t corder_valid; /* Indicate if creation order is valid */
@@ -38,7 +34,19 @@ typedef struct {
typedef herr_t (*H5A_operator2_t)(hid_t location_id/*in*/,
const char *attr_name/*in*/, const H5A_info_t *ainfo/*in*/, void *op_data/*in,out*/);
-/* Public function prototypes */
+
+/********************/
+/* Public Variables */
+/********************/
+
+
+/*********************/
+/* Public Prototypes */
+/*********************/
+#ifdef __cplusplus
+extern "C" {
+#endif
+
H5_DLL hid_t H5Acreate2(hid_t loc_id, const char *attr_name, hid_t type_id,
hid_t space_id, hid_t acpl_id, hid_t aapl_id);
H5_DLL hid_t H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
diff --git a/src/H5B.c b/src/H5B.c
index fc11cc8..79ab6b6 100644
--- a/src/H5B.c
+++ b/src/H5B.c
@@ -13,9 +13,9 @@
/*-------------------------------------------------------------------------
*
- * Created: H5B.c
- * Jul 10 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Created: H5B.c
+ * Jul 10 1997
+ * Robb Matzke
*
* Purpose: Implements balanced, sibling-linked, N-ary trees
* capable of storing any type of data with unique key
@@ -205,7 +205,6 @@ H5FL_SEQ_DEFINE_STATIC(size_t);
* Failure: Negative
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jun 23 1997
*
*-------------------------------------------------------------------------
@@ -271,7 +270,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_create() */ /*lint !e818 Can't make udata a pointer to const */
-
+
/*-------------------------------------------------------------------------
* Function: H5B_find
*
@@ -290,7 +289,6 @@ done:
* UDATA is undefined).
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jun 23 1997
*
*-------------------------------------------------------------------------
@@ -368,7 +366,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_find() */
-
+
/*-------------------------------------------------------------------------
* Function: H5B__split
*
@@ -386,7 +384,6 @@ done:
* returned through the NEW_ADDR argument). Negative on failure.
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 3 1997
*
*-------------------------------------------------------------------------
@@ -532,7 +529,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B__split() */
-
+
/*-------------------------------------------------------------------------
* Function: H5B_insert
*
@@ -541,7 +538,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jun 23 1997
*
*-------------------------------------------------------------------------
@@ -595,7 +591,7 @@ H5B_insert(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
if((int)(my_ins = H5B__insert_helper(f, &bt_ud, type, lt_key,
&lt_key_changed, md_key, udata, rt_key, &rt_key_changed,
&split_bt_ud/*out*/)) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to insert key")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to insert key")
/* Check if the root node split */
if(H5B_INS_NOOP == my_ins) {
@@ -612,9 +608,9 @@ H5B_insert(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
/* update left and right keys */
if(!lt_key_changed)
- H5MM_memcpy(lt_key, H5B_NKEY(bt_ud.bt,shared,0), type->sizeof_nkey);
+ H5MM_memcpy(lt_key, H5B_NKEY(bt_ud.bt,shared,0), type->sizeof_nkey);
if(!rt_key_changed)
- H5MM_memcpy(rt_key, H5B_NKEY(split_bt_ud.bt,shared,split_bt_ud.bt->nchildren), type->sizeof_nkey);
+ H5MM_memcpy(rt_key, H5B_NKEY(split_bt_ud.bt,shared,split_bt_ud.bt->nchildren), type->sizeof_nkey);
/*
* Copy the old root node to some other file location and make the new root
@@ -623,7 +619,7 @@ H5B_insert(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
*/
H5_CHECK_OVERFLOW(shared->sizeof_rnode,size_t,hsize_t);
if(HADDR_UNDEF == (old_root_addr = H5MF_alloc(f, H5FD_MEM_BTREE, (hsize_t)shared->sizeof_rnode)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "unable to allocate file space to move root")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "unable to allocate file space to move root")
/*
* Move the node to the new location
@@ -636,12 +632,12 @@ H5B_insert(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
/* Unprotect the old root so we can move it. Also force it to be marked
* dirty so it is written to the new location. */
if(H5AC_unprotect(f, H5AC_BT, bt_ud.addr, bt_ud.bt, H5AC__DIRTIED_FLAG) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release old root")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release old root")
bt_ud.bt = NULL; /* Make certain future references will be caught */
/* Move the location of the old root on the disk */
if(H5AC_move_entry(f, H5AC_BT, bt_ud.addr, old_root_addr) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to move B-tree root node")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to move B-tree root node")
bt_ud.addr = old_root_addr;
/* Update the split b-tree's left pointer to point to the new location */
@@ -699,7 +695,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 8 1997
*
*-------------------------------------------------------------------------
@@ -788,7 +783,6 @@ H5B__insert_child(H5B_t *bt, unsigned *bt_flags, unsigned idx,
* Failure: H5B_INS_ERROR
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 9 1997
*
*-------------------------------------------------------------------------
@@ -838,7 +832,7 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type,
/* Get shared info for B-tree */
if(NULL == (rc_shared = (type->get_shared)(f, udata)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, H5B_INS_ERROR, "can't retrieve B-tree's shared ref. count object")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, H5B_INS_ERROR, "can't retrieve B-tree's shared ref. count object")
shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared);
HDassert(shared);
@@ -1107,7 +1101,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_insert_helper() */
-
+
/*-------------------------------------------------------------------------
* Function: H5B__iterate_helper
*
@@ -1117,7 +1111,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jun 23 1997
*
*-------------------------------------------------------------------------
@@ -1174,7 +1167,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B__iterate_helper() */
-
+
/*-------------------------------------------------------------------------
* Function: H5B_iterate
*
@@ -1184,7 +1177,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jun 23 1997
*
*-------------------------------------------------------------------------
@@ -1213,7 +1205,7 @@ H5B_iterate(H5F_t *f, const H5B_class_t *type, haddr_t addr,
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_iterate() */
-
+
/*-------------------------------------------------------------------------
* Function: H5B__remove_helper
*
@@ -1265,7 +1257,7 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level,
/* Get shared info for B-tree */
if(NULL == (rc_shared = (type->get_shared)(f, udata)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, H5B_INS_ERROR, "can't retrieve B-tree's shared ref. count object")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, H5B_INS_ERROR, "can't retrieve B-tree's shared ref. count object")
shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared);
HDassert(shared);
@@ -1277,7 +1269,7 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level,
cache_udata.type = type;
cache_udata.rc_shared = rc_shared;
if(NULL == (bt = (H5B_t *)H5AC_protect(f, H5AC_BT, addr, &cache_udata, H5AC__NO_FLAGS_SET)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to load B-tree node")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to load B-tree node")
rt = bt->nchildren;
while(lt < rt && cmp) {
@@ -1416,7 +1408,7 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level,
bt->nchildren = 0;
/* Delete the node from disk (via the metadata cache) */
- bt_flags |= H5AC__DIRTIED_FLAG | H5AC__FREE_FILE_SPACE_FLAG;
+ bt_flags |= H5AC__DIRTIED_FLAG | H5AC__FREE_FILE_SPACE_FLAG;
H5_CHECK_OVERFLOW(shared->sizeof_rnode, size_t, hsize_t);
if(H5AC_unprotect(f, H5AC_BT, addr, bt, bt_flags | H5AC__DELETED_FLAG) < 0) {
bt = NULL;
@@ -1546,7 +1538,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B__remove_helper() */
-
+
/*-------------------------------------------------------------------------
* Function: H5B_remove
*
@@ -1593,7 +1585,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_remove() */
-
+
/*-------------------------------------------------------------------------
* Function: H5B_delete
*
@@ -1668,7 +1660,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_delete() */
-
+
/*-------------------------------------------------------------------------
* Function: H5B_shared_new
*
@@ -1678,7 +1670,6 @@ done:
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* May 27 2008
*
*-------------------------------------------------------------------------
@@ -1742,7 +1733,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_shared_new() */
-
+
/*-------------------------------------------------------------------------
* Function: H5B_shared_free
*
@@ -1774,7 +1765,7 @@ H5B_shared_free(void *_shared)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5B_shared_free() */
-
+
/*-------------------------------------------------------------------------
* Function: H5B__copy
*
@@ -1785,7 +1776,6 @@ H5B_shared_free(void *_shared)
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 18 2000
*
*-------------------------------------------------------------------------
@@ -1842,7 +1832,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B__copy() */
-
+
/*-------------------------------------------------------------------------
* Function: H5B__get_info_helper
*
@@ -1851,7 +1841,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jun 3 2008
*
*-------------------------------------------------------------------------
@@ -1884,7 +1873,7 @@ H5B__get_info_helper(H5F_t *f, const H5B_class_t *type, haddr_t addr,
/* Get shared info for B-tree */
if(NULL == (rc_shared = (type->get_shared)(f, info_udata->udata)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared);
HDassert(shared);
@@ -1896,7 +1885,7 @@ H5B__get_info_helper(H5F_t *f, const H5B_class_t *type, haddr_t addr,
cache_udata.type = type;
cache_udata.rc_shared = rc_shared;
if(NULL == (bt = (H5B_t *)H5AC_protect(f, H5AC_BT, addr, &cache_udata, H5AC__READ_ONLY_FLAG)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree node")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree node")
/* Cache information from this node */
left_child = bt->child[0];
@@ -1949,7 +1938,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B__get_info_helper() */
-
+
/*-------------------------------------------------------------------------
* Function: H5B_get_info
*
@@ -2001,7 +1990,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_get_info() */
-
+
/*-------------------------------------------------------------------------
* Function: H5B_valid
*
@@ -2055,7 +2044,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_valid() */
-
+
/*-------------------------------------------------------------------------
* Function: H5B__node_dest
*
@@ -2065,7 +2054,6 @@ done:
* Failure: FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 26, 2008
*
*-------------------------------------------------------------------------
diff --git a/src/H5B2leaf.c b/src/H5B2leaf.c
index 1fde36d..d2cfbe0 100644
--- a/src/H5B2leaf.c
+++ b/src/H5B2leaf.c
@@ -15,7 +15,7 @@
*
* Created: H5B2leaf.c
* Dec 01 2016
- * Quincey Koziol <koziol@lbl.gov>
+ * Quincey Koziol
*
* Purpose: Routines for managing v2 B-tree leaf ndoes.
*
@@ -88,7 +88,6 @@ H5FL_DEFINE(H5B2_leaf_t);
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 2 2005
*
*-------------------------------------------------------------------------
@@ -174,7 +173,6 @@ done:
* Return: Pointer to leaf node on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* May 5 2010
*
*-------------------------------------------------------------------------
@@ -266,7 +264,6 @@ done:
* Return: Non-negative on success, negative on failure.
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 9 2005
*
*-------------------------------------------------------------------------
@@ -340,7 +337,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 3 2005
*
*-------------------------------------------------------------------------
@@ -453,7 +449,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 23 2015
*
*-------------------------------------------------------------------------
@@ -608,7 +603,6 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 4 2005
*
*-------------------------------------------------------------------------
@@ -765,14 +759,14 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 3 2005
*
*-------------------------------------------------------------------------
*/
herr_t
H5B2__remove_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr,
- H5B2_nodepos_t curr_pos, void *parent, void *udata, H5B2_remove_t op, void *op_data)
+ H5B2_nodepos_t curr_pos, void *parent, void *udata, H5B2_remove_t op,
+ void *op_data)
{
H5B2_leaf_t *leaf; /* Pointer to leaf node */
haddr_t leaf_addr = HADDR_UNDEF; /* Leaf address on disk */
@@ -874,7 +868,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 14 2006
*
*-------------------------------------------------------------------------
@@ -976,7 +969,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 2 2005
*
*-------------------------------------------------------------------------
@@ -1021,7 +1013,6 @@ done:
* Return: Non-negative on success, negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 19 2005
*
*-------------------------------------------------------------------------
@@ -1045,7 +1036,6 @@ H5B2__assert_leaf(const H5B2_hdr_t H5_ATTR_NDEBUG_UNUSED *hdr,
* Return: Non-negative on success, negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 19 2005
*
*-------------------------------------------------------------------------
diff --git a/src/H5B2module.h b/src/H5B2module.h
index 35c982c..6e8c92a 100644
--- a/src/H5B2module.h
+++ b/src/H5B2module.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5B2stat.c b/src/H5B2stat.c
index 5dd9cc2..5c09b3d 100644
--- a/src/H5B2stat.c
+++ b/src/H5B2stat.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@hdfgroup.org>
+/* Programmer: Quincey Koziol
* Monday, March 6, 2006
*
* Purpose: v2 B-tree metadata statistics functions.
diff --git a/src/H5B2test.c b/src/H5B2test.c
index 7affd49..ee37c54 100644
--- a/src/H5B2test.c
+++ b/src/H5B2test.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+/* Programmer: Quincey Koziol
* Thursday, February 3, 2005
*
* Purpose: v2 B-tree testing functions.
diff --git a/src/H5Bcache.c b/src/H5Bcache.c
index c2c7a80..80fb200 100644
--- a/src/H5Bcache.c
+++ b/src/H5Bcache.c
@@ -15,7 +15,7 @@
*
* Created: H5Bcache.c
* Oct 31 2005
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Implement B-tree metadata cache methods.
*
@@ -98,7 +98,6 @@ const H5AC_class_t H5AC_BT[1] = {{
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* May 18, 2010
*
*-------------------------------------------------------------------------
@@ -135,7 +134,6 @@ H5B__cache_get_initial_load_size(void *_udata, size_t *image_len)
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 24, 2008
*
*-------------------------------------------------------------------------
@@ -241,7 +239,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* May 20, 2010
*
*-------------------------------------------------------------------------
@@ -277,7 +274,6 @@ H5B__cache_image_len(const void *_thing, size_t *image_len)
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 24, 2008
*
*-------------------------------------------------------------------------
@@ -363,7 +359,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 26, 2008
*
*-------------------------------------------------------------------------
diff --git a/src/H5Cmodule.h b/src/H5Cmodule.h
index 534404d..5b23490 100644
--- a/src/H5Cmodule.h
+++ b/src/H5Cmodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c
index f6aa3f9..6cd6263 100644
--- a/src/H5Dvirtual.c
+++ b/src/H5Dvirtual.c
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Neil Fortner <nfortne2@hdfgroup.org>
+ * Programmer: Neil Fortner
* Wednesday, January 28, 2015
*
* Purpose:
diff --git a/src/H5E.c b/src/H5E.c
index 0ce5c88..a56181d 100644
--- a/src/H5E.c
+++ b/src/H5E.c
@@ -390,7 +390,7 @@ H5E__get_stack(void)
/*-------------------------------------------------------------------------
- * Function: H5E_free_class
+ * Function: H5E__free_class
*
* Purpose: Private function to free an error class.
*
@@ -402,9 +402,9 @@ H5E__get_stack(void)
*-------------------------------------------------------------------------
*/
static herr_t
-H5E_free_class(H5E_cls_t *cls)
+H5E__free_class(H5E_cls_t *cls)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Check arguments */
HDassert(cls);
@@ -416,7 +416,7 @@ H5E_free_class(H5E_cls_t *cls)
cls = H5FL_FREE(H5E_cls_t, cls);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5E_free_class() */
+} /* end H5E__free_class() */
/*-------------------------------------------------------------------------
@@ -501,7 +501,7 @@ H5E__register_class(const char *cls_name, const char *lib_name, const char *vers
done:
if(!ret_value)
- if(cls && H5E_free_class(cls) < 0)
+ if(cls && H5E__free_class(cls) < 0)
HDONE_ERROR(H5E_ERROR, H5E_CANTRELEASE, NULL, "unable to free error class")
FUNC_LEAVE_NOAPI(ret_value)
@@ -513,9 +513,9 @@ done:
*
* Purpose: Closes an error class.
*
- * Return: Non-negative value on success/Negative on failure
+ * Return: Non-negative value on success/Negative on failure
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Friday, July 11, 2003
*
*-------------------------------------------------------------------------
@@ -571,7 +571,7 @@ H5E__unregister_class(H5E_cls_t *cls)
HGOTO_ERROR(H5E_ERROR, H5E_BADITER, FAIL, "unable to free all messages in this error class")
/* Free error class structure */
- if(H5E_free_class(cls) < 0)
+ if(H5E__free_class(cls) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTRELEASE, FAIL, "unable to free error class")
done:
@@ -1040,9 +1040,9 @@ done:
* Purpose: Replaces current stack with specified stack. This closes the
* stack ID also.
*
- * Return: Non-negative value on success/Negative on failure
+ * Return: Non-negative value on success/Negative on failure
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Friday, July 15, 2003
*
*-------------------------------------------------------------------------
@@ -1146,9 +1146,9 @@ done:
*
* Purpose: Closes an error stack.
*
- * Return: Non-negative value on success/Negative on failure
+ * Return: Non-negative value on success/Negative on failure
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Friday, July 14, 2003
*
*-------------------------------------------------------------------------
@@ -1284,9 +1284,9 @@ H5E__get_num(const H5E_t *estack)
*
* Purpose: Deletes some error messages from the top of error stack.
*
- * Return: Non-negative value on success/Negative on failure
+ * Return: Non-negative value on success/Negative on failure
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Friday, July 16, 2003
*
*-------------------------------------------------------------------------
@@ -1339,9 +1339,9 @@ done:
* function name, file name, and error description strings must
* be statically allocated.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, October 18, 1999
*
* Notes: Basically a new public API wrapper around the H5E__push_stack
@@ -1441,9 +1441,9 @@ done:
*
* Purpose: Clears the error stack for the specified error stack.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Wednesday, July 16, 2003
*
*-------------------------------------------------------------------------
@@ -1486,9 +1486,9 @@ done:
* prints error messages. Users are encouraged to write their
* own more specific error handlers.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Friday, February 27, 1998
*
*-------------------------------------------------------------------------
@@ -1531,9 +1531,9 @@ done:
* Purpose: Walks the error stack for the current thread and calls some
* function for each error along the way.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Friday, February 27, 1998
*
*-------------------------------------------------------------------------
@@ -1581,7 +1581,7 @@ done:
* Either (or both) arguments may be null in which case the
* value is not returned.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative value on success/Negative on failure
*
* Programmer: Robb Matzke
* Saturday, February 28, 1998
@@ -1639,7 +1639,7 @@ done:
* Automatic stack traversal is always in the H5E_WALK_DOWNWARD
* direction.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative value on success/Negative on failure
*
* Programmer: Robb Matzke
* Friday, February 27, 1998
@@ -1698,7 +1698,7 @@ done:
* or the H5E_auto_t typedef. The IS_STACK parameter is set
* to 1 for the first case and 0 for the latter case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative value on success/Negative on failure
*
* Programmer: Quincey Koziol
* Wednesday, September 8, 2004
diff --git a/src/H5EA.c b/src/H5EA.c
index 56663dc..bf50452 100644
--- a/src/H5EA.c
+++ b/src/H5EA.c
@@ -15,7 +15,7 @@
*
* Created: H5EA.c
* Jun 17 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Implements an "extensible array" for storing elements
* in an array whose high bounds can extend and shrink.
@@ -124,7 +124,6 @@ H5FL_BLK_DEFINE(ea_native_elmt);
* NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@lbl.gov
* Oct 10 2016
*
*-------------------------------------------------------------------------
@@ -190,7 +189,6 @@ END_FUNC(STATIC) /* end H5EA__new() */
* NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jun 17 2008
*
*-------------------------------------------------------------------------
@@ -241,7 +239,6 @@ END_FUNC(PRIV) /* end H5EA_create() */
* NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 28 2008
*
*-------------------------------------------------------------------------
@@ -283,7 +280,6 @@ END_FUNC(PRIV) /* end H5EA_open() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 21 2008
*
*-------------------------------------------------------------------------
@@ -314,7 +310,6 @@ END_FUNC(PRIV) /* end H5EA_get_nelmts() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 21 2008
*
*-------------------------------------------------------------------------
@@ -347,7 +342,6 @@ END_FUNC(PRIV) /* end H5EA_get_addr() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 9 2008
*
*-------------------------------------------------------------------------
@@ -656,7 +650,6 @@ END_FUNC(STATIC) /* end H5EA__lookup_elmt() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 9 2008
*
*-------------------------------------------------------------------------
@@ -721,7 +714,6 @@ END_FUNC(PRIV) /* end H5EA_set() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 11 2008
*
*-------------------------------------------------------------------------
@@ -786,7 +778,6 @@ END_FUNC(PRIV) /* end H5EA_get() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* May 27 2009
*
*-------------------------------------------------------------------------
@@ -836,7 +827,6 @@ END_FUNC(PRIV) /* end H5EA_depend() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 21 2008
*
*-------------------------------------------------------------------------
@@ -937,7 +927,6 @@ END_FUNC(PRIV) /* end H5EA_close() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 28 2008
*
*-------------------------------------------------------------------------
diff --git a/src/H5EAcache.c b/src/H5EAcache.c
index affa127..f7534fb 100644
--- a/src/H5EAcache.c
+++ b/src/H5EAcache.c
@@ -15,7 +15,7 @@
*
* Created: H5EAcache.c
* Aug 26 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Implement extensible array metadata cache methods.
*
@@ -239,7 +239,6 @@ const H5AC_class_t H5AC_EARRAY_DBLK_PAGE[1] = {{
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 16, 2013
*
*-------------------------------------------------------------------------
@@ -305,7 +304,6 @@ END_FUNC(STATIC) /* end H5EA__cache_hdr_verify_chksum() */
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 16, 2013
*
*-------------------------------------------------------------------------
@@ -429,7 +427,6 @@ END_FUNC(STATIC) /* end H5EA__cache_hdr_deserialize() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 16, 2013
*
*-------------------------------------------------------------------------
@@ -459,7 +456,6 @@ END_FUNC(STATIC) /* end H5EA__cache_hdr_image_len() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 16, 2013
*
*-------------------------------------------------------------------------
@@ -606,7 +602,6 @@ END_FUNC(STATIC) /* end H5EA__cache_hdr_notify() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 16, 2013
*
*-------------------------------------------------------------------------
@@ -635,7 +630,6 @@ END_FUNC(STATIC) /* end H5EA__cache_hdr_free_icr() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -708,7 +702,6 @@ END_FUNC(STATIC) /* end H5EA__cache_iblock_verify_chksum() */
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -815,7 +808,6 @@ END_FUNC(STATIC) /* end H5EA__cache_iblock_deserialize() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -845,7 +837,6 @@ END_FUNC(STATIC) /* end H5EA__cache_iblock_image_len() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -932,7 +923,6 @@ END_FUNC(STATIC) /* end H5EA__cache_iblock_serialize() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -1001,7 +991,6 @@ END_FUNC(STATIC) /* end H5EA__cache_iblock_notify() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -1030,7 +1019,6 @@ END_FUNC(STATIC) /* end H5EA__cache_iblock_free_icr() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -1122,7 +1110,6 @@ END_FUNC(STATIC) /* end H5EA__cache_sblock_verify_chksum() */
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -1226,7 +1213,6 @@ END_FUNC(STATIC) /* end H5EA__cache_sblock_deserialize() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -1256,7 +1242,6 @@ END_FUNC(STATIC) /* end H5EA__cache_sblock_image_len() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -1330,7 +1315,6 @@ END_FUNC(STATIC) /* end H5EA__cache_sblock_serialize() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 31 2009
*
*-------------------------------------------------------------------------
@@ -1414,7 +1398,6 @@ END_FUNC(STATIC) /* end H5EA__cache_sblock_notify() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -1443,7 +1426,6 @@ END_FUNC(STATIC) /* end H5EA__cache_sblock_free_icr() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -1536,7 +1518,6 @@ END_FUNC(STATIC) /* end H5EA__cache_sblock_verify_chksum() */
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -1639,7 +1620,6 @@ END_FUNC(STATIC) /* end H5EA__cache_dblock_deserialize() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -1672,7 +1652,6 @@ END_FUNC(STATIC) /* end H5EA__cache_dblock_image_len() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -1744,7 +1723,6 @@ END_FUNC(STATIC) /* end H5EA__cache_dblock_serialize() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 31 2009
*
*-------------------------------------------------------------------------
@@ -1828,7 +1806,6 @@ END_FUNC(STATIC) /* end H5EA__cache_dblock_notify() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -1904,7 +1881,6 @@ END_FUNC(STATIC) /* end H5EA__cache_dblock_fsf_size() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -1970,7 +1946,6 @@ END_FUNC(STATIC) /* end H5EA__cache_dblk_page_verify_chksum() */
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -2043,7 +2018,6 @@ END_FUNC(STATIC) /* end H5EA__cache_dblk_page_deserialize() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -2073,7 +2047,6 @@ END_FUNC(STATIC) /* end H5EA__cache_dblk_page_image_len() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -2125,7 +2098,6 @@ END_FUNC(STATIC) /* end H5EA__cache_dblk_page_serialize() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 31 2009
*
*-------------------------------------------------------------------------
@@ -2209,7 +2181,6 @@ END_FUNC(STATIC) /* end H5EA__cache_dblk_page_notify() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
diff --git a/src/H5EAdbg.c b/src/H5EAdbg.c
index 20c6a4d..e5b68be 100644
--- a/src/H5EAdbg.c
+++ b/src/H5EAdbg.c
@@ -295,7 +295,7 @@ CATCH
END_FUNC(PKG) /* end H5EA__iblock_debug() */
-
+
/*-------------------------------------------------------------------------
* Function: H5EA__sblock_debug
*
diff --git a/src/H5EAdblkpage.c b/src/H5EAdblkpage.c
index 6dd2e98..ee5c904 100644
--- a/src/H5EAdblkpage.c
+++ b/src/H5EAdblkpage.c
@@ -15,7 +15,7 @@
*
* Created: H5EAdblkpage.c
* Nov 20 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Data block page routines for extensible arrays.
*
@@ -91,7 +91,6 @@ H5FL_DEFINE_STATIC(H5EA_dblk_page_t);
* Return: Non-NULL pointer to data block on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 20 2008
*
*-------------------------------------------------------------------------
@@ -141,7 +140,6 @@ END_FUNC(PKG) /* end H5EA__dblk_page_alloc() */
* Return: Valid file address on success/HADDR_UNDEF on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 20 2008
*
*-------------------------------------------------------------------------
@@ -206,7 +204,6 @@ END_FUNC(PKG) /* end H5EA__dblk_page_create() */
* Return: Non-NULL pointer to data block page on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 20 2008
*
*-------------------------------------------------------------------------
@@ -267,7 +264,6 @@ END_FUNC(PKG) /* end H5EA__dblk_page_protect() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 20 2008
*
*-------------------------------------------------------------------------
@@ -298,7 +294,6 @@ END_FUNC(PKG) /* end H5EA__dblk_page_unprotect() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 20 2008
*
*-------------------------------------------------------------------------
diff --git a/src/H5Edeprec.c b/src/H5Edeprec.c
index 7655c33..046830f 100644
--- a/src/H5Edeprec.c
+++ b/src/H5Edeprec.c
@@ -15,7 +15,7 @@
*
* Created: H5Edeprec.c
* April 11 2007
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Deprecated functions from the H5E interface. These
* functions are here for compatibility purposes and may be
@@ -197,7 +197,7 @@ done:
* same parameter as the old function, in contrary to
* H5Epush2.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
* Programmer: Raymond Lu
* Tuesday, Sep 16, 2003
@@ -229,7 +229,7 @@ done:
* Purpose: This function is for backward compatibility.
* Clears the error stack for the specified error stack.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
* Programmer: Raymond Lu
* Wednesday, July 16, 2003
@@ -263,7 +263,7 @@ done:
* prints error messages. Users are encouraged to write there
* own more specific error handlers.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
* Programmer: Raymond Lu
* Sep 16, 2003
@@ -299,7 +299,7 @@ done:
* Walks the error stack for the current thread and calls some
* function for each error along the way.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
* Programmer: Raymond Lu
* Sep 16, 2003
@@ -340,7 +340,7 @@ done:
* Either (or both) arguments may be null in which case the
* value is not returned.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
* Programmer: Raymond Lu
* Sep 16, 2003
@@ -393,7 +393,7 @@ done:
* Automatic stack traversal is always in the H5E_WALK_DOWNWARD
* direction.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
* Programmer: Raymond Lu
* Sep 16, 2003
diff --git a/src/H5Emodule.h b/src/H5Emodule.h
index 2d1bcd0..fbfc262 100644
--- a/src/H5Emodule.h
+++ b/src/H5Emodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5Epkg.h b/src/H5Epkg.h
index 83f3816..eac5829 100644
--- a/src/H5Epkg.h
+++ b/src/H5Epkg.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Wednesday, April 11, 2007
*
* Purpose: This file contains declarations which are visible only within
diff --git a/src/H5Eprivate.h b/src/H5Eprivate.h
index 19ab729..130a8fd 100644
--- a/src/H5Eprivate.h
+++ b/src/H5Eprivate.h
@@ -180,7 +180,7 @@ extern int H5E_mpi_error_str_len;
/* Library-private functions defined in H5E package */
H5_DLL herr_t H5E_init(void);
H5_DLL herr_t H5E_printf_stack(H5E_t *estack, const char *file, const char *func,
- unsigned line, hid_t cls_id, hid_t maj_id, hid_t min_id, const char *fmt, ...)H5_ATTR_FORMAT(printf, 8, 9);
+ unsigned line, hid_t cls_id, hid_t maj_id, hid_t min_id, const char *fmt, ...) H5_ATTR_FORMAT(printf, 8, 9);
H5_DLL herr_t H5E_clear_stack(H5E_t *estack);
H5_DLL herr_t H5E_dump_api_stack(hbool_t is_api);
diff --git a/src/H5FA.c b/src/H5FA.c
index f8bb094..ee99bb2 100644
--- a/src/H5FA.c
+++ b/src/H5FA.c
@@ -15,7 +15,7 @@
*
* Created: H5FA.c
* April 2009
- * Vailin Choi <vchoi@hdfgroup.org>
+ * Vailin Choi
*
* Purpose: Implements a Fixed Array for storing elements
* of datasets with fixed dimensions.
@@ -112,7 +112,6 @@ H5FL_BLK_DEFINE(fa_native_elmt);
* NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@lbl.gov
* Oct 17 2016
*
*-------------------------------------------------------------------------
diff --git a/src/H5FAcache.c b/src/H5FAcache.c
index 8f5e696..90770fb 100644
--- a/src/H5FAcache.c
+++ b/src/H5FAcache.c
@@ -15,7 +15,7 @@
*
* Created: H5FAcache.c
* Jul 2 2009
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Implement fixed array metadata cache methods.
*
@@ -180,7 +180,6 @@ const H5AC_class_t H5AC_FARRAY_DBLK_PAGE[1] = {{
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 31, 2013
*
*-------------------------------------------------------------------------
@@ -246,7 +245,6 @@ END_FUNC(STATIC) /* end H5FA__cache_hdr_verify_chksum() */
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* August 12, 2013
*
*-------------------------------------------------------------------------
@@ -359,7 +357,6 @@ END_FUNC(STATIC) /* end H5FA__cache_hdr_deserialize() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* August 12, 2013
*
*-------------------------------------------------------------------------
@@ -389,7 +386,6 @@ END_FUNC(STATIC) /* end H5FA__cache_hdr_image_len() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* August 12, 2013
*
*-------------------------------------------------------------------------
@@ -527,7 +523,6 @@ END_FUNC(STATIC) /* end H5FA__cache_hdr_notify() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* August 12, 2013
*
*-------------------------------------------------------------------------
@@ -556,7 +551,6 @@ END_FUNC(STATIC) /* end H5FA__cache_hdr_free_icr() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* August 12, 2013
*
*-------------------------------------------------------------------------
@@ -644,7 +638,6 @@ END_FUNC(STATIC) /* end H5FA__cache_dblock_verify_chksum() */
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* August 14, 2013
*
*-------------------------------------------------------------------------
@@ -744,7 +737,6 @@ END_FUNC(STATIC) /* end H5FA__cache_dblock_deserialize() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* August 14, 2013
*
*-------------------------------------------------------------------------
@@ -777,7 +769,6 @@ END_FUNC(STATIC) /* end H5FA__cache_dblock_image_len() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* August 14, 2013
*
*-------------------------------------------------------------------------
@@ -924,7 +915,6 @@ END_FUNC(STATIC) /* end H5FA__cache_dblock_notify() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* August 14, 2013
*
*-------------------------------------------------------------------------
@@ -1001,7 +991,6 @@ END_FUNC(STATIC) /* end H5FA__cache_dblock_fsf_size() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* August 14, 2013
*
*-------------------------------------------------------------------------
@@ -1068,7 +1057,6 @@ END_FUNC(STATIC) /* end H5FA__cache_dblk_page_verify_chksum() */
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* August 14, 2013
*
*-------------------------------------------------------------------------
@@ -1141,7 +1129,6 @@ END_FUNC(STATIC) /* end H5FA__cache_dblk_page_deserialize() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* August 14, 2013
*
*-------------------------------------------------------------------------
@@ -1171,7 +1158,6 @@ END_FUNC(STATIC) /* end H5FA__cache_dblk_page_image_len() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* August 14, 2013
*
*-------------------------------------------------------------------------
@@ -1223,7 +1209,6 @@ END_FUNC(STATIC) /* end H5FA__cache_dblk_page_serialize() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@lbl.gov
* Oct 17 2016
*
*-------------------------------------------------------------------------
@@ -1286,7 +1271,6 @@ END_FUNC(STATIC) /* end H5FA__cache_dblk_page_notify() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* August 14, 2013
*
*-------------------------------------------------------------------------
diff --git a/src/H5FAhdr.c b/src/H5FAhdr.c
index 506c767..b25d50b 100644
--- a/src/H5FAhdr.c
+++ b/src/H5FAhdr.c
@@ -414,7 +414,6 @@ END_FUNC(PKG) /* end H5FA__hdr_modified() */
* Return: Non-NULL pointer to header on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 12 2013
*
*-------------------------------------------------------------------------
@@ -471,7 +470,6 @@ END_FUNC(PKG) /* end H5FA__hdr_protect() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 12 2013
*
*-------------------------------------------------------------------------
@@ -491,7 +489,7 @@ H5FA__hdr_unprotect(H5FA_hdr_t *hdr, unsigned cache_flags))
CATCH
-END_FUNC(PKG) /* end H5EA__hdr_unprotect() */
+END_FUNC(PKG) /* end H5FA__hdr_unprotect() */
/*-------------------------------------------------------------------------
diff --git a/src/H5FAint.c b/src/H5FAint.c
index 9d3bce8..3a1375a 100644
--- a/src/H5FAint.c
+++ b/src/H5FAint.c
@@ -15,7 +15,7 @@
*
* Created: H5FAint.c
* Fall 2012
- * Dana Robinson <derobins@hdfgroup.org>
+ * Dana Robinson
*
* Purpose: Internal routines for fixed arrays.
*
diff --git a/src/H5FAstat.c b/src/H5FAstat.c
index 49a56a9..882da99 100644
--- a/src/H5FAstat.c
+++ b/src/H5FAstat.c
@@ -35,9 +35,9 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FApkg.h" /* Fixed Arrays */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FApkg.h" /* Fixed Arrays */
#include "H5MMprivate.h" /* Memory management */
diff --git a/src/H5FAtest.c b/src/H5FAtest.c
index e55d408..2bcdc01 100644
--- a/src/H5FAtest.c
+++ b/src/H5FAtest.c
@@ -36,7 +36,7 @@
#include "H5Eprivate.h" /* Error handling */
#include "H5FApkg.h" /* Fixed Arrays */
#include "H5FLprivate.h" /* Free Lists */
-#include "H5VMprivate.h" /* Vector functions */
+#include "H5VMprivate.h" /* Vector functions */
/****************/
diff --git a/src/H5FDcore.c b/src/H5FDcore.c
index 40d838c..7608d61 100644
--- a/src/H5FDcore.c
+++ b/src/H5FDcore.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Tuesday, August 10, 1999
*
* Purpose: A driver which stores the HDF5 data in main memory using
@@ -143,8 +143,8 @@ static herr_t H5FD__core_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, ha
size_t size, const void *buf);
static herr_t H5FD__core_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
static herr_t H5FD__core_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
-static herr_t H5FD_core_lock(H5FD_t *_file, hbool_t rw);
-static herr_t H5FD_core_unlock(H5FD_t *_file);
+static herr_t H5FD__core_lock(H5FD_t *_file, hbool_t rw);
+static herr_t H5FD__core_unlock(H5FD_t *_file);
static const H5FD_class_t H5FD_core_g = {
"core", /* name */
@@ -176,8 +176,8 @@ static const H5FD_class_t H5FD_core_g = {
H5FD__core_write, /* write */
H5FD__core_flush, /* flush */
H5FD__core_truncate, /* truncate */
- H5FD_core_lock, /* lock */
- H5FD_core_unlock, /* unlock */
+ H5FD__core_lock, /* lock */
+ H5FD__core_unlock, /* unlock */
H5FD_FLMAP_DICHOTOMY /* fl_map */
};
@@ -344,7 +344,7 @@ H5FD__core_write_to_bstore(H5FD_core_t *file, haddr_t addr, size_t size)
HDoff_t offset = (HDoff_t)addr; /* Offset to write at */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(file);
@@ -439,8 +439,8 @@ done:
* Purpose: Initialize this driver by registering the driver with the
* library.
*
- * Return: Success: The driver ID for the core driver.
- * Failure: Negative.
+ * Return: Success: The driver ID for the core driver
+ * Failure: H5I_INVALID_HID
*
* Programmer: Robb Matzke
* Thursday, July 29, 1999
@@ -452,7 +452,7 @@ H5FD_core_init(void)
{
hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI(H5I_INVALID_HID)
if(H5I_VFL != H5I_get_type(H5FD_CORE_g))
H5FD_CORE_g = H5FD_register(&H5FD_core_g, sizeof(H5FD_class_t), FALSE);
@@ -1505,7 +1505,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_core_lock
+ * Function: H5FD__core_lock
*
* Purpose: To place an advisory lock on a file.
* The lock type to apply depends on the parameter "rw":
@@ -1519,13 +1519,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_core_lock(H5FD_t *_file, hbool_t rw)
+H5FD__core_lock(H5FD_t *_file, hbool_t rw)
{
H5FD_core_t *file = (H5FD_core_t*)_file; /* VFD file struct */
int lock_flags; /* file locking flags */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(file);
@@ -1551,11 +1551,11 @@ H5FD_core_lock(H5FD_t *_file, hbool_t rw)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_core_lock() */
+} /* end H5FD__core_lock() */
/*-------------------------------------------------------------------------
- * Function: H5FD_core_unlock
+ * Function: H5FD__core_unlock
*
* Purpose: To remove the existing lock on the file
*
@@ -1566,12 +1566,12 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_core_unlock(H5FD_t *_file)
+H5FD__core_unlock(H5FD_t *_file)
{
H5FD_core_t *file = (H5FD_core_t*)_file; /* VFD file struct */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(file);
@@ -1589,5 +1589,5 @@ H5FD_core_unlock(H5FD_t *_file)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_core_unlock() */
+} /* end H5FD__core_unlock() */
diff --git a/src/H5FDcore.h b/src/H5FDcore.h
index 5fe2912..63b6f27 100644
--- a/src/H5FDcore.h
+++ b/src/H5FDcore.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Monday, August 2, 1999
*
* Purpose: The public header file for the core driver.
diff --git a/src/H5FDdirect.h b/src/H5FDdirect.h
index 805f3be..630a1e6 100644
--- a/src/H5FDdirect.h
+++ b/src/H5FDdirect.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Raymond Lu <slu@hdfgroup.uiuc.edu>
+ * Programmer: Raymond Lu
* Wednesday, 20 September 2006
*
* Purpose: The public header file for the direct driver.
diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c
index 154878e..290d743 100644
--- a/src/H5FDfamily.c
+++ b/src/H5FDfamily.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Monday, November 10, 1997
*
* Purpose: Implements a family of files that acts as a single hdf5
@@ -79,67 +79,67 @@ typedef struct H5FD_family_fapl_t {
} H5FD_family_fapl_t;
/* Callback prototypes */
-static herr_t H5FD_family_term(void);
-static void *H5FD_family_fapl_get(H5FD_t *_file);
-static void *H5FD_family_fapl_copy(const void *_old_fa);
-static herr_t H5FD_family_fapl_free(void *_fa);
-static hsize_t H5FD_family_sb_size(H5FD_t *_file);
-static herr_t H5FD_family_sb_encode(H5FD_t *_file, char *name/*out*/,
+static herr_t H5FD__family_term(void);
+static void *H5FD__family_fapl_get(H5FD_t *_file);
+static void *H5FD__family_fapl_copy(const void *_old_fa);
+static herr_t H5FD__family_fapl_free(void *_fa);
+static hsize_t H5FD__family_sb_size(H5FD_t *_file);
+static herr_t H5FD__family_sb_encode(H5FD_t *_file, char *name/*out*/,
unsigned char *buf/*out*/);
-static herr_t H5FD_family_sb_decode(H5FD_t *_file, const char *name,
+static herr_t H5FD__family_sb_decode(H5FD_t *_file, const char *name,
const unsigned char *buf);
-static H5FD_t *H5FD_family_open(const char *name, unsigned flags,
+static H5FD_t *H5FD__family_open(const char *name, unsigned flags,
hid_t fapl_id, haddr_t maxaddr);
-static herr_t H5FD_family_close(H5FD_t *_file);
-static int H5FD_family_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
-static herr_t H5FD_family_query(const H5FD_t *_f1, unsigned long *flags);
-static haddr_t H5FD_family_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
-static herr_t H5FD_family_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t eoa);
-static haddr_t H5FD_family_get_eof(const H5FD_t *_file, H5FD_mem_t type);
-static herr_t H5FD_family_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
-static herr_t H5FD_family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
+static herr_t H5FD__family_close(H5FD_t *_file);
+static int H5FD__family_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
+static herr_t H5FD__family_query(const H5FD_t *_f1, unsigned long *flags);
+static haddr_t H5FD__family_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
+static herr_t H5FD__family_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t eoa);
+static haddr_t H5FD__family_get_eof(const H5FD_t *_file, H5FD_mem_t type);
+static herr_t H5FD__family_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
+static herr_t H5FD__family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
size_t size, void *_buf/*out*/);
-static herr_t H5FD_family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
+static herr_t H5FD__family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
size_t size, const void *_buf);
-static herr_t H5FD_family_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
-static herr_t H5FD_family_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
-static herr_t H5FD_family_lock(H5FD_t *_file, hbool_t rw);
-static herr_t H5FD_family_unlock(H5FD_t *_file);
+static herr_t H5FD__family_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
+static herr_t H5FD__family_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
+static herr_t H5FD__family_lock(H5FD_t *_file, hbool_t rw);
+static herr_t H5FD__family_unlock(H5FD_t *_file);
/* The class struct */
static const H5FD_class_t H5FD_family_g = {
- "family", /*name */
- HADDR_MAX, /*maxaddr */
- H5F_CLOSE_WEAK, /*fc_degree */
- H5FD_family_term, /*terminate */
- H5FD_family_sb_size, /*sb_size */
- H5FD_family_sb_encode, /*sb_encode */
- H5FD_family_sb_decode, /*sb_decode */
- sizeof(H5FD_family_fapl_t), /*fapl_size */
- H5FD_family_fapl_get, /*fapl_get */
- H5FD_family_fapl_copy, /*fapl_copy */
- H5FD_family_fapl_free, /*fapl_free */
- 0, /*dxpl_size */
- NULL, /*dxpl_copy */
- NULL, /*dxpl_free */
- H5FD_family_open, /*open */
- H5FD_family_close, /*close */
- H5FD_family_cmp, /*cmp */
- H5FD_family_query, /*query */
- NULL, /*get_type_map */
- NULL, /*alloc */
- NULL, /*free */
- H5FD_family_get_eoa, /*get_eoa */
- H5FD_family_set_eoa, /*set_eoa */
- H5FD_family_get_eof, /*get_eof */
- H5FD_family_get_handle, /*get_handle */
- H5FD_family_read, /*read */
- H5FD_family_write, /*write */
- H5FD_family_flush, /*flush */
- H5FD_family_truncate, /*truncate */
- H5FD_family_lock, /*lock */
- H5FD_family_unlock, /*unlock */
- H5FD_FLMAP_DICHOTOMY /*fl_map */
+ "family", /* name */
+ HADDR_MAX, /* maxaddr */
+ H5F_CLOSE_WEAK, /* fc_degree */
+ H5FD__family_term, /* terminate */
+ H5FD__family_sb_size, /* sb_size */
+ H5FD__family_sb_encode, /* sb_encode */
+ H5FD__family_sb_decode, /* sb_decode */
+ sizeof(H5FD_family_fapl_t), /* fapl_size */
+ H5FD__family_fapl_get, /* fapl_get */
+ H5FD__family_fapl_copy, /* fapl_copy */
+ H5FD__family_fapl_free, /* fapl_free */
+ 0, /* dxpl_size */
+ NULL, /* dxpl_copy */
+ NULL, /* dxpl_free */
+ H5FD__family_open, /* open */
+ H5FD__family_close, /* close */
+ H5FD__family_cmp, /* cmp */
+ H5FD__family_query, /* query */
+ NULL, /* get_type_map */
+ NULL, /* alloc */
+ NULL, /* free */
+ H5FD__family_get_eoa, /* get_eoa */
+ H5FD__family_set_eoa, /* set_eoa */
+ H5FD__family_get_eof, /* get_eof */
+ H5FD__family_get_handle, /* get_handle */
+ H5FD__family_read, /* read */
+ H5FD__family_write, /* write */
+ H5FD__family_flush, /* flush */
+ H5FD__family_truncate, /* truncate */
+ H5FD__family_lock, /* lock */
+ H5FD__family_unlock, /* unlock */
+ H5FD_FLMAP_DICHOTOMY /* fl_map */
};
@@ -203,7 +203,7 @@ done:
/*---------------------------------------------------------------------------
- * Function: H5FD_family_term
+ * Function: H5FD__family_term
*
* Purpose: Shut down the VFD
*
@@ -215,15 +215,15 @@ done:
*---------------------------------------------------------------------------
*/
static herr_t
-H5FD_family_term(void)
+H5FD__family_term(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Reset VFL ID */
H5FD_FAMILY_g=0;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5FD_family_term() */
+} /* end H5FD__family_term() */
/*-------------------------------------------------------------------------
@@ -242,13 +242,6 @@ H5FD_family_term(void)
* Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- *
- * Raymond Lu
- * Tuesday, Oct 23, 2001
- * Changed the file access list to the new generic property
- * list.
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -296,13 +289,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- *
- * Raymond Lu
- * Tuesday, Oct 23, 2001
- * Changed the file access list to the new generic property
- * list.
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -335,7 +321,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_family_fapl_get
+ * Function: H5FD__family_fapl_get
*
* Purpose: Gets a file access property list which could be used to
* create an identical file.
@@ -347,19 +333,17 @@ done:
* Programmer: Robb Matzke
* Friday, August 13, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void *
-H5FD_family_fapl_get(H5FD_t *_file)
+H5FD__family_fapl_get(H5FD_t *_file)
{
H5FD_family_t *file = (H5FD_family_t*)_file;
H5FD_family_fapl_t *fa = NULL;
H5P_genplist_t *plist; /* Property list pointer */
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
if(NULL == (fa = (H5FD_family_fapl_t *)H5MM_calloc(sizeof(H5FD_family_fapl_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -373,16 +357,16 @@ H5FD_family_fapl_get(H5FD_t *_file)
ret_value=fa;
done:
- if(ret_value==NULL) {
+ if(ret_value==NULL)
if(fa!=NULL)
H5MM_xfree(fa);
- } /* end if */
+
FUNC_LEAVE_NOAPI(ret_value)
}
/*-------------------------------------------------------------------------
- * Function: H5FD_family_fapl_copy
+ * Function: H5FD__family_fapl_copy
*
* Purpose: Copies the family-specific file access properties.
*
@@ -393,19 +377,17 @@ done:
* Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void *
-H5FD_family_fapl_copy(const void *_old_fa)
+H5FD__family_fapl_copy(const void *_old_fa)
{
const H5FD_family_fapl_t *old_fa = (const H5FD_family_fapl_t*)_old_fa;
H5FD_family_fapl_t *new_fa = NULL;
H5P_genplist_t *plist; /* Property list pointer */
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
if(NULL == (new_fa = (H5FD_family_fapl_t *)H5MM_malloc(sizeof(H5FD_family_fapl_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -428,16 +410,16 @@ H5FD_family_fapl_copy(const void *_old_fa)
ret_value=new_fa;
done:
- if(ret_value==NULL) {
+ if(ret_value==NULL)
if(new_fa!=NULL)
H5MM_xfree(new_fa);
- } /* end if */
+
FUNC_LEAVE_NOAPI(ret_value)
}
/*-------------------------------------------------------------------------
- * Function: H5FD_family_fapl_free
+ * Function: H5FD__family_fapl_free
*
* Purpose: Frees the family-specific file access properties.
*
@@ -448,17 +430,15 @@ done:
* Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_family_fapl_free(void *_fa)
+H5FD__family_fapl_free(void *_fa)
{
H5FD_family_fapl_t *fa = (H5FD_family_fapl_t*)_fa;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
if(H5I_dec_ref(fa->memb_fapl_id) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTDEC, FAIL, "can't close driver ID")
@@ -470,7 +450,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_family_sb_size
+ * Function: H5FD__family_sb_size
*
* Purpose: Returns the size of the private information to be stored in
* the superblock.
@@ -482,14 +462,12 @@ done:
* Programmer: Raymond Lu
* Tuesday, May 10, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static hsize_t
-H5FD_family_sb_size(H5FD_t H5_ATTR_UNUSED *_file)
+H5FD__family_sb_size(H5FD_t H5_ATTR_UNUSED *_file)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* 8 bytes field for the size of member file size field should be
* enough for now. */
@@ -498,7 +476,7 @@ H5FD_family_sb_size(H5FD_t H5_ATTR_UNUSED *_file)
/*-------------------------------------------------------------------------
- * Function: H5FD_family_sb_encode
+ * Function: H5FD__family_sb_encode
*
* Purpose: Encode driver information for the superblock. The NAME
* argument is a nine-byte buffer which will be initialized with
@@ -513,16 +491,14 @@ H5FD_family_sb_size(H5FD_t H5_ATTR_UNUSED *_file)
* Programmer: Raymond Lu
* Tuesday, May 10, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_family_sb_encode(H5FD_t *_file, char *name/*out*/, unsigned char *buf/*out*/)
+H5FD__family_sb_encode(H5FD_t *_file, char *name/*out*/, unsigned char *buf/*out*/)
{
H5FD_family_t *file = (H5FD_family_t*)_file;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Name and version number */
HDstrncpy(name, "NCSAfami", (size_t)9);
@@ -532,18 +508,18 @@ H5FD_family_sb_encode(H5FD_t *_file, char *name/*out*/, unsigned char *buf/*out*
* This is to guarantee backward compatibility. If a file is created with
* v1.6 library and the driver info isn't saved in the superblock. We open
* it with v1.8, the FILE->MEMB_SIZE will be the actual size of the first
- * member file (see H5FD_family_open). So it isn't safe to use FILE->MEMB_SIZE.
+ * member file (see H5FD__family_open). So it isn't safe to use FILE->MEMB_SIZE.
* If the file is created with v1.8, the correctness of FILE->PMEM_SIZE is
- * checked in H5FD_family_sb_decode. SLU - 2009/3/21
+ * checked in H5FD__family_sb_decode. SLU - 2009/3/21
*/
UINT64ENCODE(buf, (uint64_t)file->pmem_size);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5FD_family_sb_encode() */
+} /* end H5FD__family_sb_encode() */
/*-------------------------------------------------------------------------
- * Function: H5FD_family_sb_decode
+ * Function: H5FD__family_sb_decode
*
* Purpose: This function has 2 separate purpose. One is to decodes the
* superblock information for this driver. The NAME argument is
@@ -561,13 +537,13 @@ H5FD_family_sb_encode(H5FD_t *_file, char *name/*out*/, unsigned char *buf/*out*
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_family_sb_decode(H5FD_t *_file, const char H5_ATTR_UNUSED *name, const unsigned char *buf)
+H5FD__family_sb_decode(H5FD_t *_file, const char H5_ATTR_UNUSED *name, const unsigned char *buf)
{
H5FD_family_t *file = (H5FD_family_t*)_file;
uint64_t msize;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Read member file size. Skip name template for now although it's saved. */
UINT64DECODE(buf, msize);
@@ -594,11 +570,11 @@ H5FD_family_sb_decode(H5FD_t *_file, const char H5_ATTR_UNUSED *name, const unsi
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_family_sb_decode() */
+} /* end H5FD__family_sb_decode() */
/*-------------------------------------------------------------------------
- * Function: H5FD_family_open
+ * Function: H5FD__family_open
*
* Purpose: Creates and/or opens a family of files as an HDF5 file.
*
@@ -621,7 +597,7 @@ done:
*/
H5_GCC_DIAG_OFF(format-nonliteral)
static H5FD_t *
-H5FD_family_open(const char *name, unsigned flags, hid_t fapl_id,
+H5FD__family_open(const char *name, unsigned flags, hid_t fapl_id,
haddr_t maxaddr)
{
H5FD_family_t *file = NULL;
@@ -630,7 +606,7 @@ H5FD_family_open(const char *name, unsigned flags, hid_t fapl_id,
unsigned t_flags = flags & ~H5F_ACC_CREAT;
H5FD_t *ret_value = NULL;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Check arguments */
if(!name || !*name)
@@ -769,12 +745,12 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_family_open() */
+} /* end H5FD__family_open() */
H5_GCC_DIAG_ON(format-nonliteral)
/*-------------------------------------------------------------------------
- * Function: H5FD_family_close
+ * Function: H5FD__family_close
*
* Purpose: Closes a family of files.
*
@@ -790,14 +766,14 @@ H5_GCC_DIAG_ON(format-nonliteral)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_family_close(H5FD_t *_file)
+H5FD__family_close(H5FD_t *_file)
{
H5FD_family_t *file = (H5FD_family_t*)_file;
unsigned nerrors = 0; /* Number of errors while closing member files */
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Close as many members as possible. Use private function here to avoid clearing
* the error stack. We need the error message to indicate wrong member file size. */
@@ -822,11 +798,11 @@ H5FD_family_close(H5FD_t *_file)
H5MM_xfree(file);
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_family_close() */
+} /* end H5FD__family_close() */
/*-------------------------------------------------------------------------
- * Function: H5FD_family_cmp
+ * Function: H5FD__family_cmp
*
* Purpose: Compares two file families to see if they are the same. It
* does this by comparing the first member of the two families.
@@ -839,18 +815,16 @@ H5FD_family_close(H5FD_t *_file)
* Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
-H5FD_family_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
+H5FD__family_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
{
const H5FD_family_t *f1 = (const H5FD_family_t*)_f1;
const H5FD_family_t *f2 = (const H5FD_family_t*)_f2;
int ret_value = 0;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(f1->nmembs >= 1 && f1->memb[0]);
HDassert(f2->nmembs >= 1 && f2->memb[0]);
@@ -858,11 +832,11 @@ H5FD_family_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
ret_value = H5FDcmp(f1->memb[0], f2->memb[0]);
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_family_cmp() */
+} /* end H5FD__family_cmp() */
/*-------------------------------------------------------------------------
- * Function: H5FD_family_query
+ * Function: H5FD__family_query
*
* Purpose: Set the flags that this VFL driver is capable of supporting.
* (listed in H5FDpublic.h)
@@ -876,11 +850,11 @@ H5FD_family_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_family_query(const H5FD_t * _file, unsigned long *flags /* out */)
+H5FD__family_query(const H5FD_t * _file, unsigned long *flags /* out */)
{
const H5FD_family_t *file = (const H5FD_family_t*)_file; /* Family VFD info */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Set the VFL feature flags that this driver supports */
if(flags) {
@@ -896,11 +870,11 @@ H5FD_family_query(const H5FD_t * _file, unsigned long *flags /* out */)
} /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5FD_family_query() */
+} /* end H5FD__family_query() */
/*-------------------------------------------------------------------------
- * Function: H5FD_family_get_eoa
+ * Function: H5FD__family_get_eoa
*
* Purpose: Returns the end-of-address marker for the file. The EOA
* marker is the first address past the last byte allocated in
@@ -913,26 +887,21 @@ H5FD_family_query(const H5FD_t * _file, unsigned long *flags /* out */)
* Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- * Raymond Lu
- * 21 Dec. 2006
- * Added the parameter TYPE. It's only used for MULTI driver.
- *
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_family_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
+H5FD__family_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_family_t *file = (const H5FD_family_t*)_file;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
FUNC_LEAVE_NOAPI(file->eoa)
}
/*-------------------------------------------------------------------------
- * Function: H5FD_family_set_eoa
+ * Function: H5FD__family_set_eoa
*
* Purpose: Set the end-of-address marker for the file.
*
@@ -943,11 +912,6 @@ H5FD_family_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
* Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- * Raymond Lu
- * 21 Dec. 2006
- * Added the parameter TYPE. It's only used for MULTI driver.
- *
*-------------------------------------------------------------------------
*/
/* Disable warning for "format not a string literal" here -QAK */
@@ -958,7 +922,7 @@ H5FD_family_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
*/
H5_GCC_DIAG_OFF(format-nonliteral)
static herr_t
-H5FD_family_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t abs_eoa)
+H5FD__family_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t abs_eoa)
{
H5FD_family_t *file = (H5FD_family_t*)_file;
haddr_t addr = abs_eoa;
@@ -966,7 +930,7 @@ H5FD_family_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t abs_eoa)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Allocate space for the member name buffer */
if(NULL == (memb_name = (char *)H5MM_malloc(H5FD_FAM_MEMB_NAME_BUF_SIZE)))
@@ -1027,7 +991,7 @@ H5_GCC_DIAG_ON(format-nonliteral)
/*-------------------------------------------------------------------------
- * Function: H5FD_family_get_eof
+ * Function: H5FD__family_get_eof
*
* Purpose: Returns the end-of-file marker, which is the greater of
* either the total family size or the current EOA marker.
@@ -1041,19 +1005,17 @@ H5_GCC_DIAG_ON(format-nonliteral)
* Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_family_get_eof(const H5FD_t *_file, H5FD_mem_t type)
+H5FD__family_get_eof(const H5FD_t *_file, H5FD_mem_t type)
{
const H5FD_family_t *file = (const H5FD_family_t*)_file;
haddr_t eof=0;
int i; /* Local index variable */
haddr_t ret_value = HADDR_UNDEF; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/*
* Find the last member that has a non-zero EOF and break out of the loop
@@ -1085,7 +1047,7 @@ H5FD_family_get_eof(const H5FD_t *_file, H5FD_mem_t type)
/*-------------------------------------------------------------------------
- * Function: H5FD_family_get_handle
+ * Function: H5FD__family_get_handle
*
* Purpose: Returns the file handle of FAMILY file driver.
*
@@ -1094,12 +1056,10 @@ H5FD_family_get_eof(const H5FD_t *_file, H5FD_mem_t type)
* Programmer: Raymond Lu
* Sept. 16, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_family_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle)
+H5FD__family_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle)
{
H5FD_family_t *file = (H5FD_family_t *)_file;
H5P_genplist_t *plist;
@@ -1107,7 +1067,7 @@ H5FD_family_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle)
int memb;
herr_t ret_value = FAIL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Get the plist structure and family offset */
if(NULL == (plist = H5P_object_verify(fapl, H5P_FILE_ACCESS)))
@@ -1127,7 +1087,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_family_read
+ * Function: H5FD__family_read
*
* Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR
* into buffer BUF according to data transfer properties in
@@ -1141,12 +1101,10 @@ done:
* Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
+H5FD__family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
void *_buf/*out*/)
{
H5FD_family_t *file = (H5FD_family_t*)_file;
@@ -1158,7 +1116,7 @@ H5FD_family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, si
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/*
* Get the member data transfer property list. If the transfer property
@@ -1197,7 +1155,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_family_write
+ * Function: H5FD__family_write
*
* Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
* from buffer BUF according to data transfer properties in
@@ -1210,12 +1168,10 @@ done:
* Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
+H5FD__family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
const void *_buf)
{
H5FD_family_t *file = (H5FD_family_t*)_file;
@@ -1227,7 +1183,7 @@ H5FD_family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, s
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/*
* Get the member data transfer property list. If the transfer property
@@ -1266,7 +1222,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_family_flush
+ * Function: H5FD__family_flush
*
* Purpose: Flushes all family members.
*
@@ -1279,13 +1235,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_family_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
+H5FD__family_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
{
H5FD_family_t *file = (H5FD_family_t*)_file;
unsigned u, nerrors = 0;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
for(u = 0; u < file->nmembs; u++)
if(file->memb[u] && H5FD_flush(file->memb[u], closing) < 0)
@@ -1296,11 +1252,11 @@ H5FD_family_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_family_flush() */
+} /* end H5FD__family_flush() */
/*-------------------------------------------------------------------------
- * Function: H5FD_family_truncate
+ * Function: H5FD__family_truncate
*
* Purpose: Truncates all family members.
*
@@ -1314,13 +1270,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_family_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
+H5FD__family_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
{
H5FD_family_t *file = (H5FD_family_t*)_file;
unsigned u, nerrors = 0;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
for(u = 0; u < file->nmembs; u++)
if(file->memb[u] && H5FD_truncate(file->memb[u], closing) < 0)
@@ -1331,11 +1287,11 @@ H5FD_family_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closin
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_family_truncate() */
+} /* end H5FD__family_truncate() */
/*-------------------------------------------------------------------------
- * Function: H5FD_family_lock
+ * Function: H5FD__family_lock
*
* Purpose: To place an advisory lock on a file.
* The lock type to apply depends on the parameter "rw":
@@ -1349,13 +1305,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_family_lock(H5FD_t *_file, hbool_t rw)
+H5FD__family_lock(H5FD_t *_file, hbool_t rw)
{
H5FD_family_t *file = (H5FD_family_t *)_file; /* VFD file struct */
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Place the lock on all the member files */
for(u = 0; u < file->nmembs; u++)
@@ -1379,11 +1335,11 @@ H5FD_family_lock(H5FD_t *_file, hbool_t rw)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_family_lock() */
+} /* end H5FD__family_lock() */
/*-------------------------------------------------------------------------
- * Function: H5FD_family_unlock
+ * Function: H5FD__family_unlock
*
* Purpose: To remove the existing lock on the file
*
@@ -1394,13 +1350,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_family_unlock(H5FD_t *_file)
+H5FD__family_unlock(H5FD_t *_file)
{
H5FD_family_t *file = (H5FD_family_t *)_file; /* VFD file struct */
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Remove the lock on the member files */
for(u = 0; u < file->nmembs; u++)
@@ -1410,5 +1366,5 @@ H5FD_family_unlock(H5FD_t *_file)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_family_unlock() */
+} /* end H5FD__family_unlock() */
diff --git a/src/H5FDfamily.h b/src/H5FDfamily.h
index 1584cf6..45bdccc 100644
--- a/src/H5FDfamily.h
+++ b/src/H5FDfamily.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Monday, August 4, 1999
*
* Purpose: The public header file for the family driver.
diff --git a/src/H5FDmpi.h b/src/H5FDmpi.h
index 2d62c79..da9f59b 100644
--- a/src/H5FDmpi.h
+++ b/src/H5FDmpi.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Friday, January 30, 2004
*
* Purpose: The public header file for common items for all MPI VFL drivers
diff --git a/src/H5FDmpio.h b/src/H5FDmpio.h
index 6ee0a1a..9d02153 100644
--- a/src/H5FDmpio.h
+++ b/src/H5FDmpio.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Monday, August 2, 1999
*
* Purpose: The public header file for the mpio driver.
diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c
index f80cac5..d183511 100644
--- a/src/H5FDmulti.c
+++ b/src/H5FDmulti.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Monday, November 10, 1997
*
* Purpose: Implements a file driver which dispatches I/O requests to
@@ -1234,14 +1234,6 @@ H5FD_multi_get_type_map(const H5FD_t *_file, H5FD_mem_t *type_map)
* Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- * Raymond Lu
- * 21 Dec. 2006
- * Added the parameter TYPE. It's only used for MULTI driver.
- * If the TYPE is H5FD_MEM_DEFAULT, simply find the biggest
- * EOA of individual file because the EOA for the whole file
- * is meaningless.
- *
*-------------------------------------------------------------------------
*/
static haddr_t
@@ -1334,17 +1326,6 @@ H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type)
* Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- * Raymond Lu
- * 10 January 2007
- * EOA for the whole file is discarded because it's meaningless
- * for MULTI file. This function only sets eoa for individual
- * file.
- *
- * Raymond Lu
- * 21 June 2011
- * Backward compatibility of EOA. Please the comment in the
- * code.
*-------------------------------------------------------------------------
*/
static herr_t
diff --git a/src/H5FDmulti.h b/src/H5FDmulti.h
index 0bd5718..b3c3c62 100644
--- a/src/H5FDmulti.h
+++ b/src/H5FDmulti.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Monday, August 2, 1999
*
* Purpose: The public header file for the "multi" driver.
diff --git a/src/H5FDpkg.h b/src/H5FDpkg.h
index 22b5d17..8ffffd1 100644
--- a/src/H5FDpkg.h
+++ b/src/H5FDpkg.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Thursday, January 3, 2008
*
* Purpose: This file contains declarations which are visible only within
diff --git a/src/H5FDprivate.h b/src/H5FDprivate.h
index 7e9e610..c5bc043 100644
--- a/src/H5FDprivate.h
+++ b/src/H5FDprivate.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Monday, July 26, 1999
*/
#ifndef _H5FDprivate_H
diff --git a/src/H5FDpublic.h b/src/H5FDpublic.h
index 61bf212..7297cf8 100644
--- a/src/H5FDpublic.h
+++ b/src/H5FDpublic.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Monday, July 26, 1999
*/
#ifndef _H5FDpublic_H
diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c
index ce11c05..147d08f 100644
--- a/src/H5FDsec2.c
+++ b/src/H5FDsec2.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Thursday, July 29, 1999
*
* Purpose: The POSIX unbuffered file driver using only the HDF5 public
@@ -99,7 +99,6 @@ typedef struct H5FD_sec2_t {
* a single file.
*/
hbool_t fam_to_single;
-
} H5FD_sec2_t;
/*
@@ -117,37 +116,37 @@ typedef struct H5FD_sec2_t {
* which can be addressed entirely by the second
* argument of the file seek function.
*/
-#define MAXADDR (((haddr_t)1<<(8*sizeof(HDoff_t)-1))-1)
-#define ADDR_OVERFLOW(A) (HADDR_UNDEF==(A) || ((A) & ~(haddr_t)MAXADDR))
+#define MAXADDR (((haddr_t)1 << (8 * sizeof(HDoff_t) - 1)) - 1)
+#define ADDR_OVERFLOW(A) (HADDR_UNDEF == (A) || ((A) & ~(haddr_t)MAXADDR))
#define SIZE_OVERFLOW(Z) ((Z) & ~(hsize_t)MAXADDR)
#define REGION_OVERFLOW(A,Z) (ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || \
- HADDR_UNDEF==(A)+(Z) || \
- (HDoff_t)((A)+(Z))<(HDoff_t)(A))
+ HADDR_UNDEF == (A) + (Z) || \
+ (HDoff_t)((A) + (Z)) < (HDoff_t)(A))
/* Prototypes */
-static herr_t H5FD_sec2_term(void);
-static H5FD_t *H5FD_sec2_open(const char *name, unsigned flags, hid_t fapl_id,
+static herr_t H5FD__sec2_term(void);
+static H5FD_t *H5FD__sec2_open(const char *name, unsigned flags, hid_t fapl_id,
haddr_t maxaddr);
-static herr_t H5FD_sec2_close(H5FD_t *_file);
-static int H5FD_sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
-static herr_t H5FD_sec2_query(const H5FD_t *_f1, unsigned long *flags);
-static haddr_t H5FD_sec2_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
-static herr_t H5FD_sec2_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
-static haddr_t H5FD_sec2_get_eof(const H5FD_t *_file, H5FD_mem_t type);
-static herr_t H5FD_sec2_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
-static herr_t H5FD_sec2_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
+static herr_t H5FD__sec2_close(H5FD_t *_file);
+static int H5FD__sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
+static herr_t H5FD__sec2_query(const H5FD_t *_f1, unsigned long *flags);
+static haddr_t H5FD__sec2_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
+static herr_t H5FD__sec2_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
+static haddr_t H5FD__sec2_get_eof(const H5FD_t *_file, H5FD_mem_t type);
+static herr_t H5FD__sec2_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
+static herr_t H5FD__sec2_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
size_t size, void *buf);
-static herr_t H5FD_sec2_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
+static herr_t H5FD__sec2_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
size_t size, const void *buf);
-static herr_t H5FD_sec2_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
-static herr_t H5FD_sec2_lock(H5FD_t *_file, hbool_t rw);
-static herr_t H5FD_sec2_unlock(H5FD_t *_file);
+static herr_t H5FD__sec2_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
+static herr_t H5FD__sec2_lock(H5FD_t *_file, hbool_t rw);
+static herr_t H5FD__sec2_unlock(H5FD_t *_file);
static const H5FD_class_t H5FD_sec2_g = {
"sec2", /* name */
MAXADDR, /* maxaddr */
H5F_CLOSE_WEAK, /* fc_degree */
- H5FD_sec2_term, /* terminate */
+ H5FD__sec2_term, /* terminate */
NULL, /* sb_size */
NULL, /* sb_encode */
NULL, /* sb_decode */
@@ -158,23 +157,23 @@ static const H5FD_class_t H5FD_sec2_g = {
0, /* dxpl_size */
NULL, /* dxpl_copy */
NULL, /* dxpl_free */
- H5FD_sec2_open, /* open */
- H5FD_sec2_close, /* close */
- H5FD_sec2_cmp, /* cmp */
- H5FD_sec2_query, /* query */
+ H5FD__sec2_open, /* open */
+ H5FD__sec2_close, /* close */
+ H5FD__sec2_cmp, /* cmp */
+ H5FD__sec2_query, /* query */
NULL, /* get_type_map */
NULL, /* alloc */
NULL, /* free */
- H5FD_sec2_get_eoa, /* get_eoa */
- H5FD_sec2_set_eoa, /* set_eoa */
- H5FD_sec2_get_eof, /* get_eof */
- H5FD_sec2_get_handle, /* get_handle */
- H5FD_sec2_read, /* read */
- H5FD_sec2_write, /* write */
+ H5FD__sec2_get_eoa, /* get_eoa */
+ H5FD__sec2_set_eoa, /* set_eoa */
+ H5FD__sec2_get_eof, /* get_eof */
+ H5FD__sec2_get_handle, /* get_handle */
+ H5FD__sec2_read, /* read */
+ H5FD__sec2_write, /* write */
NULL, /* flush */
- H5FD_sec2_truncate, /* truncate */
- H5FD_sec2_lock, /* lock */
- H5FD_sec2_unlock, /* unlock */
+ H5FD__sec2_truncate, /* truncate */
+ H5FD__sec2_lock, /* lock */
+ H5FD__sec2_unlock, /* unlock */
H5FD_FLMAP_DICHOTOMY /* fl_map */
};
@@ -233,7 +232,7 @@ done:
hid_t
H5FD_sec2_init(void)
{
- hid_t ret_value = H5I_INVALID_HID; /* Return value */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
FUNC_ENTER_NOAPI(H5I_INVALID_HID)
@@ -249,7 +248,7 @@ done:
/*---------------------------------------------------------------------------
- * Function: H5FD_sec2_term
+ * Function: H5FD__sec2_term
*
* Purpose: Shut down the VFD
*
@@ -261,15 +260,15 @@ done:
*---------------------------------------------------------------------------
*/
static herr_t
-H5FD_sec2_term(void)
+H5FD__sec2_term(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Reset VFL ID */
H5FD_SEC2_g = 0;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5FD_sec2_term() */
+} /* end H5FD__sec2_term() */
/*-------------------------------------------------------------------------
@@ -306,7 +305,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_sec2_open
+ * Function: H5FD__sec2_open
*
* Purpose: Create and/or opens a file as an HDF5 file.
*
@@ -321,7 +320,7 @@ done:
*-------------------------------------------------------------------------
*/
static H5FD_t *
-H5FD_sec2_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
+H5FD__sec2_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
{
H5FD_sec2_t *file = NULL; /* sec2 VFD info */
int fd = -1; /* File descriptor */
@@ -333,7 +332,7 @@ H5FD_sec2_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
H5P_genplist_t *plist; /* Property list pointer */
H5FD_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Sanity check on file offsets */
HDcompile_assert(sizeof(HDoff_t) >= sizeof(size_t));
@@ -431,11 +430,11 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_sec2_open() */
+} /* end H5FD__sec2_open() */
/*-------------------------------------------------------------------------
- * Function: H5FD_sec2_close
+ * Function: H5FD__sec2_close
*
* Purpose: Closes an HDF5 file.
*
@@ -448,12 +447,12 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_sec2_close(H5FD_t *_file)
+H5FD__sec2_close(H5FD_t *_file)
{
H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Sanity check */
HDassert(file);
@@ -467,11 +466,11 @@ H5FD_sec2_close(H5FD_t *_file)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_sec2_close() */
+} /* end H5FD__sec2_close() */
/*-------------------------------------------------------------------------
- * Function: H5FD_sec2_cmp
+ * Function: H5FD__sec2_cmp
*
* Purpose: Compares two files belonging to this driver using an
* arbitrary (but consistent) ordering.
@@ -486,13 +485,13 @@ done:
*-------------------------------------------------------------------------
*/
static int
-H5FD_sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
+H5FD__sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
{
const H5FD_sec2_t *f1 = (const H5FD_sec2_t *)_f1;
const H5FD_sec2_t *f2 = (const H5FD_sec2_t *)_f2;
int ret_value = 0;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
#ifdef H5_HAVE_WIN32_API
if(f1->dwVolumeSerialNumber < f2->dwVolumeSerialNumber) HGOTO_DONE(-1)
@@ -521,11 +520,11 @@ H5FD_sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_sec2_cmp() */
+} /* end H5FD__sec2_cmp() */
/*-------------------------------------------------------------------------
- * Function: H5FD_sec2_query
+ * Function: H5FD__sec2_query
*
* Purpose: Set the flags that this VFL driver is capable of supporting.
* (listed in H5FDpublic.h)
@@ -538,11 +537,11 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_sec2_query(const H5FD_t *_file, unsigned long *flags /* out */)
+H5FD__sec2_query(const H5FD_t *_file, unsigned long *flags /* out */)
{
const H5FD_sec2_t *file = (const H5FD_sec2_t *)_file; /* sec2 VFD info */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Set the VFL feature flags that this driver supports */
/* Notice: the Mirror VFD Writer currently uses only the Sec2 driver as
@@ -567,11 +566,11 @@ H5FD_sec2_query(const H5FD_t *_file, unsigned long *flags /* out */)
} /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5FD_sec2_query() */
+} /* end H5FD__sec2_query() */
/*-------------------------------------------------------------------------
- * Function: H5FD_sec2_get_eoa
+ * Function: H5FD__sec2_get_eoa
*
* Purpose: Gets the end-of-address marker for the file. The EOA marker
* is the first address past the last byte allocated in the
@@ -585,18 +584,18 @@ H5FD_sec2_query(const H5FD_t *_file, unsigned long *flags /* out */)
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_sec2_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
+H5FD__sec2_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_sec2_t *file = (const H5FD_sec2_t *)_file;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
FUNC_LEAVE_NOAPI(file->eoa)
-} /* end H5FD_sec2_get_eoa() */
+} /* end H5FD__sec2_get_eoa() */
/*-------------------------------------------------------------------------
- * Function: H5FD_sec2_set_eoa
+ * Function: H5FD__sec2_set_eoa
*
* Purpose: Set the end-of-address marker for the file. This function is
* called shortly after an existing HDF5 file is opened in order
@@ -610,20 +609,20 @@ H5FD_sec2_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_sec2_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
+H5FD__sec2_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
{
H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
file->eoa = addr;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5FD_sec2_set_eoa() */
+} /* end H5FD__sec2_set_eoa() */
/*-------------------------------------------------------------------------
- * Function: H5FD_sec2_get_eof
+ * Function: H5FD__sec2_get_eof
*
* Purpose: Returns the end-of-file marker, which is the greater of
* either the filesystem end-of-file or the HDF5 end-of-address
@@ -638,18 +637,18 @@ H5FD_sec2_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_sec2_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
+H5FD__sec2_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_sec2_t *file = (const H5FD_sec2_t *)_file;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
FUNC_LEAVE_NOAPI(file->eof)
-} /* end H5FD_sec2_get_eof() */
+} /* end H5FD__sec2_get_eof() */
/*-------------------------------------------------------------------------
- * Function: H5FD_sec2_get_handle
+ * Function: H5FD__sec2_get_handle
*
* Purpose: Returns the file handle of sec2 file driver.
*
@@ -661,12 +660,12 @@ H5FD_sec2_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_sec2_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_handle)
+H5FD__sec2_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_handle)
{
H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
if(!file_handle)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid")
@@ -675,11 +674,11 @@ H5FD_sec2_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_handl
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_sec2_get_handle() */
+} /* end H5FD__sec2_get_handle() */
/*-------------------------------------------------------------------------
- * Function: H5FD_sec2_read
+ * Function: H5FD__sec2_read
*
* Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR
* into buffer BUF according to data transfer properties in
@@ -695,14 +694,14 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_sec2_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUSED dxpl_id,
+H5FD__sec2_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUSED dxpl_id,
haddr_t addr, size_t size, void *buf /*out*/)
{
H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
HDoff_t offset = (HDoff_t)addr;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(file && file->pub.cls);
HDassert(buf);
@@ -715,17 +714,15 @@ H5FD_sec2_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUS
#ifndef H5_HAVE_PREADWRITE
/* Seek to the correct location (if we don't have pread) */
- if(addr != file->pos || OP_READ != file->op) {
+ if(addr != file->pos || OP_READ != file->op)
if(HDlseek(file->fd, (HDoff_t)addr, SEEK_SET) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
- }
#endif /* H5_HAVE_PREADWRITE */
/* Read data, being careful of interrupted system calls, partial results,
* and the end of the file.
*/
while(size > 0) {
-
h5_posix_io_t bytes_in = 0; /* # of bytes to read */
h5_posix_io_ret_t bytes_read = -1; /* # of bytes actually read */
@@ -782,11 +779,11 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_sec2_read() */
+} /* end H5FD__sec2_read() */
/*-------------------------------------------------------------------------
- * Function: H5FD_sec2_write
+ * Function: H5FD__sec2_write
*
* Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
* from buffer BUF according to data transfer properties in
@@ -800,14 +797,14 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_sec2_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUSED dxpl_id,
+H5FD__sec2_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUSED dxpl_id,
haddr_t addr, size_t size, const void *buf)
{
H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
HDoff_t offset = (HDoff_t)addr;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(file && file->pub.cls);
HDassert(buf);
@@ -820,17 +817,15 @@ H5FD_sec2_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
#ifndef H5_HAVE_PREADWRITE
/* Seek to the correct location (if we don't have pwrite) */
- if(addr != file->pos || OP_WRITE != file->op) {
+ if(addr != file->pos || OP_WRITE != file->op)
if(HDlseek(file->fd, (HDoff_t)addr, SEEK_SET) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
- }
#endif /* H5_HAVE_PREADWRITE */
/* Write the data, being careful of interrupted system calls and partial
* results
*/
while(size > 0) {
-
h5_posix_io_t bytes_in = 0; /* # of bytes to write */
h5_posix_io_ret_t bytes_wrote = -1; /* # of bytes written */
@@ -883,11 +878,11 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_sec2_write() */
+} /* end H5FD__sec2_write() */
/*-------------------------------------------------------------------------
- * Function: H5FD_sec2_truncate
+ * Function: H5FD__sec2_truncate
*
* Purpose: Makes sure that the true file size is the same (or larger)
* than the end-of-address.
@@ -900,12 +895,12 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_sec2_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_UNUSED closing)
+H5FD__sec2_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_UNUSED closing)
{
H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(file);
@@ -952,11 +947,11 @@ H5FD_sec2_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_sec2_truncate() */
+} /* end H5FD__sec2_truncate() */
/*-------------------------------------------------------------------------
- * Function: H5FD_sec2_lock
+ * Function: H5FD__sec2_lock
*
* Purpose: To place an advisory lock on a file.
* The lock type to apply depends on the parameter "rw":
@@ -970,13 +965,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_sec2_lock(H5FD_t *_file, hbool_t rw)
+H5FD__sec2_lock(H5FD_t *_file, hbool_t rw)
{
H5FD_sec2_t *file = (H5FD_sec2_t *)_file; /* VFD file struct */
int lock_flags; /* file locking flags */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(file);
@@ -997,11 +992,11 @@ H5FD_sec2_lock(H5FD_t *_file, hbool_t rw)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_sec2_lock() */
+} /* end H5FD__sec2_lock() */
/*-------------------------------------------------------------------------
- * Function: H5FD_sec2_unlock
+ * Function: H5FD__sec2_unlock
*
* Purpose: To remove the existing lock on the file
*
@@ -1012,12 +1007,12 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_sec2_unlock(H5FD_t *_file)
+H5FD__sec2_unlock(H5FD_t *_file)
{
H5FD_sec2_t *file = (H5FD_sec2_t *)_file; /* VFD file struct */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(file);
@@ -1034,5 +1029,5 @@ H5FD_sec2_unlock(H5FD_t *_file)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_sec2_unlock() */
+} /* end H5FD__sec2_unlock() */
diff --git a/src/H5FDsec2.h b/src/H5FDsec2.h
index a4ade0b..d669582 100644
--- a/src/H5FDsec2.h
+++ b/src/H5FDsec2.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Monday, August 2, 1999
*
* Purpose: The public header file for the sec2 driver.
diff --git a/src/H5FDstdio.h b/src/H5FDstdio.h
index f99aacf..9a5bc78 100644
--- a/src/H5FDstdio.h
+++ b/src/H5FDstdio.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Monday, August 2, 1999
*
* Purpose: The public header file for the sec2 driver.
diff --git a/src/H5FDtest.c b/src/H5FDtest.c
index 2eb176d..7afc1bf 100644
--- a/src/H5FDtest.c
+++ b/src/H5FDtest.c
@@ -110,6 +110,5 @@ H5FD__supports_swmr_test(const char *vfd_name)
ret_value = !HDstrcmp(vfd_name, "log") || !HDstrcmp(vfd_name, "sec2");
FUNC_LEAVE_NOAPI(ret_value)
-
} /* end H5FD__supports_swmr_test() */
diff --git a/src/H5FDwindows.h b/src/H5FDwindows.h
index 5cf68a1..5e23712 100644
--- a/src/H5FDwindows.h
+++ b/src/H5FDwindows.h
@@ -12,8 +12,8 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Scott Wegner <swegner@hdfgroup.org>
- * Based on code by Robb Matzke
+ * Programmer: Scott Wegner
+ * Based on code by Robb Matzke
* Thursday, May 24 2007
*
* Purpose: The public header file for the windows driver.
diff --git a/src/H5FLprivate.h b/src/H5FLprivate.h
index 94a51e5..a2c019a 100644
--- a/src/H5FLprivate.h
+++ b/src/H5FLprivate.h
@@ -15,12 +15,10 @@
*
* Created: H5FLprivate.h
* Mar 23 2000
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Private non-prototype header.
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
#ifndef _H5FLprivate_H
diff --git a/src/H5MP.c b/src/H5MP.c
index 5f4f299..e773655 100644
--- a/src/H5MP.c
+++ b/src/H5MP.c
@@ -82,7 +82,6 @@ H5FL_DEFINE(H5MP_pool_t);
* Return: Pointer to the memory pool "header" on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 2 2005
*
*-------------------------------------------------------------------------
@@ -125,26 +124,25 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5MP_new_page
+ * Function: H5MP__new_page
*
* Purpose: Allocate new page for a memory pool
*
* Return: Pointer to the page allocated on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 4 2005
*
*-------------------------------------------------------------------------
*/
static H5MP_page_t *
-H5MP_new_page(H5MP_pool_t *mp, size_t page_size)
+H5MP__new_page(H5MP_pool_t *mp, size_t page_size)
{
H5MP_page_t *new_page; /* New page created */
H5MP_page_blk_t *first_blk; /* Pointer to first block in page */
H5MP_page_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Sanity check */
HDassert(mp);
@@ -163,9 +161,6 @@ H5MP_new_page(H5MP_pool_t *mp, size_t page_size)
new_page->free_size = mp->max_size;
new_page->fac_alloc = TRUE;
} /* end else */
-#ifdef QAK
-HDfprintf(stderr,"%s: Allocating new page = %p\n", FUNC, new_page);
-#endif /* QAK */
/* Initialize page information */
first_blk = H5MP_PAGE_FIRST_BLOCK(new_page);
@@ -191,7 +186,7 @@ HDfprintf(stderr,"%s: Allocating new page = %p\n", FUNC, new_page);
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5MP_new_page() */
+} /* end H5MP__new_page() */
/*-------------------------------------------------------------------------
@@ -202,7 +197,6 @@ done:
* Return: Pointer to the space allocated on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 2 2005
*
*-------------------------------------------------------------------------
@@ -223,10 +217,6 @@ H5MP_malloc (H5MP_pool_t *mp, size_t request)
/* Compute actual size needed */
needed = H5MP_BLOCK_ALIGN(request) + H5MP_BLOCK_ALIGN(sizeof(H5MP_page_blk_t));
-#ifdef QAK
-HDfprintf(stderr,"%s: sizeof(H5MP_page_blk_t) = %Zu\n", FUNC, sizeof(H5MP_page_blk_t));
-HDfprintf(stderr,"%s: request = %Zu, needed = %Zu\n", FUNC, request, needed);
-#endif /* QAK */
/* See if the request can be handled by existing free space */
if(needed <= mp->free_size) {
@@ -275,7 +265,7 @@ HDfprintf(stderr,"%s: request = %Zu, needed = %Zu\n", FUNC, request, needed);
(needed + H5MP_BLOCK_ALIGN(sizeof(H5MP_page_t))) : mp->page_size;
/* Allocate new page */
- if(NULL == (alloc_page = H5MP_new_page(mp, page_size)))
+ if(NULL == (alloc_page = H5MP__new_page(mp, page_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for page")
/* Set the block to allocate from */
@@ -323,9 +313,6 @@ found:
/* Set new space pointer for the return value */
ret_value = ((unsigned char *)alloc_free) + H5MP_BLOCK_ALIGN(sizeof(H5MP_page_blk_t));
-#ifdef QAK
-HDfprintf(stderr,"%s: Allocating space from page, ret_value = %p\n", FUNC, ret_value);
-#endif /* QAK */
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -340,7 +327,6 @@ done:
* Return: NULL on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 3 2005
*
* Note: Should we release pages that have no used blocks?
@@ -369,9 +355,6 @@ H5MP_free(H5MP_pool_t *mp, void *spc)
/* Add it's space to the amount of free space in the page & pool */
spc_page = spc_blk->page;
-#ifdef QAK
-HDfprintf(stderr,"%s: Freeing from page = %p\n", "H5MP_free", spc_page);
-#endif /* QAK */
spc_page->free_size += spc_blk->size;
mp->free_size += spc_blk->size;
@@ -429,7 +412,6 @@ HDfprintf(stderr,"%s: Freeing from page = %p\n", "H5MP_free", spc_page);
* Return: Non-negative on success/negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 3 2005
*
*-------------------------------------------------------------------------
diff --git a/src/H5MPpkg.h b/src/H5MPpkg.h
index 29a25fa..ee2eb34 100644
--- a/src/H5MPpkg.h
+++ b/src/H5MPpkg.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Monday, May 2, 2005
*
* Purpose: This file contains declarations which are visible only within
diff --git a/src/H5MPprivate.h b/src/H5MPprivate.h
index 009cb50..be97e5d 100644
--- a/src/H5MPprivate.h
+++ b/src/H5MPprivate.h
@@ -15,7 +15,7 @@
*
* Created: H5MPprivate.h
* May 2 2005
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Private header for memory pool routines.
*
diff --git a/src/H5MPtest.c b/src/H5MPtest.c
index 0cba847..fa5b165 100644
--- a/src/H5MPtest.c
+++ b/src/H5MPtest.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+/* Programmer: Quincey Koziol
* Tuesday, May 3, 2005
*
* Purpose: Memory pool testing functions.
@@ -42,8 +42,6 @@
* Programmer: Quincey Koziol
* Tuesday, May 3, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -74,8 +72,6 @@ H5MP_get_pool_free_size(const H5MP_pool_t *mp, size_t *free_size)
* Programmer: Quincey Koziol
* Tuesday, May 3, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -109,8 +105,6 @@ H5MP_get_pool_first_page(const H5MP_pool_t *mp, H5MP_page_t **page)
* Programmer: Quincey Koziol
* Wednesday, May 3, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
htri_t
@@ -144,9 +138,6 @@ H5MP_pool_is_free_size_correct(const H5MP_pool_t *mp)
/* Check that the free space from the blocks on the free list
* corresponds to space in page */
-#ifdef QAK
-HDfprintf(stderr,"%s: page_free = %Zu, page->free_size = %Zu\n", "H5MP_pool_is_free_size_correct", page_free, page->free_size);
-#endif /* QAK */
if(page_free != page->free_size)
HGOTO_DONE (FALSE)
@@ -159,9 +150,6 @@ HDfprintf(stderr,"%s: page_free = %Zu, page->free_size = %Zu\n", "H5MP_pool_is_f
/* Check that the free space from the pages
* corresponds to free space in pool */
-#ifdef QAK
-HDfprintf(stderr,"%s: pool_free = %Zu, mp->free_size = %Zu\n", "H5MP_pool_is_free_size_correct", pool_free, mp->free_size);
-#endif /* QAK */
if(pool_free != mp->free_size)
HGOTO_DONE (FALSE)
@@ -182,8 +170,6 @@ done:
* Programmer: Quincey Koziol
* Tuesday, May 3, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -214,8 +200,6 @@ H5MP_get_page_free_size(const H5MP_page_t *page, size_t *free_size)
* Programmer: Quincey Koziol
* Tuesday, May 3, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
diff --git a/src/H5Omodule.h b/src/H5Omodule.h
index df3ab56..6f00fcc 100644
--- a/src/H5Omodule.h
+++ b/src/H5Omodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5PBmodule.h b/src/H5PBmodule.h
index c8aabb6..571d2be 100644
--- a/src/H5PBmodule.h
+++ b/src/H5PBmodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5PLpath.c b/src/H5PLpath.c
index 972f1d0..ba23fd3 100644
--- a/src/H5PLpath.c
+++ b/src/H5PLpath.c
@@ -62,9 +62,9 @@
/* Local Prototypes */
/********************/
-static herr_t H5PL__insert_at(const char *path, unsigned int index);
-static herr_t H5PL__make_space_at(unsigned int index);
-static herr_t H5PL__replace_at(const char *path, unsigned int index);
+static herr_t H5PL__insert_at(const char *path, unsigned int idx);
+static herr_t H5PL__make_space_at(unsigned int idx);
+static herr_t H5PL__replace_at(const char *path, unsigned int idx);
static herr_t H5PL__expand_path_table(void);
static herr_t H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *found, const char *dir, const void **plugin_info);
@@ -105,7 +105,7 @@ static unsigned H5PL_path_capacity_g = H5PL_INITIAL_PATH_CAPACITY;
*-------------------------------------------------------------------------
*/
static herr_t
-H5PL__insert_at(const char *path, unsigned int index)
+H5PL__insert_at(const char *path, unsigned int idx)
{
char *path_copy = NULL; /* copy of path string (for storing) */
herr_t ret_value = SUCCEED; /* Return value */
@@ -132,12 +132,12 @@ H5PL__insert_at(const char *path, unsigned int index)
#endif /* H5_HAVE_WIN32_API */
/* If the table entry is in use, make some space */
- if (H5PL_paths_g[index])
- if (H5PL__make_space_at(index) < 0)
+ if (H5PL_paths_g[idx])
+ if (H5PL__make_space_at(idx) < 0)
HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "unable to make space in the table for the new entry")
/* Insert the copy of the search path into the table at the specified index */
- H5PL_paths_g[index] = path_copy;
+ H5PL_paths_g[idx] = path_copy;
H5PL_num_paths_g++;
done:
@@ -156,7 +156,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5PL__make_space_at(unsigned int index)
+H5PL__make_space_at(unsigned int idx)
{
unsigned u; /* iterator */
herr_t ret_value = SUCCEED; /* Return value */
@@ -164,13 +164,13 @@ H5PL__make_space_at(unsigned int index)
FUNC_ENTER_STATIC_NOERR
/* Check args - Just assert on package functions */
- HDassert(index < H5PL_path_capacity_g);
+ HDassert(idx < H5PL_path_capacity_g);
/* Copy the paths back to make a space */
- for (u = H5PL_num_paths_g; u > index; u--)
+ for (u = H5PL_num_paths_g; u > idx; u--)
H5PL_paths_g[u] = H5PL_paths_g[u-1];
- H5PL_paths_g[index] = NULL;
+ H5PL_paths_g[idx] = NULL;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PL__make_space_at() */
@@ -188,7 +188,7 @@ H5PL__make_space_at(unsigned int index)
*-------------------------------------------------------------------------
*/
static herr_t
-H5PL__replace_at(const char *path, unsigned int index)
+H5PL__replace_at(const char *path, unsigned int idx)
{
char *path_copy = NULL; /* copy of path string (for storing) */
herr_t ret_value = SUCCEED; /* Return value */
@@ -200,8 +200,8 @@ H5PL__replace_at(const char *path, unsigned int index)
HDassert(HDstrlen(path));
/* Check that the table entry is in use */
- if (!H5PL_paths_g[index])
- HGOTO_ERROR(H5E_PLUGIN, H5E_CANTFREE, FAIL, "path entry at index %u in the table is NULL", index)
+ if (!H5PL_paths_g[idx])
+ HGOTO_ERROR(H5E_PLUGIN, H5E_CANTFREE, FAIL, "path entry at index %u in the table is NULL", idx)
/* Copy the path for storage so the caller can dispose of theirs */
if (NULL == (path_copy = H5MM_strdup(path)))
@@ -214,10 +214,10 @@ H5PL__replace_at(const char *path, unsigned int index)
#endif /* H5_HAVE_WIN32_API */
/* Free the existing path entry */
- H5PL_paths_g[index] = (char *)H5MM_xfree(H5PL_paths_g[index]);
+ H5PL_paths_g[idx] = (char *)H5MM_xfree(H5PL_paths_g[idx]);
/* Copy the search path into the table at the specified index */
- H5PL_paths_g[index] = path_copy;
+ H5PL_paths_g[idx] = path_copy;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -242,6 +242,7 @@ H5PL__create_path_table(void)
* environment variable or the default.
*/
char *next_path = NULL; /* A path tokenized from the paths string */
+ char *lasts = NULL; /* Context pointer for strtok_r() call */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -265,8 +266,7 @@ H5PL__create_path_table(void)
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path copy")
/* Separate the paths and store them */
- /* XXX: strtok() is not thread-safe */
- next_path = HDstrtok(paths, H5PL_PATH_SEPARATOR);
+ next_path = HDstrtok_r(paths, H5PL_PATH_SEPARATOR, &lasts);
while (next_path) {
/* Insert the path into the table */
@@ -274,7 +274,7 @@ H5PL__create_path_table(void)
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't insert path: %s", next_path)
/* Get the next path from the environment string */
- next_path = HDstrtok(NULL, H5PL_PATH_SEPARATOR);
+ next_path = HDstrtok_r(NULL, H5PL_PATH_SEPARATOR, &lasts);
} /* end while */
done:
@@ -448,7 +448,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5PL__replace_path(const char *path, unsigned int index)
+H5PL__replace_path(const char *path, unsigned int idx)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -457,10 +457,10 @@ H5PL__replace_path(const char *path, unsigned int index)
/* Check args - Just assert on package functions */
HDassert(path);
HDassert(HDstrlen(path));
- HDassert(index < H5PL_path_capacity_g);
+ HDassert(idx < H5PL_path_capacity_g);
/* Insert the path at the requested index */
- if (H5PL__replace_at(path, index) < 0)
+ if (H5PL__replace_at(path, idx) < 0)
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTINSERT, FAIL, "unable to replace search path")
done:
@@ -479,7 +479,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5PL__insert_path(const char *path, unsigned int index)
+H5PL__insert_path(const char *path, unsigned int idx)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -488,10 +488,10 @@ H5PL__insert_path(const char *path, unsigned int index)
/* Check args - Just assert on package functions */
HDassert(path);
HDassert(HDstrlen(path));
- HDassert(index < H5PL_path_capacity_g);
+ HDassert(idx < H5PL_path_capacity_g);
/* Insert the path at the requested index */
- if (H5PL__insert_at(path, index) < 0)
+ if (H5PL__insert_at(path, idx) < 0)
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTINSERT, FAIL, "unable to insert search path")
done:
@@ -510,7 +510,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5PL__remove_path(unsigned int index)
+H5PL__remove_path(unsigned int idx)
{
unsigned u; /* iterator */
herr_t ret_value = SUCCEED; /* Return value */
@@ -518,18 +518,18 @@ H5PL__remove_path(unsigned int index)
FUNC_ENTER_PACKAGE
/* Check args - Just assert on package functions */
- HDassert(index < H5PL_path_capacity_g);
+ HDassert(idx < H5PL_path_capacity_g);
/* Check if the path at that index is set */
- if (!H5PL_paths_g[index])
- HGOTO_ERROR(H5E_PLUGIN, H5E_CANTDELETE, FAIL, "search path at index %u is NULL", index)
+ if (!H5PL_paths_g[idx])
+ HGOTO_ERROR(H5E_PLUGIN, H5E_CANTDELETE, FAIL, "search path at index %u is NULL", idx)
/* Delete the path */
H5PL_num_paths_g--;
- H5PL_paths_g[index] = (char *)H5MM_xfree(H5PL_paths_g[index]);
+ H5PL_paths_g[idx] = (char *)H5MM_xfree(H5PL_paths_g[idx]);
/* Shift the paths down to close the gap */
- for (u = index; u < H5PL_num_paths_g; u++)
+ for (u = idx; u < H5PL_num_paths_g; u++)
H5PL_paths_g[u] = H5PL_paths_g[u+1];
/* Set the (former) last path to NULL */
@@ -551,17 +551,17 @@ done:
*-------------------------------------------------------------------------
*/
const char *
-H5PL__get_path(unsigned int index)
+H5PL__get_path(unsigned int idx)
{
char *ret_value = NULL; /* Return value */
FUNC_ENTER_PACKAGE
/* Get the path at the requested index */
- if (index >= H5PL_num_paths_g)
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "path index %u is out of range in table", index)
+ if (idx >= H5PL_num_paths_g)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "path index %u is out of range in table", idx)
- return H5PL_paths_g[index];
+ return H5PL_paths_g[idx];
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PL__replace_path() */
@@ -673,7 +673,7 @@ H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *fo
size_t len;
/* Allocate & initialize the path name */
- len = HDstrlen(dir) + HDstrlen(H5PL_PATH_SEPARATOR) + HDstrlen(dp->d_name) + 1 /*\0*/;
+ len = HDstrlen(dir) + HDstrlen(H5PL_PATH_SEPARATOR) + HDstrlen(dp->d_name) + 1 /*\0*/ + 4; /* Extra "+4" to quiet GCC warning - 2019/07/05, QAK */
if (NULL == (path = (char *)H5MM_calloc(len)))
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path")
diff --git a/src/H5PLpkg.h b/src/H5PLpkg.h
index 48208d1..6b1b6da 100644
--- a/src/H5PLpkg.h
+++ b/src/H5PLpkg.h
@@ -134,13 +134,15 @@ H5_DLL herr_t H5PL__get_plugin_control_mask(unsigned int *mask /*out*/);
H5_DLL herr_t H5PL__set_plugin_control_mask(unsigned int mask);
/* Plugin search and manipulation */
-H5_DLL herr_t H5PL__open(const char *libname, H5PL_type_t type, H5PL_key_t key, hbool_t *success /*out*/, const void **plugin_info /*out*/);
+H5_DLL herr_t H5PL__open(const char *libname, H5PL_type_t type, H5PL_key_t key,
+ hbool_t *success /*out*/, const void **plugin_info /*out*/);
H5_DLL herr_t H5PL__close(H5PL_HANDLE handle);
/* Plugin cache calls */
H5_DLL herr_t H5PL__create_plugin_cache(void);
H5_DLL herr_t H5PL__close_plugin_cache(hbool_t *already_closed /*out*/);
-H5_DLL herr_t H5PL__add_plugin(H5PL_type_t type, H5PL_key_t key, H5PL_HANDLE handle);
+H5_DLL herr_t H5PL__add_plugin(H5PL_type_t type, H5PL_key_t key,
+ H5PL_HANDLE handle);
H5_DLL herr_t H5PL__find_plugin_in_cache(const H5PL_search_params_t *search_params, hbool_t *found /*out*/, const void **plugin_info /*out*/);
/* Plugin search path calls */
diff --git a/src/H5PLplugin_cache.c b/src/H5PLplugin_cache.c
index e905ac2..504905c 100644
--- a/src/H5PLplugin_cache.c
+++ b/src/H5PLplugin_cache.c
@@ -253,8 +253,7 @@ done:
/* See the other use of H5PL_GET_LIB_FUNC() for an explanation
* for why we disable -Wpedantic here.
*/
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpedantic"
+H5_GCC_DIAG_OFF(pedantic)
herr_t
H5PL__find_plugin_in_cache(const H5PL_search_params_t *search_params, hbool_t *found, const void **plugin_info)
{
@@ -303,5 +302,5 @@ H5PL__find_plugin_in_cache(const H5PL_search_params_t *search_params, hbool_t *f
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PL__find_plugin_in_cache() */
-#pragma GCC diagnostic pop
+H5_GCC_DIAG_ON(pedantic)
diff --git a/src/H5Pmodule.h b/src/H5Pmodule.h
index d5c471a..11df06d 100644
--- a/src/H5Pmodule.h
+++ b/src/H5Pmodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5Pocpl.c b/src/H5Pocpl.c
index a60c593..b576aec 100644
--- a/src/H5Pocpl.c
+++ b/src/H5Pocpl.c
@@ -15,7 +15,7 @@
*
* Created: H5Pocpl.c
* Nov 28 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Object creation property list class routines
*
@@ -581,13 +581,6 @@ done:
* Programmer: Quincey Koziol
* Friday, April 5, 2003
*
- * Modifications:
- *
- * Neil Fortner
- * Thursday, March 26, 2009
- * Overloaded to accept gcpl's as well as dcpl's and moved to
- * H5Pocpl.c
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -652,18 +645,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, April 15, 1998
*
- * Modifications:
- *
- * Raymond Lu
- * Tuesday, October 2, 2001
- * Changed the way to check parameter and set property for
- * generic property list.
- *
- * Neil Fortner
- * Wednesday, May 20, 2009
- * Overloaded to accept gcpl's as well as dcpl's and moved to
- * H5Pocpl.c
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -781,13 +762,6 @@ done:
* Programmer: Robb Matzke
* Tuesday, August 4, 1998
*
- * Modifications:
- *
- * Neil Fortner
- * Wednesday, May 20, 2009
- * Overloaded to accept gcpl's as well as dcpl's and moved to
- * H5Pocpl.c
- *
*-------------------------------------------------------------------------
*/
int
@@ -838,13 +812,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, April 15, 1998
*
- * Modifications:
- *
- * Neil Fortner
- * Wednesday, May 20, 2009
- * Overloaded to accept gcpl's as well as dcpl's and moved to
- * H5Pocpl.c
- *
*-------------------------------------------------------------------------
*/
H5Z_filter_t
@@ -980,13 +947,6 @@ done:
* Programmer: Quincey Koziol
* Friday, April 5, 2003
*
- * Modifications:
- *
- * Neil Fortner
- * Thursday, May 21, 2009
- * Overloaded to accept gcpl's as well as dcpl's and moved to
- * H5Pocpl.c
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -1049,13 +1009,6 @@ done:
* Programmer: Quincey Koziol
* Tuesday, April 8, 2003
*
- * Modifications:
- *
- * Neil Fortner
- * Thursday, May 21, 2009
- * Overloaded to accept gcpl's as well as dcpl's and moved to
- * H5Pocpl.c
- *
*-------------------------------------------------------------------------
*/
htri_t
@@ -1132,13 +1085,6 @@ done:
* Programmer: Pedro Vicente
* January 26, 2004
*
- * Modifications:
- *
- * Neil Fortner
- * Thursday, May 21, 2009
- * Overloaded to accept gcpl's as well as dcpl's and moved to
- * H5Pocpl.c
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -1191,18 +1137,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, April 15, 1998
*
- * Modifications:
- *
- * Raymond Lu
- * Tuesday, October 2, 2001
- * Changed the way to check parameter and set property for
- * generic property list.
- *
- * Neil Fortner
- * Thursday, March 26, 2009
- * Overloaded to accept gcpl's as well as dcpl's and moved to
- * H5Pocpl.c
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -1251,13 +1185,6 @@ done:
* Programmer: Raymond Lu
* Dec 19, 2002
*
- * Modifications:
- *
- * Neil Fortner
- * Wednesday, May 6, 2009
- * Overloaded to accept gcpl's as well as dcpl's and moved to
- * H5Pocpl.c
- *
*-------------------------------------------------------------------------
*/
herr_t
diff --git a/src/H5SLmodule.h b/src/H5SLmodule.h
index 34f08a1..335e35b 100644
--- a/src/H5SLmodule.h
+++ b/src/H5SLmodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5SMmodule.h b/src/H5SMmodule.h
index 656c7dd..ccd7b9f 100644
--- a/src/H5SMmodule.h
+++ b/src/H5SMmodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5SMpkg.h b/src/H5SMpkg.h
index bb458a7..0a04e5d 100644
--- a/src/H5SMpkg.h
+++ b/src/H5SMpkg.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: James Laird <jlaird@ncsa.uiuc.edu>
+ * Programmer: James Laird
* Thursday, March 30, 2006
*
* Purpose: This file contains declarations which are visible only within
diff --git a/src/H5SMprivate.h b/src/H5SMprivate.h
index e6776f3..80d3692 100644
--- a/src/H5SMprivate.h
+++ b/src/H5SMprivate.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: James Laird <jlaird@ncsa.uiuc.edu>
+ * Programmer: James Laird
* Thursday, March 2, 2006
*
* Purpose: This file contains private declarations for the H5SM
diff --git a/src/H5ST.c b/src/H5ST.c
index 3a1020b..2570f72 100644
--- a/src/H5ST.c
+++ b/src/H5ST.c
@@ -70,7 +70,7 @@ done:
/*--------------------------------------------------------------------------
NAME
- H5ST_close_internal
+ H5ST__close_internal
PURPOSE
Close a TST, deallocating it.
USAGE
@@ -87,21 +87,21 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5ST_close_internal(H5ST_ptr_t p)
+H5ST__close_internal(H5ST_ptr_t p)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Recursively free TST */
if(p) {
- H5ST_close_internal(p->lokid);
+ H5ST__close_internal(p->lokid);
if(p->splitchar)
- H5ST_close_internal(p->eqkid);
- H5ST_close_internal(p->hikid);
+ H5ST__close_internal(p->eqkid);
+ H5ST__close_internal(p->hikid);
p = H5FL_FREE(H5ST_node_t, p);
} /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5ST_close_internal() */
+} /* end H5ST__close_internal() */
/*--------------------------------------------------------------------------
@@ -134,7 +134,7 @@ H5ST_close(H5ST_tree_t *tree)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid TST")
/* Free the TST itself */
- if(H5ST_close_internal(tree->root) < 0)
+ if(H5ST__close_internal(tree->root) < 0)
HGOTO_ERROR(H5E_TST, H5E_CANTFREE, FAIL, "can't free TST")
/* Free root node itself */
@@ -270,7 +270,7 @@ done:
/*--------------------------------------------------------------------------
NAME
- H5ST_find_internal
+ H5ST__find_internal
PURPOSE
Find the node matching a particular key string
USAGE
@@ -289,11 +289,11 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static H5ST_ptr_t
-H5ST_find_internal(H5ST_ptr_t p, const char *s)
+H5ST__find_internal(H5ST_ptr_t p, const char *s)
{
H5ST_ptr_t ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
while (p) {
if (*s < p->splitchar)
@@ -308,7 +308,7 @@ H5ST_find_internal(H5ST_ptr_t p, const char *s)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5ST_find_internal() */
+} /* end H5ST__find_internal() */
/*--------------------------------------------------------------------------
@@ -338,7 +338,7 @@ H5ST_find(H5ST_tree_t *tree, const char *s)
FUNC_ENTER_NOAPI(NULL)
- if(NULL == (ret_value = H5ST_find_internal(tree->root, s)))
+ if(NULL == (ret_value = H5ST__find_internal(tree->root, s)))
HGOTO_ERROR(H5E_TST, H5E_NOTFOUND, NULL, "key not found in TST")
done:
@@ -374,7 +374,7 @@ H5ST_locate(H5ST_tree_t *tree, const char *s)
FUNC_ENTER_NOAPI(NULL)
/* Locate the node to remove */
- if(NULL == (node = H5ST_find_internal(tree->root, s)))
+ if(NULL == (node = H5ST__find_internal(tree->root, s)))
HGOTO_ERROR(H5E_TST, H5E_NOTFOUND, NULL, "key not found in TST")
/* Get the pointer to the object to return */
@@ -387,11 +387,11 @@ done:
/*--------------------------------------------------------------------------
NAME
- H5ST_findfirst_internal
+ H5ST__findfirst_internal
PURPOSE
Find the first node in a TST
USAGE
- H5ST_ptr_t H5ST_findfirst_internal(p)
+ H5ST_ptr_t H5ST__findfirst_internal(p)
H5ST_ptr_t p; IN: TST to locate first node within
RETURNS
Success: Non-NULL
@@ -404,11 +404,11 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static H5ST_ptr_t
-H5ST_findfirst_internal(H5ST_ptr_t p)
+H5ST__findfirst_internal(H5ST_ptr_t p)
{
H5ST_ptr_t ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
while(p) {
/* Find least node in current tree */
@@ -428,7 +428,7 @@ H5ST_findfirst_internal(H5ST_ptr_t p)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5ST_findfirst_internal() */
+} /* end H5ST__findfirst_internal() */
/*--------------------------------------------------------------------------
@@ -456,7 +456,7 @@ H5ST_findfirst(H5ST_tree_t *tree)
FUNC_ENTER_NOAPI(NULL)
- if(NULL == (ret_value = H5ST_findfirst_internal(tree->root)))
+ if(NULL == (ret_value = H5ST__findfirst_internal(tree->root)))
HGOTO_ERROR(H5E_TST,H5E_NOTFOUND,NULL,"no nodes in TST");
done:
@@ -466,11 +466,11 @@ done:
/*--------------------------------------------------------------------------
NAME
- H5ST_getnext
+ H5ST__getnext
PURPOSE
Internal routine to find the next node in a given level of a TST
USAGE
- H5ST_ptr_t H5ST_getnext(p)
+ H5ST_ptr_t H5ST__getnext(p)
H5ST_ptr_t *p; IN: Pointer to node to find next node from
RETURNS
Success: Non-NULL
@@ -483,11 +483,11 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static H5ST_ptr_t
-H5ST_getnext(H5ST_ptr_t p)
+H5ST__getnext(H5ST_ptr_t p)
{
H5ST_ptr_t ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* If the node to continue from has higher-valued nodes attached */
if(p->hikid) {
@@ -519,7 +519,7 @@ H5ST_getnext(H5ST_ptr_t p)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5ST_getnext() */
+} /* end H5ST__getnext() */
/*--------------------------------------------------------------------------
@@ -550,9 +550,9 @@ H5ST_findnext(H5ST_ptr_t p)
/* Find the next node at the current level, or go back up the tree */
do {
- q = H5ST_getnext(p);
+ q = H5ST__getnext(p);
if(q) {
- HGOTO_DONE(H5ST_findfirst_internal(q->eqkid));
+ HGOTO_DONE(H5ST__findfirst_internal(q->eqkid));
} /* end if */
else
p = p->up;
@@ -565,11 +565,11 @@ done:
/*--------------------------------------------------------------------------
NAME
- H5ST_delete_internal
+ H5ST__delete_internal
PURPOSE
Delete a node from a TST
USAGE
- herr_t H5ST_delete_internal(root,p)
+ herr_t H5ST__delete_internal(root,p)
H5ST_ptr_t *root; IN/OUT: Root of TST to delete node from
H5ST_ptr_t p; IN: Node to delete
RETURNS
@@ -584,12 +584,12 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5ST_delete_internal(H5ST_ptr_t *root, H5ST_ptr_t p)
+H5ST__delete_internal(H5ST_ptr_t *root, H5ST_ptr_t p)
{
H5ST_ptr_t q, /* Temporary pointer to TST node */
newp; /* Pointer to node which will replace deleted node in tree */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Find node to replace one being deleted */
if(p->lokid) {
@@ -628,7 +628,7 @@ H5ST_delete_internal(H5ST_ptr_t *root, H5ST_ptr_t p)
/* If we deleted the last node in the TST, delete the upper node also */
if(NULL == newp)
- H5ST_delete_internal(root, p->up);
+ H5ST__delete_internal(root, p->up);
} /* end if */
else /* Deleted last node at top level of tree */
*root = newp;
@@ -637,7 +637,7 @@ H5ST_delete_internal(H5ST_ptr_t *root, H5ST_ptr_t p)
p = H5FL_FREE(H5ST_node_t, p);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5ST_delete_internal() */
+} /* end H5ST__delete_internal() */
/*--------------------------------------------------------------------------
@@ -667,7 +667,7 @@ H5ST_delete(H5ST_tree_t *tree, H5ST_ptr_t p)
FUNC_ENTER_NOAPI(FAIL)
- if(H5ST_delete_internal(&tree->root, p) < 0)
+ if(H5ST__delete_internal(&tree->root, p) < 0)
HGOTO_ERROR(H5E_TST, H5E_CANTDELETE, FAIL, "can't delete node from TST")
done:
@@ -703,14 +703,14 @@ H5ST_remove(H5ST_tree_t *tree, const char *s)
FUNC_ENTER_NOAPI(NULL)
/* Locate the node to remove */
- if(NULL == (node = H5ST_find_internal(tree->root, s)))
+ if(NULL == (node = H5ST__find_internal(tree->root, s)))
HGOTO_ERROR(H5E_TST, H5E_NOTFOUND, NULL, "key not found in TST")
/* Get the pointer to the object to return */
ret_value = node->eqkid;
/* Remove the node from the TST */
- if(H5ST_delete_internal(&tree->root, node) < 0)
+ if(H5ST__delete_internal(&tree->root, node) < 0)
HGOTO_ERROR(H5E_TST, H5E_CANTDELETE, NULL, "can't delete node from TST")
done:
diff --git a/src/H5Smodule.h b/src/H5Smodule.h
index 962f0a2..67ac785 100644
--- a/src/H5Smodule.h
+++ b/src/H5Smodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5T.c b/src/H5T.c
index 910021e..f2b5e10 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -4423,8 +4423,8 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset)
idx = u;
} /* end else */
- tmp = HDmemcmp(dt1->shared->u.enumer.value+idx1[u]*base_size,
- dt2->shared->u.enumer.value+idx2[idx]*base_size,
+ tmp = HDmemcmp((uint8_t *)dt1->shared->u.enumer.value + idx1[u] * base_size,
+ (uint8_t *)dt2->shared->u.enumer.value + idx2[idx] * base_size,
base_size);
if(tmp<0) HGOTO_DONE(-1);
if(tmp>0) HGOTO_DONE(1);
@@ -4868,14 +4868,14 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name,
if(H5T_g.soft[i].conv.is_app) {
if((H5T_g.soft[i].conv.u.app_func)(src_id, dst_id, &(path->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL, H5CX_get_dxpl()) < 0) {
HDmemset(&(path->cdata), 0, sizeof(H5T_cdata_t));
- H5E_clear_stack(H5E_DEFAULT); /*ignore the error*/
+ H5E_clear_stack(NULL); /*ignore the error*/
path_init_error = TRUE;
} /* end if */
} /* end if */
else
if((H5T_g.soft[i].conv.u.lib_func)(src_id, dst_id, &(path->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL) < 0) {
HDmemset(&(path->cdata), 0, sizeof(H5T_cdata_t));
- H5E_clear_stack(H5E_DEFAULT); /*ignore the error*/
+ H5E_clear_stack(NULL); /*ignore the error*/
path_init_error = TRUE;
} /* end if */
@@ -5229,7 +5229,7 @@ done:
*-------------------------------------------------------------------------
*/
H5G_name_t *
-H5T_nameof(H5T_t *dt)
+H5T_nameof(const H5T_t *dt)
{
H5G_name_t *ret_value = NULL;
@@ -5466,7 +5466,7 @@ done:
--------------------------------------------------------------------------
*/
htri_t
-H5T_set_loc(H5T_t *dt, H5F_t *f, H5T_loc_t loc)
+H5T_set_loc(H5T_t *dt, H5F_t *file, H5T_loc_t loc)
{
htri_t changed; /* Whether H5T_set_loc changed the type (even if the size didn't change) */
htri_t ret_value = 0; /* Indicate that success, but no location change */
@@ -5490,7 +5490,7 @@ H5T_set_loc(H5T_t *dt, H5F_t *f, H5T_loc_t loc)
old_size=dt->shared->parent->shared->size;
/* Mark the VL, compound or array type */
- if((changed=H5T_set_loc(dt->shared->parent,f,loc))<0)
+ if((changed=H5T_set_loc(dt->shared->parent, file, loc))<0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "Unable to set VL location")
if(changed>0)
ret_value=changed;
@@ -5530,7 +5530,7 @@ H5T_set_loc(H5T_t *dt, H5F_t *f, H5T_loc_t loc)
old_size = memb_type->shared->size;
/* Mark the VL, compound, enum or array type */
- if((changed = H5T_set_loc(memb_type,f,loc)) < 0)
+ if((changed = H5T_set_loc(memb_type, file, loc)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "Unable to set VL location");
if(changed > 0)
ret_value = changed;
@@ -5564,14 +5564,14 @@ H5T_set_loc(H5T_t *dt, H5F_t *f, H5T_loc_t loc)
/* Recurse if it's VL, compound, enum or array */
/* (If the force_conv flag is _not_ set, the type cannot change in size, so don't recurse) */
if(dt->shared->parent->shared->force_conv && H5T_IS_COMPLEX(dt->shared->parent->shared->type)) {
- if((changed = H5T_set_loc(dt->shared->parent,f,loc)) < 0)
+ if((changed = H5T_set_loc(dt->shared->parent, file, loc)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "Unable to set VL location");
if(changed > 0)
ret_value = changed;
} /* end if */
/* Mark this VL sequence */
- if((changed = H5T__vlen_set_loc(dt, f, loc)) < 0)
+ if((changed = H5T__vlen_set_loc(dt, file, loc)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "Unable to set VL location");
if(changed > 0)
ret_value = changed;
@@ -5772,9 +5772,9 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5T_upgrade_version_cb(H5T_t *dt, void *op_value)
+H5T__upgrade_version_cb(H5T_t *dt, void *op_value)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Sanity check */
HDassert(dt);
@@ -5809,7 +5809,7 @@ H5T_upgrade_version_cb(H5T_t *dt, void *op_value)
} /* end switch */
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5T_upgrade_version_cb() */
+} /* end H5T__upgrade_version_cb() */
/*-------------------------------------------------------------------------
@@ -5837,7 +5837,7 @@ H5T__upgrade_version(H5T_t *dt, unsigned new_version)
HDassert(dt);
/* Iterate over entire datatype, upgrading the version of components, if it's useful */
- if(H5T__visit(dt, (H5T_VISIT_SIMPLE | H5T_VISIT_COMPLEX_LAST), H5T_upgrade_version_cb, &new_version) < 0)
+ if(H5T__visit(dt, (H5T_VISIT_SIMPLE | H5T_VISIT_COMPLEX_LAST), H5T__upgrade_version_cb, &new_version) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_BADITER, FAIL, "iteration to upgrade datatype encoding version failed")
done:
@@ -5925,7 +5925,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5T_patch_vlen_file
*
- * Purpose: Patch the top-level file pointer contained in (dt->shared->u.vlen.f)
+ * Purpose: Patch the top-level file pointer contained in (dt->shared->u.vlen.file)
* to point to file. This is possible because
* the top-level file pointer can be closed out from under
* dt while dt is contained in the shared file's cache.
diff --git a/src/H5TSprivate.h b/src/H5TSprivate.h
index 887f001..effda55 100644
--- a/src/H5TSprivate.h
+++ b/src/H5TSprivate.h
@@ -19,8 +19,6 @@
*
* Purpose: Private non-prototype header.
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
#ifndef H5TSprivate_H_
diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c
index aece2c8..18ec4f0 100644
--- a/src/H5Tcommit.c
+++ b/src/H5Tcommit.c
@@ -83,12 +83,12 @@ static H5T_t *H5T__open_oid(const H5G_loc_t *loc);
/*-------------------------------------------------------------------------
- * Function: H5Tcommit2
+ * Function: H5Tcommit2
*
- * Purpose: Save a transient datatype to a file and turn the type handle
- * into a "named", immutable type.
+ * Purpose: Save a transient datatype to a file and turn the type handle
+ * into a "named", immutable type.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* April 5, 2007
@@ -108,11 +108,13 @@ H5Tcommit2(hid_t loc_id, const char *name, hid_t type_id, hid_t lcpl_id,
/* Check arguments */
if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!name || !*name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if(!name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be NULL")
+ if(!*name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be an empty string")
if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
/* Get correct property list */
if(H5P_DEFAULT == lcpl_id)
@@ -122,7 +124,7 @@ H5Tcommit2(hid_t loc_id, const char *name, hid_t type_id, hid_t lcpl_id,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link creation property list")
/* Get correct property list */
- if(H5P_DEFAULT == tcpl_id)
+ if (H5P_DEFAULT == tcpl_id)
tcpl_id = H5P_DATATYPE_CREATE_DEFAULT;
else
if(TRUE != H5P_isa_class(tcpl_id, H5P_DATATYPE_CREATE))
@@ -137,7 +139,7 @@ H5Tcommit2(hid_t loc_id, const char *name, hid_t type_id, hid_t lcpl_id,
/* Commit the type */
if(H5T__commit_named(&loc, name, type, lcpl_id, tcpl_id) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to commit datatype")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to commit datatype")
done:
FUNC_LEAVE_API(ret_value)
@@ -197,7 +199,7 @@ done:
* to return it to the state it was in before it was committed.
*/
if(ret_value < 0 && (NULL != ocrt_info.new_obj)) {
- if(dt->shared->state == H5T_STATE_OPEN && dt->sh_loc.type == H5O_SHARE_TYPE_COMMITTED) {
+ if(dt->shared->state == H5T_STATE_OPEN && dt->sh_loc.type == H5O_SHARE_TYPE_COMMITTED) {
/* Remove the datatype from the list of opened objects in the file */
if(H5FO_top_decr(dt->sh_loc.file, dt->sh_loc.u.loc.oh_addr) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTRELEASE, FAIL, "can't decrement count for object")
@@ -205,7 +207,7 @@ done:
HDONE_ERROR(H5E_DATASET, H5E_CANTRELEASE, FAIL, "can't remove dataset from list of open objects")
/* Close the datatype object */
- if(H5O_close(&(dt->oloc), NULL) < 0)
+ if(H5O_close(&(dt->oloc), NULL) < 0)
HDONE_ERROR(H5E_DATATYPE, H5E_CLOSEERROR, FAIL, "unable to release object header")
/* Remove the datatype's object header from the file */
@@ -215,9 +217,9 @@ done:
/* Mark datatype as being back in memory */
if(H5T_set_loc(dt, dt->sh_loc.file, H5T_LOC_MEMORY))
HDONE_ERROR(H5E_DATATYPE, H5E_CANTDELETE, FAIL, "unable to return datatype to memory")
- dt->sh_loc.type = H5O_SHARE_TYPE_UNSHARED;
+ dt->sh_loc.type = H5O_SHARE_TYPE_UNSHARED;
dt->shared->state = old_state;
- } /* end if */
+ } /* end if */
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
@@ -225,18 +227,18 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Tcommit_anon
+ * Function: H5Tcommit_anon
*
- * Purpose: Save a transient datatype to a file and turn the type handle
- * into a "named", immutable type.
+ * Purpose: Save a transient datatype to a file and turn the type handle
+ * into a "named", immutable type.
*
* The resulting ID should be linked into the file with
* H5Olink or it will be deleted when closed.
*
- * Note: Datatype access property list is unused currently, but is
- * checked for sanity anyway.
+ * Note: The datatype access property list is unused currently, but
+ * is checked for sanity anyway.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
* Programmer: Peter Cao
* May 17, 2005
@@ -255,9 +257,9 @@ H5Tcommit_anon(hid_t loc_id, hid_t type_id, hid_t tcpl_id, hid_t tapl_id)
/* Check arguments */
if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
/* Get correct property list */
if(H5P_DEFAULT == tcpl_id)
@@ -272,7 +274,7 @@ H5Tcommit_anon(hid_t loc_id, hid_t type_id, hid_t tcpl_id, hid_t tapl_id)
/* Commit the type */
if(H5T__commit_anon(loc.oloc->file, type, tcpl_id) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to commit datatype")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to commit datatype")
done:
FUNC_LEAVE_API(ret_value)
@@ -280,11 +282,11 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5T__commit_anon
+ * Function: H5T__commit_anon
*
- * Purpose: Create an anonymous committed datatype.
+ * Purpose: Create an anonymous committed datatype.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* Tuesday, December 12, 2017
@@ -306,7 +308,7 @@ H5T__commit_anon(H5F_t *file, H5T_t *type, hid_t tcpl_id)
/* Commit the type */
if(H5T__commit(file, type, tcpl_id) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to commit datatype")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to commit datatype")
/* Release the datatype's object header */
@@ -395,9 +397,9 @@ H5T__commit(H5F_t *file, H5T_t *type, hid_t tcpl_id)
* type message and then give the object header a name.
*/
if(H5O_create(file, dtype_size, (size_t)1, tcpl_id, &temp_oloc) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to create datatype object header")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to create datatype object header")
if(H5O_msg_create(&temp_oloc, H5O_DTYPE_ID, H5O_MSG_FLAG_CONSTANT | H5O_MSG_FLAG_DONTSHARE, H5O_UPDATE_TIME, type) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to update type header message")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to update type header message")
/* Copy the new object header's location into the datatype, taking ownership of it */
if(H5O_loc_copy_shallow(&(type->oloc), &temp_oloc) < 0)
@@ -445,13 +447,11 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Tcommitted
+ * Function: H5Tcommitted
*
- * Purpose: Determines if a datatype is committed or not.
+ * Purpose: Determines if a datatype is committed or not.
*
- * Return: Success: TRUE if committed, FALSE otherwise.
- *
- * Failure: Negative
+ * Return: TRUE/FALSE/Negative
*
* Programmer: Robb Matzke
* Thursday, June 4, 1998
@@ -461,7 +461,7 @@ done:
htri_t
H5Tcommitted(hid_t type_id)
{
- H5T_t *type; /* Datatype to query */
+ H5T_t *type; /* Datatype to query */
htri_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -469,7 +469,7 @@ H5Tcommitted(hid_t type_id)
/* Check arguments */
if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
/* Set return value */
ret_value = H5T_committed(type);
@@ -510,7 +510,7 @@ H5T_committed(const H5T_t *type)
* ADJUST to the link count.
*
* Return: Success: New link count
- * Failure: Negative
+ * Failure: -1
*
* Programmer: Quincey Koziol
* Friday, September 26, 2003
@@ -522,14 +522,14 @@ H5T_link(const H5T_t *type, int adjust)
{
int ret_value = -1; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI((-1))
HDassert(type);
HDassert(type->sh_loc.type == H5O_SHARE_TYPE_COMMITTED);
/* Adjust the link count on the named datatype */
if((ret_value = H5O_link(&type->oloc, adjust)) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_LINKCOUNT, FAIL, "unable to adjust named datatype link count")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_LINKCOUNT, (-1), "unable to adjust named datatype link count")
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -537,13 +537,14 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Topen2
+ * Function: H5Topen2
*
- * Purpose: Opens a named datatype using a Datatype Access Property
+ * Purpose: Opens a named datatype using a Datatype Access Property
* List.
*
- * Return: Success: Object ID of the named datatype.
- * Failure: Negative
+ * Return: Success: Object ID of the named datatype
+ *
+ * Failure: H5I_INVALID_HID
*
* Programmer: James Laird
* Thursday July 27, 2006
@@ -563,14 +564,16 @@ H5Topen2(hid_t loc_id, const char *name, hid_t tapl_id)
/* Check args */
if(H5G_loc(loc_id, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a location")
- if(!name || !*name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "no name")
+ if(!name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be NULL")
+ if(!*name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be an empty string")
/* Verify access property list and set up collective metadata if appropriate */
if(H5CX_set_apl(&tapl_id, H5P_CLS_TACC, loc_id, FALSE) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set access property list info")
- /* Open it */
+ /* Open the datatype */
if(NULL == (type = H5T__open_name(&loc, name)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open named datatype")
@@ -580,27 +583,27 @@ H5Topen2(hid_t loc_id, const char *name, hid_t tapl_id)
done:
/* Cleanup on error */
- if(ret_value < 0)
- if(type != NULL)
- (void)H5T_close(type);
+ if(H5I_INVALID_HID == ret_value)
+ if(type && H5T_close(type) < 0)
+ HDONE_ERROR(H5E_DATATYPE, H5E_CLOSEERROR, H5I_INVALID_HID, "unable to release datatype")
FUNC_LEAVE_API(ret_value)
} /* end H5Topen2() */
/*-------------------------------------------------------------------------
- * Function: H5Tget_create_plist
+ * Function: H5Tget_create_plist
*
- * Purpose: Returns a copy of the datatype creation property list.
+ * Purpose: Returns a copy of the datatype creation property list.
*
- * Note: There are no datatype creation properties currently, just
- * object creation ones.
+ * Note: There are no datatype creation properties currently, just
+ * object creation ones.
*
- * Return: Success: ID for a copy of the datatype creation
- * property list. The property list ID should be
- * released by calling H5Pclose().
+ * Return: Success: ID for a copy of the datatype creation
+ * property list. The property list ID should be
+ * released by calling H5Pclose().
*
- * Failure: FAIL
+ * Failure: H5I_INVALID_HID
*
* Programmer: Quincey Koziol
* Tuesday, November 28, 2006
@@ -612,24 +615,24 @@ H5Tget_create_plist(hid_t dtype_id)
{
H5T_t *type; /* Datatype object for ID */
herr_t status; /* Generic status value */
- hid_t ret_value = FAIL; /* Return value */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE1("i", "i", dtype_id);
/* Check arguments */
if(NULL == (type = (H5T_t *)H5I_object_verify(dtype_id, H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a datatype")
/* Check if the datatype is committed */
if((status = H5T_committed(type)) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "can't check whether datatype is committed")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, H5I_INVALID_HID, "can't check whether datatype is committed")
/* Retrieve further information, if the datatype is committed */
if(status > 0)
/* Retrieve datatype creation properties */
if((ret_value = H5T__get_create_plist(type)) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "can't get object creation info")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, H5I_INVALID_HID, "can't get object creation info")
done:
FUNC_LEAVE_API(ret_value)
@@ -707,7 +710,7 @@ H5Trefresh(hid_t type_id)
if(H5CX_set_loc(type_id) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set access property list info")
- /* Call private function to refresh datatype object */
+ /* Refresh the datatype's metadata */
if((H5O_refresh_metadata(type_id, dt->oloc)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTLOAD, FAIL, "unable to refresh datatype")
@@ -717,18 +720,18 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5T__get_create_plist
+ * Function: H5T__get_create_plist
*
- * Purpose: Returns a copy of the datatype creation property list.
+ * Purpose: Returns a copy of the datatype creation property list.
*
- * Note: There are no datatype creation properties currently, just
- * object creation ones.
+ * Note: There are no datatype creation properties currently, just
+ * object creation ones.
*
- * Return: Success: ID for a copy of the datatype creation
- * property list. The property list ID should be
- * released by calling H5Pclose().
+ * Return: Success: ID for a copy of the datatype creation
+ * property list. The property list ID should be
+ * released by calling H5Pclose().
*
- * Failure: FAIL
+ * Failure: H5I_INVALID_HID
*
* Programmer: Quincey Koziol
* Wednesday, December 13, 2017
@@ -741,7 +744,7 @@ H5T__get_create_plist(const H5T_t *type)
H5P_genplist_t *tcpl_plist; /* Existing datatype creation propertty list */
H5P_genplist_t *new_plist; /* New datatype creation property list */
hid_t new_tcpl_id = FAIL; /* New datatype creation property list */
- hid_t ret_value = FAIL; /* Return value */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
FUNC_ENTER_STATIC
@@ -750,17 +753,17 @@ H5T__get_create_plist(const H5T_t *type)
/* Copy the default datatype creation property list */
if(NULL == (tcpl_plist = (H5P_genplist_t *)H5I_object(H5P_LST_DATATYPE_CREATE_ID_g)))
- HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "can't get default creation property list")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, H5I_INVALID_HID, "can't get default creation property list")
if((new_tcpl_id = H5P_copy_plist(tcpl_plist, TRUE)) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to copy the creation property list")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, H5I_INVALID_HID, "unable to copy the creation property list")
/* Get property list object for new TCPL */
if(NULL == (new_plist = (H5P_genplist_t *)H5I_object(new_tcpl_id)))
- HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "can't get property list")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, H5I_INVALID_HID, "can't get property list")
/* Retrieve any object creation properties */
if(H5O_get_create_plist(&type->oloc, new_plist) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "can't get object creation info")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, H5I_INVALID_HID, "can't get object creation info")
/* Set the return value */
ret_value = new_tcpl_id;
@@ -769,7 +772,7 @@ done:
if(ret_value < 0)
if(new_tcpl_id > 0)
if(H5I_dec_app_ref(new_tcpl_id) < 0)
- HDONE_ERROR(H5E_DATATYPE, H5E_CANTDEC, FAIL, "unable to close temporary object")
+ HDONE_ERROR(H5E_DATATYPE, H5E_CANTDEC, H5I_INVALID_HID, "unable to close temporary object")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__get_create_plist() */
@@ -984,11 +987,11 @@ H5T__open_oid(const H5G_loc_t *loc)
/* Open named datatype object in file */
if(H5O_open(loc->oloc) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, NULL, "unable to open named datatype")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, NULL, "unable to open named datatype")
/* Deserialize the datatype message into a datatype in memory */
if(NULL == (dt = (H5T_t *)H5O_msg_read(loc->oloc, H5O_DTYPE_ID, NULL)))
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to load type message from object header")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to load type message from object header")
/* Mark the type as named and open */
dt->shared->state = H5T_STATE_OPEN;
diff --git a/src/H5Tcompound.c b/src/H5Tcompound.c
index 711fdfc..5d2d872 100644
--- a/src/H5Tcompound.c
+++ b/src/H5Tcompound.c
@@ -93,8 +93,6 @@ static H5T_t *H5T__reopen_member_type(const H5T_t *dt, unsigned membno);
* Programmer: Robb Matzke
* Wednesday, January 7, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
size_t
@@ -163,8 +161,6 @@ H5T_get_member_offset(const H5T_t *dt, unsigned membno)
* Programmer: Quincey Koziol
* Thursday, November 9, 2000
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
H5T_class_t
@@ -246,7 +242,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5T_get_member_type
*
- * Purpose: Returns a copy of the datatype of the specified memeber.
+ * Purpose: Returns a copy of the data type of the specified member.
*
* Return: Success: A copy of the member datatype;
* modifying the returned datatype does not
@@ -278,7 +274,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_get_member_type() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T__reopen_member_type
*
@@ -315,7 +311,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__reopen_member_type() */
-
/*-------------------------------------------------------------------------
* Function: H5T__get_member_size
@@ -362,8 +357,6 @@ H5T__get_member_size(const H5T_t *dt, unsigned membno)
* Programmer: Robb Matzke
* Monday, December 8, 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -408,8 +401,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, January 7, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -563,7 +554,7 @@ H5T__pack(const H5T_t *dt)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "datatype is read-only")
if(dt->shared->parent) {
- if (H5T__pack(dt->shared->parent) < 0)
+ if(H5T__pack(dt->shared->parent) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to pack parent of datatype")
/* Adjust size of datatype appropriately */
@@ -617,8 +608,6 @@ done:
* Programmer: Quincey Koziol
* Thursday, September 11, 2003
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static htri_t
@@ -635,9 +624,8 @@ H5T__is_packed(const H5T_t *dt)
dt = dt->shared->parent;
/* If this is a compound datatype, check if it is packed */
- if(dt->shared->type == H5T_COMPOUND) {
+ if(dt->shared->type == H5T_COMPOUND)
ret_value = (htri_t)(dt->shared->u.compnd.packed);
- } /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__is_packed() */
@@ -656,8 +644,6 @@ H5T__is_packed(const H5T_t *dt)
* Programmer: Neil Fortner
* Monday, October 19, 2009
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
void
diff --git a/src/H5Tcset.c b/src/H5Tcset.c
index 186e598..5ac2a62 100644
--- a/src/H5Tcset.c
+++ b/src/H5Tcset.c
@@ -39,10 +39,6 @@
* Programmer: Robb Matzke
* Friday, January 9, 1998
*
- * Modifications:
- * Robb Matzke, 22 Dec 1998
- * Also works for derived data types.
- *
*-------------------------------------------------------------------------
*/
H5T_cset_t
@@ -85,10 +81,6 @@ done:
* Programmer: Robb Matzke
* Friday, January 9, 1998
*
- * Modifications:
- * Robb Matzke, 22 Dec 1998
- * Also works with derived data types.
- *
*-------------------------------------------------------------------------
*/
herr_t
diff --git a/src/H5Tdeprec.c b/src/H5Tdeprec.c
index 13d2f5f..17e4a82 100644
--- a/src/H5Tdeprec.c
+++ b/src/H5Tdeprec.c
@@ -15,7 +15,7 @@
*
* Created: H5Tdeprec.c
* April 5 2007
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Deprecated functions from the H5T interface. These
* functions are here for compatibility purposes and may be
@@ -101,7 +101,7 @@ herr_t
H5Tcommit1(hid_t loc_id, const char *name, hid_t type_id)
{
H5G_loc_t loc; /* Location to create datatype */
- H5T_t *type; /* Datatype for ID */
+ H5T_t *dt; /* Datatype for ID */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -109,19 +109,19 @@ H5Tcommit1(hid_t loc_id, const char *name, hid_t type_id)
/* Check arguments */
if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
if(!name || !*name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
- if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
+ if(NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
/* Set up collective metadata if appropriate */
if(H5CX_set_loc(loc_id) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set access property list info")
- /* Commit the datatype to the file, using default property list values */
- if(H5T__commit_named(&loc, name, type, H5P_LINK_CREATE_DEFAULT, H5P_DATATYPE_CREATE_DEFAULT) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to commit datatype")
+ /* Commit the datatype */
+ if(H5T__commit_named(&loc, name, dt, H5P_LINK_CREATE_DEFAULT, H5P_DATATYPE_CREATE_DEFAULT) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to commit datatype")
done:
FUNC_LEAVE_API(ret_value)
@@ -137,7 +137,7 @@ done:
*
* Return: Success: Object ID of the named datatype.
*
- * Failure: Negative
+ * Failure: H5I_INVALID_HID
*
* Programmer: Robb Matzke
* Monday, June 1, 1998
@@ -149,7 +149,7 @@ H5Topen1(hid_t loc_id, const char *name)
{
H5T_t *type = NULL;
H5G_loc_t loc;
- hid_t ret_value = H5I_INVALID_HID;
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE2("i", "i*s", loc_id, name);
@@ -160,7 +160,7 @@ H5Topen1(hid_t loc_id, const char *name)
if(!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "no name")
- /* Open it */
+ /* Open the datatype */
if(NULL == (type = H5T__open_name(&loc, name)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open named datatype")
@@ -170,9 +170,9 @@ H5Topen1(hid_t loc_id, const char *name)
done:
/* Cleanup on error */
- if(ret_value < 0)
+ if(H5I_INVALID_HID == ret_value)
if(type && H5T_close(type) < 0)
- HDONE_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, H5I_INVALID_HID, "can't close datatype")
+ HDONE_ERROR(H5E_DATATYPE, H5E_CLOSEERROR, H5I_INVALID_HID, "unable to close datatype")
FUNC_LEAVE_API(ret_value)
} /* end H5Topen1() */
diff --git a/src/H5Tenum.c b/src/H5Tenum.c
index 969317b..e1d8246 100644
--- a/src/H5Tenum.c
+++ b/src/H5Tenum.c
@@ -26,9 +26,9 @@
#include "H5Tpkg.h" /*data-type functions */
/* Static local functions */
-static char *H5T_enum_nameof(const H5T_t *dt, const void *value, char *name/*out*/,
+static char *H5T__enum_nameof(const H5T_t *dt, const void *value, char *name/*out*/,
size_t size);
-static herr_t H5T_enum_valueof(const H5T_t *dt, const char *name,
+static herr_t H5T__enum_valueof(const H5T_t *dt, const char *name,
void *value/*out*/);
@@ -46,8 +46,6 @@ static herr_t H5T_enum_valueof(const H5T_t *dt, const char *name,
* Programmer: Robb Matzke
* Tuesday, December 22, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
hid_t
@@ -91,8 +89,6 @@ done:
* Programmer: Raymond Lu
* October 9, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
H5T_t *
@@ -134,8 +130,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, December 23, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -181,17 +175,13 @@ done:
* Programmer: Robb Matzke
* Wednesday, December 23, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
H5T__enum_insert(const H5T_t *dt, const char *name, const void *value)
{
unsigned i;
- char **names=NULL;
- uint8_t *values=NULL;
- herr_t ret_value=SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -200,16 +190,18 @@ H5T__enum_insert(const H5T_t *dt, const char *name, const void *value)
HDassert(value);
/* The name and value had better not already exist */
- for (i=0; i<dt->shared->u.enumer.nmembs; i++) {
- if (!HDstrcmp(dt->shared->u.enumer.name[i], name))
+ for(i = 0; i < dt->shared->u.enumer.nmembs; i++) {
+ if(!HDstrcmp(dt->shared->u.enumer.name[i], name))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "name redefinition")
- if (!HDmemcmp(dt->shared->u.enumer.value+i*dt->shared->size, value, dt->shared->size))
+ if(!HDmemcmp((uint8_t *)dt->shared->u.enumer.value + (i * dt->shared->size), value, dt->shared->size))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "value redefinition")
}
/* Increase table sizes */
if(dt->shared->u.enumer.nmembs >= dt->shared->u.enumer.nalloc) {
- unsigned n = MAX(32, 2*dt->shared->u.enumer.nalloc);
+ char **names;
+ uint8_t *values;
+ unsigned n = MAX(32, 2*dt->shared->u.enumer.nalloc);
if(NULL == (names = (char **)H5MM_realloc(dt->shared->u.enumer.name, n * sizeof(char *))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
@@ -225,7 +217,7 @@ H5T__enum_insert(const H5T_t *dt, const char *name, const void *value)
dt->shared->u.enumer.sorted = H5T_SORT_NONE;
i = dt->shared->u.enumer.nmembs++;
dt->shared->u.enumer.name[i] = H5MM_xstrdup(name);
- H5MM_memcpy(dt->shared->u.enumer.value+i*dt->shared->size, value, dt->shared->size);
+ H5MM_memcpy((uint8_t *)dt->shared->u.enumer.value + (i * dt->shared->size), value, dt->shared->size);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -245,8 +237,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, December 23, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -288,8 +278,6 @@ done:
* Programmer: Raymond Lu
* October 9, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -300,7 +288,7 @@ H5T__get_member_value(const H5T_t *dt, unsigned membno, void *value/*out*/)
HDassert(dt);
HDassert(value);
- H5MM_memcpy(value, dt->shared->u.enumer.value + membno*dt->shared->size, dt->shared->size);
+ H5MM_memcpy(value, (uint8_t *)dt->shared->u.enumer.value + (membno * dt->shared->size), dt->shared->size);
FUNC_LEAVE_NOAPI(SUCCEED)
}
@@ -325,8 +313,6 @@ H5T__get_member_value(const H5T_t *dt, unsigned membno, void *value/*out*/)
* Programmer: Robb Matzke
* Monday, January 4, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -348,7 +334,7 @@ H5Tenum_nameof(hid_t type, const void *value, char *name/*out*/, size_t size)
if (!name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name buffer supplied")
- if (NULL==H5T_enum_nameof(dt, value, name, size))
+ if (NULL==H5T__enum_nameof(dt, value, name, size))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "nameof query failed")
done:
@@ -357,7 +343,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5T_enum_nameof
+ * Function: H5T__enum_nameof
*
* Purpose: Finds the symbol name that corresponds the the specified
* VALUE of an enumeration data type DT. At most SIZE characters
@@ -377,15 +363,10 @@ done:
* Programmer: Robb Matzke
* Monday, January 4, 1999
*
- * Modifications:
- * Raymond Lu
- * Wednesday, Febuary 9, 2005
- * Made a copy of original datatype and do sorting and search
- * on that copy, to protect the original order of members.
*-------------------------------------------------------------------------
*/
static char *
-H5T_enum_nameof(const H5T_t *dt, const void *value, char *name/*out*/, size_t size)
+H5T__enum_nameof(const H5T_t *dt, const void *value, char *name/*out*/, size_t size)
{
H5T_t *copied_dt = NULL; /* Do sorting in copied datatype */
unsigned lt, md = 0, rt; /* Indices for binary search */
@@ -393,7 +374,7 @@ H5T_enum_nameof(const H5T_t *dt, const void *value, char *name/*out*/, size_t si
hbool_t alloc_name = FALSE; /* Whether name has been allocated */
char *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Check args */
HDassert(dt && H5T_ENUM == dt->shared->type);
@@ -418,7 +399,7 @@ H5T_enum_nameof(const H5T_t *dt, const void *value, char *name/*out*/, size_t si
rt = copied_dt->shared->u.enumer.nmembs;
while(lt < rt) {
md = (lt + rt) / 2;
- cmp = HDmemcmp(value, copied_dt->shared->u.enumer.value + md * copied_dt->shared->size, copied_dt->shared->size);
+ cmp = HDmemcmp(value, (uint8_t *)copied_dt->shared->u.enumer.value + (md * copied_dt->shared->size), copied_dt->shared->size);
if(cmp < 0)
rt = md;
else if(cmp > 0)
@@ -433,8 +414,7 @@ H5T_enum_nameof(const H5T_t *dt, const void *value, char *name/*out*/, size_t si
/* Save result name */
if(!name) {
- if(NULL == (name = (char *)H5MM_malloc(
- HDstrlen(copied_dt->shared->u.enumer.name[md]) + 1)))
+ if(NULL == (name = (char *)H5MM_malloc(HDstrlen(copied_dt->shared->u.enumer.name[md]) + 1)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
alloc_name = TRUE;
} /* end if */
@@ -453,7 +433,7 @@ done:
H5MM_free(name);
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5T_enum_nameof() */
+} /* end H5T__enum_nameof() */
/*-------------------------------------------------------------------------
@@ -471,11 +451,6 @@ done:
* Programmer: Robb Matzke
* Monday, January 4, 1999
*
- * Modifications:
- * Raymond Lu
- * Wednesday, Febuary 9, 2005
- * Made a copy of original datatype and do sorting and search
- * on that copy, to protect the original order of members.
*-------------------------------------------------------------------------
*/
herr_t
@@ -497,7 +472,7 @@ H5Tenum_valueof(hid_t type, const char *name, void *value/*out*/)
if(!value)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no value buffer")
- if(H5T_enum_valueof(dt, name, value) < 0)
+ if(H5T__enum_valueof(dt, name, value) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "valueof query failed")
done:
@@ -506,7 +481,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5T_enum_valueof
+ * Function: H5T__enum_valueof
*
* Purpose: Finds the value that corresponds the the specified symbol
* NAME of an enumeration data type DT and copy it to the VALUE
@@ -520,22 +495,17 @@ done:
* Programmer: Robb Matzke
* Monday, January 4, 1999
*
- * Modifications:
- * Raymond Lu
- * Wednesday, Febuary 9, 2005
- * Made a copy of original datatype and do sorting and search
- * on that copy, to protect the original order of members.
*-------------------------------------------------------------------------
*/
static herr_t
-H5T_enum_valueof(const H5T_t *dt, const char *name, void *value/*out*/)
+H5T__enum_valueof(const H5T_t *dt, const char *name, void *value/*out*/)
{
unsigned lt, md=0, rt; /*indices for binary search */
int cmp=(-1); /*comparison result */
H5T_t *copied_dt = NULL; /*do sorting in copied datatype */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Check args */
HDassert(dt && H5T_ENUM==dt->shared->type);
@@ -571,7 +541,7 @@ H5T_enum_valueof(const H5T_t *dt, const char *name, void *value/*out*/)
if (cmp!=0)
HGOTO_ERROR(H5E_DATATYPE, H5E_NOTFOUND, FAIL, "string doesn't exist in the enumeration type")
- H5MM_memcpy(value, copied_dt->shared->u.enumer.value+md*copied_dt->shared->size, copied_dt->shared->size);
+ H5MM_memcpy(value, (uint8_t *)copied_dt->shared->u.enumer.value + (md * copied_dt->shared->size), copied_dt->shared->size);
done:
if(copied_dt)
diff --git a/src/H5Tfields.c b/src/H5Tfields.c
index 8202c2c..8f5e202 100644
--- a/src/H5Tfields.c
+++ b/src/H5Tfields.c
@@ -41,9 +41,6 @@
* Programmer: Robb Matzke
* Monday, December 8, 1997
*
- * Modifications:
- * Robb Matzke, 22 Dec 1998
- * Also works with enumeration datatypes.
*-------------------------------------------------------------------------
*/
int
@@ -83,8 +80,6 @@ done:
* Programmer: Raymond Lu
* October 8, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
int
@@ -124,9 +119,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, January 7, 1998
*
- * Modifications:
- * Robb Matzke, 22 Dec 1998
- * Also works with enumeration datatypes.
*-------------------------------------------------------------------------
*/
char *
@@ -166,7 +158,6 @@ done:
* Programmer: Raymond Lu
* October 9, 2002
*
- * Modifications:
*-------------------------------------------------------------------------
*/
char *
@@ -225,8 +216,6 @@ done:
* Programmer: Raymond Lu
* Thursday, April 4, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
int
@@ -344,17 +333,17 @@ H5T__sort_value(const H5T_t *dt, int *map)
HDassert(size <= sizeof(tbuf));
for(i = (nmembs - 1), swapped = TRUE; i > 0 && swapped; --i) {
for(j = 0, swapped = FALSE; j < i; j++) {
- if(HDmemcmp(dt->shared->u.enumer.value + (j * size), dt->shared->u.enumer.value + ((j + 1) * size), size) > 0) {
+ if(HDmemcmp((uint8_t *)dt->shared->u.enumer.value + (j * size), (uint8_t *)dt->shared->u.enumer.value + ((j + 1) * size), size) > 0) {
/* Swap names */
char *tmp = dt->shared->u.enumer.name[j];
dt->shared->u.enumer.name[j] = dt->shared->u.enumer.name[j + 1];
dt->shared->u.enumer.name[j + 1] = tmp;
/* Swap values */
- H5MM_memcpy(tbuf, dt->shared->u.enumer.value + (j * size), size);
- H5MM_memcpy(dt->shared->u.enumer.value + (j * size),
- dt->shared->u.enumer.value + ((j + 1) * size), size);
- H5MM_memcpy(dt->shared->u.enumer.value + ((j + 1) * size), tbuf, size);
+ H5MM_memcpy(tbuf, (uint8_t *)dt->shared->u.enumer.value + (j * size), size);
+ H5MM_memcpy((uint8_t *)dt->shared->u.enumer.value + (j * size),
+ (uint8_t *)dt->shared->u.enumer.value + ((j + 1) * size), size);
+ H5MM_memcpy((uint8_t *)dt->shared->u.enumer.value + ((j + 1) * size), tbuf, size);
/* Swap map */
if(map) {
@@ -371,7 +360,7 @@ H5T__sort_value(const H5T_t *dt, int *map)
#ifndef NDEBUG
/* I never trust a sort :-) -RPM */
for(i = 0; i < (nmembs - 1); i++)
- HDassert(HDmemcmp(dt->shared->u.enumer.value + (i * size), dt->shared->u.enumer.value + ((i + 1) * size), size) < 0);
+ HDassert(HDmemcmp((uint8_t *)dt->shared->u.enumer.value + (i * size), (uint8_t *)dt->shared->u.enumer.value + ((i + 1) * size), size) < 0);
#endif
} /* end if */
} /* end else */
@@ -394,8 +383,6 @@ H5T__sort_value(const H5T_t *dt, int *map)
* Programmer: Robb Matzke
* Monday, January 4, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -457,10 +444,10 @@ H5T__sort_name(const H5T_t *dt, int *map)
dt->shared->u.enumer.name[j+1] = tmp;
/* Swap values */
- H5MM_memcpy(tbuf, dt->shared->u.enumer.value+j*size, size);
- H5MM_memcpy(dt->shared->u.enumer.value+j*size,
- dt->shared->u.enumer.value+(j+1)*size, size);
- H5MM_memcpy(dt->shared->u.enumer.value+(j+1)*size, tbuf, size);
+ H5MM_memcpy(tbuf, (uint8_t *)dt->shared->u.enumer.value + (j * size), size);
+ H5MM_memcpy((uint8_t *)dt->shared->u.enumer.value + (j * size),
+ (uint8_t *)dt->shared->u.enumer.value + ((j + 1) * size), size);
+ H5MM_memcpy((uint8_t *)dt->shared->u.enumer.value + ((j + 1) * size), tbuf, size);
/* Swap map */
if (map) {
diff --git a/src/H5Tfixed.c b/src/H5Tfixed.c
index bc1d84d..5270a9a 100644
--- a/src/H5Tfixed.c
+++ b/src/H5Tfixed.c
@@ -37,9 +37,6 @@
* Programmer: Robb Matzke
* Wednesday, January 7, 1998
*
- * Modifications:
- * Robb Matzke, 22 Dec 1998
- * Also works with derived datatypes.
*-------------------------------------------------------------------------
*/
H5T_sign_t
@@ -75,8 +72,6 @@ done:
* Programmer: Raymond Lu
* October 8, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
H5T_sign_t
@@ -115,10 +110,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, January 7, 1998
*
- * Modifications:
- * Robb Matzke, 22 Dec 1998
- * Also works with derived datatypes.
- *
*-------------------------------------------------------------------------
*/
herr_t
diff --git a/src/H5Tfloat.c b/src/H5Tfloat.c
index 85e8f30..0d224db 100644
--- a/src/H5Tfloat.c
+++ b/src/H5Tfloat.c
@@ -194,10 +194,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, January 7, 1998
*
- * Modifications:
- * Robb Matzke, 22 Dec 1998
- * Also works with derived datatypes.
- *
*-------------------------------------------------------------------------
*/
herr_t
diff --git a/src/H5Tmodule.h b/src/H5Tmodule.h
index d2ab08c..f8f57ac 100644
--- a/src/H5Tmodule.h
+++ b/src/H5Tmodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5Tnative.c b/src/H5Tnative.c
index 1476b2f..c4a5775 100644
--- a/src/H5Tnative.c
+++ b/src/H5Tnative.c
@@ -223,7 +223,7 @@ H5T__get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_ali
int not_equal;
if(NULL == (ret_value = H5T_copy(dtype, H5T_COPY_TRANSIENT)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot retrieve float type")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot copy reference type")
/* Decide if the data type is object or dataset region reference. */
if(NULL == (dt = (H5T_t *)H5I_object(H5T_STD_REF_OBJ_g)))
@@ -515,6 +515,13 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__get_native_type() */
+/* Disable warning for intentional identical branches here -QAK */
+/*
+ * This pragma only needs to surround the "duplicated branches" in
+ * the code below, but early (4.4.7, at least) gcc only allows
+ * diagnostic pragmas to be toggled outside of functions.
+ */
+H5_GCC_DIAG_OFF(duplicated-branches)
/*-------------------------------------------------------------------------
* Function: H5T__get_native_integer
@@ -655,7 +662,15 @@ H5T__get_native_integer(size_t prec, H5T_sign_t sign, H5T_direction_t direction,
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__get_native_integer() */
+H5_GCC_DIAG_ON(duplicated-branches)
+/* Disable warning for intentional identical branches here -QAK */
+/*
+ * This pragma only needs to surround the "duplicated branches" in
+ * the code below, but early (4.4.7, at least) gcc only allows
+ * diagnostic pragmas to be toggled outside of functions.
+ */
+H5_GCC_DIAG_OFF(duplicated-branches)
/*-------------------------------------------------------------------------
* Function: H5T__get_native_float
@@ -780,7 +795,15 @@ H5T__get_native_float(size_t size, H5T_direction_t direction, size_t *struct_ali
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__get_native_float() */
+H5_GCC_DIAG_ON(duplicated-branches)
+/* Disable warning for intentional identical branches here -QAK */
+/*
+ * This pragma only needs to surround the "duplicated branches" in
+ * the code below, but early (4.4.7, at least) gcc only allows
+ * diagnostic pragmas to be toggled outside of functions.
+ */
+H5_GCC_DIAG_OFF(duplicated-branches)
/*-------------------------------------------------------------------------
* Function: H5T__get_native_bitfield
@@ -866,6 +889,7 @@ H5T__get_native_bitfield(size_t prec, H5T_direction_t direction,
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__get_native_bitfield() */
+H5_GCC_DIAG_ON(duplicated-branches)
/*-------------------------------------------------------------------------
diff --git a/src/H5Toffset.c b/src/H5Toffset.c
index c0e94fc..38c7e53 100644
--- a/src/H5Toffset.c
+++ b/src/H5Toffset.c
@@ -25,7 +25,7 @@
#include "H5Tpkg.h" /* Datatypes */
/* Static local functions */
-static herr_t H5T_set_offset(const H5T_t *dt, size_t offset);
+static herr_t H5T__set_offset(const H5T_t *dt, size_t offset);
@@ -163,10 +163,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, January 7, 1998
*
- * Modifications:
- * Robb Matzke, 22 Dec 1998
- * Moved real work to a private function.
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -191,7 +187,7 @@ H5Tset_offset(hid_t type_id, size_t offset)
HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for this datatype")
/* Do the real work */
- if (H5T_set_offset(dt, offset)<0)
+ if (H5T__set_offset(dt, offset)<0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to set offset")
done:
@@ -200,7 +196,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5T_set_offset
+ * Function: H5T__set_offset
*
* Purpose: Sets the bit offset of the first significant bit. The
* significant bits of an atomic datum can be offset from the
@@ -232,18 +228,14 @@ done:
* Programmer: Robb Matzke
* Wednesday, January 7, 1998
*
- * Modifications:
- * Robb Matzke, 22 Dec 1998
- * Also works for derived data types.
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5T_set_offset(const H5T_t *dt, size_t offset)
+H5T__set_offset(const H5T_t *dt, size_t offset)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_STATIC
/* Check args */
HDassert(dt);
@@ -254,7 +246,7 @@ H5T_set_offset(const H5T_t *dt, size_t offset)
HDassert(!(H5T_ENUM==dt->shared->type && 0==dt->shared->u.enumer.nmembs));
if (dt->shared->parent) {
- if (H5T_set_offset(dt->shared->parent, offset)<0)
+ if (H5T__set_offset(dt->shared->parent, offset)<0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to set offset for base type")
/* Adjust size of datatype appropriately */
diff --git a/src/H5Toh.c b/src/H5Toh.c
index c5ee994..2dfa3fb 100644
--- a/src/H5Toh.c
+++ b/src/H5Toh.c
@@ -212,7 +212,7 @@ done:
static H5O_loc_t *
H5O__dtype_get_oloc(hid_t obj_id)
{
- H5T_t *type; /* Datatype opened */
+ H5T_t *type = NULL; /* Datatype opened */
H5O_loc_t *ret_value = NULL; /* Return value */
FUNC_ENTER_STATIC
diff --git a/src/H5Topaque.c b/src/H5Topaque.c
index 4e8f1d4..f7ce977 100644
--- a/src/H5Topaque.c
+++ b/src/H5Topaque.c
@@ -37,8 +37,6 @@
* Programmer: Robb Matzke
* Thursday, May 20, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -84,8 +82,6 @@ done:
* Programmer: Robb Matzke
* Thursday, May 20, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
char *
diff --git a/src/H5Torder.c b/src/H5Torder.c
index a6d6421..e229c55 100644
--- a/src/H5Torder.c
+++ b/src/H5Torder.c
@@ -50,7 +50,7 @@
/********************/
/* Local Prototypes */
/********************/
-static herr_t H5T_set_order(H5T_t *dtype, H5T_order_t order);
+static herr_t H5T__set_order(H5T_t *dtype, H5T_order_t order);
/*********************/
@@ -214,7 +214,7 @@ H5Tset_order(hid_t type_id, H5T_order_t order)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "datatype is read-only")
/* Call internal routine to set the order */
- if(H5T_set_order(dt, order) < 0)
+ if(H5T__set_order(dt, order) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "can't set order")
done:
@@ -223,7 +223,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5T_set_order
+ * Function: H5T__set_order
*
* Purpose: Private function to set the byte order for a datatype.
*
@@ -235,11 +235,11 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5T_set_order(H5T_t *dtype, H5T_order_t order)
+H5T__set_order(H5T_t *dtype, H5T_order_t order)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_STATIC
if(H5T_ENUM == dtype->shared->type && dtype->shared->u.enumer.nmembs > 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "operation not allowed after enum members are defined")
@@ -272,12 +272,12 @@ H5T_set_order(H5T_t *dtype, H5T_order_t order)
/* Loop through all fields of compound type, setting the order */
for(i = 0; i < nmemb; i++)
- if(H5T_set_order(dtype->shared->u.compnd.memb[i].type, order) < 0)
+ if(H5T__set_order(dtype->shared->u.compnd.memb[i].type, order) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set order for compound member")
} /* end if */
} /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5T_set_order() */
+} /* end H5T__set_order() */
diff --git a/src/H5Tpad.c b/src/H5Tpad.c
index c96f42a..450c567 100644
--- a/src/H5Tpad.c
+++ b/src/H5Tpad.c
@@ -38,10 +38,6 @@
* Programmer: Robb Matzke
* Friday, January 9, 1998
*
- * Modifications:
- * Robb Matzke, 22 Dec 1998
- * Also works with derived data types.
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -82,10 +78,6 @@ done:
* Programmer: Robb Matzke
* Friday, January 9, 1998
*
- * Modifications:
- * Robb Matzke, 22 Dec 1998
- * Also works with derived data types.
- *
*-------------------------------------------------------------------------
*/
herr_t
diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h
index b8d2435..9bd02ea 100644
--- a/src/H5Tpkg.h
+++ b/src/H5Tpkg.h
@@ -176,36 +176,36 @@ struct H5T_path_t {
};
typedef struct H5T_atomic_t {
- H5T_order_t order; /*byte order */
- size_t prec; /*precision in bits */
- size_t offset; /*bit position of lsb of value */
- H5T_pad_t lsb_pad;/*type of lsb padding */
- H5T_pad_t msb_pad;/*type of msb padding */
+ H5T_order_t order; /* byte order */
+ size_t prec; /* precision in bits */
+ size_t offset; /* bit position of lsb of value */
+ H5T_pad_t lsb_pad; /* type of lsb padding */
+ H5T_pad_t msb_pad; /* type of msb padding */
union {
- struct {
- H5T_sign_t sign; /*type of integer sign */
- } i; /*integer; integer types */
-
- struct {
- size_t sign; /*bit position of sign bit */
- size_t epos; /*position of lsb of exponent */
- size_t esize; /*size of exponent in bits */
- uint64_t ebias; /*exponent bias */
- size_t mpos; /*position of lsb of mantissa */
- size_t msize; /*size of mantissa */
- H5T_norm_t norm; /*normalization */
- H5T_pad_t pad; /*type of padding for internal bits */
- } f; /*floating-point types */
-
- struct {
- H5T_cset_t cset; /*character set */
- H5T_str_t pad; /*space or null padding of extra bytes */
- } s; /*string types */
-
- struct {
- H5R_type_t rtype; /*type of reference stored */
- H5T_loc_t loc; /* Location of data in buffer */
- } r; /*reference types */
+ struct {
+ H5T_sign_t sign; /* type of integer sign */
+ } i; /* integer; integer types */
+
+ struct {
+ size_t sign; /* bit position of sign bit */
+ size_t epos; /* position of lsb of exponent */
+ size_t esize; /* size of exponent in bits */
+ uint64_t ebias; /* exponent bias */
+ size_t mpos; /* position of lsb of mantissa */
+ size_t msize; /* size of mantissa */
+ H5T_norm_t norm; /* normalization */
+ H5T_pad_t pad; /* type of padding for internal bits */
+ } f; /* floating-point types */
+
+ struct {
+ H5T_cset_t cset; /* character set */
+ H5T_str_t pad; /* space or null padding of extra bytes */
+ } s; /* string types */
+
+ struct {
+ H5R_type_t rtype; /* type of reference stored */
+ H5T_loc_t loc; /* location of data in buffer */
+ } r; /* reference types */
} u;
} H5T_atomic_t;
@@ -263,8 +263,8 @@ typedef enum {
typedef struct H5T_vlen_t {
H5T_vlen_type_t type; /* Type of VL data in buffer */
H5T_loc_t loc; /* Location of VL data in buffer */
- H5T_cset_t cset; /* For VL string. character set */
- H5T_str_t pad; /* For VL string. space or null padding of
+ H5T_cset_t cset; /* For VL string: character set */
+ H5T_str_t pad; /* For VL string: space or null padding of
* extra bytes */
H5F_t *f; /* File ID (if VL data is on disk) */
H5T_vlen_getptrfunc_t getptr; /* Function to get VL sequence pointer */
diff --git a/src/H5Tprecis.c b/src/H5Tprecis.c
index 59bac8b..635fb63 100644
--- a/src/H5Tprecis.c
+++ b/src/H5Tprecis.c
@@ -25,7 +25,7 @@
#include "H5Tpkg.h" /* Datatypes */
/* Static local functions */
-static herr_t H5T_set_precision(const H5T_t *dt, size_t prec);
+static herr_t H5T__set_precision(const H5T_t *dt, size_t prec);
@@ -45,10 +45,6 @@ static herr_t H5T_set_precision(const H5T_t *dt, size_t prec);
* Programmer: Robb Matzke
* Wednesday, January 7, 1998
*
- * Modifications:
- * Robb Matzke, 22 Dec 1998
- * Also works for derived datatypes.
- *
*-------------------------------------------------------------------------
*/
size_t
@@ -101,7 +97,7 @@ H5T_get_precision(const H5T_t *dt)
while(dt->shared->parent)
dt = dt->shared->parent;
if(!H5T_IS_ATOMIC(dt->shared))
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, 0, "operation not defined for specified datatype")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, 0, "operation not defined for specified datatype")
/* Precision */
ret_value = dt->shared->u.atomic.prec;
@@ -134,10 +130,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, January 7, 1998
*
- * Modifications:
- * Robb Matzke, 22 Dec 1998
- * Moved real work to a private function.
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -164,7 +156,7 @@ H5Tset_precision(hid_t type_id, size_t prec)
HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for specified datatype")
/* Do the work */
- if (H5T_set_precision(dt, prec)<0)
+ if (H5T__set_precision(dt, prec)<0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "unable to set precision")
done:
@@ -173,7 +165,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5T_set_precision
+ * Function: H5T__set_precision
*
* Purpose: Sets the precision of a datatype. The precision is
* the number of significant bits which, unless padding is
@@ -195,19 +187,15 @@ done:
* Programmer: Robb Matzke
* Wednesday, January 7, 1998
*
- * Modifications:
- * Robb Matzke, 22 Dec 1998
- * Also works for derived datatypes.
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5T_set_precision(const H5T_t *dt, size_t prec)
+H5T__set_precision(const H5T_t *dt, size_t prec)
{
size_t offset, size;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_STATIC
/* Check args */
HDassert(dt);
@@ -218,8 +206,8 @@ H5T_set_precision(const H5T_t *dt, size_t prec)
HDassert(!(H5T_ENUM==dt->shared->type && 0==dt->shared->u.enumer.nmembs));
if (dt->shared->parent) {
- if (H5T_set_precision(dt->shared->parent, prec)<0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "unable to set precision for base type")
+ if (H5T__set_precision(dt->shared->parent, prec)<0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "unable to set precision for base type")
/* Adjust size of datatype appropriately */
if(dt->shared->type==H5T_ARRAY)
@@ -228,18 +216,18 @@ H5T_set_precision(const H5T_t *dt, size_t prec)
dt->shared->size = dt->shared->parent->shared->size;
} else {
if (H5T_IS_ATOMIC(dt->shared)) {
- /* Adjust the offset and size */
- offset = dt->shared->u.atomic.offset;
- size = dt->shared->size;
- if (prec > 8*size)
+ /* Adjust the offset and size */
+ offset = dt->shared->u.atomic.offset;
+ size = dt->shared->size;
+ if (prec > 8*size)
offset = 0;
- else if (offset+prec > 8 * size)
+ else if (offset+prec > 8 * size)
offset = 8 * size - prec;
- if (prec > 8*size)
+ if (prec > 8*size)
size = (prec+7) / 8;
- /* Check that things are still kosher */
- switch (dt->shared->type) {
+ /* Check that things are still kosher */
+ switch (dt->shared->type) {
case H5T_INTEGER:
case H5T_TIME:
case H5T_BITFIELD:
@@ -271,11 +259,11 @@ H5T_set_precision(const H5T_t *dt, size_t prec)
HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "operation not defined for datatype class")
} /* end switch */
- /* Commit */
- dt->shared->size = size;
+ /* Commit */
+ dt->shared->size = size;
dt->shared->u.atomic.offset = offset;
dt->shared->u.atomic.prec = prec;
- } /* end if */
+ } /* end if */
else
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not defined for specified datatype")
} /* end else */
diff --git a/src/H5Tprivate.h b/src/H5Tprivate.h
index dc5fb19..4682d79 100644
--- a/src/H5Tprivate.h
+++ b/src/H5Tprivate.h
@@ -118,7 +118,7 @@ H5_DLL herr_t H5T_encode(H5T_t *obj, unsigned char *buf, size_t *nalloc);
H5_DLL H5T_t *H5T_decode(size_t buf_size, const unsigned char *buf);
H5_DLL herr_t H5T_debug(const H5T_t *dt, FILE * stream);
H5_DLL struct H5O_loc_t *H5T_oloc(H5T_t *dt);
-H5_DLL H5G_name_t *H5T_nameof(H5T_t *dt);
+H5_DLL H5G_name_t *H5T_nameof(const H5T_t *dt);
H5_DLL htri_t H5T_is_immutable(const H5T_t *dt);
H5_DLL htri_t H5T_is_named(const H5T_t *dt);
H5_DLL herr_t H5T_convert_committed_datatype(H5T_t *dt, H5F_t *f);
diff --git a/src/H5Tstrpad.c b/src/H5Tstrpad.c
index fa084f1..35de30b 100644
--- a/src/H5Tstrpad.c
+++ b/src/H5Tstrpad.c
@@ -41,10 +41,6 @@
* Programmer: Robb Matzke
* Friday, January 9, 1998
*
- * Modifications:
- * Robb Matzke, 22 Dec 1998
- * Also works for derived datatypes.
- *
*-------------------------------------------------------------------------
*/
H5T_str_t
@@ -98,10 +94,6 @@ done:
* Programmer: Robb Matzke
* Friday, January 9, 1998
*
- * Modifications:
- * Robb Matzke, 22 Dec 1998
- * Also works for derived datatypes.
- *
*-------------------------------------------------------------------------
*/
herr_t
diff --git a/src/H5Tvisit.c b/src/H5Tvisit.c
index c706dee..00c7d8f 100644
--- a/src/H5Tvisit.c
+++ b/src/H5Tvisit.c
@@ -22,7 +22,7 @@
*
* Created: H5Tvisit.c
* Jul 19 2007
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Visit all the components of a datatype
*
diff --git a/src/H5Tvlen.c b/src/H5Tvlen.c
index 3cca7c0..b1cb336 100644
--- a/src/H5Tvlen.c
+++ b/src/H5Tvlen.c
@@ -16,20 +16,44 @@
* datatypes in the H5T interface.
*/
+/****************/
+/* Module Setup */
+/****************/
+
#include "H5Tmodule.h" /* This source code file is part of the H5T module */
+/***********/
+/* Headers */
+/***********/
+#include "H5private.h" /* Generic Functions */
+#include "H5CXprivate.h" /* API Contexts */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5HGprivate.h" /* Global Heaps */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Tpkg.h" /* Datatypes */
+
+
+/****************/
+/* Local Macros */
+/****************/
+
+
+/******************/
+/* Local Typedefs */
+/******************/
+
+
+/********************/
+/* Package Typedefs */
+/********************/
-#include "H5private.h" /* Generic Functions */
-#include "H5CXprivate.h" /* API Contexts */
-#include "H5Dprivate.h" /* Dataset functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5HGprivate.h" /* Global Heaps */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Pprivate.h" /* Property lists */
-#include "H5Tpkg.h" /* Datatypes */
-/* Local functions */
+/********************/
+/* Local Prototypes */
+/********************/
+
+/* Memory-based VL sequence callbacks */
static herr_t H5T_vlen_reclaim_recurse(void *elem, const H5T_t *dt, H5MM_free_t free_func, void *free_info);
static ssize_t H5T_vlen_seq_mem_getlen(const void *_vl);
static void * H5T_vlen_seq_mem_getptr(void *_vl);
@@ -37,12 +61,16 @@ static htri_t H5T_vlen_seq_mem_isnull(const H5F_t *f, void *_vl);
static herr_t H5T_vlen_seq_mem_read(H5F_t *f, void *_vl, void *_buf, size_t len);
static herr_t H5T_vlen_seq_mem_write(H5F_t *f, const H5T_vlen_alloc_info_t *vl_alloc_info, void *_vl, void *_buf, void *_bg, size_t seq_len, size_t base_size);
static herr_t H5T_vlen_seq_mem_setnull(H5F_t *f, void *_vl, void *_bg);
+
+/* Memory-based VL string callbacks */
static ssize_t H5T_vlen_str_mem_getlen(const void *_vl);
static void * H5T_vlen_str_mem_getptr(void *_vl);
static htri_t H5T_vlen_str_mem_isnull(const H5F_t *f, void *_vl);
static herr_t H5T_vlen_str_mem_read(H5F_t *f, void *_vl, void *_buf, size_t len);
static herr_t H5T_vlen_str_mem_write(H5F_t *f, const H5T_vlen_alloc_info_t *vl_alloc_info, void *_vl, void *_buf, void *_bg, size_t seq_len, size_t base_size);
static herr_t H5T_vlen_str_mem_setnull(H5F_t *f, void *_vl, void *_bg);
+
+/* Disk-based VL sequence (and string) callbacks */
static ssize_t H5T_vlen_disk_getlen(const void *_vl);
static void * H5T_vlen_disk_getptr(void *_vl);
static htri_t H5T_vlen_disk_isnull(const H5F_t *f, void *_vl);
@@ -50,7 +78,24 @@ static herr_t H5T_vlen_disk_read(H5F_t *f, void *_vl, void *_buf, size_t len);
static herr_t H5T_vlen_disk_write(H5F_t *f, const H5T_vlen_alloc_info_t *vl_alloc_info, void *_vl, void *_buf, void *_bg, size_t seq_len, size_t base_size);
static herr_t H5T_vlen_disk_setnull(H5F_t *f, void *_vl, void *_bg);
-/* Local variables */
+/*********************/
+/* Public Variables */
+/*********************/
+
+
+/*********************/
+/* Package Variables */
+/*********************/
+
+
+/*****************************/
+/* Library Private Variables */
+/*****************************/
+
+
+/*******************/
+/* Local Variables */
+/*******************/
@@ -194,7 +239,7 @@ H5T__vlen_set_loc(const H5T_t *dt, H5F_t *f, H5T_loc_t loc)
dt->shared->u.vlen.loc = H5T_LOC_MEMORY;
if(dt->shared->u.vlen.type == H5T_VLEN_SEQUENCE) {
- /* size in memory, disk size is different */
+ /* Size in memory, disk size is different */
dt->shared->size = sizeof(hvl_t);
/* Set up the function pointers to access the VL sequence in memory */
@@ -206,7 +251,7 @@ H5T__vlen_set_loc(const H5T_t *dt, H5F_t *f, H5T_loc_t loc)
dt->shared->u.vlen.setnull = H5T_vlen_seq_mem_setnull;
} /* end if */
else if(dt->shared->u.vlen.type == H5T_VLEN_STRING) {
- /* size in memory, disk size is different */
+ /* Size in memory, disk size is different */
dt->shared->size = sizeof(char *);
/* Set up the function pointers to access the VL string in memory */
@@ -220,7 +265,7 @@ H5T__vlen_set_loc(const H5T_t *dt, H5F_t *f, H5T_loc_t loc)
else
HDassert(0 && "Invalid VL type");
- /* Reset file ID (since this VL is in memory) */
+ /* Reset file pointer (since this VL is in memory) */
dt->shared->u.vlen.f = NULL;
break;
@@ -268,7 +313,7 @@ H5T__vlen_set_loc(const H5T_t *dt, H5F_t *f, H5T_loc_t loc)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5T__vlen_set_loc() */
+} /* end H5T__vlen_set_loc() */
/*-------------------------------------------------------------------------
@@ -294,7 +339,7 @@ H5T_vlen_seq_mem_getlen(const void *_vl)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- /* check parameters, return result */
+ /* Check parameters, return result */
#ifdef H5_NO_ALIGNMENT_RESTRICTIONS
HDassert(vl);
@@ -379,7 +424,7 @@ H5T_vlen_seq_mem_isnull(const H5F_t H5_ATTR_UNUSED *f, void *_vl)
FUNC_LEAVE_NOAPI((vl.len==0 || vl.p==NULL) ? TRUE : FALSE)
#endif
-} /* end H5T_vlen_seq_mem_isnull() */
+} /* end H5T_vlen_seq_mem_isnull() */
/*-------------------------------------------------------------------------
@@ -398,7 +443,7 @@ static herr_t
H5T_vlen_seq_mem_read(H5F_t H5_ATTR_UNUSED *f, void *_vl, void *buf, size_t len)
{
#ifdef H5_NO_ALIGNMENT_RESTRICTIONS
- const hvl_t *vl=(const hvl_t *)_vl; /* Pointer to the user's hvl_t information */
+ const hvl_t *vl = (const hvl_t *)_vl; /* Pointer to the user's hvl_t information */
#else
hvl_t vl; /* User's hvl_t information */
#endif
@@ -410,17 +455,17 @@ H5T_vlen_seq_mem_read(H5F_t H5_ATTR_UNUSED *f, void *_vl, void *buf, size_t len)
#ifdef H5_NO_ALIGNMENT_RESTRICTIONS
HDassert(vl && vl->p);
- H5MM_memcpy(buf,vl->p,len);
+ H5MM_memcpy(buf, vl->p, len);
#else
HDassert(_vl);
H5MM_memcpy(&vl, _vl, sizeof(hvl_t));
HDassert(vl.p);
- H5MM_memcpy(buf,vl.p,len);
+ H5MM_memcpy(buf, vl.p, len);
#endif
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5T_vlen_seq_mem_read() */
+} /* end H5T_vlen_seq_mem_read() */
/*-------------------------------------------------------------------------
@@ -439,8 +484,7 @@ static herr_t
H5T_vlen_seq_mem_write(H5F_t H5_ATTR_UNUSED *f, const H5T_vlen_alloc_info_t *vl_alloc_info, void *_vl, void *buf, void H5_ATTR_UNUSED *_bg, size_t seq_len, size_t base_size)
{
hvl_t vl; /* Temporary hvl_t to use during operation */
- size_t len;
- herr_t ret_value=SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -448,35 +492,33 @@ H5T_vlen_seq_mem_write(H5F_t H5_ATTR_UNUSED *f, const H5T_vlen_alloc_info_t *vl_
HDassert(_vl);
HDassert(buf);
- if(seq_len!=0) {
- len=seq_len*base_size;
+ if(seq_len) {
+ size_t len = seq_len * base_size; /* Sequence size */
/* Use the user's memory allocation routine is one is defined */
- if(vl_alloc_info->alloc_func!=NULL) {
- if(NULL==(vl.p=(vl_alloc_info->alloc_func)(len,vl_alloc_info->alloc_info)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for VL data")
+ if(vl_alloc_info->alloc_func != NULL) {
+ if(NULL == (vl.p = (vl_alloc_info->alloc_func)(len, vl_alloc_info->alloc_info)))
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "application memory allocation routine failed for VL data")
} /* end if */
- else { /* Default to system malloc */
+ else /* Default to system malloc */
if(NULL == (vl.p = HDmalloc(len)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for VL data")
- } /* end else */
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "memory allocation failed for VL data")
/* Copy the data into the newly allocated buffer */
- H5MM_memcpy(vl.p,buf,len);
-
+ H5MM_memcpy(vl.p, buf, len);
} /* end if */
else
- vl.p=NULL;
+ vl.p = NULL;
/* Set the sequence length */
- vl.len=seq_len;
+ vl.len = seq_len;
/* Set pointer in user's buffer with memcpy, to avoid alignment issues */
- H5MM_memcpy(_vl,&vl,sizeof(hvl_t));
+ H5MM_memcpy(_vl, &vl, sizeof(hvl_t));
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5T_vlen_seq_mem_write() */
+} /* end H5T_vlen_seq_mem_write() */
/*-------------------------------------------------------------------------
@@ -502,14 +544,14 @@ H5T_vlen_seq_mem_setnull(H5F_t H5_ATTR_UNUSED *f, void *_vl, void H5_ATTR_UNUSED
HDassert(_vl);
/* Set the "nil" hvl_t */
- vl.len=0;
- vl.p=NULL;
+ vl.len = 0;
+ vl.p = NULL;
/* Set pointer in user's buffer with memcpy, to avoid alignment issues */
- H5MM_memcpy(_vl,&vl,sizeof(hvl_t));
+ H5MM_memcpy(_vl, &vl, sizeof(hvl_t));
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5T_vlen_seq_mem_setnull() */
+} /* end H5T_vlen_seq_mem_setnull() */
/*-------------------------------------------------------------------------
@@ -528,7 +570,7 @@ static ssize_t
H5T_vlen_str_mem_getlen(const void *_vl)
{
#ifdef H5_NO_ALIGNMENT_RESTRICTIONS
- const char *s=*(const char * const *)_vl; /* Pointer to the user's string information */
+ const char *s = *(const char * const *)_vl; /* Pointer to the user's string information */
#else
const char *s; /* Pointer to the user's string information */
#endif
@@ -544,7 +586,7 @@ H5T_vlen_str_mem_getlen(const void *_vl)
#endif
FUNC_LEAVE_NOAPI((ssize_t)HDstrlen(s))
-} /* end H5T_vlen_str_mem_getlen() */
+} /* end H5T_vlen_str_mem_getlen() */
/*-------------------------------------------------------------------------
@@ -579,7 +621,7 @@ H5T_vlen_str_mem_getptr(void *_vl)
#endif
FUNC_LEAVE_NOAPI(s)
-} /* end H5T_vlen_str_mem_getptr() */
+} /* end H5T_vlen_str_mem_getptr() */
/*-------------------------------------------------------------------------
@@ -636,7 +678,7 @@ H5T_vlen_str_mem_read(H5F_t H5_ATTR_UNUSED *f, void *_vl, void *buf, size_t len)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- if(len>0) {
+ if(len > 0) {
/* check parameters */
HDassert(buf);
#ifdef H5_NO_ALIGNMENT_RESTRICTIONS
@@ -646,7 +688,7 @@ H5T_vlen_str_mem_read(H5F_t H5_ATTR_UNUSED *f, void *_vl, void *buf, size_t len)
H5MM_memcpy(&s, _vl, sizeof(char *));
#endif
- H5MM_memcpy(buf,s,len);
+ H5MM_memcpy(buf, s, len);
} /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -680,25 +722,25 @@ H5T_vlen_str_mem_write(H5F_t H5_ATTR_UNUSED *f, const H5T_vlen_alloc_info_t *vl_
HDassert(buf);
/* Use the user's memory allocation routine if one is defined */
- if(vl_alloc_info->alloc_func!=NULL) {
- if(NULL==(t = (char *)(vl_alloc_info->alloc_func)((seq_len+1)*base_size,vl_alloc_info->alloc_info)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for VL data")
- } /* end if */
- else { /* Default to system malloc */
+ if(vl_alloc_info->alloc_func != NULL) {
+ if(NULL == (t = (char *)(vl_alloc_info->alloc_func)((seq_len + 1) * base_size, vl_alloc_info->alloc_info)))
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "application memory allocation routine failed for VL data")
+ } /* end if */
+ else /* Default to system malloc */
if(NULL == (t = (char *)HDmalloc((seq_len + 1) * base_size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for VL data")
- } /* end else */
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "memory allocation failed for VL data")
- len=(seq_len*base_size);
- H5MM_memcpy(t,buf,len);
- t[len]='\0';
+ /* 'write' the string into the buffer, with memcpy() */
+ len = (seq_len * base_size);
+ H5MM_memcpy(t, buf, len);
+ t[len] = '\0';
/* Set pointer in user's buffer with memcpy, to avoid alignment issues */
- H5MM_memcpy(_vl,&t,sizeof(char *));
+ H5MM_memcpy(_vl, &t, sizeof(char *));
done:
FUNC_LEAVE_NOAPI(ret_value) /*lint !e429 The pointer in 't' has been copied */
-} /* end H5T_vlen_str_mem_write() */
+} /* end H5T_vlen_str_mem_write() */
/*-------------------------------------------------------------------------
@@ -723,8 +765,8 @@ H5T_vlen_str_mem_setnull(H5F_t H5_ATTR_UNUSED *f, void *_vl, void H5_ATTR_UNUSED
/* Set pointer in user's buffer with memcpy, to avoid alignment issues */
H5MM_memcpy(_vl,&t,sizeof(char *));
- FUNC_LEAVE_NOAPI(SUCCEED) /*lint !e429 The pointer in 't' has been copied */
-} /* end H5T_vlen_str_mem_setnull() */
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* end H5T_vlen_str_mem_setnull() */
/*-------------------------------------------------------------------------
@@ -747,13 +789,13 @@ H5T_vlen_disk_getlen(const void *_vl)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- /* check parameters */
+ /* Check parameters */
HDassert(vl);
UINT32DECODE(vl, seq_len);
FUNC_LEAVE_NOAPI((ssize_t)seq_len)
-} /* end H5T_vlen_disk_getlen() */
+} /* end H5T_vlen_disk_getlen() */
/*-------------------------------------------------------------------------
@@ -773,11 +815,11 @@ H5T_vlen_disk_getptr(void H5_ATTR_UNUSED *vl)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
- /* check parameters */
+ /* Check parameters */
HDassert(vl);
FUNC_LEAVE_NOAPI(NULL)
-} /* end H5T_vlen_disk_getptr() */
+} /* end H5T_vlen_disk_getptr() */
/*-------------------------------------------------------------------------
@@ -810,7 +852,7 @@ H5T_vlen_disk_isnull(const H5F_t *f, void *_vl)
H5F_addr_decode(f, (const uint8_t **)&vl, &addr);
FUNC_LEAVE_NOAPI(addr == 0 ? TRUE : FALSE)
-} /* end H5T_vlen_disk_isnull() */
+} /* end H5T_vlen_disk_isnull() */
/*-------------------------------------------------------------------------
@@ -834,7 +876,7 @@ H5T_vlen_disk_read(H5F_t *f, void *_vl, void *buf, size_t H5_ATTR_UNUSED len)
FUNC_ENTER_NOAPI_NOINIT
- /* check parameters */
+ /* Check parameters */
HDassert(vl);
HDassert(buf);
HDassert(f);
@@ -854,7 +896,7 @@ H5T_vlen_disk_read(H5F_t *f, void *_vl, void *buf, size_t H5_ATTR_UNUSED len)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5T_vlen_disk_read() */
+} /* end H5T_vlen_disk_read() */
/*-------------------------------------------------------------------------
@@ -918,7 +960,7 @@ H5T_vlen_disk_write(H5F_t *f, const H5T_vlen_alloc_info_t H5_ATTR_UNUSED *vl_all
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5T_vlen_disk_write() */
+} /* end H5T_vlen_disk_write() */
/*-------------------------------------------------------------------------
@@ -943,7 +985,7 @@ H5T_vlen_disk_setnull(H5F_t *f, void *_vl, void *_bg)
FUNC_ENTER_NOAPI_NOINIT
- /* check parameters */
+ /* Check parameters */
HDassert(f);
HDassert(vl);
@@ -975,7 +1017,7 @@ H5T_vlen_disk_setnull(H5F_t *f, void *_vl, void *_bg)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5T_vlen_disk_setnull() */
+} /* end H5T_vlen_disk_setnull() */
/*--------------------------------------------------------------------------
@@ -1021,7 +1063,7 @@ H5T_vlen_reclaim_recurse(void *elem, const H5T_t *dt, H5MM_free_t free_func, voi
for(u = 0; u < dt->shared->u.array.nelem; u++) {
off = ((uint8_t *)elem) + u * (dt->shared->parent->shared->size);
if(H5T_vlen_reclaim_recurse(off, dt->shared->parent, free_func, free_info) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "Unable to free array element")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "unable to free array element")
} /* end for */
} /* end if */
break;
@@ -1036,7 +1078,7 @@ H5T_vlen_reclaim_recurse(void *elem, const H5T_t *dt, H5MM_free_t free_func, voi
/* Calculate the offset member and recurse on it */
off = ((uint8_t *)elem) + dt->shared->u.compnd.memb[u].offset;
if(H5T_vlen_reclaim_recurse(off, dt->shared->u.compnd.memb[u].type, free_func, free_info) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "Unable to free compound field")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "unable to free compound field")
} /* end if */
} /* end for */
break;
@@ -1056,7 +1098,7 @@ H5T_vlen_reclaim_recurse(void *elem, const H5T_t *dt, H5MM_free_t free_func, voi
while(vl->len > 0) {
off = ((uint8_t *)vl->p) + (vl->len - 1) * dt->shared->parent->shared->size;
if(H5T_vlen_reclaim_recurse(off, dt->shared->parent, free_func, free_info) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "Unable to free VL element")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "unable to free VL element")
vl->len--;
} /* end while */
} /* end if */
@@ -1151,7 +1193,7 @@ H5T_vlen_reclaim(void *elem, hid_t type_id, unsigned H5_ATTR_UNUSED ndim,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5T_vlen_reclaim() */
+} /* end H5T_vlen_reclaim() */
/*-------------------------------------------------------------------------
@@ -1169,8 +1211,8 @@ done:
herr_t
H5T_vlen_reclaim_elmt(void *elem, H5T_t *dt)
{
- H5T_vlen_alloc_info_t vl_alloc_info; /* VL allocation info */
- herr_t ret_value = SUCCEED; /* return value */
+ H5T_vlen_alloc_info_t vl_alloc_info; /* VL allocation info */
+ herr_t ret_value = SUCCEED; /* return value */
HDassert(dt);
HDassert(elem);
diff --git a/src/H5Zfletcher32.c b/src/H5Zfletcher32.c
index c40e9b4..07e2f79 100644
--- a/src/H5Zfletcher32.c
+++ b/src/H5Zfletcher32.c
@@ -26,26 +26,26 @@
#include "H5Zpkg.h" /* Data filters */
/* Local function prototypes */
-static size_t H5Z_filter_fletcher32 (unsigned flags, size_t cd_nelmts,
+static size_t H5Z__filter_fletcher32(unsigned flags, size_t cd_nelmts,
const unsigned cd_values[], size_t nbytes, size_t *buf_size, void **buf);
/* This message derives from H5Z */
const H5Z_class2_t H5Z_FLETCHER32[1] = {{
- H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
H5Z_FILTER_FLETCHER32, /* Filter id number */
- 1, /* encoder_present flag (set to true) */
- 1, /* decoder_present flag (set to true) */
+ 1, /* encoder_present flag (set to true) */
+ 1, /* decoder_present flag (set to true) */
"fletcher32", /* Filter name for debugging */
NULL, /* The "can apply" callback */
NULL, /* The "set local" callback */
- H5Z_filter_fletcher32, /* The actual filter function */
+ H5Z__filter_fletcher32, /* The actual filter function */
}};
#define FLETCHER_LEN 4
/*-------------------------------------------------------------------------
- * Function: H5Z_filter_fletcher32
+ * Function: H5Z__filter_fletcher32
*
* Purpose: Implement an I/O filter of Fletcher32 Checksum
*
@@ -55,21 +55,10 @@ const H5Z_class2_t H5Z_FLETCHER32[1] = {{
* Programmer: Raymond Lu
* Jan 3, 2003
*
- * Modifications:
- * Raymond Lu
- * July 8, 2005
- * There was a bug in the calculating code of the Fletcher32
- * checksum in the library before v1.6.3. The checksum
- * value wasn't consistent between big-endian and little-endian
- * systems. This bug was fixed in Release 1.6.3. However,
- * after fixing the bug, the checksum value is no longer the
- * same as before on little-endian system. We'll check both
- * the correct checksum and the wrong checksum to be consistent
- * with Release 1.6.2 and before.
*-------------------------------------------------------------------------
*/
static size_t
-H5Z_filter_fletcher32 (unsigned flags, size_t H5_ATTR_UNUSED cd_nelmts, const unsigned H5_ATTR_UNUSED cd_values[],
+H5Z__filter_fletcher32(unsigned flags, size_t H5_ATTR_UNUSED cd_nelmts, const unsigned H5_ATTR_UNUSED cd_values[],
size_t nbytes, size_t *buf_size, void **buf)
{
void *outbuf = NULL; /* Pointer to new buffer */
@@ -80,7 +69,7 @@ H5Z_filter_fletcher32 (unsigned flags, size_t H5_ATTR_UNUSED cd_nelmts, const un
uint8_t tmp;
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI(0)
+ FUNC_ENTER_STATIC
HDassert(sizeof(uint32_t)>=4);
diff --git a/src/H5Zmodule.h b/src/H5Zmodule.h
index 97e158c..e4fd90c 100644
--- a/src/H5Zmodule.h
+++ b/src/H5Zmodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5Znbit.c b/src/H5Znbit.c
index 8c0e876..d29343b 100644
--- a/src/H5Znbit.c
+++ b/src/H5Znbit.c
@@ -34,34 +34,34 @@ typedef struct {
} parms_atomic;
/* Local function prototypes */
-static htri_t H5Z_can_apply_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id);
-static herr_t H5Z_set_local_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id);
-static size_t H5Z_filter_nbit(unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
+static htri_t H5Z__can_apply_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id);
+static herr_t H5Z__set_local_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id);
+static size_t H5Z__filter_nbit(unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
size_t nbytes, size_t *buf_size, void **buf);
-static void H5Z_calc_parms_nooptype(size_t *cd_values_actual_nparms);
-static void H5Z_calc_parms_atomic(size_t *cd_values_actual_nparms);
-static herr_t H5Z_calc_parms_array(const H5T_t *type, size_t *cd_values_actual_nparms);
-static herr_t H5Z_calc_parms_compound(const H5T_t *type, size_t *cd_values_actual_nparms);
+static void H5Z__calc_parms_nooptype(size_t *cd_values_actual_nparms);
+static void H5Z__calc_parms_atomic(size_t *cd_values_actual_nparms);
+static herr_t H5Z__calc_parms_array(const H5T_t *type, size_t *cd_values_actual_nparms);
+static herr_t H5Z__calc_parms_compound(const H5T_t *type, size_t *cd_values_actual_nparms);
-static herr_t H5Z_set_parms_nooptype(const H5T_t *type, unsigned *cd_values_index,
+static herr_t H5Z__set_parms_nooptype(const H5T_t *type, unsigned *cd_values_index,
unsigned cd_values[]);
-static herr_t H5Z_set_parms_atomic(const H5T_t *type, unsigned *cd_values_index,
+static herr_t H5Z__set_parms_atomic(const H5T_t *type, unsigned *cd_values_index,
unsigned cd_values[], hbool_t *need_not_compress);
-static herr_t H5Z_set_parms_array(const H5T_t *type, unsigned *cd_values_index,
+static herr_t H5Z__set_parms_array(const H5T_t *type, unsigned *cd_values_index,
unsigned cd_values[], hbool_t *need_not_compress);
-static herr_t H5Z_set_parms_compound(const H5T_t *type, unsigned *cd_values_index,
+static herr_t H5Z__set_parms_compound(const H5T_t *type, unsigned *cd_values_index,
unsigned cd_values[], hbool_t *need_not_compress);
-static void H5Z_nbit_next_byte(size_t *j, size_t *buf_len);
-static void H5Z_nbit_decompress_one_byte(unsigned char *data, size_t data_offset,
+static void H5Z__nbit_next_byte(size_t *j, size_t *buf_len);
+static void H5Z__nbit_decompress_one_byte(unsigned char *data, size_t data_offset,
unsigned k, unsigned begin_i, unsigned end_i, unsigned char *buffer, size_t *j,
size_t *buf_len, const parms_atomic *p, size_t datatype_len);
-static void H5Z_nbit_compress_one_byte(unsigned char *data, size_t data_offset, unsigned k, unsigned begin_i,
+static void H5Z__nbit_compress_one_byte(unsigned char *data, size_t data_offset, unsigned k, unsigned begin_i,
unsigned end_i, unsigned char *buffer, size_t *j, size_t *buf_len, const parms_atomic *p, size_t datatype_len);
-static void H5Z_nbit_decompress_one_nooptype(unsigned char *data, size_t data_offset,
+static void H5Z__nbit_decompress_one_nooptype(unsigned char *data, size_t data_offset,
unsigned char *buffer, size_t *j, size_t *buf_len, unsigned size);
-static void H5Z_nbit_decompress_one_atomic(unsigned char *data, size_t data_offset,
+static void H5Z__nbit_decompress_one_atomic(unsigned char *data, size_t data_offset,
unsigned char *buffer, size_t *j, size_t *buf_len, const parms_atomic *p);
static herr_t H5Z__nbit_decompress_one_array(unsigned char *data, size_t data_offset,
unsigned char *buffer, size_t *j, size_t *buf_len, const unsigned parms[],
@@ -71,29 +71,27 @@ static herr_t H5Z__nbit_decompress_one_compound(unsigned char *data, size_t data
unsigned *parms_index);
static herr_t H5Z__nbit_decompress(unsigned char *data, unsigned d_nelmts, unsigned char *buffer,
const unsigned parms[]);
-static void H5Z_nbit_compress_one_nooptype(unsigned char *data, size_t data_offset,
+static void H5Z__nbit_compress_one_nooptype(unsigned char *data, size_t data_offset,
unsigned char *buffer, size_t *j, size_t *buf_len, unsigned size);
-static void H5Z_nbit_compress_one_atomic(unsigned char *data, size_t data_offset,
- unsigned char *buffer, size_t *j, size_t *buf_len, const parms_atomic *p);
-static void H5Z_nbit_compress_one_array(unsigned char *data, size_t data_offset,
+static void H5Z__nbit_compress_one_array(unsigned char *data, size_t data_offset,
unsigned char *buffer, size_t *j, size_t *buf_len, const unsigned parms[],
unsigned *parms_index);
-static void H5Z_nbit_compress_one_compound(unsigned char *data, size_t data_offset,
+static void H5Z__nbit_compress_one_compound(unsigned char *data, size_t data_offset,
unsigned char *buffer, size_t *j, size_t *buf_len, const unsigned parms[],
unsigned *parms_index);
-static void H5Z_nbit_compress(unsigned char *data, unsigned d_nelmts, unsigned char *buffer,
+static void H5Z__nbit_compress(unsigned char *data, unsigned d_nelmts, unsigned char *buffer,
size_t *buffer_size, const unsigned parms[]);
/* This message derives from H5Z */
H5Z_class2_t H5Z_NBIT[1] = {{
- H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
H5Z_FILTER_NBIT, /* Filter id number */
- 1, /* Assume encoder present: check before registering */
- 1, /* decoder_present flag (set to true) */
- "nbit", /* Filter name for debugging */
- H5Z_can_apply_nbit, /* The "can apply" callback */
- H5Z_set_local_nbit, /* The "set local" callback */
- H5Z_filter_nbit, /* The actual filter function */
+ 1, /* Assume encoder present: check before registering */
+ 1, /* decoder_present flag (set to true) */
+ "nbit", /* Filter name for debugging */
+ H5Z__can_apply_nbit, /* The "can apply" callback */
+ H5Z__set_local_nbit, /* The "set local" callback */
+ H5Z__filter_nbit, /* The actual filter function */
}};
/* Local macros */
@@ -109,7 +107,7 @@ H5Z_class2_t H5Z_NBIT[1] = {{
/*-------------------------------------------------------------------------
- * Function: H5Z_can_apply_nbit
+ * Function: H5Z__can_apply_nbit
*
* Purpose: Check the parameters for nbit compression for validity and
* whether they fit a particular dataset.
@@ -120,17 +118,15 @@ H5Z_class2_t H5Z_NBIT[1] = {{
* Programmer: Xiaowen Wu
* Tuesday, December 21, 2004
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static htri_t
-H5Z_can_apply_nbit(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5_ATTR_UNUSED space_id)
+H5Z__can_apply_nbit(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5_ATTR_UNUSED space_id)
{
const H5T_t *type; /* Datatype */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Get datatype */
if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
@@ -146,11 +142,11 @@ H5Z_can_apply_nbit(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5_ATTR_UN
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5Z_can_apply_nbit() */
+} /* end H5Z__can_apply_nbit() */
/*-------------------------------------------------------------------------
- * Function: H5Z_calc_parms_nooptype
+ * Function: H5Z__calc_parms_nooptype
*
* Purpose: Calculate the number of parameters of array cd_values[]
* of datatype that is not integer, nor floating-point, nor
@@ -159,12 +155,10 @@ done:
* Programmer: Xiaowen Wu
* Thursday, March 3, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void
-H5Z_calc_parms_nooptype(size_t *cd_values_actual_nparms)
+H5Z__calc_parms_nooptype(size_t *cd_values_actual_nparms)
{
/* Store datatype class code */
*cd_values_actual_nparms += 1;
@@ -175,7 +169,7 @@ H5Z_calc_parms_nooptype(size_t *cd_values_actual_nparms)
/*-------------------------------------------------------------------------
- * Function: H5Z_calc_parms_atomic
+ * Function: H5Z__calc_parms_atomic
*
* Purpose: Calculate the number of parameters of array cd_values[]
* of atomic datatype whose datatype class is integer
@@ -184,12 +178,10 @@ H5Z_calc_parms_nooptype(size_t *cd_values_actual_nparms)
* Programmer: Xiaowen Wu
* Saturday, January 29, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void
-H5Z_calc_parms_atomic(size_t *cd_values_actual_nparms)
+H5Z__calc_parms_atomic(size_t *cd_values_actual_nparms)
{
/* Store datatype class code */
*cd_values_actual_nparms += 1;
@@ -209,7 +201,7 @@ H5Z_calc_parms_atomic(size_t *cd_values_actual_nparms)
/*-------------------------------------------------------------------------
- * Function: H5Z_calc_parms_array
+ * Function: H5Z__calc_parms_array
*
* Purpose: Calculate the number of parameters of array cd_values[]
* for a given datatype identifier type_id
@@ -221,18 +213,16 @@ H5Z_calc_parms_atomic(size_t *cd_values_actual_nparms)
* Programmer: Xiaowen Wu
* Wednesday, January 19, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5Z_calc_parms_array(const H5T_t *type, size_t *cd_values_actual_nparms)
+H5Z__calc_parms_array(const H5T_t *type, size_t *cd_values_actual_nparms)
{
H5T_t *dtype_base = NULL; /* Array datatype's base datatype */
H5T_class_t dtype_base_class; /* Array datatype's base datatype's class */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Store datatype class code */
*cd_values_actual_nparms += 1;
@@ -252,16 +242,16 @@ H5Z_calc_parms_array(const H5T_t *type, size_t *cd_values_actual_nparms)
switch(dtype_base_class) {
case H5T_INTEGER:
case H5T_FLOAT:
- H5Z_calc_parms_atomic(cd_values_actual_nparms);
+ H5Z__calc_parms_atomic(cd_values_actual_nparms);
break;
case H5T_ARRAY:
- if(H5Z_calc_parms_array(dtype_base, cd_values_actual_nparms) == FAIL)
+ if(H5Z__calc_parms_array(dtype_base, cd_values_actual_nparms) == FAIL)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot compute parameters for datatype")
break;
case H5T_COMPOUND:
- if(H5Z_calc_parms_compound(dtype_base, cd_values_actual_nparms) == FAIL)
+ if(H5Z__calc_parms_compound(dtype_base, cd_values_actual_nparms) == FAIL)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot compute parameters for datatype")
break;
@@ -273,7 +263,7 @@ H5Z_calc_parms_array(const H5T_t *type, size_t *cd_values_actual_nparms)
case H5T_ENUM:
case H5T_VLEN:
/* Other datatype classes: nbit does no compression */
- H5Z_calc_parms_nooptype(cd_values_actual_nparms);
+ H5Z__calc_parms_nooptype(cd_values_actual_nparms);
break;
case H5T_NO_CLASS:
@@ -290,11 +280,11 @@ done:
HDONE_ERROR(H5E_PLINE, H5E_CLOSEERROR, FAIL, "Unable to close base datatype")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5Z_calc_parms_array() */
+} /* end H5Z__calc_parms_array() */
/*-------------------------------------------------------------------------
- * Function: H5Z_calc_parms_compound
+ * Function: H5Z__calc_parms_compound
*
* Purpose: Calculate the number of parameters of array cd_values[]
* for a given datatype identifier type_id
@@ -306,19 +296,17 @@ done:
* Programmer: Xiaowen Wu
* Wednesday, January 19, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5Z_calc_parms_compound(const H5T_t *type, size_t *cd_values_actual_nparms)
+H5Z__calc_parms_compound(const H5T_t *type, size_t *cd_values_actual_nparms)
{
int nmembers; /* Compound datatype's number of members */
H5T_t *dtype_member = NULL; /* Compound datatype's member datatype */
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Store compound datatype class code */
*cd_values_actual_nparms += 1;
@@ -352,16 +340,16 @@ H5Z_calc_parms_compound(const H5T_t *type, size_t *cd_values_actual_nparms)
switch(dtype_member_class) {
case H5T_INTEGER:
case H5T_FLOAT:
- H5Z_calc_parms_atomic(cd_values_actual_nparms);
+ H5Z__calc_parms_atomic(cd_values_actual_nparms);
break;
case H5T_ARRAY:
- if(H5Z_calc_parms_array(dtype_member, cd_values_actual_nparms) == FAIL)
+ if(H5Z__calc_parms_array(dtype_member, cd_values_actual_nparms) == FAIL)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot compute parameters for datatype")
break;
case H5T_COMPOUND:
- if(H5Z_calc_parms_compound(dtype_member, cd_values_actual_nparms) == FAIL)
+ if(H5Z__calc_parms_compound(dtype_member, cd_values_actual_nparms) == FAIL)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot compute parameters for datatype")
break;
@@ -373,7 +361,7 @@ H5Z_calc_parms_compound(const H5T_t *type, size_t *cd_values_actual_nparms)
case H5T_ENUM:
case H5T_VLEN:
/* Other datatype classes: nbit does no compression */
- H5Z_calc_parms_nooptype(cd_values_actual_nparms);
+ H5Z__calc_parms_nooptype(cd_values_actual_nparms);
break;
case H5T_NO_CLASS:
@@ -400,7 +388,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Z_set_parms_nooptype
+ * Function: H5Z__set_parms_nooptype
*
* Purpose: Set the array cd_values[] for a given datatype identifier
* type_id if its datatype class is not integer, nor
@@ -413,17 +401,15 @@ done:
* Programmer: Xiaowen Wu
* Tuesday, April 5, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5Z_set_parms_nooptype(const H5T_t *type, unsigned *cd_values_index, unsigned cd_values[])
+H5Z__set_parms_nooptype(const H5T_t *type, unsigned *cd_values_index, unsigned cd_values[])
{
size_t dtype_size; /* No-op datatype's size (in bytes) */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Set datatype class code */
cd_values[(*cd_values_index)++] = H5Z_NBIT_NOOPTYPE;
@@ -438,11 +424,11 @@ H5Z_set_parms_nooptype(const H5T_t *type, unsigned *cd_values_index, unsigned cd
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5Z_set_parms_nooptype() */
+} /* end H5Z__set_parms_nooptype() */
/*-------------------------------------------------------------------------
- * Function: H5Z_set_parms_atomic
+ * Function: H5Z__set_parms_atomic
*
* Purpose: Set the array cd_values[] for a given datatype identifier
* type_id if its datatype class is integer or floating point
@@ -453,12 +439,10 @@ done:
* Programmer: Xiaowen Wu
* Tuesday, January 11, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5Z_set_parms_atomic(const H5T_t *type, unsigned *cd_values_index,
+H5Z__set_parms_atomic(const H5T_t *type, unsigned *cd_values_index,
unsigned cd_values[], hbool_t *need_not_compress)
{
H5T_order_t dtype_order; /* Atomic datatype's endianness order */
@@ -468,7 +452,7 @@ H5Z_set_parms_atomic(const H5T_t *type, unsigned *cd_values_index,
unsigned dtype_offset; /* Atomic datatype's offset (in bits) */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Set datatype class code */
cd_values[(*cd_values_index)++] = H5Z_NBIT_ATOMIC;
@@ -532,11 +516,11 @@ H5Z_set_parms_atomic(const H5T_t *type, unsigned *cd_values_index,
*need_not_compress = FALSE;
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5Z_set_parms_atomic() */
+} /* end H5Z__set_parms_atomic() */
/*-------------------------------------------------------------------------
- * Function: H5Z_set_parms_array
+ * Function: H5Z__set_parms_array
*
* Purpose: Set the array cd_values[] for a given datatype identifier
* type_id if its datatype class is array datatype
@@ -547,12 +531,10 @@ done:
* Programmer: Xiaowen Wu
* Tuesday, April 5, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5Z_set_parms_array(const H5T_t *type, unsigned *cd_values_index,
+H5Z__set_parms_array(const H5T_t *type, unsigned *cd_values_index,
unsigned cd_values[], hbool_t *need_not_compress)
{
H5T_t *dtype_base = NULL; /* Array datatype's base datatype */
@@ -561,7 +543,7 @@ H5Z_set_parms_array(const H5T_t *type, unsigned *cd_values_index,
htri_t is_vlstring; /* flag indicating if datatype is variable-length string */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Set datatype class code */
cd_values[(*cd_values_index)++] = H5Z_NBIT_ARRAY;
@@ -586,17 +568,17 @@ H5Z_set_parms_array(const H5T_t *type, unsigned *cd_values_index,
switch(dtype_base_class) {
case H5T_INTEGER:
case H5T_FLOAT:
- if(H5Z_set_parms_atomic(dtype_base, cd_values_index, cd_values, need_not_compress) < 0)
+ if(H5Z__set_parms_atomic(dtype_base, cd_values_index, cd_values, need_not_compress) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype")
break;
case H5T_ARRAY:
- if(H5Z_set_parms_array(dtype_base, cd_values_index, cd_values, need_not_compress) < 0)
+ if(H5Z__set_parms_array(dtype_base, cd_values_index, cd_values, need_not_compress) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype")
break;
case H5T_COMPOUND:
- if(H5Z_set_parms_compound(dtype_base, cd_values_index, cd_values, need_not_compress) < 0)
+ if(H5Z__set_parms_compound(dtype_base, cd_values_index, cd_values, need_not_compress) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype")
break;
@@ -609,7 +591,7 @@ H5Z_set_parms_array(const H5T_t *type, unsigned *cd_values_index,
if(dtype_base_class == H5T_VLEN || is_vlstring)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "datatype not supported by nbit")
- if(H5Z_set_parms_nooptype(dtype_base, cd_values_index, cd_values) < 0)
+ if(H5Z__set_parms_nooptype(dtype_base, cd_values_index, cd_values) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype")
break;
@@ -619,7 +601,7 @@ H5Z_set_parms_array(const H5T_t *type, unsigned *cd_values_index,
case H5T_OPAQUE:
case H5T_REFERENCE:
case H5T_ENUM:
- if(H5Z_set_parms_nooptype(dtype_base, cd_values_index, cd_values) < 0)
+ if(H5Z__set_parms_nooptype(dtype_base, cd_values_index, cd_values) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype")
break;
@@ -637,11 +619,11 @@ done:
HDONE_ERROR(H5E_PLINE, H5E_CLOSEERROR, FAIL, "Unable to close base datatype")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5Z_set_parms_array() */
+} /* end H5Z__set_parms_array() */
/*-------------------------------------------------------------------------
- * Function: H5Z_set_parms_compound
+ * Function: H5Z__set_parms_compound
*
* Purpose: Set the array cd_values[] for a given datatype identifier
* type_id if its datatype class is compound datatype
@@ -652,12 +634,10 @@ done:
* Programmer: Xiaowen Wu
* Tuesday, April 5, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5Z_set_parms_compound(const H5T_t *type, unsigned *cd_values_index,
+H5Z__set_parms_compound(const H5T_t *type, unsigned *cd_values_index,
unsigned cd_values[], hbool_t *need_not_compress)
{
int snmembers; /* Compound datatype's number of members */
@@ -671,7 +651,7 @@ H5Z_set_parms_compound(const H5T_t *type, unsigned *cd_values_index,
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Set "local" parameter for compound datatype class code */
cd_values[(*cd_values_index)++] = H5Z_NBIT_COMPOUND;
@@ -713,17 +693,17 @@ H5Z_set_parms_compound(const H5T_t *type, unsigned *cd_values_index,
switch(dtype_member_class) {
case H5T_INTEGER:
case H5T_FLOAT:
- if(H5Z_set_parms_atomic(dtype_member, cd_values_index, cd_values, need_not_compress) < 0)
+ if(H5Z__set_parms_atomic(dtype_member, cd_values_index, cd_values, need_not_compress) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype")
break;
case H5T_ARRAY:
- if(H5Z_set_parms_array(dtype_member, cd_values_index, cd_values, need_not_compress) < 0)
+ if(H5Z__set_parms_array(dtype_member, cd_values_index, cd_values, need_not_compress) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype")
break;
case H5T_COMPOUND:
- if(H5Z_set_parms_compound(dtype_member, cd_values_index, cd_values, need_not_compress) < 0)
+ if(H5Z__set_parms_compound(dtype_member, cd_values_index, cd_values, need_not_compress) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype")
break;
@@ -761,7 +741,7 @@ H5Z_set_parms_compound(const H5T_t *type, unsigned *cd_values_index,
case H5T_REFERENCE:
case H5T_ENUM:
/* other datatype that nbit does no compression */
- if(H5Z_set_parms_nooptype(dtype_member, cd_values_index, cd_values) < 0)
+ if(H5Z__set_parms_nooptype(dtype_member, cd_values_index, cd_values) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype")
break;
@@ -789,7 +769,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Z_set_local_nbit
+ * Function: H5Z__set_local_nbit
*
* Purpose: Set the "local" dataset parameters for nbit compression.
*
@@ -799,12 +779,10 @@ done:
* Programmer: Xiaowen Wu
* Tuesday, January 11, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5Z_set_local_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id)
+H5Z__set_local_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id)
{
H5P_genplist_t *dcpl_plist; /* Property list pointer */
const H5T_t *type; /* Datatype */
@@ -819,7 +797,7 @@ H5Z_set_local_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id)
hbool_t need_not_compress; /* Flag if TRUE indicating no need to do nbit compression */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Get datatype */
if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
@@ -839,16 +817,16 @@ H5Z_set_local_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id)
switch(dtype_class) {
case H5T_INTEGER:
case H5T_FLOAT:
- H5Z_calc_parms_atomic(&cd_values_actual_nparms);
+ H5Z__calc_parms_atomic(&cd_values_actual_nparms);
break;
case H5T_ARRAY:
- if(H5Z_calc_parms_array(type, &cd_values_actual_nparms) < 0)
+ if(H5Z__calc_parms_array(type, &cd_values_actual_nparms) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot compute parameters for datatype")
break;
case H5T_COMPOUND:
- if(H5Z_calc_parms_compound(type, &cd_values_actual_nparms) < 0)
+ if(H5Z__calc_parms_compound(type, &cd_values_actual_nparms) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot compute parameters for datatype")
break;
@@ -909,17 +887,17 @@ H5Z_set_local_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id)
switch(dtype_class) {
case H5T_INTEGER:
case H5T_FLOAT:
- if(H5Z_set_parms_atomic(type, &cd_values_index, cd_values, &need_not_compress) < 0)
+ if(H5Z__set_parms_atomic(type, &cd_values_index, cd_values, &need_not_compress) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype")
break;
case H5T_ARRAY:
- if(H5Z_set_parms_array(type, &cd_values_index, cd_values, &need_not_compress) < 0)
+ if(H5Z__set_parms_array(type, &cd_values_index, cd_values, &need_not_compress) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype")
break;
case H5T_COMPOUND:
- if(H5Z_set_parms_compound(type, &cd_values_index, cd_values, &need_not_compress) < 0)
+ if(H5Z__set_parms_compound(type, &cd_values_index, cd_values, &need_not_compress) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype")
break;
@@ -958,11 +936,11 @@ done:
H5MM_xfree(cd_values);
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5Z_set_local_nbit() */
+} /* end H5Z__set_local_nbit() */
/*-------------------------------------------------------------------------
- * Function: H5Z_filter_nbit
+ * Function: H5Z__filter_nbit
*
* Purpose: Implement an I/O filter for storing packed nbit data
*
@@ -975,7 +953,7 @@ done:
*-------------------------------------------------------------------------
*/
static size_t
-H5Z_filter_nbit(unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
+H5Z__filter_nbit(unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
size_t nbytes, size_t *buf_size, void **buf)
{
unsigned char *outbuf; /* pointer to new output buffer */
@@ -983,7 +961,7 @@ H5Z_filter_nbit(unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
unsigned d_nelmts = 0; /* number of elements in the chunk */
size_t ret_value = 0; /* return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check arguments
* cd_values[0] stores actual number of parameters in cd_values[]
@@ -1023,7 +1001,7 @@ H5Z_filter_nbit(unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, "memory allocation failed for nbit compression")
/* compress the buffer, size_out will be changed */
- H5Z_nbit_compress((unsigned char *)*buf, d_nelmts, outbuf, &size_out, cd_values);
+ H5Z__nbit_compress((unsigned char *)*buf, d_nelmts, outbuf, &size_out, cd_values);
} /* end else */
/* free the input buffer */
@@ -1036,7 +1014,7 @@ H5Z_filter_nbit(unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5Z_filter_nbit() */
+} /* end H5Z__filter_nbit() */
/* ======== Nbit Algorithm ===============================================
* assume one byte has 8 bit
@@ -1047,14 +1025,14 @@ done:
*/
static void
-H5Z_nbit_next_byte(size_t *j, size_t *buf_len)
+H5Z__nbit_next_byte(size_t *j, size_t *buf_len)
{
++(*j);
*buf_len = 8 * sizeof(unsigned char);
}
static void
-H5Z_nbit_decompress_one_byte(unsigned char *data, size_t data_offset, unsigned k,
+H5Z__nbit_decompress_one_byte(unsigned char *data, size_t data_offset, unsigned k,
unsigned begin_i, unsigned end_i, unsigned char *buffer, size_t *j, size_t *buf_len,
const parms_atomic *p, size_t datatype_len)
{
@@ -1088,7 +1066,7 @@ H5Z_nbit_decompress_one_byte(unsigned char *data, size_t data_offset, unsigned k
data[data_offset + k] = (unsigned char)(
((val & ~((unsigned)(~0) << *buf_len)) << (dat_len - *buf_len)) << dat_offset);
dat_len -= *buf_len;
- H5Z_nbit_next_byte(j, buf_len);
+ H5Z__nbit_next_byte(j, buf_len);
if(dat_len == 0)
return;
@@ -1100,7 +1078,7 @@ H5Z_nbit_decompress_one_byte(unsigned char *data, size_t data_offset, unsigned k
}
static void
-H5Z_nbit_decompress_one_nooptype(unsigned char *data, size_t data_offset,
+H5Z__nbit_decompress_one_nooptype(unsigned char *data, size_t data_offset,
unsigned char *buffer, size_t *j, size_t *buf_len, unsigned size)
{
unsigned i; /* index */
@@ -1114,7 +1092,7 @@ H5Z_nbit_decompress_one_nooptype(unsigned char *data, size_t data_offset,
data[data_offset + i] = (unsigned char)(((val & ~((unsigned)(~0) << *buf_len)) << (dat_len - *buf_len)));
dat_len -= *buf_len;
- H5Z_nbit_next_byte(j, buf_len);
+ H5Z__nbit_next_byte(j, buf_len);
if(dat_len == 0)
continue;
@@ -1125,7 +1103,7 @@ H5Z_nbit_decompress_one_nooptype(unsigned char *data, size_t data_offset,
}
static void
-H5Z_nbit_decompress_one_atomic(unsigned char *data, size_t data_offset,
+H5Z__nbit_decompress_one_atomic(unsigned char *data, size_t data_offset,
unsigned char *buffer, size_t *j, size_t *buf_len, const parms_atomic *p)
{
/* begin_i: the index of byte having first significant bit
@@ -1145,7 +1123,7 @@ H5Z_nbit_decompress_one_atomic(unsigned char *data, size_t data_offset,
end_i = p->offset / 8;
for(k = (int)begin_i; k >= (int)end_i; k--)
- H5Z_nbit_decompress_one_byte(data, data_offset, (unsigned)k, begin_i, end_i,
+ H5Z__nbit_decompress_one_byte(data, data_offset, (unsigned)k, begin_i, end_i,
buffer, j, buf_len, p, datatype_len);
}
else { /* big endian */
@@ -1160,7 +1138,7 @@ H5Z_nbit_decompress_one_atomic(unsigned char *data, size_t data_offset,
end_i = ((unsigned)datatype_len - p->offset) / 8 - 1;
for(k = (int)begin_i; k <= (int)end_i; k++)
- H5Z_nbit_decompress_one_byte(data, data_offset, (unsigned)k, begin_i, end_i,
+ H5Z__nbit_decompress_one_byte(data, data_offset, (unsigned)k, begin_i, end_i,
buffer, j, buf_len, p, datatype_len);
}
}
@@ -1192,7 +1170,7 @@ H5Z__nbit_decompress_one_array(unsigned char *data, size_t data_offset,
n = total_size / p.size;
for(i = 0; i < n; i++)
- H5Z_nbit_decompress_one_atomic(data, data_offset + i * p.size,
+ H5Z__nbit_decompress_one_atomic(data, data_offset + i * p.size,
buffer, j, buf_len, &p);
break;
@@ -1222,7 +1200,7 @@ H5Z__nbit_decompress_one_array(unsigned char *data, size_t data_offset,
case H5Z_NBIT_NOOPTYPE:
(*parms_index)++; /* skip size of no-op type */
- H5Z_nbit_decompress_one_nooptype(data, data_offset, buffer, j, buf_len, total_size);
+ H5Z__nbit_decompress_one_nooptype(data, data_offset, buffer, j, buf_len, total_size);
break;
default:
@@ -1269,7 +1247,7 @@ H5Z__nbit_decompress_one_compound(unsigned char *data, size_t data_offset,
if(p.precision > p.size * 8 || (p.precision + p.offset) > p.size * 8)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "invalid datatype precision/offset")
- H5Z_nbit_decompress_one_atomic(data, data_offset + member_offset,
+ H5Z__nbit_decompress_one_atomic(data, data_offset + member_offset,
buffer, j, buf_len, &p);
break;
@@ -1288,7 +1266,7 @@ H5Z__nbit_decompress_one_compound(unsigned char *data, size_t data_offset,
case H5Z_NBIT_NOOPTYPE:
/* Advance past member size */
(*parms_index)++;
- H5Z_nbit_decompress_one_nooptype(data, data_offset+member_offset,
+ H5Z__nbit_decompress_one_nooptype(data, data_offset+member_offset,
buffer, j, buf_len, member_size);
break;
@@ -1335,7 +1313,7 @@ H5Z__nbit_decompress(unsigned char *data, unsigned d_nelmts, unsigned char *buff
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "invalid datatype precision/offset")
for(i = 0; i < d_nelmts; i++)
- H5Z_nbit_decompress_one_atomic(data, i * p.size, buffer, &j, &buf_len, &p);
+ H5Z__nbit_decompress_one_atomic(data, i * p.size, buffer, &j, &buf_len, &p);
break;
case H5Z_NBIT_ARRAY:
@@ -1367,7 +1345,7 @@ done:
}
static void
-H5Z_nbit_compress_one_byte(unsigned char *data, size_t data_offset, unsigned k,
+H5Z__nbit_compress_one_byte(unsigned char *data, size_t data_offset, unsigned k,
unsigned begin_i, unsigned end_i, unsigned char *buffer, size_t *j, size_t *buf_len,
const parms_atomic *p, size_t datatype_len)
{
@@ -1396,7 +1374,7 @@ H5Z_nbit_compress_one_byte(unsigned char *data, size_t data_offset, unsigned k,
} else {
buffer[*j] |= (unsigned char)((unsigned)(val >> (dat_len - *buf_len)) & ~((unsigned)(~0) << *buf_len));
dat_len -= *buf_len;
- H5Z_nbit_next_byte(j, buf_len);
+ H5Z__nbit_next_byte(j, buf_len);
if(dat_len == 0)
return;
@@ -1406,7 +1384,7 @@ H5Z_nbit_compress_one_byte(unsigned char *data, size_t data_offset, unsigned k,
}
static void
-H5Z_nbit_compress_one_nooptype(unsigned char *data, size_t data_offset,
+H5Z__nbit_compress_one_nooptype(unsigned char *data, size_t data_offset,
unsigned char *buffer, size_t *j, size_t *buf_len, unsigned size)
{
unsigned i; /* index */
@@ -1420,7 +1398,7 @@ H5Z_nbit_compress_one_nooptype(unsigned char *data, size_t data_offset,
buffer[*j] |= (unsigned char)((unsigned)(val >> (dat_len - *buf_len)) & ~((unsigned)(~0) << *buf_len));
dat_len -= *buf_len;
- H5Z_nbit_next_byte(j, buf_len);
+ H5Z__nbit_next_byte(j, buf_len);
if(dat_len == 0)
continue;
@@ -1430,7 +1408,7 @@ H5Z_nbit_compress_one_nooptype(unsigned char *data, size_t data_offset,
}
static void
-H5Z_nbit_compress_one_atomic(unsigned char *data, size_t data_offset,
+H5Z__nbit_compress_one_atomic(unsigned char *data, size_t data_offset,
unsigned char *buffer, size_t *j, size_t *buf_len, const parms_atomic *p)
{
/* begin_i: the index of byte having first significant bit
@@ -1450,7 +1428,7 @@ H5Z_nbit_compress_one_atomic(unsigned char *data, size_t data_offset,
end_i = p->offset / 8;
for(k = (int)begin_i; k >= (int)end_i; k--)
- H5Z_nbit_compress_one_byte(data, data_offset, (unsigned)k, begin_i, end_i,
+ H5Z__nbit_compress_one_byte(data, data_offset, (unsigned)k, begin_i, end_i,
buffer, j, buf_len, p, datatype_len);
}
else { /* big endian */
@@ -1465,13 +1443,13 @@ H5Z_nbit_compress_one_atomic(unsigned char *data, size_t data_offset,
end_i = ((unsigned)datatype_len - p->offset) / 8 - 1;
for(k = (int)begin_i; k <= (int)end_i; k++)
- H5Z_nbit_compress_one_byte(data, data_offset, (unsigned)k, begin_i, end_i,
+ H5Z__nbit_compress_one_byte(data, data_offset, (unsigned)k, begin_i, end_i,
buffer, j, buf_len, p, datatype_len);
}
}
static void
-H5Z_nbit_compress_one_array(unsigned char *data, size_t data_offset,
+H5Z__nbit_compress_one_array(unsigned char *data, size_t data_offset,
unsigned char *buffer, size_t *j, size_t *buf_len, const unsigned parms[],
unsigned *parms_index)
{
@@ -1489,7 +1467,7 @@ H5Z_nbit_compress_one_array(unsigned char *data, size_t data_offset,
p.offset = parms[(*parms_index)++];
n = total_size / p.size;
for(i = 0; i < n; i++)
- H5Z_nbit_compress_one_atomic(data, data_offset + i * p.size,
+ H5Z__nbit_compress_one_atomic(data, data_offset + i * p.size,
buffer, j, buf_len, &p);
break;
@@ -1498,7 +1476,7 @@ H5Z_nbit_compress_one_array(unsigned char *data, size_t data_offset,
n = total_size / base_size; /* number of base_type elements inside the array datatype */
begin_index = *parms_index;
for(i = 0; i < n; i++) {
- H5Z_nbit_compress_one_array(data, data_offset + i * base_size,
+ H5Z__nbit_compress_one_array(data, data_offset + i * base_size,
buffer, j, buf_len, parms, parms_index);
*parms_index = begin_index;
}
@@ -1509,7 +1487,7 @@ H5Z_nbit_compress_one_array(unsigned char *data, size_t data_offset,
n = total_size / base_size; /* number of base_type elements inside the array datatype */
begin_index = *parms_index;
for(i = 0; i < n; i++) {
- H5Z_nbit_compress_one_compound(data, data_offset + i * base_size,
+ H5Z__nbit_compress_one_compound(data, data_offset + i * base_size,
buffer, j, buf_len, parms, parms_index);
*parms_index = begin_index;
}
@@ -1517,7 +1495,7 @@ H5Z_nbit_compress_one_array(unsigned char *data, size_t data_offset,
case H5Z_NBIT_NOOPTYPE:
(*parms_index)++; /* skip size of no-op type */
- H5Z_nbit_compress_one_nooptype(data, data_offset, buffer, j, buf_len, total_size);
+ H5Z__nbit_compress_one_nooptype(data, data_offset, buffer, j, buf_len, total_size);
break;
default:
@@ -1526,7 +1504,7 @@ H5Z_nbit_compress_one_array(unsigned char *data, size_t data_offset,
}
static void
-H5Z_nbit_compress_one_compound(unsigned char *data, size_t data_offset,
+H5Z__nbit_compress_one_compound(unsigned char *data, size_t data_offset,
unsigned char *buffer, size_t *j, size_t *buf_len, const unsigned parms[],
unsigned *parms_index)
{
@@ -1546,23 +1524,23 @@ H5Z_nbit_compress_one_compound(unsigned char *data, size_t data_offset,
p.order = parms[(*parms_index)++];
p.precision = parms[(*parms_index)++];
p.offset = parms[(*parms_index)++];
- H5Z_nbit_compress_one_atomic(data, data_offset + member_offset,
+ H5Z__nbit_compress_one_atomic(data, data_offset + member_offset,
buffer, j, buf_len, &p);
break;
case H5Z_NBIT_ARRAY:
- H5Z_nbit_compress_one_array(data, data_offset + member_offset,
+ H5Z__nbit_compress_one_array(data, data_offset + member_offset,
buffer, j, buf_len, parms, parms_index);
break;
case H5Z_NBIT_COMPOUND:
- H5Z_nbit_compress_one_compound(data, data_offset+member_offset,
+ H5Z__nbit_compress_one_compound(data, data_offset+member_offset,
buffer, j, buf_len, parms, parms_index);
break;
case H5Z_NBIT_NOOPTYPE:
size = parms[(*parms_index)++];
- H5Z_nbit_compress_one_nooptype(data, data_offset+member_offset,
+ H5Z__nbit_compress_one_nooptype(data, data_offset+member_offset,
buffer, j, buf_len, size);
break;
@@ -1573,7 +1551,7 @@ H5Z_nbit_compress_one_compound(unsigned char *data, size_t data_offset,
}
static void
-H5Z_nbit_compress(unsigned char *data, unsigned d_nelmts, unsigned char *buffer,
+H5Z__nbit_compress(unsigned char *data, unsigned d_nelmts, unsigned char *buffer,
size_t *buffer_size, const unsigned parms[])
{
/* i: index of data, new_size: index of buffer,
@@ -1599,14 +1577,14 @@ H5Z_nbit_compress(unsigned char *data, unsigned d_nelmts, unsigned char *buffer,
p.offset = parms[7];
for(i = 0; i < d_nelmts; i++)
- H5Z_nbit_compress_one_atomic(data, i * p.size, buffer, &new_size, &buf_len, &p);
+ H5Z__nbit_compress_one_atomic(data, i * p.size, buffer, &new_size, &buf_len, &p);
break;
case H5Z_NBIT_ARRAY:
size = parms[4];
parms_index = 4;
for(i = 0; i < d_nelmts; i++) {
- H5Z_nbit_compress_one_array(data, i * size, buffer, &new_size, &buf_len, parms, &parms_index);
+ H5Z__nbit_compress_one_array(data, i * size, buffer, &new_size, &buf_len, parms, &parms_index);
parms_index = 4;
}
break;
@@ -1615,7 +1593,7 @@ H5Z_nbit_compress(unsigned char *data, unsigned d_nelmts, unsigned char *buffer,
size = parms[4];
parms_index = 4;
for(i = 0; i < d_nelmts; i++) {
- H5Z_nbit_compress_one_compound(data, i * size, buffer, &new_size, &buf_len, parms, &parms_index);
+ H5Z__nbit_compress_one_compound(data, i * size, buffer, &new_size, &buf_len, parms, &parms_index);
parms_index = 4;
}
break;
diff --git a/src/H5Zprivate.h b/src/H5Zprivate.h
index fbc6fc4..6868da6 100644
--- a/src/H5Zprivate.h
+++ b/src/H5Zprivate.h
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Robb Matzke <matzke@llnl.gov>
+/* Programmer: Robb Matzke
* Thursday, April 16, 1998
*/
diff --git a/src/H5Zscaleoffset.c b/src/H5Zscaleoffset.c
index 7bdc283..83f170e 100644
--- a/src/H5Zscaleoffset.c
+++ b/src/H5Zscaleoffset.c
@@ -36,55 +36,55 @@ enum H5Z_scaleoffset_t {t_bad=0, t_uchar=1, t_ushort, t_uint, t_ulong, t_ulong_l
t_float, t_double};
/* Local function prototypes */
-static htri_t H5Z_can_apply_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id);
-static enum H5Z_scaleoffset_t H5Z_scaleoffset_get_type(unsigned dtype_class,
+static htri_t H5Z__can_apply_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id);
+static enum H5Z_scaleoffset_t H5Z__scaleoffset_get_type(unsigned dtype_class,
unsigned dtype_size, unsigned dtype_sign);
-static herr_t H5Z_scaleoffset_set_parms_fillval(H5P_genplist_t *dcpl_plist,
+static herr_t H5Z__scaleoffset_set_parms_fillval(H5P_genplist_t *dcpl_plist,
H5T_t *type, enum H5Z_scaleoffset_t scale_type, unsigned cd_values[],
int need_convert);
-static herr_t H5Z_set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id);
-static size_t H5Z_filter_scaleoffset(unsigned flags, size_t cd_nelmts,
+static herr_t H5Z__set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id);
+static size_t H5Z__filter_scaleoffset(unsigned flags, size_t cd_nelmts,
const unsigned cd_values[], size_t nbytes, size_t *buf_size, void **buf);
-static void H5Z_scaleoffset_convert(void *buf, unsigned d_nelmts, unsigned dtype_size);
-static H5_ATTR_CONST unsigned H5Z_scaleoffset_log2(unsigned long long num);
-static void H5Z_scaleoffset_precompress_i(void *data, unsigned d_nelmts,
+static void H5Z__scaleoffset_convert(void *buf, unsigned d_nelmts, unsigned dtype_size);
+static H5_ATTR_CONST unsigned H5Z__scaleoffset_log2(unsigned long long num);
+static void H5Z__scaleoffset_precompress_i(void *data, unsigned d_nelmts,
enum H5Z_scaleoffset_t type, unsigned filavail, const unsigned cd_values[],
uint32_t *minbits, unsigned long long *minval);
-static void H5Z_scaleoffset_postdecompress_i(void *data, unsigned d_nelmts,
+static void H5Z__scaleoffset_postdecompress_i(void *data, unsigned d_nelmts,
enum H5Z_scaleoffset_t type, unsigned filavail, const unsigned cd_values[],
uint32_t minbits, unsigned long long minval);
-static herr_t H5Z_scaleoffset_precompress_fd(void *data, unsigned d_nelmts,
+static herr_t H5Z__scaleoffset_precompress_fd(void *data, unsigned d_nelmts,
enum H5Z_scaleoffset_t type, unsigned filavail, const unsigned cd_values[],
uint32_t *minbits, unsigned long long *minval, double D_val);
-static herr_t H5Z_scaleoffset_postdecompress_fd(void *data, unsigned d_nelmts,
+static herr_t H5Z__scaleoffset_postdecompress_fd(void *data, unsigned d_nelmts,
enum H5Z_scaleoffset_t type, unsigned filavail, const unsigned cd_values[],
uint32_t minbits, unsigned long long minval, double D_val);
-static void H5Z_scaleoffset_next_byte(size_t *j, unsigned *buf_len);
-static void H5Z_scaleoffset_decompress_one_byte(unsigned char *data, size_t data_offset,
+static void H5Z__scaleoffset_next_byte(size_t *j, unsigned *buf_len);
+static void H5Z__scaleoffset_decompress_one_byte(unsigned char *data, size_t data_offset,
unsigned k, unsigned begin_i, unsigned char *buffer, size_t *j, unsigned *buf_len,
parms_atomic p, unsigned dtype_len);
-static void H5Z_scaleoffset_compress_one_byte(unsigned char *data, size_t data_offset,
+static void H5Z__scaleoffset_compress_one_byte(unsigned char *data, size_t data_offset,
unsigned k, unsigned begin_i, unsigned char *buffer, size_t *j, unsigned *buf_len,
parms_atomic p, unsigned dtype_len);
-static void H5Z_scaleoffset_decompress_one_atomic(unsigned char *data, size_t data_offset,
+static void H5Z__scaleoffset_decompress_one_atomic(unsigned char *data, size_t data_offset,
unsigned char *buffer, size_t *j, unsigned *buf_len, parms_atomic p);
-static void H5Z_scaleoffset_compress_one_atomic(unsigned char *data, size_t data_offset,
+static void H5Z__scaleoffset_compress_one_atomic(unsigned char *data, size_t data_offset,
unsigned char *buffer, size_t *j, unsigned *buf_len, parms_atomic p);
-static void H5Z_scaleoffset_decompress(unsigned char *data, unsigned d_nelmts,
+static void H5Z__scaleoffset_decompress(unsigned char *data, unsigned d_nelmts,
unsigned char *buffer, parms_atomic p);
-static void H5Z_scaleoffset_compress(unsigned char *data, unsigned d_nelmts, unsigned char *buffer,
+static void H5Z__scaleoffset_compress(unsigned char *data, unsigned d_nelmts, unsigned char *buffer,
size_t buffer_size, parms_atomic p);
/* This message derives from H5Z */
H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
- H5Z_CLASS_T_VERS, /* H5Z_class_t version */
- H5Z_FILTER_SCALEOFFSET, /* Filter id number */
- 1, /* Assume encoder present: check before registering */
- 1, /* decoder_present flag (set to true) */
- "scaleoffset", /* Filter name for debugging */
- H5Z_can_apply_scaleoffset, /* The "can apply" callback */
- H5Z_set_local_scaleoffset, /* The "set local" callback */
- H5Z_filter_scaleoffset, /* The actual filter function */
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ H5Z_FILTER_SCALEOFFSET, /* Filter id number */
+ 1, /* Assume encoder present: check before registering */
+ 1, /* decoder_present flag (set to true) */
+ "scaleoffset", /* Filter name for debugging */
+ H5Z__can_apply_scaleoffset, /* The "can apply" callback */
+ H5Z__set_local_scaleoffset, /* The "set local" callback */
+ H5Z__filter_scaleoffset, /* The actual filter function */
}};
/* Local macros */
@@ -192,7 +192,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "unable to get fill value") \
\
if(need_convert) \
- H5Z_scaleoffset_convert(&fill_val, 1, sizeof(type)); \
+ H5Z__scaleoffset_convert(&fill_val, 1, sizeof(type)); \
\
H5Z_scaleoffset_save_filval(type, cd_values, fill_val) \
}
@@ -207,7 +207,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "unable to get fill value") \
\
if(need_convert) \
- H5Z_scaleoffset_convert(&fill_val, 1, sizeof(type)); \
+ H5Z__scaleoffset_convert(&fill_val, 1, sizeof(type)); \
\
H5Z_scaleoffset_save_filval(unsigned type, cd_values, fill_val) \
}
@@ -235,7 +235,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "unable to get fill value") \
\
if(need_convert) \
- H5Z_scaleoffset_convert(&fill_val, 1, sizeof(type)); \
+ H5Z__scaleoffset_convert(&fill_val, 1, sizeof(type)); \
\
H5Z_scaleoffset_save_filval(type, cd_values, fill_val) \
}
@@ -422,7 +422,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
H5Z_scaleoffset_max_min_1(i, d_nelmts, buf, filval, max, min) \
H5Z_scaleoffset_check_1(type, max, min, minbits) \
span = (type)(max - min + 1); \
- *minbits = H5Z_scaleoffset_log2((unsigned long long)(span+1)); \
+ *minbits = H5Z__scaleoffset_log2((unsigned long long)(span+1)); \
} else /* minbits already set, only calculate min */ \
H5Z_scaleoffset_min_1(i, d_nelmts, buf, filval, min) \
if(*minbits != sizeof(type)*8) /* change values if minbits != full precision */ \
@@ -433,7 +433,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
H5Z_scaleoffset_max_min_2(i, d_nelmts, buf, max, min) \
H5Z_scaleoffset_check_1(type, max, min, minbits) \
span = (type)(max - min + 1); \
- *minbits = H5Z_scaleoffset_log2((unsigned long long)span); \
+ *minbits = H5Z__scaleoffset_log2((unsigned long long)span); \
} else /* minbits already set, only calculate min */ \
H5Z_scaleoffset_min_2(i, d_nelmts, buf, min) \
if(*minbits != sizeof(type)*8) /* change values if minbits != full precision */ \
@@ -455,7 +455,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
H5Z_scaleoffset_max_min_1(i, d_nelmts, buf, filval, max, min) \
H5Z_scaleoffset_check_2(type, max, min, minbits) \
span = (unsigned type)(max - min + 1); \
- *minbits = H5Z_scaleoffset_log2((unsigned long long)(span + 1)); \
+ *minbits = H5Z__scaleoffset_log2((unsigned long long)(span + 1)); \
} else /* minbits already set, only calculate min */ \
H5Z_scaleoffset_min_1(i, d_nelmts, buf, filval, min) \
if(*minbits != sizeof(type) * 8) /* change values if minbits != full precision */ \
@@ -466,7 +466,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
H5Z_scaleoffset_max_min_2(i, d_nelmts, buf, max, min) \
H5Z_scaleoffset_check_2(type, max, min, minbits) \
span = (unsigned type)(max - min + 1); \
- *minbits = H5Z_scaleoffset_log2((unsigned long long)span); \
+ *minbits = H5Z__scaleoffset_log2((unsigned long long)span); \
} else /* minbits already set, only calculate min */ \
H5Z_scaleoffset_min_2(i, d_nelmts, buf, min) \
if(*minbits != sizeof(type) * 8) /* change values if minbits != full precision */ \
@@ -553,14 +553,14 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
H5Z_scaleoffset_max_min_3(i, d_nelmts, buf, filval, max, min, D_val) \
H5Z_scaleoffset_check_3(i, type, pow_fun, round_fun, max, min, minbits, D_val) \
span = (unsigned long long)(llround_fun(max * pow_fun(10.0f, (type)D_val) - min * pow_fun(10.0f, (type)D_val)) + 1); \
- *minbits = H5Z_scaleoffset_log2(span + 1); \
+ *minbits = H5Z__scaleoffset_log2(span + 1); \
if(*minbits != sizeof(type) * 8) /* change values if minbits != full precision */ \
H5Z_scaleoffset_modify_1(i, type, pow_fun, abs_fun, lround_fun, llround_fun, buf, d_nelmts, filval, minbits, min, D_val) \
} else { /* fill value undefined */ \
H5Z_scaleoffset_max_min_2(i, d_nelmts, buf, max, min) \
H5Z_scaleoffset_check_3(i, type, pow_fun, round_fun, max, min, minbits, D_val) \
span = (unsigned long long)(llround_fun(max * pow_fun(10.0f, (type)D_val) - min * pow_fun(10.0f, (type)D_val)) + 1); \
- *minbits = H5Z_scaleoffset_log2(span); \
+ *minbits = H5Z__scaleoffset_log2(span); \
if(*minbits != sizeof(type) * 8) /* change values if minbits != full precision */ \
H5Z_scaleoffset_modify_2(i, type, pow_fun, lround_fun, llround_fun, buf, d_nelmts, min, D_val) \
} \
@@ -667,7 +667,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
/*-------------------------------------------------------------------------
- * Function: H5Z_can_apply_scaleoffset
+ * Function: H5Z__can_apply_scaleoffset
*
* Purpose: Check the parameters for scaleoffset compression for
* validity and whether they fit a particular dataset.
@@ -678,19 +678,17 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
* Programmer: Xiaowen Wu
* Friday, February 4, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static htri_t
-H5Z_can_apply_scaleoffset(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5_ATTR_UNUSED space_id)
+H5Z__can_apply_scaleoffset(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5_ATTR_UNUSED space_id)
{
const H5T_t *type; /* Datatype */
H5T_class_t dtype_class; /* Datatype's class */
H5T_order_t dtype_order; /* Datatype's endianness order */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Get datatype */
if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
@@ -717,11 +715,11 @@ H5Z_can_apply_scaleoffset(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5_
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5Z_can_apply_scaleoffset() */
+} /* end H5Z__can_apply_scaleoffset() */
/*-------------------------------------------------------------------------
- * Function: H5Z_scaleoffset_get_type
+ * Function: H5Z__scaleoffset_get_type
*
* Purpose: Get the specific integer type based on datatype size and sign
* or floating-point type based on size
@@ -732,17 +730,15 @@ done:
* Programmer: Xiaowen Wu
* Wednesday, April 13, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static enum H5Z_scaleoffset_t
-H5Z_scaleoffset_get_type(unsigned dtype_class, unsigned dtype_size, unsigned dtype_sign)
+H5Z__scaleoffset_get_type(unsigned dtype_class, unsigned dtype_size, unsigned dtype_sign)
{
enum H5Z_scaleoffset_t type = t_bad; /* integer type */
enum H5Z_scaleoffset_t ret_value = t_bad; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
if(dtype_class==H5Z_SCALEOFFSET_CLS_INTEGER) {
if(dtype_sign==H5Z_SCALEOFFSET_SGN_NONE) { /* unsigned integer */
@@ -786,7 +782,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Z_scaleoffset_set_parms_fillval
+ * Function: H5Z__scaleoffset_set_parms_fillval
*
* Purpose: Get the fill value of the dataset and store in cd_values[]
*
@@ -799,13 +795,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5Z_scaleoffset_set_parms_fillval(H5P_genplist_t *dcpl_plist,
+H5Z__scaleoffset_set_parms_fillval(H5P_genplist_t *dcpl_plist,
H5T_t *type, enum H5Z_scaleoffset_t scale_type,
unsigned cd_values[], int need_convert)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
if(scale_type == t_uchar)
H5Z_scaleoffset_set_filval_3(unsigned char, dcpl_plist, type, cd_values, need_convert)
@@ -834,11 +830,11 @@ H5Z_scaleoffset_set_parms_fillval(H5P_genplist_t *dcpl_plist,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5Z_scaleoffset_set_parms_fillval() */
+} /* end H5Z__scaleoffset_set_parms_fillval() */
/*-------------------------------------------------------------------------
- * Function: H5Z_set_local_scaleoffset
+ * Function: H5Z__set_local_scaleoffset
*
* Purpose: Set the "local" dataset parameters for scaleoffset
* compression.
@@ -849,12 +845,10 @@ done:
* Programmer: Xiaowen Wu
* Friday, February 4, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5Z_set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id)
+H5Z__set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id)
{
H5P_genplist_t *dcpl_plist; /* Property list pointer */
H5T_t *type; /* Datatype */
@@ -871,7 +865,7 @@ H5Z_set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id)
H5D_fill_value_t status; /* Status of fill value in property list */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Get the plist structure */
if(NULL == (dcpl_plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE)))
@@ -997,12 +991,12 @@ H5Z_set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id)
need_convert = TRUE;
/* Before getting fill value, get its type */
- if((scale_type = H5Z_scaleoffset_get_type(cd_values[H5Z_SCALEOFFSET_PARM_CLASS],
+ if((scale_type = H5Z__scaleoffset_get_type(cd_values[H5Z_SCALEOFFSET_PARM_CLASS],
cd_values[H5Z_SCALEOFFSET_PARM_SIZE], cd_values[H5Z_SCALEOFFSET_PARM_SIGN])) == 0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "cannot use C integer datatype for cast")
/* Get dataset fill value and store in cd_values[] */
- if(H5Z_scaleoffset_set_parms_fillval(dcpl_plist, type, scale_type, cd_values, need_convert) < 0)
+ if(H5Z__scaleoffset_set_parms_fillval(dcpl_plist, type, scale_type, cd_values, need_convert) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_CANTSET, FAIL, "unable to set fill value")
} /* end else */
@@ -1012,11 +1006,11 @@ H5Z_set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5Z_set_local_scaleoffset() */
+} /* end H5Z__set_local_scaleoffset() */
/*-------------------------------------------------------------------------
- * Function: H5Z_filter_scaleoffset
+ * Function: H5Z__filter_scaleoffset
*
* Purpose: Implement an I/O filter for storing packed integer
* data using scale and offset method.
@@ -1027,12 +1021,10 @@ done:
* Programmer: Xiaowen Wu
* Monday, February 7, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static size_t
-H5Z_filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
+H5Z__filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
size_t nbytes, size_t *buf_size, void **buf)
{
size_t ret_value = 0; /* return value */
@@ -1053,7 +1045,7 @@ H5Z_filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_value
unsigned i; /* index */
parms_atomic p; /* parameters needed for compress/decompress functions */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check arguments */
if(cd_nelmts != H5Z_SCALEOFFSET_TOTAL_NPARMS)
@@ -1179,7 +1171,7 @@ H5Z_filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_value
/* convert to dataset datatype endianness order if needed */
if(need_convert)
- H5Z_scaleoffset_convert(outbuf, d_nelmts, p.size);
+ H5Z__scaleoffset_convert(outbuf, d_nelmts, p.size);
*buf = outbuf;
outbuf = NULL;
@@ -1190,31 +1182,31 @@ H5Z_filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_value
/* decompress the buffer if minbits not equal to zero */
if(minbits != 0)
- H5Z_scaleoffset_decompress(outbuf, d_nelmts, (unsigned char*)(*buf)+buf_offset, p);
+ H5Z__scaleoffset_decompress(outbuf, d_nelmts, (unsigned char*)(*buf)+buf_offset, p);
else {
/* fill value is not defined and all data elements have the same value */
for(i = 0; i < size_out; i++) outbuf[i] = 0;
}
/* before postprocess, get memory type */
- if((type = H5Z_scaleoffset_get_type(dtype_class, p.size, dtype_sign)) == 0)
+ if((type = H5Z__scaleoffset_get_type(dtype_class, p.size, dtype_sign)) == 0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, 0, "cannot use C integer datatype for cast")
/* postprocess after decompression */
if(dtype_class==H5Z_SCALEOFFSET_CLS_INTEGER)
- H5Z_scaleoffset_postdecompress_i(outbuf, d_nelmts, type, filavail,
+ H5Z__scaleoffset_postdecompress_i(outbuf, d_nelmts, type, filavail,
cd_values, minbits, minval);
if(dtype_class==H5Z_SCALEOFFSET_CLS_FLOAT)
if(scale_type==0) { /* variable-minimum-bits method */
- if(H5Z_scaleoffset_postdecompress_fd(outbuf, d_nelmts, type, filavail,
+ if(H5Z__scaleoffset_postdecompress_fd(outbuf, d_nelmts, type, filavail,
cd_values, minbits, minval, D_val)==FAIL)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, 0, "post-decompression failed")
}
/* after postprocess, convert to dataset datatype endianness order if needed */
if(need_convert)
- H5Z_scaleoffset_convert(outbuf, d_nelmts, p.size);
+ H5Z__scaleoffset_convert(outbuf, d_nelmts, p.size);
}
/* output; compress */
else {
@@ -1222,20 +1214,20 @@ H5Z_filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_value
/* before preprocess, convert to memory endianness order if needed */
if(need_convert)
- H5Z_scaleoffset_convert(*buf, d_nelmts, p.size);
+ H5Z__scaleoffset_convert(*buf, d_nelmts, p.size);
/* before preprocess, get memory type */
- if((type = H5Z_scaleoffset_get_type(dtype_class, p.size, dtype_sign))==0)
+ if((type = H5Z__scaleoffset_get_type(dtype_class, p.size, dtype_sign))==0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, 0, "cannot use C integer datatype for cast")
/* preprocess before compression */
if(dtype_class==H5Z_SCALEOFFSET_CLS_INTEGER)
- H5Z_scaleoffset_precompress_i(*buf, d_nelmts, type, filavail,
+ H5Z__scaleoffset_precompress_i(*buf, d_nelmts, type, filavail,
cd_values, &minbits, &minval);
if(dtype_class==H5Z_SCALEOFFSET_CLS_FLOAT)
if(scale_type==0) { /* variable-minimum-bits method */
- if(H5Z_scaleoffset_precompress_fd(*buf, d_nelmts, type, filavail,
+ if(H5Z__scaleoffset_precompress_fd(*buf, d_nelmts, type, filavail,
cd_values, &minbits, &minval, D_val)==FAIL)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, 0, "pre-compression failed")
}
@@ -1289,7 +1281,7 @@ H5Z_filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_value
* all data elements have the same value
*/
if(minbits != 0)
- H5Z_scaleoffset_compress((unsigned char *)*buf, d_nelmts, outbuf + buf_offset, size_out - buf_offset, p);
+ H5Z__scaleoffset_compress((unsigned char *)*buf, d_nelmts, outbuf + buf_offset, size_out - buf_offset, p);
}
/* free the input buffer */
@@ -1320,7 +1312,7 @@ done:
* or from big-endian to little-endian 2/21/2005
*/
static void
-H5Z_scaleoffset_convert(void *buf, unsigned d_nelmts, unsigned dtype_size)
+H5Z__scaleoffset_convert(void *buf, unsigned d_nelmts, unsigned dtype_size)
{
if(dtype_size > 1) {
size_t i, j;
@@ -1335,13 +1327,13 @@ H5Z_scaleoffset_convert(void *buf, unsigned d_nelmts, unsigned dtype_size)
buffer[i + dtype_size - 1 - j] = temp;
} /* end for */
} /* end if */
-} /* end H5Z_scaleoffset_convert() */
+} /* end H5Z__scaleoffset_convert() */
/* return ceiling of floating-point log2 function
* receive unsigned integer as argument 3/10/2005
*/
static unsigned
-H5Z_scaleoffset_log2(unsigned long long num)
+H5Z__scaleoffset_log2(unsigned long long num)
{
unsigned v = 0;
unsigned long long lower_bound = 1; /* is power of 2, largest value <= num */
@@ -1360,7 +1352,7 @@ H5Z_scaleoffset_log2(unsigned long long num)
/* precompress for integer type */
static void
-H5Z_scaleoffset_precompress_i(void *data, unsigned d_nelmts, enum H5Z_scaleoffset_t type,
+H5Z__scaleoffset_precompress_i(void *data, unsigned d_nelmts, enum H5Z_scaleoffset_t type,
unsigned filavail, const unsigned cd_values[], uint32_t *minbits, unsigned long long *minval)
{
if(type == t_uchar)
@@ -1392,7 +1384,7 @@ H5Z_scaleoffset_precompress_i(void *data, unsigned d_nelmts, enum H5Z_scaleoffse
return;
}
span = (unsigned char)(max - min + 1);
- *minbits = H5Z_scaleoffset_log2((unsigned long long)(span+1));
+ *minbits = H5Z__scaleoffset_log2((unsigned long long)(span+1));
} else /* minbits already set, only calculate min */
H5Z_scaleoffset_min_1(i, d_nelmts, buf, filval, min)
if(*minbits != sizeof(signed char)*8) /* change values if minbits != full precision */
@@ -1407,7 +1399,7 @@ H5Z_scaleoffset_precompress_i(void *data, unsigned d_nelmts, enum H5Z_scaleoffse
return;
}
span = (unsigned char)(max - min + 1);
- *minbits = H5Z_scaleoffset_log2((unsigned long long)span);
+ *minbits = H5Z__scaleoffset_log2((unsigned long long)span);
} else /* minbits already set, only calculate min */
H5Z_scaleoffset_min_2(i, d_nelmts, buf, min)
if(*minbits != sizeof(signed char) * 8) /* change values if minbits != full precision */
@@ -1432,7 +1424,7 @@ H5Z_scaleoffset_precompress_i(void *data, unsigned d_nelmts, enum H5Z_scaleoffse
/* postdecompress for integer type */
static void
-H5Z_scaleoffset_postdecompress_i(void *data, unsigned d_nelmts, enum H5Z_scaleoffset_t type,
+H5Z__scaleoffset_postdecompress_i(void *data, unsigned d_nelmts, enum H5Z_scaleoffset_t type,
unsigned filavail, const unsigned cd_values[], uint32_t minbits, unsigned long long minval)
{
long long sminval = *(long long*)&minval; /* for signed integer types */
@@ -1481,13 +1473,13 @@ H5Z_scaleoffset_postdecompress_i(void *data, unsigned d_nelmts, enum H5Z_scaleof
/* precompress for floating-point type, variable-minimum-bits method
success: non-negative, failure: negative 4/15/05 */
static herr_t
-H5Z_scaleoffset_precompress_fd(void *data, unsigned d_nelmts, enum H5Z_scaleoffset_t type,
+H5Z__scaleoffset_precompress_fd(void *data, unsigned d_nelmts, enum H5Z_scaleoffset_t type,
unsigned filavail, const unsigned cd_values[], uint32_t *minbits,
unsigned long long *minval, double D_val)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
if(type == t_float)
H5Z_scaleoffset_precompress_3(float, HDpowf, HDfabsf, HDroundf, HDlroundf, HDllroundf, data, d_nelmts,
@@ -1503,14 +1495,14 @@ done:
/* postdecompress for floating-point type, variable-minimum-bits method
success: non-negative, failure: negative 4/15/05 */
static herr_t
-H5Z_scaleoffset_postdecompress_fd(void *data, unsigned d_nelmts, enum H5Z_scaleoffset_t type,
+H5Z__scaleoffset_postdecompress_fd(void *data, unsigned d_nelmts, enum H5Z_scaleoffset_t type,
unsigned filavail, const unsigned cd_values[], uint32_t minbits,
unsigned long long minval, double D_val)
{
long long sminval = (long long)minval; /* for signed integer types */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
if(type == t_float)
H5Z_scaleoffset_postdecompress_3(float, HDpowf, data, d_nelmts, filavail,
@@ -1524,14 +1516,14 @@ done:
}
static void
-H5Z_scaleoffset_next_byte(size_t *j, unsigned *buf_len)
+H5Z__scaleoffset_next_byte(size_t *j, unsigned *buf_len)
{
++(*j);
*buf_len = 8 * sizeof(unsigned char);
}
static void
-H5Z_scaleoffset_decompress_one_byte(unsigned char *data, size_t data_offset,
+H5Z__scaleoffset_decompress_one_byte(unsigned char *data, size_t data_offset,
unsigned k, unsigned begin_i, unsigned char *buffer, size_t *j, unsigned *buf_len,
parms_atomic p, unsigned dtype_len)
{
@@ -1552,7 +1544,7 @@ H5Z_scaleoffset_decompress_one_byte(unsigned char *data, size_t data_offset,
else {
data[data_offset + k] = (unsigned char)((val & ~((unsigned)(~0) << *buf_len)) << (dat_len - *buf_len));
dat_len -= *buf_len;
- H5Z_scaleoffset_next_byte(j, buf_len);
+ H5Z__scaleoffset_next_byte(j, buf_len);
if(dat_len == 0)
return;
@@ -1563,7 +1555,7 @@ H5Z_scaleoffset_decompress_one_byte(unsigned char *data, size_t data_offset,
}
static void
-H5Z_scaleoffset_decompress_one_atomic(unsigned char *data, size_t data_offset,
+H5Z__scaleoffset_decompress_one_atomic(unsigned char *data, size_t data_offset,
unsigned char *buffer, size_t *j, unsigned *buf_len, parms_atomic p)
{
/* begin_i: the index of byte having first significant bit */
@@ -1579,7 +1571,7 @@ H5Z_scaleoffset_decompress_one_atomic(unsigned char *data, size_t data_offset,
begin_i = p.size - 1 - (dtype_len - p.minbits) / 8;
for(k = (int)begin_i; k >= 0; k--)
- H5Z_scaleoffset_decompress_one_byte(data, data_offset, (unsigned)k, begin_i,
+ H5Z__scaleoffset_decompress_one_byte(data, data_offset, (unsigned)k, begin_i,
buffer, j, buf_len, p, dtype_len);
}
else { /* big endian */
@@ -1588,13 +1580,13 @@ H5Z_scaleoffset_decompress_one_atomic(unsigned char *data, size_t data_offset,
begin_i = (dtype_len - p.minbits) / 8;
for(k = (int)begin_i; k <= (int)(p.size - 1); k++)
- H5Z_scaleoffset_decompress_one_byte(data, data_offset, (unsigned)k, begin_i,
+ H5Z__scaleoffset_decompress_one_byte(data, data_offset, (unsigned)k, begin_i,
buffer, j, buf_len, p, dtype_len);
}
}
static void
-H5Z_scaleoffset_decompress(unsigned char *data, unsigned d_nelmts,
+H5Z__scaleoffset_decompress(unsigned char *data, unsigned d_nelmts,
unsigned char *buffer, parms_atomic p)
{
/* i: index of data, j: index of buffer,
@@ -1612,11 +1604,11 @@ H5Z_scaleoffset_decompress(unsigned char *data, unsigned d_nelmts,
/* decompress */
for(i = 0; i < d_nelmts; i++)
- H5Z_scaleoffset_decompress_one_atomic(data, i * p.size, buffer, &j, &buf_len, p);
+ H5Z__scaleoffset_decompress_one_atomic(data, i * p.size, buffer, &j, &buf_len, p);
}
static void
-H5Z_scaleoffset_compress_one_byte(unsigned char *data, size_t data_offset,
+H5Z__scaleoffset_compress_one_byte(unsigned char *data, size_t data_offset,
unsigned k, unsigned begin_i, unsigned char *buffer, size_t *j, unsigned *buf_len,
parms_atomic p, unsigned dtype_len)
{
@@ -1636,7 +1628,7 @@ H5Z_scaleoffset_compress_one_byte(unsigned char *data, size_t data_offset,
} else {
buffer[*j] |= (unsigned char)((unsigned)(val >> (dat_len - *buf_len)) & ~((unsigned)(~0) << *buf_len));
dat_len -= *buf_len;
- H5Z_scaleoffset_next_byte(j, buf_len);
+ H5Z__scaleoffset_next_byte(j, buf_len);
if(dat_len == 0)
return;
@@ -1646,7 +1638,7 @@ H5Z_scaleoffset_compress_one_byte(unsigned char *data, size_t data_offset,
}
static void
-H5Z_scaleoffset_compress_one_atomic(unsigned char *data, size_t data_offset,
+H5Z__scaleoffset_compress_one_atomic(unsigned char *data, size_t data_offset,
unsigned char *buffer, size_t *j, unsigned *buf_len, parms_atomic p)
{
/* begin_i: the index of byte having first significant bit */
@@ -1662,7 +1654,7 @@ H5Z_scaleoffset_compress_one_atomic(unsigned char *data, size_t data_offset,
begin_i = p.size - 1 - (dtype_len - p.minbits) / 8;
for(k = (int)begin_i; k >= 0; k--)
- H5Z_scaleoffset_compress_one_byte(data, data_offset, (unsigned)k, begin_i,
+ H5Z__scaleoffset_compress_one_byte(data, data_offset, (unsigned)k, begin_i,
buffer, j, buf_len, p, dtype_len);
}
else { /* big endian */
@@ -1670,13 +1662,13 @@ H5Z_scaleoffset_compress_one_atomic(unsigned char *data, size_t data_offset,
begin_i = (dtype_len - p.minbits) / 8;
for(k = (int)begin_i; k <= (int)(p.size - 1); k++)
- H5Z_scaleoffset_compress_one_byte(data, data_offset, (unsigned)k, begin_i,
+ H5Z__scaleoffset_compress_one_byte(data, data_offset, (unsigned)k, begin_i,
buffer, j, buf_len, p, dtype_len);
}
}
static void
-H5Z_scaleoffset_compress(unsigned char *data, unsigned d_nelmts,
+H5Z__scaleoffset_compress(unsigned char *data, unsigned d_nelmts,
unsigned char *buffer, size_t buffer_size, parms_atomic p)
{
/* i: index of data, j: index of buffer,
@@ -1694,6 +1686,6 @@ H5Z_scaleoffset_compress(unsigned char *data, unsigned d_nelmts,
/* compress */
for(i = 0; i < d_nelmts; i++)
- H5Z_scaleoffset_compress_one_atomic(data, i * p.size, buffer, &j, &buf_len, p);
+ H5Z__scaleoffset_compress_one_atomic(data, i * p.size, buffer, &j, &buf_len, p);
}
diff --git a/src/H5Zshuffle.c b/src/H5Zshuffle.c
index b1d0722..224c78e 100644
--- a/src/H5Zshuffle.c
+++ b/src/H5Zshuffle.c
@@ -23,20 +23,20 @@
#include "H5Zpkg.h" /* Data filters */
/* Local function prototypes */
-static herr_t H5Z_set_local_shuffle(hid_t dcpl_id, hid_t type_id, hid_t space_id);
-static size_t H5Z_filter_shuffle(unsigned flags, size_t cd_nelmts,
+static herr_t H5Z__set_local_shuffle(hid_t dcpl_id, hid_t type_id, hid_t space_id);
+static size_t H5Z__filter_shuffle(unsigned flags, size_t cd_nelmts,
const unsigned cd_values[], size_t nbytes, size_t *buf_size, void **buf);
/* This message derives from H5Z */
const H5Z_class2_t H5Z_SHUFFLE[1] = {{
- H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
H5Z_FILTER_SHUFFLE, /* Filter id number */
- 1, /* encoder_present flag (set to true) */
- 1, /* decoder_present flag (set to true) */
+ 1, /* encoder_present flag (set to true) */
+ 1, /* decoder_present flag (set to true) */
"shuffle", /* Filter name for debugging */
NULL, /* The "can apply" callback */
- H5Z_set_local_shuffle, /* The "set local" callback */
- H5Z_filter_shuffle, /* The actual filter function */
+ H5Z__set_local_shuffle, /* The "set local" callback */
+ H5Z__filter_shuffle, /* The actual filter function */
}};
/* Local macros */
@@ -44,7 +44,7 @@ const H5Z_class2_t H5Z_SHUFFLE[1] = {{
/*-------------------------------------------------------------------------
- * Function: H5Z_set_local_shuffle
+ * Function: H5Z__set_local_shuffle
*
* Purpose: Set the "local" dataset parameter for data shuffling to be
* the size of the datatype.
@@ -55,12 +55,10 @@ const H5Z_class2_t H5Z_SHUFFLE[1] = {{
* Programmer: Quincey Koziol
* Monday, April 7, 2003
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5Z_set_local_shuffle(hid_t dcpl_id, hid_t type_id, hid_t H5_ATTR_UNUSED space_id)
+H5Z__set_local_shuffle(hid_t dcpl_id, hid_t type_id, hid_t H5_ATTR_UNUSED space_id)
{
H5P_genplist_t *dcpl_plist; /* Property list pointer */
const H5T_t *type; /* Datatype */
@@ -69,7 +67,7 @@ H5Z_set_local_shuffle(hid_t dcpl_id, hid_t type_id, hid_t H5_ATTR_UNUSED space_i
unsigned cd_values[H5Z_SHUFFLE_TOTAL_NPARMS]; /* Filter parameters */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_STATIC
/* Get the plist structure */
if(NULL == (dcpl_plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE)))
@@ -93,11 +91,11 @@ H5Z_set_local_shuffle(hid_t dcpl_id, hid_t type_id, hid_t H5_ATTR_UNUSED space_i
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5Z_set_local_shuffle() */
+} /* end H5Z__set_local_shuffle() */
/*-------------------------------------------------------------------------
- * Function: H5Z_filter_shuffle
+ * Function: H5Z__filter_shuffle
*
* Purpose: Implement an I/O filter which "de-interlaces" a block of data
* by putting all the bytes in a byte-position for each element
@@ -112,14 +110,10 @@ done:
* Programmer: Kent Yang
* Wednesday, November 13, 2002
*
- * Modifications:
- * Quincey Koziol, November 13, 2002
- * Cleaned up code.
- *
*-------------------------------------------------------------------------
*/
static size_t
-H5Z_filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
+H5Z__filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
size_t nbytes, size_t *buf_size, void **buf)
{
void *dest = NULL; /* Buffer to deposit [un]shuffled bytes into */
@@ -134,7 +128,7 @@ H5Z_filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
size_t leftover; /* Extra bytes at end of buffer */
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI(0)
+ FUNC_ENTER_STATIC
/* Check arguments */
if (cd_nelmts!=H5Z_SHUFFLE_TOTAL_NPARMS || cd_values[H5Z_SHUFFLE_PARM_SIZE]==0)
diff --git a/src/H5Zszip.c b/src/H5Zszip.c
index 8ed173e..c72c499 100644
--- a/src/H5Zszip.c
+++ b/src/H5Zszip.c
@@ -32,27 +32,27 @@
#endif
/* Local function prototypes */
-static htri_t H5Z_can_apply_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id);
-static herr_t H5Z_set_local_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id);
-static size_t H5Z_filter_szip (unsigned flags, size_t cd_nelmts,
+static htri_t H5Z__can_apply_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id);
+static herr_t H5Z__set_local_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id);
+static size_t H5Z__filter_szip(unsigned flags, size_t cd_nelmts,
const unsigned cd_values[], size_t nbytes, size_t *buf_size, void **buf);
/* This message derives from H5Z */
H5Z_class2_t H5Z_SZIP[1] = {{
- H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
H5Z_FILTER_SZIP, /* Filter id number */
- 1, /* Assume encoder present: check before registering */
- 1, /* decoder_present flag (set to true) */
- "szip", /* Filter name for debugging */
- H5Z_can_apply_szip, /* The "can apply" callback */
- H5Z_set_local_szip, /* The "set local" callback */
- H5Z_filter_szip, /* The actual filter function */
+ 1, /* Assume encoder present: check before registering */
+ 1, /* decoder_present flag (set to true) */
+ "szip", /* Filter name for debugging */
+ H5Z__can_apply_szip, /* The "can apply" callback */
+ H5Z__set_local_szip, /* The "set local" callback */
+ H5Z__filter_szip, /* The actual filter function */
}};
/*-------------------------------------------------------------------------
- * Function: H5Z_can_apply_szip
+ * Function: H5Z__can_apply_szip
*
* Purpose: Check the parameters for szip compression for validity and
* whether they fit a particular dataset.
@@ -73,14 +73,14 @@ H5Z_class2_t H5Z_SZIP[1] = {{
*-------------------------------------------------------------------------
*/
static htri_t
-H5Z_can_apply_szip(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5_ATTR_UNUSED space_id)
+H5Z__can_apply_szip(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5_ATTR_UNUSED space_id)
{
const H5T_t *type; /* Datatype */
unsigned dtype_size; /* Datatype's size (in bits) */
H5T_order_t dtype_order; /* Datatype's endianness order */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_STATIC
/* Get datatype */
if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
@@ -105,11 +105,11 @@ H5Z_can_apply_szip(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5_ATTR_UN
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5Z_can_apply_szip() */
+} /* end H5Z__can_apply_szip() */
/*-------------------------------------------------------------------------
- * Function: H5Z_set_local_szip
+ * Function: H5Z__set_local_szip
*
* Purpose: Set the "local" dataset parameters for szip compression.
*
@@ -119,18 +119,10 @@ done:
* Programmer: Quincey Koziol
* Monday, April 7, 2003
*
- * Modifications: Used new logic to set the size of the scanline parameter.
- * Now SZIP compression can be applied to the chunk
- * of any shape and size with only one restriction: the number
- * of elements in the chunk has to be not less than number
- * of elements (pixels) in the block (cd_values[H5Z_SZIP_PARM_PPB]
- * parameter).
- * Elena Pourmal, July 20, 2004
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5Z_set_local_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id)
+H5Z__set_local_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id)
{
H5P_genplist_t *dcpl_plist; /* Property list pointer */
const H5T_t *type; /* Datatype */
@@ -147,7 +139,7 @@ H5Z_set_local_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id)
hsize_t scanline; /* Size of dataspace's fastest changing dimension */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_STATIC
/* Get the plist structure */
if(NULL == (dcpl_plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE)))
@@ -253,11 +245,11 @@ H5Z_set_local_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5Z_set_local_szip() */
+} /* end H5Z__set_local_szip() */
/*-------------------------------------------------------------------------
- * Function: H5Z_filter_szip
+ * Function: H5Z__filter_szip
*
* Purpose: Implement an I/O filter around the 'rice' algorithm in
* libsz
@@ -271,7 +263,7 @@ done:
*-------------------------------------------------------------------------
*/
static size_t
-H5Z_filter_szip (unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
+H5Z__filter_szip(unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
size_t nbytes, size_t *buf_size, void **buf)
{
size_t ret_value = 0; /* Return value */
@@ -280,7 +272,7 @@ H5Z_filter_szip (unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
unsigned char *newbuf = NULL; /* Pointer to input buffer */
SZ_com_t sz_param; /* szip parameter block */
- FUNC_ENTER_NOAPI(0)
+ FUNC_ENTER_STATIC
/* Sanity check to make certain that we haven't drifted out of date with
* the mask options from the szlib.h header */
diff --git a/src/H5Ztrans.c b/src/H5Ztrans.c
index 1c8d415..83e9c38 100644
--- a/src/H5Ztrans.c
+++ b/src/H5Ztrans.c
@@ -86,24 +86,20 @@ typedef struct {
} H5Z_token;
/* Local function prototypes */
-static H5Z_token *H5Z_get_token(H5Z_token *current);
-static H5Z_node *H5Z_parse_expression(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers);
-static H5Z_node *H5Z_parse_term(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers);
-static H5Z_node *H5Z_parse_factor(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers);
-static H5Z_node *H5Z_new_node(H5Z_token_type type);
-static void H5Z_do_op(H5Z_node* tree);
-static hbool_t H5Z_op_is_numbs(H5Z_node* _tree);
-static hbool_t H5Z_op_is_numbs2(H5Z_node* _tree);
-static hid_t H5Z_xform_find_type(const H5T_t* type);
-static herr_t H5Z_xform_eval_full(H5Z_node *tree, const size_t array_size, const hid_t array_type, H5Z_result* res);
-static void H5Z_xform_destroy_parse_tree(H5Z_node *tree);
-static void* H5Z_xform_parse(const char *expression, H5Z_datval_ptrs* dat_val_pointers);
-static void* H5Z_xform_copy_tree(H5Z_node* tree, H5Z_datval_ptrs* dat_val_pointers, H5Z_datval_ptrs* new_dat_val_pointers);
-static void H5Z_xform_reduce_tree(H5Z_node* tree);
-#ifdef H5Z_XFORM_DEBUG
-static void H5Z_XFORM_DEBUG(H5Z_node *tree);
-static void H5Z_print(H5Z_node *tree, FILE *stream);
-#endif /* H5Z_XFORM_DEBUG */
+static H5Z_token *H5Z__get_token(H5Z_token *current);
+static H5Z_node *H5Z__parse_expression(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers);
+static H5Z_node *H5Z__parse_term(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers);
+static H5Z_node *H5Z__parse_factor(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers);
+static H5Z_node *H5Z__new_node(H5Z_token_type type);
+static void H5Z__do_op(H5Z_node* tree);
+static hbool_t H5Z__op_is_numbs(H5Z_node* _tree);
+static hbool_t H5Z__op_is_numbs2(H5Z_node* _tree);
+static hid_t H5Z__xform_find_type(const H5T_t* type);
+static herr_t H5Z__xform_eval_full(H5Z_node *tree, const size_t array_size, const hid_t array_type, H5Z_result* res);
+static void H5Z__xform_destroy_parse_tree(H5Z_node *tree);
+static void* H5Z__xform_parse(const char *expression, H5Z_datval_ptrs* dat_val_pointers);
+static void* H5Z__xform_copy_tree(H5Z_node* tree, H5Z_datval_ptrs* dat_val_pointers, H5Z_datval_ptrs* new_dat_val_pointers);
+static void H5Z__xform_reduce_tree(H5Z_node* tree);
/* PGCC (11.8-0) has trouble with the command *p++ = *p OP tree_val. It increments P first before
* doing the operation. So I break down the command into two lines:
@@ -312,11 +308,11 @@ static void H5Z_print(H5Z_node *tree, FILE *stream);
{ \
ret_value->type = (TYPE); \
if(tree->lchild) \
- ret_value->lchild = (H5Z_node*) H5Z_xform_copy_tree(tree->lchild, dat_val_pointers, new_dat_val_pointers); \
+ ret_value->lchild = (H5Z_node*) H5Z__xform_copy_tree(tree->lchild, dat_val_pointers, new_dat_val_pointers); \
else \
ret_value->lchild = NULL; \
if(tree->rchild) \
- ret_value->rchild = (H5Z_node*) H5Z_xform_copy_tree(tree->rchild, dat_val_pointers, new_dat_val_pointers); \
+ ret_value->rchild = (H5Z_node*) H5Z__xform_copy_tree(tree->rchild, dat_val_pointers, new_dat_val_pointers); \
else \
ret_value->rchild = NULL; \
} \
@@ -329,7 +325,7 @@ static void H5Z_print(H5Z_node *tree, FILE *stream);
}
/* The difference of this macro from H5Z_XFORM_DO_OP3 is that it handles the operations when the left operand is empty, like -x or +x.
- * The reason that it's separated from H5Z_XFORM_DO_OP3 is because compilers don't accept operations like *x or /x. So in H5Z_do_op,
+ * The reason that it's separated from H5Z_XFORM_DO_OP3 is because compilers don't accept operations like *x or /x. So in H5Z__do_op,
* these two macros are called in different ways. (SLU 2012/3/20)
*/
#define H5Z_XFORM_DO_OP6(OP) \
@@ -371,7 +367,7 @@ static void H5Z_print(H5Z_node *tree, FILE *stream);
}
/*
- * Programmer: Bill Wendling <wendling@ncsa.uiuc.edu>
+ * Programmer: Bill Wendling
* 25. August 2003
*/
@@ -393,20 +389,23 @@ static void H5Z_print(H5Z_node *tree, FILE *stream);
/*-------------------------------------------------------------------------
- * Function: H5Z_unget_token
+ * Function: H5Z__unget_token
+ *
* Purpose: Rollback the H5Z_token to the previous H5Z_token retrieved. There
* should only need to be one level of rollback necessary
* for our grammar.
+ *
* Return: Always succeeds.
+ *
* Programmer: Bill Wendling
* 26. August 2003
-*
+ *
*-------------------------------------------------------------------------
*/
static void
-H5Z_unget_token(H5Z_token *current)
+H5Z__unget_token(H5Z_token *current)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* check args */
HDassert(current);
@@ -420,7 +419,7 @@ H5Z_unget_token(H5Z_token *current)
/*-------------------------------------------------------------------------
- * Function: H5Z_get_token
+ * Function: H5Z__get_token
*
* Purpose: Determine what the next valid H5Z_token is in the expression
* string. The current position within the H5Z_token string is
@@ -438,11 +437,11 @@ H5Z_unget_token(H5Z_token *current)
*-------------------------------------------------------------------------
*/
static H5Z_token *
-H5Z_get_token(H5Z_token *current)
+H5Z__get_token(H5Z_token *current)
{
H5Z_token *ret_value = current;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(current);
@@ -558,7 +557,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Z_xform_destroy_parse_tree
+ * Function: H5Z__xform_destroy_parse_tree
* Purpose: Recursively destroys the expression tree.
* Return: Nothing
* Programmer: Bill Wendling
@@ -567,16 +566,15 @@ done:
*-------------------------------------------------------------------------
*/
static void
-H5Z_xform_destroy_parse_tree(H5Z_node *tree)
+H5Z__xform_destroy_parse_tree(H5Z_node *tree)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
- if (tree)
- {
- H5Z_xform_destroy_parse_tree(tree->lchild);
- H5Z_xform_destroy_parse_tree(tree->rchild);
- H5MM_xfree(tree);
- tree = NULL;
+ if(tree) {
+ H5Z__xform_destroy_parse_tree(tree->lchild);
+ H5Z__xform_destroy_parse_tree(tree->rchild);
+ H5MM_xfree(tree);
+ tree = NULL;
}
FUNC_LEAVE_NOAPI_VOID
@@ -589,7 +587,7 @@ H5Z_xform_destroy_parse_tree(H5Z_node *tree)
* Purpose: Entry function for parsing the expression string.
*
* Return: Success: Valid H5Z_node ptr to an expression tree.
- * NULLure: NULL
+ * Failure: NULL
*
* Programmer: Bill Wendling
* 26. August 2003
@@ -597,12 +595,12 @@ H5Z_xform_destroy_parse_tree(H5Z_node *tree)
*-------------------------------------------------------------------------
*/
static void *
-H5Z_xform_parse(const char *expression, H5Z_datval_ptrs* dat_val_pointers)
+H5Z__xform_parse(const char *expression, H5Z_datval_ptrs* dat_val_pointers)
{
H5Z_token tok;
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI(NULL)
+ FUNC_ENTER_STATIC
if(!expression)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "No expression provided?")
@@ -610,9 +608,9 @@ H5Z_xform_parse(const char *expression, H5Z_datval_ptrs* dat_val_pointers)
/* Set up the initial H5Z_token for parsing */
tok.tok_expr = tok.tok_begin = tok.tok_end = expression;
- ret_value = (void*)H5Z_parse_expression(&tok, dat_val_pointers);
+ ret_value = (void*)H5Z__parse_expression(&tok, dat_val_pointers);
- H5Z_xform_reduce_tree((H5Z_node*)ret_value);
+ H5Z__xform_reduce_tree((H5Z_node*)ret_value);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -620,48 +618,49 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Z_parse_expression
+ * Function: H5Z__parse_expression
* Purpose: Beginning of the recursive descent parser to parse the
* expression. An expression is:
*
* expr := term | term '+' term | term '-' term
*
* Return: Success: Valid H5Z_node ptr to expression tree
- * NULLure: NULL
+ * Failure: NULL
+ *
* Programmer: Bill Wendling
* 26. August 2003
*
*-------------------------------------------------------------------------
*/
static H5Z_node *
-H5Z_parse_expression(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers)
+H5Z__parse_expression(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers)
{
H5Z_node *expr;
H5Z_node *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
- expr = H5Z_parse_term(current, dat_val_pointers);
+ expr = H5Z__parse_term(current, dat_val_pointers);
for (;;) {
H5Z_node *new_node;
- current = H5Z_get_token(current);
+ current = H5Z__get_token(current);
switch(current->tok_type) {
case H5Z_XFORM_PLUS:
- new_node = H5Z_new_node(H5Z_XFORM_PLUS);
+ new_node = H5Z__new_node(H5Z_XFORM_PLUS);
if (!new_node) {
- H5Z_xform_destroy_parse_tree(expr);
+ H5Z__xform_destroy_parse_tree(expr);
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node")
}
new_node->lchild = expr;
- new_node->rchild = H5Z_parse_term(current, dat_val_pointers);
+ new_node->rchild = H5Z__parse_term(current, dat_val_pointers);
if (!new_node->rchild) {
- H5Z_xform_destroy_parse_tree(new_node);
+ H5Z__xform_destroy_parse_tree(new_node);
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
}
@@ -669,18 +668,18 @@ H5Z_parse_expression(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers)
break;
case H5Z_XFORM_MINUS:
- new_node = H5Z_new_node(H5Z_XFORM_MINUS);
+ new_node = H5Z__new_node(H5Z_XFORM_MINUS);
if (!new_node) {
- H5Z_xform_destroy_parse_tree(expr);
+ H5Z__xform_destroy_parse_tree(expr);
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node")
}
new_node->lchild = expr;
- new_node->rchild = H5Z_parse_term(current, dat_val_pointers);
+ new_node->rchild = H5Z__parse_term(current, dat_val_pointers);
if (!new_node->rchild) {
- H5Z_xform_destroy_parse_tree(new_node);
+ H5Z__xform_destroy_parse_tree(new_node);
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
}
@@ -688,7 +687,7 @@ H5Z_parse_expression(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers)
break;
case H5Z_XFORM_RPAREN:
- H5Z_unget_token(current);
+ H5Z__unget_token(current);
HGOTO_DONE(expr)
case H5Z_XFORM_END:
@@ -702,7 +701,7 @@ H5Z_parse_expression(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers)
case H5Z_XFORM_DIVIDE:
case H5Z_XFORM_LPAREN:
default:
- H5Z_xform_destroy_parse_tree(expr);
+ H5Z__xform_destroy_parse_tree(expr);
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
}
}
@@ -713,47 +712,48 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Z_parse_term
+ * Function: H5Z__parse_term
* Purpose: Parses a term in our expression language. A term is:
*
* term := factor | factor '*' factor | factor '/' factor
*
* Return: Success: Valid H5Z_node ptr to expression tree
- * NULLure: NULL
+ * Failure: NULL
+ *
* Programmer: Bill Wendling
* 26. August 2003
-*
+ *
*-------------------------------------------------------------------------
*/
static H5Z_node *
-H5Z_parse_term(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers)
+H5Z__parse_term(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers)
{
H5Z_node *term = NULL;
H5Z_node *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
- term = H5Z_parse_factor(current, dat_val_pointers);
+ term = H5Z__parse_factor(current, dat_val_pointers);
for (;;) {
H5Z_node *new_node;
- current = H5Z_get_token(current);
+ current = H5Z__get_token(current);
switch (current->tok_type) {
case H5Z_XFORM_MULT:
- new_node = H5Z_new_node(H5Z_XFORM_MULT);
+ new_node = H5Z__new_node(H5Z_XFORM_MULT);
if (!new_node) {
- H5Z_xform_destroy_parse_tree(term);
+ H5Z__xform_destroy_parse_tree(term);
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node")
}
new_node->lchild = term;
- new_node->rchild = H5Z_parse_factor(current, dat_val_pointers);
+ new_node->rchild = H5Z__parse_factor(current, dat_val_pointers);
if (!new_node->rchild) {
- H5Z_xform_destroy_parse_tree(new_node);
+ H5Z__xform_destroy_parse_tree(new_node);
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
}
@@ -761,25 +761,25 @@ H5Z_parse_term(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers)
break;
case H5Z_XFORM_DIVIDE:
- new_node = H5Z_new_node(H5Z_XFORM_DIVIDE);
+ new_node = H5Z__new_node(H5Z_XFORM_DIVIDE);
if (!new_node) {
- H5Z_xform_destroy_parse_tree(term);
+ H5Z__xform_destroy_parse_tree(term);
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node")
}
new_node->lchild = term;
- new_node->rchild = H5Z_parse_factor(current, dat_val_pointers);
+ new_node->rchild = H5Z__parse_factor(current, dat_val_pointers);
term = new_node;
if (!new_node->rchild) {
- H5Z_xform_destroy_parse_tree(new_node);
+ H5Z__xform_destroy_parse_tree(new_node);
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
}
break;
case H5Z_XFORM_RPAREN:
- H5Z_unget_token(current);
+ H5Z__unget_token(current);
HGOTO_DONE(term)
case H5Z_XFORM_END:
@@ -791,12 +791,12 @@ H5Z_parse_term(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers)
case H5Z_XFORM_PLUS:
case H5Z_XFORM_MINUS:
case H5Z_XFORM_LPAREN:
- H5Z_unget_token(current);
+ H5Z__unget_token(current);
HGOTO_DONE(term)
case H5Z_XFORM_ERROR:
default:
- H5Z_xform_destroy_parse_tree(term);
+ H5Z__xform_destroy_parse_tree(term);
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "bad transform type passed to data transform expression")
} /* end switch */
} /* end for */
@@ -807,7 +807,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Z_parse_factor
+ * Function: H5Z__parse_factor
* Purpose: Parses a factor in our expression language. A factor is:
*
* factor := number | // C long or double
@@ -817,26 +817,27 @@ done:
* '(' expr ')'
*
* Return: Success: Valid H5Z_node ptr to expression tree
- * NULLure: NULL
+ * Failure: NULL
+ *
* Programmer: Bill Wendling
* 26. August 2003
*
*-------------------------------------------------------------------------
*/
static H5Z_node *
-H5Z_parse_factor(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers)
+H5Z__parse_factor(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers)
{
H5Z_node *factor=NULL;
H5Z_node *new_node;
H5Z_node *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
- current = H5Z_get_token(current);
+ current = H5Z__get_token(current);
switch (current->tok_type) {
case H5Z_XFORM_INTEGER:
- factor = H5Z_new_node(H5Z_XFORM_INTEGER);
+ factor = H5Z__new_node(H5Z_XFORM_INTEGER);
if (!factor)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node")
@@ -844,7 +845,7 @@ H5Z_parse_factor(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers)
break;
case H5Z_XFORM_FLOAT:
- factor = H5Z_new_node(H5Z_XFORM_FLOAT);
+ factor = H5Z__new_node(H5Z_XFORM_FLOAT);
if (!factor)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node")
@@ -852,7 +853,7 @@ H5Z_parse_factor(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers)
break;
case H5Z_XFORM_SYMBOL:
- factor = H5Z_new_node(H5Z_XFORM_SYMBOL);
+ factor = H5Z__new_node(H5Z_XFORM_SYMBOL);
if (!factor)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node")
@@ -862,76 +863,76 @@ H5Z_parse_factor(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers)
break;
case H5Z_XFORM_LPAREN:
- factor = H5Z_parse_expression(current, dat_val_pointers);
+ factor = H5Z__parse_expression(current, dat_val_pointers);
if (!factor)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node")
- current = H5Z_get_token(current);
+ current = H5Z__get_token(current);
if (current->tok_type != H5Z_XFORM_RPAREN) {
- H5Z_xform_destroy_parse_tree(factor);
+ H5Z__xform_destroy_parse_tree(factor);
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Syntax error in data transform expression")
}
break;
case H5Z_XFORM_RPAREN:
/* We shouldn't see a ) right now */
- H5Z_xform_destroy_parse_tree(factor);
+ H5Z__xform_destroy_parse_tree(factor);
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Syntax error: unexpected ')' ")
case H5Z_XFORM_PLUS:
/* unary + */
- new_node = H5Z_parse_factor(current, dat_val_pointers);
+ new_node = H5Z__parse_factor(current, dat_val_pointers);
if (new_node) {
if (new_node->type != H5Z_XFORM_INTEGER && new_node->type != H5Z_XFORM_FLOAT &&
new_node->type != H5Z_XFORM_SYMBOL) {
- H5Z_xform_destroy_parse_tree(new_node);
- H5Z_xform_destroy_parse_tree(factor);
+ H5Z__xform_destroy_parse_tree(new_node);
+ H5Z__xform_destroy_parse_tree(factor);
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
}
factor = new_node;
- new_node = H5Z_new_node(H5Z_XFORM_PLUS);
+ new_node = H5Z__new_node(H5Z_XFORM_PLUS);
if (!new_node) {
- H5Z_xform_destroy_parse_tree(factor);
+ H5Z__xform_destroy_parse_tree(factor);
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
}
new_node->rchild = factor;
factor = new_node;
} else {
- H5Z_xform_destroy_parse_tree(factor);
+ H5Z__xform_destroy_parse_tree(factor);
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
}
break;
case H5Z_XFORM_MINUS:
/* unary - */
- new_node = H5Z_parse_factor(current, dat_val_pointers);
+ new_node = H5Z__parse_factor(current, dat_val_pointers);
if (new_node) {
if (new_node->type != H5Z_XFORM_INTEGER && new_node->type != H5Z_XFORM_FLOAT &&
new_node->type != H5Z_XFORM_SYMBOL) {
- H5Z_xform_destroy_parse_tree(new_node);
- H5Z_xform_destroy_parse_tree(factor);
+ H5Z__xform_destroy_parse_tree(new_node);
+ H5Z__xform_destroy_parse_tree(factor);
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
}
factor = new_node;
- new_node = H5Z_new_node(H5Z_XFORM_MINUS);
+ new_node = H5Z__new_node(H5Z_XFORM_MINUS);
if (!new_node) {
- H5Z_xform_destroy_parse_tree(factor);
+ H5Z__xform_destroy_parse_tree(factor);
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
}
new_node->rchild = factor;
factor = new_node;
} else {
- H5Z_xform_destroy_parse_tree(factor);
+ H5Z__xform_destroy_parse_tree(factor);
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
}
break;
@@ -956,21 +957,24 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Z_new_node
+ * Function: H5Z__new_node
+ *
* Purpose: Create and initialize a new H5Z_node structure.
+ *
* Return: Success: Valid H5Z_node ptr
- * NULLure: NULL
+ * Failure: NULL
+ *
* Programmer: Bill Wendling
* 26. August 2003
*
*-------------------------------------------------------------------------
*/
static H5Z_node *
-H5Z_new_node(H5Z_token_type type)
+H5Z__new_node(H5Z_token_type type)
{
H5Z_node *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
if(NULL == (ret_value = (H5Z_node *)H5MM_calloc(sizeof(H5Z_node))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Ran out of memory trying to allocate space for nodes in the parse tree")
@@ -985,7 +989,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5Z_xform_eval
* Purpose: If the transform is trivial, this function applies it.
- * Otherwise, it calls H5Z_xform_eval_full to do the full
+ * Otherwise, it calls H5Z__xform_eval_full to do the full
* transform.
* Return: SUCCEED if transform applied successfully, FAIL otherwise
* Programmer: Leon Arber
@@ -1009,7 +1013,7 @@ H5Z_xform_eval(H5Z_data_xform_t *data_xform_prop, void* array, size_t array_size
tree = data_xform_prop->parse_root;
/* Get the datatype ID for the buffer's type */
- if((array_type = H5Z_xform_find_type(buf_type)) < 0)
+ if((array_type = H5Z__xform_find_type(buf_type)) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Cannot perform data transform on this type.")
/* After this point, we're assured that the type of the array is handled by the eval code,
@@ -1069,7 +1073,7 @@ H5Z_xform_eval(H5Z_data_xform_t *data_xform_prop, void* array, size_t array_size
} /* end for */
} /* end else */
- if(H5Z_xform_eval_full(tree, array_size, array_type, &res) < 0)
+ if(H5Z__xform_eval_full(tree, array_size, array_type, &res) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "error while performing data transform")
if(data_xform_prop->dat_val_pointers->num_ptrs > 1)
@@ -1096,25 +1100,30 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Z_xform_eval_full
+ * Function: H5Z__xform_eval_full
+ *
* Purpose: Does a full evaluation of the parse tree contained in tree
* and applies this transform to array.
+ *
+ * Notes: In the case of a polynomial data transform (ie, the left and right
+ * subtree are both of type H5Z_XFORM_SYMBOL), the convention is
+ * that the left hand side will accumulate changes and, at the end,
+ * the new data will be copied from the lhs.
+ *
* Return: Nothing
+ *
* Programmer: Leon Arber
* 5/1/04
*
- * Notes: In the case of a polynomial data transform (ie, the left and right subtree
- * are both of type H5Z_XFORM_SYMBOL), the convention is that the left hand side
- * will accumulate changes and, at the end, the new data will be copied from the lhs.
*-------------------------------------------------------------------------
*/
static herr_t
-H5Z_xform_eval_full(H5Z_node *tree, const size_t array_size, const hid_t array_type, H5Z_result *res)
+H5Z__xform_eval_full(H5Z_node *tree, const size_t array_size, const hid_t array_type, H5Z_result *res)
{
H5Z_result resl, resr;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(tree);
@@ -1139,9 +1148,9 @@ H5Z_xform_eval_full(H5Z_node *tree, const size_t array_size, const hid_t array_
res->value.dat_val = *((void**)(tree->value.dat_val));
} /* end if */
else {
- if(tree->lchild && H5Z_xform_eval_full(tree->lchild, array_size, array_type, &resl) < 0)
+ if(tree->lchild && H5Z__xform_eval_full(tree->lchild, array_size, array_type, &resl) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "error while performing data transform")
- if(H5Z_xform_eval_full(tree->rchild, array_size, array_type, &resr) < 0)
+ if(H5Z__xform_eval_full(tree->rchild, array_size, array_type, &resr) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "error while performing data transform")
res->type = H5Z_XFORM_SYMBOL;
@@ -1191,23 +1200,25 @@ H5Z_xform_eval_full(H5Z_node *tree, const size_t array_size, const hid_t array_
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5Z_xform_eval_full() */
+} /* end H5Z__xform_eval_full() */
/*-------------------------------------------------------------------------
* Function: H5Z_find_type
+ *
* Return: Native type of datatype that is passed in
+ *
* Programmer: Leon Arber, 4/20/04
*
*-------------------------------------------------------------------------
*/
static hid_t
-H5Z_xform_find_type(const H5T_t* type)
+H5Z__xform_find_type(const H5T_t* type)
{
H5T_t *tmp; /* Temporary datatype */
hid_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(type);
@@ -1274,25 +1285,28 @@ H5Z_xform_find_type(const H5T_t* type)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5Z_xform_find_type() */
+} /* end H5Z__xform_find_type() */
/*-------------------------------------------------------------------------
- * Function: H5Z_xform_copy_tree
+ * Function: H5Z__xform_copy_tree
+ *
* Purpose: Makes a copy of the parse tree passed in.
+ *
* Return: A pointer to a root for a new parse tree which is a copy
* of the one passed in.
+ *
* Programmer: Leon Arber
* April 1, 2004.
*
*-------------------------------------------------------------------------
*/
static void *
-H5Z_xform_copy_tree(H5Z_node* tree, H5Z_datval_ptrs* dat_val_pointers, H5Z_datval_ptrs* new_dat_val_pointers)
+H5Z__xform_copy_tree(H5Z_node* tree, H5Z_datval_ptrs* dat_val_pointers, H5Z_datval_ptrs* new_dat_val_pointers)
{
H5Z_node* ret_value=NULL;
- FUNC_ENTER_NOAPI(NULL)
+ FUNC_ENTER_STATIC
HDassert(tree);
@@ -1351,21 +1365,24 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Z_op_is_numbs
+ * Function: H5Z__op_is_numbs
+ *
* Purpose: Internal function to facilitate the condition check in
- * H5Z_xform_reduce_tree to reduce the bulkiness of the code.
+ * H5Z__xform_reduce_tree to reduce the bulkiness of the code.
+ *
* Return: TRUE or FALSE
+ *
* Programmer: Raymond Lu
* 15 March 2012
*
*-------------------------------------------------------------------------
*/
static hbool_t
-H5Z_op_is_numbs(H5Z_node* _tree)
+H5Z__op_is_numbs(H5Z_node* _tree)
{
hbool_t ret_value = FALSE;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(_tree);
@@ -1377,23 +1394,26 @@ H5Z_op_is_numbs(H5Z_node* _tree)
/*-------------------------------------------------------------------------
- * Function: H5Z_op_is_numbs2
+ * Function: H5Z__op_is_numbs2
+ *
* Purpose: Internal function to facilitate the condition check in
- * H5Z_xform_reduce_tree to reduce the bulkiness of the code.
- * The difference from H5Z_op_is_numbs is that the left child
+ * H5Z__xform_reduce_tree to reduce the bulkiness of the code.
+ * The difference from H5Z__op_is_numbs is that the left child
* can be empty, like -x or +x.
+ *
* Return: TRUE or FALSE
+ *
* Programmer: Raymond Lu
* 15 March 2012
*
*-------------------------------------------------------------------------
*/
static hbool_t
-H5Z_op_is_numbs2(H5Z_node* _tree)
+H5Z__op_is_numbs2(H5Z_node* _tree)
{
hbool_t ret_value = FALSE;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(_tree);
@@ -1406,50 +1426,51 @@ H5Z_op_is_numbs2(H5Z_node* _tree)
/*-------------------------------------------------------------------------
- * Function: H5Z_xform_reduce_tree
+ * Function: H5Z__xform_reduce_tree
+ *
* Purpose: Simplifies parse tree passed in by performing any obvious
* and trivial arithemtic calculations.
*
* Return: None.
+ *
* Programmer: Leon Arber
* April 1, 2004.
- * Modifications:
*
*-------------------------------------------------------------------------
*/
static void
-H5Z_xform_reduce_tree(H5Z_node* tree)
+H5Z__xform_reduce_tree(H5Z_node* tree)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
if(tree) {
if((tree->type == H5Z_XFORM_DIVIDE) || (tree->type == H5Z_XFORM_MULT))
{
- if(H5Z_op_is_numbs(tree))
- H5Z_do_op(tree);
+ if(H5Z__op_is_numbs(tree))
+ H5Z__do_op(tree);
else
{
- H5Z_xform_reduce_tree(tree->lchild);
- if(H5Z_op_is_numbs(tree))
- H5Z_do_op(tree);
+ H5Z__xform_reduce_tree(tree->lchild);
+ if(H5Z__op_is_numbs(tree))
+ H5Z__do_op(tree);
else {
- H5Z_xform_reduce_tree(tree->rchild);
- if(H5Z_op_is_numbs(tree))
- H5Z_do_op(tree);
+ H5Z__xform_reduce_tree(tree->rchild);
+ if(H5Z__op_is_numbs(tree))
+ H5Z__do_op(tree);
}
}
} else if((tree->type == H5Z_XFORM_PLUS) || (tree->type == H5Z_XFORM_MINUS)) {
- if(H5Z_op_is_numbs2(tree))
- H5Z_do_op(tree);
+ if(H5Z__op_is_numbs2(tree))
+ H5Z__do_op(tree);
else
{
- H5Z_xform_reduce_tree(tree->lchild);
- if(H5Z_op_is_numbs2(tree))
- H5Z_do_op(tree);
+ H5Z__xform_reduce_tree(tree->lchild);
+ if(H5Z__op_is_numbs2(tree))
+ H5Z__do_op(tree);
else {
- H5Z_xform_reduce_tree(tree->rchild);
- if(H5Z_op_is_numbs2(tree))
- H5Z_do_op(tree);
+ H5Z__xform_reduce_tree(tree->rchild);
+ if(H5Z__op_is_numbs2(tree))
+ H5Z__do_op(tree);
}
}
}
@@ -1461,22 +1482,25 @@ H5Z_xform_reduce_tree(H5Z_node* tree)
/*-------------------------------------------------------------------------
- * Function: H5Z_do_op
+ * Function: H5Z__do_op
+ *
* Purpose: If the root of the tree passed in points to a simple
* arithmetic operation and the left and right subtrees are both
* integer or floating point values, this function does that
* operation, free the left and right subtrees, and replaces
* the root with the result of the operation.
+ *
* Return: None.
+ *
* Programmer: Leon Arber
* April 1, 2004.
*
*-------------------------------------------------------------------------
*/
static void
-H5Z_do_op(H5Z_node* tree)
+H5Z__do_op(H5Z_node* tree)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
if(tree->type == H5Z_XFORM_DIVIDE)
H5Z_XFORM_DO_OP3(/)
@@ -1492,7 +1516,7 @@ H5Z_do_op(H5Z_node* tree)
/*-------------------------------------------------------------------------
- * Function: H5D_xform_create
+ * Function: H5Z_xform_create
*
* Purpose: Create a new data transform object from a string.
*
@@ -1546,7 +1570,7 @@ H5Z_xform_create(const char *expr)
data_xform_prop->dat_val_pointers->num_ptrs = 0;
/* we generate the parse tree right here and store a pointer to its root in the property. */
- if((data_xform_prop->parse_root = (H5Z_node *)H5Z_xform_parse(expr, data_xform_prop->dat_val_pointers))==NULL)
+ if((data_xform_prop->parse_root = (H5Z_node *)H5Z__xform_parse(expr, data_xform_prop->dat_val_pointers))==NULL)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to generate parse tree from expression")
/* Sanity check
@@ -1563,7 +1587,7 @@ done:
if(ret_value==NULL) {
if(data_xform_prop) {
if(data_xform_prop->parse_root)
- H5Z_xform_destroy_parse_tree(data_xform_prop->parse_root);
+ H5Z__xform_destroy_parse_tree(data_xform_prop->parse_root);
if(data_xform_prop->xform_exp)
H5MM_xfree(data_xform_prop->xform_exp);
if(count > 0 && data_xform_prop->dat_val_pointers->ptr_dat_val)
@@ -1600,7 +1624,7 @@ H5Z_xform_destroy(H5Z_data_xform_t *data_xform_prop)
if(data_xform_prop) {
/* Destroy the parse tree */
- H5Z_xform_destroy_parse_tree(data_xform_prop->parse_root);
+ H5Z__xform_destroy_parse_tree(data_xform_prop->parse_root);
/* Free the expression */
H5MM_xfree(data_xform_prop->xform_exp);
@@ -1674,7 +1698,7 @@ H5Z_xform_copy(H5Z_data_xform_t **data_xform_prop)
new_data_xform_prop->dat_val_pointers->num_ptrs = 0;
/* Copy parse tree */
- if((new_data_xform_prop->parse_root = (H5Z_node*)H5Z_xform_copy_tree((*data_xform_prop)->parse_root, (*data_xform_prop)->dat_val_pointers, new_data_xform_prop->dat_val_pointers)) == NULL)
+ if((new_data_xform_prop->parse_root = (H5Z_node*)H5Z__xform_copy_tree((*data_xform_prop)->parse_root, (*data_xform_prop)->dat_val_pointers, new_data_xform_prop->dat_val_pointers)) == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "error copying the parse tree")
/* Sanity check
@@ -1691,7 +1715,7 @@ done:
if(ret_value<0) {
if(new_data_xform_prop) {
if(new_data_xform_prop->parse_root)
- H5Z_xform_destroy_parse_tree(new_data_xform_prop->parse_root);
+ H5Z__xform_destroy_parse_tree(new_data_xform_prop->parse_root);
if(new_data_xform_prop->xform_exp)
H5MM_xfree(new_data_xform_prop->xform_exp);
H5MM_xfree(new_data_xform_prop);
diff --git a/src/H5checksum.c b/src/H5checksum.c
index 4e98976..a9d2b4e 100644
--- a/src/H5checksum.c
+++ b/src/H5checksum.c
@@ -15,7 +15,7 @@
*
* Created: H5checksum.c
* Aug 21 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Internal code for computing fletcher32 checksums
*
@@ -152,7 +152,7 @@ H5_checksum_fletcher32(const void *_data, size_t _len)
/*-------------------------------------------------------------------------
- * Function: H5_checksum_crc_make_table
+ * Function: H5__checksum_crc_make_table
*
* Purpose: Compute the CRC table for the CRC checksum algorithm
*
@@ -164,12 +164,12 @@ H5_checksum_fletcher32(const void *_data, size_t _len)
*-------------------------------------------------------------------------
*/
static void
-H5_checksum_crc_make_table(void)
+H5__checksum_crc_make_table(void)
{
uint32_t c; /* Checksum for each byte value */
unsigned n, k; /* Local index variables */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Compute the checksum for each possible byte value */
for(n = 0; n < 256; n++) {
@@ -184,11 +184,11 @@ H5_checksum_crc_make_table(void)
H5_crc_table_computed = TRUE;
FUNC_LEAVE_NOAPI_VOID
-} /* end H5_checksum_crc_make_table() */
+} /* end H5__checksum_crc_make_table() */
/*-------------------------------------------------------------------------
- * Function: H5_checksum_crc_make_table
+ * Function: H5__checksum_crc_update
*
* Purpose: Update a running CRC with the bytes buf[0..len-1]--the CRC
* should be initialized to all 1's, and the transmitted value
@@ -203,22 +203,22 @@ H5_checksum_crc_make_table(void)
*-------------------------------------------------------------------------
*/
static uint32_t
-H5_checksum_crc_update(uint32_t crc, const uint8_t *buf, size_t len)
+H5__checksum_crc_update(uint32_t crc, const uint8_t *buf, size_t len)
{
size_t n; /* Local index variable */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Initialize the CRC table if necessary */
if(!H5_crc_table_computed)
- H5_checksum_crc_make_table();
+ H5__checksum_crc_make_table();
/* Update the CRC with the results from this buffer */
for(n = 0; n < len; n++)
crc = H5_crc_table[(crc ^ buf[n]) & 0xff] ^ (crc >> 8);
FUNC_LEAVE_NOAPI(crc)
-} /* end H5_checksum_crc_update() */
+} /* end H5__checksum_crc_update() */
/*-------------------------------------------------------------------------
@@ -247,7 +247,7 @@ H5_checksum_crc(const void *_data, size_t len)
HDassert(_data);
HDassert(len > 0);
- FUNC_LEAVE_NOAPI(H5_checksum_crc_update((uint32_t)0xffffffffL, (const uint8_t *)_data, len) ^ 0xffffffffL)
+ FUNC_LEAVE_NOAPI(H5__checksum_crc_update((uint32_t)0xffffffffL, (const uint8_t *)_data, len) ^ 0xffffffffL)
} /* end H5_checksum_crc() */
/*
diff --git a/src/H5dbg.c b/src/H5dbg.c
index df93c8a..819653d 100644
--- a/src/H5dbg.c
+++ b/src/H5dbg.c
@@ -13,11 +13,11 @@
/*-------------------------------------------------------------------------
*
- * Created: H5dbg.c
- * Mar 4 2006
- * Quincey Koziol
+ * Created: H5dbg.c
+ * Mar 4 2006
+ * Quincey Koziol
*
- * Purpose: Generic debugging routines
+ * Purpose: Generic debugging routines
*
*-------------------------------------------------------------------------
*/
@@ -65,12 +65,12 @@
/*-------------------------------------------------------------------------
* Function: H5_buffer_dump
*
- * Purpose: Dumps a buffer of memory in an octal dump form
+ * Purpose: Dumps a buffer of memory in an octal dump form
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Mar 4 2006
+ * Programmer: Quincey Koziol
+ * Mar 4 2006
*
*-------------------------------------------------------------------------
*/
@@ -99,43 +99,46 @@ H5_buffer_dump(FILE *stream, int indent, const uint8_t *buf,
for(u = 0; u < buf_size; u += 16) {
uint8_t c;
- HDfprintf(stream, "%*s %8d: ", indent, "", u + buf_offset);
+ HDfprintf(stream, "%*s %8d: ", indent, "", u + buf_offset);
/* Print the hex values */
- for(v = 0; v < 16; v++) {
- if(u + v < buf_size) {
- if(marker[u + v])
- HDfprintf(stream, "__ ");
- else {
- c = buf[buf_offset + u + v];
- HDfprintf(stream, "%02x ", c);
- } /* end else */
- } /* end if */
+ for(v = 0; v < 16; v++) {
+ if(u + v < buf_size) {
+ if(marker[u + v])
+ HDfprintf(stream, "__ ");
+ else {
+ c = buf[buf_offset + u + v];
+ HDfprintf(stream, "%02x ", c);
+ } /* end else */
+ } /* end if */
else
HDfprintf(stream, " ");
- if(7 == v)
- HDfputc(' ', stream);
- } /* end for */
- HDfputc(' ', stream);
- /* Print the character values */
- for(v = 0; v < 16; v++) {
- if(u + v < buf_size) {
- if(marker[u + v])
- HDfputc(' ', stream);
- else {
- c = buf[buf_offset + u + v];
- if(HDisprint(c))
- HDfputc(c, stream);
- else
- HDfputc('.', stream);
- } /* end else */
- } /* end if */
- if(7 == v)
+ if(7 == v)
+ HDfputc(' ', stream);
+ } /* end for */
HDfputc(' ', stream);
- } /* end for */
- HDfputc('\n', stream);
+ /* Print the character values */
+ for(v = 0; v < 16; v++) {
+ if(u + v < buf_size) {
+ if(marker[u + v])
+ HDfputc(' ', stream);
+ else {
+ c = buf[buf_offset + u + v];
+
+ if(HDisprint(c))
+ HDfputc(c, stream);
+ else
+ HDfputc('.', stream);
+ } /* end else */
+ } /* end if */
+
+ if(7 == v)
+ HDfputc(' ', stream);
+ } /* end for */
+
+ HDfputc('\n', stream);
} /* end for */
FUNC_LEAVE_NOAPI(SUCCEED)
diff --git a/src/H5detect.c b/src/H5detect.c
index c744c39..85f1f90 100644
--- a/src/H5detect.c
+++ b/src/H5detect.c
@@ -49,6 +49,11 @@ static const char *FileHeader = "\n\
#include "H5Tpublic.h"
#include "H5Rpublic.h"
+/* Disable warning about cast increasing the alignment of the target type,
+ * that's _exactly_ what this code is probing. -QAK
+ */
+H5_GCC_DIAG_OFF(cast-align)
+
#if defined(__has_attribute)
# if __has_attribute(no_sanitize_address)
# define HDF_NO_UBSAN __attribute__((no_sanitize_address))
@@ -153,7 +158,7 @@ static H5JMP_BUF jbuf_g;
#endif
-
+
/*-------------------------------------------------------------------------
* Function: precision
*
@@ -206,7 +211,7 @@ precision (detected_t *d)
}
}
-
+
/*-------------------------------------------------------------------------
* Function: DETECT_I/DETECT_BYTE
*
@@ -219,25 +224,6 @@ precision (detected_t *d)
*
* Return: void
*
- * Modifications:
- *
- * Robb Matzke, 4 Nov 1996
- * The INFO.perm now contains `-1' for bytes that aren't used and
- * are always zero. This happens on the Cray for `short' where
- * sizeof(short) is 8, but only the low-order 4 bytes are ever used.
- *
- * Robb Matzke, 4 Nov 1996
- * Added a `padding' field to indicate how many zero bytes appear to
- * the left (N) or right (-N) of the value.
- *
- * Robb Matzke, 5 Nov 1996
- * Removed HFILE and CFILE arguments.
- *
- * Neil Fortner, 6 Sep 2013
- * Split macro into DETECT_I and DETECT_BYTE macros, extracted
- * common code into DETECT_I_BYTE_CORE. This was done to remove
- * "will never be executed" warnings.
- *
*-------------------------------------------------------------------------
*/
#define DETECT_I_BYTE_CORE(TYPE,VAR,INFO,DETECT_TYPE) { \
@@ -280,7 +266,7 @@ precision (detected_t *d)
DETECT_I_BYTE_CORE(TYPE,VAR,INFO,TYPE) \
}
-
+
/*-------------------------------------------------------------------------
* Function: DETECT_F
*
@@ -377,7 +363,7 @@ precision (detected_t *d)
} \
}
-
+
/*-------------------------------------------------------------------------
* Function: DETECT_M
*
@@ -453,7 +439,7 @@ precision (detected_t *d)
#if defined(H5LONGJMP) && defined(H5_HAVE_SIGNAL)
-
+
/*-------------------------------------------------------------------------
* Function: sigsegv_handler
*
@@ -486,7 +472,7 @@ sigsegv_handler(int H5_ATTR_UNUSED signo)
#if defined(H5LONGJMP) && defined(H5_HAVE_SIGNAL)
-
+
/*-------------------------------------------------------------------------
* Function: sigbus_handler
*
@@ -519,7 +505,7 @@ sigbus_handler(int H5_ATTR_UNUSED signo)
#if defined(H5LONGJMP) && defined(H5_HAVE_SIGNAL)
-
+
/*-------------------------------------------------------------------------
* Function: sigill_handler
*
@@ -550,7 +536,7 @@ sigill_handler(int H5_ATTR_UNUSED signo)
}
#endif
-
+
/*-------------------------------------------------------------------------
* Function: print_results
*
@@ -829,7 +815,7 @@ done:\n\
fprintf(rawoutstream, "/* sigill_handler called: %d times */\n", sigill_handler_called_g);
} /* end print_results() */
-
+
/*-------------------------------------------------------------------------
* Function: iprint
*
@@ -919,7 +905,7 @@ iprint(detected_t *d)
}
-
+
/*-------------------------------------------------------------------------
* Function: byte_cmp
*
@@ -946,7 +932,7 @@ byte_cmp(int n, const void *_a, const void *_b, const unsigned char *pad_mask)
return -1;
}
-
+
/*-------------------------------------------------------------------------
* Function: bit_cmp
*
@@ -987,7 +973,7 @@ bit_cmp(unsigned int nbytes, int *perm, void *_a, void *_b,
return 0;
}
-
+
/*-------------------------------------------------------------------------
* Function: fix_order
*
@@ -1055,7 +1041,7 @@ fix_order(int n, int last, int *perm, const char **mesg)
}
}
-
+
/*-------------------------------------------------------------------------
* Function: imp_bit
*
@@ -1109,7 +1095,7 @@ imp_bit(unsigned int n, int *perm, void *_a, void *_b, const unsigned char *pad_
return (a[perm[major]] >> minor) & 0x01 ? 0 : 1;
}
-
+
/*-------------------------------------------------------------------------
* Function: find_bias
*
@@ -1140,7 +1126,7 @@ find_bias(unsigned int epos, unsigned int esize, int *perm, void *_a)
return bias;
}
-
+
/*-------------------------------------------------------------------------
* Function: print_header
*
@@ -1281,7 +1267,7 @@ bit.\n";
}
-
+
/*-------------------------------------------------------------------------
* Function: detect_C89_integers
*
@@ -1303,7 +1289,7 @@ detect_C89_integers(void)
DETECT_I(unsigned long, ULONG, d_g[nd_g]); nd_g++;
}
-
+
/*-------------------------------------------------------------------------
* Function: detect_C89_floats
*
@@ -1319,7 +1305,7 @@ detect_C89_floats(void)
DETECT_F(double, DOUBLE, d_g[nd_g]); nd_g++;
}
-
+
/*-------------------------------------------------------------------------
* Function: detect_C99_integers8
*
@@ -1375,7 +1361,7 @@ detect_C99_integers8(void)
#endif
}
-
+
/*-------------------------------------------------------------------------
* Function: detect_C99_integers16
*
@@ -1407,7 +1393,7 @@ detect_C99_integers16(void)
#endif
}
-
+
/*-------------------------------------------------------------------------
* Function: detect_C99_integers32
*
@@ -1439,7 +1425,7 @@ detect_C99_integers32(void)
#endif
}
-
+
/*-------------------------------------------------------------------------
* Function: detect_C99_integers64
*
@@ -1485,7 +1471,7 @@ detect_C99_integers64(void)
#endif
}
-
+
/*-------------------------------------------------------------------------
* Function: detect_C99_integers
*
@@ -1505,7 +1491,7 @@ detect_C99_integers(void)
detect_C99_integers64();
}
-
+
/*-------------------------------------------------------------------------
* Function: detect_C99_floats
*
@@ -1530,7 +1516,7 @@ detect_C99_floats(void)
#endif
}
-
+
/*-------------------------------------------------------------------------
* Function: detect_alignments
*
@@ -1607,7 +1593,7 @@ static int verify_signal_handlers(int signum, void (*handler)(int))
}
#endif
-
+
/*-------------------------------------------------------------------------
* Function: main
*
@@ -1615,12 +1601,6 @@ static int verify_signal_handlers(int signum, void (*handler)(int))
*
* Return: Success: EXIT_SUCCESS
*
- * Modifications:
- * Some compilers, e.g., Intel C v7.0, took a long time to compile
- * with optimization when a module routine contains many code lines.
- * Divide up all those types detections macros into subroutines, both
- * to avoid the compiler optimization error and cleaner codes.
- *
*-------------------------------------------------------------------------
*/
int HDF_NO_UBSAN
@@ -1705,3 +1685,4 @@ main(int argc, char *argv[])
return EXIT_SUCCESS;
}
+H5_GCC_DIAG_ON(cast-align)
diff --git a/tools/test/h5dump/errfiles/tattr-3.err b/tools/test/h5dump/errfiles/tattr-3.err
index 3a34314..a6aae76 100644
--- a/tools/test/h5dump/errfiles/tattr-3.err
+++ b/tools/test/h5dump/errfiles/tattr-3.err
@@ -1,5 +1,5 @@
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Aopen(): unable to load attribute info from object header for attribute: 'attr'
+ #000: (file name) line (number) in H5Aopen(): unable to open attribute: 'attr'
major: Attribute
minor: Can't open object
#001: (file name) line (number) in H5A__open(): unable to load attribute info from object header for attribute: 'attr'