summaryrefslogtreecommitdiffstats
path: root/src/H5G.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-10-13 20:51:06 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-10-15 13:09:48 (GMT)
commit48d171b04730aff7beade684e9afd164f0204b0c (patch)
tree81bb97f196a1f35bc94624ab5f1b8e9fbbccaa81 /src/H5G.c
parent1ce4c8dd7ddaa344ad041514b1d3aa4979497275 (diff)
downloadhdf5-48d171b04730aff7beade684e9afd164f0204b0c.zip
hdf5-48d171b04730aff7beade684e9afd164f0204b0c.tar.gz
hdf5-48d171b04730aff7beade684e9afd164f0204b0c.tar.bz2
Merge from 1.10
Comments, whitespace Simple init and if block brackets. Minimal code changes limited to return value and spelling
Diffstat (limited to 'src/H5G.c')
-rw-r--r--src/H5G.c132
1 files changed, 50 insertions, 82 deletions
diff --git a/src/H5G.c b/src/H5G.c
index 599caf7..7a77170 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -14,14 +14,12 @@
/*-------------------------------------------------------------------------
*
* Created: H5G.c
- * Jul 18 1997
- * Robb Matzke <matzke@llnl.gov>
*
* Purpose: Symbol table functions. The functions that begin with
- * `H5G_stab_' don't understand the naming system; they operate
+ * 'H5G_stab_' don't understand the naming system; they operate
* on a single symbol table at a time.
*
- * The functions that begin with `H5G_node_' operate on the leaf
+ * The functions that begin with 'H5G_node_' operate on the leaf
* nodes of a symbol table B-tree. They should be defined in
* the H5Gnode.c file.
*
@@ -42,11 +40,11 @@
* +--------------+----------- +--------------------------------+
* | Location ID | Name | Meaning |
* +--------------+------------+--------------------------------+
- * | File ID | "/foo/bar" | Find `foo' within `bar' within |
+ * | File ID | "/foo/bar" | Find 'foo' within 'bar' within |
* | | | the root group of the specified|
* | | | file. |
* +--------------+------------+--------------------------------+
- * | File ID | "foo/bar" | Find `foo' within `bar' within |
+ * | File ID | "foo/bar" | Find 'foo' within 'bar' within |
* | | | the root group of the specified|
* | | | file. |
* +--------------+------------+--------------------------------+
@@ -56,11 +54,11 @@
* | File ID | "." | The root group of the specified|
* | | | the specified file. |
* +--------------+------------+--------------------------------+
- * | Group ID | "/foo/bar" | Find `foo' within `bar' within |
+ * | Group ID | "/foo/bar" | Find 'foo' within 'bar' within |
* | | | the root group of the file |
* | | | containing the specified group.|
* +--------------+------------+--------------------------------+
- * | Group ID | "foo/bar" | File `foo' within `bar' within |
+ * | Group ID | "foo/bar" | File 'foo' within 'bar' within |
* | | | the specified group. |
* +--------------+------------+--------------------------------+
* | Group ID | "/" | The root group of the file |
@@ -194,7 +192,6 @@ done:
*
* Return: Success: Positive if anything is done that might
* affect other interfaces; zero otherwise.
- *
* Failure: Negative.
*
* Programmer: Robb Matzke
@@ -231,9 +228,9 @@ H5G_term_interface(void)
} /* end H5G_term_interface() */
/*-------------------------------------------------------------------------
- * Function: H5Gcreate2
+ * Function: H5Gcreate2
*
- * Purpose: Creates a new group relative to LOC_ID, giving it the
+ * Purpose: Creates a new group relative to LOC_ID, giving it the
* specified creation property list GCPL_ID and access
* property list GAPL_ID. The link to the new group is
* created with the LCPL_ID.
@@ -245,14 +242,11 @@ H5G_term_interface(void)
* hid_t gcpl_id; IN: Property list for group creation
* hid_t gapl_id; IN: Property list for group access
*
- * Return: Success: The object ID of a new, empty group open for
- * writing. Call H5Gclose() when finished with
- * the group.
- *
- * Failure: FAIL
+ * Return: Success: The object ID of a new, empty group open for
+ * writing. Call H5Gclose() when finished with
+ * the group.
*
- * Programmer: Quincey Koziol
- * April 5, 2007
+ * Failure: FAIL
*
*-------------------------------------------------------------------------
*/
@@ -305,9 +299,9 @@ done:
} /* end H5Gcreate2() */
/*-------------------------------------------------------------------------
- * Function: H5Gcreate_anon
+ * Function: H5Gcreate_anon
*
- * Purpose: Creates a new group relative to LOC_ID, giving it the
+ * Purpose: Creates a new group relative to LOC_ID, giving it the
* specified creation property list GCPL_ID and access
* property list GAPL_ID.
*
@@ -323,19 +317,16 @@ done:
* hid_t gcpl_id; IN: Property list for group creation
* hid_t gapl_id; IN: Property list for group access
*
- * Example: To create missing groups "A" and "B01" along the given path "/A/B01/grp"
+ * Example: To create missing groups "A" and "B01" along the given path "/A/B01/grp"
* hid_t create_id = H5Pcreate(H5P_GROUP_CREATE);
* int status = H5Pset_create_intermediate_group(create_id, TRUE);
* hid_t gid = H5Gcreate_anon(file_id, "/A/B01/grp", create_id, H5P_DEFAULT);
*
- * Return: Success: The object ID of a new, empty group open for
- * writing. Call H5Gclose() when finished with
- * the group.
+ * Return: Success: The object ID of a new, empty group open for
+ * writing. Call H5Gclose() when finished with
+ * the group.
*
- * Failure: FAIL
- *
- * Programmer: Peter Cao
- * May 08, 2005
+ * Failure: FAIL
*
*-------------------------------------------------------------------------
*/
@@ -402,17 +393,15 @@ done:
/*-------------------------------------------------------------------------
* Function: H5Gopen2
*
- * Purpose: Opens an existing group for modification. When finished,
- * call H5Gclose() to close it and release resources.
+ * Purpose: Opens an existing group for modification. When finished,
+ * call H5Gclose() to close it and release resources.
*
* This function allows the user the pass in a Group Access
* Property List, which H5Gopen1() does not.
*
- * Return: Success: Object ID of the group.
- * Failure: FAIL
+ * Return: Success: Object ID of the group
*
- * Programmer: James Laird
- * Thursday, July 27, 2006
+ * Failure: FAIL
*
*-------------------------------------------------------------------------
*/
@@ -456,18 +445,15 @@ done:
} /* end H5Gopen2() */
/*-------------------------------------------------------------------------
- * Function: H5Gget_create_plist
- *
- * Purpose: Returns a copy of the group creation property list.
+ * Function: H5Gget_create_plist
*
- * Return: Success: ID for a copy of the group creation
- * property list. The property list ID should be
- * released by calling H5Pclose().
+ * Purpose: Returns a copy of the group creation property list.
*
- * Failure: FAIL
+ * Return: Success: ID for a copy of the group creation
+ * property list. The property list ID should be
+ * released by calling H5Pclose().
*
- * Programmer: Quincey Koziol
- * Tuesday, October 25, 2005
+ * Failure: FAIL
*
*-------------------------------------------------------------------------
*/
@@ -492,18 +478,15 @@ done:
} /* end H5Gget_create_plist() */
/*-------------------------------------------------------------------------
- * Function: H5G_get_create_plist
- *
- * Purpose: Private function for H5Gget_create_plist
+ * Function: H5G_get_create_plist
*
- * Return: Success: ID for a copy of the group creation
- * property list. The property list ID should be
- * released by calling H5Pclose().
+ * Purpose: Private function for H5Gget_create_plist
*
- * Failure: FAIL
+ * Return: Success: ID for a copy of the group creation
+ * property list. The property list ID should be
+ * released by calling H5Pclose().
*
- * Programmer: Quincey Koziol
- * Tuesday, October 25, 2005
+ * Failure: FAIL
*
*-------------------------------------------------------------------------
*/
@@ -586,15 +569,11 @@ done:
} /* end H5G_get_create_plist() */
/*-------------------------------------------------------------------------
- * Function: H5Gget_info
- *
- * Purpose: Retrieve information about a group.
+ * Function: H5Gget_info
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Purpose: Retrieve information about a group.
*
- * Programmer: Quincey Koziol
- * November 27 2006
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
@@ -628,15 +607,12 @@ done:
} /* end H5Gget_info() */
/*-------------------------------------------------------------------------
- * Function: H5Gget_info_by_name
- *
- * Purpose: Retrieve information about a group.
+ * Function: H5Gget_info_by_name
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Purpose: Retrieve information about a group, where the group is
+ * identified by name instead of ID.
*
- * Programmer: Quincey Koziol
- * November 27 2006
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
@@ -687,16 +663,12 @@ done:
} /* end H5Gget_info_by_name() */
/*-------------------------------------------------------------------------
- * Function: H5Gget_info_by_idx
+ * Function: H5Gget_info_by_idx
*
- * Purpose: Retrieve information about a group, according to the order
+ * Purpose: Retrieve information about a group, according to the order
* of an index.
*
- * Return: Success: Non-negative
- * Failure: Negative
- *
- * Programmer: Quincey Koziol
- * November 27 2006
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
@@ -754,15 +726,12 @@ done:
} /* end H5Gget_info_by_idx() */
/*-------------------------------------------------------------------------
- * Function: H5Gclose
- *
- * Purpose: Closes the specified group. The group ID will no longer be
- * valid for accessing the group.
+ * Function: H5Gclose
*
- * Return: Non-negative on success/Negative on failure
+ * Purpose: Closes the specified group. The group ID will no longer be
+ * valid for accessing the group.
*
- * Programmer: Robb Matzke
- * Wednesday, December 31, 1997
+ * Return: SUCCEED/FAIL
*
*-------------------------------------------------------------------------
*/
@@ -778,8 +747,7 @@ H5Gclose(hid_t group_id)
if (NULL == H5I_object_verify(group_id, H5I_GROUP))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group")
- /*
- * Decrement the counter on the group atom. It will be freed if the count
+ /* Decrement the counter on the group atom. It will be freed if the count
* reaches zero.
*/
if (H5I_dec_app_ref(group_id) < 0)