summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2005-10-21 15:52:54 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2005-10-21 15:52:54 (GMT)
commit275d19661e1f06f95c57e5f81635bb0e5e2c357a (patch)
treeeb393a99ea9d67984c9191597b584c1001ca0515
parent155d762b9c4d60e0455f3bc71700a289ad18e6a4 (diff)
downloadhdf5-275d19661e1f06f95c57e5f81635bb0e5e2c357a.zip
hdf5-275d19661e1f06f95c57e5f81635bb0e5e2c357a.tar.gz
hdf5-275d19661e1f06f95c57e5f81635bb0e5e2c357a.tar.bz2
[svn-r11593] Purpose:
Code cleanup Description: Clean up & standardize a bit in preparation for coding standards discussion. Platforms tested: FreeBSD 4.11 (sleipnir) Too minor to require h5committest
-rw-r--r--src/H5D.c285
-rw-r--r--src/H5Dcompact.c31
-rw-r--r--src/H5Dcontig.c45
-rw-r--r--src/H5Defl.c27
-rw-r--r--src/H5Dio.c176
-rw-r--r--src/H5Distore.c156
-rw-r--r--src/H5Dmpio.c54
-rw-r--r--src/H5Dpkg.h1
-rw-r--r--src/H5Dprivate.h15
-rw-r--r--src/H5Dpublic.h18
-rw-r--r--src/H5Dselect.c39
-rw-r--r--src/H5Dtest.c33
12 files changed, 294 insertions, 586 deletions
diff --git a/src/H5D.c b/src/H5D.c
index 4f7ea5d..49df75e0 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -12,12 +12,19 @@
* access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/****************/
+/* Module Setup */
+/****************/
+
#define H5D_PACKAGE /*suppress error about including H5Dpkg */
/* Interface initialization */
#define H5_INTERFACE_INIT_FUNC H5D_init_interface
+/***********/
+/* Headers */
+/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Dpkg.h" /* Datasets */
#include "H5Eprivate.h" /* Error handling */
@@ -29,9 +36,30 @@
#include "H5Sprivate.h" /* Dataspaces */
#include "H5Vprivate.h" /* Vectors and arrays */
-/*#define H5D_DEBUG*/
+/****************/
+/* Local Macros */
+/****************/
+
+/******************/
+/* Local Typedefs */
+/******************/
+
+/* Internal data structure for computing variable-length dataset's total size */
+typedef struct {
+ hid_t dataset_id; /* ID of the dataset we are working on */
+ hid_t fspace_id; /* ID of the file dataset's dataspace we are working on */
+ hid_t mspace_id; /* ID of the memory dataset's dataspace we are working on */
+ void *fl_tbuf; /* Ptr to the temporary buffer we are using for fixed-length data */
+ void *vl_tbuf; /* Ptr to the temporary buffer we are using for VL data */
+ hid_t xfer_pid; /* ID of the dataset xfer property list */
+ hsize_t size; /* Accumulated number of bytes for the selection */
+} H5D_vlen_bufsize_t;
+
+/********************/
+/* Local Prototypes */
+/********************/
-/* Local functions */
+/* General stuff */
static herr_t H5D_init_storage(H5D_t *dataset, hbool_t full_overwrite, hid_t dxpl_id);
static H5D_shared_t * H5D_new(hid_t dcpl_id, hbool_t creating, hbool_t vl_type);
static H5D_t * H5D_create(H5G_entry_t *loc, const char *name, hid_t type_id,
@@ -43,6 +71,8 @@ static haddr_t H5D_get_offset(const H5D_t *dset);
static herr_t H5D_extend(H5D_t *dataset, const hsize_t *size, hid_t dxpl_id);
static herr_t H5D_set_extent(H5D_t *dataset, const hsize_t *size, hid_t dxpl_id);
static herr_t H5D_init_type(H5F_t *file, const H5D_t *dset, hid_t type_id, const H5T_t *type);
+
+/* Property list callbacks */
static int H5D_crt_fill_value_cmp(const void *value1, const void *value2, size_t size);
static int H5D_crt_ext_file_list_cmp(const void *value1, const void *value2, size_t size);
static int H5D_crt_data_pipeline_cmp(const void *value1, const void *value2, size_t size);
@@ -50,16 +80,16 @@ static herr_t H5D_xfer_xform_del(hid_t prop_id, const char* name, size_t size, v
static herr_t H5D_xfer_xform_copy(const char* name, size_t size, void* value);
static herr_t H5D_xfer_xform_close(const char* name, size_t size, void* value);
-/* Internal data structure for computing variable-length dataset's total size */
-typedef struct {
- hid_t dataset_id; /* ID of the dataset we are working on */
- hid_t fspace_id; /* ID of the file dataset's dataspace we are working on */
- hid_t mspace_id; /* ID of the memory dataset's dataspace we are working on */
- void *fl_tbuf; /* Ptr to the temporary buffer we are using for fixed-length data */
- void *vl_tbuf; /* Ptr to the temporary buffer we are using for VL data */
- hid_t xfer_pid; /* ID of the dataset xfer property list */
- hsize_t size; /* Accumulated number of bytes for the selection */
-} H5D_vlen_bufsize_t;
+/*********************/
+/* Package Variables */
+/*********************/
+
+/* Define a "default" dataset transfer property list cache structure to use for default DXPLs */
+H5D_dxpl_cache_t H5D_def_dxpl_cache;
+
+/*******************/
+/* Local Variables */
+/*******************/
/* Declare a free list to manage the H5D_t and H5D_shared_t structs */
H5FL_DEFINE_STATIC(H5D_t);
@@ -77,9 +107,6 @@ H5FL_BLK_EXTERN(sieve_buf);
/* Define a static "default" dataset structure to use to initialize new datasets */
static H5D_shared_t H5D_def_dset;
-/* Define a "default" dataset transfer property list cache structure to use for default DXPLs */
-H5D_dxpl_cache_t H5D_def_dxpl_cache;
-
/*-------------------------------------------------------------------------
* Function: H5D_init
@@ -93,8 +120,6 @@ H5D_dxpl_cache_t H5D_def_dxpl_cache;
* Programmer: Quincey Koziol
* Saturday, March 4, 2000
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -405,8 +430,6 @@ done:
* Programmer: Robb Matzke
* Friday, November 20, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
int
@@ -464,8 +487,6 @@ H5D_term_interface(void)
*
* Comments: Private function, calls private H5Z_xform_destroy
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
/* ARGSUSED */
@@ -501,8 +522,6 @@ done:
*
* Comments: Public function, calls private H5Z_xform_copy_tree
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
/* ARGSUSED */
@@ -535,8 +554,6 @@ done:
* Comments: private function, calls H5Z_xform_destroy_parse_tree
* Identical to H5D_xfer_xform_del
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
/* ARGSUSED */
@@ -571,8 +588,6 @@ done:
* Programmer: Raymond Lu
* Tuesday, October 2, 2001
*
- * Modification:
- *
*-------------------------------------------------------------------------
*/
/* ARGSUSED */
@@ -646,8 +661,6 @@ done:
* Programmer: Quincey Koziol
* Wednesday, July 11, 2001
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
/* ARGSUSED */
@@ -702,8 +715,6 @@ done:
* Programmer: Quincey Koziol
* Wednesday, January 7, 2004
*
- * Modification:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -758,8 +769,6 @@ done:
* Programmer: Quincey Koziol
* Wednesday, January 7, 2004
*
- * Modification:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -840,8 +849,6 @@ done:
* Programmer: Quincey Koziol
* Wednesday, January 7, 2004
*
- * Modification:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -933,7 +940,6 @@ done:
* Thursday, August 2, 2001
*
* Notes: This same routine is currently used for the 'copy' callback.
- * Modifications:
*
*-------------------------------------------------------------------------
*/
@@ -984,8 +990,6 @@ done:
* Programmer: Raymond Lu
* Tuesday, October 2, 2001
*
- * Modification:
- *
*-------------------------------------------------------------------------
*/
/* ARGSUSED */
@@ -1038,8 +1042,6 @@ done:
* Programmer: Quincey Koziol
* Wednesday, July 11, 2001
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
/* ARGSUSED */
@@ -1147,20 +1149,9 @@ done:
*
* Failure: FAIL
*
- * Errors:
- * ARGS BADTYPE Not a data space.
- * ARGS BADTYPE Not a dataset creation plist.
- * ARGS BADTYPE Not a file.
- * ARGS BADTYPE Not a type.
- * ARGS BADVALUE No name.
- * DATASET CANTINIT Can't create dataset.
- * DATASET CANTREGISTER Can't register dataset.
- *
* Programmer: Robb Matzke
* Wednesday, December 3, 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
hid_t
@@ -1221,13 +1212,9 @@ done:
*
* Failure: FAIL
*
- * Errors:
- *
* Programmer: Robb Matzke
* Thursday, December 4, 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
hid_t
@@ -1290,15 +1277,9 @@ done:
*
* Return: Non-negative on success/Negative on failure
*
- * Errors:
- * ARGS BADTYPE Not a dataset.
- * DATASET CANTINIT Can't free.
- *
* Programmer: Robb Matzke
* Thursday, December 4, 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -1342,10 +1323,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, January 28, 1998
*
- * Modifications:
- * Robb Matzke, 9 Jun 1998
- * The data space is not constant and is no longer cached by the dataset
- * struct.
*-------------------------------------------------------------------------
*/
hid_t
@@ -1394,8 +1371,6 @@ done:
*
* Programmer: Raymond Lu
*
- * Modification:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -1432,8 +1407,6 @@ done:
*
* Programmer: Raymond Lu
*
- * Modification:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -1500,13 +1473,6 @@ done:
* Programmer: Robb Matzke
* Tuesday, February 3, 1998
*
- * Modifications:
- *
- * Robb Matzke, 1 Jun 1998
- * If the dataset has a named data type then a handle to the opened data
- * type is returned. Otherwise the returned data type is read-only. If
- * atomization of the data type fails then the data type is closed.
- *
*-------------------------------------------------------------------------
*/
hid_t
@@ -1566,13 +1532,6 @@ done:
* Programmer: Robb Matzke
* Tuesday, February 3, 1998
*
- * Modifications:
- *
- * Raymond Lu
- * Tuesday, October 2, 2001
- * The way to retrieve and set property is changed for the
- * generic property list.
- *
*-------------------------------------------------------------------------
*/
hid_t
@@ -1638,8 +1597,6 @@ done:
* Programmer: Robb Matzke
* Friday, January 30, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -1675,18 +1632,9 @@ done:
*
* Failure: NULL
*
- * Errors:
- *
* Programmer: Quincey Koziol
* Monday, October 12, 1998
*
- * Modifications:
- *
- * Raymond Lu
- * Tuesday, October 2, 2001
- * Changed the way to query and inialization for generic
- * property list.
- *
*-------------------------------------------------------------------------
*/
static H5D_shared_t *
@@ -1748,13 +1696,9 @@ done:
* Return: Success: SUCCEED
* Failure: FAIL
*
- * Errors:
- *
* Programmer: Quincey Koziol
* Thursday, June 24, 2004
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -1820,18 +1764,9 @@ done:
* Return: Success: SUCCEED
* Failure: FAIL
*
- * Errors:
- *
* Programmer: Bill Wendling
* Thursday, October 31, 2002
*
- * Modifications:
- *
- * John Mainzer 6/6/05
- * Modified function to use the new dirtied parameter of
- * H5AC_unprotect() instead of manipulating the is_dirty
- * field of the cache info directly.
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -2066,54 +2001,9 @@ done:
*
* Failure: NULL
*
- * Errors:
- * DATASET CANTINIT Can't update dataset header.
- * DATASET CANTINIT Problem with the dataset name.
- * DATASET CANTINIT Fail in file space allocation for
- * chunks
- *
* Programmer: Robb Matzke
* Thursday, December 4, 1997
*
- * Modifications:
- * Robb Matzke, 9 Jun 1998
- * The data space message is no longer cached in the dataset struct.
- *
- * Robb Matzke, 27 Jul 1998
- * Added the MTIME message to the dataset object header.
- *
- * Robb Matzke, 1999-10-14
- * The names for the external file list are entered into the heap hear
- * instead of when the efl message is encoded, preventing a possible
- * infinite recursion situation.
- *
- * Raymond Lu
- * Tuesday, October 2, 2001
- * Changed the way to retrieve and set property for generic property
- * list.
- *
- * Raymond Lu, 26 Feb 2002
- * A new fill value message is added. Two properties, space allocation
- * time and fill value writing time, govern space allocation and fill
- * value writing.
- *
- * Bill Wendling, 1. November 2002
- * Removed the cache updating mechanism. This was done so that it
- * can be called separately from the H5D_create function. There were
- * two of these mechanisms: one to create and insert into the parent
- * group the H5G_entry_t object and the other to update based upon
- * whether we're working with an external file or not. Between the
- * two, there is a conditional call to allocate space which isn't
- * part of updating the cache.
- *
- * Nat Furrer and James Laird
- * June 7, 2004
- * Added checked_filters flag
- *
- * Peter X. Cao
- * May 09, 2005
- * Add property to create intermediate groups
- *
*-------------------------------------------------------------------------
*/
static H5D_t *
@@ -2459,8 +2349,6 @@ done:
* Programmer: Robb Matzke
* Monday, November 2, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
htri_t
@@ -2503,13 +2391,9 @@ done:
* Return: Success: Dataset ID
* Failure: FAIL
*
- * Errors:
- *
* Programmer: Quincey Koziol
* Friday, December 20, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
H5D_t*
@@ -2591,24 +2475,9 @@ done:
*
* Return: Dataset pointer on success, NULL on failure
*
- * Errors:
- *
* Programmer: Quincey Koziol
* Monday, October 12, 1998
*
- * Modifications:
- *
- * Raymond Lu
- * Tuesday, October 2, 2001
- * Changed the way to set property for generic property list.
- *
- * Raymond Lu
- * Feb 26, 2002
- * A new fill value message and two new properties are added.
- *
- * Pedro Vicente, <pvn@ncsa.uiuc.edu> 22 Aug 2002
- * Added a deep copy of the symbol table entry
- *
*-------------------------------------------------------------------------
*/
static H5D_t *
@@ -2870,17 +2739,9 @@ done:
*
* Return: Non-negative on success/Negative on failure
*
- * Errors:
- * DATASET CANTINIT Couldn't free the type or space,
- * but the dataset was freed anyway.
- *
* Programmer: Robb Matzke
* Thursday, December 4, 1997
*
- * Modifications:
- * Robb Matzke, 9 Jun 1998
- * The data space message is no longer cached in the dataset struct.
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -3014,19 +2875,6 @@ done:
* Programmer: Robb Matzke
* Friday, January 30, 1998
*
- * Modifications:
- *
- * Raymond Lu, October 2, 2001
- * Changed the way to retrieve property for generic property list.
- *
- * Nat Furrer/James Laird, June 17, 2004
- * Added check for filter encode capability.
- *
- * Christian Chilan, June 27, 2005
- * In addition to the case where allocation property is
- * H5D_ALLOC_TIME_EARLY, storage will be allocated when the
- * dataset is open by parallel mode.
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -3114,8 +2962,6 @@ done:
* Programmer: Robb Matzke
* Friday, April 24, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
H5G_entry_t *
@@ -3141,8 +2987,6 @@ H5D_entof (H5D_t *dataset)
* Programmer: Robb Matzke
* Thursday, June 4, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
H5T_t *
@@ -3170,8 +3014,6 @@ H5D_typeof (const H5D_t *dset)
* Programmer: Quincey Koziol
* Thursday, October 22, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static H5F_t *
@@ -3197,16 +3039,6 @@ H5D_get_file (const H5D_t *dset)
* Programmer: Robb Matzke
* Friday, January 16, 1998
*
- * Modifications:
- * Quincey Koziol, August 22, 2002
- * Moved here from H5F_arr_create and moved more logic into
- * this function from places where it was being called.
- *
- * Christian Chilan, June 27, 2005
- * In addition to the case where allocation property is
- * H5D_ALLOC_TIME_EARLY, storage will be allocated when the
- * dataset is open by parallel mode.
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -3356,13 +3188,6 @@ done:
* Programmer: Robb Matzke
* Monday, October 5, 1998
*
- * Modifications:
- *
- * Raymond Lu
- * Tuesday, October 2, 2001
- * Changed the way to retrieve property for generic property
- * list.
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -3443,8 +3268,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, April 21, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
hsize_t
@@ -3481,8 +3304,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, April 21, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static hsize_t
@@ -3533,8 +3354,6 @@ done:
* Programmer: Raymond Lu
* November 6, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
haddr_t
@@ -3571,8 +3390,6 @@ done:
* Programmer: Raymond Lu
* November 6, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static haddr_t
@@ -3674,8 +3491,6 @@ done:
* Programmer: Quincey Koziol
* Friday, June 11, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -3720,8 +3535,6 @@ done:
* Programmer: Quincey Koziol
* Thursday, June 10, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -3771,8 +3584,6 @@ done:
* Programmer: Quincey Koziol
* Tuesday, August 17, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void *
@@ -3818,8 +3629,6 @@ done:
* Programmer: Quincey Koziol
* Tuesday, August 17, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
/* ARGSUSED */
@@ -3878,8 +3687,6 @@ done:
* Programmer: Quincey Koziol
* Wednesday, August 11, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -3981,8 +3788,6 @@ done:
*
* Comments: Public function, calls private H5D_set_extent
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -4024,8 +3829,6 @@ done:
*
* Comments: Private function
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -4139,8 +3942,6 @@ done:
*
* Date: August 14, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -4233,8 +4034,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, April 28, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
diff --git a/src/H5Dcompact.c b/src/H5Dcompact.c
index 85d78eb..83f9b8c 100644
--- a/src/H5Dcompact.c
+++ b/src/H5Dcompact.c
@@ -20,9 +20,16 @@
* H5D_contig_* and H5D_istore_*.
*/
+/****************/
+/* Module Setup */
+/****************/
+
#define H5D_PACKAGE /*suppress error about including H5Dpkg */
+/***********/
+/* Headers */
+/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Dpkg.h" /* Dataset functions */
#include "H5Eprivate.h" /* Error handling */
@@ -32,6 +39,26 @@
#include "H5Oprivate.h" /* Object headers */
#include "H5Vprivate.h" /* Vector and array functions */
+/****************/
+/* Local Macros */
+/****************/
+
+/******************/
+/* Local Typedefs */
+/******************/
+
+/********************/
+/* Local Prototypes */
+/********************/
+
+/*********************/
+/* Package Variables */
+/*********************/
+
+/*******************/
+/* Local Variables */
+/*******************/
+
/*-------------------------------------------------------------------------
* Function: H5D_compact_readvv
@@ -49,8 +76,6 @@
* Notes:
* Offsets in the sequences must be monotonically increasing
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
ssize_t
@@ -93,8 +118,6 @@ done:
* Notes:
* Offsets in the sequences must be monotonically increasing
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
ssize_t
diff --git a/src/H5Dcontig.c b/src/H5Dcontig.c
index bec3615..bd3b358 100644
--- a/src/H5Dcontig.c
+++ b/src/H5Dcontig.c
@@ -22,9 +22,16 @@
* with the data sieve buffer from H5F_seq_read/write.
*/
+/****************/
+/* Module Setup */
+/****************/
+
#define H5D_PACKAGE /*suppress error about including H5Dpkg */
+/***********/
+/* Headers */
+/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Dpkg.h" /* Dataset functions */
#include "H5Eprivate.h" /* Error handling */
@@ -37,10 +44,28 @@
#include "H5Sprivate.h" /* Dataspace functions */
#include "H5Vprivate.h" /* Vector and array functions */
-/* Private prototypes */
+/****************/
+/* Local Macros */
+/****************/
+
+/******************/
+/* Local Typedefs */
+/******************/
+
+/********************/
+/* Local Prototypes */
+/********************/
static herr_t H5D_contig_write(H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache,
hid_t dxpl_id, const H5D_storage_t *store, hsize_t offset, size_t size, const void *buf);
+/*********************/
+/* Package Variables */
+/*********************/
+
+/*******************/
+/* Local Variables */
+/*******************/
+
/* Declare a PQ free list to manage the sieve buffer information */
H5FL_BLK_DEFINE(sieve_buf);
@@ -61,8 +86,6 @@ H5FL_BLK_DEFINE_STATIC(zero_fill);
* Programmer: Quincey Koziol
* April 19, 2003
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -95,11 +118,6 @@ done:
* Programmer: Quincey Koziol
* August 22, 2002
*
- * Modifications:
- * Bill Wendling, February 20, 2003
- * Added support for getting the barrier COMM if you're using
- * Flexible PHDF5.
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -287,8 +305,6 @@ done:
* Programmer: Quincey Koziol
* March 20, 2003
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -321,8 +337,6 @@ done:
* Programmer: Quincey Koziol
* June 2, 2004
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
haddr_t
@@ -350,9 +364,6 @@ H5D_contig_get_addr(const H5D_t *dset)
* Programmer: Quincey Koziol
* Thursday, September 28, 2000
*
- * Modifications:
- * Re-written in terms of the new writevv call, QAK, 5/7/03
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -402,8 +413,6 @@ done:
* Notes:
* Offsets in the sequences must be monotonically increasing
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
ssize_t
@@ -669,8 +678,6 @@ done:
* Notes:
* Offsets in the sequences must be monotonically increasing
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
ssize_t
diff --git a/src/H5Defl.c b/src/H5Defl.c
index aaba3a6..2d160cf 100644
--- a/src/H5Defl.c
+++ b/src/H5Defl.c
@@ -17,20 +17,45 @@
* Thursday, September 30, 2004
*/
+/****************/
+/* Module Setup */
+/****************/
+
#define H5D_PACKAGE /*suppress error about including H5Dpkg */
+/***********/
+/* Headers */
+/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Dpkg.h" /* Datasets */
#include "H5Eprivate.h" /* Error handling */
#include "H5Fprivate.h" /* Files */
-/* PRIVATE PROTOTYPES */
+/****************/
+/* Local Macros */
+/****************/
+
+/******************/
+/* Local Typedefs */
+/******************/
+
+/********************/
+/* Local Prototypes */
+/********************/
static herr_t H5D_efl_read (const H5O_efl_t *efl, haddr_t addr, size_t size,
uint8_t *buf);
static herr_t H5D_efl_write(const H5O_efl_t *efl, haddr_t addr, size_t size,
const uint8_t *buf);
+/*********************/
+/* Package Variables */
+/*********************/
+
+/*******************/
+/* Local Variables */
+/*******************/
+
/*-------------------------------------------------------------------------
* Function: H5D_efl_read
diff --git a/src/H5Dio.c b/src/H5Dio.c
index babb975..fdbfd0e 100644
--- a/src/H5Dio.c
+++ b/src/H5Dio.c
@@ -12,9 +12,16 @@
* access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/****************/
+/* Module Setup */
+/****************/
+
#define H5D_PACKAGE /*suppress error about including H5Dpkg */
+/***********/
+/* Headers */
+/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Dpkg.h" /* Dataset functions */
#include "H5Eprivate.h" /* Error handling */
@@ -25,17 +32,20 @@
#include "H5SLprivate.h" /* Skip lists */
#include "H5Vprivate.h" /* Vector and array functions */
-/*#define H5D_DEBUG*/
-
#ifdef H5_HAVE_PARALLEL
/* Remove this if H5R_DATASET_REGION is no longer used in this file */
# include "H5Rpublic.h"
#endif /*H5_HAVE_PARALLEL*/
-/* Local macros */
+/****************/
+/* Local Macros */
+/****************/
+
#define H5D_DEFAULT_SKIPLIST_HEIGHT 8
-/* Local typedefs */
+/******************/
+/* Local Typedefs */
+/******************/
/* Information for mapping between file space and memory space */
@@ -69,7 +79,10 @@ typedef struct fm_map {
H5S_sel_type msel_type; /* Selection type in memory */
} fm_map;
-/* Local functions */
+/********************/
+/* Local Prototypes */
+/********************/
+
static herr_t H5D_fill(const void *fill, const H5T_t *fill_type, void *buf,
const H5T_t *buf_type, const H5S_t *space, hid_t dxpl_id);
static herr_t H5D_read(H5D_t *dataset, hid_t mem_type_id,
@@ -78,23 +91,19 @@ static herr_t H5D_read(H5D_t *dataset, hid_t mem_type_id,
static herr_t H5D_write(H5D_t *dataset, hid_t mem_type_id,
const H5S_t *mem_space, const H5S_t *file_space,
hid_t dset_xfer_plist, const void *buf);
-static herr_t
-H5D_contig_read(H5D_io_info_t *io_info, hsize_t nelmts,
+static herr_t H5D_contig_read(H5D_io_info_t *io_info, hsize_t nelmts,
const H5T_t *mem_type, const H5S_t *mem_space,
const H5S_t *file_space, H5T_path_t *tpath,
hid_t src_id, hid_t dst_id, void *buf/*out*/);
-static herr_t
-H5D_contig_write(H5D_io_info_t *io_info, hsize_t nelmts,
+static herr_t H5D_contig_write(H5D_io_info_t *io_info, hsize_t nelmts,
const H5T_t *mem_type, const H5S_t *mem_space,
const H5S_t *file_space, H5T_path_t *tpath,
hid_t src_id, hid_t dst_id, const void *buf);
-static herr_t
-H5D_chunk_read(H5D_io_info_t *io_info, hsize_t nelmts,
+static herr_t H5D_chunk_read(H5D_io_info_t *io_info, hsize_t nelmts,
const H5T_t *mem_type, const H5S_t *mem_space,
const H5S_t *file_space, H5T_path_t *tpath,
hid_t src_id, hid_t dst_id, void *buf/*out*/);
-static herr_t
-H5D_chunk_write(H5D_io_info_t *io_info, hsize_t nelmts,
+static herr_t H5D_chunk_write(H5D_io_info_t *io_info, hsize_t nelmts,
const H5T_t *mem_type, const H5S_t *mem_space,
const H5S_t *file_space, H5T_path_t *tpath,
hid_t src_id, hid_t dst_id, const void *buf);
@@ -123,6 +132,14 @@ static herr_t H5D_chunk_file_cb(void *elem, hid_t type_id, unsigned ndims,
static herr_t H5D_chunk_mem_cb(void *elem, hid_t type_id, unsigned ndims,
const hsize_t *coords, void *fm);
+/*********************/
+/* Package Variables */
+/*********************/
+
+/*******************/
+/* Local Variables */
+/*******************/
+
/* Declare a free list to manage blocks of single datatype element data */
H5FL_BLK_DEFINE(type_elem);
@@ -430,19 +447,9 @@ done:
*
* Return: Non-negative on success/Negative on failure
*
- * Errors:
- * ARGS BADTYPE Not a data space.
- * ARGS BADTYPE Not a data type.
- * ARGS BADTYPE Not a dataset.
- * ARGS BADTYPE Not xfer parms.
- * ARGS BADVALUE No output buffer.
- * DATASET READERROR Can't read data.
- *
* Programmer: Robb Matzke
* Thursday, December 4, 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -524,13 +531,9 @@ done:
*
* Return: Non-negative on success/Negative on failure
*
- * Errors:
- *
* Programmer: Robb Matzke
* Thursday, December 4, 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -597,40 +600,6 @@ done:
* Programmer: Robb Matzke
* Thursday, December 4, 1997
*
- * Modifications:
- * Robb Matzke, 1998-06-09
- * The data space is no longer cached in the dataset struct.
- *
- * Robb Matzke, 1998-08-11
- * Added timing calls around all the data space I/O functions.
- *
- * rky, 1998-09-18
- * Added must_convert to do non-optimized read when necessary.
- *
- * Quincey Koziol, 1999-07-02
- * Changed xfer_parms parameter to xfer plist parameter, so it
- * could be passed to H5T_convert.
- *
- * Albert Cheng, 2000-11-21
- * Added the code that when it detects it is not safe to process a
- * COLLECTIVE read request without hanging, it changes it to
- * INDEPENDENT calls.
- *
- * Albert Cheng, 2000-11-27
- * Changed to use the optimized MPIO transfer for Collective calls only.
- *
- * Raymond Lu, 2001-10-2
- * Changed the way to retrieve property for generic property list.
- *
- * Raymond Lu, 2002-2-26
- * For the new fill value design, data space can either be allocated
- * or not allocated at this stage. Fill value or data from space is
- * returned to outgoing buffer.
- *
- * QAK - 2002/04/02
- * Removed the must_convert parameter and move preconditions to
- * H5S_<foo>_opt_possible() routine
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -769,39 +738,6 @@ done:
* Programmer: Robb Matzke
* Thursday, December 4, 1997
*
- * Modifications:
- * Robb Matzke, 9 Jun 1998
- * The data space is no longer cached in the dataset struct.
- *
- * rky 980918
- * Added must_convert to do non-optimized read when necessary.
- *
- * Quincey Koziol, 2 July 1999
- * Changed xfer_parms parameter to xfer plist parameter, so it could
- * be passed to H5T_convert
- *
- * Albert Cheng, 2000-11-21
- * Added the code that when it detects it is not safe to process a
- * COLLECTIVE write request without hanging, it changes it to
- * INDEPENDENT calls.
- *
- * Albert Cheng, 2000-11-27
- * Changed to use the optimized MPIO transfer for Collective calls only.
- *
- * Raymond Lu, 2001-10-2
- * Changed the way to retrieve property for generic property list.
- *
- * Raymond Lu, 2002-2-26
- * For the new fill value design, space may not be allocated until
- * this function is called. Allocate and initialize space if it
- * hasn't been.
- *
- * QAK - 2002/04/02
- * Removed the must_convert parameter and move preconditions to
- * H5S_<foo>_opt_possible() routine
- *
- * Nat Furrer and James Laird, 2004/6/7
- * Added check for filter encode capability
*-------------------------------------------------------------------------
*/
static herr_t
@@ -978,12 +914,6 @@ done:
* Programmer: Raymond Lu
* Thursday, April 10, 2003
*
- * Modifications:
- * QAK - 2003/04/17
- * Hacked on it a lot. :-)
- * Leon Arber: 4/20/04
- * Added support for data transforms.
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -1240,12 +1170,6 @@ done:
* Programmer: Raymond Lu
* Thursday, April 10, 2003
*
- * Modifications:
- * QAK - 2003/04/17
- * Hacked on it a lot. :-)
- * Leon Arber: 4/20/04
- * Added support for data transforms.
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -1496,12 +1420,6 @@ done:
* Programmer: Raymond Lu
* Thursday, April 10, 2003
*
- * Modifications:
- * QAK - 2003/04/17
- * Hacked on it a lot. :-)
- * Leon Arber: 4/20/04
- * Added support for data transforms.
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -1885,14 +1803,6 @@ done:
* Programmer: Raymond Lu
* Thursday, April 10, 2003
*
- * Modifications:
- * QAK - 2003/04/17
- * Hacked on it a lot. :-)
- * Leon Arber: 4/20/04
- * Added support for data transforms.
- * Kent Yang: 8/10/04
- * Added support for collective chunk IO.
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -2275,10 +2185,6 @@ done:
* Programmer: Raymond Lu
* Thursday, April 10, 2003
*
- * Modifications:
- * QAK - 2003/04/17
- * Hacked on it a lot. :-)
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -2565,8 +2471,6 @@ H5D_free_chunk_info(void *item, void UNUSED *key, void UNUSED *opdata)
* Programmer: Quincey Koziol
* Saturday, May 17, 2003
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -2605,8 +2509,6 @@ done:
* Programmer: Quincey Koziol
* Thursday, May 29, 2003
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -2782,8 +2684,6 @@ done:
*
* Assumptions: That the file and memory selections are the same shape.
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -2901,8 +2801,6 @@ done:
* Programmer: Quincey Koziol
* Wednesday, July 23, 2003
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -3014,10 +2912,6 @@ done:
* Programmer: Raymond Lu
* Thursday, April 10, 2003
*
- * Modifications:
- * QAK - 2003/04/17
- * Hacked on it a lot. :-)
- *
*-------------------------------------------------------------------------
*/
/* ARGSUSED */
@@ -3097,8 +2991,6 @@ done:
* Programmer: Quincey Koziol
* Thursday, September 30, 2004
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -3250,8 +3142,6 @@ done:
* Programmer: Quincey Koziol
* Friday, August 12, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -3297,8 +3187,6 @@ done:
* Programmer: Quincey Koziol
* Friday, August 12, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -3345,8 +3233,6 @@ done:
* Programmer: Quincey Koziol
* Friday, February 6, 2004
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -3385,8 +3271,6 @@ done:
*
* Programmer:
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
diff --git a/src/H5Distore.c b/src/H5Distore.c
index 2a753f0..bf0c92e 100644
--- a/src/H5Distore.c
+++ b/src/H5Distore.c
@@ -40,10 +40,17 @@
* entry which is added to the end of the list.
*/
+/****************/
+/* Module Setup */
+/****************/
+
#define H5B_PACKAGE /*suppress error about including H5Bpkg */
#define H5D_PACKAGE /*suppress error about including H5Dpkg */
+/***********/
+/* Headers */
+/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Bpkg.h" /* B-link trees */
#include "H5Dpkg.h" /* Datasets */
@@ -59,6 +66,10 @@
#include "H5Sprivate.h" /* Dataspaces */
#include "H5Vprivate.h" /* Vector and array functions */
+/****************/
+/* Local Macros */
+/****************/
+
/*
* Feature: If this constant is defined then every cache preemption and load
* causes a character to be printed on the standard error stream:
@@ -91,6 +102,12 @@
*/
#define H5D_ISTORE_NDIMS(X) (((X)->sizeof_rkey-8)/8)
+#define H5D_HASH(D,ADDR) H5F_addr_hash(ADDR,(D)->cache.chunk.nslots)
+
+/******************/
+/* Local Typedefs */
+/******************/
+
/* Raw data chunks are cached. Each entry in the cache is: */
typedef struct H5D_rdcc_ent_t {
hbool_t locked; /*entry is locked in cache */
@@ -136,9 +153,10 @@ typedef struct H5D_istore_ud1_t {
hsize_t *dims; /*dataset dimensions */
} H5D_istore_ud1_t;
-#define H5D_HASH(D,ADDR) H5F_addr_hash(ADDR,(D)->cache.chunk.nslots)
+/********************/
+/* Local Prototypes */
+/********************/
-/* Private prototypes */
static void *H5D_istore_chunk_alloc(size_t size, const H5O_pline_t *pline);
static void *H5D_istore_chunk_xfree(void *chk, const H5O_pline_t *pline);
static herr_t H5D_istore_shared_create (const H5F_t *f, H5O_layout_t *layout);
@@ -199,6 +217,14 @@ H5B_class_t H5B_ISTORE[1] = {{
H5D_istore_debug_key, /*debug */
}};
+/*********************/
+/* Package Variables */
+/*********************/
+
+/*******************/
+/* Local Variables */
+/*******************/
+
/* Declare a free list to manage the H5B_shared_t struct */
H5FL_EXTERN(H5B_shared_t);
@@ -233,8 +259,6 @@ H5FL_BLK_DEFINE_STATIC(chunk_page);
* Programmer: Robb Matzke
* Wednesday, October 8, 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
/* ARGSUSED */
@@ -269,8 +293,6 @@ H5D_istore_sizeof_rkey(const H5F_t UNUSED *f, const void *_udata)
* Programmer: Quincey Koziol
* Monday, July 5, 2004
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
/* ARGSUSED */
@@ -303,8 +325,6 @@ H5D_istore_get_shared(const H5F_t UNUSED *f, const void *_udata)
* Programmer: Robb Matzke
* Friday, October 10, 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -347,8 +367,6 @@ H5D_istore_decode_key(const H5F_t UNUSED *f, const H5B_t *bt, const uint8_t *raw
* Programmer: Robb Matzke
* Friday, October 10, 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -391,8 +409,6 @@ H5D_istore_encode_key(const H5F_t UNUSED *f, const H5B_t *bt, uint8_t *raw, void
* Programmer: Robb Matzke
* Thursday, April 16, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
/* ARGSUSED */
@@ -439,8 +455,6 @@ H5D_istore_debug_key (FILE *stream, H5F_t UNUSED *f, hid_t UNUSED dxpl_id, int i
* Programmer: Robb Matzke
* Thursday, November 6, 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
/* ARGSUSED */
@@ -492,8 +506,6 @@ H5D_istore_cmp2(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, void *_lt_key, void *_uda
* Programmer: Robb Matzke
* Wednesday, October 8, 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
/* ARGSUSED */
@@ -557,8 +569,6 @@ H5D_istore_cmp3(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, void *_lt_key, void *_uda
* Programmer: Robb Matzke
* Tuesday, October 14, 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -639,9 +649,6 @@ done:
* Programmer: Robb Matzke
* Thursday, October 9, 1997
*
- * Modifications:
- * Robb Matzke, 1999-07-28
- * The ADDR argument is passed by value.
*-------------------------------------------------------------------------
*/
/* ARGSUSED */
@@ -706,10 +713,6 @@ done:
* Programmer: Robb Matzke
* Thursday, October 9, 1997
*
- * Modifications:
- * Robb Matzke, 1999-07-28
- * The ADDR argument is passed by value. The NEW_NODE argument
- * is renamed NEW_NODE_P.
*-------------------------------------------------------------------------
*/
/* ARGSUSED */
@@ -833,12 +836,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, April 21, 1999
*
- * Modifications:
- * Robb Matzke, 1999-07-28
- * The ADDR argument is passed by value.
- *
- * Quincey Koziol, 2002-04-22
- * Changed to callback from H5B_iterate
*-------------------------------------------------------------------------
*/
/* ARGSUSED */
@@ -870,12 +867,6 @@ H5D_istore_iter_allocated (H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_l
* Programmer: Robb Matzke
* Wednesday, April 21, 1999
*
- * Modifications:
- * Robb Matzke, 1999-07-28
- * The ADDR argument is passed by value.
- *
- * Quincey Koziol, 2002-04-22
- * Changed to callback from H5B_iterate
*-------------------------------------------------------------------------
*/
/* ARGSUSED */
@@ -922,8 +913,6 @@ H5D_istore_iter_dump (H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_lt_key
* Programmer: Robb Matzke
* Monday, May 18, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -963,8 +952,6 @@ done:
* Programmer: Robb Matzke
* Thursday, May 21, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -1079,11 +1066,6 @@ done:
* Programmer: Robb Matzke
* Thursday, May 21, 1998
*
- * Modifications:
- * Pedro Vicente, March 28, 2002
- * Added flush parameter that switches the call to H5F_istore_flush_entry
- * The call with FALSE is used by the H5F_istore_prune_by_extent function
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -1146,10 +1128,6 @@ done:
* Programmer: Robb Matzke
* Thursday, May 21, 1998
*
- * Modifications:
- * Pedro Vicente, March 28, 2002
- * Added TRUE parameter to the call to H5F_istore_preempt
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -1206,10 +1184,6 @@ done:
* Programmer: Robb Matzke
* Thursday, May 21, 1998
*
- * Modifications:
- * Pedro Vicente, March 28, 2002
- * Added TRUE parameter to the call to H5F_istore_preempt
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -1272,8 +1246,6 @@ done:
* Programmer: Quincey Koziol
* Monday, September 27, 2004
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -1331,8 +1303,6 @@ done:
* Programmer: Quincey Koziol
* Thursday, July 8, 2004
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -1367,10 +1337,6 @@ H5D_istore_shared_free (void *_shared)
* Programmer: Robb Matzke
* Thursday, May 21, 1998
*
- * Modifications:
- * Pedro Vicente, March 28, 2002
- * TRUE parameter to the call to H5F_istore_preempt
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -1498,13 +1464,6 @@ done:
* Programmer: Robb Matzke
* Thursday, May 21, 1998
*
- * Modifications:
- * Robb Matzke, 1999-08-02
- * The split ratios are passed in as part of the data transfer
- * property list.
- *
- * Pedro Vicente, March 28, 2002
- * TRUE parameter to the call to H5F_istore_preempt
*-------------------------------------------------------------------------
*/
static void *
@@ -1778,10 +1737,6 @@ done:
* Programmer: Robb Matzke
* Thursday, May 21, 1998
*
- * Modifications:
- * Robb Matzke, 1999-08-02
- * The split_ratios are passed as part of the data transfer
- * property list.
*-------------------------------------------------------------------------
*/
static herr_t
@@ -1859,8 +1814,6 @@ done:
* Programmer: Quincey Koziol
* Wednesday, May 7, 2003
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
ssize_t
@@ -2052,8 +2005,6 @@ done:
* Programmer: Quincey Koziol
* Friday, May 2, 2003
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
ssize_t
@@ -2207,8 +2158,6 @@ done:
* Programmer: Robb Matzke
* Tuesday, October 21, 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -2256,9 +2205,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, April 21, 1999
*
- * Modifications:
- * Robb Matzke, 1999-07-28
- * The ADDR argument is passed by value.
*-------------------------------------------------------------------------
*/
hsize_t
@@ -2315,10 +2261,6 @@ done:
* Programmer: Albert Cheng
* June 27, 1998
*
- * Modifications:
- * Modified to return the address instead of returning it through
- * a parameter - QAK, 1/30/02
- *
*-------------------------------------------------------------------------
*/
haddr_t
@@ -2380,8 +2322,6 @@ done:
* Programmer: Quincey Koziol
* April 22, 2004
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void *
@@ -2414,8 +2354,6 @@ H5D_istore_chunk_alloc(size_t size, const H5O_pline_t *pline)
* Programmer: Quincey Koziol
* April 22, 2004
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void *
@@ -2457,26 +2395,6 @@ H5D_istore_chunk_xfree(void *chk, const H5O_pline_t *pline)
* Programmer: Albert Cheng
* June 26, 1998
*
- * Modifications:
- * rky, 1998-09-23
- * Added barrier to preclude racing with data writes.
- *
- * rky, 1998-12-07
- * Added Wait-Signal wrapper around unlock-lock critical region
- * to prevent race condition (unlock reads, lock writes the
- * chunk).
- *
- * Robb Matzke, 1999-08-02
- * The split_ratios are passed in as part of the data transfer
- * property list.
- *
- * Quincey Koziol, 2002-05-16
- * Rewrote algorithm to allocate & write blocks without using
- * lock/unlock code.
- *
- * Quincey Koziol, 2002-05-17
- * Added feature to avoid writing fill-values if user has indicated
- * that they should never be written.
*-------------------------------------------------------------------------
*/
herr_t
@@ -2901,8 +2819,6 @@ done:
*
* Comments: Called by H5D_prune_by_extent
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
/* ARGSUSED */
@@ -2961,8 +2877,6 @@ done:
*
* Comments: Part of H5B_ISTORE
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
/* ARGSUSED */
@@ -3011,8 +2925,6 @@ done:
* Fot the ones that are allocated we initialize the part that lies outside the boundary
* with the fill value.
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -3204,8 +3116,6 @@ done:
* Programmer: Quincey Koziol
* Thursday, March 20, 2003
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -3256,8 +3166,6 @@ done:
* Programmer: Quincey Koziol
* Saturday, May 29, 2004
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -3357,9 +3265,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, April 28, 1999
*
- * Modifications:
- * Robb Matzke, 1999-07-28
- * The ADDR argument is passed by value.
*-------------------------------------------------------------------------
*/
herr_t
@@ -3398,8 +3303,6 @@ done:
* Programmer: Robb Matzke
* Thursday, May 21, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -3461,9 +3364,6 @@ done:
* Programmer: Robb Matzke
* Thursday, April 16, 1998
*
- * Modifications:
- * Robb Matzke, 1999-07-28
- * The ADDR argument is passed by value.
*-------------------------------------------------------------------------
*/
herr_t
diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c
index 43b736d..f4b3450 100644
--- a/src/H5Dmpio.c
+++ b/src/H5Dmpio.c
@@ -21,9 +21,16 @@
* I didn't make them portable.
*/
+/****************/
+/* Module Setup */
+/****************/
+
#define H5D_PACKAGE /*suppress error about including H5Dpkg */
+/***********/
+/* Headers */
+/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Dpkg.h" /* Datasets */
#include "H5Eprivate.h" /* Error handling */
@@ -35,6 +42,18 @@
#ifdef H5_HAVE_PARALLEL
+/****************/
+/* Local Macros */
+/****************/
+
+/******************/
+/* Local Typedefs */
+/******************/
+
+/********************/
+/* Local Prototypes */
+/********************/
+
/* For regular hyperslab selection. */
static herr_t
H5D_mpio_spaces_xfer(H5D_io_info_t *io_info, size_t elmt_size,
@@ -42,6 +61,14 @@ H5D_mpio_spaces_xfer(H5D_io_info_t *io_info, size_t elmt_size,
void *buf/*out*/,
hbool_t do_write);
+/*********************/
+/* Package Variables */
+/*********************/
+
+/*******************/
+/* Local Variables */
+/*******************/
+
/*-------------------------------------------------------------------------
* Function: H5D_mpio_opt_possible
@@ -55,8 +82,6 @@ H5D_mpio_spaces_xfer(H5D_io_info_t *io_info, size_t elmt_size,
* Programmer: Quincey Koziol
* Wednesday, April 3, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
htri_t
@@ -179,26 +204,6 @@ done:
* H5S_mpio_opt_possible() routine, which determines whether this routine
* can be called for a given dataset transfer.
*
- * Modifications:
- * rky 980918
- * Added must_convert parameter to let caller know we can't optimize
- * the xfer.
- *
- * Albert Cheng, 001123
- * Include the MPI_type freeing as part of cleanup code.
- *
- * QAK - 2002/04/02
- * Removed the must_convert parameter and move preconditions to
- * H5S_mpio_opt_possible() routine
- *
- * QAK - 2002/06/17
- * Removed 'disp' parameter from H5FD_mpio_setup routine and use the
- * address of the dataset in MPI_File_set_view() calls, as necessary.
- *
- * QAK - 2002/06/18
- * Removed 'dc_plist' parameter, since it was not used. Also, switch to
- * getting the 'extra_offset' setting for each selection.
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -308,8 +313,6 @@ done:
*
* Programmer:
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -338,9 +341,6 @@ H5D_mpio_select_read(H5D_io_info_t *io_info,
*
* Programmer:
*
- * Modifications:
- *
- *
*-------------------------------------------------------------------------
*/
herr_t
diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h
index 609b590..04fce35 100644
--- a/src/H5Dpkg.h
+++ b/src/H5Dpkg.h
@@ -334,3 +334,4 @@ H5_DLL herr_t H5D_layout_contig_size_test(hid_t did, hsize_t *size);
#endif /* H5D_TESTING */
#endif /*_H5Dpkg_H*/
+
diff --git a/src/H5Dprivate.h b/src/H5Dprivate.h
index df97218..dcd7f86 100644
--- a/src/H5Dprivate.h
+++ b/src/H5Dprivate.h
@@ -26,6 +26,10 @@
#include "H5Oprivate.h" /* Object headers */
#include "H5Zprivate.h" /* Data filters */
+/**************************/
+/* Library Private Macros */
+/**************************/
+
/*
* Feature: Define H5D_DEBUG on the compiler command line if you want to
* debug dataset I/O. NDEBUG must not be defined in order for this
@@ -209,7 +213,13 @@ typedef struct H5D_dcpl_cache_t {
H5D_fill_time_t fill_time; /* Fill time (H5D_CRT_FILL_TIME_NAME) */
} H5D_dcpl_cache_t;
-/* Library-private functions defined in H5D package */
+/*****************************/
+/* Library Private Variables */
+/*****************************/
+
+/******************************/
+/* Library Private Prototypes */
+/******************************/
H5_DLL herr_t H5D_init(void);
H5_DLL H5D_t *H5D_open(const H5G_entry_t *ent, hid_t dxpl_id);
H5_DLL herr_t H5D_close(H5D_t *dataset);
@@ -237,4 +247,5 @@ H5_DLL herr_t H5D_istore_delete(H5F_t *f, hid_t dxpl_id,
H5_DLL herr_t H5D_istore_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream,
int indent, int fwidth, unsigned ndims);
-#endif
+#endif /* _H5Dprivate_H */
+
diff --git a/src/H5Dpublic.h b/src/H5Dpublic.h
index 3595bf2..83074f2 100644
--- a/src/H5Dpublic.h
+++ b/src/H5Dpublic.h
@@ -22,6 +22,14 @@
#include "H5public.h"
#include "H5Ipublic.h"
+/*****************/
+/* Public Macros */
+/*****************/
+
+/*******************/
+/* Public Typedefs */
+/*******************/
+
/* Values for the H5D_LAYOUT property */
typedef enum H5D_layout_t {
H5D_LAYOUT_ERROR = -1,
@@ -65,6 +73,13 @@ typedef enum H5D_fill_value_t {
H5D_FILL_VALUE_USER_DEFINED =2
} H5D_fill_value_t;
+/********************/
+/* Public Variables */
+/********************/
+
+/*********************/
+/* Public Prototypes */
+/*********************/
#ifdef __cplusplus
extern "C" {
#endif
@@ -102,4 +117,5 @@ H5_DLL herr_t H5Ddebug(hid_t dset_id);
#ifdef __cplusplus
}
#endif
-#endif
+#endif /* _H5Dpublic_H */
+
diff --git a/src/H5Dselect.c b/src/H5Dselect.c
index 596937f..9f98d9e 100644
--- a/src/H5Dselect.c
+++ b/src/H5Dselect.c
@@ -18,14 +18,41 @@
* Purpose: Dataspace I/O functions.
*/
+/****************/
+/* Module Setup */
+/****************/
+
#define H5D_PACKAGE /*suppress error about including H5Dpkg */
+/***********/
+/* Headers */
+/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Dpkg.h" /* Datasets */
#include "H5Eprivate.h" /* Error handling */
#include "H5FLprivate.h" /* Free Lists */
+/****************/
+/* Local Macros */
+/****************/
+
+/******************/
+/* Local Typedefs */
+/******************/
+
+/********************/
+/* Local Prototypes */
+/********************/
+
+/*********************/
+/* Package Variables */
+/*********************/
+
+/*******************/
+/* Local Variables */
+/*******************/
+
/* Declare a free list to manage sequences of size_t */
H5FL_SEQ_DEFINE_STATIC(size_t);
@@ -47,8 +74,6 @@ H5FL_SEQ_DEFINE_STATIC(hsize_t);
* Programmer: Quincey Koziol
* Thursday, June 20, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -143,8 +168,6 @@ done:
* Programmer: Quincey Koziol
* Monday, June 24, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
size_t
@@ -234,8 +257,6 @@ done:
* Programmer: Quincey Koziol
* Monday, July 8, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -323,8 +344,6 @@ done:
* Programmer: Quincey Koziol
* Monday, June 24, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
size_t
@@ -407,8 +426,6 @@ done:
* Programmer: Quincey Koziol
* Tuesday, July 23, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -552,8 +569,6 @@ done:
* Programmer: Quincey Koziol
* Tuesday, July 23, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
diff --git a/src/H5Dtest.c b/src/H5Dtest.c
index 24817a8..a48bca8 100644
--- a/src/H5Dtest.c
+++ b/src/H5Dtest.c
@@ -18,14 +18,41 @@
* Purpose: Dataset testing functions.
*/
+/****************/
+/* Module Setup */
+/****************/
+
#define H5D_PACKAGE /*suppress error about including H5Dpkg */
#define H5D_TESTING /*suppress warning about H5D testing funcs*/
-#include "H5private.h" /* Generic Functions */
+/***********/
+/* Headers */
+/***********/
+#include "H5private.h" /* Generic Functions */
#include "H5Dpkg.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Iprivate.h" /* ID Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Iprivate.h" /* IDs */
+
+/****************/
+/* Local Macros */
+/****************/
+
+/******************/
+/* Local Typedefs */
+/******************/
+
+/********************/
+/* Local Prototypes */
+/********************/
+
+/*********************/
+/* Package Variables */
+/*********************/
+
+/*******************/
+/* Local Variables */
+/*******************/
/*--------------------------------------------------------------------------