summaryrefslogtreecommitdiffstats
path: root/tools/lib
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-08-28 15:02:54 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-08-28 15:02:54 (GMT)
commitea343ef85416b42f68f28fb1024702c6726f7eea (patch)
treed5c401bf83f7f5578df06c54f9fd9fb198732ed2 /tools/lib
parenteb16d8bc2b2f37c7a1d75fe7bf5258eba21515b2 (diff)
downloadhdf5-ea343ef85416b42f68f28fb1024702c6726f7eea.zip
hdf5-ea343ef85416b42f68f28fb1024702c6726f7eea.tar.gz
hdf5-ea343ef85416b42f68f28fb1024702c6726f7eea.tar.bz2
[svn-r14115] Description:
Remove all plain calls to H5Gopen() from source, replacing them with either H5Gopen2(). Add test for H5Gopen1(). Reformatted several pieces of code, to clean them up. Tested on: FreeBSD/32 6.2 (duty) FreeBSD/64 6.2 (liberty) Linux/32 2.6 (kagiso) Linux/64 2.6 (smirom) Solaris/32 5.10 (linew) Mac OS X/32 10.4.10 (amazon)
Diffstat (limited to 'tools/lib')
-rw-r--r--tools/lib/h5diff.c23
-rw-r--r--tools/lib/h5diff_attr.c2
-rw-r--r--tools/lib/h5diff_dset.c2
-rw-r--r--tools/lib/h5trav.c2
4 files changed, 15 insertions, 14 deletions
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c
index 4b354b6..dc32b9e 100644
--- a/tools/lib/h5diff.c
+++ b/tools/lib/h5diff.c
@@ -1010,33 +1010,34 @@ hsize_t diff (hid_t file1_id,
*/
case H5G_GROUP:
- ret = HDstrcmp(path1,path2);
+ ret = HDstrcmp(path1, path2);
/* if "path1" != "path2" then the groups are "different" */
- nfound = (ret!=0) ? 1 : 0;
+ nfound = (ret != 0) ? 1 : 0;
- if (print_objname(options,nfound))
- do_print_objname ("group", path1, path2);
+ if(print_objname(options, nfound))
+ do_print_objname("group", path1, path2);
/* always print the number of differences found in verbose mode */
- if (options->m_verbose)
+ if(options->m_verbose)
print_found(nfound);
- if ((grp1_id = H5Gopen(file1_id, path1))<0)
+ if((grp1_id = H5Gopen2(file1_id, path1, H5P_DEFAULT)) < 0)
goto out;
- if ((grp2_id = H5Gopen(file2_id, path2))<0)
+ if((grp2_id = H5Gopen2(file2_id, path2, H5P_DEFAULT)) < 0)
goto out;
+
/*-------------------------------------------------------------------------
* compare attributes
* the if condition refers to cases when the dataset is a referenced object
*-------------------------------------------------------------------------
*/
- if (path1)
- nfound += diff_attr(grp1_id,grp2_id,path1,path2,options);
+ if(path1)
+ nfound += diff_attr(grp1_id, grp2_id, path1, path2, options);
- if ( H5Gclose(grp1_id)<0)
+ if(H5Gclose(grp1_id) < 0)
goto out;
- if ( H5Gclose(grp2_id)<0)
+ if(H5Gclose(grp2_id) < 0)
goto out;
break;
diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c
index 37bef3e..ab089cb 100644
--- a/tools/lib/h5diff_attr.c
+++ b/tools/lib/h5diff_attr.c
@@ -22,7 +22,7 @@
*
* Purpose: compare attributes located in LOC1_ID and LOC2_ID, which are
* obtained either from
- * loc_id = H5Gopen( fid, name);
+ * loc_id = H5Gopen2( fid, name, H5P_DEFAULT);
* loc_id = H5Dopen( fid, name);
* loc_id = H5Topen( fid, name);
*
diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c
index c714d45..b5a2872 100644
--- a/tools/lib/h5diff_dset.c
+++ b/tools/lib/h5diff_dset.c
@@ -25,7 +25,7 @@
*
*-------------------------------------------------------------------------
*/
-void
+static void
print_size (int rank, hsize_t *dims)
{
int i;
diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c
index 456b56b..c824b3d 100644
--- a/tools/lib/h5trav.c
+++ b/tools/lib/h5trav.c
@@ -340,7 +340,7 @@ static hssize_t get_nnames( hid_t loc_id, const char *group_name )
hsize_t nobjs = 0;
/* Open the group */
- if((gid = H5Gopen(loc_id, group_name)) < 0)
+ if((gid = H5Gopen2(loc_id, group_name, H5P_DEFAULT)) < 0)
return(-1);
/* Retrieve the number of objects in it */