summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-08-23 19:09:20 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-08-23 19:09:20 (GMT)
commitd20d355b79bf25d2685dc9e3967951b1532951bb (patch)
treec862028f2d6c7ea540c6ffd2ca34d6ac9b715686 /src
parentc951ee8eded3cd63adfeaa87dcdd966ceb3e58c1 (diff)
downloadhdf5-d20d355b79bf25d2685dc9e3967951b1532951bb.zip
hdf5-d20d355b79bf25d2685dc9e3967951b1532951bb.tar.gz
hdf5-d20d355b79bf25d2685dc9e3967951b1532951bb.tar.bz2
OESS-29 Update HD prefix and compare against develop
Diffstat (limited to 'src')
-rw-r--r--src/H5.c20
-rw-r--r--src/H5A.c107
-rw-r--r--src/H5AC.c458
-rw-r--r--src/H5B.c834
-rw-r--r--src/H5Bdbg.c220
-rw-r--r--src/H5Cmpio.c358
-rw-r--r--src/H5Dchunk.c1172
-rw-r--r--src/H5Dearray.c488
-rw-r--r--src/H5Dfarray.c456
-rw-r--r--src/H5EAdbg.c182
-rw-r--r--src/H5EAtest.c134
-rw-r--r--src/H5Eint.c388
-rw-r--r--src/H5FAtest.c30
-rw-r--r--src/H5FDmpio.c1020
-rw-r--r--src/H5FL.c8
-rw-r--r--src/H5HFdbg.c362
-rw-r--r--src/H5I.c264
-rw-r--r--src/H5Ofill.c236
-rw-r--r--src/H5Omtime.c266
-rw-r--r--src/H5Oname.c70
-rw-r--r--src/H5PB.c224
-rw-r--r--src/H5ST.c16
-rw-r--r--src/H5Sdbg.c34
-rw-r--r--src/H5T.c156
-rw-r--r--src/H5Tconv.c3724
-rw-r--r--src/H5dbg.c92
-rw-r--r--src/H5detect.c53
-rw-r--r--src/H5make_libsettings.c13
-rw-r--r--src/H5timer.c118
29 files changed, 5757 insertions, 5746 deletions
diff --git a/src/H5.c b/src/H5.c
index 5e342ff..96b4a5b 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -262,7 +262,7 @@ H5_term_library(void)
/* Don't do anything if the library is already closed */
if(!(H5_INIT_GLOBAL))
- goto done;
+ goto done;
/* Indicate that the library is being shut down */
H5_TERM_GLOBAL = TRUE;
@@ -379,18 +379,18 @@ H5_term_library(void)
* down if any of the below code involves using the instrumentation code.
*/
if(H5_MPEinit_g) {
- int mpi_initialized;
- int mpi_finalized;
- int mpe_code;
+ int mpi_initialized;
+ int mpi_finalized;
+ int mpe_code;
- MPI_Initialized(&mpi_initialized);
- MPI_Finalized(&mpi_finalized);
+ MPI_Initialized(&mpi_initialized);
+ MPI_Finalized(&mpi_finalized);
if (mpi_initialized && !mpi_finalized) {
- mpe_code = MPE_Finish_log("h5log");
- HDassert(mpe_code >=0);
- } /* end if */
- H5_MPEinit_g = FALSE; /* turn it off no matter what */
+ mpe_code = MPE_Finish_log("h5log");
+ HDassert(mpe_code >=0);
+ } /* end if */
+ H5_MPEinit_g = FALSE; /* turn it off no matter what */
} /* end if */
#endif
diff --git a/src/H5A.c b/src/H5A.c
index a0408c3..3af0560 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -16,22 +16,22 @@
/****************/
#include "H5Amodule.h" /* This source code file is part of the H5A module */
-#define H5O_FRIEND /*suppress error about including H5Opkg */
+#define H5O_FRIEND /* Suppress error about including H5Opkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Apkg.h" /* Attributes */
-#include "H5CXprivate.h" /* API Contexts */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Opkg.h" /* Object headers */
-#include "H5Sprivate.h" /* Dataspace functions */
-#include "H5SMprivate.h" /* Shared Object Header Messages */
+#include "H5private.h" /* Generic Functions */
+#include "H5Apkg.h" /* Attributes */
+#include "H5CXprivate.h" /* API Contexts */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Opkg.h" /* Object headers */
+#include "H5Sprivate.h" /* Dataspace functions */
+#include "H5SMprivate.h" /* Shared Object Header Messages */
/****************/
@@ -216,59 +216,64 @@ H5A_term_package(void)
/*--------------------------------------------------------------------------
- NAME
- H5Acreate2
- PURPOSE
- Creates an attribute on an object
- USAGE
- hid_t H5Acreate2(loc_id, attr_name, type_id, space_id, acpl_id,
- aapl_id)
- hid_t loc_id; IN: Object (dataset or group) to be attached to
- const char *attr_name; IN: Name of attribute to locate and open
- hid_t type_id; IN: ID of datatype for attribute
- hid_t space_id; IN: ID of dataspace for attribute
- hid_t acpl_id; IN: ID of creation property list (currently not used)
- hid_t aapl_id; IN: Attribute access property list
- RETURNS
- Non-negative on success/Negative on failure
-
- DESCRIPTION
- This function creates an attribute which is attached to the object
- specified with 'loc_id'. The name specified with 'attr_name' for
- each attribute for an object must be unique for that object. The 'type_id'
- and 'space_id' are created with the H5T and H5S interfaces respectively.
- The 'aapl_id' property list is currently unused, but will be used in the
- future for optional attribute access properties. The attribute ID returned
- from this function must be released with H5Aclose or resource leaks will
- develop.
-
---------------------------------------------------------------------------*/
+ * Function: H5Acreate2
+ *
+ * Purpose: Creates an attribute on an object
+ *
+ * Usage:
+ * hid_t H5Acreate2(loc_id, attr_name, type_id, space_id, acpl_id,
+ * aapl_id)
+ *
+ * Description: This function creates an attribute which is attached to the
+ * object specified with 'loc_id'. The name specified with
+ * 'attr_name' for each attribute for an object must be unique
+ * for that object. The 'type_id' and 'space_id' are created
+ * with the H5T and H5S interfaces respectively. The 'aapl_id'
+ * property list is currently unused, but will be used in the
+ * future for optional attribute access properties. The
+ * attribute ID returned from this function must be released
+ * with H5Aclose or resource leaks will develop.
+ *
+ * Parameters:
+ * hid_t loc_id; IN: Object (dataset or group) to be attached to
+ * const char *attr_name; IN: Name of attribute to locate and open
+ * hid_t type_id; IN: ID of datatype for attribute
+ * hid_t space_id; IN: ID of dataspace for attribute
+ * hid_t acpl_id; IN: ID of creation property list (currently not used)
+ * hid_t aapl_id; IN: Attribute access property list
+ *
+ * Return: Success: An ID for the created attribute
+ *
+ * Failure: H5I_INVALID_HID
+ *
+ *-------------------------------------------------------------------------
+ */
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)
{
- H5A_t *attr = NULL; /* Attribute created */
- 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 */
+ H5A_t *attr = NULL; /* Attribute created */
+ 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 = H5I_INVALID_HID; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE6("i", "i*siiii", loc_id, attr_name, type_id, space_id, acpl_id, 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, 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(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, 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_BADVALUE, FAIL, "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, FAIL, "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, FAIL, "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)
@@ -336,7 +341,7 @@ H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
H5TRACE8("i", "i*s*siiiii", loc_id, obj_name, attr_name, type_id, space_id,
acpl_id, aapl_id, 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")
if(H5G_loc(loc_id, &loc) < 0)
diff --git a/src/H5AC.c b/src/H5AC.c
index 6714bed..a1b096c 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -134,16 +134,16 @@ static const H5AC_class_t *const H5AC_class_s[] = {
};
-
+
/*-------------------------------------------------------------------------
- * Function: H5AC_init
+ * Function: H5AC_init
*
- * Purpose: Initialize the interface from some other layer.
+ * Purpose: Initialize the interface from some other layer.
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, January 18, 2003
*
*-------------------------------------------------------------------------
@@ -160,15 +160,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5AC_init() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5AC__init_package
+ * Function: H5AC__init_package
*
- * Purpose: Initialize interface-specific information
+ * Purpose: Initialize interface-specific information
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, July 18, 2002
*
*-------------------------------------------------------------------------
@@ -196,17 +196,17 @@ H5AC__init_package(void)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5AC__init_package() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5AC_term_package
+ * Function: H5AC_term_package
*
- * Purpose: Terminate this interface.
+ * Purpose: Terminate this interface.
*
- * Return: Success: Positive if anything was done that might
- * affect other interfaces; zero otherwise.
- * Failure: Negative.
+ * Return: Success: Positive if anything was done that might
+ * affect other interfaces; zero otherwise.
+ * Failure: Negative.
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, July 18, 2002
*
*-------------------------------------------------------------------------
@@ -223,15 +223,15 @@ H5AC_term_package(void)
FUNC_LEAVE_NOAPI(0)
} /* end H5AC_term_package() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5AC_cache_image_pending()
*
- * Purpose: Debugging function that tests to see if the load of a
+ * Purpose: Debugging function that tests to see if the load of a
* metadata cache image load is pending (i.e. will be executed
* on the next protect or insert)
- *
+ *
* Returns TRUE if a cache image load is pending, and FALSE
* if not. Throws an assertion failure on error.
*
@@ -261,7 +261,7 @@ H5AC_cache_image_pending(const H5F_t *f)
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_cache_image_pending() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_create
*
@@ -284,7 +284,7 @@ herr_t
H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr, H5AC_cache_image_config_t * image_config_ptr)
{
#ifdef H5_HAVE_PARALLEL
- char prefix[H5C__PREFIX_LEN] = "";
+ char prefix[H5C__PREFIX_LEN] = "";
H5AC_aux_t * aux_ptr = NULL;
#endif /* H5_HAVE_PARALLEL */
struct H5C_cache_image_ctl_t int_ci_config = H5C__DEFAULT_CACHE_IMAGE_CTL;
@@ -309,9 +309,9 @@ H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr, H5AC_cache_image_co
#ifdef H5_HAVE_PARALLEL
if(H5F_HAS_FEATURE(f, H5FD_FEAT_HAS_MPI)) {
- MPI_Comm mpi_comm;
- int mpi_rank;
- int mpi_size;
+ MPI_Comm mpi_comm;
+ int mpi_rank;
+ int mpi_size;
if(MPI_COMM_NULL == (mpi_comm = H5F_mpi_get_comm(f)))
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get MPI communicator")
@@ -349,7 +349,7 @@ H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr, H5AC_cache_image_co
aux_ptr->sync_point_done = NULL;
aux_ptr->p0_image_len = 0;
- sprintf(prefix, "%d:", mpi_rank);
+ HDsprintf(prefix, "%d:", mpi_rank);
if(mpi_rank == 0) {
if(NULL == (aux_ptr->d_slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL)))
@@ -400,7 +400,7 @@ H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr, H5AC_cache_image_co
#endif /* H5_HAVE_PARALLEL */
if(NULL == f->shared->cache)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed")
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed")
#ifdef H5_HAVE_PARALLEL
if(aux_ptr != NULL)
@@ -421,8 +421,8 @@ H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr, H5AC_cache_image_co
HGOTO_ERROR(H5E_CACHE, H5E_CANTSET, FAIL, "auto resize configuration failed")
/* Don't need to get the current H5C image config here since the
- * cache has just been created, and thus f->shared->cache->image_ctl
- * must still set to its initial value (H5C__DEFAULT_CACHE_IMAGE_CTL).
+ * cache has just been created, and thus f->shared->cache->image_ctl
+ * must still set to its initial value (H5C__DEFAULT_CACHE_IMAGE_CTL).
* Note that this not true as soon as control returns to the application
* program, as some test code modifies f->shared->cache->image_ctl.
*/
@@ -458,7 +458,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_create() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_dest
*
@@ -517,10 +517,10 @@ H5AC_dest(H5F_t *f)
/* Sanity check */
HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
- /* If the file was opened R/W, attempt to flush all entries
+ /* If the file was opened R/W, attempt to flush all entries
* from rank 0 & Bcast clean list to other ranks.
*
- * Must not flush in the R/O case, as this will trigger the
+ * Must not flush in the R/O case, as this will trigger the
* free space manager settle routines.
*/
if(H5F_ACC_RDWR & H5F_INTENT(f))
@@ -556,17 +556,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_dest() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_evict
*
* Purpose: Evict all entries except the pinned entries
- * in the cache.
+ * in the cache.
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Vailin Choi
- * Dec 2013
+ * Dec 2013
*
*-------------------------------------------------------------------------
*/
@@ -596,13 +596,13 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_evict() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_expunge_entry
*
- * Purpose: Expunge the target entry from the cache without writing it
- * to disk even if it is dirty. The entry must not be either
- * pinned or protected.
+ * Purpose: Expunge the target entry from the cache without writing it
+ * to disk even if it is dirty. The entry must not be either
+ * pinned or protected.
*
* Return: Non-negative on success/Negative on failure
*
@@ -639,17 +639,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_expunge_entry() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_flush
*
- * Purpose: Flush (and possibly destroy) the metadata cache associated
- * with the specified file.
+ * Purpose: Flush (and possibly destroy) the metadata cache associated
+ * with the specified file.
*
- * If the cache contains protected entries, the function will
- * fail, as protected entries cannot be flushed. However
- * all unprotected entries should be flushed before the
- * function returns failure.
+ * If the cache contains protected entries, the function will
+ * fail, as protected entries cannot be flushed. However
+ * all unprotected entries should be flushed before the
+ * function returns failure.
*
* Return: Non-negative on success/Negative on failure if there was a
* request to flush all items and something was protected.
@@ -696,18 +696,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_flush() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_force_cache_image_load()
*
- * Purpose: On rare occasions, it is necessary to run
+ * Purpose: On rare occasions, it is necessary to run
* H5MF_tidy_self_referential_fsm_hack() prior to the first
- * metadata cache access. This is a problem as if there is a
- * cache image at the end of the file, that routine will
+ * metadata cache access. This is a problem as if there is a
+ * cache image at the end of the file, that routine will
* discard it.
*
* We solve this issue by calling this function, which will
- * load the cache image and then call
+ * load the cache image and then call
* H5MF_tidy_self_referential_fsm_hack() to discard it.
*
* Return: SUCCEED on success, and FAIL on failure.
@@ -736,20 +736,20 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_force_cache_image_load() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_get_entry_status
*
* Purpose: Given a file address, determine whether the metadata
- * cache contains an entry at that location. If it does,
- * also determine whether the entry is dirty, protected,
- * pinned, etc. and return that information to the caller
- * in *status.
+ * cache contains an entry at that location. If it does,
+ * also determine whether the entry is dirty, protected,
+ * pinned, etc. and return that information to the caller
+ * in *status.
*
- * If the specified entry doesn't exist, set *status_ptr
- * to zero.
+ * If the specified entry doesn't exist, set *status_ptr
+ * to zero.
*
- * On error, the value of *status is undefined.
+ * On error, the value of *status is undefined.
*
* Return: Non-negative on success/Negative on failure
*
@@ -761,14 +761,14 @@ done:
herr_t
H5AC_get_entry_status(const H5F_t *f, haddr_t addr, unsigned *status)
{
- hbool_t in_cache; /* Entry @ addr is in the cache */
- hbool_t is_dirty; /* Entry @ addr is in the cache and dirty */
- hbool_t is_protected; /* Entry @ addr is in the cache and protected */
- hbool_t is_pinned; /* Entry @ addr is in the cache and pinned */
- hbool_t is_corked;
- hbool_t is_flush_dep_child; /* Entry @ addr is in the cache and is a flush dependency child */
- hbool_t is_flush_dep_parent; /* Entry @ addr is in the cache and is a flush dependency parent */
- hbool_t image_is_up_to_date; /* Entry @ addr is in the cache and has an up to date image */
+ hbool_t in_cache; /* Entry @ addr is in the cache */
+ hbool_t is_dirty; /* Entry @ addr is in the cache and dirty */
+ hbool_t is_protected; /* Entry @ addr is in the cache and protected */
+ hbool_t is_pinned; /* Entry @ addr is in the cache and pinned */
+ hbool_t is_corked;
+ hbool_t is_flush_dep_child; /* Entry @ addr is in the cache and is a flush dependency child */
+ hbool_t is_flush_dep_parent; /* Entry @ addr is in the cache and is a flush dependency parent */
+ hbool_t image_is_up_to_date; /* Entry @ addr is in the cache and has an up to date image */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -781,21 +781,21 @@ H5AC_get_entry_status(const H5F_t *f, haddr_t addr, unsigned *status)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_get_entry_status() failed")
if(in_cache) {
- *status |= H5AC_ES__IN_CACHE;
- if(is_dirty)
- *status |= H5AC_ES__IS_DIRTY;
- if(is_protected)
- *status |= H5AC_ES__IS_PROTECTED;
- if(is_pinned)
- *status |= H5AC_ES__IS_PINNED;
- if(is_corked)
- *status |= H5AC_ES__IS_CORKED;
- if(is_flush_dep_parent)
- *status |= H5AC_ES__IS_FLUSH_DEP_PARENT;
- if(is_flush_dep_child)
- *status |= H5AC_ES__IS_FLUSH_DEP_CHILD;
- if(image_is_up_to_date)
- *status |= H5AC_ES__IMAGE_IS_UP_TO_DATE;
+ *status |= H5AC_ES__IN_CACHE;
+ if(is_dirty)
+ *status |= H5AC_ES__IS_DIRTY;
+ if(is_protected)
+ *status |= H5AC_ES__IS_PROTECTED;
+ if(is_pinned)
+ *status |= H5AC_ES__IS_PINNED;
+ if(is_corked)
+ *status |= H5AC_ES__IS_CORKED;
+ if(is_flush_dep_parent)
+ *status |= H5AC_ES__IS_FLUSH_DEP_PARENT;
+ if(is_flush_dep_child)
+ *status |= H5AC_ES__IS_FLUSH_DEP_CHILD;
+ if(image_is_up_to_date)
+ *status |= H5AC_ES__IMAGE_IS_UP_TO_DATE;
} /* end if */
else
*status = 0;
@@ -804,7 +804,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_get_entry_status() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_insert_entry
*
@@ -876,7 +876,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_insert_entry() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_load_cache_image_on_next_protect
*
@@ -911,12 +911,12 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_load_cache_image_on_next_protect() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_mark_entry_dirty
*
- * Purpose: Mark a pinned or protected entry as dirty. The target
- * entry MUST be either pinned, protected, or both.
+ * Purpose: Mark a pinned or protected entry as dirty. The target
+ * entry MUST be either pinned, protected, or both.
*
* Return: Non-negative on success/Negative on failure
*
@@ -965,12 +965,12 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_mark_entry_dirty() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_mark_entry_clean
*
- * Purpose: Mark a pinned entry as clean. The target
- * entry MUST be pinned.
+ * Purpose: Mark a pinned entry as clean. The target
+ * entry MUST be pinned.
*
* Return: Non-negative on success/Negative on failure
*
@@ -1018,12 +1018,12 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_mark_entry_clean() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_mark_entry_unserialized
*
- * Purpose: Mark a pinned or protected entry as unserialized. The target
- * entry MUST be either pinned, protected, or both.
+ * Purpose: Mark a pinned or protected entry as unserialized. The target
+ * entry MUST be either pinned, protected, or both.
*
* Return: Non-negative on success/Negative on failure
*
@@ -1060,12 +1060,12 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_mark_entry_unserialized() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_mark_entry_serialized
*
- * Purpose: Mark a pinned entry as serialized. The target
- * entry MUST be pinned.
+ * Purpose: Mark a pinned entry as serialized. The target
+ * entry MUST be pinned.
*
* Return: Non-negative on success/Negative on failure
*
@@ -1101,7 +1101,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_mark_entry_serialized() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_move_entry
*
@@ -1160,11 +1160,11 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_move_entry() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_pin_protected_entry()
*
- * Purpose: Pin a protected cache entry. The entry must be protected
+ * Purpose: Pin a protected cache entry. The entry must be protected
* at the time of call, and must be unpinned.
*
* Return: Non-negative on success/Negative on failure
@@ -1203,7 +1203,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_pin_protected_entry() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5AC_prep_for_file_close
@@ -1241,11 +1241,11 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_prep_for_file_close() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_create_flush_dependency()
*
- * Purpose: Create a flush dependency between two entries in the metadata
+ * Purpose: Create a flush dependency between two entries in the metadata
* cache.
*
* Return: Non-negative on success/Negative on failure
@@ -1285,21 +1285,21 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_create_flush_dependency() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_protect
*
* Purpose: If the target entry is not in the cache, load it. If
- * necessary, attempt to evict one or more entries to keep
- * the cache within its maximum size.
+ * necessary, attempt to evict one or more entries to keep
+ * the cache within its maximum size.
*
- * Mark the target entry as protected, and return its address
- * to the caller. The caller must call H5AC_unprotect() when
- * finished with the entry.
+ * Mark the target entry as protected, and return its address
+ * to the caller. The caller must call H5AC_unprotect() when
+ * finished with the entry.
*
- * While it is protected, the entry may not be either evicted
- * or flushed -- nor may it be accessed by another call to
- * H5AC_protect. Any attempt to do so will result in a failure.
+ * While it is protected, the entry may not be either evicted
+ * or flushed -- nor may it be accessed by another call to
+ * H5AC_protect. Any attempt to do so will result in a failure.
*
* Return: Success: Ptr to the object.
* Failure: NULL
@@ -1341,7 +1341,7 @@ H5AC_protect(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *udata,
/* Check for invalid access request */
if((0 == (H5F_INTENT(f) & H5F_ACC_RDWR)) && (0 == (flags & H5C__READ_ONLY_FLAG)))
- HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, "no write intent on file")
+ HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, "no write intent on file")
#if H5AC_DO_TAGGING_SANITY_CHECKS
if(!H5C_get_ignore_tags(f->shared->cache) && H5AC__verify_tag(type) < 0)
@@ -1367,11 +1367,11 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_protect() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_resize_entry
*
- * Purpose: Resize a pinned or protected entry.
+ * Purpose: Resize a pinned or protected entry.
*
* Return: Non-negative on success/Negative on failure
*
@@ -1420,12 +1420,12 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_resize_entry() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_unpin_entry()
*
- * Purpose: Unpin a cache entry. The entry must be unprotected at
- * the time of call, and must be pinned.
+ * Purpose: Unpin a cache entry. The entry must be unprotected at
+ * the time of call, and must be pinned.
*
* Return: Non-negative on success/Negative on failure
*
@@ -1463,11 +1463,11 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_unpin_entry() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_destroy_flush_dependency()
*
- * Purpose: Destroy a flush dependency between two entries.
+ * Purpose: Destroy a flush dependency between two entries.
*
* Return: Non-negative on success/Negative on failure
*
@@ -1506,31 +1506,31 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_destroy_flush_dependency() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_unprotect
*
- * Purpose: Undo an H5AC_protect() call -- specifically, mark the
- * entry as unprotected, remove it from the protected list,
- * and give it back to the replacement policy.
+ * Purpose: Undo an H5AC_protect() call -- specifically, mark the
+ * entry as unprotected, remove it from the protected list,
+ * and give it back to the replacement policy.
*
- * The TYPE and ADDR arguments must be the same as those in
- * the corresponding call to H5AC_protect() and the THING
- * argument must be the value returned by that call to
- * H5AC_protect().
+ * The TYPE and ADDR arguments must be the same as those in
+ * the corresponding call to H5AC_protect() and the THING
+ * argument must be the value returned by that call to
+ * H5AC_protect().
*
- * If the deleted flag is TRUE, simply remove the target entry
- * from the cache, clear it, and free it without writing it to
- * disk.
+ * If the deleted flag is TRUE, simply remove the target entry
+ * from the cache, clear it, and free it without writing it to
+ * disk.
*
- * This version of the function is a complete re-write to
- * use the new metadata cache. While there isn't all that
- * much difference between the old and new Purpose sections,
- * the original version is given below.
+ * This version of the function is a complete re-write to
+ * use the new metadata cache. While there isn't all that
+ * much difference between the old and new Purpose sections,
+ * the original version is given below.
*
- * Original purpose section:
+ * Original purpose section:
*
- * This function should be called to undo the effect of
+ * This function should be called to undo the effect of
* H5AC_protect(). The TYPE and ADDR arguments should be the
* same as the corresponding call to H5AC_protect() and the
* THING argument should be the value returned by H5AC_protect().
@@ -1549,8 +1549,8 @@ herr_t
H5AC_unprotect(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *thing,
unsigned flags)
{
- hbool_t dirtied;
- hbool_t deleted;
+ hbool_t dirtied;
+ hbool_t deleted;
#ifdef H5_HAVE_PARALLEL
H5AC_aux_t * aux_ptr = NULL;
#endif /* H5_HAVE_PARALLEL */
@@ -1571,14 +1571,14 @@ H5AC_unprotect(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *thing,
HDassert( ((H5AC_info_t *)thing)->type == type );
dirtied = (hbool_t)(((flags & H5AC__DIRTIED_FLAG) == H5AC__DIRTIED_FLAG) ||
- (((H5AC_info_t *)thing)->dirtied));
+ (((H5AC_info_t *)thing)->dirtied));
deleted = (hbool_t)((flags & H5C__DELETED_FLAG) == H5C__DELETED_FLAG);
/* Check if the size changed out from underneath us, if we're not deleting
* the entry.
*/
if(dirtied && !deleted) {
- size_t curr_size = 0;
+ size_t curr_size = 0;
if((type->image_len)(thing, &curr_size) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTGETSIZE, FAIL, "Can't get size of thing")
@@ -1618,7 +1618,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_unprotect() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_get_cache_auto_resize_config
*
@@ -1665,7 +1665,7 @@ H5AC_get_cache_auto_resize_config(const H5AC_t *cache_ptr,
if(internal_config.rpt_fcn == NULL)
config_ptr->rpt_fcn_enabled = FALSE;
else
- config_ptr->rpt_fcn_enabled = TRUE;
+ config_ptr->rpt_fcn_enabled = TRUE;
config_ptr->open_trace_file = FALSE;
config_ptr->close_trace_file = FALSE;
config_ptr->trace_file_name[0] = '\0';
@@ -1698,12 +1698,12 @@ H5AC_get_cache_auto_resize_config(const H5AC_t *cache_ptr,
if(NULL != (aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr))) {
config_ptr->dirty_bytes_threshold = aux_ptr->dirty_bytes_threshold;
- config_ptr->metadata_write_strategy = aux_ptr->metadata_write_strategy;
+ config_ptr->metadata_write_strategy = aux_ptr->metadata_write_strategy;
} /* end if */
else {
#endif /* H5_HAVE_PARALLEL */
config_ptr->dirty_bytes_threshold = H5AC__DEFAULT_DIRTY_BYTES_THRESHOLD;
- config_ptr->metadata_write_strategy = H5AC__DEFAULT_METADATA_WRITE_STRATEGY;
+ config_ptr->metadata_write_strategy = H5AC__DEFAULT_METADATA_WRITE_STRATEGY;
#ifdef H5_HAVE_PARALLEL
} /* end else */
}
@@ -1713,7 +1713,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_get_cache_auto_resize_config() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_get_cache_size
*
@@ -1742,7 +1742,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_get_cache_size() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_get_cache_hit_rate
*
@@ -1769,7 +1769,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_get_cache_hit_rate() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5AC_reset_cache_hit_rate_stats()
@@ -1796,7 +1796,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_reset_cache_hit_rate_stats() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_set_cache_auto_resize_config
*
@@ -1813,7 +1813,7 @@ herr_t
H5AC_set_cache_auto_resize_config(H5AC_t *cache_ptr, H5AC_cache_config_t *config_ptr)
{
H5C_auto_size_ctl_t internal_config;
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1888,21 +1888,21 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_set_cache_auto_resize_config() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_validate_config()
*
* Purpose: Run a sanity check on the contents of the supplied
- * instance of H5AC_cache_config_t.
+ * instance of H5AC_cache_config_t.
*
* Do nothing and return SUCCEED if no errors are detected,
* and flag an error and return FAIL otherwise.
*
- * At present, this function operates by packing the data
- * from the instance of H5AC_cache_config_t into an instance
- * of H5C_auto_size_ctl_t, and then calling
- * H5C_validate_resize_config(). As H5AC_cache_config_t and
- * H5C_auto_size_ctl_t diverge, we may have to change this.
+ * At present, this function operates by packing the data
+ * from the instance of H5AC_cache_config_t into an instance
+ * of H5C_auto_size_ctl_t, and then calling
+ * H5C_validate_resize_config(). As H5AC_cache_config_t and
+ * H5C_auto_size_ctl_t diverge, we may have to change this.
*
* Return: Non-negative on success/Negative on failure
*
@@ -1927,7 +1927,7 @@ H5AC_validate_config(H5AC_cache_config_t *config_ptr)
/* don't bother to test trace_file_name unless open_trace_file is TRUE */
if(config_ptr->open_trace_file) {
- size_t name_len;
+ size_t name_len;
/* Can't really test the trace_file_name field without trying to
* open the file, so we will content ourselves with a couple of
@@ -1965,22 +1965,22 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_validate_config() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_validate_cache_image_config()
*
* Purpose: Run a sanity check on the contents of the supplied
- * instance of H5AC_cache_image_config_t.
+ * instance of H5AC_cache_image_config_t.
*
* Do nothing and return SUCCEED if no errors are detected,
* and flag an error and return FAIL otherwise.
*
- * At present, this function operates by packing the data
- * from the instance of H5AC_cache_image_config_t into an
- * instance of H5C_cache_image_ctl_t, and then calling
- * H5C_validate_cache_image_config(). If and when
- * H5AC_cache_image_config_t and H5C_cache_image_ctl_t
- * diverge, we may have to change this.
+ * At present, this function operates by packing the data
+ * from the instance of H5AC_cache_image_config_t into an
+ * instance of H5C_cache_image_ctl_t, and then calling
+ * H5C_validate_cache_image_config(). If and when
+ * H5AC_cache_image_config_t and H5C_cache_image_ctl_t
+ * diverge, we may have to change this.
*
* Return: Non-negative on success/Negative on failure
*
@@ -2005,7 +2005,7 @@ H5AC_validate_cache_image_config(H5AC_cache_image_config_t *config_ptr)
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Unknown image config version")
/* don't need to get the current H5C image config here since the
- * default values of fields not in the H5AC config will always be
+ * default values of fields not in the H5AC config will always be
* valid.
*/
internal_config.version = config_ptr->version;
@@ -2020,19 +2020,19 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_validate_cache_image_config() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5AC__check_if_write_permitted
*
* Purpose: Determine if a write is permitted under the current
- * circumstances, and set *write_permitted_ptr accordingly.
- * As a general rule it is, but when we are running in parallel
- * mode with collective I/O, we must ensure that a read cannot
- * cause a write.
+ * circumstances, and set *write_permitted_ptr accordingly.
+ * As a general rule it is, but when we are running in parallel
+ * mode with collective I/O, we must ensure that a read cannot
+ * cause a write.
*
- * In the event of failure, the value of *write_permitted_ptr
- * is undefined.
+ * In the event of failure, the value of *write_permitted_ptr
+ * is undefined.
*
* Return: Non-negative on success/Negative on failure.
*
@@ -2048,9 +2048,9 @@ H5_ATTR_UNUSED
*f, hbool_t *write_permitted_ptr)
{
#ifdef H5_HAVE_PARALLEL
- H5AC_aux_t * aux_ptr = NULL;
+ H5AC_aux_t * aux_ptr = NULL;
#endif /* H5_HAVE_PARALLEL */
- hbool_t write_permitted = TRUE;
+ hbool_t write_permitted = TRUE;
FUNC_ENTER_STATIC_NOERR
@@ -2064,9 +2064,9 @@ H5_ATTR_UNUSED
HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
if((aux_ptr->mpi_rank == 0) || (aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED))
- write_permitted = aux_ptr->write_permitted;
+ write_permitted = aux_ptr->write_permitted;
else
- write_permitted = FALSE;
+ write_permitted = FALSE;
} /* end if */
#endif /* H5_HAVE_PARALLEL */
@@ -2075,17 +2075,17 @@ H5_ATTR_UNUSED
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5AC__check_if_write_permitted() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC__ext_config_2_int_config()
*
* Purpose: Utility function to translate an instance of
- * H5AC_cache_config_t to an instance of H5C_auto_size_ctl_t.
+ * H5AC_cache_config_t to an instance of H5C_auto_size_ctl_t.
*
- * Places translation in *int_conf_ptr and returns SUCCEED
- * if successful. Returns FAIL on failure.
+ * Places translation in *int_conf_ptr and returns SUCCEED
+ * if successful. Returns FAIL on failure.
*
- * Does only minimal sanity checking.
+ * Does only minimal sanity checking.
*
* Return: Non-negative on success/Negative on failure
*
@@ -2141,15 +2141,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC__ext_config_2_int_config() */
-
+
/*------------------------------------------------------------------------------
* Function: H5AC_ignore_tags()
*
- * Purpose: Override all assertion frameworks and force application of
+ * Purpose: Override all assertion frameworks and force application of
* global tag everywhere. This should really only be used in the
- * tests that need to access functions without going through
+ * tests that need to access functions without going through
* API paths.
- *
+ *
* Return: SUCCEED on success, FAIL otherwise.
*
* Programmer: Mike McGreevy
@@ -2172,17 +2172,17 @@ H5AC_ignore_tags(const H5F_t *f)
/* Set up a new metadata tag */
if(H5C_ignore_tags(f->shared->cache) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTSET, FAIL, "H5C_ignore_tags() failed")
-
+
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_ignore_tags() */
-
+
/*------------------------------------------------------------------------------
* Function: H5AC_tag()
*
* Purpose: Sets the metadata tag property in the provided property list.
- *
+ *
* Return: SUCCEED on success, FAIL otherwise.
*
* Programmer: Mike McGreevy
@@ -2205,14 +2205,14 @@ H5AC_tag(haddr_t metadata_tag, haddr_t *prev_tag)
FUNC_LEAVE_NOAPI_VOID
} /* H5AC_tag */
-
+
/*------------------------------------------------------------------------------
* Function: H5AC_retag_copied_metadata()
*
* Purpose: Searches through cache index for all entries with the
- * H5AC__COPIED_TAG, indicating that it was created as a
+ * H5AC__COPIED_TAG, indicating that it was created as a
* result of an object copy, and applies the provided tag.
- *
+ *
* Return: SUCCEED on success, FAIL otherwise.
*
* Programmer: Mike McGreevy
@@ -2221,7 +2221,7 @@ H5AC_tag(haddr_t metadata_tag, haddr_t *prev_tag)
*------------------------------------------------------------------------------
*/
herr_t
-H5AC_retag_copied_metadata(const H5F_t *f, haddr_t metadata_tag)
+H5AC_retag_copied_metadata(const H5F_t *f, haddr_t metadata_tag)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -2230,7 +2230,7 @@ H5AC_retag_copied_metadata(const H5F_t *f, haddr_t metadata_tag)
/* Sanity checks */
HDassert(f);
HDassert(f->shared);
-
+
/* Call cache-level function to re-tag entries with the COPIED tag */
if(H5C_retag_entries(f->shared->cache, H5AC__COPIED_TAG, metadata_tag) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTSET, FAIL, "Can't retag metadata")
@@ -2239,13 +2239,13 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_retag_copied_metadata() */
-
+
/*------------------------------------------------------------------------------
* Function: H5AC_flush_tagged_metadata()
*
* Purpose: Wrapper for cache level function which flushes all metadata
- * that contains the specific tag.
- *
+ * that contains the specific tag.
+ *
* Return: SUCCEED on success, FAIL otherwise.
*
* Programmer: Mike McGreevy
@@ -2258,8 +2258,8 @@ H5AC_flush_tagged_metadata(H5F_t *f, haddr_t metadata_tag)
{
/* Variable Declarations */
herr_t ret_value = SUCCEED;
-
- /* Function Enter Macro */
+
+ /* Function Enter Macro */
FUNC_ENTER_NOAPI(FAIL)
/* Assertions */
@@ -2274,13 +2274,13 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_flush_tagged_metadata */
-
+
/*------------------------------------------------------------------------------
* Function: H5AC_evict_tagged_metadata()
*
* Purpose: Wrapper for cache level function which flushes all metadata
- * that contains the specific tag.
- *
+ * that contains the specific tag.
+ *
* Return: SUCCEED on success, FAIL otherwise.
*
* Programmer: Mike McGreevy
@@ -2293,8 +2293,8 @@ H5AC_evict_tagged_metadata(H5F_t *f, haddr_t metadata_tag, hbool_t match_global)
{
/* Variable Declarations */
herr_t ret_value = SUCCEED;
-
- /* Function Enter Macro */
+
+ /* Function Enter Macro */
FUNC_ENTER_NOAPI(FAIL)
/* Assertions */
@@ -2309,13 +2309,13 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_evict_tagged_metadata() */
-
+
/*------------------------------------------------------------------------------
* Function: H5AC_expunge_tag_type_metadata()
*
* Purpose: Wrapper for cache level function which expunge entries with
* a specific tag and type id.
- *
+ *
* Return: SUCCEED on success, FAIL otherwise.
*
* Programmer: Vailin Choi; May 2016
@@ -2327,8 +2327,8 @@ H5AC_expunge_tag_type_metadata(H5F_t *f, haddr_t tag, int type_id, unsigned flag
{
/* Variable Declarations */
herr_t ret_value = SUCCEED;
-
- /* Function Enter Macro */
+
+ /* Function Enter Macro */
FUNC_ENTER_NOAPI(FAIL)
/* Assertions */
@@ -2343,12 +2343,12 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_expunge_tag_type_metadata*/
-
+
/*------------------------------------------------------------------------------
* Function: H5AC_get_tag()
*
* Purpose: Get the tag for a metadata cache entry.
- *
+ *
* Return: SUCCEED/FAIL
*
* Programmer: Dana Robinson
@@ -2361,8 +2361,8 @@ H5AC_get_tag(const void *thing, haddr_t *tag)
{
/* Variable Declarations */
herr_t ret_value = SUCCEED;
-
- /* Function Enter Macro */
+
+ /* Function Enter Macro */
FUNC_ENTER_NOAPI(FAIL)
/* Assertions */
@@ -2377,7 +2377,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5AC_get_tag() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_cork
*
@@ -2424,7 +2424,7 @@ done:
} /* H5AC_cork() */
#if H5AC_DO_TAGGING_SANITY_CHECKS
-
+
/*-------------------------------------------------------------------------
*
* Function: H5AC__verify_tag
@@ -2459,14 +2459,14 @@ done:
} /* H5AC__verify_tag */
#endif /* H5AC_DO_TAGGING_SANITY_CHECKS */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_get_entry_ring
*
* Purpose: Given a file address, retrieve the ring for an entry at that
* address.
*
- * On error, the value of *ring is not modified.
+ * On error, the value of *ring is not modified.
*
* Return: Non-negative on success/Negative on failure
*
@@ -2495,15 +2495,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_get_entry_ring() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_set_ring
*
* Purpose: Routine to set the ring on a DXPL (for passing through
* to the metadata cache).
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
* Programmer: Quincey Koziol
* Tuesday, September 8, 2015
@@ -2525,7 +2525,7 @@ H5AC_set_ring(H5AC_ring_t ring, H5AC_ring_t *orig_ring)
FUNC_LEAVE_NOAPI_VOID
} /* end H5AC_set_ring() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_unsettle_entry_ring()
*
@@ -2543,11 +2543,11 @@ H5AC_set_ring(H5AC_ring_t ring, H5AC_ring_t *orig_ring)
* are in the process of a file shutdown, post an error
* message, and return FAIL.
*
- * Note that this function simply passes the call on to
- * the metadata cache proper, and returns the result.
+ * Note that this function simply passes the call on to
+ * the metadata cache proper, and returns the result.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
* Programmer: Quincey Koziol
* September 17, 2016
@@ -2573,7 +2573,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_unsettle_entry_ring() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_unsettle_ring()
*
@@ -2615,12 +2615,12 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_unsettle_ring() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_remove_entry()
*
* Purpose: Remove an entry from the cache. Must be not protected, pinned,
- * dirty, involved in flush dependencies, etc.
+ * dirty, involved in flush dependencies, etc.
*
* Return: Non-negative on success/Negative on failure
*
@@ -2656,7 +2656,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_remove_entry() */
-
+
/*-------------------------------------------------------------------------
* Function: H5AC_get_mdc_image_info
*
diff --git a/src/H5B.c b/src/H5B.c
index 53d5529..16772a8 100644
--- a/src/H5B.c
+++ b/src/H5B.c
@@ -13,79 +13,79 @@
/*-------------------------------------------------------------------------
*
- * Created: H5B.c
- * Jul 10 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Created: H5B.c
+ * Jul 10 1997
+ * Robb Matzke <matzke@llnl.gov>
*
- * Purpose: Implements balanced, sibling-linked, N-ary trees
- * capable of storing any type of data with unique key
- * values.
+ * Purpose: Implements balanced, sibling-linked, N-ary trees
+ * capable of storing any type of data with unique key
+ * values.
*
- * A B-link-tree is a balanced tree where each node has
- * a pointer to its left and right siblings. A
- * B-link-tree is a rooted tree having the following
- * properties:
+ * A B-link-tree is a balanced tree where each node has
+ * a pointer to its left and right siblings. A
+ * B-link-tree is a rooted tree having the following
+ * properties:
*
- * 1. Every node, x, has the following fields:
+ * 1. Every node, x, has the following fields:
*
- * a. level[x], the level in the tree at which node
- * x appears. Leaf nodes are at level zero.
+ * a. level[x], the level in the tree at which node
+ * x appears. Leaf nodes are at level zero.
*
- * b. n[x], the number of children pointed to by the
- * node. Internal nodes point to subtrees while
- * leaf nodes point to arbitrary data.
+ * b. n[x], the number of children pointed to by the
+ * node. Internal nodes point to subtrees while
+ * leaf nodes point to arbitrary data.
*
- * c. The child pointers themselves, child[x,i] such
- * that 0 <= i < n[x].
+ * c. The child pointers themselves, child[x,i] such
+ * that 0 <= i < n[x].
*
- * d. n[x]+1 key values stored in increasing
- * order:
+ * d. n[x]+1 key values stored in increasing
+ * order:
*
- * key[x,0] < key[x,1] < ... < key[x,n[x]].
+ * key[x,0] < key[x,1] < ... < key[x,n[x]].
*
- * e. left[x] is a pointer to the node's left sibling
- * or the null pointer if this is the left-most
- * node at this level in the tree.
+ * e. left[x] is a pointer to the node's left sibling
+ * or the null pointer if this is the left-most
+ * node at this level in the tree.
*
- * f. right[x] is a pointer to the node's right
- * sibling or the null pointer if this is the
- * right-most node at this level in the tree.
+ * f. right[x] is a pointer to the node's right
+ * sibling or the null pointer if this is the
+ * right-most node at this level in the tree.
*
- * 3. The keys key[x,i] partition the key spaces of the
- * children of x:
+ * 3. The keys key[x,i] partition the key spaces of the
+ * children of x:
*
- * key[x,i] <= key[child[x,i],j] <= key[x,i+1]
+ * key[x,i] <= key[child[x,i],j] <= key[x,i+1]
*
- * for any valid combination of i and j.
+ * for any valid combination of i and j.
*
- * 4. There are lower and upper bounds on the number of
- * child pointers a node can contain. These bounds
- * can be expressed in terms of a fixed integer k>=2
- * called the `minimum degree' of the B-tree.
+ * 4. There are lower and upper bounds on the number of
+ * child pointers a node can contain. These bounds
+ * can be expressed in terms of a fixed integer k>=2
+ * called the `minimum degree' of the B-tree.
*
- * a. Every node other than the root must have at least
- * k child pointers and k+1 keys. If the tree is
- * nonempty, the root must have at least one child
- * pointer and two keys.
+ * a. Every node other than the root must have at least
+ * k child pointers and k+1 keys. If the tree is
+ * nonempty, the root must have at least one child
+ * pointer and two keys.
*
- * b. Every node can contain at most 2k child pointers
- * and 2k+1 keys. A node is `full' if it contains
- * exactly 2k child pointers and 2k+1 keys.
+ * b. Every node can contain at most 2k child pointers
+ * and 2k+1 keys. A node is `full' if it contains
+ * exactly 2k child pointers and 2k+1 keys.
*
- * 5. When searching for a particular value, V, and
- * key[V] = key[x,i] for some node x and entry i,
- * then:
+ * 5. When searching for a particular value, V, and
+ * key[V] = key[x,i] for some node x and entry i,
+ * then:
*
- * a. If i=0 the child[0] is followed.
+ * a. If i=0 the child[0] is followed.
*
- * b. If i=n[x] the child[n[x]-1] is followed.
+ * b. If i=n[x] the child[n[x]-1] is followed.
*
- * c. Otherwise, the child that is followed
- * (either child[x,i-1] or child[x,i]) is
- * determined by the type of object to which the
- * leaf nodes of the tree point and is controlled
- * by the key comparison function registered for
- * that type of B-tree.
+ * c. Otherwise, the child that is followed
+ * (either child[x,i-1] or child[x,i]) is
+ * determined by the type of object to which the
+ * leaf nodes of the tree point and is controlled
+ * by the key comparison function registered for
+ * that type of B-tree.
*
*
*-------------------------------------------------------------------------
@@ -101,22 +101,22 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Bpkg.h" /* B-link trees */
+#include "H5private.h" /* Generic Functions */
+#include "H5Bpkg.h" /* B-link trees */
#include "H5CXprivate.h" /* API Contexts */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MFprivate.h" /* File memory management */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MFprivate.h" /* File memory management */
#include "H5Pprivate.h" /* Property lists */
/****************/
/* Local Macros */
/****************/
-#define H5B_SIZEOF_HDR(F) \
- (H5_SIZEOF_MAGIC + /*magic number */ \
- 4 + /*type, level, num entries */ \
- 2*H5F_SIZEOF_ADDR(F)) /*left and right sibling addresses */
+#define H5B_SIZEOF_HDR(F) \
+ (H5_SIZEOF_MAGIC + /*magic number */ \
+ 4 + /*type, level, num entries */ \
+ 2*H5F_SIZEOF_ADDR(F)) /*left and right sibling addresses */
/* Default initializer for H5B_ins_ud_t */
#define H5B_INS_UD_T_NULL {NULL, HADDR_UNDEF, H5AC__NO_FLAGS_SET}
@@ -149,7 +149,7 @@ static H5B_ins_t H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud,
H5B_ins_ud_t *split_bt_ud/*out*/);
static herr_t H5B__insert_child(H5B_t *bt, unsigned *bt_flags,
unsigned idx, haddr_t child,
- H5B_ins_t anchor, const void *md_key);
+ H5B_ins_t anchor, const void *md_key);
static herr_t H5B__split(H5F_t *f, H5B_ins_ud_t *bt_ud, unsigned idx,
void *udata, H5B_ins_ud_t *split_bt_ud/*out*/);
static H5B_t * H5B__copy(const H5B_t *old_bt);
@@ -191,31 +191,31 @@ H5FL_BLK_DEFINE_STATIC(page);
H5FL_SEQ_DEFINE_STATIC(size_t);
-
+
/*-------------------------------------------------------------------------
- * Function: H5B_create
+ * Function: H5B_create
*
- * Purpose: Creates a new empty B-tree leaf node. The UDATA pointer is
- * passed as an argument to the sizeof_rkey() method for the
- * B-tree.
+ * Purpose: Creates a new empty B-tree leaf node. The UDATA pointer is
+ * passed as an argument to the sizeof_rkey() method for the
+ * B-tree.
*
- * Return: Success: Non-negative, and the address of new node is
- * returned through the ADDR_P argument.
+ * Return: Success: Non-negative, and the address of new node is
+ * returned through the ADDR_P argument.
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jun 23 1997
+ * Programmer: Robb Matzke
+ * matzke@llnl.gov
+ * Jun 23 1997
*
*-------------------------------------------------------------------------
*/
herr_t
H5B_create(H5F_t *f, const H5B_class_t *type, void *udata, haddr_t *addr_p/*out*/)
{
- H5B_t *bt = NULL;
+ H5B_t *bt = NULL;
H5B_shared_t *shared=NULL; /* Pointer to shared B-tree info */
- herr_t ret_value = SUCCEED;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI(FAIL)
@@ -230,20 +230,20 @@ H5B_create(H5F_t *f, const H5B_class_t *type, void *udata, haddr_t *addr_p/*out*
* Allocate file and memory data structures.
*/
if(NULL == (bt = H5FL_MALLOC(H5B_t)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for B-tree root node")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for B-tree root node")
HDmemset(&bt->cache_info, 0, sizeof(H5AC_info_t));
bt->level = 0;
bt->left = HADDR_UNDEF;
bt->right = HADDR_UNDEF;
bt->nchildren = 0;
if(NULL == (bt->rc_shared = (type->get_shared)(f, udata)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree node buffer")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree node buffer")
H5UC_INC(bt->rc_shared);
shared=(H5B_shared_t *)H5UC_GET_OBJ(bt->rc_shared);
HDassert(shared);
if(NULL == (bt->native = H5FL_BLK_MALLOC(native_block, shared->sizeof_keys)) ||
NULL == (bt->child = H5FL_SEQ_MALLOC(haddr_t, (size_t)shared->two_k)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for B-tree root node")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for B-tree root node")
if(HADDR_UNDEF == (*addr_p = H5MF_alloc(f, H5FD_MEM_BTREE, (hsize_t)shared->sizeof_rnode)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "file allocation failed for B-tree root node")
@@ -251,7 +251,7 @@ H5B_create(H5F_t *f, const H5B_class_t *type, void *udata, haddr_t *addr_p/*out*
* Cache the new B-tree node.
*/
if(H5AC_insert_entry(f, H5AC_BT, *addr_p, bt, H5AC__NO_FLAGS_SET) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "can't add B-tree root node to cache")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "can't add B-tree root node to cache")
#ifdef H5B_DEBUG
H5B__assert(f, *addr_p, shared->type, udata);
#endif
@@ -262,7 +262,7 @@ done:
H5_CHECK_OVERFLOW(shared->sizeof_rnode,size_t,hsize_t);
(void)H5MF_xfree(f, H5FD_MEM_BTREE, *addr_p, (hsize_t)shared->sizeof_rnode);
} /* end if */
- if(bt)
+ if(bt)
/* Destroy B-tree node */
if(H5B__node_dest(bt) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree node")
@@ -271,40 +271,40 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_create() */ /*lint !e818 Can't make udata a pointer to const */
-
+
/*-------------------------------------------------------------------------
- * Function: H5B_find
+ * Function: H5B_find
*
- * Purpose: Locate the specified information in a B-tree and return
- * that information by filling in fields of the caller-supplied
- * UDATA pointer depending on the type of leaf node
- * requested. The UDATA can point to additional data passed
- * to the key comparison function.
+ * Purpose: Locate the specified information in a B-tree and return
+ * that information by filling in fields of the caller-supplied
+ * UDATA pointer depending on the type of leaf node
+ * requested. The UDATA can point to additional data passed
+ * to the key comparison function.
*
- * Note: This function does not follow the left/right sibling
- * pointers since it assumes that all nodes can be reached
- * from the parent node.
+ * Note: This function does not follow the left/right sibling
+ * pointers since it assumes that all nodes can be reached
+ * from the parent node.
*
- * Return: Non-negative (TRUE/FALSE) on success (if found, values returned
+ * Return: Non-negative (TRUE/FALSE) on success (if found, values returned
* through the UDATA argument). Negative on failure (if not found,
* UDATA is undefined).
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jun 23 1997
+ * Programmer: Robb Matzke
+ * matzke@llnl.gov
+ * Jun 23 1997
*
*-------------------------------------------------------------------------
*/
htri_t
H5B_find(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
{
- H5B_t *bt = NULL;
- H5UC_t *rc_shared; /* Ref-counted shared info */
+ H5B_t *bt = NULL;
+ H5UC_t *rc_shared; /* Ref-counted shared info */
H5B_shared_t *shared; /* Pointer to shared B-tree info */
H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
unsigned idx = 0, lt = 0, rt; /* Final, left & right key indices */
- int cmp = 1; /* Key comparison value */
- htri_t ret_value = FAIL; /* Return value */
+ int cmp = 1; /* Key comparison value */
+ htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -336,16 +336,16 @@ H5B_find(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
rt = bt->nchildren;
while(lt < rt && cmp) {
- idx = (lt + rt) / 2;
- /* compare */
- if((cmp = (type->cmp3)(H5B_NKEY(bt, shared, idx), udata, H5B_NKEY(bt, shared, (idx + 1)))) < 0)
- rt = idx;
- else
- lt = idx + 1;
+ idx = (lt + rt) / 2;
+ /* compare */
+ if((cmp = (type->cmp3)(H5B_NKEY(bt, shared, idx), udata, H5B_NKEY(bt, shared, (idx + 1)))) < 0)
+ rt = idx;
+ else
+ lt = idx + 1;
} /* end while */
/* Check if not found */
if(cmp)
- HGOTO_DONE(FALSE)
+ HGOTO_DONE(FALSE)
/*
* Follow the link to the subtree or to the data node.
@@ -353,41 +353,41 @@ H5B_find(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
HDassert(idx < bt->nchildren);
if(bt->level > 0) {
- if((ret_value = H5B_find(f, type, bt->child[idx], udata)) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "can't lookup key in subtree")
+ if((ret_value = H5B_find(f, type, bt->child[idx], udata)) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "can't lookup key in subtree")
} /* end if */
else {
- if((ret_value = (type->found)(f, bt->child[idx], H5B_NKEY(bt, shared, idx), udata)) < 0)
+ if((ret_value = (type->found)(f, bt->child[idx], H5B_NKEY(bt, shared, idx), udata)) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "can't lookup key in leaf node")
} /* end else */
done:
if(bt && H5AC_unprotect(f, H5AC_BT, addr, bt, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release node")
+ HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release node")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_find() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5B__split
+ * Function: H5B__split
*
- * Purpose: Split a single node into two nodes. The old node will
- * contain the left children and the new node will contain the
- * right children.
+ * Purpose: Split a single node into two nodes. The old node will
+ * contain the left children and the new node will contain the
+ * right children.
*
- * The UDATA pointer is passed to the sizeof_rkey() method but is
- * otherwise unused.
+ * The UDATA pointer is passed to the sizeof_rkey() method but is
+ * otherwise unused.
*
- * The BT_UD argument is a pointer to a protected B-tree
- * node.
+ * The BT_UD argument is a pointer to a protected B-tree
+ * node.
*
- * Return: Non-negative on success (The address of the new node is
+ * Return: Non-negative on success (The address of the new node is
* returned through the NEW_ADDR argument). Negative on failure.
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jul 3 1997
+ * Programmer: Robb Matzke
+ * matzke@llnl.gov
+ * Jul 3 1997
*
*-------------------------------------------------------------------------
*/
@@ -397,9 +397,9 @@ H5B__split(H5F_t *f, H5B_ins_ud_t *bt_ud, unsigned idx,
{
H5B_shared_t *shared; /* Pointer to shared B-tree info */
H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
- unsigned nleft, nright; /* Number of keys in left & right halves */
+ unsigned nleft, nright; /* Number of keys in left & right halves */
double split_ratios[3]; /* B-tree split ratios */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -426,18 +426,18 @@ H5B__split(H5F_t *f, H5B_ins_ud_t *bt_ud, unsigned idx,
#ifdef H5B_DEBUG
if(H5DEBUG(B)) {
- const char *side;
-
- if(!H5F_addr_defined(bt_ud->bt->left) && !H5F_addr_defined(bt_ud->bt->right))
- side = "ONLY";
- else if(!H5F_addr_defined(bt_ud->bt->right))
- side = "RIGHT";
- else if(!H5F_addr_defined(bt_ud->bt->left))
- side = "LEFT";
- else
- side = "MIDDLE";
- fprintf(H5DEBUG(B), "H5B__split: %3u {%5.3f,%5.3f,%5.3f} %6s",
- shared->two_k, split_ratios[0], split_ratios[1], split_ratios[2], side);
+ const char *side;
+
+ if(!H5F_addr_defined(bt_ud->bt->left) && !H5F_addr_defined(bt_ud->bt->right))
+ side = "ONLY";
+ else if(!H5F_addr_defined(bt_ud->bt->right))
+ side = "RIGHT";
+ else if(!H5F_addr_defined(bt_ud->bt->left))
+ side = "LEFT";
+ else
+ side = "MIDDLE";
+ HDfprintf(H5DEBUG(B), "H5B__split: %3u {%5.3f,%5.3f,%5.3f} %6s",
+ shared->two_k, split_ratios[0], split_ratios[1], split_ratios[2], side);
}
#endif
@@ -446,11 +446,11 @@ H5B__split(H5F_t *f, H5B_ins_ud_t *bt_ud, unsigned idx,
* and the new node.
*/
if(!H5F_addr_defined(bt_ud->bt->right))
- nleft = (unsigned)((double)shared->two_k * split_ratios[2]); /*right*/
+ nleft = (unsigned)((double)shared->two_k * split_ratios[2]); /*right*/
else if(!H5F_addr_defined(bt_ud->bt->left))
- nleft = (unsigned)((double)shared->two_k * split_ratios[0]); /*left*/
+ nleft = (unsigned)((double)shared->two_k * split_ratios[0]); /*left*/
else
- nleft = (unsigned)((double)shared->two_k * split_ratios[1]); /*middle*/
+ nleft = (unsigned)((double)shared->two_k * split_ratios[1]); /*middle*/
/*
* Keep the new child in the same node as the child that split. This can
@@ -458,25 +458,25 @@ H5B__split(H5F_t *f, H5B_ins_ud_t *bt_ud, unsigned idx,
* sequentially, but it simplifies stuff below.
*/
if(idx < nleft && nleft == shared->two_k)
- --nleft;
+ --nleft;
else if(idx >= nleft && 0 == nleft)
- nleft++;
+ nleft++;
nright = shared->two_k - nleft;
#ifdef H5B_DEBUG
if(H5DEBUG(B))
- fprintf(H5DEBUG(B), " split %3d/%-3d\n", nleft, nright);
+ HDfprintf(H5DEBUG(B), " split %3d/%-3d\n", nleft, nright);
#endif
/*
* Create the new B-tree node.
*/
if(H5B_create(f, shared->type, udata, &split_bt_ud->addr/*out*/) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to create B-tree")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to create B-tree")
cache_udata.f = f;
cache_udata.type = shared->type;
cache_udata.rc_shared = bt_ud->bt->rc_shared;
if(NULL == (split_bt_ud->bt = (H5B_t *)H5AC_protect(f, H5AC_BT, split_bt_ud->addr, &cache_udata, H5AC__NO_FLAGS_SET)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree")
split_bt_ud->bt->level = bt_ud->bt->level;
/*
@@ -485,8 +485,8 @@ H5B__split(H5F_t *f, H5B_ins_ud_t *bt_ud, unsigned idx,
split_bt_ud->cache_flags = H5AC__DIRTIED_FLAG;
HDmemcpy(split_bt_ud->bt->native,
- bt_ud->bt->native + nleft * shared->type->sizeof_nkey,
- (nright + 1) * shared->type->sizeof_nkey);
+ bt_ud->bt->native + nleft * shared->type->sizeof_nkey,
+ (nright + 1) * shared->type->sizeof_nkey);
HDmemcpy(split_bt_ud->bt->child,
&bt_ud->bt->child[nleft],
nright * sizeof(haddr_t));
@@ -532,17 +532,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B__split() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5B_insert
+ * Function: H5B_insert
*
- * Purpose: Adds a new item to the B-tree.
+ * Purpose: Adds a new item to the B-tree.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jun 23 1997
+ * Programmer: Robb Matzke
+ * matzke@llnl.gov
+ * Jun 23 1997
*
*-------------------------------------------------------------------------
*/
@@ -552,22 +552,22 @@ H5B_insert(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
/*
* These are defined this way to satisfy alignment constraints.
*/
- uint64_t _lt_key[128], _md_key[128], _rt_key[128];
- uint8_t *lt_key=(uint8_t*)_lt_key;
- uint8_t *md_key=(uint8_t*)_md_key;
- uint8_t *rt_key=(uint8_t*)_rt_key;
+ uint64_t _lt_key[128], _md_key[128], _rt_key[128];
+ uint8_t *lt_key=(uint8_t*)_lt_key;
+ uint8_t *md_key=(uint8_t*)_md_key;
+ uint8_t *rt_key=(uint8_t*)_rt_key;
- hbool_t lt_key_changed = FALSE, rt_key_changed = FALSE;
+ hbool_t lt_key_changed = FALSE, rt_key_changed = FALSE;
haddr_t old_root_addr = HADDR_UNDEF;
- unsigned level;
+ unsigned level;
H5B_ins_ud_t bt_ud = H5B_INS_UD_T_NULL; /* (Old) root node */
H5B_ins_ud_t split_bt_ud = H5B_INS_UD_T_NULL; /* Split B-tree node */
H5B_t *new_root_bt = NULL; /* New root node */
- H5UC_t *rc_shared; /* Ref-counted shared info */
+ H5UC_t *rc_shared; /* Ref-counted shared info */
H5B_shared_t *shared; /* Pointer to shared B-tree info */
H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
- H5B_ins_t my_ins = H5B_INS_ERROR;
- herr_t ret_value = SUCCEED;
+ H5B_ins_t my_ins = H5B_INS_ERROR;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI(FAIL)
@@ -595,7 +595,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 +612,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)
- HDmemcpy(lt_key, H5B_NKEY(bt_ud.bt,shared,0), type->sizeof_nkey);
+ HDmemcpy(lt_key, H5B_NKEY(bt_ud.bt,shared,0), type->sizeof_nkey);
if(!rt_key_changed)
- HDmemcpy(rt_key, H5B_NKEY(split_bt_ud.bt,shared,split_bt_ud.bt->nchildren), type->sizeof_nkey);
+ HDmemcpy(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 +623,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 +636,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 */
@@ -688,19 +688,19 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_insert() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5B__insert_child
+ * Function: H5B__insert_child
*
- * Purpose: Insert a child to the left or right of child[IDX] depending
- * on whether ANCHOR is H5B_INS_LEFT or H5B_INS_RIGHT. The BT
- * argument is a pointer to a protected B-tree node.
+ * Purpose: Insert a child to the left or right of child[IDX] depending
+ * on whether ANCHOR is H5B_INS_LEFT or H5B_INS_RIGHT. The BT
+ * argument is a pointer to a protected B-tree node.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jul 8 1997
+ * Programmer: Robb Matzke
+ * matzke@llnl.gov
+ * Jul 8 1997
*
*-------------------------------------------------------------------------
*/
@@ -761,35 +761,35 @@ H5B__insert_child(H5B_t *bt, unsigned *bt_flags, unsigned idx,
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5B_insert_child() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5B__insert_helper
+ * Function: H5B__insert_helper
*
- * Purpose: Inserts the item UDATA into the tree rooted at ADDR and having
- * the specified type.
+ * Purpose: Inserts the item UDATA into the tree rooted at ADDR and having
+ * the specified type.
*
- * On return, if LT_KEY_CHANGED is non-zero, then LT_KEY is
- * the new native left key. Similarly for RT_KEY_CHANGED
- * and RT_KEY.
+ * On return, if LT_KEY_CHANGED is non-zero, then LT_KEY is
+ * the new native left key. Similarly for RT_KEY_CHANGED
+ * and RT_KEY.
*
- * If the node splits, then MD_KEY contains the key that
- * was split between the two nodes (that is, the key that
- * appears as the max key in the left node and the min key
- * in the right node).
+ * If the node splits, then MD_KEY contains the key that
+ * was split between the two nodes (that is, the key that
+ * appears as the max key in the left node and the min key
+ * in the right node).
*
- * Return: Success: A B-tree operation. The address of the new
- * node, if the node splits, is returned through
- * the NEW_NODE_P argument. The new node is always
- * to the right of the previous node. This
- * function is called recursively and the return
- * value influences the behavior of the caller.
- * See also, declaration of H5B_ins_t.
+ * Return: Success: A B-tree operation. The address of the new
+ * node, if the node splits, is returned through
+ * the NEW_NODE_P argument. The new node is always
+ * to the right of the previous node. This
+ * function is called recursively and the return
+ * value influences the behavior of the caller.
+ * See also, declaration of H5B_ins_t.
*
- * Failure: H5B_INS_ERROR
+ * Failure: H5B_INS_ERROR
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jul 9 1997
+ * Programmer: Robb Matzke
+ * matzke@llnl.gov
+ * Jul 9 1997
*
*-------------------------------------------------------------------------
*/
@@ -799,15 +799,15 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type,
uint8_t *rt_key, hbool_t *rt_key_changed, H5B_ins_ud_t *split_bt_ud/*out*/)
{
H5B_t *bt; /* Convenience pointer to B-tree */
- H5UC_t *rc_shared; /* Ref-counted shared info */
+ H5UC_t *rc_shared; /* Ref-counted shared info */
H5B_shared_t *shared; /* Pointer to shared B-tree info */
H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
- unsigned lt = 0, idx = 0, rt; /* Left, final & right index values */
+ unsigned lt = 0, idx = 0, rt; /* Left, final & right index values */
int cmp = -1; /* Key comparison value */
H5B_ins_ud_t child_bt_ud = H5B_INS_UD_T_NULL; /* Child B-tree */
H5B_ins_ud_t new_child_bt_ud = H5B_INS_UD_T_NULL; /* Newly split child B-tree */
- H5B_ins_t my_ins = H5B_INS_ERROR;
- H5B_ins_t ret_value = H5B_INS_ERROR; /* Return value */
+ H5B_ins_t my_ins = H5B_INS_ERROR;
+ H5B_ins_t ret_value = H5B_INS_ERROR; /* Return value */
FUNC_ENTER_STATIC
@@ -838,7 +838,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);
@@ -850,11 +850,11 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type,
rt = bt->nchildren;
while(lt < rt && cmp) {
- idx = (lt + rt) / 2;
- if((cmp = (type->cmp3)(H5B_NKEY(bt, shared, idx), udata, H5B_NKEY(bt, shared, idx + 1))) < 0)
- rt = idx;
- else
- lt = idx + 1;
+ idx = (lt + rt) / 2;
+ if((cmp = (type->cmp3)(H5B_NKEY(bt, shared, idx), udata, H5B_NKEY(bt, shared, idx + 1))) < 0)
+ rt = idx;
+ else
+ lt = idx + 1;
} /* end while */
/* Set up user data for cache callbacks */
@@ -863,26 +863,26 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type,
cache_udata.rc_shared = rc_shared;
if(0 == bt->nchildren) {
- /*
- * The value being inserted will be the only value in this tree. We
- * must necessarily be at level zero.
- */
- HDassert(0 == bt->level);
- if((type->new_node)(f, H5B_INS_FIRST, H5B_NKEY(bt, shared, 0), udata,
- H5B_NKEY(bt, shared, 1), bt->child + 0/*out*/) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, H5B_INS_ERROR, "unable to create leaf node")
- bt->nchildren = 1;
+ /*
+ * The value being inserted will be the only value in this tree. We
+ * must necessarily be at level zero.
+ */
+ HDassert(0 == bt->level);
+ if((type->new_node)(f, H5B_INS_FIRST, H5B_NKEY(bt, shared, 0), udata,
+ H5B_NKEY(bt, shared, 1), bt->child + 0/*out*/) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, H5B_INS_ERROR, "unable to create leaf node")
+ bt->nchildren = 1;
bt_ud->cache_flags |= H5AC__DIRTIED_FLAG;
- idx = 0;
+ idx = 0;
- if(type->follow_min) {
- if((int)(my_ins = (type->insert)(f, bt->child[idx], H5B_NKEY(bt, shared, idx),
+ if(type->follow_min) {
+ if((int)(my_ins = (type->insert)(f, bt->child[idx], H5B_NKEY(bt, shared, idx),
lt_key_changed, md_key, udata, H5B_NKEY(bt, shared, idx + 1),
rt_key_changed, &new_child_bt_ud.addr/*out*/)) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "unable to insert first leaf node")
- } /* end if */
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "unable to insert first leaf node")
+ } /* end if */
else
- my_ins = H5B_INS_NOOP;
+ my_ins = H5B_INS_NOOP;
} else if(cmp < 0 && idx == 0) {
if(bt->level > 0) {
/*
@@ -977,36 +977,36 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type,
HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "internal error: likely corrupt key values")
#endif /* H5_STRICT_FORMAT_CHECKS */
} else if(cmp) {
- /*
- * We couldn't figure out which branch to follow out of this node. THIS
- * IS A MAJOR PROBLEM THAT NEEDS TO BE FIXED --rpm.
- */
- HDassert("INTERNAL HDF5 ERROR (contact rpm)" && 0);
+ /*
+ * We couldn't figure out which branch to follow out of this node. THIS
+ * IS A MAJOR PROBLEM THAT NEEDS TO BE FIXED --rpm.
+ */
+ HDassert("INTERNAL HDF5 ERROR (contact rpm)" && 0);
#ifdef NDEBUG
- HDabort();
+ HDabort();
#endif /* NDEBUG */
} else if(bt->level > 0) {
- /*
- * Follow a branch out of this node to another subtree.
- */
- HDassert(idx < bt->nchildren);
- child_bt_ud.addr = bt->child[idx];
+ /*
+ * Follow a branch out of this node to another subtree.
+ */
+ HDassert(idx < bt->nchildren);
+ child_bt_ud.addr = bt->child[idx];
if(NULL == (child_bt_ud.bt = (H5B_t *)H5AC_protect(f, H5AC_BT, child_bt_ud.addr, &cache_udata, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to load node")
- if((int)(my_ins = H5B__insert_helper(f, &child_bt_ud, type,
+ if((int)(my_ins = H5B__insert_helper(f, &child_bt_ud, type,
H5B_NKEY(bt, shared, idx), lt_key_changed, md_key, udata,
H5B_NKEY(bt, shared, idx + 1), rt_key_changed, &new_child_bt_ud/*out*/)) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert subtree")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert subtree")
} else {
- /*
- * Follow a branch out of this node to a leaf node of some other type.
- */
- HDassert(idx < bt->nchildren);
- if((int)(my_ins = (type->insert)(f, bt->child[idx], H5B_NKEY(bt, shared, idx),
+ /*
+ * Follow a branch out of this node to a leaf node of some other type.
+ */
+ HDassert(idx < bt->nchildren);
+ if((int)(my_ins = (type->insert)(f, bt->child[idx], H5B_NKEY(bt, shared, idx),
lt_key_changed, md_key, udata, H5B_NKEY(bt, shared, idx + 1),
rt_key_changed, &new_child_bt_ud.addr/*out*/)) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert leaf node")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert leaf node")
}
HDassert((int)my_ins >= 0);
@@ -1039,40 +1039,40 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type,
*/
HDassert(!(bt->level == 0) != !(child_bt_ud.bt));
if(H5B_INS_CHANGE == my_ins) {
- /*
- * The insertion simply changed the address for the child.
- */
- HDassert(!child_bt_ud.bt);
- HDassert(bt->level == 0);
- bt->child[idx] = new_child_bt_ud.addr;
+ /*
+ * The insertion simply changed the address for the child.
+ */
+ HDassert(!child_bt_ud.bt);
+ HDassert(bt->level == 0);
+ bt->child[idx] = new_child_bt_ud.addr;
bt_ud->cache_flags |= H5AC__DIRTIED_FLAG;
} else if(H5B_INS_LEFT == my_ins || H5B_INS_RIGHT == my_ins) {
unsigned *tmp_bt_flags_ptr = NULL;
- H5B_t *tmp_bt;
-
- /*
- * If this node is full then split it before inserting the new child.
- */
- if(bt->nchildren == shared->two_k) {
- if(H5B__split(f, bt_ud, idx, udata, split_bt_ud/*out*/) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, H5B_INS_ERROR, "unable to split node")
- if(idx < bt->nchildren) {
- tmp_bt = bt;
+ H5B_t *tmp_bt;
+
+ /*
+ * If this node is full then split it before inserting the new child.
+ */
+ if(bt->nchildren == shared->two_k) {
+ if(H5B__split(f, bt_ud, idx, udata, split_bt_ud/*out*/) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, H5B_INS_ERROR, "unable to split node")
+ if(idx < bt->nchildren) {
+ tmp_bt = bt;
tmp_bt_flags_ptr = &bt_ud->cache_flags;
- } else {
- idx -= bt->nchildren;
- tmp_bt = split_bt_ud->bt;
+ } else {
+ idx -= bt->nchildren;
+ tmp_bt = split_bt_ud->bt;
tmp_bt_flags_ptr = &split_bt_ud->cache_flags;
- }
- } /* end if */
+ }
+ } /* end if */
else {
- tmp_bt = bt;
+ tmp_bt = bt;
tmp_bt_flags_ptr = &bt_ud->cache_flags;
- } /* end else */
+ } /* end else */
- /* Insert the child */
- if(H5B__insert_child(tmp_bt, tmp_bt_flags_ptr, idx, new_child_bt_ud.addr, my_ins, md_key) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert child")
+ /* Insert the child */
+ if(H5B__insert_child(tmp_bt, tmp_bt_flags_ptr, idx, new_child_bt_ud.addr, my_ins, md_key) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert child")
} /* end else-if */
/*
@@ -1080,20 +1080,20 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type,
* by the left and right node).
*/
if(split_bt_ud->bt) {
- HDmemcpy(md_key, H5B_NKEY(split_bt_ud->bt, shared, 0), type->sizeof_nkey);
- ret_value = H5B_INS_RIGHT;
+ HDmemcpy(md_key, H5B_NKEY(split_bt_ud->bt, shared, 0), type->sizeof_nkey);
+ ret_value = H5B_INS_RIGHT;
#ifdef H5B_DEBUG
- /*
- * The max key in the original left node must be equal to the min key
- * in the new node.
- */
- cmp = (type->cmp2)(H5B_NKEY(bt, shared, bt->nchildren), udata,
- H5B_NKEY(split_bt_ud->bt, shared, 0));
- HDassert(0 == cmp);
+ /*
+ * The max key in the original left node must be equal to the min key
+ * in the new node.
+ */
+ cmp = (type->cmp2)(H5B_NKEY(bt, shared, bt->nchildren), udata,
+ H5B_NKEY(split_bt_ud->bt, shared, 0));
+ HDassert(0 == cmp);
#endif
} /* end if */
else
- ret_value = H5B_INS_NOOP;
+ ret_value = H5B_INS_NOOP;
done:
if(child_bt_ud.bt)
@@ -1107,18 +1107,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_insert_helper() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5B__iterate_helper
+ * Function: H5B__iterate_helper
*
- * Purpose: Calls the list callback for each leaf node of the
- * B-tree, passing it the caller's UDATA structure.
+ * Purpose: Calls the list callback for each leaf node of the
+ * B-tree, passing it the caller's UDATA structure.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jun 23 1997
+ * Programmer: Robb Matzke
+ * matzke@llnl.gov
+ * Jun 23 1997
*
*-------------------------------------------------------------------------
*/
@@ -1127,7 +1127,7 @@ H5B__iterate_helper(H5F_t *f, const H5B_class_t *type, haddr_t addr,
H5B_operator_t op, void *udata)
{
H5B_t *bt = NULL; /* Pointer to current B-tree node */
- H5UC_t *rc_shared; /* Ref-counted shared info */
+ H5UC_t *rc_shared; /* Ref-counted shared info */
H5B_shared_t *shared; /* Pointer to shared B-tree info */
H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
unsigned u; /* Local index variable */
@@ -1174,18 +1174,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B__iterate_helper() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5B_iterate
+ * Function: H5B_iterate
*
- * Purpose: Calls the list callback for each leaf node of the
- * B-tree, passing it the UDATA structure.
+ * Purpose: Calls the list callback for each leaf node of the
+ * B-tree, passing it the UDATA structure.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jun 23 1997
+ * Programmer: Robb Matzke
+ * matzke@llnl.gov
+ * Jun 23 1997
*
*-------------------------------------------------------------------------
*/
@@ -1213,27 +1213,27 @@ 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
+ * Function: H5B__remove_helper
*
- * Purpose: The recursive part of removing an item from a B-tree. The
- * sub B-tree that is being considered is located at ADDR and
- * the item to remove is described by UDATA. If the removed
- * item falls at the left or right end of the current level then
- * it might be necessary to adjust the left and/or right keys
- * (LT_KEY and/or RT_KEY) to to indicate that they changed by
- * setting LT_KEY_CHANGED and/or RT_KEY_CHANGED.
+ * Purpose: The recursive part of removing an item from a B-tree. The
+ * sub B-tree that is being considered is located at ADDR and
+ * the item to remove is described by UDATA. If the removed
+ * item falls at the left or right end of the current level then
+ * it might be necessary to adjust the left and/or right keys
+ * (LT_KEY and/or RT_KEY) to to indicate that they changed by
+ * setting LT_KEY_CHANGED and/or RT_KEY_CHANGED.
*
- * Return: Success: A B-tree operation, see comments for
- * H5B_ins_t declaration. This function is
- * called recursively and the return value
- * influences the actions of the caller. It is
- * also called by H5B_remove().
+ * Return: Success: A B-tree operation, see comments for
+ * H5B_ins_t declaration. This function is
+ * called recursively and the return value
+ * influences the actions of the caller. It is
+ * also called by H5B_remove().
*
- * Failure: H5B_INS_ERROR, a negative value.
+ * Failure: H5B_INS_ERROR, a negative value.
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, September 16, 1998
*
*-------------------------------------------------------------------------
@@ -1243,14 +1243,14 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level,
uint8_t *lt_key/*out*/, hbool_t *lt_key_changed/*out*/, void *udata,
uint8_t *rt_key/*out*/, hbool_t *rt_key_changed/*out*/)
{
- H5B_t *bt = NULL, *sibling = NULL;
- unsigned bt_flags = H5AC__NO_FLAGS_SET;
- H5UC_t *rc_shared; /* Ref-counted shared info */
+ H5B_t *bt = NULL, *sibling = NULL;
+ unsigned bt_flags = H5AC__NO_FLAGS_SET;
+ H5UC_t *rc_shared; /* Ref-counted shared info */
H5B_shared_t *shared; /* Pointer to shared B-tree info */
H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
unsigned idx = 0, lt = 0, rt; /* Final, left & right indices */
int cmp = 1; /* Key comparison value */
- H5B_ins_t ret_value = H5B_INS_ERROR;
+ H5B_ins_t ret_value = H5B_INS_ERROR;
FUNC_ENTER_STATIC
@@ -1265,7 +1265,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,18 +1277,18 @@ 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) {
- idx = (lt + rt) / 2;
- if((cmp = (type->cmp3)(H5B_NKEY(bt, shared, idx), udata, H5B_NKEY(bt, shared, idx + 1))) < 0)
- rt = idx;
- else
- lt = idx + 1;
+ idx = (lt + rt) / 2;
+ if((cmp = (type->cmp3)(H5B_NKEY(bt, shared, idx), udata, H5B_NKEY(bt, shared, idx + 1))) < 0)
+ rt = idx;
+ else
+ lt = idx + 1;
} /* end while */
if(cmp)
- HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, H5B_INS_ERROR, "B-tree key not found")
+ HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, H5B_INS_ERROR, "B-tree key not found")
/*
* Follow the link to the subtree or to the data node. The return value
@@ -1296,31 +1296,31 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level,
*/
HDassert(idx < bt->nchildren);
if(bt->level > 0) {
- /* We're at an internal node -- call recursively */
- if((int)(ret_value = H5B__remove_helper(f, bt->child[idx], type,
+ /* We're at an internal node -- call recursively */
+ if((int)(ret_value = H5B__remove_helper(f, bt->child[idx], type,
level + 1, H5B_NKEY(bt, shared, idx)/*out*/,
lt_key_changed/*out*/, udata, H5B_NKEY(bt, shared, idx + 1)/*out*/,
rt_key_changed/*out*/)) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, H5B_INS_ERROR, "key not found in subtree")
+ HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, H5B_INS_ERROR, "key not found in subtree")
} else if(type->remove) {
- /*
- * We're at a leaf node but the leaf node points to an object that
- * has a removal method. Pass the removal request to the pointed-to
- * object and let it decide how to progress.
- */
- if((int)(ret_value = (type->remove)(f, bt->child[idx],
+ /*
+ * We're at a leaf node but the leaf node points to an object that
+ * has a removal method. Pass the removal request to the pointed-to
+ * object and let it decide how to progress.
+ */
+ if((int)(ret_value = (type->remove)(f, bt->child[idx],
H5B_NKEY(bt, shared, idx), lt_key_changed, udata,
H5B_NKEY(bt, shared, idx + 1), rt_key_changed)) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, H5B_INS_ERROR, "key not found in leaf node")
+ HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, H5B_INS_ERROR, "key not found in leaf node")
} else {
- /*
- * We're at a leaf node which points to an object that has no removal
- * method. The best we can do is to leave the object alone but
- * remove the B-tree reference to the object.
- */
- *lt_key_changed = FALSE;
- *rt_key_changed = FALSE;
- ret_value = H5B_INS_REMOVE;
+ /*
+ * We're at a leaf node which points to an object that has no removal
+ * method. The best we can do is to leave the object alone but
+ * remove the B-tree reference to the object.
+ */
+ *lt_key_changed = FALSE;
+ *rt_key_changed = FALSE;
+ ret_value = H5B_INS_REMOVE;
}
/*
@@ -1416,7 +1416,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;
@@ -1541,24 +1541,24 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level,
done:
if(bt && H5AC_unprotect(f, H5AC_BT, addr, bt, bt_flags) < 0)
- HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, H5B_INS_ERROR, "unable to release node")
+ HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, H5B_INS_ERROR, "unable to release node")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B__remove_helper() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5B_remove
+ * Function: H5B_remove
*
- * Purpose: Removes an item from a B-tree.
+ * Purpose: Removes an item from a B-tree.
*
- * Note: The current version does not attempt to rebalance the tree.
+ * Note: The current version does not attempt to rebalance the tree.
* (Read the paper Yao & Lehman paper for details on why)
*
- * Return: Non-negative on success/Negative on failure (failure includes
- * not being able to find the object which is to be removed).
+ * Return: Non-negative on success/Negative on failure (failure includes
+ * not being able to find the object which is to be removed).
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, September 16, 1998
*
*-------------------------------------------------------------------------
@@ -1567,11 +1567,11 @@ herr_t
H5B_remove(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
{
/* These are defined this way to satisfy alignment constraints */
- uint64_t _lt_key[128], _rt_key[128];
- uint8_t *lt_key = (uint8_t*)_lt_key; /*left key*/
- uint8_t *rt_key = (uint8_t*)_rt_key; /*right key*/
- hbool_t lt_key_changed = FALSE; /*left key changed?*/
- hbool_t rt_key_changed = FALSE; /*right key changed?*/
+ uint64_t _lt_key[128], _rt_key[128];
+ uint8_t *lt_key = (uint8_t*)_lt_key; /*left key*/
+ uint8_t *rt_key = (uint8_t*)_rt_key; /*right key*/
+ hbool_t lt_key_changed = FALSE; /*left key changed?*/
+ hbool_t rt_key_changed = FALSE; /*right key changed?*/
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1584,7 +1584,7 @@ H5B_remove(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
/* The actual removal */
if(H5B_INS_ERROR == H5B__remove_helper(f, addr, type, 0, lt_key, &lt_key_changed, udata, rt_key, &rt_key_changed))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to remove entry from B-tree")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to remove entry from B-tree")
#ifdef H5B_DEBUG
H5B__assert(f, addr, type, udata);
@@ -1593,16 +1593,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_remove() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5B_delete
+ * Function: H5B_delete
*
- * Purpose: Deletes an entire B-tree from the file, calling the 'remove'
+ * Purpose: Deletes an entire B-tree from the file, calling the 'remove'
* callbacks for each node.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, March 20, 2003
*
*-------------------------------------------------------------------------
@@ -1610,8 +1610,8 @@ done:
herr_t
H5B_delete(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
{
- H5B_t *bt = NULL; /* B-tree node being operated on */
- H5UC_t *rc_shared; /* Ref-counted shared info */
+ H5B_t *bt = NULL; /* B-tree node being operated on */
+ H5UC_t *rc_shared; /* Ref-counted shared info */
H5B_shared_t *shared; /* Pointer to shared B-tree info */
H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
unsigned u; /* Local index variable */
@@ -1668,18 +1668,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_delete() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5B_shared_new
+ * Function: H5B_shared_new
*
- * Purpose: Allocates & constructs a shared v1 B-tree struct for client.
+ * Purpose: Allocates & constructs a shared v1 B-tree struct for client.
*
- * Return: Success: non-NULL pointer to struct allocated
- * Failure: NULL
+ * Return: Success: non-NULL pointer to struct allocated
+ * Failure: NULL
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * May 27 2008
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * May 27 2008
*
*-------------------------------------------------------------------------
*/
@@ -1687,7 +1687,7 @@ H5B_shared_t *
H5B_shared_new(const H5F_t *f, const H5B_class_t *type, size_t sizeof_rkey)
{
H5B_shared_t *shared = NULL; /* New shared B-tree struct */
- size_t u; /* Local index variable */
+ size_t u; /* Local index variable */
H5B_shared_t *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -1699,7 +1699,7 @@ H5B_shared_new(const H5F_t *f, const H5B_class_t *type, size_t sizeof_rkey)
/* Allocate space for the shared structure */
if(NULL == (shared = H5FL_CALLOC(H5B_shared_t)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for shared B-tree info")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for shared B-tree info")
/* Set up the "global" information for this file's groups */
shared->type = type;
@@ -1709,9 +1709,9 @@ H5B_shared_new(const H5F_t *f, const H5B_class_t *type, size_t sizeof_rkey)
shared->sizeof_rkey = sizeof_rkey;
HDassert(shared->sizeof_rkey);
shared->sizeof_keys = (shared->two_k + 1) * type->sizeof_nkey;
- shared->sizeof_rnode = ((size_t)H5B_SIZEOF_HDR(f) + /*node header */
- shared->two_k * H5F_SIZEOF_ADDR(f) + /*child pointers */
- (shared->two_k + 1) * shared->sizeof_rkey); /*keys */
+ shared->sizeof_rnode = ((size_t)H5B_SIZEOF_HDR(f) + /*node header */
+ shared->two_k * H5F_SIZEOF_ADDR(f) + /*child pointers */
+ (shared->two_k + 1) * shared->sizeof_rkey); /*keys */
HDassert(shared->sizeof_rnode);
/* Allocate and clear shared buffers */
@@ -1742,15 +1742,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_shared_new() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5B_shared_free
+ * Function: H5B_shared_free
*
- * Purpose: Free B-tree shared info
+ * Purpose: Free B-tree shared info
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, May 27, 2008
*
*-------------------------------------------------------------------------
@@ -1774,28 +1774,28 @@ H5B_shared_free(void *_shared)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5B_shared_free() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5B__copy
+ * Function: H5B__copy
*
- * Purpose: Deep copies an existing H5B_t node.
+ * Purpose: Deep copies an existing H5B_t node.
*
- * Return: Success: Pointer to H5B_t object.
+ * Return: Success: Pointer to H5B_t object.
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Apr 18 2000
+ * Programmer: Quincey Koziol
+ * koziol@ncsa.uiuc.edu
+ * Apr 18 2000
*
*-------------------------------------------------------------------------
*/
static H5B_t *
H5B__copy(const H5B_t *old_bt)
{
- H5B_t *new_node = NULL;
+ H5B_t *new_node = NULL;
H5B_shared_t *shared; /* Pointer to shared B-tree info */
- H5B_t *ret_value = NULL; /* Return value */
+ H5B_t *ret_value = NULL; /* Return value */
FUNC_ENTER_STATIC
@@ -1833,26 +1833,26 @@ H5B__copy(const H5B_t *old_bt)
done:
if(NULL == ret_value) {
if(new_node) {
- new_node->native = H5FL_BLK_FREE(native_block, new_node->native);
- new_node->child = H5FL_SEQ_FREE(haddr_t, new_node->child);
- new_node = H5FL_FREE(H5B_t, new_node);
+ new_node->native = H5FL_BLK_FREE(native_block, new_node->native);
+ new_node->child = H5FL_SEQ_FREE(haddr_t, new_node->child);
+ new_node = H5FL_FREE(H5B_t, new_node);
} /* end if */
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B__copy() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5B__get_info_helper
+ * Function: H5B__get_info_helper
*
- * Purpose: Walks the B-tree nodes, getting information for all of them.
+ * Purpose: Walks the B-tree nodes, getting information for all of them.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Jun 3 2008
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Jun 3 2008
*
*-------------------------------------------------------------------------
*/
@@ -1864,8 +1864,8 @@ H5B__get_info_helper(H5F_t *f, const H5B_class_t *type, haddr_t addr,
H5UC_t *rc_shared; /* Ref-counted shared info */
H5B_shared_t *shared; /* Pointer to shared B-tree info */
H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
- unsigned level; /* Node level */
- size_t sizeof_rnode; /* Size of raw (disk) node */
+ unsigned level; /* Node level */
+ size_t sizeof_rnode; /* Size of raw (disk) node */
haddr_t next_addr; /* Address of next node to the right */
haddr_t left_child; /* Address of left-most child in node */
herr_t ret_value = SUCCEED; /* Return value */
@@ -1884,7 +1884,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 +1896,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];
@@ -1937,9 +1937,9 @@ H5B__get_info_helper(H5F_t *f, const H5B_class_t *type, haddr_t addr,
/* Check for another "row" of B-tree nodes to iterate over */
if(level > 0) {
- /* Keep following the left-most child until we reach a leaf node. */
- if(H5B__get_info_helper(f, type, left_child, info_udata) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTLIST, FAIL, "unable to list B-tree node")
+ /* Keep following the left-most child until we reach a leaf node. */
+ if(H5B__get_info_helper(f, type, left_child, info_udata) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTLIST, FAIL, "unable to list B-tree node")
} /* end if */
done:
@@ -1949,7 +1949,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B__get_info_helper() */
-
+
/*-------------------------------------------------------------------------
* Function: H5B_get_info
*
@@ -1967,7 +1967,7 @@ H5B_get_info(H5F_t *f, const H5B_class_t *type, haddr_t addr,
H5B_info_t *bt_info, H5B_operator_t op, void *udata)
{
H5B_info_ud_t info_udata; /* User-data for B-tree size iteration */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -2001,7 +2001,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_get_info() */
-
+
/*-------------------------------------------------------------------------
* Function: H5B_valid
*
@@ -2021,7 +2021,7 @@ H5B_valid(H5F_t *f, const H5B_class_t *type, haddr_t addr)
H5UC_t *rc_shared; /* Ref-counted shared info */
H5B_shared_t *shared; /* Pointer to shared B-tree info */
H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
- htri_t ret_value = SUCCEED; /* Return value */
+ htri_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -2036,7 +2036,7 @@ H5B_valid(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, NULL)))
- 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);
@@ -2047,7 +2047,7 @@ H5B_valid(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 protect B-tree node")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree node")
done:
/* Release the node */
@@ -2057,7 +2057,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_valid() */
-
+
/*-------------------------------------------------------------------------
* Function: H5B__node_dest
*
diff --git a/src/H5Bdbg.c b/src/H5Bdbg.c
index 5cad81b..f15fe79 100644
--- a/src/H5Bdbg.c
+++ b/src/H5Bdbg.c
@@ -13,11 +13,11 @@
/*-------------------------------------------------------------------------
*
- * Created: H5Bdbg.c
- * Dec 11 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Created: H5Bdbg.c
+ * Dec 11 2008
+ * Quincey Koziol <koziol@hdfgroup.org>
*
- * Purpose: Debugging routines for B-link tree package.
+ * Purpose: Debugging routines for B-link tree package.
*
*-------------------------------------------------------------------------
*/
@@ -32,35 +32,35 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Bpkg.h" /* B-link trees */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5MMprivate.h" /* Memory management */
+#include "H5private.h" /* Generic Functions */
+#include "H5Bpkg.h" /* B-link trees */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5MMprivate.h" /* Memory management */
+
-
/*-------------------------------------------------------------------------
- * Function: H5B_debug
+ * Function: H5B_debug
*
- * Purpose: Prints debugging info about a B-tree.
+ * Purpose: Prints debugging info about a B-tree.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Aug 4 1997
+ * Programmer: Robb Matzke
+ * matzke@llnl.gov
+ * Aug 4 1997
*
*-------------------------------------------------------------------------
*/
herr_t
H5B_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
- const H5B_class_t *type, void *udata)
+ const H5B_class_t *type, void *udata)
{
- H5B_t *bt = NULL;
- H5UC_t *rc_shared; /* Ref-counted shared info */
+ H5B_t *bt = NULL;
+ H5UC_t *rc_shared; /* Ref-counted shared info */
H5B_shared_t *shared; /* Pointer to shared B-tree info */
H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
- unsigned u; /* Local index variable */
+ unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -80,7 +80,7 @@ H5B_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
/* Get shared info for B-tree */
if(NULL == (rc_shared = (type->get_shared)(f, 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);
@@ -91,61 +91,61 @@ H5B_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
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")
/*
* Print the values.
*/
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Tree type ID:",
- ((shared->type->id) == H5B_SNODE_ID ? "H5B_SNODE_ID" :
+ "Tree type ID:",
+ ((shared->type->id) == H5B_SNODE_ID ? "H5B_SNODE_ID" :
((shared->type->id) == H5B_CHUNK_ID ? "H5B_CHUNK_ID" : "Unknown!")));
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Size of node:",
- shared->sizeof_rnode);
+ "Size of node:",
+ shared->sizeof_rnode);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Size of raw (disk) key:",
- shared->sizeof_rkey);
+ "Size of raw (disk) key:",
+ shared->sizeof_rkey);
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Dirty flag:",
- bt->cache_info.is_dirty ? "True" : "False");
+ "Dirty flag:",
+ bt->cache_info.is_dirty ? "True" : "False");
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Level:",
- bt->level);
+ "Level:",
+ bt->level);
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "Address of left sibling:",
- bt->left);
+ "Address of left sibling:",
+ bt->left);
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "Address of right sibling:",
- bt->right);
+ "Address of right sibling:",
+ bt->right);
HDfprintf(stream, "%*s%-*s %u (%u)\n", indent, "", fwidth,
- "Number of children (max):",
- bt->nchildren, shared->two_k);
+ "Number of children (max):",
+ bt->nchildren, shared->two_k);
/*
* Print the child addresses
*/
for(u = 0; u < bt->nchildren; u++) {
- HDfprintf(stream, "%*sChild %d...\n", indent, "", u);
- HDfprintf(stream, "%*s%-*s %a\n", indent + 3, "", MAX(0, fwidth - 3),
- "Address:", bt->child[u]);
+ HDfprintf(stream, "%*sChild %d...\n", indent, "", u);
+ HDfprintf(stream, "%*s%-*s %a\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Address:", bt->child[u]);
/* If there is a key debugging routine, use it to display the left & right keys */
- if(type->debug_key) {
+ if(type->debug_key) {
/* Decode the 'left' key & print it */
HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3),
"Left Key:");
HDassert(H5B_NKEY(bt,shared,u));
- (void)(type->debug_key)(stream, indent + 6, MAX(0, fwidth - 6),
- H5B_NKEY(bt, shared, u), udata);
+ (void)(type->debug_key)(stream, indent + 6, MAX(0, fwidth - 6),
+ H5B_NKEY(bt, shared, u), udata);
/* Decode the 'right' key & print it */
HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3),
"Right Key:");
HDassert(H5B_NKEY(bt, shared, u + 1));
- (void)(type->debug_key)(stream, indent + 6, MAX (0, fwidth - 6),
- H5B_NKEY(bt, shared, u + 1), udata);
- } /* end if */
+ (void)(type->debug_key)(stream, indent + 6, MAX (0, fwidth - 6),
+ H5B_NKEY(bt, shared, u + 1), udata);
+ } /* end if */
} /* end for */
done:
@@ -155,18 +155,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5B_debug() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5B__assert
+ * Function: H5B__assert
*
- * Purpose: Verifies that the tree is structured correctly.
+ * Purpose: Verifies that the tree is structured correctly.
*
- * Return: Success: SUCCEED
+ * Return: Success: SUCCEED
*
- * Failure: aborts if something is wrong.
+ * Failure: aborts if something is wrong.
*
- * Programmer: Robb Matzke
- * Tuesday, November 4, 1997
+ * Programmer: Robb Matzke
+ * Tuesday, November 4, 1997
*
*-------------------------------------------------------------------------
*/
@@ -174,32 +174,32 @@ done:
herr_t
H5B__assert(H5F_t *f, haddr_t addr, const H5B_class_t *type, void *udata)
{
- H5B_t *bt = NULL;
- H5UC_t *rc_shared; /* Ref-counted shared info */
+ H5B_t *bt = NULL;
+ H5UC_t *rc_shared; /* Ref-counted shared info */
H5B_shared_t *shared; /* Pointer to shared B-tree info */
H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
- int ncell, cmp;
- static int ncalls = 0;
- herr_t status;
+ int ncell, cmp;
+ static int ncalls = 0;
+ herr_t status;
herr_t ret_value = SUCCEED; /* Return value */
/* A queue of child data */
struct child_t {
- haddr_t addr;
- unsigned level;
- struct child_t *next;
+ haddr_t addr;
+ unsigned level;
+ struct child_t *next;
} *head = NULL, *tail = NULL, *prev = NULL, *cur = NULL, *tmp = NULL;
FUNC_ENTER_PACKAGE
if(0 == ncalls++) {
- if(H5DEBUG(B))
- fprintf(H5DEBUG(B), "H5B: debugging B-trees (expensive)\n");
+ if(H5DEBUG(B))
+ HDfprintf(H5DEBUG(B), "H5B: debugging B-trees (expensive)\n");
} /* end if */
/* Get shared info for B-tree */
if(NULL == (rc_shared = (type->get_shared)(f, 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);
@@ -228,60 +228,60 @@ H5B__assert(H5F_t *f, haddr_t addr, const H5B_class_t *type, void *udata)
* test.
*/
for(ncell = 0; cur; ncell++) {
- bt = (H5B_t *)H5AC_protect(f, H5AC_BT, cur->addr, &cache_udata, H5AC__READ_ONLY_FLAG);
- HDassert(bt);
-
- /* Check node header */
- HDassert(bt->level == cur->level);
- if(cur->next && cur->next->level == bt->level)
- HDassert(H5F_addr_eq(bt->right, cur->next->addr));
- else
- HDassert(!H5F_addr_defined(bt->right));
- if(prev && prev->level == bt->level)
- HDassert(H5F_addr_eq(bt->left, prev->addr));
- else
- HDassert(!H5F_addr_defined(bt->left));
-
- if(cur->level > 0) {
+ bt = (H5B_t *)H5AC_protect(f, H5AC_BT, cur->addr, &cache_udata, H5AC__READ_ONLY_FLAG);
+ HDassert(bt);
+
+ /* Check node header */
+ HDassert(bt->level == cur->level);
+ if(cur->next && cur->next->level == bt->level)
+ HDassert(H5F_addr_eq(bt->right, cur->next->addr));
+ else
+ HDassert(!H5F_addr_defined(bt->right));
+ if(prev && prev->level == bt->level)
+ HDassert(H5F_addr_eq(bt->left, prev->addr));
+ else
+ HDassert(!H5F_addr_defined(bt->left));
+
+ if(cur->level > 0) {
unsigned u;
- for(u = 0; u < bt->nchildren; u++) {
- /*
- * Check that child nodes haven't already been seen. If they
- * have then the tree has a cycle.
- */
- for(tmp = head; tmp; tmp = tmp->next)
- HDassert(H5F_addr_ne(tmp->addr, bt->child[u]));
-
- /* Add the child node to the end of the queue */
- tmp = (struct child_t *)H5MM_calloc(sizeof(struct child_t));
- HDassert(tmp);
- tmp->addr = bt->child[u];
- tmp->level = bt->level - 1;
- tail->next = tmp;
- tail = tmp;
-
- /* Check that the keys are monotonically increasing */
- cmp = (type->cmp2)(H5B_NKEY(bt, shared, u), udata, H5B_NKEY(bt, shared, u + 1));
- HDassert(cmp < 0);
- } /* end for */
- } /* end if */
-
- /* Release node */
- status = H5AC_unprotect(f, H5AC_BT, cur->addr, bt, H5AC__NO_FLAGS_SET);
- HDassert(status >= 0);
+ for(u = 0; u < bt->nchildren; u++) {
+ /*
+ * Check that child nodes haven't already been seen. If they
+ * have then the tree has a cycle.
+ */
+ for(tmp = head; tmp; tmp = tmp->next)
+ HDassert(H5F_addr_ne(tmp->addr, bt->child[u]));
+
+ /* Add the child node to the end of the queue */
+ tmp = (struct child_t *)H5MM_calloc(sizeof(struct child_t));
+ HDassert(tmp);
+ tmp->addr = bt->child[u];
+ tmp->level = bt->level - 1;
+ tail->next = tmp;
+ tail = tmp;
+
+ /* Check that the keys are monotonically increasing */
+ cmp = (type->cmp2)(H5B_NKEY(bt, shared, u), udata, H5B_NKEY(bt, shared, u + 1));
+ HDassert(cmp < 0);
+ } /* end for */
+ } /* end if */
+
+ /* Release node */
+ status = H5AC_unprotect(f, H5AC_BT, cur->addr, bt, H5AC__NO_FLAGS_SET);
+ HDassert(status >= 0);
bt = NULL; /* Make certain future references will be caught */
- /* Advance current location in queue */
- prev = cur;
- cur = cur->next;
+ /* Advance current location in queue */
+ prev = cur;
+ cur = cur->next;
} /* end for */
/* Free all entries from queue */
while(head) {
- tmp = head->next;
- H5MM_xfree(head);
- head = tmp;
+ tmp = head->next;
+ H5MM_xfree(head);
+ head = tmp;
} /* end while */
done:
diff --git a/src/H5Cmpio.c b/src/H5Cmpio.c
index ecaed62..3cae564 100644
--- a/src/H5Cmpio.c
+++ b/src/H5Cmpio.c
@@ -18,7 +18,7 @@
* Quincey Koziol
*
* Purpose: Functions in this file implement support for parallel I/O for
- * generic cache code.
+ * generic cache code.
*
*-------------------------------------------------------------------------
*/
@@ -28,20 +28,20 @@
/****************/
#include "H5Cmodule.h" /* This source code file is part of the H5C module */
-#define H5F_FRIEND /*suppress error about including H5Fpkg */
+#define H5F_FRIEND /*suppress error about including H5Fpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
+#include "H5private.h" /* Generic Functions */
#include "H5ACprivate.h" /* Metadata cache */
-#include "H5Cpkg.h" /* Cache */
+#include "H5Cpkg.h" /* Cache */
#include "H5CXprivate.h" /* API Contexts */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* Files */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5MMprivate.h" /* Memory management */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fpkg.h" /* Files */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5MMprivate.h" /* Memory management */
#ifdef H5_HAVE_PARALLEL
@@ -60,7 +60,7 @@
/* Local Prototypes */
/********************/
static herr_t H5C__collective_write(H5F_t *f);
-static herr_t H5C__flush_candidate_entries(H5F_t *f, unsigned entries_to_flush[H5C_RING_NTYPES],
+static herr_t H5C__flush_candidate_entries(H5F_t *f, unsigned entries_to_flush[H5C_RING_NTYPES],
unsigned entries_to_clear[H5C_RING_NTYPES]);
static herr_t H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring,
unsigned entries_to_flush, unsigned entries_to_clear);
@@ -81,80 +81,80 @@ static herr_t H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring,
/*******************/
-
+
/*-------------------------------------------------------------------------
* Function: H5C_apply_candidate_list
*
* Purpose: Apply the supplied candidate list.
*
- * We used to do this by simply having each process write
- * every mpi_size-th entry in the candidate list, starting
- * at index mpi_rank, and mark all the others clean.
+ * We used to do this by simply having each process write
+ * every mpi_size-th entry in the candidate list, starting
+ * at index mpi_rank, and mark all the others clean.
+ *
+ * However, this can cause unnecessary contention in a file
+ * system by increasing the number of processes writing to
+ * adjacent locations in the HDF5 file.
*
- * However, this can cause unnecessary contention in a file
- * system by increasing the number of processes writing to
- * adjacent locations in the HDF5 file.
+ * To attempt to minimize this, we now arange matters such
+ * that each process writes n adjacent entries in the
+ * candidate list, and marks all others clean. We must do
+ * this in such a fashion as to guarantee that each entry
+ * on the candidate list is written by exactly one process,
+ * and marked clean by all others.
*
- * To attempt to minimize this, we now arange matters such
- * that each process writes n adjacent entries in the
- * candidate list, and marks all others clean. We must do
- * this in such a fashion as to guarantee that each entry
- * on the candidate list is written by exactly one process,
- * and marked clean by all others.
+ * To do this, first construct a table mapping mpi_rank
+ * to the index of the first entry in the candidate list to
+ * be written by the process of that mpi_rank, and then use
+ * the table to control which entries are written and which
+ * are marked as clean as a function of the mpi_rank.
*
- * To do this, first construct a table mapping mpi_rank
- * to the index of the first entry in the candidate list to
- * be written by the process of that mpi_rank, and then use
- * the table to control which entries are written and which
- * are marked as clean as a function of the mpi_rank.
+ * Note that the table must be identical on all processes, as
+ * all see the same candidate list, mpi_size, and mpi_rank --
+ * the inputs used to construct the table.
*
- * Note that the table must be identical on all processes, as
- * all see the same candidate list, mpi_size, and mpi_rank --
- * the inputs used to construct the table.
+ * We construct the table as follows. Let:
*
- * We construct the table as follows. Let:
+ * n = num_candidates / mpi_size;
*
- * n = num_candidates / mpi_size;
+ * m = num_candidates % mpi_size;
*
- * m = num_candidates % mpi_size;
+ * Now allocate an array of integers of length mpi_size + 1,
+ * and call this array candidate_assignment_table.
*
- * Now allocate an array of integers of length mpi_size + 1,
- * and call this array candidate_assignment_table.
+ * Conceptually, if the number of candidates is a multiple
+ * of the mpi_size, we simply pass through the candidate list
+ * and assign n entries to each process to flush, with the
+ * index of the first entry to flush in the location in
+ * the candidate_assignment_table indicated by the mpi_rank
+ * of the process.
*
- * Conceptually, if the number of candidates is a multiple
- * of the mpi_size, we simply pass through the candidate list
- * and assign n entries to each process to flush, with the
- * index of the first entry to flush in the location in
- * the candidate_assignment_table indicated by the mpi_rank
- * of the process.
+ * In the more common case in which the candidate list isn't
+ * isn't a multiple of the mpi_size, we pretend it is, and
+ * give num_candidates % mpi_size processes one extra entry
+ * each to make things work out.
*
- * In the more common case in which the candidate list isn't
- * isn't a multiple of the mpi_size, we pretend it is, and
- * give num_candidates % mpi_size processes one extra entry
- * each to make things work out.
+ * Once the table is constructed, we determine the first and
+ * last entry this process is to flush as follows:
*
- * Once the table is constructed, we determine the first and
- * last entry this process is to flush as follows:
+ * first_entry_to_flush = candidate_assignment_table[mpi_rank]
*
- * first_entry_to_flush = candidate_assignment_table[mpi_rank]
+ * last_entry_to_flush =
+ * candidate_assignment_table[mpi_rank + 1] - 1;
*
- * last_entry_to_flush =
- * candidate_assignment_table[mpi_rank + 1] - 1;
- *
- * With these values determined, we simply scan through the
- * candidate list, marking all entries in the range
- * [first_entry_to_flush, last_entry_to_flush] for flush,
- * and all others to be cleaned.
+ * With these values determined, we simply scan through the
+ * candidate list, marking all entries in the range
+ * [first_entry_to_flush, last_entry_to_flush] for flush,
+ * and all others to be cleaned.
*
- * Finally, we scan the LRU from tail to head, flushing
- * or marking clean the candidate entries as indicated.
- * If necessary, we scan the pinned list as well.
+ * Finally, we scan the LRU from tail to head, flushing
+ * or marking clean the candidate entries as indicated.
+ * If necessary, we scan the pinned list as well.
*
- * Note that this function will fail if any protected or
- * clean entries appear on the candidate list.
+ * Note that this function will fail if any protected or
+ * clean entries appear on the candidate list.
*
- * This function is used in managing sync points, and
- * shouldn't be used elsewhere.
+ * This function is used in managing sync points, and
+ * shouldn't be used elsewhere.
*
* Return: Success: SUCCEED
*
@@ -174,22 +174,22 @@ H5C_apply_candidate_list(H5F_t * f,
int mpi_size)
{
int i;
- int m;
- int n;
- unsigned first_entry_to_flush;
- unsigned last_entry_to_flush;
- unsigned total_entries_to_clear = 0;
- unsigned total_entries_to_flush = 0;
+ int m;
+ int n;
+ unsigned first_entry_to_flush;
+ unsigned last_entry_to_flush;
+ unsigned total_entries_to_clear = 0;
+ unsigned total_entries_to_flush = 0;
int * candidate_assignment_table = NULL;
unsigned entries_to_flush[H5C_RING_NTYPES];
unsigned entries_to_clear[H5C_RING_NTYPES];
- haddr_t addr;
- H5C_cache_entry_t * entry_ptr = NULL;
+ haddr_t addr;
+ H5C_cache_entry_t * entry_ptr = NULL;
#if H5C_DO_SANITY_CHECKS
- haddr_t last_addr;
+ haddr_t last_addr;
#endif /* H5C_DO_SANITY_CHECKS */
#if H5C_APPLY_CANDIDATE_LIST__DEBUG
- char tbl_buf[1024];
+ char tbl_buf[1024];
#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
@@ -214,10 +214,10 @@ H5C_apply_candidate_list(H5F_t * f,
HDmemset(tbl_buf, 0, sizeof(tbl_buf));
- sprintf(&(tbl_buf[0]), "candidate list = ");
+ HDsprintf(&(tbl_buf[0]), "candidate list = ");
for(u = 0; u < num_candidates; u++)
- sprintf(&(tbl_buf[HDstrlen(tbl_buf)]), " 0x%llx", (long long)(*(candidates_list_ptr + u)));
- sprintf(&(tbl_buf[HDstrlen(tbl_buf)]), "\n");
+ HDsprintf(&(tbl_buf[HDstrlen(tbl_buf)]), " 0x%llx", (long long)(*(candidates_list_ptr + u)));
+ HDsprintf(&(tbl_buf[HDstrlen(tbl_buf)]), "\n");
HDfprintf(stdout, "%s", tbl_buf);
#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */
@@ -245,7 +245,7 @@ H5C_apply_candidate_list(H5F_t * f,
for(i = 1; i < mpi_size; i++)
candidate_assignment_table[i] = candidate_assignment_table[i - 1] + n;
} /* end if */
- else {
+ else {
for(i = 1; i <= m; i++)
candidate_assignment_table[i] = candidate_assignment_table[i - 1] + n + 1;
@@ -280,13 +280,13 @@ H5C_apply_candidate_list(H5F_t * f,
#if H5C_APPLY_CANDIDATE_LIST__DEBUG
for ( i = 0; i < 1024; i++ )
tbl_buf[i] = '\0';
- sprintf(&(tbl_buf[0]), "candidate assignment table = ");
+ HDsprintf(&(tbl_buf[0]), "candidate assignment table = ");
for(i = 0; i <= mpi_size; i++)
- sprintf(&(tbl_buf[HDstrlen(tbl_buf)]), " %d", candidate_assignment_table[i]);
- sprintf(&(tbl_buf[HDstrlen(tbl_buf)]), "\n");
+ HDsprintf(&(tbl_buf[HDstrlen(tbl_buf)]), " %d", candidate_assignment_table[i]);
+ HDsprintf(&(tbl_buf[HDstrlen(tbl_buf)]), "\n");
HDfprintf(stdout, "%s", tbl_buf);
- HDfprintf(stdout, "%s:%d: flush entries [%u, %u].\n",
+ HDfprintf(stdout, "%s:%d: flush entries [%u, %u].\n",
FUNC, mpi_rank, first_entry_to_flush, last_entry_to_flush);
HDfprintf(stdout, "%s:%d: marking entries.\n", FUNC, mpi_rank);
@@ -315,7 +315,7 @@ H5C_apply_candidate_list(H5F_t * f,
if(entry_ptr->is_protected)
/* For now at least, we can't deal with protected entries.
* If we encounter one, scream and die. If it becomes an
- * issue, we should be able to work around this.
+ * issue, we should be able to work around this.
*/
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Listed entry is protected?!?!?")
@@ -327,9 +327,9 @@ H5C_apply_candidate_list(H5F_t * f,
HDassert(!entry_ptr->clear_on_unprotect);
/* Determine whether the entry is to be cleared or flushed,
- * and mark it accordingly. We will scan the protected and
+ * and mark it accordingly. We will scan the protected and
* pinned list shortly, and clear or flush according to these
- * markings.
+ * markings.
*/
if(u >= first_entry_to_flush && u <= last_entry_to_flush) {
total_entries_to_flush++;
@@ -346,7 +346,7 @@ H5C_apply_candidate_list(H5F_t * f,
* candidate list to clear from the cache have to be
* removed from the coll list. This is OK since the
* candidate list is collective and uniform across all
- * ranks.
+ * ranks.
*/
if(entry_ptr->coll_access) {
entry_ptr->coll_access = FALSE;
@@ -367,14 +367,14 @@ H5C_apply_candidate_list(H5F_t * f,
#endif /* H5C_DO_SANITY_CHECKS */
#if H5C_APPLY_CANDIDATE_LIST__DEBUG
- HDfprintf(stdout, "%s:%d: num candidates/to clear/to flush = %u/%u/%u.\n",
+ HDfprintf(stdout, "%s:%d: num candidates/to clear/to flush = %u/%u/%u.\n",
FUNC, mpi_rank, num_candidates, total_entries_to_clear,
total_entries_to_flush);
#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */
- /* We have now marked all the entries on the candidate list for
+ /* We have now marked all the entries on the candidate list for
* either flush or clear -- now scan the LRU and the pinned list
- * for these entries and do the deed. Do this via a call to
+ * for these entries and do the deed. Do this via a call to
* H5C__flush_candidate_entries().
*
* Note that we are doing things in this round about manner so as
@@ -407,15 +407,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_apply_candidate_list() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_construct_candidate_list__clean_cache
*
- * Purpose: Construct the list of entries that should be flushed to
- * clean all entries in the cache.
+ * Purpose: Construct the list of entries that should be flushed to
+ * clean all entries in the cache.
*
- * This function is used in managing sync points, and
- * shouldn't be used elsewhere.
+ * This function is used in managing sync points, and
+ * shouldn't be used elsewhere.
*
* Return: Success: SUCCEED
*
@@ -447,21 +447,21 @@ H5C_construct_candidate_list__clean_cache(H5C_t * cache_ptr)
* point, it is possible that some dirty entries may reside on the
* pinned list at this point.
*/
- HDassert( cache_ptr->slist_size <=
+ HDassert( cache_ptr->slist_size <=
(cache_ptr->dLRU_list_size + cache_ptr->pel_size) );
- HDassert( cache_ptr->slist_len <=
+ HDassert( cache_ptr->slist_len <=
(cache_ptr->dLRU_list_len + cache_ptr->pel_len) );
if(space_needed > 0) { /* we have work to do */
H5C_cache_entry_t *entry_ptr;
unsigned nominated_entries_count = 0;
size_t nominated_entries_size = 0;
- haddr_t nominated_addr;
+ haddr_t nominated_addr;
HDassert( cache_ptr->slist_len > 0 );
/* Scan the dirty LRU list from tail forward and nominate sufficient
- * entries to free up the necessary space.
+ * entries to free up the necessary space.
*/
entry_ptr = cache_ptr->dLRU_tail_ptr;
while((nominated_entries_size < space_needed) &&
@@ -483,7 +483,7 @@ H5C_construct_candidate_list__clean_cache(H5C_t * cache_ptr)
} /* end while */
HDassert( entry_ptr == NULL );
- /* it is possible that there are some dirty entries on the
+ /* it is possible that there are some dirty entries on the
* protected entry list as well -- scan it too if necessary
*/
entry_ptr = cache_ptr->pel_head_ptr;
@@ -516,15 +516,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_construct_candidate_list__clean_cache() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_construct_candidate_list__min_clean
*
- * Purpose: Construct the list of entries that should be flushed to
- * get the cache back within its min clean constraints.
+ * Purpose: Construct the list of entries that should be flushed to
+ * get the cache back within its min clean constraints.
*
- * This function is used in managing sync points, and
- * shouldn't be used elsewhere.
+ * This function is used in managing sync points, and
+ * shouldn't be used elsewhere.
*
* Return: Success: SUCCEED
*
@@ -546,7 +546,7 @@ H5C_construct_candidate_list__min_clean(H5C_t * cache_ptr)
HDassert( cache_ptr != NULL );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- /* compute the number of bytes (if any) that must be flushed to get the
+ /* compute the number of bytes (if any) that must be flushed to get the
* cache back within its min clean constraints.
*/
if(cache_ptr->max_cache_size > cache_ptr->index_size) {
@@ -574,14 +574,14 @@ H5C_construct_candidate_list__min_clean(H5C_t * cache_ptr)
HDassert( cache_ptr->slist_len > 0 );
/* Scan the dirty LRU list from tail forward and nominate sufficient
- * entries to free up the necessary space.
+ * entries to free up the necessary space.
*/
entry_ptr = cache_ptr->dLRU_tail_ptr;
while((nominated_entries_size < space_needed) &&
(nominated_entries_count < cache_ptr->slist_len) &&
(entry_ptr != NULL) &&
(!entry_ptr->flush_me_last)) {
- haddr_t nominated_addr;
+ haddr_t nominated_addr;
HDassert( ! (entry_ptr->is_protected) );
HDassert( ! (entry_ptr->is_read_only) );
@@ -605,30 +605,30 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_construct_candidate_list__min_clean() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C_mark_entries_as_clean
*
* Purpose: When the H5C code is used to implement the metadata caches
- * in PHDF5, only the cache with MPI_rank 0 is allowed to
- * actually write entries to disk -- all other caches must
- * retain dirty entries until they are advised that the
- * entries are clean.
+ * in PHDF5, only the cache with MPI_rank 0 is allowed to
+ * actually write entries to disk -- all other caches must
+ * retain dirty entries until they are advised that the
+ * entries are clean.
*
- * This function exists to allow the H5C code to receive these
- * notifications.
+ * This function exists to allow the H5C code to receive these
+ * notifications.
*
- * The function receives a list of entry base addresses
- * which must refer to dirty entries in the cache. If any
- * of the entries are either clean or don't exist, the
- * function flags an error.
+ * The function receives a list of entry base addresses
+ * which must refer to dirty entries in the cache. If any
+ * of the entries are either clean or don't exist, the
+ * function flags an error.
*
- * The function scans the list of entries and flushes all
- * those that are currently unprotected with the
- * H5C__FLUSH_CLEAR_ONLY_FLAG. Those that are currently
- * protected are flagged for clearing when they are
- * unprotected.
+ * The function scans the list of entries and flushes all
+ * those that are currently unprotected with the
+ * H5C__FLUSH_CLEAR_ONLY_FLAG. Those that are currently
+ * protected are flagged for clearing when they are
+ * unprotected.
*
* Return: Non-negative on success/Negative on failure
*
@@ -643,22 +643,22 @@ H5C_mark_entries_as_clean(H5F_t * f,
haddr_t * ce_array_ptr)
{
H5C_t * cache_ptr;
- unsigned entries_cleared;
+ unsigned entries_cleared;
unsigned pinned_entries_cleared;
hbool_t progress;
- unsigned entries_examined;
- unsigned initial_list_len;
- haddr_t addr;
- unsigned pinned_entries_marked = 0;
+ unsigned entries_examined;
+ unsigned initial_list_len;
+ haddr_t addr;
+ unsigned pinned_entries_marked = 0;
#if H5C_DO_SANITY_CHECKS
- unsigned protected_entries_marked = 0;
- unsigned other_entries_marked = 0;
- haddr_t last_addr;
+ unsigned protected_entries_marked = 0;
+ unsigned other_entries_marked = 0;
+ haddr_t last_addr;
#endif /* H5C_DO_SANITY_CHECKS */
- H5C_cache_entry_t * clear_ptr = NULL;
- H5C_cache_entry_t * entry_ptr = NULL;
+ H5C_cache_entry_t * clear_ptr = NULL;
+ H5C_cache_entry_t * entry_ptr = NULL;
unsigned u;
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -705,7 +705,7 @@ H5C_mark_entries_as_clean(H5F_t * f,
if(entry_ptr == NULL) {
#if H5C_DO_SANITY_CHECKS
- HDfprintf(stdout,
+ HDfprintf(stdout,
"H5C_mark_entries_as_clean: entry[%u] = %a not in cache.\n",
u,
addr);
@@ -714,7 +714,7 @@ H5C_mark_entries_as_clean(H5F_t * f,
} /* end if */
else if(!entry_ptr->is_dirty) {
#if H5C_DO_SANITY_CHECKS
- HDfprintf(stdout,
+ HDfprintf(stdout,
"H5C_mark_entries_as_clean: entry %a is not dirty!?!\n",
addr);
#endif /* H5C_DO_SANITY_CHECKS */
@@ -734,13 +734,13 @@ H5C_mark_entries_as_clean(H5F_t * f,
} /* end if */
entry_ptr->clear_on_unprotect = TRUE;
- if(entry_ptr->is_pinned)
- pinned_entries_marked++;
+ if(entry_ptr->is_pinned)
+ pinned_entries_marked++;
#if H5C_DO_SANITY_CHECKS
- else if(entry_ptr->is_protected)
- protected_entries_marked++;
- else
- other_entries_marked++;
+ else if(entry_ptr->is_protected)
+ protected_entries_marked++;
+ else
+ other_entries_marked++;
#endif /* H5C_DO_SANITY_CHECKS */
}
}
@@ -750,25 +750,25 @@ H5C_mark_entries_as_clean(H5F_t * f,
* any protected entries will not be on the LRU, and therefore
* will not be flushed at this time.
*
- * Note that unlike H5C_apply_candidate_list(),
- * H5C_mark_entries_as_clean() makes all its calls to
- * H5C__flush_single_entry() with the H5C__FLUSH_CLEAR_ONLY_FLAG
- * set. As a result, the pre_serialize() and serialize calls are
+ * Note that unlike H5C_apply_candidate_list(),
+ * H5C_mark_entries_as_clean() makes all its calls to
+ * H5C__flush_single_entry() with the H5C__FLUSH_CLEAR_ONLY_FLAG
+ * set. As a result, the pre_serialize() and serialize calls are
* not made.
*
- * This then implies that (assuming such actions were
- * permitted in the parallel case) no loads, dirties,
- * resizes, or removals of other entries can occur as
+ * This then implies that (assuming such actions were
+ * permitted in the parallel case) no loads, dirties,
+ * resizes, or removals of other entries can occur as
* a side effect of the flush. Hence, there is no need
- * for the checks for entry removal / status change
+ * for the checks for entry removal / status change
* that I ported to H5C_apply_candidate_list().
*
* However, if (in addition to allowing such operations
* in the parallel case), we allow such operations outside
- * of the pre_serialize / serialize routines, this may
- * cease to be the case -- requiring a review of this
+ * of the pre_serialize / serialize routines, this may
+ * cease to be the case -- requiring a review of this
* point.
- * JRM -- 4/7/15
+ * JRM -- 4/7/15
*/
entries_cleared = 0;
entries_examined = 0;
@@ -812,7 +812,7 @@ H5C_mark_entries_as_clean(H5F_t * f,
pinned_entries_cleared++;
progress = TRUE;
- if(H5C__flush_single_entry(f, clear_ptr,
+ if(H5C__flush_single_entry(f, clear_ptr,
(H5C__FLUSH_CLEAR_ONLY_FLAG | H5C__GENERATE_IMAGE_FLAG | H5C__UPDATE_PAGE_BUFFER_FLAG)) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "can't clear entry")
} /* end if */
@@ -854,12 +854,12 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_mark_entries_as_clean() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C_clear_coll_entries
*
- * Purpose: Clear half or the entire list of collective entries and
+ * Purpose: Clear half or the entire list of collective entries and
* mark them as independent.
*
* Return: FAIL if error is detected, SUCCEED otherwise.
@@ -871,9 +871,9 @@ done:
*/
herr_t
H5C_clear_coll_entries(H5C_t *cache_ptr, hbool_t partial)
-{
- uint32_t clear_cnt;
- H5C_cache_entry_t * entry_ptr = NULL;
+{
+ uint32_t clear_cnt;
+ H5C_cache_entry_t * entry_ptr = NULL;
herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
@@ -901,7 +901,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_clear_coll_entries */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__collective_write
@@ -1041,8 +1041,8 @@ H5C__collective_write(H5F_t *f)
info = *info_p;
- /* just to match up with the 1st MPI_File_set_view from
- * H5FD_mpio_write()
+ /* just to match up with the 1st MPI_File_set_view from
+ * H5FD_mpio_write()
*/
if(MPI_SUCCESS != (mpi_code = MPI_File_set_view(mpi_fh, (MPI_Offset)0, MPI_BYTE, MPI_BYTE, "native", info)))
HMPI_GOTO_ERROR(FAIL, "MPI_File_set_view failed", mpi_code)
@@ -1052,8 +1052,8 @@ H5C__collective_write(H5F_t *f)
if(MPI_SUCCESS != (mpi_code = MPI_File_write_at_all(mpi_fh, (MPI_Offset)0, NULL, 0, MPI_BYTE, &mpi_stat)))
HMPI_GOTO_ERROR(FAIL, "MPI_File_write_at_all failed", mpi_code)
- /* just to match up with the 2nd MPI_File_set_view (reset) in
- * H5FD_mpio_write()
+ /* just to match up with the 2nd MPI_File_set_view (reset) in
+ * H5FD_mpio_write()
*/
if(MPI_SUCCESS != (mpi_code = MPI_File_set_view(mpi_fh, (MPI_Offset)0, MPI_BYTE, MPI_BYTE, "native", info)))
HMPI_GOTO_ERROR(FAIL, "MPI_File_set_view failed", mpi_code)
@@ -1079,11 +1079,11 @@ done:
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5C__collective_write() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C__flush_candidate_entries
*
- * Purpose: Flush or clear (as indicated) the candidate entries that
+ * Purpose: Flush or clear (as indicated) the candidate entries that
* have been marked in the metadata cache. In so doing,
* observe rings and flush dependencies.
*
@@ -1112,9 +1112,9 @@ done:
* Return: Non-negative on success/Negative on failure.
*
* Programmer: John Mainzer
- * 2/10/17
+ * 2/10/17
*
- * Changes: None.
+ * Changes: None.
*
*-------------------------------------------------------------------------
*/
@@ -1123,17 +1123,17 @@ H5C__flush_candidate_entries(H5F_t *f, unsigned entries_to_flush[H5C_RING_NTYPES
unsigned entries_to_clear[H5C_RING_NTYPES])
{
#if H5C_DO_SANITY_CHECKS
- int i;
- uint32_t index_len = 0;
- size_t index_size = (size_t)0;
- size_t clean_index_size = (size_t)0;
- size_t dirty_index_size = (size_t)0;
- size_t slist_size = (size_t)0;
- uint32_t slist_len = 0;
+ int i;
+ uint32_t index_len = 0;
+ size_t index_size = (size_t)0;
+ size_t clean_index_size = (size_t)0;
+ size_t dirty_index_size = (size_t)0;
+ size_t slist_size = (size_t)0;
+ uint32_t slist_len = 0;
#endif /* H5C_DO_SANITY_CHECKS */
- H5C_ring_t ring;
+ H5C_ring_t ring;
H5C_t * cache_ptr;
- herr_t ret_value = SUCCEED;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_STATIC
@@ -1163,7 +1163,7 @@ H5C__flush_candidate_entries(H5F_t *f, unsigned entries_to_flush[H5C_RING_NTYPES
clean_index_size += cache_ptr->clean_index_ring_size[i];
dirty_index_size += cache_ptr->dirty_index_ring_size[i];
- slist_len += cache_ptr->slist_ring_len[i];
+ slist_len += cache_ptr->slist_ring_len[i];
slist_size += cache_ptr->slist_ring_size[i];
} /* end for */
@@ -1201,11 +1201,11 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__flush_candidate_entries() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C__flush_candidates_in_ring
*
- * Purpose: Flush or clear (as indicated) the candidate entries
+ * Purpose: Flush or clear (as indicated) the candidate entries
* contained in the specified cache and ring. All candidate
* entries in rings outside the specified ring must have been
* flushed (or cleared) on entry.
@@ -1234,7 +1234,7 @@ done:
* Return: Non-negative on success/Negative on failure.
*
* Programmer: John Mainzer
- * 2/10/17
+ * 2/10/17
*
*-------------------------------------------------------------------------
*/
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index d24c6d4..5a5f35c 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -11,31 +11,31 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@hdfgroup.org>
- * Thursday, April 24, 2008
- *
- * Purpose: Abstract indexed (chunked) I/O functions. The logical
- * multi-dimensional dataspace is regularly partitioned into
- * same-sized "chunks", the first of which is aligned with the
- * logical origin. The chunks are indexed by different methods,
- * that map a chunk index to disk address. Each chunk can be
+/* Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Thursday, April 24, 2008
+ *
+ * Purpose: Abstract indexed (chunked) I/O functions. The logical
+ * multi-dimensional dataspace is regularly partitioned into
+ * same-sized "chunks", the first of which is aligned with the
+ * logical origin. The chunks are indexed by different methods,
+ * that map a chunk index to disk address. Each chunk can be
* compressed independently and the chunks may move around in the
* file as their storage requirements change.
*
- * Cache: Disk I/O is performed in units of chunks and H5MF_alloc()
- * contains code to optionally align chunks on disk block
- * boundaries for performance.
- *
- * The chunk cache is an extendible hash indexed by a function
- * of storage B-tree address and chunk N-dimensional offset
- * within the dataset. Collisions are not resolved -- one of
- * the two chunks competing for the hash slot must be preempted
- * from the cache. All entries in the hash also participate in
- * a doubly-linked list and entries are penalized by moving them
- * toward the front of the list. When a new chunk is about to
- * be added to the cache the heap is pruned by preempting
- * entries near the front of the list to make room for the new
- * entry which is added to the end of the list.
+ * Cache: Disk I/O is performed in units of chunks and H5MF_alloc()
+ * contains code to optionally align chunks on disk block
+ * boundaries for performance.
+ *
+ * The chunk cache is an extendible hash indexed by a function
+ * of storage B-tree address and chunk N-dimensional offset
+ * within the dataset. Collisions are not resolved -- one of
+ * the two chunks competing for the hash slot must be preempted
+ * from the cache. All entries in the hash also participate in
+ * a doubly-linked list and entries are penalized by moving them
+ * toward the front of the list. When a new chunk is about to
+ * be added to the cache the heap is pruned by preempting
+ * entries near the front of the list to make room for the new
+ * entry which is added to the end of the list.
*/
/****************/
@@ -48,19 +48,19 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
+#include "H5private.h" /* Generic Functions */
#ifdef H5_HAVE_PARALLEL
-#include "H5ACprivate.h" /* Metadata cache */
+#include "H5ACprivate.h" /* Metadata cache */
#endif /* H5_HAVE_PARALLEL */
#include "H5CXprivate.h" /* API Contexts */
-#include "H5Dpkg.h" /* Dataset functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File functions */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
+#include "H5Dpkg.h" /* Dataset functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File functions */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
#include "H5MFprivate.h" /* File memory management */
-#include "H5VMprivate.h" /* Vector and array functions */
+#include "H5VMprivate.h" /* Vector and array functions */
/****************/
@@ -83,26 +83,26 @@
/*
* Feature: If this constant is defined then every cache preemption and load
- * causes a character to be printed on the standard error stream:
+ * causes a character to be printed on the standard error stream:
*
* `.': Entry was preempted because it has been completely read or
- * completely written but not partially read and not partially
- * written. This is often a good reason for preemption because such
- * a chunk will be unlikely to be referenced in the near future.
+ * completely written but not partially read and not partially
+ * written. This is often a good reason for preemption because such
+ * a chunk will be unlikely to be referenced in the near future.
*
* `:': Entry was preempted because it hasn't been used recently.
*
* `#': Entry was preempted because another chunk collided with it. This
- * is usually a relatively bad thing. If there are too many of
- * these then the number of entries in the cache can be increased.
+ * is usually a relatively bad thing. If there are too many of
+ * these then the number of entries in the cache can be increased.
*
* c: Entry was preempted because the file is closing.
*
- * w: A chunk read operation was eliminated because the library is
- * about to write new values to the entire chunk. This is a good
- * thing, especially on files where the chunk size is the same as
- * the disk block size, chunks are aligned on disk block boundaries,
- * and the operating system can also eliminate a read operation.
+ * w: A chunk read operation was eliminated because the library is
+ * about to write new values to the entire chunk. This is a good
+ * thing, especially on files where the chunk size is the same as
+ * the disk block size, chunks are aligned on disk block boundaries,
+ * and the operating system can also eliminate a read operation.
*/
/*#define H5D_CHUNK_DEBUG */
@@ -119,19 +119,19 @@
/* Raw data chunks are cached. Each entry in the cache is: */
typedef struct H5D_rdcc_ent_t {
- hbool_t locked; /*entry is locked in cache */
- hbool_t dirty; /*needs to be written to disk? */
- hbool_t deleted; /*chunk about to be deleted */
+ hbool_t locked; /*entry is locked in cache */
+ hbool_t dirty; /*needs to be written to disk? */
+ hbool_t deleted; /*chunk about to be deleted */
unsigned edge_chunk_state; /*states related to edge chunks (see above) */
- hsize_t scaled[H5O_LAYOUT_NDIMS]; /*scaled chunk 'name' (coordinates) */
- uint32_t rd_count; /*bytes remaining to be read */
- uint32_t wr_count; /*bytes remaining to be written */
+ hsize_t scaled[H5O_LAYOUT_NDIMS]; /*scaled chunk 'name' (coordinates) */
+ uint32_t rd_count; /*bytes remaining to be read */
+ uint32_t wr_count; /*bytes remaining to be written */
H5F_block_t chunk_block; /*offset/length of chunk in file */
- hsize_t chunk_idx; /*index of chunk in dataset */
- uint8_t *chunk; /*the unfiltered chunk data */
- unsigned idx; /*index in hash table */
- struct H5D_rdcc_ent_t *next;/*next item in doubly-linked list */
- struct H5D_rdcc_ent_t *prev;/*previous item in doubly-linked list */
+ hsize_t chunk_idx; /*index of chunk in dataset */
+ uint8_t *chunk; /*the unfiltered chunk data */
+ unsigned idx; /*index in hash table */
+ struct H5D_rdcc_ent_t *next;/*next item in doubly-linked list */
+ struct H5D_rdcc_ent_t *prev;/*previous item in doubly-linked list */
struct H5D_rdcc_ent_t *tmp_next;/*next item in temporary doubly-linked list */
struct H5D_rdcc_ent_t *tmp_prev;/*previous item in temporary doubly-linked list */
} H5D_rdcc_ent_t;
@@ -142,7 +142,7 @@ typedef struct H5D_chunk_it_ud1_t {
H5D_chunk_common_ud_t common; /* Common info for B-tree user data (must be first) */
const H5D_chk_idx_info_t *idx_info; /* Chunked index info */
const H5D_io_info_t *io_info; /* I/O info for dataset operation */
- const hsize_t *space_dim; /* New dataset dimensions */
+ const hsize_t *space_dim; /* New dataset dimensions */
const hbool_t *shrunk_dim; /* Dimensions which have been shrunk */
H5S_t *chunk_space; /* Dataspace for a chunk */
uint32_t elmts_per_chunk;/* Elements in chunk */
@@ -192,12 +192,12 @@ typedef struct H5D_chunk_it_ud3_t {
/* needed for getting raw data from chunk cache */
hbool_t chunk_in_cache;
- uint8_t *chunk; /* the unfiltered chunk data */
+ uint8_t *chunk; /* the unfiltered chunk data */
} H5D_chunk_it_ud3_t;
/* Callback info for iteration to dump index */
typedef struct H5D_chunk_it_ud4_t {
- FILE *stream; /* Output stream */
+ FILE *stream; /* Output stream */
hbool_t header_displayed; /* Node's header is displayed? */
unsigned ndims; /* Number of dimensions for chunk/dataset */
uint32_t *chunk_dim; /* Chunk dimensions */
@@ -207,7 +207,7 @@ typedef struct H5D_chunk_it_ud4_t {
typedef struct H5D_chunk_it_ud5_t {
H5D_chk_idx_info_t *new_idx_info; /* Dest. chunk index info object */
unsigned dset_ndims; /* Number of dimensions in dataset */
- hsize_t *dset_dims; /* Dataset dimensions */
+ hsize_t *dset_dims; /* Dataset dimensions */
} H5D_chunk_it_ud5_t;
/* Callback info for nonexistent readvv operation */
@@ -315,7 +315,7 @@ static herr_t H5D__chunk_unlock(const H5D_io_info_t *io_info,
static herr_t H5D__chunk_cache_prune(const H5D_t *dset, size_t size);
static herr_t H5D__chunk_prune_fill(H5D_chunk_it_ud1_t *udata, hbool_t new_unfilt_chunk);
#ifdef H5_HAVE_PARALLEL
-static herr_t H5D__chunk_collective_fill(const H5D_t *dset,
+static herr_t H5D__chunk_collective_fill(const H5D_t *dset,
H5D_chunk_coll_info_t *chunk_info, size_t chunk_size, const void *fill_buf);
#endif /* H5_HAVE_PARALLEL */
@@ -386,15 +386,15 @@ H5FL_BLK_DEFINE_STATIC(chunk);
/* Declare extern free list to manage the H5S_sel_iter_t struct */
H5FL_EXTERN(H5S_sel_iter_t);
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_direct_write
+ * Function: H5D__chunk_direct_write
*
- * Purpose: Internal routine to write a chunk directly into the file.
+ * Purpose: Internal routine to write a chunk directly into the file.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* 30 July 2012
*
*-------------------------------------------------------------------------
@@ -434,7 +434,7 @@ H5D__chunk_direct_write(const H5D_t *dset, uint32_t filters, hsize_t *offset,
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address")
/* Sanity check */
- HDassert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
+ HDassert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
(!H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length == 0));
/* Set the file block information for the old chunk */
@@ -476,7 +476,7 @@ H5D__chunk_direct_write(const H5D_t *dset, uint32_t filters, hsize_t *offset,
/* Evict the (old) entry from the cache if present, but do not flush
* it to disk */
if(UINT_MAX != udata.idx_hint) {
- const H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /*raw data chunk cache */
+ const H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /*raw data chunk cache */
if(H5D__chunk_cache_evict(dset, rdcc->slot[udata.idx_hint], FALSE) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTREMOVE, FAIL, "unable to evict chunk")
@@ -499,7 +499,7 @@ done:
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5D__chunk_direct_write() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__chunk_direct_read
*
@@ -588,7 +588,7 @@ H5D__chunk_direct_read(const H5D_t *dset, hsize_t *offset, uint32_t* filters,
/* Read the chunk data into the supplied buffer */
if(H5F_block_read(dset->oloc.file, H5FD_MEM_DRAW, udata.chunk_block.offset, udata.chunk_block.length, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to read raw data chunk")
-
+
/* Return the filter mask */
*filters = udata.filter_mask;
@@ -596,7 +596,7 @@ done:
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5D__chunk_direct_read() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__get_chunk_storage_size
*
@@ -694,15 +694,15 @@ done:
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* H5D__get_chunk_storage_size */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_set_info_real
+ * Function: H5D__chunk_set_info_real
*
- * Purpose: Internal routine to set the information about chunks for a dataset
+ * Purpose: Internal routine to set the information about chunks for a dataset
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, June 30, 2009
*
*-------------------------------------------------------------------------
@@ -748,15 +748,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_set_info_real() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_set_info
+ * Function: H5D__chunk_set_info
*
- * Purpose: Sets the information about chunks for a dataset
+ * Purpose: Sets the information about chunks for a dataset
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, June 30, 2009
*
*-------------------------------------------------------------------------
@@ -773,7 +773,7 @@ H5D__chunk_set_info(const H5D_t *dset)
/* Set the base layout information */
if(H5D__chunk_set_info_real(&dset->shared->layout.u.chunk, dset->shared->ndims, dset->shared->curr_dims, dset->shared->max_dims) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set layout's chunk info")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set layout's chunk info")
/* Call the index's "resize" callback */
if(dset->shared->layout.storage.u.chunk.ops->resize && (dset->shared->layout.storage.u.chunk.ops->resize)(&dset->shared->layout.u.chunk) < 0)
@@ -783,15 +783,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_set_info() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_set_sizes
+ * Function: H5D__chunk_set_sizes
*
* Purpose: Sets chunk and type sizes.
*
* Return: SUCCEED/FAIL
*
- * Programmer: Dana Robinson
+ * Programmer: Dana Robinson
* December 2015
*
*-------------------------------------------------------------------------
@@ -846,15 +846,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_set_sizes */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_construct
+ * Function: H5D__chunk_construct
*
- * Purpose: Constructs new chunked layout information for dataset
+ * Purpose: Constructs new chunked layout information for dataset
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, May 22, 2008
*
*-------------------------------------------------------------------------
@@ -909,16 +909,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_construct() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_init
+ * Function: H5D__chunk_init
*
- * Purpose: Initialize the raw data chunk cache for a dataset. This is
- * called when the dataset is initialized.
+ * Purpose: Initialize the raw data chunk cache for a dataset. This is
+ * called when the dataset is initialized.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, May 18, 1998
*
*-------------------------------------------------------------------------
@@ -927,7 +927,7 @@ static herr_t
H5D__chunk_init(H5F_t *f, const H5D_t *dset, hid_t dapl_id)
{
H5D_chk_idx_info_t idx_info; /* Chunked index info */
- H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /* Convenience pointer to dataset's chunk cache */
+ H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /* Convenience pointer to dataset's chunk cache */
H5P_genplist_t *dapl; /* Data access property list object pointer */
H5O_storage_chunk_t *sc = &(dset->shared->layout.storage.u.chunk);
herr_t ret_value = SUCCEED; /* Return value */
@@ -1004,7 +1004,7 @@ H5D__chunk_init(H5F_t *f, const H5D_t *dset, hid_t dapl_id)
/* Allocate any indexing structures */
if(dset->shared->layout.storage.u.chunk.ops->init && (dset->shared->layout.storage.u.chunk.ops->init)(&idx_info, dset->shared->space, dset->oloc.addr) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize indexing information")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize indexing information")
/* Set the number of chunks in dataset, etc. */
if(H5D__chunk_set_info(dset) < 0)
@@ -1014,15 +1014,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_init() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_is_space_alloc
+ * Function: H5D__chunk_is_space_alloc
*
- * Purpose: Query if space is allocated for layout
+ * Purpose: Query if space is allocated for layout
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, January 15, 2009
*
*-------------------------------------------------------------------------
@@ -1045,7 +1045,7 @@ H5D__chunk_is_space_alloc(const H5O_storage_t *storage)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_is_space_alloc() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__chunk_is_data_cached
*
@@ -1069,15 +1069,15 @@ H5D__chunk_is_data_cached(const H5D_shared_t *shared_dset)
FUNC_LEAVE_NOAPI(shared_dset->cache.chunk.nused > 0)
} /* end H5D__chunk_is_data_cached() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_io_init
+ * Function: H5D__chunk_io_init
*
- * Purpose: Performs initialization before any sort of I/O on the raw data
+ * Purpose: Performs initialization before any sort of I/O on the raw data
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, March 20, 2008
*
*-------------------------------------------------------------------------
@@ -1099,7 +1099,7 @@ H5D__chunk_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_inf
H5SL_node_t *curr_node; /* Current node in skip list */
char bogus; /* "bogus" buffer to pass to selection iterator */
unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1307,7 +1307,7 @@ H5D__chunk_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_inf
HGOTO_ERROR(H5E_DATATYPE, H5E_BADSIZE, FAIL, "datatype size invalid")
if(H5S_select_iter_init(&(fm->mem_iter), mem_space, elmt_size) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator")
- iter_init = TRUE; /* Selection iteration info has been initialized */
+ iter_init = TRUE; /* Selection iteration info has been initialized */
iter_op.op_type = H5S_SEL_ITER_OP_LIB;
iter_op.u.lib_op = H5D__chunk_mem_cb;
@@ -1367,17 +1367,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_io_init() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_mem_alloc
+ * Function: H5D__chunk_mem_alloc
*
- * Purpose: Allocate space for a chunk in memory. This routine allocates
+ * Purpose: Allocate space for a chunk in memory. This routine allocates
* memory space for non-filtered chunks from a block free list
* and uses malloc()/free() for filtered chunks.
*
- * Return: Pointer to memory for chunk on success/NULL on failure
+ * Return: Pointer to memory for chunk on success/NULL on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* April 22, 2004
*
*-------------------------------------------------------------------------
@@ -1385,7 +1385,7 @@ done:
static void *
H5D__chunk_mem_alloc(size_t size, const H5O_pline_t *pline)
{
- void *ret_value = NULL; /* Return value */
+ void *ret_value = NULL; /* Return value */
FUNC_ENTER_STATIC_NOERR
@@ -1399,17 +1399,17 @@ H5D__chunk_mem_alloc(size_t size, const H5O_pline_t *pline)
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__chunk_mem_alloc() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_mem_xfree
+ * Function: H5D__chunk_mem_xfree
*
- * Purpose: Free space for a chunk in memory. This routine allocates
+ * Purpose: Free space for a chunk in memory. This routine allocates
* memory space for non-filtered chunks from a block free list
* and uses malloc()/free() for filtered chunks.
*
- * Return: NULL (never fails)
+ * Return: NULL (never fails)
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* April 22, 2004
*
*-------------------------------------------------------------------------
@@ -1429,7 +1429,7 @@ H5D__chunk_mem_xfree(void *chk, const H5O_pline_t *pline)
FUNC_LEAVE_NOAPI(NULL)
} /* H5D__chunk_mem_xfree() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__chunk_mem_realloc
*
@@ -1462,7 +1462,7 @@ H5D__chunk_mem_realloc(void *chk, size_t size, const H5O_pline_t *pline)
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__chunk_mem_realloc() */
-
+
/*--------------------------------------------------------------------------
NAME
H5D__free_chunk_info
@@ -1505,16 +1505,16 @@ H5D__free_chunk_info(void *item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSED *
FUNC_LEAVE_NOAPI(0)
} /* H5D__free_chunk_info() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__create_chunk_map_single
+ * Function: H5D__create_chunk_map_single
*
- * Purpose: Create chunk selections when appending a single record
+ * Purpose: Create chunk selections when appending a single record
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Tuesday, November 20, 2007
+ * Programmer: Quincey Koziol
+ * Tuesday, November 20, 2007
*
*-------------------------------------------------------------------------
*/
@@ -1530,7 +1530,7 @@ H5D__create_chunk_map_single(H5D_chunk_map_t *fm, const H5D_io_info_t
hsize_t sel_start[H5O_LAYOUT_NDIMS]; /* Offset of low bound of file selection */
hsize_t sel_end[H5O_LAYOUT_NDIMS]; /* Offset of high bound of file selection */
unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1589,16 +1589,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__create_chunk_map_single() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__create_chunk_file_map_hyper
+ * Function: H5D__create_chunk_file_map_hyper
*
- * Purpose: Create all chunk selections in file.
+ * Purpose: Create all chunk selections in file.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Thursday, May 29, 2003
+ * Programmer: Quincey Koziol
+ * Thursday, May 29, 2003
*
*-------------------------------------------------------------------------
*/
@@ -1617,10 +1617,10 @@ H5D__create_chunk_file_map_hyper(H5D_chunk_map_t *fm, const H5D_io_info_t
hsize_t end[H5O_LAYOUT_NDIMS]; /* Final coordinates of chunk */
hsize_t chunk_index; /* Index of chunk */
hsize_t start_scaled[H5S_MAX_RANK]; /* Starting scaled coordinates of selection */
- hsize_t scaled[H5S_MAX_RANK]; /* Scaled coordinates for this chunk */
+ hsize_t scaled[H5S_MAX_RANK]; /* Scaled coordinates for this chunk */
int curr_dim; /* Current dimension to increment */
unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1709,11 +1709,11 @@ H5D__create_chunk_file_map_hyper(H5D_chunk_map_t *fm, const H5D_io_info_t
new_chunk_info->mspace_shared = FALSE;
/* Copy the chunk's scaled coordinates */
- HDmemcpy(new_chunk_info->scaled, scaled, sizeof(hsize_t) * fm->f_ndims);
+ HDmemcpy(new_chunk_info->scaled, scaled, sizeof(hsize_t) * fm->f_ndims);
new_chunk_info->scaled[fm->f_ndims] = 0;
/* Copy the chunk's scaled coordinates */
- HDmemcpy(new_chunk_info->scaled, scaled, sizeof(hsize_t) * fm->f_ndims);
+ HDmemcpy(new_chunk_info->scaled, scaled, sizeof(hsize_t) * fm->f_ndims);
/* Insert the new chunk into the skip list */
if(H5SL_insert(fm->sel_chunks, new_chunk_info, &new_chunk_info->index) < 0) {
@@ -1772,18 +1772,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__create_chunk_file_map_hyper() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__create_chunk_mem_map_hyper
+ * Function: H5D__create_chunk_mem_map_hyper
*
- * Purpose: Create all chunk selections in memory by copying the file
+ * Purpose: Create all chunk selections in memory by copying the file
* chunk selections and adjusting their offsets to be correct
* for the memory.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Thursday, May 29, 2003
+ * Programmer: Quincey Koziol
+ * Thursday, May 29, 2003
*
* Assumptions: That the file and memory selections are the same shape.
*
@@ -1800,7 +1800,7 @@ H5D__create_chunk_mem_map_hyper(const H5D_chunk_map_t *fm)
hssize_t adjust[H5O_LAYOUT_NDIMS]; /* Adjustment to make to all file chunks */
hssize_t chunk_adjust[H5O_LAYOUT_NDIMS]; /* Adjustment to make to a particular chunk */
unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1890,17 +1890,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__create_chunk_mem_map_hyper() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_file_cb
+ * Function: H5D__chunk_file_cb
*
- * Purpose: Callback routine for file selection iterator. Used when
+ * Purpose: Callback routine for file selection iterator. Used when
* creating selections in file for each point selected.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Wednesday, July 23, 2003
+ * Programmer: Quincey Koziol
+ * Wednesday, July 23, 2003
*
*-------------------------------------------------------------------------
*/
@@ -1912,9 +1912,9 @@ H5D__chunk_file_cb(void H5_ATTR_UNUSED *elem, const H5T_t H5_ATTR_UNUSED *type,
H5D_chunk_info_t *chunk_info; /* Chunk information for current chunk */
hsize_t coords_in_chunk[H5O_LAYOUT_NDIMS]; /* Coordinates of element in chunk */
hsize_t chunk_index; /* Chunk index */
- hsize_t scaled[H5S_MAX_RANK]; /* Scaled coordinates for this chunk */
+ hsize_t scaled[H5S_MAX_RANK]; /* Scaled coordinates for this chunk */
unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -2007,17 +2007,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_file_cb() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_mem_cb
+ * Function: H5D__chunk_mem_cb
*
- * Purpose: Callback routine for file selection iterator. Used when
+ * Purpose: Callback routine for file selection iterator. Used when
* creating selections in memory for each chunk.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Thursday, April 10, 2003
+ * Programmer: Raymond Lu
+ * Thursday, April 10, 2003
*
*-------------------------------------------------------------------------
*/
@@ -2028,7 +2028,7 @@ H5D__chunk_mem_cb(void H5_ATTR_UNUSED *elem, const H5T_t H5_ATTR_UNUSED *type, u
H5D_chunk_info_t *chunk_info; /* Chunk information for current chunk */
hsize_t coords_in_mem[H5O_LAYOUT_NDIMS]; /* Coordinates of element in memory */
hsize_t chunk_index; /* Chunk index */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -2084,17 +2084,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_mem_cb() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_cacheable
+ * Function: H5D__chunk_cacheable
*
- * Purpose: A small internal function to if it's possible to load the
+ * Purpose: A small internal function to if it's possible to load the
* chunk into cache.
*
- * Return: TRUE or FALSE
+ * Return: TRUE or FALSE
*
- * Programmer: Raymond Lu
- * 17 July 2007
+ * Programmer: Raymond Lu
+ * 17 July 2007
*
*-------------------------------------------------------------------------
*/
@@ -2176,16 +2176,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_cacheable() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_read
+ * Function: H5D__chunk_read
*
- * Purpose: Read from a chunked dataset.
+ * Purpose: Read from a chunked dataset.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Thursday, April 10, 2003
+ * Programmer: Raymond Lu
+ * Thursday, April 10, 2003
*
*-------------------------------------------------------------------------
*/
@@ -2203,7 +2203,7 @@ H5D__chunk_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
hbool_t cpt_dirty; /* Temporary placeholder for compact storage "dirty" flag */
uint32_t src_accessed_bytes = 0; /* Total accessed size in a chunk */
hbool_t skip_missing_chunks = FALSE; /* Whether to skip missing chunks */
- herr_t ret_value = SUCCEED; /*return value */
+ herr_t ret_value = SUCCEED; /*return value */
FUNC_ENTER_STATIC
@@ -2255,7 +2255,7 @@ H5D__chunk_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
chunk_node = H5D_CHUNK_GET_FIRST_NODE(fm);
while(chunk_node) {
H5D_chunk_info_t *chunk_info; /* Chunk information */
- H5D_chunk_ud_t udata; /* Chunk index pass-through */
+ H5D_chunk_ud_t udata; /* Chunk index pass-through */
/* Get the actual chunk information from the skip list node */
chunk_info = H5D_CHUNK_GET_NODE_INFO(fm, chunk_node);
@@ -2265,7 +2265,7 @@ H5D__chunk_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address")
/* Sanity check */
- HDassert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
+ HDassert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
(!H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length == 0));
/* Check for non-existant chunk & skip it if appropriate */
@@ -2328,16 +2328,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__chunk_read() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_write
+ * Function: H5D__chunk_write
*
- * Purpose: Writes to a chunked dataset.
+ * Purpose: Writes to a chunked dataset.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Thursday, April 10, 2003
+ * Programmer: Raymond Lu
+ * Thursday, April 10, 2003
*
*-------------------------------------------------------------------------
*/
@@ -2353,7 +2353,7 @@ H5D__chunk_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
H5D_storage_t cpt_store; /* Chunk storage information as compact dataset */
hbool_t cpt_dirty; /* Temporary placeholder for compact storage "dirty" flag */
uint32_t dst_accessed_bytes = 0; /* Total accessed size in a chunk */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -2383,10 +2383,10 @@ H5D__chunk_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
chunk_node = H5D_CHUNK_GET_FIRST_NODE(fm);
while(chunk_node) {
H5D_chunk_info_t *chunk_info; /* Chunk information */
- H5D_chk_idx_info_t idx_info; /* Chunked index info */
+ H5D_chk_idx_info_t idx_info; /* Chunked index info */
H5D_io_info_t *chk_io_info; /* Pointer to I/O info object for this chunk */
void *chunk; /* Pointer to locked chunk buffer */
- H5D_chunk_ud_t udata; /* Index pass-through */
+ H5D_chunk_ud_t udata; /* Index pass-through */
htri_t cacheable; /* Whether the chunk is cacheable */
hbool_t need_insert = FALSE; /* Whether the chunk needs to be inserted into the index */
@@ -2398,11 +2398,11 @@ H5D__chunk_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address")
/* Sanity check */
- HDassert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
+ HDassert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
(!H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length == 0));
- /* Set chunk's [scaled] coordinates */
- io_info->store->chunk.scaled = chunk_info->scaled;
+ /* Set chunk's [scaled] coordinates */
+ io_info->store->chunk.scaled = chunk_info->scaled;
/* Determine if we should use the chunk cache */
if((cacheable = H5D__chunk_cacheable(io_info, udata.chunk_block.offset, TRUE)) < 0)
@@ -2419,7 +2419,7 @@ H5D__chunk_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
/* Determine if we will access all the data in the chunk */
if(dst_accessed_bytes != ctg_store.contig.dset_size ||
(chunk_info->chunk_points * type_info->src_type_size) != ctg_store.contig.dset_size ||
- fm->fsel_type == H5S_SEL_POINTS)
+ fm->fsel_type == H5S_SEL_POINTS)
entire_chunk = FALSE;
/* Lock the chunk into the cache */
@@ -2445,8 +2445,8 @@ H5D__chunk_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
udata.chunk_block.length = io_info->dset->shared->layout.u.chunk.size;
/* Allocate the chunk */
- if(H5D__chunk_file_alloc(&idx_info, NULL, &udata.chunk_block, &need_insert, chunk_info->scaled) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert/resize chunk on chunk level")
+ if(H5D__chunk_file_alloc(&idx_info, NULL, &udata.chunk_block, &need_insert, chunk_info->scaled) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert/resize chunk on chunk level")
/* Make sure the address of the chunk is returned. */
if(!H5F_addr_defined(udata.chunk_block.offset))
@@ -2471,16 +2471,16 @@ H5D__chunk_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
(hsize_t)chunk_info->chunk_points, chunk_info->fspace, chunk_info->mspace) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "chunked write failed")
- /* Release the cache lock on the chunk, or insert chunk into index. */
- if(chunk) {
- if(H5D__chunk_unlock(io_info, &udata, TRUE, chunk, dst_accessed_bytes) < 0)
- HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to unlock raw data chunk")
- } /* end if */
- else {
+ /* Release the cache lock on the chunk, or insert chunk into index. */
+ if(chunk) {
+ if(H5D__chunk_unlock(io_info, &udata, TRUE, chunk, dst_accessed_bytes) < 0)
+ HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to unlock raw data chunk")
+ } /* end if */
+ else {
if(need_insert && io_info->dset->shared->layout.storage.u.chunk.ops->insert)
if((io_info->dset->shared->layout.storage.u.chunk.ops->insert)(&idx_info, &udata, NULL) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert chunk addr into index")
- } /* end else */
+ } /* end else */
/* Advance to next chunk in list */
chunk_node = H5D_CHUNK_GET_NEXT_NODE(fm, chunk_node);
@@ -2490,16 +2490,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__chunk_write() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_flush
+ * Function: H5D__chunk_flush
*
- * Purpose: Writes all dirty chunks to disk and optionally preempts them
- * from the cache.
+ * Purpose: Writes all dirty chunks to disk and optionally preempts them
+ * from the cache.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, May 21, 1998
*
*-------------------------------------------------------------------------
@@ -2508,8 +2508,8 @@ static herr_t
H5D__chunk_flush(H5D_t *dset)
{
H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk);
- H5D_rdcc_ent_t *ent, *next;
- unsigned nerrors = 0; /* Count of any errors encountered when flushing chunks */
+ H5D_rdcc_ent_t *ent, *next;
+ unsigned nerrors = 0; /* Count of any errors encountered when flushing chunks */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -2519,34 +2519,34 @@ H5D__chunk_flush(H5D_t *dset)
/* Loop over all entries in the chunk cache */
for(ent = rdcc->head; ent; ent = next) {
- next = ent->next;
+ next = ent->next;
if(H5D__chunk_flush_entry(dset, ent, FALSE) < 0)
nerrors++;
} /* end for */
if(nerrors)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush one or more raw data chunks")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush one or more raw data chunks")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_flush() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_io_term
+ * Function: H5D__chunk_io_term
*
- * Purpose: Destroy I/O operation information.
+ * Purpose: Destroy I/O operation information.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Saturday, May 17, 2003
+ * Programmer: Quincey Koziol
+ * Saturday, May 17, 2003
*
*-------------------------------------------------------------------------
*/
static herr_t
H5D__chunk_io_term(const H5D_chunk_map_t *fm)
{
- herr_t ret_value = SUCCEED; /*return value */
+ herr_t ret_value = SUCCEED; /*return value */
FUNC_ENTER_STATIC
@@ -2581,16 +2581,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_io_term() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_dest
+ * Function: H5D__chunk_dest
*
- * Purpose: Destroy the entire chunk cache by flushing dirty entries,
- * preempting all entries, and freeing the cache itself.
+ * Purpose: Destroy the entire chunk cache by flushing dirty entries,
+ * preempting all entries, and freeing the cache itself.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, May 21, 1998
*
*-------------------------------------------------------------------------
@@ -2599,9 +2599,9 @@ static herr_t
H5D__chunk_dest(H5D_t *dset)
{
H5D_chk_idx_info_t idx_info; /* Chunked index info */
- H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /* Dataset's chunk cache */
- H5D_rdcc_ent_t *ent = NULL, *next = NULL; /* Pointer to current & next cache entries */
- int nerrors = 0; /* Accumulated count of errors */
+ H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /* Dataset's chunk cache */
+ H5D_rdcc_ent_t *ent = NULL, *next = NULL; /* Pointer to current & next cache entries */
+ int nerrors = 0; /* Accumulated count of errors */
H5O_storage_chunk_t *sc = &(dset->shared->layout.storage.u.chunk);
herr_t ret_value = SUCCEED; /* Return value */
@@ -2617,7 +2617,7 @@ H5D__chunk_dest(H5D_t *dset)
if(H5D__chunk_cache_evict(dset, ent, TRUE) < 0)
nerrors++;
} /* end for */
-
+
/* Continue even if there are failures. */
if(nerrors)
HDONE_ERROR(H5E_IO, H5E_CANTFLUSH, FAIL, "unable to flush one or more raw data chunks")
@@ -2636,21 +2636,21 @@ H5D__chunk_dest(H5D_t *dset)
/* Free any index structures */
if(dset->shared->layout.storage.u.chunk.ops->dest &&
(dset->shared->layout.storage.u.chunk.ops->dest)(&idx_info) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to release chunk index info")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to release chunk index info")
done:
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5D__chunk_dest() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D_chunk_idx_reset
+ * Function: H5D_chunk_idx_reset
*
- * Purpose: Reset index information
+ * Purpose: Reset index information
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, January 15, 2009
*
*-------------------------------------------------------------------------
@@ -2669,21 +2669,21 @@ H5D_chunk_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
/* Reset index structures */
if((storage->ops->reset)(storage, reset_addr) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to reset chunk index info")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to reset chunk index info")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D_chunk_idx_reset() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_cinfo_cache_reset
+ * Function: H5D__chunk_cinfo_cache_reset
*
- * Purpose: Reset the cached chunk info
+ * Purpose: Reset the cached chunk info
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* November 27, 2007
*
*-------------------------------------------------------------------------
@@ -2702,15 +2702,15 @@ H5D__chunk_cinfo_cache_reset(H5D_chunk_cached_t *last)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5D__chunk_cinfo_cache_reset() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_cinfo_cache_update
+ * Function: H5D__chunk_cinfo_cache_update
*
- * Purpose: Update the cached chunk info
+ * Purpose: Update the cached chunk info
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* November 27, 2007
*
*-------------------------------------------------------------------------
@@ -2739,15 +2739,15 @@ H5D__chunk_cinfo_cache_update(H5D_chunk_cached_t *last, const H5D_chunk_ud_t *ud
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5D__chunk_cinfo_cache_update() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_cinfo_cache_found
+ * Function: H5D__chunk_cinfo_cache_found
*
- * Purpose: Look for chunk info in cache
+ * Purpose: Look for chunk info in cache
*
- * Return: TRUE/FALSE/FAIL
+ * Return: TRUE/FALSE/FAIL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* November 27, 2007
*
*-------------------------------------------------------------------------
@@ -2788,19 +2788,19 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__chunk_cinfo_cache_found() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_create
+ * Function: H5D__chunk_create
*
- * Purpose: Creates a new chunked storage index and initializes the
- * layout information with information about the storage. The
- * layout info should be immediately written to the object header.
+ * Purpose: Creates a new chunked storage index and initializes the
+ * layout information with information about the storage. The
+ * layout info should be immediately written to the object header.
*
- * Return: Non-negative on success (with the layout information initialized
- * and ready to write to an object header). Negative on failure.
+ * Return: Non-negative on success (with the layout information initialized
+ * and ready to write to an object header). Negative on failure.
*
- * Programmer: Quincey Koziol
- * Thursday, May 22, 2008
+ * Programmer: Quincey Koziol
+ * Thursday, May 22, 2008
*
*-------------------------------------------------------------------------
*/
@@ -2824,7 +2824,7 @@ H5D__chunk_create(const H5D_t *dset /*in,out*/)
unsigned u; /* Local index variable */
for(u = 0; u < dset->shared->layout.u.chunk.ndims; u++)
- HDassert(dset->shared->layout.u.chunk.dim[u] > 0);
+ HDassert(dset->shared->layout.u.chunk.dim[u] > 0);
}
#endif
@@ -2836,22 +2836,22 @@ H5D__chunk_create(const H5D_t *dset /*in,out*/)
/* Create the index for the chunks */
if((dset->shared->layout.storage.u.chunk.ops->create)(&idx_info) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create chunk index")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create chunk index")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_create() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_hash_val
+ * Function: H5D__chunk_hash_val
*
- * Purpose: To calculate an index based on the dataset's scaled coordinates and
- * sizes of the faster dimensions.
+ * Purpose: To calculate an index based on the dataset's scaled coordinates and
+ * sizes of the faster dimensions.
*
- * Return: Hash value index
+ * Return: Hash value index
*
- * Programmer: Vailin Choi; Nov 2014
+ * Programmer: Vailin Choi; Nov 2014
*
*-------------------------------------------------------------------------
*/
@@ -2884,16 +2884,16 @@ H5D__chunk_hash_val(const H5D_shared_t *shared, const hsize_t *scaled)
FUNC_LEAVE_NOAPI(ret)
} /* H5D__chunk_hash_val() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_lookup
+ * Function: H5D__chunk_lookup
*
- * Purpose: Loops up a chunk in cache and on disk, and retrieves
+ * Purpose: Loops up a chunk in cache and on disk, and retrieves
* information about that chunk.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Albert Cheng
+ * Programmer: Albert Cheng
* June 27, 1998
*
*-------------------------------------------------------------------------
@@ -2906,7 +2906,7 @@ H5D__chunk_lookup(const H5D_t *dset, const hsize_t *scaled,
H5O_storage_chunk_t *sc = &(dset->shared->layout.storage.u.chunk);
unsigned idx; /* Index of chunk in cache, if present */
hbool_t found = FALSE; /* In cache? */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -3026,18 +3026,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__chunk_lookup() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_flush_entry
+ * Function: H5D__chunk_flush_entry
*
- * Purpose: Writes a chunk to disk. If RESET is non-zero then the
- * entry is cleared -- it's slightly faster to flush a chunk if
- * the RESET flag is turned on because it results in one fewer
- * memory copy.
+ * Purpose: Writes a chunk to disk. If RESET is non-zero then the
+ * entry is cleared -- it's slightly faster to flush a chunk if
+ * the RESET flag is turned on because it results in one fewer
+ * memory copy.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, May 21, 1998
*
*-------------------------------------------------------------------------
@@ -3045,10 +3045,10 @@ done:
static herr_t
H5D__chunk_flush_entry(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t reset)
{
- void *buf = NULL; /* Temporary buffer */
- hbool_t point_of_no_return = FALSE;
+ void *buf = NULL; /* Temporary buffer */
+ hbool_t point_of_no_return = FALSE;
H5O_storage_chunk_t *sc = &(dset->shared->layout.storage.u.chunk);
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC_TAG(dset->oloc.addr)
@@ -3061,7 +3061,7 @@ H5D__chunk_flush_entry(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t reset)
buf = ent->chunk;
if(ent->dirty) {
H5D_chk_idx_info_t idx_info; /* Chunked index info */
- H5D_chunk_ud_t udata; /* pass through B-tree */
+ H5D_chunk_ud_t udata; /* pass through B-tree */
hbool_t must_alloc = FALSE; /* Whether the chunk must be allocated */
hbool_t need_insert = FALSE; /* Whether the chunk needs to be inserted into the index */
@@ -3079,7 +3079,7 @@ H5D__chunk_flush_entry(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t reset)
&& !(ent->edge_chunk_state & H5D_RDCC_DISABLE_FILTERS)) {
H5Z_EDC_t err_detect; /* Error detection info */
H5Z_cb_t filter_cb; /* I/O filter callback function */
- size_t alloc = udata.chunk_block.length; /* Bytes allocated for BUF */
+ size_t alloc = udata.chunk_block.length; /* Bytes allocated for BUF */
size_t nbytes; /* Chunk size (in bytes) */
/* Retrieve filter settings from API context */
@@ -3217,7 +3217,7 @@ done:
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5D__chunk_flush_entry() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__chunk_cache_evict
*
@@ -3297,17 +3297,17 @@ H5D__chunk_cache_evict(const H5D_t *dset, H5D_rdcc_ent_t *ent,
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_cache_evict() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_cache_prune
+ * Function: H5D__chunk_cache_prune
*
- * Purpose: Prune the cache by preempting some things until the cache has
- * room for something which is SIZE bytes. Only unlocked
- * entries are considered for preemption.
+ * Purpose: Prune the cache by preempting some things until the cache has
+ * room for something which is SIZE bytes. Only unlocked
+ * entries are considered for preemption.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, May 21, 1998
*
*-------------------------------------------------------------------------
@@ -3315,13 +3315,13 @@ H5D__chunk_cache_evict(const H5D_t *dset, H5D_rdcc_ent_t *ent,
static herr_t
H5D__chunk_cache_prune(const H5D_t *dset, size_t size)
{
- const H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk);
- size_t total = rdcc->nbytes_max;
- const int nmeth = 2; /*number of methods */
- int w[1]; /*weighting as an interval */
- H5D_rdcc_ent_t *p[2], *cur; /*list pointers */
- H5D_rdcc_ent_t *n[2]; /*list next pointers */
- int nerrors = 0; /* Accumulated error count during preemptions */
+ const H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk);
+ size_t total = rdcc->nbytes_max;
+ const int nmeth = 2; /*number of methods */
+ int w[1]; /*weighting as an interval */
+ H5D_rdcc_ent_t *p[2], *cur; /*list pointers */
+ H5D_rdcc_ent_t *n[2]; /*list next pointers */
+ int nerrors = 0; /* Accumulated error count during preemptions */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -3343,91 +3343,91 @@ H5D__chunk_cache_prune(const H5D_t *dset, size_t size)
while((p[0] || p[1]) && (rdcc->nbytes_used + size) > total) {
int i; /* Local index variable */
- /* Introduce new pointers */
- for(i = 0; i < nmeth - 1; i++)
+ /* Introduce new pointers */
+ for(i = 0; i < nmeth - 1; i++)
if(0 == w[i])
p[i + 1] = rdcc->head;
- /* Compute next value for each pointer */
- for(i = 0; i < nmeth; i++)
+ /* Compute next value for each pointer */
+ for(i = 0; i < nmeth; i++)
n[i] = p[i] ? p[i]->next : NULL;
- /* Give each method a chance */
- for(i = 0; i < nmeth && (rdcc->nbytes_used + size) > total; i++) {
- if(0 == i && p[0] && !p[0]->locked &&
+ /* Give each method a chance */
+ for(i = 0; i < nmeth && (rdcc->nbytes_used + size) > total; i++) {
+ if(0 == i && p[0] && !p[0]->locked &&
((0 == p[0]->rd_count && 0 == p[0]->wr_count) ||
(0 == p[0]->rd_count && dset->shared->layout.u.chunk.size == p[0]->wr_count) ||
(dset->shared->layout.u.chunk.size == p[0]->rd_count && 0 == p[0]->wr_count))) {
- /*
- * Method 0: Preempt entries that have been completely written
- * and/or completely read but not entries that are partially
- * written or partially read.
- */
- cur = p[0];
- } else if(1 == i && p[1] && !p[1]->locked) {
- /*
- * Method 1: Preempt the entry without regard to
- * considerations other than being locked. This is the last
- * resort preemption.
- */
- cur = p[1];
- } else {
- /* Nothing to preempt at this point */
- cur = NULL;
- }
-
- if(cur) {
+ /*
+ * Method 0: Preempt entries that have been completely written
+ * and/or completely read but not entries that are partially
+ * written or partially read.
+ */
+ cur = p[0];
+ } else if(1 == i && p[1] && !p[1]->locked) {
+ /*
+ * Method 1: Preempt the entry without regard to
+ * considerations other than being locked. This is the last
+ * resort preemption.
+ */
+ cur = p[1];
+ } else {
+ /* Nothing to preempt at this point */
+ cur = NULL;
+ }
+
+ if(cur) {
int j; /* Local index variable */
- for(j = 0; j < nmeth; j++) {
- if(p[j] == cur)
+ for(j = 0; j < nmeth; j++) {
+ if(p[j] == cur)
p[j] = NULL;
- if(n[j] == cur)
+ if(n[j] == cur)
n[j] = cur->next;
- } /* end for */
- if(H5D__chunk_cache_evict(dset, cur, TRUE) < 0)
+ } /* end for */
+ if(H5D__chunk_cache_evict(dset, cur, TRUE) < 0)
nerrors++;
- } /* end if */
- } /* end for */
+ } /* end if */
+ } /* end for */
- /* Advance pointers */
- for(i = 0; i < nmeth; i++)
+ /* Advance pointers */
+ for(i = 0; i < nmeth; i++)
p[i] = n[i];
- for(i = 0; i < nmeth - 1; i++)
+ for(i = 0; i < nmeth - 1; i++)
w[i] -= 1;
} /* end while */
if(nerrors)
- HGOTO_ERROR(H5E_IO, H5E_CANTFLUSH, FAIL, "unable to preempt one or more raw data cache entry")
+ HGOTO_ERROR(H5E_IO, H5E_CANTFLUSH, FAIL, "unable to preempt one or more raw data cache entry")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_cache_prune() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_lock
+ * Function: H5D__chunk_lock
*
- * Purpose: Return a pointer to a dataset chunk. The pointer points
- * directly into the chunk cache and should not be freed
- * by the caller but will be valid until it is unlocked. The
- * input value IDX_HINT is used to speed up cache lookups and
- * it's output value should be given to H5D__chunk_unlock().
- * IDX_HINT is ignored if it is out of range, and if it points
- * to the wrong entry then we fall back to the normal search
- * method.
+ * Purpose: Return a pointer to a dataset chunk. The pointer points
+ * directly into the chunk cache and should not be freed
+ * by the caller but will be valid until it is unlocked. The
+ * input value IDX_HINT is used to speed up cache lookups and
+ * it's output value should be given to H5D__chunk_unlock().
+ * IDX_HINT is ignored if it is out of range, and if it points
+ * to the wrong entry then we fall back to the normal search
+ * method.
*
- * If RELAX is non-zero and the chunk isn't in the cache then
- * don't try to read it from the file, but just allocate an
- * uninitialized buffer to hold the result. This is intended
- * for output functions that are about to overwrite the entire
- * chunk.
+ * If RELAX is non-zero and the chunk isn't in the cache then
+ * don't try to read it from the file, but just allocate an
+ * uninitialized buffer to hold the result. This is intended
+ * for output functions that are about to overwrite the entire
+ * chunk.
*
- * Return: Success: Ptr to a file chunk.
+ * Return: Success: Ptr to a file chunk.
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, May 21, 1998
*
*-------------------------------------------------------------------------
@@ -3443,12 +3443,12 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata,
const H5O_fill_t *fill = &(dset->shared->dcpl_cache.fill); /* Fill value info */
H5D_fill_buf_info_t fb_info; /* Dataset's fill buffer info */
hbool_t fb_info_init = FALSE; /* Whether the fill value buffer has been initialized */
- H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /*raw data chunk cache*/
- H5D_rdcc_ent_t *ent; /*cache entry */
- size_t chunk_size; /*size of a chunk */
+ H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /*raw data chunk cache*/
+ H5D_rdcc_ent_t *ent; /*cache entry */
+ size_t chunk_size; /*size of a chunk */
hbool_t disable_filters = FALSE; /* Whether to disable filters (when adding to cache) */
- void *chunk = NULL; /*the file chunk */
- void *ret_value = NULL; /* Return value */
+ void *chunk = NULL; /*the file chunk */
+ void *ret_value = NULL; /* Return value */
FUNC_ENTER_STATIC
@@ -3475,7 +3475,7 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata,
#ifndef NDEBUG
{
- unsigned u; /*counters */
+ unsigned u; /*counters */
/* Make sure this is the right chunk */
for(u = 0; u < layout->u.chunk.ndims - 1; u++)
@@ -3633,8 +3633,8 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata,
/* Check if the chunk exists on disk */
if(H5F_addr_defined(chunk_addr)) {
- size_t my_chunk_alloc = chunk_alloc; /* Allocated buffer size */
- size_t buf_alloc = chunk_alloc; /* [Re-]allocated buffer size */
+ size_t my_chunk_alloc = chunk_alloc; /* Allocated buffer size */
+ size_t buf_alloc = chunk_alloc; /* [Re-]allocated buffer size */
/* Chunk size on disk isn't [likely] the same size as the final chunk
* size in memory, so allocate memory big enough. */
@@ -3674,7 +3674,7 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata,
rdcc->stats.nmisses++;
} /* end if */
else {
- H5D_fill_value_t fill_status;
+ H5D_fill_value_t fill_status;
/* Sanity check */
HDassert(fill->alloc_time != H5D_ALLOC_TIME_EARLY);
@@ -3808,25 +3808,25 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_lock() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_unlock
+ * Function: H5D__chunk_unlock
*
- * Purpose: Unlocks a previously locked chunk. The LAYOUT, COMP, and
- * OFFSET arguments should be the same as for H5D__chunk_lock().
- * The DIRTY argument should be set to non-zero if the chunk has
- * been modified since it was locked. The IDX_HINT argument is
- * the returned index hint from the lock operation and BUF is
- * the return value from the lock.
+ * Purpose: Unlocks a previously locked chunk. The LAYOUT, COMP, and
+ * OFFSET arguments should be the same as for H5D__chunk_lock().
+ * The DIRTY argument should be set to non-zero if the chunk has
+ * been modified since it was locked. The IDX_HINT argument is
+ * the returned index hint from the lock operation and BUF is
+ * the return value from the lock.
*
- * The NACCESSED argument should be the number of bytes accessed
- * for reading or writing (depending on the value of DIRTY).
- * It's only purpose is to provide additional information to the
- * preemption policy.
+ * The NACCESSED argument should be the number of bytes accessed
+ * for reading or writing (depending on the value of DIRTY).
+ * It's only purpose is to provide additional information to the
+ * preemption policy.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, May 21, 1998
*
*-------------------------------------------------------------------------
@@ -3836,7 +3836,7 @@ H5D__chunk_unlock(const H5D_io_info_t *io_info, const H5D_chunk_ud_t *udata,
hbool_t dirty, void *chunk, uint32_t naccessed)
{
const H5O_layout_t *layout = &(io_info->dset->shared->layout); /* Dataset layout */
- const H5D_rdcc_t *rdcc = &(io_info->dset->shared->cache.chunk);
+ const H5D_rdcc_t *rdcc = &(io_info->dset->shared->cache.chunk);
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -3874,9 +3874,9 @@ H5D__chunk_unlock(const H5D_io_info_t *io_info, const H5D_chunk_ud_t *udata,
fake_ent.edge_chunk_state = H5D_RDCC_DISABLE_FILTERS;
if(udata->new_unfilt_chunk)
fake_ent.edge_chunk_state |= H5D_RDCC_NEWLY_DISABLED_FILTERS;
- HDmemcpy(fake_ent.scaled, udata->common.scaled, sizeof(hsize_t) * layout->u.chunk.ndims);
+ HDmemcpy(fake_ent.scaled, udata->common.scaled, sizeof(hsize_t) * layout->u.chunk.ndims);
HDassert(layout->u.chunk.size > 0);
- fake_ent.chunk_idx = udata->chunk_idx;
+ fake_ent.chunk_idx = udata->chunk_idx;
fake_ent.chunk_block.offset = udata->chunk_block.offset;
fake_ent.chunk_block.length = udata->chunk_block.length;
fake_ent.chunk = (uint8_t *)chunk;
@@ -3887,16 +3887,16 @@ H5D__chunk_unlock(const H5D_io_info_t *io_info, const H5D_chunk_ud_t *udata,
else {
if(chunk)
chunk = H5D__chunk_mem_xfree(chunk, (is_unfiltered_edge_chunk ? NULL
- : &(io_info->dset->shared->dcpl_cache.pline)));
+ : &(io_info->dset->shared->dcpl_cache.pline)));
} /* end else */
} /* end if */
else {
- H5D_rdcc_ent_t *ent; /* Chunk's entry in the cache */
+ H5D_rdcc_ent_t *ent; /* Chunk's entry in the cache */
/* Sanity check */
- HDassert(udata->idx_hint < rdcc->nslots);
- HDassert(rdcc->slot[udata->idx_hint]);
- HDassert(rdcc->slot[udata->idx_hint]->chunk == chunk);
+ HDassert(udata->idx_hint < rdcc->nslots);
+ HDassert(rdcc->slot[udata->idx_hint]);
+ HDassert(rdcc->slot[udata->idx_hint]->chunk == chunk);
/*
* It's in the cache so unlock it.
@@ -3916,16 +3916,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_unlock() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_allocated_cb
+ * Function: H5D__chunk_allocated_cb
*
- * Purpose: Simply counts the number of chunks for a dataset.
+ * Purpose: Simply counts the number of chunks for a dataset.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, April 21, 1999
*
*-------------------------------------------------------------------------
@@ -3942,17 +3942,17 @@ H5D__chunk_allocated_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
FUNC_LEAVE_NOAPI(H5_ITER_CONT)
} /* H5D__chunk_allocated_cb() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_allocated
+ * Function: H5D__chunk_allocated
*
- * Purpose: Return the number of bytes allocated in the file for storage
- * of raw data in the chunked dataset
+ * Purpose: Return the number of bytes allocated in the file for storage
+ * of raw data in the chunked dataset
*
- * Return: Success: Number of bytes stored in all chunks.
- * Failure: 0
+ * Return: Success: Number of bytes stored in all chunks.
+ * Failure: 0
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, May 20, 2008
*
*-------------------------------------------------------------------------
@@ -3961,7 +3961,7 @@ herr_t
H5D__chunk_allocated(const H5D_t *dset, hsize_t *nbytes)
{
H5D_chk_idx_info_t idx_info; /* Chunked index info */
- const H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /* Raw data chunk cache */
+ const H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /* Raw data chunk cache */
H5D_rdcc_ent_t *ent; /* Cache entry */
hsize_t chunk_bytes = 0; /* Number of bytes allocated for chunks */
H5O_storage_chunk_t *sc = &(dset->shared->layout.storage.u.chunk);
@@ -3996,18 +3996,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_allocated() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_allocate
+ * Function: H5D__chunk_allocate
*
- * Purpose: Allocate file space for all chunks that are not allocated yet.
- * Return SUCCEED if all needed allocation succeed, otherwise
- * FAIL.
+ * Purpose: Allocate file space for all chunks that are not allocated yet.
+ * Return SUCCEED if all needed allocation succeed, otherwise
+ * FAIL.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Albert Cheng
- * June 26, 1998
+ * Programmer: Albert Cheng
+ * June 26, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4019,8 +4019,8 @@ H5D__chunk_allocate(const H5D_io_info_t *io_info, hbool_t full_overwrite, hsize_
const H5D_chunk_ops_t *ops = dset->shared->layout.storage.u.chunk.ops; /* Chunk operations */
hsize_t min_unalloc[H5O_LAYOUT_NDIMS]; /* First chunk in each dimension that is unallocated (in scaled coordinates) */
hsize_t max_unalloc[H5O_LAYOUT_NDIMS]; /* Last chunk in each dimension that is unallocated (in scaled coordinates) */
- hsize_t scaled[H5O_LAYOUT_NDIMS]; /* Offset of current chunk (in scaled coordinates) */
- size_t orig_chunk_size; /* Original size of chunk in bytes */
+ hsize_t scaled[H5O_LAYOUT_NDIMS]; /* Offset of current chunk (in scaled coordinates) */
+ size_t orig_chunk_size; /* Original size of chunk in bytes */
size_t chunk_size; /* Actual size of chunk in bytes, possibly filtered */
unsigned filter_mask = 0; /* Filter mask for chunks that have them */
const H5O_layout_t *layout = &(dset->shared->layout); /* Dataset layout */
@@ -4036,7 +4036,7 @@ H5D__chunk_allocate(const H5D_io_info_t *io_info, hbool_t full_overwrite, hsize_
hbool_t using_mpi = FALSE; /* Flag to indicate that the file is being accessed with an MPI-capable file driver */
H5D_chunk_coll_info_t chunk_info; /* chunk address information for doing I/O */
#endif /* H5_HAVE_PARALLEL */
- hbool_t carry; /* Flag to indicate that chunk increment carrys to higher dimension (sorta) */
+ hbool_t carry; /* Flag to indicate that chunk increment carrys to higher dimension (sorta) */
unsigned space_ndims; /* Dataset's space rank */
const hsize_t *space_dim; /* Dataset's dataspace dimensions */
const uint32_t *chunk_dim = layout->u.chunk.dim; /* Convenience pointer to chunk dimensions */
@@ -4048,7 +4048,7 @@ H5D__chunk_allocate(const H5D_io_info_t *io_info, hbool_t full_overwrite, hsize_
hsize_t edge_chunk_scaled[H5O_LAYOUT_NDIMS]; /* Offset of the unfiltered edge chunks at the edge of each dimension */
unsigned nunfilt_edge_chunk_dims = 0; /* Number of dimensions on an edge */
const H5O_storage_chunk_t *sc = &(layout->storage.u.chunk);
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE_TAG(dset->oloc.addr)
@@ -4251,13 +4251,13 @@ H5D__chunk_allocate(const H5D_io_info_t *io_info, hbool_t full_overwrite, hsize_
while(!carry) {
hbool_t need_insert = FALSE; /* Whether the chunk needs to be inserted into the index */
- /* Look up this chunk */
- if(H5D__chunk_lookup(dset, scaled, &udata) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address")
+ /* Look up this chunk */
+ if(H5D__chunk_lookup(dset, scaled, &udata) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address")
#ifndef NDEBUG
/* None of the chunks should be allocated */
- if(H5D_CHUNK_IDX_NONE != layout->storage.u.chunk.idx_type)
- HDassert(!H5F_addr_defined(udata.chunk_block.offset));
+ if(H5D_CHUNK_IDX_NONE != layout->storage.u.chunk.idx_type)
+ HDassert(!H5F_addr_defined(udata.chunk_block.offset));
/* Make sure the chunk is really in the dataset and outside the
* original dimensions */
@@ -4336,8 +4336,8 @@ H5D__chunk_allocate(const H5D_io_info_t *io_info, hbool_t full_overwrite, hsize_
udata.filter_mask = filter_mask;
/* Allocate the chunk (with all processes) */
- if(H5D__chunk_file_alloc(&idx_info, NULL, &udata.chunk_block, &need_insert, scaled) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert/resize chunk on chunk level")
+ if(H5D__chunk_file_alloc(&idx_info, NULL, &udata.chunk_block, &need_insert, scaled) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert/resize chunk on chunk level")
HDassert(H5F_addr_defined(udata.chunk_block.offset));
/* Check if fill values should be written to chunks */
@@ -4376,7 +4376,7 @@ H5D__chunk_allocate(const H5D_io_info_t *io_info, hbool_t full_overwrite, hsize_
} /* end if */
/* Insert the chunk record into the index */
- if(need_insert && ops->insert)
+ if(need_insert && ops->insert)
if((ops->insert)(&idx_info, &udata, dset) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert chunk addr into index")
@@ -4455,7 +4455,7 @@ done:
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5D__chunk_allocate() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__chunk_update_old_edge_chunks
*
@@ -4542,12 +4542,12 @@ H5D__chunk_update_old_edge_chunks(H5D_t *dset, hsize_t old_dim[])
/* Calculate offset of first previously incomplete chunk in this
* dimension */
- old_edge_chunk_sc[op_dim] = (old_dim[op_dim] / chunk_dim[op_dim]);
+ old_edge_chunk_sc[op_dim] = (old_dim[op_dim] / chunk_dim[op_dim]);
/* Calculate the largest offset of chunks that might need to be
* modified in this dimension */
- max_edge_chunk_sc[op_dim] = MIN((old_dim[op_dim] - 1) / chunk_dim[op_dim],
- MAX((space_dim[op_dim] / chunk_dim[op_dim]), 1) - 1);
+ max_edge_chunk_sc[op_dim] = MIN((old_dim[op_dim] - 1) / chunk_dim[op_dim],
+ MAX((space_dim[op_dim] / chunk_dim[op_dim]), 1) - 1);
/* Check for old_dim aligned with chunk boundary in this dimension, if
* so we do not need to modify chunks along the edge in this dimension
@@ -4557,7 +4557,7 @@ H5D__chunk_update_old_edge_chunks(H5D_t *dset, hsize_t old_dim[])
/* Check if the dataspace expanded enough to cause the old edge chunks
* in this dimension to become full */
- if((space_dim[op_dim]/chunk_dim[op_dim]) >= (old_edge_chunk_sc[op_dim] + 1))
+ if((space_dim[op_dim]/chunk_dim[op_dim]) >= (old_edge_chunk_sc[op_dim] + 1))
new_full_dim[op_dim] = TRUE;
} /* end for */
@@ -4605,7 +4605,7 @@ H5D__chunk_update_old_edge_chunks(H5D_t *dset, hsize_t old_dim[])
carry = TRUE;
for(i = ((int)space_ndims - 1); i >= 0; --i) {
if((unsigned)i != op_dim) {
- ++chunk_sc[i];
+ ++chunk_sc[i];
if(chunk_sc[i] > (hsize_t) max_edge_chunk_sc[i])
chunk_sc[i] = 0;
else {
@@ -4633,18 +4633,18 @@ done:
} /* end H5D__chunk_update_old_edge_chunks() */
#ifdef H5_HAVE_PARALLEL
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_collective_fill
+ * Function: H5D__chunk_collective_fill
*
* Purpose: Use MPIO collective write to fill the chunks (if number of
- * chunks to fill is greater than the number of MPI procs;
+ * chunks to fill is greater than the number of MPI procs;
* otherwise use independent I/O).
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
- * July 30, 2014
+ * Programmer: Mohamad Chaarawi
+ * July 30, 2014
*
*-------------------------------------------------------------------------
*/
@@ -4652,7 +4652,7 @@ static herr_t
H5D__chunk_collective_fill(const H5D_t *dset, H5D_chunk_coll_info_t *chunk_info,
size_t chunk_size, const void *fill_buf)
{
- MPI_Comm mpi_comm = MPI_COMM_NULL; /* MPI communicator for file */
+ MPI_Comm mpi_comm = MPI_COMM_NULL; /* MPI communicator for file */
int mpi_rank = (-1); /* This process's rank */
int mpi_size = (-1); /* MPI Comm size */
int mpi_code; /* MPI return code */
@@ -4720,13 +4720,13 @@ H5D__chunk_collective_fill(const H5D_t *dset, H5D_chunk_coll_info_t *chunk_info,
distributing. If there are, then round robin the distribution
to processes 0 -> leftover. */
if(leftover && leftover > mpi_rank) {
- chunk_disp_array[blocks] = (MPI_Aint)chunk_info->addr[blocks*mpi_size + mpi_rank];
+ chunk_disp_array[blocks] = (MPI_Aint)chunk_info->addr[blocks*mpi_size + mpi_rank];
block_lens[blocks] = block_len;
blocks++;
}
- /* MSC
- * should use this if MPI_type_create_hindexed block is working
+ /* MSC
+ * should use this if MPI_type_create_hindexed block is working
* mpi_code = MPI_Type_create_hindexed_block(blocks, block_len, chunk_disp_array, MPI_BYTE, &file_type);
*/
mpi_code = MPI_Type_create_hindexed(blocks, block_lens, chunk_disp_array, MPI_BYTE, &file_type);
@@ -4782,17 +4782,17 @@ done:
} /* end H5D__chunk_collective_fill() */
#endif /* H5_HAVE_PARALLEL */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_prune_fill
+ * Function: H5D__chunk_prune_fill
*
- * Purpose: Write the fill value to the parts of the chunk that are no
+ * Purpose: Write the fill value to the parts of the chunk that are no
* longer part of the dataspace
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
- * March 26, 2002
+ * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ * March 26, 2002
*
*-------------------------------------------------------------------------
*/
@@ -4809,7 +4809,7 @@ H5D__chunk_prune_fill(H5D_chunk_it_ud1_t *udata, hbool_t new_unfilt_chunk)
hssize_t sel_nelmts; /* Number of elements in selection */
hsize_t count[H5O_LAYOUT_NDIMS]; /* Element count of hyperslab */
size_t chunk_size; /*size of a chunk */
- void *chunk; /* The file chunk */
+ void *chunk; /* The file chunk */
H5D_chunk_ud_t chk_udata; /* User data for locking chunk */
uint32_t bytes_accessed; /* Bytes accessed in chunk */
unsigned u; /* Local index variable */
@@ -4909,18 +4909,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__chunk_prune_fill */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_prune_by_extent
+ * Function: H5D__chunk_prune_by_extent
*
- * Purpose: This function searches for chunks that are no longer necessary
+ * Purpose: This function searches for chunks that are no longer necessary
* both in the raw data cache and in the chunk index.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
- * Algorithm: Robb Matzke
- * March 27, 2002
+ * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ * Algorithm: Robb Matzke
+ * March 27, 2002
*
* The algorithm is:
*
@@ -5022,7 +5022,7 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
H5D_io_info_t chk_io_info; /* Chunked I/O info object */
H5D_storage_t chk_store; /* Chunk storage information */
const H5O_layout_t *layout = &(dset->shared->layout); /* Dataset's layout */
- const H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /*raw data chunk cache */
+ const H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /*raw data chunk cache */
unsigned space_ndims; /* Dataset's space rank */
const hsize_t *space_dim; /* Current dataspace dimensions */
unsigned op_dim; /* Current operating dimension */
@@ -5037,7 +5037,7 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
uint32_t elmts_per_chunk; /* Elements in chunk */
hbool_t disable_edge_filters = FALSE; /* Whether to disable filters on partial edge chunks */
hbool_t new_unfilt_chunk = FALSE; /* Whether the chunk is newly unfiltered */
- unsigned u; /* Local index variable */
+ unsigned u; /* Local index variable */
const H5O_storage_chunk_t *sc = &(layout->storage.u.chunk);
herr_t ret_value = SUCCEED; /* Return value */
@@ -5071,13 +5071,13 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
elmts_per_chunk = 1;
for(u = 0; u < space_ndims; u++) {
elmts_per_chunk *= layout->u.chunk.dim[u];
- chunk_dim[u] = layout->u.chunk.dim[u];
- shrunk_dim[u] = (space_dim[u] < old_dim[u]);
+ chunk_dim[u] = layout->u.chunk.dim[u];
+ shrunk_dim[u] = (space_dim[u] < old_dim[u]);
} /* end for */
/* Create a dataspace for a chunk & set the extent */
if(NULL == (chunk_space = H5S_create_simple(space_ndims, chunk_dim, NULL)))
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace")
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace")
/* Reset hyperslab start array */
/* (hyperslabs will always start from origin) */
@@ -5200,11 +5200,11 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
} /* end if */
else
dims_outside_fill[u] = FALSE;
- } /* end if */
+ } /* end if */
carry = FALSE;
while(!carry) {
- int i; /* Local index variable */
+ int i; /* Local index variable */
udata.common.scaled = scaled;
@@ -5265,7 +5265,7 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
/* Remove the chunk from disk, if present */
if(H5F_addr_defined(chk_udata.chunk_block.offset)) {
/* Update the offset in idx_udata */
- idx_udata.scaled = udata.common.scaled;
+ idx_udata.scaled = udata.common.scaled;
/* Remove the chunk from disk */
if((layout->storage.u.chunk.ops->remove)(&idx_info, &idx_udata) < 0)
@@ -5333,16 +5333,16 @@ done:
} /* end H5D__chunk_prune_by_extent() */
#ifdef H5_HAVE_PARALLEL
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_addrmap_cb
+ * Function: H5D__chunk_addrmap_cb
*
* Purpose: Callback when obtaining the chunk addresses for all existing chunks
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Kent Yang
+ * Programmer: Kent Yang
* Tuesday, November 15, 2005
*
*-------------------------------------------------------------------------
@@ -5350,7 +5350,7 @@ done:
static int
H5D__chunk_addrmap_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
{
- H5D_chunk_it_ud2_t *udata = (H5D_chunk_it_ud2_t *)_udata; /* User data for callback */
+ H5D_chunk_it_ud2_t *udata = (H5D_chunk_it_ud2_t *)_udata; /* User data for callback */
unsigned rank = udata->common.layout->ndims - 1; /* # of dimensions of dataset */
hsize_t chunk_index;
int ret_value = H5_ITER_CONT; /* Return value */
@@ -5367,14 +5367,14 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__chunk_addrmap_cb() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_addrmap
+ * Function: H5D__chunk_addrmap
*
* Purpose: Obtain the chunk addresses for all existing chunks
*
- * Return: Success: Non-negative on succeed.
- * Failure: negative value
+ * Return: Success: Non-negative on succeed.
+ * Failure: negative value
*
* Programmer: Kent Yang
* November 15, 2005
@@ -5386,7 +5386,7 @@ H5D__chunk_addrmap(const H5D_io_info_t *io_info, haddr_t chunk_addr[])
{
H5D_chk_idx_info_t idx_info; /* Chunked index info */
const H5D_t *dset = io_info->dset; /* Local pointer to dataset info */
- H5D_chunk_it_ud2_t udata; /* User data for iteration callback */
+ H5D_chunk_it_ud2_t udata; /* User data for iteration callback */
H5O_storage_chunk_t *sc = &(dset->shared->layout.storage.u.chunk);
herr_t ret_value = SUCCEED; /* Return value */
@@ -5418,16 +5418,16 @@ done:
} /* end H5D__chunk_addrmap() */
#endif /* H5_HAVE_PARALLEL */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_delete
+ * Function: H5D__chunk_delete
*
- * Purpose: Delete raw data storage for entire dataset (i.e. all chunks)
+ * Purpose: Delete raw data storage for entire dataset (i.e. all chunks)
*
- * Return: Success: Non-negative
- * Failure: negative
+ * Return: Success: Non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, March 20, 2003
*
*-------------------------------------------------------------------------
@@ -5440,7 +5440,7 @@ H5D__chunk_delete(H5F_t *f, H5O_t *oh, H5O_storage_t *storage)
hbool_t layout_read = FALSE; /* Whether the layout message was read from the file */
H5O_pline_t pline; /* I/O pipeline message */
hbool_t pline_read = FALSE; /* Whether the I/O pipeline message was read from the file */
- htri_t exists; /* Flag if header message of interest exists */
+ htri_t exists; /* Flag if header message of interest exists */
H5O_storage_chunk_t *sc = &(storage->u.chunk);
herr_t ret_value = SUCCEED; /* Return value */
@@ -5496,17 +5496,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_delete() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_update_cache
+ * Function: H5D__chunk_update_cache
*
- * Purpose: Update any cached chunks index values after the dataspace
+ * Purpose: Update any cached chunks index values after the dataspace
* size has changed
*
- * Return: Success: Non-negative
- * Failure: negative
+ * Return: Success: Non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, May 29, 2004
*
*-------------------------------------------------------------------------
@@ -5514,8 +5514,8 @@ done:
herr_t
H5D__chunk_update_cache(H5D_t *dset)
{
- H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /*raw data chunk cache */
- H5D_rdcc_ent_t *ent, *next; /*cache entry */
+ H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /*raw data chunk cache */
+ H5D_rdcc_ent_t *ent, *next; /*cache entry */
H5D_rdcc_ent_t tmp_head; /* Sentinel entry for temporary entry list */
H5D_rdcc_ent_t *tmp_tail; /* Tail pointer for temporary entry list */
herr_t ret_value = SUCCEED; /* Return value */
@@ -5536,7 +5536,7 @@ H5D__chunk_update_cache(H5D_t *dset)
/* Recompute the index for each cached chunk that is in a dataset */
for(ent = rdcc->head; ent; ent = next) {
- unsigned old_idx; /* Previous index number */
+ unsigned old_idx; /* Previous index number */
/* Get the pointer to the next cache entry */
next = ent->next;
@@ -5546,7 +5546,7 @@ H5D__chunk_update_cache(H5D_t *dset)
ent->idx = H5D__chunk_hash_val(dset->shared, ent->scaled);
if(old_idx != ent->idx) {
- H5D_rdcc_ent_t *old_ent; /* Old cache entry */
+ H5D_rdcc_ent_t *old_ent; /* Old cache entry */
/* Check if there is already a chunk at this chunk's new location */
old_ent = rdcc->slot[ent->idx];
@@ -5609,7 +5609,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_update_cache() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__chunk_copy_cb
*
@@ -5658,7 +5658,7 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
if(pline && pline->nused) {
must_filter = TRUE;
if( (udata->common.layout->flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS) &&
- (H5D__chunk_is_partial_edge_chunk(udata->dset_ndims, udata->common.layout->dim,
+ (H5D__chunk_is_partial_edge_chunk(udata->dset_ndims, udata->common.layout->dim,
chunk_rec->scaled, udata->dset_dims)) )
must_filter = FALSE;
}
@@ -5823,8 +5823,8 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
udata->chunk_in_cache = FALSE;
- udata_dst.chunk_idx = H5VM_array_offset_pre(udata_dst.common.layout->ndims - 1,
- udata_dst.common.layout->max_down_chunks, udata_dst.common.scaled);
+ udata_dst.chunk_idx = H5VM_array_offset_pre(udata_dst.common.layout->ndims - 1,
+ udata_dst.common.layout->max_down_chunks, udata_dst.common.scaled);
/* Allocate chunk in the file */
if(H5D__chunk_file_alloc(udata->idx_info_dst, NULL, &udata_dst.chunk_block, &need_insert, udata_dst.common.scaled) < 0)
@@ -5850,17 +5850,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_copy_cb() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_copy
+ * Function: H5D__chunk_copy
*
- * Purpose: Copy chunked storage from SRC file to DST file.
+ * Purpose: Copy chunked storage from SRC file to DST file.
*
- * Return: Success: Non-negative
- * Failure: negative
+ * Return: Success: Non-negative
+ * Failure: negative
*
* Programmer: Peter Cao
- * August 20, 2005
+ * August 20, 2005
*
*-------------------------------------------------------------------------
*/
@@ -6134,7 +6134,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_copy() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__chunk_bh_info
*
@@ -6194,18 +6194,18 @@ H5D__chunk_bh_info(const H5O_loc_t *loc, H5O_t *oh, H5O_layout_t *layout,
/* Allocate any indexing structures */
if(layout->storage.u.chunk.ops->init && (layout->storage.u.chunk.ops->init)(&idx_info, space, loc->addr) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize indexing information")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize indexing information")
idx_info_init = TRUE;
/* Get size of index structure */
if(layout->storage.u.chunk.ops->size && (layout->storage.u.chunk.ops->size)(&idx_info, index_size) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to retrieve chunk index info")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to retrieve chunk index info")
done:
/* Free resources, if they've been initialized */
if(idx_info_init && layout->storage.u.chunk.ops->dest &&
(layout->storage.u.chunk.ops->dest)(&idx_info) < 0)
- HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to release chunk index info")
+ HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to release chunk index info")
if(pline_read && H5O_msg_reset(H5O_PLINE_ID, &pline) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTRESET, FAIL, "unable to reset I/O pipeline message")
if(space && H5S_close(space) < 0)
@@ -6214,18 +6214,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_bh_info() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_dump_index_cb
+ * Function: H5D__chunk_dump_index_cb
*
- * Purpose: If the UDATA.STREAM member is non-null then debugging
+ * Purpose: If the UDATA.STREAM member is non-null then debugging
* information is written to that stream.
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, April 21, 1999
*
*-------------------------------------------------------------------------
@@ -6233,7 +6233,7 @@ done:
static int
H5D__chunk_dump_index_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
{
- H5D_chunk_it_ud4_t *udata = (H5D_chunk_it_ud4_t *)_udata; /* User data from caller */
+ H5D_chunk_it_ud4_t *udata = (H5D_chunk_it_ud4_t *)_udata; /* User data from caller */
FUNC_ENTER_STATIC_NOERR
@@ -6259,17 +6259,17 @@ H5D__chunk_dump_index_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
FUNC_LEAVE_NOAPI(H5_ITER_CONT)
} /* H5D__chunk_dump_index_cb() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_dump_index
+ * Function: H5D__chunk_dump_index
*
- * Purpose: Prints information about the storage index to the specified
- * stream.
+ * Purpose: Prints information about the storage index to the specified
+ * stream.
*
- * Return: Success: Non-negative
- * Failure: negative
+ * Return: Success: Non-negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, April 28, 1999
*
*-------------------------------------------------------------------------
@@ -6317,17 +6317,17 @@ done:
} /* end H5D__chunk_dump_index() */
#ifdef H5D_CHUNK_DEBUG
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__chunk_stats
+ * Function: H5D__chunk_stats
*
- * Purpose: Print raw data cache statistics to the debug stream. If
- * HEADERS is non-zero then print table column headers,
- * otherwise assume that the H5AC layer has already printed them.
+ * Purpose: Print raw data cache statistics to the debug stream. If
+ * HEADERS is non-zero then print table column headers,
+ * otherwise assume that the H5AC layer has already printed them.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, May 21, 1998
*
*-------------------------------------------------------------------------
@@ -6335,9 +6335,9 @@ done:
herr_t
H5D__chunk_stats(const H5D_t *dset, hbool_t headers)
{
- H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk);
- double miss_rate;
- char ascii[32];
+ H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk);
+ double miss_rate;
+ char ascii[32];
herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -6346,10 +6346,10 @@ H5D__chunk_stats(const H5D_t *dset, hbool_t headers)
HGOTO_DONE(SUCCEED)
if (headers) {
- fprintf(H5DEBUG(AC), "H5D: raw data cache statistics\n");
- fprintf(H5DEBUG(AC), " %-18s %8s %8s %8s %8s+%-8s\n",
+ HDfprintf(H5DEBUG(AC), "H5D: raw data cache statistics\n");
+ HDfprintf(H5DEBUG(AC), " %-18s %8s %8s %8s %8s+%-8s\n",
"Layer", "Hits", "Misses", "MissRate", "Inits", "Flushes");
- fprintf(H5DEBUG(AC), " %-18s %8s %8s %8s %8s-%-8s\n",
+ HDfprintf(H5DEBUG(AC), " %-18s %8s %8s %8s %8s-%-8s\n",
"-----", "----", "------", "--------", "-----", "-------");
}
@@ -6365,12 +6365,12 @@ H5D__chunk_stats(const H5D_t *dset, hbool_t headers)
miss_rate = 0.0;
}
if (miss_rate > 100) {
- sprintf(ascii, "%7d%%", (int) (miss_rate + 0.5));
+ HDsprintf(ascii, "%7d%%", (int) (miss_rate + 0.5));
} else {
- sprintf(ascii, "%7.2f%%", miss_rate);
+ HDsprintf(ascii, "%7.2f%%", miss_rate);
}
- fprintf(H5DEBUG(AC), " %-18s %8u %8u %7s %8d+%-9ld\n",
+ HDfprintf(H5DEBUG(AC), " %-18s %8u %8u %7s %8d+%-9ld\n",
"raw data chunks", rdcc->stats.nhits, rdcc->stats.nmisses, ascii,
rdcc->stats.ninits, (long)(rdcc->stats.nflushes)-(long)(rdcc->stats.ninits));
}
@@ -6380,22 +6380,22 @@ done:
} /* end H5D__chunk_stats() */
#endif /* H5D_CHUNK_DEBUG */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__nonexistent_readvv_cb
+ * Function: H5D__nonexistent_readvv_cb
*
- * Purpose: Callback operation for performing fill value I/O operation
+ * Purpose: Callback operation for performing fill value I/O operation
* on memory buffer.
*
- * Note: This algorithm is pretty inefficient about initializing and
+ * Note: This algorithm is pretty inefficient about initializing and
* terminating the fill buffer info structure and it would be
* faster to refactor this into a "real" initialization routine,
* and a "vectorized fill" routine. -QAK
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * 30 Sep 2010
+ * Programmer: Quincey Koziol
+ * 30 Sep 2010
*
*-------------------------------------------------------------------------
*/
@@ -6429,24 +6429,24 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__nonexistent_readvv_cb() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__nonexistent_readvv
+ * Function: H5D__nonexistent_readvv
*
- * Purpose: When the chunk doesn't exist on disk and the chunk is bigger
+ * Purpose: When the chunk doesn't exist on disk and the chunk is bigger
* than the cache size, performs fill value I/O operation on
* memory buffer, advancing through two I/O vectors, until one
* runs out.
*
- * Note: This algorithm is pretty inefficient about initializing and
+ * Note: This algorithm is pretty inefficient about initializing and
* terminating the fill buffer info structure and it would be
* faster to refactor this into a "real" initialization routine,
* and a "vectorized fill" routine. -QAK
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * 6 Feb 2009
+ * Programmer: Raymond Lu
+ * 6 Feb 2009
*
*-------------------------------------------------------------------------
*/
@@ -6483,7 +6483,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__nonexistent_readvv() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__chunk_is_partial_edge_chunk
*
@@ -6522,14 +6522,14 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__chunk_is_partial_edge_chunk() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__chunk_file_alloc()
*
- * Purpose: Chunk allocation:
- * Create the chunk if it doesn't exist, or reallocate the
+ * Purpose: Chunk allocation:
+ * Create the chunk if it doesn't exist, or reallocate the
* chunk if its size changed.
- * The coding is moved and modified from each index structure.
+ * The coding is moved and modified from each index structure.
*
* Return: Non-negative on success/Negative on failure
*
@@ -6541,8 +6541,8 @@ herr_t
H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old_chunk,
H5F_block_t *new_chunk, hbool_t *need_insert, hsize_t scaled[])
{
- hbool_t alloc_chunk = FALSE; /* Whether to allocate chunk */
- herr_t ret_value = SUCCEED; /* Return value */
+ hbool_t alloc_chunk = FALSE; /* Whether to allocate chunk */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -6560,7 +6560,7 @@ H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old
/* Check for filters on chunks */
if(idx_info->pline->nused > 0) {
/* Sanity/error checking block */
- HDassert(idx_info->storage->idx_type != H5D_CHUNK_IDX_NONE);
+ HDassert(idx_info->storage->idx_type != H5D_CHUNK_IDX_NONE);
{
unsigned allow_chunk_size_len; /* Allowed size of encoded chunk size */
unsigned new_chunk_size_len; /* Size of encoded chunk size */
@@ -6582,37 +6582,37 @@ H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old
HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, FAIL, "chunk size can't be encoded")
} /* end block */
- if(old_chunk && H5F_addr_defined(old_chunk->offset)) {
- /* Sanity check */
+ if(old_chunk && H5F_addr_defined(old_chunk->offset)) {
+ /* Sanity check */
HDassert(!H5F_addr_defined(new_chunk->offset) || H5F_addr_eq(new_chunk->offset, old_chunk->offset));
/* Check for chunk being same size */
- if(new_chunk->length != old_chunk->length) {
- /* Release previous chunk */
- /* Only free the old location if not doing SWMR writes - otherwise
+ if(new_chunk->length != old_chunk->length) {
+ /* Release previous chunk */
+ /* Only free the old location if not doing SWMR writes - otherwise
* we must keep the old chunk around in case a reader has an
* outdated version of the B-tree node
*/
- if(!(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE))
- if(H5MF_xfree(idx_info->f, H5FD_MEM_DRAW, old_chunk->offset, old_chunk->length) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to free chunk")
- alloc_chunk = TRUE;
- } /* end if */
+ if(!(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE))
+ if(H5MF_xfree(idx_info->f, H5FD_MEM_DRAW, old_chunk->offset, old_chunk->length) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to free chunk")
+ alloc_chunk = TRUE;
+ } /* end if */
else {
- /* Don't need to reallocate chunk, but send its address back up */
+ /* Don't need to reallocate chunk, but send its address back up */
if(!H5F_addr_defined(new_chunk->offset))
new_chunk->offset = old_chunk->offset;
- } /* end else */
- } /* end if */
+ } /* end else */
+ } /* end if */
else {
HDassert(!H5F_addr_defined(new_chunk->offset));
- alloc_chunk = TRUE;
+ alloc_chunk = TRUE;
} /* end else */
} /* end if */
else {
- HDassert(!H5F_addr_defined(new_chunk->offset));
- HDassert(new_chunk->length == idx_info->layout->size);
- alloc_chunk = TRUE;
+ HDassert(!H5F_addr_defined(new_chunk->offset));
+ HDassert(new_chunk->length == idx_info->layout->size);
+ alloc_chunk = TRUE;
} /* end else */
/* Actually allocate space for the chunk in the file */
@@ -6652,11 +6652,11 @@ H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old
HDassert(H5F_addr_defined(new_chunk->offset));
-done:
+done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__chunk_file_alloc() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__chunk_format_convert_cb
*
@@ -6674,13 +6674,13 @@ done:
static int
H5D__chunk_format_convert_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
{
- H5D_chunk_it_ud5_t *udata = (H5D_chunk_it_ud5_t *)_udata; /* User data */
- H5D_chk_idx_info_t *new_idx_info; /* The new chunk index information */
- H5D_chunk_ud_t insert_udata; /* Chunk information to be inserted */
- haddr_t chunk_addr; /* Chunk address */
- size_t nbytes; /* Chunk size */
- void *buf = NULL; /* Pointer to buffer of chunk data */
- int ret_value = H5_ITER_CONT; /* Return value */
+ H5D_chunk_it_ud5_t *udata = (H5D_chunk_it_ud5_t *)_udata; /* User data */
+ H5D_chk_idx_info_t *new_idx_info; /* The new chunk index information */
+ H5D_chunk_ud_t insert_udata; /* Chunk information to be inserted */
+ haddr_t chunk_addr; /* Chunk address */
+ size_t nbytes; /* Chunk size */
+ void *buf = NULL; /* Pointer to buffer of chunk data */
+ int ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_STATIC
@@ -6698,7 +6698,7 @@ H5D__chunk_format_convert_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
unsigned filter_mask = chunk_rec->filter_mask;
H5Z_cb_t filter_cb; /* Filter failure callback struct */
- size_t read_size = nbytes; /* Bytes to read */
+ size_t read_size = nbytes; /* Bytes to read */
HDassert(read_size == new_idx_info->layout->size);
@@ -6753,12 +6753,12 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__chunk_format_convert_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__chunk_format_convert
*
* Purpose: Iterate over the chunks for the current chunk index and insert the
- * the chunk addresses into v1 B-tree chunk index via callback.
+ * the chunk addresses into v1 B-tree chunk index via callback.
*
* Return: Non-negative on success/Negative on failure
*
@@ -6770,7 +6770,7 @@ done:
herr_t
H5D__chunk_format_convert(H5D_t *dset, H5D_chk_idx_info_t *idx_info, H5D_chk_idx_info_t *new_idx_info)
{
- H5D_chunk_it_ud5_t udata; /* User data */
+ H5D_chunk_it_ud5_t udata; /* User data */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -6785,13 +6785,13 @@ H5D__chunk_format_convert(H5D_t *dset, H5D_chk_idx_info_t *idx_info, H5D_chk_idx
/* terate over the chunks in the current index and insert the chunk addresses into version 1 B-tree index */
if((idx_info->storage->ops->iterate)(idx_info, H5D__chunk_format_convert_cb, &udata) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to iterate over chunk index to chunk info")
+ HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to iterate over chunk index to chunk info")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_format_convert() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__get_num_chunks_cb
*
@@ -6823,7 +6823,7 @@ H5D__get_num_chunks_cb(const H5D_chunk_rec_t H5_ATTR_UNUSED *chunk_rec, void *_u
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__get_num_chunks_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__get_num_chunks
*
@@ -6888,7 +6888,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__get_num_chunks() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__get_chunk_info_cb
*
@@ -6934,7 +6934,7 @@ H5D__get_chunk_info_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__get_chunk_info_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__get_chunk_info
*
@@ -7024,7 +7024,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__get_chunk_info() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__get_chunk_info_by_coord_cb
*
@@ -7072,7 +7072,7 @@ H5D__get_chunk_info_by_coord_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__get_chunk_info_by_coord_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__get_chunk_info_by_coord
*
diff --git a/src/H5Dearray.c b/src/H5Dearray.c
index a20145a..e77d968 100644
--- a/src/H5Dearray.c
+++ b/src/H5Dearray.c
@@ -11,10 +11,10 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@hdfgroup.org>
- * Tuesday, January 27, 2009
+/* Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Tuesday, January 27, 2009
*
- * Purpose: Extensible array indexed (chunked) I/O functions. The chunks
+ * Purpose: Extensible array indexed (chunked) I/O functions. The chunks
* are given a single-dimensional index which is used as the
* offset in an extensible array that maps a chunk coordinate to
* a disk address.
@@ -31,13 +31,13 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Dpkg.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5EAprivate.h" /* Extensible arrays */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5MFprivate.h" /* File space management */
-#include "H5VMprivate.h" /* Vector functions */
+#include "H5private.h" /* Generic Functions */
+#include "H5Dpkg.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5EAprivate.h" /* Extensible arrays */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5MFprivate.h" /* File space management */
+#include "H5VMprivate.h" /* Vector functions */
/****************/
@@ -182,7 +182,7 @@ const H5EA_class_t H5EA_CLS_CHUNK[1]={{
H5D__earray_fill, /* Fill block of missing elements callback */
H5D__earray_encode, /* Element encoding callback */
H5D__earray_decode, /* Element decoding callback */
- H5D__earray_debug, /* Element debugging callback */
+ H5D__earray_debug, /* Element debugging callback */
H5D__earray_crt_dbg_context, /* Create debugging context */
H5D__earray_dst_dbg_context /* Destroy debugging context */
}};
@@ -213,16 +213,16 @@ H5FL_DEFINE_STATIC(H5D_earray_ctx_t);
H5FL_DEFINE_STATIC(H5D_earray_ctx_ud_t);
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_crt_context
+ * Function: H5D__earray_crt_context
*
- * Purpose: Create context for callbacks
+ * Purpose: Create context for callbacks
*
- * Return: Success: non-NULL
- * Failure: NULL
+ * Return: Success: non-NULL
+ * Failure: NULL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, January 29, 2009
*
*-------------------------------------------------------------------------
@@ -262,16 +262,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__earray_crt_context() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_dst_context
+ * Function: H5D__earray_dst_context
*
- * Purpose: Destroy context for callbacks
+ * Purpose: Destroy context for callbacks
*
- * Return: Success: non-NULL
- * Failure: NULL
+ * Return: Success: non-NULL
+ * Failure: NULL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, January 29, 2009
*
*-------------------------------------------------------------------------
@@ -292,16 +292,16 @@ H5D__earray_dst_context(void *_ctx)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__earray_dst_context() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_fill
+ * Function: H5D__earray_fill
*
- * Purpose: Fill "missing elements" in block of elements
+ * Purpose: Fill "missing elements" in block of elements
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, January 27, 2009
*
*-------------------------------------------------------------------------
@@ -322,16 +322,16 @@ H5D__earray_fill(void *nat_blk, size_t nelmts)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__earray_fill() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_encode
+ * Function: H5D__earray_encode
*
- * Purpose: Encode an element from "native" to "raw" form
+ * Purpose: Encode an element from "native" to "raw" form
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, January 27, 2009
*
*-------------------------------------------------------------------------
@@ -366,16 +366,16 @@ H5D__earray_encode(void *raw, const void *_elmt, size_t nelmts, void *_ctx)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__earray_encode() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_decode
+ * Function: H5D__earray_decode
*
- * Purpose: Decode an element from "raw" to "native" form
+ * Purpose: Decode an element from "raw" to "native" form
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, January 29, 2009
*
*-------------------------------------------------------------------------
@@ -410,16 +410,16 @@ H5D__earray_decode(const void *_raw, void *_elmt, size_t nelmts, void *_ctx)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__earray_decode() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_debug
+ * Function: H5D__earray_debug
*
- * Purpose: Display an element for debugging
+ * Purpose: Display an element for debugging
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, January 29, 2009
*
*-------------------------------------------------------------------------
@@ -437,23 +437,23 @@ H5D__earray_debug(FILE *stream, int indent, int fwidth, hsize_t idx,
HDassert(elmt);
/* Print element */
- sprintf(temp_str, "Element #%llu:", (unsigned long long)idx);
+ HDsprintf(temp_str, "Element #%llu:", (unsigned long long)idx);
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, temp_str,
*(const haddr_t *)elmt);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__earray_debug() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_filt_fill
+ * Function: H5D__earray_filt_fill
*
- * Purpose: Fill "missing elements" in block of elements
+ * Purpose: Fill "missing elements" in block of elements
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, January 31, 2009
*
*-------------------------------------------------------------------------
@@ -475,16 +475,16 @@ H5D__earray_filt_fill(void *nat_blk, size_t nelmts)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__earray_filt_fill() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_filt_encode
+ * Function: H5D__earray_filt_encode
*
- * Purpose: Encode an element from "native" to "raw" form
+ * Purpose: Encode an element from "native" to "raw" form
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, January 31, 2009
*
*-------------------------------------------------------------------------
@@ -522,16 +522,16 @@ H5D__earray_filt_encode(void *_raw, const void *_elmt, size_t nelmts, void *_ctx
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__earray_filt_encode() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_filt_decode
+ * Function: H5D__earray_filt_decode
*
- * Purpose: Decode an element from "raw" to "native" form
+ * Purpose: Decode an element from "raw" to "native" form
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, January 31, 2009
*
*-------------------------------------------------------------------------
@@ -568,16 +568,16 @@ H5D__earray_filt_decode(const void *_raw, void *_elmt, size_t nelmts, void *_ctx
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__earray_filt_decode() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_filt_debug
+ * Function: H5D__earray_filt_debug
*
- * Purpose: Display an element for debugging
+ * Purpose: Display an element for debugging
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, January 31, 2009
*
*-------------------------------------------------------------------------
@@ -596,31 +596,31 @@ H5D__earray_filt_debug(FILE *stream, int indent, int fwidth, hsize_t idx,
HDassert(elmt);
/* Print element */
- sprintf(temp_str, "Element #%llu:", (unsigned long long)idx);
+ HDsprintf(temp_str, "Element #%llu:", (unsigned long long)idx);
HDfprintf(stream, "%*s%-*s {%a, %u, %0x}\n", indent, "", fwidth, temp_str,
elmt->addr, elmt->nbytes, elmt->filter_mask);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__earray_filt_debug() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_crt_dbg_context
+ * Function: H5D__earray_crt_dbg_context
*
- * Purpose: Create context for debugging callback
- * (get the layout message in the specified object header)
+ * Purpose: Create context for debugging callback
+ * (get the layout message in the specified object header)
*
- * Return: Success: non-NULL
- * Failure: NULL
+ * Return: Success: non-NULL
+ * Failure: NULL
+ *
+ * Programmer: Vailin Choi; July 2010
*
- * Programmer: Vailin Choi; July 2010
- *
*-------------------------------------------------------------------------
*/
static void *
H5D__earray_crt_dbg_context(H5F_t *f, haddr_t obj_addr)
{
- H5D_earray_ctx_ud_t *dbg_ctx = NULL; /* Context for fixed array callback */
+ H5D_earray_ctx_ud_t *dbg_ctx = NULL; /* Context for fixed array callback */
H5O_loc_t obj_loc; /* Pointer to an object's location */
hbool_t obj_opened = FALSE; /* Flag to indicate that the object header was opened */
H5O_layout_t layout; /* Layout message */
@@ -677,24 +677,24 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__earray_crt_dbg_context() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_dst_dbg_context
+ * Function: H5D__earray_dst_dbg_context
*
- * Purpose: Destroy context for debugging callback
- * (free the layout message from the specified object header)
+ * Purpose: Destroy context for debugging callback
+ * (free the layout message from the specified object header)
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Vailin Choi; July 2010
+ * Programmer: Vailin Choi; July 2010
*
*-------------------------------------------------------------------------
*/
static herr_t
H5D__earray_dst_dbg_context(void *_dbg_ctx)
{
- H5D_earray_ctx_ud_t *dbg_ctx = (H5D_earray_ctx_ud_t *)_dbg_ctx; /* Context for extensible array callback */
+ H5D_earray_ctx_ud_t *dbg_ctx = (H5D_earray_ctx_ud_t *)_dbg_ctx; /* Context for extensible array callback */
FUNC_ENTER_STATIC_NOERR
@@ -707,18 +707,18 @@ H5D__earray_dst_dbg_context(void *_dbg_ctx)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__earray_dst_dbg_context() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_idx_depend
+ * Function: H5D__earray_idx_depend
*
- * Purpose: Create flush dependency between extensible array and dataset's
+ * Purpose: Create flush dependency between extensible array and dataset's
* object header.
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
- * Tuesday, June 2, 2009
+ * Programmer: Quincey Koziol
+ * Tuesday, June 2, 2009
*
*-------------------------------------------------------------------------
*/
@@ -769,22 +769,22 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__earray_idx_depend() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_idx_open
+ * Function: H5D__earray_idx_open
*
- * Purpose: Opens an existing extensible array.
+ * Purpose: Opens an existing extensible array.
*
- * Note: This information is passively initialized from each index
+ * Note: This information is passively initialized from each index
* operation callback because those abstract chunk index operations
* are designed to work with the v1 B-tree chunk indices also,
* which don't require an 'open' for the data structure.
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
- * Thursday, January 29, 2009
+ * Programmer: Quincey Koziol
+ * Thursday, January 29, 2009
*
*-------------------------------------------------------------------------
*/
@@ -813,7 +813,7 @@ H5D__earray_idx_open(const H5D_chk_idx_info_t *idx_info)
/* Open the extensible array for the chunk index */
if(NULL == (idx_info->storage->u.earray.ea = H5EA_open(idx_info->f, idx_info->storage->idx_addr, &udata)))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't open extensible array")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't open extensible array")
/* Check for SWMR writes to the file */
if(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE)
@@ -824,15 +824,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__earray_idx_open() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_idx_init
+ * Function: H5D__earray_idx_init
*
- * Purpose: Initialize the indexing information for a dataset.
+ * Purpose: Initialize the indexing information for a dataset.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Wednesday, May 27, 2009
*
*-------------------------------------------------------------------------
@@ -861,7 +861,7 @@ H5D__earray_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t *space,
/* Get the dim info for dataset */
if((sndims = H5S_get_simple_extent_dims(space, NULL, max_dims)) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get dataspace dimensions")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get dataspace dimensions")
H5_CHECKED_ASSIGN(ndims, unsigned, sndims, int);
/* Find the rank of the unlimited dimension */
@@ -892,22 +892,22 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__earray_idx_init() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_idx_create
+ * Function: H5D__earray_idx_create
*
- * Purpose: Creates a new indexed-storage extensible array and initializes
+ * Purpose: Creates a new indexed-storage extensible array and initializes
* the layout struct with information about the storage. The
- * struct should be immediately written to the object header.
+ * struct should be immediately written to the object header.
*
- * This function must be called before passing LAYOUT to any of
- * the other indexed storage functions!
+ * This function must be called before passing LAYOUT to any of
+ * the other indexed storage functions!
*
- * Return: Non-negative on success (with the LAYOUT argument initialized
- * and ready to write to an object header). Negative on failure.
+ * Return: Non-negative on success (with the LAYOUT argument initialized
+ * and ready to write to an object header). Negative on failure.
*
- * Programmer: Quincey Koziol
- * Tuesday, January 27, 2009
+ * Programmer: Quincey Koziol
+ * Tuesday, January 27, 2009
*
*-------------------------------------------------------------------------
*/
@@ -932,7 +932,7 @@ H5D__earray_idx_create(const H5D_chk_idx_info_t *idx_info)
/* General parameters */
if(idx_info->pline->nused > 0) {
unsigned chunk_size_len; /* Size of encoded chunk size */
-
+
/* Compute the size required for encoding the size of a chunk, allowing
* for an extra byte, in case the filter makes the chunk larger.
*/
@@ -964,11 +964,11 @@ H5D__earray_idx_create(const H5D_chk_idx_info_t *idx_info)
/* Create the extensible array for the chunk index */
if(NULL == (idx_info->storage->u.earray.ea = H5EA_create(idx_info->f, &cparam, &udata)))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create extensible array")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create extensible array")
/* Get the address of the extensible array in file */
if(H5EA_get_addr(idx_info->storage->u.earray.ea, &(idx_info->storage->idx_addr)) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query extensible array address")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query extensible array address")
/* Check for SWMR writes to the file */
if(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE)
@@ -979,16 +979,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__earray_idx_create() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_idx_is_space_alloc
+ * Function: H5D__earray_idx_is_space_alloc
*
- * Purpose: Query if space is allocated for index method
+ * Purpose: Query if space is allocated for index method
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Thursday, January 29, 2009
+ * Programmer: Quincey Koziol
+ * Thursday, January 29, 2009
*
*-------------------------------------------------------------------------
*/
@@ -1003,15 +1003,15 @@ H5D__earray_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
FUNC_LEAVE_NOAPI((hbool_t)H5F_addr_defined(storage->idx_addr))
} /* end H5D__earray_idx_is_space_alloc() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_idx_insert
+ * Function: H5D__earray_idx_insert
*
- * Purpose: Insert chunk address into the indexing structure.
+ * Purpose: Insert chunk address into the indexing structure.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Vailin Choi; May 2014
+ * Programmer: Vailin Choi; May 2014
*
*-------------------------------------------------------------------------
*/
@@ -1020,7 +1020,7 @@ H5D__earray_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata
const H5D_t H5_ATTR_UNUSED *dset)
{
H5EA_t *ea; /* Pointer to extensible array structure */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1045,43 +1045,43 @@ H5D__earray_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata
ea = idx_info->storage->u.earray.ea;
if(!H5F_addr_defined(udata->chunk_block.offset))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "The chunk should have allocated already")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "The chunk should have allocated already")
if(udata->chunk_idx != (udata->chunk_idx & 0xffffffff)) /* negative value */
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "chunk index must be less than 2^32")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "chunk index must be less than 2^32")
/* Check for filters on chunks */
if(idx_info->pline->nused > 0) {
- H5D_earray_filt_elmt_t elmt; /* Extensible array element */
+ H5D_earray_filt_elmt_t elmt; /* Extensible array element */
- elmt.addr = udata->chunk_block.offset;
+ elmt.addr = udata->chunk_block.offset;
H5_CHECKED_ASSIGN(elmt.nbytes, uint32_t, udata->chunk_block.length, hsize_t);
- elmt.filter_mask = udata->filter_mask;
+ elmt.filter_mask = udata->filter_mask;
- /* Set the info for the chunk */
- if(H5EA_set(ea, udata->chunk_idx, &elmt) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set chunk info")
+ /* Set the info for the chunk */
+ if(H5EA_set(ea, udata->chunk_idx, &elmt) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set chunk info")
} /* end if */
else {
- /* Set the address for the chunk */
- if(H5EA_set(ea, udata->chunk_idx, &udata->chunk_block.offset) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set chunk address")
+ /* Set the address for the chunk */
+ if(H5EA_set(ea, udata->chunk_idx, &udata->chunk_block.offset) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set chunk address")
} /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__earray_idx_insert() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_idx_get_addr
+ * Function: H5D__earray_idx_get_addr
*
- * Purpose: Get the file address of a chunk if file space has been
- * assigned. Save the retrieved information in the udata
- * supplied.
+ * Purpose: Get the file address of a chunk if file space has been
+ * assigned. Save the retrieved information in the udata
+ * supplied.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, January 29, 2009
*
*-------------------------------------------------------------------------
@@ -1091,7 +1091,7 @@ H5D__earray_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *uda
{
H5EA_t *ea; /* Pointer to extensible array structure */
hsize_t idx; /* Array index of chunk */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1117,13 +1117,13 @@ H5D__earray_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *uda
/* Check for unlimited dim. not being the slowest-changing dim. */
if(idx_info->layout->u.earray.unlim_dim > 0) {
- hsize_t swizzled_coords[H5O_LAYOUT_NDIMS]; /* swizzled chunk coordinates */
+ hsize_t swizzled_coords[H5O_LAYOUT_NDIMS]; /* swizzled chunk coordinates */
unsigned ndims = (idx_info->layout->ndims - 1); /* Number of dimensions */
- unsigned u;
+ unsigned u;
- /* Compute coordinate offset from scaled offset */
- for(u = 0; u < ndims; u++)
- swizzled_coords[u] = udata->common.scaled[u] * idx_info->layout->dim[u];
+ /* Compute coordinate offset from scaled offset */
+ for(u = 0; u < ndims; u++)
+ swizzled_coords[u] = udata->common.scaled[u] * idx_info->layout->dim[u];
H5VM_swizzle_coords(hsize_t, swizzled_coords, idx_info->layout->u.earray.unlim_dim);
@@ -1156,27 +1156,27 @@ H5D__earray_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *uda
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk address")
/* Update the other (constant) information for the chunk */
- udata->chunk_block.length = idx_info->layout->size;
+ udata->chunk_block.length = idx_info->layout->size;
udata->filter_mask = 0;
} /* end else */
if(!H5F_addr_defined(udata->chunk_block.offset))
- udata->chunk_block.length = 0;
+ udata->chunk_block.length = 0;
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__earray_idx_get_addr() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_idx_resize
+ * Function: H5D__earray_idx_resize
*
- * Purpose: Calculate/setup the swizzled down chunk array, used for chunk
+ * Purpose: Calculate/setup the swizzled down chunk array, used for chunk
* index calculations.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, July 23, 2009
*
*-------------------------------------------------------------------------
@@ -1221,15 +1221,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__earray_idx_resize() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_idx_iterate_cb
+ * Function: H5D__earray_idx_iterate_cb
*
- * Purpose: Callback routine for extensible array element iteration.
+ * Purpose: Callback routine for extensible array element iteration.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Vailin Choi; Feb 2015
+ * Programmer: Vailin Choi; Feb 2015
*
*-------------------------------------------------------------------------
*/
@@ -1256,8 +1256,8 @@ H5D__earray_idx_iterate_cb(hsize_t H5_ATTR_UNUSED idx, const void *_elmt, void *
/* Make "generic chunk" callback */
if(H5F_addr_defined(udata->chunk_rec.chunk_addr))
- if((ret_value = (udata->cb)(&udata->chunk_rec, udata->udata)) < 0)
- HERROR(H5E_DATASET, H5E_CALLBACK, "failure in generic chunk iterator callback");
+ if((ret_value = (udata->cb)(&udata->chunk_rec, udata->udata)) < 0)
+ HERROR(H5E_DATASET, H5E_CALLBACK, "failure in generic chunk iterator callback");
/* Update coordinates of chunk in dataset */
ndims = udata->common.layout->ndims - 1;
@@ -1280,20 +1280,20 @@ H5D__earray_idx_iterate_cb(hsize_t H5_ATTR_UNUSED idx, const void *_elmt, void *
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__earray_idx_iterate_cb() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_idx_iterate
+ * Function: H5D__earray_idx_iterate
*
- * Purpose: Iterate over the chunks in an index, making a callback
+ * Purpose: Iterate over the chunks in an index, making a callback
* for each one.
*
- * Note: This implementation is slow, particularly for sparse
+ * Note: This implementation is slow, particularly for sparse
* extensible arrays, replace it with call to H5EA_iterate()
* when that's available.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, January 29, 2009
*
*-------------------------------------------------------------------------
@@ -1331,42 +1331,42 @@ H5D__earray_idx_iterate(const H5D_chk_idx_info_t *idx_info,
/* Get the extensible array statistics */
if(H5EA_get_stats(ea, &ea_stat) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query extensible array statistics")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query extensible array statistics")
if(ea_stat.stored.max_idx_set > 0) {
H5D_earray_it_ud_t udata; /* User data for iteration callback */
- /* Initialize userdata */
- HDmemset(&udata, 0, sizeof udata);
- udata.common.layout = idx_info->layout;
- udata.common.storage = idx_info->storage;
+ /* Initialize userdata */
+ HDmemset(&udata, 0, sizeof udata);
+ udata.common.layout = idx_info->layout;
+ udata.common.storage = idx_info->storage;
HDmemset(&udata.chunk_rec, 0, sizeof(udata.chunk_rec));
udata.filtered = (idx_info->pline->nused > 0);
if(!udata.filtered) {
udata.chunk_rec.nbytes = idx_info->layout->size;
udata.chunk_rec.filter_mask = 0;
} /* end if */
- udata.cb = chunk_cb;
- udata.udata = chunk_udata;
-
+ udata.cb = chunk_cb;
+ udata.udata = chunk_udata;
+
/* Iterate over the extensible array elements */
- if((ret_value = H5EA_iterate(ea, H5D__earray_idx_iterate_cb, &udata)) < 0)
- HERROR(H5E_DATASET, H5E_BADITER, "unable to iterate over fixed array chunk index");
+ if((ret_value = H5EA_iterate(ea, H5D__earray_idx_iterate_cb, &udata)) < 0)
+ HERROR(H5E_DATASET, H5E_BADITER, "unable to iterate over fixed array chunk index");
} /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__earray_idx_iterate() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_idx_remove
+ * Function: H5D__earray_idx_remove
*
- * Purpose: Remove chunk from index.
+ * Purpose: Remove chunk from index.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, January 29, 2009
*
*-------------------------------------------------------------------------
@@ -1376,7 +1376,7 @@ H5D__earray_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t
{
H5EA_t *ea; /* Pointer to extensible array structure */
hsize_t idx; /* Array index of chunk */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1403,13 +1403,13 @@ H5D__earray_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t
/* Check for unlimited dim. not being the slowest-changing dim. */
if(idx_info->layout->u.earray.unlim_dim > 0) {
- hsize_t swizzled_coords[H5O_LAYOUT_NDIMS]; /* swizzled chunk coordinates */
+ hsize_t swizzled_coords[H5O_LAYOUT_NDIMS]; /* swizzled chunk coordinates */
unsigned ndims = (idx_info->layout->ndims - 1); /* Number of dimensions */
- unsigned u;
+ unsigned u;
- /* Compute coordinate offset from scaled offset */
- for(u = 0; u < ndims; u++)
- swizzled_coords[u] = udata->scaled[u] * idx_info->layout->dim[u];
+ /* Compute coordinate offset from scaled offset */
+ for(u = 0; u < ndims; u++)
+ swizzled_coords[u] = udata->scaled[u] * idx_info->layout->dim[u];
H5VM_swizzle_coords(hsize_t, swizzled_coords, idx_info->layout->u.earray.unlim_dim);
@@ -1469,16 +1469,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__earray_idx_remove() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_idx_delete_cb
+ * Function: H5D__earray_idx_delete_cb
*
- * Purpose: Delete space for chunk in file
+ * Purpose: Delete space for chunk in file
*
- * Return: Success: Non-negative
- * Failure: negative
+ * Return: Success: Non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, January 31, 2009
*
*-------------------------------------------------------------------------
@@ -1506,21 +1506,21 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__earray_idx_delete_cb() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_idx_delete
+ * Function: H5D__earray_idx_delete
*
- * Purpose: Delete index and raw data storage for entire dataset
+ * Purpose: Delete index and raw data storage for entire dataset
* (i.e. all chunks)
*
- * Note: This implementation is slow, particularly for sparse
+ * Note: This implementation is slow, particularly for sparse
* extensible arrays, replace it with call to H5EA_iterate()
* when that's available.
*
- * Return: Success: Non-negative
- * Failure: negative
+ * Return: Success: Non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, January 29, 2009
*
*-------------------------------------------------------------------------
@@ -1568,15 +1568,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__earray_idx_delete() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_idx_copy_setup
+ * Function: H5D__earray_idx_copy_setup
*
- * Purpose: Set up any necessary information for copying chunks
+ * Purpose: Set up any necessary information for copying chunks
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, January 31, 2009
*
*-------------------------------------------------------------------------
@@ -1623,15 +1623,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__earray_idx_copy_setup() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_idx_copy_shutdown
+ * Function: H5D__earray_idx_copy_shutdown
*
- * Purpose: Shutdown any information from copying chunks
+ * Purpose: Shutdown any information from copying chunks
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, January 31, 2009
*
*-------------------------------------------------------------------------
@@ -1662,7 +1662,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__earray_idx_copy_shutdown() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__earray_idx_size
*
@@ -1703,7 +1703,7 @@ H5D__earray_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size)
/* Get the extensible array statistics */
if(H5EA_get_stats(ea, &ea_stat) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query extensible array statistics")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query extensible array statistics")
/* Set the size of the extensible array */
*index_size = ea_stat.computed.hdr_size + ea_stat.computed.index_blk_size
@@ -1719,15 +1719,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__earray_idx_size() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_idx_reset
+ * Function: H5D__earray_idx_reset
*
- * Purpose: Reset indexing information.
+ * Purpose: Reset indexing information.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, January 31, 2009
*
*-------------------------------------------------------------------------
@@ -1742,7 +1742,7 @@ H5D__earray_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
/* Reset index info */
if(reset_addr) {
- storage->idx_addr = HADDR_UNDEF;
+ storage->idx_addr = HADDR_UNDEF;
storage->u.earray.dset_ohdr_addr = HADDR_UNDEF;
} /* end if */
storage->u.earray.ea = NULL;
@@ -1750,15 +1750,15 @@ H5D__earray_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__earray_idx_reset() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_idx_dump
+ * Function: H5D__earray_idx_dump
*
- * Purpose: Dump indexing information to a stream.
+ * Purpose: Dump indexing information to a stream.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, January 31, 2009
*
*-------------------------------------------------------------------------
@@ -1777,15 +1777,15 @@ H5D__earray_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__earray_idx_dump() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__earray_idx_dest
+ * Function: H5D__earray_idx_dest
*
- * Purpose: Release indexing information in memory.
+ * Purpose: Release indexing information in memory.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, January 31, 2009
*
*-------------------------------------------------------------------------
@@ -1805,7 +1805,7 @@ H5D__earray_idx_dest(const H5D_chk_idx_info_t *idx_info)
/* Check if the extensible array is open */
if(idx_info->storage->u.earray.ea) {
- /* Patch the top level file pointer contained in ea if needed */
+ /* Patch the top level file pointer contained in ea if needed */
if(H5EA_patch_file(idx_info->storage->u.earray.ea, idx_info->f) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't patch earray file pointer")
diff --git a/src/H5Dfarray.c b/src/H5Dfarray.c
index 372ae26..5972f10 100644
--- a/src/H5Dfarray.c
+++ b/src/H5Dfarray.c
@@ -11,12 +11,12 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Vailin Choi <vchoi@hdfgroup.org>
- * Thursday, April 30, 2009
+/* Programmer: Vailin Choi <vchoi@hdfgroup.org>
+ * Thursday, April 30, 2009
*
- * Purpose: Fixed array indexed (chunked) I/O functions.
- * The chunk coordinate is mapped as an index into an array of
- * disk addresses for the chunks.
+ * Purpose: Fixed array indexed (chunked) I/O functions.
+ * The chunk coordinate is mapped as an index into an array of
+ * disk addresses for the chunks.
*
*/
@@ -30,13 +30,13 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Dpkg.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FAprivate.h" /* Fixed arrays */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5MFprivate.h" /* File space management */
-#include "H5VMprivate.h" /* Vector functions */
+#include "H5private.h" /* Generic Functions */
+#include "H5Dpkg.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FAprivate.h" /* Fixed arrays */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5MFprivate.h" /* File space management */
+#include "H5VMprivate.h" /* Vector functions */
/****************/
@@ -210,16 +210,16 @@ H5FL_DEFINE_STATIC(H5D_farray_ctx_t);
/* Declare a free list to manage the H5D_farray_ctx_ud_t struct */
H5FL_DEFINE_STATIC(H5D_farray_ctx_ud_t);
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_crt_context
+ * Function: H5D__farray_crt_context
*
- * Purpose: Create context for callbacks
+ * Purpose: Create context for callbacks
*
- * Return: Success: non-NULL
- * Failure: NULL
+ * Return: Success: non-NULL
+ * Failure: NULL
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -259,16 +259,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__farray_crt_context() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_dst_context
+ * Function: H5D__farray_dst_context
*
- * Purpose: Destroy context for callbacks
+ * Purpose: Destroy context for callbacks
*
- * Return: Success: non-NULL
- * Failure: NULL
+ * Return: Success: non-NULL
+ * Failure: NULL
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -289,16 +289,16 @@ H5D__farray_dst_context(void *_ctx)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__farray_dst_context() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_fill
+ * Function: H5D__farray_fill
*
- * Purpose: Fill "missing elements" in block of elements
+ * Purpose: Fill "missing elements" in block of elements
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -319,16 +319,16 @@ H5D__farray_fill(void *nat_blk, size_t nelmts)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__farray_fill() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_encode
+ * Function: H5D__farray_encode
*
- * Purpose: Encode an element from "native" to "raw" form
+ * Purpose: Encode an element from "native" to "raw" form
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -363,16 +363,16 @@ H5D__farray_encode(void *raw, const void *_elmt, size_t nelmts, void *_ctx)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__farray_encode() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_decode
+ * Function: H5D__farray_decode
*
- * Purpose: Decode an element from "raw" to "native" form
+ * Purpose: Decode an element from "raw" to "native" form
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -407,16 +407,16 @@ H5D__farray_decode(const void *_raw, void *_elmt, size_t nelmts, void *_ctx)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__farray_decode() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_debug
+ * Function: H5D__farray_debug
*
- * Purpose: Display an element for debugging
+ * Purpose: Display an element for debugging
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -434,32 +434,32 @@ H5D__farray_debug(FILE *stream, int indent, int fwidth, hsize_t idx,
HDassert(elmt);
/* Print element */
- sprintf(temp_str, "Element #%llu:", (unsigned long long)idx);
+ HDsprintf(temp_str, "Element #%llu:", (unsigned long long)idx);
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, temp_str,
*(const haddr_t *)elmt);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__farray_debug() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_crt_dbg_context
+ * Function: H5D__farray_crt_dbg_context
*
- * Purpose: Create context for debugging callback
- * (get the layout message in the specified object header)
+ * Purpose: Create context for debugging callback
+ * (get the layout message in the specified object header)
*
- * Return: Success: non-NULL
- * Failure: NULL
+ * Return: Success: non-NULL
+ * Failure: NULL
*
- * Programmer: Vailin Choi
- * 5th August, 2009
+ * Programmer: Vailin Choi
+ * 5th August, 2009
*
*-------------------------------------------------------------------------
*/
static void *
H5D__farray_crt_dbg_context(H5F_t *f, haddr_t obj_addr)
{
- H5D_farray_ctx_ud_t *dbg_ctx = NULL; /* Context for fixed array callback */
+ H5D_farray_ctx_ud_t *dbg_ctx = NULL; /* Context for fixed array callback */
H5O_loc_t obj_loc; /* Pointer to an object's location */
hbool_t obj_opened = FALSE; /* Flag to indicate that the object header was opened */
H5O_layout_t layout; /* Layout message */
@@ -516,25 +516,25 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__farray_crt_dbg_context() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_dst_dbg_context
+ * Function: H5D__farray_dst_dbg_context
*
- * Purpose: Destroy context for debugging callback
- * (free the layout message from the specified object header)
+ * Purpose: Destroy context for debugging callback
+ * (free the layout message from the specified object header)
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
- * 24th September, 2009
+ * Programmer: Quincey Koziol
+ * 24th September, 2009
*
*-------------------------------------------------------------------------
*/
static herr_t
H5D__farray_dst_dbg_context(void *_dbg_ctx)
{
- H5D_farray_ctx_ud_t *dbg_ctx = (H5D_farray_ctx_ud_t *)_dbg_ctx; /* Context for fixed array callback */
+ H5D_farray_ctx_ud_t *dbg_ctx = (H5D_farray_ctx_ud_t *)_dbg_ctx; /* Context for fixed array callback */
FUNC_ENTER_STATIC_NOERR
@@ -547,16 +547,16 @@ H5D__farray_dst_dbg_context(void *_dbg_ctx)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__farray_dst_dbg_context() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_filt_fill
+ * Function: H5D__farray_filt_fill
*
- * Purpose: Fill "missing elements" in block of elements
+ * Purpose: Fill "missing elements" in block of elements
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -578,16 +578,16 @@ H5D__farray_filt_fill(void *nat_blk, size_t nelmts)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__farray_filt_fill() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_filt_encode
+ * Function: H5D__farray_filt_encode
*
- * Purpose: Encode an element from "native" to "raw" form
+ * Purpose: Encode an element from "native" to "raw" form
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -612,7 +612,7 @@ H5D__farray_filt_encode(void *_raw, const void *_elmt, size_t nelmts, void *_ctx
/* Encode element */
/* (advances 'raw' pointer) */
H5F_addr_encode_len(ctx->file_addr_len, &raw, elmt->addr);
- UINT64ENCODE_VAR(raw, elmt->nbytes, ctx->chunk_size_len);
+ UINT64ENCODE_VAR(raw, elmt->nbytes, ctx->chunk_size_len);
UINT32ENCODE(raw, elmt->filter_mask);
/* Advance native element pointer */
@@ -625,16 +625,16 @@ H5D__farray_filt_encode(void *_raw, const void *_elmt, size_t nelmts, void *_ctx
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__farray_filt_encode() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_filt_decode
+ * Function: H5D__farray_filt_decode
*
- * Purpose: Decode an element from "raw" to "native" form
+ * Purpose: Decode an element from "raw" to "native" form
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -658,7 +658,7 @@ H5D__farray_filt_decode(const void *_raw, void *_elmt, size_t nelmts, void *_ctx
/* Decode element */
/* (advances 'raw' pointer) */
H5F_addr_decode_len(ctx->file_addr_len, &raw, &elmt->addr);
- UINT64DECODE_VAR(raw, elmt->nbytes, ctx->chunk_size_len);
+ UINT64DECODE_VAR(raw, elmt->nbytes, ctx->chunk_size_len);
UINT32DECODE(raw, elmt->filter_mask);
/* Advance native element pointer */
@@ -671,16 +671,16 @@ H5D__farray_filt_decode(const void *_raw, void *_elmt, size_t nelmts, void *_ctx
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__farray_filt_decode() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_filt_debug
+ * Function: H5D__farray_filt_debug
*
- * Purpose: Display an element for debugging
+ * Purpose: Display an element for debugging
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -699,24 +699,24 @@ H5D__farray_filt_debug(FILE *stream, int indent, int fwidth, hsize_t idx,
HDassert(elmt);
/* Print element */
- sprintf(temp_str, "Element #%llu:", (unsigned long long)idx);
+ HDsprintf(temp_str, "Element #%llu:", (unsigned long long)idx);
HDfprintf(stream, "%*s%-*s {%a, %u, %0x}\n", indent, "", fwidth, temp_str,
elmt->addr, elmt->nbytes, elmt->filter_mask);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__farray_filt_debug() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_idx_depend
+ * Function: H5D__farray_idx_depend
*
- * Purpose: Create flush dependency between fixed array and dataset's
+ * Purpose: Create flush dependency between fixed array and dataset's
* object header.
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -768,7 +768,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__farray_idx_depend() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__farray_idx_init
*
@@ -796,17 +796,17 @@ H5D__farray_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t H5_ATTR_UNU
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__farray_idx_init() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_idx_open
+ * Function: H5D__farray_idx_open
*
- * Purpose: Opens an existing fixed array and initializes
+ * Purpose: Opens an existing fixed array and initializes
* the layout struct with information about the storage.
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -836,7 +836,7 @@ H5D__farray_idx_open(const H5D_chk_idx_info_t *idx_info)
/* Open the fixed array for the chunk index */
if(NULL == (idx_info->storage->u.farray.fa = H5FA_open(idx_info->f, idx_info->storage->idx_addr, &udata)))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't open fixed array")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't open fixed array")
/* Check for SWMR writes to the file */
if(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE)
@@ -847,21 +847,21 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__farray_idx_open() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_idx_create
+ * Function: H5D__farray_idx_create
*
- * Purpose: Creates a new indexed-storage fixed array and initializes
+ * Purpose: Creates a new indexed-storage fixed array and initializes
* the layout struct with information about the storage. The
- * struct should be immediately written to the object header.
+ * struct should be immediately written to the object header.
*
- * This function must be called before passing LAYOUT to any of
- * the other indexed storage functions!
+ * This function must be called before passing LAYOUT to any of
+ * the other indexed storage functions!
*
- * Return: Non-negative on success (with the LAYOUT argument initialized
- * and ready to write to an object header). Negative on failure.
+ * Return: Non-negative on success (with the LAYOUT argument initialized
+ * and ready to write to an object header). Negative on failure.
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -869,9 +869,9 @@ done:
static herr_t
H5D__farray_idx_create(const H5D_chk_idx_info_t *idx_info)
{
- H5FA_create_t cparam; /* Fixed array creation parameters */
+ H5FA_create_t cparam; /* Fixed array creation parameters */
H5D_farray_ctx_ud_t udata; /* User data for fixed array create call */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -887,7 +887,7 @@ H5D__farray_idx_create(const H5D_chk_idx_info_t *idx_info)
/* General parameters */
if(idx_info->pline->nused > 0) {
- unsigned chunk_size_len; /* Size of encoded chunk size */
+ unsigned chunk_size_len; /* Size of encoded chunk size */
/* Compute the size required for encoding the size of a chunk, allowing
* for an extra byte, in case the filter makes the chunk larger.
@@ -910,14 +910,14 @@ H5D__farray_idx_create(const H5D_chk_idx_info_t *idx_info)
/* Set up the user data */
udata.f = idx_info->f;
udata.chunk_size = idx_info->layout->size;
-
+
/* Create the fixed array for the chunk index */
if(NULL == (idx_info->storage->u.farray.fa = H5FA_create(idx_info->f, &cparam, &udata)))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create fixed array")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create fixed array")
/* Get the address of the fixed array in file */
if(H5FA_get_addr(idx_info->storage->u.farray.fa, &(idx_info->storage->idx_addr)) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query fixed array address")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query fixed array address")
/* Check for SWMR writes to the file */
if(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE)
@@ -928,15 +928,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__farray_idx_create() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_idx_is_space_alloc
+ * Function: H5D__farray_idx_is_space_alloc
*
- * Purpose: Query if space is allocated for index method
+ * Purpose: Query if space is allocated for index method
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -952,24 +952,24 @@ H5D__farray_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
FUNC_LEAVE_NOAPI((hbool_t)H5F_addr_defined(storage->idx_addr))
} /* end H5D__farray_idx_is_space_alloc() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_idx_insert
+ * Function: H5D__farray_idx_insert
*
- * Purpose: Insert chunk address into the indexing structure.
+ * Purpose: Insert chunk address into the indexing structure.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Vailin Choi; 5 May 2014
*
- * Programmer: Vailin Choi; 5 May 2014
- *
*-------------------------------------------------------------------------
*/
static herr_t
H5D__farray_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata,
const H5D_t H5_ATTR_UNUSED *dset)
{
- H5FA_t *fa; /* Pointer to fixed array structure */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FA_t *fa; /* Pointer to fixed array structure */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -988,7 +988,7 @@ H5D__farray_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata
if(H5D__farray_idx_open(idx_info) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open fixed array")
} else /* Patch the top level file pointer contained in fa if needed */
- H5FA_patch_file(idx_info->storage->u.farray.fa, idx_info->f);
+ H5FA_patch_file(idx_info->storage->u.farray.fa, idx_info->f);
/* Set convenience pointer to fixed array structure */
fa = idx_info->storage->u.farray.fa;
@@ -1002,13 +1002,13 @@ H5D__farray_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata
if(idx_info->pline->nused > 0) {
H5D_farray_filt_elmt_t elmt; /* Fixed array element */
- elmt.addr = udata->chunk_block.offset;
+ elmt.addr = udata->chunk_block.offset;
H5_CHECKED_ASSIGN(elmt.nbytes, uint32_t, udata->chunk_block.length, hsize_t);
elmt.filter_mask = udata->filter_mask;
/* Set the info for the chunk */
if(H5FA_set(fa, udata->chunk_idx, &elmt) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set chunk info")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set chunk info")
} /* end if */
else {
/* Set the address for the chunk */
@@ -1020,17 +1020,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__farray_idx_insert() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_idx_get_addr
+ * Function: H5D__farray_idx_get_addr
*
- * Purpose: Get the file address of a chunk if file space has been
- * assigned. Save the retrieved information in the udata
- * supplied.
+ * Purpose: Get the file address of a chunk if file space has been
+ * assigned. Save the retrieved information in the udata
+ * supplied.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -1038,9 +1038,9 @@ done:
static herr_t
H5D__farray_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata)
{
- H5FA_t *fa; /* Pointer to fixed array structure */
- hsize_t idx; /* Array index of chunk */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FA_t *fa; /* Pointer to fixed array structure */
+ hsize_t idx; /* Array index of chunk */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1059,7 +1059,7 @@ H5D__farray_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *uda
if(H5D__farray_idx_open(idx_info) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open fixed array")
} else /* Patch the top level file pointer contained in fa if needed */
- H5FA_patch_file(idx_info->storage->u.farray.fa, idx_info->f);
+ H5FA_patch_file(idx_info->storage->u.farray.fa, idx_info->f);
/* Set convenience pointer to fixed array structure */
fa = idx_info->storage->u.farray.fa;
@@ -1088,26 +1088,26 @@ H5D__farray_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *uda
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk address")
/* Update the other (constant) information for the chunk */
- udata->chunk_block.length = idx_info->layout->size;
+ udata->chunk_block.length = idx_info->layout->size;
udata->filter_mask = 0;
} /* end else */
if(!H5F_addr_defined(udata->chunk_block.offset))
- udata->chunk_block.length = 0;
+ udata->chunk_block.length = 0;
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__farray_idx_get_addr() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_idx_iterate_cb
+ * Function: H5D__farray_idx_iterate_cb
*
- * Purpose: Callback routine for fixed array element iteration.
+ * Purpose: Callback routine for fixed array element iteration.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -1135,8 +1135,8 @@ H5D__farray_idx_iterate_cb(hsize_t H5_ATTR_UNUSED idx, const void *_elmt, void *
/* Make "generic chunk" callback */
if(H5F_addr_defined(udata->chunk_rec.chunk_addr))
- if((ret_value = (udata->cb)(&udata->chunk_rec, udata->udata)) < 0)
- HERROR(H5E_DATASET, H5E_CALLBACK, "failure in generic chunk iterator callback");
+ if((ret_value = (udata->cb)(&udata->chunk_rec, udata->udata)) < 0)
+ HERROR(H5E_DATASET, H5E_CALLBACK, "failure in generic chunk iterator callback");
/* Update coordinates of chunk in dataset */
ndims = udata->common.layout->ndims - 1;
@@ -1159,16 +1159,16 @@ H5D__farray_idx_iterate_cb(hsize_t H5_ATTR_UNUSED idx, const void *_elmt, void *
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__farray_idx_iterate_cb() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_idx_iterate
+ * Function: H5D__farray_idx_iterate
*
- * Purpose: Iterate over the chunks in an index, making a callback
+ * Purpose: Iterate over the chunks in an index, making a callback
* for each one.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -1199,50 +1199,50 @@ H5D__farray_idx_iterate(const H5D_chk_idx_info_t *idx_info,
if(H5D__farray_idx_open(idx_info) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open fixed array")
} else /* Patch the top level file pointer contained in fa if needed */
- H5FA_patch_file(idx_info->storage->u.farray.fa, idx_info->f);
+ H5FA_patch_file(idx_info->storage->u.farray.fa, idx_info->f);
/* Set convenience pointer to fixed array structure */
fa = idx_info->storage->u.farray.fa;
/* Get the fixed array statistics */
if(H5FA_get_stats(fa, &fa_stat) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query fixed array statistics")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query fixed array statistics")
/* Check if there are any array elements */
if(fa_stat.nelmts > 0) {
H5D_farray_it_ud_t udata; /* User data for iteration callback */
- /* Initialize userdata */
- HDmemset(&udata, 0, sizeof udata);
- udata.common.layout = idx_info->layout;
- udata.common.storage = idx_info->storage;
+ /* Initialize userdata */
+ HDmemset(&udata, 0, sizeof udata);
+ udata.common.layout = idx_info->layout;
+ udata.common.storage = idx_info->storage;
HDmemset(&udata.chunk_rec, 0, sizeof(udata.chunk_rec));
udata.filtered = (idx_info->pline->nused > 0);
if(!udata.filtered) {
udata.chunk_rec.nbytes = idx_info->layout->size;
udata.chunk_rec.filter_mask = 0;
} /* end if */
- udata.cb = chunk_cb;
- udata.udata = chunk_udata;
-
+ udata.cb = chunk_cb;
+ udata.udata = chunk_udata;
+
/* Iterate over the fixed array elements */
- if((ret_value = H5FA_iterate(fa, H5D__farray_idx_iterate_cb, &udata)) < 0)
- HERROR(H5E_DATASET, H5E_BADITER, "unable to iterate over fixed array chunk index");
+ if((ret_value = H5FA_iterate(fa, H5D__farray_idx_iterate_cb, &udata)) < 0)
+ HERROR(H5E_DATASET, H5E_BADITER, "unable to iterate over fixed array chunk index");
} /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__farray_idx_iterate() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_idx_remove
+ * Function: H5D__farray_idx_remove
*
- * Purpose: Remove chunk from index.
+ * Purpose: Remove chunk from index.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -1250,9 +1250,9 @@ done:
static herr_t
H5D__farray_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t *udata)
{
- H5FA_t *fa; /* Pointer to fixed array structure */
- hsize_t idx; /* Array index of chunk */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FA_t *fa; /* Pointer to fixed array structure */
+ hsize_t idx; /* Array index of chunk */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1271,7 +1271,7 @@ H5D__farray_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t
if(H5D__farray_idx_open(idx_info) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open fixed array")
} else /* Patch the top level file pointer contained in fa if needed */
- if(H5FA_patch_file(idx_info->storage->u.farray.fa, idx_info->f) < 0)
+ if(H5FA_patch_file(idx_info->storage->u.farray.fa, idx_info->f) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't patch fixed array file pointer")
/* Set convenience pointer to fixed array structure */
@@ -1328,16 +1328,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__farray_idx_remove() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_idx_delete_cb
+ * Function: H5D__farray_idx_delete_cb
*
- * Purpose: Delete space for chunk in file
+ * Purpose: Delete space for chunk in file
*
- * Return: Success: Non-negative
- * Failure: negative
+ * Return: Success: Non-negative
+ * Failure: negative
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -1365,17 +1365,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__farray_idx_delete_cb() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_idx_delete
+ * Function: H5D__farray_idx_delete
*
- * Purpose: Delete index and raw data storage for entire dataset
+ * Purpose: Delete index and raw data storage for entire dataset
* (i.e. all chunks)
*
- * Return: Success: Non-negative
- * Failure: negative
+ * Return: Success: Non-negative
+ * Failure: negative
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -1398,7 +1398,7 @@ H5D__farray_idx_delete(const H5D_chk_idx_info_t *idx_info)
if(H5F_addr_defined(idx_info->storage->idx_addr)) {
H5D_farray_ctx_ud_t ctx_udata; /* User data for fixed array open call */
- /* Iterate over the chunk addresses in the fixed array, deleting each chunk */
+ /* Iterate over the chunk addresses in the fixed array, deleting each chunk */
if(H5D__farray_idx_iterate(idx_info, H5D__farray_idx_delete_cb, idx_info->f) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to iterate over chunk addresses")
@@ -1423,15 +1423,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__farray_idx_delete() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_idx_copy_setup
+ * Function: H5D__farray_idx_copy_setup
*
- * Purpose: Set up any necessary information for copying chunks
+ * Purpose: Set up any necessary information for copying chunks
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -1478,15 +1478,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__farray_idx_copy_setup() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_idx_copy_shutdown
+ * Function: H5D__farray_idx_copy_shutdown
*
- * Purpose: Shutdown any information from copying chunks
+ * Purpose: Shutdown any information from copying chunks
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -1517,7 +1517,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__farray_idx_copy_shutdown() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__farray_idx_size
*
@@ -1526,7 +1526,7 @@ done:
* Return: Success: Non-negative
* Failure: negative
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -1558,7 +1558,7 @@ H5D__farray_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size)
/* Get the fixed array statistics */
if(H5FA_get_stats(fa, &fa_stat) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query fixed array statistics")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query fixed array statistics")
*index_size = fa_stat.hdr_size;
*index_size += fa_stat.dblk_size;
@@ -1573,15 +1573,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__farray_idx_size() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_idx_reset
+ * Function: H5D__farray_idx_reset
*
- * Purpose: Reset indexing information.
+ * Purpose: Reset indexing information.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -1596,21 +1596,21 @@ H5D__farray_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
/* Reset index info */
if(reset_addr)
- storage->idx_addr = HADDR_UNDEF;
+ storage->idx_addr = HADDR_UNDEF;
storage->u.farray.fa = NULL;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__farray_idx_reset() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_idx_dump
+ * Function: H5D__farray_idx_dump
*
- * Purpose: Dump indexing information to a stream.
+ * Purpose: Dump indexing information to a stream.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -1629,15 +1629,15 @@ H5D__farray_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D__farray_idx_dump() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5D__farray_idx_dest
+ * Function: H5D__farray_idx_dest
*
- * Purpose: Release indexing information in memory.
+ * Purpose: Release indexing information in memory.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -1657,8 +1657,8 @@ H5D__farray_idx_dest(const H5D_chk_idx_info_t *idx_info)
/* Check if the fixed array is open */
if(idx_info->storage->u.farray.fa) {
- /* Patch the top level file pointer contained in fa if needed */
- if(H5FA_patch_file(idx_info->storage->u.farray.fa, idx_info->f) < 0)
+ /* Patch the top level file pointer contained in fa if needed */
+ if(H5FA_patch_file(idx_info->storage->u.farray.fa, idx_info->f) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't patch fixed array file pointer")
/* Close fixed array */
diff --git a/src/H5EAdbg.c b/src/H5EAdbg.c
index 1a2b973..46e87c5 100644
--- a/src/H5EAdbg.c
+++ b/src/H5EAdbg.c
@@ -13,11 +13,11 @@
/*-------------------------------------------------------------------------
*
- * Created: H5EAdbg.c
- * Sep 11 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Created: H5EAdbg.c
+ * Sep 11 2008
+ * Quincey Koziol <koziol@hdfgroup.org>
*
- * Purpose: Dump debugging information about an extensible array.
+ * Purpose: Dump debugging information about an extensible array.
*
*-------------------------------------------------------------------------
*/
@@ -37,9 +37,9 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5EApkg.h" /* Extensible Arrays */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5EApkg.h" /* Extensible Arrays */
/****************/
@@ -77,17 +77,17 @@
/*******************/
-
+
/*-------------------------------------------------------------------------
- * Function: H5EA__hdr_debug
+ * Function: H5EA__hdr_debug
*
- * Purpose: Prints debugging info about a extensible array header.
+ * Purpose: Prints debugging info about a extensible array header.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Sep 11 2008
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Sep 11 2008
*
*-------------------------------------------------------------------------
*/
@@ -97,7 +97,7 @@ H5EA__hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent,
int fwidth, const H5EA_class_t *cls, haddr_t obj_addr))
/* Local variables */
- H5EA_hdr_t *hdr = NULL; /* Shared extensible array header */
+ H5EA_hdr_t *hdr = NULL; /* Shared extensible array header */
void *dbg_ctx = NULL; /* Extensible array debugging context */
/* Check arguments */
@@ -117,73 +117,73 @@ H5EA__hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent,
/* Load the extensible array header */
if(NULL == (hdr = H5EA__hdr_protect(f, addr, dbg_ctx, H5AC__READ_ONLY_FLAG)))
- H5E_THROW(H5E_CANTPROTECT, "unable to load extensible array header")
+ H5E_THROW(H5E_CANTPROTECT, "unable to load extensible array header")
/* Print opening message */
HDfprintf(stream, "%*sExtensible Array Header...\n", indent, "");
/* Print the values */
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Array class ID:", hdr->cparam.cls->name);
+ "Array class ID:", hdr->cparam.cls->name);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Header size:",
- hdr->size);
+ "Header size:",
+ hdr->size);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Raw Element Size:",
- (unsigned)hdr->cparam.raw_elmt_size);
+ "Raw Element Size:",
+ (unsigned)hdr->cparam.raw_elmt_size);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Native Element Size (on this platform):",
- hdr->cparam.cls->nat_elmt_size);
+ "Native Element Size (on this platform):",
+ hdr->cparam.cls->nat_elmt_size);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Log2(Max. # of elements in array):",
- (unsigned)hdr->cparam.max_nelmts_bits);
+ "Log2(Max. # of elements in array):",
+ (unsigned)hdr->cparam.max_nelmts_bits);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "# of elements in index block:",
- (unsigned)hdr->cparam.idx_blk_elmts);
+ "# of elements in index block:",
+ (unsigned)hdr->cparam.idx_blk_elmts);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Min. # of elements per data block:",
- (unsigned)hdr->cparam.data_blk_min_elmts);
+ "Min. # of elements per data block:",
+ (unsigned)hdr->cparam.data_blk_min_elmts);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Min. # of data block pointers for a super block:",
- (unsigned)hdr->cparam.sup_blk_min_data_ptrs);
+ "Min. # of data block pointers for a super block:",
+ (unsigned)hdr->cparam.sup_blk_min_data_ptrs);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Log2(Max. # of elements in data block page):",
- (unsigned)hdr->cparam.max_dblk_page_nelmts_bits);
+ "Log2(Max. # of elements in data block page):",
+ (unsigned)hdr->cparam.max_dblk_page_nelmts_bits);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Highest element index stored (+1):",
- hdr->stats.stored.max_idx_set);
+ "Highest element index stored (+1):",
+ hdr->stats.stored.max_idx_set);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Number of super blocks created:",
- hdr->stats.stored.nsuper_blks);
+ "Number of super blocks created:",
+ hdr->stats.stored.nsuper_blks);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Number of data blocks created:",
- hdr->stats.stored.ndata_blks);
+ "Number of data blocks created:",
+ hdr->stats.stored.ndata_blks);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Number of elements 'realized':",
- hdr->stats.stored.nelmts);
+ "Number of elements 'realized':",
+ hdr->stats.stored.nelmts);
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "Index Block Address:",
- hdr->idx_blk_addr);
+ "Index Block Address:",
+ hdr->idx_blk_addr);
CATCH
if(dbg_ctx && cls->dst_dbg_ctx(dbg_ctx) < 0)
H5E_THROW(H5E_CANTRELEASE, "unable to release extensible array debugging context")
if(hdr && H5EA__hdr_unprotect(hdr, H5AC__NO_FLAGS_SET) < 0)
- H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array header")
+ H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array header")
END_FUNC(PKG) /* end H5EA__hdr_debug() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5EA__iblock_debug
+ * Function: H5EA__iblock_debug
*
- * Purpose: Prints debugging info about a extensible array index block.
+ * Purpose: Prints debugging info about a extensible array index block.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Sep 11 2008
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Sep 11 2008
*
*-------------------------------------------------------------------------
*/
@@ -215,7 +215,7 @@ H5EA__iblock_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int inde
/* Load the extensible array header */
if(NULL == (hdr = H5EA__hdr_protect(f, hdr_addr, dbg_ctx, H5AC__READ_ONLY_FLAG)))
- H5E_THROW(H5E_CANTPROTECT, "unable to load extensible array header")
+ H5E_THROW(H5E_CANTPROTECT, "unable to load extensible array header")
/* Sanity check */
HDassert(H5F_addr_eq(hdr->idx_blk_addr, addr));
@@ -229,16 +229,16 @@ H5EA__iblock_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int inde
/* Print the values */
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Array class ID:", hdr->cparam.cls->name);
+ "Array class ID:", hdr->cparam.cls->name);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Index Block size:",
- iblock->size);
+ "Index Block size:",
+ iblock->size);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "# of data block addresses in index block:",
- iblock->ndblk_addrs);
+ "# of data block addresses in index block:",
+ iblock->ndblk_addrs);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "# of super block addresses in index block:",
- iblock->nsblk_addrs);
+ "# of super block addresses in index block:",
+ iblock->nsblk_addrs);
/* Check if there are any elements in index block */
if(hdr->cparam.idx_blk_elmts > 0) {
@@ -264,7 +264,7 @@ H5EA__iblock_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int inde
HDfprintf(stream, "%*sData Block Addresses in Index Block:\n", indent, "");
for(u = 0; u < iblock->ndblk_addrs; u++) {
/* Print address */
- sprintf(temp_str, "Address #%u:", u);
+ HDsprintf(temp_str, "Address #%u:", u);
HDfprintf(stream, "%*s%-*s %a\n", (indent + 3), "", MAX(0, (fwidth - 3)),
temp_str,
iblock->dblk_addrs[u]);
@@ -280,7 +280,7 @@ H5EA__iblock_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int inde
HDfprintf(stream, "%*sSuper Block Addresses in Index Block:\n", indent, "");
for(u = 0; u < iblock->nsblk_addrs; u++) {
/* Print address */
- sprintf(temp_str, "Address #%u:", u);
+ HDsprintf(temp_str, "Address #%u:", u);
HDfprintf(stream, "%*s%-*s %a\n", (indent + 3), "", MAX(0, (fwidth - 3)),
temp_str,
iblock->sblk_addrs[u]);
@@ -293,21 +293,21 @@ CATCH
if(iblock && H5EA__iblock_unprotect(iblock, H5AC__NO_FLAGS_SET) < 0)
H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array index block")
if(hdr && H5EA__hdr_unprotect(hdr, H5AC__NO_FLAGS_SET) < 0)
- H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array header")
+ H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array header")
END_FUNC(PKG) /* end H5EA__iblock_debug() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5EA__sblock_debug
+ * Function: H5EA__sblock_debug
*
- * Purpose: Prints debugging info about a extensible array super block.
+ * Purpose: Prints debugging info about a extensible array super block.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Sep 30 2008
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Sep 30 2008
*
*-------------------------------------------------------------------------
*/
@@ -339,7 +339,7 @@ H5EA__sblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent,
/* Load the extensible array header */
if(NULL == (hdr = H5EA__hdr_protect(f, hdr_addr, dbg_ctx, H5AC__READ_ONLY_FLAG)))
- H5E_THROW(H5E_CANTPROTECT, "unable to load extensible array header")
+ H5E_THROW(H5E_CANTPROTECT, "unable to load extensible array header")
/* Protect super block */
/* (Note: setting parent of super block to 'hdr' for this operation should be OK -QAK) */
@@ -351,16 +351,16 @@ H5EA__sblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent,
/* Print the values */
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Array class ID:", hdr->cparam.cls->name);
+ "Array class ID:", hdr->cparam.cls->name);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Super Block size:",
- sblock->size);
+ "Super Block size:",
+ sblock->size);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "# of data block addresses in super block:",
- sblock->ndblks);
+ "# of data block addresses in super block:",
+ sblock->ndblks);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "# of elements in data blocks from this super block:",
- sblock->dblk_nelmts);
+ "# of elements in data blocks from this super block:",
+ sblock->dblk_nelmts);
/* Check if there are any data block addresses in super block */
if(sblock->ndblks > 0) {
@@ -371,7 +371,7 @@ H5EA__sblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent,
HDfprintf(stream, "%*sData Block Addresses in Super Block:\n", indent, "");
for(u = 0; u < sblock->ndblks; u++) {
/* Print address */
- sprintf(temp_str, "Address #%u:", u);
+ HDsprintf(temp_str, "Address #%u:", u);
HDfprintf(stream, "%*s%-*s %a\n", (indent + 3), "", MAX(0, (fwidth - 3)),
temp_str,
sblock->dblk_addrs[u]);
@@ -384,21 +384,21 @@ CATCH
if(sblock && H5EA__sblock_unprotect(sblock, H5AC__NO_FLAGS_SET) < 0)
H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array super block")
if(hdr && H5EA__hdr_unprotect(hdr, H5AC__NO_FLAGS_SET) < 0)
- H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array header")
+ H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array header")
END_FUNC(PKG) /* end H5EA__sblock_debug() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5EA__dblock_debug
+ * Function: H5EA__dblock_debug
*
- * Purpose: Prints debugging info about a extensible array data block.
+ * Purpose: Prints debugging info about a extensible array data block.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Sep 22 2008
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Sep 22 2008
*
*-------------------------------------------------------------------------
*/
@@ -432,7 +432,7 @@ H5EA__dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent,
/* Load the extensible array header */
if(NULL == (hdr = H5EA__hdr_protect(f, hdr_addr, dbg_ctx, H5AC__READ_ONLY_FLAG)))
- H5E_THROW(H5E_CANTPROTECT, "unable to load extensible array header")
+ H5E_THROW(H5E_CANTPROTECT, "unable to load extensible array header")
/* Protect data block */
/* (Note: setting parent of data block to 'hdr' for this operation should be OK -QAK) */
@@ -444,10 +444,10 @@ H5EA__dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent,
/* Print the values */
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Array class ID:", hdr->cparam.cls->name);
+ "Array class ID:", hdr->cparam.cls->name);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Data Block size:",
- dblock->size);
+ "Data Block size:",
+ dblock->size);
/* Print the elements in the index block */
@@ -466,7 +466,7 @@ CATCH
if(dblock && H5EA__dblock_unprotect(dblock, H5AC__NO_FLAGS_SET) < 0)
H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array data block")
if(hdr && H5EA__hdr_unprotect(hdr, H5AC__NO_FLAGS_SET) < 0)
- H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array header")
+ H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array header")
END_FUNC(PKG) /* end H5EA__dblock_debug() */
diff --git a/src/H5EAtest.c b/src/H5EAtest.c
index 3da7996..dccc007 100644
--- a/src/H5EAtest.c
+++ b/src/H5EAtest.c
@@ -14,7 +14,7 @@
/* Programmer: Quincey Koziol <koziol@hdfgroup.org>
* Thursday, August 28, 2008
*
- * Purpose: Extensible array testing functions.
+ * Purpose: Extensible array testing functions.
*
*/
@@ -34,11 +34,11 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5EApkg.h" /* Extensible Arrays */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5VMprivate.h" /* Vector functions */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5EApkg.h" /* Extensible Arrays */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5VMprivate.h" /* Vector functions */
/****************/
@@ -115,16 +115,16 @@ H5FL_DEFINE_STATIC(H5EA__test_ctx_t);
H5FL_DEFINE_STATIC(H5EA__ctx_cb_t);
-
+
/*-------------------------------------------------------------------------
- * Function: H5EA__test_crt_context
+ * Function: H5EA__test_crt_context
*
- * Purpose: Create context for callbacks
+ * Purpose: Create context for callbacks
*
- * Return: Success: non-NULL
- * Failure: NULL
+ * Return: Success: non-NULL
+ * Failure: NULL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, January 27, 2009
*
*-------------------------------------------------------------------------
@@ -141,7 +141,7 @@ H5EA__test_crt_context(void *_udata))
/* Allocate new context structure */
if(NULL == (ctx = H5FL_MALLOC(H5EA__test_ctx_t)))
- H5E_THROW(H5E_CANTALLOC, "can't allocate extensible array client callback context")
+ H5E_THROW(H5E_CANTALLOC, "can't allocate extensible array client callback context")
/* Initialize the context */
ctx->bogus = H5EA__TEST_BOGUS_VAL;
@@ -154,16 +154,16 @@ CATCH
END_FUNC(STATIC) /* end H5EA__test_crt_context() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5EA__test_dst_context
+ * Function: H5EA__test_dst_context
*
- * Purpose: Destroy context for callbacks
+ * Purpose: Destroy context for callbacks
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, January 27, 2009
*
*-------------------------------------------------------------------------
@@ -183,16 +183,16 @@ H5EA__test_dst_context(void *_ctx))
END_FUNC(STATIC) /* end H5EA__test_dst_context() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5EA__test_fill
+ * Function: H5EA__test_fill
*
- * Purpose: Fill "missing elements" in block of elements
+ * Purpose: Fill "missing elements" in block of elements
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, August 28, 2008
*
*-------------------------------------------------------------------------
@@ -212,16 +212,16 @@ H5EA__test_fill(void *nat_blk, size_t nelmts))
END_FUNC(STATIC) /* end H5EA__test_fill() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5EA__test_encode
+ * Function: H5EA__test_encode
*
- * Purpose: Encode an element from "native" to "raw" form
+ * Purpose: Encode an element from "native" to "raw" form
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, August 28, 2008
*
*-------------------------------------------------------------------------
@@ -263,16 +263,16 @@ CATCH
END_FUNC(STATIC) /* end H5EA__test_encode() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5EA__test_decode
+ * Function: H5EA__test_decode
*
- * Purpose: Decode an element from "raw" to "native" form
+ * Purpose: Decode an element from "raw" to "native" form
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, August 28, 2008
*
*-------------------------------------------------------------------------
@@ -309,16 +309,16 @@ H5EA__test_decode(const void *_raw, void *_elmt, size_t nelmts, void *_ctx))
END_FUNC(STATIC) /* end H5EA__test_decode() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5EA__test_debug
+ * Function: H5EA__test_debug
*
- * Purpose: Display an element for debugging
+ * Purpose: Display an element for debugging
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, August 28, 2008
*
*-------------------------------------------------------------------------
@@ -336,7 +336,7 @@ H5EA__test_debug(FILE *stream, int indent, int fwidth, hsize_t idx,
HDassert(elmt);
/* Print element */
- sprintf(temp_str, "Element #%llu:", (unsigned long long)idx);
+ HDsprintf(temp_str, "Element #%llu:", (unsigned long long)idx);
HDfprintf(stream, "%*s%-*s %llu\n", indent, "", fwidth, temp_str,
(unsigned long long)*(const uint64_t *)elmt);
@@ -346,21 +346,21 @@ END_FUNC(STATIC) /* end H5EA__test_debug() */
* Function: H5EA__test_crt_dbg_context
*
* Purpose: Create context for debugging callback
- *
+ *
* Return: Success: non-NULL
* Failure: NULL
- *
- * Programmer: Vailin Choi; August 2010
+ *
+ * Programmer: Vailin Choi; August 2010
*
*-------------------------------------------------------------------------
*/
BEGIN_FUNC(STATIC, ERR,
void *, NULL, NULL,
H5EA__test_crt_dbg_context(H5F_t H5_ATTR_UNUSED *f, haddr_t H5_ATTR_UNUSED obj_addr))
-
+
/* Local variables */
H5EA__ctx_cb_t *ctx; /* Context for callbacks */
-
+
/* Allocate new context structure */
if(NULL == (ctx = H5FL_MALLOC(H5EA__ctx_cb_t)))
H5E_THROW(H5E_CANTALLOC, "can't allocate extensible array client callback context")
@@ -372,16 +372,16 @@ CATCH
END_FUNC(STATIC) /* end H5EA__test_crt_dbg_context() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5EA__test_dst_dbg_context
+ * Function: H5EA__test_dst_dbg_context
*
- * Purpose: Destroy context for callbacks
+ * Purpose: Destroy context for callbacks
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Vailin Choi; August 2010
+ * Programmer: Vailin Choi; August 2010
*
*-------------------------------------------------------------------------
*/
@@ -399,16 +399,16 @@ H5EA__test_dst_dbg_context(void *_ctx))
END_FUNC(STATIC) /* end H5EA__test_dst_dbg_context() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5EA_get_cparam_test
+ * Function: H5EA_get_cparam_test
*
- * Purpose: Retrieve the parameters used to create the extensible array
+ * Purpose: Retrieve the parameters used to create the extensible array
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, August 28, 2008
*
*-------------------------------------------------------------------------
@@ -431,16 +431,16 @@ H5EA_get_cparam_test(const H5EA_t *ea, H5EA_create_t *cparam))
END_FUNC(PRIV) /* end H5EA_get_cparam_test() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5EA_cmp_cparam_test
+ * Function: H5EA_cmp_cparam_test
*
- * Purpose: Compare the parameters used to create the extensible array
+ * Purpose: Compare the parameters used to create the extensible array
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, August 28, 2008
*
*-------------------------------------------------------------------------
diff --git a/src/H5Eint.c b/src/H5Eint.c
index ff2a860..166803b 100644
--- a/src/H5Eint.c
+++ b/src/H5Eint.c
@@ -13,11 +13,11 @@
/*-------------------------------------------------------------------------
*
- * Created: H5Eint.c
- * April 11 2007
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Created: H5Eint.c
+ * April 11 2007
+ * Quincey Koziol <koziol@hdfgroup.org>
*
- * Purpose: General use, "internal" routines for error handling.
+ * Purpose: General use, "internal" routines for error handling.
*
*-------------------------------------------------------------------------
*/
@@ -32,11 +32,11 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
+#include "H5private.h" /* Generic Functions */
#include "H5CXprivate.h" /* API Contexts */
-#include "H5Epkg.h" /* Error handling */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
+#include "H5Epkg.h" /* Error handling */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
/****************/
@@ -107,21 +107,21 @@ hid_t H5E_ERR_CLS_g = FAIL;
/*
* variables used for MPI error reporting
*/
-char H5E_mpi_error_str[MPI_MAX_ERROR_STRING];
-int H5E_mpi_error_str_len;
+char H5E_mpi_error_str[MPI_MAX_ERROR_STRING];
+int H5E_mpi_error_str_len;
#endif /* H5_HAVE_PARALLEL */
-
+
/*-------------------------------------------------------------------------
- * Function: H5E_get_msg
+ * Function: H5E_get_msg
*
- * Purpose: Private function to retrieve an error message.
+ * Purpose: Private function to retrieve an error message.
*
* Return: Non-negative for name length if succeeds(zero means no name);
* otherwise returns negative value.
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Friday, July 14, 2003
*
*-------------------------------------------------------------------------
@@ -155,37 +155,37 @@ H5E_get_msg(const H5E_msg_t *msg, H5E_type_t *type, char *msg_str, size_t size)
} /* end H5E_get_msg() */
#ifndef H5_NO_DEPRECATED_SYMBOLS
-
+
/*-------------------------------------------------------------------------
- * Function: H5E_walk1_cb
+ * Function: H5E_walk1_cb
*
- * Purpose: This function is for backward compatibility.
+ * Purpose: This function is for backward compatibility.
* This is a default error stack traversal callback function
- * that prints error messages to the specified output stream.
- * This function is for backward compatibility with v1.6.
- * It is not meant to be called directly but rather as an
- * argument to the H5Ewalk() function. This function is called
- * also by H5Eprint(). Application writers are encouraged to
- * use this function as a model for their own error stack
- * walking functions.
+ * that prints error messages to the specified output stream.
+ * This function is for backward compatibility with v1.6.
+ * It is not meant to be called directly but rather as an
+ * argument to the H5Ewalk() function. This function is called
+ * also by H5Eprint(). Application writers are encouraged to
+ * use this function as a model for their own error stack
+ * walking functions.
*
- * N is a counter for how many times this function has been
- * called for this particular traversal of the stack. It always
- * begins at zero for the first error on the stack (either the
- * top or bottom error, or even both, depending on the traversal
- * direction and the size of the stack).
+ * N is a counter for how many times this function has been
+ * called for this particular traversal of the stack. It always
+ * begins at zero for the first error on the stack (either the
+ * top or bottom error, or even both, depending on the traversal
+ * direction and the size of the stack).
*
- * ERR_DESC is an error description. It contains all the
- * information about a particular error.
+ * ERR_DESC is an error description. It contains all the
+ * information about a particular error.
*
- * CLIENT_DATA is the same pointer that was passed as the
- * CLIENT_DATA argument of H5Ewalk(). It is expected to be a
- * file pointer (or stderr if null).
+ * CLIENT_DATA is the same pointer that was passed as the
+ * CLIENT_DATA argument of H5Ewalk(). It is expected to be a
+ * file pointer (or stderr if null).
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
* Programmer: Raymond Lu
- * Thursday, May 11, 2006
+ * Thursday, May 11, 2006
*
*-------------------------------------------------------------------------
*/
@@ -193,12 +193,12 @@ static herr_t
H5E_walk1_cb(int n, H5E_error1_t *err_desc, void *client_data)
{
H5E_print_t *eprint = (H5E_print_t *)client_data;
- FILE *stream; /* I/O stream to print output to */
+ FILE *stream; /* I/O stream to print output to */
H5E_cls_t *cls_ptr; /* Pointer to error class */
H5E_msg_t *maj_ptr; /* Pointer to major error info */
H5E_msg_t *min_ptr; /* Pointer to minor error info */
- const char *maj_str = "No major description"; /* Major error description */
- const char *min_str = "No minor description"; /* Minor error description */
+ const char *maj_str = "No major description"; /* Major error description */
+ const char *min_str = "No minor description"; /* Minor error description */
unsigned have_desc = 1; /* Flag to indicate whether the error has a "real" description */
herr_t ret_value = SUCCEED;
@@ -239,7 +239,7 @@ H5E_walk1_cb(int n, H5E_error1_t *err_desc, void *client_data)
if(cls_ptr->lib_vers)
eprint->cls.lib_vers = cls_ptr->lib_vers;
- fprintf(stream, "%s-DIAG: Error detected in %s (%s) ",
+ HDfprintf(stream, "%s-DIAG: Error detected in %s (%s) ",
(cls_ptr->cls_name ? cls_ptr->cls_name : "(null)"),
(cls_ptr->lib_name ? cls_ptr->lib_name : "(null)"),
(cls_ptr->lib_vers ? cls_ptr->lib_vers : "(null)"));
@@ -249,22 +249,22 @@ H5E_walk1_cb(int n, H5E_error1_t *err_desc, void *client_data)
{
int mpi_rank, mpi_initialized, mpi_finalized;
- MPI_Initialized(&mpi_initialized);
+ MPI_Initialized(&mpi_initialized);
MPI_Finalized(&mpi_finalized);
if(mpi_initialized && !mpi_finalized) {
- MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
- fprintf(stream, "MPI-process %d", mpi_rank);
- } /* end if */
+ MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
+ HDfprintf(stream, "MPI-process %d", mpi_rank);
+ } /* end if */
else
- fprintf(stream, "thread 0");
+ HDfprintf(stream, "thread 0");
} /* end block */
#elif defined(H5_HAVE_THREADSAFE)
- fprintf(stream, "thread %lu", (unsigned long)HDpthread_self_ulong());
+ HDfprintf(stream, "thread %lu", (unsigned long)HDpthread_self_ulong());
#else
- fprintf(stream, "thread 0");
+ HDfprintf(stream, "thread 0");
#endif
- fprintf(stream, ":\n");
+ HDfprintf(stream, ":\n");
} /* end if */
/* Check for "real" error description - used to format output more nicely */
@@ -272,47 +272,47 @@ H5E_walk1_cb(int n, H5E_error1_t *err_desc, void *client_data)
have_desc=0;
/* Print error message */
- fprintf(stream, "%*s#%03d: %s line %u in %s()%s%s\n",
- H5E_INDENT, "", n, err_desc->file_name, err_desc->line,
- err_desc->func_name, (have_desc ? ": " : ""),
+ HDfprintf(stream, "%*s#%03d: %s line %u in %s()%s%s\n",
+ H5E_INDENT, "", n, err_desc->file_name, err_desc->line,
+ err_desc->func_name, (have_desc ? ": " : ""),
(have_desc ? err_desc->desc : ""));
- fprintf(stream, "%*smajor: %s\n", (H5E_INDENT * 2), "", maj_str);
- fprintf(stream, "%*sminor: %s\n", (H5E_INDENT * 2), "", min_str);
+ HDfprintf(stream, "%*smajor: %s\n", (H5E_INDENT * 2), "", maj_str);
+ HDfprintf(stream, "%*sminor: %s\n", (H5E_INDENT * 2), "", min_str);
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E_walk1_cb() */
#endif /* H5_NO_DEPRECATED_SYMBOLS */
-
+
/*-------------------------------------------------------------------------
- * Function: H5E_walk2_cb
+ * Function: H5E_walk2_cb
*
- * Purpose: This is a default error stack traversal callback function
- * that prints error messages to the specified output stream.
- * It is not meant to be called directly but rather as an
- * argument to the H5Ewalk2() function. This function is
- * called also by H5Eprint2(). Application writers are
- * encouraged to use this function as a model for their own
- * error stack walking functions.
+ * Purpose: This is a default error stack traversal callback function
+ * that prints error messages to the specified output stream.
+ * It is not meant to be called directly but rather as an
+ * argument to the H5Ewalk2() function. This function is
+ * called also by H5Eprint2(). Application writers are
+ * encouraged to use this function as a model for their own
+ * error stack walking functions.
*
- * N is a counter for how many times this function has been
- * called for this particular traversal of the stack. It always
- * begins at zero for the first error on the stack (either the
- * top or bottom error, or even both, depending on the traversal
- * direction and the size of the stack).
+ * N is a counter for how many times this function has been
+ * called for this particular traversal of the stack. It always
+ * begins at zero for the first error on the stack (either the
+ * top or bottom error, or even both, depending on the traversal
+ * direction and the size of the stack).
*
- * ERR_DESC is an error description. It contains all the
- * information about a particular error.
+ * ERR_DESC is an error description. It contains all the
+ * information about a particular error.
*
- * CLIENT_DATA is the same pointer that was passed as the
- * CLIENT_DATA argument of H5Ewalk(). It is expected to be a
- * file pointer (or stderr if null).
+ * CLIENT_DATA is the same pointer that was passed as the
+ * CLIENT_DATA argument of H5Ewalk(). It is expected to be a
+ * file pointer (or stderr if null).
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Friday, December 12, 1997
+ * Programmer: Robb Matzke
+ * Friday, December 12, 1997
*
*-------------------------------------------------------------------------
*/
@@ -320,12 +320,12 @@ static herr_t
H5E_walk2_cb(unsigned n, const H5E_error2_t *err_desc, void *client_data)
{
H5E_print_t *eprint = (H5E_print_t *)client_data;
- FILE *stream; /* I/O stream to print output to */
+ FILE *stream; /* I/O stream to print output to */
H5E_cls_t *cls_ptr; /* Pointer to error class */
H5E_msg_t *maj_ptr; /* Pointer to major error info */
H5E_msg_t *min_ptr; /* Pointer to minor error info */
- const char *maj_str = "No major description"; /* Major error description */
- const char *min_str = "No minor description"; /* Minor error description */
+ const char *maj_str = "No major description"; /* Major error description */
+ const char *min_str = "No minor description"; /* Minor error description */
unsigned have_desc = 1; /* Flag to indicate whether the error has a "real" description */
herr_t ret_value = SUCCEED;
@@ -371,7 +371,7 @@ H5E_walk2_cb(unsigned n, const H5E_error2_t *err_desc, void *client_data)
if(cls_ptr->lib_vers)
eprint->cls.lib_vers = cls_ptr->lib_vers;
- fprintf(stream, "%s-DIAG: Error detected in %s (%s) ",
+ HDfprintf(stream, "%s-DIAG: Error detected in %s (%s) ",
(cls_ptr->cls_name ? cls_ptr->cls_name : "(null)"),
(cls_ptr->lib_name ? cls_ptr->lib_name : "(null)"),
(cls_ptr->lib_vers ? cls_ptr->lib_vers : "(null)"));
@@ -381,22 +381,22 @@ H5E_walk2_cb(unsigned n, const H5E_error2_t *err_desc, void *client_data)
{
int mpi_rank, mpi_initialized, mpi_finalized;
- MPI_Initialized(&mpi_initialized);
+ MPI_Initialized(&mpi_initialized);
MPI_Finalized(&mpi_finalized);
if(mpi_initialized && !mpi_finalized) {
- MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
- fprintf(stream, "MPI-process %d", mpi_rank);
- } /* end if */
+ MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
+ HDfprintf(stream, "MPI-process %d", mpi_rank);
+ } /* end if */
else
- fprintf(stream, "thread 0");
+ HDfprintf(stream, "thread 0");
} /* end block */
#elif defined(H5_HAVE_THREADSAFE)
- fprintf(stream, "thread %lu", (unsigned long)HDpthread_self_ulong());
+ HDfprintf(stream, "thread %lu", (unsigned long)HDpthread_self_ulong());
#else
- fprintf(stream, "thread 0");
+ HDfprintf(stream, "thread 0");
#endif
- fprintf(stream, ":\n");
+ HDfprintf(stream, ":\n");
} /* end if */
/* Check for "real" error description - used to format output more nicely */
@@ -404,20 +404,20 @@ H5E_walk2_cb(unsigned n, const H5E_error2_t *err_desc, void *client_data)
have_desc = 0;
/* Print error message */
- fprintf(stream, "%*s#%03u: %s line %u in %s()%s%s\n",
- H5E_INDENT, "", n, err_desc->file_name, err_desc->line,
- err_desc->func_name, (have_desc ? ": " : ""),
+ HDfprintf(stream, "%*s#%03u: %s line %u in %s()%s%s\n",
+ H5E_INDENT, "", n, err_desc->file_name, err_desc->line,
+ err_desc->func_name, (have_desc ? ": " : ""),
(have_desc ? err_desc->desc : ""));
- fprintf(stream, "%*smajor: %s\n", (H5E_INDENT * 2), "", maj_str);
- fprintf(stream, "%*sminor: %s\n", (H5E_INDENT * 2), "", min_str);
+ HDfprintf(stream, "%*smajor: %s\n", (H5E_INDENT * 2), "", maj_str);
+ HDfprintf(stream, "%*sminor: %s\n", (H5E_INDENT * 2), "", min_str);
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E_walk2_cb() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5E_print
+ * Function: H5E_print
*
* Purpose: Private function to print the error stack in some default
* way. This is just a convenience function for H5Ewalk() and
@@ -427,7 +427,7 @@ done:
*
* Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Friday, February 27, 1998
*
*-------------------------------------------------------------------------
@@ -475,34 +475,34 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E_print() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5E_walk
+ * Function: H5E_walk
*
- * Purpose: Private function for H5Ewalk.
+ * Purpose: Private function for H5Ewalk.
* Walks the error stack, calling the specified function for
- * each error on the stack. The DIRECTION argument determines
- * whether the stack is walked from the inside out or the
- * outside in. The value H5E_WALK_UPWARD means begin with the
- * most specific error and end at the API; H5E_WALK_DOWNWARD
- * means to start at the API and end at the inner-most function
- * where the error was first detected.
+ * each error on the stack. The DIRECTION argument determines
+ * whether the stack is walked from the inside out or the
+ * outside in. The value H5E_WALK_UPWARD means begin with the
+ * most specific error and end at the API; H5E_WALK_DOWNWARD
+ * means to start at the API and end at the inner-most function
+ * where the error was first detected.
*
- * The function pointed to by STACK_FUNC will be called for
- * each error record in the error stack. It's arguments will
- * include an index number (beginning at zero regardless of
- * stack traversal direction), an error stack entry, and the
- * CLIENT_DATA pointer passed to H5E_print.
+ * The function pointed to by STACK_FUNC will be called for
+ * each error record in the error stack. It's arguments will
+ * include an index number (beginning at zero regardless of
+ * stack traversal direction), an error stack entry, and the
+ * CLIENT_DATA pointer passed to H5E_print.
*
- * The function FUNC is also provided for backward compatibility.
- * When BK_COMPATIBLE is set to be TRUE, FUNC is used to be
- * compatible with older library. If BK_COMPATIBLE is FALSE,
- * STACK_FUNC is used.
+ * The function FUNC is also provided for backward compatibility.
+ * When BK_COMPATIBLE is set to be TRUE, FUNC is used to be
+ * compatible with older library. If BK_COMPATIBLE is FALSE,
+ * STACK_FUNC is used.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Friday, December 12, 1997
+ * Programmer: Robb Matzke
+ * Friday, December 12, 1997
*
*-------------------------------------------------------------------------
*/
@@ -510,7 +510,7 @@ herr_t
H5E_walk(const H5E_t *estack, H5E_direction_t direction, const H5E_walk_op_t *op,
void *client_data)
{
- int i; /* Local index variable */
+ int i; /* Local index variable */
herr_t ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -521,7 +521,7 @@ H5E_walk(const H5E_t *estack, H5E_direction_t direction, const H5E_walk_op_t *op
/* check args, but rather than failing use some default value */
if(direction != H5E_WALK_UPWARD && direction != H5E_WALK_DOWNWARD)
- direction = H5E_WALK_UPWARD;
+ direction = H5E_WALK_UPWARD;
/* Walk the stack if a callback function was given */
if(op->vers == 1) {
@@ -586,18 +586,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E_walk() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5E_get_auto
+ * Function: H5E_get_auto
*
- * Purpose: Private function to return the current settings for the
+ * Purpose: Private function to return the current settings for the
* automatic error stack traversal function and its data
* for specific error stack. Either (or both) arguments may
* be null in which case the value is not returned.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* July 18, 2003
*
*-------------------------------------------------------------------------
@@ -618,26 +618,26 @@ H5E_get_auto(const H5E_t *estack, H5E_auto_op_t *op, void **client_data)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5E_get_auto2() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5E_set_auto
+ * Function: H5E_set_auto
*
- * Purpose: Private function to turn on or off automatic printing of
+ * Purpose: Private function to turn on or off automatic printing of
* errors for certain error stack. When turned on (non-null
* FUNC pointer) any API function which returns an error
* indication will first call FUNC passing it CLIENT_DATA
* as an argument.
*
- * The default values before this function is called are
- * H5Eprint2() with client data being the standard error stream,
- * stderr.
+ * The default values before this function is called are
+ * H5Eprint2() with client data being the standard error stream,
+ * stderr.
*
- * Automatic stack traversal is always in the H5E_WALK_DOWNWARD
- * direction.
+ * 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: Robb Matzke
+ * Programmer: Robb Matzke
* Friday, February 27, 1998
*
*-------------------------------------------------------------------------
@@ -656,16 +656,16 @@ H5E_set_auto(H5E_t *estack, const H5E_auto_op_t *op, void *client_data)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5E_set_auto() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5E_printf_stack
+ * Function: H5E_printf_stack
*
- * Purpose: Printf-like wrapper around H5E__push_stack.
+ * Purpose: Printf-like wrapper around H5E__push_stack.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Tuesday, August 12, 2008
+ * Programmer: Quincey Koziol
+ * Tuesday, August 12, 2008
*
*-------------------------------------------------------------------------
*/
@@ -680,14 +680,14 @@ H5E_printf_stack(H5E_t *estack, const char *file, const char *func, unsigned lin
#endif /* H5_HAVE_VASPRINTF */
char *tmp = NULL; /* Buffer to place formatted description in */
hbool_t va_started = FALSE; /* Whether the variable argument list is open */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
/*
* WARNING: We cannot call HERROR() from within this function or else we
- * could enter infinite recursion. Furthermore, we also cannot
- * call any other HDF5 macro or function which might call
- * HERROR(). HERROR() is called by HRETURN_ERROR() which could
- * be called by FUNC_ENTER().
+ * could enter infinite recursion. Furthermore, we also cannot
+ * call any other HDF5 macro or function which might call
+ * HERROR(). HERROR() is called by HRETURN_ERROR() which could
+ * be called by FUNC_ENTER().
*/
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -753,24 +753,24 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E_printf_stack() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5E__push_stack
+ * Function: H5E__push_stack
*
- * Purpose: Pushes a new error record onto error stack for the current
- * thread. The error has major and minor IDs MAJ_ID and
- * MIN_ID, the name of a function where the error was detected,
- * the name of the file where the error was detected, the
- * line within that file, and an error description string. The
- * function name, file name, and error description strings must
- * be statically allocated (the FUNC_ENTER() macro takes care of
- * the function name and file name automatically, but the
- * programmer is responsible for the description string).
+ * Purpose: Pushes a new error record onto error stack for the current
+ * thread. The error has major and minor IDs MAJ_ID and
+ * MIN_ID, the name of a function where the error was detected,
+ * the name of the file where the error was detected, the
+ * line within that file, and an error description string. The
+ * function name, file name, and error description strings must
+ * be statically allocated (the FUNC_ENTER() macro takes care of
+ * the function name and file name automatically, but the
+ * programmer is responsible for the description string).
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Friday, December 12, 1997
+ * Programmer: Robb Matzke
+ * Friday, December 12, 1997
*
*-------------------------------------------------------------------------
*/
@@ -778,14 +778,14 @@ herr_t
H5E__push_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 *desc)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
/*
* WARNING: We cannot call HERROR() from within this function or else we
- * could enter infinite recursion. Furthermore, we also cannot
- * call any other HDF5 macro or function which might call
- * HERROR(). HERROR() is called by HRETURN_ERROR() which could
- * be called by FUNC_ENTER().
+ * could enter infinite recursion. Furthermore, we also cannot
+ * call any other HDF5 macro or function which might call
+ * HERROR(). HERROR() is called by HRETURN_ERROR() which could
+ * be called by FUNC_ENTER().
*/
FUNC_ENTER_PACKAGE_NOERR
@@ -796,7 +796,7 @@ H5E__push_stack(H5E_t *estack, const char *file, const char *func, unsigned line
/* Check for 'default' error stack */
if(estack == NULL)
- if(NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */
+ if(NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */
HGOTO_DONE(FAIL)
/*
@@ -819,37 +819,37 @@ H5E__push_stack(H5E_t *estack, const char *file, const char *func, unsigned line
/* Increment the IDs to indicate that they are used in this stack */
if(H5I_inc_ref(cls_id, FALSE) < 0)
HGOTO_DONE(FAIL)
- estack->slot[estack->nused].cls_id = cls_id;
+ estack->slot[estack->nused].cls_id = cls_id;
if(H5I_inc_ref(maj_id, FALSE) < 0)
HGOTO_DONE(FAIL)
- estack->slot[estack->nused].maj_num = maj_id;
+ estack->slot[estack->nused].maj_num = maj_id;
if(H5I_inc_ref(min_id, FALSE) < 0)
HGOTO_DONE(FAIL)
- estack->slot[estack->nused].min_num = min_id;
- if(NULL == (estack->slot[estack->nused].func_name = H5MM_xstrdup(func)))
+ estack->slot[estack->nused].min_num = min_id;
+ if(NULL == (estack->slot[estack->nused].func_name = H5MM_xstrdup(func)))
HGOTO_DONE(FAIL)
- if(NULL == (estack->slot[estack->nused].file_name = H5MM_xstrdup(file)))
+ if(NULL == (estack->slot[estack->nused].file_name = H5MM_xstrdup(file)))
HGOTO_DONE(FAIL)
- estack->slot[estack->nused].line = line;
- if(NULL == (estack->slot[estack->nused].desc = H5MM_xstrdup(desc)))
+ estack->slot[estack->nused].line = line;
+ if(NULL == (estack->slot[estack->nused].desc = H5MM_xstrdup(desc)))
HGOTO_DONE(FAIL)
- estack->nused++;
+ estack->nused++;
} /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E__push_stack() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5E_clear_entries
+ * Function: H5E_clear_entries
*
- * Purpose: Private function to clear the error stack entries for the
+ * Purpose: Private function to clear the error stack entries for the
* specified error stack.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Wednesday, August 6, 2003
*
*-------------------------------------------------------------------------
@@ -896,16 +896,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E_clear_entries() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5E_clear_stack
+ * Function: H5E_clear_stack
*
- * Purpose: Private function to clear the error stack for the
+ * Purpose: Private function to clear 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
*
*-------------------------------------------------------------------------
@@ -919,7 +919,7 @@ H5E_clear_stack(H5E_t *estack)
/* Check for 'default' error stack */
if(estack == NULL)
- if(NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */
+ if(NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */
HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack")
/* Empty the error stack */
@@ -932,16 +932,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E_clear_stack() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5E_pop
+ * Function: H5E_pop
*
- * Purpose: Private function to delete some error messages from the top
+ * Purpose: Private function to delete 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
*
*-------------------------------------------------------------------------
@@ -965,17 +965,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E_pop() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5E_dump_api_stack
+ * Function: H5E_dump_api_stack
*
- * Purpose: Private function to dump the error stack during an error in
+ * Purpose: Private function to dump the error stack during an error in
* an API function if a callback function is defined for the
* current error stack.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Wednesday, August 6, 2003
*
*-------------------------------------------------------------------------
@@ -996,7 +996,7 @@ H5E_dump_api_stack(hbool_t is_api)
#ifdef H5_NO_DEPRECATED_SYMBOLS
if(estack->auto_op.func2)
(void)((estack->auto_op.func2)(H5E_DEFAULT, estack->auto_data));
-#else /* H5_NO_DEPRECATED_SYMBOLS */
+#else /* H5_NO_DEPRECATED_SYMBOLS */
if(estack->auto_op.vers == 1) {
if(estack->auto_op.func1)
(void)((estack->auto_op.func1)(estack->auto_data));
diff --git a/src/H5FAtest.c b/src/H5FAtest.c
index 4b03036..1531fa3 100644
--- a/src/H5FAtest.c
+++ b/src/H5FAtest.c
@@ -32,11 +32,11 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FApkg.h" /* Fixed Arrays */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5VMprivate.h" /* Vector functions */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FApkg.h" /* Fixed Arrays */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5VMprivate.h" /* Vector functions */
/****************/
@@ -112,7 +112,7 @@ const H5FA_class_t H5FA_CLS_TEST[1]={{
H5FL_DEFINE_STATIC(H5FA__test_ctx_t);
-
+
/*-------------------------------------------------------------------------
* Function: H5FA__test_crt_context
*
@@ -147,7 +147,7 @@ CATCH
END_FUNC(STATIC) /* end H5FA__test_crt_context() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FA__test_dst_context
*
@@ -175,7 +175,7 @@ H5FA__test_dst_context(void *_ctx))
END_FUNC(STATIC) /* end H5FA__test_dst_context() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FA__test_fill
*
@@ -203,7 +203,7 @@ H5FA__test_fill(void *nat_blk, size_t nelmts))
END_FUNC(STATIC) /* end H5FA__test_fill() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FA__test_encode
*
@@ -247,7 +247,7 @@ H5FA__test_encode(void *raw, const void *_elmt, size_t nelmts, void H5_ATTR_UNUS
END_FUNC(STATIC) /* end H5FA__test_encode() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FA__test_decode
*
@@ -292,7 +292,7 @@ H5FA__test_decode(const void *_raw, void *_elmt, size_t nelmts, void H5_ATTR_UNU
END_FUNC(STATIC) /* end H5FA__test_decode() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FA__test_debug
*
@@ -318,13 +318,13 @@ H5FA__test_debug(FILE *stream, int indent, int fwidth, hsize_t idx,
HDassert(elmt);
/* Print element */
- sprintf(temp_str, "Element #%llu:", (unsigned long long)idx);
+ HDsprintf(temp_str, "Element #%llu:", (unsigned long long)idx);
HDfprintf(stream, "%*s%-*s %llu\n", indent, "", fwidth, temp_str,
(unsigned long long)*(const uint64_t *)elmt);
END_FUNC(STATIC) /* end H5FA__test_debug() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FA__test_crt_dbg_context
*
@@ -359,7 +359,7 @@ CATCH
END_FUNC(STATIC) /* end H5FA__test_crt_dbg_context() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FA_get_cparam_test
*
@@ -386,7 +386,7 @@ H5FA_get_cparam_test(const H5FA_t *fa, H5FA_create_t *cparam))
END_FUNC(PRIV) /* end H5FA_get_cparam_test() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FA_cmp_cparam_test
*
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c
index efbdafe..8878c25 100644
--- a/src/H5FDmpio.c
+++ b/src/H5FDmpio.c
@@ -15,22 +15,22 @@
* Programmer: Robb Matzke <matzke@llnl.gov>
* Thursday, July 29, 1999
*
- * Purpose: This is the MPI-2 I/O driver.
+ * Purpose: This is the MPI-2 I/O driver.
*
*/
#include "H5FDdrvr_module.h" /* This source code file is part of the H5FD driver module */
-#include "H5private.h" /* Generic Functions */
+#include "H5private.h" /* Generic Functions */
#include "H5CXprivate.h" /* API Contexts */
-#include "H5Dprivate.h" /* Dataset functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5FDmpi.h" /* MPI-based file drivers */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
+#include "H5Dprivate.h" /* Dataset functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5FDmpi.h" /* MPI-based file drivers */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
#include "H5Pprivate.h" /* Property lists */
#ifdef H5_HAVE_PARALLEL
@@ -58,16 +58,16 @@ static char H5FD_mpi_native_g[] = "native";
* driver doesn't bother to keep it updated since it's an expensive operation.
*/
typedef struct H5FD_mpio_t {
- H5FD_t pub; /*public stuff, must be first */
- MPI_File f; /*MPIO file handle */
- MPI_Comm comm; /*communicator */
- MPI_Info info; /*file information */
+ H5FD_t pub; /*public stuff, must be first */
+ MPI_File f; /*MPIO file handle */
+ MPI_Comm comm; /*communicator */
+ MPI_Info info; /*file information */
int mpi_rank; /* This process's rank */
int mpi_size; /* Total number of processes */
- haddr_t eof; /*end-of-file marker */
- haddr_t eoa; /*end-of-address marker */
- haddr_t last_eoa; /* Last known end-of-address marker */
- haddr_t local_eof; /* Local end-of-file address for each process */
+ haddr_t eof; /*end-of-file marker */
+ haddr_t eoa; /*end-of-address marker */
+ haddr_t last_eoa; /* Last known end-of-address marker */
+ haddr_t local_eof; /* Local end-of-file address for each process */
} H5FD_mpio_t;
/* Private Prototypes */
@@ -78,7 +78,7 @@ static void *H5FD_mpio_fapl_get(H5FD_t *_file);
static void *H5FD_mpio_fapl_copy(const void *_old_fa);
static herr_t H5FD_mpio_fapl_free(void *_fa);
static H5FD_t *H5FD_mpio_open(const char *name, unsigned flags, hid_t fapl_id,
- haddr_t maxaddr);
+ haddr_t maxaddr);
static herr_t H5FD_mpio_close(H5FD_t *_file);
static herr_t H5FD_mpio_query(const H5FD_t *_f1, unsigned long *flags);
static haddr_t H5FD_mpio_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
@@ -99,35 +99,35 @@ static herr_t H5FD_mpio_get_info(H5FD_t *_file, void** mpi_info);
/* The MPIO file driver information */
static const H5FD_class_mpi_t H5FD_mpio_g = {
{ /* Start of superclass information */
- "mpio", /*name */
- HADDR_MAX, /*maxaddr */
- H5F_CLOSE_SEMI, /* fc_degree */
+ "mpio", /*name */
+ HADDR_MAX, /*maxaddr */
+ H5F_CLOSE_SEMI, /* fc_degree */
H5FD_mpio_term, /*terminate */
- NULL, /*sb_size */
- NULL, /*sb_encode */
- NULL, /*sb_decode */
- sizeof(H5FD_mpio_fapl_t), /*fapl_size */
- H5FD_mpio_fapl_get, /*fapl_get */
- H5FD_mpio_fapl_copy, /*fapl_copy */
- H5FD_mpio_fapl_free, /*fapl_free */
- 0, /*dxpl_size */
- NULL, /*dxpl_copy */
- NULL, /*dxpl_free */
- H5FD_mpio_open, /*open */
- H5FD_mpio_close, /*close */
- NULL, /*cmp */
- H5FD_mpio_query, /*query */
- NULL, /*get_type_map */
- NULL, /*alloc */
- NULL, /*free */
- H5FD_mpio_get_eoa, /*get_eoa */
- H5FD_mpio_set_eoa, /*set_eoa */
- H5FD_mpio_get_eof, /*get_eof */
+ NULL, /*sb_size */
+ NULL, /*sb_encode */
+ NULL, /*sb_decode */
+ sizeof(H5FD_mpio_fapl_t), /*fapl_size */
+ H5FD_mpio_fapl_get, /*fapl_get */
+ H5FD_mpio_fapl_copy, /*fapl_copy */
+ H5FD_mpio_fapl_free, /*fapl_free */
+ 0, /*dxpl_size */
+ NULL, /*dxpl_copy */
+ NULL, /*dxpl_free */
+ H5FD_mpio_open, /*open */
+ H5FD_mpio_close, /*close */
+ NULL, /*cmp */
+ H5FD_mpio_query, /*query */
+ NULL, /*get_type_map */
+ NULL, /*alloc */
+ NULL, /*free */
+ H5FD_mpio_get_eoa, /*get_eoa */
+ H5FD_mpio_set_eoa, /*set_eoa */
+ H5FD_mpio_get_eof, /*get_eof */
H5FD_mpio_get_handle, /*get_handle */
- H5FD_mpio_read, /*read */
- H5FD_mpio_write, /*write */
- H5FD_mpio_flush, /*flush */
- H5FD_mpio_truncate, /*truncate */
+ H5FD_mpio_read, /*read */
+ H5FD_mpio_write, /*write */
+ H5FD_mpio_flush, /*flush */
+ H5FD_mpio_truncate, /*truncate */
NULL, /*lock */
NULL, /*unlock */
H5FD_FLMAP_DICHOTOMY /*fl_map */
@@ -158,7 +158,7 @@ static int H5FD_mpio_Debug[256] =
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
#endif
-
+
/*--------------------------------------------------------------------------
NAME
H5FD__init_package -- Initialize interface-specific information
@@ -185,17 +185,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FD__init_package() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_mpio_init
+ * Function: H5FD_mpio_init
*
- * Purpose: Initialize this driver by registering the driver with the
- * library.
+ * Purpose: Initialize this driver by registering the driver with the
+ * library.
*
- * Return: Success: The driver ID for the mpio driver.
- * Failure: Negative.
+ * Return: Success: The driver ID for the mpio driver.
+ * Failure: Negative.
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, August 5, 1999
*
*-------------------------------------------------------------------------
@@ -207,7 +207,7 @@ H5FD_mpio_init(void)
static int H5FD_mpio_Debug_inited = 0;
#endif /* H5FDmpio_DEBUG */
const char *s; /* String for environment variables */
- hid_t ret_value; /* Return value */
+ hid_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -226,12 +226,12 @@ H5FD_mpio_init(void)
s = HDgetenv("H5FD_mpio_Debug");
if(s) {
/* Set debug mask */
- while(*s) {
- H5FD_mpio_Debug[(int)*s]++;
- s++;
- } /* end while */
+ while(*s) {
+ H5FD_mpio_Debug[(int)*s]++;
+ s++;
+ } /* end while */
} /* end if */
- H5FD_mpio_Debug_inited++;
+ H5FD_mpio_Debug_inited++;
} /* end if */
#endif /* H5FDmpio_DEBUG */
@@ -242,11 +242,11 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_mpio_init() */
-
+
/*---------------------------------------------------------------------------
- * Function: H5FD_mpio_term
+ * Function: H5FD_mpio_term
*
- * Purpose: Shut down the VFD
+ * Purpose: Shut down the VFD
*
* Returns: Non-negative on success or negative on failure
*
@@ -266,43 +266,43 @@ H5FD_mpio_term(void)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_mpio_term() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5Pset_fapl_mpio
+ * Function: H5Pset_fapl_mpio
*
- * Purpose: Store the user supplied MPIO communicator comm and info in
- * the file access property list FAPL_ID which can then be used
- * to create and/or open the file. This function is available
- * only in the parallel HDF5 library and is not collective.
+ * Purpose: Store the user supplied MPIO communicator comm and info in
+ * the file access property list FAPL_ID which can then be used
+ * to create and/or open the file. This function is available
+ * only in the parallel HDF5 library and is not collective.
*
- * comm is the MPI communicator to be used for file open as
- * defined in MPI_FILE_OPEN of MPI-2. This function makes a
- * duplicate of comm. Any modification to comm after this function
- * call returns has no effect on the access property list.
+ * comm is the MPI communicator to be used for file open as
+ * defined in MPI_FILE_OPEN of MPI-2. This function makes a
+ * duplicate of comm. Any modification to comm after this function
+ * call returns has no effect on the access property list.
*
- * info is the MPI Info object to be used for file open as
- * defined in MPI_FILE_OPEN of MPI-2. This function makes a
- * duplicate of info. Any modification to info after this
- * function call returns has no effect on the access property
- * list.
+ * info is the MPI Info object to be used for file open as
+ * defined in MPI_FILE_OPEN of MPI-2. This function makes a
+ * duplicate of info. Any modification to info after this
+ * function call returns has no effect on the access property
+ * list.
*
* If fapl_id has previously set comm and info values, they
* will be replaced and the old communicator and Info object
* are freed.
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Albert Cheng
- * Feb 3, 1998
+ * Programmer: Albert Cheng
+ * Feb 3, 1998
*
*-------------------------------------------------------------------------
*/
herr_t
H5Pset_fapl_mpio(hid_t fapl_id, MPI_Comm comm, MPI_Info info)
{
- H5FD_mpio_fapl_t fa;
+ H5FD_mpio_fapl_t fa;
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value;
@@ -316,7 +316,7 @@ H5Pset_fapl_mpio(hid_t fapl_id, MPI_Comm comm, MPI_Info info)
if(NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a file access list")
if(MPI_COMM_NULL == comm)
- HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a valid communicator")
+ HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a valid communicator")
/* Initialize driver specific properties */
fa.comm = comm;
@@ -329,28 +329,28 @@ done:
FUNC_LEAVE_API(ret_value)
} /* H5Pset_fapl_mpio() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5Pget_fapl_mpio
+ * Function: H5Pget_fapl_mpio
*
- * Purpose: If the file access property list is set to the H5FD_MPIO
- * driver then this function returns duplicates of the MPI
- * communicator and Info object stored through the comm and
- * info pointers. It is the responsibility of the application
- * to free the returned communicator and Info object.
+ * Purpose: If the file access property list is set to the H5FD_MPIO
+ * driver then this function returns duplicates of the MPI
+ * communicator and Info object stored through the comm and
+ * info pointers. It is the responsibility of the application
+ * to free the returned communicator and Info object.
*
- * Return: Success: Non-negative with the communicator and
- * Info object returned through the comm and
- * info arguments if non-null. Since they are
- * duplicates of the stored objects, future
- * modifications to the access property list do
- * not affect them and it is the responsibility
- * of the application to free them.
+ * Return: Success: Non-negative with the communicator and
+ * Info object returned through the comm and
+ * info arguments if non-null. Since they are
+ * duplicates of the stored objects, future
+ * modifications to the access property list do
+ * not affect them and it is the responsibility
+ * of the application to free them.
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Thursday, February 26, 1998
+ * Programmer: Robb Matzke
+ * Thursday, February 26, 1998
*
*-------------------------------------------------------------------------
*/
@@ -359,9 +359,9 @@ H5Pget_fapl_mpio(hid_t fapl_id, MPI_Comm *comm/*out*/, MPI_Info *info/*out*/)
{
H5P_genplist_t *plist; /* Property list pointer */
const H5FD_mpio_fapl_t *fa; /* MPIO fapl info */
- MPI_Comm comm_tmp = MPI_COMM_NULL;
+ MPI_Comm comm_tmp = MPI_COMM_NULL;
hbool_t comm_copied = FALSE; /* MPI Comm has been duplicated */
- int mpi_code; /* MPI return code */
+ int mpi_code; /* MPI return code */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -377,19 +377,19 @@ H5Pget_fapl_mpio(hid_t fapl_id, MPI_Comm *comm/*out*/, MPI_Info *info/*out*/)
/* Store the duplicated communicator in a temporary variable for error */
/* recovery in case the INFO duplication fails. */
if(comm) {
- if(MPI_SUCCESS != (mpi_code = MPI_Comm_dup(fa->comm, &comm_tmp)))
- HMPI_GOTO_ERROR(FAIL, "MPI_Comm_dup failed", mpi_code)
+ if(MPI_SUCCESS != (mpi_code = MPI_Comm_dup(fa->comm, &comm_tmp)))
+ HMPI_GOTO_ERROR(FAIL, "MPI_Comm_dup failed", mpi_code)
comm_copied = TRUE;
} /* end if */
if(info) {
- if(MPI_INFO_NULL != fa->info) {
- if(MPI_SUCCESS != (mpi_code = MPI_Info_dup(fa->info, info)))
- HMPI_GOTO_ERROR(FAIL, "MPI_Info_dup failed", mpi_code)
- } /* end if */
+ if(MPI_INFO_NULL != fa->info) {
+ if(MPI_SUCCESS != (mpi_code = MPI_Info_dup(fa->info, info)))
+ HMPI_GOTO_ERROR(FAIL, "MPI_Info_dup failed", mpi_code)
+ } /* end if */
else
- /* do not dup it */
- *info = MPI_INFO_NULL;
+ /* do not dup it */
+ *info = MPI_INFO_NULL;
} /* end if */
/* Store the copied communicator, now that the Info object has been
@@ -400,33 +400,33 @@ H5Pget_fapl_mpio(hid_t fapl_id, MPI_Comm *comm/*out*/, MPI_Info *info/*out*/)
done:
if(ret_value < 0)
- /* need to free anything created here */
- if(comm_copied)
- MPI_Comm_free(&comm_tmp);
+ /* need to free anything created here */
+ if(comm_copied)
+ MPI_Comm_free(&comm_tmp);
FUNC_LEAVE_API(ret_value)
} /* end H5Pget_fapl_mpio() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5Pset_dxpl_mpio
+ * Function: H5Pset_dxpl_mpio
*
- * Purpose: Set the data transfer property list DXPL_ID to use transfer
- * mode XFER_MODE. The property list can then be used to control
- * the I/O transfer mode during data I/O operations. The valid
- * transfer modes are:
+ * Purpose: Set the data transfer property list DXPL_ID to use transfer
+ * mode XFER_MODE. The property list can then be used to control
+ * the I/O transfer mode during data I/O operations. The valid
+ * transfer modes are:
*
- * H5FD_MPIO_INDEPENDENT:
- * Use independent I/O access (the default).
+ * H5FD_MPIO_INDEPENDENT:
+ * Use independent I/O access (the default).
*
- * H5FD_MPIO_COLLECTIVE:
- * Use collective I/O access.
+ * H5FD_MPIO_COLLECTIVE:
+ * Use collective I/O access.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Albert Cheng
- * April 2, 1998
+ * Programmer: Albert Cheng
+ * April 2, 1998
*
*-------------------------------------------------------------------------
*/
@@ -456,21 +456,21 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Pset_dxpl_mpio() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5Pget_dxpl_mpio
+ * Function: H5Pget_dxpl_mpio
*
- * Purpose: Queries the transfer mode current set in the data transfer
- * property list DXPL_ID. This is not collective.
+ * Purpose: Queries the transfer mode current set in the data transfer
+ * property list DXPL_ID. This is not collective.
*
- * Return: Success: Non-negative, with the transfer mode returned
- * through the XFER_MODE argument if it is
- * non-null.
+ * Return: Success: Non-negative, with the transfer mode returned
+ * through the XFER_MODE argument if it is
+ * non-null.
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Albert Cheng
- * April 2, 1998
+ * Programmer: Albert Cheng
+ * April 2, 1998
*
*-------------------------------------------------------------------------
*/
@@ -495,23 +495,23 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Pget_dxpl_mpio() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5Pset_dxpl_mpio_collective_opt
+ * Function: H5Pset_dxpl_mpio_collective_opt
*
- * Purpose: To set a flag to choose linked chunk I/O or multi-chunk I/O
- * without involving decision-making inside HDF5
+ * Purpose: To set a flag to choose linked chunk I/O or multi-chunk I/O
+ * without involving decision-making inside HDF5
*
- * Note: The library will do linked chunk I/O or multi-chunk I/O without
- * involving communications for decision-making process.
- * The library won't behave as it asks for only when we find
- * that the low-level MPI-IO package doesn't support this.
+ * Note: The library will do linked chunk I/O or multi-chunk I/O without
+ * involving communications for decision-making process.
+ * The library won't behave as it asks for only when we find
+ * that the low-level MPI-IO package doesn't support this.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Kent Yang
- * ? ?, ?
+ * Programmer: Kent Yang
+ * ? ?, ?
*
*-------------------------------------------------------------------------
*/
@@ -541,21 +541,21 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Pset_dxpl_mpio_chunk_opt
+ * Function: H5Pset_dxpl_mpio_chunk_opt
*
- * Purpose: To set a flag to choose linked chunk I/O or multi-chunk I/O
- * without involving decision-making inside HDF5
+ * Purpose: To set a flag to choose linked chunk I/O or multi-chunk I/O
+ * without involving decision-making inside HDF5
*
- * Note: The library will do linked chunk I/O or multi-chunk I/O without
- * involving communications for decision-making process.
- * The library won't behave as it asks for only when we find
- * that the low-level MPI-IO package doesn't support this.
+ * Note: The library will do linked chunk I/O or multi-chunk I/O without
+ * involving communications for decision-making process.
+ * The library won't behave as it asks for only when we find
+ * that the low-level MPI-IO package doesn't support this.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Kent Yang
- * ? ?, ?
+ * Programmer: Kent Yang
+ * ? ?, ?
*
*-------------------------------------------------------------------------
*/
@@ -583,21 +583,21 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Pset_dxpl_mpio_chunk_opt() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5Pset_dxpl_mpio_chunk_opt_num
+ * Function: H5Pset_dxpl_mpio_chunk_opt_num
*
- * Purpose: To set a threshold for doing linked chunk IO
+ * Purpose: To set a threshold for doing linked chunk IO
*
- * Note: If the number is greater than the threshold set by the user,
- * the library will do linked chunk I/O; otherwise, I/O will be
- * done for every chunk.
+ * Note: If the number is greater than the threshold set by the user,
+ * the library will do linked chunk I/O; otherwise, I/O will be
+ * done for every chunk.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Kent Yang
- * ? ?, ?
+ * Programmer: Kent Yang
+ * ? ?, ?
*
*-------------------------------------------------------------------------
*/
@@ -625,24 +625,24 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Pset_dxpl_mpio_chunk_opt_num() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5Pset_dxpl_mpio_chunk_opt_ratio
+ * Function: H5Pset_dxpl_mpio_chunk_opt_ratio
*
- * Purpose: To set a threshold for doing collective I/O for each chunk
+ * Purpose: To set a threshold for doing collective I/O for each chunk
*
- * Note: The library will calculate the percentage of the number of
- * process holding selections at each chunk. If that percentage
- * of number of process in the individual chunk is greater than
- * the threshold set by the user, the library will do collective
- * chunk I/O for this chunk; otherwise, independent I/O will be
- * done for this chunk.
+ * Note: The library will calculate the percentage of the number of
+ * process holding selections at each chunk. If that percentage
+ * of number of process in the individual chunk is greater than
+ * the threshold set by the user, the library will do collective
+ * chunk I/O for this chunk; otherwise, independent I/O will be
+ * done for this chunk.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Kent Yang
- * ? ?, ?
+ * Programmer: Kent Yang
+ * ? ?, ?
*
*-------------------------------------------------------------------------
*/
@@ -670,19 +670,19 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Pset_dxpl_mpio_chunk_opt_ratio() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_mpio_fapl_get
+ * Function: H5FD_mpio_fapl_get
*
- * Purpose: Returns a file access property list which could be used to
- * create another file the same as this one.
+ * Purpose: Returns a file access property list which could be used to
+ * create another file the same as this one.
*
- * Return: Success: Ptr to new file access property list with all
- * fields copied from the file pointer.
+ * Return: Success: Ptr to new file access property list with all
+ * fields copied from the file pointer.
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Friday, August 13, 1999
*
*-------------------------------------------------------------------------
@@ -690,8 +690,8 @@ done:
static void *
H5FD_mpio_fapl_get(H5FD_t *_file)
{
- H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
- H5FD_mpio_fapl_t *fa = NULL;
+ H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
+ H5FD_mpio_fapl_t *fa = NULL;
void *ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -704,7 +704,7 @@ H5FD_mpio_fapl_get(H5FD_t *_file)
/* Duplicate communicator and Info object. */
if(FAIL == H5FD_mpi_comm_info_dup(file->comm, file->info, &fa->comm, &fa->info))
- HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOPY, NULL, "Communicator/Info duplicate failed")
+ HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOPY, NULL, "Communicator/Info duplicate failed")
/* Set return value */
ret_value = fa;
@@ -713,17 +713,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_mpio_fapl_copy
+ * Function: H5FD_mpio_fapl_copy
*
- * Purpose: Copies the mpio-specific file access properties.
+ * Purpose: Copies the mpio-specific file access properties.
*
- * Return: Success: Ptr to a new property list
+ * Return: Success: Ptr to a new property list
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Albert Cheng
+ * Programmer: Albert Cheng
* Jan 8, 2003
*
*-------------------------------------------------------------------------
@@ -731,14 +731,14 @@ done:
static void *
H5FD_mpio_fapl_copy(const void *_old_fa)
{
- void *ret_value = NULL;
+ void *ret_value = NULL;
const H5FD_mpio_fapl_t *old_fa = (const H5FD_mpio_fapl_t*)_old_fa;
- H5FD_mpio_fapl_t *new_fa = NULL;
+ H5FD_mpio_fapl_t *new_fa = NULL;
FUNC_ENTER_NOAPI_NOINIT
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
-fprintf(stderr, "enter H5FD_mpio_fapl_copy\n");
+HDfprintf(stderr, "enter H5FD_mpio_fapl_copy\n");
#endif
if(NULL == (new_fa = (H5FD_mpio_fapl_t *)H5MM_malloc(sizeof(H5FD_mpio_fapl_t))))
@@ -749,34 +749,34 @@ fprintf(stderr, "enter H5FD_mpio_fapl_copy\n");
/* Duplicate communicator and Info object. */
if(FAIL == H5FD_mpi_comm_info_dup(old_fa->comm, old_fa->info, &new_fa->comm, &new_fa->info))
- HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOPY, NULL, "Communicator/Info duplicate failed")
+ HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOPY, NULL, "Communicator/Info duplicate failed")
ret_value = new_fa;
done:
if (NULL == ret_value){
- /* cleanup */
- if (new_fa)
- H5MM_xfree(new_fa);
+ /* cleanup */
+ if (new_fa)
+ H5MM_xfree(new_fa);
}
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
-fprintf(stderr, "leaving H5FD_mpio_fapl_copy\n");
+HDfprintf(stderr, "leaving H5FD_mpio_fapl_copy\n");
#endif
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_mpio_fapl_copy() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_mpio_fapl_free
+ * Function: H5FD_mpio_fapl_free
*
- * Purpose: Frees the mpio-specific file access properties.
+ * Purpose: Frees the mpio-specific file access properties.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Albert Cheng
+ * Programmer: Albert Cheng
* Jan 8, 2003
*
* Modifications:
@@ -786,13 +786,13 @@ fprintf(stderr, "leaving H5FD_mpio_fapl_copy\n");
static herr_t
H5FD_mpio_fapl_free(void *_fa)
{
- herr_t ret_value = SUCCEED;
- H5FD_mpio_fapl_t *fa = (H5FD_mpio_fapl_t*)_fa;
+ herr_t ret_value = SUCCEED;
+ H5FD_mpio_fapl_t *fa = (H5FD_mpio_fapl_t*)_fa;
FUNC_ENTER_NOAPI_NOINIT_NOERR
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
-fprintf(stderr, "in H5FD_mpio_fapl_free\n");
+HDfprintf(stderr, "in H5FD_mpio_fapl_free\n");
#endif
HDassert(fa);
@@ -803,23 +803,23 @@ fprintf(stderr, "in H5FD_mpio_fapl_free\n");
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
-fprintf(stderr, "leaving H5FD_mpio_fapl_free\n");
+HDfprintf(stderr, "leaving H5FD_mpio_fapl_free\n");
#endif
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_mpio_fapl_free() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_set_mpio_atomicity
+ * Function: H5FD_set_mpio_atomicity
*
- * Purpose: Sets the atomicity mode
+ * Purpose: Sets the atomicity mode
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Mohamad Chaarawi
- * Feb 14, 2012
+ * Programmer: Mohamad Chaarawi
+ * Feb 14, 2012
*
*-------------------------------------------------------------------------
*/
@@ -835,7 +835,7 @@ H5FD_set_mpio_atomicity(H5FD_t *_file, hbool_t flag)
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "Entering H5FD_set_mpio_atomicity\n");
+ HDfprintf(stdout, "Entering H5FD_set_mpio_atomicity\n");
#endif
if (FALSE == flag)
@@ -850,23 +850,23 @@ H5FD_set_mpio_atomicity(H5FD_t *_file, hbool_t flag)
done:
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "Leaving H5FD_set_mpio_atomicity\n");
+ HDfprintf(stdout, "Leaving H5FD_set_mpio_atomicity\n");
#endif
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_get_mpio_atomicity
+ * Function: H5FD_get_mpio_atomicity
*
- * Purpose: Returns the atomicity mode
+ * Purpose: Returns the atomicity mode
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Mohamad Chaarawi
- * Feb 14, 2012
+ * Programmer: Mohamad Chaarawi
+ * Feb 14, 2012
*
*-------------------------------------------------------------------------
*/
@@ -882,7 +882,7 @@ H5FD_get_mpio_atomicity(H5FD_t *_file, hbool_t *flag)
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "Entering H5FD_get_mpio_atomicity\n");
+ HDfprintf(stdout, "Entering H5FD_get_mpio_atomicity\n");
#endif
/* get atomicity value */
@@ -897,21 +897,21 @@ H5FD_get_mpio_atomicity(H5FD_t *_file, hbool_t *flag)
done:
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "Leaving H5FD_get_mpio_atomicity\n");
+ HDfprintf(stdout, "Leaving H5FD_get_mpio_atomicity\n");
#endif
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
* Function: H5FD_mpio_open
*
* Purpose: Opens a file with name NAME. The FLAGS are a bit field with
- * purpose similar to the second argument of open(2) and which
- * are defined in H5Fpublic.h. The file access property list
- * FAPL_ID contains the properties driver properties and MAXADDR
- * is the largest address which this file will be expected to
- * access. This is collective.
+ * purpose similar to the second argument of open(2) and which
+ * are defined in H5Fpublic.h. The file access property list
+ * FAPL_ID contains the properties driver properties and MAXADDR
+ * is the largest address which this file will be expected to
+ * access. This is collective.
*
* Return: Success: A new file pointer.
*
@@ -924,29 +924,29 @@ done:
*/
static H5FD_t *
H5FD_mpio_open(const char *name, unsigned flags, hid_t fapl_id,
- haddr_t H5_ATTR_UNUSED maxaddr)
+ haddr_t H5_ATTR_UNUSED maxaddr)
{
- H5FD_mpio_t *file=NULL;
- MPI_File fh;
+ H5FD_mpio_t *file=NULL;
+ MPI_File fh;
unsigned file_opened=0; /* Flag to indicate that the file was successfully opened */
- int mpi_amode;
- int mpi_rank; /* MPI rank of this process */
- int mpi_size; /* Total number of MPI processes */
- int mpi_code; /* mpi return code */
- MPI_Offset size;
- const H5FD_mpio_fapl_t *fa = NULL;
- H5FD_mpio_fapl_t _fa;
+ int mpi_amode;
+ int mpi_rank; /* MPI rank of this process */
+ int mpi_size; /* Total number of MPI processes */
+ int mpi_code; /* mpi return code */
+ MPI_Offset size;
+ const H5FD_mpio_fapl_t *fa = NULL;
+ H5FD_mpio_fapl_t _fa;
H5P_genplist_t *plist; /* Property list pointer */
MPI_Comm comm_dup = MPI_COMM_NULL;
MPI_Info info_dup = MPI_INFO_NULL;
- H5FD_t *ret_value; /* Return value */
+ H5FD_t *ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t']) {
- fprintf(stdout, "Entering H5FD_mpio_open(name=\"%s\", flags=0x%x, "
- "fapl_id=%d, maxaddr=%lu)\n", name, flags, (int)fapl_id, (unsigned long)maxaddr);
+ HDfprintf(stdout, "Entering H5FD_mpio_open(name=\"%s\", flags=0x%x, "
+ "fapl_id=%d, maxaddr=%lu)\n", name, flags, (int)fapl_id, (unsigned long)maxaddr);
}
#endif
@@ -954,18 +954,18 @@ H5FD_mpio_open(const char *name, unsigned flags, hid_t fapl_id,
if(NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list")
if(H5P_FILE_ACCESS_DEFAULT == fapl_id || H5FD_MPIO != H5P_peek_driver(plist)) {
- _fa.comm = MPI_COMM_SELF; /*default*/
- _fa.info = MPI_INFO_NULL; /*default*/
- fa = &_fa;
+ _fa.comm = MPI_COMM_SELF; /*default*/
+ _fa.info = MPI_INFO_NULL; /*default*/
+ fa = &_fa;
} /* end if */
else {
if(NULL == (fa = (const H5FD_mpio_fapl_t *)H5P_peek_driver_info(plist)))
- HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, NULL, "bad VFL driver info")
+ HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, NULL, "bad VFL driver info")
} /* end else */
/* Duplicate communicator and Info object for use by this file. */
if(FAIL == H5FD_mpi_comm_info_dup(fa->comm, fa->info, &comm_dup, &info_dup))
- HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOPY, NULL, "Communicator/Info duplicate failed")
+ HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOPY, NULL, "Communicator/Info duplicate failed")
/* convert HDF5 flags to MPI-IO flags */
/* some combinations are illegal; let MPI-IO figure it out */
@@ -986,7 +986,7 @@ H5FD_mpio_open(const char *name, unsigned flags, hid_t fapl_id,
if(flag) {
int i;
- fprintf(stdout, "H5FD_mpio debug flags = '%s'\n", debug_str);
+ HDfprintf(stdout, "H5FD_mpio debug flags = '%s'\n", debug_str);
for(i = 0; debug_str[i]/*end of string*/ && i < 128/*just in case*/; ++i)
H5FD_mpio_Debug[(int)debug_str[i]] = 1;
}
@@ -1047,57 +1047,57 @@ done:
if(ret_value==NULL) {
if(file_opened)
MPI_File_close(&fh);
- if (MPI_COMM_NULL != comm_dup)
- MPI_Comm_free(&comm_dup);
- if (MPI_INFO_NULL != info_dup)
- MPI_Info_free(&info_dup);
- if (file)
- H5MM_xfree(file);
+ if (MPI_COMM_NULL != comm_dup)
+ MPI_Comm_free(&comm_dup);
+ if (MPI_INFO_NULL != info_dup)
+ MPI_Info_free(&info_dup);
+ if (file)
+ H5MM_xfree(file);
} /* end if */
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "Leaving H5FD_mpio_open\n" );
+ HDfprintf(stdout, "Leaving H5FD_mpio_open\n" );
#endif
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_mpio_open() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FD_mpio_close
*
* Purpose: Closes a file. This is collective.
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
* Programmer: Unknown
* January 30, 1998
*
* Modifications:
- * Robb Matzke, 1998-02-18
- * Added the ACCESS_PARMS argument.
+ * Robb Matzke, 1998-02-18
+ * Added the ACCESS_PARMS argument.
*
- * Robb Matzke, 1999-08-06
- * Modified to work with the virtual file layer.
+ * Robb Matzke, 1999-08-06
+ * Modified to work with the virtual file layer.
*
- * Albert Cheng, 2003-04-17
- * Free the communicator stored.
+ * Albert Cheng, 2003-04-17
+ * Free the communicator stored.
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_mpio_close(H5FD_t *_file)
{
- H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
- int mpi_code; /* MPI return code */
+ H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
+ int mpi_code; /* MPI return code */
herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "Entering H5FD_mpio_close\n");
+ HDfprintf(stdout, "Entering H5FD_mpio_close\n");
#endif
HDassert(file);
HDassert(H5FD_MPIO==file->pub.driver_id);
@@ -1113,33 +1113,33 @@ H5FD_mpio_close(H5FD_t *_file)
done:
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "Leaving H5FD_mpio_close\n");
+ HDfprintf(stdout, "Leaving H5FD_mpio_close\n");
#endif
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_mpio_query
+ * Function: H5FD_mpio_query
*
- * Purpose: Set the flags that this VFL driver is capable of supporting.
+ * Purpose: Set the flags that this VFL driver is capable of supporting.
* (listed in H5FDpublic.h)
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, August 25, 2000
*
* Modifications:
*
- * John Mainzer -- 9/21/05
- * Modified code to turn off the
- * H5FD_FEAT_ACCUMULATE_METADATA_WRITE flag.
+ * John Mainzer -- 9/21/05
+ * Modified code to turn off the
+ * H5FD_FEAT_ACCUMULATE_METADATA_WRITE flag.
* With the movement of
- * all cache writes to process 0, this flag has become
- * problematic in PHDF5.
+ * all cache writes to process 0, this flag has become
+ * problematic in PHDF5.
*
*-------------------------------------------------------------------------
*/
@@ -1161,19 +1161,19 @@ H5FD_mpio_query(const H5FD_t H5_ATTR_UNUSED *_file, unsigned long *flags /* out
FUNC_LEAVE_NOAPI(SUCCEED)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_mpio_get_eoa
+ * Function: H5FD_mpio_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
- * format address space.
+ * Purpose: Gets the end-of-address marker for the file. The EOA marker
+ * is the first address past the last byte allocated in the
+ * format address space.
*
- * Return: Success: The end-of-address marker.
+ * Return: Success: The end-of-address marker.
*
- * Failure: HADDR_UNDEF
+ * Failure: HADDR_UNDEF
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Friday, August 6, 1999
*
* Modifications:
@@ -1186,7 +1186,7 @@ H5FD_mpio_query(const H5FD_t H5_ATTR_UNUSED *_file, unsigned long *flags /* out
static haddr_t
H5FD_mpio_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
- const H5FD_mpio_t *file = (const H5FD_mpio_t*)_file;
+ const H5FD_mpio_t *file = (const H5FD_mpio_t*)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -1196,19 +1196,19 @@ H5FD_mpio_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
FUNC_LEAVE_NOAPI(file->eoa)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_mpio_set_eoa
+ * Function: H5FD_mpio_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
- * to tell the driver where the end of the HDF5 data is located.
+ * Purpose: Set the end-of-address marker for the file. This function is
+ * called shortly after an existing HDF5 file is opened in order
+ * to tell the driver where the end of the HDF5 data is located.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Friday, August 6, 1999
*
* Modifications:
@@ -1221,7 +1221,7 @@ H5FD_mpio_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
static herr_t
H5FD_mpio_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
{
- H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
+ H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -1233,30 +1233,30 @@ H5FD_mpio_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
FUNC_LEAVE_NOAPI(SUCCEED)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_mpio_get_eof
+ * Function: H5FD_mpio_get_eof
*
- * Purpose: Gets the end-of-file marker for the file. The EOF marker
- * is the real size of the file.
+ * Purpose: Gets the end-of-file marker for the file. The EOF marker
+ * is the real size of the file.
*
- * The MPIO driver doesn't bother keeping this field updated
- * since that's a relatively expensive operation. Fortunately
- * the library only needs the EOF just after the file is opened
- * in order to determine whether the file is empty, truncated,
- * or okay. Therefore, any MPIO I/O function will set its value
- * to HADDR_UNDEF which is the error return value of this
- * function.
+ * The MPIO driver doesn't bother keeping this field updated
+ * since that's a relatively expensive operation. Fortunately
+ * the library only needs the EOF just after the file is opened
+ * in order to determine whether the file is empty, truncated,
+ * or okay. Therefore, any MPIO I/O function will set its value
+ * to HADDR_UNDEF which is the error return value of this
+ * function.
*
* Keeping the EOF updated (during write calls) is expensive
* because any process may extend the physical end of the
* file. -QAK
*
- * Return: Success: The end-of-address marker.
+ * Return: Success: The end-of-address marker.
*
- * Failure: HADDR_UNDEF
+ * Failure: HADDR_UNDEF
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Friday, August 6, 1999
*
* Modifications:
@@ -1266,7 +1266,7 @@ H5FD_mpio_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
static haddr_t
H5FD_mpio_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
- const H5FD_mpio_t *file = (const H5FD_mpio_t*)_file;
+ const H5FD_mpio_t *file = (const H5FD_mpio_t*)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -1276,7 +1276,7 @@ H5FD_mpio_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
FUNC_LEAVE_NOAPI(file->eof)
}
-
+
/*-------------------------------------------------------------------------
* Function: H5FD_mpio_get_handle
*
@@ -1308,7 +1308,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
* Function: H5FD_mpio_get_info
*
@@ -1341,55 +1341,55 @@ done:
} /* H5FD_mpio_get_info() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_mpio_read
+ * Function: H5FD_mpio_read
*
- * Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR
- * into buffer BUF according to data transfer properties in
- * DXPL_ID using potentially complex file and buffer types to
- * effect the transfer.
+ * Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR
+ * into buffer BUF according to data transfer properties in
+ * DXPL_ID using potentially complex file and buffer types to
+ * effect the transfer.
*
- * Reading past the end of the MPI file returns zeros instead of
- * failing. MPI is able to coalesce requests from different
- * processes (collective or independent).
+ * Reading past the end of the MPI file returns zeros instead of
+ * failing. MPI is able to coalesce requests from different
+ * processes (collective or independent).
*
- * Return: Success: Zero. Result is stored in caller-supplied
- * buffer BUF.
+ * Return: Success: Zero. Result is stored in caller-supplied
+ * buffer BUF.
*
- * Failure: -1, Contents of buffer BUF are undefined.
+ * Failure: -1, Contents of buffer BUF are undefined.
*
- * Programmer: rky, 1998-01-30
+ * Programmer: rky, 1998-01-30
*
* Modifications:
- * Robb Matzke, 1998-02-18
- * Added the ACCESS_PARMS argument.
+ * Robb Matzke, 1998-02-18
+ * Added the ACCESS_PARMS argument.
*
- * rky, 1998-04-10
- * Call independent or collective MPI read, based on
- * ACCESS_PARMS.
+ * rky, 1998-04-10
+ * Call independent or collective MPI read, based on
+ * ACCESS_PARMS.
*
- * Albert Cheng, 1998-06-01
- * Added XFER_MODE to control independent or collective MPI
- * read.
+ * Albert Cheng, 1998-06-01
+ * Added XFER_MODE to control independent or collective MPI
+ * read.
*
- * rky, 1998-08-16
- * Use BTYPE, FTYPE, and DISP from access parms. The guts of
- * H5FD_mpio_read and H5FD_mpio_write should be replaced by a
- * single dual-purpose routine.
+ * rky, 1998-08-16
+ * Use BTYPE, FTYPE, and DISP from access parms. The guts of
+ * H5FD_mpio_read and H5FD_mpio_write should be replaced by a
+ * single dual-purpose routine.
*
- * Robb Matzke, 1999-04-21
- * Changed XFER_MODE to XFER_PARMS for all H5F_*_read()
- * callbacks.
+ * Robb Matzke, 1999-04-21
+ * Changed XFER_MODE to XFER_PARMS for all H5F_*_read()
+ * callbacks.
*
- * Robb Matzke, 1999-07-28
- * The ADDR argument is passed by value.
+ * Robb Matzke, 1999-07-28
+ * The ADDR argument is passed by value.
*
- * Robb Matzke, 1999-08-06
- * Modified to work with the virtual file layer.
+ * Robb Matzke, 1999-08-06
+ * Modified to work with the virtual file layer.
*
- * Quincey Koziol, 2002-05-14
- * Only call MPI_Get_count if we can use MPI_BYTE for the MPI type
+ * Quincey Koziol, 2002-05-14
+ * Only call MPI_Get_count if we can use MPI_BYTE for the MPI type
* for the I/O transfer. Someday we might include code to decode
* the MPI type used for more complicated transfers and call
* MPI_Get_count all the time.
@@ -1566,7 +1566,7 @@ H5FD_mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type,
#endif
HMPI_GOTO_ERROR(FAIL, "MPI_Get_elements failed", mpi_code)
} /* end if */
-
+
/* If the rank0-bcast feature was used, broadcast the # of bytes read to
* other ranks, which didn't perform any I/O.
*/
@@ -1607,102 +1607,102 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_mpio_write
+ * Function: H5FD_mpio_write
*
- * Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
- * from buffer BUF according to data transfer properties in
- * DXPL_ID using potentially complex file and buffer types to
- * effect the transfer.
+ * Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
+ * from buffer BUF according to data transfer properties in
+ * DXPL_ID using potentially complex file and buffer types to
+ * effect the transfer.
*
- * MPI is able to coalesce requests from different processes
- * (collective and independent).
+ * MPI is able to coalesce requests from different processes
+ * (collective and independent).
*
- * Return: Success: Zero. USE_TYPES and OLD_USE_TYPES in the
- * access params are altered.
+ * Return: Success: Zero. USE_TYPES and OLD_USE_TYPES in the
+ * access params are altered.
*
- * Failure: -1, USE_TYPES and OLD_USE_TYPES in the
- * access params may be altered.
+ * Failure: -1, USE_TYPES and OLD_USE_TYPES in the
+ * access params may be altered.
*
- * Programmer: Unknown
+ * Programmer: Unknown
* January 30, 1998
*
* Modifications:
- * rky, 1998-08-28
- * If the file->allsame flag is set, we assume that all the
- * procs in the relevant MPI communicator will write identical
- * data at identical offsets in the file, so only proc 0 will
- * write, and all other procs will wait for p0 to finish. This
- * is useful for writing metadata, for example. Note that we
- * don't _check_ that the data is identical. Also, the mechanism
- * we use to eliminate the redundant writes is by requiring a
- * call to H5FD_mpio_tas_allsame before the write, which is
- * rather klugey. Would it be better to pass a parameter to
- * low-level writes like H5F_block_write and H5F_low_write,
- * instead? Or...??? Also, when I created this mechanism I
- * wanted to minimize the difference in behavior between the old
- * way of doing things (i.e., all procs write) and the new way,
- * so the writes are eliminated at the very lowest level, here
- * in H5FD_mpio_write. It may be better to rethink that, and
- * short-circuit the writes at a higher level (e.g., at the
- * points in the code where H5FD_mpio_tas_allsame is called).
- *
- *
- * Robb Matzke, 1998-02-18
- * Added the ACCESS_PARMS argument.
- *
- * rky, 1998-04-10
- * Call independent or collective MPI write, based on
- * ACCESS_PARMS.
- *
- * rky, 1998-04-24
- * Removed redundant write from H5FD_mpio_write.
- *
- * Albert Cheng, 1998-06-01
- * Added XFER_MODE to control independent or collective MPI
- * write.
- *
- * rky, 1998-08-16
- * Use BTYPE, FTYPE, and DISP from access parms. The guts of
- * H5FD_mpio_read and H5FD_mpio_write should be replaced by a
- * single dual-purpose routine.
- *
- * rky, 1998-08-28
- * Added ALLSAME parameter to make all but proc 0 skip the
- * actual write.
- *
- * Robb Matzke, 1999-04-21
- * Changed XFER_MODE to XFER_PARMS for all H5FD_*_write()
- * callbacks.
- *
- * Robb Matzke, 1999-07-28
- * The ADDR argument is passed by value.
- *
- * Robb Matzke, 1999-08-06
- * Modified to work with the virtual file layer.
- *
- * Albert Cheng, 1999-12-19
- * When only-p0-write-allsame-data, p0 Bcasts the
- * ret_value to other processes. This prevents
- * a racing condition (that other processes try to
- * read the file before p0 finishes writing) and also
- * allows all processes to report the same ret_value.
- *
- * Kim Yates, Pat Weidhaas, 2000-09-26
- * Move block of coding where only p0 writes after the
+ * rky, 1998-08-28
+ * If the file->allsame flag is set, we assume that all the
+ * procs in the relevant MPI communicator will write identical
+ * data at identical offsets in the file, so only proc 0 will
+ * write, and all other procs will wait for p0 to finish. This
+ * is useful for writing metadata, for example. Note that we
+ * don't _check_ that the data is identical. Also, the mechanism
+ * we use to eliminate the redundant writes is by requiring a
+ * call to H5FD_mpio_tas_allsame before the write, which is
+ * rather klugey. Would it be better to pass a parameter to
+ * low-level writes like H5F_block_write and H5F_low_write,
+ * instead? Or...??? Also, when I created this mechanism I
+ * wanted to minimize the difference in behavior between the old
+ * way of doing things (i.e., all procs write) and the new way,
+ * so the writes are eliminated at the very lowest level, here
+ * in H5FD_mpio_write. It may be better to rethink that, and
+ * short-circuit the writes at a higher level (e.g., at the
+ * points in the code where H5FD_mpio_tas_allsame is called).
+ *
+ *
+ * Robb Matzke, 1998-02-18
+ * Added the ACCESS_PARMS argument.
+ *
+ * rky, 1998-04-10
+ * Call independent or collective MPI write, based on
+ * ACCESS_PARMS.
+ *
+ * rky, 1998-04-24
+ * Removed redundant write from H5FD_mpio_write.
+ *
+ * Albert Cheng, 1998-06-01
+ * Added XFER_MODE to control independent or collective MPI
+ * write.
+ *
+ * rky, 1998-08-16
+ * Use BTYPE, FTYPE, and DISP from access parms. The guts of
+ * H5FD_mpio_read and H5FD_mpio_write should be replaced by a
+ * single dual-purpose routine.
+ *
+ * rky, 1998-08-28
+ * Added ALLSAME parameter to make all but proc 0 skip the
+ * actual write.
+ *
+ * Robb Matzke, 1999-04-21
+ * Changed XFER_MODE to XFER_PARMS for all H5FD_*_write()
+ * callbacks.
+ *
+ * Robb Matzke, 1999-07-28
+ * The ADDR argument is passed by value.
+ *
+ * Robb Matzke, 1999-08-06
+ * Modified to work with the virtual file layer.
+ *
+ * Albert Cheng, 1999-12-19
+ * When only-p0-write-allsame-data, p0 Bcasts the
+ * ret_value to other processes. This prevents
+ * a racing condition (that other processes try to
+ * read the file before p0 finishes writing) and also
+ * allows all processes to report the same ret_value.
+ *
+ * Kim Yates, Pat Weidhaas, 2000-09-26
+ * Move block of coding where only p0 writes after the
* MPI_File_set_view call.
*
- * Quincey Koziol, 2002-05-10
- * Instead of always writing metadata from process 0, spread the
+ * Quincey Koziol, 2002-05-10
+ * Instead of always writing metadata from process 0, spread the
* burden among all the processes by using a round-robin rotation
* scheme.
*
- * Quincey Koziol, 2002-05-10
- * Removed allsame code, keying off the type parameter instead.
+ * Quincey Koziol, 2002-05-10
+ * Removed allsame code, keying off the type parameter instead.
*
- * Quincey Koziol, 2002-05-14
- * Only call MPI_Get_count if we can use MPI_BYTE for the MPI type
+ * Quincey Koziol, 2002-05-14
+ * Only call MPI_Get_count if we can use MPI_BYTE for the MPI type
* for the I/O transfer. Someday we might include code to decode
* the MPI type used for more complicated transfers and call
* MPI_Get_count all the time.
@@ -1733,13 +1733,13 @@ static herr_t
H5FD_mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
haddr_t addr, size_t size, const void *buf)
{
- H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
- MPI_Offset mpi_off;
- MPI_Status mpi_stat; /* Status from I/O operation */
- MPI_Datatype buf_type = MPI_BYTE; /* MPI description of the selection in memory */
- int mpi_code; /* MPI return code */
+ H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
+ MPI_Offset mpi_off;
+ MPI_Status mpi_stat; /* Status from I/O operation */
+ MPI_Datatype buf_type = MPI_BYTE; /* MPI description of the selection in memory */
+ int mpi_code; /* MPI return code */
#if MPI_VERSION >= 3
- MPI_Count bytes_written;
+ MPI_Count bytes_written;
MPI_Count type_size; /* MPI datatype used for I/O's size */
MPI_Count io_size; /* Actual number of bytes requested */
#else
@@ -1748,15 +1748,15 @@ H5FD_mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
int io_size; /* Actual number of bytes requested */
#endif
int size_i;
- hbool_t use_view_this_time = FALSE;
+ hbool_t use_view_this_time = FALSE;
H5FD_mpio_xfer_t xfer_mode; /* I/O transfer mode */
- herr_t ret_value = SUCCEED;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "Entering H5FD_mpio_write\n" );
+ HDfprintf(stdout, "Entering H5FD_mpio_write\n" );
#endif
HDassert(file);
HDassert(H5FD_MPIO==file->pub.driver_id);
@@ -1777,7 +1777,7 @@ H5FD_mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
#ifdef H5FDmpio_DEBUG
if(H5FD_mpio_Debug[(int)'w'])
- fprintf(stdout, "in H5FD_mpio_write mpi_off=%ld size_i=%d\n", (long)mpi_off, size_i);
+ HDfprintf(stdout, "in H5FD_mpio_write mpi_off=%ld size_i=%d\n", (long)mpi_off, size_i);
#endif
/* Get the transfer mode from the API context */
@@ -1791,7 +1791,7 @@ H5FD_mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
* could mean "use MPI_BYTE" by convention).
*/
if(xfer_mode == H5FD_MPIO_COLLECTIVE) {
- MPI_Datatype file_type;
+ MPI_Datatype file_type;
/* Remember that views are used */
use_view_this_time = TRUE;
@@ -1818,7 +1818,7 @@ H5FD_mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
#ifdef H5FDmpio_DEBUG
if(H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "H5FD_mpio_write: using MPIO collective mode\n");
+ HDfprintf(stdout, "H5FD_mpio_write: using MPIO collective mode\n");
#endif
/* Get the collective_opt property to check whether the application wants to do IO individually. */
@@ -1828,7 +1828,7 @@ H5FD_mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
if(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO) {
#ifdef H5FDmpio_DEBUG
if(H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "H5FD_mpio_write: doing MPI collective IO\n");
+ HDfprintf(stdout, "H5FD_mpio_write: doing MPI collective IO\n");
#endif
if(MPI_SUCCESS != (mpi_code = MPI_File_write_at_all(file->f, mpi_off, buf, size_i, buf_type, &mpi_stat)))
HMPI_GOTO_ERROR(FAIL, "MPI_File_write_at_all failed", mpi_code)
@@ -1838,7 +1838,7 @@ H5FD_mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "Metadata Coll opt property should be collective at this point")
#ifdef H5FDmpio_DEBUG
if(H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "H5FD_mpio_write: doing MPI independent IO\n");
+ HDfprintf(stdout, "H5FD_mpio_write: doing MPI independent IO\n");
#endif
if(MPI_SUCCESS != (mpi_code = MPI_File_write_at(file->f, mpi_off, buf, size_i, buf_type, &mpi_stat)))
HMPI_GOTO_ERROR(FAIL, "MPI_File_write_at failed", mpi_code)
@@ -1889,21 +1889,21 @@ H5FD_mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
done:
#ifdef H5FDmpio_DEBUG
if(H5FD_mpio_Debug[(int)'t'])
- fprintf(stdout, "proc %d: Leaving H5FD_mpio_write with ret_value=%d\n",
- file->mpi_rank, ret_value );
+ HDfprintf(stdout, "proc %d: Leaving H5FD_mpio_write with ret_value=%d\n",
+ file->mpi_rank, ret_value );
#endif
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_mpio_write() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FD_mpio_flush
*
* Purpose: Makes sure that all data is on disk. This is collective.
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
* Programmer: Robb Matzke
* January 30, 1998
@@ -1913,15 +1913,15 @@ done:
static herr_t
H5FD_mpio_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
{
- H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
- int mpi_code; /* mpi return code */
+ H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
+ int mpi_code; /* mpi return code */
herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
#ifdef H5FDmpio_DEBUG
if(H5FD_mpio_Debug[(int)'t'])
- HDfprintf(stdout, "Entering %s\n", FUNC);
+ HDfprintf(stdout, "Entering %s\n", FUNC);
#endif
HDassert(file);
HDassert(H5FD_MPIO == file->pub.driver_id);
@@ -1934,41 +1934,41 @@ H5FD_mpio_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
done:
#ifdef H5FDmpio_DEBUG
if(H5FD_mpio_Debug[(int)'t'])
- HDfprintf(stdout, "Leaving %s\n", FUNC);
+ HDfprintf(stdout, "Leaving %s\n", FUNC);
#endif
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_mpio_flush() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FD_mpio_truncate
*
* Purpose: Make certain the file's size matches it's allocated size
*
- * This is a little sticky in the mpio case, as it is not
+ * This is a little sticky in the mpio case, as it is not
* easy for us to track the current EOF by extracting it from
- * write calls.
+ * write calls.
*
* Instead, we first check to see if the eoa has changed since
- * the last call to this function. If it has, we call
- * MPI_File_get_size() to determine the current EOF, and
- * only call MPI_File_set_size() if this value disagrees
+ * the last call to this function. If it has, we call
+ * MPI_File_get_size() to determine the current EOF, and
+ * only call MPI_File_set_size() if this value disagrees
* with the current eoa.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
* Programmer: Quincey Koziol
* January 31, 2008
*
* Changes: Heavily reworked to avoid unnecessary MPI_File_set_size()
* calls. The hope is that these calls are superfluous in the
- * typical case, allowing us to avoid truncates most of the
+ * typical case, allowing us to avoid truncates most of the
* time.
*
- * The basic idea is to query the file system to get the
- * current eof, and only truncate if the file systems
+ * The basic idea is to query the file system to get the
+ * current eof, and only truncate if the file systems
* conception of the eof disagrees with our eoa.
*
* JRM -- 10/27/17
@@ -1978,14 +1978,14 @@ done:
static herr_t
H5FD_mpio_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_UNUSED closing)
{
- H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
+ H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
#ifdef H5FDmpio_DEBUG
if(H5FD_mpio_Debug[(int)'t'])
- HDfprintf(stdout, "Entering %s\n", FUNC);
+ HDfprintf(stdout, "Entering %s\n", FUNC);
#endif
HDassert(file);
HDassert(H5FD_MPIO == file->pub.driver_id);
@@ -1995,13 +1995,13 @@ H5FD_mpio_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_
MPI_Offset size;
MPI_Offset needed_eof;
- /* In principle, it is possible for the size returned by the
- * call to MPI_File_get_size() to depend on whether writes from
+ /* In principle, it is possible for the size returned by the
+ * call to MPI_File_get_size() to depend on whether writes from
* all proceeses have completed at the time process 0 makes the
- * call.
+ * call.
*
* In practice, most (all?) truncate calls will come after a barrier
- * and with no interviening writes to the file (with the possible
+ * and with no interviening writes to the file (with the possible
* exception of sueprblock / superblock extension message updates).
*
* Check the "MPI file closing" flag in the API context to determine
@@ -2032,13 +2032,13 @@ H5FD_mpio_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_
if(MPI_SUCCESS != (mpi_code = MPI_File_set_size(file->f, needed_eof)))
HMPI_GOTO_ERROR(FAIL, "MPI_File_set_size failed", mpi_code)
- /* In general, we must wait until all processes have finished
- * the truncate before any process can continue, since it is
- * possible that a process would write at the end of the
+ /* In general, we must wait until all processes have finished
+ * the truncate before any process can continue, since it is
+ * possible that a process would write at the end of the
* file, and this write would be discarded by the truncate.
*
- * While this is an issue for a user initiated flush, it may
- * not be an issue at file close. If so, we may be able to
+ * While this is an issue for a user initiated flush, it may
+ * not be an issue at file close. If so, we may be able to
* optimize out the following barrier in that case.
*/
if(MPI_SUCCESS != (mpi_code = MPI_Barrier(file->comm)))
@@ -2052,22 +2052,22 @@ H5FD_mpio_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_
done:
#ifdef H5FDmpio_DEBUG
if(H5FD_mpio_Debug[(int)'t'])
- HDfprintf(stdout, "Leaving %s\n", FUNC);
+ HDfprintf(stdout, "Leaving %s\n", FUNC);
#endif
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_mpio_truncate() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_mpio_mpi_rank
+ * Function: H5FD_mpio_mpi_rank
*
- * Purpose: Returns the MPI rank for a process
+ * Purpose: Returns the MPI rank for a process
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, May 16, 2002
*
* Modifications:
@@ -2077,7 +2077,7 @@ done:
static int
H5FD_mpio_mpi_rank(const H5FD_t *_file)
{
- const H5FD_mpio_t *file = (const H5FD_mpio_t*)_file;
+ const H5FD_mpio_t *file = (const H5FD_mpio_t*)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -2087,16 +2087,16 @@ H5FD_mpio_mpi_rank(const H5FD_t *_file)
FUNC_LEAVE_NOAPI(file->mpi_rank)
} /* end H5FD_mpio_mpi_rank() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_mpio_mpi_size
+ * Function: H5FD_mpio_mpi_size
*
- * Purpose: Returns the number of MPI processes
+ * Purpose: Returns the number of MPI processes
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, May 16, 2002
*
* Modifications:
@@ -2106,7 +2106,7 @@ H5FD_mpio_mpi_rank(const H5FD_t *_file)
static int
H5FD_mpio_mpi_size(const H5FD_t *_file)
{
- const H5FD_mpio_t *file = (const H5FD_mpio_t*)_file;
+ const H5FD_mpio_t *file = (const H5FD_mpio_t*)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -2116,17 +2116,17 @@ H5FD_mpio_mpi_size(const H5FD_t *_file)
FUNC_LEAVE_NOAPI(file->mpi_size)
} /* end H5FD_mpio_mpi_size() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_mpio_communicator
+ * Function: H5FD_mpio_communicator
*
- * Purpose: Returns the MPI communicator for the file.
+ * Purpose: Returns the MPI communicator for the file.
*
- * Return: Success: The communicator
+ * Return: Success: The communicator
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, August 9, 1999
*
* Modifications:
@@ -2136,7 +2136,7 @@ H5FD_mpio_mpi_size(const H5FD_t *_file)
static MPI_Comm
H5FD_mpio_communicator(const H5FD_t *_file)
{
- const H5FD_mpio_t *file = (const H5FD_mpio_t*)_file;
+ const H5FD_mpio_t *file = (const H5FD_mpio_t*)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
diff --git a/src/H5FL.c b/src/H5FL.c
index 89a580a..21bbf02 100644
--- a/src/H5FL.c
+++ b/src/H5FL.c
@@ -642,7 +642,7 @@ H5FL__reg_term(void)
tmp = H5FL_reg_gc_head.first->next;
#ifdef H5FL_DEBUG
-printf("%s: head->name = %s, head->allocated = %d\n", FUNC, H5FL_reg_gc_head.first->list->name, (int)H5FL_reg_gc_head.first->list->allocated);
+HDprintf("%s: head->name = %s, head->allocated = %d\n", FUNC, H5FL_reg_gc_head.first->list->name, (int)H5FL_reg_gc_head.first->list->allocated);
#endif /* H5FL_DEBUG */
/* Check if the list has allocations outstanding */
if(H5FL_reg_gc_head.first->list->allocated > 0) {
@@ -1312,7 +1312,7 @@ H5FL__blk_term(void)
tmp = H5FL_blk_gc_head.first->next;
#ifdef H5FL_DEBUG
-printf("%s: head->name = %s, head->allocated = %d\n", FUNC, H5FL_blk_gc_head.first->pq->name, (int)H5FL_blk_gc_head.first->pq->allocated);
+HDprintf("%s: head->name = %s, head->allocated = %d\n", FUNC, H5FL_blk_gc_head.first->pq->name, (int)H5FL_blk_gc_head.first->pq->allocated);
#endif /* H5FL_DEBUG */
/* Check if the list has allocations outstanding */
@@ -1780,7 +1780,7 @@ H5FL__arr_term(void)
/* Check if the list has allocations outstanding */
#ifdef H5FL_DEBUG
-printf("%s: head->name = %s, head->allocated = %d\n", FUNC, H5FL_arr_gc_head.first->list->name, (int)H5FL_arr_gc_head.first->list->allocated);
+HDprintf("%s: head->name = %s, head->allocated = %d\n", FUNC, H5FL_arr_gc_head.first->list->name, (int)H5FL_arr_gc_head.first->list->allocated);
#endif /* H5FL_DEBUG */
if(H5FL_arr_gc_head.first->list->allocated > 0) {
/* Add free list to the list of nodes with allocations open still */
@@ -2408,7 +2408,7 @@ H5FL__fac_term_all(void)
tmp = H5FL_fac_gc_head.first->next;
#ifdef H5FL_DEBUG
-printf("%s: head->size = %d, head->allocated = %d\n", FUNC, (int)H5FL_fac_gc_head.first->list->size, (int)H5FL_fac_gc_head.first->list->allocated);
+HDprintf("%s: head->size = %d, head->allocated = %d\n", FUNC, (int)H5FL_fac_gc_head.first->list->size, (int)H5FL_fac_gc_head.first->list->allocated);
#endif /* H5FL_DEBUG */
/* The list cannot have any allocations outstanding */
diff --git a/src/H5HFdbg.c b/src/H5HFdbg.c
index 70dfeed..50b77f5 100644
--- a/src/H5HFdbg.c
+++ b/src/H5HFdbg.c
@@ -13,11 +13,11 @@
/*-------------------------------------------------------------------------
*
- * Created: H5HFdbg.c
- * Feb 24 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Created: H5HFdbg.c
+ * Feb 24 2006
+ * Quincey Koziol <koziol@ncsa.uiuc.edu>
*
- * Purpose: Dump debugging information about a fractal heap
+ * Purpose: Dump debugging information about a fractal heap
*
*-------------------------------------------------------------------------
*/
@@ -32,12 +32,12 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5HFpkg.h" /* Fractal heaps */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5VMprivate.h" /* Vectors and arrays */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5HFpkg.h" /* Fractal heaps */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5VMprivate.h" /* Vectors and arrays */
/****************/
/* Local Macros */
@@ -96,17 +96,17 @@ static herr_t H5HF_dtable_debug(const H5HF_dtable_t *dtable, FILE *stream,
/* Local Variables */
/*******************/
-
+
/*-------------------------------------------------------------------------
- * Function: H5HF_id_print
+ * Function: H5HF_id_print
*
- * Purpose: Prints a fractal heap ID.
+ * Purpose: Prints a fractal heap ID.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Aug 20 2015
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Aug 20 2015
*
*-------------------------------------------------------------------------
*/
@@ -163,24 +163,24 @@ HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet")
/* Display the heap ID */
HDfprintf(stream, "%*s%-*s (%c, %Hu, %Zu)\n", indent, "", fwidth,
- "Heap ID info: (type, offset, length)",
+ "Heap ID info: (type, offset, length)",
id_type, obj_off, obj_len);
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_id_print() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5HF_dtable_debug
+ * Function: H5HF_dtable_debug
*
- * Purpose: Prints debugging info about a doubling table
+ * Purpose: Prints debugging info about a doubling table
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Feb 28 2006
+ * Programmer: Quincey Koziol
+ * koziol@ncsa.uiuc.edu
+ * Feb 28 2006
*
*-------------------------------------------------------------------------
*/
@@ -202,57 +202,57 @@ H5HF_dtable_debug(const H5HF_dtable_t *dtable, FILE *stream, int indent, int fwi
*/
/* Creation parameter values */
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Doubling table width:",
- dtable->cparam.width);
+ "Doubling table width:",
+ dtable->cparam.width);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Starting block size:",
- dtable->cparam.start_block_size);
+ "Starting block size:",
+ dtable->cparam.start_block_size);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Max. direct block size:",
- dtable->cparam.max_direct_size);
+ "Max. direct block size:",
+ dtable->cparam.max_direct_size);
HDfprintf(stream, "%*s%-*s %u (bits)\n", indent, "", fwidth,
- "Max. index size:",
- dtable->cparam.max_index);
+ "Max. index size:",
+ dtable->cparam.max_index);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Starting # of rows in root indirect block:",
- dtable->cparam.start_root_rows);
+ "Starting # of rows in root indirect block:",
+ dtable->cparam.start_root_rows);
/* Run-time varying parameter values */
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "Table's root address:",
- dtable->table_addr);
+ "Table's root address:",
+ dtable->table_addr);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Current # of rows in root indirect block:",
- dtable->curr_root_rows);
+ "Current # of rows in root indirect block:",
+ dtable->curr_root_rows);
/* Computed values */
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Max. # of rows in root indirect block:",
- dtable->max_root_rows);
+ "Max. # of rows in root indirect block:",
+ dtable->max_root_rows);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Max. # of direct rows in any indirect block:",
- dtable->max_direct_rows);
+ "Max. # of direct rows in any indirect block:",
+ dtable->max_direct_rows);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "# of bits for IDs in first row:",
- dtable->first_row_bits);
+ "# of bits for IDs in first row:",
+ dtable->first_row_bits);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "# of IDs in first row:",
- dtable->num_id_first_row);
+ "# of IDs in first row:",
+ dtable->num_id_first_row);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5HF_dtable_debug() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5HF_hdr_print
+ * Function: H5HF_hdr_print
*
- * Purpose: Prints info about a fractal heap header.
+ * Purpose: Prints info about a fractal heap header.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Feb 23 2012
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Feb 23 2012
*
*-------------------------------------------------------------------------
*/
@@ -276,56 +276,56 @@ H5HF_hdr_print(const H5HF_hdr_t *hdr, hbool_t dump_internal, FILE *stream, int i
* Print the values.
*/
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Heap is:",
- hdr->man_dtable.curr_root_rows > 0 ? "Indirect" : "Direct");
+ "Heap is:",
+ hdr->man_dtable.curr_root_rows > 0 ? "Indirect" : "Direct");
HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth,
- "Objects stored in 'debugging' format:",
- hdr->debug_objs);
+ "Objects stored in 'debugging' format:",
+ hdr->debug_objs);
HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth,
- "'Write once' flag:",
- hdr->write_once);
+ "'Write once' flag:",
+ hdr->write_once);
HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth,
- "'Huge' object IDs have wrapped:",
- hdr->huge_ids_wrapped);
+ "'Huge' object IDs have wrapped:",
+ hdr->huge_ids_wrapped);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Free space in managed blocks:",
- hdr->total_man_free);
+ "Free space in managed blocks:",
+ hdr->total_man_free);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Managed space data block size:",
- hdr->man_size);
+ "Managed space data block size:",
+ hdr->man_size);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Total managed space allocated:",
- hdr->man_alloc_size);
+ "Total managed space allocated:",
+ hdr->man_alloc_size);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Offset of managed space iterator:",
- hdr->man_iter_off);
+ "Offset of managed space iterator:",
+ hdr->man_iter_off);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Number of managed objects in heap:",
- hdr->man_nobjs);
+ "Number of managed objects in heap:",
+ hdr->man_nobjs);
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "Address of free space manager for managed blocks:",
- hdr->fs_addr);
+ "Address of free space manager for managed blocks:",
+ hdr->fs_addr);
HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
- "Max. size of managed object:",
- (unsigned long)hdr->max_man_size);
+ "Max. size of managed object:",
+ (unsigned long)hdr->max_man_size);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "'Huge' object space used:",
- hdr->huge_size);
+ "'Huge' object space used:",
+ hdr->huge_size);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Number of 'huge' objects in heap:",
- hdr->huge_nobjs);
+ "Number of 'huge' objects in heap:",
+ hdr->huge_nobjs);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "ID of next 'huge' object:",
- hdr->huge_next_id);
+ "ID of next 'huge' object:",
+ hdr->huge_next_id);
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "Address of v2 B-tree for 'huge' objects:",
- hdr->huge_bt2_addr);
+ "Address of v2 B-tree for 'huge' objects:",
+ hdr->huge_bt2_addr);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "'Tiny' object space used:",
- hdr->tiny_size);
+ "'Tiny' object space used:",
+ hdr->tiny_size);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Number of 'tiny' objects in heap:",
- hdr->tiny_nobjs);
+ "Number of 'tiny' objects in heap:",
+ hdr->tiny_nobjs);
HDfprintf(stream, "%*sManaged Objects Doubling-Table Info...\n", indent, "");
H5HF_dtable_debug(&hdr->man_dtable, stream, indent + 3, MAX(0, fwidth - 3));
@@ -362,24 +362,24 @@ H5HF_hdr_print(const H5HF_hdr_t *hdr, hbool_t dump_internal, FILE *stream, int i
FUNC_LEAVE_NOAPI_VOID
} /* end H5HF_hdr_print() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5HF_hdr_debug
+ * Function: H5HF_hdr_debug
*
- * Purpose: Prints debugging info about a fractal heap header.
+ * Purpose: Prints debugging info about a fractal heap header.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Feb 24 2006
+ * Programmer: Quincey Koziol
+ * koziol@ncsa.uiuc.edu
+ * Feb 24 2006
*
*-------------------------------------------------------------------------
*/
herr_t
H5HF_hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth)
{
- H5HF_hdr_t *hdr = NULL; /* Fractal heap header info */
+ H5HF_hdr_t *hdr = NULL; /* Fractal heap header info */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -395,7 +395,7 @@ H5HF_hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth)
/* Load the fractal heap header */
if(NULL == (hdr = H5HF__hdr_protect(f, addr, H5AC__READ_ONLY_FLAG)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header")
/* Print the information about the heap's header */
H5HF_hdr_print(hdr, FALSE, stream, indent, fwidth);
@@ -407,17 +407,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_hdr_debug() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5HF_dblock_debug_cb
+ * Function: H5HF_dblock_debug_cb
*
- * Purpose: Detect free space within a direct block
+ * Purpose: Detect free space within a direct block
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * May 13 2006
+ * Programmer: Quincey Koziol
+ * koziol@ncsa.uiuc.edu
+ * May 13 2006
*
*-------------------------------------------------------------------------
*/
@@ -468,9 +468,9 @@ H5HF_dblock_debug_cb(H5FS_section_info_t *_sect, void *_udata)
len = end - start;
HDsnprintf(temp_str, sizeof(temp_str), "Section #%u:", (unsigned)udata->sect_count);
- HDfprintf(udata->stream, "%*s%-*s %8Zu, %8Zu\n", udata->indent + 3, "", MAX(0, udata->fwidth - 9),
- temp_str,
- start, len);
+ HDfprintf(udata->stream, "%*s%-*s %8Zu, %8Zu\n", udata->indent + 3, "", MAX(0, udata->fwidth - 9),
+ temp_str,
+ start, len);
udata->sect_count++;
/* Mark this node's free space & check for overlaps w/other sections */
@@ -483,7 +483,7 @@ H5HF_dblock_debug_cb(H5FS_section_info_t *_sect, void *_udata)
/* Flag overlaps */
if (overlap)
- fprintf(udata->stream, "***THAT FREE BLOCK OVERLAPPED A PREVIOUS ONE!\n");
+ HDfprintf(udata->stream, "***THAT FREE BLOCK OVERLAPPED A PREVIOUS ONE!\n");
else
udata->amount_free += len;
} /* end if */
@@ -491,17 +491,17 @@ H5HF_dblock_debug_cb(H5FS_section_info_t *_sect, void *_udata)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5HF_dblock_debug_cb() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5HF_dblock_debug
+ * Function: H5HF_dblock_debug
*
- * Purpose: Prints debugging info about a fractal heap direct block.
+ * Purpose: Prints debugging info about a fractal heap direct block.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Feb 28 2006
+ * Programmer: Quincey Koziol
+ * koziol@ncsa.uiuc.edu
+ * Feb 28 2006
*
*-------------------------------------------------------------------------
*/
@@ -509,11 +509,11 @@ herr_t
H5HF_dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
haddr_t hdr_addr, size_t block_size)
{
- H5HF_hdr_t *hdr = NULL; /* Fractal heap header info */
+ H5HF_hdr_t *hdr = NULL; /* Fractal heap header info */
H5HF_direct_t *dblock = NULL; /* Fractal heap direct block info */
- size_t blk_prefix_size; /* Size of prefix for block */
- size_t amount_free; /* Amount of free space in block */
- uint8_t *marker = NULL; /* Track free space for block */
+ size_t blk_prefix_size; /* Size of prefix for block */
+ size_t amount_free; /* Amount of free space in block */
+ uint8_t *marker = NULL; /* Track free space for block */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -531,13 +531,13 @@ H5HF_dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
/* Load the fractal heap header */
if(NULL == (hdr = H5HF__hdr_protect(f, hdr_addr, H5AC__READ_ONLY_FLAG)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header")
/*
* Load the heap direct block
*/
if(NULL == (dblock = H5HF__man_dblock_protect(hdr, addr, block_size, NULL, 0, H5AC__READ_ONLY_FLAG)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load fractal heap direct block")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load fractal heap direct block")
/* Print opening message */
HDfprintf(stream, "%*sFractal Heap Direct Block...\n", indent, "");
@@ -546,19 +546,19 @@ H5HF_dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
* Print the values.
*/
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "Address of fractal heap that owns this block:",
- hdr->heap_addr);
+ "Address of fractal heap that owns this block:",
+ hdr->heap_addr);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Offset of direct block in heap:",
- dblock->block_off);
+ "Offset of direct block in heap:",
+ dblock->block_off);
blk_prefix_size = H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Size of block header:",
+ "Size of block header:",
blk_prefix_size);
/* Allocate space for the free space markers */
if(NULL == (marker = (uint8_t *)H5MM_calloc(dblock->size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Initialize the free space information for the heap */
if(H5HF__space_start(hdr, FALSE) < 0)
@@ -618,17 +618,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_dblock_debug() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5HF_iblock_print
+ * Function: H5HF_iblock_print
*
- * Purpose: Prints debugging info about a fractal heap indirect block.
+ * Purpose: Prints debugging info about a fractal heap indirect block.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Feb 23 2012
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Feb 23 2012
*
*-------------------------------------------------------------------------
*/
@@ -638,7 +638,7 @@ H5HF_iblock_print(const H5HF_indirect_t *iblock,
{
const H5HF_hdr_t *hdr; /* Pointer to heap's header */
char temp_str[64]; /* Temporary string, for formatting */
- size_t u, v; /* Local index variable */
+ size_t u, v; /* Local index variable */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -661,23 +661,23 @@ H5HF_iblock_print(const H5HF_indirect_t *iblock,
* Print the values.
*/
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "Address of fractal heap that owns this block:",
- hdr->heap_addr);
+ "Address of fractal heap that owns this block:",
+ hdr->heap_addr);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Offset of indirect block in heap:",
- iblock->block_off);
+ "Offset of indirect block in heap:",
+ iblock->block_off);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Size of indirect block:",
- iblock->size);
+ "Size of indirect block:",
+ iblock->size);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Current # of rows:",
- iblock->nrows);
+ "Current # of rows:",
+ iblock->nrows);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Max. # of rows:",
- iblock->max_rows);
+ "Max. # of rows:",
+ iblock->max_rows);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Max direct block rows:",
- hdr->man_dtable.max_direct_rows);
+ "Max direct block rows:",
+ hdr->man_dtable.max_direct_rows);
/* Print the entry tables */
if(hdr->filter_len > 0)
@@ -750,17 +750,17 @@ H5HF_iblock_print(const H5HF_indirect_t *iblock,
FUNC_LEAVE_NOAPI_VOID
} /* end H5HF_iblock_print() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5HF_iblock_debug
+ * Function: H5HF_iblock_debug
*
- * Purpose: Prints debugging info about a fractal heap indirect block.
+ * Purpose: Prints debugging info about a fractal heap indirect block.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Mar 7 2006
+ * Programmer: Quincey Koziol
+ * koziol@ncsa.uiuc.edu
+ * Mar 7 2006
*
*-------------------------------------------------------------------------
*/
@@ -768,7 +768,7 @@ herr_t
H5HF_iblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
haddr_t hdr_addr, unsigned nrows)
{
- H5HF_hdr_t *hdr = NULL; /* Fractal heap header info */
+ H5HF_hdr_t *hdr = NULL; /* Fractal heap header info */
H5HF_indirect_t *iblock = NULL; /* Fractal heap direct block info */
hbool_t did_protect; /* Whether we protected the indirect block or not */
herr_t ret_value = SUCCEED; /* Return value */
@@ -788,13 +788,13 @@ H5HF_iblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
/* Load the fractal heap header */
if(NULL == (hdr = H5HF__hdr_protect(f, hdr_addr, H5AC__READ_ONLY_FLAG)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header")
/*
* Load the heap indirect block
*/
if(NULL == (iblock = H5HF__man_iblock_protect(hdr, addr, nrows, NULL, 0, FALSE, H5AC__READ_ONLY_FLAG, &did_protect)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load fractal heap indirect block")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load fractal heap indirect block")
/* Print the information about the heap's indirect block */
H5HF_iblock_print(iblock, FALSE, stream, indent, fwidth);
@@ -808,17 +808,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_iblock_debug() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5HF_sects_debug_cb
+ * Function: H5HF_sects_debug_cb
*
- * Purpose: Prints debugging info about a free space section for a fractal heap.
+ * Purpose: Prints debugging info about a free space section for a fractal heap.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * May 13 2006
+ * Programmer: Quincey Koziol
+ * koziol@ncsa.uiuc.edu
+ * May 13 2006
*
*-------------------------------------------------------------------------
*/
@@ -839,20 +839,20 @@ H5HF_sects_debug_cb(H5FS_section_info_t *_sect, void *_udata)
/* Print generic section information */
HDfprintf(udata->stream, "%*s%-*s %s\n", udata->indent, "", udata->fwidth,
- "Section type:",
- (sect->sect_info.type == H5HF_FSPACE_SECT_SINGLE ? "single" :
+ "Section type:",
+ (sect->sect_info.type == H5HF_FSPACE_SECT_SINGLE ? "single" :
(sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW ? "first row" :
(sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW ? "normal row" : "unknown"))));
HDfprintf(udata->stream, "%*s%-*s %a\n", udata->indent, "", udata->fwidth,
- "Section address:",
- sect->sect_info.addr);
+ "Section address:",
+ sect->sect_info.addr);
HDfprintf(udata->stream, "%*s%-*s %Hu\n", udata->indent, "", udata->fwidth,
- "Section size:",
- sect->sect_info.size);
+ "Section size:",
+ sect->sect_info.size);
#ifdef QAK
HDfprintf(udata->stream, "%*s%-*s %s\n", udata->indent, "", udata->fwidth,
- "Section state:",
- (sect->sect_info.state == H5FS_SECT_LIVE ? "live" : "serialized"));
+ "Section state:",
+ (sect->sect_info.state == H5FS_SECT_LIVE ? "live" : "serialized"));
#endif /* QAK */
/* Dump section-specific debugging information */
@@ -863,17 +863,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_sects_debug_cb() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5HF_sects_debug
+ * Function: H5HF_sects_debug
*
- * Purpose: Prints debugging info about free space sections for a fractal heap.
+ * Purpose: Prints debugging info about free space sections for a fractal heap.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * May 9 2006
+ * Programmer: Quincey Koziol
+ * koziol@ncsa.uiuc.edu
+ * May 9 2006
*
*-------------------------------------------------------------------------
*/
@@ -881,7 +881,7 @@ herr_t
H5HF_sects_debug(H5F_t *f, haddr_t fh_addr, FILE *stream, int indent,
int fwidth)
{
- H5HF_hdr_t *hdr = NULL; /* Fractal heap header info */
+ H5HF_hdr_t *hdr = NULL; /* Fractal heap header info */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -897,7 +897,7 @@ H5HF_sects_debug(H5F_t *f, haddr_t fh_addr, FILE *stream, int indent,
/* Load the fractal heap header */
if(NULL == (hdr = H5HF__hdr_protect(f, fh_addr, H5AC__READ_ONLY_FLAG)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header")
/* Initialize the free space information for the heap */
if(H5HF__space_start(hdr, FALSE) < 0)
diff --git a/src/H5I.c b/src/H5I.c
index 097aad3..6c24d5a 100644
--- a/src/H5I.c
+++ b/src/H5I.c
@@ -33,8 +33,8 @@
#include "H5ACprivate.h" /* Metadata cache */
#include "H5CXprivate.h" /* API Contexts */
#include "H5Dprivate.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free Lists */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free Lists */
#include "H5Gprivate.h" /* Groups */
#include "H5Ipkg.h" /* IDs */
#include "H5MMprivate.h" /* Memory management */
@@ -46,25 +46,25 @@
/* Local Macros */
/* Combine a Type number and an atom index into an atom */
-#define H5I_MAKE(g,i) ((((hid_t)(g) & TYPE_MASK) << ID_BITS) | \
- ((hid_t)(i) & ID_MASK))
+#define H5I_MAKE(g,i) ((((hid_t)(g) & TYPE_MASK) << ID_BITS) | \
+ ((hid_t)(i) & ID_MASK))
/* Local typedefs */
/* Atom information structure used */
typedef struct H5I_id_info_t {
- hid_t id; /* ID for this info */
- unsigned count; /* ref. count for this atom */
+ hid_t id; /* ID for this info */
+ unsigned count; /* ref. count for this atom */
unsigned app_count; /* ref. count of application visible atoms */
- const void *obj_ptr; /* pointer associated with the atom */
+ const void *obj_ptr; /* pointer associated with the atom */
} H5I_id_info_t;
/* ID type structure used */
typedef struct {
const H5I_class_t *cls; /* Pointer to ID class */
- unsigned init_count; /* # of times this type has been initialized*/
- uint64_t id_count; /* Current number of IDs held */
- uint64_t nextid; /* ID to use for the next atom */
+ unsigned init_count; /* # of times this type has been initialized*/
+ uint64_t id_count; /* Current number of IDs held */
+ uint64_t nextid; /* ID to use for the next atom */
H5SL_t *ids; /* Pointer to skip list that stores IDs */
} H5I_id_type_t;
@@ -125,7 +125,7 @@ static H5I_id_info_t *H5I__find_id(hid_t id);
static int H5I__debug_cb(void *_item, void *_key, void *_udata);
static int H5I__id_dump_cb(void *_item, void *_key, void *_udata);
-
+
/*-------------------------------------------------------------------------
* Function: H5I_term_package
*
@@ -136,14 +136,14 @@ static int H5I__id_dump_cb(void *_item, void *_key, void *_udata);
* Return: Success: Positive if any action was taken that might
* affect some other interface; zero otherwise.
*
- * Failure: Negative.
+ * Failure: Negative.
*
*-------------------------------------------------------------------------
*/
int
H5I_term_package(void)
{
- int n = 0;
+ int n = 0;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -177,7 +177,7 @@ H5I_term_package(void)
FUNC_LEAVE_NOAPI(n)
} /* end H5I_term_package() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iregister_type
*
@@ -257,7 +257,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iregister_type() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_register_type
*
@@ -272,7 +272,7 @@ done:
herr_t
H5I_register_type(const H5I_class_t *cls)
{
- H5I_id_type_t *type_ptr = NULL; /* Ptr to the atomic type*/
+ H5I_id_type_t *type_ptr = NULL; /* Ptr to the atomic type*/
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -306,7 +306,7 @@ H5I_register_type(const H5I_class_t *cls)
type_ptr->init_count++;
done:
- if(ret_value < 0) { /* Clean up on error */
+ if(ret_value < 0) { /* Clean up on error */
if(type_ptr) {
if(type_ptr->ids)
H5SL_close(type_ptr->ids);
@@ -317,7 +317,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_register_type() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Itype_exists
*
@@ -346,7 +346,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Itype_exists() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Inmembers
*
@@ -357,8 +357,8 @@ done:
*
* Return: SUCCEED/FAIL
*
- * Programmer: James Laird
- * Nathaniel Furrer
+ * Programmer: James Laird
+ * Nathaniel Furrer
* Friday, April 23, 2004
*
*-------------------------------------------------------------------------
@@ -396,7 +396,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Inmembers() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_nmembers
*
@@ -407,7 +407,7 @@ done:
*
* Failure: Negative
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, March 24, 1999
*
*-------------------------------------------------------------------------
@@ -432,7 +432,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_nmembers() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iclear_type
*
@@ -442,8 +442,8 @@ done:
*
* Return: SUCCEED/FAIL
*
- * Programmer: James Laird
- * Nathaniel Furrer
+ * Programmer: James Laird
+ * Nathaniel Furrer
* Friday, April 23, 2004
*
*-------------------------------------------------------------------------
@@ -465,7 +465,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iclear_type() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_clear_type
*
@@ -474,7 +474,7 @@ done:
*
* Return: SUCCEED/FAIL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, March 24, 1999
*
*-------------------------------------------------------------------------
@@ -506,7 +506,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_clear_type() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I__clear_type_cb
*
@@ -543,7 +543,7 @@ H5I__clear_type_cb(void *_id, void H5_ATTR_UNUSED *key, void *_udata)
if(udata->force) {
#ifdef H5I_DEBUG
if(H5DEBUG(I)) {
- fprintf(H5DEBUG(I), "H5I: free type=%d obj=0x%08lx "
+ HDfprintf(H5DEBUG(I), "H5I: free type=%d obj=0x%08lx "
"failure ignored\n",
(int)udata->type_ptr->cls->type_id,
(unsigned long)(id->obj_ptr));
@@ -572,7 +572,7 @@ H5I__clear_type_cb(void *_id, void H5_ATTR_UNUSED *key, void *_udata)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__clear_type_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Idestroy_type
*
@@ -584,8 +584,8 @@ H5I__clear_type_cb(void *_id, void H5_ATTR_UNUSED *key, void *_udata)
*
* Return: SUCCEED/FAIL
*
- * Programmer: Nathaniel Furrer
- * James Laird
+ * Programmer: Nathaniel Furrer
+ * James Laird
*
*-------------------------------------------------------------------------
*/
@@ -606,7 +606,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Idestroy_type() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I__destroy_type
*
@@ -617,15 +617,15 @@ done:
*
* Return: SUCCEED/FAIL
*
- * Programmer: Nathaniel Furrer
- * James Laird
+ * Programmer: Nathaniel Furrer
+ * James Laird
*
*-------------------------------------------------------------------------
*/
static herr_t
H5I__destroy_type(H5I_type_t type)
{
- H5I_id_type_t *type_ptr; /* ptr to the atomic type */
+ H5I_id_type_t *type_ptr; /* ptr to the atomic type */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -657,7 +657,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__destroy_type() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iregister
*
@@ -685,7 +685,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iregister() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_register
*
@@ -744,13 +744,13 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_register() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_register_with_id
*
* Purpose: Registers an OBJECT in a TYPE with the supplied ID for it.
* This routine will check to ensure the supplied ID is not already
- * in use, and ensure that it is a valid ID for the given type,
+ * in use, and ensure that it is a valid ID for the given type,
* but will NOT check to ensure the OBJECT is not already
* registered (thus, it is possible to register one object under
* multiple IDs).
@@ -808,7 +808,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_register_with_id() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_subst
*
@@ -818,8 +818,8 @@ done:
* with the specified ID.
* Failure: NULL
*
- * Programmer: Quincey Koziol
- * Saturday, February 27, 2010
+ * Programmer: Quincey Koziol
+ * Saturday, February 27, 2010
*
*-------------------------------------------------------------------------
*/
@@ -827,7 +827,7 @@ void *
H5I_subst(hid_t id, const void *new_object)
{
H5I_id_info_t *id_ptr; /* Pointer to the atom */
- void *ret_value = NULL; /* Return value */
+ void *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -846,7 +846,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_subst() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_object
*
@@ -862,8 +862,8 @@ done:
void *
H5I_object(hid_t id)
{
- H5I_id_info_t *id_ptr; /* Pointer to the new atom */
- void *ret_value = NULL; /* Return value */
+ H5I_id_info_t *id_ptr; /* Pointer to the new atom */
+ void *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOERR
@@ -876,7 +876,7 @@ H5I_object(hid_t id)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_object() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iobject_verify
*
@@ -910,7 +910,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iobject_verify() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_object_verify
*
@@ -921,8 +921,8 @@ done:
* specified ID.
* Failure: NULL
*
- * Programmer: Quincey Koziol
- * Wednesday, July 31, 2002
+ * Programmer: Quincey Koziol
+ * Wednesday, July 31, 2002
*
*-------------------------------------------------------------------------
*/
@@ -945,7 +945,7 @@ H5I_object_verify(hid_t id, H5I_type_t id_type)
FUNC_LEAVE_NOAPI(ret_value)
} /* H5I_object_verify() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_get_type
*
@@ -959,8 +959,8 @@ H5I_object_verify(hid_t id, H5I_type_t id_type)
* ID types).
* Failure: H5I_BADID
*
- * Programmer: Robb Matzke
- * Friday, February 19, 1999
+ * Programmer: Robb Matzke
+ * Friday, February 19, 1999
*
*-------------------------------------------------------------------------
*/
@@ -979,7 +979,7 @@ H5I_get_type(hid_t id)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_get_type() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iget_type
*
@@ -1006,13 +1006,13 @@ H5Iget_type(hid_t id)
ret_value = H5I_get_type(id);
if(ret_value <= H5I_BADID || ret_value >= H5I_next_type || NULL == H5I_object(id))
- HGOTO_DONE(H5I_BADID);
+ HGOTO_DONE(H5I_BADID);
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iget_type() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iremove_verify
*
@@ -1025,8 +1025,8 @@ done:
* calling H5I_object().
* Failure: NULL
*
- * Programmer: James Laird
- * Nathaniel Furrer
+ * Programmer: James Laird
+ * Nathaniel Furrer
*
*-------------------------------------------------------------------------
*/
@@ -1048,7 +1048,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iremove_verify() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I__remove_verify
*
@@ -1060,15 +1060,15 @@ done:
* calling H5I_object().
* Failure: NULL
*
- * Programmer: James Laird
- * Nat Furrer
+ * Programmer: James Laird
+ * Nat Furrer
*
*-------------------------------------------------------------------------
*/
void *
H5I__remove_verify(hid_t id, H5I_type_t id_type)
{
- void * ret_value = NULL; /*return value */
+ void * ret_value = NULL; /*return value */
FUNC_ENTER_STATIC_NOERR
@@ -1081,7 +1081,7 @@ H5I__remove_verify(hid_t id, H5I_type_t id_type)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__remove_verify() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I__remove_common
*
@@ -1100,8 +1100,8 @@ H5I__remove_verify(hid_t id, H5I_type_t id_type)
static void *
H5I__remove_common(H5I_id_type_t *type_ptr, hid_t id)
{
- H5I_id_info_t *curr_id; /* Pointer to the current atom */
- void *ret_value = NULL; /* Return value */
+ H5I_id_info_t *curr_id; /* Pointer to the current atom */
+ void *ret_value = NULL; /* Return value */
FUNC_ENTER_STATIC
@@ -1123,7 +1123,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__remove_common() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_remove
*
@@ -1134,16 +1134,16 @@ done:
* calling H5I_object().
* Failure: NULL
*
- * Programmer: Unknown
+ * Programmer: Unknown
*
*-------------------------------------------------------------------------
*/
void *
H5I_remove(hid_t id)
{
- H5I_id_type_t *type_ptr; /* Pointer to the atomic type */
- H5I_type_t type; /* Atom's atomic type */
- void * ret_value = NULL; /* Return value */
+ H5I_id_type_t *type_ptr; /* Pointer to the atomic type */
+ H5I_type_t type; /* Atom's atomic type */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -1163,7 +1163,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_remove() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Idec_ref
*
@@ -1199,7 +1199,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Idec_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_dec_ref
*
@@ -1238,14 +1238,14 @@ H5I_dec_ref(hid_t id)
* reference count without calling the free method.
*
* Beware: the free method may call other H5I functions.
- *
- * If an object is closing, we can remove the ID even though the free
+ *
+ * If an object is closing, we can remove the ID even though the free
* method might fail. This can happen when a mandatory filter fails to
- * write when a dataset is closed and the chunk cache is flushed to the
+ * write when a dataset is closed and the chunk cache is flushed to the
* file. We have to close the dataset anyway. (SLU - 2010/9/7)
*/
if(1 == id_ptr->count) {
- H5I_id_type_t *type_ptr; /*ptr to the type */
+ H5I_id_type_t *type_ptr; /*ptr to the type */
/* Get the ID's type */
type_ptr = H5I_id_type_list_g[H5I_TYPE(id)];
@@ -1269,7 +1269,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_dec_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_dec_app_ref
*
@@ -1317,7 +1317,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_dec_app_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_dec_app_ref_always_close
*
@@ -1345,9 +1345,9 @@ H5I_dec_app_ref_always_close(hid_t id)
/* Check for failure */
if (ret_value < 0) {
/*
- * If an object is closing, we can remove the ID even though the free
+ * If an object is closing, we can remove the ID even though the free
* method might fail. This can happen when a mandatory filter fails to
- * write when a dataset is closed and the chunk cache is flushed to the
+ * write when a dataset is closed and the chunk cache is flushed to the
* file. We have to close the dataset anyway. (SLU - 2010/9/7)
*/
H5I_remove(id);
@@ -1359,7 +1359,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_dec_app_ref_always_close() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iinc_ref
*
@@ -1390,7 +1390,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iinc_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_inc_ref
*
@@ -1428,7 +1428,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_inc_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iget_ref
*
@@ -1459,7 +1459,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iget_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_get_ref
*
@@ -1492,7 +1492,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_get_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iinc_type_ref
*
@@ -1526,7 +1526,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iinc_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I__inc_type_ref
*
@@ -1560,14 +1560,14 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__inc_type_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Idec_type_ref
*
* Purpose: Decrements the reference count on an entire type of IDs.
* If the type reference count becomes zero then the type is
* destroyed along with all atoms in that type regardless of
- * their reference counts. Destroying IDs involves calling
+ * their reference counts. Destroying IDs involves calling
* the free-func for each ID's object and then adding the ID
* struct to the ID free list. Public interface to
* H5I_dec_type_ref.
@@ -1602,14 +1602,14 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Idec_type_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_dec_type_ref
*
* Purpose: Decrements the reference count on an entire type of IDs.
* If the type reference count becomes zero then the type is
* destroyed along with all atoms in that type regardless of
- * their reference counts. Destroying IDs involves calling
+ * their reference counts. Destroying IDs involves calling
* the free-func for each ID's object and then adding the ID
* struct to the ID free list.
* Returns the number of references to the type on success; a
@@ -1655,7 +1655,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_dec_type_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iget_type_ref
*
@@ -1689,7 +1689,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iget_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I__get_type_ref
*
@@ -1724,7 +1724,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__get_type_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iis_valid
*
@@ -1754,7 +1754,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iis_valid() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I__search_cb
*
@@ -1780,7 +1780,7 @@ H5I__search_cb(void *obj, hid_t id, void *_udata)
/* Set the return value based on the callback's return value */
if(cb_ret_val > 0) {
- ret_value = H5_ITER_STOP; /* terminate iteration early */
+ ret_value = H5_ITER_STOP; /* terminate iteration early */
udata->ret_obj = obj; /* also set out parameter */
}
else if(cb_ret_val < 0)
@@ -1789,7 +1789,7 @@ H5I__search_cb(void *obj, hid_t id, void *_udata)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__search_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Isearch
*
@@ -1828,7 +1828,7 @@ H5Isearch(H5I_type_t type, H5I_search_func_t func, void *key)
udata.app_key = key;
udata.ret_obj = NULL;
- /* Note that H5I_iterate returns an error code. We ignore it
+ /* Note that H5I_iterate returns an error code. We ignore it
* here, as we can't do anything with it without revising the API.
*/
(void)H5I_iterate(type, H5I__search_cb, &udata, TRUE);
@@ -1840,7 +1840,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Isearch() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I__iterate_cb
*
@@ -1873,7 +1873,7 @@ H5I__iterate_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
/* Set the return value based on the callback's return value */
if(cb_ret_val > 0)
- ret_value = H5_ITER_STOP; /* terminate iteration early */
+ ret_value = H5_ITER_STOP; /* terminate iteration early */
else if(cb_ret_val < 0)
ret_value = H5_ITER_ERROR; /* indicate failure (which terminates iteration) */
}
@@ -1881,26 +1881,26 @@ H5I__iterate_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__iterate_cb() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5I_iterate
+ * Function: H5I_iterate
*
- * Purpose: Apply function FUNC to each member of type TYPE (with
- * non-zero application reference count if app_ref is TRUE).
- * Stop if FUNC returns a non zero value (i.e. anything
- * other than H5_ITER_CONT).
+ * Purpose: Apply function FUNC to each member of type TYPE (with
+ * non-zero application reference count if app_ref is TRUE).
+ * Stop if FUNC returns a non zero value (i.e. anything
+ * other than H5_ITER_CONT).
*
- * If FUNC returns a positive value (i.e. H5_ITER_STOP),
+ * If FUNC returns a positive value (i.e. H5_ITER_STOP),
* return SUCCEED.
*
- * If FUNC returns a negative value (i.e. H5_ITER_ERROR),
+ * If FUNC returns a negative value (i.e. H5_ITER_ERROR),
* return FAIL.
- *
- * The FUNC should take a pointer to the object and the
- * udata as arguments and return non-zero to terminate
+ *
+ * The FUNC should take a pointer to the object and the
+ * udata as arguments and return non-zero to terminate
* siteration, and zero to continue.
*
- * Limitation: Currently there is no way to start the iteration from
+ * Limitation: Currently there is no way to start the iteration from
* where a previous iteration left off.
*
* Return: SUCCEED/FAIL
@@ -1911,7 +1911,7 @@ herr_t
H5I_iterate(H5I_type_t type, H5I_search_func_t func, void *udata, hbool_t app_ref)
{
H5I_id_type_t *type_ptr; /* Pointer to the type */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1939,7 +1939,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_iterate() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I__find_id
*
@@ -1955,9 +1955,9 @@ done:
static H5I_id_info_t *
H5I__find_id(hid_t id)
{
- H5I_type_t type; /*ID's type */
- H5I_id_type_t *type_ptr; /*ptr to the type */
- H5I_id_info_t *ret_value = NULL; /* Return value */
+ H5I_type_t type; /*ID's type */
+ H5I_id_type_t *type_ptr; /*ptr to the type */
+ H5I_id_info_t *ret_value = NULL; /* Return value */
FUNC_ENTER_STATIC_NOERR
@@ -1977,7 +1977,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I__find_id() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iget_name
*
@@ -2020,7 +2020,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iget_name() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Iget_file_id
*
@@ -2057,7 +2057,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Iget_file_id() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_get_file_id
*
@@ -2065,7 +2065,7 @@ done:
* ID given an object ID.
*
* Return: Success: The file ID associated with the object
- * Failure: H5I_INVALID_HID
+ * Failure: H5I_INVALID_HID
*
*-------------------------------------------------------------------------
*/
@@ -2101,7 +2101,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_get_file_id() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I__id_dump_cb
*
@@ -2120,9 +2120,9 @@ H5I__id_dump_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
FUNC_ENTER_STATIC_NOERR
- HDfprintf(stderr, " id = %lu\n", (unsigned long)(item->id));
- HDfprintf(stderr, " count = %u\n", item->count);
- HDfprintf(stderr, " obj = 0x%08lx\n", (unsigned long)(item->obj_ptr));
+ HDfprintf(stderr, " id = %lu\n", (unsigned long)(item->id));
+ HDfprintf(stderr, " count = %u\n", item->count);
+ HDfprintf(stderr, " obj = 0x%08lx\n", (unsigned long)(item->obj_ptr));
/* Get the group location, so we get get the name */
switch(type) {
@@ -2168,7 +2168,7 @@ H5I__id_dump_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
FUNC_LEAVE_NOAPI(H5_ITER_CONT)
} /* end H5I__id_dump_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_dump_ids_for_type
*
@@ -2191,14 +2191,14 @@ H5I_dump_ids_for_type(H5I_type_t type)
if(type_ptr) {
/* Header */
- HDfprintf(stderr, " init_count = %u\n", type_ptr->init_count);
- HDfprintf(stderr, " reserved = %u\n", type_ptr->cls->reserved);
- HDfprintf(stderr, " id_count = %llu\n", (unsigned long long)type_ptr->id_count);
- HDfprintf(stderr, " nextid = %llu\n", (unsigned long long)type_ptr->nextid);
+ HDfprintf(stderr, " init_count = %u\n", type_ptr->init_count);
+ HDfprintf(stderr, " reserved = %u\n", type_ptr->cls->reserved);
+ HDfprintf(stderr, " id_count = %llu\n", (unsigned long long)type_ptr->id_count);
+ HDfprintf(stderr, " nextid = %llu\n", (unsigned long long)type_ptr->nextid);
/* List */
if(type_ptr->id_count > 0) {
- HDfprintf(stderr, " List:\n");
+ HDfprintf(stderr, " List:\n");
H5SL_iterate(type_ptr->ids, H5I__id_dump_cb, &type);
}
}
diff --git a/src/H5Ofill.c b/src/H5Ofill.c
index dd3f531..64d75f4 100644
--- a/src/H5Ofill.c
+++ b/src/H5Ofill.c
@@ -14,15 +14,15 @@
/* Programmer: Robb Matzke <matzke@llnl.gov>
* Wednesday, September 30, 1998
*
- * Purpose: The fill message indicates a bit pattern to use for
- * uninitialized data points of a dataset.
+ * Purpose: The fill message indicates a bit pattern to use for
+ * uninitialized data points of a dataset.
*/
#include "H5Omodule.h" /* This source code file is part of the H5O module */
#include "H5private.h" /* Generic Functions */
-#include "H5Dprivate.h" /* Datasets */
+#include "H5Dprivate.h" /* Datasets */
#include "H5Eprivate.h" /* Error handling */
#include "H5FLprivate.h" /* Free Lists */
#include "H5Iprivate.h" /* IDs */
@@ -49,61 +49,61 @@ static herr_t H5O__fill_debug(H5F_t *f, const void *_mesg, FILE *stream,
int indent, int fwidth);
/* Set up & include shared message "interface" info */
-#define H5O_SHARED_TYPE H5O_MSG_FILL
-#define H5O_SHARED_DECODE H5O_fill_shared_decode
-#define H5O_SHARED_DECODE_REAL H5O_fill_old_decode
-#define H5O_SHARED_ENCODE H5O_fill_shared_encode
-#define H5O_SHARED_ENCODE_REAL H5O_fill_old_encode
-#define H5O_SHARED_SIZE H5O_fill_shared_size
-#define H5O_SHARED_SIZE_REAL H5O_fill_old_size
-#define H5O_SHARED_DELETE H5O__fill_shared_delete
+#define H5O_SHARED_TYPE H5O_MSG_FILL
+#define H5O_SHARED_DECODE H5O_fill_shared_decode
+#define H5O_SHARED_DECODE_REAL H5O_fill_old_decode
+#define H5O_SHARED_ENCODE H5O_fill_shared_encode
+#define H5O_SHARED_ENCODE_REAL H5O_fill_old_encode
+#define H5O_SHARED_SIZE H5O_fill_shared_size
+#define H5O_SHARED_SIZE_REAL H5O_fill_old_size
+#define H5O_SHARED_DELETE H5O__fill_shared_delete
#undef H5O_SHARED_DELETE_REAL
-#define H5O_SHARED_LINK H5O__fill_shared_link
+#define H5O_SHARED_LINK H5O__fill_shared_link
#undef H5O_SHARED_LINK_REAL
-#define H5O_SHARED_COPY_FILE H5O__fill_shared_copy_file
+#define H5O_SHARED_COPY_FILE H5O__fill_shared_copy_file
#undef H5O_SHARED_COPY_FILE_REAL
-#define H5O_SHARED_POST_COPY_FILE H5O_fill_shared_post_copy_file
+#define H5O_SHARED_POST_COPY_FILE H5O_fill_shared_post_copy_file
#undef H5O_SHARED_POST_COPY_FILE_REAL
#undef H5O_SHARED_POST_COPY_FILE_UPD
-#define H5O_SHARED_DEBUG H5O_fill_shared_debug
-#define H5O_SHARED_DEBUG_REAL H5O__fill_debug
-#include "H5Oshared.h" /* Shared Object Header Message Callbacks */
+#define H5O_SHARED_DEBUG H5O_fill_shared_debug
+#define H5O_SHARED_DEBUG_REAL H5O__fill_debug
+#include "H5Oshared.h" /* Shared Object Header Message Callbacks */
/* Set up & include shared message "interface" info */
/* (Kludgy 'undef's in order to re-include the H5Oshared.h header) */
#undef H5O_SHARED_TYPE
-#define H5O_SHARED_TYPE H5O_MSG_FILL_NEW
+#define H5O_SHARED_TYPE H5O_MSG_FILL_NEW
#undef H5O_SHARED_DECODE
-#define H5O_SHARED_DECODE H5O_fill_new_shared_decode
+#define H5O_SHARED_DECODE H5O_fill_new_shared_decode
#undef H5O_SHARED_DECODE_REAL
-#define H5O_SHARED_DECODE_REAL H5O_fill_new_decode
+#define H5O_SHARED_DECODE_REAL H5O_fill_new_decode
#undef H5O_SHARED_ENCODE
-#define H5O_SHARED_ENCODE H5O_fill_new_shared_encode
+#define H5O_SHARED_ENCODE H5O_fill_new_shared_encode
#undef H5O_SHARED_ENCODE_REAL
-#define H5O_SHARED_ENCODE_REAL H5O_fill_new_encode
+#define H5O_SHARED_ENCODE_REAL H5O_fill_new_encode
#undef H5O_SHARED_SIZE
-#define H5O_SHARED_SIZE H5O_fill_new_shared_size
+#define H5O_SHARED_SIZE H5O_fill_new_shared_size
#undef H5O_SHARED_SIZE_REAL
-#define H5O_SHARED_SIZE_REAL H5O_fill_new_size
+#define H5O_SHARED_SIZE_REAL H5O_fill_new_size
#undef H5O_SHARED_DELETE
-#define H5O_SHARED_DELETE H5O__fill_new_shared_delete
+#define H5O_SHARED_DELETE H5O__fill_new_shared_delete
#undef H5O_SHARED_DELETE_REAL
#undef H5O_SHARED_LINK
-#define H5O_SHARED_LINK H5O__fill_new_shared_link
+#define H5O_SHARED_LINK H5O__fill_new_shared_link
#undef H5O_SHARED_LINK_REAL
#undef H5O_SHARED_COPY_FILE
-#define H5O_SHARED_COPY_FILE H5O__fill_new_shared_copy_file
+#define H5O_SHARED_COPY_FILE H5O__fill_new_shared_copy_file
#undef H5O_SHARED_COPY_FILE_REAL
#undef H5O_SHARED_POST_COPY_FILE
-#define H5O_SHARED_POST_COPY_FILE H5O_fill_new_shared_post_copy_file
+#define H5O_SHARED_POST_COPY_FILE H5O_fill_new_shared_post_copy_file
#undef H5O_SHARED_POST_COPY_FILE_REAL
#undef H5O_SHARED_POST_COPY_FILE_UPD
#undef H5O_SHARED_DEBUG
-#define H5O_SHARED_DEBUG H5O_fill_new_shared_debug
+#define H5O_SHARED_DEBUG H5O_fill_new_shared_debug
#undef H5O_SHARED_DEBUG_REAL
-#define H5O_SHARED_DEBUG_REAL H5O__fill_debug
+#define H5O_SHARED_DEBUG_REAL H5O__fill_debug
#undef H5Oshared_H
-#include "H5Oshared.h" /* Shared Object Header Message Callbacks */
+#include "H5Oshared.h" /* Shared Object Header Message Callbacks */
/* This message derives from H5O message class, for old fill value before version 1.5 */
const H5O_msg_class_t H5O_MSG_FILL[1] = {{
@@ -150,7 +150,7 @@ const H5O_msg_class_t H5O_MSG_FILL_NEW[1] = {{
H5O_fill_new_shared_post_copy_file, /* post copy native value to file */
NULL, /* get creation index */
NULL, /* set creation index */
- H5O_fill_new_shared_debug /*debug the message */
+ H5O_fill_new_shared_debug /*debug the message */
}};
/* Format version bounds for fill value */
@@ -175,15 +175,15 @@ H5FL_DEFINE(H5O_fill_t);
/* Declare extern the free list to manage blocks of type conversion data */
H5FL_BLK_EXTERN(type_conv);
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_fill_new_decode
+ * Function: H5O_fill_new_decode
*
- * Purpose: Decode a new fill value message. The new fill value
+ * Purpose: Decode a new fill value message. The new fill value
* message is fill value plus space allocation time and
* fill value writing time and whether fill value is defined.
*
- * Return: Success: Ptr to new message in native struct.
+ * Return: Success: Ptr to new message in native struct.
* Failure: NULL
*
* Programmer: Raymond Lu
@@ -196,7 +196,7 @@ H5O_fill_new_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
size_t p_size, const uint8_t *p)
{
- H5O_fill_t *fill = NULL;
+ H5O_fill_t *fill = NULL;
void *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -294,7 +294,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_fill_new_decode() */
-
+
/*-------------------------------------------------------------------------
* Function: H5O_fill_old_decode
*
@@ -313,7 +313,7 @@ H5O_fill_old_decode(H5F_t *f, H5O_t *open_oh,
unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
size_t p_size, const uint8_t *p)
{
- H5O_fill_t *fill = NULL; /* Decoded fill value message */
+ H5O_fill_t *fill = NULL; /* Decoded fill value message */
htri_t exists = FALSE;
H5T_t *dt = NULL;
void *ret_value = NULL; /* Return value */
@@ -375,15 +375,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_fill_old_decode() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_fill_new_encode
+ * Function: H5O_fill_new_encode
*
- * Purpose: Encode a new fill value message. The new fill value
+ * Purpose: Encode a new fill value message. The new fill value
* message is fill value plus space allocation time and
* fill value writing time and whether fill value is defined.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
* Programmer: Raymond Lu
* Feb 26, 2002
@@ -393,7 +393,7 @@ done:
static herr_t
H5O_fill_new_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill)
{
- const H5O_fill_t *fill = (const H5O_fill_t *)_fill;
+ const H5O_fill_t *fill = (const H5O_fill_t *)_fill;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -473,7 +473,7 @@ H5O_fill_new_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_fill_new_encode() */
-
+
/*-------------------------------------------------------------------------
* Function: H5O_fill_old_encode
*
@@ -504,17 +504,17 @@ H5O_fill_old_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_fill_old_encode() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_fill_copy
+ * Function: H5O_fill_copy
*
- * Purpose: Copies a message from _MESG to _DEST, allocating _DEST if
- * necessary. The new fill value message is fill value plus
- * space allocation time and fill value writing time and
- * whether fill value is defined.
+ * Purpose: Copies a message from _MESG to _DEST, allocating _DEST if
+ * necessary. The new fill value message is fill value plus
+ * space allocation time and fill value writing time and
+ * whether fill value is defined.
*
- * Return: Success: Ptr to _DEST
- * Failure: NULL
+ * Return: Success: Ptr to _DEST
+ * Failure: NULL
*
* Programmer: Raymond Lu
* Feb 26, 2002
@@ -621,18 +621,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_fill_copy() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_fill_new_size
+ * Function: H5O_fill_new_size
*
- * Purpose: Returns the size of the raw message in bytes not counting the
+ * Purpose: Returns the size of the raw message in bytes not counting the
* message type or size fields, but only the data fields. This
* function doesn't take into account alignment. The new fill
* value message is fill value plus space allocation time and
* fill value writing time and whether fill value is defined.
*
- * Return: Success: Message data size in bytes w/o alignment.
- * Failure: 0
+ * Return: Success: Message data size in bytes w/o alignment.
+ * Failure: 0
*
* Programmer: Raymond Lu
* Feb 26, 2002
@@ -652,26 +652,26 @@ H5O_fill_new_size(const H5F_t H5_ATTR_UNUSED *f, const void *_fill)
/* Determine size for different versions */
if(fill->version < H5O_FILL_VERSION_3) {
- ret_value = 1 + /* Version number */
- 1 + /* Space allocation time */
- 1 + /* Fill value write time */
- 1; /* Fill value defined */
+ ret_value = 1 + /* Version number */
+ 1 + /* Space allocation time */
+ 1 + /* Fill value write time */
+ 1; /* Fill value defined */
if(fill->fill_defined)
- ret_value += 4 + /* Fill value size */
- (fill->size > 0 ? (size_t)fill->size : 0); /* Size of fill value */
+ ret_value += 4 + /* Fill value size */
+ (fill->size > 0 ? (size_t)fill->size : 0); /* Size of fill value */
} /* end if */
else {
- ret_value = 1 + /* Version number */
- 1; /* Status flags */
+ ret_value = 1 + /* Version number */
+ 1; /* Status flags */
if(fill->size > 0)
- ret_value += 4 + /* Fill value size */
- (size_t)fill->size; /* Size of fill value */
+ ret_value += 4 + /* Fill value size */
+ (size_t)fill->size; /* Size of fill value */
} /* end else */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_fill_new_size() */
-
+
/*-------------------------------------------------------------------------
* Function: H5O_fill_old_size
*
@@ -699,15 +699,15 @@ H5O_fill_old_size(const H5F_t H5_ATTR_UNUSED *f, const void *_fill)
FUNC_LEAVE_NOAPI(4 + (size_t)fill->size)
} /* end H5O_fill_old_size() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_fill_reset_dyn
+ * Function: H5O_fill_reset_dyn
*
- * Purpose: Resets dynamic fill value fields
+ * Purpose: Resets dynamic fill value fields
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, January 22, 2007
*
*-------------------------------------------------------------------------
@@ -754,8 +754,8 @@ H5O_fill_reset_dyn(H5O_fill_t *fill)
} /* end if */
fill->size = 0;
if(fill->type) {
- (void)H5T_close_real(fill->type);
- fill->type = NULL;
+ (void)H5T_close_real(fill->type);
+ fill->type = NULL;
} /* end if */
done:
@@ -765,15 +765,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_fill_reset_dyn() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O__fill_reset
+ * Function: H5O__fill_reset
*
- * Purpose: Resets a message to an initial state.
+ * Purpose: Resets a message to an initial state.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, October 1, 1998
*
*-------------------------------------------------------------------------
@@ -781,7 +781,7 @@ done:
static herr_t
H5O__fill_reset(void *_fill)
{
- H5O_fill_t *fill = (H5O_fill_t *)_fill;
+ H5O_fill_t *fill = (H5O_fill_t *)_fill;
FUNC_ENTER_STATIC_NOERR
@@ -798,15 +798,15 @@ H5O__fill_reset(void *_fill)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__fill_reset() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O__fill_free
+ * Function: H5O__fill_free
*
- * Purpose: Frees the message
+ * Purpose: Frees the message
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, December 5, 2002
*
*-------------------------------------------------------------------------
@@ -823,7 +823,7 @@ H5O__fill_free(void *fill)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__fill_free() */
-
+
/*-------------------------------------------------------------------------
* Function: H5O__fill_pre_copy_file
*
@@ -841,7 +841,7 @@ static herr_t
H5O__fill_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src,
hbool_t H5_ATTR_UNUSED *deleted, const H5O_copy_t *cpy_info, void H5_ATTR_UNUSED *udata)
{
- const H5O_fill_t *fill_src = (const H5O_fill_t *)mesg_src; /* Source fill value */
+ const H5O_fill_t *fill_src = (const H5O_fill_t *)mesg_src; /* Source fill value */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -859,15 +859,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__fill_pre_copy_file() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O__fill_debug
+ * Function: H5O__fill_debug
*
- * Purpose: Prints debugging info for the message.
+ * Purpose: Prints debugging info for the message.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, October 1, 1998
*
*-------------------------------------------------------------------------
@@ -890,40 +890,40 @@ H5O__fill_debug(H5F_t H5_ATTR_UNUSED *f, const void *_fill, FILE *stream,
HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Space Allocation Time:");
switch(fill->alloc_time) {
case H5D_ALLOC_TIME_EARLY:
- fprintf(stream,"Early\n");
+ HDfprintf(stream,"Early\n");
break;
case H5D_ALLOC_TIME_LATE:
- fprintf(stream,"Late\n");
+ HDfprintf(stream,"Late\n");
break;
case H5D_ALLOC_TIME_INCR:
- fprintf(stream,"Incremental\n");
+ HDfprintf(stream,"Incremental\n");
break;
case H5D_ALLOC_TIME_DEFAULT:
case H5D_ALLOC_TIME_ERROR:
default:
- fprintf(stream,"Unknown!\n");
+ HDfprintf(stream,"Unknown!\n");
break;
} /* end switch */
HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Fill Time:");
switch(fill->fill_time) {
case H5D_FILL_TIME_ALLOC:
- fprintf(stream,"On Allocation\n");
+ HDfprintf(stream,"On Allocation\n");
break;
case H5D_FILL_TIME_NEVER:
- fprintf(stream,"Never\n");
+ HDfprintf(stream,"Never\n");
break;
case H5D_FILL_TIME_IFSET:
- fprintf(stream,"If Set\n");
+ HDfprintf(stream,"If Set\n");
break;
case H5D_FILL_TIME_ERROR:
default:
- fprintf(stream,"Unknown!\n");
+ HDfprintf(stream,"Unknown!\n");
break;
} /* end switch */
@@ -931,25 +931,25 @@ H5O__fill_debug(H5F_t H5_ATTR_UNUSED *f, const void *_fill, FILE *stream,
H5P_is_fill_value_defined((const H5O_fill_t *)fill, &fill_status);
switch(fill_status) {
case H5D_FILL_VALUE_UNDEFINED:
- fprintf(stream,"Undefined\n");
+ HDfprintf(stream,"Undefined\n");
break;
case H5D_FILL_VALUE_DEFAULT:
- fprintf(stream,"Default\n");
+ HDfprintf(stream,"Default\n");
break;
case H5D_FILL_VALUE_USER_DEFINED:
- fprintf(stream,"User Defined\n");
+ HDfprintf(stream,"User Defined\n");
break;
case H5D_FILL_VALUE_ERROR:
default:
- fprintf(stream,"Unknown!\n");
+ HDfprintf(stream,"Unknown!\n");
break;
} /* end switch */
HDfprintf(stream, "%*s%-*s %Zd\n", indent, "", fwidth,
- "Size:", fill->size);
+ "Size:", fill->size);
HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Data type:");
if(fill->type) {
H5T_debug(fill->type, stream);
@@ -961,18 +961,18 @@ H5O__fill_debug(H5F_t H5_ATTR_UNUSED *f, const void *_fill, FILE *stream,
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__fill_debug() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_fill_convert
+ * Function: H5O_fill_convert
*
- * Purpose: Convert a fill value from whatever data type it currently has
+ * Purpose: Convert a fill value from whatever data type it currently has
* to the specified dataset type. The `type' field of the fill
* value struct will be set to NULL to indicate that it has the
* same type as the dataset.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, October 1, 1998
*
*-------------------------------------------------------------------------
@@ -980,10 +980,10 @@ H5O__fill_debug(H5F_t H5_ATTR_UNUSED *f, const void *_fill, FILE *stream,
herr_t
H5O_fill_convert(H5O_fill_t *fill, H5T_t *dset_type, hbool_t *fill_changed)
{
- H5T_path_t *tpath; /* Type conversion info */
- void *buf = NULL, *bkg = NULL; /* Conversion buffers */
- hid_t src_id = -1, dst_id = -1; /* Datatype identifiers */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5T_path_t *tpath; /* Type conversion info */
+ void *buf = NULL, *bkg = NULL; /* Conversion buffers */
+ hid_t src_id = -1, dst_id = -1; /* Datatype identifiers */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1008,7 +1008,7 @@ H5O_fill_convert(H5O_fill_t *fill, H5T_t *dset_type, hbool_t *fill_changed)
* Can we convert between source and destination data types?
*/
if(NULL == (tpath = H5T_path_find(fill->type, dset_type)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to convert between src and dst datatypes")
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to convert between src and dst datatypes")
/* Don't bother doing anything if there will be no actual conversion */
if(!H5T_path_noop(tpath)) {
@@ -1064,7 +1064,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_fill_convert() */
-
+
/*-------------------------------------------------------------------------
* Function: H5O_fill_set_version
*
diff --git a/src/H5Omtime.c b/src/H5Omtime.c
index db1d8d7..69f73e5 100644
--- a/src/H5Omtime.c
+++ b/src/H5Omtime.c
@@ -11,20 +11,20 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Robb Matzke <matzke@llnl.gov>
- * Friday, July 24, 1998
+/* Programmer: Robb Matzke <matzke@llnl.gov>
+ * Friday, July 24, 1998
*
- * Purpose: The object modification time message.
+ * Purpose: The object modification time message.
*/
#include "H5Omodule.h" /* This source code file is part of the H5O module */
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free lists */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Opkg.h" /* Object headers */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free lists */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Opkg.h" /* Object headers */
static void *H5O__mtime_new_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags,
@@ -43,62 +43,62 @@ static herr_t H5O__mtime_debug(H5F_t *f, const void *_mesg, FILE *stream,
/* This message derives from H5O message class */
const H5O_msg_class_t H5O_MSG_MTIME[1] = {{
- H5O_MTIME_ID, /*message id number */
- "mtime", /*message name for debugging */
- sizeof(time_t), /*native message size */
- 0, /* messages are sharable? */
- H5O__mtime_decode, /*decode message */
- H5O_mtime_encode, /*encode message */
- H5O_mtime_copy, /*copy the native value */
- H5O_mtime_size, /*raw message size */
- NULL, /* reset method */
- H5O__mtime_free, /* free method */
- NULL, /* file delete method */
- NULL, /* link method */
- NULL, /*set share method */
- NULL, /*can share method */
- NULL, /* pre copy native value to file */
- NULL, /* copy native value to file */
- NULL, /* post copy native value to file */
- NULL, /* get creation index */
- NULL, /* set creation index */
- H5O__mtime_debug /*debug the message */
+ H5O_MTIME_ID, /*message id number */
+ "mtime", /*message name for debugging */
+ sizeof(time_t), /*native message size */
+ 0, /* messages are sharable? */
+ H5O__mtime_decode, /*decode message */
+ H5O_mtime_encode, /*encode message */
+ H5O_mtime_copy, /*copy the native value */
+ H5O_mtime_size, /*raw message size */
+ NULL, /* reset method */
+ H5O__mtime_free, /* free method */
+ NULL, /* file delete method */
+ NULL, /* link method */
+ NULL, /*set share method */
+ NULL, /*can share method */
+ NULL, /* pre copy native value to file */
+ NULL, /* copy native value to file */
+ NULL, /* post copy native value to file */
+ NULL, /* get creation index */
+ NULL, /* set creation index */
+ H5O__mtime_debug /*debug the message */
}};
/* This message derives from H5O message class */
/* (Only encode, decode & size routines are different from old mtime routines) */
const H5O_msg_class_t H5O_MSG_MTIME_NEW[1] = {{
- H5O_MTIME_NEW_ID, /*message id number */
- "mtime_new", /*message name for debugging */
- sizeof(time_t), /*native message size */
- 0, /* messages are sharable? */
- H5O__mtime_new_decode, /*decode message */
- H5O_mtime_new_encode, /*encode message */
- H5O_mtime_copy, /*copy the native value */
- H5O_mtime_new_size, /*raw message size */
- NULL, /* reset method */
- H5O__mtime_free, /* free method */
- NULL, /* file delete method */
- NULL, /* link method */
- NULL, /*set share method */
- NULL, /*can share method */
- NULL, /* pre copy native value to file */
- NULL, /* copy native value to file */
- NULL, /* post copy native value to file */
- NULL, /* get creation index */
- NULL, /* set creation index */
- H5O__mtime_debug /*debug the message */
+ H5O_MTIME_NEW_ID, /*message id number */
+ "mtime_new", /*message name for debugging */
+ sizeof(time_t), /*native message size */
+ 0, /* messages are sharable? */
+ H5O__mtime_new_decode, /*decode message */
+ H5O_mtime_new_encode, /*encode message */
+ H5O_mtime_copy, /*copy the native value */
+ H5O_mtime_new_size, /*raw message size */
+ NULL, /* reset method */
+ H5O__mtime_free, /* free method */
+ NULL, /* file delete method */
+ NULL, /* link method */
+ NULL, /*set share method */
+ NULL, /*can share method */
+ NULL, /* pre copy native value to file */
+ NULL, /* copy native value to file */
+ NULL, /* post copy native value to file */
+ NULL, /* get creation index */
+ NULL, /* set creation index */
+ H5O__mtime_debug /*debug the message */
}};
/* Current version of new mtime information */
-#define H5O_MTIME_VERSION 1
+#define H5O_MTIME_VERSION 1
/* Declare a free list to manage the time_t struct */
H5FL_DEFINE(time_t);
-
+
/*-------------------------------------------------------------------------
- * Function: H5O__mtime_new_decode
+ * Function: H5O__mtime_new_decode
*
* Purpose: Decode a new modification time message and return a pointer to
* a new time_t value.
@@ -106,13 +106,13 @@ H5FL_DEFINE(time_t);
* The new modification time message format was added due to the
* performance overhead of the old format.
*
- * Return: Success: Ptr to new message in native struct.
+ * Return: Success: Ptr to new message in native struct.
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Jan 3 2002
+ * Programmer: Quincey Koziol
+ * koziol@ncsa.uiuc.edu
+ * Jan 3 2002
*
*-------------------------------------------------------------------------
*/
@@ -121,7 +121,7 @@ H5O__mtime_new_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
{
- time_t *mesg;
+ time_t *mesg;
uint32_t tmp_time; /* Temporary copy of the time */
void *ret_value = NULL; /* Return value */
@@ -153,9 +153,9 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__mtime_new_decode() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O__mtime_decode
+ * Function: H5O__mtime_decode
*
* Purpose: Decode a modification time message and return a pointer to a
* new time_t value.
@@ -163,13 +163,13 @@ done:
* The new modification time message format was added due to the
* performance overhead of the old format.
*
- * Return: Success: Ptr to new message in native struct.
+ * Return: Success: Ptr to new message in native struct.
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jul 24 1998
+ * Programmer: Robb Matzke
+ * matzke@llnl.gov
+ * Jul 24 1998
*
*-------------------------------------------------------------------------
*/
@@ -178,9 +178,9 @@ H5O__mtime_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
{
- time_t *mesg, the_time;
- struct tm tm;
- int i; /* Local index variable */
+ time_t *mesg, the_time;
+ struct tm tm;
+ int i; /* Local index variable */
void *ret_value = NULL; /* Return value */
FUNC_ENTER_STATIC
@@ -218,24 +218,24 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__mtime_decode() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_mtime_new_encode
+ * Function: H5O_mtime_new_encode
*
- * Purpose: Encodes a new modification time message.
+ * Purpose: Encodes a new modification time message.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Jan 3 2002
+ * Programmer: Quincey Koziol
+ * koziol@ncsa.uiuc.edu
+ * Jan 3 2002
*
*-------------------------------------------------------------------------
*/
static herr_t
H5O_mtime_new_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
- const time_t *mesg = (const time_t *) _mesg;
+ const time_t *mesg = (const time_t *) _mesg;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -258,17 +258,17 @@ H5O_mtime_new_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_sha
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_mtime_new_encode() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_mtime_encode
+ * Function: H5O_mtime_encode
*
- * Purpose: Encodes a modification time message.
+ * Purpose: Encodes a modification time message.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jul 24 1998
+ * Programmer: Robb Matzke
+ * matzke@llnl.gov
+ * Jul 24 1998
*
* Modifications:
*
@@ -277,8 +277,8 @@ H5O_mtime_new_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_sha
static herr_t
H5O_mtime_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
- const time_t *mesg = (const time_t *) _mesg;
- struct tm *tm;
+ const time_t *mesg = (const time_t *) _mesg;
+ struct tm *tm;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -289,27 +289,27 @@ H5O_mtime_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
/* encode */
tm = HDgmtime(mesg);
- sprintf((char*)p, "%04d%02d%02d%02d%02d%02d",
+ HDsprintf((char*)p, "%04d%02d%02d%02d%02d%02d",
1900+tm->tm_year, 1+tm->tm_mon, tm->tm_mday,
tm->tm_hour, tm->tm_min, tm->tm_sec);
FUNC_LEAVE_NOAPI(SUCCEED)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_mtime_copy
+ * Function: H5O_mtime_copy
*
- * Purpose: Copies a message from _MESG to _DEST, allocating _DEST if
- * necessary.
+ * Purpose: Copies a message from _MESG to _DEST, allocating _DEST if
+ * necessary.
*
- * Return: Success: Ptr to _DEST
+ * Return: Success: Ptr to _DEST
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jul 24 1998
+ * Programmer: Robb Matzke
+ * matzke@llnl.gov
+ * Jul 24 1998
*
* Modifications:
*
@@ -318,8 +318,8 @@ H5O_mtime_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
static void *
H5O_mtime_copy(const void *_mesg, void *_dest)
{
- const time_t *mesg = (const time_t *) _mesg;
- time_t *dest = (time_t *) _dest;
+ const time_t *mesg = (const time_t *) _mesg;
+ time_t *dest = (time_t *) _dest;
void *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -339,22 +339,22 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_mtime_new_size
+ * Function: H5O_mtime_new_size
*
- * Purpose: Returns the size of the raw message in bytes not
- * counting the message type or size fields, but only the data
- * fields. This function doesn't take into account
- * alignment.
+ * Purpose: Returns the size of the raw message in bytes not
+ * counting the message type or size fields, but only the data
+ * fields. This function doesn't take into account
+ * alignment.
*
- * Return: Success: Message data size in bytes w/o alignment.
+ * Return: Success: Message data size in bytes w/o alignment.
*
- * Failure: 0
+ * Failure: 0
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Jan 3 2002
+ * Programmer: Quincey Koziol
+ * koziol@ncsa.uiuc.edu
+ * Jan 3 2002
*
* Modifications:
*
@@ -372,22 +372,22 @@ H5O_mtime_new_size(const H5F_t H5_ATTR_UNUSED * f, hbool_t H5_ATTR_UNUSED disabl
FUNC_LEAVE_NOAPI(8)
} /* end H5O_mtime_new_size() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O_mtime_size
+ * Function: H5O_mtime_size
*
- * Purpose: Returns the size of the raw message in bytes not
- * counting the message type or size fields, but only the data
- * fields. This function doesn't take into account
- * alignment.
+ * Purpose: Returns the size of the raw message in bytes not
+ * counting the message type or size fields, but only the data
+ * fields. This function doesn't take into account
+ * alignment.
*
- * Return: Success: Message data size in bytes w/o alignment.
+ * Return: Success: Message data size in bytes w/o alignment.
*
- * Failure: 0
+ * Failure: 0
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jul 14 1998
+ * Programmer: Robb Matzke
+ * matzke@llnl.gov
+ * Jul 14 1998
*
* Modifications:
*
@@ -405,15 +405,15 @@ H5O_mtime_size(const H5F_t H5_ATTR_UNUSED * f, hbool_t H5_ATTR_UNUSED disable_sh
FUNC_LEAVE_NOAPI(16)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5O__mtime_free
+ * Function: H5O__mtime_free
*
- * Purpose: Frees the message
+ * Purpose: Frees the message
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, March 30, 2000
*
*-------------------------------------------------------------------------
@@ -430,17 +430,17 @@ H5O__mtime_free(void *mesg)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__mtime_free() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5O__mtime_debug
+ * Function: H5O__mtime_debug
*
- * Purpose: Prints debugging info for the message.
+ * Purpose: Prints debugging info for the message.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jul 24 1998
+ * Programmer: Robb Matzke
+ * matzke@llnl.gov
+ * Jul 24 1998
*
* Modifications:
*
@@ -450,9 +450,9 @@ static herr_t
H5O__mtime_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream,
int indent, int fwidth)
{
- const time_t *mesg = (const time_t *)_mesg;
- struct tm *tm;
- char buf[128];
+ const time_t *mesg = (const time_t *)_mesg;
+ struct tm *tm;
+ char buf[128];
FUNC_ENTER_NOAPI_NOINIT_NOERR
diff --git a/src/H5Oname.c b/src/H5Oname.c
index a710944..dbfa710 100644
--- a/src/H5Oname.c
+++ b/src/H5Oname.c
@@ -25,10 +25,10 @@
#include "H5Omodule.h" /* This source code file is part of the H5O module */
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Opkg.h" /* Object headers */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Opkg.h" /* Object headers */
/* PRIVATE PROTOTYPES */
@@ -43,29 +43,29 @@ static herr_t H5O__name_debug(H5F_t *f, const void *_mesg, FILE * stream,
/* This message derives from H5O message class */
const H5O_msg_class_t H5O_MSG_NAME[1] = {{
- H5O_NAME_ID, /*message id number */
- "name", /*message name for debugging */
- sizeof(H5O_name_t), /*native message size */
- 0, /* messages are sharable? */
- H5O__name_decode, /*decode message */
- H5O_name_encode, /*encode message */
- H5O_name_copy, /*copy the native value */
- H5O_name_size, /*raw message size */
- H5O__name_reset, /*free internal memory */
- NULL, /* free method */
- NULL, /* file delete method */
- NULL, /* link method */
- NULL, /*set share method */
- NULL, /*can share method */
- NULL, /* pre copy native value to file */
- NULL, /* copy native value to file */
- NULL, /* post copy native value to file */
- NULL, /* get creation index */
- NULL, /* set creation index */
- H5O__name_debug /*debug the message */
+ H5O_NAME_ID, /*message id number */
+ "name", /*message name for debugging */
+ sizeof(H5O_name_t), /*native message size */
+ 0, /* messages are sharable? */
+ H5O__name_decode, /*decode message */
+ H5O_name_encode, /*encode message */
+ H5O_name_copy, /*copy the native value */
+ H5O_name_size, /*raw message size */
+ H5O__name_reset, /*free internal memory */
+ NULL, /* free method */
+ NULL, /* file delete method */
+ NULL, /* link method */
+ NULL, /*set share method */
+ NULL, /*can share method */
+ NULL, /* pre copy native value to file */
+ NULL, /* copy native value to file */
+ NULL, /* post copy native value to file */
+ NULL, /* get creation index */
+ NULL, /* set creation index */
+ H5O__name_debug /*debug the message */
}};
-
+
/*-------------------------------------------------------------------------
* Function: H5O__name_decode
*
@@ -98,9 +98,9 @@ H5O__name_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
/* decode */
if(NULL == (mesg = (H5O_name_t *)H5MM_calloc(sizeof(H5O_name_t))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
if(NULL == (mesg->s = (char *)H5MM_strdup((const char *)p)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Set return value */
ret_value = mesg;
@@ -113,7 +113,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__name_decode() */
-
+
/*-------------------------------------------------------------------------
* Function: H5O_name_encode
*
@@ -147,7 +147,7 @@ H5O_name_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
FUNC_LEAVE_NOAPI(SUCCEED)
}
-
+
/*-------------------------------------------------------------------------
* Function: H5O_name_copy
*
@@ -179,7 +179,7 @@ H5O_name_copy(const void *_mesg, void *_dest)
HDassert(mesg);
if(!dest && NULL == (dest = (H5O_name_t *)H5MM_calloc(sizeof(H5O_name_t))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* copy */
*dest = *mesg;
@@ -197,7 +197,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_name_copy() */
-
+
/*-------------------------------------------------------------------------
* Function: H5O_name_size
*
@@ -235,7 +235,7 @@ H5O_name_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shar
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
* Function: H5O__name_reset
*
@@ -266,7 +266,7 @@ H5O__name_reset(void *_mesg)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__name_reset() */
-
+
/*-------------------------------------------------------------------------
* Function: H5O__name_debug
*
@@ -286,7 +286,7 @@ static herr_t
H5O__name_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream,
int indent, int fwidth)
{
- const H5O_name_t *mesg = (const H5O_name_t *)_mesg;
+ const H5O_name_t *mesg = (const H5O_name_t *)_mesg;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -297,7 +297,7 @@ H5O__name_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream,
HDassert(indent >= 0);
HDassert(fwidth >= 0);
- fprintf(stream, "%*s%-*s `%s'\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s `%s'\n", indent, "", fwidth,
"Name:",
mesg->s);
diff --git a/src/H5PB.c b/src/H5PB.c
index a325ad1..8d29951 100644
--- a/src/H5PB.c
+++ b/src/H5PB.c
@@ -24,20 +24,20 @@
/* Module Setup */
/****************/
-#define H5F_FRIEND /*suppress error about including H5Fpkg */
+#define H5F_FRIEND /*suppress error about including H5Fpkg */
#include "H5PBmodule.h" /* This source code file is part of the H5PB module */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* Files */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5Iprivate.h" /* IDs */
-#include "H5PBpkg.h" /* File access */
-#include "H5SLprivate.h" /* Skip List */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fpkg.h" /* Files */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5Iprivate.h" /* IDs */
+#include "H5PBpkg.h" /* File access */
+#include "H5SLprivate.h" /* Skip List */
/****************/
@@ -150,9 +150,9 @@ H5FL_DEFINE_STATIC(H5PB_t);
H5FL_DEFINE_STATIC(H5PB_entry_t);
-
+
/*-------------------------------------------------------------------------
- * Function: H5PB_reset_stats
+ * Function: H5PB_reset_stats
*
* Purpose: This function was created without documentation.
* What follows is my best understanding of Mohamad's intent.
@@ -161,11 +161,11 @@ H5FL_DEFINE_STATIC(H5PB_entry_t);
*
* Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
-herr_t
+herr_t
H5PB_reset_stats(H5PB_t *page_buf)
{
FUNC_ENTER_NOAPI_NOERR
@@ -187,9 +187,9 @@ H5PB_reset_stats(H5PB_t *page_buf)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5PB_reset_stats() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5PB_get_stats
+ * Function: H5PB_get_stats
*
* Purpose: This function was created without documentation.
* What follows is my best understanding of Mohamad's intent.
@@ -201,13 +201,13 @@ H5PB_reset_stats(H5PB_t *page_buf)
* --evictions: the number of metadata and raw data evictions from the page buffer layer
* --bypasses: the number of metadata and raw data accesses that bypass the page buffer layer
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
-herr_t
+herr_t
H5PB_get_stats(const H5PB_t *page_buf, unsigned accesses[2], unsigned hits[2],
unsigned misses[2], unsigned evictions[2], unsigned bypasses[2])
{
@@ -230,18 +230,18 @@ H5PB_get_stats(const H5PB_t *page_buf, unsigned accesses[2], unsigned hits[2],
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5PB_get_stats */
-
+
/*-------------------------------------------------------------------------
- * Function: H5PB_print_stats()
+ * Function: H5PB_print_stats()
*
* Purpose: This function was created without documentation.
* What follows is my best understanding of Mohamad's intent.
*
* Print out statistics collected for the page buffer layer.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
@@ -252,7 +252,7 @@ H5PB_print_stats(const H5PB_t *page_buf)
HDassert(page_buf);
- printf("PAGE BUFFER STATISTICS:\n");
+ HDprintf("PAGE BUFFER STATISTICS:\n");
HDprintf("******* METADATA\n");
HDprintf("\t Total Accesses: %u\n", page_buf->accesses[0]);
@@ -275,15 +275,15 @@ H5PB_print_stats(const H5PB_t *page_buf)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5PB_print_stats */
-
+
/*-------------------------------------------------------------------------
- * Function: H5PB_create
+ * Function: H5PB_create
*
- * Purpose: Create and setup the PB on the file.
+ * Purpose: Create and setup the PB on the file.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
@@ -314,7 +314,7 @@ H5PB_create(H5F_t *f, size_t size, unsigned page_buf_min_meta_perc, unsigned pag
/* Allocate the new page buffering structure */
if(NULL == (page_buf = H5FL_CALLOC(H5PB_t)))
- HGOTO_ERROR(H5E_PAGEBUF, H5E_NOSPACE, FAIL, "memory allocation failed")
+ HGOTO_ERROR(H5E_PAGEBUF, H5E_NOSPACE, FAIL, "memory allocation failed")
page_buf->max_size = size;
H5_CHECKED_ASSIGN(page_buf->page_size, size_t, f->shared->fs_page_size, hsize_t);
@@ -322,7 +322,7 @@ H5PB_create(H5F_t *f, size_t size, unsigned page_buf_min_meta_perc, unsigned pag
page_buf->min_raw_perc = page_buf_min_raw_perc;
/* Calculate the minimum page count for metadata and raw data
- * based on the fractions provided
+ * based on the fractions provided
*/
page_buf->min_meta_count = (unsigned)((size * page_buf_min_meta_perc) / (f->shared->fs_page_size * 100));
page_buf->min_raw_count = (unsigned)((size * page_buf_min_raw_perc) / (f->shared->fs_page_size * 100));
@@ -353,15 +353,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5PB_create */
-
+
/*-------------------------------------------------------------------------
- * Function: H5PB__flush_cb
+ * Function: H5PB__flush_cb
*
- * Purpose: Callback to flush PB skiplist entries.
+ * Purpose: Callback to flush PB skiplist entries.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
@@ -387,15 +387,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5PB__flush_cb() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5PB_flush
+ * Function: H5PB_flush
*
- * Purpose: Flush/Free all the PB entries to the file.
+ * Purpose: Flush/Free all the PB entries to the file.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
@@ -422,15 +422,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5PB_flush */
-
+
/*-------------------------------------------------------------------------
- * Function: H5PB__dest_cb
+ * Function: H5PB__dest_cb
*
- * Purpose: Callback to free PB skiplist entries.
+ * Purpose: Callback to free PB skiplist entries.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
@@ -459,15 +459,15 @@ H5PB__dest_cb(void *item, void H5_ATTR_UNUSED *key, void *_op_data)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5PB__dest_cb() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5PB_dest
+ * Function: H5PB_dest
*
- * Purpose: Flush and destroy the PB on the file if it exists.
+ * Purpose: Flush and destroy the PB on the file if it exists.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
@@ -513,22 +513,22 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5PB_dest */
-
+
/*-------------------------------------------------------------------------
- * Function: H5PB_add_new_page
+ * Function: H5PB_add_new_page
*
- * Purpose: Add a new page to the new page skip list. This is called
- * from the MF layer when a new page is allocated to
- * indicate to the page buffer layer that a read of the page
+ * Purpose: Add a new page to the new page skip list. This is called
+ * from the MF layer when a new page is allocated to
+ * indicate to the page buffer layer that a read of the page
* from the file is not necessary since it's an empty page.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
-herr_t
+herr_t
H5PB_add_new_page(H5F_t *f, H5FD_mem_t type, haddr_t page_addr)
{
H5PB_t *page_buf = f->shared->page_buf;
@@ -571,22 +571,22 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5PB_add_new_page */
-
+
/*-------------------------------------------------------------------------
- * Function: H5PB_update_entry
+ * Function: H5PB_update_entry
*
- * Purpose: In PHDF5, entries that are written by other processes and just
- * marked clean by this process have to have their corresponding
- * pages updated if they exist in the page buffer.
+ * Purpose: In PHDF5, entries that are written by other processes and just
+ * marked clean by this process have to have their corresponding
+ * pages updated if they exist in the page buffer.
* This routine checks and update the pages.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
-herr_t
+herr_t
H5PB_update_entry(H5PB_t *page_buf, haddr_t addr, size_t size, const void *buf)
{
H5PB_entry_t *page_entry; /* Pointer to the corresponding page entry */
@@ -618,12 +618,12 @@ H5PB_update_entry(H5PB_t *page_buf, haddr_t addr, size_t size, const void *buf)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5PB_update_entry */
-
+
/*-------------------------------------------------------------------------
* Function: H5PB_remove_entry
*
* Purpose: Remove possible metadata entry with ADDR from the PB cache.
- * This is in response to the data corruption bug from fheap.c
+ * This is in response to the data corruption bug from fheap.c
* with page buffering + page strategy.
* Note: Large metadata page bypasses the PB cache.
* Note: Update of raw data page (large or small sized) is handled by the PB cache.
@@ -669,16 +669,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5PB_remove_entry */
-
+
/*-------------------------------------------------------------------------
- * Function: H5PB_read
+ * Function: H5PB_read
*
- * Purpose: Reads in the data from the page containing it if it exists
+ * Purpose: Reads in the data from the page containing it if it exists
* in the PB cache; otherwise reads in the page through the VFD.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
@@ -739,7 +739,7 @@ H5PB_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size, void *buf/*out*/
page_buf->bypasses[0] ++;
} /* end if */
- /* If page buffering is disabled, or if this is a large metadata access,
+ /* If page buffering is disabled, or if this is a large metadata access,
* or if this is parallel raw data access, we are done here
*/
if(NULL == page_buf || (size >= page_buf->page_size && H5FD_MEM_DRAW != type) ||
@@ -765,7 +765,7 @@ H5PB_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size, void *buf/*out*/
last_page_addr = ((addr + size - 1) / page_buf->page_size) * page_buf->page_size;
/* How many pages does this write span */
- num_touched_pages = (last_page_addr / page_buf->page_size + 1) -
+ num_touched_pages = (last_page_addr / page_buf->page_size + 1) -
(first_page_addr / page_buf->page_size);
if(first_page_addr == last_page_addr) {
HDassert(1 == num_touched_pages);
@@ -818,7 +818,7 @@ H5PB_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size, void *buf/*out*/
offset = addr - first_page_addr;
HDassert(page_buf->page_size > offset);
- HDmemcpy(buf, (uint8_t *)page_entry->page_buf_ptr + offset,
+ HDmemcpy(buf, (uint8_t *)page_entry->page_buf_ptr + offset,
page_buf->page_size - (size_t)offset);
/* move to top of LRU list */
@@ -826,7 +826,7 @@ H5PB_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size, void *buf/*out*/
} /* end if */
/* special handling for the last page if it is not a full page access */
else if(num_touched_pages > 1 && i == num_touched_pages-1 && search_addr < addr+size) {
- offset = (num_touched_pages-2)*page_buf->page_size +
+ offset = (num_touched_pages-2)*page_buf->page_size +
(page_buf->page_size - (addr - first_page_addr));
HDmemcpy((uint8_t *)buf + offset, page_entry->page_buf_ptr,
@@ -839,7 +839,7 @@ H5PB_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size, void *buf/*out*/
else {
offset = i*page_buf->page_size;
- HDmemcpy((uint8_t *)buf+(i*page_buf->page_size) , page_entry->page_buf_ptr,
+ HDmemcpy((uint8_t *)buf+(i*page_buf->page_size) , page_entry->page_buf_ptr,
page_buf->page_size);
} /* end else */
} /* end if */
@@ -883,7 +883,7 @@ H5PB_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size, void *buf/*out*/
else
page_buf->hits[0]++;
} /* end if */
- /* if not found */
+ /* if not found */
else {
void *new_page_buf = NULL;
size_t page_size = page_buf->page_size;
@@ -965,17 +965,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PB_read() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5PB_write
+ * Function: H5PB_write
*
* Purpose: Write data into the Page Buffer. If the page exists in the
* cache, update it; otherwise read it from disk, update it, and
* insert into cache.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
@@ -1035,7 +1035,7 @@ H5PB_write(H5F_t *f, H5FD_mem_t type, haddr_t addr,
page_buf->bypasses[0]++;
} /* end if */
- /* If page buffering is disabled, or if this is a large metadata access,
+ /* If page buffering is disabled, or if this is a large metadata access,
* or if this is a parallel raw data access, we are done here
*/
if(NULL == page_buf || (size >= page_buf->page_size && H5FD_MEM_DRAW != type) ||
@@ -1069,7 +1069,7 @@ H5PB_write(H5F_t *f, H5FD_mem_t type, haddr_t addr,
last_page_addr = (addr + size - 1) / page_buf->page_size * page_buf->page_size;
/* how many pages does this write span */
- num_touched_pages = (last_page_addr/page_buf->page_size + 1) -
+ num_touched_pages = (last_page_addr/page_buf->page_size + 1) -
(first_page_addr / page_buf->page_size);
if(first_page_addr == last_page_addr) {
HDassert(1 == num_touched_pages);
@@ -1110,18 +1110,18 @@ H5PB_write(H5F_t *f, H5FD_mem_t type, haddr_t addr,
} /* end if */
} /* end if */
/* Special handling for the last page if it is not a full page update */
- else if(num_touched_pages > 1 && i == (num_touched_pages - 1) &&
+ else if(num_touched_pages > 1 && i == (num_touched_pages - 1) &&
(search_addr + page_buf->page_size) != (addr + size)) {
HDassert(search_addr+page_buf->page_size > addr+size);
/* Lookup the page in the skip list */
page_entry = (H5PB_entry_t *)H5SL_search(page_buf->slist_ptr, (void *)(&search_addr));
if(page_entry) {
- offset = (num_touched_pages - 2) * page_buf->page_size +
+ offset = (num_touched_pages - 2) * page_buf->page_size +
(page_buf->page_size - (addr - first_page_addr));
/* Update page's data */
- HDmemcpy(page_entry->page_buf_ptr, (const uint8_t *)buf + offset,
+ HDmemcpy(page_entry->page_buf_ptr, (const uint8_t *)buf + offset,
(size_t)((addr + size) - last_page_addr));
/* Mark page dirty and push to top of LRU */
@@ -1185,7 +1185,7 @@ H5PB_write(H5F_t *f, H5FD_mem_t type, haddr_t addr,
else
page_buf->hits[0]++;
} /* end if */
- /* If not found */
+ /* If not found */
else {
void *new_page_buf;
size_t page_size = page_buf->page_size;
@@ -1207,7 +1207,7 @@ H5PB_write(H5F_t *f, H5FD_mem_t type, haddr_t addr,
/* Write to VFD and return */
if(H5FD_write(file, type, addr, size, buf) < 0)
HGOTO_ERROR(H5E_PAGEBUF, H5E_WRITEERROR, FAIL, "driver write request failed")
-
+
/* Break out of loop */
break;
} /* end if */
@@ -1305,16 +1305,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PB_write() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5PB__insert_entry()
+ * Function: H5PB__insert_entry()
*
- * Purpose: ???
+ * Purpose: ???
*
* This function was created without documentation.
* What follows is my best understanding of Mohamad's intent.
*
- * Insert the supplied page into the page buffer, both the
+ * Insert the supplied page into the page buffer, both the
* skip list and the LRU.
*
* As best I can tell, this function imposes no limit on the
@@ -1324,13 +1324,13 @@ done:
* JRM -- 12/22/16
*
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
-static herr_t
+static herr_t
H5PB__insert_entry(H5PB_t *page_buf, H5PB_entry_t *page_entry)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -1355,29 +1355,29 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PB__insert_entry() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5PB__make_space()
+ * Function: H5PB__make_space()
*
- * Purpose: ???
+ * Purpose: ???
*
* This function was created without documentation.
* What follows is my best understanding of Mohamad's intent.
*
- * If necessary and if possible, evict a page from the page
- * buffer to make space for the supplied page. Depending on
- * the page buffer configuration and contents, and the page
+ * If necessary and if possible, evict a page from the page
+ * buffer to make space for the supplied page. Depending on
+ * the page buffer configuration and contents, and the page
* supplied this may or may not be possible.
*
* JRM -- 12/22/16
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
-static htri_t
+static htri_t
H5PB__make_space(H5F_t *f, H5PB_t *page_buf, H5FD_mem_t inserted_type)
{
H5PB_entry_t *page_entry; /* Pointer to page eviction candidate */
@@ -1402,7 +1402,7 @@ H5PB__make_space(H5F_t *f, H5PB_t *page_buf, H5FD_mem_t inserted_type)
/* check the metadata threshold before evicting metadata items */
while(1) {
- if(page_entry->prev && H5F_MEM_PAGE_META == page_entry->type &&
+ if(page_entry->prev && H5F_MEM_PAGE_META == page_entry->type &&
page_buf->min_meta_count >= page_buf->meta_count)
page_entry = page_entry->prev;
else
@@ -1419,7 +1419,7 @@ H5PB__make_space(H5F_t *f, H5PB_t *page_buf, H5FD_mem_t inserted_type)
/* check the raw data threshold before evicting raw data items */
while(1) {
- if(page_entry->prev && (H5F_MEM_PAGE_DRAW == page_entry->type || H5F_MEM_PAGE_GHEAP == page_entry->type) &&
+ if(page_entry->prev && (H5F_MEM_PAGE_DRAW == page_entry->type || H5F_MEM_PAGE_GHEAP == page_entry->type) &&
page_buf->min_raw_count >= page_buf->raw_count)
page_entry = page_entry->prev;
else
@@ -1460,19 +1460,19 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PB__make_space() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5PB__write_entry()
+ * Function: H5PB__write_entry()
*
- * Purpose: ???
+ * Purpose: ???
*
* This function was created without documentation.
* What follows is my best understanding of Mohamad's intent.
*
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Mohamad Chaarawi
+ * Programmer: Mohamad Chaarawi
*
*-------------------------------------------------------------------------
*/
diff --git a/src/H5ST.c b/src/H5ST.c
index dd5b63c..3a1020b 100644
--- a/src/H5ST.c
+++ b/src/H5ST.c
@@ -743,19 +743,19 @@ H5ST__dump_internal(H5ST_ptr_t p)
FUNC_ENTER_STATIC_NOERR
if(p) {
- printf("p=%p\n", (void *)p);
- printf("\tp->up=%p\n", (void *)p->up);
- printf("\tp->parent=%p\n", (void *)p->parent);
- printf("\tp->lokid=%p\n", (void *)p->lokid);
- printf("\tp->hikid=%p\n", (void *)p->hikid);
- printf("\tp->eqkid=%p\n", (void *)p->eqkid);
- printf("\tp->splitchar=%c\n", p->splitchar);
+ HDprintf("p=%p\n", (void *)p);
+ HDprintf("\tp->up=%p\n", (void *)p->up);
+ HDprintf("\tp->parent=%p\n", (void *)p->parent);
+ HDprintf("\tp->lokid=%p\n", (void *)p->lokid);
+ HDprintf("\tp->hikid=%p\n", (void *)p->hikid);
+ HDprintf("\tp->eqkid=%p\n", (void *)p->eqkid);
+ HDprintf("\tp->splitchar=%c\n", p->splitchar);
H5ST__dump_internal(p->lokid);
if(p->splitchar)
H5ST__dump_internal(p->eqkid);
else
- printf("%s\n", (char *)p->eqkid);
+ HDprintf("%s\n", (char *)p->eqkid);
H5ST__dump_internal(p->hikid);
} /* end if */
diff --git a/src/H5Sdbg.c b/src/H5Sdbg.c
index ebd05ce..6ffa2a9 100644
--- a/src/H5Sdbg.c
+++ b/src/H5Sdbg.c
@@ -13,11 +13,11 @@
/*-------------------------------------------------------------------------
*
- * Created: H5Sdbg.c
- * Jul 24 2007
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Created: H5Sdbg.c
+ * Jul 24 2007
+ * Quincey Koziol <koziol@hdfgroup.org>
*
- * Purpose: Dump debugging information about a dataspace
+ * Purpose: Dump debugging information about a dataspace
*
*-------------------------------------------------------------------------
*/
@@ -32,9 +32,9 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Spkg.h" /* Dataspaces */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Spkg.h" /* Dataspaces */
/****************/
@@ -72,15 +72,15 @@
/*******************/
-
+
/*-------------------------------------------------------------------------
- * Function: H5S_debug
+ * Function: H5S_debug
*
- * Purpose: Prints debugging information about a dataspace.
+ * Purpose: Prints debugging information about a dataspace.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Tuesday, July 21, 1998
*
*-------------------------------------------------------------------------
@@ -88,30 +88,30 @@
herr_t
H5S_debug(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwidth)
{
- const H5S_t *mesg = (const H5S_t*)_mesg;
+ const H5S_t *mesg = (const H5S_t*)_mesg;
FUNC_ENTER_NOAPI_NOINIT_NOERR
switch(H5S_GET_EXTENT_TYPE(mesg)) {
case H5S_NULL:
- fprintf(stream, "%*s%-*s H5S_NULL\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s H5S_NULL\n", indent, "", fwidth,
"Space class:");
break;
case H5S_SCALAR:
- fprintf(stream, "%*s%-*s H5S_SCALAR\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s H5S_SCALAR\n", indent, "", fwidth,
"Space class:");
break;
case H5S_SIMPLE:
- fprintf(stream, "%*s%-*s H5S_SIMPLE\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s H5S_SIMPLE\n", indent, "", fwidth,
"Space class:");
H5O_debug_id(H5O_SDSPACE_ID, f, &(mesg->extent), stream, indent + 3, MAX(0, fwidth - 3));
break;
case H5S_NO_CLASS:
default:
- fprintf(stream, "%*s%-*s **UNKNOWN-%ld**\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s **UNKNOWN-%ld**\n", indent, "", fwidth,
"Space class:", (long)(H5S_GET_EXTENT_TYPE(mesg)));
break;
} /* end switch */
diff --git a/src/H5T.c b/src/H5T.c
index fe2c5b1..6148754 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -556,7 +556,7 @@ static const H5I_class_t H5I_DATATYPE_CLS[1] = {{
static hbool_t H5T_top_package_initialize_s = FALSE;
-
+
/*-------------------------------------------------------------------------
* Function: H5T_init
*
@@ -582,7 +582,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_init() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T__init_inf
*
@@ -695,7 +695,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__init_inf() */
-
+
/*--------------------------------------------------------------------------
NAME
H5T__init_package -- Initialize interface-specific information
@@ -1319,7 +1319,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__init_package() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T__unlock_cb
*
@@ -1352,7 +1352,7 @@ H5T__unlock_cb(void *_dt, hid_t H5_ATTR_UNUSED id, void *_udata)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5T__unlock_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_top_term_package
*
@@ -1391,7 +1391,7 @@ H5T_top_term_package(void)
if((path->conv.u.app_func)((hid_t)FAIL, (hid_t)FAIL, &(path->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL, H5CX_get_dxpl()) < 0) {
#ifdef H5T_DEBUG
if (H5DEBUG(T)) {
- fprintf(H5DEBUG(T), "H5T: conversion function "
+ HDfprintf(H5DEBUG(T), "H5T: conversion function "
"0x%08lx failed to free private data for "
"%s (ignored)\n",
(unsigned long)(path->conv.u.app_func), path->name);
@@ -1404,7 +1404,7 @@ H5T_top_term_package(void)
if((path->conv.u.lib_func)((hid_t)FAIL, (hid_t)FAIL, &(path->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL) < 0) {
#ifdef H5T_DEBUG
if (H5DEBUG(T)) {
- fprintf(H5DEBUG(T), "H5T: conversion function "
+ HDfprintf(H5DEBUG(T), "H5T: conversion function "
"0x%08lx failed to free private data for "
"%s (ignored)\n",
(unsigned long)(path->conv.u.lib_func), path->name);
@@ -1553,7 +1553,7 @@ H5T_top_term_package(void)
FUNC_LEAVE_NOAPI(n)
} /* end H5T_top_term_package() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_term_package
*
@@ -1595,7 +1595,7 @@ H5T_term_package(void)
FUNC_LEAVE_NOAPI(n)
} /* end H5T_term_package() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Tcreate
*
@@ -1640,7 +1640,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tcreate() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Tcopy
*
@@ -1728,7 +1728,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tcopy() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Tclose
*
@@ -1763,7 +1763,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tclose() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Tequal
*
@@ -1800,7 +1800,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tequal() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Tlock
*
@@ -1847,7 +1847,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tlock() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Tget_class
*
@@ -1882,7 +1882,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tget_class() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_get_class
*
@@ -1924,7 +1924,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_get_class() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Tdetect_class
*
@@ -1960,7 +1960,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tdetect_class() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_detect_class
*
@@ -2045,7 +2045,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_detect_class() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Tis_variable_str
*
@@ -2079,7 +2079,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tis_variable_str() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_is_variable_str
*
@@ -2100,7 +2100,7 @@ H5T_is_variable_str(const H5T_t *dt)
FUNC_LEAVE_NOAPI(H5T_IS_VL_STRING(dt->shared))
} /* end H5T_is_variable_str() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Tget_size
*
@@ -2137,7 +2137,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tget_size() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Tset_size
*
@@ -2193,7 +2193,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tset_size() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Tget_super
*
@@ -2233,7 +2233,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tget_super() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_get_super
*
@@ -2267,7 +2267,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
* Function: H5T__register_int
*
@@ -2307,7 +2307,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__register_int() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T__register
*
@@ -2445,7 +2445,7 @@ H5T__register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst,
if((old_path->conv.u.app_func)(tmp_sid, tmp_did, &(old_path->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL, H5CX_get_dxpl()) < 0) {
#ifdef H5T_DEBUG
if(H5DEBUG(T))
- fprintf (H5DEBUG(T), "H5T: conversion function 0x%08lx "
+ HDfprintf (H5DEBUG(T), "H5T: conversion function 0x%08lx "
"failed to free private data for %s (ignored)\n",
(unsigned long)(old_path->conv.u.app_func), old_path->name);
#endif
@@ -2455,7 +2455,7 @@ H5T__register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst,
if((old_path->conv.u.lib_func)(tmp_sid, tmp_did, &(old_path->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL) < 0) {
#ifdef H5T_DEBUG
if(H5DEBUG(T))
- fprintf (H5DEBUG(T), "H5T: conversion function 0x%08lx "
+ HDfprintf (H5DEBUG(T), "H5T: conversion function 0x%08lx "
"failed to free private data for %s (ignored)\n",
(unsigned long)(old_path->conv.u.lib_func), old_path->name);
#endif
@@ -2492,7 +2492,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__register() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Tregister
*
@@ -2548,7 +2548,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tregister() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T__unregister
*
@@ -2627,7 +2627,7 @@ H5T__unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst,
if((path->conv.u.app_func)((hid_t)FAIL, (hid_t)FAIL, &(path->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL, H5CX_get_dxpl()) < 0) {
#ifdef H5T_DEBUG
if(H5DEBUG(T))
- fprintf(H5DEBUG(T), "H5T: conversion function 0x%08lx failed "
+ HDfprintf(H5DEBUG(T), "H5T: conversion function 0x%08lx failed "
"to free private data for %s (ignored)\n",
(unsigned long)(path->conv.u.app_func), path->name);
#endif
@@ -2637,7 +2637,7 @@ H5T__unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst,
if((path->conv.u.lib_func)((hid_t)FAIL, (hid_t)FAIL, &(path->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL) < 0) {
#ifdef H5T_DEBUG
if(H5DEBUG(T))
- fprintf(H5DEBUG(T), "H5T: conversion function 0x%08lx failed "
+ HDfprintf(H5DEBUG(T), "H5T: conversion function 0x%08lx failed "
"to free private data for %s (ignored)\n",
(unsigned long)(path->conv.u.lib_func), path->name);
#endif
@@ -2652,7 +2652,7 @@ H5T__unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst,
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5T__unregister() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Tunregister
*
@@ -2692,7 +2692,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tunregister() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Tfind
*
@@ -2742,7 +2742,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tfind() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Tcompiler_conv
*
@@ -2782,7 +2782,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tcompiler_conv() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Tconvert
*
@@ -2841,7 +2841,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tconvert() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Tencode
*
@@ -2880,7 +2880,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tencode() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Tdecode
*
@@ -2935,7 +2935,7 @@ done:
*-------------------------------------------------------------------------
*/
-
+
/*-------------------------------------------------------------------------
* Function: H5T_encode
*
@@ -2991,7 +2991,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_encode() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_decode
*
@@ -3043,7 +3043,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_decode() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T__create
*
@@ -3172,7 +3172,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__create() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_copy
*
@@ -3480,7 +3480,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_copy() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_lock
*
@@ -3526,7 +3526,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
* Function: H5T__alloc
*
@@ -3573,7 +3573,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__alloc() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T__free
*
@@ -3655,7 +3655,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__free() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_close_real
*
@@ -3698,7 +3698,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_close_real() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T__close_cb
*
@@ -3727,7 +3727,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__close_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_close
*
@@ -3812,7 +3812,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_close() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T__set_size
*
@@ -4012,7 +4012,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__set_size() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_get_size
*
@@ -4040,7 +4040,7 @@ H5T_get_size(const H5T_t *dt)
FUNC_LEAVE_NOAPI(dt->shared->size)
}
-
+
/*-------------------------------------------------------------------------
* Function: H5T_cmp
*
@@ -4502,7 +4502,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_cmp() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_path_find
*
@@ -4549,7 +4549,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_path_find() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T__path_find_real
*
@@ -4615,7 +4615,7 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name,
if(H5T__conv_noop((hid_t)FAIL, (hid_t)FAIL, &(H5T_g.path[0]->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL) < 0) {
#ifdef H5T_DEBUG
if(H5DEBUG(T))
- fprintf(H5DEBUG(T), "H5T: unable to initialize no-op conversion function (ignored)\n");
+ HDfprintf(H5DEBUG(T), "H5T: unable to initialize no-op conversion function (ignored)\n");
#endif
H5E_clear_stack(NULL); /*ignore the error*/
} /* end if */
@@ -4793,7 +4793,7 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name,
if((table->conv.u.app_func)((hid_t)FAIL, (hid_t)FAIL, &(table->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL, H5CX_get_dxpl()) < 0) {
#ifdef H5T_DEBUG
if(H5DEBUG(T))
- fprintf(H5DEBUG(T), "H5T: conversion function 0x%08lx free failed for %s (ignored)\n",
+ HDfprintf(H5DEBUG(T), "H5T: conversion function 0x%08lx free failed for %s (ignored)\n",
(unsigned long)(path->conv.u.app_func), path->name);
#endif
H5E_clear_stack(NULL); /*ignore the failure*/
@@ -4803,7 +4803,7 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name,
if((table->conv.u.lib_func)((hid_t)FAIL, (hid_t)FAIL, &(table->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL) < 0) {
#ifdef H5T_DEBUG
if(H5DEBUG(T))
- fprintf(H5DEBUG(T), "H5T: conversion function 0x%08lx free failed for %s (ignored)\n",
+ HDfprintf(H5DEBUG(T), "H5T: conversion function 0x%08lx free failed for %s (ignored)\n",
(unsigned long)(path->conv.u.lib_func), path->name);
#endif
H5E_clear_stack(NULL); /*ignore the failure*/
@@ -4859,7 +4859,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__path_find_real() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_path_noop
*
@@ -4884,7 +4884,7 @@ H5T_path_noop(const H5T_path_t *p)
FUNC_LEAVE_NOAPI(p->is_noop || (p->is_hard && 0==H5T_cmp(p->src, p->dst, FALSE)))
} /* end H5T_path_noop() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_path_compound_subset
*
@@ -4928,7 +4928,7 @@ H5T_path_compound_subset(const H5T_path_t *p)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_path_compound_subset */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_path_bkg
*
@@ -4950,7 +4950,7 @@ H5T_path_bkg(const H5T_path_t *p)
FUNC_LEAVE_NOAPI(p->cdata.need_bkg)
} /* end H5T_path_bkg() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T__compiler_conv
*
@@ -4984,7 +4984,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__compiler_conv() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_convert
*
@@ -5035,7 +5035,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_convert() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_oloc
*
@@ -5076,7 +5076,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_oloc() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_nameof
*
@@ -5116,7 +5116,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_nameof() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_is_immutable
*
@@ -5146,7 +5146,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
* Function: H5T_is_named
*
@@ -5219,7 +5219,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_convert_committed_datatype() */
-
+
/*--------------------------------------------------------------------------
* Function: H5T_get_ref_type
*
@@ -5248,7 +5248,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_get_ref_type() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_is_sensible
*
@@ -5310,7 +5310,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*--------------------------------------------------------------------------
NAME
H5T_set_loc
@@ -5476,7 +5476,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_set_loc() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_is_relocatable
*
@@ -5515,7 +5515,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_is_relocatable() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_detect_reg_ref
*
@@ -5523,7 +5523,7 @@ done:
* datatype.
*
* Return: TRUE (1) or FALSE (0) on success
- * (Can't fail)
+ * (Can't fail)
*
* Programmer: Quincey Koziol
* Saturday, January 5, 2019
@@ -5578,7 +5578,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__detect_reg_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_is_vl_storage
*
@@ -5620,7 +5620,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_is_vl_storage() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_upgrade_version_cb
*
@@ -5678,7 +5678,7 @@ H5T_upgrade_version_cb(H5T_t *dt, void *op_value)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5T_upgrade_version_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T__upgrade_version
*
@@ -5711,12 +5711,12 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__upgrade_version() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_set_version
*
* Purpose: Set the encoding for a datatype to the version indicated by
- * the file's low bound if that is higher than the datatype's
+ * the file's low bound if that is higher than the datatype's
* version.
*
* Return: Non-negative on success/Negative on failure
@@ -5743,7 +5743,7 @@ H5T_set_version(H5F_t *f, H5T_t *dt)
if(H5T__upgrade_version(dt, vers) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't upgrade datatype encoding")
}
-
+
/* Version bounds check */
if(dt->shared->version > H5O_dtype_ver_bounds[H5F_HIGH_BOUND(f)])
HGOTO_ERROR(H5E_DATATYPE, H5E_BADRANGE, FAIL, "Datatype version out of bounds")
@@ -5752,7 +5752,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_set_version() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_patch_file
*
@@ -5788,7 +5788,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_patch_file() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_patch_vlen_file
*
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index 803a6da..c76ca3c 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Module Info: Datatype conversions for the H5T interface.
+ * Module Info: Datatype conversions for the H5T interface.
*/
/****************/
@@ -25,16 +25,16 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
+#include "H5private.h" /* Generic Functions */
#include "H5CXprivate.h" /* API Contexts */
-#include "H5Dprivate.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5HGprivate.h" /* Global Heaps */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Pprivate.h" /* Property lists */
-#include "H5Tpkg.h" /* Datatypes */
+#include "H5Dprivate.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5HGprivate.h" /* Global Heaps */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Pprivate.h" /* Property lists */
+#include "H5Tpkg.h" /* Datatypes */
/****************/
@@ -57,57 +57,57 @@
* source value has a magnitude that cannot be represented by the destination
* type.
*
- * Suffix Description
- * ------ -----------
- * sS: Signed integers to signed integers where the destination is
- * at least as wide as the source. This case cannot generate
- * overflows.
+ * Suffix Description
+ * ------ -----------
+ * sS: Signed integers to signed integers where the destination is
+ * at least as wide as the source. This case cannot generate
+ * overflows.
*
- * sU: Signed integers to unsigned integers where the destination is
- * at least as wide as the source. This case experiences
- * overflows when the source value is negative.
+ * sU: Signed integers to unsigned integers where the destination is
+ * at least as wide as the source. This case experiences
+ * overflows when the source value is negative.
*
- * uS: Unsigned integers to signed integers where the destination is
- * at least as wide as the source. This case can experience
- * overflows when the source and destination are the same size.
+ * uS: Unsigned integers to signed integers where the destination is
+ * at least as wide as the source. This case can experience
+ * overflows when the source and destination are the same size.
*
- * uU: Unsigned integers to unsigned integers where the destination
- * is at least as wide as the source. Overflows are not
- * possible in this case.
+ * uU: Unsigned integers to unsigned integers where the destination
+ * is at least as wide as the source. Overflows are not
+ * possible in this case.
*
- * Ss: Signed integers to signed integers where the source is at
- * least as large as the destination. Overflows can occur when
- * the destination is narrower than the source.
+ * Ss: Signed integers to signed integers where the source is at
+ * least as large as the destination. Overflows can occur when
+ * the destination is narrower than the source.
*
- * Su: Signed integers to unsigned integers where the source is at
- * least as large as the destination. Overflows occur when the
- * source value is negative and can also occur if the
- * destination is narrower than the source.
+ * Su: Signed integers to unsigned integers where the source is at
+ * least as large as the destination. Overflows occur when the
+ * source value is negative and can also occur if the
+ * destination is narrower than the source.
*
- * Us: Unsigned integers to signed integers where the source is at
- * least as large as the destination. Overflows can occur for
- * all sizes.
+ * Us: Unsigned integers to signed integers where the source is at
+ * least as large as the destination. Overflows can occur for
+ * all sizes.
*
- * Uu: Unsigned integers to unsigned integers where the source is at
- * least as large as the destination. Overflows can occur if the
- * destination is narrower than the source.
+ * Uu: Unsigned integers to unsigned integers where the source is at
+ * least as large as the destination. Overflows can occur if the
+ * destination is narrower than the source.
*
- * su: Conversion from signed integers to unsigned integers where
- * the source and destination are the same size. Overflow occurs
- * when the source value is negative.
+ * su: Conversion from signed integers to unsigned integers where
+ * the source and destination are the same size. Overflow occurs
+ * when the source value is negative.
*
- * us: Conversion from unsigned integers to signed integers where
- * the source and destination are the same size. Overflow
- * occurs when the source magnitude is too large for the
- * destination.
+ * us: Conversion from unsigned integers to signed integers where
+ * the source and destination are the same size. Overflow
+ * occurs when the source magnitude is too large for the
+ * destination.
*
- * fF: Floating-point values to floating-point values where the
- * destination is at least as wide as the source. This case
+ * fF: Floating-point values to floating-point values where the
+ * destination is at least as wide as the source. This case
* cannot generate overflows.
*
- * Ff: Floating-point values to floating-point values the source is at
- * least as large as the destination. Overflows can occur when
- * the destination is narrower than the source.
+ * Ff: Floating-point values to floating-point values the source is at
+ * least as large as the destination. Overflows can occur when
+ * the destination is narrower than the source.
*
* xF: Integers to float-point(float or double) values where the destination
* is at least as wide as the source. This case cannot generate
@@ -119,29 +119,29 @@
*
* The macros take a subset of these arguments in the order listed here:
*
- * CDATA: A pointer to the H5T_cdata_t structure that was passed to the
- * conversion function.
+ * CDATA: A pointer to the H5T_cdata_t structure that was passed to the
+ * conversion function.
*
- * STYPE: The hid_t value for the source datatype.
+ * STYPE: The hid_t value for the source datatype.
*
- * DTYPE: The hid_t value for the destination datatype.
+ * DTYPE: The hid_t value for the destination datatype.
*
- * BUF: A pointer to the conversion buffer.
+ * BUF: A pointer to the conversion buffer.
*
- * NELMTS: The number of values to be converted.
+ * NELMTS: The number of values to be converted.
*
- * ST: The C name for source datatype (e.g., int)
+ * ST: The C name for source datatype (e.g., int)
*
- * DT: The C name for the destination datatype (e.g., signed char)
+ * DT: The C name for the destination datatype (e.g., signed char)
*
- * D_MIN: The minimum possible destination value. For unsigned
- * destination types this should be zero. For signed
- * destination types it's a negative value with a magnitude that
- * is usually one greater than D_MAX. Source values which are
- * smaller than D_MIN generate overflows.
+ * D_MIN: The minimum possible destination value. For unsigned
+ * destination types this should be zero. For signed
+ * destination types it's a negative value with a magnitude that
+ * is usually one greater than D_MAX. Source values which are
+ * smaller than D_MIN generate overflows.
*
- * D_MAX: The maximum possible destination value. Source values which
- * are larger than D_MAX generate overflows.
+ * D_MAX: The maximum possible destination value. Source values which
+ * are larger than D_MAX generate overflows.
*
* The macros are implemented with a generic programming technique, similar
* to templates in C++. The macro which defines the "core" part of the
@@ -156,25 +156,25 @@
*
* The generic "core" macros are: (others are specific to particular conversion)
*
- * Suffix Description
- * ------ -----------
- * xX: Generic Conversion where the destination is at least as
+ * Suffix Description
+ * ------ -----------
+ * xX: Generic Conversion where the destination is at least as
* wide as the source. This case cannot generate overflows.
*
- * Xx: Generic signed conversion where the source is at least as large
+ * Xx: Generic signed conversion where the source is at least as large
* as the destination. Overflows can occur when the destination is
* narrower than the source.
*
- * Ux: Generic conversion for the `Us', `Uu' & `us' cases
- * Overflow occurs when the source magnitude is too large for the
- * destination.
+ * Ux: Generic conversion for the `Us', `Uu' & `us' cases
+ * Overflow occurs when the source magnitude is too large for the
+ * destination.
*
*/
-#define H5T_CONV_xX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
- *(D) = (DT)(*(S)); \
+#define H5T_CONV_xX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_xX_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
- *(D) = (DT)(*(S)); \
+#define H5T_CONV_xX_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+ *(D) = (DT)(*(S)); \
}
/* Added a condition branch(else if (*(S) == (DT)(D_MAX))) which seems redundant.
@@ -184,13 +184,13 @@
* equal. In this case, do not return exception but make sure the maximum is assigned
* to the destination. SLU - 2005/06/29
*/
-#define H5T_CONV_Xx_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Xx_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if (*(S) > (ST)(D_MAX)) { \
H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, \
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (DT)(D_MAX); \
+ *(D) = (DT)(D_MAX); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
@@ -199,69 +199,69 @@
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (DT)(D_MIN); \
+ *(D) = (DT)(D_MIN); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
- } else \
- *(D) = (DT)(*(S)); \
+ } else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_Xx_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Xx_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if (*(S) > (ST)(D_MAX)) { \
- *(D) = (DT)(D_MAX); \
+ *(D) = (DT)(D_MAX); \
} else if (*(S) < (ST)(D_MIN)) { \
- *(D) = (DT)(D_MIN); \
- } else \
- *(D) = (DT)(*(S)); \
+ *(D) = (DT)(D_MIN); \
+ } else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_Ux_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Ux_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if (*(S) > (ST)(D_MAX)) { \
H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, \
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (DT)(D_MAX); \
+ *(D) = (DT)(D_MAX); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
- } else \
- *(D) = (DT)(*(S)); \
+ } else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_Ux_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Ux_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if (*(S) > (ST)(D_MAX)) { \
- *(D) = (DT)(D_MAX); \
- } else \
- *(D) = (DT)(*(S)); \
+ *(D) = (DT)(D_MAX); \
+ } else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_sS(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)<=sizeof(DT)); \
+#define H5T_CONV_sS(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)<=sizeof(DT)); \
H5T_CONV(H5T_CONV_xX, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
-#define H5T_CONV_sU_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_sU_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if (*(S) < 0) { \
H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_LOW, \
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = 0; \
+ *(D) = 0; \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
- } else \
- *(D) = (DT)(*(S)); \
+ } else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_sU_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_sU_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if(*(S) < 0) \
- *(D) = 0; \
- else \
- *(D) = (DT)(*(S)); \
+ *(D) = 0; \
+ else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_sU(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)<=sizeof(DT)); \
+#define H5T_CONV_sU(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)<=sizeof(DT)); \
H5T_CONV(H5T_CONV_sU, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
@@ -349,23 +349,23 @@
H5T_CONV(H5T_CONV_uS, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
-#define H5T_CONV_uU(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)<=sizeof(DT)); \
+#define H5T_CONV_uU(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)<=sizeof(DT)); \
H5T_CONV(H5T_CONV_xX, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
-#define H5T_CONV_Ss(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
+#define H5T_CONV_Ss(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
H5T_CONV(H5T_CONV_Xx, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
-#define H5T_CONV_Su_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Su_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if(*(S) < 0) { \
H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_LOW, \
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = 0; \
+ *(D) = 0; \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
@@ -374,106 +374,106 @@
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (DT)(D_MAX); \
+ *(D) = (DT)(D_MAX); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
- } else \
- *(D) = (DT)(*(S)); \
+ } else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_Su_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Su_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if(*(S) < 0) \
- *(D) = 0; \
+ *(D) = 0; \
else if (sizeof(ST)>sizeof(DT) && *(S) > (ST)(D_MAX)) \
- *(D) = (DT)(D_MAX); \
- else \
- *(D) = (DT)(*(S)); \
+ *(D) = (DT)(D_MAX); \
+ else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_Su(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
+#define H5T_CONV_Su(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
H5T_CONV(H5T_CONV_Su, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
-#define H5T_CONV_Us(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
+#define H5T_CONV_Us(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
H5T_CONV(H5T_CONV_Ux, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
-#define H5T_CONV_Uu(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
+#define H5T_CONV_Uu(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
H5T_CONV(H5T_CONV_Ux, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
-#define H5T_CONV_su_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
- /* Assumes memory format of unsigned & signed integers is same */ \
+#define H5T_CONV_su_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+ /* Assumes memory format of unsigned & signed integers is same */ \
if(*(S) < 0) { \
H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_LOW, \
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = 0; \
+ *(D) = 0; \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
- } else \
- *(D) = (DT)(*(S)); \
+ } else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_su_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
- /* Assumes memory format of unsigned & signed integers is same */ \
+#define H5T_CONV_su_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+ /* Assumes memory format of unsigned & signed integers is same */ \
if(*(S) < 0) \
- *(D) = 0; \
- else \
- *(D) = (DT)(*(S)); \
+ *(D) = 0; \
+ else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_su(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)==sizeof(DT)); \
+#define H5T_CONV_su(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)==sizeof(DT)); \
H5T_CONV(H5T_CONV_su, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
-#define H5T_CONV_us_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
- /* Assumes memory format of unsigned & signed integers is same */ \
+#define H5T_CONV_us_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+ /* Assumes memory format of unsigned & signed integers is same */ \
if (*(S) > (ST)(D_MAX)) { \
H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, \
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (DT)(D_MAX); \
+ *(D) = (DT)(D_MAX); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
- } else \
- *(D) = (DT)(*(S)); \
+ } else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_us_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
- /* Assumes memory format of unsigned & signed integers is same */ \
+#define H5T_CONV_us_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+ /* Assumes memory format of unsigned & signed integers is same */ \
if(*(S) > (ST)(D_MAX)) \
- *(D) = (DT)(D_MAX); \
- else \
- *(D) = (DT)(*(S)); \
+ *(D) = (DT)(D_MAX); \
+ else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_us(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)==sizeof(DT)); \
+#define H5T_CONV_us(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)==sizeof(DT)); \
H5T_CONV(H5T_CONV_us, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
-#define H5T_CONV_fF(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)<=sizeof(DT)); \
+#define H5T_CONV_fF(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)<=sizeof(DT)); \
H5T_CONV(H5T_CONV_xX, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
/* Same as H5T_CONV_Xx_CORE, except that instead of using D_MAX and D_MIN
* when an overflow occurs, use the 'float' infinity values.
*/
-#define H5T_CONV_Ff_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Ff_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if(*(S) > (ST)(D_MAX)) { \
H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, \
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (H5T_NATIVE_FLOAT_POS_INF_g); \
+ *(D) = (H5T_NATIVE_FLOAT_POS_INF_g); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
@@ -482,24 +482,24 @@
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (H5T_NATIVE_FLOAT_NEG_INF_g); \
+ *(D) = (H5T_NATIVE_FLOAT_NEG_INF_g); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
- } else \
- *(D) = (DT)(*(S)); \
+ } else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_Ff_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Ff_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if(*(S) > (ST)(D_MAX)) \
- *(D) = (H5T_NATIVE_FLOAT_POS_INF_g); \
+ *(D) = (H5T_NATIVE_FLOAT_POS_INF_g); \
else if (*(S) < (ST)(D_MIN)) \
- *(D) = (H5T_NATIVE_FLOAT_NEG_INF_g); \
- else \
- *(D) = (DT)(*(S)); \
+ *(D) = (H5T_NATIVE_FLOAT_NEG_INF_g); \
+ else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_Ff(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
+#define H5T_CONV_Ff(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
H5T_CONV(H5T_CONV_Ff, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
@@ -562,35 +562,35 @@
LO = count; \
}
-#define H5T_CONV_xF_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
- if (sprec > dprec) { \
+#define H5T_CONV_xF_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+ if (sprec > dprec) { \
unsigned low_bit_pos, high_bit_pos; \
\
/* Detect high & low bits set in source */ \
H5T_HI_LO_BIT_SET(ST, *(S), low_bit_pos, high_bit_pos) \
\
/* Check for more bits of precision in src than available in dst */ \
- if((high_bit_pos - low_bit_pos) >= dprec) { \
+ if((high_bit_pos - low_bit_pos) >= dprec) { \
H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_PRECISION, \
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (DT)(*(S)); \
+ *(D) = (DT)(*(S)); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
- } \
+ } \
else \
- *(D) = (DT)(*(S)); \
- } \
+ *(D) = (DT)(*(S)); \
+ } \
else \
- *(D) = (DT)(*(S)); \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_xF_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
- *(D) = (DT)(*(S)); \
+#define H5T_CONV_xF_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_xF(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_xF(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
H5T_CONV(H5T_CONV_xF, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, Y) \
}
@@ -602,13 +602,13 @@
* (ST)(D_MAX))) is for some compilers like Sun, HP, IBM, and SGI where under
* the same situation the "int" doesn't overflow. SLU - 2005/9/12
*/
-#define H5T_CONV_Fx_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Fx_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if(*(S) > (ST)(D_MAX) || (sprec < dprec && *(S) == (ST)(D_MAX))) { \
H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, \
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (DT)(D_MAX); \
+ *(D) = (DT)(D_MAX); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
@@ -617,7 +617,7 @@
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (DT)(D_MIN); \
+ *(D) = (DT)(D_MIN); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
@@ -626,24 +626,24 @@
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (DT)(*(S)); \
+ *(D) = (DT)(*(S)); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
- } \
+ } \
else \
- *(D) = (DT)(*(S)); \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_Fx_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Fx_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if(*(S) > (ST)(D_MAX)) \
- *(D) = (DT)(D_MAX); \
+ *(D) = (DT)(D_MAX); \
else if(*(S) < (ST)(D_MIN)) \
- *(D) = (DT)(D_MIN); \
+ *(D) = (DT)(D_MIN); \
else \
- *(D) = (DT)(*(S)); \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_Fx(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Fx(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
H5T_CONV(H5T_CONV_Fx, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, Y) \
}
@@ -652,146 +652,146 @@
* to do them all.
*/
#ifndef H5_WANT_DCONV_EXCEPTION
-#define H5T_CONV_NO_EXCEPT_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
- *(D) = (DT)(*(S)); \
+#define H5T_CONV_NO_EXCEPT_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+ *(D) = (DT)(*(S)); \
}
#endif /* H5_WANT_DCONV_EXCEPTION */
/* The main part of every integer hardware conversion macro */
-#define H5T_CONV(GUTS,STYPE,DTYPE,ST,DT,D_MIN,D_MAX,PREC) \
+#define H5T_CONV(GUTS,STYPE,DTYPE,ST,DT,D_MIN,D_MAX,PREC) \
{ \
herr_t ret_value=SUCCEED; /* Return value */ \
\
FUNC_ENTER_PACKAGE \
\
{ \
- size_t elmtno; /*element number */ \
+ size_t elmtno; /*element number */ \
H5T_CONV_DECL_PREC(PREC) /*declare precision variables, or not */ \
- uint8_t *src_buf; /*'raw' source buffer */ \
- uint8_t *dst_buf; /*'raw' destination buffer */ \
- ST *src, *s; /*source buffer */ \
- DT *dst, *d; /*destination buffer */ \
- H5T_t *st, *dt; /*datatype descriptors */ \
- ST src_aligned; /*source aligned type */ \
- DT dst_aligned; /*destination aligned type */ \
- hbool_t s_mv, d_mv; /*move data to align it? */ \
- ssize_t s_stride, d_stride; /*src and dst strides */ \
+ uint8_t *src_buf; /*'raw' source buffer */ \
+ uint8_t *dst_buf; /*'raw' destination buffer */ \
+ ST *src, *s; /*source buffer */ \
+ DT *dst, *d; /*destination buffer */ \
+ H5T_t *st, *dt; /*datatype descriptors */ \
+ ST src_aligned; /*source aligned type */ \
+ DT dst_aligned; /*destination aligned type */ \
+ hbool_t s_mv, d_mv; /*move data to align it? */ \
+ ssize_t s_stride, d_stride; /*src and dst strides */ \
size_t safe; /*how many elements are safe to process in each pass */ \
H5T_conv_cb_t cb_struct; /*conversion callback structure */ \
\
- switch (cdata->command) { \
- case H5T_CONV_INIT: \
- /* Sanity check and initialize statistics */ \
- cdata->need_bkg = H5T_BKG_NO; \
+ switch (cdata->command) { \
+ case H5T_CONV_INIT: \
+ /* Sanity check and initialize statistics */ \
+ cdata->need_bkg = H5T_BKG_NO; \
if (NULL==(st=(H5T_t*)H5I_object(src_id)) || NULL==(dt=(H5T_t*)H5I_object(dst_id))) \
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, \
- "unable to dereference datatype object ID") \
- if (st->shared->size!=sizeof(ST) || dt->shared->size!=sizeof(DT)) \
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, \
- "disagreement about datatype size") \
- CI_ALLOC_PRIV \
- break; \
- \
- case H5T_CONV_FREE: \
- /* Print and free statistics */ \
- CI_PRINT_STATS(STYPE,DTYPE); \
- CI_FREE_PRIV \
- break; \
- \
- case H5T_CONV_CONV: \
- /* Initialize source & destination strides */ \
- if (buf_stride) { \
- HDassert(buf_stride >= sizeof(ST)); \
- HDassert(buf_stride >= sizeof(DT)); \
- s_stride = d_stride = (ssize_t)buf_stride; \
- } else { \
- s_stride = sizeof(ST); \
- d_stride = sizeof(DT); \
- } \
- \
- /* Is alignment required for source or dest? */ \
- s_mv = H5T_NATIVE_##STYPE##_ALIGN_g>1 && \
- ((size_t)buf%H5T_NATIVE_##STYPE##_ALIGN_g || \
- /* Cray */ ((size_t)((ST*)buf)!=(size_t)buf) || \
- (size_t)s_stride%H5T_NATIVE_##STYPE##_ALIGN_g); \
- d_mv = H5T_NATIVE_##DTYPE##_ALIGN_g>1 && \
- ((size_t)buf%H5T_NATIVE_##DTYPE##_ALIGN_g || \
- /* Cray */ ((size_t)((DT*)buf)!=(size_t)buf) || \
- (size_t)d_stride%H5T_NATIVE_##DTYPE##_ALIGN_g); \
- CI_INC_SRC(s_mv) \
- CI_INC_DST(d_mv) \
- \
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, \
+ "unable to dereference datatype object ID") \
+ if (st->shared->size!=sizeof(ST) || dt->shared->size!=sizeof(DT)) \
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, \
+ "disagreement about datatype size") \
+ CI_ALLOC_PRIV \
+ break; \
+ \
+ case H5T_CONV_FREE: \
+ /* Print and free statistics */ \
+ CI_PRINT_STATS(STYPE,DTYPE); \
+ CI_FREE_PRIV \
+ break; \
+ \
+ case H5T_CONV_CONV: \
+ /* Initialize source & destination strides */ \
+ if (buf_stride) { \
+ HDassert(buf_stride >= sizeof(ST)); \
+ HDassert(buf_stride >= sizeof(DT)); \
+ s_stride = d_stride = (ssize_t)buf_stride; \
+ } else { \
+ s_stride = sizeof(ST); \
+ d_stride = sizeof(DT); \
+ } \
+ \
+ /* Is alignment required for source or dest? */ \
+ s_mv = H5T_NATIVE_##STYPE##_ALIGN_g>1 && \
+ ((size_t)buf%H5T_NATIVE_##STYPE##_ALIGN_g || \
+ /* Cray */ ((size_t)((ST*)buf)!=(size_t)buf) || \
+ (size_t)s_stride%H5T_NATIVE_##STYPE##_ALIGN_g); \
+ d_mv = H5T_NATIVE_##DTYPE##_ALIGN_g>1 && \
+ ((size_t)buf%H5T_NATIVE_##DTYPE##_ALIGN_g || \
+ /* Cray */ ((size_t)((DT*)buf)!=(size_t)buf) || \
+ (size_t)d_stride%H5T_NATIVE_##DTYPE##_ALIGN_g); \
+ CI_INC_SRC(s_mv) \
+ CI_INC_DST(d_mv) \
+ \
/* Get conversion exception callback property */ \
if(H5CX_get_dt_conv_cb(&cb_struct) < 0) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to get conversion exception callback") \
\
- /* Get source and destination datatypes */ \
+ /* Get source and destination datatypes */ \
if(NULL == (st = (H5T_t *)H5I_object(src_id)) || NULL == (dt = (H5T_t *)H5I_object(dst_id))) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to dereference datatype object ID") \
- \
+ \
H5T_CONV_SET_PREC(PREC) /*init precision variables, or not */ \
\
/* The outer loop of the type conversion macro, controlling which */ \
- /* direction the buffer is walked */ \
- while (nelmts>0) { \
- /* Check if we need to go backwards through the buffer */ \
- if(d_stride>s_stride) { \
+ /* direction the buffer is walked */ \
+ while (nelmts>0) { \
+ /* Check if we need to go backwards through the buffer */ \
+ if(d_stride>s_stride) { \
/* Compute the number of "safe" destination elements at */ \
/* the end of the buffer (Those which don't overlap with */ \
/* any source elements at the beginning of the buffer) */ \
safe = nelmts - (((nelmts * (size_t)s_stride) + (size_t)(d_stride - 1)) / (size_t)d_stride); \
- \
+ \
/* If we're down to the last few elements, just wrap up */ \
- /* with a "real" reverse copy */ \
- if(safe<2) { \
+ /* with a "real" reverse copy */ \
+ if(safe<2) { \
src = (ST *)(src_buf = (uint8_t *)buf + (nelmts - 1) * (size_t)s_stride); \
dst = (DT *)(dst_buf = (uint8_t *)buf + (nelmts - 1) * (size_t)d_stride); \
- s_stride = -s_stride; \
- d_stride = -d_stride; \
- \
- safe=nelmts; \
- } /* end if */ \
- else { \
+ s_stride = -s_stride; \
+ d_stride = -d_stride; \
+ \
+ safe=nelmts; \
+ } /* end if */ \
+ else { \
src = (ST *)(src_buf = (uint8_t *)buf + (nelmts - safe) * (size_t)s_stride); \
dst = (DT *)(dst_buf = (uint8_t *)buf + (nelmts - safe) * (size_t)d_stride); \
- } /* end else */ \
- } /* end if */ \
- else { \
- /* Single forward pass over all data */ \
- src = (ST *)(src_buf = (uint8_t*)buf); \
- dst = (DT *)(dst_buf = (uint8_t*)buf); \
- safe=nelmts; \
- } /* end else */ \
+ } /* end else */ \
+ } /* end if */ \
+ else { \
+ /* Single forward pass over all data */ \
+ src = (ST *)(src_buf = (uint8_t*)buf); \
+ dst = (DT *)(dst_buf = (uint8_t*)buf); \
+ safe=nelmts; \
+ } /* end else */ \
\
- /* Perform loop over elements to convert */ \
- if (s_mv && d_mv) { \
- /* Alignment is required for both source and dest */ \
- s = &src_aligned; \
+ /* Perform loop over elements to convert */ \
+ if (s_mv && d_mv) { \
+ /* Alignment is required for both source and dest */ \
+ s = &src_aligned; \
H5T_CONV_LOOP_OUTER(PRE_SALIGN,PRE_DALIGN,POST_SALIGN,POST_DALIGN,GUTS,STYPE,DTYPE,s,d,ST,DT,D_MIN,D_MAX) \
- } else if(s_mv) { \
- /* Alignment is required only for source */ \
- s = &src_aligned; \
+ } else if(s_mv) { \
+ /* Alignment is required only for source */ \
+ s = &src_aligned; \
H5T_CONV_LOOP_OUTER(PRE_SALIGN,PRE_DNOALIGN,POST_SALIGN,POST_DNOALIGN,GUTS,STYPE,DTYPE,s,dst,ST,DT,D_MIN,D_MAX) \
- } else if(d_mv) { \
- /* Alignment is required only for destination */ \
+ } else if(d_mv) { \
+ /* Alignment is required only for destination */ \
H5T_CONV_LOOP_OUTER(PRE_SNOALIGN,PRE_DALIGN,POST_SNOALIGN,POST_DALIGN,GUTS,STYPE,DTYPE,src,d,ST,DT,D_MIN,D_MAX) \
- } else { \
+ } else { \
/* Alignment is not required for both source and destination */ \
H5T_CONV_LOOP_OUTER(PRE_SNOALIGN,PRE_DNOALIGN,POST_SNOALIGN,POST_DNOALIGN,GUTS,STYPE,DTYPE,src,dst,ST,DT,D_MIN,D_MAX) \
- } \
- \
- /* Decrement number of elements left to convert */ \
- nelmts-=safe; \
- } /* end while */ \
- break; \
- \
- default: \
- HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, \
- "unknown conversion command"); \
- } \
+ } \
+ \
+ /* Decrement number of elements left to convert */ \
+ nelmts-=safe; \
+ } /* end while */ \
+ break; \
+ \
+ default: \
+ HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, \
+ "unknown conversion command"); \
+ } \
} \
- \
+ \
done: \
FUNC_LEAVE_NOAPI(ret_value) \
}
@@ -800,9 +800,9 @@ done: \
#define H5T_CONV_DECL_PREC(PREC) H5_GLUE(H5T_CONV_DECL_PREC_, PREC)
#define H5T_CONV_DECL_PREC_Y \
- size_t sprec; /*source precision */ \
- size_t dprec; /*destination precision */ \
- H5T_class_t tclass; /*datatype's class */
+ size_t sprec; /*source precision */ \
+ size_t dprec; /*destination precision */ \
+ H5T_class_t tclass; /*datatype's class */
#define H5T_CONV_DECL_PREC_N /*no precision variables */
@@ -810,60 +810,60 @@ done: \
#define H5T_CONV_SET_PREC(PREC) H5_GLUE(H5T_CONV_SET_PREC_, PREC)
#define H5T_CONV_SET_PREC_Y \
- /* Get source & destination precisions into a variable */ \
- tclass = st->shared->type; \
- HDassert(tclass == H5T_INTEGER || tclass == H5T_FLOAT); \
- if(tclass == H5T_INTEGER) \
- sprec = st->shared->u.atomic.prec; \
- else \
- sprec = 1 + st->shared->u.atomic.u.f.msize; \
- tclass = dt->shared->type; \
- HDassert(tclass == H5T_INTEGER || tclass == H5T_FLOAT); \
- if(tclass == H5T_INTEGER) \
- dprec = dt->shared->u.atomic.prec; \
- else \
+ /* Get source & destination precisions into a variable */ \
+ tclass = st->shared->type; \
+ HDassert(tclass == H5T_INTEGER || tclass == H5T_FLOAT); \
+ if(tclass == H5T_INTEGER) \
+ sprec = st->shared->u.atomic.prec; \
+ else \
+ sprec = 1 + st->shared->u.atomic.u.f.msize; \
+ tclass = dt->shared->type; \
+ HDassert(tclass == H5T_INTEGER || tclass == H5T_FLOAT); \
+ if(tclass == H5T_INTEGER) \
+ dprec = dt->shared->u.atomic.prec; \
+ else \
dprec = 1 + dt->shared->u.atomic.u.f.msize;
#define H5T_CONV_SET_PREC_N /*don't init precision variables */
/* Macro defining action on source data which needs to be aligned (before main action) */
-#define H5T_CONV_LOOP_PRE_SALIGN(ST) { \
- HDmemcpy(&src_aligned, src, sizeof(ST)); \
+#define H5T_CONV_LOOP_PRE_SALIGN(ST) { \
+ HDmemcpy(&src_aligned, src, sizeof(ST)); \
}
/* Macro defining action on source data which doesn't need to be aligned (before main action) */
-#define H5T_CONV_LOOP_PRE_SNOALIGN(ST) { \
+#define H5T_CONV_LOOP_PRE_SNOALIGN(ST) { \
}
/* Macro defining action on destination data which needs to be aligned (before main action) */
-#define H5T_CONV_LOOP_PRE_DALIGN(DT) { \
- d = &dst_aligned; \
+#define H5T_CONV_LOOP_PRE_DALIGN(DT) { \
+ d = &dst_aligned; \
}
/* Macro defining action on destination data which doesn't need to be aligned (before main action) */
-#define H5T_CONV_LOOP_PRE_DNOALIGN(DT) { \
+#define H5T_CONV_LOOP_PRE_DNOALIGN(DT) { \
}
/* Macro defining action on source data which needs to be aligned (after main action) */
-#define H5T_CONV_LOOP_POST_SALIGN(ST) { \
+#define H5T_CONV_LOOP_POST_SALIGN(ST) { \
}
/* Macro defining action on source data which doesn't need to be aligned (after main action) */
-#define H5T_CONV_LOOP_POST_SNOALIGN(ST) { \
+#define H5T_CONV_LOOP_POST_SNOALIGN(ST) { \
}
/* Macro defining action on destination data which needs to be aligned (after main action) */
-#define H5T_CONV_LOOP_POST_DALIGN(DT) { \
- HDmemcpy(dst, &dst_aligned, sizeof(DT)); \
+#define H5T_CONV_LOOP_POST_DALIGN(DT) { \
+ HDmemcpy(dst, &dst_aligned, sizeof(DT)); \
}
/* Macro defining action on destination data which doesn't need to be aligned (after main action) */
-#define H5T_CONV_LOOP_POST_DNOALIGN(DT) { \
+#define H5T_CONV_LOOP_POST_DNOALIGN(DT) { \
}
/* The outer wrapper for the type conversion loop, to check for an exception handling routine */
#define H5T_CONV_LOOP_OUTER(PRE_SALIGN_GUTS,PRE_DALIGN_GUTS,POST_SALIGN_GUTS,POST_DALIGN_GUTS,GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \
- if(cb_struct.func) { \
+ if(cb_struct.func) { \
H5T_CONV_LOOP(PRE_SALIGN_GUTS,PRE_DALIGN_GUTS,POST_SALIGN_GUTS,POST_DALIGN_GUTS,GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \
} \
else { \
@@ -872,36 +872,36 @@ done: \
/* The inner loop of the type conversion macro, actually converting the elements */
#define H5T_CONV_LOOP(PRE_SALIGN_GUTS,PRE_DALIGN_GUTS,POST_SALIGN_GUTS,POST_DALIGN_GUTS,GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \
- for (elmtno=0; elmtno<safe; elmtno++) { \
- /* Handle source pre-alignment */ \
- H5_GLUE(H5T_CONV_LOOP_,PRE_SALIGN_GUTS)(ST) \
+ for (elmtno=0; elmtno<safe; elmtno++) { \
+ /* Handle source pre-alignment */ \
+ H5_GLUE(H5T_CONV_LOOP_,PRE_SALIGN_GUTS)(ST) \
\
- /* Handle destination pre-alignment */ \
- H5_GLUE(H5T_CONV_LOOP_,PRE_DALIGN_GUTS)(DT) \
+ /* Handle destination pre-alignment */ \
+ H5_GLUE(H5T_CONV_LOOP_,PRE_DALIGN_GUTS)(DT) \
\
- /* ... user-defined stuff here -- the conversion ... */ \
- H5T_CONV_LOOP_GUTS(GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \
+ /* ... user-defined stuff here -- the conversion ... */ \
+ H5T_CONV_LOOP_GUTS(GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \
\
- /* Handle source post-alignment */ \
- H5_GLUE(H5T_CONV_LOOP_,POST_SALIGN_GUTS)(ST) \
+ /* Handle source post-alignment */ \
+ H5_GLUE(H5T_CONV_LOOP_,POST_SALIGN_GUTS)(ST) \
\
- /* Handle destination post-alignment */ \
- H5_GLUE(H5T_CONV_LOOP_,POST_DALIGN_GUTS)(DT) \
+ /* Handle destination post-alignment */ \
+ H5_GLUE(H5T_CONV_LOOP_,POST_DALIGN_GUTS)(DT) \
\
- /* Advance pointers */ \
- src_buf += s_stride; \
- src = (ST *)src_buf; \
- dst_buf += d_stride; \
- dst = (DT *)dst_buf; \
+ /* Advance pointers */ \
+ src_buf += s_stride; \
+ src = (ST *)src_buf; \
+ dst_buf += d_stride; \
+ dst = (DT *)dst_buf; \
}
/* Macro to call the actual "guts" of the type conversion, or call the "no exception" guts */
#ifdef H5_WANT_DCONV_EXCEPTION
-#define H5T_CONV_LOOP_GUTS(GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \
- /* ... user-defined stuff here -- the conversion ... */ \
+#define H5T_CONV_LOOP_GUTS(GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \
+ /* ... user-defined stuff here -- the conversion ... */ \
H5_GLUE(GUTS,_CORE)(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX)
#else /* H5_WANT_DCONV_EXCEPTION */
-#define H5T_CONV_LOOP_GUTS(GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \
+#define H5T_CONV_LOOP_GUTS(GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \
H5_GLUE(H5T_CONV_NO_EXCEPT,_CORE)(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX)
#endif /* H5_WANT_DCONV_EXCEPTION */
@@ -909,27 +909,27 @@ done: \
#ifdef H5T_DEBUG
/* Print alignment statistics */
-# define CI_PRINT_STATS(STYPE,DTYPE) { \
- if (H5DEBUG(T) && ((H5T_conv_hw_t *)cdata->priv)->s_aligned) { \
- HDfprintf(H5DEBUG(T), \
- " %Hu src elements aligned on %lu-byte boundaries\n", \
- ((H5T_conv_hw_t *)cdata->priv)->s_aligned, \
- (unsigned long)H5T_NATIVE_##STYPE##_ALIGN_g); \
- } \
- if (H5DEBUG(T) && ((H5T_conv_hw_t *)cdata->priv)->d_aligned) { \
- HDfprintf(H5DEBUG(T), \
- " %Hu dst elements aligned on %lu-byte boundaries\n", \
- ((H5T_conv_hw_t *)cdata->priv)->d_aligned, \
- (unsigned long)H5T_NATIVE_##DTYPE##_ALIGN_g); \
- } \
+# define CI_PRINT_STATS(STYPE,DTYPE) { \
+ if (H5DEBUG(T) && ((H5T_conv_hw_t *)cdata->priv)->s_aligned) { \
+ HDfprintf(H5DEBUG(T), \
+ " %Hu src elements aligned on %lu-byte boundaries\n", \
+ ((H5T_conv_hw_t *)cdata->priv)->s_aligned, \
+ (unsigned long)H5T_NATIVE_##STYPE##_ALIGN_g); \
+ } \
+ if (H5DEBUG(T) && ((H5T_conv_hw_t *)cdata->priv)->d_aligned) { \
+ HDfprintf(H5DEBUG(T), \
+ " %Hu dst elements aligned on %lu-byte boundaries\n", \
+ ((H5T_conv_hw_t *)cdata->priv)->d_aligned, \
+ (unsigned long)H5T_NATIVE_##DTYPE##_ALIGN_g); \
+ } \
}
/* Allocate private alignment structure for atomic types */
# define CI_ALLOC_PRIV \
- if (NULL==(cdata->priv=H5MM_calloc(sizeof(H5T_conv_hw_t)))) { \
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, \
- "memory allocation failed"); \
- }
+ if (NULL==(cdata->priv=H5MM_calloc(sizeof(H5T_conv_hw_t)))) { \
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, \
+ "memory allocation failed"); \
+ }
/* Free private alignment structure for atomic types */
# define CI_FREE_PRIV \
@@ -961,25 +961,25 @@ done: \
/* Conversion data for H5T__conv_struct() */
typedef struct H5T_conv_struct_t {
- int *src2dst; /*mapping from src to dst member num */
- hid_t *src_memb_id; /*source member type ID's */
- hid_t *dst_memb_id; /*destination member type ID's */
- H5T_path_t **memb_path; /*conversion path for each member */
+ int *src2dst; /*mapping from src to dst member num */
+ hid_t *src_memb_id; /*source member type ID's */
+ hid_t *dst_memb_id; /*destination member type ID's */
+ H5T_path_t **memb_path; /*conversion path for each member */
H5T_subset_info_t subset_info; /*info related to compound subsets */
unsigned src_nmembs; /*needed by free function */
} H5T_conv_struct_t;
/* Conversion data for H5T__conv_enum() */
typedef struct H5T_enum_struct_t {
- int base; /*lowest `in' value */
- unsigned length; /*num elements in arrays */
- int *src2dst; /*map from src to dst index */
+ int base; /*lowest `in' value */
+ unsigned length; /*num elements in arrays */
+ int *src2dst; /*map from src to dst index */
} H5T_enum_struct_t;
/* Conversion data for the hardware conversion functions */
typedef struct H5T_conv_hw_t {
- size_t s_aligned; /*number source elements aligned */
- size_t d_aligned; /*number destination elements aligned*/
+ size_t s_aligned; /*number source elements aligned */
+ size_t d_aligned; /*number destination elements aligned*/
} H5T_conv_hw_t;
/********************/
@@ -993,7 +993,7 @@ typedef struct H5T_conv_hw_t {
static herr_t H5T_reverse_order(uint8_t *rev, uint8_t *s, size_t size, H5T_order_t order);
-
+
/*********************/
/* Public Variables */
/*********************/
@@ -1019,17 +1019,17 @@ H5FL_BLK_DEFINE_STATIC(vlen_seq);
/* Declare a free list to manage pieces of array data */
H5FL_BLK_DEFINE_STATIC(array_seq);
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_noop
+ * Function: H5T__conv_noop
*
- * Purpose: The no-op conversion. The library knows about this
- * conversion without it being registered.
+ * Purpose: The no-op conversion. The library knows about this
+ * conversion without it being registered.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Wednesday, January 14, 1998
+ * Programmer: Robb Matzke
+ * Wednesday, January 14, 1998
*
*-------------------------------------------------------------------------
*/
@@ -1063,20 +1063,20 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_noop() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_order_opt
+ * Function: H5T__conv_order_opt
*
- * Purpose: Convert one type to another when byte order is the only
- * difference. This is the optimized version of H5T__conv_order()
+ * Purpose: Convert one type to another when byte order is the only
+ * difference. This is the optimized version of H5T__conv_order()
* for a handful of different sizes.
*
- * Note: This is a soft conversion function.
+ * Note: This is a soft conversion function.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Friday, January 25, 2002
+ * Programmer: Robb Matzke
+ * Friday, January 25, 2002
*
*-------------------------------------------------------------------------
*/
@@ -1086,9 +1086,9 @@ H5T__conv_order_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t H5_ATTR_UNUSED bkg_stride, void *_buf,
void H5_ATTR_UNUSED *background)
{
- uint8_t *buf = (uint8_t*)_buf;
- H5T_t *src = NULL;
- H5T_t *dst = NULL;
+ uint8_t *buf = (uint8_t*)_buf;
+ H5T_t *src = NULL;
+ H5T_t *dst = NULL;
size_t i;
herr_t ret_value = SUCCEED; /* Return value */
@@ -1478,30 +1478,30 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5T__conv_order
+ * Function: H5T__conv_order
*
- * Purpose: Convert one type to another when byte order is the only
- * difference.
+ * Purpose: Convert one type to another when byte order is the only
+ * difference.
*
- * Note: This is a soft conversion function.
+ * Note: This is a soft conversion function.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Tuesday, January 13, 1998
+ * Programmer: Robb Matzke
+ * Tuesday, January 13, 1998
*
*-------------------------------------------------------------------------
*/
herr_t
H5T__conv_order(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
- size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf,
+ size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf,
void H5_ATTR_UNUSED *background)
{
- uint8_t *buf = (uint8_t*)_buf;
- H5T_t *src = NULL;
- H5T_t *dst = NULL;
- size_t i;
- size_t j, md;
+ uint8_t *buf = (uint8_t*)_buf;
+ H5T_t *src = NULL;
+ H5T_t *dst = NULL;
+ size_t i;
+ size_t j, md;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1578,34 +1578,34 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_order() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_b_b
+ * Function: H5T__conv_b_b
*
- * Purpose: Convert from one bitfield to any other bitfield.
+ * Purpose: Convert from one bitfield to any other bitfield.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Thursday, May 20, 1999
+ * Programmer: Robb Matzke
+ * Thursday, May 20, 1999
*
*-------------------------------------------------------------------------
*/
herr_t
H5T__conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
- size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf,
+ size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf,
void H5_ATTR_UNUSED *background)
{
- uint8_t *buf = (uint8_t*)_buf;
- H5T_t *src = NULL, *dst = NULL; /*source and dest datatypes */
- ssize_t direction; /*direction of traversal */
- size_t elmtno; /*element number */
- size_t olap; /*num overlapping elements */
- size_t half_size; /*1/2 of total size for swapping*/
- uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
- uint8_t dbuf[256]; /*temp destination buffer */
- size_t msb_pad_offset; /*offset for dest MSB padding */
- size_t i;
+ uint8_t *buf = (uint8_t*)_buf;
+ H5T_t *src = NULL, *dst = NULL; /*source and dest datatypes */
+ ssize_t direction; /*direction of traversal */
+ size_t elmtno; /*element number */
+ size_t olap; /*num overlapping elements */
+ size_t half_size; /*1/2 of total size for swapping*/
+ uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
+ uint8_t dbuf[256]; /*temp destination buffer */
+ size_t msb_pad_offset; /*offset for dest MSB padding */
+ size_t i;
uint8_t *src_rev=NULL; /*order-reversed source buffer */
H5T_conv_cb_t cb_struct = {NULL, NULL}; /*conversion callback structure */
H5T_conv_ret_t except_ret; /*return of callback function */
@@ -1820,17 +1820,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_b_b() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T_conv_struct_free
+ * Function: H5T_conv_struct_free
*
- * Purpose: Free the private data structure used by the compound
+ * Purpose: Free the private data structure used by the compound
* conversion functions.
*
- * Return: The result of H5MM_xfree(priv) (NULL)
+ * Return: The result of H5MM_xfree(priv) (NULL)
*
- * Programmer: Neil Fortner
- * Wednesday, October 1, 2008
+ * Programmer: Neil Fortner
+ * Wednesday, October 1, 2008
*
*-------------------------------------------------------------------------
*/
@@ -1862,24 +1862,24 @@ H5T_conv_struct_free(H5T_conv_struct_t *priv)
FUNC_LEAVE_NOAPI((H5T_conv_struct_t *)H5MM_xfree(priv))
} /* end H5T_conv_struct_free() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T_conv_struct_init
+ * Function: H5T_conv_struct_init
*
- * Purpose: Initialize the `priv' field of `cdata' with conversion
- * information that is relatively constant. If `priv' is
- * already initialized then the member conversion functions
- * are recalculated.
+ * Purpose: Initialize the `priv' field of `cdata' with conversion
+ * information that is relatively constant. If `priv' is
+ * already initialized then the member conversion functions
+ * are recalculated.
*
- * Priv fields are indexed by source member number or
- * destination member number depending on whether the field
- * contains information about the source datatype or the
- * destination datatype (fields that contains the same
- * information for both source and destination are indexed by
- * source member number). The src2dst[] priv array maps source
- * member numbers to destination member numbers, but if the
- * source member doesn't have a corresponding destination member
- * then the src2dst[i]=-1.
+ * Priv fields are indexed by source member number or
+ * destination member number depending on whether the field
+ * contains information about the source datatype or the
+ * destination datatype (fields that contains the same
+ * information for both source and destination are indexed by
+ * source member number). The src2dst[] priv array maps source
+ * member numbers to destination member numbers, but if the
+ * source member doesn't have a corresponding destination member
+ * then the src2dst[i]=-1.
*
* Special optimization case when the source and destination
* members are a subset of each other, and the order is the same,
@@ -1902,20 +1902,20 @@ H5T_conv_struct_free(H5T_conv_struct_t *priv)
* The optimization is simply moving data to the appropriate
* places in the buffer.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Monday, January 26, 1998
+ * Programmer: Robb Matzke
+ * Monday, January 26, 1998
*
*-------------------------------------------------------------------------
*/
static herr_t
H5T_conv_struct_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
{
- H5T_conv_struct_t *priv = (H5T_conv_struct_t*)(cdata->priv);
- int *src2dst = NULL;
+ H5T_conv_struct_t *priv = (H5T_conv_struct_t*)(cdata->priv);
+ int *src2dst = NULL;
unsigned src_nmembs, dst_nmembs;
- unsigned i, j;
+ unsigned i, j;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1962,8 +1962,8 @@ H5T_conv_struct_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
} /* end if */
} /* end for */
if(src2dst[i] >= 0) {
- hid_t tid;
- H5T_t *type;
+ hid_t tid;
+ H5T_t *type;
type = H5T_copy(src->shared->u.compnd.memb[i].type, H5T_COPY_ALL);
tid = H5I_register(H5I_DATATYPE, type, FALSE);
@@ -2053,9 +2053,9 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_conv_struct_init() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_struct_subset
+ * Function: H5T__conv_struct_subset
*
* Purpose: A quick way to return a field in a struct private in this
* file. The flag SMEMBS_SUBSET indicates whether the source
@@ -2073,15 +2073,15 @@ done:
* Return: A pointer to the subset info struct in p. Points directly
* into the structure.
*
- * Programmer: Raymond Lu
- * 8 June 2007
+ * Programmer: Raymond Lu
+ * 8 June 2007
*
*-------------------------------------------------------------------------
*/
H5T_subset_info_t *
H5T__conv_struct_subset(const H5T_cdata_t *cdata)
{
- H5T_conv_struct_t *priv = NULL;
+ H5T_conv_struct_t *priv = NULL;
FUNC_ENTER_PACKAGE_NOERR
@@ -2093,30 +2093,30 @@ H5T__conv_struct_subset(const H5T_cdata_t *cdata)
FUNC_LEAVE_NOAPI((H5T_subset_info_t *) &priv->subset_info)
} /* end H5T__conv_struct_subset() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_struct
+ * Function: H5T__conv_struct
*
- * Purpose: Converts between compound datatypes. This is a soft
- * conversion function. The algorithm is basically:
+ * Purpose: Converts between compound datatypes. This is a soft
+ * conversion function. The algorithm is basically:
*
- * For each element do
- * For I=1..NELMTS do
- * If sizeof destination type <= sizeof source type then
- * Convert member to destination type;
- * Move member as far left as possible;
+ * For each element do
+ * For I=1..NELMTS do
+ * If sizeof destination type <= sizeof source type then
+ * Convert member to destination type;
+ * Move member as far left as possible;
*
- * For I=NELMTS..1 do
- * If not destination type then
- * Convert member to destination type;
- * Move member to correct position in BKG
+ * For I=NELMTS..1 do
+ * If not destination type then
+ * Convert member to destination type;
+ * Move member to correct position in BKG
*
- * Copy BKG to BUF
+ * Copy BKG to BUF
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Thursday, January 22, 1998
+ * Programmer: Robb Matzke
+ * Thursday, January 22, 1998
*
*-------------------------------------------------------------------------
*/
@@ -2124,20 +2124,20 @@ herr_t
H5T__conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t buf_stride, size_t bkg_stride, void *_buf, void *_bkg)
{
- uint8_t *buf = (uint8_t *)_buf; /*cast for pointer arithmetic */
- uint8_t *bkg = (uint8_t *)_bkg; /*background pointer arithmetic */
+ uint8_t *buf = (uint8_t *)_buf; /*cast for pointer arithmetic */
+ uint8_t *bkg = (uint8_t *)_bkg; /*background pointer arithmetic */
uint8_t *xbuf = buf, *xbkg = bkg; /*temp pointers into buf and bkg*/
- H5T_t *src = NULL; /*source datatype */
- H5T_t *dst = NULL; /*destination datatype */
- int *src2dst = NULL; /*maps src member to dst member */
- H5T_cmemb_t *src_memb = NULL; /*source struct member descript.*/
- H5T_cmemb_t *dst_memb = NULL; /*destination struct memb desc. */
- size_t offset; /*byte offset wrt struct */
- ssize_t src_delta; /*source stride */
- ssize_t bkg_delta; /*background stride */
- size_t elmtno;
- unsigned u; /*counters */
- int i; /*counters */
+ H5T_t *src = NULL; /*source datatype */
+ H5T_t *dst = NULL; /*destination datatype */
+ int *src2dst = NULL; /*maps src member to dst member */
+ H5T_cmemb_t *src_memb = NULL; /*source struct member descript.*/
+ H5T_cmemb_t *dst_memb = NULL; /*destination struct memb desc. */
+ size_t offset; /*byte offset wrt struct */
+ ssize_t src_delta; /*source stride */
+ ssize_t bkg_delta; /*background stride */
+ size_t elmtno;
+ unsigned u; /*counters */
+ int i; /*counters */
H5T_conv_struct_t *priv = (H5T_conv_struct_t *)(cdata->priv);
herr_t ret_value = SUCCEED; /* Return value */
@@ -2155,7 +2155,7 @@ H5T__conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a datatype")
if(H5T_COMPOUND != src->shared->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_COMPOUND datatype")
- if(H5T_COMPOUND != dst->shared->type)
+ if(H5T_COMPOUND != dst->shared->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_COMPOUND datatype")
if(H5T_conv_struct_init(src, dst, cdata) < 0)
@@ -2303,29 +2303,29 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_struct() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_struct_opt
+ * Function: H5T__conv_struct_opt
*
- * Purpose: Converts between compound datatypes in a manner more
- * efficient than the general-purpose H5T__conv_struct()
- * function. This function isn't applicable if the destination
- * is larger than the source type. This is a soft conversion
- * function. The algorithm is basically:
+ * Purpose: Converts between compound datatypes in a manner more
+ * efficient than the general-purpose H5T__conv_struct()
+ * function. This function isn't applicable if the destination
+ * is larger than the source type. This is a soft conversion
+ * function. The algorithm is basically:
*
- * For each member of the struct
- * If sizeof destination type <= sizeof source type then
- * Convert member to destination type for all elements
- * Move memb to BKG buffer for all elements
- * Else
- * Move member as far left as possible for all elements
+ * For each member of the struct
+ * If sizeof destination type <= sizeof source type then
+ * Convert member to destination type for all elements
+ * Move memb to BKG buffer for all elements
+ * Else
+ * Move member as far left as possible for all elements
*
- * For each member of the struct (in reverse order)
- * If not destination type then
- * Convert member to destination type for all elements
- * Move member to correct position in BKG for all elements
+ * For each member of the struct (in reverse order)
+ * If not destination type then
+ * Convert member to destination type for all elements
+ * Move member to correct position in BKG for all elements
*
- * Copy BKG to BUF for all elements
+ * Copy BKG to BUF for all elements
*
* Special case when the source and destination members
* are a subset of each other, and the order is the same, and no
@@ -2340,10 +2340,10 @@ done:
* The optimization is simply moving data to the appropriate
* places in the buffer.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Thursday, January 22, 1998
+ * Programmer: Robb Matzke
+ * Thursday, January 22, 1998
*
*-------------------------------------------------------------------------
*/
@@ -2351,22 +2351,22 @@ herr_t
H5T__conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t bkg_stride, void *_buf, void *_bkg)
{
- uint8_t *buf = (uint8_t *)_buf; /*cast for pointer arithmetic */
- uint8_t *bkg = (uint8_t *)_bkg; /*background pointer arithmetic */
- uint8_t *xbuf = NULL; /*temporary pointer into `buf' */
- uint8_t *xbkg = NULL; /*temporary pointer into `bkg' */
- H5T_t *src = NULL; /*source datatype */
- H5T_t *dst = NULL; /*destination datatype */
- int *src2dst = NULL; /*maps src member to dst member */
- H5T_cmemb_t *src_memb = NULL; /*source struct member descript.*/
- H5T_cmemb_t *dst_memb = NULL; /*destination struct memb desc. */
- size_t offset; /*byte offset wrt struct */
- size_t elmtno; /*element counter */
+ uint8_t *buf = (uint8_t *)_buf; /*cast for pointer arithmetic */
+ uint8_t *bkg = (uint8_t *)_bkg; /*background pointer arithmetic */
+ uint8_t *xbuf = NULL; /*temporary pointer into `buf' */
+ uint8_t *xbkg = NULL; /*temporary pointer into `bkg' */
+ H5T_t *src = NULL; /*source datatype */
+ H5T_t *dst = NULL; /*destination datatype */
+ int *src2dst = NULL; /*maps src member to dst member */
+ H5T_cmemb_t *src_memb = NULL; /*source struct member descript.*/
+ H5T_cmemb_t *dst_memb = NULL; /*destination struct memb desc. */
+ size_t offset; /*byte offset wrt struct */
+ size_t elmtno; /*element counter */
size_t copy_size; /*size of element for copying */
- H5T_conv_struct_t *priv = NULL; /*private data */
+ H5T_conv_struct_t *priv = NULL; /*private data */
hbool_t no_stride = FALSE; /*flag to indicate no stride */
- unsigned u; /*counters */
- int i; /*counters */
+ unsigned u; /*counters */
+ int i; /*counters */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -2383,7 +2383,7 @@ H5T__conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
if(H5T_COMPOUND != src->shared->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_COMPOUND datatype")
- if(H5T_COMPOUND != dst->shared->type)
+ if(H5T_COMPOUND != dst->shared->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_COMPOUND datatype")
/* Initialize data which is relatively constant */
@@ -2575,17 +2575,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_struct_opt() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T_conv_enum_init
+ * Function: H5T_conv_enum_init
*
- * Purpose: Initialize information for H5T__conv_enum().
+ * Purpose: Initialize information for H5T__conv_enum().
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, January 4, 1999
*
*-------------------------------------------------------------------------
@@ -2593,21 +2593,21 @@ done:
static herr_t
H5T_conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
{
- H5T_enum_struct_t *priv = NULL; /*private conversion data */
- int n; /*src value cast as native int */
- int domain[2] = {0, 0}; /*min and max source values */
- int *map = NULL; /*map from src value to dst idx */
- unsigned length; /*nelmts in map array */
- unsigned i, j; /*counters */
+ H5T_enum_struct_t *priv = NULL; /*private conversion data */
+ int n; /*src value cast as native int */
+ int domain[2] = {0, 0}; /*min and max source values */
+ int *map = NULL; /*map from src value to dst idx */
+ unsigned length; /*nelmts in map array */
+ unsigned i, j; /*counters */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
cdata->need_bkg = H5T_BKG_NO;
if(NULL == (priv = (H5T_enum_struct_t *)(cdata->priv = H5MM_calloc(sizeof(*priv)))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
if(0 == src->shared->u.enumer.nmembs)
- HGOTO_DONE(SUCCEED);
+ HGOTO_DONE(SUCCEED);
/*
* Check that the source symbol names are a subset of the destination
@@ -2617,16 +2617,16 @@ H5T_conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
H5T__sort_name(src, NULL);
H5T__sort_name(dst, NULL);
if(NULL == (priv->src2dst = (int *)H5MM_malloc(src->shared->u.enumer.nmembs * sizeof(int))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
for(i = 0, j = 0;
i < src->shared->u.enumer.nmembs && j < dst->shared->u.enumer.nmembs;
i++, j++) {
- while(j < dst->shared->u.enumer.nmembs &&
- HDstrcmp(src->shared->u.enumer.name[i], dst->shared->u.enumer.name[j]))
+ while(j < dst->shared->u.enumer.nmembs &&
+ HDstrcmp(src->shared->u.enumer.name[i], dst->shared->u.enumer.name[j]))
j++;
- if(j >= dst->shared->u.enumer.nmembs)
- HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "source type is not a subset of destination type")
- priv->src2dst[i] = (int)j;
+ if(j >= dst->shared->u.enumer.nmembs)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "source type is not a subset of destination type")
+ priv->src2dst[i] = (int)j;
} /* end for */
/*
@@ -2634,75 +2634,75 @@ H5T_conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
* value converted. However, if all of the following constraints are met
* then we can build a perfect hash table and use an O(1) lookup method.
*
- * A: The source datatype size matches one of our native datatype
- * sizes.
+ * A: The source datatype size matches one of our native datatype
+ * sizes.
*
- * B: After casting the source value bit pattern to a native type
- * the size of the range of values is less than 20% larger than
- * the number of values.
+ * B: After casting the source value bit pattern to a native type
+ * the size of the range of values is less than 20% larger than
+ * the number of values.
*
* If this special case is met then we use the source bit pattern cast as
* a native integer type as an index into the `val2dst'. The values of
* that array are the index numbers in the destination type or negative
* if the entry is unused.
*
- * (This optimized algorithm doesn't work when the byte orders are different.
+ * (This optimized algorithm doesn't work when the byte orders are different.
* The code such as "n = *((int*)(src->shared->u.enumer.value+i*src->shared->size));"
* can change the value significantly. i.g. if the source value is big-endian 0x0000000f,
* executing the casting on little-endian machine will get a big number 0x0f000000.
- * Then it can't meet the condition
+ * Then it can't meet the condition
* "if(src->shared->u.enumer.nmembs<2 || (double)length/src->shared->u.enumer.nmembs<1.2)"
- * Because this is the optimized code, we won't fix it. It should still work in some
- * situations. SLU - 2011/5/24)
+ * Because this is the optimized code, we won't fix it. It should still work in some
+ * situations. SLU - 2011/5/24)
*/
if(1 == src->shared->size || sizeof(short) == src->shared->size || sizeof(int) == src->shared->size) {
- for(i = 0; i < src->shared->u.enumer.nmembs; i++) {
- if(1 == src->shared->size)
- n = *((signed char *)(src->shared->u.enumer.value + i));
- else if (sizeof(short) == src->shared->size)
- n = *((short *)(src->shared->u.enumer.value + i * src->shared->size));
- else
- n = *((int *)(src->shared->u.enumer.value + i * src->shared->size));
- if(0 == i) {
- domain[0] = domain[1] = n;
- } else {
- domain[0] = MIN(domain[0], n);
- domain[1] = MAX(domain[1], n);
- }
- } /* end for */
+ for(i = 0; i < src->shared->u.enumer.nmembs; i++) {
+ if(1 == src->shared->size)
+ n = *((signed char *)(src->shared->u.enumer.value + i));
+ else if (sizeof(short) == src->shared->size)
+ n = *((short *)(src->shared->u.enumer.value + i * src->shared->size));
+ else
+ n = *((int *)(src->shared->u.enumer.value + i * src->shared->size));
+ if(0 == i) {
+ domain[0] = domain[1] = n;
+ } else {
+ domain[0] = MIN(domain[0], n);
+ domain[1] = MAX(domain[1], n);
+ }
+ } /* end for */
HDassert(domain[1] >= domain[0]);
- length = (unsigned)(domain[1] - domain[0]) + 1;
- if(src->shared->u.enumer.nmembs < 2 ||
+ length = (unsigned)(domain[1] - domain[0]) + 1;
+ if(src->shared->u.enumer.nmembs < 2 ||
(double)length / src->shared->u.enumer.nmembs < (double)(1.2f)) {
- priv->base = domain[0];
- priv->length = length;
- if(NULL == (map = (int *)H5MM_malloc(length * sizeof(int))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
- for(i = 0; i < length; i++)
+ priv->base = domain[0];
+ priv->length = length;
+ if(NULL == (map = (int *)H5MM_malloc(length * sizeof(int))))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
+ for(i = 0; i < length; i++)
map[i] = -1; /*entry unused*/
- for(i = 0; i < src->shared->u.enumer.nmembs; i++) {
- if(1 == src->shared->size)
- n = *((signed char *)(src->shared->u.enumer.value + i));
- else if(sizeof(short) == src->shared->size)
- n = *((short *)(src->shared->u.enumer.value + i * src->shared->size));
- else
- n = *((int *)(src->shared->u.enumer.value + i * src->shared->size));
- n -= priv->base;
- HDassert(n >= 0 && (unsigned)n < priv->length);
- HDassert(map[n] < 0);
- map[n] = priv->src2dst[i];
- } /* end for */
-
- /*
- * Replace original src2dst array with our new one. The original
- * was indexed by source member number while the new one is
- * indexed by source values.
- */
- H5MM_xfree(priv->src2dst);
- priv->src2dst = map;
- HGOTO_DONE(SUCCEED);
- }
+ for(i = 0; i < src->shared->u.enumer.nmembs; i++) {
+ if(1 == src->shared->size)
+ n = *((signed char *)(src->shared->u.enumer.value + i));
+ else if(sizeof(short) == src->shared->size)
+ n = *((short *)(src->shared->u.enumer.value + i * src->shared->size));
+ else
+ n = *((int *)(src->shared->u.enumer.value + i * src->shared->size));
+ n -= priv->base;
+ HDassert(n >= 0 && (unsigned)n < priv->length);
+ HDassert(map[n] < 0);
+ map[n] = priv->src2dst[i];
+ } /* end for */
+
+ /*
+ * Replace original src2dst array with our new one. The original
+ * was indexed by source member number while the new one is
+ * indexed by source values.
+ */
+ H5MM_xfree(priv->src2dst);
+ priv->src2dst = map;
+ HGOTO_DONE(SUCCEED);
+ }
}
/* Sort source type by value and adjust src2dst[] appropriately */
@@ -2710,24 +2710,24 @@ H5T_conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
done:
if (ret_value<0 && priv) {
- H5MM_xfree(priv->src2dst);
- H5MM_xfree(priv);
- cdata->priv = NULL;
+ H5MM_xfree(priv->src2dst);
+ H5MM_xfree(priv);
+ cdata->priv = NULL;
}
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_enum
+ * Function: H5T__conv_enum
*
- * Purpose: Converts one type of enumerated data to another.
+ * Purpose: Converts one type of enumerated data to another.
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, January 4, 1999
*-------------------------------------------------------------------------
*/
@@ -2736,15 +2736,15 @@ H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf,
void H5_ATTR_UNUSED *bkg)
{
- uint8_t *buf = (uint8_t*)_buf; /*cast for pointer arithmetic */
- H5T_t *src = NULL, *dst = NULL; /*src and dst datatypes */
- uint8_t *s = NULL, *d = NULL; /*src and dst BUF pointers */
- ssize_t src_delta, dst_delta; /*conversion strides */
- int n; /*src value cast as native int */
+ uint8_t *buf = (uint8_t*)_buf; /*cast for pointer arithmetic */
+ H5T_t *src = NULL, *dst = NULL; /*src and dst datatypes */
+ uint8_t *s = NULL, *d = NULL; /*src and dst BUF pointers */
+ ssize_t src_delta, dst_delta; /*conversion strides */
+ int n; /*src value cast as native int */
H5T_enum_struct_t *priv = (H5T_enum_struct_t*)(cdata->priv);
H5T_conv_cb_t cb_struct; /*conversion callback structure */
H5T_conv_ret_t except_ret; /*return of callback function */
- size_t i; /*counters */
+ size_t i; /*counters */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -2761,7 +2761,7 @@ H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a datatype")
if(H5T_ENUM != src->shared->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_ENUM datatype")
- if(H5T_ENUM != dst->shared->type)
+ if(H5T_ENUM != dst->shared->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_ENUM datatype")
if(H5T_conv_enum_init(src, dst, cdata) < 0)
@@ -2771,7 +2771,7 @@ H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
case H5T_CONV_FREE:
#ifdef H5T_DEBUG
if (H5DEBUG(T)) {
- fprintf(H5DEBUG(T), " Using %s mapping function%s\n",
+ HDfprintf(H5DEBUG(T), " Using %s mapping function%s\n",
priv->length?"O(1)":"O(log N)",
priv->length?"":", where N is the number of enum members");
}
@@ -2788,7 +2788,7 @@ H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
if(H5T_ENUM != src->shared->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_ENUM datatype")
- if(H5T_ENUM != dst->shared->type)
+ if(H5T_ENUM != dst->shared->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_ENUM datatype")
/* priv->src2dst map was computed for certain sort keys. Make sure those same
@@ -2828,10 +2828,10 @@ H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
/* Use O(1) lookup */
/* (The casting won't work when the byte orders are different. i.g. if the source value
* is big-endian 0x0000000f, the direct casting "n = *((int*)s);" will make it a big
- * number 0x0f000000 on little-endian machine. But we won't fix it because it's an
+ * number 0x0f000000 on little-endian machine. But we won't fix it because it's an
* optimization code. Please also see the comment in the H5T_conv_enum_init() function.
* SLU - 2011/5/24)
- */
+ */
if(1 == src->shared->size)
n = *((signed char*)s);
else if(sizeof(short) == src->shared->size)
@@ -2906,30 +2906,30 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_enum() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_enum_numeric
+ * Function: H5T__conv_enum_numeric
*
- * Purpose: Converts enumerated data to a numeric type (integer or
- * floating-point number). This function is registered into
- * the conversion table twice in H5T_init_interface in H5T.c.
+ * Purpose: Converts enumerated data to a numeric type (integer or
+ * floating-point number). This function is registered into
+ * the conversion table twice in H5T_init_interface in H5T.c.
* Once for enum-integer conversion. Once for enum-float conversion.
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* 12 October 2012
*-------------------------------------------------------------------------
*/
herr_t
H5T__conv_enum_numeric(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
- size_t H5_ATTR_UNUSED buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf,
+ size_t H5_ATTR_UNUSED buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf,
void H5_ATTR_UNUSED *bkg)
{
- H5T_t *src, *dst; /*src and dst datatypes */
- H5T_t *src_parent; /*parent type for src */
+ H5T_t *src, *dst; /*src and dst datatypes */
+ H5T_t *src_parent; /*parent type for src */
hid_t src_parent_id = -1; /*ID for parent of the source */
H5T_path_t *tpath; /* Conversion information */
herr_t ret_value = SUCCEED; /* Return value */
@@ -2962,9 +2962,9 @@ H5T__conv_enum_numeric(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
src_parent = src->shared->parent;
if(NULL == (tpath = H5T_path_find(src_parent, dst))) {
- HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to convert between src and dest datatype")
+ HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to convert between src and dest datatype")
} else if(!H5T_path_noop(tpath)) {
- if((src_parent_id = H5I_register(H5I_DATATYPE, H5T_copy(src_parent, H5T_COPY_ALL), FALSE)) < 0)
+ if((src_parent_id = H5I_register(H5I_DATATYPE, H5T_copy(src_parent, H5T_COPY_ALL), FALSE)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register types for conversion")
/* Convert the data */
@@ -2986,28 +2986,28 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_enum_numeric() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_vlen
+ * Function: H5T__conv_vlen
*
- * Purpose: Converts between VL datatypes in memory and on disk.
- * This is a soft conversion function. The algorithm is
- * basically:
+ * Purpose: Converts between VL datatypes in memory and on disk.
+ * This is a soft conversion function. The algorithm is
+ * basically:
*
- * For every VL struct in the main buffer:
- * 1. Allocate space for temporary dst VL data (reuse buffer
- * if possible)
+ * For every VL struct in the main buffer:
+ * 1. Allocate space for temporary dst VL data (reuse buffer
+ * if possible)
* 2. Copy VL data from src buffer into dst buffer
* 3. Convert VL data into dst representation
* 4. Allocate buffer in dst heap
- * 5. Free heap objects storing old data
+ * 5. Free heap objects storing old data
* 6. Write dst VL data into dst heap
* 7. Store (heap ID or pointer) and length in main dst buffer
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Wednesday, May 26, 1999
+ * Programmer: Quincey Koziol
+ * Wednesday, May 26, 1999
*
*-------------------------------------------------------------------------
*/
@@ -3016,28 +3016,28 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t buf_stride, size_t bkg_stride, void *buf, void *bkg)
{
H5T_vlen_alloc_info_t vl_alloc_info;/* VL allocation info */
- H5T_path_t *tpath = NULL; /* Type conversion path */
+ H5T_path_t *tpath = NULL; /* Type conversion path */
hbool_t noop_conv = FALSE; /* Flag to indicate a noop conversion */
hbool_t write_to_file = FALSE; /* Flag to indicate writing to file */
htri_t parent_is_vlen; /* Flag to indicate parent is vlen datatyp */
- hid_t tsrc_id = -1, tdst_id = -1;/*temporary type atoms */
- H5T_t *src = NULL; /*source datatype */
- H5T_t *dst = NULL; /*destination datatype */
- H5HG_t bg_hobjid, parent_hobjid;
- uint8_t *s = NULL; /*source buffer */
- uint8_t *d = NULL; /*destination buffer */
- uint8_t *b = NULL; /*background buffer */
- ssize_t s_stride, d_stride; /*src and dst strides */
- ssize_t b_stride; /*bkg stride */
+ hid_t tsrc_id = -1, tdst_id = -1;/*temporary type atoms */
+ H5T_t *src = NULL; /*source datatype */
+ H5T_t *dst = NULL; /*destination datatype */
+ H5HG_t bg_hobjid, parent_hobjid;
+ uint8_t *s = NULL; /*source buffer */
+ uint8_t *d = NULL; /*destination buffer */
+ uint8_t *b = NULL; /*background buffer */
+ ssize_t s_stride, d_stride; /*src and dst strides */
+ ssize_t b_stride; /*bkg stride */
size_t safe; /*how many elements are safe to process in each pass */
- size_t bg_seq_len = 0;
- size_t src_base_size, dst_base_size;/*source & destination base size*/
- void *conv_buf = NULL; /*temporary conversion buffer */
- size_t conv_buf_size = 0; /*size of conversion buffer in bytes */
- void *tmp_buf = NULL; /*temporary background buffer */
- size_t tmp_buf_size = 0; /*size of temporary bkg buffer */
+ size_t bg_seq_len = 0;
+ size_t src_base_size, dst_base_size;/*source & destination base size*/
+ void *conv_buf = NULL; /*temporary conversion buffer */
+ size_t conv_buf_size = 0; /*size of conversion buffer in bytes */
+ void *tmp_buf = NULL; /*temporary background buffer */
+ size_t tmp_buf_size = 0; /*size of temporary bkg buffer */
hbool_t nested = FALSE; /*flag of nested VL case */
- size_t elmtno; /*element number counter */
+ size_t elmtno; /*element number counter */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -3055,10 +3055,10 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a datatype")
if(H5T_VLEN != src->shared->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_VLEN datatype")
- if(H5T_VLEN != dst->shared->type)
+ if(H5T_VLEN != dst->shared->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_VLEN datatype")
if(H5T_VLEN_STRING == src->shared->u.vlen.type && H5T_VLEN_STRING == dst->shared->u.vlen.type) {
- if((H5T_CSET_ASCII == src->shared->u.vlen.cset && H5T_CSET_UTF8 == dst->shared->u.vlen.cset)
+ if((H5T_CSET_ASCII == src->shared->u.vlen.cset && H5T_CSET_UTF8 == dst->shared->u.vlen.cset)
|| (H5T_CSET_ASCII == dst->shared->u.vlen.cset && H5T_CSET_UTF8 == src->shared->u.vlen.cset))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "The library doesn't convert between strings of ASCII and UTF")
}
@@ -3187,7 +3187,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
} /* end if */
else {
ssize_t sseq_len; /* (signed) The number of elements in the current sequence*/
- size_t seq_len; /* The number of elements in the current sequence*/
+ size_t seq_len; /* The number of elements in the current sequence*/
/* Get length of element sequences */
if((sseq_len = (*(src->shared->u.vlen.getlen))(s)) < 0)
@@ -3201,7 +3201,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid source pointer")
} /* end if */
else {
- size_t src_size, dst_size; /*source & destination total size in bytes*/
+ size_t src_size, dst_size; /*source & destination total size in bytes*/
src_size = seq_len * src_base_size;
dst_size = seq_len * dst_base_size;
@@ -3209,11 +3209,11 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
/* Check if conversion buffer is large enough, resize if
* necessary. If the SEQ_LEN is 0, allocate a minimal size buffer.
*/
- if(!seq_len && !conv_buf) {
+ if(!seq_len && !conv_buf) {
conv_buf_size = ((1 / H5T_VLEN_MIN_CONF_BUF_SIZE) + 1) * H5T_VLEN_MIN_CONF_BUF_SIZE;
if(NULL == (conv_buf = H5FL_BLK_CALLOC(vlen_seq, conv_buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion")
- }
+ }
else if(conv_buf_size < MAX(src_size, dst_size)) {
/* Only allocate conversion buffer in H5T_VLEN_MIN_CONF_BUF_SIZE increments */
conv_buf_size = ((MAX(src_size, dst_size) / H5T_VLEN_MIN_CONF_BUF_SIZE) + 1) * H5T_VLEN_MIN_CONF_BUF_SIZE;
@@ -3328,17 +3328,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_vlen() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_array
+ * Function: H5T__conv_array
*
- * Purpose: Converts between array datatypes in memory and on disk.
- * This is a soft conversion function.
+ * Purpose: Converts between array datatypes in memory and on disk.
+ * This is a soft conversion function.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Monday, November 6, 2000
+ * Programmer: Quincey Koziol
+ * Monday, November 6, 2000
*
*-------------------------------------------------------------------------
*/
@@ -3346,16 +3346,16 @@ herr_t
H5T__conv_array(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t buf_stride, size_t bkg_stride, void *_buf, void H5_ATTR_UNUSED *_bkg)
{
- H5T_path_t *tpath; /* Type conversion path */
- hid_t tsrc_id = -1, tdst_id = -1;/*temporary type atoms */
- H5T_t *src = NULL; /*source datatype */
- H5T_t *dst = NULL; /*destination datatype */
- uint8_t *sp, *dp; /*source and dest traversal ptrs */
- ssize_t src_delta, dst_delta; /*source & destination stride */
- int direction; /*direction of traversal */
- size_t elmtno; /*element number counter */
+ H5T_path_t *tpath; /* Type conversion path */
+ hid_t tsrc_id = -1, tdst_id = -1;/*temporary type atoms */
+ H5T_t *src = NULL; /*source datatype */
+ H5T_t *dst = NULL; /*destination datatype */
+ uint8_t *sp, *dp; /*source and dest traversal ptrs */
+ ssize_t src_delta, dst_delta; /*source & destination stride */
+ int direction; /*direction of traversal */
+ size_t elmtno; /*element number counter */
unsigned u; /* local index variable */
- void *bkg_buf = NULL; /*temporary background buffer */
+ void *bkg_buf = NULL; /*temporary background buffer */
herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -3433,7 +3433,7 @@ H5T__conv_array(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
/* Check if we need a background buffer for this conversion */
if(tpath->cdata.need_bkg) {
- size_t bkg_buf_size; /*size of background buffer in bytes */
+ size_t bkg_buf_size; /*size of background buffer in bytes */
/* Allocate background buffer */
bkg_buf_size = src->shared->u.array.nelem * MAX(src->shared->size, dst->shared->size);
@@ -3474,18 +3474,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_array() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_i_i
+ * Function: H5T__conv_i_i
*
- * Purpose: Convert one integer type to another. This is the catch-all
- * function for integer conversions and is probably not
- * particularly fast.
+ * Purpose: Convert one integer type to another. This is the catch-all
+ * function for integer conversions and is probably not
+ * particularly fast.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Wednesday, June 10, 1998
+ * Programmer: Robb Matzke
+ * Wednesday, June 10, 1998
*
*-------------------------------------------------------------------------
*/
@@ -3493,19 +3493,19 @@ herr_t
H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg)
{
- H5T_t *src = NULL; /*source datatype */
- H5T_t *dst = NULL; /*destination datatype */
- ssize_t src_delta, dst_delta; /*source & destination stride */
- int direction; /*direction of traversal */
- size_t elmtno; /*element number */
- size_t half_size; /*half the type size */
- size_t olap; /*num overlapping elements */
- uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
+ H5T_t *src = NULL; /*source datatype */
+ H5T_t *dst = NULL; /*destination datatype */
+ ssize_t src_delta, dst_delta; /*source & destination stride */
+ int direction; /*direction of traversal */
+ size_t elmtno; /*element number */
+ size_t half_size; /*half the type size */
+ size_t olap; /*num overlapping elements */
+ uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
uint8_t *src_rev=NULL; /*order-reversed source buffer */
- uint8_t dbuf[64]; /*temp destination buffer */
- size_t first;
- ssize_t sfirst; /*a signed version of `first' */
- size_t i; /*Local index variables */
+ uint8_t dbuf[64]; /*temp destination buffer */
+ size_t first;
+ ssize_t sfirst; /*a signed version of `first' */
+ size_t i; /*Local index variables */
H5T_conv_cb_t cb_struct={NULL, NULL}; /*conversion callback structure */
H5T_conv_ret_t except_ret; /*return of callback function */
hbool_t reverse; /*if reverse the order of destination */
@@ -3865,18 +3865,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_i_i() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_f_f
+ * Function: H5T__conv_f_f
*
- * Purpose: Convert one floating point type to another. This is a catch
- * all for floating point conversions and is probably not
- * particularly fast!
+ * Purpose: Convert one floating point type to another. This is a catch
+ * all for floating point conversions and is probably not
+ * particularly fast!
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Tuesday, June 23, 1998
+ * Programmer: Robb Matzke
+ * Tuesday, June 23, 1998
*
*-------------------------------------------------------------------------
*/
@@ -3885,32 +3885,32 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg)
{
/* Traversal-related variables */
- H5T_t *src_p; /*source datatype */
- H5T_t *dst_p; /*destination datatype */
- H5T_atomic_t src; /*atomic source info */
- H5T_atomic_t dst; /*atomic destination info */
- ssize_t src_delta, dst_delta; /*source & destination stride */
- int direction; /*forward or backward traversal */
- size_t elmtno; /*element number */
- size_t half_size; /*half the type size */
+ H5T_t *src_p; /*source datatype */
+ H5T_t *dst_p; /*destination datatype */
+ H5T_atomic_t src; /*atomic source info */
+ H5T_atomic_t dst; /*atomic destination info */
+ ssize_t src_delta, dst_delta; /*source & destination stride */
+ int direction; /*forward or backward traversal */
+ size_t elmtno; /*element number */
+ size_t half_size; /*half the type size */
size_t tsize; /*type size for swapping bytes */
- size_t olap; /*num overlapping elements */
- ssize_t bitno = 0; /*bit number */
- uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
+ size_t olap; /*num overlapping elements */
+ ssize_t bitno = 0; /*bit number */
+ uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
uint8_t *src_rev = NULL; /*order-reversed source buffer */
- uint8_t dbuf[64]; /*temp destination buffer */
+ uint8_t dbuf[64]; /*temp destination buffer */
uint8_t tmp1, tmp2; /*temp variables for swapping bytes*/
/* Conversion-related variables */
- int64_t expo; /*exponent */
- hssize_t expo_max; /*maximum possible dst exponent */
- size_t msize = 0; /*useful size of mantissa in src*/
- size_t mpos; /*offset to useful mant is src */
+ int64_t expo; /*exponent */
+ hssize_t expo_max; /*maximum possible dst exponent */
+ size_t msize = 0; /*useful size of mantissa in src*/
+ size_t mpos; /*offset to useful mant is src */
uint64_t sign; /*source sign bit value */
- size_t mrsh; /*amount to right shift mantissa*/
- hbool_t carry = FALSE; /*carry after rounding mantissa */
- size_t i; /*miscellaneous counters */
- size_t implied; /*destination implied bits */
+ size_t mrsh; /*amount to right shift mantissa*/
+ hbool_t carry = FALSE; /*carry after rounding mantissa */
+ size_t i; /*miscellaneous counters */
+ size_t implied; /*destination implied bits */
hbool_t denormalized = FALSE; /*is either source or destination denormalized?*/
H5T_conv_cb_t cb_struct = {NULL, NULL}; /*conversion callback structure */
H5T_conv_ret_t except_ret; /*return of callback function */
@@ -4174,7 +4174,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
/*
* Get the exponent as an unsigned quantity from the section of
- * the source bit field where it's located. Don't worry about
+ * the source bit field where it's located. Don't worry about
* the exponent bias yet.
*/
expo = (int64_t)H5T__bit_get_d(s, src.u.f.epos, src.u.f.esize);
@@ -4260,7 +4260,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
else if (expo>=expo_max) {
/*
* The exponent is too large to fit in the available region
- * or it results in the maximum possible value. Use positive
+ * or it results in the maximum possible value. Use positive
* or negative infinity instead unless the application
* specifies something else. Before calling the overflow
* handler make sure the source buffer we hand it is in the
@@ -4452,16 +4452,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_f_f() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_s_s
+ * Function: H5T__conv_s_s
*
- * Purpose: Convert one fixed-length string type to another.
+ * Purpose: Convert one fixed-length string type to another.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Friday, August 7, 1998
+ * Programmer: Robb Matzke
+ * Friday, August 7, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4470,15 +4470,15 @@ H5T__conv_s_s(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf,
void H5_ATTR_UNUSED *bkg)
{
- H5T_t *src=NULL; /*source datatype */
- H5T_t *dst=NULL; /*destination datatype */
- ssize_t src_delta, dst_delta; /*source & destination stride */
- int direction; /*direction of traversal */
- size_t elmtno; /*element number */
- size_t olap; /*num overlapping elements */
- size_t nchars=0; /*number of characters copied */
- uint8_t *s, *sp, *d, *dp; /*src and dst traversal pointers*/
- uint8_t *dbuf=NULL; /*temp buf for overlap convers. */
+ H5T_t *src=NULL; /*source datatype */
+ H5T_t *dst=NULL; /*destination datatype */
+ ssize_t src_delta, dst_delta; /*source & destination stride */
+ int direction; /*direction of traversal */
+ size_t elmtno; /*element number */
+ size_t olap; /*num overlapping elements */
+ size_t nchars=0; /*number of characters copied */
+ uint8_t *s, *sp, *d, *dp; /*src and dst traversal pointers*/
+ uint8_t *dbuf=NULL; /*temp buf for overlap convers. */
herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -4495,7 +4495,7 @@ H5T__conv_s_s(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad source character set")
if(H5T_CSET_ASCII != dst->shared->u.atomic.u.s.cset && H5T_CSET_UTF8 != dst->shared->u.atomic.u.s.cset)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad destination character set")
- if((H5T_CSET_ASCII == src->shared->u.atomic.u.s.cset && H5T_CSET_UTF8 == dst->shared->u.atomic.u.s.cset)
+ if((H5T_CSET_ASCII == src->shared->u.atomic.u.s.cset && H5T_CSET_UTF8 == dst->shared->u.atomic.u.s.cset)
|| (H5T_CSET_ASCII == dst->shared->u.atomic.u.s.cset && H5T_CSET_UTF8 == src->shared->u.atomic.u.s.cset))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "The library doesn't convert between strings of ASCII and UTF")
if(src->shared->u.atomic.u.s.pad < 0 || src->shared->u.atomic.u.s.pad >= H5T_NSTR ||
@@ -4684,18 +4684,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_s_s() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_uchar
+ * Function: H5T__conv_schar_uchar
*
- * Purpose: Converts `signed char' to `unsigned char'
+ * Purpose: Converts `signed char' to `unsigned char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4707,18 +4707,18 @@ H5T__conv_schar_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_su(SCHAR, UCHAR, signed char, unsigned char, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_schar
+ * Function: H5T__conv_uchar_schar
*
- * Purpose: Converts `unsigned char' to `signed char'
+ * Purpose: Converts `unsigned char' to `signed char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4730,18 +4730,18 @@ H5T__conv_uchar_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_us(UCHAR, SCHAR, unsigned char, signed char, -, SCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_short
+ * Function: H5T__conv_schar_short
*
- * Purpose: Converts `signed char' to `short'
+ * Purpose: Converts `signed char' to `short'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4753,18 +4753,18 @@ H5T__conv_schar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(SCHAR, SHORT, signed char, short, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_ushort
+ * Function: H5T__conv_schar_ushort
*
- * Purpose: Converts `signed char' to `unsigned short'
+ * Purpose: Converts `signed char' to `unsigned short'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4776,18 +4776,18 @@ H5T__conv_schar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(SCHAR, USHORT, signed char, unsigned short, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_short
+ * Function: H5T__conv_uchar_short
*
- * Purpose: Converts `unsigned char' to `short'
+ * Purpose: Converts `unsigned char' to `short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4799,18 +4799,18 @@ H5T__conv_uchar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(UCHAR, SHORT, unsigned char, short, -, SHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_ushort
+ * Function: H5T__conv_uchar_ushort
*
- * Purpose: Converts `unsigned char' to `unsigned short'
+ * Purpose: Converts `unsigned char' to `unsigned short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4822,18 +4822,18 @@ H5T__conv_uchar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(UCHAR, USHORT, unsigned char, unsigned short, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_int
+ * Function: H5T__conv_schar_int
*
- * Purpose: Converts `signed char' to `int'
+ * Purpose: Converts `signed char' to `int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4845,18 +4845,18 @@ H5T__conv_schar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(SCHAR, INT, signed char, int, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_uint
+ * Function: H5T__conv_schar_uint
*
- * Purpose: Converts `signed char' to `unsigned int'
+ * Purpose: Converts `signed char' to `unsigned int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4868,18 +4868,18 @@ H5T__conv_schar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(SCHAR, UINT, signed char, unsigned, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_int
+ * Function: H5T__conv_uchar_int
*
- * Purpose: Converts `unsigned char' to `int'
+ * Purpose: Converts `unsigned char' to `int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4891,18 +4891,18 @@ H5T__conv_uchar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(UCHAR, INT, unsigned char, int, -, INT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_uint
+ * Function: H5T__conv_uchar_uint
*
- * Purpose: Converts `unsigned char' to `unsigned int'
+ * Purpose: Converts `unsigned char' to `unsigned int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4914,18 +4914,18 @@ H5T__conv_uchar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(UCHAR, UINT, unsigned char, unsigned, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_long
+ * Function: H5T__conv_schar_long
*
- * Purpose: Converts `signed char' to `long'
+ * Purpose: Converts `signed char' to `long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4937,18 +4937,18 @@ H5T__conv_schar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(SCHAR, LONG, signed char, long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_ulong
+ * Function: H5T__conv_schar_ulong
*
- * Purpose: Converts `signed char' to `unsigned long'
+ * Purpose: Converts `signed char' to `unsigned long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4960,18 +4960,18 @@ H5T__conv_schar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(SCHAR, ULONG, signed char, unsigned long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_long
+ * Function: H5T__conv_uchar_long
*
- * Purpose: Converts `unsigned char' to `long'
+ * Purpose: Converts `unsigned char' to `long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4983,18 +4983,18 @@ H5T__conv_uchar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(UCHAR, LONG, unsigned char, long, -, LONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_ulong
+ * Function: H5T__conv_uchar_ulong
*
- * Purpose: Converts `unsigned char' to `unsigned long'
+ * Purpose: Converts `unsigned char' to `unsigned long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5006,18 +5006,18 @@ H5T__conv_uchar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(UCHAR, ULONG, unsigned char, unsigned long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_llong
+ * Function: H5T__conv_schar_llong
*
- * Purpose: Converts `signed char' to `long long'
+ * Purpose: Converts `signed char' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5029,18 +5029,18 @@ H5T__conv_schar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(SCHAR, LLONG, signed char, long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_ullong
+ * Function: H5T__conv_schar_ullong
*
- * Purpose: Converts `signed char' to `unsigned long long'
+ * Purpose: Converts `signed char' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5052,18 +5052,18 @@ H5T__conv_schar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(SCHAR, ULLONG, signed char, unsigned long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_llong
+ * Function: H5T__conv_uchar_llong
*
- * Purpose: Converts `unsigned char' to `long long'
+ * Purpose: Converts `unsigned char' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5075,18 +5075,18 @@ H5T__conv_uchar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(UCHAR, LLONG, unsigned char, long long, -, LLONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_ullong
+ * Function: H5T__conv_uchar_ullong
*
- * Purpose: Converts `unsigned char' to `unsigned long long'
+ * Purpose: Converts `unsigned char' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5098,18 +5098,18 @@ H5T__conv_uchar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(UCHAR, ULLONG, unsigned char, unsigned long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_schar
+ * Function: H5T__conv_short_schar
*
- * Purpose: Converts `short' to `signed char'
+ * Purpose: Converts `short' to `signed char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5121,18 +5121,18 @@ H5T__conv_short_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(SHORT, SCHAR, short, signed char, SCHAR_MIN, SCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_uchar
+ * Function: H5T__conv_short_uchar
*
- * Purpose: Converts `short' to `unsigned char'
+ * Purpose: Converts `short' to `unsigned char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5144,18 +5144,18 @@ H5T__conv_short_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(SHORT, UCHAR, short, unsigned char, -, UCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_schar
+ * Function: H5T__conv_ushort_schar
*
- * Purpose: Converts `unsigned short' to `signed char'
+ * Purpose: Converts `unsigned short' to `signed char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5167,18 +5167,18 @@ H5T__conv_ushort_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(USHORT, SCHAR, unsigned short, signed char, -, SCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_uchar
+ * Function: H5T__conv_ushort_uchar
*
- * Purpose: Converts `unsigned short' to `unsigned char'
+ * Purpose: Converts `unsigned short' to `unsigned char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5190,18 +5190,18 @@ H5T__conv_ushort_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(USHORT, UCHAR, unsigned short, unsigned char, -, UCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_ushort
+ * Function: H5T__conv_short_ushort
*
- * Purpose: Converts `short' to `unsigned short'
+ * Purpose: Converts `short' to `unsigned short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5213,18 +5213,18 @@ H5T__conv_short_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_su(SHORT, USHORT, short, unsigned short, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_short
+ * Function: H5T__conv_ushort_short
*
- * Purpose: Converts `unsigned short' to `short'
+ * Purpose: Converts `unsigned short' to `short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5236,18 +5236,18 @@ H5T__conv_ushort_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_us(USHORT, SHORT, unsigned short, short, -, SHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_int
+ * Function: H5T__conv_short_int
*
- * Purpose: Converts `short' to `int'
+ * Purpose: Converts `short' to `int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5259,18 +5259,18 @@ H5T__conv_short_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(SHORT, INT, short, int, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_uint
+ * Function: H5T__conv_short_uint
*
- * Purpose: Converts `short' to `unsigned int'
+ * Purpose: Converts `short' to `unsigned int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5282,18 +5282,18 @@ H5T__conv_short_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(SHORT, UINT, short, unsigned, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_int
+ * Function: H5T__conv_ushort_int
*
- * Purpose: Converts `unsigned short' to `int'
+ * Purpose: Converts `unsigned short' to `int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5305,18 +5305,18 @@ H5T__conv_ushort_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(USHORT, INT, unsigned short, int, -, INT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_uint
+ * Function: H5T__conv_ushort_uint
*
- * Purpose: Converts `unsigned short' to `unsigned int'
+ * Purpose: Converts `unsigned short' to `unsigned int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5328,18 +5328,18 @@ H5T__conv_ushort_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(USHORT, UINT, unsigned short, unsigned, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_long
+ * Function: H5T__conv_short_long
*
- * Purpose: Converts `short' to `long'
+ * Purpose: Converts `short' to `long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5351,18 +5351,18 @@ H5T__conv_short_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(SHORT, LONG, short, long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_ulong
+ * Function: H5T__conv_short_ulong
*
- * Purpose: Converts `short' to `unsigned long'
+ * Purpose: Converts `short' to `unsigned long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5374,18 +5374,18 @@ H5T__conv_short_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(SHORT, ULONG, short, unsigned long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_long
+ * Function: H5T__conv_ushort_long
*
- * Purpose: Converts `unsigned short' to `long'
+ * Purpose: Converts `unsigned short' to `long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5397,18 +5397,18 @@ H5T__conv_ushort_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(USHORT, LONG, unsigned short, long, -, LONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_ulong
+ * Function: H5T__conv_ushort_ulong
*
- * Purpose: Converts `unsigned short' to `unsigned long'
+ * Purpose: Converts `unsigned short' to `unsigned long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5420,18 +5420,18 @@ H5T__conv_ushort_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(USHORT, ULONG, unsigned short, unsigned long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_llong
+ * Function: H5T__conv_short_llong
*
- * Purpose: Converts `short' to `long long'
+ * Purpose: Converts `short' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5443,18 +5443,18 @@ H5T__conv_short_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(SHORT, LLONG, short, long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_ullong
+ * Function: H5T__conv_short_ullong
*
- * Purpose: Converts `short' to `unsigned long long'
+ * Purpose: Converts `short' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5466,18 +5466,18 @@ H5T__conv_short_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(SHORT, ULLONG, short, unsigned long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_llong
+ * Function: H5T__conv_ushort_llong
*
- * Purpose: Converts `unsigned short' to `long long'
+ * Purpose: Converts `unsigned short' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5489,18 +5489,18 @@ H5T__conv_ushort_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(USHORT, LLONG, unsigned short, long long, -, LLONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_ullong
+ * Function: H5T__conv_ushort_ullong
*
- * Purpose: Converts `unsigned short' to `unsigned long long'
+ * Purpose: Converts `unsigned short' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5512,18 +5512,18 @@ H5T__conv_ushort_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(USHORT, ULLONG, unsigned short, unsigned long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_schar
+ * Function: H5T__conv_int_schar
*
- * Purpose: Converts `int' to `signed char'
+ * Purpose: Converts `int' to `signed char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5535,18 +5535,18 @@ H5T__conv_int_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(INT, SCHAR, int, signed char, SCHAR_MIN, SCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_uchar
+ * Function: H5T__conv_int_uchar
*
- * Purpose: Converts `int' to `unsigned char'
+ * Purpose: Converts `int' to `unsigned char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5558,18 +5558,18 @@ H5T__conv_int_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(INT, UCHAR, int, unsigned char, -, UCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_schar
+ * Function: H5T__conv_uint_schar
*
- * Purpose: Converts `unsigned int' to `signed char'
+ * Purpose: Converts `unsigned int' to `signed char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5581,18 +5581,18 @@ H5T__conv_uint_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(UINT, SCHAR, unsigned, signed char, -, SCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_uchar
+ * Function: H5T__conv_uint_uchar
*
- * Purpose: Converts `unsigned int' to `unsigned char'
+ * Purpose: Converts `unsigned int' to `unsigned char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5604,18 +5604,18 @@ H5T__conv_uint_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(UINT, UCHAR, unsigned, unsigned char, -, UCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_short
+ * Function: H5T__conv_int_short
*
- * Purpose: Converts `int' to `short'
+ * Purpose: Converts `int' to `short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5627,18 +5627,18 @@ H5T__conv_int_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(INT, SHORT, int, short, SHRT_MIN, SHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_ushort
+ * Function: H5T__conv_int_ushort
*
- * Purpose: Converts `int' to `unsigned short'
+ * Purpose: Converts `int' to `unsigned short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5650,18 +5650,18 @@ H5T__conv_int_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(INT, USHORT, int, unsigned short, -, USHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_short
+ * Function: H5T__conv_uint_short
*
- * Purpose: Converts `unsigned int' to `short'
+ * Purpose: Converts `unsigned int' to `short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5673,18 +5673,18 @@ H5T__conv_uint_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(UINT, SHORT, unsigned, short, -, SHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_ushort
+ * Function: H5T__conv_uint_ushort
*
- * Purpose: Converts `unsigned int' to `unsigned short'
+ * Purpose: Converts `unsigned int' to `unsigned short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5696,18 +5696,18 @@ H5T__conv_uint_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(UINT, USHORT, unsigned, unsigned short, -, USHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_uint
+ * Function: H5T__conv_int_uint
*
- * Purpose: Converts `int' to `unsigned int'
+ * Purpose: Converts `int' to `unsigned int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5719,18 +5719,18 @@ H5T__conv_int_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_su(INT, UINT, int, unsigned, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_int
+ * Function: H5T__conv_uint_int
*
- * Purpose: Converts `unsigned int' to `int'
+ * Purpose: Converts `unsigned int' to `int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5742,18 +5742,18 @@ H5T__conv_uint_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_us(UINT, INT, unsigned, int, -, INT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_long
+ * Function: H5T__conv_int_long
*
- * Purpose: Converts `int' to `long'
+ * Purpose: Converts `int' to `long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5765,18 +5765,18 @@ H5T__conv_int_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(INT, LONG, int, long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_ulong
+ * Function: H5T__conv_int_ulong
*
- * Purpose: Converts `int' to `unsigned long'
+ * Purpose: Converts `int' to `unsigned long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5788,18 +5788,18 @@ H5T__conv_int_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(INT, LONG, int, unsigned long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_long
+ * Function: H5T__conv_uint_long
*
- * Purpose: Converts `unsigned int' to `long'
+ * Purpose: Converts `unsigned int' to `long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5811,18 +5811,18 @@ H5T__conv_uint_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(UINT, LONG, unsigned, long, -, LONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_ulong
+ * Function: H5T__conv_uint_ulong
*
- * Purpose: Converts `unsigned int' to `unsigned long'
+ * Purpose: Converts `unsigned int' to `unsigned long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5834,18 +5834,18 @@ H5T__conv_uint_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(UINT, ULONG, unsigned, unsigned long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_llong
+ * Function: H5T__conv_int_llong
*
- * Purpose: Converts `int' to `long long'
+ * Purpose: Converts `int' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5857,18 +5857,18 @@ H5T__conv_int_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(INT, LLONG, int, long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_ullong
+ * Function: H5T__conv_int_ullong
*
- * Purpose: Converts `int' to `unsigned long long'
+ * Purpose: Converts `int' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5880,18 +5880,18 @@ H5T__conv_int_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(INT, ULLONG, int, unsigned long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_llong
+ * Function: H5T__conv_uint_llong
*
- * Purpose: Converts `unsigned int' to `long long'
+ * Purpose: Converts `unsigned int' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5903,18 +5903,18 @@ H5T__conv_uint_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(UINT, LLONG, unsigned, long long, -, LLONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_ullong
+ * Function: H5T__conv_uint_ullong
*
- * Purpose: Converts `unsigned int' to `unsigned long long'
+ * Purpose: Converts `unsigned int' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5926,18 +5926,18 @@ H5T__conv_uint_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(UINT, ULLONG, unsigned, unsigned long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_schar
+ * Function: H5T__conv_long_schar
*
- * Purpose: Converts `long' to `signed char'
+ * Purpose: Converts `long' to `signed char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5949,18 +5949,18 @@ H5T__conv_long_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(LONG, SCHAR, long, signed char, SCHAR_MIN, SCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_uchar
+ * Function: H5T__conv_long_uchar
*
- * Purpose: Converts `long' to `unsigned char'
+ * Purpose: Converts `long' to `unsigned char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5972,18 +5972,18 @@ H5T__conv_long_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(LONG, UCHAR, long, unsigned char, -, UCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_schar
+ * Function: H5T__conv_ulong_schar
*
- * Purpose: Converts `unsigned long' to `signed char'
+ * Purpose: Converts `unsigned long' to `signed char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5995,18 +5995,18 @@ H5T__conv_ulong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(ULONG, SCHAR, unsigned long, signed char, -, SCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_uchar
+ * Function: H5T__conv_ulong_uchar
*
- * Purpose: Converts `unsigned long' to `unsigned char'
+ * Purpose: Converts `unsigned long' to `unsigned char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6018,18 +6018,18 @@ H5T__conv_ulong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(ULONG, UCHAR, unsigned long, unsigned char, -, UCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_short
+ * Function: H5T__conv_long_short
*
- * Purpose: Converts `long' to `short'
+ * Purpose: Converts `long' to `short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6041,18 +6041,18 @@ H5T__conv_long_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(LONG, SHORT, long, short, SHRT_MIN, SHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_ushort
+ * Function: H5T__conv_long_ushort
*
- * Purpose: Converts `long' to `unsigned short'
+ * Purpose: Converts `long' to `unsigned short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6064,18 +6064,18 @@ H5T__conv_long_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(LONG, USHORT, long, unsigned short, -, USHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_short
+ * Function: H5T__conv_ulong_short
*
- * Purpose: Converts `unsigned long' to `short'
+ * Purpose: Converts `unsigned long' to `short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6087,18 +6087,18 @@ H5T__conv_ulong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(ULONG, SHORT, unsigned long, short, -, SHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_ushort
+ * Function: H5T__conv_ulong_ushort
*
- * Purpose: Converts `unsigned long' to `unsigned short'
+ * Purpose: Converts `unsigned long' to `unsigned short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6110,18 +6110,18 @@ H5T__conv_ulong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(ULONG, USHORT, unsigned long, unsigned short, -, USHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_int
+ * Function: H5T__conv_long_int
*
- * Purpose: Converts `long' to `int'
+ * Purpose: Converts `long' to `int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6133,18 +6133,18 @@ H5T__conv_long_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(LONG, INT, long, int, INT_MIN, INT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_uint
+ * Function: H5T__conv_long_uint
*
- * Purpose: Converts `long' to `unsigned int'
+ * Purpose: Converts `long' to `unsigned int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6156,18 +6156,18 @@ H5T__conv_long_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(LONG, UINT, long, unsigned, -, UINT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_int
+ * Function: H5T__conv_ulong_int
*
- * Purpose: Converts `unsigned long' to `int'
+ * Purpose: Converts `unsigned long' to `int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6179,18 +6179,18 @@ H5T__conv_ulong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(ULONG, INT, unsigned long, int, -, INT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_uint
+ * Function: H5T__conv_ulong_uint
*
- * Purpose: Converts `unsigned long' to `unsigned int'
+ * Purpose: Converts `unsigned long' to `unsigned int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6202,18 +6202,18 @@ H5T__conv_ulong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(ULONG, UINT, unsigned long, unsigned, -, UINT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_ulong
+ * Function: H5T__conv_long_ulong
*
- * Purpose: Converts `long' to `unsigned long'
+ * Purpose: Converts `long' to `unsigned long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6225,18 +6225,18 @@ H5T__conv_long_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_su(LONG, ULONG, long, unsigned long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_long
+ * Function: H5T__conv_ulong_long
*
- * Purpose: Converts `unsigned long' to `long'
+ * Purpose: Converts `unsigned long' to `long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6248,18 +6248,18 @@ H5T__conv_ulong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_us(ULONG, LONG, unsigned long, long, -, LONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_llong
+ * Function: H5T__conv_long_llong
*
- * Purpose: Converts `long' to `long long'
+ * Purpose: Converts `long' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6271,18 +6271,18 @@ H5T__conv_long_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(LONG, LLONG, long, long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_ullong
+ * Function: H5T__conv_long_ullong
*
- * Purpose: Converts `long' to `unsigned long long'
+ * Purpose: Converts `long' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6294,18 +6294,18 @@ H5T__conv_long_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(LONG, ULLONG, long, unsigned long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_llong
+ * Function: H5T__conv_ulong_llong
*
- * Purpose: Converts `unsigned long' to `long long'
+ * Purpose: Converts `unsigned long' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6317,18 +6317,18 @@ H5T__conv_ulong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(ULONG, LLONG, unsigned long, long long, -, LLONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_ullong
+ * Function: H5T__conv_ulong_ullong
*
- * Purpose: Converts `unsigned long' to `unsigned long long'
+ * Purpose: Converts `unsigned long' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6340,18 +6340,18 @@ H5T__conv_ulong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(ULONG, ULLONG, unsigned long, unsigned long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_schar
+ * Function: H5T__conv_llong_schar
*
- * Purpose: Converts `long long' to `signed char'
+ * Purpose: Converts `long long' to `signed char'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6363,18 +6363,18 @@ H5T__conv_llong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(LLONG, SCHAR, long long, signed char, SCHAR_MIN, SCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_uchar
+ * Function: H5T__conv_llong_uchar
*
- * Purpose: Converts `long long' to `unsigned char'
+ * Purpose: Converts `long long' to `unsigned char'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6386,18 +6386,18 @@ H5T__conv_llong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(LLONG, UCHAR, long long, unsigned char, -, UCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_schar
+ * Function: H5T__conv_ullong_schar
*
- * Purpose: Converts `unsigned long long' to `signed char'
+ * Purpose: Converts `unsigned long long' to `signed char'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6409,18 +6409,18 @@ H5T__conv_ullong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(ULLONG, SCHAR, unsigned long long, signed char, -, SCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_uchar
+ * Function: H5T__conv_ullong_uchar
*
- * Purpose: Converts `unsigned long long' to `unsigned char'
+ * Purpose: Converts `unsigned long long' to `unsigned char'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6432,18 +6432,18 @@ H5T__conv_ullong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(ULLONG, UCHAR, unsigned long long, unsigned char, -, UCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_short
+ * Function: H5T__conv_llong_short
*
- * Purpose: Converts `long long' to `short'
+ * Purpose: Converts `long long' to `short'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6455,18 +6455,18 @@ H5T__conv_llong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(LLONG, SHORT, long long, short, SHRT_MIN, SHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_ushort
+ * Function: H5T__conv_llong_ushort
*
- * Purpose: Converts `long long' to `unsigned short'
+ * Purpose: Converts `long long' to `unsigned short'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6478,18 +6478,18 @@ H5T__conv_llong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(LLONG, USHORT, long long, unsigned short, -, USHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_short
+ * Function: H5T__conv_ullong_short
*
- * Purpose: Converts `unsigned long long' to `short'
+ * Purpose: Converts `unsigned long long' to `short'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6501,18 +6501,18 @@ H5T__conv_ullong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(ULLONG, SHORT, unsigned long long, short, -, SHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_ushort
+ * Function: H5T__conv_ullong_ushort
*
- * Purpose: Converts `unsigned long long' to `unsigned short'
+ * Purpose: Converts `unsigned long long' to `unsigned short'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6524,18 +6524,18 @@ H5T__conv_ullong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(ULLONG, USHORT, unsigned long long, unsigned short, -, USHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_int
+ * Function: H5T__conv_llong_int
*
- * Purpose: Converts `long long' to `int'
+ * Purpose: Converts `long long' to `int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6547,18 +6547,18 @@ H5T__conv_llong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(LLONG, INT, long long, int, INT_MIN, INT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_uint
+ * Function: H5T__conv_llong_uint
*
- * Purpose: Converts `long long' to `unsigned int'
+ * Purpose: Converts `long long' to `unsigned int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6570,18 +6570,18 @@ H5T__conv_llong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(LLONG, UINT, long long, unsigned, -, UINT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_int
+ * Function: H5T__conv_ullong_int
*
- * Purpose: Converts `unsigned long long' to `int'
+ * Purpose: Converts `unsigned long long' to `int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6593,18 +6593,18 @@ H5T__conv_ullong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(ULLONG, INT, unsigned long long, int, -, INT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_uint
+ * Function: H5T__conv_ullong_uint
*
- * Purpose: Converts `unsigned long long' to `unsigned int'
+ * Purpose: Converts `unsigned long long' to `unsigned int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6616,18 +6616,18 @@ H5T__conv_ullong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(ULLONG, UINT, unsigned long long, unsigned, -, UINT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_long
+ * Function: H5T__conv_llong_long
*
- * Purpose: Converts `long long' to `long'
+ * Purpose: Converts `long long' to `long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6639,18 +6639,18 @@ H5T__conv_llong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(LLONG, LONG, long long, long, LONG_MIN, LONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_ulong
+ * Function: H5T__conv_llong_ulong
*
- * Purpose: Converts `long long' to `unsigned long'
+ * Purpose: Converts `long long' to `unsigned long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6662,18 +6662,18 @@ H5T__conv_llong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(LLONG, ULONG, long long, unsigned long, -, ULONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_long
+ * Function: H5T__conv_ullong_long
*
- * Purpose: Converts `unsigned long long' to `long'
+ * Purpose: Converts `unsigned long long' to `long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6685,18 +6685,18 @@ H5T__conv_ullong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(ULLONG, LONG, unsigned long long, long, -, LONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_ulong
+ * Function: H5T__conv_ullong_ulong
*
- * Purpose: Converts `unsigned long long' to `unsigned long'
+ * Purpose: Converts `unsigned long long' to `unsigned long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6708,18 +6708,18 @@ H5T__conv_ullong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(ULLONG, ULONG, unsigned long long, unsigned long, -, ULONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_ullong
+ * Function: H5T__conv_llong_ullong
*
- * Purpose: Converts `long long' to `unsigned long long'
+ * Purpose: Converts `long long' to `unsigned long long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6731,18 +6731,18 @@ H5T__conv_llong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_su(LLONG, ULLONG, long long, unsigned long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_llong
+ * Function: H5T__conv_ullong_llong
*
- * Purpose: Converts `unsigned long long' to `long long'
+ * Purpose: Converts `unsigned long long' to `long long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6754,17 +6754,17 @@ H5T__conv_ullong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_us(ULLONG, LLONG, unsigned long long, long long, -, LLONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_double
+ * Function: H5T__conv_float_double
*
- * Purpose: Convert native `float' to native `double' using hardware.
- * This is a fast special case.
+ * Purpose: Convert native `float' to native `double' using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Tuesday, June 23, 1998
+ * Programmer: Robb Matzke
+ * Tuesday, June 23, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6776,17 +6776,17 @@ H5T__conv_float_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_fF(FLOAT, DOUBLE, float, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_ldouble
+ * Function: H5T__conv_float_ldouble
*
- * Purpose: Convert native `float' to native `long double' using hardware.
- * This is a fast special case.
+ * Purpose: Convert native `float' to native `long double' using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, Feb 25, 2005
+ * Programmer: Raymond Lu
+ * Friday, Feb 25, 2005
*
*-------------------------------------------------------------------------
*/
@@ -6800,17 +6800,17 @@ H5T__conv_float_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
}
#endif /* H5_SIZEOF_LONG_DOUBLE != 0 */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_float
+ * Function: H5T__conv_double_float
*
- * Purpose: Convert native `double' to native `float' using hardware.
- * This is a fast special case.
+ * Purpose: Convert native `double' to native `float' using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Tuesday, June 23, 1998
+ * Programmer: Robb Matzke
+ * Tuesday, June 23, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6822,17 +6822,17 @@ H5T__conv_double_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ff(DOUBLE, FLOAT, double, float, -FLT_MAX, FLT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_ldouble
+ * Function: H5T__conv_double_ldouble
*
- * Purpose: Convert native `double' to native `long double' using hardware.
- * This is a fast special case.
+ * Purpose: Convert native `double' to native `long double' using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, Feb 25, 2005
+ * Programmer: Raymond Lu
+ * Friday, Feb 25, 2005
*
*-------------------------------------------------------------------------
*/
@@ -6846,17 +6846,17 @@ H5T__conv_double_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
}
#endif /* H5_SIZEOF_LONG_DOUBLE != 0 */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_float
+ * Function: H5T__conv_ldouble_float
*
- * Purpose: Convert native `long double' to native `float' using hardware.
- * This is a fast special case.
+ * Purpose: Convert native `long double' to native `float' using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, Feb 25, 2005
+ * Programmer: Raymond Lu
+ * Friday, Feb 25, 2005
*
*-------------------------------------------------------------------------
*/
@@ -6870,17 +6870,17 @@ H5T__conv_ldouble_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
}
#endif /* H5_SIZEOF_LONG_DOUBLE != 0 */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_double
+ * Function: H5T__conv_ldouble_double
*
- * Purpose: Convert native `long double' to native `double' using hardware.
- * This is a fast special case.
+ * Purpose: Convert native `long double' to native `double' using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, Feb 25, 2005
+ * Programmer: Raymond Lu
+ * Friday, Feb 25, 2005
*
*-------------------------------------------------------------------------
*/
@@ -6894,17 +6894,17 @@ H5T__conv_ldouble_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
}
#endif /* H5_SIZEOF_LONG_DOUBLE != 0 */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_float
+ * Function: H5T__conv_schar_float
*
- * Purpose: Convert native signed char to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native signed char to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -6916,17 +6916,17 @@ H5T__conv_schar_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(SCHAR, FLOAT, signed char, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_double
+ * Function: H5T__conv_schar_double
*
- * Purpose: Convert native signed char to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native signed char to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -6938,17 +6938,17 @@ H5T__conv_schar_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(SCHAR, DOUBLE, signed char, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_ldouble
+ * Function: H5T__conv_schar_ldouble
*
- * Purpose: Convert native signed char to native long double using
+ * Purpose: Convert native signed char to native long double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -6960,17 +6960,17 @@ H5T__conv_schar_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(SCHAR, LDOUBLE, signed char, long double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_float
+ * Function: H5T__conv_uchar_float
*
- * Purpose: Convert native unsigned char to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native unsigned char to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -6982,17 +6982,17 @@ H5T__conv_uchar_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(UCHAR, FLOAT, unsigned char, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_double
+ * Function: H5T__conv_uchar_double
*
- * Purpose: Convert native unsigned char to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native unsigned char to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7004,17 +7004,17 @@ H5T__conv_uchar_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(UCHAR, DOUBLE, unsigned char, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_ldouble
+ * Function: H5T__conv_uchar_ldouble
*
- * Purpose: Convert native unsigned char to native long double using
+ * Purpose: Convert native unsigned char to native long double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7026,17 +7026,17 @@ H5T__conv_uchar_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(UCHAR, LDOUBLE, unsigned char, long double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_float
+ * Function: H5T__conv_short_float
*
- * Purpose: Convert native short to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native short to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7048,17 +7048,17 @@ H5T__conv_short_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(SHORT, FLOAT, short, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_double
+ * Function: H5T__conv_short_double
*
- * Purpose: Convert native short to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native short to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7070,17 +7070,17 @@ H5T__conv_short_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(SHORT, DOUBLE, short, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_ldouble
+ * Function: H5T__conv_short_ldouble
*
- * Purpose: Convert native short to native long double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native short to native long double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7092,17 +7092,17 @@ H5T__conv_short_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(SHORT, LDOUBLE, short, long double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_float
+ * Function: H5T__conv_ushort_float
*
- * Purpose: Convert native unsigned short to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native unsigned short to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7114,17 +7114,17 @@ H5T__conv_ushort_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(USHORT, FLOAT, unsigned short, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_double
+ * Function: H5T__conv_ushort_double
*
- * Purpose: Convert native unsigned short to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native unsigned short to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7136,17 +7136,17 @@ H5T__conv_ushort_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(USHORT, DOUBLE, unsigned short, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_ldouble
+ * Function: H5T__conv_ushort_ldouble
*
- * Purpose: Convert native unsigned short to native long double using
+ * Purpose: Convert native unsigned short to native long double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7158,17 +7158,17 @@ H5T__conv_ushort_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(USHORT, LDOUBLE, unsigned short, long double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_float
+ * Function: H5T__conv_int_float
*
- * Purpose: Convert native integer to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native integer to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7180,17 +7180,17 @@ H5T__conv_int_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(INT, FLOAT, int, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_double
+ * Function: H5T__conv_int_double
*
- * Purpose: Convert native integer to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native integer to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7202,17 +7202,17 @@ H5T__conv_int_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(INT, DOUBLE, int, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_ldouble
+ * Function: H5T__conv_int_ldouble
*
- * Purpose: Convert native integer to native long double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native integer to native long double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7224,17 +7224,17 @@ H5T__conv_int_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(INT, LDOUBLE, int, long double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_float
+ * Function: H5T__conv_uint_float
*
- * Purpose: Convert native unsigned integer to native float using
+ * Purpose: Convert native unsigned integer to native float using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7246,17 +7246,17 @@ H5T__conv_uint_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(UINT, FLOAT, unsigned int, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_double
+ * Function: H5T__conv_uint_double
*
- * Purpose: Convert native unsigned integer to native double using
+ * Purpose: Convert native unsigned integer to native double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7268,17 +7268,17 @@ H5T__conv_uint_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(UINT, DOUBLE, unsigned int, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_ldouble
+ * Function: H5T__conv_uint_ldouble
*
- * Purpose: Convert native unsigned integer to native long double using
+ * Purpose: Convert native unsigned integer to native long double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7290,17 +7290,17 @@ H5T__conv_uint_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(UINT, LDOUBLE, unsigned int, long double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_float
+ * Function: H5T__conv_long_float
*
- * Purpose: Convert native long to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native long to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7312,17 +7312,17 @@ H5T__conv_long_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(LONG, FLOAT, long, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_double
+ * Function: H5T__conv_long_double
*
- * Purpose: Convert native long to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native long to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7334,17 +7334,17 @@ H5T__conv_long_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(LONG, DOUBLE, long, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_ldouble
+ * Function: H5T__conv_long_ldouble
*
- * Purpose: Convert native long to native long double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native long to native long double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7356,17 +7356,17 @@ H5T__conv_long_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(LONG, LDOUBLE, long, long double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_float
+ * Function: H5T__conv_ulong_float
*
- * Purpose: Convert native unsigned long to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native unsigned long to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7378,17 +7378,17 @@ H5T__conv_ulong_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(ULONG, FLOAT, unsigned long, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_double
+ * Function: H5T__conv_ulong_double
*
- * Purpose: Convert native unsigned long to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native unsigned long to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7400,17 +7400,17 @@ H5T__conv_ulong_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(ULONG, DOUBLE, unsigned long, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_ldouble
+ * Function: H5T__conv_ulong_ldouble
*
- * Purpose: Convert native unsigned long to native long double using
+ * Purpose: Convert native unsigned long to native long double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7422,17 +7422,17 @@ H5T__conv_ulong_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(ULONG, LDOUBLE, unsigned long, long double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_float
+ * Function: H5T__conv_llong_float
*
- * Purpose: Convert native long long to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native long long to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7444,17 +7444,17 @@ H5T__conv_llong_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(LLONG, FLOAT, long long, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_double
+ * Function: H5T__conv_llong_double
*
- * Purpose: Convert native long long to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native long long to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7466,17 +7466,17 @@ H5T__conv_llong_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(LLONG, DOUBLE, long long, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_ldouble
+ * Function: H5T__conv_llong_ldouble
*
- * Purpose: Convert native long long to native long double using
+ * Purpose: Convert native long long to native long double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7490,17 +7490,17 @@ H5T__conv_llong_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
}
#endif /* H5T_CONV_INTERNAL_LLONG_LDOUBLE */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_float
+ * Function: H5T__conv_ullong_float
*
- * Purpose: Convert native unsigned long long to native float using
+ * Purpose: Convert native unsigned long long to native float using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7512,17 +7512,17 @@ H5T__conv_ullong_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(ULLONG, FLOAT, unsigned long long, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_double
+ * Function: H5T__conv_ullong_double
*
- * Purpose: Convert native unsigned long long to native double using
+ * Purpose: Convert native unsigned long long to native double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7534,17 +7534,17 @@ H5T__conv_ullong_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(ULLONG, DOUBLE, unsigned long long, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_ldouble
+ * Function: H5T__conv_ullong_ldouble
*
- * Purpose: Convert native unsigned long long to native long double using
+ * Purpose: Convert native unsigned long long to native long double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7558,17 +7558,17 @@ H5T__conv_ullong_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
}
#endif /*H5T_CONV_INTERNAL_ULLONG_LDOUBLE*/
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_schar
+ * Function: H5T__conv_float_schar
*
- * Purpose: Convert native float to native signed char using
+ * Purpose: Convert native float to native signed char using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7582,17 +7582,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_uchar
+ * Function: H5T__conv_float_uchar
*
- * Purpose: Convert native float to native unsigned char using
+ * Purpose: Convert native float to native unsigned char using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7606,17 +7606,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_schar
+ * Function: H5T__conv_double_schar
*
- * Purpose: Convert native double to native signed char using
+ * Purpose: Convert native double to native signed char using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7630,17 +7630,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_uchar
+ * Function: H5T__conv_double_uchar
*
- * Purpose: Convert native double to native unsigned char using
+ * Purpose: Convert native double to native unsigned char using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7654,17 +7654,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_schar
+ * Function: H5T__conv_ldouble_schar
*
- * Purpose: Convert native long double to native signed char using
+ * Purpose: Convert native long double to native signed char using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7678,17 +7678,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_uchar
+ * Function: H5T__conv_ldouble_uchar
*
- * Purpose: Convert native long double to native unsigned char using
+ * Purpose: Convert native long double to native unsigned char using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7702,17 +7702,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_short
+ * Function: H5T__conv_float_short
*
- * Purpose: Convert native float to native short using
+ * Purpose: Convert native float to native short using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7726,17 +7726,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_ushort
+ * Function: H5T__conv_float_ushort
*
- * Purpose: Convert native float to native unsigned short using
+ * Purpose: Convert native float to native unsigned short using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7750,17 +7750,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_short
+ * Function: H5T__conv_double_short
*
- * Purpose: Convert native double to native short using
+ * Purpose: Convert native double to native short using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7774,17 +7774,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_ushort
+ * Function: H5T__conv_double_ushort
*
- * Purpose: Convert native double to native unsigned short using
+ * Purpose: Convert native double to native unsigned short using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7798,17 +7798,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_short
+ * Function: H5T__conv_ldouble_short
*
- * Purpose: Convert native long double to native short using
+ * Purpose: Convert native long double to native short using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7822,17 +7822,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_ushort
+ * Function: H5T__conv_ldouble_ushort
*
- * Purpose: Convert native long double to native unsigned short using
+ * Purpose: Convert native long double to native unsigned short using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7846,17 +7846,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_int
+ * Function: H5T__conv_float_int
*
- * Purpose: Convert native float to native int using
+ * Purpose: Convert native float to native int using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7870,17 +7870,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_uint
+ * Function: H5T__conv_float_uint
*
- * Purpose: Convert native float to native unsigned int using
+ * Purpose: Convert native float to native unsigned int using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7894,17 +7894,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_int
+ * Function: H5T__conv_double_int
*
- * Purpose: Convert native double to native int using
+ * Purpose: Convert native double to native int using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7918,17 +7918,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_uint
+ * Function: H5T__conv_double_uint
*
- * Purpose: Convert native double to native unsigned int using
+ * Purpose: Convert native double to native unsigned int using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7942,17 +7942,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_int
+ * Function: H5T__conv_ldouble_int
*
- * Purpose: Convert native long double to native int using
+ * Purpose: Convert native long double to native int using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7966,17 +7966,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_uint
+ * Function: H5T__conv_ldouble_uint
*
- * Purpose: Convert native long double to native unsigned int using
+ * Purpose: Convert native long double to native unsigned int using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7990,17 +7990,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_long
+ * Function: H5T__conv_float_long
*
- * Purpose: Convert native float to native long using
+ * Purpose: Convert native float to native long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8014,17 +8014,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_ulong
+ * Function: H5T__conv_float_ulong
*
- * Purpose: Convert native float to native unsigned long using
+ * Purpose: Convert native float to native unsigned long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8038,17 +8038,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_long
+ * Function: H5T__conv_double_long
*
- * Purpose: Convert native double to native long using
+ * Purpose: Convert native double to native long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8062,17 +8062,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_ulong
+ * Function: H5T__conv_double_ulong
*
- * Purpose: Convert native double to native unsigned long using
+ * Purpose: Convert native double to native unsigned long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8086,17 +8086,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_long
+ * Function: H5T__conv_ldouble_long
*
- * Purpose: Convert native long double to native long using
+ * Purpose: Convert native long double to native long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -8110,17 +8110,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_ulong
+ * Function: H5T__conv_ldouble_ulong
*
- * Purpose: Convert native long double to native unsigned long using
+ * Purpose: Convert native long double to native unsigned long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -8134,17 +8134,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_llong
+ * Function: H5T__conv_float_llong
*
- * Purpose: Convert native float to native long long using
+ * Purpose: Convert native float to native long long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8158,17 +8158,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_ullong
+ * Function: H5T__conv_float_ullong
*
- * Purpose: Convert native float to native unsigned long long using
+ * Purpose: Convert native float to native unsigned long long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8182,17 +8182,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_llong
+ * Function: H5T__conv_double_llong
*
- * Purpose: Convert native double to native long long using
+ * Purpose: Convert native double to native long long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8206,17 +8206,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_ullong
+ * Function: H5T__conv_double_ullong
*
- * Purpose: Convert native double to native unsigned long long using
+ * Purpose: Convert native double to native unsigned long long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8230,17 +8230,17 @@ H5_GCC_DIAG_OFF(float-equal)
H5_GCC_DIAG_ON(float-equal)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_llong
+ * Function: H5T__conv_ldouble_llong
*
- * Purpose: Convert native long double to native long long using
+ * Purpose: Convert native long double to native long long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -8256,17 +8256,17 @@ H5_GCC_DIAG_ON(float-equal)
}
#endif /*H5T_CONV_INTERNAL_LDOUBLE_LLONG*/
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_ullong
+ * Function: H5T__conv_ldouble_ullong
*
- * Purpose: Convert native long double to native unsigned long long using
+ * Purpose: Convert native long double to native unsigned long long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -8282,18 +8282,18 @@ H5_GCC_DIAG_ON(float-equal)
}
#endif /*H5T_CONV_INTERNAL_LDOUBLE_ULLONG*/
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_f_i
+ * Function: H5T__conv_f_i
*
- * Purpose: Convert one floating-point type to an integer. This is
+ * Purpose: Convert one floating-point type to an integer. This is
* the catch-all function for float-integer conversions and
* is probably not particularly fast.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Wednesday, Jan 21, 2004
+ * Programmer: Raymond Lu
+ * Wednesday, Jan 21, 2004
*
* Raymond Lu
* Wednesday, April 21, 2004
@@ -8310,28 +8310,28 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg)
{
/* Traversal-related variables */
- H5T_t *src_p; /*source datatype */
- H5T_t *dst_p; /*destination datatype */
- H5T_atomic_t src; /*atomic source info */
- H5T_atomic_t dst; /*atomic destination info */
- int direction; /*forward or backward traversal */
- size_t elmtno; /*element number */
- size_t half_size; /*half the type size */
+ H5T_t *src_p; /*source datatype */
+ H5T_t *dst_p; /*destination datatype */
+ H5T_atomic_t src; /*atomic source info */
+ H5T_atomic_t dst; /*atomic destination info */
+ int direction; /*forward or backward traversal */
+ size_t elmtno; /*element number */
+ size_t half_size; /*half the type size */
size_t tsize; /*type size for swapping bytes */
- size_t olap; /*num overlapping elements */
- uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
+ size_t olap; /*num overlapping elements */
+ uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
uint8_t *src_rev=NULL; /*order-reversed source buffer */
- uint8_t dbuf[64]; /*temp destination buffer */
+ uint8_t dbuf[64]; /*temp destination buffer */
uint8_t tmp1, tmp2; /*temp variables for swapping bytes*/
/* Conversion-related variables */
- hssize_t expo; /*source exponent */
+ hssize_t expo; /*source exponent */
hssize_t sign; /*source sign bit value */
uint8_t *int_buf=NULL; /*buffer for temporary value */
size_t buf_size; /*buffer size for temporary value */
- size_t i; /*miscellaneous counters */
- size_t first; /*first bit(MSB) in an integer */
- ssize_t sfirst; /*a signed version of `first' */
+ size_t i; /*miscellaneous counters */
+ size_t first; /*first bit(MSB) in an integer */
+ ssize_t sfirst; /*a signed version of `first' */
H5T_conv_cb_t cb_struct={NULL, NULL}; /*conversion callback structure */
hbool_t truncated; /*if fraction value is dropped */
hbool_t reverse; /*if reverse order of destination at the end */
@@ -8860,18 +8860,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_f_i() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_i_f
+ * Function: H5T__conv_i_f
*
- * Purpose: Convert one integer type to a floating-point type. This is
+ * Purpose: Convert one integer type to a floating-point type. This is
* the catch-all function for integer-float conversions and
* is probably not particularly fast.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, Feb 6, 2004
+ * Programmer: Raymond Lu
+ * Friday, Feb 6, 2004
*
*-------------------------------------------------------------------------
*/
@@ -8880,31 +8880,31 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg)
{
/* Traversal-related variables */
- H5T_t *src_p; /*source datatype */
- H5T_t *dst_p; /*destination datatype */
- H5T_atomic_t src; /*atomic source info */
- H5T_atomic_t dst; /*atomic destination info */
- int direction; /*forward or backward traversal */
- size_t elmtno; /*element number */
- size_t half_size; /*half the type size */
+ H5T_t *src_p; /*source datatype */
+ H5T_t *dst_p; /*destination datatype */
+ H5T_atomic_t src; /*atomic source info */
+ H5T_atomic_t dst; /*atomic destination info */
+ int direction; /*forward or backward traversal */
+ size_t elmtno; /*element number */
+ size_t half_size; /*half the type size */
size_t tsize; /*type size for swapping bytes */
- size_t olap; /*num overlapping elements */
- uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
+ size_t olap; /*num overlapping elements */
+ uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
uint8_t *src_rev = NULL; /*order-reversed source buffer */
- uint8_t dbuf[64]; /*temp destination buffer */
+ uint8_t dbuf[64]; /*temp destination buffer */
uint8_t tmp1, tmp2; /*temp variables for swapping bytes*/
/* Conversion-related variables */
- hsize_t expo; /*destination exponent */
- hsize_t expo_max; /*maximal possible exponent value */
+ hsize_t expo; /*destination exponent */
+ hsize_t expo_max; /*maximal possible exponent value */
size_t sign; /*source sign bit value */
hbool_t is_max_neg; /*source is maximal negative value*/
hbool_t do_round; /*whether there is roundup */
uint8_t *int_buf = NULL; /*buffer for temporary value */
size_t buf_size; /*buffer size for temporary value */
- size_t i; /*miscellaneous counters */
- size_t first; /*first bit(MSB) in an integer */
- ssize_t sfirst; /*a signed version of `first' */
+ size_t i; /*miscellaneous counters */
+ size_t first; /*first bit(MSB) in an integer */
+ ssize_t sfirst; /*a signed version of `first' */
H5T_conv_cb_t cb_struct = {NULL, NULL}; /*conversion callback structure */
H5T_conv_ret_t except_ret; /*return of callback function */
hbool_t reverse; /*if reverse the order of destination */
@@ -9036,12 +9036,12 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
/*
* What is the bit position(starting from 0 as first one) for the most significant
- * bit(MSB) of S which is set?
+ * bit(MSB) of S which is set?
*/
if(H5T_SGN_2 == src.u.i.sign) {
sfirst = H5T__bit_find(int_buf, (size_t)0, src.prec - 1, H5T_BIT_MSB, TRUE);
if(sign && sfirst < 0)
- /* The case 0x80...00, which is negative with maximal value */
+ /* The case 0x80...00, which is negative with maximal value */
is_max_neg = 1;
} else if(H5T_SGN_NONE == src.u.i.sign)
sfirst = H5T__bit_find(int_buf, (size_t)0, src.prec, H5T_BIT_MSB, TRUE);
@@ -9060,10 +9060,10 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
H5T__bit_neg(int_buf, (size_t)0, buf_size * 8);
sfirst = H5T__bit_find(int_buf, (size_t)0, src.prec - 1, H5T_BIT_MSB, TRUE);
} else {
- /* If it's maximal negative number 0x80...000, treat it as if it overflowed
- * (create a carry) to help conversion. i.e. a character type number 0x80
- * is treated as 0x100.
- */
+ /* If it's maximal negative number 0x80...000, treat it as if it overflowed
+ * (create a carry) to help conversion. i.e. a character type number 0x80
+ * is treated as 0x100.
+ */
sfirst = (ssize_t)(src.prec - 1);
is_max_neg = 0;
}
@@ -9072,7 +9072,7 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
/* Sign bit has been negated if bit vector isn't 0x80...00. Set all bits in front of
* sign bit to 0 in the temporary buffer because they're all negated from the previous
- * step. */
+ * step. */
H5T__bit_set(int_buf, src.prec, (buf_size * 8) - src.prec, 0);
/* Set sign bit in destination */
@@ -9096,13 +9096,13 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
if (H5T_NORM_IMPLIED==dst.u.f.norm) {
/* Imply first bit */
H5T__bit_set(int_buf, first, (size_t)1, 0);
- } else if (H5T_NORM_NONE==dst.u.f.norm) {
- first++;
- }
+ } else if (H5T_NORM_NONE==dst.u.f.norm) {
+ first++;
+ }
/* Roundup for mantissa */
if(first > dst.u.f.msize) {
- /* If the bit sequence is bigger than the mantissa part, there'll be some
+ /* If the bit sequence is bigger than the mantissa part, there'll be some
* precision loss. Let user's handler deal with the case if it's present
*/
if(cb_struct.func) {
@@ -9117,15 +9117,15 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
} else if(except_ret == H5T_CONV_ABORT)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception")
- /* If user's exception handler does deal with it, we do it by dropping off the
- * extra bits at the end and do rounding. If we have .50...0(decimal) after radix
- * point, we do roundup when the least significant digit before radix is odd, we do
- * rounddown if it's even.
- */
+ /* If user's exception handler does deal with it, we do it by dropping off the
+ * extra bits at the end and do rounding. If we have .50...0(decimal) after radix
+ * point, we do roundup when the least significant digit before radix is odd, we do
+ * rounddown if it's even.
+ */
/* Check 1st dropoff bit, see if it's set. */
if(H5T__bit_get_d(int_buf, ((first - dst.u.f.msize) - 1), (size_t)1)) {
- /* Check all bits after 1st dropoff bit, see if any of them is set. */
+ /* Check all bits after 1st dropoff bit, see if any of them is set. */
if(((first - dst.u.f.msize) - 1) > 0 && H5T__bit_get_d(int_buf, (size_t)0, ((first - dst.u.f.msize) - 1)))
do_round = 1;
else { /* The .50...0 case */
@@ -9133,7 +9133,7 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
if(H5T__bit_get_d(int_buf, (first - dst.u.f.msize), (size_t)1))
do_round = 1;
}
- }
+ }
/* Right shift to drop off extra bits */
H5T__bit_shift(int_buf, (ssize_t)(dst.u.f.msize - first), (size_t)0, buf_size * 8);
@@ -9142,28 +9142,28 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
H5T__bit_inc(int_buf, (size_t)0, buf_size * 8);
do_round = 0;
- /* If integer is like 0x0ff...fff and we need to round up the
- * last f, we get 0x100...000. Treat this special case here.
- */
- if(H5T__bit_get_d(int_buf, dst.u.f.msize, (size_t)1)) {
- if (H5T_NORM_IMPLIED==dst.u.f.norm) {
- /* The bit at this 1's position was impled already, so this
- * number should be 0x200...000. We need to increment the
- * exponent in this case.
- */
- expo++;
- } else if (H5T_NORM_NONE==dst.u.f.norm) {
- /* Right shift 1 bit to let the carried 1 fit in the mantissa,
- * and increment exponent by 1.
- */
+ /* If integer is like 0x0ff...fff and we need to round up the
+ * last f, we get 0x100...000. Treat this special case here.
+ */
+ if(H5T__bit_get_d(int_buf, dst.u.f.msize, (size_t)1)) {
+ if (H5T_NORM_IMPLIED==dst.u.f.norm) {
+ /* The bit at this 1's position was impled already, so this
+ * number should be 0x200...000. We need to increment the
+ * exponent in this case.
+ */
+ expo++;
+ } else if (H5T_NORM_NONE==dst.u.f.norm) {
+ /* Right shift 1 bit to let the carried 1 fit in the mantissa,
+ * and increment exponent by 1.
+ */
H5T__bit_shift(int_buf, (ssize_t)-1, (size_t)0, buf_size * 8);
- expo++;
- }
- }
+ expo++;
+ }
+ }
}
} else {
/* The bit sequence can fit mantissa part. Left shift to fit in from high-order of
- * bit position. */
+ * bit position. */
H5T__bit_shift(int_buf, (ssize_t)(dst.u.f.msize - first), (size_t)0, dst.u.f.msize);
}
@@ -9273,11 +9273,11 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_i_f() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T_reverse_order
+ * Function: H5T_reverse_order
*
- * Purpose: Internal assisting function to reverse the order of
+ * Purpose: Internal assisting function to reverse the order of
* a sequence of byte when it's big endian or VAX order.
* The byte sequence simulates the endian order.
*
@@ -9285,8 +9285,8 @@ done:
*
* Failure: Null
*
- * Programmer: Raymond Lu
- * April 26, 2004
+ * Programmer: Raymond Lu
+ * April 26, 2004
*
*-------------------------------------------------------------------------
*/
diff --git a/src/H5dbg.c b/src/H5dbg.c
index dd50034..214d865 100644
--- a/src/H5dbg.c
+++ b/src/H5dbg.c
@@ -13,11 +13,11 @@
/*-------------------------------------------------------------------------
*
- * Created: H5dbg.c
- * Mar 4 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Created: H5dbg.c
+ * Mar 4 2006
+ * Quincey Koziol <koziol@ncsa.uiuc.edu>
*
- * Purpose: Generic debugging routines
+ * Purpose: Generic debugging routines
*
*-------------------------------------------------------------------------
*/
@@ -29,7 +29,7 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
+#include "H5private.h" /* Generic Functions */
/****************/
/* Local Macros */
@@ -61,17 +61,17 @@
/*******************/
-
+
/*-------------------------------------------------------------------------
- * Function: H5_buffer_dump
+ * 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
- * koziol@ncsa.uiuc.edu
- * Mar 4 2006
+ * Programmer: Quincey Koziol
+ * koziol@ncsa.uiuc.edu
+ * Mar 4 2006
*
*-------------------------------------------------------------------------
*/
@@ -79,7 +79,7 @@ herr_t
H5_buffer_dump(FILE *stream, int indent, const uint8_t *buf,
const uint8_t *marker, size_t buf_offset, size_t buf_size)
{
- size_t u, v; /* Local index variable */
+ size_t u, v; /* Local index variable */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -96,47 +96,47 @@ H5_buffer_dump(FILE *stream, int indent, const uint8_t *buf,
* Print the buffer in a VMS-style octal dump.
*/
HDfprintf(stream, "%*sData follows (`__' indicates free region)...\n",
- indent, "");
+ indent, "");
for(u = 0; u < buf_size; u += 16) {
- uint8_t c;
+ 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
- fprintf(stream, " ");
- if(7 == v)
- HDfputc(' ', stream);
- } /* end for */
+ 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)
- HDfputc(' ', stream);
- } /* end for */
-
- HDfputc('\n', stream);
+ 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 4424009..c744c39 100644
--- a/src/H5detect.c
+++ b/src/H5detect.c
@@ -43,6 +43,9 @@ static const char *FileHeader = "\n\
*/
#undef NDEBUG
#include "H5private.h"
+/* Do NOT use HDfprintf in this file as it is not linked with the library,
+ * which contains the H5system.c file in which the function is defined.
+ */
#include "H5Tpublic.h"
#include "H5Rpublic.h"
@@ -150,7 +153,7 @@ static H5JMP_BUF jbuf_g;
#endif
-
+
/*-------------------------------------------------------------------------
* Function: precision
*
@@ -203,7 +206,7 @@ precision (detected_t *d)
}
}
-
+
/*-------------------------------------------------------------------------
* Function: DETECT_I/DETECT_BYTE
*
@@ -277,7 +280,7 @@ precision (detected_t *d)
DETECT_I_BYTE_CORE(TYPE,VAR,INFO,TYPE) \
}
-
+
/*-------------------------------------------------------------------------
* Function: DETECT_F
*
@@ -374,7 +377,7 @@ precision (detected_t *d)
} \
}
-
+
/*-------------------------------------------------------------------------
* Function: DETECT_M
*
@@ -450,7 +453,7 @@ precision (detected_t *d)
#if defined(H5LONGJMP) && defined(H5_HAVE_SIGNAL)
-
+
/*-------------------------------------------------------------------------
* Function: sigsegv_handler
*
@@ -483,7 +486,7 @@ sigsegv_handler(int H5_ATTR_UNUSED signo)
#if defined(H5LONGJMP) && defined(H5_HAVE_SIGNAL)
-
+
/*-------------------------------------------------------------------------
* Function: sigbus_handler
*
@@ -516,7 +519,7 @@ sigbus_handler(int H5_ATTR_UNUSED signo)
#if defined(H5LONGJMP) && defined(H5_HAVE_SIGNAL)
-
+
/*-------------------------------------------------------------------------
* Function: sigill_handler
*
@@ -547,7 +550,7 @@ sigill_handler(int H5_ATTR_UNUSED signo)
}
#endif
-
+
/*-------------------------------------------------------------------------
* Function: print_results
*
@@ -826,7 +829,7 @@ done:\n\
fprintf(rawoutstream, "/* sigill_handler called: %d times */\n", sigill_handler_called_g);
} /* end print_results() */
-
+
/*-------------------------------------------------------------------------
* Function: iprint
*
@@ -916,7 +919,7 @@ iprint(detected_t *d)
}
-
+
/*-------------------------------------------------------------------------
* Function: byte_cmp
*
@@ -943,7 +946,7 @@ byte_cmp(int n, const void *_a, const void *_b, const unsigned char *pad_mask)
return -1;
}
-
+
/*-------------------------------------------------------------------------
* Function: bit_cmp
*
@@ -984,7 +987,7 @@ bit_cmp(unsigned int nbytes, int *perm, void *_a, void *_b,
return 0;
}
-
+
/*-------------------------------------------------------------------------
* Function: fix_order
*
@@ -1052,7 +1055,7 @@ fix_order(int n, int last, int *perm, const char **mesg)
}
}
-
+
/*-------------------------------------------------------------------------
* Function: imp_bit
*
@@ -1106,7 +1109,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
*
@@ -1137,7 +1140,7 @@ find_bias(unsigned int epos, unsigned int esize, int *perm, void *_a)
return bias;
}
-
+
/*-------------------------------------------------------------------------
* Function: print_header
*
@@ -1278,7 +1281,7 @@ bit.\n";
}
-
+
/*-------------------------------------------------------------------------
* Function: detect_C89_integers
*
@@ -1300,7 +1303,7 @@ detect_C89_integers(void)
DETECT_I(unsigned long, ULONG, d_g[nd_g]); nd_g++;
}
-
+
/*-------------------------------------------------------------------------
* Function: detect_C89_floats
*
@@ -1316,7 +1319,7 @@ detect_C89_floats(void)
DETECT_F(double, DOUBLE, d_g[nd_g]); nd_g++;
}
-
+
/*-------------------------------------------------------------------------
* Function: detect_C99_integers8
*
@@ -1372,7 +1375,7 @@ detect_C99_integers8(void)
#endif
}
-
+
/*-------------------------------------------------------------------------
* Function: detect_C99_integers16
*
@@ -1404,7 +1407,7 @@ detect_C99_integers16(void)
#endif
}
-
+
/*-------------------------------------------------------------------------
* Function: detect_C99_integers32
*
@@ -1436,7 +1439,7 @@ detect_C99_integers32(void)
#endif
}
-
+
/*-------------------------------------------------------------------------
* Function: detect_C99_integers64
*
@@ -1482,7 +1485,7 @@ detect_C99_integers64(void)
#endif
}
-
+
/*-------------------------------------------------------------------------
* Function: detect_C99_integers
*
@@ -1502,7 +1505,7 @@ detect_C99_integers(void)
detect_C99_integers64();
}
-
+
/*-------------------------------------------------------------------------
* Function: detect_C99_floats
*
@@ -1527,7 +1530,7 @@ detect_C99_floats(void)
#endif
}
-
+
/*-------------------------------------------------------------------------
* Function: detect_alignments
*
@@ -1604,7 +1607,7 @@ static int verify_signal_handlers(int signum, void (*handler)(int))
}
#endif
-
+
/*-------------------------------------------------------------------------
* Function: main
*
diff --git a/src/H5make_libsettings.c b/src/H5make_libsettings.c
index da7c8d9..fd67184 100644
--- a/src/H5make_libsettings.c
+++ b/src/H5make_libsettings.c
@@ -35,12 +35,15 @@ static const char *FileHeader = "\n\
#include <stdio.h>
#include <time.h>
#include "H5private.h"
+/* Do NOT use HDfprintf in this file as it is not linked with the library,
+ * which contains the H5system.c file in which the function is defined.
+ */
#define LIBSETTINGSFNAME "libhdf5.settings"
FILE *rawoutstream = NULL;
-
+
/*-------------------------------------------------------------------------
* Function: insert_libhdf5_settings
*
@@ -105,7 +108,7 @@ insert_libhdf5_settings(FILE *flibinfo)
#endif
} /* insert_libhdf5_settings() */
-
+
/*-------------------------------------------------------------------------
* Function: make_libinfo
*
@@ -123,7 +126,7 @@ make_libinfo(void)
insert_libhdf5_settings(rawoutstream);
}
-
+
/*-------------------------------------------------------------------------
* Function: print_header
*
@@ -229,7 +232,7 @@ information about the library build configuration\n";
fprintf(rawoutstream, "\n */\n\n");
}
-
+
/*-------------------------------------------------------------------------
* Function: print_footer
*
@@ -244,7 +247,7 @@ print_footer(void)
/* nothing */
}
-
+
/*-------------------------------------------------------------------------
* Function: main
*
diff --git a/src/H5timer.c b/src/H5timer.c
index 0ba8bd1..a9ad519 100644
--- a/src/H5timer.c
+++ b/src/H5timer.c
@@ -13,11 +13,11 @@
/*-------------------------------------------------------------------------
*
- * Created: H5timer.c
- * Aug 21 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Created: H5timer.c
+ * Aug 21 2006
+ * Quincey Koziol <koziol@hdfgroup.org>
*
- * Purpose: Internal 'timer' routines & support routines.
+ * Purpose: Internal 'timer' routines & support routines.
*
*-------------------------------------------------------------------------
*/
@@ -30,7 +30,7 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
+#include "H5private.h" /* Generic Functions */
/* We need this for the struct rusage declaration */
#if defined(H5_HAVE_GETRUSAGE) && defined(H5_HAVE_SYS_RESOURCE_H)
@@ -76,16 +76,16 @@
/* Local Variables */
/*******************/
-
+
/*-------------------------------------------------------------------------
- * Function: H5_timer_reset
+ * Function: H5_timer_reset
*
- * Purpose: Resets the timer struct to zero. Use this to reset a timer
- * that's being used as an accumulator for summing times.
+ * Purpose: Resets the timer struct to zero. Use this to reset a timer
+ * that's being used as an accumulator for summing times.
*
- * Return: void
+ * Return: void
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, April 16, 1998
*
*-------------------------------------------------------------------------
@@ -97,15 +97,15 @@ H5_timer_reset (H5_timer_t *timer)
HDmemset(timer, 0, sizeof *timer);
} /* end H5_timer_reset() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5_timer_begin
+ * Function: H5_timer_begin
*
- * Purpose: Initialize a timer to time something.
+ * Purpose: Initialize a timer to time something.
*
- * Return: void
+ * Return: void
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, April 16, 1998
*
*-------------------------------------------------------------------------
@@ -114,10 +114,10 @@ void
H5_timer_begin (H5_timer_t *timer)
{
#ifdef H5_HAVE_GETRUSAGE
- struct rusage rusage;
+ struct rusage rusage;
#endif
#ifdef H5_HAVE_GETTIMEOFDAY
- struct timeval etime;
+ struct timeval etime;
#endif
HDassert(timer);
@@ -140,18 +140,18 @@ H5_timer_begin (H5_timer_t *timer)
#endif
} /* end H5_timer_begin() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5_timer_end
+ * Function: H5_timer_end
*
- * Purpose: This function should be called at the end of a timed region.
- * The SUM is an optional pointer which will accumulate times.
- * TMS is the same struct that was passed to H5_timer_start().
- * On return, TMS will contain total times for the timed region.
+ * Purpose: This function should be called at the end of a timed region.
+ * The SUM is an optional pointer which will accumulate times.
+ * TMS is the same struct that was passed to H5_timer_start().
+ * On return, TMS will contain total times for the timed region.
*
- * Return: void
+ * Return: void
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, April 16, 1998
*
*-------------------------------------------------------------------------
@@ -159,7 +159,7 @@ H5_timer_begin (H5_timer_t *timer)
void
H5_timer_end (H5_timer_t *sum/*in,out*/, H5_timer_t *timer/*in,out*/)
{
- H5_timer_t now;
+ H5_timer_t now;
HDassert(timer);
H5_timer_begin(&now);
@@ -175,28 +175,28 @@ H5_timer_end (H5_timer_t *sum/*in,out*/, H5_timer_t *timer/*in,out*/)
}
} /* end H5_timer_end() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5_bandwidth
+ * Function: H5_bandwidth
*
- * Purpose: Prints the bandwidth (bytes per second) in a field 10
- * characters wide widh four digits of precision like this:
+ * Purpose: Prints the bandwidth (bytes per second) in a field 10
+ * characters wide widh four digits of precision like this:
*
- * NaN If <=0 seconds
- * 1234. TB/s
- * 123.4 TB/s
- * 12.34 GB/s
- * 1.234 MB/s
- * 4.000 kB/s
- * 1.000 B/s
- * 0.000 B/s If NBYTES==0
- * 1.2345e-10 For bandwidth less than 1
- * 6.7893e+94 For exceptionally large values
- * 6.678e+106 For really big values
+ * NaN If <=0 seconds
+ * 1234. TB/s
+ * 123.4 TB/s
+ * 12.34 GB/s
+ * 1.234 MB/s
+ * 4.000 kB/s
+ * 1.000 B/s
+ * 0.000 B/s If NBYTES==0
+ * 1.2345e-10 For bandwidth less than 1
+ * 6.7893e+94 For exceptionally large values
+ * 6.678e+106 For really big values
*
- * Return: void
+ * Return: void
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 5, 1998
*
*-------------------------------------------------------------------------
@@ -204,7 +204,7 @@ H5_timer_end (H5_timer_t *sum/*in,out*/, H5_timer_t *timer/*in,out*/)
void
H5_bandwidth(char *buf/*out*/, double nbytes, double nseconds)
{
- double bw;
+ double bw;
if(nseconds <= (double)0.0F)
HDstrcpy(buf, " NaN");
@@ -213,39 +213,39 @@ H5_bandwidth(char *buf/*out*/, double nbytes, double nseconds)
if(H5_DBL_ABS_EQUAL(bw, (double)0.0F))
HDstrcpy(buf, "0.000 B/s");
else if(bw < (double)1.0F)
- sprintf(buf, "%10.4e", bw);
+ HDsprintf(buf, "%10.4e", bw);
else if(bw < (double)H5_KB) {
- sprintf(buf, "%05.4f", bw);
+ HDsprintf(buf, "%05.4f", bw);
HDstrcpy(buf+5, " B/s");
} else if(bw < (double)H5_MB) {
- sprintf(buf, "%05.4f", bw / (double)H5_KB);
+ HDsprintf(buf, "%05.4f", bw / (double)H5_KB);
HDstrcpy(buf+5, " kB/s");
} else if(bw < (double)H5_GB) {
- sprintf(buf, "%05.4f", bw / (double)H5_MB);
+ HDsprintf(buf, "%05.4f", bw / (double)H5_MB);
HDstrcpy(buf+5, " MB/s");
} else if(bw < (double)H5_TB) {
- sprintf(buf, "%05.4f", bw / (double)H5_GB);
+ HDsprintf(buf, "%05.4f", bw / (double)H5_GB);
HDstrcpy(buf+5, " GB/s");
} else if(bw < (double)H5_PB) {
- sprintf(buf, "%05.4f", bw / (double)H5_TB);
+ HDsprintf(buf, "%05.4f", bw / (double)H5_TB);
HDstrcpy(buf+5, " TB/s");
} else {
- sprintf(buf, "%10.4e", bw);
+ HDsprintf(buf, "%10.4e", bw);
if(HDstrlen(buf) > 10)
- sprintf(buf, "%10.3e", bw);
+ HDsprintf(buf, "%10.3e", bw);
}
}
} /* end H5_bandwidth() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5_now
+ * Function: H5_now
*
- * Purpose: Retrieves the current time, as seconds after the UNIX epoch.
+ * Purpose: Retrieves the current time, as seconds after the UNIX epoch.
*
- * Return: # of seconds from the epoch (can't fail)
+ * Return: # of seconds from the epoch (can't fail)
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, November 28, 2006
*
*-------------------------------------------------------------------------
@@ -253,7 +253,7 @@ H5_bandwidth(char *buf/*out*/, double nbytes, double nseconds)
time_t
H5_now(void)
{
- time_t now; /* Current time */
+ time_t now; /* Current time */
#ifdef H5_HAVE_GETTIMEOFDAY
{