summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2020-07-30 23:15:09 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-07-30 23:15:09 (GMT)
commit0bb87534a6a78d5a5bddd84b9aa4867826368d8b (patch)
tree830d41498d87478ea8cc22e2f6e36011008e8c6e /src
parent3e91eeb270efaa2075c80e81895066bccf1b1a47 (diff)
parent88aa0d5c76545eabf08be069a684fd7328eb4185 (diff)
downloadhdf5-0bb87534a6a78d5a5bddd84b9aa4867826368d8b.zip
hdf5-0bb87534a6a78d5a5bddd84b9aa4867826368d8b.tar.gz
hdf5-0bb87534a6a78d5a5bddd84b9aa4867826368d8b.tar.bz2
Merge remote-tracking branch 'hdffv/develop' into rebased-fprintf-experiment
Diffstat (limited to 'src')
-rw-r--r--src/H5Aint.c4
-rw-r--r--src/H5B2pkg.h2
-rw-r--r--src/H5B2private.h2
-rw-r--r--src/H5Bdbg.c204
-rw-r--r--src/H5Bmodule.h2
-rw-r--r--src/H5Bpkg.h2
-rw-r--r--src/H5Bprivate.h4
-rw-r--r--src/H5CXmodule.h2
-rw-r--r--src/H5Cmpio.c256
-rw-r--r--src/H5Dbtree2.c2
-rw-r--r--src/H5Dchunk.c24
-rw-r--r--src/H5Dearray.c398
-rw-r--r--src/H5Dfarray.c180
-rw-r--r--src/H5Dio.c21
-rw-r--r--src/H5Dlayout.c36
-rw-r--r--src/H5Dmodule.h2
-rw-r--r--src/H5Dmpio.c2
-rw-r--r--src/H5Dpkg.h2
-rw-r--r--src/H5Dselect.c2
-rw-r--r--src/H5EAdbg.c108
-rw-r--r--src/H5EAmodule.h2
-rw-r--r--src/H5EApkg.h2
-rw-r--r--src/H5EAprivate.h2
-rw-r--r--src/H5EAsblock.c8
-rw-r--r--src/H5Glink.c8
-rw-r--r--src/H5Gloc.c2
-rw-r--r--src/H5Gname.c23
-rw-r--r--src/H5Gnode.c19
-rw-r--r--src/H5HLmodule.h2
-rw-r--r--src/H5HLpkg.h2
-rw-r--r--src/H5HLprivate.h2
-rw-r--r--src/H5Olink.c19
-rw-r--r--src/H5Pdcpl.c20
-rw-r--r--src/H5Rint.c8
-rw-r--r--src/H5S.c652
-rw-r--r--src/H5Sall.c8
-rw-r--r--src/H5Sdbg.c25
-rw-r--r--src/H5Shyper.c250
-rw-r--r--src/H5Smpio.c32
-rw-r--r--src/H5Snone.c69
-rw-r--r--src/H5Spkg.h6
-rw-r--r--src/H5Spoint.c148
-rw-r--r--src/H5Sprivate.h1
-rw-r--r--src/H5Sselect.c9
-rw-r--r--src/H5Tconv.c20
-rw-r--r--src/H5Tref.c63
-rw-r--r--src/H5Zfletcher32.c2
-rw-r--r--src/H5Ztrans.c47
-rw-r--r--src/H5dbg.c3
-rw-r--r--src/H5timer.c31
50 files changed, 1348 insertions, 1392 deletions
diff --git a/src/H5Aint.c b/src/H5Aint.c
index 1a74abe..cd0ab80 100644
--- a/src/H5Aint.c
+++ b/src/H5Aint.c
@@ -616,6 +616,10 @@ H5A__read(const H5A_t *attr, const H5T_t *mem_type, void *buf)
HDassert(mem_type);
HDassert(buf);
+ /* Patch the top level file pointer in attr->shared->dt->shared->u.vlen.f if needed */
+ if(H5T_patch_vlen_file(attr->shared->dt, H5F_VOL_OBJ(attr->oloc.file)) < 0 )
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't patch VL datatype file pointer")
+
/* Create buffer for data to store on disk */
if((snelmts = H5S_GET_EXTENT_NPOINTS(attr->shared->ds)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTCOUNT, FAIL, "dataspace is invalid")
diff --git a/src/H5B2pkg.h b/src/H5B2pkg.h
index 338db5a..7d73752 100644
--- a/src/H5B2pkg.h
+++ b/src/H5B2pkg.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Monday, January 31, 2005
*
* Purpose: This file contains declarations which are visible only within
diff --git a/src/H5B2private.h b/src/H5B2private.h
index 0b64381..9303d4f 100644
--- a/src/H5B2private.h
+++ b/src/H5B2private.h
@@ -15,7 +15,7 @@
*
* Created: H5B2private.h
* Jan 31 2005
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Private header for library accessible B-tree routines.
*
diff --git a/src/H5Bdbg.c b/src/H5Bdbg.c
index 37a94f4..0d0a56d 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
*
- * Purpose: Debugging routines for B-link tree package.
+ * Purpose: Debugging routines for B-link tree package.
*
*-------------------------------------------------------------------------
*/
@@ -32,35 +32,33 @@
/***********/
/* 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
+ * 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)
+H5B_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, 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)
@@ -97,55 +95,53 @@ H5B_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
* 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 %" PRIuHADDR "\n", indent, "", fwidth,
- "Address of left sibling:",
- bt->left);
+ "Address of left sibling:",
+ bt->left);
HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\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 %" PRIuHADDR "\n", indent + 3, "", MAX(0, fwidth - 3),
- "Address:", bt->child[u]);
+ HDfprintf(stream, "%*sChild %d...\n", indent, "", u);
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\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:
@@ -157,16 +153,16 @@ done:
/*-------------------------------------------------------------------------
- * 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,20 +170,20 @@ 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
@@ -228,60 +224,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/H5Bmodule.h b/src/H5Bmodule.h
index bc46752..c8e1546 100644
--- a/src/H5Bmodule.h
+++ b/src/H5Bmodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5Bpkg.h b/src/H5Bpkg.h
index a451cab..a57584e 100644
--- a/src/H5Bpkg.h
+++ b/src/H5Bpkg.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Thursday, May 15, 2003
*
* Purpose: This file contains declarations which are visible only within
diff --git a/src/H5Bprivate.h b/src/H5Bprivate.h
index 5aa3628..55bf5b3 100644
--- a/src/H5Bprivate.h
+++ b/src/H5Bprivate.h
@@ -15,12 +15,10 @@
*
* Created: H5Bprivate.h
* Jul 10 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: Private non-prototype header.
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
diff --git a/src/H5CXmodule.h b/src/H5CXmodule.h
index f6a8f29..186f8aa 100644
--- a/src/H5CXmodule.h
+++ b/src/H5CXmodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@lbl.gov>
+ * Programmer: Quincey Koziol
* Sunday, February 25, 2018
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5Cmpio.c b/src/H5Cmpio.c
index 0ac4c4f..199c494 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
@@ -87,74 +87,74 @@ static herr_t H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring,
*
* 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
*
@@ -176,20 +176,20 @@ H5C_apply_candidate_list(H5F_t * f,
int i;
int m;
unsigned n;
- unsigned first_entry_to_flush;
- unsigned last_entry_to_flush;
- unsigned total_entries_to_clear = 0;
- unsigned total_entries_to_flush = 0;
+ unsigned first_entry_to_flush;
+ unsigned last_entry_to_flush;
+ unsigned total_entries_to_clear = 0;
+ unsigned total_entries_to_flush = 0;
unsigned * 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 */
@@ -413,10 +413,10 @@ done:
* Function: H5C_construct_candidate_list__clean_cache
*
* Purpose: Construct the list of entries that should be flushed to
- * clean all entries in the cache.
+ * 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
*
@@ -457,7 +457,7 @@ H5C_construct_candidate_list__clean_cache(H5C_t * cache_ptr)
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 );
@@ -522,10 +522,10 @@ done:
* 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.
+ * 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
*
@@ -582,7 +582,7 @@ H5C_construct_candidate_list__min_clean(H5C_t * cache_ptr)
(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) );
@@ -612,24 +612,24 @@ done:
* 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
*
@@ -644,22 +644,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)
@@ -706,7 +706,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);
@@ -715,7 +715,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 */
@@ -735,13 +735,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 */
}
}
@@ -769,7 +769,7 @@ H5C_mark_entries_as_clean(H5F_t * f,
* 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;
@@ -873,9 +873,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;
- herr_t ret_value = SUCCEED;
+ uint32_t clear_cnt;
+ H5C_cache_entry_t * entry_ptr = NULL;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
@@ -1084,7 +1084,7 @@ done:
/*-------------------------------------------------------------------------
* 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.
*
@@ -1113,9 +1113,9 @@ done:
* Return: Non-negative on success/Negative on failure.
*
* Programmer: John Mainzer
- * 2/10/17
+ * 2/10/17
*
- * Changes: None.
+ * Changes: None.
*
*-------------------------------------------------------------------------
*/
@@ -1124,17 +1124,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
@@ -1164,7 +1164,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 */
@@ -1206,7 +1206,7 @@ done:
/*-------------------------------------------------------------------------
* 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.
@@ -1235,7 +1235,7 @@ done:
* Return: Non-negative on success/Negative on failure.
*
* Programmer: John Mainzer
- * 2/10/17
+ * 2/10/17
*
*-------------------------------------------------------------------------
*/
diff --git a/src/H5Dbtree2.c b/src/H5Dbtree2.c
index 11bde2d..c254060 100644
--- a/src/H5Dbtree2.c
+++ b/src/H5Dbtree2.c
@@ -292,7 +292,7 @@ H5D__bt2_dst_context(void *_ctx)
/* Free array for chunk dimension sizes */
if(ctx->dim)
- (void)H5FL_ARR_FREE(uint32_t, ctx->dim);
+ H5FL_ARR_FREE(uint32_t, ctx->dim);
/* Release callback context */
ctx = H5FL_FREE(H5D_bt2_ctx_t, ctx);
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index 21b114e..74bc5c6 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -1914,7 +1914,7 @@ 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 */
- H5MM_memcpy(new_chunk_info->scaled, scaled, sizeof(hsize_t) * fm->f_ndims);
+ H5MM_memcpy(new_chunk_info->scaled, scaled, sizeof(hsize_t) * fm->f_ndims);
new_chunk_info->scaled[fm->f_ndims] = 0;
/* Insert the new chunk into the skip list */
@@ -2095,7 +2095,7 @@ H5D__create_chunk_mem_map_hyper(const H5D_chunk_map_t *fm)
for(u = 0; u < fm->f_ndims; u++) {
/* Compensate for the chunk offset */
H5_CHECK_OVERFLOW(coords[u], hsize_t, hssize_t);
- chunk_adjust[u] = adjust[u] - (hssize_t)coords[u]; /*lint !e771 The adjust array will always be initialized */
+ chunk_adjust[u] = adjust[u] - (hssize_t)coords[u];
} /* end for */
/* Adjust the selection */
@@ -2329,7 +2329,7 @@ H5D__chunk_mem_cb(void H5_ATTR_UNUSED *elem, const H5T_t H5_ATTR_UNUSED *type, u
{
H5D_chunk_map_t *fm = (H5D_chunk_map_t *)_fm; /* File<->memory chunk mapping info */
H5D_chunk_info_t *chunk_info; /* Chunk information for current chunk */
- hsize_t coords_in_mem[H5S_MAX_RANK]; /* Coordinates of element in memory */
+ hsize_t coords_in_mem[H5S_MAX_RANK]; /* Coordinates of element in memory */
hsize_t chunk_index; /* Chunk index */
herr_t ret_value = SUCCEED; /* Return value */
@@ -3147,8 +3147,8 @@ done:
/*-------------------------------------------------------------------------
* 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
*
@@ -5991,7 +5991,7 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
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, chunk_rec->scaled, udata->dset_dims))
must_filter = FALSE;
- } /* end if */
+ }
/* Check parameter for type conversion */
if(udata->do_convert) {
@@ -6029,7 +6029,7 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
HDassert(!H5F_addr_defined(chunk_rec->chunk_addr));
H5MM_memcpy(buf, udata->chunk, nbytes);
udata->chunk = NULL;
- } /* end if */
+ }
else {
H5D_rdcc_ent_t *ent = NULL; /* Cache entry */
unsigned idx; /* Index of chunk in cache, if present */
@@ -6062,13 +6062,13 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
H5_CHECKED_ASSIGN(nbytes, size_t, shared_fo->layout.u.chunk.size, uint32_t);
H5MM_memcpy(buf, ent->chunk, nbytes);
- } /* end if */
+ }
else {
/* read chunk data from the source file */
if(H5F_block_read(udata->file_src, H5FD_MEM_DRAW, chunk_rec->chunk_addr, nbytes, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_READERROR, H5_ITER_ERROR, "unable to read raw data chunk")
- } /* end else */
- } /* end else */
+ }
+ }
/* Need to uncompress filtered variable-length & reference data elements that are not found in chunk cache */
if(must_filter && (is_vlen || fix_ref) && !udata->chunk_in_cache) {
@@ -7201,7 +7201,7 @@ H5D__get_num_chunks(const H5D_t *dset, const H5S_t H5_ATTR_UNUSED *space, hsize_
if((dset->shared->layout.storage.u.chunk.ops->iterate)(&idx_info, H5D__get_num_chunks_cb, &num_chunks) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to retrieve allocated chunk information from index")
*nchunks = num_chunks;
- } /* end else */
+ }
done:
FUNC_LEAVE_NOAPI_TAG(ret_value)
@@ -7248,7 +7248,7 @@ H5D__get_chunk_info_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
/* Stop iterating */
ret_value = H5_ITER_STOP;
- } /* end if */
+ }
/* Go to the next chunk */
else
chunk_info->curr_idx++;
diff --git a/src/H5Dearray.c b/src/H5Dearray.c
index fbd3b04..f1a6a5e 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
+ * 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.
@@ -183,7 +183,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 */
}};
@@ -216,14 +216,14 @@ 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
*
*-------------------------------------------------------------------------
@@ -265,14 +265,14 @@ done:
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
@@ -295,14 +295,14 @@ H5D__earray_dst_context(void *_ctx)
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
@@ -325,14 +325,14 @@ H5D__earray_fill(void *nat_blk, size_t nelmts)
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
@@ -369,14 +369,14 @@ H5D__earray_encode(void *raw, const void *_elmt, size_t nelmts, void *_ctx)
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
@@ -413,14 +413,14 @@ H5D__earray_decode(const void *_raw, void *_elmt, size_t nelmts, void *_ctx)
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
@@ -447,14 +447,14 @@ H5D__earray_debug(FILE *stream, int indent, int fwidth, hsize_t idx,
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
@@ -478,14 +478,14 @@ H5D__earray_filt_fill(void *nat_blk, size_t nelmts)
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
@@ -525,14 +525,14 @@ H5D__earray_filt_encode(void *_raw, const void *_elmt, size_t nelmts, void *_ctx
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
@@ -571,14 +571,14 @@ H5D__earray_filt_decode(const void *_raw, void *_elmt, size_t nelmts, void *_ctx
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
@@ -606,15 +606,15 @@ H5D__earray_filt_debug(FILE *stream, int indent, int fwidth, hsize_t idx,
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
*/
@@ -680,15 +680,15 @@ done:
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
*/
@@ -710,16 +710,16 @@ H5D__earray_dst_dbg_context(void *_dbg_ctx)
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
*/
@@ -772,20 +772,20 @@ done:
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
*/
@@ -814,7 +814,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)
@@ -827,13 +827,13 @@ done:
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
@@ -862,7 +862,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 */
@@ -895,20 +895,20 @@ done:
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
*/
@@ -965,11 +965,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)
@@ -982,14 +982,14 @@ done:
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
*/
@@ -1006,13 +1006,13 @@ H5D__earray_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
*/
@@ -1021,7 +1021,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
@@ -1046,26 +1046,26 @@ 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:
@@ -1074,15 +1074,15 @@ done:
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
@@ -1092,7 +1092,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
@@ -1118,13 +1118,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);
@@ -1157,12 +1157,12 @@ 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)
@@ -1170,14 +1170,14 @@ done:
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
@@ -1224,13 +1224,13 @@ done:
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
*/
@@ -1257,8 +1257,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;
@@ -1283,18 +1283,18 @@ H5D__earray_idx_iterate_cb(hsize_t H5_ATTR_UNUSED idx, const void *_elmt, void *
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
@@ -1332,27 +1332,27 @@ 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:
@@ -1361,13 +1361,13 @@ done:
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
@@ -1377,7 +1377,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
@@ -1404,13 +1404,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);
@@ -1472,14 +1472,14 @@ done:
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
@@ -1509,19 +1509,19 @@ done:
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
@@ -1571,13 +1571,13 @@ done:
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
@@ -1626,13 +1626,13 @@ done:
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
@@ -1704,7 +1704,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
@@ -1722,13 +1722,13 @@ done:
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
@@ -1743,7 +1743,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;
@@ -1753,13 +1753,13 @@ H5D__earray_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
@@ -1780,13 +1780,13 @@ H5D__earray_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
@@ -1806,7 +1806,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 348aeb3..d83c191 100644
--- a/src/H5Dfarray.c
+++ b/src/H5Dfarray.c
@@ -261,14 +261,14 @@ done:
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
@@ -291,14 +291,14 @@ H5D__farray_dst_context(void *_ctx)
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
@@ -321,14 +321,14 @@ H5D__farray_fill(void *nat_blk, size_t nelmts)
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
@@ -365,14 +365,14 @@ H5D__farray_encode(void *raw, const void *_elmt, size_t nelmts, void *_ctx)
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
@@ -409,14 +409,14 @@ H5D__farray_decode(const void *_raw, void *_elmt, size_t nelmts, void *_ctx)
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
@@ -443,23 +443,23 @@ H5D__farray_debug(FILE *stream, int indent, int fwidth, hsize_t idx,
/*-------------------------------------------------------------------------
- * 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 */
@@ -518,16 +518,16 @@ done:
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
*/
@@ -549,14 +549,14 @@ H5D__farray_dst_dbg_context(void *_dbg_ctx)
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
@@ -580,14 +580,14 @@ H5D__farray_filt_fill(void *nat_blk, size_t nelmts)
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
@@ -627,14 +627,14 @@ H5D__farray_filt_encode(void *_raw, const void *_elmt, size_t nelmts, void *_ctx
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
@@ -673,14 +673,14 @@ H5D__farray_filt_decode(const void *_raw, void *_elmt, size_t nelmts, void *_ctx
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
@@ -708,15 +708,15 @@ H5D__farray_filt_debug(FILE *stream, int indent, int fwidth, hsize_t idx,
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
@@ -798,15 +798,15 @@ H5D__farray_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t H5_ATTR_UNU
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
@@ -849,19 +849,19 @@ done:
/*-------------------------------------------------------------------------
- * 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
@@ -930,13 +930,13 @@ done:
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
@@ -954,13 +954,13 @@ H5D__farray_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
/*-------------------------------------------------------------------------
- * 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
*
*-------------------------------------------------------------------------
*/
@@ -968,8 +968,8 @@ 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
diff --git a/src/H5Dio.c b/src/H5Dio.c
index 84b7e7a..a972e00 100644
--- a/src/H5Dio.c
+++ b/src/H5Dio.c
@@ -149,7 +149,7 @@ done:
* The PLIST_ID can be the constant H5P_DEFAULT in which
* case the default data transfer properties are used.
*
- * Return: SUCCEED/FAIL
+ * Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
* Thursday, December 4, 1997
@@ -271,7 +271,7 @@ done:
* The PLIST_ID can be the constant H5P_DEFAULT in which
* case the default data transfer properties are used.
*
- * Return: SUCCEED/FAIL
+ * Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
* Thursday, December 4, 1997
@@ -280,7 +280,7 @@ done:
*/
herr_t
H5Dwrite(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id,
- hid_t file_space_id, hid_t dxpl_id, const void *buf)
+ hid_t file_space_id, hid_t dxpl_id, const void *buf)
{
H5VL_object_t *vol_obj = NULL;
herr_t ret_value = SUCCEED; /* Return value */
@@ -410,7 +410,7 @@ H5D__read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
/* projected mem space must be discarded at the */
/* end of the function to avoid a memory leak. */
H5D_storage_t store; /* union of EFL and chunk pointer in file space */
- hsize_t nelmts; /* total number of elmts */
+ hsize_t nelmts; /* total number of elmts */
hbool_t io_op_init = FALSE; /* Whether the I/O op has been initialized */
char fake_char; /* Temporary variable for NULL buffer pointers */
herr_t ret_value = SUCCEED; /* Return value */
@@ -621,7 +621,7 @@ H5D__write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
/* projected mem space must be discarded at the */
/* end of the function to avoid a memory leak. */
H5D_storage_t store; /* union of EFL and chunk pointer in file space */
- hsize_t nelmts; /* total number of elmts */
+ hsize_t nelmts; /* total number of elmts */
hbool_t io_op_init = FALSE; /* Whether the I/O op has been initialized */
char fake_char; /* Temporary variable for NULL buffer pointers */
herr_t ret_value = SUCCEED; /* Return value */
@@ -1153,10 +1153,7 @@ H5D__ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset,
/* Append each of the "reason for breaking collective I/O" error messages to the
* local and global no collective cause strings */
- for (cause = 1, idx = 0;
- (cause < H5D_MPIO_NO_COLLECTIVE_MAX_CAUSE) &&
- (idx < cause_strings_len);
- cause <<= 1, idx++) {
+ for (cause = 1, idx = 0; (cause < H5D_MPIO_NO_COLLECTIVE_MAX_CAUSE) && (idx < cause_strings_len); cause <<= 1, idx++) {
size_t cause_strlen = HDstrlen(cause_strings[idx]);
if (cause & local_no_collective_cause) {
@@ -1166,8 +1163,7 @@ H5D__ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset,
if(local_error_message_previously_written)
HDstrncat(local_no_collective_cause_string, "; ", 2);
- HDstrncat(local_no_collective_cause_string,
- cause_strings[idx], cause_strlen);
+ HDstrncat(local_no_collective_cause_string, cause_strings[idx], cause_strlen);
local_error_message_previously_written = TRUE;
} /* end if */
@@ -1179,8 +1175,7 @@ H5D__ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset,
if(global_error_message_previously_written)
HDstrncat(global_no_collective_cause_string, "; ", 2);
- HDstrncat(global_no_collective_cause_string,
- cause_strings[idx], cause_strlen);
+ HDstrncat(global_no_collective_cause_string, cause_strings[idx], cause_strlen);
global_error_message_previously_written = TRUE;
} /* end if */
diff --git a/src/H5Dlayout.c b/src/H5Dlayout.c
index e257140..679a33b 100644
--- a/src/H5Dlayout.c
+++ b/src/H5Dlayout.c
@@ -66,7 +66,7 @@ const unsigned H5O_layout_ver_bounds[] = {
-
+
/*-------------------------------------------------------------------------
* Function: H5D__layout_set_io_ops
*
@@ -153,7 +153,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__layout_set_io_ops() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__layout_meta_size
*
@@ -284,7 +284,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__layout_meta_size() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__layout_set_version
*
@@ -322,7 +322,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__layout_set_version() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__layout_set_latest_indexing
*
@@ -362,7 +362,7 @@ H5D__layout_set_latest_indexing(H5O_layout_t *layout, const H5S_t *space,
if(ndims > 0) {
hsize_t max_dims[H5O_LAYOUT_NDIMS]; /* Maximum dimension sizes */
hsize_t cur_dims[H5O_LAYOUT_NDIMS]; /* Current dimension sizes */
- unsigned unlim_count = 0; /* Count of unlimited max. dimensions */
+ unsigned unlim_count = 0; /* Count of unlimited max. dimensions */
hbool_t single = TRUE; /* Fulfill single chunk indexing */
unsigned u; /* Local index variable */
@@ -446,7 +446,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__layout_set_latest_indexing() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__layout_oh_create
*
@@ -589,17 +589,17 @@ done:
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5D__layout_oh_create() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__layout_oh_read
*
- * Purpose: Read layout/pline/efl information for dataset
+ * Purpose: Read layout/pline/efl information for dataset
*
- * Return: Success: SUCCEED
- * Failure: FAIL
+ * Return: Success: SUCCEED
+ * Failure: FAIL
*
- * Programmer: Quincey Koziol
- * Monday, July 27, 2009
+ * Programmer: Quincey Koziol
+ * Monday, July 27, 2009
*
*-------------------------------------------------------------------------
*/
@@ -683,17 +683,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__layout_oh_read() */
-
+
/*-------------------------------------------------------------------------
* Function: H5D__layout_oh_write
*
- * Purpose: Write layout information for dataset
+ * Purpose: Write layout information for dataset
*
- * Return: Success: SUCCEED
- * Failure: FAIL
+ * Return: Success: SUCCEED
+ * Failure: FAIL
*
- * Programmer: Quincey Koziol
- * Monday, July 27, 2009
+ * Programmer: Quincey Koziol
+ * Monday, July 27, 2009
*
*-------------------------------------------------------------------------
*/
diff --git a/src/H5Dmodule.h b/src/H5Dmodule.h
index b259b69..27ccf54 100644
--- a/src/H5Dmodule.h
+++ b/src/H5Dmodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c
index 492902b..cfed02e 100644
--- a/src/H5Dmpio.c
+++ b/src/H5Dmpio.c
@@ -3272,7 +3272,7 @@ H5D__filtered_collective_chunk_entry_io(H5D_filtered_collective_io_info_t *chunk
if(H5S_close(dataspace) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "can't close dataspace")
dataspace = NULL;
- } /* end if */
+ }
H5MM_free(chunk_entry->async_info.receive_buffer_array[i]);
} /* end for */
diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h
index c46e38b6..37a27d3 100644
--- a/src/H5Dpkg.h
+++ b/src/H5Dpkg.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Monday, April 14, 2003
*
* Purpose: This file contains declarations which are visible only within
diff --git a/src/H5Dselect.c b/src/H5Dselect.c
index c5469c2..5a5c491 100644
--- a/src/H5Dselect.c
+++ b/src/H5Dselect.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.ued>
+/* Programmer: Quincey Koziol
* Thursday, September 30, 2004
*
* Purpose: Dataspace I/O functions.
diff --git a/src/H5EAdbg.c b/src/H5EAdbg.c
index 49bb447..678b661 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
*
- * 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 */
/****************/
@@ -79,15 +79,14 @@
/*-------------------------------------------------------------------------
- * 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
+ * Sep 11 2008
*
*-------------------------------------------------------------------------
*/
@@ -97,7 +96,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,59 +116,59 @@ 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 %" PRIuHSIZE "\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 %" PRIuHSIZE "\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 %" PRIuHSIZE "\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 %" PRIuHSIZE "\n", indent, "", fwidth,
- "Number of elements 'realized':",
- hdr->stats.stored.nelmts);
+ "Number of elements 'realized':",
+ hdr->stats.stored.nelmts);
HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\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() */
@@ -384,21 +383,20 @@ 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
+ * Sep 22 2008
*
*-------------------------------------------------------------------------
*/
@@ -432,7 +430,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 +442,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 +464,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/H5EAmodule.h b/src/H5EAmodule.h
index d3e06b7..c3a4c7c 100644
--- a/src/H5EAmodule.h
+++ b/src/H5EAmodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5EApkg.h b/src/H5EApkg.h
index bb3f39c..b70231d 100644
--- a/src/H5EApkg.h
+++ b/src/H5EApkg.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Tuesday, June 17, 2008
*
* Purpose: This file contains declarations which are visible only
diff --git a/src/H5EAprivate.h b/src/H5EAprivate.h
index 1195256..af0ef3a 100644
--- a/src/H5EAprivate.h
+++ b/src/H5EAprivate.h
@@ -15,7 +15,7 @@
*
* Created: H5EAprivate.h
* Jun 17 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Private header for library accessible extensible
* array routines.
diff --git a/src/H5EAsblock.c b/src/H5EAsblock.c
index b4671f8..fb7c458 100644
--- a/src/H5EAsblock.c
+++ b/src/H5EAsblock.c
@@ -15,7 +15,7 @@
*
* Created: H5EAsblock.c
* Sep 30 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Super block routines for extensible arrays.
*
@@ -98,7 +98,6 @@ H5FL_BLK_DEFINE(page_init);
* Return: Non-NULL pointer to super block on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 30 2008
*
*-------------------------------------------------------------------------
@@ -179,7 +178,6 @@ END_FUNC(PKG) /* end H5EA__sblock_alloc() */
* Return: Valid file address on success/HADDR_UNDEF on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 30 2008
*
*-------------------------------------------------------------------------
@@ -267,7 +265,6 @@ END_FUNC(PKG) /* end H5EA__sblock_create() */
* Return: Non-NULL pointer to data block on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 30 2008
*
*-------------------------------------------------------------------------
@@ -328,7 +325,6 @@ END_FUNC(PKG) /* end H5EA__sblock_protect() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 30 2008
*
*-------------------------------------------------------------------------
@@ -359,7 +355,6 @@ END_FUNC(PKG) /* end H5EA__sblock_unprotect() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 30 2008
*
*-------------------------------------------------------------------------
@@ -408,7 +403,6 @@ END_FUNC(PKG) /* end H5EA__sblock_delete() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 30 2008
*
*-------------------------------------------------------------------------
diff --git a/src/H5Glink.c b/src/H5Glink.c
index 6c42f1d..cbe5307 100644
--- a/src/H5Glink.c
+++ b/src/H5Glink.c
@@ -15,7 +15,7 @@
*
* Created: H5Glink.c
* Nov 13 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Functions for handling links in groups.
*
@@ -98,7 +98,6 @@ static int H5G_link_cmp_corder_dec(const void *lnk1, const void *lnk2);
* (i.e. same as strcmp())
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 5 2005
*
*-------------------------------------------------------------------------
@@ -125,7 +124,6 @@ H5G_link_cmp_name_inc(const void *lnk1, const void *lnk2)
* (i.e. opposite strcmp())
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 25 2006
*
*-------------------------------------------------------------------------
@@ -151,7 +149,6 @@ H5G_link_cmp_name_dec(const void *lnk1, const void *lnk2)
* as equal, their order in the sorted array is undefined.
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 6 2006
*
*-------------------------------------------------------------------------
@@ -186,7 +183,6 @@ H5G_link_cmp_corder_inc(const void *lnk1, const void *lnk2)
* as equal, their order in the sorted array is undefined.
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 6 2006
*
*-------------------------------------------------------------------------
@@ -217,7 +213,6 @@ H5G_link_cmp_corder_dec(const void *lnk1, const void *lnk2)
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 16 2006
*
*-------------------------------------------------------------------------
@@ -561,7 +556,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 13 2006
*
*-------------------------------------------------------------------------
diff --git a/src/H5Gloc.c b/src/H5Gloc.c
index 4d89abb..0243b41 100644
--- a/src/H5Gloc.c
+++ b/src/H5Gloc.c
@@ -15,7 +15,7 @@
*
* Created: H5Gloc.c
* Sep 13 2005
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Functions for working with group "locations"
*
diff --git a/src/H5Gname.c b/src/H5Gname.c
index 4b0f04c..e1004de 100644
--- a/src/H5Gname.c
+++ b/src/H5Gname.c
@@ -15,7 +15,7 @@
*
* Created: H5Gname.c
* Sep 12 2005
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Functions for handling group hierarchy paths.
*
@@ -123,7 +123,6 @@ H5FL_BLK_EXTERN(str_buf);
* Failure: Ptr to the null terminator of NAME.
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 11 1997
*
*-------------------------------------------------------------------------
@@ -216,7 +215,7 @@ done:
* Return: TRUE for valid prefix, FALSE for not a valid prefix, FAIL
* on error
*
- * Programmer: Quincey Koziol, koziol@ncsa.uiuc.edu
+ * Programmer: Quincey Koziol
*
* Date: September 24, 2002
*
@@ -281,7 +280,7 @@ done:
*
* Return: Pointer to reference counted string on success, NULL on error
*
- * Programmer: Quincey Koziol, koziol@ncsa.uiuc.edu
+ * Programmer: Quincey Koziol
*
* Date: August 19, 2005
*
@@ -343,7 +342,7 @@ done:
* Return: Success: Non-NULL, combined path
* Failure: NULL
*
- * Programmer: Quincey Koziol, koziol@ncsa.uiuc.edu
+ * Programmer: Quincey Koziol
* Tuesday, October 11, 2005
*
*-------------------------------------------------------------------------
@@ -379,7 +378,7 @@ H5G_build_fullpath_refstr_str(H5RS_str_t *prefix_r, const char *name)
*
* Return: Pointer to reference counted string on success, NULL on error
*
- * Programmer: Quincey Koziol, koziol@ncsa.uiuc.edu
+ * Programmer: Quincey Koziol
*
* Date: August 19, 2005
*
@@ -448,7 +447,7 @@ H5G__name_init(H5G_name_t *name, const char *path)
* Return: Success: Non-negative
* Failure: Negative
*
- * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
* Thursday, August 22, 2002
*
*-------------------------------------------------------------------------
@@ -552,10 +551,6 @@ H5G_name_copy(H5G_name_t *dst, const H5G_name_t *src, H5_copy_depth_t depth)
* Programmer: Quincey Koziol
* Tuesday, December 13, 2005
*
- * Modifications: Leon Arber
- * Oct. 18, 2006
- * Added functionality to get the name for a reference.
- *
*-------------------------------------------------------------------------
*/
ssize_t
@@ -639,7 +634,7 @@ H5G_name_reset(H5G_name_t *name)
*
* Return: Success
*
- * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
*
* Date: August 22, 2002
*
@@ -777,7 +772,7 @@ done:
*
* Return: Success: 0, Failure: -1
*
- * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
*
* Date: June 5, 2002
*
@@ -1060,7 +1055,7 @@ done:
*
* Return: Success: 0, Failure: -1
*
- * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
*
* Date: June 11, 2002
*
diff --git a/src/H5Gnode.c b/src/H5Gnode.c
index 9faa0b5..2e7b367 100644
--- a/src/H5Gnode.c
+++ b/src/H5Gnode.c
@@ -15,7 +15,7 @@
*
* Created: H5Gnode.c
* Jun 26 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: Functions for handling symbol table nodes. A
* symbol table node is a small collection of symbol
@@ -145,8 +145,6 @@ H5FL_SEQ_DEFINE(H5G_entry_t);
* Programmer: Robb Matzke
* Wednesday, October 8, 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static H5UC_t *
@@ -169,7 +167,6 @@ H5G_node_get_shared(const H5F_t *f, const void H5_ATTR_UNUSED *_udata)
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 8 1997
*
*-------------------------------------------------------------------------
@@ -199,7 +196,6 @@ H5G_node_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key)
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 8 1997
*
*-------------------------------------------------------------------------
@@ -270,7 +266,6 @@ H5G_node_debug_key(FILE *stream, int indent, int fwidth, const void *_key,
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Jan 15 2003
*
*-------------------------------------------------------------------------
@@ -310,7 +305,6 @@ H5G__node_free(H5G_node_t *sym)
* Failure: Negative
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jun 23 1997
*
*-------------------------------------------------------------------------
@@ -382,11 +376,8 @@ done:
* Failure: FAIL (same as LT_KEY<RT_KEY)
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jun 23 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -439,11 +430,8 @@ done:
* Failure: FAIL (same as UDATA < LT_KEY)
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jun 23 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -501,7 +489,6 @@ done:
* Failure: Negative if not found.
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jun 23 1997
*
*-------------------------------------------------------------------------
@@ -591,7 +578,6 @@ done:
* Failure: H5B_INS_ERROR, NEW_NODE_P might not be initialized.
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jun 24 1997
*
*-------------------------------------------------------------------------
@@ -951,7 +937,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jun 24 1997
*
*-------------------------------------------------------------------------
@@ -1368,7 +1353,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 19 2006
*
*-------------------------------------------------------------------------
@@ -1475,7 +1459,6 @@ H5G__node_iterate_size(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key,
* Return: 0(zero) on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 4 1997
*
*-------------------------------------------------------------------------
diff --git a/src/H5HLmodule.h b/src/H5HLmodule.h
index b0fd750..712c7c1 100644
--- a/src/H5HLmodule.h
+++ b/src/H5HLmodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5HLpkg.h b/src/H5HLpkg.h
index 44a2cfb..9891e10 100644
--- a/src/H5HLpkg.h
+++ b/src/H5HLpkg.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Wednesday, July 9, 2003
*
* Purpose: This file contains declarations which are visible
diff --git a/src/H5HLprivate.h b/src/H5HLprivate.h
index 7a53b25..60505ee 100644
--- a/src/H5HLprivate.h
+++ b/src/H5HLprivate.h
@@ -15,7 +15,7 @@
*
* Created: H5HLprivate.h
* Jul 16 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: Private declarations for the H5HL (local heap) package.
*
diff --git a/src/H5Olink.c b/src/H5Olink.c
index f052a53..056208e 100644
--- a/src/H5Olink.c
+++ b/src/H5Olink.c
@@ -119,11 +119,12 @@ H5FL_DEFINE_STATIC(H5O_link_t);
static void *
H5O__link_decode(H5F_t *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)
+ size_t p_size, const uint8_t *p)
{
H5O_link_t *lnk = NULL; /* Pointer to link message */
size_t len = 0; /* Length of a string in the message */
unsigned char link_flags; /* Flags for encoding link info */
+ const uint8_t *p_end = p + p_size; /* End of the p buffer */
void *ret_value = NULL; /* Return value */
FUNC_ENTER_STATIC
@@ -199,6 +200,11 @@ H5O__link_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh,
if(len == 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "invalid name length")
+ /* Make sure that length doesn't exceed buffer size, which could occur
+ when the file is corrupted */
+ if(p + len > p_end)
+ HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "name length causes read past end of buffer")
+
/* Get the link's name */
if(NULL == (lnk->name = (char *)H5MM_malloc(len + 1)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -218,6 +224,12 @@ H5O__link_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh,
UINT16DECODE(p, len)
if(len == 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "invalid link length")
+
+ /* Make sure that length doesn't exceed buffer size, which could occur
+ when the file is corrupted */
+ if(p + len > p_end)
+ HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "name length causes read past end of buffer")
+
if(NULL == (lnk->u.soft.name = (char *)H5MM_malloc((size_t)len + 1)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
H5MM_memcpy(lnk->u.soft.name, p, len);
@@ -238,6 +250,11 @@ H5O__link_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh,
lnk->u.ud.size = len;
if(len > 0)
{
+ /* Make sure that length doesn't exceed buffer size, which could
+ occur when the file is corrupted */
+ if(p + len > p_end)
+ HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "name length causes read past end of buffer")
+
if(NULL == (lnk->u.ud.udata = H5MM_malloc((size_t)len)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
H5MM_memcpy(lnk->u.ud.udata, p, len);
diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c
index 7e49c4b..064a9b8 100644
--- a/src/H5Pdcpl.c
+++ b/src/H5Pdcpl.c
@@ -246,7 +246,7 @@ static hbool_t H5P_dcrt_def_layout_init_g = FALSE;
static herr_t
H5P__dcrt_reg_prop(H5P_genclass_t *pclass)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -421,13 +421,13 @@ H5P__dcrt_layout_enc(const void *value, void **_pp, size_t *size)
for(u = 0; u < layout->storage.u.virt.list_nused; u++) {
/* Source file name */
tmp_size = HDstrlen(layout->storage.u.virt.list[u].source_file_name) + (size_t)1;
- (void)H5MM_memcpy(*pp, layout->storage.u.virt.list[u].source_file_name, tmp_size);
+ H5MM_memcpy(*pp, layout->storage.u.virt.list[u].source_file_name, tmp_size);
*pp += tmp_size;
*size += tmp_size;
/* Source dataset name */
tmp_size = HDstrlen(layout->storage.u.virt.list[u].source_dset_name) + (size_t)1;
- (void)H5MM_memcpy(*pp, layout->storage.u.virt.list[u].source_dset_name, tmp_size);
+ H5MM_memcpy(*pp, layout->storage.u.virt.list[u].source_dset_name, tmp_size);
*pp += tmp_size;
*size += tmp_size;
@@ -597,14 +597,14 @@ H5P__dcrt_layout_dec(const void **_pp, void *value)
tmp_size = HDstrlen((const char *)*pp) + 1;
if(NULL == (tmp_layout.storage.u.virt.list[u].source_file_name = (char *)H5MM_malloc(tmp_size)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "unable to allocate memory for source file name")
- (void)H5MM_memcpy(tmp_layout.storage.u.virt.list[u].source_file_name, *pp, tmp_size);
+ H5MM_memcpy(tmp_layout.storage.u.virt.list[u].source_file_name, *pp, tmp_size);
*pp += tmp_size;
/* Source dataset name */
tmp_size = HDstrlen((const char *)*pp) + 1;
if(NULL == (tmp_layout.storage.u.virt.list[u].source_dset_name = (char *)H5MM_malloc(tmp_size)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "unable to allocate memory for source dataset name")
- (void)H5MM_memcpy(tmp_layout.storage.u.virt.list[u].source_dset_name, *pp, tmp_size);
+ H5MM_memcpy(tmp_layout.storage.u.virt.list[u].source_dset_name, *pp, tmp_size);
*pp += tmp_size;
/* Source selection */
@@ -2375,7 +2375,7 @@ H5Pget_virtual_vspace(hid_t dcpl_id, size_t idx)
/* Get the virtual space */
if(idx >= layout.storage.u.virt.list_nused)
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid idx (out of range)")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)")
HDassert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc);
if(NULL == (space = H5S_copy(layout.storage.u.virt.list[idx].source_dset.virtual_select, FALSE, TRUE)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy virtual selection")
@@ -2431,9 +2431,9 @@ H5Pget_virtual_srcspace(hid_t dcpl_id, size_t idx)
if(H5D_VIRTUAL != layout.type)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a virtual storage layout")
- /* Check idx */
+ /* Check index */
if(idx >= layout.storage.u.virt.list_nused)
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid idx (out of range)")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)")
HDassert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc);
/* Attempt to open source dataset and patch extent if extent status is not
@@ -2537,7 +2537,7 @@ H5Pget_virtual_filename(hid_t dcpl_id, size_t idx, char *name/*out*/,
/* Get the virtual filename */
if(idx >= layout.storage.u.virt.list_nused)
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid idx (out of range)")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)")
HDassert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc);
HDassert(layout.storage.u.virt.list[idx].source_file_name);
if(name && (size > 0))
@@ -2600,7 +2600,7 @@ H5Pget_virtual_dsetname(hid_t dcpl_id, size_t idx, char *name/*out*/,
/* Get the virtual filename */
if(idx >= layout.storage.u.virt.list_nused)
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid idx (out of range)")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)")
HDassert(layout.storage.u.virt.list_nused <= layout.storage.u.virt.list_nalloc);
HDassert(layout.storage.u.virt.list[idx].source_dset_name);
if(name && (size > 0))
diff --git a/src/H5Rint.c b/src/H5Rint.c
index 30f3dbb..6dfbf2b 100644
--- a/src/H5Rint.c
+++ b/src/H5Rint.c
@@ -423,6 +423,10 @@ H5R__destroy(H5R_ref_priv_t *ref)
HDassert(ref != NULL);
+ H5R_LOG_DEBUG("Destroying reference, filename=%s, obj_addr=%s, encode size=%u",
+ ref->info.obj.filename, H5R__print_token(ref->info.obj.token),
+ ref->encode_size);
+
H5MM_xfree(ref->info.obj.filename);
ref->info.obj.filename = NULL;
@@ -1028,6 +1032,10 @@ H5R__encode(const char *filename, const H5R_ref_priv_t *ref, unsigned char *buf,
HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (unknown reference type)")
} /* end switch */
+ H5R_LOG_DEBUG("Encoded reference, filename=%s, obj_addr=%s, encode size=%u",
+ ref->info.obj.filename, H5R__print_token(ref->info.obj.token),
+ encode_size);
+
*nalloc = encode_size;
done:
diff --git a/src/H5S.c b/src/H5S.c
index ddfd064..7e48076 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -88,18 +88,18 @@ H5FL_ARR_DEFINE(hsize_t, H5S_MAX_RANK);
/* Dataspace ID class */
static const H5I_class_t H5I_DATASPACE_CLS[1] = {{
- H5I_DATASPACE, /* ID class value */
- 0, /* Class flags */
- 2, /* # of reserved IDs for class */
- (H5I_free_t)H5S_close /* Callback routine for closing objects of this class */
+ H5I_DATASPACE, /* ID class value */
+ 0, /* Class flags */
+ 2, /* # of reserved IDs for class */
+ (H5I_free_t)H5S_close /* Callback routine for closing objects of this class */
}};
/* Dataspace selection iterator ID class */
static const H5I_class_t H5I_SPACE_SEL_ITER_CLS[1] = {{
- H5I_SPACE_SEL_ITER, /* ID class value */
- 0, /* Class flags */
- 0, /* # of reserved IDs for class */
- (H5I_free_t)H5S_sel_iter_close /* Callback routine for closing objects of this class */
+ H5I_SPACE_SEL_ITER, /* ID class value */
+ 0, /* Class flags */
+ 0, /* # of reserved IDs for class */
+ (H5I_free_t)H5S_sel_iter_close /* Callback routine for closing objects of this class */
}};
@@ -107,7 +107,7 @@ static const H5I_class_t H5I_SPACE_SEL_ITER_CLS[1] = {{
static hbool_t H5S_top_package_initialize_s = FALSE;
-
+
/*--------------------------------------------------------------------------
NAME
H5S__init_package -- Initialize interface-specific information
@@ -127,11 +127,11 @@ H5S__init_package(void)
/* Initialize the atom group for the dataspace IDs */
if(H5I_register_type(H5I_DATASPACE_CLS) < 0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize dataspace ID class")
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize dataspace ID class")
/* Initialize the atom group for the dataspace selction iterator IDs */
if(H5I_register_type(H5I_SPACE_SEL_ITER_CLS) < 0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize dataspace selection iterator ID class")
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize dataspace selection iterator ID class")
/* Mark "top" of interface as initialized, too */
H5S_top_package_initialize_s = TRUE;
@@ -140,7 +140,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__init_package() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S_top_term_package
@@ -162,22 +162,22 @@ done:
int
H5S_top_term_package(void)
{
- int n = 0;
+ int n = 0;
FUNC_ENTER_NOAPI_NOINIT_NOERR
if(H5S_top_package_initialize_s) {
- if(H5I_nmembers(H5I_DATASPACE) > 0) {
- (void)H5I_clear_type(H5I_DATASPACE, FALSE, FALSE);
+ if(H5I_nmembers(H5I_DATASPACE) > 0) {
+ (void)H5I_clear_type(H5I_DATASPACE, FALSE, FALSE);
n++; /*H5I*/
- } /* end if */
+ } /* end if */
- if(H5I_nmembers(H5I_SPACE_SEL_ITER) > 0) {
- (void)H5I_clear_type(H5I_SPACE_SEL_ITER, FALSE, FALSE);
+ if(H5I_nmembers(H5I_SPACE_SEL_ITER) > 0) {
+ (void)H5I_clear_type(H5I_SPACE_SEL_ITER, FALSE, FALSE);
n++; /*H5I*/
- } /* end if */
+ } /* end if */
- /* Mark "top" of interface as closed */
+ /* Mark "top" of interface as closed */
if(0 == n)
H5S_top_package_initialize_s = FALSE;
} /* end if */
@@ -185,7 +185,7 @@ H5S_top_term_package(void)
FUNC_LEAVE_NOAPI(n)
} /* end H5S_top_term_package() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S_term_package
@@ -209,7 +209,7 @@ H5S_top_term_package(void)
int
H5S_term_package(void)
{
- int n = 0;
+ int n = 0;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -225,7 +225,7 @@ H5S_term_package(void)
/* Destroy the dataspace selection iterator object id group */
n += (H5I_dec_type_ref(H5I_SPACE_SEL_ITER) > 0);
- /* Mark interface as closed */
+ /* Mark interface as closed */
if(0 == n)
H5_PKG_INIT_VAR = FALSE;
} /* end if */
@@ -234,7 +234,7 @@ H5S_term_package(void)
} /* end H5S_term_package() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S_get_validiated_dataspace
@@ -278,13 +278,13 @@ H5S_get_validated_dataspace(hid_t space_id, const H5S_t **space)
/* Check for valid selection */
if(H5S_SELECT_VALID(*space) != TRUE)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "selection + offset not within extent")
- } /* end else */
+ }
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_get_validated_dataspace() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S_create
@@ -362,7 +362,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_create() */
-
+
/*--------------------------------------------------------------------------
NAME
H5Screate
@@ -409,16 +409,16 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Screate() */
-
+
/*-------------------------------------------------------------------------
* Function: H5S__extent_release
*
- * Purpose: Releases all memory associated with a dataspace extent.
+ * Purpose: Releases all memory associated with a dataspace extent.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Thursday, July 23, 1998
+ * Programmer: Quincey Koziol
+ * Thursday, July 23, 1998
*
*-------------------------------------------------------------------------
*/
@@ -437,19 +437,22 @@ H5S__extent_release(H5S_extent_t *extent)
extent->max = H5FL_ARR_FREE(hsize_t, extent->max);
} /* end if */
+ extent->rank = 0;
+ extent->nelem = 0;
+
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__extent_release() */
-
+
/*-------------------------------------------------------------------------
* Function: H5S_close
*
- * Purpose: Releases all memory associated with a dataspace.
+ * Purpose: Releases all memory associated with a dataspace.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Tuesday, December 9, 1997
+ * Programmer: Robb Matzke
+ * Tuesday, December 9, 1997
*
*-------------------------------------------------------------------------
*/
@@ -481,16 +484,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_close() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Sclose
*
- * Purpose: Release access to a dataspace object.
+ * Purpose: Release access to a dataspace object.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Tuesday, December 9, 1997
+ * Programmer: Robb Matzke
+ * Tuesday, December 9, 1997
*
*-------------------------------------------------------------------------
*/
@@ -514,69 +517,70 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Sclose() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Scopy
*
- * Purpose: Copies a dataspace.
+ * Purpose: Copies a dataspace.
+ *
+ * Return: Success: ID of the new dataspace
*
- * Return: Success: ID of the new dataspace
- * Failure: Negative
+ * Failure: H5I_INVALID_HID
*
- * Programmer: Robb Matzke
- * Friday, January 30, 1998
+ * Programmer: Robb Matzke
+ * Friday, January 30, 1998
*
*-------------------------------------------------------------------------
*/
hid_t
H5Scopy(hid_t space_id)
{
- H5S_t *src;
- H5S_t *dst = NULL;
- hid_t ret_value;
+ H5S_t *src = NULL;
+ H5S_t *dst = NULL;
+ hid_t ret_value = H5I_INVALID_HID;
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE1("i", "i", space_id);
/* Check args */
if(NULL == (src = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a dataspace")
/* Copy */
if(NULL == (dst = H5S_copy(src, FALSE, TRUE)))
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to copy dataspace")
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, H5I_INVALID_HID, "unable to copy dataspace")
/* Atomize */
if((ret_value = H5I_register (H5I_DATASPACE, dst, TRUE)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register dataspace atom")
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataspace atom")
done:
if(ret_value < 0)
if(dst && H5S_close(dst) < 0)
- HDONE_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "unable to release dataspace")
+ HDONE_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, H5I_INVALID_HID, "unable to release dataspace")
FUNC_LEAVE_API(ret_value)
} /* end H5Scopy() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Sextent_copy
*
- * Purpose: Copies a dataspace extent.
+ * Purpose: Copies a dataspace extent.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Thursday, July 23, 1998
+ * Programmer: Quincey Koziol
+ * Thursday, July 23, 1998
*
*-------------------------------------------------------------------------
*/
herr_t
H5Sextent_copy(hid_t dst_id,hid_t src_id)
{
- H5S_t *src;
- H5S_t *dst;
- herr_t ret_value = SUCCEED;
+ H5S_t *src;
+ H5S_t *dst;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "ii", dst_id, src_id);
@@ -595,7 +599,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Sextent_copy() */
-
+
/*-------------------------------------------------------------------------
* Function: H5S_extent_copy
*
@@ -632,16 +636,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_extent_copy() */
-
+
/*-------------------------------------------------------------------------
* Function: H5S__extent_copy_real
*
- * Purpose: Copies a dataspace extent
+ * Purpose: Copies a dataspace extent
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Wednesday, June 3, 1998
+ * Programmer: Quincey Koziol
+ * Wednesday, June 3, 1998
*
*-------------------------------------------------------------------------
*/
@@ -701,29 +705,30 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__extent_copy_real() */
-
+
/*-------------------------------------------------------------------------
* Function: H5S_copy
*
- * Purpose: Copies a dataspace, by copying the extent and selection through
- * H5S_extent_copy and H5S_select_copy. If the SHARE_SELECTION flag
- * is set, then the selection can be shared between the source and
- * destination dataspaces. (This should only occur in situations
- * where the destination dataspace will immediately change to a new
- * selection)
+ * Purpose: Copies a dataspace, by copying the extent and selection through
+ * H5S_extent_copy and H5S_select_copy. If the SHARE_SELECTION flag
+ * is set, then the selection can be shared between the source and
+ * destination dataspaces. (This should only occur in situations
+ * where the destination dataspace will immediately change to a new
+ * selection)
+ *
+ * Return: Success: A pointer to a new copy of SRC
*
- * Return: Success: A pointer to a new copy of SRC
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
- * Thursday, December 4, 1997
+ * Programmer: Robb Matzke
+ * Thursday, December 4, 1997
*
*-------------------------------------------------------------------------
*/
H5S_t *
H5S_copy(const H5S_t *src, hbool_t share_selection, hbool_t copy_max)
{
- H5S_t *dst = NULL;
+ H5S_t *dst = NULL;
H5S_t *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -750,17 +755,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_copy() */
-
+
/*-------------------------------------------------------------------------
* Function: H5S_get_simple_extent_npoints
*
- * Purpose: Determines how many data points a dataset extent has.
+ * Purpose: Determines how many data points a dataset extent has.
*
- * Return: Success: Number of data points in the dataset extent.
- * Failure: negative
+ * Return: Success: Number of data points in the dataset extent.
*
- * Programmer: Robb Matzke
- * Tuesday, December 9, 1997
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Tuesday, December 9, 1997
*
* Note: This routine participates in the "Inlining C function pointers"
* pattern, don't call it directly, use the appropriate macro
@@ -785,17 +791,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_get_simple_extent_npoints() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Sget_simple_extent_npoints
*
- * Purpose: Determines how many data points a dataset extent has.
+ * Purpose: Determines how many data points a dataset extent has.
*
- * Return: Success: Number of data points in the dataset.
- * Failure: negative
+ * Return: Success: Number of data points in the dataset.
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Tuesday, December 9, 1997
+ * Programmer: Robb Matzke
+ * Tuesday, December 9, 1997
*
*-------------------------------------------------------------------------
*/
@@ -803,7 +809,7 @@ hssize_t
H5Sget_simple_extent_npoints(hid_t space_id)
{
H5S_t *ds;
- hssize_t ret_value;
+ hssize_t ret_value;
FUNC_ENTER_API(FAIL)
H5TRACE1("Hs", "i", space_id);
@@ -818,22 +824,22 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Sget_simple_extent_npoints() */
-
+
/*-------------------------------------------------------------------------
* Function: H5S_get_npoints_max
*
- * Purpose: Determines the maximum number of data points a dataspace may
- * have. If the `max' array is null then the maximum number of
- * data points is the same as the current number of data points
- * without regard to the hyperslab. If any element of the `max'
- * array is zero then the maximum possible size is returned.
+ * Purpose: Determines the maximum number of data points a dataspace may
+ * have. If the `max' array is null then the maximum number of
+ * data points is the same as the current number of data points
+ * without regard to the hyperslab. If any element of the `max'
+ * array is zero then the maximum possible size is returned.
*
- * Return: Success: Maximum number of data points the dataspace
- * may have.
- * Failure: 0
+ * Return: Success: Maximum number of data points the dataspace
+ * may have.
+ * Failure: 0
*
- * Programmer: Robb Matzke
- * Tuesday, December 9, 1997
+ * Programmer: Robb Matzke
+ * Tuesday, December 9, 1997
*
*-------------------------------------------------------------------------
*/
@@ -841,7 +847,7 @@ hsize_t
H5S_get_npoints_max(const H5S_t *ds)
{
unsigned u;
- hsize_t ret_value = 0; /* Return value */
+ hsize_t ret_value = 0; /* Return value */
FUNC_ENTER_NOAPI(0)
@@ -863,11 +869,11 @@ H5S_get_npoints_max(const H5S_t *ds)
if(H5S_UNLIMITED == ds->extent.max[u]) {
ret_value = HSIZET_MAX;
break;
- } /* end if */
+ }
else
ret_value *= ds->extent.max[u];
- } /* end for */
- } /* end if */
+ }
+ }
else
for(ret_value = 1, u = 0; u < ds->extent.rank; u++)
ret_value *= ds->extent.size[u];
@@ -877,38 +883,38 @@ H5S_get_npoints_max(const H5S_t *ds)
default:
HDassert("unknown dataspace class" && 0);
HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, 0, "internal error (unknown dataspace class)")
- } /* end switch */
+ }
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_get_npoints_max() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Sget_simple_extent_ndims
*
- * Purpose: Determines the dimensionality of a dataspace.
+ * Purpose: Determines the dimensionality of a dataspace.
*
- * Return: Success: The number of dimensions in a dataspace.
- * Failure: Negative
+ * Return: Success: The number of dimensions in a dataspace.
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Thursday, December 11, 1997
+ * Programmer: Robb Matzke
+ * Thursday, December 11, 1997
*
*-------------------------------------------------------------------------
*/
int
H5Sget_simple_extent_ndims(hid_t space_id)
{
- H5S_t *ds;
- int ret_value; /* Return value */
+ H5S_t *ds;
+ int ret_value = -1;
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API((-1))
H5TRACE1("Is", "i", space_id);
/* Check args */
if(NULL == (ds = (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, (-1), "not a dataspace")
ret_value = (int)H5S_GET_EXTENT_NDIMS(ds);
@@ -916,18 +922,19 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Sget_simple_extent_ndims() */
-
+
/*-------------------------------------------------------------------------
* Function: H5S_get_simple_extent_ndims
*
- * Purpose: Returns the number of dimensions in a dataspace.
+ * Purpose: Returns the number of dimensions in a dataspace.
+ *
+ * Return: Success: Non-negative number of dimensions.
+ * Zero implies a scalar.
*
- * Return: Success: Non-negative number of dimensions. Zero
- * implies a scalar.
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Thursday, December 11, 1997
+ * Programmer: Robb Matzke
+ * hursday, December 11, 1997
*
* Note: This routine participates in the "Inlining C function pointers"
* pattern, don't call it directly, use the appropriate macro
@@ -938,7 +945,7 @@ done:
int
H5S_get_simple_extent_ndims(const H5S_t *ds)
{
- int ret_value = -1; /* Return value */
+ int ret_value = -1; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -962,35 +969,35 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_get_simple_extent_ndims() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Sget_simple_extent_dims
*
- * Purpose: Returns the size and maximum sizes in each dimension of
- * a dataspace DS through the DIMS and MAXDIMS arguments.
+ * Purpose: Returns the size and maximum sizes in each dimension of
+ * a dataspace DS through the DIMS and MAXDIMS arguments.
*
- * Return: Success: Number of dimensions, the same value as
- * returned by H5Sget_simple_extent_ndims().
- * Failure: Negative
+ * Return: Success: Number of dimensions, the same value as
+ * returned by H5Sget_simple_extent_ndims().
*
- * Programmer: Robb Matzke
- * Thursday, December 11, 1997
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Thursday, December 11, 1997
*
*-------------------------------------------------------------------------
*/
int
-H5Sget_simple_extent_dims(hid_t space_id, hsize_t dims[]/*out*/,
- hsize_t maxdims[]/*out*/)
+H5Sget_simple_extent_dims(hid_t space_id, hsize_t dims[]/*out*/, hsize_t maxdims[]/*out*/)
{
- H5S_t *ds;
- int ret_value; /* Return value */
+ H5S_t *ds;
+ int ret_value = -1;
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API((-1))
H5TRACE3("Is", "ixx", space_id, dims, maxdims);
/* Check args */
if(NULL == (ds = (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, (-1), "not a dataspace")
ret_value = H5S_get_simple_extent_dims(ds, dims, maxdims);
@@ -998,26 +1005,26 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Sget_simple_extent_dims() */
-
+
/*-------------------------------------------------------------------------
* Function: H5S_extent_get_dims
*
- * Purpose: Returns the size in each dimension of a dataspace. This
- * function may not be meaningful for all types of dataspaces.
+ * Purpose: Returns the size in each dimension of a dataspace. This
+ * function may not be meaningful for all types of dataspaces.
*
- * Return: Success: Number of dimensions. Zero implies scalar.
- * Failure: Negative
+ * Return: Success: Number of dimensions. Zero implies scalar.
+ * Failure: Negative
*
- * Programmer: Quincey Koziol
- * Tuesday, June 30, 2009
+ * Programmer: Quincey Koziol
+ * Tuesday, June 30, 2009
*
*-------------------------------------------------------------------------
*/
int
H5S_extent_get_dims(const H5S_extent_t *ext, hsize_t dims[], hsize_t max_dims[])
{
- int i; /* Local index variable */
- int ret_value = -1; /* Return value */
+ int i; /* Local index variable */
+ int ret_value = -1; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1054,25 +1061,25 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_extent_get_dims() */
-
+
/*-------------------------------------------------------------------------
* Function: H5S_get_simple_extent_dims
*
- * Purpose: Returns the size in each dimension of a dataspace. This
- * function may not be meaningful for all types of dataspaces.
+ * Purpose: Returns the size in each dimension of a dataspace. This
+ * function may not be meaningful for all types of dataspaces.
*
- * Return: Success: Number of dimensions. Zero implies scalar.
- * Failure: Negative
+ * Return: Success: Number of dimensions. Zero implies scalar.
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Thursday, December 11, 1997
+ * Programmer: Robb Matzke
+ * Thursday, December 11, 1997
*
*-------------------------------------------------------------------------
*/
int
H5S_get_simple_extent_dims(const H5S_t *ds, hsize_t dims[], hsize_t max_dims[])
{
- int ret_value = -1; /* Return value */
+ int ret_value = -1; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1087,17 +1094,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_get_simple_extent_dims() */
-
+
/*-------------------------------------------------------------------------
* Function: H5S_write
*
- * Purpose: Updates a dataspace by writing a message to an object
- * header.
+ * Purpose: Updates a dataspace by writing a message to an object
+ * header.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Tuesday, December 9, 1997
+ * Programmer: Robb Matzke
+ * Tuesday, December 9, 1997
*
*-------------------------------------------------------------------------
*/
@@ -1121,17 +1128,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_write() */
-
+
/*-------------------------------------------------------------------------
* Function: H5S_append
*
- * Purpose: Updates a dataspace by adding a message to an object
- * header.
+ * Purpose: Updates a dataspace by adding a message to an object header.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Tuesday, December 31, 2002
+ * Programmer: Quincey Koziol
+ * Tuesday, December 31, 2002
*
*-------------------------------------------------------------------------
*/
@@ -1155,24 +1161,25 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_append() */
-
+
/*-------------------------------------------------------------------------
* Function: H5S_read
*
- * Purpose: Reads the dataspace from an object header.
+ * Purpose: Reads the dataspace from an object header.
+ *
+ * Return: Success: Pointer to a new dataspace.
*
- * Return: Success: Pointer to a new dataspace.
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
- * Tuesday, December 9, 1997
+ * Programmer: Robb Matzke
+ * Tuesday, December 9, 1997
*
*-------------------------------------------------------------------------
*/
H5S_t *
H5S_read(const H5O_loc_t *loc)
{
- H5S_t *ds = NULL; /* Dataspace to return */
+ H5S_t *ds = NULL; /* Dataspace to return */
H5S_t *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -1201,7 +1208,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_read() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__is_simple
@@ -1233,7 +1240,7 @@ H5S__is_simple(const H5S_t *sdim)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__is_simple() */
-
+
/*--------------------------------------------------------------------------
NAME
H5Sis_simple
@@ -1241,7 +1248,7 @@ H5S__is_simple(const H5S_t *sdim)
Check if a dataspace is simple
USAGE
htri_t H5Sis_simple(space_id)
- hid_t space_id; IN: ID of dataspace object to query
+ hid_t space_id; IN: ID of dataspace object to query
RETURNS
TRUE/FALSE/FAIL
DESCRIPTION
@@ -1251,15 +1258,15 @@ H5S__is_simple(const H5S_t *sdim)
htri_t
H5Sis_simple(hid_t space_id)
{
- H5S_t *space; /* Dataspace to check */
- htri_t ret_value; /* Return value */
+ H5S_t *space; /* Dataspace to check */
+ htri_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE1("t", "i", space_id);
/* Check args and all the boring stuff. */
if(NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "not a dataspace")
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "not a dataspace")
ret_value = H5S__is_simple(space);
@@ -1267,7 +1274,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Sis_simple() */
-
+
/*--------------------------------------------------------------------------
NAME
H5Sset_extent_simple
@@ -1275,11 +1282,11 @@ done:
Sets the size of a simple dataspace
USAGE
herr_t H5Sset_extent_simple(space_id, rank, dims, max)
- hid_t space_id; IN: Dataspace object to query
- int rank; IN: # of dimensions for the dataspace
- const size_t *dims; IN: Size of each dimension for the dataspace
- const size_t *max; IN: Maximum size of each dimension for the
- dataspace
+ hid_t space_id; IN: Dataspace object to query
+ int rank; IN: # of dimensions for the dataspace
+ const size_t *dims; IN: Size of each dimension for the dataspace
+ const size_t *max; IN: Maximum size of each dimension for the
+ dataspace
RETURNS
Non-negative on success/Negative on failure
DESCRIPTION
@@ -1298,8 +1305,8 @@ herr_t
H5Sset_extent_simple(hid_t space_id, int rank, const hsize_t dims[/*rank*/],
const hsize_t max[/*rank*/])
{
- H5S_t *space; /* Dataspace to modify */
- int u; /* Local counting variable */
+ H5S_t *space; /* Dataspace to modify */
+ int u; /* Local counting variable */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -1322,26 +1329,25 @@ H5Sset_extent_simple(hid_t space_id, int rank, const hsize_t dims[/*rank*/],
for(u = 0; u < rank; u++)
if(max[u] != H5S_UNLIMITED && max[u] < dims[u])
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid maximum dimension size")
- } /* end if */
+ }
/* Do it */
if(H5S_set_extent_simple(space, (unsigned)rank, dims, max) < 0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to set simple extent")
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to set simple extent")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Sset_extent_simple() */
-
+
/*-------------------------------------------------------------------------
* Function: H5S_set_extent_simple
*
- * Purpose: This is where the real work happens for
- * H5Sset_extent_simple().
+ * Purpose: This is where the real work happens for H5Sset_extent_simple().
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, July 8, 1998
*
*-------------------------------------------------------------------------
@@ -1362,10 +1368,10 @@ H5S_set_extent_simple(H5S_t *space, unsigned rank, const hsize_t *dims,
if(H5S__extent_release(&space->extent) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "failed to release previous dataspace extent")
- if(rank == 0) { /* scalar variable */
+ if(rank == 0) { /* scalar variable */
space->extent.type = H5S_SCALAR;
space->extent.nelem = 1;
- space->extent.rank = 0; /* set to scalar rank */
+ space->extent.rank = 0; /* set to scalar rank */
} /* end if */
else {
hsize_t nelem; /* Number of elements in extent */
@@ -1408,91 +1414,90 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_set_extent_simple() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Screate_simple
*
- * Purpose: Creates a new simple dataspace object and opens it for
- * access. The DIMS argument is the size of the simple dataset
- * and the MAXDIMS argument is the upper limit on the size of
- * the dataset. MAXDIMS may be the null pointer in which case
- * the upper limit is the same as DIMS. If an element of
- * MAXDIMS is H5S_UNLIMITED then the corresponding dimension is
- * unlimited, otherwise no element of MAXDIMS should be smaller
- * than the corresponding element of DIMS.
+ * Purpose: Creates a new simple dataspace object and opens it for
+ * access. The DIMS argument is the size of the simple dataset
+ * and the MAXDIMS argument is the upper limit on the size of
+ * the dataset. MAXDIMS may be the null pointer in which case
+ * the upper limit is the same as DIMS. If an element of
+ * MAXDIMS is H5S_UNLIMITED then the corresponding dimension is
+ * unlimited, otherwise no element of MAXDIMS should be smaller
+ * than the corresponding element of DIMS.
+ *
+ * Return: Success: The ID for the new simple dataspace object.
*
- * Return: Success: The ID for the new simple dataspace object.
- * Failure: Negative
+ * Failure: H5I_INVALID_HID
*
- * Programmer: Quincey Koziol
- * Tuesday, January 27, 1998
+ * Programmer: Quincey Koziol
+ * Tuesday, January 27, 1998
*
*-------------------------------------------------------------------------
*/
hid_t
-H5Screate_simple(int rank, const hsize_t dims[/*rank*/],
- const hsize_t maxdims[/*rank*/])
+H5Screate_simple(int rank, const hsize_t dims[/*rank*/], const hsize_t maxdims[/*rank*/])
{
- H5S_t *space = NULL;
- int i;
- hid_t ret_value; /* Return value */
+ H5S_t *space = NULL;
+ int i;
+ hid_t ret_value = H5I_INVALID_HID;
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE3("i", "Is*[a0]h*[a0]h", rank, dims, maxdims);
/* Check arguments */
if(rank < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dimensionality cannot be negative")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "dimensionality cannot be negative")
if(rank > H5S_MAX_RANK)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dimensionality is too large")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "dimensionality is too large")
/* We allow users to use this function to create scalar or null dataspace.
* Check DIMS isn't set when the RANK is 0.
*/
if(!dims && rank != 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid dataspace information")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid dataspace information")
/* Check whether the current dimensions are valid */
for(i = 0; i < rank; i++) {
if(H5S_UNLIMITED == dims[i])
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "current dimension must have a specific size, not H5S_UNLIMITED")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "current dimension must have a specific size, not H5S_UNLIMITED")
if(maxdims && H5S_UNLIMITED != maxdims[i] && maxdims[i]<dims[i])
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "maxdims is smaller than dims")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "maxdims is smaller than dims")
} /* end for */
/* Create the space and set the extent */
if(NULL == (space = H5S_create_simple((unsigned)rank, dims, maxdims)))
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace")
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, H5I_INVALID_HID, "can't create simple dataspace")
/* Atomize */
if((ret_value = H5I_register (H5I_DATASPACE, space, TRUE)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID")
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataspace ID")
done:
if(ret_value < 0)
if(space && H5S_close(space) < 0)
- HDONE_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "unable to release dataspace")
+ HDONE_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, H5I_INVALID_HID, "unable to release dataspace")
FUNC_LEAVE_API(ret_value)
} /* end H5Screate_simple() */
-
+
/*-------------------------------------------------------------------------
* Function: H5S_create_simple
*
- * Purpose: Internal function to create simple dataspace
+ * Purpose: Internal function to create simple dataspace
*
- * Return: Success: The ID for the new simple dataspace object.
- * Failure: Negative
+ * Return: Success: A pointer to a dataspace object
+ * Failure: NULL
*
- * Programmer: Quincey Koziol
- * Thursday, April 3, 2003
+ * Programmer: Quincey Koziol
+ * Thursday, April 3, 2003
*
*-------------------------------------------------------------------------
*/
H5S_t *
-H5S_create_simple(unsigned rank, const hsize_t dims[/*rank*/],
- const hsize_t maxdims[/*rank*/])
+H5S_create_simple(unsigned rank, const hsize_t dims[/*rank*/], const hsize_t maxdims[/*rank*/])
{
H5S_t *ret_value = NULL; /* Return value */
@@ -1511,20 +1516,19 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_create_simple() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Sencode2
*
- * Purpose: Given a dataspace ID, converts the object description
+ * Purpose: Given a dataspace ID, converts the object description
* (including selection) into binary in a buffer.
- * The selection will be encoded according to the file
- * format setting in fapl.
+ * The selection will be encoded according to the file
+ * format setting in the fapl.
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Raymond Lu
- * slu@ncsa.uiuc.edu
+ * Programmer: Raymond Lu
* July 14, 2004
*
*-------------------------------------------------------------------------
@@ -1540,33 +1544,30 @@ H5Sencode2(hid_t obj_id, void *buf, size_t *nalloc, hid_t fapl_id)
/* Check argument and retrieve object */
if(NULL == (dspace = (H5S_t *)H5I_object_verify(obj_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 */
+ /* Verify access property list and set up collective metadata if appropriate */
if(H5CX_set_apl(&fapl_id, H5P_CLS_FACC, H5I_INVALID_HID, TRUE) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info")
-
if(H5S_encode(dspace, (unsigned char **)&buf, nalloc) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTENCODE, FAIL, "can't encode dataspace")
done:
FUNC_LEAVE_API(ret_value)
-} /* H5Sencode2() */
-
+} /* end H5Sencode2() */
+
/*-------------------------------------------------------------------------
* Function: H5S_encode
*
- * Purpose: Private function for H5Sencode. Converts an object
+ * Purpose: Private function for H5Sencode. Converts an object
* description for dataspace and its selection into binary
* in a buffer.
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Raymond Lu
- * slu@ncsa.uiuc.edu
+ * Programmer: Raymond Lu
* July 14, 2004
*
*-------------------------------------------------------------------------
@@ -1584,15 +1585,15 @@ H5S_encode(H5S_t *obj, unsigned char **p, size_t *nalloc)
/* Allocate "fake" file structure */
if(NULL == (f = H5F_fake_alloc((uint8_t)0)))
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate fake file struct")
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate fake file struct")
/* Find out the size of buffer needed for extent */
if((extent_size = H5O_msg_raw_size(f, H5O_SDSPACE_ID, TRUE, obj)) == 0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_BADSIZE, FAIL, "can't find dataspace size")
+ HGOTO_ERROR(H5E_DATASPACE, H5E_BADSIZE, FAIL, "can't find dataspace size")
/* Find out the size of buffer needed for selection */
if((sselect_size = H5S_SELECT_SERIAL_SIZE(obj)) < 0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_BADSIZE, FAIL, "can't find dataspace selection size")
+ HGOTO_ERROR(H5E_DATASPACE, H5E_BADSIZE, FAIL, "can't find dataspace selection size")
H5_CHECKED_ASSIGN(select_size, size_t, sselect_size, hssize_t);
/* Verify the size of buffer. If it's not big enough, simply return the
@@ -1633,18 +1634,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_encode() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Sdecode
*
- * Purpose: Decode a binary object description of dataspace and
+ * Purpose: Decode a binary object description of dataspace and
* return a new object handle.
*
- * Return: Success: dataspace ID(non-negative)
- * Failure: negative
+ * Return: Success: dataspace ID(non-negative)
+ *
+ * Failure: H5I_INVALID_HID
*
- * Programmer: Raymond Lu
- * slu@ncsa.uiuc.edu
+ * Programmer: Raymond Lu
* July 14, 2004
*
*-------------------------------------------------------------------------
@@ -1655,35 +1656,35 @@ H5Sdecode(const void *buf)
H5S_t *ds;
hid_t ret_value;
- FUNC_ENTER_API(FAIL)
+ FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE1("i", "*x", buf);
if(buf == NULL)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "empty buffer")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "empty buffer")
if((ds = H5S_decode((const unsigned char **)&buf)) == NULL)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDECODE, FAIL, "can't decode object")
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDECODE, H5I_INVALID_HID, "can't decode object")
/* Register the type and return the ID */
if((ret_value = H5I_register(H5I_DATASPACE, ds, TRUE)) < 0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTREGISTER, FAIL, "unable to register dataspace")
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataspace")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Sdecode() */
-
+
/*-------------------------------------------------------------------------
* Function: H5S_decode
*
- * Purpose: Private function for H5Sdecode. Reconstructs a binary
+ * Purpose: Private function for H5Sdecode. Reconstructs a binary
* description of dataspace and returns a new object handle.
*
- * Return: Success: dataspace ID(non-negative)
- * Failure: negative
+ * Return: Success: Pointer to a dataspace buffer
+ *
+ * Failure: NULL
*
- * Programmer: Raymond Lu
- * slu@ncsa.uiuc.edu
+ * Programmer: Raymond Lu
* July 14, 2004
*
*-------------------------------------------------------------------------
@@ -1703,18 +1704,18 @@ H5S_decode(const unsigned char **p)
/* Decode the type of the information */
if(*pp++ != H5O_SDSPACE_ID)
- HGOTO_ERROR(H5E_DATASPACE, H5E_BADMESG, NULL, "not an encoded dataspace")
+ HGOTO_ERROR(H5E_DATASPACE, H5E_BADMESG, NULL, "not an encoded dataspace")
/* Decode the version of the dataspace information */
if(*pp++ != H5S_ENCODE_VERSION)
- HGOTO_ERROR(H5E_DATASPACE, H5E_VERSION, NULL, "unknown version of encoded dataspace")
+ HGOTO_ERROR(H5E_DATASPACE, H5E_VERSION, NULL, "unknown version of encoded dataspace")
/* Decode the "size of size" information */
sizeof_size = *pp++;
/* Allocate "fake" file structure */
if(NULL == (f = H5F_fake_alloc(sizeof_size)))
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate fake file struct")
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate fake file struct")
/* Decode size of extent information */
UINT32DECODE(pp, extent_size);
@@ -1729,7 +1730,7 @@ H5S_decode(const unsigned char **p)
if(NULL == (ds = H5FL_CALLOC(H5S_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for dataspace conversion path table")
if(NULL == H5O_msg_copy(H5O_SDSPACE_ID, extent, &(ds->extent)))
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, NULL, "can't copy object")
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, NULL, "can't copy object")
if(H5S__extent_release(extent) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTDELETE, NULL, "can't release previous dataspace")
extent = H5FL_FREE(H5S_extent_t, extent);
@@ -1754,17 +1755,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_decode() */
-
+
/*-------------------------------------------------------------------------
* Function: H5S_get_simple_extent_type
*
- * Purpose: Internal function for retrieving the type of extent for a dataspace object
+ * Purpose: Internal function for retrieving the type of extent for a dataspace object
+ *
+ * Return: Success: The class of the dataspace object
*
- * Return: Success: The class of the dataspace object
- * Failure: N5S_NO_CLASS
+ * Failure: N5S_NO_CLASS
*
- * Programmer: Quincey Koziol
- * Thursday, September 28, 2000
+ * Programmer: Quincey Koziol
+ * Thursday, September 28, 2000
*
* Note: This routine participates in the "Inlining C function pointers"
* pattern, don't call it directly, use the appropriate macro
@@ -1775,7 +1777,7 @@ done:
H5S_class_t
H5S_get_simple_extent_type(const H5S_t *space)
{
- H5S_class_t ret_value = H5S_NO_CLASS; /* Return value */
+ H5S_class_t ret_value = H5S_NO_CLASS; /* Return value */
FUNC_ENTER_NOAPI(H5S_NO_CLASS)
@@ -1787,25 +1789,26 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_get_simple_extent_type() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Sget_simple_extent_type
*
- * Purpose: Retrieves the type of extent for a dataspace object
+ * Purpose: Retrieves the type of extent for a dataspace object
*
- * Return: Success: The class of the dataspace object
- * Failure: N5S_NO_CLASS
+ * Return: Success: The class of the dataspace object
*
- * Programmer: Quincey Koziol
- * Thursday, July 23, 1998
+ * Failure: N5S_NO_CLASS
+ *
+ * Programmer: Quincey Koziol
+ * Thursday, July 23, 1998
*
*-------------------------------------------------------------------------
*/
H5S_class_t
H5Sget_simple_extent_type(hid_t sid)
{
- H5S_t *space;
- H5S_class_t ret_value; /* Return value */
+ H5S_t *space;
+ H5S_class_t ret_value; /* Return value */
FUNC_ENTER_API(H5S_NO_CLASS)
H5TRACE1("Sc", "i", sid);
@@ -1820,7 +1823,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Sget_simple_extent_type() */
-
+
/*--------------------------------------------------------------------------
NAME
H5Sset_extent_none
@@ -1828,18 +1831,18 @@ done:
Resets the extent of a dataspace back to "none"
USAGE
herr_t H5Sset_extent_none(space_id)
- hid_t space_id; IN: Dataspace object to reset
+ hid_t space_id; IN: Dataspace object to reset
RETURNS
Non-negative on success/Negative on failure
DESCRIPTION
- This function resets the type of a dataspace back to "none" with no
+ This function resets the type of a dataspace to H5S_NULL with no
extent information stored for the dataspace.
--------------------------------------------------------------------------*/
herr_t
H5Sset_extent_none(hid_t space_id)
{
- H5S_t *space; /* Dataspace to modify */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5S_t *space; /* Dataspace to modify */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", space_id);
@@ -1852,22 +1855,21 @@ H5Sset_extent_none(hid_t space_id)
if(H5S__extent_release(&space->extent) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTDELETE, FAIL, "can't release previous dataspace")
- space->extent.type = H5S_NO_CLASS;
+ space->extent.type = H5S_NULL;
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Sset_extent_none() */
-
+
/*-------------------------------------------------------------------------
* Function: H5S_set_extent
*
* Purpose: Modify the dimensions of a dataspace.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: TRUE/FALSE/FAIL
*
- * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
* March 13, 2002
*
*-------------------------------------------------------------------------
@@ -1905,7 +1907,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_set_extent() */
-
+
/*-------------------------------------------------------------------------
* Function: H5S_has_extent
*
@@ -1938,7 +1940,7 @@ H5S_has_extent(const H5S_t *ds)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_has_extent() */
-
+
/*-------------------------------------------------------------------------
* Function: H5S_set_extent_real
*
@@ -1947,7 +1949,7 @@ H5S_has_extent(const H5S_t *ds)
* Return: Success: Non-negative
* Failure: Negative
*
- * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
* March 13, 2002
*
*-------------------------------------------------------------------------
@@ -1985,25 +1987,27 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_set_extent_real() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Sextent_equal
*
- * Purpose: Determines if two dataspace extents are equal.
+ * Purpose: Determines if two dataspace extents are equal.
+ *
+ * Return: Success: TRUE if equal, FALSE if unequal
*
- * Return: Success: TRUE if equal, FALSE if unequal
- * Failure: Negative
+ * Failure: FAIL
*
- * Programmer: Quincey Koziol
- * Monday, October 24, 2005
+ * Programmer: Quincey Koziol
+ * Monday, October 24, 2005
*
*-------------------------------------------------------------------------
*/
htri_t
H5Sextent_equal(hid_t space1_id, hid_t space2_id)
{
- const H5S_t *ds1, *ds2; /* Dataspaces to compare */
- htri_t ret_value; /* Return value */
+ const H5S_t *ds1; /* Dataspaces to compare */
+ const H5S_t *ds2;
+ htri_t ret_value;
FUNC_ENTER_API(FAIL)
H5TRACE2("t", "ii", space1_id, space2_id);
@@ -2011,17 +2015,17 @@ H5Sextent_equal(hid_t space1_id, hid_t space2_id)
/* check args */
if(NULL == (ds1 = (const H5S_t *)H5I_object_verify(space1_id, H5I_DATASPACE)) ||
NULL == (ds2 = (const H5S_t *)H5I_object_verify(space2_id, H5I_DATASPACE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
/* Check dataspaces for extent's equality */
if((ret_value = H5S_extent_equal(ds1, ds2)) < 0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOMPARE, FAIL, "dataspace comparison failed")
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOMPARE, FAIL, "dataspace comparison failed")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Sextent_equal() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S_extent_equal
@@ -2082,17 +2086,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_extent_equal() */
-
+
/*-------------------------------------------------------------------------
* Function: H5S_extent_nelem
*
- * Purpose: Determines how many elements a dataset extent describes.
+ * Purpose: Determines how many elements a dataset extent describes.
*
- * Return: Success: Number of data points in the dataset extent.
- * Failure: negative
+ * Return: Success: Number of data points in the dataset extent.
+ * Failure: Negative
*
- * Programmer: Quincey Koziol
- * Thursday, November 30, 2006
+ * Programmer: Quincey Koziol
+ * Thursday, November 30, 2006
*
*-------------------------------------------------------------------------
*/
@@ -2108,7 +2112,7 @@ H5S_extent_nelem(const H5S_extent_t *ext)
FUNC_LEAVE_NOAPI(ext->nelem)
} /* end H5S_extent_nelem() */
-
+
/*-------------------------------------------------------------------------
* Function: H5S_set_version
*
diff --git a/src/H5Sall.c b/src/H5Sall.c
index 8290ae2..9026e7c 100644
--- a/src/H5Sall.c
+++ b/src/H5Sall.c
@@ -29,7 +29,7 @@
/* Headers */
/***********/
#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
+#include "H5Eprivate.h" /* Error handling */
#include "H5Iprivate.h" /* ID Functions */
#include "H5Spkg.h" /* Dataspace functions */
#include "H5VMprivate.h" /* Vector functions */
@@ -599,7 +599,7 @@ H5S__all_serial_size(const H5S_t H5_ATTR_UNUSED *space)
PURPOSE
Serialize the current selection into a user-provided buffer.
USAGE
- herr_t H5S_all_serialize(space, p)
+ herr_t H5S__all_serialize(space, p)
const H5S_t *space; IN: Dataspace with selection to serialize
uint8_t **p; OUT: Pointer to buffer to put serialized
selection. Will be advanced to end of
@@ -627,8 +627,8 @@ H5S__all_serialize(const H5S_t *space, uint8_t **p)
HDassert(pp);
/* Store the preamble information */
- UINT32ENCODE(pp, (uint32_t)H5S_GET_SELECT_TYPE(space)); /* Store the type of selection */
- UINT32ENCODE(pp, (uint32_t)H5S_ALL_VERSION_1); /* Store the version number */
+ UINT32ENCODE(pp, (uint32_t)H5S_GET_SELECT_TYPE(space)); /* Store the type of selection */
+ UINT32ENCODE(pp, (uint32_t)H5S_ALL_VERSION_1); /* Store the version number */
UINT32ENCODE(pp, (uint32_t)0); /* Store the un-used padding */
UINT32ENCODE(pp, (uint32_t)0); /* Store the additional information length */
diff --git a/src/H5Sdbg.c b/src/H5Sdbg.c
index 8171191..32f5295 100644
--- a/src/H5Sdbg.c
+++ b/src/H5Sdbg.c
@@ -13,11 +13,12 @@
/*-------------------------------------------------------------------------
*
- * Created: H5Sdbg.c
- * Jul 24 2007
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Created: H5Sdbg.c
+ * Quincey Koziol
+ * Jul 24 2007
+ *
*
- * Purpose: Dump debugging information about a dataspace
+ * Purpose: Dump debugging information about a dataspace
*
*-------------------------------------------------------------------------
*/
@@ -32,9 +33,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 */
/****************/
@@ -74,13 +75,13 @@
/*-------------------------------------------------------------------------
- * 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,7 +89,7 @@
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
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index b352374..9f75785 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -12,10 +12,10 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Thursday, June 18, 1998
*
- * Purpose: Hyperslab selection dataspace I/O functions.
+ * Purpose: Hyperslab selection dataspace I/O functions.
*/
/****************/
@@ -30,8 +30,8 @@
/***********/
#include "H5private.h" /* Generic Functions */
#include "H5CXprivate.h" /* API Contexts */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free Lists */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free Lists */
#include "H5Iprivate.h" /* ID Functions */
#include "H5MMprivate.h" /* Memory management */
#include "H5Spkg.h" /* Dataspace functions */
@@ -304,7 +304,7 @@ H5FL_EXTERN(H5S_sel_iter_t);
static uint64_t H5S_hyper_op_gen_g = 1;
-/* Uncomment this, to provide the debugging routines for printing selection info */
+/* Uncomment this to provide the debugging routines for printing selection info */
/* #define H5S_HYPER_DEBUG */
#ifdef H5S_HYPER_DEBUG
static herr_t
@@ -385,7 +385,7 @@ H5S__hyper_print_diminfo(FILE *f, const H5S_t *space)
FUNC_LEAVE_NOAPI(SUCCEED)
}
-
+
/*--------------------------------------------------------------------------
NAME
H5S__hyper_print_spans_dfs
@@ -531,7 +531,7 @@ H5S__hyper_print_space_dfs(FILE *f, const H5S_t *space)
} /* end H5S__hyper_print_space_dfs() */
#endif /* H5S_HYPER_DEBUG */
-
+
/*-------------------------------------------------------------------------
* Function: H5S__hyper_get_op_gen
*
@@ -555,15 +555,15 @@ H5S__hyper_get_op_gen(void)
FUNC_LEAVE_NOAPI(H5S_hyper_op_gen_g++);
} /* end H5S__hyper_op_gen() */
-
+
/*-------------------------------------------------------------------------
* Function: H5S__hyper_iter_init
*
- * Purpose: Initializes iteration information for hyperslab selection.
+ * Purpose: Initializes iteration information for hyperslab selection.
*
- * Return: Non-negative on success, negative on failure.
+ * Return: Non-negative on success, negative on failure.
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, February 24, 2001
*
* Notes: If the 'iter->elmt_size' field is set to zero, the regular
@@ -794,16 +794,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__hyper_iter_init() */
-
+
/*-------------------------------------------------------------------------
* Function: H5S__hyper_iter_coords
*
- * Purpose: Retrieve the current coordinates of iterator for current
+ * Purpose: Retrieve the current coordinates of iterator for current
* selection
*
- * Return: Non-negative on success, negative on failure
+ * Return: Non-negative on success, negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, April 22, 2003
*
*-------------------------------------------------------------------------
@@ -879,16 +879,16 @@ H5S__hyper_iter_coords(const H5S_sel_iter_t *iter, hsize_t *coords)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__hyper_iter_coords() */
-
+
/*-------------------------------------------------------------------------
* Function: H5S__hyper_iter_block
*
- * Purpose: Retrieve the current block of iterator for current
+ * Purpose: Retrieve the current block of iterator for current
* selection
*
- * Return: Non-negative on success, negative on failure
+ * Return: Non-negative on success, negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, June 2, 2003
*
* Notes: This routine assumes that the iterator is always located at
@@ -916,28 +916,28 @@ H5S__hyper_iter_block(const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end)
for(u = 0; u < iter->rank; u++) {
start[u] = iter->u.hyp.off[u];
end[u] = (start[u] + iter->u.hyp.diminfo[u].block) - 1;
- } /* end for */
+ }
} /* end if */
else {
/* Copy the start & end of the block */
for(u = 0; u < iter->rank; u++) {
start[u] = iter->u.hyp.span[u]->low;
end[u] = iter->u.hyp.span[u]->high;
- } /* end for */
+ }
} /* end else */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__hyper_iter_block() */
-
+
/*-------------------------------------------------------------------------
* Function: H5S__hyper_iter_nelmts
*
- * Purpose: Return number of elements left to process in iterator
+ * Purpose: Return number of elements left to process in iterator
*
- * Return: Non-negative number of elements on success, zero on failure
+ * Return: Non-negative number of elements on success, zero on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, June 16, 1998
*
*-------------------------------------------------------------------------
@@ -953,7 +953,7 @@ H5S__hyper_iter_nelmts(const H5S_sel_iter_t *iter)
FUNC_LEAVE_NOAPI(iter->elmt_left)
} /* end H5S__hyper_iter_nelmts() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__hyper_iter_has_next_block
@@ -1009,17 +1009,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__hyper_iter_has_next_block() */
-
+
/*-------------------------------------------------------------------------
* Function: H5S__hyper_iter_next
*
- * Purpose: Moves a hyperslab iterator to the beginning of the next sequence
- * of elements to read. Handles walking off the end in all dimensions.
+ * Purpose: Moves a hyperslab iterator to the beginning of the next sequence
+ * of elements to read. Handles walking off the end in all dimensions.
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, September 8, 2000
*
*-------------------------------------------------------------------------
@@ -1216,17 +1216,17 @@ H5S__hyper_iter_next(H5S_sel_iter_t *iter, size_t nelem)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__hyper_iter_next() */
-
+
/*-------------------------------------------------------------------------
* Function: H5S__hyper_iter_next_block
*
- * Purpose: Moves a hyperslab iterator to the beginning of the next sequence
- * of elements to read. Handles walking off the end in all dimensions.
+ * Purpose: Moves a hyperslab iterator to the beginning of the next sequence
+ * of elements to read. Handles walking off the end in all dimensions.
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, June 3, 2003
*
*-------------------------------------------------------------------------
@@ -1391,7 +1391,7 @@ H5S__hyper_iter_next_block(H5S_sel_iter_t *iter)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__hyper_iter_next_block() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__hyper_iter_get_seq_list_gen
@@ -1409,7 +1409,7 @@ H5S__hyper_iter_next_block(H5S_sel_iter_t *iter)
hsize_t *off; OUT: Array of offsets
size_t *len; OUT: Array of lengths
RETURNS
- Non-negative on success/Negative on failure.
+ Non-negative on success/Negative on failure
DESCRIPTION
Use the selection in the dataspace to generate a list of byte offsets and
lengths for the region(s) selected. Start/Restart from the position in the
@@ -1756,7 +1756,7 @@ H5S__hyper_iter_get_seq_list_gen(H5S_sel_iter_t *iter, size_t maxseq, size_t max
/* Work back up through the dimensions */
while(curr_dim >= 0) {
/* Reset the current span */
- curr_span = ispan[curr_dim];
+ curr_span = ispan[curr_dim];
/* Increment absolute position */
abs_arr[curr_dim]++;
@@ -1843,7 +1843,7 @@ H5S__hyper_iter_get_seq_list_gen(H5S_sel_iter_t *iter, size_t maxseq, size_t max
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__hyper_iter_get_seq_list_gen() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__hyper_iter_get_seq_list_opt
@@ -2110,15 +2110,15 @@ H5S__hyper_iter_get_seq_list_opt(H5S_sel_iter_t *iter, size_t maxseq, size_t max
/* Read in data until an entire sequence can't be written out any longer */
while(curr_rows > 0) {
-#define DUFF_GUTS \
-/* Store the sequence information */ \
-off[curr_seq] = loc; \
-len[curr_seq] = actual_bytes; \
- \
-/* Increment sequence count */ \
-curr_seq++; \
- \
-/* Increment information to reflect block just processed */ \
+#define DUFF_GUTS \
+/* Store the sequence information */ \
+off[curr_seq] = loc; \
+len[curr_seq] = actual_bytes; \
+ \
+/* Increment sequence count */ \
+curr_seq++; \
+ \
+/* Increment information to reflect block just processed */ \
loc += fast_dim_buf_off;
#ifdef NO_DUFFS_DEVICE
@@ -2287,7 +2287,7 @@ loc += fast_dim_buf_off;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__hyper_iter_get_seq_list_opt() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__hyper_iter_get_seq_list_single
@@ -2565,7 +2565,7 @@ H5S__hyper_iter_get_seq_list_single(H5S_sel_iter_t *iter, size_t maxseq, size_t
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__hyper_iter_get_seq_list_single() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__hyper_iter_get_seq_list
@@ -2574,7 +2574,6 @@ H5S__hyper_iter_get_seq_list_single(H5S_sel_iter_t *iter, size_t maxseq, size_t
USAGE
herr_t H5S__hyper_iter_get_seq_list(iter,maxseq,maxelem,nseq,nelem,off,len)
H5S_t *space; IN: Dataspace containing selection to use.
- unsigned flags; IN: Flags for extra information about operation
H5S_sel_iter_t *iter; IN/OUT: Selection iterator describing last
position of interest in selection.
size_t maxseq; IN: Maximum number of sequences to generate
@@ -2727,7 +2726,7 @@ H5S__hyper_iter_get_seq_list(H5S_sel_iter_t *iter, size_t maxseq,
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__hyper_iter_get_seq_list() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__hyper_iter_release
@@ -2760,7 +2759,7 @@ H5S__hyper_iter_release(H5S_sel_iter_t *iter)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__hyper_iter_release() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__hyper_new_span
@@ -2808,7 +2807,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__hyper_new_span() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__hyper_new_span_info
@@ -2851,7 +2850,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__hyper_new_span_info() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__hyper_copy_span_helper
@@ -2947,7 +2946,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__hyper_copy_span_helper() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__hyper_copy_span
@@ -2992,7 +2991,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__hyper_copy_span() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__hyper_cmp_spans
@@ -3013,8 +3012,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static H5_ATTR_PURE hbool_t
-H5S__hyper_cmp_spans(const H5S_hyper_span_info_t *span_info1,
- const H5S_hyper_span_info_t *span_info2)
+H5S__hyper_cmp_spans(const H5S_hyper_span_info_t *span_info1, const H5S_hyper_span_info_t *span_info2)
{
hbool_t ret_value = TRUE; /* Return value */
@@ -3088,7 +3086,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__hyper_cmp_spans() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__hyper_free_span_info
@@ -3145,7 +3143,7 @@ H5S__hyper_free_span_info(H5S_hyper_span_info_t *span_info)
FUNC_LEAVE_NOAPI_VOID
} /* end H5S__hyper_free_span_info() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__hyper_free_span
@@ -3183,7 +3181,7 @@ H5S__hyper_free_span(H5S_hyper_span_t *span)
FUNC_LEAVE_NOAPI_VOID
} /* end H5S__hyper_free_span() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__hyper_copy
@@ -3258,7 +3256,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__hyper_copy() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__hyper_is_valid
@@ -3317,7 +3315,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__hyper_is_valid() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__hyper_span_nblocks_helper
@@ -3385,7 +3383,7 @@ H5S__hyper_span_nblocks_helper(H5S_hyper_span_info_t *spans, unsigned op_info_i,
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__hyper_span_nblocks_helper() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__hyper_span_nblocks
@@ -3426,7 +3424,7 @@ H5S__hyper_span_nblocks(H5S_hyper_span_info_t *spans)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__hyper_span_nblocks() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__get_select_hyper_nblocks
@@ -3463,7 +3461,7 @@ H5S__get_select_hyper_nblocks(const H5S_t *space, hbool_t app_ref)
/* Check each dimension */
for(ret_value = 1, u = 0; u < space->extent.rank; u++)
ret_value *= (app_ref ? space->select.sel_info.hslab->diminfo.app[u].count :
- space->select.sel_info.hslab->diminfo.opt[u].count);
+ space->select.sel_info.hslab->diminfo.opt[u].count);
} /* end if */
else
ret_value = H5S__hyper_span_nblocks(space->select.sel_info.hslab->span_lst);
@@ -3471,7 +3469,7 @@ H5S__get_select_hyper_nblocks(const H5S_t *space, hbool_t app_ref)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__get_select_hyper_nblocks() */
-
+
/*--------------------------------------------------------------------------
NAME
H5Sget_select_hyper_nblocks
@@ -3512,7 +3510,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Sget_select_hyper_nblocks() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__hyper_get_enc_size_real
@@ -3707,13 +3705,13 @@ H5S__hyper_get_version_enc_size(const H5S_t *space, hsize_t block_count, uint32_
default:
HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "unknown hyperslab selection version")
break;
- } /* end switch */
+ }
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5S__hyper_get_version_enc_size() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__hyper_serial_size
@@ -3738,14 +3736,15 @@ H5S__hyper_serial_size(const H5S_t *space)
{
hsize_t block_count = 0; /* block counter for regular hyperslabs */
uint32_t version; /* Version number */
- uint8_t enc_size; /* Encoded size of hyerslab selection info */
+ uint8_t enc_size; /* Encoded size of hyperslab selection info */
hssize_t ret_value = -1; /* return value */
FUNC_ENTER_STATIC
HDassert(space);
- if(space->select.sel_info.hslab->unlim_dim < 0) /* ! H5S_UNLIMITED */
+ /* Determine the number of blocks */
+ if(space->select.sel_info.hslab->unlim_dim < 0) /* ! H5S_UNLIMITED */
block_count = H5S__get_select_hyper_nblocks(space, FALSE);
/* Determine the version and the encoded size */
@@ -3787,7 +3786,7 @@ H5S__hyper_serial_size(const H5S_t *space)
*/
HDassert(enc_size == 8);
ret_value = (hssize_t)17 + ((hssize_t)4 * (hssize_t)8 * (hssize_t)space->extent.rank);
- } /* end else-if */
+ }
else {
HDassert(version == H5S_HYPER_VERSION_1);
HDassert(enc_size == 4);
@@ -3807,7 +3806,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__hyper_serial_size() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__hyper_serialize_helper
@@ -3928,14 +3927,14 @@ H5S__hyper_serialize_helper(const H5S_hyper_span_info_t *spans,
FUNC_LEAVE_NOAPI_VOID
} /* end H5S__hyper_serialize_helper() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__hyper_serialize
PURPOSE
Serialize the current selection into a user-provided buffer.
USAGE
- herr_t H5S_hyper_serialize(space, p)
+ herr_t H5S__hyper_serialize(space, p)
const H5S_t *space; IN: Dataspace with selection to serialize
uint8_t **p; OUT: Pointer to buffer to put serialized
selection. Will be advanced to end of
@@ -3958,7 +3957,7 @@ H5S__hyper_serialize(const H5S_t *space, uint8_t **p)
hsize_t offset[H5S_MAX_RANK]; /* Offset of element in dataspace */
hsize_t start[H5S_MAX_RANK]; /* Location of start of hyperslab */
hsize_t end[H5S_MAX_RANK]; /* Location of end of hyperslab */
- uint8_t *pp; /* Local pointer for decoding */
+ uint8_t *pp; /* Local pointer for encoding */
uint8_t *lenp = NULL; /* pointer to length location for later storage */
uint32_t len = 0; /* number of bytes used */
uint32_t version; /* Version number */
@@ -3969,7 +3968,7 @@ H5S__hyper_serialize(const H5S_t *space, uint8_t **p)
unsigned u; /* Local counting variable */
hbool_t complete = FALSE; /* Whether we are done with the iteration */
hbool_t is_regular; /* Whether selection is regular */
- uint8_t enc_size;
+ uint8_t enc_size; /* Encoded size */
herr_t ret_value = SUCCEED; /* return value */
FUNC_ENTER_STATIC
@@ -3984,7 +3983,8 @@ H5S__hyper_serialize(const H5S_t *space, uint8_t **p)
ndims = space->extent.rank;
diminfo = space->select.sel_info.hslab->diminfo.opt;
- if(space->select.sel_info.hslab->unlim_dim < 0) /* ! H5S_UNLIMITED */
+ /* Calculate the # of blocks */
+ if(space->select.sel_info.hslab->unlim_dim < 0) /* ! H5S_UNLIMITED */
block_count = H5S__get_select_hyper_nblocks(space, FALSE);
/* Determine the version and the encoded size */
@@ -4120,7 +4120,7 @@ H5S__hyper_serialize(const H5S_t *space, uint8_t **p)
tmp_count[fast_dim]--;
} /* end while */
- /* Work on other dimensions if necessary */
+ /* Work on other dimensions if necessary */
if(fast_dim > 0) {
int temp_dim; /* Temporary rank holder */
@@ -4141,7 +4141,7 @@ H5S__hyper_serialize(const H5S_t *space, uint8_t **p)
if(temp_dim == 0)
complete = TRUE;
- /* Reset the block count in this dimension */
+ /* Reset the block count in this dimension */
tmp_count[temp_dim] = diminfo[temp_dim].count;
/* Wrapped a dimension, go up to next dimension */
@@ -4204,7 +4204,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__hyper_serialize() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__hyper_deserialize
@@ -4284,7 +4284,7 @@ H5S__hyper_deserialize(H5S_t **space, const uint8_t **p)
/* Check for unknown flags */
if(flags & ~H5S_SELECT_FLAG_BITS)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTLOAD, FAIL, "unknown flag for selection")
- } /* end if */
+ }
else {
/* Skip over the remainder of the header */
pp += 8;
@@ -4300,7 +4300,7 @@ H5S__hyper_deserialize(H5S_t **space, const uint8_t **p)
if(!*space) {
/* Patch the rank of the allocated dataspace */
- (void)HDmemset(dims, 0, (size_t)rank * sizeof(dims[0]));
+ HDmemset(dims, 0, (size_t)rank * sizeof(dims[0]));
if(H5S_set_extent_simple(tmp_space, rank, dims, NULL) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "can't set dimensions")
} /* end if */
@@ -4315,7 +4315,7 @@ H5S__hyper_deserialize(H5S_t **space, const uint8_t **p)
/* Sanity checks */
HDassert(H5S_UNLIMITED == HSIZE_UNDEF);
- HDassert(version >= 2);
+ HDassert(version >= H5S_HYPER_VERSION_2);
/* Decode start/stride/block/count */
switch(enc_size) {
@@ -4383,7 +4383,7 @@ H5S__hyper_deserialize(H5S_t **space, const uint8_t **p)
size_t num_elem; /* Number of elements in selection */
unsigned v; /* Local counting variable */
- /* decode the number of blocks */
+ /* Decode the number of blocks */
switch(enc_size) {
case H5S_SELECT_INFO_ENC_SIZE_2:
UINT16DECODE(pp, num_elem);
@@ -4461,7 +4461,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__hyper_deserialize() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__hyper_span_blocklist
@@ -4566,7 +4566,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__hyper_span_blocklist() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__get_select_hyper_blocklist
@@ -4748,7 +4748,7 @@ H5S__get_select_hyper_blocklist(H5S_t *space, hsize_t startblock,
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__get_select_hyper_blocklist() */
-
+
/*--------------------------------------------------------------------------
NAME
H5Sget_select_hyper_blocklist
@@ -4761,7 +4761,7 @@ H5S__get_select_hyper_blocklist(H5S_t *space, hsize_t startblock,
hsize_t numblocks; IN: Number of hyperslab blocks to get
hsize_t buf[]; OUT: List of hyperslab blocks selected
RETURNS
- Non-negative on success/Negative on failure
+ Non-negative on success, negative on failure
DESCRIPTION
Puts a list of the hyperslab blocks into the user's buffer. The blocks
start with the 'startblock'th block in the list of blocks and put
@@ -4809,7 +4809,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Sget_select_hyper_blocklist() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__hyper_bounds
@@ -4890,7 +4890,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__hyper_bounds() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__hyper_offset
@@ -4999,7 +4999,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__hyper_offset() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__hyper_unlim_dim
@@ -5026,7 +5026,7 @@ H5S__hyper_unlim_dim(const H5S_t *space)
FUNC_LEAVE_NOAPI(space->select.sel_info.hslab->unlim_dim);
} /* end H5S__hyper_unlim_dim() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__hyper_num_elem_non_unlim
@@ -5068,7 +5068,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__hyper_num_elem_non_unlim() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__hyper_is_contiguous
@@ -5254,7 +5254,7 @@ H5S__hyper_is_contiguous(const H5S_t *space)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__hyper_is_contiguous() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__hyper_is_single
@@ -5327,7 +5327,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__hyper_is_single() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__hyper_is_regular
@@ -5372,7 +5372,7 @@ H5S__hyper_is_regular(const H5S_t *space)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__hyper_is_regular() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__hyper_spans_shape_same_helper
@@ -5724,7 +5724,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__hyper_shape_same() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__hyper_release
@@ -5765,7 +5765,7 @@ H5S__hyper_release(H5S_t *space)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__hyper_release() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__hyper_coord_to_span
@@ -5828,7 +5828,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__hyper_coord_to_span() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__hyper_add_span_element_helper
@@ -6494,7 +6494,7 @@ H5S__hyper_adjust_u(H5S_t *space, const hsize_t *offset)
if(0 != offset[u]) {
non_zero_offset = TRUE;
break;
- } /* end if */
+ }
/* Only perform operation if the offset is non-zero */
if(non_zero_offset) {
@@ -7060,7 +7060,7 @@ H5S__hyper_adjust_s(H5S_t *space, const hssize_t *offset)
* simultaneous operations */
H5S__hyper_adjust_s_helper(space->select.sel_info.hslab->span_lst, space->extent.rank, offset, 0, op_gen);
} /* end if */
- } /* end if */
+ }
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -9020,7 +9020,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__hyper_generate_spans() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__check_spans_overlap
@@ -9404,11 +9404,11 @@ done:
/*-------------------------------------------------------------------------
* Function: H5S__generate_hyperlab
*
- * Purpose: Generate hyperslab information from H5S_select_hyperslab()
+ * Purpose: Generate hyperslab information from H5S_select_hyperslab()
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, September 12, 2000
*
*-------------------------------------------------------------------------
@@ -9824,11 +9824,11 @@ done:
/*-------------------------------------------------------------------------
* Function: H5S_select_hyperslab
*
- * Purpose: Internal version of H5Sselect_hyperslab().
+ * Purpose: Internal version of H5Sselect_hyperslab().
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Wednesday, January 10, 2001
*
*-------------------------------------------------------------------------
@@ -10495,9 +10495,9 @@ hid_t
H5Scombine_hyperslab(hid_t space_id, H5S_seloper_t op, const hsize_t start[],
const hsize_t stride[], const hsize_t count[], const hsize_t block[])
{
- H5S_t *space; /* Dataspace to modify selection of */
- H5S_t *new_space = NULL; /* New dataspace created */
- hid_t ret_value; /* Return value */
+ H5S_t *space; /* Dataspace to modify selection of */
+ H5S_t *new_space = NULL; /* New dataspace created */
+ hid_t ret_value; /* Return value */
FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE6("i", "iSs*h*h*h*h", space_id, op, start, stride, count, block);
@@ -10529,11 +10529,11 @@ done:
/*-------------------------------------------------------------------------
* Function: H5S__combine_select
*
- * Purpose: Internal version of H5Scombine_select().
+ * Purpose: Internal version of H5Scombine_select().
*
- * Return: New dataspace on success/NULL on failure
+ * Return: New dataspace on success/NULL on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, October 30, 2001
*
*-------------------------------------------------------------------------
@@ -10668,15 +10668,15 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Scombine_select() */
-
+
/*-------------------------------------------------------------------------
* Function: H5S__modify_select
*
- * Purpose: Internal version of H5Smodify_select().
+ * Purpose: Internal version of H5Smodify_select().
*
- * Return: New dataspace on success/NULL on failure
+ * Return: New dataspace on success/NULL on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, October 30, 2001
*
*-------------------------------------------------------------------------
@@ -12174,7 +12174,7 @@ H5S_hyper_get_first_inc_block(const H5S_t *space, hsize_t clip_size,
hbool_t *partial)
{
H5S_hyper_sel_t *hslab; /* Convenience pointer to hyperslab info */
- H5S_hyper_dim_t *diminfo; /* Convenience pointer to diminfo.opt in unlimited dimension */
+ H5S_hyper_dim_t *diminfo; /* Convenience pointer to diminfo in unlimited dimension */
hsize_t ret_value = 0;
FUNC_ENTER_NOAPI(0)
diff --git a/src/H5Smpio.c b/src/H5Smpio.c
index 33dd492..147fd25 100644
--- a/src/H5Smpio.c
+++ b/src/H5Smpio.c
@@ -14,7 +14,7 @@
/*
* Programmer: rky 980813
*
- * Purpose: Create MPI data types for HDF5 selections.
+ * Purpose: Create MPI data types for HDF5 selections.
*
*/
@@ -148,14 +148,14 @@ H5S__mpio_all_type(const H5S_t *space, size_t elmt_size,
*new_type = MPI_BYTE;
H5_CHECKED_ASSIGN(*count, int, total_bytes, hsize_t);
*is_derived_type = FALSE;
- } /* end if */
+ }
else {
/* Create a LARGE derived datatype for this transfer */
if(H5_mpio_create_large_type(total_bytes, 0, MPI_BYTE, new_type) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "couldn't create a large datatype from the all selection")
*count = 1;
*is_derived_type = TRUE;
- } /* end else */
+ }
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -253,7 +253,7 @@ H5S__mpio_create_point_datatype(size_t elmt_size, hsize_t num_points,
/* Commit MPI datatype for later use */
if(MPI_SUCCESS != (mpi_code = MPI_Type_commit(new_type)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_commit failed", mpi_code)
- } /* end if */
+ }
else {
/* use LARGE_DATATYPE::
* We'll create an hindexed_block type for every 2G point count and then combine
@@ -295,7 +295,7 @@ H5S__mpio_create_point_datatype(size_t elmt_size, hsize_t num_points,
#if MPI_VERSION >= 3
if(MPI_SUCCESS != (mpi_code = MPI_Type_create_hindexed_block((int)bigio_count,
1, &disp[(hsize_t)i*bigio_count], elmt_type, &inner_types[i])))
- HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_hindexed_block failed", mpi_code)
+ HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_hindexed_block failed", mpi_code);
#else
if(MPI_SUCCESS != (mpi_code = MPI_Type_create_hindexed((int)bigio_count,
blocks, &disp[i*bigio_count], elmt_type, &inner_types[i])))
@@ -309,7 +309,7 @@ H5S__mpio_create_point_datatype(size_t elmt_size, hsize_t num_points,
#if MPI_VERSION >= 3
if(MPI_SUCCESS != (mpi_code = MPI_Type_create_hindexed_block(remaining_points,
1, &disp[(hsize_t)num_big_types*bigio_count], elmt_type, &inner_types[num_big_types])))
- HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_hindexed_block failed", mpi_code)
+ HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_hindexed_block failed", mpi_code);
#else
if(MPI_SUCCESS != (mpi_code = MPI_Type_create_hindexed((int)remaining_points,
blocks, &disp[num_big_types*bigio_count], elmt_type, &inner_types[num_big_types])))
@@ -317,11 +317,12 @@ H5S__mpio_create_point_datatype(size_t elmt_size, hsize_t num_points,
#endif
inner_blocks[num_big_types] = 1;
inner_disps[num_big_types] = 0;
- } /* end if */
+ }
if(MPI_SUCCESS != (mpi_code = MPI_Type_create_struct(total_types,
inner_blocks, inner_disps, inner_types, new_type)))
- HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_struct", mpi_code)
+ HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_struct", mpi_code);
+
for(i = 0; i < total_types; i++)
MPI_Type_free(&inner_types[i]);
@@ -492,7 +493,7 @@ done:
* selection and so the memory datatype has to be permuted using the
* permutation map created by the file selection.
*
- * Note: This routine is called from H5_mpio_space_type(), which is
+ * Note: This routine is called from H5S_mpio_space_type(), which is
* called first for the file dataspace and creates
*
* Return: Non-negative on success, negative on failure.
@@ -799,7 +800,7 @@ if(H5DEBUG(S)) {
/* Use a single MPI datatype that has a 32 bit size */
if(MPI_SUCCESS != (mpi_code = MPI_Type_contiguous((int)elmt_size, MPI_BYTE, &inner_type)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_contiguous failed", mpi_code)
- } /* end if */
+ }
else
/* Create the compound datatype for this operation (> 2GB) */
if(H5_mpio_create_large_type(elmt_size, 0, MPI_BYTE, &inner_type) < 0)
@@ -836,7 +837,7 @@ if(H5DEBUG(S))
MPI_Type_free(&inner_type);
if(mpi_code != MPI_SUCCESS)
HMPI_GOTO_ERROR(FAIL, "couldn't create MPI vector type", mpi_code)
- } /* end if */
+ }
else {
/* Things get a bit more complicated and require LARGE_DATATYPE processing
* There are two MPI datatypes that need to be created:
@@ -858,7 +859,7 @@ if(H5DEBUG(S))
if(bigio_count < d[i].block) {
if(H5_mpio_create_large_type(d[i].block, 0, inner_type, &block_type) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "couldn't create a large block datatype in hyper selection")
- } /* end if */
+ }
else
if(MPI_SUCCESS != (mpi_code = MPI_Type_contiguous((int)d[i].block, inner_type, &block_type)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_contiguous failed", mpi_code)
@@ -879,7 +880,7 @@ if(H5DEBUG(S))
if(bigio_count < d[i].count) {
if(H5_mpio_create_large_type(d[i].count, stride_in_bytes, block_type, &outer_type) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "couldn't create a large outer datatype in hyper selection")
- } /* end if */
+ }
/* otherwise a regular create_hvector will do */
else
if(MPI_SUCCESS != (mpi_code = MPI_Type_create_hvector((int)d[i].count, /* count */
@@ -891,7 +892,7 @@ if(H5DEBUG(S))
MPI_Type_free(&block_type);
MPI_Type_free(&inner_type);
- } /* end else */
+ } /* end else */
/****************************************
* Then build the dimension type as (start, vector type, xtent).
@@ -1004,7 +1005,7 @@ H5S__mpio_span_hyper_type(const H5S_t *space, size_t elmt_size,
if(bigio_count >= elmt_size) {
if(MPI_SUCCESS != (mpi_code = MPI_Type_contiguous((int)elmt_size, MPI_BYTE, &elmt_type)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_contiguous failed", mpi_code)
- } /* end if */
+ }
else
if(H5_mpio_create_large_type(elmt_size, 0, MPI_BYTE, &elmt_type) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "couldn't create a large element datatype in span_hyper selection")
@@ -1113,7 +1114,6 @@ H5S__obtain_datatype(H5S_hyper_span_info_t *spans, const hsize_t *down,
{
H5S_hyper_span_t *span; /* Hyperslab span to iterate with */
hsize_t bigio_count; /* Transition point to create derived type */
-
size_t alloc_count = 0; /* Number of span tree nodes allocated at this level */
size_t outercount = 0; /* Number of span tree nodes at this level */
MPI_Datatype *inner_type = NULL;
diff --git a/src/H5Snone.c b/src/H5Snone.c
index 630d1d5..672302d 100644
--- a/src/H5Snone.c
+++ b/src/H5Snone.c
@@ -29,7 +29,7 @@
/* Headers */
/***********/
#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
+#include "H5Eprivate.h" /* Error handling */
#include "H5Iprivate.h" /* ID Functions */
#include "H5Spkg.h" /* Dataspace functions */
#include "H5VMprivate.h" /* Vector functions */
@@ -68,8 +68,7 @@ static htri_t H5S__none_intersect_block(const H5S_t *space, const hsize_t *start
static herr_t H5S__none_adjust_u(H5S_t *space, const hsize_t *offset);
static herr_t H5S__none_adjust_s(H5S_t *space, const hssize_t *offset);
static herr_t H5S__none_project_scalar(const H5S_t *space, hsize_t *offset);
-static herr_t H5S__none_project_simple(const H5S_t *space, H5S_t *new_space,
- hsize_t *offset);
+static herr_t H5S__none_project_simple(const H5S_t *space, H5S_t *new_space, hsize_t *offset);
static herr_t H5S__none_iter_init(const H5S_t *space, H5S_sel_iter_t *iter);
/* Selection iteration callbacks */
@@ -143,13 +142,13 @@ static const H5S_sel_iter_class_t H5S_sel_iter_none[1] = {{
/*-------------------------------------------------------------------------
- * Function: H5S__none_iter_init
+ * Function: H5S__none_iter_init
*
- * Purpose: Initializes iteration information for "none" selection.
+ * Purpose: Initializes iteration information for "none" selection.
*
- * Return: Non-negative on success, negative on failure.
+ * Return: Non-negative on success, negative on failure.
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, June 16, 1998
*
*-------------------------------------------------------------------------
@@ -171,21 +170,20 @@ H5S__none_iter_init(const H5S_t H5_ATTR_UNUSED *space, H5S_sel_iter_t *iter)
/*-------------------------------------------------------------------------
- * Function: H5S__none_iter_coords
+ * Function: H5S__none_iter_coords
*
- * Purpose: Retrieve the current coordinates of iterator for current
+ * Purpose: Retrieve the current coordinates of iterator for current
* selection
*
- * Return: Non-negative on success, negative on failure
+ * Return: Non-negative on success, negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, April 22, 2003
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5S__none_iter_coords(const H5S_sel_iter_t H5_ATTR_UNUSED *iter,
- hsize_t H5_ATTR_UNUSED *coords)
+H5S__none_iter_coords(const H5S_sel_iter_t H5_ATTR_UNUSED *iter, hsize_t H5_ATTR_UNUSED *coords)
{
FUNC_ENTER_STATIC_NOERR
@@ -198,21 +196,20 @@ H5S__none_iter_coords(const H5S_sel_iter_t H5_ATTR_UNUSED *iter,
/*-------------------------------------------------------------------------
- * Function: H5S__none_iter_block
+ * Function: H5S__none_iter_block
*
- * Purpose: Retrieve the current block of iterator for current
+ * Purpose: Retrieve the current block of iterator for current
* selection
*
- * Return: Non-negative on success, negative on failure
+ * Return: Non-negative on success, negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, June 2, 2003
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5S__none_iter_block(const H5S_sel_iter_t H5_ATTR_UNUSED *iter,
- hsize_t H5_ATTR_UNUSED *start, hsize_t H5_ATTR_UNUSED *end)
+H5S__none_iter_block(const H5S_sel_iter_t H5_ATTR_UNUSED *iter, hsize_t H5_ATTR_UNUSED *start, hsize_t H5_ATTR_UNUSED *end)
{
FUNC_ENTER_STATIC_NOERR
@@ -226,13 +223,13 @@ H5S__none_iter_block(const H5S_sel_iter_t H5_ATTR_UNUSED *iter,
/*-------------------------------------------------------------------------
- * Function: H5S__none_iter_nelmts
+ * Function: H5S__none_iter_nelmts
*
- * Purpose: Return number of elements left to process in iterator
+ * Purpose: Return number of elements left to process in iterator
*
- * Return: Non-negative number of elements on success, zero on failure
+ * Return: Non-negative number of elements on success, zero on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, June 16, 1998
*
*-------------------------------------------------------------------------
@@ -472,8 +469,7 @@ H5S__none_release(H5S_t H5_ATTR_UNUSED *space)
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5S__none_copy(H5S_t *dst, const H5S_t H5_ATTR_UNUSED *src,
- hbool_t H5_ATTR_UNUSED share_selection)
+H5S__none_copy(H5S_t *dst, const H5S_t H5_ATTR_UNUSED *src, hbool_t H5_ATTR_UNUSED share_selection)
{
FUNC_ENTER_STATIC_NOERR
@@ -586,8 +582,8 @@ H5S__none_serialize(const H5S_t *space, uint8_t **p)
HDassert(pp);
/* Store the preamble information */
- UINT32ENCODE(pp, (uint32_t)H5S_GET_SELECT_TYPE(space)); /* Store the type of selection */
- UINT32ENCODE(pp, (uint32_t)H5S_NONE_VERSION_1); /* Store the version number */
+ UINT32ENCODE(pp, (uint32_t)H5S_GET_SELECT_TYPE(space)); /* Store the type of selection */
+ UINT32ENCODE(pp, (uint32_t)H5S_NONE_VERSION_1); /* Store the version number */
UINT32ENCODE(pp, (uint32_t)0); /* Store the un-used padding */
UINT32ENCODE(pp, (uint32_t)0); /* Store the additional information length */
@@ -698,8 +694,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5S__none_bounds(const H5S_t H5_ATTR_UNUSED *space, hsize_t H5_ATTR_UNUSED *start,
- hsize_t H5_ATTR_UNUSED *end)
+H5S__none_bounds(const H5S_t H5_ATTR_UNUSED *space, hsize_t H5_ATTR_UNUSED *start, hsize_t H5_ATTR_UNUSED *end)
{
FUNC_ENTER_STATIC_NOERR
@@ -708,7 +703,7 @@ H5S__none_bounds(const H5S_t H5_ATTR_UNUSED *space, hsize_t H5_ATTR_UNUSED *star
HDassert(end);
FUNC_LEAVE_NOAPI(FAIL)
-} /* end H5Sget_none_bounds() */
+} /* end H5S_none_bounds() */
/*--------------------------------------------------------------------------
@@ -991,11 +986,11 @@ H5S__none_adjust_s(H5S_t H5_ATTR_UNUSED *space, const hssize_t H5_ATTR_UNUSED *o
/*-------------------------------------------------------------------------
- * Function: H5S__none_project_scalar
+ * Function: H5S__none_project_scalar
*
- * Purpose: Projects a 'none' selection into a scalar dataspace
+ * Purpose: Projects a 'none' selection into a scalar dataspace
*
- * Return: Non-negative on success, negative on failure.
+ * Return: Non-negative on success, negative on failure.
*
* Programmer: Quincey Koziol
* Sunday, July 18, 2010
@@ -1016,14 +1011,14 @@ H5S__none_project_scalar(const H5S_t H5_ATTR_UNUSED *space, hsize_t H5_ATTR_UNUS
/*-------------------------------------------------------------------------
- * Function: H5S__none_project_simple
+ * Function: H5S__none_project_simple
*
- * Purpose: Projects an 'none' selection onto/into a simple dataspace
+ * Purpose: Projects an 'none' selection onto/into a simple dataspace
* of a different rank
*
- * Return: Non-negative on success, negative on failure.
+ * Return: Non-negative on success, negative on failure.
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Sunday, July 18, 2010
*
*-------------------------------------------------------------------------
diff --git a/src/H5Spkg.h b/src/H5Spkg.h
index da2dd4a..e08fedf 100644
--- a/src/H5Spkg.h
+++ b/src/H5Spkg.h
@@ -324,11 +324,9 @@ struct H5S_t {
/* Selection iteration methods */
/* Method to retrieve the current coordinates of iterator for current selection */
-typedef herr_t (*H5S_sel_iter_coords_func_t)(const H5S_sel_iter_t *iter,
- hsize_t *coords);
+typedef herr_t (*H5S_sel_iter_coords_func_t)(const H5S_sel_iter_t *iter, hsize_t *coords);
/* Method to retrieve the current block of iterator for current selection */
-typedef herr_t (*H5S_sel_iter_block_func_t)(const H5S_sel_iter_t *iter,
- hsize_t *start, hsize_t *end);
+typedef herr_t (*H5S_sel_iter_block_func_t)(const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end);
/* Method to determine number of elements left in iterator for current selection */
typedef hsize_t (*H5S_sel_iter_nelmts_func_t)(const H5S_sel_iter_t *iter);
/* Method to determine if there are more blocks left in the current selection */
diff --git a/src/H5Spoint.c b/src/H5Spoint.c
index 6948125..be9015f 100644
--- a/src/H5Spoint.c
+++ b/src/H5Spoint.c
@@ -15,7 +15,7 @@
* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
* Tuesday, June 16, 1998
*
- * Purpose: Point selection dataspace I/O functions.
+ * Purpose: Point selection dataspace I/O functions.
*/
/****************/
@@ -30,8 +30,8 @@
/***********/
#include "H5private.h" /* Generic Functions */
#include "H5CXprivate.h" /* API Contexts */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free Lists */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free Lists */
#include "H5Iprivate.h" /* ID Functions */
#include "H5MMprivate.h" /* Memory management */
#include "H5Spkg.h" /* Dataspace functions */
@@ -75,21 +75,17 @@ static htri_t H5S__point_is_contiguous(const H5S_t *space);
static htri_t H5S__point_is_single(const H5S_t *space);
static htri_t H5S__point_is_regular(const H5S_t *space);
static htri_t H5S__point_shape_same(const H5S_t *space1, const H5S_t *space2);
-static htri_t H5S__point_intersect_block(const H5S_t *space, const hsize_t *start,
- const hsize_t *end);
+static htri_t H5S__point_intersect_block(const H5S_t *space, const hsize_t *start, const hsize_t *end);
static herr_t H5S__point_adjust_u(H5S_t *space, const hsize_t *offset);
static herr_t H5S__point_adjust_s(H5S_t *space, const hssize_t *offset);
-static herr_t H5S__point_project_scalar(const H5S_t *spasce, hsize_t *offset);
-static herr_t H5S__point_project_simple(const H5S_t *space, H5S_t *new_space,
- hsize_t *offset);
+static herr_t H5S__point_project_scalar(const H5S_t *space, hsize_t *offset);
+static herr_t H5S__point_project_simple(const H5S_t *space, H5S_t *new_space, hsize_t *offset);
static herr_t H5S__point_iter_init(const H5S_t *space, H5S_sel_iter_t *iter);
-static herr_t H5S__point_get_version_enc_size(const H5S_t *space,
- uint32_t *version, uint8_t *enc_size);
+static herr_t H5S__point_get_version_enc_size(const H5S_t *space, uint32_t *version, uint8_t *enc_size);
/* Selection iteration callbacks */
static herr_t H5S__point_iter_coords(const H5S_sel_iter_t *iter, hsize_t *coords);
-static herr_t H5S__point_iter_block(const H5S_sel_iter_t *iter, hsize_t *start,
- hsize_t *end);
+static herr_t H5S__point_iter_block(const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end);
static hsize_t H5S__point_iter_nelmts(const H5S_sel_iter_t *iter);
static htri_t H5S__point_iter_has_next_block(const H5S_sel_iter_t *iter);
static herr_t H5S__point_iter_next(H5S_sel_iter_t *sel_iter, size_t nelem);
@@ -169,16 +165,15 @@ H5FL_BARR_DEFINE_STATIC(H5S_pnt_node_t, hcoords_t, H5S_MAX_RANK);
/* Declare a free list to manage the H5S_pnt_list_t struct */
H5FL_DEFINE_STATIC(H5S_pnt_list_t);
-
-
+
/*-------------------------------------------------------------------------
* Function: H5S__point_iter_init
*
- * Purpose: Initializes iteration information for point selection.
+ * Purpose: Initializes iteration information for point selection.
*
- * Return: Non-negative on success, negative on failure.
+ * Return: Non-negative on success, negative on failure.
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, June 16, 1998
*
*-------------------------------------------------------------------------
@@ -223,16 +218,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__point_iter_init() */
-
+
/*-------------------------------------------------------------------------
* Function: H5S__point_iter_coords
*
- * Purpose: Retrieve the current coordinates of iterator for current
+ * Purpose: Retrieve the current coordinates of iterator for current
* selection
*
- * Return: Non-negative on success, negative on failure
+ * Return: Non-negative on success, negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, April 22, 2003
*
*-------------------------------------------------------------------------
@@ -252,16 +247,16 @@ H5S__point_iter_coords(const H5S_sel_iter_t *iter, hsize_t *coords)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__point_iter_coords() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5S__point_iter_block
+ * Function: H5S_point_iter_block
*
- * Purpose: Retrieve the current block of iterator for current
+ * Purpose: Retrieve the current block of iterator for current
* selection
*
- * Return: Non-negative on success, negative on failure
+ * Return: Non-negative on success, negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, June 2, 2003
*
*-------------------------------------------------------------------------
@@ -283,15 +278,15 @@ H5S__point_iter_block(const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__point_iter_block() */
-
+
/*-------------------------------------------------------------------------
* Function: H5S__point_iter_nelmts
*
- * Purpose: Return number of elements left to process in iterator
+ * Purpose: Return number of elements left to process in iterator
*
- * Return: Non-negative number of elements on success, zero on failure
+ * Return: Non-negative number of elements on success, zero on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, June 16, 1998
*
*-------------------------------------------------------------------------
@@ -307,7 +302,7 @@ H5S__point_iter_nelmts(const H5S_sel_iter_t *iter)
FUNC_LEAVE_NOAPI(iter->elmt_left)
} /* end H5S__point_iter_nelmts() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__point_iter_has_next_block
@@ -343,7 +338,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__point_iter_has_next_block() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__point_iter_next
@@ -380,7 +375,7 @@ H5S__point_iter_next(H5S_sel_iter_t *iter, size_t nelem)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__point_iter_next() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__point_iter_next_block
@@ -412,7 +407,7 @@ H5S__point_iter_next_block(H5S_sel_iter_t *iter)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__point_iter_next_block() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__point_iter_get_seq_list
@@ -543,7 +538,7 @@ H5S__point_iter_get_seq_list(H5S_sel_iter_t *iter, size_t maxseq, size_t maxelem
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__point_iter_get_seq_list() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__point_iter_release
@@ -577,7 +572,7 @@ H5S__point_iter_release(H5S_sel_iter_t * iter)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__point_iter_release() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__point_add
@@ -694,7 +689,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__point_add() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__point_release
@@ -732,7 +727,7 @@ H5S__point_release(H5S_t *space)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__point_release() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S_select_elements
@@ -789,7 +784,7 @@ H5S_select_elements(H5S_t *space, H5S_seloper_t op, size_t num_elem,
/* Set the bound box to the default value */
H5VM_array_fill(space->select.sel_info.pnt_lst->low_bounds, &tmp, sizeof(hsize_t), space->extent.rank);
HDmemset(space->select.sel_info.pnt_lst->high_bounds, 0, sizeof(hsize_t) * space->extent.rank);
- } /* end if */
+ }
/* Add points to selection */
if(H5S__point_add(space, op, num_elem, coord) < 0)
@@ -802,7 +797,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_select_elements() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__copy_pnt_list
@@ -878,7 +873,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__copy_pnt_list() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__free_pnt_list
@@ -920,7 +915,7 @@ H5S__free_pnt_list(H5S_pnt_list_t *pnt_lst)
FUNC_LEAVE_NOAPI_VOID
} /* end H5S__free_pnt_list() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__point_copy
@@ -948,7 +943,7 @@ H5S__point_copy(H5S_t *dst, const H5S_t *src, hbool_t H5_ATTR_UNUSED share_selec
FUNC_ENTER_STATIC
- /* Sanity check */
+ /* Sanity checks */
HDassert(src);
HDassert(dst);
@@ -960,7 +955,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__point_copy() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__point_is_valid
@@ -1004,7 +999,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__point_is_valid() */
-
+
/*--------------------------------------------------------------------------
NAME
H5Sget_select_elem_npoints
@@ -1050,7 +1045,7 @@ done:
PURPOSE
Determine the version and the size (2, 4 or 8 bytes) to encode point selection info
USAGE
- hssize_t H5S__point_set_enc_size(space, version, enc_size)
+ hssize_t H5S__point_get_version_enc_size(space, version, enc_size)
const H5S_t *space: IN: Dataspace ID of selection to query
uint32_t *version: OUT: The version to use for encoding
uint8_t *enc_size: OUT: The size to use for encoding
@@ -1161,7 +1156,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5S__point_get_version_enc_size() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__point_serial_size
@@ -1194,7 +1189,7 @@ H5S__point_serial_size(const H5S_t *space)
/* Determine the version and encoded size for point selection */
if(H5S__point_get_version_enc_size(space, &version, &enc_size) < 0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't determine hyper version")
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't determine version and enc_size")
/* Basic number of bytes required to serialize point selection: */
if(version >= H5S_POINT_VERSION_2)
@@ -1220,7 +1215,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__point_serial_size() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__point_serialize
@@ -1246,7 +1241,7 @@ static herr_t
H5S__point_serialize(const H5S_t *space, uint8_t **p)
{
H5S_pnt_node_t *curr; /* Point information nodes */
- uint8_t *pp; /* Local pointer for decoding */
+ uint8_t *pp; /* Local pointer for encoding */
uint8_t *lenp = NULL; /* pointer to length location for later storage */
uint32_t len=0; /* number of bytes used */
unsigned u; /* local counting variable */
@@ -1264,7 +1259,7 @@ H5S__point_serialize(const H5S_t *space, uint8_t **p)
/* Determine the version and encoded size for point selection info */
if(H5S__point_get_version_enc_size(space, &version, &enc_size) < 0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't determine hyper version")
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't determine version and enc_size")
/* Store the preamble information */
UINT32ENCODE(pp, (uint32_t)H5S_GET_SELECT_TYPE(space)); /* Store the type of selection */
@@ -1352,8 +1347,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5S__point_serialize() */
-
-
+
/*--------------------------------------------------------------------------
NAME
H5S__point_deserialize
@@ -1508,7 +1502,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__point_deserialize() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__get_select_elem_pointlist
@@ -1539,8 +1533,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5S__get_select_elem_pointlist(const H5S_t *space, hsize_t startpoint,
- hsize_t numpoints, hsize_t *buf)
+H5S__get_select_elem_pointlist(const H5S_t *space, hsize_t startpoint, hsize_t numpoints, hsize_t *buf)
{
H5S_pnt_node_t *node; /* Point node */
unsigned rank; /* Dataspace rank */
@@ -1573,7 +1566,7 @@ H5S__get_select_elem_pointlist(const H5S_t *space, hsize_t startpoint,
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__get_select_elem_pointlist() */
-
+
/*--------------------------------------------------------------------------
NAME
H5Sget_select_elem_pointlist
@@ -1627,7 +1620,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Sget_select_elem_pointlist() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__point_bounds
@@ -1685,7 +1678,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__point_bounds() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__point_offset
@@ -1749,7 +1742,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__point_offset() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__point_unlim_dim
@@ -1778,7 +1771,7 @@ H5S__point_unlim_dim(const H5S_t H5_ATTR_UNUSED *space)
FUNC_LEAVE_NOAPI(-1)
} /* end H5S__point_unlim_dim() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__point_is_contiguous
@@ -1818,7 +1811,7 @@ H5S__point_is_contiguous(const H5S_t *space)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__point_is_contiguous() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__point_is_single
@@ -1855,7 +1848,7 @@ H5S__point_is_single(const H5S_t *space)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__point_is_single() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__point_is_regular
@@ -1896,7 +1889,7 @@ H5S__point_is_regular(const H5S_t *space)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__point_is_regular() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__point_shape_same
@@ -2004,7 +1997,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__point_shape_same() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__point_intersect_block
@@ -2061,7 +2054,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__point_intersect_block() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__point_adjust_u
@@ -2098,7 +2091,7 @@ H5S__point_adjust_u(H5S_t *space, const hsize_t *offset)
if(0 != offset[u]) {
non_zero_offset = TRUE;
break;
- } /* end if */
+ }
/* Only perform operation if the offset is non-zero */
if(non_zero_offset) {
@@ -2129,7 +2122,7 @@ H5S__point_adjust_u(H5S_t *space, const hsize_t *offset)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__point_adjust_u() */
-
+
/*--------------------------------------------------------------------------
NAME
H5S__point_adjust_s
@@ -2199,15 +2192,16 @@ H5S__point_adjust_s(H5S_t *space, const hssize_t *offset)
} /* end H5S__point_adjust_s() */
+
/*-------------------------------------------------------------------------
* Function: H5S__point_project_scalar
*
- * Purpose: Projects a single element point selection into a scalar
+ * Purpose: Projects a single element point selection into a scalar
* dataspace
*
- * Return: Non-negative on success, negative on failure.
+ * Return: Non-negative on success, negative on failure.
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Sunday, July 18, 2010
*
*-------------------------------------------------------------------------
@@ -2238,16 +2232,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__point_project_scalar() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5S__point_project_simple
+ * Function: H5S_point_project_simple
*
- * Purpose: Projects a point selection onto/into a simple dataspace
+ * Purpose: Projects a point selection onto/into a simple dataspace
* of a different rank
*
- * Return: Non-negative on success, negative on failure.
+ * Return: Non-negative on success, negative on failure.
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Sunday, July 18, 2010
*
*-------------------------------------------------------------------------
@@ -2374,7 +2368,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__point_project_simple() */
-
+
/*--------------------------------------------------------------------------
NAME
H5Sselect_elements
diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h
index a61c505..5100f1c 100644
--- a/src/H5Sprivate.h
+++ b/src/H5Sprivate.h
@@ -183,6 +183,7 @@ typedef struct H5S_sel_iter_op_t {
#define H5S_SELECT_ITER_GET_SEQ_LIST(ITER,MAXSEQ,MAXBYTES,NSEQ,NBYTES,OFF,LEN) (H5S_select_iter_get_seq_list(ITER,MAXSEQ,MAXBYTES,NSEQ,NBYTES,OFF,LEN))
#define H5S_SELECT_ITER_RELEASE(ITER) (H5S_select_iter_release(ITER))
#endif /* H5S_MODULE */
+
/* Handle these callbacks in a special way, since they have prologs that need to be executed */
#define H5S_SELECT_COPY(DST,SRC,SHARE) (H5S_select_copy(DST,SRC,SHARE))
#define H5S_SELECT_SHAPE_SAME(S1,S2) (H5S_select_shape_same(S1,S2))
diff --git a/src/H5Sselect.c b/src/H5Sselect.c
index 1072d7d..c9d7fc0 100644
--- a/src/H5Sselect.c
+++ b/src/H5Sselect.c
@@ -32,6 +32,7 @@
#include "H5Eprivate.h" /* Error handling */
#include "H5FLprivate.h" /* Free Lists */
#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
#include "H5Spkg.h" /* Dataspaces */
#include "H5VMprivate.h" /* Vector and array functions */
@@ -144,8 +145,8 @@ H5S_select_offset(H5S_t *space, const hssize_t *offset)
herr_t
H5Soffset_simple(hid_t space_id, const hssize_t *offset)
{
- H5S_t *space; /* Dataspace to query */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5S_t *space; /* Dataspace to modify */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*Hs", space_id, offset);
@@ -582,7 +583,7 @@ H5S_select_deserialize(H5S_t **space, const uint8_t **p)
default:
break;
- } /* end switch */
+ }
if(ret_value < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTLOAD, FAIL, "can't deserialize selection")
@@ -1170,7 +1171,7 @@ H5S_select_iter_init(H5S_sel_iter_t *sel_iter, const H5S_t *space,
if(sel_iter->rank > 0) {
H5MM_memcpy(sel_iter->dims, space->extent.size, sizeof(hsize_t) * space->extent.rank);
H5MM_memcpy(sel_iter->sel_off, space->select.offset, sizeof(hsize_t) * space->extent.rank);
- } /* end if */
+ }
/* Save the element size */
sel_iter->elmt_size = elmt_size;
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index db76543..c1a8199 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -3110,8 +3110,24 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
if(NULL == (tpath = H5T_path_find(src->shared->parent, dst->shared->parent)))
HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unable to convert between src and dest datatypes")
else if(!H5T_path_noop(tpath)) {
- if((tsrc_id = H5I_register(H5I_DATATYPE, H5T_copy(src->shared->parent, H5T_COPY_ALL), FALSE)) < 0 ||
- (tdst_id = H5I_register(H5I_DATATYPE, H5T_copy(dst->shared->parent, H5T_COPY_ALL), FALSE)) < 0)
+ H5T_t *tsrc_cpy = NULL, *tdst_cpy = NULL;
+
+ if(NULL == (tsrc_cpy = H5T_copy(src->shared->parent, H5T_COPY_ALL)))
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "unable to copy src type for conversion")
+ /* References need to know about the src file */
+ if(tsrc_cpy->shared->type == H5T_REFERENCE)
+ if(H5T_set_loc(tsrc_cpy, src->shared->u.vlen.file, H5T_LOC_MEMORY) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set datatype location");
+
+ if(NULL == (tdst_cpy = H5T_copy(dst->shared->parent, H5T_COPY_ALL)))
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "unable to copy dst type for conversion")
+ /* References need to know about the dst file */
+ if(tdst_cpy->shared->type == H5T_REFERENCE)
+ if(H5T_set_loc(tdst_cpy, dst->shared->u.vlen.file, H5T_LOC_MEMORY) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set datatype location");
+
+ if(((tsrc_id = H5I_register(H5I_DATATYPE, tsrc_cpy, FALSE)) < 0)
+ || ((tdst_id = H5I_register(H5I_DATATYPE, tdst_cpy, FALSE)) < 0))
HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register types for conversion")
} /* end else-if */
else
diff --git a/src/H5Tref.c b/src/H5Tref.c
index b357baa..7c59e75 100644
--- a/src/H5Tref.c
+++ b/src/H5Tref.c
@@ -144,7 +144,9 @@ H5T__ref_set_loc(const H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
switch(loc) {
case H5T_LOC_MEMORY: /* Memory based reference datatype */
- HDassert(NULL == file);
+
+ /* NB. We allow for the file to be non-NULL when doing
+ * memory-to-memory conversion */
/* Mark this type as being stored in memory */
dt->shared->u.atomic.u.r.loc = H5T_LOC_MEMORY;
@@ -364,9 +366,8 @@ static size_t
H5T__ref_mem_getsize(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf,
size_t H5_ATTR_UNUSED src_size, H5VL_object_t *dst_file, hbool_t *dst_copy)
{
- H5VL_object_t *vol_obj; /* VOL object for src ref's location */
+ H5VL_object_t *vol_obj = NULL; /* VOL object for src ref's location */
const H5R_ref_priv_t *src_ref = (const H5R_ref_priv_t *)src_buf;
- hbool_t files_equal = FALSE; /* Whether src & dst references are in same file */
char *file_name_buf_dyn = NULL; /* Pointer to dynamically allocated buffer for file name, if static buffer is too small */
unsigned flags = 0; /* References flags */
size_t ret_value = 0; /* Return value */
@@ -377,14 +378,18 @@ H5T__ref_mem_getsize(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf
HDassert(src_buf);
HDassert(src_size == H5T_REF_MEM_SIZE);
- /* Retrieve VOL object */
- if(NULL == (vol_obj = H5VL_vol_object(src_ref->loc_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "invalid location identifier")
+ if(NULL != dst_file) {
+ hbool_t files_equal = TRUE; /* Whether src & dst references are in same file */
- /* Set external flag if referenced file is not destination file */
- if(H5VL_file_is_same(vol_obj, dst_file, &files_equal) < 0)
- HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOMPARE, 0, "can't check if files are equal")
- flags |= !files_equal ? H5R_IS_EXTERNAL : 0;
+ /* Retrieve VOL object */
+ if(NULL == (vol_obj = H5VL_vol_object(src_ref->loc_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "invalid location identifier")
+
+ /* Set external flag if referenced file is not destination file */
+ if(H5VL_file_is_same(vol_obj, dst_file, &files_equal) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOMPARE, 0, "can't check if files are equal")
+ flags |= !files_equal ? H5R_IS_EXTERNAL : 0;
+ }
/* Force re-calculating encoding size if any flags are set */
if(flags || !src_ref->encode_size) {
@@ -458,8 +463,8 @@ H5T__ref_mem_read(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf,
{
H5VL_object_t *vol_obj; /* VOL object for src ref's location */
const H5R_ref_priv_t *src_ref = (const H5R_ref_priv_t *)src_buf;
- hbool_t files_equal = FALSE; /* Whether src & dst references are in same file */
- char file_name_buf_static[256]; /* File name */
+ hbool_t files_equal = TRUE; /* Whether src & dst references are in same file */
+ char file_name_buf_static[256] = {'\0'}; /* File name */
char *file_name_buf_dyn = NULL; /* Pointer to dynamically allocated buffer for file name, if static buffer is too small */
ssize_t file_name_len; /* Size of file name buffer */
unsigned flags = 0; /* References flags */
@@ -470,10 +475,15 @@ H5T__ref_mem_read(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf,
/* Sanity check */
HDassert(src_buf);
HDassert(src_size == H5T_REF_MEM_SIZE);
- HDassert(dst_file);
HDassert(dst_buf);
HDassert(dst_size);
+ /* Memory-to-memory conversion to support vlen conversion */
+ if(NULL == dst_file) {
+ HDmemcpy(dst_buf, src_buf, dst_size);
+ HGOTO_DONE(ret_value);
+ }
+
/* Retrieve VOL object */
if(NULL == (vol_obj = H5VL_vol_object(src_ref->loc_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "invalid location identifier")
@@ -504,14 +514,16 @@ H5T__ref_mem_read(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf,
H5CX_set_libver_bounds(NULL);
} /* end if */
- /* Get file name */
- if(H5VL_file_get(vol_obj, H5VL_FILE_GET_NAME, H5P_DATASET_XFER_DEFAULT, NULL, H5I_FILE, sizeof(file_name_buf_static), file_name_buf_static, &file_name_len) < 0)
- HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, 0, "can't get file name")
- if(file_name_len >= (ssize_t)sizeof(file_name_buf_static)) {
- if(NULL == (file_name_buf_dyn = (char *)H5MM_malloc((size_t)file_name_len + 1)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, 0, "can't allocate space for file name")
- if(H5VL_file_get(vol_obj, H5VL_FILE_GET_NAME, H5P_DATASET_XFER_DEFAULT, NULL, H5I_FILE, (size_t)file_name_len + 1, file_name_buf_dyn, &file_name_len) < 0)
+ /* Get file name (if external reference) */
+ if(flags) {
+ if(H5VL_file_get(vol_obj, H5VL_FILE_GET_NAME, H5P_DATASET_XFER_DEFAULT, NULL, H5I_FILE, sizeof(file_name_buf_static), file_name_buf_static, &file_name_len) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, 0, "can't get file name")
+ if(file_name_len >= (ssize_t)sizeof(file_name_buf_static)) {
+ if(NULL == (file_name_buf_dyn = (char *)H5MM_malloc((size_t)file_name_len + 1)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, 0, "can't allocate space for file name")
+ if(H5VL_file_get(vol_obj, H5VL_FILE_GET_NAME, H5P_DATASET_XFER_DEFAULT, NULL, H5I_FILE, (size_t)file_name_len + 1, file_name_buf_dyn, &file_name_len) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, 0, "can't get file name")
+ } /* end if */
} /* end if */
/* Encode reference */
@@ -539,7 +551,7 @@ H5T__ref_mem_write(H5VL_object_t *src_file, const void *src_buf, size_t src_size
H5R_type_t src_type, H5VL_object_t H5_ATTR_UNUSED *dst_file, void *dst_buf,
size_t dst_size, void H5_ATTR_UNUSED *bg_buf)
{
- H5F_t *src_f;
+ H5F_t *src_f = NULL;
hid_t file_id = H5I_INVALID_HID;
H5R_ref_priv_t *dst_ref = (H5R_ref_priv_t *)dst_buf;
herr_t ret_value = SUCCEED;
@@ -547,14 +559,19 @@ H5T__ref_mem_write(H5VL_object_t *src_file, const void *src_buf, size_t src_size
FUNC_ENTER_STATIC
/* Sanity check */
- HDassert(src_file);
HDassert(src_buf);
HDassert(src_size);
HDassert(dst_buf);
HDassert(dst_size == H5T_REF_MEM_SIZE);
+ /* Memory-to-memory conversion to support vlen conversion */
+ if(NULL == src_file) {
+ HDmemcpy(dst_buf, src_buf, src_size);
+ HGOTO_DONE(ret_value);
+ }
+
#ifndef NDEBUG
- {
+ if((src_type == H5R_OBJECT1) || (src_type == H5R_DATASET_REGION1)) {
hbool_t is_native = FALSE; /* Whether the src file is using the native VOL connector */
/* Check if using native VOL connector */
diff --git a/src/H5Zfletcher32.c b/src/H5Zfletcher32.c
index 4d75d14..c40e9b4 100644
--- a/src/H5Zfletcher32.c
+++ b/src/H5Zfletcher32.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Raymond Lu <slu@ncsa.uiuc.edu>
+ * Programmer: Raymond Lu
* Jan 3, 2003
*/
diff --git a/src/H5Ztrans.c b/src/H5Ztrans.c
index dfc984a..1c8d415 100644
--- a/src/H5Ztrans.c
+++ b/src/H5Ztrans.c
@@ -400,8 +400,6 @@ static void H5Z_print(H5Z_node *tree, FILE *stream);
* Return: Always succeeds.
* Programmer: Bill Wendling
* 26. August 2003
- * Modifications:
- * Leon Arber: Added FUNC_ENTER / FUNC_LEAVE pairs
*
*-------------------------------------------------------------------------
*/
@@ -565,8 +563,6 @@ done:
* Return: Nothing
* Programmer: Bill Wendling
* 25. August 2003
- * Modifications:
- * Leon Arber: Added FUNC_ENTER / FUNC_LEAVE pairs
*
*-------------------------------------------------------------------------
*/
@@ -634,8 +630,6 @@ done:
* NULLure: NULL
* Programmer: Bill Wendling
* 26. August 2003
- * Modifications:
- * Leon Arber: Added FUNC_ENTER / FUNC_LEAVE pairs
*
*-------------------------------------------------------------------------
*/
@@ -728,8 +722,6 @@ done:
* NULLure: NULL
* Programmer: Bill Wendling
* 26. August 2003
- * Modifications:
- * Leon Arber: Added FUNC_ENTER / FUNC_LEAVE pairs
*
*-------------------------------------------------------------------------
*/
@@ -828,8 +820,6 @@ done:
* NULLure: NULL
* Programmer: Bill Wendling
* 26. August 2003
- * Modifications:
- * Leon Arber: Added FUNC_ENTER / FUNC_LEAVE pairs
*
*-------------------------------------------------------------------------
*/
@@ -972,8 +962,6 @@ done:
* NULLure: NULL
* Programmer: Bill Wendling
* 26. August 2003
- * Modifications:
- * Leon Arber: Added FUNC_ENTER / FUNC_LEAVE pairs
*
*-------------------------------------------------------------------------
*/
@@ -1002,7 +990,6 @@ done:
* Return: SUCCEED if transform applied successfully, FAIL otherwise
* Programmer: Leon Arber
* 5/1/04
- * Modifications:
*
*-------------------------------------------------------------------------
*/
@@ -1115,8 +1102,6 @@ done:
* Return: Nothing
* Programmer: Leon Arber
* 5/1/04
- * Modifications:
- *
*
* Notes: In the case of a polynomial data transform (ie, the left and right subtree
* are both of type H5Z_XFORM_SYMBOL), the convention is that the left hand side
@@ -1213,8 +1198,6 @@ done:
* Function: H5Z_find_type
* Return: Native type of datatype that is passed in
* Programmer: Leon Arber, 4/20/04
- * Modifications:
- *
*
*-------------------------------------------------------------------------
*/
@@ -1301,7 +1284,6 @@ done:
* of the one passed in.
* Programmer: Leon Arber
* April 1, 2004.
- * Modifications:
*
*-------------------------------------------------------------------------
*/
@@ -1375,7 +1357,6 @@ done:
* Return: TRUE or FALSE
* Programmer: Raymond Lu
* 15 March 2012
- * Modifications:
*
*-------------------------------------------------------------------------
*/
@@ -1404,7 +1385,6 @@ H5Z_op_is_numbs(H5Z_node* _tree)
* Return: TRUE or FALSE
* Programmer: Raymond Lu
* 15 March 2012
- * Modifications:
*
*-------------------------------------------------------------------------
*/
@@ -1490,11 +1470,6 @@ H5Z_xform_reduce_tree(H5Z_node* tree)
* Return: None.
* Programmer: Leon Arber
* April 1, 2004.
- * Modifications:
- * Raymond Lu
- * 15 March 2012
- * I added a new macro H5Z_XFORM_DO_OP6 to handle the special
- * operations like -x or +x when the left operand is empty.
*
*-------------------------------------------------------------------------
*/
@@ -1525,14 +1500,10 @@ H5Z_do_op(H5Z_node* tree)
* Success: SUCCEED
* Failure: FAIL
*
- * Programmer: Quincey Koziol, koziol@ncsa.uiuc.edu
+ * Programmer: Quincey Koziol
*
* Date: May 4, 2004
*
- * Comments:
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
H5Z_data_xform_t *
@@ -1616,14 +1587,10 @@ done:
* Success: SUCCEED
* Failure: FAIL
*
- * Programmer: Quincey Koziol, koziol@ncsa.uiuc.edu
+ * Programmer: Quincey Koziol
*
* Date: May 4, 2004
*
- * Comments:
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -1662,7 +1629,7 @@ H5Z_xform_destroy(H5Z_data_xform_t *data_xform_prop)
* Success: SUCCEED
* Failure: FAIL
*
- * Programmer: Quincey Koziol, koziol@ncsa.uiuc.edu
+ * Programmer: Quincey Koziol
*
* Date: May 4, 2004
*
@@ -1742,14 +1709,12 @@ done:
*
* Return: TRUE for no data transform, FALSE for a data transform
*
- * Programmer: Quincey Koziol, koziol@ncsa.uiuc.edu
+ * Programmer: Quincey Koziol
*
* Date: May 4, 2004
*
* Comments: Can't fail
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
hbool_t
@@ -1773,12 +1738,10 @@ H5Z_xform_noop(const H5Z_data_xform_t *data_xform_prop)
* Return:
* Pointer to a copy of the string in the data_xform property.
*
- * Programmer: Leon Arber, larber@ncsa.uiuc.edu
+ * Programmer: Leon Arber
*
* Date: Sept. 4, 2004
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
const char *
diff --git a/src/H5dbg.c b/src/H5dbg.c
index 4878884..c5dd55e 100644
--- a/src/H5dbg.c
+++ b/src/H5dbg.c
@@ -15,7 +15,7 @@
*
* Created: H5dbg.c
* Mar 4 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Generic debugging routines
*
@@ -70,7 +70,6 @@
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 4 2006
*
*-------------------------------------------------------------------------
diff --git a/src/H5timer.c b/src/H5timer.c
index 8f3d305..cef7bf9 100644
--- a/src/H5timer.c
+++ b/src/H5timer.c
@@ -220,7 +220,8 @@ H5_now_usec(void)
*
* Purpose: Get the current time, as the time of seconds after the UNIX epoch
*
- * Return: SUCCEED/FAIL
+ * Return: Success: A non-negative time value
+ * Failure: -1.0 (in theory, can't currently fail)
*
* Programmer: Quincey Koziol
* October 05, 2016
@@ -247,9 +248,9 @@ H5_get_time(void)
HDgettimeofday(&now_tv, NULL);
ret_value = (double)now_tv.tv_sec + ((double)now_tv.tv_usec / (double)1000000.0f);
}
-#else /* H5_HAVE_GETTIMEOFDAY */
+#else
ret_value = (double)HDtime(NULL);
-#endif /* H5_HAVE_GETTIMEOFDAY */
+#endif
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5_get_time() */
@@ -279,9 +280,9 @@ H5__timer_get_timevals(H5_timevals_t *times /*in,out*/)
/* Windows call handles both system/user and elapsed times */
#ifdef H5_HAVE_WIN32_API
if(H5_get_win32_times(times) < 0) {
- times->elapsed = -1;
- times->system = -1;
- times->user = -1;
+ times->elapsed = -1.0;
+ times->system = -1.0;
+ times->user = -1.0;
return -1;
} /* end if */
@@ -310,24 +311,8 @@ H5__timer_get_timevals(H5_timevals_t *times /*in,out*/)
* Elapsed time *
****************/
- /* NOTE: Not having a way to get elapsed time IS an error, unlike
- * the system and user times.
- */
+ times->elapsed = H5_get_time();
-#if defined(H5_HAVE_CLOCK_GETTIME)
-{
- struct timespec ts;
-
- if(HDclock_gettime(CLOCK_MONOTONIC, &ts) != 0)
- return -1;
- times->elapsed = (double)ts.tv_sec + ((double)ts.tv_nsec / (double)1.0E9F);
-}
-#else
- /* Die here. We'd like to know about this so we can support some
- * other time functionality.
- */
- HDassert(0);
-#endif
#endif /* H5_HAVE_WIN32_API */
return 0;