summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-10-30 21:57:50 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-10-30 21:57:50 (GMT)
commitc136b81140106231e471b334bc5248611cec04e6 (patch)
tree0037e64ba84267eac89e0fcd4db0bd5cf6161ff5
parentf85474466864d1a8b675387b623bebd89bbdc57e (diff)
downloadhdf5-c136b81140106231e471b334bc5248611cec04e6.zip
hdf5-c136b81140106231e471b334bc5248611cec04e6.tar.gz
hdf5-c136b81140106231e471b334bc5248611cec04e6.tar.bz2
[svn-r14223] Description:
Change existing H5Gget_info -> H5Gget_info_by_name and add new version of H5Gget_info, with simpler parameters, to better match new API routines. Tested on: FreeBSD/32 6.2 (duty) in debug mode FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Mac OS X/32 10.4.10 (amazon) in debug mode
-rw-r--r--c++/src/H5CommonFG.cpp2
-rw-r--r--examples/h5_interm_group.c2
-rw-r--r--fortran/src/H5Gf.c6
-rw-r--r--src/H5G.c50
-rw-r--r--src/H5Gpublic.h5
-rw-r--r--test/links.c188
-rwxr-xr-xtest/objcopy.c4
-rw-r--r--test/th5o.c4
-rw-r--r--test/titerate.c8
-rw-r--r--test/trefer.c2
-rw-r--r--tools/h5stat/h5stat.c2
11 files changed, 237 insertions, 36 deletions
diff --git a/c++/src/H5CommonFG.cpp b/c++/src/H5CommonFG.cpp
index a6a1530..bcdc3c6 100644
--- a/c++/src/H5CommonFG.cpp
+++ b/c++/src/H5CommonFG.cpp
@@ -975,7 +975,7 @@ hsize_t CommonFG::getNumObjs() const
{
H5G_info_t ginfo; /* Group information */
- herr_t ret_value = H5Gget_info(getLocId(), ".", &ginfo, H5P_DEFAULT);
+ herr_t ret_value = H5Gget_info(getLocId(), &ginfo);
if(ret_value < 0)
{
throwException("getNumObjs", "H5Gget_info failed");
diff --git a/examples/h5_interm_group.c b/examples/h5_interm_group.c
index 95ed910..3d04d2e 100644
--- a/examples/h5_interm_group.c
+++ b/examples/h5_interm_group.c
@@ -91,7 +91,7 @@ main(void)
if (H5Lexists(file, "/G1/G2", H5P_DEFAULT)) {
g2_id = H5Gopen2(file, "/G1/G2", H5P_DEFAULT);
- status = H5Gget_info(g2_id, ".", &g2_info, H5P_DEFAULT);
+ status = H5Gget_info(g2_id, &g2_info);
printf("Group /G1/G2 has %d member(s)\n", (int)g2_info.nlinks);
for (i=0; i < (int)g2_info.nlinks; i++) {
diff --git a/fortran/src/H5Gf.c b/fortran/src/H5Gf.c
index fc5cfd8..27b6682 100644
--- a/fortran/src/H5Gf.c
+++ b/fortran/src/H5Gf.c
@@ -199,7 +199,7 @@ DONE:
/*----------------------------------------------------------------------------
* Name: h5gn_members_c
- * Purpose: Call H5Gget_num_objs to find number of objects in the group
+ * Purpose: Call H5Gget_info_by_name to find number of objects in the group
* Inputs: loc_id - file or group identifier
* name - name of the group
* namelen - name length
@@ -222,8 +222,8 @@ nh5gn_members_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *nmembers)
if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
goto DONE;
- /* Call H5Gget_info() for the number of objects in the group */
- if(H5Gget_info((hid_t)*loc_id, c_name, &ginfo, H5P_DEFAULT) < 0)
+ /* Call H5Gget_info_by_name() for the number of objects in the group */
+ if(H5Gget_info_by_name((hid_t)*loc_id, c_name, &ginfo, H5P_DEFAULT) < 0)
goto DONE;
*nmembers = (int_f)ginfo.nlinks;
diff --git a/src/H5G.c b/src/H5G.c
index 872d145..1b74695 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -483,7 +483,51 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5Gget_info(hid_t loc_id, const char *name, H5G_info_t *grp_info, hid_t lapl_id)
+H5Gget_info(hid_t grp_id, H5G_info_t *grp_info)
+{
+ H5I_type_t id_type; /* Type of ID */
+ H5G_loc_t loc; /* Location of group */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_API(H5Gget_info, FAIL)
+ H5TRACE2("e", "i*x", grp_id, grp_info);
+
+ /* Check args */
+ id_type = H5I_get_type(grp_id);
+ if(!(H5I_GROUP == id_type || H5I_FILE == id_type))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid argument")
+ if(!grp_info)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no info struct")
+
+ /* Get group location */
+ if(H5G_loc(grp_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+
+ /* Retrieve the group's information */
+ if(H5G_obj_info(loc.oloc, grp_info/*out*/, H5AC_ind_dxpl_id) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve group info")
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5Gget_info() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5Gget_info_by_name
+ *
+ * Purpose: Retrieve information about a group.
+ *
+ * Return: Success: Non-negative
+ * Failure: Negative
+ *
+ * Programmer: Quincey Koziol
+ * November 27 2006
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Gget_info_by_name(hid_t loc_id, const char *name, H5G_info_t *grp_info,
+ hid_t lapl_id)
{
H5G_loc_t loc; /* Location of group */
H5G_loc_t grp_loc; /* Location used to open group */
@@ -492,7 +536,7 @@ H5Gget_info(hid_t loc_id, const char *name, H5G_info_t *grp_info, hid_t lapl_id)
hbool_t loc_found = FALSE; /* Location at 'name' found */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Gget_info, FAIL)
+ FUNC_ENTER_API(H5Gget_info_by_name, FAIL)
H5TRACE4("e", "i*s*xi", loc_id, name, grp_info, lapl_id);
/* Check args */
@@ -527,7 +571,7 @@ done:
HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't free location")
FUNC_LEAVE_API(ret_value)
-} /* end H5Gget_info() */
+} /* end H5Gget_info_by_name() */
/*-------------------------------------------------------------------------
diff --git a/src/H5Gpublic.h b/src/H5Gpublic.h
index 6162be3..e818e72 100644
--- a/src/H5Gpublic.h
+++ b/src/H5Gpublic.h
@@ -56,7 +56,7 @@ typedef enum H5G_storage_type_t {
H5G_STORAGE_TYPE_DENSE /* Links are stored in fractal heap & indexed with v2 B-tree */
} H5G_storage_type_t;
-/* Information struct for group (for H5Gget_info/H5Gget_info_by_idx) */
+/* Information struct for group (for H5Gget_info/H5Gget_info_by_name/H5Gget_info_by_idx) */
typedef struct H5G_info_t {
H5G_storage_type_t storage_type; /* Type of storage for links in group */
hsize_t nlinks; /* Number of links in group */
@@ -76,7 +76,8 @@ H5_DLL hid_t H5Gcreate2(hid_t loc_id, const char *name, hid_t lcpl_id,
H5_DLL hid_t H5Gcreate_anon(hid_t loc_id, hid_t gcpl_id, hid_t gapl_id);
H5_DLL hid_t H5Gopen2(hid_t loc_id, const char *name, hid_t gapl_id);
H5_DLL hid_t H5Gget_create_plist(hid_t group_id);
-H5_DLL herr_t H5Gget_info(hid_t loc_id, const char *name, H5G_info_t *ginfo,
+H5_DLL herr_t H5Gget_info(hid_t loc_id, H5G_info_t *ginfo);
+H5_DLL herr_t H5Gget_info_by_name(hid_t loc_id, const char *name, H5G_info_t *ginfo,
hid_t lapl_id);
H5_DLL herr_t H5Gget_info_by_idx(hid_t loc_id, const char *group_name,
H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5G_info_t *ginfo,
diff --git a/test/links.c b/test/links.c
index 1675d44..ce3714f 100644
--- a/test/links.c
+++ b/test/links.c
@@ -1456,7 +1456,7 @@ error:
/*-------------------------------------------------------------------------
- * Function: test_compat
+ * Function: test_deprec
*
* Purpose: Tests deprecated functions for backward compatibility.
*
@@ -1472,7 +1472,7 @@ error:
*/
#ifndef H5_NO_DEPRECATED_SYMBOLS
static int
-test_compat(hid_t fapl, hbool_t new_format)
+test_deprec(hid_t fapl, hbool_t new_format)
{
hid_t file_id = -1;
hid_t group1_id = -1;
@@ -1592,7 +1592,7 @@ error:
H5Fclose(file_id);
} H5E_END_TRY;
return 1;
-} /* end test_compat() */
+} /* end test_deprec() */
#endif /* H5_NO_DEPRECATED_SYMBOLS */
@@ -8990,14 +8990,32 @@ group_info(hid_t fapl)
/* Create hard link, with group object */
if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) TEST_ERROR
+
+ /* Retrieve group's information */
+ if(H5Gget_info(group_id2, &grp_info) < 0) TEST_ERROR
+
+ /* Check (new/empty) group's information */
+ if(grp_info.storage_type != H5G_STORAGE_TYPE_COMPACT) TEST_ERROR
+ if(grp_info.max_corder != 0) TEST_ERROR
+ if(grp_info.nlinks != 0) TEST_ERROR
+
/* Retrieve group's information */
- if(H5Gget_info(group_id2, ".", &grp_info, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Gget_info_by_name(group_id, objname, &grp_info, H5P_DEFAULT) < 0) TEST_ERROR
/* Check (new/empty) group's information */
if(grp_info.storage_type != H5G_STORAGE_TYPE_COMPACT) TEST_ERROR
if(grp_info.max_corder != 0) TEST_ERROR
if(grp_info.nlinks != 0) TEST_ERROR
+ /* Retrieve group's information */
+ if(H5Gget_info_by_name(group_id2, ".", &grp_info, H5P_DEFAULT) < 0) TEST_ERROR
+
+ /* Check (new/empty) group's information */
+ if(grp_info.storage_type != H5G_STORAGE_TYPE_COMPACT) TEST_ERROR
+ if(grp_info.max_corder != 0) TEST_ERROR
+ if(grp_info.nlinks != 0) TEST_ERROR
+
+
/* Create objects in new group created */
for(v = 0; v <= u; v++) {
/* Make name for link */
@@ -9010,8 +9028,17 @@ group_info(hid_t fapl)
if(H5Gclose(group_id3) < 0) TEST_ERROR
} /* end for */
+
+ /* Retrieve group's information */
+ if(H5Gget_info(group_id2, &grp_info) < 0) TEST_ERROR
+
+ /* Check (new) group's information */
+ if(grp_info.storage_type != H5G_STORAGE_TYPE_COMPACT) TEST_ERROR
+ if(grp_info.max_corder != (int64_t)(u + 1)) TEST_ERROR
+ if(grp_info.nlinks != (hsize_t)(u + 1)) TEST_ERROR
+
/* Retrieve group's information */
- if(H5Gget_info(group_id2, ".", &grp_info, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Gget_info_by_name(group_id, objname, &grp_info, H5P_DEFAULT) < 0) TEST_ERROR
/* Check (new) group's information */
if(grp_info.storage_type != H5G_STORAGE_TYPE_COMPACT) TEST_ERROR
@@ -9019,6 +9046,15 @@ group_info(hid_t fapl)
if(grp_info.nlinks != (hsize_t)(u + 1)) TEST_ERROR
/* Retrieve group's information */
+ if(H5Gget_info_by_name(group_id2, ".", &grp_info, H5P_DEFAULT) < 0) TEST_ERROR
+
+ /* Check (new) group's information */
+ if(grp_info.storage_type != H5G_STORAGE_TYPE_COMPACT) TEST_ERROR
+ if(grp_info.max_corder != (int64_t)(u + 1)) TEST_ERROR
+ if(grp_info.nlinks != (hsize_t)(u + 1)) TEST_ERROR
+
+
+ /* Retrieve group's information */
if(order != H5_ITER_NATIVE) {
if(order == H5_ITER_INC) {
if(H5Gget_info_by_idx(group_id, ".", idx_type, order, (hsize_t)u, &grp_info, H5P_DEFAULT) < 0) TEST_ERROR
@@ -9037,8 +9073,24 @@ group_info(hid_t fapl)
if(H5Gclose(group_id2) < 0) TEST_ERROR
+ /* Retrieve main group's information */
+ if(H5Gget_info(group_id, &grp_info) < 0) TEST_ERROR
+
+ /* Check main group's information */
+ if(grp_info.storage_type != H5G_STORAGE_TYPE_COMPACT) TEST_ERROR
+ if(grp_info.max_corder != (int64_t)(u + 1)) TEST_ERROR
+ if(grp_info.nlinks != (hsize_t)(u + 1)) TEST_ERROR
+
+ /* Retrieve main group's information, by name */
+ if(H5Gget_info_by_name(file_id, CORDER_GROUP_NAME, &grp_info, H5P_DEFAULT) < 0) TEST_ERROR
+
+ /* Check main group's information */
+ if(grp_info.storage_type != H5G_STORAGE_TYPE_COMPACT) TEST_ERROR
+ if(grp_info.max_corder != (int64_t)(u + 1)) TEST_ERROR
+ if(grp_info.nlinks != (hsize_t)(u + 1)) TEST_ERROR
+
/* Retrieve main group's information, by name */
- if(H5Gget_info(group_id, ".", &grp_info, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Gget_info_by_name(group_id, ".", &grp_info, H5P_DEFAULT) < 0) TEST_ERROR
/* Check main group's information */
if(grp_info.storage_type != H5G_STORAGE_TYPE_COMPACT) TEST_ERROR
@@ -9051,7 +9103,7 @@ group_info(hid_t fapl)
if(H5Lcreate_soft(valname, soft_group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
/* Retrieve soft link group's information, by name */
- if(H5Gget_info(soft_group_id, ".", &grp_info, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Gget_info(soft_group_id, &grp_info) < 0) TEST_ERROR
/* Check soft link group's information */
if(grp_info.storage_type != H5G_STORAGE_TYPE_COMPACT) TEST_ERROR
@@ -9079,14 +9131,32 @@ group_info(hid_t fapl)
/* Create hard link, with group object */
if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) TEST_ERROR
+
/* Retrieve group's information */
- if(H5Gget_info(group_id2, ".", &grp_info, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Gget_info(group_id2, &grp_info) < 0) TEST_ERROR
+
+ /* Check (new/empty) group's information */
+ if(grp_info.storage_type != H5G_STORAGE_TYPE_COMPACT) TEST_ERROR
+ if(grp_info.max_corder != 0) TEST_ERROR
+ if(grp_info.nlinks != 0) TEST_ERROR
+
+ /* Retrieve group's information, by name */
+ if(H5Gget_info_by_name(group_id, objname, &grp_info, H5P_DEFAULT) < 0) TEST_ERROR
+
+ /* Check (new/empty) group's information */
+ if(grp_info.storage_type != H5G_STORAGE_TYPE_COMPACT) TEST_ERROR
+ if(grp_info.max_corder != 0) TEST_ERROR
+ if(grp_info.nlinks != 0) TEST_ERROR
+
+ /* Retrieve group's information, by name */
+ if(H5Gget_info_by_name(group_id2, ".", &grp_info, H5P_DEFAULT) < 0) TEST_ERROR
/* Check (new/empty) group's information */
if(grp_info.storage_type != H5G_STORAGE_TYPE_COMPACT) TEST_ERROR
if(grp_info.max_corder != 0) TEST_ERROR
if(grp_info.nlinks != 0) TEST_ERROR
+
/* Create objects in new group created */
for(v = 0; v <= u; v++) {
/* Make name for link */
@@ -9099,14 +9169,32 @@ group_info(hid_t fapl)
if(H5Gclose(group_id3) < 0) TEST_ERROR
} /* end for */
+
/* Retrieve group's information */
- if(H5Gget_info(group_id2, ".", &grp_info, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Gget_info(group_id2, &grp_info) < 0) TEST_ERROR
/* Check (new) group's information */
if(grp_info.storage_type != H5G_STORAGE_TYPE_DENSE) TEST_ERROR
if(grp_info.max_corder != (int64_t)(u + 1)) TEST_ERROR
if(grp_info.nlinks != (hsize_t)(u + 1)) TEST_ERROR
+ /* Retrieve group's information, by name */
+ if(H5Gget_info_by_name(group_id, objname, &grp_info, H5P_DEFAULT) < 0) TEST_ERROR
+
+ /* Check (new) group's information */
+ if(grp_info.storage_type != H5G_STORAGE_TYPE_DENSE) TEST_ERROR
+ if(grp_info.max_corder != (int64_t)(u + 1)) TEST_ERROR
+ if(grp_info.nlinks != (hsize_t)(u + 1)) TEST_ERROR
+
+ /* Retrieve group's information, by name */
+ if(H5Gget_info_by_name(group_id2, ".", &grp_info, H5P_DEFAULT) < 0) TEST_ERROR
+
+ /* Check (new) group's information */
+ if(grp_info.storage_type != H5G_STORAGE_TYPE_DENSE) TEST_ERROR
+ if(grp_info.max_corder != (int64_t)(u + 1)) TEST_ERROR
+ if(grp_info.nlinks != (hsize_t)(u + 1)) TEST_ERROR
+
+
/* Retrieve group's information */
if(order != H5_ITER_NATIVE) {
if(order == H5_ITER_INC) {
@@ -9126,8 +9214,24 @@ group_info(hid_t fapl)
if(H5Gclose(group_id2) < 0) TEST_ERROR
+ /* Retrieve main group's information */
+ if(H5Gget_info(group_id, &grp_info) < 0) TEST_ERROR
+
+ /* Check main group's information */
+ if(grp_info.storage_type != H5G_STORAGE_TYPE_DENSE) TEST_ERROR
+ if(grp_info.max_corder != (int64_t)(u + 1)) TEST_ERROR
+ if(grp_info.nlinks != (hsize_t)(u + 1)) TEST_ERROR
+
+ /* Retrieve main group's information, by name */
+ if(H5Gget_info_by_name(file_id, CORDER_GROUP_NAME, &grp_info, H5P_DEFAULT) < 0) TEST_ERROR
+
+ /* Check main group's information */
+ if(grp_info.storage_type != H5G_STORAGE_TYPE_DENSE) TEST_ERROR
+ if(grp_info.max_corder != (int64_t)(u + 1)) TEST_ERROR
+ if(grp_info.nlinks != (hsize_t)(u + 1)) TEST_ERROR
+
/* Retrieve main group's information, by name */
- if(H5Gget_info(group_id, ".", &grp_info, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Gget_info_by_name(group_id, ".", &grp_info, H5P_DEFAULT) < 0) TEST_ERROR
/* Check main group's information */
if(grp_info.storage_type != H5G_STORAGE_TYPE_DENSE) TEST_ERROR
@@ -9140,7 +9244,7 @@ group_info(hid_t fapl)
if(H5Lcreate_soft(valname, soft_group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
/* Retrieve soft link group's information, by name */
- if(H5Gget_info(soft_group_id, ".", &grp_info, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Gget_info(soft_group_id, &grp_info) < 0) TEST_ERROR
/* Check soft link group's information */
if(grp_info.storage_type != H5G_STORAGE_TYPE_DENSE) TEST_ERROR
@@ -9257,14 +9361,32 @@ group_info_old(hid_t fapl)
/* Create hard link, with group object */
if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
+
/* Retrieve group's information */
- if(H5Gget_info(group_id2, ".", &grp_info, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Gget_info(group_id2, &grp_info) < 0) TEST_ERROR
+
+ /* Check (new/empty) group's information */
+ if(grp_info.storage_type != H5G_STORAGE_TYPE_SYMBOL_TABLE) TEST_ERROR
+ if(grp_info.max_corder != 0) TEST_ERROR
+ if(grp_info.nlinks != 0) TEST_ERROR
+
+ /* Retrieve group's information, by name */
+ if(H5Gget_info_by_name(group_id, objname, &grp_info, H5P_DEFAULT) < 0) TEST_ERROR
/* Check (new/empty) group's information */
if(grp_info.storage_type != H5G_STORAGE_TYPE_SYMBOL_TABLE) TEST_ERROR
if(grp_info.max_corder != 0) TEST_ERROR
if(grp_info.nlinks != 0) TEST_ERROR
+ /* Retrieve group's information, by name */
+ if(H5Gget_info_by_name(group_id2, ".", &grp_info, H5P_DEFAULT) < 0) TEST_ERROR
+
+ /* Check (new/empty) group's information */
+ if(grp_info.storage_type != H5G_STORAGE_TYPE_SYMBOL_TABLE) TEST_ERROR
+ if(grp_info.max_corder != 0) TEST_ERROR
+ if(grp_info.nlinks != 0) TEST_ERROR
+
+
/* Create objects in new group created */
for(v = 0; v <= u; v++) {
/* Make name for link */
@@ -9277,14 +9399,32 @@ group_info_old(hid_t fapl)
if(H5Gclose(group_id3) < 0) TEST_ERROR
} /* end for */
+
/* Retrieve group's information */
- if(H5Gget_info(group_id2, ".", &grp_info, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Gget_info(group_id2, &grp_info) < 0) TEST_ERROR
+
+ /* Check (new) group's information */
+ if(grp_info.storage_type != H5G_STORAGE_TYPE_SYMBOL_TABLE) TEST_ERROR
+ if(grp_info.max_corder != 0) TEST_ERROR
+ if(grp_info.nlinks != (hsize_t)(u + 1)) TEST_ERROR
+
+ /* Retrieve group's information, by name */
+ if(H5Gget_info_by_name(group_id, objname, &grp_info, H5P_DEFAULT) < 0) TEST_ERROR
/* Check (new) group's information */
if(grp_info.storage_type != H5G_STORAGE_TYPE_SYMBOL_TABLE) TEST_ERROR
if(grp_info.max_corder != 0) TEST_ERROR
if(grp_info.nlinks != (hsize_t)(u + 1)) TEST_ERROR
+ /* Retrieve group's information, by name */
+ if(H5Gget_info_by_name(group_id2, ".", &grp_info, H5P_DEFAULT) < 0) TEST_ERROR
+
+ /* Check (new) group's information */
+ if(grp_info.storage_type != H5G_STORAGE_TYPE_SYMBOL_TABLE) TEST_ERROR
+ if(grp_info.max_corder != 0) TEST_ERROR
+ if(grp_info.nlinks != (hsize_t)(u + 1)) TEST_ERROR
+
+
/* Retrieve group's information */
if(order != H5_ITER_NATIVE) {
if(order == H5_ITER_INC) {
@@ -9304,8 +9444,24 @@ group_info_old(hid_t fapl)
if(H5Gclose(group_id2) < 0) TEST_ERROR
+ /* Retrieve main group's information */
+ if(H5Gget_info(group_id, &grp_info) < 0) TEST_ERROR
+
+ /* Check main group's information */
+ if(grp_info.storage_type != H5G_STORAGE_TYPE_SYMBOL_TABLE) TEST_ERROR
+ if(grp_info.max_corder != 0) TEST_ERROR
+ if(grp_info.nlinks != (hsize_t)(u + 1)) TEST_ERROR
+
+ /* Retrieve main group's information, by name */
+ if(H5Gget_info_by_name(file_id, CORDER_GROUP_NAME, &grp_info, H5P_DEFAULT) < 0) TEST_ERROR
+
+ /* Check main group's information */
+ if(grp_info.storage_type != H5G_STORAGE_TYPE_SYMBOL_TABLE) TEST_ERROR
+ if(grp_info.max_corder != 0) TEST_ERROR
+ if(grp_info.nlinks != (hsize_t)(u + 1)) TEST_ERROR
+
/* Retrieve main group's information, by name */
- if(H5Gget_info(group_id, ".", &grp_info, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Gget_info_by_name(group_id, ".", &grp_info, H5P_DEFAULT) < 0) TEST_ERROR
/* Check main group's information */
if(grp_info.storage_type != H5G_STORAGE_TYPE_SYMBOL_TABLE) TEST_ERROR
@@ -9318,7 +9474,7 @@ group_info_old(hid_t fapl)
if(H5Lcreate_soft(valname, soft_group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
/* Retrieve soft link group's information, by name */
- if(H5Gget_info(soft_group_id, ".", &grp_info, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Gget_info(soft_group_id, &grp_info) < 0) TEST_ERROR
/* Check soft link group's information */
if(grp_info.storage_type != H5G_STORAGE_TYPE_SYMBOL_TABLE) TEST_ERROR
@@ -9582,7 +9738,7 @@ main(void)
nerrors += test_copy((new_format ? fapl2 : fapl), new_format);
nerrors += test_move_preserves((new_format ? fapl2 : fapl), new_format);
#ifndef H5_NO_DEPRECATED_SYMBOLS
- nerrors += test_compat((new_format ? fapl2 : fapl), new_format);
+ nerrors += test_deprec((new_format ? fapl2 : fapl), new_format);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
#ifndef H5_CANNOT_OPEN_TWICE
nerrors += external_link_root((new_format ? fapl2 : fapl), new_format) < 0 ? 1 : 0;
diff --git a/test/objcopy.c b/test/objcopy.c
index fa6a6e2..cde4e2c 100755
--- a/test/objcopy.c
+++ b/test/objcopy.c
@@ -1247,8 +1247,8 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags)
cpy_flags = 0;
/* Check if both groups have the same # of objects */
- if(H5Gget_info(gid, ".", &ginfo, H5P_DEFAULT) < 0) TEST_ERROR
- if(H5Gget_info(gid2, ".", &ginfo2, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Gget_info(gid, &ginfo) < 0) TEST_ERROR
+ if(H5Gget_info(gid2, &ginfo2) < 0) TEST_ERROR
if((cpy_flags & H5O_COPY_SHALLOW_HIERARCHY_FLAG) && depth == 0) {
if(ginfo2.nlinks != 0) TEST_ERROR
} /* end if */
diff --git a/test/th5o.c b/test/th5o.c
index f6e6f0b..6af08e4 100644
--- a/test/th5o.c
+++ b/test/th5o.c
@@ -102,7 +102,7 @@ test_h5o_open(void)
VERIFY(id_type, H5I_DATASET, "H5Iget_type for dataset ID");
/* Do something more complex with each of the IDs to make sure they "work" */
- ret = H5Gget_info(grp, ".", &ginfo, H5P_DEFAULT);
+ ret = H5Gget_info(grp, &ginfo);
CHECK(ret, FAIL, "H5Gget_info");
VERIFY(ginfo.nlinks, 1, "H5Gget_info"); /* There should be one object, the datatype */
@@ -315,7 +315,7 @@ test_h5o_open_by_addr(void)
VERIFY(id_type, H5I_DATASET, "H5Iget_type for dataset ID");
/* Do something more complex with each of the IDs to make sure they "work" */
- ret = H5Gget_info(grp, ".", &ginfo, H5P_DEFAULT);
+ ret = H5Gget_info(grp, &ginfo);
CHECK(ret, FAIL, "H5Gget_info");
VERIFY(ginfo.nlinks, 1, "H5Gget_info"); /* There should be one object, the datatype */
diff --git a/test/titerate.c b/test/titerate.c
index 5b354ce..9f93427 100644
--- a/test/titerate.c
+++ b/test/titerate.c
@@ -208,7 +208,7 @@ test_iter_group(hid_t fapl, hbool_t new_format)
root_group = H5Gopen2(file, "/", H5P_DEFAULT);
CHECK(root_group, FAIL, "H5Gopen2");
- ret = H5Gget_info(root_group, ".", &ginfo, H5P_DEFAULT);
+ ret = H5Gget_info(root_group, &ginfo);
CHECK(ret, FAIL, "H5Gget_info");
VERIFY(ginfo.nlinks, (NDATASETS + 2), "H5Gget_info");
@@ -234,7 +234,7 @@ test_iter_group(hid_t fapl, hbool_t new_format)
* iterate through B-tree for group members in internal library design.
* (Same as test above, but with the file ID instead of opening the root group)
*/
- ret = H5Gget_info(file, ".", &ginfo, H5P_DEFAULT);
+ ret = H5Gget_info(file, &ginfo);
CHECK(ret, FAIL, "H5Gget_info");
VERIFY(ginfo.nlinks, NDATASETS + 2, "H5Gget_info");
@@ -772,7 +772,7 @@ static void test_grp_memb_funcs(hid_t fapl)
root_group = H5Gopen2(file, "/", H5P_DEFAULT);
CHECK(root_group, FAIL, "H5Gopen2");
- ret = H5Gget_info(root_group, ".", &ginfo, H5P_DEFAULT);
+ ret = H5Gget_info(root_group, &ginfo);
CHECK(ret, FAIL, "H5Gget_info");
VERIFY(ginfo.nlinks, (NDATASETS + 2), "H5Gget_info");
@@ -868,7 +868,7 @@ static void test_links(hid_t fapl)
ret = H5Lcreate_hard(gid, "/g1", H5L_SAME_LOC, "hardlink", H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Lcreate_hard");
- ret = H5Gget_info(gid, ".", &ginfo, H5P_DEFAULT);
+ ret = H5Gget_info(gid, &ginfo);
CHECK(ret, FAIL, "H5Gget_info");
VERIFY(ginfo.nlinks, 3, "H5Gget_info");
diff --git a/test/trefer.c b/test/trefer.c
index 6c88a60..bef497f 100644
--- a/test/trefer.c
+++ b/test/trefer.c
@@ -1081,7 +1081,7 @@ test_reference_group(void)
CHECK(ret, FAIL, "H5Literate");
/* Various queries on the group opened */
- ret = H5Gget_info(gid, ".", &ginfo, H5P_DEFAULT);
+ ret = H5Gget_info(gid, &ginfo);
CHECK(ret, FAIL, "H5Gget_info");
VERIFY(ginfo.nlinks, 3, "H5Gget_info");
diff --git a/tools/h5stat/h5stat.c b/tools/h5stat/h5stat.c
index fbf38bd..2d67cc7 100644
--- a/tools/h5stat/h5stat.c
+++ b/tools/h5stat/h5stat.c
@@ -471,7 +471,7 @@ group_stats(hid_t group, const char *name, const char *fullname,
iter->group_ohdr_info.free_size += oi->hdr.space.free;
/* Get group information */
- ret = H5Gget_info(group, name, &ginfo, H5P_DEFAULT);
+ ret = H5Gget_info_by_name(group, name, &ginfo, H5P_DEFAULT);
assert(ret >= 0);
/* Update link stats */