summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2022-03-31 13:23:35 (GMT)
committerGitHub <noreply@github.com>2022-03-31 13:23:35 (GMT)
commit9fdf9546541866f989b4f46aad6f6ac975563777 (patch)
treee56a66816abf1a6c16c9db2874d25b1c0dbeb3e8 /src
parentdcdbeb7124c28f87d96bb9900f3d92e2a07bcd6b (diff)
downloadhdf5-9fdf9546541866f989b4f46aad6f6ac975563777.zip
hdf5-9fdf9546541866f989b4f46aad6f6ac975563777.tar.gz
hdf5-9fdf9546541866f989b4f46aad6f6ac975563777.tar.bz2
1.8 Merge doxygen changes from develop (#1545)
* Merge doxygen changes from develop * revert macro code change * Format correction
Diffstat (limited to 'src')
-rw-r--r--src/H5ACprivate.h5
-rw-r--r--src/H5ACpublic.h12
-rw-r--r--src/H5Apublic.h289
-rw-r--r--src/H5B2private.h2
-rw-r--r--src/H5Cpkg.h267
-rw-r--r--src/H5Cprivate.h3
-rw-r--r--src/H5Dpkg.h14
-rw-r--r--src/H5Dpublic.h405
-rw-r--r--src/H5Epublic.h60
-rw-r--r--src/H5FDmpio.h6
-rw-r--r--src/H5FDs3comms.h6
-rw-r--r--src/H5FLprivate.h16
-rw-r--r--src/H5Fpkg.h8
-rw-r--r--src/H5Fprivate.h34
-rw-r--r--src/H5Fpublic.h25
-rw-r--r--src/H5Gpublic.h22
-rw-r--r--src/H5Ipublic.h75
-rw-r--r--src/H5Lpublic.h113
-rw-r--r--src/H5Opkg.h18
-rw-r--r--src/H5Oprivate.h12
-rw-r--r--src/H5Opublic.h101
-rw-r--r--src/H5PLpublic.h34
-rw-r--r--src/H5Ppublic.h245
-rw-r--r--src/H5Rpublic.h34
-rw-r--r--src/H5Spkg.h13
-rw-r--r--src/H5Spublic.h131
-rw-r--r--src/H5TSprivate.h20
-rw-r--r--src/H5Tpkg.h2
-rw-r--r--src/H5Tprivate.h4
-rw-r--r--src/H5Tpublic.h49
-rw-r--r--src/H5Zpublic.h38
-rw-r--r--src/H5private.h666
-rw-r--r--src/H5public.h74
-rw-r--r--src/H5win32defs.h1
34 files changed, 1464 insertions, 1340 deletions
diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h
index 166ba8d..1fce17e 100644
--- a/src/H5ACprivate.h
+++ b/src/H5ACprivate.h
@@ -91,9 +91,9 @@ typedef enum {
#define H5AC__DEFAULT_MIN_CLEAN_SIZE H5C__DEFAULT_MIN_CLEAN_SIZE
/*
- * Class methods pertaining to caching. Each type of cached object will
+ * Class methods pertaining to caching. Each type of cached object will
* have a constant variable with permanent life-span that describes how
- * to cache the object. That variable will be of type H5AC_class_t and
+ * to cache the object. That variable will be of type H5AC_class_t and
* have the following required fields...
*
* LOAD: Loads an object from disk to memory. The function
@@ -181,7 +181,6 @@ extern H5P_genplist_t *H5AC_ind_dxpl_g;
extern hid_t H5AC_ind_dxpl_id;
/* Default cache configuration. */
-
#define H5AC__DEFAULT_METADATA_WRITE_STRATEGY H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED
/* clang-format off */
diff --git a/src/H5ACpublic.h b/src/H5ACpublic.h
index a7d30ec..5ac4521 100644
--- a/src/H5ACpublic.h
+++ b/src/H5ACpublic.h
@@ -75,7 +75,7 @@ extern "C" {
* field should be used to open a trace file for the cache.
*
*
- * The trace file is a debuging feature that allow the capture of
+ * The trace file is a debugging feature that allow the capture of
* top level metadata cache requests for purposes of debugging and/or
* optimization. This field should normally be set to FALSE, as
* trace file collection imposes considerable overhead.
@@ -120,7 +120,7 @@ extern "C" {
* H5C_incr__off ) && ( decr_mode == H5C_decr__off )). There
* is no logical reason why this should be so, but it simplifies
* implementation and testing, and I can't think of any reason
- * why it would be desireable. If you can think of one, I'll
+ * why it would be desirable. If you can think of one, I'll
* revisit the issue.
*
* set_initial_size: Boolean flag indicating whether the size of the
@@ -393,7 +393,7 @@ extern "C" {
*
* When the sync point is reached (or when there is a user generated
* flush), process zero flushes sufficient entries to bring it into
- * complience with its min clean size (or flushes all dirty entries in
+ * compliance with its min clean size (or flushes all dirty entries in
* the case of a user generated flush), broad casts the list of
* entries just cleaned to all the other processes, and then exits
* the sync point.
@@ -573,7 +573,7 @@ typedef struct H5AC_cache_config_t {
size_t min_size;
/**< Lower bound (in bytes) on the range of values that the
- * adaptive cache resize code can select as the mininum cache * size. */
+ * adaptive cache resize code can select as the minimum cache * size. */
long int epoch_length;
/**< Number of cache accesses between runs of the adaptive cache resize
@@ -705,13 +705,13 @@ typedef struct H5AC_cache_config_t {
* of bytes of dirty metadata created since the last synchronization exceeds
* this limit.\n This field only applies to the parallel case. While it is
* ignored elsewhere, it can still draw a value out of bounds error.\n It
- * must be consistant across all caches on any given file.\n By default,
+ * must be consistent across all caches on any given file.\n By default,
* this field is set to 256 KB. It shouldn't be more than half the current
* max cache size times the min clean fraction. */
int metadata_write_strategy;
/**< Desired metadata write strategy. The valid values for this field
- * are:\n #H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY: Specifies tha only
+ * are:\n #H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY: Specifies the only
* process zero is allowed to write dirty metadata to disk.\n
* #H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED: Specifies that process zero
* still makes the decisions as to what entries should be flushed, but the
diff --git a/src/H5Apublic.h b/src/H5Apublic.h
index 2bd2686..f6205e8 100644
--- a/src/H5Apublic.h
+++ b/src/H5Apublic.h
@@ -22,6 +22,26 @@
* support partial I/O operations for attributes and they cannot be compressed
* or extended.
*
+ * <table>
+ * <tr><th>Create</th><th>Read</th></tr>
+ * <tr valign="top">
+ * <td>
+ * \snippet{lineno} H5A_examples.c create
+ * </td>
+ * <td>
+ * \snippet{lineno} H5A_examples.c read
+ * </td>
+ * <tr><th>Update</th><th>Delete</th></tr>
+ * <tr valign="top">
+ * <td>
+ * \snippet{lineno} H5A_examples.c update
+ * </td>
+ * <td>
+ * \snippet{lineno} H5A_examples.c delete
+ * </td>
+ * </tr>
+ * </table>
+ *
*/
/*
@@ -91,11 +111,11 @@ extern "C" {
*
* \return \herr_t
*
- * \details H5Aclose() terminates access to the attribute specified by
- * \p attr_id by releasing the identifier.
+ * \details H5Aclose() terminates access to the attribute through
+ * \p attr_id and releases the identifier.
*
- * \attention Further use of a released attribute identifier is illegal; a
- * function using such an identifier will generate an error.
+ * \par Example
+ * \snippet H5A_examples.c create
*
* \since 1.0.0
*
@@ -123,27 +143,19 @@ H5_DLL herr_t H5Aclose(hid_t attr_id);
* The attribute name, \p attr_name, must be unique for the object.
*
* The attribute is created with the specified datatype and dataspace,
- * \p type_id and \p space_id, which are created with the H5T and
- * H5S interfaces, respectively.
- *
- * If \p type_id is either a fixed-length or variable-length string,
- * it is important to set the string length when defining the
- * datatype. String datatypes are derived from #H5T_C_S1 (or
- * #H5T_FORTRAN_S1 for Fortran), which defaults to 1 character in
- * size. See H5Tset_size() and Creating variable-length string
- * datatypes.
+ * \p type_id and \p space_id.
*
- * The access property list is currently unused, but will be used in
- * the future. This property list should currently be #H5P_DEFAULT.
+ * \plist_unused{acpl}
*
* The attribute identifier returned by this function must be released
* with H5Aclose() resource leaks will develop.
*
- * \note The \p aapl parameter is currently not used; specify #H5P_DEFAULT.
- *
* \note If \p loc_id is a file identifier, the attribute will be attached
* that file’s root group.
*
+ * \par Example
+ * \snippet H5A_examples.c create
+ *
* \since 1.8.0
*
* \see H5Aclose()
@@ -173,28 +185,19 @@ H5_DLL hid_t H5Acreate2(hid_t loc_id, const char *attr_name, hid_t type_id, hid_
* attached to the object specified by \p loc_id and \p obj_name.
*
* \p loc_id is a location identifier; \p obj_name is the object
- * name relative to \p loc_id. If \p loc_id fully specifies the
- * object to which the attribute is to be attached, \p obj_name
- * should be '.' (a dot).
+ * name relative to \p loc_id.
*
* The attribute name, \p attr_name, must be unique for the object.
*
* The attribute is created with the specified datatype and
- * dataspace, \p type_id and \p space_id, which are created with
- * the H5T and H5S interfaces respectively.
+ * dataspace, \p type_id and \p space_id.
*
- * The attribute creation and access property lists are currently
- * unused, but will be used in the future for optional attribute
- * creation and access properties. These property lists should
- * currently be #H5P_DEFAULT.
+ * \plist_unused{aapl}
*
* The link access property list, \p lapl_id, may provide
* information regarding the properties of links required to access
* the object, \p obj_name.
*
- * The attribute identifier returned by this function must be
- * released with H5close() or resource leaks will develop.
- *
* \since 1.8.0
*
*/
@@ -213,10 +216,14 @@ H5_DLL hid_t H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *a
*
* \details H5Adelete() removes the attribute specified by its name,
* \p attr_name, from a file, dataset, group, or named datatype.
- * This function should not be used when attribute identifiers
- * are open on \p loc_id as it may cause the internal indexes of
- * the attributes to change and future writes to the open
- * attributes to produce incorrect results.
+ *
+ * \attention This function should not be used when other attribute identifiers
+ * are open on \p loc_id. This may cause the internal indexes of
+ * the attributes to change and future writes to the open
+ * attributes to produce incorrect results.
+ *
+ * \par Example
+ * \snippet H5A_examples.c delete
*
* \since 1.0.0
*
@@ -243,27 +250,16 @@ H5_DLL herr_t H5Adelete(hid_t loc_id, const char *attr_name);
*
* The object from which the attribute is to be removed is
* specified by a location identifier and name, \p loc_id and
- * \p obj_name, respectively. If \p loc_id fully specifies the
- * object from which the attribute is to be removed, \p obj_name
- * should be '.' (a dot).
+ * \p obj_name, respectively.
*
* The attribute to be removed is specified by a position in an
- * index, \p n. The type of index is specified by \p idx_type and
- * may be #H5_INDEX_NAME, for an alpha-numeric index by name, or
- * #H5_INDEX_CRT_ORDER, for an index by creation order. The order
- * in which the index is to be traversed is specified by \p order
- * and may be #H5_ITER_INC (increment) for top-down iteration,
- * #H5_ITER_DEC (decrement) for bottom-up iteration, or
- * #H5_ITER_NATIVE, in which case HDF5 will iterate in the
- * fastest-available order. For example, if \p idx_type, \p order,
+ * index, \p n. The type of index is specified by \p idx_type.
+ * The order in which the index is to be traversed is specified by
+ * \p order. For example, if \p idx_type, \p order,
* and \p n are set to #H5_INDEX_NAME, #H5_ITER_INC, and 5,
- * respectively, the fifth attribute by alpha-numeric order of
+ * respectively, the fifth attribute in lexicographic order of
* attribute names will be removed.
*
- * For a discussion of \p idx_type and \p order, the valid values
- * of those parameters, and the use of \p n, see the description
- * of H5Aiterate2().
- *
* The link access property list, \p lapl_id, may provide
* information regarding the properties of links required to access
* the object, \p obj_name.
@@ -291,9 +287,6 @@ H5_DLL herr_t H5Adelete_by_idx(hid_t loc_id, const char *obj_name, H5_index_t id
* from an object specified by location and name, \p loc_id and
* \p obj_name, respectively.
*
- * If \p loc_id fully specifies the object from which the
- * attribute is to be removed, \p obj_name should be '.' (a dot).
- *
* The link access property list, \p lapl_id, may provide
* information regarding the properties of links required to
* access the object, \p obj_name.
@@ -342,9 +335,7 @@ H5_DLL htri_t H5Aexists(hid_t obj_id, const char *attr_name);
* \p loc_id specifies a location in the file containing the object.
* \p obj_name is the name of the object to which the attribute is
* attached and can be a relative name, relative to \p loc_id,
- * or an absolute name, based in the root group of the file. If
- * \p loc_id fully specifies the object, \p obj_name should be '.'
- * (a dot).
+ * or an absolute name, based in the root group of the file.
*
* The link access property list, \p lapl_id, may provide
* information regarding the properties of links required to access
@@ -368,9 +359,6 @@ H5_DLL htri_t H5Aexists_by_name(hid_t obj_id, const char *obj_name, const char *
* creation property list associated with the attribute specified
* by \p attr_id.
*
- * The creation property list identifier should be released with
- * H5Pclose().
- *
* \since 1.8.0
*
*/
@@ -387,32 +375,9 @@ H5_DLL hid_t H5Aget_create_plist(hid_t attr_id);
* \return \herr_t
*
* \details H5Aget_info() retrieves attribute information, locating the
- * attribute with an attribute identifier, \p attr_id, which is
- * the identifier returned by H5Aopen() or H5Aopen_by_idx(). The
+ * attribute with an attribute identifier, \p attr_id. The
* attribute information is returned in the \p ainfo struct.
*
- * The \p ainfo struct is defined as follows:
- * \snippet this H5A_info_t_snip
- *
- * \p corder_valid indicates whether the creation order data is
- * valid for this attribute. Note that if creation order is not
- * being tracked, no creation order data will be valid. Valid
- * values are \c TRUE and \c FALSE.
- *
- * \p corder is a positive integer containing the creation
- * order of the attribute. This value is 0-based, so, for
- * example, the third attribute created will have a \p corder
- * value of 2.
- *
- * \p cset indicates the character set used for the attribute’s
- * name; valid values are defined in H5Tpublic.h and include
- * the following:
- * \csets
- * This value is set with H5Pset_char_encoding().
- *
- * \p data_size indicates the size, in the number of characters,
- * of the attribute.
- *
* \since 1.8.0
*
*/
@@ -440,16 +405,9 @@ H5_DLL herr_t H5Aget_info(hid_t attr_id, H5A_info_t *ainfo /*out*/);
* The attribute is located by its index position and the attribute
* information is returned in the \p ainfo struct.
*
- * If \p loc_id fully specifies the object to which the attribute
- * is attached, \p obj_name should be '.' (a dot).
- *
* The attribute is located by means of an index type, an index
* traversal order, and a position in the index, \p idx_type,
- * \p order and \p n, respectively. These parameters and their
- * valid values are discussed in the description of H5Aiterate2().
- *
- * The \p ainfo struct, which will contain the returned attribute
- * information, is described in H5Aget_info().
+ * \p order and \p n, respectively.
*
* The link access property list, \p lapl_id, may provide
* information regarding the properties of links required to access
@@ -467,8 +425,7 @@ H5_DLL herr_t H5Aget_info_by_idx(hid_t loc_id, const char *obj_name, H5_index_t
* \brief Retrieves attribute information, by attribute name
*
* \fgdt_loc_id
- *
- * \param[in] obj_name Name of object to which attribute is attached,
+ * \param[in] obj_name Name of the object to which an attribute is attached,
* relative to location
* \param[in] attr_name Attribute name
* \param[out] ainfo Struct containing returned attribute information
@@ -481,11 +438,6 @@ H5_DLL herr_t H5Aget_info_by_idx(hid_t loc_id, const char *obj_name, H5_index_t
* location and name, \p loc_id and \p obj_name, respectively.
* The attribute information is returned in the \p ainfo struct.
*
- * If \p loc_id fully specifies the object to which the attribute
- * is attached, \p obj_name should be '.' (a dot).
- *
- * The \p ainfo struct is described in H5Aget_info().
- *
* The link access property list, \p lapl_id, may provide
* information regarding the properties of links required to
* access the object, \p obj_name.
@@ -516,8 +468,8 @@ H5_DLL herr_t H5Aget_info_by_name(hid_t loc_id, const char *obj_name, const char
* string terminator is stored in the last position of the buffer
* to properly terminate the string.
*
- * If the user only wants to find out the size of this name, the
- * values 0 and NULL can be passed in for the parameters
+ * If the user only wants to retrieve the name length, the
+ * values 0 and NULL should be passed for the parameters
* \p bufsize and \p buf.
*
* \since 1.0.0
@@ -528,7 +480,7 @@ H5_DLL ssize_t H5Aget_name(hid_t attr_id, size_t buf_size, char *buf);
/**
* \ingroup H5A
*
- * \brief Gets an attribute name, by attribute index position
+ * \brief Gets an attribute name by attribute index position
*
* \fgdt_loc_id
* \param[in] obj_name Name of object to which attribute is attached,
@@ -549,13 +501,9 @@ H5_DLL ssize_t H5Aget_name(hid_t attr_id, size_t buf_size, char *buf);
* located by its index position, the size of the name is specified
* in \p size, and the attribute name is returned in \p name.
*
- * If \p loc_id fully specifies the object to which the attribute
- * is attached, \p obj_name should be '.' (a dot).
- *
* The attribute is located by means of an index type, an index
* traversal order, and a position in the index, \p idx_type,
- * \p order and \p n, respectively. These parameters and their
- * valid values are discussed in the description of H5Aiterate2().
+ * \p order and \p n, respectively.
*
* If the attribute name’s size is unknown, the values 0 and NULL
* can be passed in for the parameters \p size and \p name. The
@@ -595,7 +543,7 @@ H5_DLL hid_t H5Aget_space(hid_t attr_id);
/**
* \ingroup H5A
*
- * \brief Returns the amount of storage required for an attribute
+ * \brief Returns the amount of storage used to store an attribute
*
* \attr_id
*
@@ -613,17 +561,16 @@ H5_DLL hsize_t H5Aget_storage_size(hid_t attr_id);
/**
* \ingroup H5A
*
- * \brief Gets an attribute datatype
+ * \brief Gets an attribute's datatype
*
* \attr_id
*
* \return \hid_t{datatype}
*
- * \details H5Aget_type() retrieves a copy of the datatype for an attribute.
+ * \details H5Aget_type() retrieves a copy of the attribute's datatype.
* The datatype is reopened if it is a named type before returning
* it to the application. The datatypes returned by this function
- * are always read-only. If an error occurs when atomizing the
- * return datatype, then the datatype is closed.
+ * are always read-only.
*
* The datatype identifier returned from this function must be
* released with H5Tclose() or resource leaks will develop.
@@ -636,7 +583,7 @@ H5_DLL hid_t H5Aget_type(hid_t attr_id);
/**
* \ingroup H5A
*
- * \brief Calls user-defined function for each attribute on an object
+ * \brief Calls a user-defined function for each attribute on an object
*
* \fgdt_loc_id
* \param[in] idx_type Type of index
@@ -663,24 +610,13 @@ H5_DLL hid_t H5Aget_type(hid_t attr_id);
* are specified by three parameters: the index type,
* \p idx_type; the order in which the index is to be traversed,
* \p order; and the attribute’s position in the index, \p idx.
- *
- * The type of index specified by \p idx_type can be one of the
- * following:
- *
- * \indexes
- *
- * The order in which the index is to be traversed, as specified
- * by \p order, can be one of the following:
- *
- * \orders
- *
* The next attribute to be operated on is specified by \p idx,
* a position in the index.
*
* For example, if \p idx_type, \p order, and \p idx are set to
* #H5_INDEX_NAME, #H5_ITER_INC, and 5, respectively, the attribute
* in question is the fifth attribute from the beginning of the
- * alpha-numeric index of attribute names. If \p order were set to
+ * alphanumeric index of attribute names. If \p order were set to
* #H5_ITER_DEC, it would be the fifth attribute from the end of
* the index.
*
@@ -690,11 +626,6 @@ H5_DLL hid_t H5Aget_type(hid_t attr_id);
* the value returned identifies the parameter to be operated on
* in the next step of the iteration.
*
- * \p op is a user-defined function whose prototype is defined
- * as follows:
- * \snippet this H5A_operator2_t_snip
- * \click4more
- *
* \note This function is also available through the H5Aiterate() macro.
*
* \since 1.8.0
@@ -730,31 +661,17 @@ H5_DLL herr_t H5Aiterate2(hid_t loc_id, H5_index_t idx_type, H5_iter_order_t ord
* additional information as defined below, is passed to a
* user-defined function, \p op, which operates on that attribute.
*
- * If \p loc_id fully specifies the object to which these
- * attributes are attached, \p obj_name should be '.' (a dot).
- *
* The order of the iteration and the attributes iterated over
* are specified by three parameters: the index type, \p idx_type;
* the order in which the index is to be traversed, \p order;
* and the attribute’s position in the index, \p idx.
- *
- * The type of index specified by \p idx_type can be one of the
- * following:
- *
- * \indexes
- *
- * The order in which the index is to be traversed, as specified
- * by \p order, can be one of the following:
- *
- * \orders
- *
* The next attribute to be operated on is specified by \p idx,
* a position in the index.
*
* For example, if \p idx_type, \p order, and \p idx are set to
* #H5_INDEX_NAME, #H5_ITER_INC, and 5, respectively, the attribute
* in question is the fifth attribute from the beginning of the
- * alpha-numeric index of attribute names. If \p order were set to
+ * alphanumeric index of attribute names. If \p order were set to
* #H5_ITER_DEC, it would be the fifth attribute from the end of
* the index.
*
@@ -764,25 +681,6 @@ H5_DLL herr_t H5Aiterate2(hid_t loc_id, H5_index_t idx_type, H5_iter_order_t ord
* the value returned identifies the parameter to be operated on in
* the next step of the iteration.
*
- * \p op is a user-defined function whose prototype is defined
- * as follows:
- * \snippet this H5A_operator2_t_snip
- * \click4more
- *
- * Valid return values from an operator and the resulting
- * H5Aiterate_by_name() and \p op behavior are as follows:
- *
- * \li Zero causes the iterator to continue, returning zero when
- * all attributes have been processed.
- * \li A positive value causes the iterator to immediately return
- * that positive value, indicating short-circuit success.
- * The iterator can be restarted at the next attribute, as
- * indicated by the return value of \p idx.
- * \li A negative value causes the iterator to immediately return
- * that value, indicating failure. The iterator can be
- * restarted at the next attribute, as indicated by the return
- * value of \p idx.
- *
* The link access property list, \p lapl_id, may provide
* information regarding the properties of links required to access
* the object, \p obj_name.
@@ -809,8 +707,7 @@ H5_DLL herr_t H5Aiterate_by_name(hid_t loc_id, const char *obj_name, H5_index_t
* \details H5Aopen() opens an existing attribute, \p attr_name, that is
* attached to object specified by an object identifier, \p obj_id.
*
- * The attribute access property list, \p aapl_id, is currently unused
- * and should be #H5P_DEFAULT.
+ * \plist_unused{aapl_id}
*
* This function, H5Aopen_by_idx() or H5Aopen_by_name() must be called
* before the attribute can be accessed for any further purpose,
@@ -819,6 +716,9 @@ H5_DLL herr_t H5Aiterate_by_name(hid_t loc_id, const char *obj_name, H5_index_t
* The attribute identifier returned by this function must be released
* with H5Aclose() or resource leaks will develop.
*
+ * \par Example
+ * \snippet H5A_examples.c read
+ *
* \since 1.8.0
*
* \see H5Aclose(), H5Acreate()
@@ -843,17 +743,13 @@ H5_DLL hid_t H5Aopen(hid_t obj_id, const char *attr_name, hid_t aapl_id);
*
* \details H5Aopen_by_idx() opens an existing attribute that is attached
* to an object specified by location and name, \p loc_id and
- * \p obj_name, respectively. If \p loc_id fully specifies the
- * object to which the attribute is attached, \p obj_name, should
- * be '.' (a dot).
+ * \p obj_name, respectively.
*
* The attribute is identified by an index type, an index traversal
* order, and a position in the index, \p idx_type, \p order and
- * \p n, respectively. These parameters and their valid values are
- * discussed in the description of H5Aiterate2().
+ * \p n, respectively.
*
- * The attribute access property list, \p aapl_id, is currently
- * unused and should currently be #H5P_DEFAULT.
+ * \plist_unused{aapl_id}
*
* The link access property list, \p lapl_id, may provide
* information regarding the properties of links required to access
@@ -892,11 +788,9 @@ H5_DLL hid_t H5Aopen_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_t
*
* \p loc_id specifies a location from which the target object can
* be located and \p obj_name is an object name relative to
- * \p loc_id. If \p loc_id fully specifies the object to which the
- * attribute is attached, \p obj_name should be '.' (a dot).
+ * \p loc_id.
*
- * The attribute access property list, \p aapl_id, is currently
- * unused and should currently be #H5P_DEFAULT.
+ * \plist_unused{aapl_id}
*
* The link access property list, \p lapl_id, may provide
* information regarding the properties of links required to access
@@ -933,6 +827,9 @@ H5_DLL hid_t H5Aopen_by_name(hid_t loc_id, const char *obj_name, const char *att
* Datatype conversion takes place at the time of a read or write and
* is automatic.
*
+ * \par Example
+ * \snippet H5A_examples.c read
+ *
* \version 1.8.8 Fortran updated to Fortran2003.
* \version 1.4.2 The \p dims parameter was added to the Fortran API in this
* release.
@@ -980,15 +877,12 @@ H5_DLL herr_t H5Arename(hid_t loc_id, const char *old_name, const char *new_name
* attribute's in-memory datatype is specified with \p type_id.
* The entire attribute is written from \p buf to the file.
*
- * If \p type_id is either a fixed-length or variable-length string,
- * it is important to set the string length when defining the datatype.
- * String datatypes are derived from #H5T_C_S1 (or #H5T_FORTRAN_S1 for
- * Fortran codes), which defaults to 1 character in size.
- * See H5Tset_size() and Creating variable-length string datatypes.
- *
* Datatype conversion takes place at the time of a read or write and
* is automatic.
*
+ * \par Example
+ * \snippet H5A_examples.c update
+ *
* \version 1.8.8 Fortran updated to Fortran2003.
* \version 1.4.2 Fortran \p dims parameter added in this release
* \since 1.0.0
@@ -1070,9 +964,9 @@ typedef herr_t (*H5A_operator1_t)(hid_t location_id /*in*/, const char *attr_nam
*
* \return \hid_tv{attribute}
*
- * \note The \p acpl parameters is currently not used; specify #H5P_DEFAULT.
+ * \deprecation_note{H5Acreate2()}
*
- * \deprecated Deprecated in favor of H5Acreate2()
+ * \plist_unused{acpl}
*
* \details H5Acreate1() creates an attribute, \p name, which is attached
* to the object specified by the identifier \p loc_id.
@@ -1080,18 +974,7 @@ typedef herr_t (*H5A_operator1_t)(hid_t location_id /*in*/, const char *attr_nam
* The attribute name, \p name, must be unique for the object.
*
* The attribute is created with the specified datatype and dataspace,
- * \p type_id and \p space_id, which are created with the H5T and
- * H5S interfaces, respectively.
- *
- * If \p type_id is either a fixed-length or variable-length string,
- * it is important to set the string length when defining the
- * datatype. String datatypes are derived from #H5T_C_S1 (or
- * #H5T_FORTRAN_S1 for Fortran), which defaults to 1 character in
- * size. See H5Tset_size() and Creating variable-length string
- * datatypes.
- *
- * The attribute identifier returned by this function must be released
- * with H5Aclose() resource leaks will develop.
+ * \p type_id and \p space_id.
*
* \since 1.8.0
*
@@ -1113,8 +996,7 @@ H5_DLL hid_t H5Acreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t spa
* \return Returns the number of attributes if successful; otherwise returns
* a negative value.
*
- * \deprecated This function is deprecated in favor of the functions
- * H5Oget_info(), H5Oget_info_by_name(), and H5Oget_info_by_idx().
+ * \deprecation_note{H5Oget_info(), H5Oget_info_by_name(), and H5Oget_info_by_idx()}
*
* \details H5Aget_num_attrs() returns the number of attributes attached to
* the object specified by its identifier, \p loc_id.
@@ -1137,8 +1019,7 @@ H5_DLL int H5Aget_num_attrs(hid_t loc_id);
*
* \return \herr_t
*
- * \deprecated This function is deprecated in favor of the function
- * H5Aiterate2().
+ * \deprecation_note{H5Aiterate2()}
*
* \details H5Aiterate1() iterates over the attributes of the object
* specified by its identifier, \p loc_id. The object can be a
@@ -1150,10 +1031,6 @@ H5_DLL int H5Aget_num_attrs(hid_t loc_id);
* \p op, is returned in \p idx. If \p idx is the null pointer,
* then all attributes are processed.
*
- * \p op is a user-defined function whose prototype is defined as follows:
- * \snippet this H5A_operator1_t_snip
- * \click4more
- *
* \version 1.8.0 The function \p H5Aiterate was renamed to H5Aiterate1()
* and deprecated in this release.
* \since 1.0.0
@@ -1171,8 +1048,7 @@ H5_DLL herr_t H5Aiterate1(hid_t loc_id, unsigned *idx, H5A_operator1_t op, void
*
* \return \hid_tv{attribute}
*
- * \deprecated This function is deprecated in favor of the function
- * H5Aopen_by_idx().
+ * \deprecation_note{H5Aopen_by_idx()}
*
* \details H5Aopen_idx() opens an attribute which is attached to the
* object specified with \p loc_id . The location object may be
@@ -1198,8 +1074,7 @@ H5_DLL hid_t H5Aopen_idx(hid_t loc_id, unsigned idx);
*
* \return \hid_tv{attribute}
*
- * \deprecated This function is deprecated in favor of the function
- * H5Aopen_by_name().
+ * \deprecation_note{H5Aopen_by_name()}
*
* \details H5Aopen_name() opens an attribute specified by its name,
* \p name, which is attached to the object specified with
diff --git a/src/H5B2private.h b/src/H5B2private.h
index de823e4..1a7d0c8 100644
--- a/src/H5B2private.h
+++ b/src/H5B2private.h
@@ -29,7 +29,7 @@
#include "H5B2public.h"
/* Private headers needed by this file */
-#include "H5Fprivate.h" /* File access */
+#include "H5Fprivate.h" /* File access */
/**************************/
/* Library Private Macros */
diff --git a/src/H5Cpkg.h b/src/H5Cpkg.h
index 69ac9b1..ac1d018 100644
--- a/src/H5Cpkg.h
+++ b/src/H5Cpkg.h
@@ -1030,11 +1030,11 @@ struct H5C_t
*
* from the H5C__DLL_PRE_REMOVE_SC macro. With the addition of the
* epoch markers used in the age out based cache size reduction algorithm,
- * this invarient need not hold, as the epoch markers are of size 0.
+ * this invariant need not hold, as the epoch markers are of size 0.
*
* One could argue that I should have given the epoch markers a positive
* size, but this would break the index_size = LRU_list_size + pl_size
- * + pel_size invarient.
+ * + pel_size invariant.
*
* Alternatively, I could pass the current decr_mode in to the macro,
* and just skip the check whenever epoch markers may be in use.
@@ -1419,23 +1419,6 @@ if ( ( (entry_ptr) == NULL ) || \
* H5C__UPDATE_CACHE_HIT_RATE_STATS(), which is always active as
* the cache hit rate stats are always collected and available.
*
- * Changes:
- *
- * JRM -- 3/21/06
- * Added / updated macros for pinned entry related stats.
- *
- * JRM -- 8/9/06
- * More pinned entry stats related updates.
- *
- * JRM -- 3/31/07
- * Updated H5C__UPDATE_STATS_FOR_PROTECT() to keep stats on
- * read and write protects.
- *
- * MAM -- 1/15/09
- * Created H5C__UPDATE_MAX_INDEX_SIZE_STATS to contain
- * common code within macros that update the maximum
- * index, clean_index, and dirty_index statistics fields.
- *
***********************************************************************/
#define H5C__UPDATE_CACHE_HIT_RATE_STATS(cache_ptr, hit) \
@@ -2218,8 +2201,8 @@ if ( (cache_ptr)->index_size != \
* Function: H5C__REMOVE_ENTRY_FROM_SLIST
*
* Purpose: Remove the specified instance of H5C_cache_entry_t from the
- * index skip list in the specified instance of H5C_t. Update
- * the associated length and size fields.
+ * index skip list in the specified instance of H5C_t. Update
+ * the associated length and size fields.
*
* Return: N/A
*
@@ -2227,20 +2210,20 @@ if ( (cache_ptr)->index_size != \
*
* Modifications:
*
- * JRM -- 7/21/04
- * Updated function for the addition of the hash table.
+ * JRM -- 7/21/04
+ * Updated function for the addition of the hash table.
*
- * JRM - 7/27/04
- * Converted from the function H5C_remove_entry_from_tree()
- * to the macro H5C__REMOVE_ENTRY_FROM_TREE in the hopes of
- * wringing a little more performance out of the cache.
+ * JRM - 7/27/04
+ * Converted from the function H5C_remove_entry_from_tree()
+ * to the macro H5C__REMOVE_ENTRY_FROM_TREE in the hopes of
+ * wringing a little more performance out of the cache.
*
- * QAK -- 11/27/04
- * Switched over to using skip list routines.
+ * QAK -- 11/27/04
+ * Switched over to using skip list routines.
*
- * JRM -- 3/28/07
- * Updated sanity checks for the new is_read_only and
- * ro_ref_count fields in H5C_cache_entry_t.
+ * JRM -- 3/28/07
+ * Updated sanity checks for the new is_read_only and
+ * ro_ref_count fields in H5C_cache_entry_t.
*
*-------------------------------------------------------------------------
*/
@@ -2276,7 +2259,7 @@ if ( (cache_ptr)->index_size != \
* Function: H5C__UPDATE_SLIST_FOR_SIZE_CHANGE
*
* Purpose: Update cache_ptr->slist_size for a change in the size of
- * and entry in the slist.
+ * and entry in the slist.
*
* Return: N/A
*
@@ -2284,15 +2267,15 @@ if ( (cache_ptr)->index_size != \
*
* Modifications:
*
- * JRM -- 8/27/06
- * Added the H5C_DO_SANITY_CHECKS version of the macro.
+ * JRM -- 8/27/06
+ * Added the H5C_DO_SANITY_CHECKS version of the macro.
*
- * This version maintains the slist_size_increase field
- * that are used in sanity checks in the flush routines.
+ * This version maintains the slist_size_increase field
+ * that are used in sanity checks in the flush routines.
*
- * All this is needed as the fractal heap needs to be
- * able to dirty, resize and/or move entries during the
- * flush.
+ * All this is needed as the fractal heap needs to be
+ * able to dirty, resize and/or move entries during the
+ * flush.
*
*-------------------------------------------------------------------------
*/
@@ -2405,16 +2388,16 @@ if ( (cache_ptr)->index_size != \
/* modified LRU specific code */ \
\
/* remove the entry from the LRU list, and re-insert it at the head.\
- */ \
+ */ \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* Use the dirty flag to infer whether the entry is on the clean or \
@@ -2468,16 +2451,16 @@ if ( (cache_ptr)->index_size != \
/* modified LRU specific code */ \
\
/* remove the entry from the LRU list, and re-insert it at the head \
- */ \
+ */ \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* End modified LRU specific code. */ \
@@ -2660,28 +2643,28 @@ if ( (cache_ptr)->index_size != \
/* modified LRU specific code */ \
\
/* remove the entry from the LRU list, and re-insert it at the \
- * head. \
- */ \
+ * head. \
+ */ \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* since the entry is being flushed or cleared, one would think \
- * that it must be dirty -- but that need not be the case. Use the \
- * dirty flag to infer whether the entry is on the clean or dirty \
- * LRU list, and remove it. Then insert it at the head of the \
- * clean LRU list. \
+ * that it must be dirty -- but that need not be the case. Use the \
+ * dirty flag to infer whether the entry is on the clean or dirty \
+ * LRU list, and remove it. Then insert it at the head of the \
+ * clean LRU list. \
* \
* The function presumes that a dirty entry will be either cleared \
- * or flushed shortly, so it is OK if we put a dirty entry on the \
- * clean LRU list. \
+ * or flushed shortly, so it is OK if we put a dirty entry on the \
+ * clean LRU list. \
*/ \
\
if ( (entry_ptr)->is_dirty ) { \
@@ -2722,17 +2705,17 @@ if ( (cache_ptr)->index_size != \
/* modified LRU specific code */ \
\
/* remove the entry from the LRU list, and re-insert it at the \
- * head. \
- */ \
+ * head. \
+ */ \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* End modified LRU specific code. */ \
@@ -2816,7 +2799,7 @@ if ( (cache_ptr)->index_size != \
\
H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* insert the entry at the head of the clean or dirty LRU list as \
@@ -2857,7 +2840,7 @@ if ( (cache_ptr)->index_size != \
(cache_ptr)->pel_tail_ptr, \
(cache_ptr)->pel_len, \
(cache_ptr)->pel_size, (fail_val)) \
- \
+ \
} else { \
\
/* modified LRU specific code */ \
@@ -2866,7 +2849,7 @@ if ( (cache_ptr)->index_size != \
\
H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* End modified LRU specific code. */ \
@@ -2935,12 +2918,12 @@ if ( (cache_ptr)->index_size != \
HDassert( !((entry_ptr)->is_read_only) ); \
HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
HDassert( (entry_ptr)->size > 0 ); \
- \
+ \
if ( (entry_ptr)->is_pinned ) { \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \
- (cache_ptr)->pel_tail_ptr, \
- (cache_ptr)->pel_len, \
+ (cache_ptr)->pel_tail_ptr, \
+ (cache_ptr)->pel_len, \
(cache_ptr)->pel_size, (fail_val)) \
HDassert( (cache_ptr)->pel_len >= 0 ); \
\
@@ -2952,7 +2935,7 @@ if ( (cache_ptr)->index_size != \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* Similarly, remove the entry from the clean or dirty LRU list \
@@ -2998,12 +2981,12 @@ if ( (cache_ptr)->index_size != \
HDassert( !((entry_ptr)->is_read_only) ); \
HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
HDassert( (entry_ptr)->size > 0 ); \
- \
+ \
if ( (entry_ptr)->is_pinned ) { \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \
- (cache_ptr)->pel_tail_ptr, \
- (cache_ptr)->pel_len, \
+ (cache_ptr)->pel_tail_ptr, \
+ (cache_ptr)->pel_len, \
(cache_ptr)->pel_size, (fail_val)) \
HDassert( (cache_ptr)->pel_len >= 0 ); \
\
@@ -3015,7 +2998,7 @@ if ( (cache_ptr)->index_size != \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* End modified LRU specific code. */ \
@@ -3066,20 +3049,20 @@ if ( (cache_ptr)->index_size != \
HDassert( (entry_ptr)->size > 0 ); \
\
if ( ! ( (entry_ptr)->is_pinned ) ) { \
- \
+ \
/* modified LRU specific code */ \
\
/* remove the entry from the LRU list, and re-insert it at the head. \
- */ \
+ */ \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* remove the entry from either the clean or dirty LUR list as \
@@ -3088,7 +3071,7 @@ if ( (cache_ptr)->index_size != \
if ( was_dirty ) { \
\
H5C__AUX_DLL_REMOVE((entry_ptr), \
- (cache_ptr)->dLRU_head_ptr, \
+ (cache_ptr)->dLRU_head_ptr, \
(cache_ptr)->dLRU_tail_ptr, \
(cache_ptr)->dLRU_list_len, \
(cache_ptr)->dLRU_list_size, \
@@ -3097,34 +3080,34 @@ if ( (cache_ptr)->index_size != \
} else { \
\
H5C__AUX_DLL_REMOVE((entry_ptr), \
- (cache_ptr)->cLRU_head_ptr, \
+ (cache_ptr)->cLRU_head_ptr, \
(cache_ptr)->cLRU_tail_ptr, \
(cache_ptr)->cLRU_list_len, \
(cache_ptr)->cLRU_list_size, \
- (fail_val)) \
+ (fail_val)) \
} \
\
/* insert the entry at the head of either the clean or dirty \
- * LRU list as appropriate. \
+ * LRU list as appropriate. \
*/ \
\
if ( (entry_ptr)->is_dirty ) { \
\
H5C__AUX_DLL_PREPEND((entry_ptr), \
- (cache_ptr)->dLRU_head_ptr, \
+ (cache_ptr)->dLRU_head_ptr, \
(cache_ptr)->dLRU_tail_ptr, \
(cache_ptr)->dLRU_list_len, \
(cache_ptr)->dLRU_list_size, \
- (fail_val)) \
+ (fail_val)) \
\
} else { \
\
H5C__AUX_DLL_PREPEND((entry_ptr), \
- (cache_ptr)->cLRU_head_ptr, \
+ (cache_ptr)->cLRU_head_ptr, \
(cache_ptr)->cLRU_tail_ptr, \
(cache_ptr)->cLRU_list_len, \
(cache_ptr)->cLRU_list_size, \
- (fail_val)) \
+ (fail_val)) \
} \
\
/* End modified LRU specific code. */ \
@@ -3144,20 +3127,20 @@ if ( (cache_ptr)->index_size != \
HDassert( (entry_ptr)->size > 0 ); \
\
if ( ! ( (entry_ptr)->is_pinned ) ) { \
- \
+ \
/* modified LRU specific code */ \
\
/* remove the entry from the LRU list, and re-insert it at the head. \
- */ \
+ */ \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* End modified LRU specific code. */ \
@@ -3211,43 +3194,43 @@ if ( (cache_ptr)->index_size != \
HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
HDassert( (entry_ptr)->size > 0 ); \
HDassert( new_size > 0 ); \
- \
+ \
if ( (entry_ptr)->is_pinned ) { \
\
- H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \
- (cache_ptr)->pel_size, \
- (entry_ptr)->size, \
- (new_size)); \
- \
+ H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \
+ (cache_ptr)->pel_size, \
+ (entry_ptr)->size, \
+ (new_size)); \
+ \
} else { \
\
/* modified LRU specific code */ \
\
- /* Update the size of the LRU list */ \
+ /* Update the size of the LRU list */ \
\
- H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \
- (cache_ptr)->LRU_list_size, \
- (entry_ptr)->size, \
- (new_size)); \
+ H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_size, \
+ (entry_ptr)->size, \
+ (new_size)); \
\
/* Similarly, update the size of the clean or dirty LRU list as \
- * appropriate. At present, the entry must be clean, but that \
- * could change. \
+ * appropriate. At present, the entry must be clean, but that \
+ * could change. \
*/ \
\
if ( (entry_ptr)->is_dirty ) { \
\
- H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->dLRU_list_len, \
- (cache_ptr)->dLRU_list_size, \
- (entry_ptr)->size, \
- (new_size)); \
+ H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->dLRU_list_len, \
+ (cache_ptr)->dLRU_list_size, \
+ (entry_ptr)->size, \
+ (new_size)); \
\
} else { \
\
- H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->cLRU_list_len, \
- (cache_ptr)->cLRU_list_size, \
- (entry_ptr)->size, \
- (new_size)); \
+ H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->cLRU_list_len, \
+ (cache_ptr)->cLRU_list_size, \
+ (entry_ptr)->size, \
+ (new_size)); \
} \
\
/* End modified LRU specific code. */ \
@@ -3270,21 +3253,21 @@ if ( (cache_ptr)->index_size != \
\
if ( (entry_ptr)->is_pinned ) { \
\
- H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \
- (cache_ptr)->pel_size, \
- (entry_ptr)->size, \
- (new_size)); \
+ H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \
+ (cache_ptr)->pel_size, \
+ (entry_ptr)->size, \
+ (new_size)); \
\
} else { \
\
/* modified LRU specific code */ \
\
- /* Update the size of the LRU list */ \
+ /* Update the size of the LRU list */ \
\
- H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \
- (cache_ptr)->LRU_list_size, \
- (entry_ptr)->size, \
- (new_size)); \
+ H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_size, \
+ (entry_ptr)->size, \
+ (new_size)); \
\
/* End modified LRU specific code. */ \
} \
@@ -3344,39 +3327,39 @@ if ( (cache_ptr)->index_size != \
(cache_ptr)->pel_size, (fail_val)) \
HDassert( (cache_ptr)->pel_len >= 0 ); \
\
- /* modified LRU specific code */ \
+ /* modified LRU specific code */ \
\
- /* insert the entry at the head of the LRU list. */ \
+ /* insert the entry at the head of the LRU list. */ \
\
- H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
- (cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
- (cache_ptr)->LRU_list_size, (fail_val)) \
+ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
+ (cache_ptr)->LRU_tail_ptr, \
+ (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_size, (fail_val)) \
\
- /* Similarly, insert the entry at the head of either the clean \
- * or dirty LRU list as appropriate. \
- */ \
+ /* Similarly, insert the entry at the head of either the clean \
+ * or dirty LRU list as appropriate. \
+ */ \
\
- if ( (entry_ptr)->is_dirty ) { \
+ if ( (entry_ptr)->is_dirty ) { \
\
- H5C__AUX_DLL_PREPEND((entry_ptr), \
- (cache_ptr)->dLRU_head_ptr, \
- (cache_ptr)->dLRU_tail_ptr, \
- (cache_ptr)->dLRU_list_len, \
- (cache_ptr)->dLRU_list_size, \
- (fail_val)) \
+ H5C__AUX_DLL_PREPEND((entry_ptr), \
+ (cache_ptr)->dLRU_head_ptr, \
+ (cache_ptr)->dLRU_tail_ptr, \
+ (cache_ptr)->dLRU_list_len, \
+ (cache_ptr)->dLRU_list_size, \
+ (fail_val)) \
\
- } else { \
+ } else { \
\
- H5C__AUX_DLL_PREPEND((entry_ptr), \
- (cache_ptr)->cLRU_head_ptr, \
- (cache_ptr)->cLRU_tail_ptr, \
- (cache_ptr)->cLRU_list_len, \
- (cache_ptr)->cLRU_list_size, \
- (fail_val)) \
- } \
+ H5C__AUX_DLL_PREPEND((entry_ptr), \
+ (cache_ptr)->cLRU_head_ptr, \
+ (cache_ptr)->cLRU_tail_ptr, \
+ (cache_ptr)->cLRU_list_len, \
+ (cache_ptr)->cLRU_list_size, \
+ (fail_val)) \
+ } \
\
- /* End modified LRU specific code. */ \
+ /* End modified LRU specific code. */ \
\
} /* H5C__UPDATE_RP_FOR_UNPIN */
diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h
index ce03ba0..d7a1949 100644
--- a/src/H5Cprivate.h
+++ b/src/H5Cprivate.h
@@ -44,7 +44,8 @@
#define H5C_MAX_ENTRY_SIZE ((size_t)(32 * 1024 * 1024))
/* H5C_COLLECT_CACHE_STATS controls overall collection of statistics
- * on cache activity. In general, this #define should be set to 0.
+ * on cache activity. In general, this #define should be set to 1 in
+ * debug mode, and 0 in production mode..
*/
#define H5C_COLLECT_CACHE_STATS 0
diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h
index 31c0bd1..04e02e9 100644
--- a/src/H5Dpkg.h
+++ b/src/H5Dpkg.h
@@ -78,17 +78,17 @@ typedef struct H5D_type_info_t {
hid_t dst_type_id; /* Destination datatype ID */
/* Computed/derived values */
- size_t src_type_size; /* Size of source type */
- size_t dst_type_size; /* Size of destination type*/
+ size_t src_type_size; /* Size of source type */
+ size_t dst_type_size; /* Size of destination type */
size_t max_type_size; /* Size of largest source/destination type */
hbool_t is_conv_noop; /* Whether the type conversion is a NOOP */
hbool_t is_xform_noop; /* Whether the data transform is a NOOP */
const H5T_subset_info_t *cmpd_subset; /* Info related to the compound subset conversion functions */
H5T_bkg_t need_bkg; /* Type of background buf needed */
- size_t request_nelmts; /* Requested strip mine */
- uint8_t * tconv_buf; /* Datatype conv buffer */
+ size_t request_nelmts; /* Requested strip mine */
+ uint8_t * tconv_buf; /* Datatype conv buffer */
hbool_t tconv_buf_allocated; /* Whether the type conversion buffer was allocated */
- uint8_t * bkg_buf; /* Background buffer */
+ uint8_t * bkg_buf; /* Background buffer */
hbool_t bkg_buf_allocated; /* Whether the background buffer was allocated */
} H5D_type_info_t;
@@ -385,7 +385,7 @@ typedef struct H5D_rdcc_t {
struct H5D_rdcc_ent_t * head; /* Head of doubly linked list */
struct H5D_rdcc_ent_t * tail; /* Tail of doubly linked list */
size_t nbytes_used; /* Current cached raw data in bytes */
- int nused; /* Number of chunk slots in use */
+ int nused; /* Number of chunk slots in use */
H5D_chunk_cached_t last; /* Cached copy of last chunk information */
struct H5D_rdcc_ent_t **slot; /* Chunk slots, each points to a chunk*/
H5SL_t * sel_chunks; /* Skip list containing information for each chunk selected */
@@ -404,7 +404,7 @@ typedef struct H5D_rdcdc_t {
/*
* A dataset is made of two layers, an H5D_t struct that is unique to
- * each instance of an opened datset, and a shared struct that is only
+ * each instance of an opened dataset, and a shared struct that is only
* created once for a given dataset. Thus, if a dataset is opened twice,
* there will be two IDs and two H5D_t structs, both sharing one H5D_shared_t.
*/
diff --git a/src/H5Dpublic.h b/src/H5Dpublic.h
index 5170f67..ed4fbc1 100644
--- a/src/H5Dpublic.h
+++ b/src/H5Dpublic.h
@@ -11,6 +11,12 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/*
+ * This file contains public declarations for the H5D module.
+ */
+#ifndef H5Dpublic_H
+#define H5Dpublic_H
+
/**\defgroup H5D H5D
*
* Use the functions in this module to manage HDF5 datasets, including the
@@ -19,14 +25,31 @@
* name or by a handle. Such handles can be obtained by either creating or
* opening the dataset.
*
+ * Typical stages in the HDF5 dataset life cycle are shown below in introductory
+ * examples.
+ *
+ * <table>
+ * <tr><th>Create</th><th>Read</th></tr>
+ * <tr valign="top">
+ * <td>
+ * \snippet{lineno} H5D_examples.c create
+ * </td>
+ * <td>
+ * \snippet{lineno} H5D_examples.c read
+ * </td>
+ * <tr><th>Update</th><th>Delete</th></tr>
+ * <tr valign="top">
+ * <td>
+ * \snippet{lineno} H5D_examples.c update
+ * </td>
+ * <td>
+ * \snippet{lineno} H5D_examples.c delete
+ * </td>
+ * </tr>
+ * </table>
+ *
*/
-/*
- * This file contains public declarations for the H5D module.
- */
-#ifndef H5Dpublic_H
-#define H5Dpublic_H
-
/* System headers needed by this file */
/* Public headers needed by this file */
@@ -62,12 +85,11 @@
* Values for the H5D_LAYOUT property
*/
typedef enum H5D_layout_t {
- H5D_LAYOUT_ERROR = -1,
-
- H5D_COMPACT = 0, /**< raw data is very small */
- H5D_CONTIGUOUS = 1, /**< the default */
- H5D_CHUNKED = 2, /**< slow and fancy */
- H5D_NLAYOUTS = 3 /**< this one must be last! */
+ H5D_LAYOUT_ERROR = -1, /**< error */
+ H5D_COMPACT = 0, /**< raw data is small (< 64KB) */
+ H5D_CONTIGUOUS = 1, /**< contiguous layout */
+ H5D_CHUNKED = 2, /**< chunked or tiled layout */
+ H5D_NLAYOUTS = 3 /**< this one must be last! */
} H5D_layout_t;
//! <!-- [H5D_layout_t_snip] -->
@@ -85,11 +107,11 @@ typedef enum H5D_chunk_index_t {
* Values for the space allocation time property
*/
typedef enum H5D_alloc_time_t {
- H5D_ALLOC_TIME_ERROR = -1,
- H5D_ALLOC_TIME_DEFAULT = 0,
- H5D_ALLOC_TIME_EARLY = 1,
- H5D_ALLOC_TIME_LATE = 2,
- H5D_ALLOC_TIME_INCR = 3
+ H5D_ALLOC_TIME_ERROR = -1, /**< Error */
+ H5D_ALLOC_TIME_DEFAULT = 0, /**< Default (layout dependent) */
+ H5D_ALLOC_TIME_EARLY = 1, /**< Allocate on creation */
+ H5D_ALLOC_TIME_LATE = 2, /**< Allocate on first write */
+ H5D_ALLOC_TIME_INCR = 3 /**< Allocate incrementally (by chunk) */
} H5D_alloc_time_t;
//! <!-- [H5D_alloc_time_t_snip] -->
@@ -98,10 +120,11 @@ typedef enum H5D_alloc_time_t {
* Values for the status of space allocation
*/
typedef enum H5D_space_status_t {
- H5D_SPACE_STATUS_ERROR = -1,
- H5D_SPACE_STATUS_NOT_ALLOCATED = 0,
- H5D_SPACE_STATUS_PART_ALLOCATED = 1,
- H5D_SPACE_STATUS_ALLOCATED = 2
+ H5D_SPACE_STATUS_ERROR = -1, /**< Error */
+ H5D_SPACE_STATUS_NOT_ALLOCATED = 0, /**< Space has not been allocated for this dataset. */
+ H5D_SPACE_STATUS_PART_ALLOCATED = 1, /**< Space has been partially allocated for this dataset.
+ (Used only for datasets with chunked storage.) */
+ H5D_SPACE_STATUS_ALLOCATED = 2 /**< Space has been allocated for this dataset. */
} H5D_space_status_t;
//! <!-- [H5D_space_status_t_snip] -->
@@ -110,10 +133,10 @@ typedef enum H5D_space_status_t {
* Values for time of writing fill value property
*/
typedef enum H5D_fill_time_t {
- H5D_FILL_TIME_ERROR = -1,
- H5D_FILL_TIME_ALLOC = 0,
- H5D_FILL_TIME_NEVER = 1,
- H5D_FILL_TIME_IFSET = 2
+ H5D_FILL_TIME_ERROR = -1, /**< Error */
+ H5D_FILL_TIME_ALLOC = 0, /**< Fill on allocation */
+ H5D_FILL_TIME_NEVER = 1, /**< Never write fill values */
+ H5D_FILL_TIME_IFSET = 2 /**< Fill if fill-value was set */
} H5D_fill_time_t;
//! <!-- [H5D_fill_time_t_snip] -->
@@ -122,10 +145,10 @@ typedef enum H5D_fill_time_t {
* Values for fill value status
*/
typedef enum H5D_fill_value_t {
- H5D_FILL_VALUE_ERROR = -1,
- H5D_FILL_VALUE_UNDEFINED = 0,
- H5D_FILL_VALUE_DEFAULT = 1,
- H5D_FILL_VALUE_USER_DEFINED = 2
+ H5D_FILL_VALUE_ERROR = -1, /**< Error */
+ H5D_FILL_VALUE_UNDEFINED = 0, /**< No fill value defined */
+ H5D_FILL_VALUE_DEFAULT = 1, /**< Default fill-value */
+ H5D_FILL_VALUE_USER_DEFINED = 2 /**< User-defined fill-value */
} H5D_fill_value_t;
//! <!-- [H5D_fill_value_t_snip] -->
@@ -223,7 +246,7 @@ typedef herr_t (*H5D_gather_func_t)(const void *dst_buf, size_t dst_buf_bytes_us
* \brief Creates a new dataset and links it into the file
*
* \fgdta_loc_id
- * \param[in] name Name of the dataset to create
+ * \param[in] name Name of the dataset to create
* \type_id
* \space_id
* \lcpl_id
@@ -248,13 +271,6 @@ typedef herr_t (*H5D_gather_func_t)(const void *dst_buf, size_t dst_buf_bytes_us
* \p name may be either an absolute path in the file or a relative
* path from \p loc_id naming the dataset.
*
- * \p dtype_id specifies the datatype of each data element as stored
- * in the file. If \p dtype_id is either a fixed-length or
- * variable-length string, it is important to set the string length
- * when defining the datatype. String datatypes are derived from
- * #H5T_C_S1 (or #H5T_FORTRAN_S1 for Fortran codes), which defaults
- * to 1 character in size.
- *
* If \p dtype_id is a committed datatype, and if the file location
* associated with the committed datatype is different from the
* file location where the dataset will be created, the datatype
@@ -262,19 +278,19 @@ typedef herr_t (*H5D_gather_func_t)(const void *dst_buf, size_t dst_buf_bytes_us
*
* The link creation property list, \p lcpl_id, governs creation
* of the link(s) by which the new dataset is accessed and the
- * creation of any * intermediate groups that may be missing.
+ * creation of any intermediate groups that may be missing.
*
* The datatype and dataspace properties and the dataset creation
* and access property lists are attached to the dataset, so the
* caller may derive new datatypes, dataspaces, and creation and
* access properties from the old ones and reuse them in calls to
* create additional datasets. Once created, the dataset can be
- * read from or written to. Reading data from a datatset that was
+ * read from or written to. Reading data from a dataset that was
* not previously written, the HDF5 library will return default
* or user-defined fill values.
*
- * To conserve and release resources, the dataset should be closed
- * when access is no longer required.
+ * \par Example
+ * \snippet H5D_examples.c create
*
* \since 1.8.0
*
@@ -313,34 +329,14 @@ H5_DLL hid_t H5Dcreate2(hid_t loc_id, const char *name, hid_t type_id, hid_t spa
* the file, which may differ from the datatype and dataspace
* in application memory.
*
- * Dataset creation property list and dataset access creation
- * property list are specified by \p dcpl_id and \p dapl_id.
- *
* H5Dcreate_anon() returns a new dataset identifier. Using
* this identifier, the new dataset must be linked into the
* HDF5 file structure with H5Olink() or it will be deleted
- * from the file when the file is closed.
- *
- * See H5Dcreate2() for further details and considerations on
- * the use of H5Dcreate2() and H5Dcreate_anon().
- *
- * The differences between this function and H5Dcreate2() are
- * as follows:
- * \li H5Dcreate_anon() explicitly includes a dataset access property
- * list. H5Dcreate() always uses default dataset access properties.
- *
- * \li H5Dcreate_anon() neither provides the new dataset’s name nor
- * links it into the HDF5 file structure; those actions must be
- * performed separately through a call to H5Olink(), which offers
- * greater control over linking.
- *
- * A dataset created with this function should be closed with
- * H5Dclose() when the dataset is no longer needed so that resource
- * leaks will not develop.
+ * when the file is closed.
*
* \since 1.8.0
*
- * \see H5Olink(), H5Dcreate(), Using Identifiers
+ * \see H5Olink(), H5Dcreate()
*
*/
H5_DLL hid_t H5Dcreate_anon(hid_t loc_id, hid_t type_id, hid_t space_id, hid_t dcpl_id, hid_t dapl_id);
@@ -366,12 +362,6 @@ H5_DLL hid_t H5Dcreate_anon(hid_t loc_id, hid_t type_id, hid_t space_id, hid_t d
* specified then the dataset will be opened at the location
* where the attribute, dataset, or named datatype is attached.
*
- * The dataset access property list, \p dapl_id, provides
- * information regarding access to the dataset.
- *
- * To conserve and release resources, the dataset should be closed
- * when access is no longer required.
- *
* \since 1.8.0
*
* \see H5Dcreate2(), H5Dclose()
@@ -397,6 +387,9 @@ H5_DLL hid_t H5Dopen2(hid_t loc_id, const char *name, hid_t dapl_id);
* be released with H5Sclose() when the identifier is no longer
* needed so that resource leaks will not occur.
*
+ * \par Example
+ * \snippet H5D_examples.c update
+ *
* \see H5Sclose()
*
*/
@@ -405,7 +398,19 @@ H5_DLL hid_t H5Dget_space(hid_t dset_id);
/**
* --------------------------------------------------------------------------
* \ingroup H5D
- * \todo Document this function!
+ *
+ * \brief Determines whether space has been allocated for a dataset
+ *
+ * \dset_id
+ * \param[out] allocation Space allocation status
+ *
+ * \return \herr_t
+ *
+ * \details H5Dget_space_status() determines whether space has been allocated
+ * for the dataset \p dset_id.
+ *
+ * \since 1.6.0
+ *
*/
H5_DLL herr_t H5Dget_space_status(hid_t dset_id, H5D_space_status_t *allocation);
@@ -424,27 +429,7 @@ H5_DLL herr_t H5Dget_space_status(hid_t dset_id, H5D_space_status_t *allocation)
*
* If a dataset has a named datatype, then an identifier to the
* opened datatype is returned. Otherwise, the returned datatype
- * is read-only. If atomization of the datatype fails, then the
- * datatype is closed.
- *
- * A datatype identifier returned from this function should be
- * released with H5Tclose() when the identifier is no longer
- * needed to prevent resource leaks.
- *
- * \note Datatype Identifiers
- *
- * Please note that the datatype identifier is actually an object
- * identifier or a handle returned from opening the datatype. It
- * is not persistent and its value can be different from one HDF5
- * session to the next.
- *
- * H5Tequal() can be used to compare datatypes.
- *
- * HDF5 High Level APIs that may also be of interest are:
- *
- * H5LTdtype_to_text() creates a text description of a
- * datatype. H5LTtext_to_dtype() creates an HDF5 datatype
- * given a text description.
+ * is read-only.
*
*/
H5_DLL hid_t H5Dget_type(hid_t dset_id);
@@ -464,9 +449,6 @@ H5_DLL hid_t H5Dget_type(hid_t dset_id);
* a copy of the dataset creation property list associated with
* the dataset specified by \p dset_id.
*
- * The creation property list identifier should be released
- * with H5Pclose() to prevent resource leaks.
- *
*/
H5_DLL hid_t H5Dget_create_plist(hid_t dset_id);
@@ -500,10 +482,6 @@ H5_DLL hid_t H5Dget_create_plist(hid_t dset_id);
* All link access properties in the returned list will be set
* to the default values.
*
- * The access property list identifier should be released with
- * H5Pclose() when the identifier is no longer needed so that
- * resource leaks will not develop.
- *
* \since 1.8.3
*
*/
@@ -522,11 +500,8 @@ H5_DLL hid_t H5Dget_access_plist(hid_t dset_id);
* \details H5Dget_storage_size() returns the amount of storage,
* in bytes, that is allocated in the file for the raw data of
* the dataset specified by \p dset_id.
- *
- * \note The amount of storage in this case is the storage
- * allocated in the written file, which will typically differ
- * from the space required to hold a dataset in working memory.
- *
+ * H5Dget_storage_size() reports only the space required to store
+ * the dataset elements, excluding any metadata.
* \li For contiguous datasets, the returned size equals the current
* allocated size of the raw data.
* \li For unfiltered chunked datasets, the returned size is the
@@ -536,21 +511,19 @@ H5_DLL hid_t H5Dget_access_plist(hid_t dset_id);
* compression filter is in use, H5Dget_storage_size() will return
* the total space required to store the compressed chunks.
*
- * H5Dget_storage_size() reports only the space required to store
- * the data, not including that of any metadata.
+ * \note Note that H5Dget_storage_size() is not generally an
+ * appropriate function to use when determining the amount
+ * of memory required to work with a dataset. In such
+ * circumstances, you must determine the number of data
+ * points in a dataset and the size of an individual dataset
+ * element. H5Sget_simple_extent_npoints() and H5Tget_size()
+ * can be used to calculate that amount.
*
- * \attention H5Dget_storage_size() does not differentiate between 0 (zero),
+ * \warning H5Dget_storage_size() does not differentiate between 0 (zero),
* the value returned for the storage size of a dataset
* with no stored values, and 0 (zero), the value returned to
* indicate an error.
*
- * \note Note that H5Dget_storage_size() is not generally an
- * appropriate function to use when determining the amount
- * of memory required to work with a dataset. In such
- * circumstances, you must determine the number of data
- * points in a dataset and the size of an individual data
- * element. H5Sget_simple_extent_npoints() and H5Tget_size()
- * can be used to get that information.
*
*/
H5_DLL hsize_t H5Dget_storage_size(hid_t dset_id);
@@ -588,7 +561,7 @@ H5_DLL herr_t H5Dget_chunk_storage_size(hid_t dset_id, const hsize_t *offset, hs
*
* \dset_id
*
- * \return Returns the offset in bytes; otherwise, returns \c HADDR_UNDEF,
+ * \return Returns the offset in bytes; otherwise, returns #HADDR_UNDEF,
* a negative value.
*
* \details H5Dget_offset() returns the address in the file of
@@ -637,9 +610,8 @@ H5_DLL haddr_t H5Dget_offset(hid_t dset_id);
* used for the memory dataspace and the selection defined with \p
* file_space_id is used for the selection within that dataspace.
*
- * If raw data storage space has not been allocated for the dataset
- * and a fill value has been defined, the returned buffer \p buf
- * is filled with the fill value.
+ * The number of elements selected in the memory dataspace \Emph{must}
+ * be equal to the number of elements selected in the file dataspace.
*
* The behavior of the library for the various combinations of
* valid dataspace identifiers and #H5S_ALL for the \p mem_space_id
@@ -684,14 +656,12 @@ H5_DLL haddr_t H5Dget_offset(hid_t dset_id);
* </tr>
* </table>
*
- * \details Setting an #H5S_ALL selection indicates that the entire
- * dataspace, as defined by the current dimensions of a dataspace,
- * will be selected. The number of elements selected in the memory
- * dataspace must match the number of elements selected in the
- * file dataspace.
+ * \note If no storage space was allocated for the dataset
+ * and a fill value is defined, the returned buffer \p buf
+ * is filled with the fill value.
*
- * \p dxpl_id can be the constant #H5P_DEFAULT, in which case the
- * default data transfer properties are used.
+ * \par Example
+ * \snippet H5D_examples.c read
*
*/
H5_DLL herr_t H5Dread(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id,
@@ -795,6 +765,8 @@ H5_DLL herr_t H5Dread(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, hid_
* time if the dataset's fill time is set to #H5D_FILL_TIME_IFSET
* or #H5D_FILL_TIME_ALLOC.
*
+ * \par_compr_note
+ *
* \attention If a dataset's storage layout is 'compact', care must be
* taken when writing data to the dataset in parallel. A compact
* dataset's raw data is cached in memory and may be flushed
@@ -802,6 +774,9 @@ H5_DLL herr_t H5Dread(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, hid_
* applications should always attempt to write identical data to
* the dataset from all processes.
*
+ * \par Example
+ * \snippet H5D_examples.c update
+ *
* \see H5Pset_fill_time(), H5Pset_alloc_time()
*
*/
@@ -830,52 +805,9 @@ H5_DLL herr_t H5Dwrite(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, hid
* in the memory buffer \p buf, executing the callback function
* \p op once for each such data element.
*
- * The prototype of the callback function \p op is as follows
- * (as defined in the source code file H5Lpublic.h):
- * \snippet this H5D_operator_t_snip
- * The parameters of this callback function are:
- *
- * <table>
- * <tr><td>\c elem</td>
- * <td><tt>[in,out]</tt></td>
- * <td>Pointer to the memory buffer containing the current
- * data element</td></tr>
- * <tr><td>\c type_id</td>
- * <td><tt>[in]</tt></td>
- * <td>Datatype identifier of the elements stored in elem</td></tr>
- * <tr><td>\c ndim</td>
- * <td><tt>[in]</tt></td>
- * <td>Number of dimensions for the point array</td></tr>
- * <tr><td>\c point</td>
- * <td><tt>[in]</tt></td>
- * <td>Array containing the location of the element within
- * the original dataspace</td></tr>
- * <tr><td>\c operator_data</td>
- * <td><tt>[in,out]</tt></td>
- * <td>Pointer to any user-defined data associated with the
- * operation</td></tr>
- * </table>
- *
- * The possible return values from the callback function, and
- * the effect ofeach,are as follows:
- *
- * \li Zero causes the iterator to continue, returning zero
- * when all data elements have been processed.
- * \li A positive value causes the iterator to immediately
- * return that positive value, indicating short-circuit success.
- * \li A negative value causes the iterator to immediately return
- * that value, indicating failure.
- *
- * The \p operator_data parameter is a user-defined pointer to
- * the data required to process dataset elements in the course
- * of the iteration. If operator needs to pass data back to the
- * application, such data can be returned in this same buffer. This
- * pointer is passed back to each step of the iteration in the
- * operator callback function’s operator_data parameter.
- *
- * Unlike other HDF5 iterators, this iteration operation cannot
- * be restarted at the point of exit; a second H5Diterate()
- * call will always restart at the beginning.
+ * \attention Unlike other HDF5 iterators, this iteration operation cannot
+ * be restarted at the point of exit; a second H5Diterate()
+ * call will always restart at the beginning.
*
*
* \since 1.10.2
@@ -959,30 +891,25 @@ H5_DLL herr_t H5Dvlen_get_buf_size(hid_t dset_id, hid_t type_id, hid_t space_id,
*
* \return \herr_t
*
- * \details H5Dfill() fills the dataspace selection in memory, \p space_id,
+ * \details H5Dfill() fills the dataspace selection, \p space_id, in memory
* with the fill value specified in \p fill. If \p fill is NULL,
* a fill value of 0 (zero) is used.
*
* \p fill_type_id specifies the datatype of the fill value.
- * \p buf specifies the buffer in which the dataspace elements
- * will be written.
- * \p buf_type_id specifies the datatype of those data elements.
+ * \p buf specifies the buffer in which the fill elements
+ * will be written. \p buf_type_id specifies the datatype of
+ * those data elements.
*
* \note Note that if the fill value datatype differs from the memory
- * buffer datatype, the fill value will be converted to the memory
- * buffer datatype before filling the selection.
+ * buffer datatype, the fill value will be converted to the memory
+ * buffer datatype before filling the selection.
*
* \note Applications sometimes write data only to portions of an
- * allocated dataset. It is often useful in such cases to fill
- * the unused space with a known fill value. See the following
- * function for more information:
- * - H5Pset_fill_value()
- * - H5Pget_fill_value()
- * - H5Pfill_value_defined()
- * - H5Pset_fill_time()
- * - H5Pget_fill_time()
- * - H5Pcreate()
- * - H5Pcreate_anon()
+ * allocated dataset. It is often useful in such cases to fill
+ * the unused space with a known fill value.
+ *
+ * \see H5Pset_fill_value(), H5Pget_fill_value(), H5Pfill_value_defined(),
+ * H5Pset_fill_time(), H5Pget_fill_time(), H5Pcreate(), H5Dcreate_anon()
*
*/
H5_DLL herr_t H5Dfill(const void *fill, hid_t fill_type_id, void *buf, hid_t buf_type_id, hid_t space_id);
@@ -1029,22 +956,21 @@ H5_DLL herr_t H5Dfill(const void *fill, hid_t fill_type_id, void *buf, hid_t buf
* - If the dataset’s fill time is set to #H5D_FILL_TIME_ALLOC
* (see H5Pset_alloc_time())
*
- * \note
- * \li If the sizes specified in \p size array are smaller than
- * the dataset’s current dimension sizes, H5Dset_extent() will reduce
- * the dataset’s dimension sizes to the specified values. It is the
- * user application’s responsibility to ensure that valuable data is
- * not lost as H5Dset_extent() does not check.
+ * \note If the sizes specified in \p size array are smaller than the dataset’s
+ * current dimension sizes, H5Dset_extent() will reduce the dataset’s
+ * dimension sizes to the specified values. It is the user application’s
+ * responsibility to ensure that valuable data is not lost as
+ * H5Dset_extent() does not check.
*
- * \li Except for external datasets, H5Dset_extent() is for use with
- * chunked datasets only, not contiguous datasets.
+ * \note Except for external datasets, H5Dset_extent() is for use with
+ * chunked datasets only, not contiguous datasets.
*
- * \li A call to H5Dset_extent() affects the dataspace of a dataset.
- * If a dataspace handle was opened for a dataset prior to a call to
- * H5Dset_extent() then that dataspace handle will no longer reflect
- * the correct dataspace extent of the dataset. H5Dget_space() must
- * be called (after closing the previous handle) to obtain the current
- * dataspace extent.
+ * \note A call to H5Dset_extent() affects the dataspace of a dataset. If a
+ * dataspace handle was opened for a dataset prior to a call to
+ * H5Dset_extent() then that dataspace handle will no longer reflect the
+ * correct dataspace extent of the dataset. H5Dget_space() must be called
+ * (after closing the previous handle) to obtain the current dataspace
+ * extent.
*
* \since 1.8.0
*
@@ -1082,40 +1008,7 @@ H5_DLL herr_t H5Dset_extent(hid_t dset_id, const hsize_t size[]);
*
* To retrieve the data to be scattered, H5Dscatter() repeatedly
* calls \p op, which should return a valid source buffer, until
- * enough data to fill the selection has been retrieved. The
- * prototype of the callback function \p op is as follows (as
- * defined in the source code file H5Dpublic.h):
- * \snippet this H5D_scatter_func_t_snip
- * The parameters of this callback function are described below:
- *
- * <table>
- * <tr><td>\c src_buf</td>
- * <td><tt>[out]</tt></td>
- * <td>Pointer to the buffer holding the next set of elements to
- * scatter. On entry, the value of where \c src_buf points to
- * is undefined. The callback function should set \c src_buf
- * to point to the next set of elements.</td></tr>
- * <tr><td>\c src_buf_bytes_used</td>
- * <td><tt>[out]</tt></td>
- * <td>Pointer to the number of valid bytes in \c src_buf. On
- * entry, the value where \c src_buf_bytes_used points to is
- * undefined. The callback function should set
- * \c src_buf_bytes_used to the of valid bytes in \c src_buf.
- * This number must be a multiple of the datatype size.
- * </td></tr>
- * <tr><td>\c op_data</td>
- * <td><tt>[in,out]</tt></td>
- * <td>User-defined pointer to data required by the callback
- * function. A pass-through of the \c op_data pointer provided
- * with the H5Dscatter() function call.</td></tr>
- * </table>
- *
- * The callback function should always return at least one
- * element in \p src_buf, and must not return more elements
- * than are remaining to be scattered. This function will be
- * repeatedly called until all elements to be scattered have
- * been returned. The callback function should return zero (0)
- * to indicate success, and a negative value to indicate failure.
+ * enough data to fill the selection has been retrieved.
*
* \since 1.10.2
*
@@ -1167,27 +1060,9 @@ H5_DLL herr_t H5Dscatter(H5D_scatter_func_t op, void *op_data, hid_t type_id, hi
* If no callback function is provided, H5Dgather() simply gathers
* the data into \p dst_buf and returns. If a callback function is
* provided, H5Dgather() repeatedly gathers up to \p dst_buf_size
- * bytes to process the serialized data. The prototype of the
- * callback function \p op is as follows (as defined in the source
- * code file H5Dpublic.h):
- * \snippet this H5D_gather_func_t_snip
- * The parameters of this callback function are described in the
- * table below.
- * <table>
- * <tr><td>\c dst_buf</td>
- * <td>Pointer to the destination buffer which has been filled
- * with the next set of elements gathered. This will always be
- * identical to the \p dst_buf passed to H5Dgather().</td></tr>
- * <tr><td>\c dst_buf_bytes_used</td>
- * <td>Pointer to the number of valid bytes in \p dst_buf.
- * This number must be a multiple of the datatype
- * size.</td></tr>
- * <tr><td>\c op_data</td>
- * <td>User-defined pointer to data required by the callback
- * function; a pass-through of the \p op_data pointer
- * provided with the H5Dgather() function call.</td></tr>
- * </table>
- * The callback function should process, store, or otherwise,
+ * bytes to process the serialized data.
+ *
+ * The callback function \p op should process, store, or otherwise,
* make use of the data returned in \p dst_buf before it returns,
* because the buffer will be overwritten unless it is the last
* call to the callback. This function will be repeatedly called
@@ -1211,11 +1086,11 @@ H5_DLL herr_t H5Dgather(hid_t src_space_id, const void *src_buf, hid_t type_id,
*
* \return \herr_t
*
- * \details H5Dclose() ends access to a dataset specified by \p dset_id
- * and releases resources used by it.
+ * \details H5Dclose() terminates access to a dataset via the identifier
+ * \p dset_id and releases the underlying resources.
*
- * \attention Further use of a released dataset identifier is illegal; a
- * function using such an identifier will generate an error.
+ * \par Example
+ * \snippet H5D_examples.c read
*
* \since 1.8.0
*
@@ -1252,8 +1127,7 @@ H5_DLL herr_t H5Ddebug(hid_t dset_id);
*
* \return \hid_t{dataset}
*
- * \deprecated This function is deprecated in favor of the function H5Dcreate2()
- * or the macro H5Dcreate().
+ * \deprecation_note{H5Dcreate2() or the macro H5Dcreate()}
*
* \details H5Dcreate1() creates a data set with a name, \p name, in the
* location specified by the identifier \p loc_id. \p loc_id may be a
@@ -1319,8 +1193,7 @@ H5_DLL hid_t H5Dcreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t spa
*
* \return \hid_t{dataset}
*
- * \deprecated This function is deprecated in favor of the function H5Dopen2()
- * or the macro H5Dopen().
+ * \deprecation_note{H5Dopen2() or the macro H5Dopen()}
*
* \details H5Dopen1() opens an existing dataset for access at the location
* specified by \p loc_id. \p loc_id may be a file, group, dataset,
@@ -1350,10 +1223,10 @@ H5_DLL hid_t H5Dopen1(hid_t loc_id, const char *name);
*
* \return \herr_t
*
- * \deprecated This function is deprecated in favor of the function H5Dset_extent().
+ * \deprecation_note{H5Dset_extent()}
*
* \details H5Dextend() verifies that the dataset is at least of size \p size,
- * extending it if necessary. The dimensionality of size is the same as
+ * extending it if necessary. The length of \p size is the same as
* that of the dataspace of the dataset being changed.
*
* This function can be applied to the following datasets:
@@ -1373,7 +1246,7 @@ H5_DLL hid_t H5Dopen1(hid_t loc_id, const char *name);
* the sizes specified in size. The function H5Dset_extent() must be
* used if the dataset dimension sizes are are to be reduced.
*
- * \version 1.8.0 Function Function deprecated in this release. Parameter size
+ * \version 1.8.0 Function deprecated in this release. Parameter size
* syntax changed to \Code{const hsize_t size[]} in this release.
*
*/
diff --git a/src/H5Epublic.h b/src/H5Epublic.h
index f95261a..9ec9d32 100644
--- a/src/H5Epublic.h
+++ b/src/H5Epublic.h
@@ -16,6 +16,26 @@
* Use the functions in this module to manage HDF5 error stacks and error
* messages.
*
+ * <table>
+ * <tr><th>Create</th><th>Read</th></tr>
+ * <tr valign="top">
+ * <td>
+ * \snippet{lineno} H5E_examples.c create
+ * </td>
+ * <td>
+ * \snippet{lineno} H5E_examples.c read
+ * </td>
+ * <tr><th>Update</th><th>Delete</th></tr>
+ * <tr valign="top">
+ * <td>
+ * \snippet{lineno} H5E_examples.c update
+ * </td>
+ * <td>
+ * \snippet{lineno} H5E_examples.c delete
+ * </td>
+ * </tr>
+ * </table>
+ *
* \internal The \c FUNC_ENTER macro clears the error stack whenever an
* interface function is entered. When an error is detected, an entry
* is pushed onto the stack. As the functions unwind, additional
@@ -68,9 +88,9 @@ typedef struct H5E_error2_t {
hid_t cls_id;
/**< Class ID */
hid_t maj_num;
- /**< Major error ID */
+ /**< Major error ID */
hid_t min_num;
- /**< Minor error number */
+ /**< Minor error number */
unsigned line;
/**< Line in file where error occurs */
const char *func_name;
@@ -726,12 +746,13 @@ typedef herr_t (*H5E_auto1_t)(void *client_data);
*
* \return \herr_t
*
+ * \deprecated 1.8.0 Function H5Eclear() renamed to H5Eclear1() and deprecated
+ * in this release.
+ *
* \details H5Eclear1() clears the error stack for the current thread.\n
* The stack is also cleared whenever an API function is called, with
* certain exceptions (for instance, H5Eprint1()).
*
- * \deprecated 1.8.0 Function H5Eclear() renamed to H5Eclear1() and deprecated
- * in this release.
*/
H5_DLL herr_t H5Eclear1(void);
/**
@@ -747,6 +768,9 @@ H5_DLL herr_t H5Eclear1(void);
* function
* \return \herr_t
*
+ * \deprecated 1.8.0 Function H5Eget_auto() renamed to H5Eget_auto1() and
+ * deprecated in this release.
+ *
* \details H5Eget_auto1() returns the current settings for the automatic error
* stack traversal function, \p func, and its data,
* \p client_data. Either or both arguments may be \c NULL, in which case the
@@ -773,8 +797,6 @@ H5_DLL herr_t H5Eclear1(void);
* H5Eprint2(), mixing H5Eset_auto1() and H5Eget_auto2() or mixing
* H5Eset_auto2() and H5Eget_auto1() does not fail.
*
- * \deprecated 1.8.0 Function H5Eget_auto() renamed to H5Eget_auto1() and
- * deprecated in this release.
*/
H5_DLL herr_t H5Eget_auto1(H5E_auto1_t *func, void **client_data);
/**
@@ -791,6 +813,9 @@ H5_DLL herr_t H5Eget_auto1(H5E_auto1_t *func, void **client_data);
* \param[in] str Error description string
* \return \herr_t
*
+ * \deprecated 1.8.0 Function H5Epush() renamed to H5Epush1() and
+ * deprecated in this release.
+ *
* \details H5Epush1() pushes a new error record onto the error stack for the
* current thread.\n
* The error has major and minor numbers \p maj_num
@@ -801,8 +826,6 @@ H5_DLL herr_t H5Eget_auto1(H5E_auto1_t *func, void **client_data);
* allocated.
*
* \since 1.4.0
- * \deprecated 1.8.0 Function H5Epush() renamed to H5Epush1() and
- * deprecated in this release.
*/
H5_DLL herr_t H5Epush1(const char *file, const char *func, unsigned line, H5E_major_t maj, H5E_minor_t min,
const char *str);
@@ -815,6 +838,9 @@ H5_DLL herr_t H5Epush1(const char *file, const char *func, unsigned line, H5E_ma
* \param[in] stream File pointer, or \c NULL for \c stderr
* \return \herr_t
*
+ * \deprecated 1.8.0 Function H5Eprint() renamed to H5Eprint1() and
+ * deprecated in this release.
+ *
* \details H5Eprint1() prints prints the error stack for the current thread
* on the specified stream, \p stream. Even if the error stack is empty, a
* one-line message of the following form will be printed:
@@ -825,8 +851,6 @@ H5_DLL herr_t H5Epush1(const char *file, const char *func, unsigned line, H5E_ma
* that prints error messages. Users are encouraged to write their own
* more specific error handlers.
*
- * \deprecated 1.8.0 Function H5Eprint() renamed to H5Eprint1() and
- * deprecated in this release.
*/
H5_DLL herr_t H5Eprint1(FILE *stream);
/**
@@ -839,6 +863,9 @@ H5_DLL herr_t H5Eprint1(FILE *stream);
* \param[in] client_data Data passed to the error function
* \return \herr_t
*
+ * \deprecated 1.8.0 Function H5Eset_auto() renamed to H5Eset_auto1() and
+ * deprecated in this release.
+ *
* \details H5Eset_auto1() turns on or off automatic printing of errors. When
* turned on (non-null \p func pointer), any API function which returns
* an error indication will first call \p func, passing it \p
@@ -855,8 +882,6 @@ H5_DLL herr_t H5Eprint1(FILE *stream);
* Automatic stack traversal is always in the #H5E_WALK_DOWNWARD
* direction.
*
- * \deprecated 1.8.0 Function H5Eset_auto() renamed to H5Eset_auto1() and
- * deprecated in this release.
*/
H5_DLL herr_t H5Eset_auto1(H5E_auto1_t func, void *client_data);
/**
@@ -870,6 +895,9 @@ H5_DLL herr_t H5Eset_auto1(H5E_auto1_t func, void *client_data);
* \param[in] client_data Data to be passed to \p func
* \return \herr_t
*
+ * \deprecated 1.8.0 Function H5Ewalk() renamed to H5Ewalk1() and
+ * deprecated in this release.
+ *
* \details H5Ewalk1() walks the error stack for the current thread and calls
* the function specified in \p func for each error along the way.
*
@@ -887,8 +915,6 @@ H5_DLL herr_t H5Eset_auto1(H5E_auto1_t func, void *client_data);
* is as follows:
* \snippet this H5E_walk1_t_snip
*
- * \deprecated 1.8.0 Function H5Ewalk() renamed to H5Ewalk1() and
- * deprecated in this release.
*/
H5_DLL herr_t H5Ewalk1(H5E_direction_t direction, H5E_walk1_t func, void *client_data);
/**
@@ -901,6 +927,8 @@ H5_DLL herr_t H5Ewalk1(H5E_direction_t direction, H5E_walk1_t func, void *client
* \param[in] maj Major error number
* \return \herr_t
*
+ * \deprecated 1.8.0 Function deprecated in this release.
+ *
* \details Given a major error number, H5Eget_major() returns a constant
* character string that describes the error.
*
@@ -908,7 +936,6 @@ H5_DLL herr_t H5Ewalk1(H5E_direction_t direction, H5E_walk1_t func, void *client
* array). An application calling this function must free the memory
* associated with the return value to prevent a memory leak.
*
- * \deprecated 1.8.0 Function deprecated in this release.
*/
H5_DLL char *H5Eget_major(H5E_major_t maj);
/**
@@ -921,6 +948,8 @@ H5_DLL char *H5Eget_major(H5E_major_t maj);
* \param[in] min Minor error number
* \return \herr_t
*
+ * \deprecated 1.8.0 Function deprecated and return type changed in this release.
+ *
* \details Given a minor error number, H5Eget_minor() returns a constant
* character string that describes the error.
*
@@ -930,7 +959,6 @@ H5_DLL char *H5Eget_major(H5E_major_t maj);
* the memory associated with the return value to prevent a memory
* leak. This is a change from the 1.6.x release series.
*
- * \deprecated 1.8.0 Function deprecated and return type changed in this release.
*/
H5_DLL char *H5Eget_minor(H5E_minor_t min);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
diff --git a/src/H5FDmpio.h b/src/H5FDmpio.h
index 7e40151..341264f 100644
--- a/src/H5FDmpio.h
+++ b/src/H5FDmpio.h
@@ -224,7 +224,7 @@ H5_DLL herr_t H5Pset_dxpl_mpio_collective_opt(hid_t dxpl_id, H5FD_mpio_collectiv
*
* Use of this function is optional.
*
- * \todo Add missing version information
+ * \since 1.8.0
*
*/
H5_DLL herr_t H5Pset_dxpl_mpio_chunk_opt(hid_t dxpl_id, H5FD_mpio_chunk_opt_t opt_mode);
@@ -248,7 +248,7 @@ H5_DLL herr_t H5Pset_dxpl_mpio_chunk_opt(hid_t dxpl_id, H5FD_mpio_chunk_opt_t op
* otherwise, a separate I/O process will be invoked for each chunk
* (multi-chunk I/O).
*
- * \todo Add missing version information
+ * \since 1.8.0
*
*/
H5_DLL herr_t H5Pset_dxpl_mpio_chunk_opt_num(hid_t dxpl_id, unsigned num_chunk_per_proc);
@@ -273,7 +273,7 @@ H5_DLL herr_t H5Pset_dxpl_mpio_chunk_opt_num(hid_t dxpl_id, unsigned num_chunk_p
* percent_proc_per_chunk, the library will do collective I/O for this
* chunk; otherwise, independent I/O will be done for the chunk.
*
- * \todo Add missing version information
+ * \since 1.8.0
*
*/
H5_DLL herr_t H5Pset_dxpl_mpio_chunk_opt_ratio(hid_t dxpl_id, unsigned percent_num_proc_per_chunk);
diff --git a/src/H5FDs3comms.h b/src/H5FDs3comms.h
index da6a62d..b81bfae 100644
--- a/src/H5FDs3comms.h
+++ b/src/H5FDs3comms.h
@@ -179,7 +179,7 @@
* HTTP header fields, of particular use when composing an
* "S3 Canonical Request" for authentication.
*
- * - The creation of a Canoncial Request involves:
+ * - The creation of a Canonical Request involves:
* - convert field names to lower case
* - sort by this lower-case name
* - convert ": " name-value separator in HTTP string to ":"
@@ -459,7 +459,7 @@ typedef struct {
*
* Pointer to NULL-terminated string for "secret" access id to S3 resource.
*
- * Requred to authenticate.
+ * Required to authenticate.
*
* `signing_key` (unsigned char *)
*
@@ -470,7 +470,7 @@ typedef struct {
* which may be re-used for several (up to seven (7)) days from creation?
* Computed once upon file open.
*
- * Requred to authenticate.
+ * Required to authenticate.
*
*----------------------------------------------------------------------------
*/
diff --git a/src/H5FLprivate.h b/src/H5FLprivate.h
index 0f9131e..7bedfe7 100644
--- a/src/H5FLprivate.h
+++ b/src/H5FLprivate.h
@@ -148,8 +148,8 @@ typedef struct H5FL_reg_head_t {
typedef union H5FL_blk_list_t {
size_t size; /* Size of the page */
union H5FL_blk_list_t *next; /* Pointer to next block in free list */
- double unused1; /* Unused normally, just here for aligment */
- haddr_t unused2; /* Unused normally, just here for aligment */
+ double unused1; /* Unused normally, just here for alignment */
+ haddr_t unused2; /* Unused normally, just here for alignment */
} H5FL_blk_list_t;
/* Data structure for priority queue node of block free lists */
@@ -163,9 +163,9 @@ typedef struct H5FL_blk_node_t {
/* Data structure for priority queue of native block free lists */
typedef struct H5FL_blk_head_t {
unsigned init; /* Whether the free list has been initialized */
- unsigned allocated; /* Number of blocks allocated */
- unsigned onlist; /* Number of blocks on free list */
- size_t list_mem; /* Amount of memory in block on free list */
+ unsigned allocated; /* Total number of blocks allocated */
+ unsigned onlist; /* Total number of blocks on free list */
+ size_t list_mem; /* Total amount of memory in blocks on free list */
const char * name; /* Name of the type */
H5FL_blk_node_t *head; /* Pointer to first free list in queue */
} H5FL_blk_head_t;
@@ -221,8 +221,8 @@ typedef struct H5FL_blk_head_t {
typedef union H5FL_arr_list_t {
union H5FL_arr_list_t *next; /* Pointer to next block in free list */
size_t nelem; /* Number of elements in this array */
- double unused1; /* Unused normally, just here for aligment */
- haddr_t unused2; /* Unused normally, just here for aligment */
+ double unused1; /* Unused normally, just here for alignment */
+ haddr_t unused2; /* Unused normally, just here for alignment */
} H5FL_arr_list_t;
/* Data structure for each size of array element */
@@ -235,7 +235,7 @@ typedef struct H5FL_arr_node_t {
/* Data structure for free list of array blocks */
typedef struct H5FL_arr_head_t {
unsigned init; /* Whether the free list has been initialized */
- unsigned allocated; /* Number of blocks allocated */
+ unsigned allocated; /* Total number of blocks allocated */
size_t list_mem; /* Amount of memory in block on free list */
const char * name; /* Name of the type */
int maxelem; /* Maximum number of elements in an array */
diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h
index 4c968db..528ba86 100644
--- a/src/H5Fpkg.h
+++ b/src/H5Fpkg.h
@@ -238,7 +238,7 @@ struct H5F_file_t {
/* (if aggregating "small data" allocations) */
/* Metadata accumulator information */
- H5F_meta_accum_t accum; /* Metadata accumulator info */
+ H5F_meta_accum_t accum; /* Metadata accumulator info */
};
/*
@@ -247,13 +247,13 @@ struct H5F_file_t {
* to shared H5F_file_t structs.
*/
struct H5F_t {
- char * open_name; /* Name used to open file */
+ char * open_name; /* Name used to open file */
char * actual_name; /* Actual name of the file, after resolving symlinks, etc. */
char * extpath; /* Path for searching target external link file */
- H5F_file_t * shared; /* The shared file info */
+ H5F_file_t * shared; /* The shared file info */
unsigned nopen_objs; /* Number of open object headers*/
H5FO_t * obj_count; /* # of time each object is opened through top file structure */
- hid_t file_id; /* ID of this file */
+ hid_t file_id; /* ID of this file */
hbool_t closing; /* File is in the process of being closed */
struct H5F_t *parent; /* Parent file that this file is mounted to */
unsigned nmounts; /* Number of children mounted to this file */
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index 3d8e8d3..fdd7641 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -217,30 +217,30 @@
/* clang-format off */
/* Address-related macros */
-#define H5F_addr_overflow(X,Z) (HADDR_UNDEF==(X) || \
- HADDR_UNDEF==(X)+(haddr_t)(Z) || \
+#define H5F_addr_overflow(X,Z) (HADDR_UNDEF==(X) || \
+ HADDR_UNDEF==(X)+(haddr_t)(Z) || \
(X)+(haddr_t)(Z)<(X))
#define H5F_addr_hash(X,M) ((unsigned)((X)%(M)))
#define H5F_addr_defined(X) ((X)!=HADDR_UNDEF)
/* The H5F_addr_eq() macro guarantees that Y is not HADDR_UNDEF by making
* certain that X is not HADDR_UNDEF and then checking that X equals Y
*/
-#define H5F_addr_eq(X,Y) ((X)!=HADDR_UNDEF && \
+#define H5F_addr_eq(X,Y) ((X)!=HADDR_UNDEF && \
(X)==(Y))
#define H5F_addr_ne(X,Y) (!H5F_addr_eq((X),(Y)))
-#define H5F_addr_lt(X,Y) ((X)!=HADDR_UNDEF && \
- (Y)!=HADDR_UNDEF && \
+#define H5F_addr_lt(X,Y) ((X)!=HADDR_UNDEF && \
+ (Y)!=HADDR_UNDEF && \
(X)<(Y))
-#define H5F_addr_le(X,Y) ((X)!=HADDR_UNDEF && \
- (Y)!=HADDR_UNDEF && \
+#define H5F_addr_le(X,Y) ((X)!=HADDR_UNDEF && \
+ (Y)!=HADDR_UNDEF && \
(X)<=(Y))
-#define H5F_addr_gt(X,Y) ((X)!=HADDR_UNDEF && \
- (Y)!=HADDR_UNDEF && \
+#define H5F_addr_gt(X,Y) ((X)!=HADDR_UNDEF && \
+ (Y)!=HADDR_UNDEF && \
(X)>(Y))
-#define H5F_addr_ge(X,Y) ((X)!=HADDR_UNDEF && \
- (Y)!=HADDR_UNDEF && \
+#define H5F_addr_ge(X,Y) ((X)!=HADDR_UNDEF && \
+ (Y)!=HADDR_UNDEF && \
(X)>=(Y))
-#define H5F_addr_cmp(X,Y) (H5F_addr_eq((X), (Y)) ? 0 : \
+#define H5F_addr_cmp(X,Y) (H5F_addr_eq((X), (Y)) ? 0 : \
(H5F_addr_lt((X), (Y)) ? -1 : 1))
#define H5F_addr_pow2(N) ((haddr_t)1<<(N))
#define H5F_addr_overlap(O1,L1,O2,L2) (((O1) < (O2) && ((O1) + (L1)) > (O2)) || \
@@ -498,11 +498,11 @@
#define HDF5_BTREE_SNODE_IK_DEF 16
#define HDF5_BTREE_CHUNK_IK_DEF \
32 /* Note! this value is assumed \
- to be 32 for version 0 \
- of the superblock and \
- if it is changed, the code \
- must compensate. -QAK \
- */
+ to be 32 for version 0 \
+ of the superblock and \
+ if it is changed, the code \
+ must compensate. -QAK \
+ */
#define HDF5_BTREE_IK_MAX_ENTRIES 65536 /* 2^16 - 2 bytes for storing entries (children) */
/* See format specification on version 1 B-trees */
diff --git a/src/H5Fpublic.h b/src/H5Fpublic.h
index c44e729..82d79c8 100644
--- a/src/H5Fpublic.h
+++ b/src/H5Fpublic.h
@@ -22,6 +22,27 @@
* creation or access \c mode control the interaction with the underlying
* storage such as file systems.
*
+ * <table>
+ * <tr><th>Create</th><th>Read</th></tr>
+ * <tr valign="top">
+ * <td>
+ * \snippet{lineno} H5F_examples.c create
+ * </td>
+ * <td>
+ * \snippet{lineno} H5F_examples.c read
+ * </td>
+ * </tr>
+ * <tr><th>Update</th><th>Delete</th></tr>
+ * <tr valign="top">
+ * <td>
+ * \snippet{lineno} H5F_examples.c update
+ * </td>
+ * <td>
+ * \snippet{lineno} H5F_examples.c delete
+ * </td>
+ * </tr>
+ * </table>
+ *
* In addition to general file management functions, there are three categories
* of functions that deal with advanced file management tasks and use cases:
* 1. The control of the HDF5 \ref MDC
@@ -61,7 +82,7 @@
* We're assuming that these constants are used rather early in the hdf5
* session.
*
- * H5F_ACC_DEBUG no longer has any prints any special debug info. The symbol is
+ * H5F_ACC_DEBUG no longer prints any special debug info. The symbol is
* being retained and will be listed as deprecated in HDF5 1.10.0.
*/
#define H5F_ACC_RDONLY (H5CHECK 0x0000u) /**< Absence of RDWR: read-only */
@@ -967,11 +988,11 @@ H5_DLL ssize_t H5Fget_name(hid_t obj_id, char *name, size_t size);
* \li \c hdr_size is the size of the shared object header message.
* \li \c msgs_info is an H5_ih_info_t struct defined in H5public.h as
* follows: \snippet H5public.h H5_ih_info_t_snip
- *
* \li \p index_size is the summed size of all the shared object
* header indexes. Each index might be either a B-tree or
* a list.
*
+ *
* \since 1.8.0
*
*/
diff --git a/src/H5Gpublic.h b/src/H5Gpublic.h
index b8b0421..4110cb7 100644
--- a/src/H5Gpublic.h
+++ b/src/H5Gpublic.h
@@ -15,6 +15,26 @@
*
* Use the functions in this module to manage HDF5 groups.
*
+ * <table>
+ * <tr><th>Create</th><th>Read</th></tr>
+ * <tr valign="top">
+ * <td>
+ * \snippet{lineno} H5G_examples.c create
+ * </td>
+ * <td>
+ * \snippet{lineno} H5G_examples.c read
+ * </td>
+ * <tr><th>Update</th><th>Delete</th></tr>
+ * <tr valign="top">
+ * <td>
+ * \snippet{lineno} H5G_examples.c update
+ * </td>
+ * <td>
+ * \snippet{lineno} H5G_examples.c delete
+ * </td>
+ * </tr>
+ * </table>
+ *
* \details \Bold{Groups in HDF5:} A group associates names with objects and
* provides a mechanism for mapping a name to an object. Since all
* objects appear in at least one group (with the possible exception of
@@ -1131,7 +1151,7 @@ H5_DLL herr_t H5Gget_objinfo(hid_t loc_id, const char *name, hbool_t follow_link
* actual object name length, the object name is truncated to
* \Code{max_size - 1} characters.
*
- * Note that if the size of the object's name is unkown, a preliminary
+ * Note that if the size of the object's name is unknown, a preliminary
* call to H5Gget_objname_by_idx() with \p name set to \c NULL will
* return the length of the object's name. A second call to
* H5Gget_objname_by_idx() can then be used to retrieve the actual
diff --git a/src/H5Ipublic.h b/src/H5Ipublic.h
index 2e66b36..83ee6be 100644
--- a/src/H5Ipublic.h
+++ b/src/H5Ipublic.h
@@ -11,48 +11,6 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/**\defgroup H5I H5I
- *
- * Use the functions in this module to manage identifiers defined by the HDF5
- * library. See \ref H5IUD for user-defined identifiers and identifier
- * types.
- *
- * HDF5 identifiers are usually created as a side-effect of creating HDF5
- * entities such as groups, datasets, attributes, or property lists.
- *
- * Identifiers defined by the HDF5 library can be used to retrieve information
- * such as path names and reference counts, and their validity can be checked.
- *
- * Identifiers can be updated by manipulating their reference counts.
- *
- * Unused identifiers should be reclaimed by closing the associated item, e.g.,
- * HDF5 object, or decrementing the reference count to 0.
- *
- * \note Identifiers (of type \ref hid_t) are run-time auxiliaries and
- * not persisted in the file.
- *
- * \defgroup H5IUD User-defined ID Types
- * \ingroup H5I
- *
- * The \ref H5I module contains functions to define new identifier types.
- * For convenience, handles of type \ref hid_t can then be associated with the
- * new identifier types and user objects.
- *
- * New identifier types can be created by registering a new identifier type
- * with the HDF5 library. Once a new identifier type has bee registered,
- * it can be used to generate identifiers for user objects.
- *
- * User-defined identifier types can be searched and iterated.
- *
- * Like library-defined identifiers, user-defined identifiers \Emph{and}
- * identifier types are reference counted, and the reference counts can be
- * manipulated accordingly.
- *
- * User-defined identifiers no longer in use should be deleted or reclaimed,
- * and identifier types should be destroyed if they are no longer required.
- *
- */
-
/*
* This file contains function prototypes for each exported function in
* the H5I module.
@@ -130,7 +88,7 @@ extern "C" {
/* Public API functions */
/**
- * \ingroup H5I
+ * \ingroup H5IUD
*
* \brief Registers an object under a type and returns an ID for it
*
@@ -152,7 +110,7 @@ extern "C" {
*/
H5_DLL hid_t H5Iregister(H5I_type_t type, const void *object);
/**
- * \ingroup H5I
+ * \ingroup H5IUD
*
* \brief Returns the object referenced by an ID
*
@@ -175,7 +133,7 @@ H5_DLL hid_t H5Iregister(H5I_type_t type, const void *object);
*/
H5_DLL void *H5Iobject_verify(hid_t id, H5I_type_t type);
/**
- * \ingroup H5I
+ * \ingroup H5IUD
*
* \brief Removes an ID from its type
*
@@ -214,12 +172,7 @@ H5_DLL void *H5Iremove_verify(hid_t id, H5I_type_t type);
* \return Returns the object type if successful; otherwise #H5I_BADID.
*
* \details H5Iget_type() retrieves the type of the object identified by
- * \p id.
- *
- * Valid types returned by the function are:
- * \id_types
- *
- * If no valid type can be determined or the identifier submitted is
+ * \p id. If no valid type can be determined or the identifier submitted is
* invalid, the function returns #H5I_BADID.
*
* This function is of particular use in determining the type of
@@ -415,7 +368,7 @@ H5_DLL int H5Idec_ref(hid_t id);
*/
H5_DLL int H5Iget_ref(hid_t id);
/**
- * \ingroup H5I
+ * \ingroup H5IUD
*
* \brief Creates and returns a new ID type
*
@@ -447,7 +400,7 @@ H5_DLL int H5Iget_ref(hid_t id);
*/
H5_DLL H5I_type_t H5Iregister_type(size_t hash_size, unsigned reserved, H5I_free_t free_func);
/**
- * \ingroup H5I
+ * \ingroup H5IUD
*
* \brief Deletes all identifiers of the given type
*
@@ -471,7 +424,7 @@ H5_DLL H5I_type_t H5Iregister_type(size_t hash_size, unsigned reserved, H5I_free
*/
H5_DLL herr_t H5Iclear_type(H5I_type_t type, hbool_t force);
/**
- * \ingroup H5I
+ * \ingroup H5IUD
*
* \brief Removes an identifier type and all identifiers within that type
*
@@ -494,7 +447,7 @@ H5_DLL herr_t H5Iclear_type(H5I_type_t type, hbool_t force);
*/
H5_DLL herr_t H5Idestroy_type(H5I_type_t type);
/**
- * \ingroup H5I
+ * \ingroup H5IUD
*
* \brief Increments the reference count on an ID type
*
@@ -513,7 +466,7 @@ H5_DLL herr_t H5Idestroy_type(H5I_type_t type);
*/
H5_DLL int H5Iinc_type_ref(H5I_type_t type);
/**
- * \ingroup H5I
+ * \ingroup H5IUD
*
* \brief Decrements the reference count on an identifier type
*
@@ -533,11 +486,11 @@ H5_DLL int H5Iinc_type_ref(H5I_type_t type);
*/
H5_DLL int H5Idec_type_ref(H5I_type_t type);
/**
- * \ingroup H5I
+ * \ingroup H5IUD
*
* \brief Retrieves the reference count on an ID type
*
- * \param[in] type The identifier of the type whose reference count is to be retieved
+ * \param[in] type The identifier of the type whose reference count is to be retrieved
*
* \return Returns the current reference count on success, negative on failure.
*
@@ -552,7 +505,7 @@ H5_DLL int H5Idec_type_ref(H5I_type_t type);
*/
H5_DLL int H5Iget_type_ref(H5I_type_t type);
/**
- * \ingroup H5I
+ * \ingroup H5IUD
*
* \brief Finds the memory referred to by an ID within the given ID type such
* that some criterion is satisfied
@@ -593,7 +546,7 @@ H5_DLL int H5Iget_type_ref(H5I_type_t type);
*/
H5_DLL void *H5Isearch(H5I_type_t type, H5I_search_func_t func, void *key);
/**
- * \ingroup H5I
+ * \ingroup H5IUD
*
* \brief Returns the number of identifiers in a given identifier type
*
@@ -613,7 +566,7 @@ H5_DLL void *H5Isearch(H5I_type_t type, H5I_search_func_t func, void *key);
*/
H5_DLL herr_t H5Inmembers(H5I_type_t type, hsize_t *num_members);
/**
- * \ingroup H5I
+ * \ingroup H5IUD
*
* \brief Determines whether an identifier type is registered
*
diff --git a/src/H5Lpublic.h b/src/H5Lpublic.h
index 2896ba4..a3a6b33 100644
--- a/src/H5Lpublic.h
+++ b/src/H5Lpublic.h
@@ -11,16 +11,6 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/**\defgroup H5L H5L
- *
- * Use the functions in this module to manage HDF5 links and link types.
- *
- * \defgroup TRAV Link Traversal
- * \ingroup H5L
- * \defgroup H5LA Advanced Link Functions
- * \ingroup H5L
- */
-
/*-------------------------------------------------------------------------
*
* Created: H5Lpublic.h
@@ -34,6 +24,37 @@
#ifndef H5Lpublic_H
#define H5Lpublic_H
+/**\defgroup H5L H5L
+ *
+ * Use the functions in this module to manage HDF5 links and link types.
+ *
+ * <table>
+ * <tr><th>Create</th><th>Read</th></tr>
+ * <tr valign="top">
+ * <td>
+ * \snippet{lineno} H5L_examples.c create
+ * </td>
+ * <td>
+ * \snippet{lineno} H5L_examples.c iter_cb
+ * \snippet{lineno} H5L_examples.c read
+ * </td>
+ * <tr><th>Update</th><th>Delete</th></tr>
+ * <tr valign="top">
+ * <td>
+ * \snippet{lineno} H5L_examples.c update
+ * </td>
+ * <td>
+ * \snippet{lineno} H5L_examples.c delete
+ * </td>
+ * </tr>
+ * </table>
+ *
+ * \defgroup TRAV Link Traversal
+ * \ingroup H5L
+ * \defgroup H5LA Advanced Link Functions
+ * \ingroup H5L
+ */
+
/* Public headers needed by this file */
#include "H5public.h" /* Generic Functions */
#include "H5Ipublic.h" /* IDs */
@@ -500,7 +521,7 @@ H5_DLL herr_t H5Ldelete_by_idx(hid_t loc_id, const char *group_name, H5_index_t
*
* \return \herr_t
*
- * \details H5Lget_val() returns tha value of link \p name. For smbolic links,
+ * \details H5Lget_val() returns the value of link \p name. For smbolic links,
* this is the path to which the link points, including the null
* terminator. For external and user-defined links, it is the link
* buffer.
@@ -530,7 +551,7 @@ H5_DLL herr_t H5Ldelete_by_idx(hid_t loc_id, const char *group_name, H5_index_t
*
* This function should be used only after H5Lget_info() has been
* called to verify that \p name is a symbolic link. This can be
- * deteremined from the \c link_type field of the \ref H5L_info_t
+ * determined from the \c link_type field of the \ref H5L_info_t
* \c struct.
*
* \note This function will fail if called on a hard link.
@@ -618,7 +639,7 @@ H5_DLL herr_t H5Lget_val_by_idx(hid_t loc_id, const char *group_name, H5_index_t
* name includes either a relative path or an absolute path to the
* target link, intermediate steps along the path must be verified
* before the existence of the target link can be safely checked. If
- * the path is not verified and an intermediate element of the path
+ * the path is not verified, and an intermediate element of the path
* does not exist, H5Lexists() will fail. The example in the next
* paragraph illustrates one step-by-step method for verifying the
* existence of a link with a relative or absolute path.
@@ -663,7 +684,7 @@ H5_DLL herr_t H5Lget_val_by_idx(hid_t loc_id, const char *group_name, H5_index_t
* root group of an HDF5 file, and let \c lapl denote a valid link
* access property list identifier. A call to H5Lexists() with
* arguments c root, \c "/", and \c lapl returns a positive value;
- * in other words, \Code{H5Lexists(root, "/", lapl)} returns a postive
+ * in other words, \Code{H5Lexists(root, "/", lapl)} returns a positive
* value. In HDF5 version 1.8.16, this function returns 0.</li>
* </ol>
* Note that the function accepts link names and path names. This is
@@ -705,38 +726,37 @@ H5_DLL htri_t H5Lexists(hid_t loc_id, const char *name, hid_t lapl_id);
* specifies the link being queried.
*
* \p lapl_id is the link access property list associated with the
- * link \p name. In the general case, when default link access
- * properties are acceptable, this can be passed in as #H5P_DEFAULT.
- * An example of a situation that requires a non-default link access
- * property list is when the link is an external link; an external
- * link may require that a link prefix be set in a link access
- * property list (see H5Pset_elink_prefix()).
+ * link name. In the general case, when default link access properties
+ * are acceptable, this can be passed in as #H5P_DEFAULT. An example
+ * of a situation that requires a non-default link access property
+ * list is when the link is an external link; an external link may
+ * require that a link prefix be set in a link access property list
+ * (see H5Pset_elink_prefix()).
*
* H5Lget_info() returns information about name in the data structure
- * \ref H5L_info_t, which is described below and defined in
- * H5Lpublic.h. This structure is returned in the buffer \p linfo.
+ * H5L_info_t, which is described below and defined in H5Lpublic.h.
+ * This structure is returned in the buffer \p linfo.
* \snippet this H5L_info_t_snip
- * In the above struct, type specifies the link class. Valid values
+ * In the above struct, \c type specifies the link class. Valid values
* include the following:
* \link_types
* There will be additional valid values if user-defined links have
* been registered.
*
- * \c corder specifies the link’s creation order position while
- * \c corder_valid indicates whether the value in \c corder is valid.
- *
- * If \c corder_valid is \c TRUE, the value in \c corder is known to
- * be valid; if \c corder_valid is \c FALSE, the value in \c corder is
- * presumed to be invalid;
+ * \p corder specifies the link’s creation order position while
+ * \p corder_valid indicates whether the value in corder is valid.
*
- * \c corder starts at zero (0) and is incremented by one (1) as new
- * links are created. But higher-numbered entries are not adjusted
- * when a lower-numbered link is deleted; the deleted link’s creation
- * order position is simply left vacant. In such situations, the value
- * of \c corder for the last link created will be larger than the
- * number of links remaining in the group.
+ * If \p corder_valid is \c TRUE, the value in \p corder is known to
+ * be valid; if \p corder_valid is \c FALSE, the value in \p corder is
+ * presumed to be invalid; \p corder starts at zero (0) and is
+ * incremented by one (1) as new links are created. But
+ * higher-numbered entries are not adjusted when a lower-numbered link
+ * is deleted; the deleted link's creation order position is simply
+ * left vacant. In such situations, the value of \p corder for the
+ * last link created will be larger than the number of links remaining
+ * in the group.
*
- * \c cset specifies the character set in which the link name is
+ * \p cset specifies the character set in which the link name is
* encoded. Valid values include the following:
* \csets
* This value is set with H5Pset_char_encoding().
@@ -776,9 +796,8 @@ H5_DLL herr_t H5Lget_info(hid_t loc_id, const char *name, H5L_info_t *linfo, hid
* \return \herr_t
*
* \details H5get_info_by_idx() returns the metadata for a link in a group
- * according to a specified field or index and a specified order.
- *
- * The link for which information is to be returned is specified by \p
+ * according to a specified field or index and a specified order. The
+ * link for which information is to be returned is specified by \p
* idx_type, \p order, and \p n as follows:
*
* - \p idx_type specifies the field by which the links in \p
@@ -939,19 +958,18 @@ H5_DLL herr_t H5Literate(hid_t grp_id, H5_index_t idx_type, H5_iter_order_t orde
/**
* \ingroup TRAV
*
- * \brief Iterates through links in a group by its name
+ * \brief Iterates through links in a group
*
* \loc_id
* \param[in] group_name Group name
* \idx_type
* \order
* \param[in,out] idx iteration position at which to start (\Emph{IN}) or
- * position at which an interrupted iteration may be restarted
- * (\Emph{OUT})
+ * position at which an interrupted iteration may be restarted
+ * (\Emph{OUT})
* \op
* \op_data
* \lapl_id
- *
* \return \success{The return value of the first operator that returns
* non-zero, or zero if all members were processed with no
* operator returning non-zero.}
@@ -1014,7 +1032,6 @@ H5_DLL herr_t H5Literate_by_name(hid_t loc_id, const char *group_name, H5_index_
* \order
* \op
* \op_data
- *
* \return \success{The return value of the first operator that returns
* non-zero, or zero if all members were processed with no
* operator returning non-zero.}
@@ -1101,11 +1118,7 @@ H5_DLL herr_t H5Lvisit(hid_t grp_id, H5_index_t idx_type, H5_iter_order_t order,
* \op_data
* \lapl_id
*
- * \return \success{The return value of the first operator that returns
- * non-zero, or zero if all members were processed with no
- * operator returning non-zero.}
- * \return \failure{Negative if an error occurs in the library, or the negative
- * value returned by one of the operators.}
+ * \return \herr_t
*
* \details H5Lvisit_by_name() is a recursive iteration function to visit all
* links in and below a group in an HDF5 file, thus providing a
@@ -1130,7 +1143,7 @@ H5_DLL herr_t H5Lvisit(hid_t grp_id, H5_index_t idx_type, H5_iter_order_t order,
* \p idx_type specifies the index to be used. If the links have not
* been indexed by the index type, they will first be sorted by that
* index then the iteration will begin; if the links have been so
- * indexed, the sorting step will be unnecesary, so the iteration may
+ * indexed, the sorting step will be unnecessary, so the iteration may
* begin more quickly. Valid values include the following:
* \indexes
*
diff --git a/src/H5Opkg.h b/src/H5Opkg.h
index e0ba5c5..06cecdd 100644
--- a/src/H5Opkg.h
+++ b/src/H5Opkg.h
@@ -227,15 +227,15 @@ struct H5O_msg_class_t {
};
struct H5O_mesg_t {
- const H5O_msg_class_t *type; /*type of message */
- hbool_t dirty; /*raw out of date wrt native */
- hbool_t locked; /*message is locked into chunk */
- uint8_t flags; /*message flags */
- H5O_msg_crt_idx_t crt_idx; /*message creation index */
- unsigned chunkno; /*chunk number for this mesg */
- void * native; /*native format message */
- uint8_t * raw; /*ptr to raw data */
- size_t raw_size; /*size with alignment */
+ const H5O_msg_class_t *type; /* type of message */
+ hbool_t dirty; /* raw out of date wrt native */
+ hbool_t locked; /* message is locked into chunk */
+ uint8_t flags; /* message flags */
+ H5O_msg_crt_idx_t crt_idx; /* message creation index */
+ unsigned chunkno; /* chunk number for this mesg */
+ void * native; /* native format message */
+ uint8_t * raw; /* pointer to raw data */
+ size_t raw_size; /* size with alignment */
};
typedef struct H5O_chunk_t {
diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h
index cdc0eef..27a0a4a 100644
--- a/src/H5Oprivate.h
+++ b/src/H5Oprivate.h
@@ -25,11 +25,11 @@
#define H5Oprivate_H
/* Include the public header file for this API */
-#include "H5Opublic.h" /* Object header functions */
+#include "H5Opublic.h" /* Object header functions */
/* Public headers needed by this file */
-#include "H5Dpublic.h" /* Dataset functions */
-#include "H5Lpublic.h" /* Link functions */
+#include "H5Dpublic.h" /* Dataset functions */
+#include "H5Lpublic.h" /* Link functions */
#include "H5Spublic.h" /* Dataspace functions */
/* Private headers needed by this file */
@@ -37,7 +37,7 @@
#include "H5Fprivate.h" /* File access */
#include "H5SLprivate.h" /* Skip lists */
#include "H5Tprivate.h" /* Datatype functions */
-#include "H5Zprivate.h" /* I/O pipeline filters */
+#include "H5Zprivate.h" /* I/O pipeline filters */
/* Forward references of package typedefs */
typedef struct H5O_msg_class_t H5O_msg_class_t;
@@ -229,7 +229,7 @@ typedef struct H5O_copy_t {
#define H5O_SHARE_TYPE_UNSHARED 0 /* Message is not shared */
#define H5O_SHARE_TYPE_SOHM 1 /* Message is stored in SOHM heap */
#define H5O_SHARE_TYPE_COMMITTED 2 /* Message is stored in another object header */
-#define H5O_SHARE_TYPE_HERE 3 /* Message is stored in this object header, but is sharable */
+#define H5O_SHARE_TYPE_HERE 3 /* Message is stored in this object header, but is shareable */
/* Detect messages that aren't stored in message's object header */
#define H5O_IS_STORED_SHARED(T) \
@@ -433,7 +433,7 @@ typedef struct H5O_layout_chunk_t {
uint32_t dim[H5O_LAYOUT_NDIMS]; /* Size of chunk in elements */
uint32_t size; /* Size of chunk in bytes */
hsize_t nchunks; /* Number of chunks in dataset */
- hsize_t chunks[H5O_LAYOUT_NDIMS]; /* # of chunks in dataset dimensions */
+ hsize_t chunks[H5O_LAYOUT_NDIMS]; /* # of chunks in each dataset dimension */
hsize_t down_chunks[H5O_LAYOUT_NDIMS]; /* "down" size of number of chunks in each dimension */
} H5O_layout_chunk_t;
diff --git a/src/H5Opublic.h b/src/H5Opublic.h
index 24bf397..a4eef44 100644
--- a/src/H5Opublic.h
+++ b/src/H5Opublic.h
@@ -33,6 +33,26 @@
* reference count to zero, which can (but should not usually) be effected
* by a function in this module.
*
+ * <table>
+ * <tr><th>Create</th><th>Read</th></tr>
+ * <tr valign="top">
+ * <td>
+ * \snippet{lineno} H5O_examples.c create
+ * </td>
+ * <td>
+ * \snippet{lineno} H5O_examples.c read
+ * </td>
+ * <tr><th>Update</th><th>Delete</th></tr>
+ * <tr valign="top">
+ * <td>
+ * \snippet{lineno} H5O_examples.c update
+ * </td>
+ * <td>
+ * \snippet{lineno} H5O_examples.c delete
+ * </td>
+ * </tr>
+ * </table>
+ *
*/
/*-------------------------------------------------------------------------
@@ -59,14 +79,14 @@
/*****************/
/* Flags for object copy (H5Ocopy) */
-#define H5O_COPY_SHALLOW_HIERARCHY_FLAG (0x0001u) /* Copy only immediate members */
-#define H5O_COPY_EXPAND_SOFT_LINK_FLAG (0x0002u) /* Expand soft links into new objects */
-#define H5O_COPY_EXPAND_EXT_LINK_FLAG (0x0004u) /* Expand external links into new objects */
-#define H5O_COPY_EXPAND_REFERENCE_FLAG (0x0008u) /* Copy objects that are pointed by references */
-#define H5O_COPY_WITHOUT_ATTR_FLAG (0x0010u) /* Copy object without copying attributes */
-#define H5O_COPY_PRESERVE_NULL_FLAG (0x0020u) /* Copy NULL messages (empty space) */
-#define H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG (0x0040u) /* Merge committed datatypes in dest file */
-#define H5O_COPY_ALL (0x007Fu) /* All object copying flags (for internal checking) */
+#define H5O_COPY_SHALLOW_HIERARCHY_FLAG (0x0001u) /**< Copy only immediate members */
+#define H5O_COPY_EXPAND_SOFT_LINK_FLAG (0x0002u) /**< Expand soft links into new objects */
+#define H5O_COPY_EXPAND_EXT_LINK_FLAG (0x0004u) /**< Expand external links into new objects */
+#define H5O_COPY_EXPAND_REFERENCE_FLAG (0x0008u) /**< Copy objects that are pointed by references */
+#define H5O_COPY_WITHOUT_ATTR_FLAG (0x0010u) /**< Copy object without copying attributes */
+#define H5O_COPY_PRESERVE_NULL_FLAG (0x0020u) /**< Copy NULL messages (empty space) */
+#define H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG (0x0040u) /**< Merge committed datatypes in dest file */
+#define H5O_COPY_ALL (0x007Fu) /**< All object copying flags (for internal checking) */
/* Flags for shared message indexes.
* Pass these flags in using the mesg_type_flags parameter in
@@ -75,25 +95,27 @@
* but we need to assign each kind of message to a different bit so that
* one index can hold multiple types.)
*/
-#define H5O_SHMESG_NONE_FLAG 0x0000 /* No shared messages */
-#define H5O_SHMESG_SDSPACE_FLAG ((unsigned)1 << 0x0001) /* Simple Dataspace Message. */
-#define H5O_SHMESG_DTYPE_FLAG ((unsigned)1 << 0x0003) /* Datatype Message. */
-#define H5O_SHMESG_FILL_FLAG ((unsigned)1 << 0x0005) /* Fill Value Message. */
-#define H5O_SHMESG_PLINE_FLAG ((unsigned)1 << 0x000b) /* Filter pipeline message. */
-#define H5O_SHMESG_ATTR_FLAG ((unsigned)1 << 0x000c) /* Attribute Message. */
+#define H5O_SHMESG_NONE_FLAG 0x0000 /**< No shared messages */
+#define H5O_SHMESG_SDSPACE_FLAG ((unsigned)1 << 0x0001) /**< Simple Dataspace Message. */
+#define H5O_SHMESG_DTYPE_FLAG ((unsigned)1 << 0x0003) /**< Datatype Message. */
+#define H5O_SHMESG_FILL_FLAG ((unsigned)1 << 0x0005) /**< Fill Value Message. */
+#define H5O_SHMESG_PLINE_FLAG ((unsigned)1 << 0x000b) /**< Filter pipeline message. */
+#define H5O_SHMESG_ATTR_FLAG ((unsigned)1 << 0x000c) /**< Attribute Message. */
#define H5O_SHMESG_ALL_FLAG \
(H5O_SHMESG_SDSPACE_FLAG | H5O_SHMESG_DTYPE_FLAG | H5O_SHMESG_FILL_FLAG | H5O_SHMESG_PLINE_FLAG | \
H5O_SHMESG_ATTR_FLAG)
+/* clang-format off */
/* Object header status flag definitions */
-#define H5O_HDR_CHUNK0_SIZE 0x03 /* 2-bit field indicating # of bytes to store the size of chunk 0's data */
-#define H5O_HDR_ATTR_CRT_ORDER_TRACKED 0x04 /* Attribute creation order is tracked */
-#define H5O_HDR_ATTR_CRT_ORDER_INDEXED 0x08 /* Attribute creation order has index */
-#define H5O_HDR_ATTR_STORE_PHASE_CHANGE 0x10 /* Non-default attribute storage phase change values stored */
-#define H5O_HDR_STORE_TIMES 0x20 /* Store access, modification, change & birth times for object */
+#define H5O_HDR_CHUNK0_SIZE 0x03 /**< 2-bit field indicating # of bytes to store the size of chunk 0's data */
+#define H5O_HDR_ATTR_CRT_ORDER_TRACKED 0x04 /**< Attribute creation order is tracked */
+#define H5O_HDR_ATTR_CRT_ORDER_INDEXED 0x08 /**< Attribute creation order has index */
+#define H5O_HDR_ATTR_STORE_PHASE_CHANGE 0x10 /**< Non-default attribute storage phase change values stored */
+#define H5O_HDR_STORE_TIMES 0x20 /**< Store access, modification, change & birth times for object */
#define H5O_HDR_ALL_FLAGS \
(H5O_HDR_CHUNK0_SIZE | H5O_HDR_ATTR_CRT_ORDER_TRACKED | H5O_HDR_ATTR_CRT_ORDER_INDEXED | \
H5O_HDR_ATTR_STORE_PHASE_CHANGE | H5O_HDR_STORE_TIMES)
+/* clang-format on */
/* Maximum shared message values. Number of indexes is 8 to allow room to add
* new types of messages.
@@ -161,7 +183,7 @@ typedef struct H5O_info_t {
struct {
H5_ih_info_t obj; /**< v1/v2 B-tree & local/fractal heap for groups, B-tree for chunked datasets */
H5_ih_info_t attr; /**< v2 B-tree & heap for attributes */
- } meta_size;
+ } meta_size; /**< Extra metadata storage for obj & attributes */
} H5O_info_t;
//! <!-- [H5O_info_t_snip] -->
@@ -172,7 +194,18 @@ typedef uint32_t H5O_msg_crt_idx_t;
//! <!-- [H5O_iterate_t_snip] -->
/**
- * Prototype for H5Ovisit(), H5Ovisit_by_name() operator
+ * Prototype for H5Ovisit(), H5Ovisit_by_name() operator (version 3)
+ *
+ * \param[in] obj Object that serves as the root of the iteration;
+ * the same value as the H5Ovisit() \c obj_id parameter
+ * \param[in] name Name of object, relative to \p obj, being examined at current
+ * step of the iteration
+ * \param[out] info Information about that object
+ * \param[in,out] op_data User-defined pointer to data required by the application
+ * in processing the object; a pass-through of the \c op_data
+ * pointer provided with the H5Ovisit3() function call
+ * \return \herr_t_iter
+ *
*/
typedef herr_t (*H5O_iterate_t)(hid_t obj, const char *name, const H5O_info_t *info, void *op_data);
//! <!-- [H5O_iterate_t_snip] -->
@@ -520,19 +553,19 @@ H5_DLL herr_t H5Oget_info(hid_t loc_id, H5O_info_t *oinfo);
*-------------------------------------------------------------------------
* \ingroup H5O
*
- * \brief Retrieves the metadata for an object, identifying the object
- * by location and relative name
+ * \brief Retrieves the metadata for an object, identifying the object by
+ * location and relative name
*
* \fgdta_loc_obj_id{loc_id}
- * \param[in] name Name of group, relative to \p loc_id
+ * \param[in] name Name of object, relative to \p loc_id
* \param[out] oinfo Buffer in which to return object information
* \lapl_id
*
* \return \herr_t
*
- * \details H5Oget_info_by_name() specifies an object’s location and name, \p loc_id
- * and \p name, respectively, and retrieves the metadata describing that object
- * in \p oinfo, an H5O_info1_t \c struct.
+ * \details H5Oget_info_by_name() specifies an object’s location and name,
+ * \p loc_id and \p name, respectively, and retrieves the metadata
+ * describing that object in \p oinfo, an H5O_info1_t struct.
*
* The \c struct H5O_info_t is defined in H5Opublic.h and described
* in the H5Oget_info() function entry.
@@ -1029,10 +1062,10 @@ H5_DLL ssize_t H5Oget_comment_by_name(hid_t loc_id, const char *name, char *comm
* \details H5Ovisit() is a recursive iteration function to visit the
* object \p obj_id and, if \p obj_id is a group, all objects in
* and below it in an HDF5 file, thus providing a mechanism for
- * an application to perform a common set of operations across all
- * of those objects or a dynamically selected subset. For
- * non-recursive iteration across the members of a group,
- * see H5Literate().
+ * an application to perform a common set of operations across
+ * all of those objects or a dynamically selected subset.
+ * For non-recursive iteration across the members of a group,
+ * see H5Literate1().
*
* If \p obj_id is a group identifier, that group serves as the
* root of a recursive iteration. If \p obj_id is a file identifier,
@@ -1058,7 +1091,7 @@ H5_DLL ssize_t H5Oget_comment_by_name(hid_t loc_id, const char *name, char *comm
* <em>best effort</em> setting. If the application passes in
* a value indicating iteration in creation order and a group is
* encountered that was not tracked in creation order, that group
- * will be iterated over in alpha-numeric order by name, or
+ * will be iterated over in alphanumeric order by name, or
* <em>name order</em>. (<em>Name order</em> is the native order
* used by the HDF5 library and is always available.)
*
@@ -1156,7 +1189,7 @@ H5_DLL herr_t H5Ovisit(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order,
*-------------------------------------------------------------------------
* \ingroup H5O
*
- * \brief Recursively visits all objects starting from a specified object
+ * \brief Recursively visits all objects accessible from a specified object
*
* \fgdta_loc_obj_id{loc_id}
* \param[in] obj_name Name of the object, generally relative to
@@ -1213,7 +1246,7 @@ H5_DLL herr_t H5Ovisit(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order,
* <em>best effort</em> setting. If the application passes in a
* value indicating iteration in creation order and a group is
* encountered that was not tracked in creation order, that group
- * will be iterated over in alpha-numeric order by name, or
+ * will be iterated over in alphanumeric order by name, or
* <em>name order</em>. (<em>Name order</em> is the native order
* used by the HDF5 library and is always available.)
*
diff --git a/src/H5PLpublic.h b/src/H5PLpublic.h
index 7bcd817..1d1bc11 100644
--- a/src/H5PLpublic.h
+++ b/src/H5PLpublic.h
@@ -10,24 +10,44 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/*
+ * This file contains public declarations for the H5PL module.
+ */
+
+#ifndef H5PLpublic_H
+#define H5PLpublic_H
+
/**\defgroup H5PL H5PL
*
* Use the functions in this module to manage the loading behavior of HDF5
* plugins.
*
+ * <table>
+ * <tr><th>Create</th><th>Read</th></tr>
+ * <tr valign="top">
+ * <td>
+ * \snippet H5PL_examples.c create
+ * </td>
+ * <td>
+ * \snippet H5PL_examples.c read
+ * </td>
+ * <tr><th>Update</th><th>Delete</th></tr>
+ * <tr valign="top">
+ * <td>
+ * \snippet H5PL_examples.c update
+ * </td>
+ * <td>
+ * \snippet H5PL_examples.c delete
+ * </td>
+ * </tr>
+ * </table>
+ *
* \attention The loading behavior of HDF5 plugins can be controlled via the
* functions described below and certain environment variables, such
* as \c HDF5_PLUGIN_PRELOAD and \c HDF5_PLUGIN_PATH.
*
*/
-/*
- * This file contains public declarations for the H5PL module.
- */
-
-#ifndef H5PLpublic_H
-#define H5PLpublic_H
-
/* Public headers needed by this file */
#include "H5public.h" /* Generic Functions */
diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h
index 962552f..e4bab2e 100644
--- a/src/H5Ppublic.h
+++ b/src/H5Ppublic.h
@@ -23,6 +23,26 @@
* or writing data. Property lists can be modified by adding or changing
* properties. Property lists are deleted by closing the associated handles.
*
+ * <table>
+ * <tr><th>Create</th><th>Read</th></tr>
+ * <tr valign="top">
+ * <td>
+ * \snippet{lineno} H5P_examples.c create
+ * </td>
+ * <td>
+ * \snippet{lineno} H5P_examples.c read
+ * </td>
+ * <tr><th>Update</th><th>Delete</th></tr>
+ * <tr valign="top">
+ * <td>
+ * \snippet{lineno} H5P_examples.c update
+ * </td>
+ * <td>
+ * \snippet{lineno} H5P_examples.c delete
+ * </td>
+ * </tr>
+ * </table>
+ *
* \defgroup ALCAPL Attribute and Link Creation Properties
* \ingroup H5P
* Currently, there are only two creation properties that you can use to control
@@ -73,7 +93,8 @@
*
* \defgroup GAPL General Access Properties
* \ingroup H5P
- * \todo Should this be as standalone page?
+ * The functions in this section can be applied to different kinds of property
+ * lists.
*
* \defgroup GCPL Group Creation Properties
* \ingroup H5P
@@ -88,6 +109,26 @@
*
* Use the functions in this module to manage HDF5 property lists.
*
+ * <table>
+ * <tr><th>Create</th><th>Read</th></tr>
+ * <tr valign="top">
+ * <td>
+ * \snippet{lineno} H5P_examples.c create
+ * </td>
+ * <td>
+ * \snippet{lineno} H5P_examples.c read
+ * </td>
+ * <tr><th>Update</th><th>Delete</th></tr>
+ * <tr valign="top">
+ * <td>
+ * \snippet{lineno} H5P_examples.c update
+ * </td>
+ * <td>
+ * \snippet{lineno} H5P_examples.c delete
+ * </td>
+ * </tr>
+ * </table>
+ *
* \defgroup GPLOA General Property List Operations (Advanced)
* \ingroup H5P
*
@@ -95,17 +136,39 @@
* functions described below. Arbitrary user-defined properties can also
* be inserted into existing property lists as so-called temporary properties.
*
+ * <table>
+ * <tr><th>Create</th><th>Read</th></tr>
+ *
+ * <tr valign="top">
+ * <td>
+ * \snippet{lineno} H5P_examples.c create_class
+ * </td>
+ * <td>
+ * \snippet{lineno} H5P_examples.c read_class
+ * </td>
+ * <tr><th>Update</th><th>Delete</th></tr>
+ * <tr valign="top">
+ * <td>
+ * \snippet{lineno} H5P_examples.c update_class
+ * </td>
+ * <td>
+ * \snippet{lineno} H5P_examples.c delete_class
+ * </td>
+ * </tr>
+ * </table>
+ *
* \defgroup LAPL Link Access Properties
* \ingroup H5P
*
- * \defgroup MAPL Map Access Properties
- * \ingroup H5P
+ *
* \defgroup OCPL Object Creation Properties
* \ingroup H5P
*
+ *
* \defgroup OCPPL Object Copy Properties
* \ingroup H5P
*
+ *
*/
/*
@@ -186,7 +249,9 @@
#define H5P_CRT_ORDER_TRACKED 0x0001
#define H5P_CRT_ORDER_INDEXED 0x0002
-/* Default value for all property list classes */
+/**
+ * Default value of type \ref hid_t for all property list classes
+ */
#define H5P_DEFAULT (hid_t)0
#ifdef __cplusplus
@@ -199,14 +264,72 @@ extern "C" {
/* Define property list class callback function pointer types */
//! <!-- [H5P_cls_create_func_t_snip] -->
+/**
+ * \brief Callback function for H5Pcreate_class()
+ *
+ * \param[in] prop_id The identifier of the property list class being created
+ * \param[in] create_data User pointer to any class creation data required
+ * \return \herr_t
+ *
+ * \details This function is called when a new property list of the class
+ * with which this function was registered is being created. The
+ * function is called after any registered parent create function is
+ * called for each property value.
+ *
+ * If the create function returns a negative value, the new list is not
+ * returned to the user and the property list creation routine returns
+ * an error value.
+ *
+ * \since 1.4.0
+ *
+ */
typedef herr_t (*H5P_cls_create_func_t)(hid_t prop_id, void *create_data);
//! <!-- [H5P_cls_create_func_t_snip] -->
//! <!-- [H5P_cls_copy_func_t_snip] -->
+/**
+ * \brief Callback function for H5Pcreate_class()
+ *
+ * \param[in] new_prop_id The identifier of the property list copy
+ * \param[in] old_prop_id The identifier of the property list being copied
+ * \param[in] copy_data User pointer to any copy data required
+ * \return \herr_t
+ *
+ * \details This function is called when an existing property list of this
+ * class is copied. The copy callback function is called after any
+ * registered parent copy callback function is called for each property
+ * value.
+ *
+ * If the copy routine returns a negative value, the new list is not
+ * returned to the user and the property list copy function returns an
+ * error value.
+ *
+ * \since 1.4.0
+ *
+ */
typedef herr_t (*H5P_cls_copy_func_t)(hid_t new_prop_id, hid_t old_prop_id, void *copy_data);
//! <!-- [H5P_cls_copy_func_t_snip] -->
//! <!-- [H5P_cls_close_func_t_snip] -->
+/**
+ * \brief Callback function for H5Pcreate_class()
+ *
+ * \param[in] prop_id The identifier of the property list class being created
+ * \param[in] close_data User pointer to any close data required
+ * \return \herr_t
+ *
+ * \details This function is called when a property list of the class
+ * with which this function was registered is being closed. The
+ * function is called after any registered parent close function is
+ * called for each property value.
+ *
+ * If the close function returns a negative value, the new list is not
+ * returned to the user and the property list close routine returns
+ * an error value.
+ *
+ * \since 1.4.0
+ *
+ */
typedef herr_t (*H5P_cls_close_func_t)(hid_t prop_id, void *close_data);
//! <!-- [H5P_cls_close_func_t_snip] -->
@@ -220,8 +343,8 @@ typedef herr_t (*H5P_cls_close_func_t)(hid_t prop_id, void *close_data);
* \param[in,out] value The value for the property
* \return \herr_t
*
- * \details The H5P_prp_cb1_t() describes the parameters used by the
- * property create,copy and close callback functions.
+ * \details The H5P_prp_cb1_t() function describes the parameters used by the
+ * property create, copy and close callback functions.
*/
typedef herr_t (*H5P_prp_cb1_t)(const char *name, size_t size, void *value);
//! <!-- [H5P_prp_cb1_t_snip] -->
@@ -236,8 +359,8 @@ typedef herr_t (*H5P_prp_cb1_t)(const char *name, size_t size, void *value);
* \param[in] value The value for the property
* \return \herr_t
*
- * \details The H5P_prp_cb2_t() describes the parameters used by the
- * property set ,copy and delete callback functions.
+ * \details The H5P_prp_cb2_t() function describes the parameters used by the
+ * property set, copy and delete callback functions.
*/
typedef herr_t (*H5P_prp_cb2_t)(hid_t prop_id, const char *name, size_t size, void *value);
//! <!-- [H5P_prp_cb2_t_snip] -->
@@ -249,6 +372,18 @@ typedef H5P_prp_cb2_t H5P_prp_delete_func_t;
typedef H5P_prp_cb1_t H5P_prp_copy_func_t;
//! <!-- [H5P_prp_compare_func_t_snip] -->
+/**
+ * \brief Callback function for comparing property values
+ *
+ * \param[in] value1 A property value
+ * \param[in] value2 A property value
+ * \param[in] size The size of the \p value1 and \p value2 buffers
+ * \return Returns a positive value if \c value1 is greater than \c value2, a
+ * negative value if \c value2 is greater than \c value1 and zero if
+ * \c value1 and \c value2 are equal.
+ *
+ * \see H5Pregister(), H5Pinsert()
+ */
typedef int (*H5P_prp_compare_func_t)(const void *value1, const void *value2, size_t size);
//! <!-- [H5P_prp_compare_func_t_snip] -->
@@ -256,6 +391,21 @@ typedef H5P_prp_cb1_t H5P_prp_close_func_t;
/* Define property list iteration function type */
//! <!-- [H5P_iterate_t_snip] -->
+/**
+ * \brief Callback function for H5Piterate()
+ *
+ * \param[in] id The identifier of a property list or property list class
+ * \param[in] name The name of the current property
+ * \param[in,out] iter_data The user context passed to H5Piterate()
+ * \return \herr_t_iter
+ *
+ * \details This function is called for each property encountered when
+ * iterating over a property list or property list class
+ * via H5Piterate().
+ *
+ * \since 1.4.0
+ *
+ */
typedef herr_t (*H5P_iterate_t)(hid_t id, const char *name, void *iter_data);
//! <!-- [H5P_iterate_t_snip] -->
@@ -321,11 +471,12 @@ typedef enum H5D_mpio_no_collective_cause_t {
H5D_MPIO_DATA_TRANSFORMS = 0x04,
/**< Collective I/O was not performed because data transforms needed to be applied */
H5D_MPIO_MPI_OPT_TYPES_ENV_VAR_DISABLED = 0x08,
- /**< \todo FIXME! */
+ /**< Collective I/O was disabled by environment variable (\Code{HDF5_MPI_OPT_TYPES}) */
H5D_MPIO_NOT_SIMPLE_OR_SCALAR_DATASPACES = 0x10,
/**< Collective I/O was not performed because one of the dataspaces was neither simple nor scalar */
H5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET = 0x20,
- H5D_MPIO_FILTERS = 0x40
+ /**< Collective I/O was not performed because the dataset was neither contiguous nor chunked */
+ H5D_MPIO_FILTERS = 0x40
} H5D_mpio_no_collective_cause_t;
//! <!-- [H5D_mpio_no_collective_cause_t_snip] -->
@@ -612,9 +763,9 @@ H5_DLL hid_t H5Pcreate(hid_t cls_id);
* those existing properties, only add or remove their own class
* properties. Property list classes defined and supported in the
* HDF5 library distribution are listed and briefly described in
- * H5Pcreate(). The \p create routine is called when a new property
- * list of this class is being created. The #H5P_cls_create_func_t
- * callback function is defined as follows:
+ * H5Pcreate(). The \p create, \p copy, \p close functions are called
+ * when a property list of the new class is created, copied, or closed,
+ * respectively.
*
* \snippet this H5P_cls_create_func_t_snip
*
@@ -1328,15 +1479,11 @@ H5_DLL htri_t H5Pisa_class(hid_t plist_id, hid_t pclass_id);
* returned in this case, the iterator cannot be restarted if
* one of the calls to its operator returns non-zero.
*
- * The prototype for the #H5P_iterate_t operator is as follows:
- * \snippet this H5P_iterate_t_snip
- *
- * The operation receives the property list or class
+ * The operation \p iter_func receives the property list or class
* identifier for the object being iterated over, \p id, the
* name of the current property within the object, \p name,
* and the pointer to the operator data passed in to H5Piterate(),
- * \p iter_data. The valid return values from an operator are
- * as follows:
+ * \p iter_data.
*
* <table>
* <tr>
@@ -1829,9 +1976,6 @@ H5_DLL herr_t H5Pget_attr_phase_change(hid_t plist_id, unsigned *max_compact, un
*
* \brief Returns information about a filter in a pipeline
*
- * \todo Signature for H5Pget_filter2 is different in H5Pocpl.c than in
- * H5Ppublic.h
- *
* \ocpl_id{plist_id}
* \param[in] idx Sequence number within the filter pipeline of the filter
* for which information is sought
@@ -2190,7 +2334,7 @@ H5_DLL herr_t H5Pset_attr_creation_order(hid_t plist_id, unsigned crt_order_flag
*/
H5_DLL herr_t H5Pset_attr_phase_change(hid_t plist_id, unsigned max_compact, unsigned min_dense);
/**
- * \ingroup OCPL
+ * \ingroup DCPL
*
* \brief Sets deflate (GNU gzip) compression method and compression level
*
@@ -2199,6 +2343,8 @@ H5_DLL herr_t H5Pset_attr_phase_change(hid_t plist_id, unsigned max_compact, uns
*
* \return \herr_t
*
+ * \par_compr_note
+ *
* \details H5Pset_deflate() sets the deflate compression method and the
* compression level, \p level, for a dataset or group creation
* property list, \p plist_id.
@@ -3751,17 +3897,14 @@ H5_DLL herr_t H5Pset_alignment(hid_t fapl_id, hsize_t threshold, hsize_t alignme
*
* \note Note: Raw dataset chunk caching is not currently
* supported when using the MPI I/O and MPI POSIX file drivers
- * in read/write mode; see H5Pset_fapl_mpio() and
- * H5Pset_fapl_mpiposix(), respectively. When using one of these
- * file drivers, all calls to H5Dread() and H5Dwrite() will access
+ * in read/write mode; see H5Pset_fapl_mpio(). When using this
+ * file driver, all calls to H5Dread() and H5Dwrite() will access
* the disk directly, and H5Pset_cache() will have no effect on
* performance.
*
* \note Raw dataset chunk caching is supported when these drivers are
* used in read-only mode.
*
- * \todo Check on H5Pset_fapl_mpio() and H5Pset_fapl_mpiposix().
- *
* \version 1.8.0 The use of the \p mdc_nelmts parameter was discontinued.
* Metadata cache configuration is managed with
* H5Pset_mdc_config() and H5Pget_mdc_config().
@@ -3869,7 +4012,7 @@ H5_DLL herr_t H5Pset_driver(hid_t plist_id, hid_t driver_id, const void *driver_
* The <em>external link open file cache</em> holds files open after
* they have been accessed via an external link. This cache reduces
* the number of times such files are opened when external links are
- * accessed repeatedly and can siginificantly improves performance in
+ * accessed repeatedly and can significantly improves performance in
* certain heavy-use situations and when low-level file opens or closes
* are expensive.
*
@@ -4638,6 +4781,7 @@ H5_DLL herr_t H5Pget_alloc_time(hid_t plist_id, H5D_alloc_time_t *alloc_time /*o
*/
H5_DLL int H5Pget_chunk(hid_t plist_id, int max_ndims, hsize_t dim[] /*out*/);
/**
+ *
* \ingroup DCPL
*
* \brief Returns information about an external file
@@ -5047,6 +5191,8 @@ H5_DLL herr_t H5Pset_fill_value(hid_t plist_id, hid_t type_id, const void *value
*
* \return \herr_t
*
+ * \par_compr_note
+ *
* \details H5Pset_shuffle() sets the shuffle filter, #H5Z_FILTER_SHUFFLE,
* in the dataset creation property list \p plist_id. The shuffle
* filter de-interlaces a block of data by reordering the bytes.
@@ -5116,6 +5262,8 @@ H5_DLL herr_t H5Pset_layout(hid_t plist_id, H5D_layout_t layout);
*
* \return \herr_t
*
+ * \par_compr_note
+ *
* \details H5Pset_nbit() sets the N-Bit filter, #H5Z_FILTER_NBIT, in the
* dataset creation property list \p plist_id.
*
@@ -5138,10 +5286,10 @@ H5_DLL herr_t H5Pset_layout(hid_t plist_id, H5D_layout_t layout);
* <td>byte 0</td>
* </tr>
* <tr>
- * <td>????????</td>
- * <td>????SPPP</td>
- * <td>PPPPPPPP</td>
- * <td>PPPP????</td>
+ * <td> ???????? </td>
+ * <td> ????SPPP </td>
+ * <td> PPPPPPPP </td>
+ * <td> PPPP???? </td>
* </tr>
* </table>
* Note: S - sign bit, P - significant bit, ? - padding bit; For
@@ -5209,6 +5357,8 @@ H5_DLL herr_t H5Pset_nbit(hid_t plist_id);
*
* \return \herr_t
*
+ * \par_compr_note
+ *
* \details H5Pset_scaleoffset() sets the scale-offset filter,
* #H5Z_FILTER_SCALEOFFSET, for a dataset.
*
@@ -5318,6 +5468,8 @@ H5_DLL herr_t H5Pset_scaleoffset(hid_t plist_id, H5Z_SO_scale_type_t scale_type,
*
* \return \herr_t
*
+ * \par_compr_note
+ *
* \details H5Pset_szip() sets an SZIP compression filter, #H5Z_FILTER_SZIP,
* for a dataset. SZIP is a compression method designed for use with
* scientific data.
@@ -5800,10 +5952,6 @@ H5_DLL size_t H5Pget_buffer(hid_t plist_id, void **tconv /*out*/, void **bkg /*o
* If an error occurs, the buffer pointed to by \p expression is
* unchanged, and the function returns a negative value.
*
- * \par Example
- * An example snippet from examples/h5_dtransform.c:
- * \snippet h5_dtransform.c H5Pget_data_transform_snip
- *
* \since 1.8.0
*
*/
@@ -5867,8 +6015,11 @@ H5_DLL herr_t H5Pget_hyper_vector_size(hid_t fapl_id, size_t *size /*out*/);
* \details H5Pget_preserve() checks the status of the dataset transfer
* property list.
*
+ * \since 1.0.0
+ *
* \version 1.6.0 The flag parameter was changed from INTEGER to LOGICAL to
* better match the C API. (Fortran 90)
+ * \version 1.8.2 Deprecated.
*
*/
H5_DLL int H5Pget_preserve(hid_t plist_id);
@@ -5896,6 +6047,8 @@ H5_DLL int H5Pget_preserve(hid_t plist_id);
*
* Please refer to the function H5Pset_type_conv_cb() for more details.
*
+ * \since 1.8.0
+ *
*/
H5_DLL herr_t H5Pget_type_conv_cb(hid_t dxpl_id, H5T_conv_except_func_t *op, void **operate_data);
/**
@@ -5919,6 +6072,8 @@ H5_DLL herr_t H5Pget_type_conv_cb(hid_t dxpl_id, H5T_conv_except_func_t *op, voi
* H5Pset_vlen_mem_manager(), returning the parameters set by
* that function.
*
+ * \since 1.0.0
+ *
*/
H5_DLL herr_t H5Pget_vlen_mem_manager(hid_t plist_id, H5MM_allocate_t *alloc_func, void **alloc_info,
H5MM_free_t *free_func, void **free_info);
@@ -6162,8 +6317,9 @@ H5_DLL herr_t H5Pset_hyper_vector_size(hid_t plist_id, size_t size);
* I/O pipeline treats the destination datapoints as completely
* uninitialized.
*
- * \todo Add missing version information: introduction, deprecation, etc.
- * Why is the declaration not in the deprecated section?
+ * \since 1.0.0
+ *
+ * \version 1.8.2 Deprecated.
*
*/
H5_DLL herr_t H5Pset_preserve(hid_t plist_id, hbool_t status);
@@ -6191,7 +6347,7 @@ H5_DLL herr_t H5Pset_preserve(hid_t plist_id, hbool_t status);
* function prototype is as follows:
* \snippet H5Tpublic.h H5T_conv_except_func_t_snip
*
- * \todo Add version information.
+ * \since 1.8.0
*
*/
H5_DLL herr_t H5Pset_type_conv_cb(hid_t dxpl_id, H5T_conv_except_func_t op, void *operate_data);
@@ -6241,7 +6397,8 @@ H5_DLL herr_t H5Pset_type_conv_cb(hid_t dxpl_id, H5T_conv_except_func_t op, void
* set to \c NULL and the \p alloc_info and \p free_info parameters are
* ignored.
*
- * \todo Add version information.
+ * \since 1.0.0
+ *
*/
H5_DLL herr_t H5Pset_vlen_mem_manager(hid_t plist_id, H5MM_allocate_t alloc_func, void *alloc_info,
H5MM_free_t free_func, void *free_info);
@@ -7720,9 +7877,6 @@ H5_DLL herr_t H5Pset_mcdt_search_cb(hid_t plist_id, H5O_mcdt_search_cb_t func, v
* The #H5P_prp_cb2_t is as follows:
* \snippet this H5P_prp_cb2_t_snip
*
- *
- * \cpp_c_api_note
- *
*/
/* Function prototypes */
@@ -7836,8 +7990,7 @@ H5_DLL herr_t H5Pregister1(hid_t cls_id, const char *name, size_t size, void *de
*
* The #H5P_prp_cb2_t is as follows:
* \snippet this H5P_prp_cb2_t_snip
-
- * \cpp_c_api_note
+ *
*/
H5_DLL herr_t H5Pinsert1(hid_t plist_id, const char *name, size_t size, void *value,
H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get,
diff --git a/src/H5Rpublic.h b/src/H5Rpublic.h
index 4ba7da1..a84e4e8 100644
--- a/src/H5Rpublic.h
+++ b/src/H5Rpublic.h
@@ -11,6 +11,12 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/*
+ * This file contains public declarations for the H5R module.
+ */
+#ifndef H5Rpublic_H
+#define H5Rpublic_H
+
/**
* \defgroup H5R H5R
*
@@ -18,14 +24,28 @@
* be HDF5 objects, attributes, and selections on datasets a.k.a. dataset
* regions.
*
+ * <table>
+ * <tr><th>Create</th><th>Read</th></tr>
+ * <tr valign="top">
+ * <td>
+ * \snippet{lineno} H5R_examples.c create
+ * </td>
+ * <td>
+ * \snippet{lineno} H5R_examples.c read
+ * </td>
+ * <tr><th>Update</th><th>Delete</th></tr>
+ * <tr valign="top">
+ * <td>
+ * \snippet{lineno} H5R_examples.c update
+ * </td>
+ * <td>
+ * \snippet{lineno} H5R_examples.c delete
+ * </td>
+ * </tr>
+ * </table>
+ *
*/
-/*
- * This file contains public declarations for the H5R module.
- */
-#ifndef H5Rpublic_H
-#define H5Rpublic_H
-
/* Public headers needed by this file */
#include "H5public.h"
#include "H5Gpublic.h"
@@ -62,7 +82,7 @@ typedef enum {
H5R_BADTYPE = (-1), /**< Invalid reference type */
H5R_OBJECT, /**< Object reference */
H5R_DATASET_REGION, /**< Dataset Region Reference */
- H5R_MAXTYPE /**< Highest type (Invalid as true type) */
+ H5R_MAXTYPE /**< Highest type (invalid) */
} H5R_type_t;
//! <!-- [H5R_type_t_snip] -->
diff --git a/src/H5Spkg.h b/src/H5Spkg.h
index e2eae2a..f1a7ba5 100644
--- a/src/H5Spkg.h
+++ b/src/H5Spkg.h
@@ -206,12 +206,15 @@ typedef struct {
/* Selection information object */
typedef struct {
const H5S_select_class_t *type; /* Pointer to selection's class info */
- hbool_t offset_changed; /* Indicate that the offset for the selection has been changed */
- hssize_t offset[H5S_MAX_RANK]; /* Offset within the extent */
- hsize_t num_elem; /* Number of elements in selection */
+
+ hbool_t offset_changed; /* Indicate that the offset for the selection has been changed */
+ hssize_t offset[H5S_MAX_RANK]; /* Offset within the extent */
+
+ hsize_t num_elem; /* Number of elements in selection */
+
union {
- H5S_pnt_list_t * pnt_lst; /* List of selected points (order is important) */
- H5S_hyper_sel_t *hslab; /* Info about hyperslab selections */
+ H5S_pnt_list_t * pnt_lst; /* Info about list of selected points (order is important) */
+ H5S_hyper_sel_t *hslab; /* Info about hyperslab selection */
} sel_info;
} H5S_select_t;
diff --git a/src/H5Spublic.h b/src/H5Spublic.h
index dbe0a51..18b10a8 100644
--- a/src/H5Spublic.h
+++ b/src/H5Spublic.h
@@ -11,6 +11,12 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/*
+ * This file contains public declarations for the H5S module.
+ */
+#ifndef H5Spublic_H
+#define H5Spublic_H
+
/**\defgroup H5S H5S
*
* Use the functions in this module to manage HDF5 dataspaces \Emph{and} selections.
@@ -23,14 +29,28 @@
* using \Emph{selections}. Furthermore, certain set operations are supported
* for selections.
*
+ * <table>
+ * <tr><th>Create</th><th>Read</th></tr>
+ * <tr valign="top">
+ * <td>
+ * \snippet{lineno} H5S_examples.c create
+ * </td>
+ * <td>
+ * \snippet{lineno} H5S_examples.c read
+ * </td>
+ * <tr><th>Update</th><th>Delete</th></tr>
+ * <tr valign="top">
+ * <td>
+ * \snippet{lineno} H5S_examples.c update
+ * </td>
+ * <td>
+ * \snippet{lineno} H5S_examples.c delete
+ * </td>
+ * </tr>
+ * </table>
+ *
*/
-/*
- * This file contains public declarations for the H5S module.
- */
-#ifndef H5Spublic_H
-#define H5Spublic_H
-
/* Public headers needed by this file */
#include "H5public.h"
#include "H5Ipublic.h"
@@ -39,71 +59,90 @@
#define H5S_ALL (hid_t)0
#define H5S_UNLIMITED ((hsize_t)(hssize_t)(-1))
-/* Define user-level maximum number of dimensions */
+/**
+ * The maximum dataspace rank or number of dimensions
+ */
#define H5S_MAX_RANK 32
-/* Different types of dataspaces */
+/**
+ * Types of dataspaces
+ */
typedef enum H5S_class_t {
- H5S_NO_CLASS = -1, /*error */
- H5S_SCALAR = 0, /*scalar variable */
- H5S_SIMPLE = 1, /*simple dataspace */
- H5S_NULL = 2 /*null dataspace */
+ H5S_NO_CLASS = -1, /**< Error */
+ H5S_SCALAR = 0, /**< Singleton (scalar) */
+ H5S_SIMPLE = 1, /**< Regular grid */
+ H5S_NULL = 2 /**< Empty set */
} H5S_class_t;
-/* Different ways of combining selections */
+/**
+ * Different ways of combining selections
+ */
typedef enum H5S_seloper_t {
- H5S_SELECT_NOOP = -1, /* error */
- H5S_SELECT_SET = 0, /* Select "set" operation */
- H5S_SELECT_OR, /* Binary "or" operation for hyperslabs
+ H5S_SELECT_NOOP = -1, /**< Error */
+ H5S_SELECT_SET = 0, /**< Select "set" operation */
+ H5S_SELECT_OR, /**< Binary "or" operation for hyperslabs
* (add new selection to existing selection)
+ * \code
* Original region: AAAAAAAAAA
* New region: BBBBBBBBBB
* A or B: CCCCCCCCCCCCCCCC
+ * \endcode
*/
- H5S_SELECT_AND, /* Binary "and" operation for hyperslabs
+ H5S_SELECT_AND, /**< Binary "and" operation for hyperslabs
* (only leave overlapped regions in selection)
+ * \code
* Original region: AAAAAAAAAA
* New region: BBBBBBBBBB
* A and B: CCCC
+ * \endcode
*/
- H5S_SELECT_XOR, /* Binary "xor" operation for hyperslabs
+ H5S_SELECT_XOR, /**< Binary "xor" operation for hyperslabs
* (only leave non-overlapped regions in selection)
+ * \code
* Original region: AAAAAAAAAA
* New region: BBBBBBBBBB
* A xor B: CCCCCC CCCCCC
+ * \endcode
*/
- H5S_SELECT_NOTB, /* Binary "not" operation for hyperslabs
+ H5S_SELECT_NOTB, /**< Binary "not" operation for hyperslabs
* (only leave non-overlapped regions in original selection)
+ * \code
* Original region: AAAAAAAAAA
* New region: BBBBBBBBBB
* A not B: CCCCCC
+ * \endcode
*/
- H5S_SELECT_NOTA, /* Binary "not" operation for hyperslabs
+ H5S_SELECT_NOTA, /**< Binary "not" operation for hyperslabs
* (only leave non-overlapped regions in new selection)
+ * \code
* Original region: AAAAAAAAAA
* New region: BBBBBBBBBB
* B not A: CCCCCC
+ * \endcode
*/
- H5S_SELECT_APPEND, /* Append elements to end of point selection */
- H5S_SELECT_PREPEND, /* Prepend elements to beginning of point selection */
- H5S_SELECT_INVALID /* Invalid upper bound on selection operations */
+ H5S_SELECT_APPEND, /**< Append elements to end of point selection */
+ H5S_SELECT_PREPEND, /**< Prepend elements to beginning of point selection */
+ H5S_SELECT_INVALID /**< Invalid upper bound on selection operations */
} H5S_seloper_t;
-/* Enumerated type for the type of selection */
+/**
+ * Selection type
+ */
typedef enum {
- H5S_SEL_ERROR = -1, /* Error */
- H5S_SEL_NONE = 0, /* Nothing selected */
- H5S_SEL_POINTS = 1, /* Points / elements selected */
- H5S_SEL_HYPERSLABS = 2, /* Hyperslab selected */
- H5S_SEL_ALL = 3, /* Entire extent selected */
- H5S_SEL_N /*THIS MUST BE LAST */
+ H5S_SEL_ERROR = -1, /**< Error */
+ H5S_SEL_NONE = 0, /**< Empty selection */
+ H5S_SEL_POINTS = 1, /**< Set of points */
+ H5S_SEL_HYPERSLABS = 2, /**< Hyperslab */
+ H5S_SEL_ALL = 3, /**< Everything */
+ H5S_SEL_N /**< Sentinel \internal THIS MUST BE LAST */
} H5S_sel_type;
#ifdef __cplusplus
extern "C" {
#endif
-/* Operations on dataspaces */
+/* Operations on dataspaces, dataspace selections and selection iterators */
+
/**
* \ingroup H5S
*
@@ -257,31 +296,31 @@ H5_DLL hid_t H5Sdecode(const void *buf);
*
* \space_id{obj_id}
* \param[in,out] buf Buffer for the object to be encoded into;
- * If the provided buffer is NULL, only the size of
- * buffer needed is returned through \p nalloc.
+ * If the provided buffer is NULL, only the size
+ * of buffer needed is returned through \p nalloc.
* \param[in,out] nalloc The size of the allocated buffer
*
* \return \herr_t
*
* \details Given the data space identifier \p obj_id, H5Sencode() converts
- * a data space description into binary form in a buffer. Using
- * this binary form in the buffer, a data space object can be
- * reconstructed using H5Sdecode() to return a new object handle
- * (\p hid_t) for this data space.
+ * a data space description into binary form in a buffer. Using this
+ * binary form in the buffer, a data space object can be
+ * reconstructed with H5Sdecode() to return a new object handle
+ * (#hid_t) for this data space.
*
- * A preliminary H5Sencode() call can be made to find out the size
- * of the buffer needed. This value is returned as \p nalloc. That
- * value can then be assigned to \p nalloc for a second H5Sencode1()
- * call, which will retrieve the actual encoded object.
+ * A preliminary H5Sencode() call can be made to determine the
+ * size of the buffer needed. This value is returned in \p nalloc.
+ * That value can then be assigned to \p nalloc for a second
+ * H5Sencode()call, which will retrieve the actual encoded object.
*
- * If the library finds out \p nalloc is not big enough for the
+ * If the library determines that \p nalloc is not big enough for the
* object, it simply returns the size of the buffer needed through
* \p nalloc without encoding the provided buffer.
*
- * The types of data space addressed in this function are null,
- * scalar, and simple space. For a simple data space, the information
- * on the selection, for example, hyperslab selection, is also
- * encoded and decoded. A complex data space has not been
+ * The types of data space that are addressed in this function are
+ * null, scalar, and simple space. For a simple data space, the
+ * information on the selection, for example, hyperslab selection,
+ * is also encoded and decoded. A complex data space has not been
* implemented in the library.
*
* \since 1.8.0
diff --git a/src/H5TSprivate.h b/src/H5TSprivate.h
index a0cb353..485b173 100644
--- a/src/H5TSprivate.h
+++ b/src/H5TSprivate.h
@@ -13,11 +13,9 @@
/*-------------------------------------------------------------------------
*
- * Created: H5TSprivate.h
- * May 2 2000
- * Chee Wai LEE
+ * Created: H5TSprivate.h
*
- * Purpose: Private non-prototype header.
+ * Purpose: Thread-safety abstractions used by the library
*
*-------------------------------------------------------------------------
*/
@@ -25,9 +23,10 @@
#define H5TSprivate_H_
#ifdef H5_HAVE_THREADSAFE
+
/* Public headers needed by this file */
#ifdef LATER
-#include "H5TSpublic.h" /*Public API prototypes */
+#include "H5TSpublic.h" /* Public API prototypes */
#endif /* LATER */
#ifdef H5_HAVE_WIN_THREADS
@@ -38,6 +37,8 @@
typedef struct H5TS_mutex_struct {
CRITICAL_SECTION CriticalSection;
} H5TS_mutex_t;
+
+/* Portability wrappers around Windows Threads types */
typedef CRITICAL_SECTION H5TS_mutex_simple_t;
typedef HANDLE H5TS_thread_t;
typedef HANDLE H5TS_attr_t;
@@ -50,7 +51,7 @@ typedef INIT_ONCE H5TS_once_t;
#define H5TS_SCOPE_PROCESS 0
#define H5TS_CALL_CONV WINAPI
-/* Functions */
+/* Portability function aliases */
#define H5TS_get_thread_local_value(key) TlsGetValue(key)
#define H5TS_set_thread_local_value(key, value) TlsSetValue(key, value)
#define H5TS_attr_init(attr_ptr) 0
@@ -80,6 +81,8 @@ typedef struct H5TS_mutex_struct {
pthread_cond_t cond_var; /* condition variable */
unsigned int lock_count;
} H5TS_mutex_t;
+
+/* Portability wrappers around pthread types */
typedef pthread_t H5TS_thread_t;
typedef pthread_attr_t H5TS_attr_t;
typedef pthread_mutex_t H5TS_mutex_simple_t;
@@ -91,7 +94,7 @@ typedef pthread_once_t H5TS_once_t;
#define H5TS_SCOPE_PROCESS PTHREAD_SCOPE_PROCESS
#define H5TS_CALL_CONV /* unused - Windows only */
-/* Functions */
+/* Portability function aliases */
#define H5TS_get_thread_local_value(key) pthread_getspecific(key)
#define H5TS_set_thread_local_value(key, value) pthread_setspecific(key, value)
#define H5TS_attr_init(attr_ptr) pthread_attr_init((attr_ptr))
@@ -101,6 +104,8 @@ typedef pthread_once_t H5TS_once_t;
#define H5TS_mutex_init(mutex) pthread_mutex_init(mutex, NULL)
#define H5TS_mutex_lock_simple(mutex) pthread_mutex_lock(mutex)
#define H5TS_mutex_unlock_simple(mutex) pthread_mutex_unlock(mutex)
+
+/* Pthread-only routines */
H5_DLL uint64_t H5TS_thread_id(void);
#endif /* H5_HAVE_WIN_THREADS */
@@ -128,6 +133,7 @@ H5_DLL H5TS_thread_t H5TS_create_thread(void *(*func)(void *), H5TS_attr_t *attr
#else /* H5_HAVE_THREADSAFE */
+/* Non-threadsafe code needs this */
#define H5TS_thread_id() ((uint64_t)0)
#endif /* H5_HAVE_THREADSAFE */
diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h
index 53112f7..564de61 100644
--- a/src/H5Tpkg.h
+++ b/src/H5Tpkg.h
@@ -116,7 +116,7 @@
#endif
/* Define an internal macro for converting unsigned long long to long double. SGI compilers give
- * some incorect conversion. 64-bit Solaris does different rounding. Windows Visual Studio 6 does
+ * some incorrect conversion. 64-bit Solaris does different rounding. Windows Visual Studio 6 does
* not support unsigned long long. For FreeBSD(sleipnir), the last 2 bytes of mantissa are lost when
* compiler tries to do the conversion. For Cygwin, compiler doesn't do rounding correctly.
* Mac OS 10.4 gives some incorrect result. */
diff --git a/src/H5Tprivate.h b/src/H5Tprivate.h
index b7c203c..7ec8aff 100644
--- a/src/H5Tprivate.h
+++ b/src/H5Tprivate.h
@@ -17,11 +17,11 @@
#ifndef H5Tprivate_H
#define H5Tprivate_H
-/* Get package's public header */
+/* Include package's public header */
#include "H5Tpublic.h"
/* Other public headers needed by this file */
-#include "H5MMpublic.h" /* Memory management */
+#include "H5MMpublic.h" /* Memory management */
/* Private headers needed by this file */
#include "H5private.h" /* Generic Functions */
diff --git a/src/H5Tpublic.h b/src/H5Tpublic.h
index b5dc566..8485bd9 100644
--- a/src/H5Tpublic.h
+++ b/src/H5Tpublic.h
@@ -11,6 +11,12 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/*
+ * This file contains public declarations for the H5T module.
+ */
+#ifndef H5Tpublic_H
+#define H5Tpublic_H
+
/**\defgroup H5T H5T
*
* Use the functions in this module to manage HDF5 datatypes.
@@ -24,6 +30,26 @@
* to HDF5 files and linked to groups as HDF5 datatype objects or so-called
* \Emph{committed datatypes}.
*
+ * <table>
+ * <tr><th>Create</th><th>Read</th></tr>
+ * <tr valign="top">
+ * <td>
+ * \snippet{lineno} H5T_examples.c create
+ * </td>
+ * <td>
+ * \snippet{lineno} H5T_examples.c read
+ * </td>
+ * <tr><th>Update</th><th>Delete</th></tr>
+ * <tr valign="top">
+ * <td>
+ * \snippet{lineno} H5T_examples.c update
+ * </td>
+ * <td>
+ * \snippet{lineno} H5T_examples.c delete
+ * </td>
+ * </tr>
+ * </table>
+ *
* \defgroup ARRAY Array Datatypes
* \ingroup H5T
* \defgroup ATOM Atomic Datatypes
@@ -91,12 +117,6 @@
*
*/
-/*
- * This file contains public declarations for the H5T module.
- */
-#ifndef H5Tpublic_H
-#define H5Tpublic_H
-
/* Public headers needed by this file */
#include "H5public.h"
#include "H5Ipublic.h"
@@ -228,7 +248,7 @@ typedef enum H5T_pad_t {
H5T_PAD_ONE = 1, /**< always set to one */
H5T_PAD_BACKGROUND = 2, /**< set to background value */
- H5T_NPAD = 3 /**< sentinal: THIS MUST BE LAST */
+ H5T_NPAD = 3 /**< sentinel: THIS MUST BE LAST */
} H5T_pad_t;
//! <!-- [H5T_pad_t_snip] -->
@@ -276,9 +296,9 @@ typedef enum H5T_pers_t {
*/
//! <!-- [H5T_direction_t_snip] -->
typedef enum H5T_direction_t {
- H5T_DIR_DEFAULT = 0, /**< default direction is inscendent */
- H5T_DIR_ASCEND = 1, /**< in inscendent order */
- H5T_DIR_DESCEND = 2 /**< in descendent order */
+ H5T_DIR_DEFAULT = 0, /**< default direction is ascending */
+ H5T_DIR_ASCEND = 1, /**< in ascending order */
+ H5T_DIR_DESCEND = 2 /**< in descending order */
} H5T_direction_t;
//! <!-- [H5T_direction_t_snip] -->
@@ -359,7 +379,7 @@ typedef herr_t (*H5T_conv_t)(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, siz
* \returns Valid callback function return values are #H5T_CONV_ABORT,
* #H5T_CONV_UNHANDLED and #H5T_CONV_HANDLED.
*
- * \details If an exception like overflow happenes during conversion, this
+ * \details If an exception like overflow happens during conversion, this
* function is called if it's registered through H5Pset_type_conv_cb().
*
*/
@@ -1278,7 +1298,7 @@ H5_DLL herr_t H5Tlock(hid_t type_id);
* the link(s) by which the new committed datatype is accessed and
* the creation of any intermediate groups that may be missing.
*
- * Once commited, this datatype may be used to define the datatype
+ * Once committed, this datatype may be used to define the datatype
* of any other dataset or attribute in the file.
*
* This function will not accept a datatype that cannot actually hold
@@ -1288,7 +1308,7 @@ H5_DLL herr_t H5Tlock(hid_t type_id);
* Committed datatypes are sometimes referred to as named datatypes.
*
* \version 1.8.7 Function modified in this release to reject datatypes that
- * will not accomodate actual data, such as a compound datatype
+ * will not accommodate actual data, such as a compound datatype
* with no fields or an enumerated datatype with no members.
*
* \since 1.8.0
@@ -1366,7 +1386,7 @@ H5_DLL hid_t H5Topen2(hid_t loc_id, const char *name, hid_t tapl_id);
* fields and enumerated datatypes with no members.
*
* \version 1.8.7 Function modified in this release to reject datatypes that
- * will not accomodate actual data, such as a compound datatype
+ * will not accommodate actual data, such as a compound datatype
* with no fields or an enumerated datatype with no members.
*
* \since 1.2.0
@@ -2698,7 +2718,6 @@ H5_DLL herr_t H5Tset_cset(hid_t type_id, H5T_cset_t cset);
*/
H5_DLL herr_t H5Tset_strpad(hid_t type_id, H5T_str_t strpad);
-/* Type conversion database */
/**
* \ingroup CONV
*
diff --git a/src/H5Zpublic.h b/src/H5Zpublic.h
index e1b3312..bb92595 100644
--- a/src/H5Zpublic.h
+++ b/src/H5Zpublic.h
@@ -11,6 +11,13 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/* Programmer: Robb Matzke
+ * Thursday, April 16, 1998
+ */
+
+#ifndef H5Zpublic_H
+#define H5Zpublic_H
+
/**\defgroup H5Z H5Z
*
* Use the functions in this module to manage HDF5 filters.
@@ -25,6 +32,27 @@
*
* Filters are deleted by unregistering.
*
+ * <table>
+ * <tr><th>Create</th><th>Read</th></tr>
+ * <tr valign="top">
+ * <td>
+ * \snippet{lineno} H5Z_examples.c filter
+ * \snippet{lineno} H5Z_examples.c create
+ * </td>
+ * <td>
+ * \snippet{lineno} H5Z_examples.c read
+ * </td>
+ * </tr>
+ * <tr><th>Update</th><th>Delete</th></tr>
+ * <tr valign="top">
+ * <td>
+ * \snippet{lineno} H5Z_examples.c update
+ * </td>
+ * <td>
+ * \snippet{lineno} H5Z_examples.c delete
+ * </tr>
+ * </table>
+ *
* HDF5 supports a filter pipeline that provides the capability for standard and
* customized raw data processing during I/O operations. HDF5 is distributed
* with a small set of standard filters such as compression (gzip, SZIP, and a
@@ -78,13 +106,6 @@
*
*/
-/* Programmer: Robb Matzke
- * Thursday, April 16, 1998
- */
-
-#ifndef H5Zpublic_H
-#define H5Zpublic_H
-
/* Public headers needed by this file */
#include "H5public.h"
@@ -754,4 +775,5 @@ typedef struct H5Z_class1_t {
#ifdef __cplusplus
}
#endif
-#endif
+
+#endif /* _H5Zpublic_H */
diff --git a/src/H5private.h b/src/H5private.h
index ef0bd82..d388fbd 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -82,9 +82,9 @@
#endif
/*
- * The `struct stat' data type for stat() and fstat(). This is a Posix file
- * but often apears on non-Posix systems also. The `struct stat' is required
- * for hdf5 to compile, although only a few fields are actually used.
+ * The `struct stat' data type for stat() and fstat(). This is a POSIX file
+ * but often apears on non-POSIX systems also. The `struct stat' is required
+ * for HDF5 to compile, although only a few fields are actually used.
*/
#ifdef H5_HAVE_SYS_STAT_H
#include <sys/stat.h>
@@ -164,6 +164,7 @@
#define H5_DEFAULT_VFD H5FD_SEC2
#ifdef H5_HAVE_WIN32_API
+
/* The following two defines must be before any windows headers are included */
#define WIN32_LEAN_AND_MEAN /* Exclude rarely-used stuff from Windows headers */
#define NOGDI /* Exclude Graphic Display Interface macros */
@@ -581,259 +582,259 @@ typedef struct {
#ifndef HDabort
#define HDabort() abort()
-#endif /* HDabort */
+#endif
#ifndef HDabs
#define HDabs(X) abs(X)
-#endif /* HDabs */
+#endif
#ifndef HDaccess
#define HDaccess(F, M) access(F, M)
-#endif /* HDaccess */
+#endif
#ifndef HDacos
#define HDacos(X) acos(X)
-#endif /* HDacos */
+#endif
#ifndef HDalarm
#ifdef H5_HAVE_ALARM
#define HDalarm(N) alarm(N)
-#else /* H5_HAVE_ALARM */
+#else
#define HDalarm(N) (0)
-#endif /* H5_HAVE_ALARM */
-#endif /* HDalarm */
+#endif
+#endif
#ifndef HDasctime
#define HDasctime(T) asctime(T)
-#endif /* HDasctime */
+#endif
#ifndef HDasin
#define HDasin(X) asin(X)
-#endif /* HDasin */
+#endif
#ifndef HDasprintf
#define HDasprintf asprintf /*varargs*/
-#endif /* HDasprintf */
+#endif
#ifndef HDassert
#define HDassert(X) assert(X)
-#endif /* HDassert */
+#endif
#ifndef HDatan
#define HDatan(X) atan(X)
-#endif /* HDatan */
+#endif
#ifndef HDatan2
#define HDatan2(X, Y) atan2(X, Y)
-#endif /* HDatan2 */
+#endif
#ifndef HDatexit
#define HDatexit(F) atexit(F)
-#endif /* HDatexit */
+#endif
#ifndef HDatof
#define HDatof(S) atof(S)
-#endif /* HDatof */
+#endif
#ifndef HDatoi
#define HDatoi(S) atoi(S)
-#endif /* HDatoi */
+#endif
#ifndef HDatol
#define HDatol(S) atol(S)
-#endif /* HDatol */
+#endif
#ifndef HDatoll
#define HDatoll(S) atoll(S)
-#endif /* HDatol */
+#endif
#ifndef HDbsearch
#define HDbsearch(K, B, N, Z, F) bsearch(K, B, N, Z, F)
-#endif /* HDbsearch */
+#endif
#ifndef HDcalloc
#define HDcalloc(N, Z) calloc(N, Z)
-#endif /* HDcalloc */
+#endif
#ifndef HDceil
#define HDceil(X) ceil(X)
-#endif /* HDceil */
+#endif
#ifndef HDcfgetispeed
#define HDcfgetispeed(T) cfgetispeed(T)
-#endif /* HDcfgetispeed */
+#endif
#ifndef HDcfgetospeed
#define HDcfgetospeed(T) cfgetospeed(T)
-#endif /* HDcfgetospeed */
+#endif
#ifndef HDcfsetispeed
#define HDcfsetispeed(T, S) cfsetispeed(T, S)
-#endif /* HDcfsetispeed */
+#endif
#ifndef HDcfsetospeed
#define HDcfsetospeed(T, S) cfsetospeed(T, S)
-#endif /* HDcfsetospeed */
+#endif
#ifndef HDchdir
#define HDchdir(S) chdir(S)
-#endif /* HDchdir */
+#endif
#ifndef HDchmod
#define HDchmod(S, M) chmod(S, M)
-#endif /* HDchmod */
+#endif
#ifndef HDchown
#define HDchown(S, O, G) chown(S, O, G)
-#endif /* HDchown */
+#endif
#ifndef HDclearerr
#define HDclearerr(F) clearerr(F)
-#endif /* HDclearerr */
+#endif
#ifndef HDclock
#define HDclock() clock()
-#endif /* HDclock */
+#endif
#ifndef HDclose
#define HDclose(F) close(F)
-#endif /* HDclose */
+#endif
#ifndef HDclosedir
#define HDclosedir(D) closedir(D)
-#endif /* HDclosedir */
+#endif
#ifndef HDcos
#define HDcos(X) cos(X)
-#endif /* HDcos */
+#endif
#ifndef HDcosh
#define HDcosh(X) cosh(X)
-#endif /* HDcosh */
+#endif
#ifndef HDcreat
#define HDcreat(S, M) creat(S, M)
-#endif /* HDcreat */
+#endif
#ifndef HDctermid
#define HDctermid(S) ctermid(S)
-#endif /* HDctermid */
+#endif
#ifndef HDctime
#define HDctime(T) ctime(T)
-#endif /* HDctime */
+#endif
#ifndef HDcuserid
#define HDcuserid(S) cuserid(S)
-#endif /* HDcuserid */
+#endif
#ifndef HDdifftime
#ifdef H5_HAVE_DIFFTIME
#define HDdifftime(X, Y) difftime(X, Y)
-#else /* H5_HAVE_DIFFTIME */
+#else
#define HDdifftime(X, Y) ((double)(X) - (double)(Y))
-#endif /* H5_HAVE_DIFFTIME */
-#endif /* HDdifftime */
+#endif
+#endif
#ifndef HDdiv
#define HDdiv(X, Y) div(X, Y)
-#endif /* HDdiv */
+#endif
#ifndef HDdup
#define HDdup(F) dup(F)
-#endif /* HDdup */
+#endif
#ifndef HDdup2
#define HDdup2(F, I) dup2(F, I)
-#endif /* HDdup2 */
+#endif
/* execl() variable arguments */
/* execle() variable arguments */
/* execlp() variable arguments */
#ifndef HDexecv
#define HDexecv(S, AV) execv(S, AV)
-#endif /* HDexecv */
+#endif
#ifndef HDexecve
#define HDexecve(S, AV, E) execve(S, AV, E)
-#endif /* HDexecve */
+#endif
#ifndef HDexecvp
#define HDexecvp(S, AV) execvp(S, AV)
-#endif /* HDexecvp */
+#endif
#ifndef HDexit
#define HDexit(N) exit(N)
-#endif /* HDexit */
+#endif
#ifndef HD_exit
#define HD_exit(N) _exit(N)
-#endif /* HD_exit */
+#endif
#ifndef HDexp
#define HDexp(X) exp(X)
-#endif /* HDexp */
+#endif
#ifndef HDexp2
#define HDexp2(X) exp2(X)
-#endif /* HDexp2 */
+#endif
#ifndef HDfabs
#define HDfabs(X) fabs(X)
-#endif /* HDfabs */
+#endif
/* use ABS() because fabsf() fabsl() are not common yet. */
#ifndef HDfabsf
#define HDfabsf(X) ABS(X)
-#endif /* HDfabsf */
+#endif
#ifndef HDfabsl
#define HDfabsl(X) ABS(X)
-#endif /* HDfabsl */
+#endif
#ifndef HDfclose
#define HDfclose(F) fclose(F)
-#endif /* HDfclose */
+#endif
/* fcntl() variable arguments */
#ifndef HDfdopen
#define HDfdopen(N, S) fdopen(N, S)
-#endif /* HDfdopen */
+#endif
#ifndef HDfeof
#define HDfeof(F) feof(F)
-#endif /* HDfeof */
+#endif
#ifndef HDferror
#define HDferror(F) ferror(F)
-#endif /* HDferror */
+#endif
#ifndef HDfflush
#define HDfflush(F) fflush(F)
-#endif /* HDfflush */
+#endif
#ifndef HDfgetc
#define HDfgetc(F) fgetc(F)
-#endif /* HDfgetc */
+#endif
#ifndef HDfgetpos
#define HDfgetpos(F, P) fgetpos(F, P)
-#endif /* HDfgetpos */
+#endif
#ifndef HDfgets
#define HDfgets(S, N, F) fgets(S, N, F)
-#endif /* HDfgets */
+#endif
#ifndef HDfileno
#define HDfileno(F) fileno(F)
-#endif /* HDfileno */
+#endif
#ifndef HDfloor
#define HDfloor(X) floor(X)
-#endif /* HDfloor */
+#endif
#ifndef HDfmod
#define HDfmod(X, Y) fmod(X, Y)
-#endif /* HDfmod */
+#endif
#ifndef HDfopen
#define HDfopen(S, M) fopen(S, M)
-#endif /* HDfopen */
+#endif
#ifndef HDfork
#define HDfork() fork()
-#endif /* HDfork */
+#endif
#ifndef HDfpathconf
#define HDfpathconf(F, N) fpathconf(F, N)
-#endif /* HDfpathconf */
+#endif
H5_DLL int HDfprintf(FILE *stream, const char *fmt, ...);
#ifndef HDfputc
#define HDfputc(C, F) fputc(C, F)
-#endif /* HDfputc */
+#endif
#ifndef HDfputs
#define HDfputs(S, F) fputs(S, F)
-#endif /* HDfputs */
+#endif
#ifndef HDfread
#define HDfread(M, Z, N, F) fread(M, Z, N, F)
-#endif /* HDfread */
+#endif
#ifndef HDfree
#define HDfree(M) free(M)
-#endif /* HDfree */
+#endif
#ifndef HDfreopen
#define HDfreopen(S, M, F) freopen(S, M, F)
-#endif /* HDfreopen */
+#endif
#ifndef HDfrexp
#define HDfrexp(X, N) frexp(X, N)
-#endif /* HDfrexp */
+#endif
/* Check for Cray-specific 'frexpf()' and 'frexpl()' routines */
#ifndef HDfrexpf
#ifdef H5_HAVE_FREXPF
#define HDfrexpf(X, N) frexpf(X, N)
-#else /* H5_HAVE_FREXPF */
+#else
#define HDfrexpf(X, N) frexp(X, N)
-#endif /* H5_HAVE_FREXPF */
-#endif /* HDfrexpf */
+#endif
+#endif
#ifndef HDfrexpl
#ifdef H5_HAVE_FREXPL
#define HDfrexpl(X, N) frexpl(X, N)
-#else /* H5_HAVE_FREXPL */
+#else
#define HDfrexpl(X, N) frexp(X, N)
-#endif /* H5_HAVE_FREXPL */
-#endif /* HDfrexpl */
+#endif
+#endif
/* fscanf() variable arguments */
#ifndef HDfseek
#define HDfseek(F, O, W) fseeko(F, O, W)
-#endif /* HDfseek */
+#endif
#ifndef HDfsetpos
#define HDfsetpos(F, P) fsetpos(F, P)
-#endif /* HDfsetpos */
+#endif
#ifndef HDfstat
#define HDfstat(F, B) fstat(F, B)
-#endif /* HDfstat */
+#endif
#ifndef HDlstat
#define HDlstat(S, B) lstat(S, B)
-#endif /* HDlstat */
+#endif
#ifndef HDstat
#define HDstat(S, B) stat(S, B)
-#endif /* HDstat */
+#endif
#ifndef H5_HAVE_WIN32_API
/* These definitions differ in Windows and are defined in
@@ -848,628 +849,633 @@ typedef off_t h5_stat_size_t;
#ifndef HDftell
#define HDftell(F) ftell(F)
-#endif /* HDftell */
+#endif
#ifndef HDftruncate
#define HDftruncate(F, L) ftruncate(F, L)
-#endif /* HDftruncate */
+#endif
#ifndef HDfwrite
#define HDfwrite(M, Z, N, F) fwrite(M, Z, N, F)
-#endif /* HDfwrite */
+#endif
#ifndef HDgetc
#define HDgetc(F) getc(F)
-#endif /* HDgetc */
+#endif
#ifndef HDgetchar
#define HDgetchar() getchar()
-#endif /* HDgetchar */
+#endif
#ifndef HDgetcwd
#define HDgetcwd(S, Z) getcwd(S, Z)
-#endif /* HDgetcwd */
+#endif
#ifndef HDgetdcwd
#define HDgetdcwd(D, S, Z) getcwd(S, Z)
-#endif /* HDgetdcwd */
+#endif
+
+/* Windows only - set to zero on other systems */
#ifndef HDgetdrive
#define HDgetdrive() 0
-#endif /* HDgetdrive */
+#endif
+
#ifndef HDgetegid
#define HDgetegid() getegid()
-#endif /* HDgetegid() */
+#endif
#ifndef HDgetenv
#define HDgetenv(S) getenv(S)
-#endif /* HDgetenv */
+#endif
#ifndef HDgeteuid
#define HDgeteuid() geteuid()
-#endif /* HDgeteuid */
+#endif
#ifndef HDgetgid
#define HDgetgid() getgid()
-#endif /* HDgetgid */
+#endif
#ifndef HDgetgrgid
#define HDgetgrgid(G) getgrgid(G)
-#endif /* HDgetgrgid */
+#endif
#ifndef HDgetgrnam
#define HDgetgrnam(S) getgrnam(S)
-#endif /* HDgetgrnam */
+#endif
#ifndef HDgetgroups
#define HDgetgroups(Z, G) getgroups(Z, G)
-#endif /* HDgetgroups */
+#endif
#ifndef HDgethostname
#define HDgethostname(N, L) gethostname(N, L)
-#endif /* HDgethostname */
+#endif
#ifndef HDgetlogin
#define HDgetlogin() getlogin()
-#endif /* HDgetlogin */
+#endif
#ifndef HDgetpgrp
#define HDgetpgrp() getpgrp()
-#endif /* HDgetpgrp */
+#endif
#ifndef HDgetpid
#define HDgetpid() getpid()
-#endif /* HDgetpid */
+#endif
#ifndef HDgetppid
#define HDgetppid() getppid()
-#endif /* HDgetppid */
+#endif
#ifndef HDgetpwnam
#define HDgetpwnam(S) getpwnam(S)
-#endif /* HDgetpwnam */
+#endif
#ifndef HDgetpwuid
#define HDgetpwuid(U) getpwuid(U)
-#endif /* HDgetpwuid */
+#endif
#ifndef HDgetrusage
#define HDgetrusage(X, S) getrusage(X, S)
-#endif /* HDgetrusage */
+#endif
#ifndef HDgets
#define HDgets(S) gets(S)
-#endif /* HDgets */
+#endif
#ifndef HDgettimeofday
#define HDgettimeofday(S, P) gettimeofday(S, P)
-#endif /* HDgettimeofday */
+#endif
#ifndef HDgetuid
#define HDgetuid() getuid()
-#endif /* HDgetuid */
+#endif
#ifndef HDgmtime
#define HDgmtime(T) gmtime(T)
-#endif /* HDgmtime */
+#endif
#ifndef HDisalnum
-#define HDisalnum(C) isalnum((int)(C)) /*cast for solaris warning*/
-#endif /* HDisalnum */
+#define HDisalnum(C) isalnum((int)(C)) /* Cast for Solaris warning */
+#endif
#ifndef HDisalpha
-#define HDisalpha(C) isalpha((int)(C)) /*cast for solaris warning*/
-#endif /* HDisalpha */
+#define HDisalpha(C) isalpha((int)(C)) /* Cast for Solaris warning */
+#endif
#ifndef HDisatty
#define HDisatty(F) isatty(F)
-#endif /* HDisatty */
+#endif
#ifndef HDiscntrl
-#define HDiscntrl(C) iscntrl((int)(C)) /*cast for solaris warning*/
-#endif /* HDiscntrl */
+#define HDiscntrl(C) iscntrl((int)(C)) /* Cast for solaris warning */
+#endif
#ifndef HDisdigit
-#define HDisdigit(C) isdigit((int)(C)) /*cast for solaris warning*/
-#endif /* HDisdigit */
+#define HDisdigit(C) isdigit((int)(C)) /* Cast for Solaris warning */
+#endif
#ifndef HDisgraph
-#define HDisgraph(C) isgraph((int)(C)) /*cast for solaris warning*/
-#endif /* HDisgraph */
+#define HDisgraph(C) isgraph((int)(C)) /* Cast for Solaris warning*/
+#endif
#ifndef HDislower
-#define HDislower(C) islower((int)(C)) /*cast for solaris warning*/
-#endif /* HDislower */
+#define HDislower(C) islower((int)(C)) /* Cast for Solaris warning */
+#endif
#ifndef HDisnan
#define HDisnan(X) isnan(X)
-#endif /* HDisnan */
+#endif
#ifndef HDisprint
-#define HDisprint(C) isprint((int)(C)) /*cast for solaris warning*/
-#endif /* HDisprint */
+#define HDisprint(C) isprint((int)(C)) /* Cast for Solaris warning */
+#endif
#ifndef HDispunct
-#define HDispunct(C) ispunct((int)(C)) /*cast for solaris warning*/
-#endif /* HDispunct */
+#define HDispunct(C) ispunct((int)(C)) /* Cast for Solaris warning */
+#endif
#ifndef HDisspace
-#define HDisspace(C) isspace((int)(C)) /*cast for solaris warning*/
-#endif /* HDisspace */
+#define HDisspace(C) isspace((int)(C)) /* Cast for Solaris warning */
+#endif
#ifndef HDisupper
-#define HDisupper(C) isupper((int)(C)) /*cast for solaris warning*/
-#endif /* HDisupper */
+#define HDisupper(C) isupper((int)(C)) /* Cast for Solaris warning */
+#endif
#ifndef HDisxdigit
-#define HDisxdigit(C) isxdigit((int)(C)) /*cast for solaris warning*/
-#endif /* HDisxdigit */
+#define HDisxdigit(C) isxdigit((int)(C)) /* Cast for Solaris warning */
+#endif
#ifndef HDkill
#define HDkill(P, S) kill(P, S)
-#endif /* HDkill */
+#endif
#ifndef HDlabs
#define HDlabs(X) labs(X)
-#endif /* HDlabs */
+#endif
#ifndef HDldexp
#define HDldexp(X, N) ldexp(X, N)
-#endif /* HDldexp */
+#endif
#ifndef HDldiv
#define HDldiv(X, Y) ldiv(X, Y)
-#endif /* HDldiv */
+#endif
#ifndef HDlink
#define HDlink(OLD, NEW) link(OLD, NEW)
-#endif /* HDlink */
+#endif
#ifndef HDllround
#define HDllround(V) llround(V)
-#endif /* HDround */
+#endif
#ifndef HDllroundf
#define HDllroundf(V) llroundf(V)
-#endif /* HDllroundf */
+#endif
#ifndef HDllroundl
#define HDllroundl(V) llroundl(V)
-#endif /* HDllroundl */
+#endif
#ifndef HDlocaleconv
#define HDlocaleconv() localeconv()
-#endif /* HDlocaleconv */
+#endif
#ifndef HDlocaltime
#define HDlocaltime(T) localtime(T)
-#endif /* HDlocaltime */
+#endif
#ifndef HDlog
#define HDlog(X) log(X)
-#endif /* HDlog */
+#endif
#ifndef HDlog10
#define HDlog10(X) log10(X)
-#endif /* HDlog10 */
+#endif
#ifndef HDlongjmp
#define HDlongjmp(J, N) longjmp(J, N)
-#endif /* HDlongjmp */
+#endif
#ifndef HDlround
#define HDlround(V) lround(V)
-#endif /* HDround */
+#endif
#ifndef HDlroundf
#define HDlroundf(V) lroundf(V)
-#endif /* HDlroundf */
+#endif
#ifndef HDlroundl
#define HDlroundl(V) lroundl(V)
-#endif /* HDroundl */
+#endif
#ifndef HDlseek
#define HDlseek(F, O, W) lseek(F, O, W)
-#endif /* HDlseek */
+#endif
#ifndef HDmalloc
#define HDmalloc(Z) malloc(Z)
-#endif /* HDmalloc */
+#endif
#ifndef HDposix_memalign
#define HDposix_memalign(P, A, Z) posix_memalign(P, A, Z)
-#endif /* HDposix_memalign */
+#endif
#ifndef HDmblen
#define HDmblen(S, N) mblen(S, N)
-#endif /* HDmblen */
+#endif
#ifndef HDmbstowcs
#define HDmbstowcs(P, S, Z) mbstowcs(P, S, Z)
-#endif /* HDmbstowcs */
+#endif
#ifndef HDmbtowc
#define HDmbtowc(P, S, Z) mbtowc(P, S, Z)
-#endif /* HDmbtowc */
+#endif
#ifndef HDmemchr
#define HDmemchr(S, C, Z) memchr(S, C, Z)
-#endif /* HDmemchr */
+#endif
#ifndef HDmemcmp
#define HDmemcmp(X, Y, Z) memcmp(X, Y, Z)
-#endif /* HDmemcmp */
+#endif
/*
* The (char*) casts are required for the DEC when optimizations are turned
* on and the source and/or destination are not aligned.
*/
#ifndef HDmemcpy
#define HDmemcpy(X, Y, Z) memcpy((char *)(X), (const char *)(Y), Z)
-#endif /* HDmemcpy */
+#endif
#ifndef HDmemmove
#define HDmemmove(X, Y, Z) memmove((char *)(X), (const char *)(Y), Z)
-#endif /* HDmemmove */
+#endif
#ifndef HDmemset
#define HDmemset(X, C, Z) memset(X, C, Z)
-#endif /* HDmemset */
+#endif
#ifndef HDmkdir
#define HDmkdir(S, M) mkdir(S, M)
-#endif /* HDmkdir */
+#endif
#ifndef HDmkfifo
#define HDmkfifo(S, M) mkfifo(S, M)
-#endif /* HDmkfifo */
+#endif
#ifndef HDmktime
#define HDmktime(T) mktime(T)
-#endif /* HDmktime */
+#endif
#ifndef HDmodf
#define HDmodf(X, Y) modf(X, Y)
-#endif /* HDmodf */
+#endif
#ifndef HDnanosleep
#define HDnanosleep(N, O) nanosleep(N, O)
-#endif /* HDnanosleep */
+#endif
#ifndef HDopen
#define HDopen(F, ...) open(F, __VA_ARGS__)
-#endif /* HDopen */
+#endif
#ifndef HDopendir
#define HDopendir(S) opendir(S)
-#endif /* HDopendir */
+#endif
#ifndef HDpathconf
#define HDpathconf(S, N) pathconf(S, N)
-#endif /* HDpathconf */
+#endif
#ifndef HDpause
#define HDpause() pause()
-#endif /* HDpause */
+#endif
#ifndef HDperror
#define HDperror(S) perror(S)
-#endif /* HDperror */
+#endif
#ifndef HDpipe
#define HDpipe(F) pipe(F)
-#endif /* HDpipe */
+#endif
#ifndef HDpow
#define HDpow(X, Y) pow(X, Y)
-#endif /* HDpow */
+#endif
/* printf() variable arguments */
#ifndef HDprintf
#define HDprintf(...) HDfprintf(stdout, __VA_ARGS__)
-#endif /* HDprintf */
+#endif
#ifndef HDputc
#define HDputc(C, F) putc(C, F)
-#endif /* HDputc*/
+#endif
#ifndef HDputchar
#define HDputchar(C) putchar(C)
-#endif /* HDputchar */
+#endif
#ifndef HDputs
#define HDputs(S) puts(S)
-#endif /* HDputs */
+#endif
#ifndef HDqsort
#define HDqsort(M, N, Z, F) qsort(M, N, Z, F)
-#endif /* HDqsort*/
+#endif
#ifndef HDraise
#define HDraise(N) raise(N)
-#endif /* HDraise */
+#endif
+/* clang-format off */
#ifdef H5_HAVE_RAND_R
-#ifndef HDrandom
-#define HDrandom() HDrand()
-#endif /* HDrandom */
-H5_DLL int HDrand(void);
-#ifndef HDsrandom
-#define HDsrandom(S) HDsrand(S)
-#endif /* HDsrandom */
-H5_DLL void HDsrand(unsigned int seed);
+# ifndef HDrandom
+# define HDrandom() HDrand()
+# endif
+ H5_DLL int HDrand(void);
+# ifndef HDsrandom
+# define HDsrandom(S) HDsrand(S)
+# endif
+ H5_DLL void HDsrand(unsigned int seed);
#elif defined(H5_HAVE_RANDOM)
-#ifndef HDrand
-#define HDrand() random()
-#endif /* HDrand */
-#ifndef HDrandom
-#define HDrandom() random()
-#endif /* HDrandom */
-#ifndef HDsrand
-#define HDsrand(S) srandom(S)
-#endif /* HDsrand */
-#ifndef HDsrandom
-#define HDsrandom(S) srandom(S)
-#endif /* HDsrandom */
-#else /* H5_HAVE_RANDOM */
-#ifndef HDrand
-#define HDrand() rand()
-#endif /* HDrand */
-#ifndef HDrandom
-#define HDrandom() rand()
-#endif /* HDrandom */
-#ifndef HDsrand
-#define HDsrand(S) srand(S)
-#endif /* HDsrand */
-#ifndef HDsrandom
-#define HDsrandom(S) srand(S)
-#endif /* HDsrandom */
-#endif /* H5_HAVE_RANDOM */
+# ifndef HDrand
+# define HDrand() random()
+# endif
+# ifndef HDrandom
+# define HDrandom() random()
+# endif
+# ifndef HDsrand
+# define HDsrand(S) srandom(S)
+# endif
+# ifndef HDsrandom
+# define HDsrandom(S) srandom(S)
+# endif
+#else
+# ifndef HDrand
+# define HDrand() rand()
+# endif
+# ifndef HDrandom
+# define HDrandom() rand()
+# endif
+# ifndef HDsrand
+# define HDsrand(S) srand(S)
+# endif
+# ifndef HDsrandom
+# define HDsrandom(S) srand(S)
+# endif
+#endif
+/* clang-format on */
#ifndef HDread
#define HDread(F, M, Z) read(F, M, Z)
-#endif /* HDread */
+#endif
#ifndef HDreaddir
#define HDreaddir(D) readdir(D)
-#endif /* HDreaddir */
+#endif
#ifndef HDrealloc
#define HDrealloc(M, Z) realloc(M, Z)
-#endif /* HDrealloc */
+#endif
#ifndef HDrealpath
#define HDrealpath(F1, F2) realpath(F1, F2)
-#endif /* HDrealloc */
+#endif
#ifndef HDremove
#define HDremove(S) remove(S)
-#endif /* HDremove */
+#endif
#ifndef HDrename
#define HDrename(OLD, NEW) rename(OLD, NEW)
-#endif /* HDrename */
+#endif
#ifndef HDrewind
#define HDrewind(F) rewind(F)
-#endif /* HDrewind */
+#endif
#ifndef HDrewinddir
#define HDrewinddir(D) rewinddir(D)
-#endif /* HDrewinddir */
+#endif
#ifndef HDround
#define HDround(V) round(V)
-#endif /* HDround */
+#endif
#ifndef HDroundf
#define HDroundf(V) roundf(V)
-#endif /* HDroundf */
+#endif
#ifndef HDroundl
#define HDroundl(V) roundl(V)
-#endif /* HDroundl */
+#endif
#ifndef HDrmdir
#define HDrmdir(S) rmdir(S)
-#endif /* HDrmdir */
+#endif
/* scanf() variable arguments */
#ifndef HDselect
#define HDselect(N, RD, WR, ER, T) select(N, RD, WR, ER, T)
-#endif /* HDsetbuf */
+#endif
#ifndef HDsetbuf
#define HDsetbuf(F, S) setbuf(F, S)
-#endif /* HDsetbuf */
+#endif
#ifndef HDsetenv
#define HDsetenv(N, V, O) setenv(N, V, O)
-#endif /* HDsetenv */
+#endif
#ifndef HDsetgid
#define HDsetgid(G) setgid(G)
-#endif /* HDsetgid */
+#endif
#ifndef HDsetjmp
#define HDsetjmp(J) setjmp(J)
-#endif /* HDsetjmp */
+#endif
#ifndef HDsetlocale
#define HDsetlocale(N, S) setlocale(N, S)
-#endif /* HDsetlocale */
+#endif
#ifndef HDsetpgid
#define HDsetpgid(P, PG) setpgid(P, PG)
-#endif /* HDsetpgid */
+#endif
#ifndef HDsetsid
#define HDsetsid() setsid()
-#endif /* HDsetsid */
+#endif
#ifndef HDsetuid
#define HDsetuid(U) setuid(U)
-#endif /* HDsetuid */
+#endif
#ifndef HDsetvbuf
#define HDsetvbuf(F, S, M, Z) setvbuf(F, S, M, Z)
-#endif /* HDsetvbuf */
+#endif
#ifndef HDsigaddset
#define HDsigaddset(S, N) sigaddset(S, N)
-#endif /* HDsigaddset */
+#endif
#ifndef HDsigdelset
#define HDsigdelset(S, N) sigdelset(S, N)
-#endif /* HDsigdelset */
+#endif
#ifndef HDsigemptyset
#define HDsigemptyset(S) sigemptyset(S)
-#endif /* HDsigemptyset */
+#endif
#ifndef HDsigfillset
#define HDsigfillset(S) sigfillset(S)
-#endif /* HDsigfillset */
+#endif
#ifndef HDsigismember
#define HDsigismember(S, N) sigismember(S, N)
-#endif /* HDsigismember */
+#endif
#ifndef HDsiglongjmp
#define HDsiglongjmp(J, N) siglongjmp(J, N)
-#endif /* HDsiglongjmp */
+#endif
#ifndef HDsignal
#define HDsignal(N, F) signal(N, F)
-#endif /* HDsignal */
+#endif
#ifndef HDsigpending
#define HDsigpending(S) sigpending(S)
-#endif /* HDsigpending */
+#endif
#ifndef HDsigprocmask
#define HDsigprocmask(H, S, O) sigprocmask(H, S, O)
-#endif /* HDsigprocmask */
+#endif
#ifndef HDsigsetjmp
#define HDsigsetjmp(J, N) sigsetjmp(J, N)
-#endif /* HDsigsetjmp */
+#endif
#ifndef HDsigsuspend
#define HDsigsuspend(S) sigsuspend(S)
-#endif /* HDsigsuspend */
+#endif
#ifndef HDsin
#define HDsin(X) sin(X)
-#endif /* HDsin */
+#endif
#ifndef HDsinh
#define HDsinh(X) sinh(X)
-#endif /* HDsinh */
+#endif
#ifndef HDsleep
#define HDsleep(N) sleep(N)
-#endif /* HDsleep */
+#endif
#ifndef HDsnprintf
#define HDsnprintf snprintf /*varargs*/
-#endif /* HDsnprintf */
+#endif
#ifndef HDsprintf
#define HDsprintf sprintf /*varargs*/
-#endif /* HDsprintf */
+#endif
#ifndef HDsqrt
#define HDsqrt(X) sqrt(X)
-#endif /* HDsqrt */
+#endif
#ifndef HDsscanf
#define HDsscanf(S, FMT, ...) sscanf(S, FMT, __VA_ARGS__)
-#endif /* HDsscanf */
+#endif
#ifndef HDstrcat
#define HDstrcat(X, Y) strcat(X, Y)
-#endif /* HDstrcat */
+#endif
#ifndef HDstrchr
#define HDstrchr(S, C) strchr(S, C)
-#endif /* HDstrchr */
+#endif
#ifndef HDstrcmp
#define HDstrcmp(X, Y) strcmp(X, Y)
-#endif /* HDstrcmp */
+#endif
#ifndef HDstrcasecmp
#define HDstrcasecmp(X, Y) strcasecmp(X, Y)
-#endif /* HDstrcasecmp */
+#endif
#ifndef HDstrcoll
#define HDstrcoll(X, Y) strcoll(X, Y)
-#endif /* HDstrcoll */
+#endif
#ifndef HDstrcpy
#define HDstrcpy(X, Y) strcpy(X, Y)
-#endif /* HDstrcpy */
+#endif
#ifndef HDstrcspn
#define HDstrcspn(X, Y) strcspn(X, Y)
-#endif /* HDstrcspn */
+#endif
#ifndef HDstrerror
#define HDstrerror(N) strerror(N)
-#endif /* HDstrerror */
+#endif
#ifndef HDstrftime
#define HDstrftime(S, Z, F, T) strftime(S, Z, F, T)
-#endif /* HDstrftime */
+#endif
#ifndef HDstrlen
#define HDstrlen(S) strlen(S)
-#endif /* HDstrlen */
+#endif
#ifndef HDstrncat
#define HDstrncat(X, Y, Z) strncat(X, Y, Z)
-#endif /* HDstrncat */
+#endif
#ifndef HDstrncmp
#define HDstrncmp(X, Y, Z) strncmp(X, Y, Z)
-#endif /* HDstrncmp */
+#endif
#ifndef HDstrncpy
#define HDstrncpy(X, Y, Z) strncpy(X, Y, Z)
-#endif /* HDstrncpy */
+#endif
#ifndef HDstrpbrk
#define HDstrpbrk(X, Y) strpbrk(X, Y)
-#endif /* HDstrpbrk */
+#endif
#ifndef HDstrrchr
#define HDstrrchr(S, C) strrchr(S, C)
-#endif /* HDstrrchr */
+#endif
#ifndef HDstrspn
#define HDstrspn(X, Y) strspn(X, Y)
-#endif /* HDstrspn */
+#endif
#ifndef HDstrstr
#define HDstrstr(X, Y) strstr(X, Y)
-#endif /* HDstrstr */
+#endif
#ifndef HDstrtod
#define HDstrtod(S, R) strtod(S, R)
-#endif /* HDstrtod */
+#endif
#ifndef HDstrtok
#define HDstrtok(X, Y) strtok(X, Y)
-#endif /* HDstrtok */
+#endif
#ifndef HDstrtok_r
#define HDstrtok_r(X, Y, Z) strtok_r(X, Y, Z)
-#endif /* HDstrtok */
+#endif
#ifndef HDstrtol
#define HDstrtol(S, R, N) strtol(S, R, N)
-#endif /* HDstrtol */
+#endif
#ifndef HDstrtoll
#ifdef H5_HAVE_STRTOLL
#define HDstrtoll(S, R, N) strtoll(S, R, N)
#else
H5_DLL int64_t HDstrtoll(const char *s, const char **rest, int base);
-#endif /* H5_HAVE_STRTOLL */
-#endif /* HDstrtoll */
+#endif
+#endif
#ifndef HDstrtoul
#define HDstrtoul(S, R, N) strtoul(S, R, N)
-#endif /* HDstrtoul */
+#endif
#ifndef HDstrtoull
#define HDstrtoull(S, R, N) strtoull(S, R, N)
-#endif /* HDstrtoul */
+#endif
#ifndef HDstrtoumax
#define HDstrtoumax(S, R, N) strtoumax(S, R, N)
-#endif /* HDstrtoumax */
+#endif
#ifndef HDstrxfrm
#define HDstrxfrm(X, Y, Z) strxfrm(X, Y, Z)
-#endif /* HDstrxfrm */
+#endif
#ifdef H5_HAVE_SYMLINK
#ifndef HDsymlink
#define HDsymlink(F1, F2) symlink(F1, F2)
-#endif /* HDsymlink */
-#endif /* H5_HAVE_SYMLINK */
+#endif
+#endif
#ifndef HDsysconf
#define HDsysconf(N) sysconf(N)
-#endif /* HDsysconf */
+#endif
#ifndef HDsystem
#define HDsystem(S) system(S)
-#endif /* HDsystem */
+#endif
#ifndef HDtan
#define HDtan(X) tan(X)
-#endif /* HDtan */
+#endif
#ifndef HDtanh
#define HDtanh(X) tanh(X)
-#endif /* HDtanh */
+#endif
#ifndef HDtcdrain
#define HDtcdrain(F) tcdrain(F)
-#endif /* HDtcdrain */
+#endif
#ifndef HDtcflow
#define HDtcflow(F, A) tcflow(F, A)
-#endif /* HDtcflow */
+#endif
#ifndef HDtcflush
#define HDtcflush(F, N) tcflush(F, N)
-#endif /* HDtcflush */
+#endif
#ifndef HDtcgetattr
#define HDtcgetattr(F, T) tcgetattr(F, T)
-#endif /* HDtcgetattr */
+#endif
#ifndef HDtcgetpgrp
#define HDtcgetpgrp(F) tcgetpgrp(F)
-#endif /* HDtcgetpgrp */
+#endif
#ifndef HDtcsendbreak
#define HDtcsendbreak(F, N) tcsendbreak(F, N)
-#endif /* HDtcsendbreak */
+#endif
#ifndef HDtcsetattr
#define HDtcsetattr(F, O, T) tcsetattr(F, O, T)
-#endif /* HDtcsetattr */
+#endif
#ifndef HDtcsetpgrp
#define HDtcsetpgrp(F, N) tcsetpgrp(F, N)
-#endif /* HDtcsetpgrp */
+#endif
#ifndef HDtime
#define HDtime(T) time(T)
-#endif /* HDtime */
+#endif
#ifndef HDtimes
#define HDtimes(T) times(T)
-#endif /* HDtimes*/
+#endif
#ifndef HDtmpfile
#define HDtmpfile() tmpfile()
-#endif /* HDtmpfile */
+#endif
#ifndef HDtmpnam
#define HDtmpnam(S) tmpnam(S)
-#endif /* HDtmpnam */
+#endif
#ifndef HDtolower
#define HDtolower(C) tolower(C)
-#endif /* HDtolower */
+#endif
#ifndef HDtoupper
#define HDtoupper(C) toupper(C)
-#endif /* HDtoupper */
+#endif
#ifndef HDttyname
#define HDttyname(F) ttyname(F)
-#endif /* HDttyname */
+#endif
#ifndef HDtzset
#define HDtzset() tzset()
-#endif /* HDtzset */
+#endif
#ifndef HDumask
#define HDumask(N) umask(N)
-#endif /* HDumask */
+#endif
#ifndef HDuname
#define HDuname(S) uname(S)
-#endif /* HDuname */
+#endif
#ifndef HDungetc
#define HDungetc(C, F) ungetc(C, F)
-#endif /* HDungetc */
+#endif
#ifndef HDunlink
#define HDunlink(S) unlink(S)
-#endif /* HDunlink */
+#endif
#ifndef HDutime
#define HDutime(S, T) utime(S, T)
-#endif /* HDutime */
+#endif
#ifndef HDva_arg
#define HDva_arg(A, T) va_arg(A, T)
-#endif /* HDva_arg */
+#endif
#ifndef HDva_copy
#define HDva_copy(D, S) va_copy(D, S)
-#endif /* HDva_copy */
+#endif
#ifndef HDva_end
#define HDva_end(A) va_end(A)
-#endif /* HDva_end */
+#endif
#ifndef HDva_start
#define HDva_start(A, P) va_start(A, P)
-#endif /* HDva_start */
+#endif
#ifndef HDvasprintf
#define HDvasprintf(RET, FMT, A) vasprintf(RET, FMT, A)
-#endif /* HDvasprintf */
+#endif
#ifndef HDvfprintf
#define HDvfprintf(F, FMT, A) vfprintf(F, FMT, A)
-#endif /* HDvfprintf */
+#endif
#ifndef HDvprintf
#define HDvprintf(FMT, A) vprintf(FMT, A)
-#endif /* HDvprintf */
+#endif
#ifndef HDvsprintf
#define HDvsprintf(S, FMT, A) vsprintf(S, FMT, A)
-#endif /* HDvsprintf */
+#endif
#ifndef HDvsnprintf
#define HDvsnprintf(S, N, FMT, A) vsnprintf(S, N, FMT, A)
-#endif /* HDvsnprintf */
+#endif
#ifndef HDwait
#define HDwait(W) wait(W)
-#endif /* HDwait */
+#endif
#ifndef HDwaitpid
#define HDwaitpid(P, W, O) waitpid(P, W, O)
-#endif /* HDwaitpid */
+#endif
#ifndef HDwcstombs
#define HDwcstombs(S, P, Z) wcstombs(S, P, Z)
-#endif /* HDwcstombs */
+#endif
#ifndef HDwctomb
#define HDwctomb(S, C) wctomb(S, C)
-#endif /* HDwctomb */
+#endif
#ifndef HDwrite
#define HDwrite(F, M, Z) write(F, M, Z)
-#endif /* HDwrite */
+#endif
/*
* And now for a couple non-Posix functions... Watch out for systems that
@@ -1481,16 +1487,16 @@ extern char * strdup(const char *s);
#ifndef HDstrdup
#define HDstrdup(S) strdup(S)
-#endif /* HDstrdup */
+#endif
#ifndef HDpthread_self
#define HDpthread_self() pthread_self()
-#endif /* HDpthread_self */
+#endif
/* Use this version of pthread_self for printing the thread ID */
#ifndef HDpthread_self_ulong
#define HDpthread_self_ulong() ((unsigned long)pthread_self())
-#endif /* HDpthread_self_ulong */
+#endif
/* Macro for "stringizing" an integer in the C preprocessor (use H5_TOSTRING) */
/* (use H5_TOSTRING, H5_STRINGIZE is just part of the implementation) */
@@ -1872,7 +1878,7 @@ extern H5_api_t H5_g;
#define H5_API_LOCK
#define H5_API_UNLOCK
-/* disable cancelability (sequential version) */
+/* disable cancellability (sequential version) */
#define H5_API_UNSET_CANCEL
#define H5_API_SET_CANCEL
diff --git a/src/H5public.h b/src/H5public.h
index 3c90c2a..aeb8664 100644
--- a/src/H5public.h
+++ b/src/H5public.h
@@ -11,19 +11,40 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/*
+ * This file contains public declarations for the HDF5 module.
+ */
+#ifndef H5public_H
+#define H5public_H
+
/**\defgroup H5 H5
*
* Use the functions in this module to manage the life cycle of HDF5 library
* instances.
*
+ * <table>
+ * <tr><th>Create</th><th>Read</th></tr>
+ * <tr valign="top">
+ * <td>
+ * \snippet{lineno} H5_examples.c create
+ * </td>
+ * <td>
+ * \snippet{lineno} H5_examples.c read
+ * </td>
+ * <tr><th>Update</th><th>Delete</th></tr>
+ * <tr valign="top">
+ * <td>
+ * \snippet{lineno} H5_examples.c update
+ * </td>
+ * <td>
+ * \snippet{lineno} H5_examples.c closing_shop
+ * \snippet{lineno} H5_examples.c delete
+ * </td>
+ * </tr>
+ * </table>
+ *
*/
-/*
- * This file contains public declarations for the HDF5 module.
- */
-#ifndef H5public_H
-#define H5public_H
-
/* Include files for public use... */
/*
* Since H5pubconf.h is a generated header file, it is messy to try
@@ -63,6 +84,7 @@
#ifdef H5_HAVE_STDDEF_H
#include <stddef.h>
#endif
+
#ifdef H5_HAVE_PARALLEL
/* Don't link against MPI C++ bindings */
#define MPICH_SKIP_MPICXX 1
@@ -199,8 +221,9 @@ extern "C" {
* Status return values. Failed integer functions in HDF5 result almost
* always in a negative value (unsigned failing functions sometimes return
* zero for failure) while successful return is non-negative (often zero).
- * The negative failure value is most commonly -1, but don't bet on it. The
- * proper way to detect failure is something like:
+ * The negative failure value is most commonly -1, but don't bet on it.
+ *
+ * The proper way to detect failure is something like:
* \code
* if((dset = H5Dopen2(file, name)) < 0)
* fprintf(stderr, "unable to open the requested dataset\n");
@@ -227,7 +250,14 @@ typedef int herr_t;
typedef unsigned int hbool_t;
typedef int htri_t;
-/* Define the ssize_t type if it not is defined */
+/* The signed version of size_t
+ *
+ * ssize_t is POSIX and not defined in any C standard. It's used in some
+ * public HDF5 API calls so this work-around will define it if it's not
+ * present.
+ *
+ * Use of ssize_t should be discouraged in new code.
+ */
#if H5_SIZEOF_SSIZE_T == 0
/* Undefine this size, we will re-define it in one of the sections below */
#undef H5_SIZEOF_SSIZE_T
@@ -245,8 +275,10 @@ typedef long long ssize_t;
#endif
#endif
-/* int64_t type is used for creation order field for links. It may be
- * defined in Posix.1g, otherwise it is defined here.
+/**
+ * The size of file objects.
+ *
+ * \internal Defined as a (minimum) 64-bit integer type.
*/
#if H5_SIZEOF_INT64_T >= 8
#elif H5_SIZEOF_INT >= 8
@@ -291,9 +323,11 @@ typedef unsigned long long uint64_t;
#error "nothing appropriate for uint64_t"
#endif
-/*
- * The sizes of file objects have their own types defined here, use a minimum
- * 64-bit type.
+/**
+ * The size of file objects. Used when negative values are needed to indicate errors.
+ *
+ * \internal Defined as a (minimum) 64-bit integer type. Use of hssize_t
+ * should be discouraged in new code.
*/
#if H5_SIZEOF_LONG_LONG >= 8
H5_GCC_DIAG_OFF("long-long")
@@ -313,8 +347,10 @@ H5_GCC_DIAG_ON("long-long")
#error "nothing appropriate for hsize_t"
#endif
-/*
- * File addresses have their own types.
+/**
+ * The address of an object in the file.
+ *
+ * \internal Defined as a (minimum) 64-bit unsigned integer type.
*/
#if H5_SIZEOF_INT >= 8
typedef unsigned haddr_t;
@@ -395,9 +431,9 @@ typedef enum {
/* (Actually, any positive value will cause the iterator to stop and pass back
* that positive value to the function that called the iterator)
*/
-#define H5_ITER_ERROR (-1)
-#define H5_ITER_CONT (0)
-#define H5_ITER_STOP (1)
+#define H5_ITER_ERROR (-1) /**< Error, stop iteration */
+#define H5_ITER_CONT (0) /**< Continue iteration */
+#define H5_ITER_STOP (1) /**< Stop iteration, short-circuit success */
//! <!-- [H5_index_t_snip] -->
/**
diff --git a/src/H5win32defs.h b/src/H5win32defs.h
index 10a5e83..308ba6d 100644
--- a/src/H5win32defs.h
+++ b/src/H5win32defs.h
@@ -95,6 +95,7 @@ typedef __int64 h5_stat_size_t;
#else
#define HDopen(S, F, ...) Wopen_utf8(S, F, ##__VA_ARGS__)
#endif
+
#define HDread(F, M, Z) _read(F, M, Z)
#define HDremove(S) Wremove_utf8(S)
#define HDrmdir(S) _rmdir(S)