summaryrefslogtreecommitdiffstats
path: root/testpar
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 /testpar
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 'testpar')
-rw-r--r--testpar/t_mdset.c10
-rw-r--r--testpar/t_pflush2.c27
2 files changed, 19 insertions, 18 deletions
diff --git a/testpar/t_mdset.c b/testpar/t_mdset.c
index c282408..085fbfc 100644
--- a/testpar/t_mdset.c
+++ b/testpar/t_mdset.c
@@ -893,7 +893,7 @@ void group_dataset_read(hid_t fid, int mpi_rank, int m)
/* open every group under root group. */
sprintf(gname, "group%d", m);
- gid = H5Gopen(fid, gname);
+ gid = H5Gopen2(fid, gname, H5P_DEFAULT);
VRFY((gid > 0), gname);
/* check the data. */
@@ -1020,7 +1020,7 @@ void multiple_group_write(void)
}
/* recursively creates subgroups under the first group. */
- gid = H5Gopen(fid, "group0");
+ gid = H5Gopen2(fid, "group0", H5P_DEFAULT);
create_group_recursive(memspace, filespace, gid, 0);
ret = H5Gclose(gid);
VRFY((ret>=0), "H5Gclose");
@@ -1163,7 +1163,7 @@ void multiple_group_read(void)
/* open every group under root group. */
for(m=0; m<ngroups; m++) {
sprintf(gname, "group%d", m);
- gid = H5Gopen(fid, gname);
+ gid = H5Gopen2(fid, gname, H5P_DEFAULT);
VRFY((gid > 0), gname);
/* check the data. */
@@ -1185,7 +1185,7 @@ void multiple_group_read(void)
}
/* open all the groups in vertical direction. */
- gid = H5Gopen(fid, "group0");
+ gid = H5Gopen2(fid, "group0", H5P_DEFAULT);
VRFY((gid>0), "group0");
recursive_read_group(memspace, filespace, gid, 0);
H5Gclose(gid);
@@ -1278,7 +1278,7 @@ void recursive_read_group(hid_t memspace, hid_t filespace, hid_t gid,
if( counter < GROUP_DEPTH ) {
sprintf(gname, "%dth_child_group", counter+1);
- child_gid = H5Gopen(gid, gname);
+ child_gid = H5Gopen2(gid, gname, H5P_DEFAULT);
VRFY((child_gid>0), gname);
recursive_read_group(memspace, filespace, child_gid, counter+1);
H5Gclose(child_gid);
diff --git a/testpar/t_pflush2.c b/testpar/t_pflush2.c
index 5c3326b..2839cf8 100644
--- a/testpar/t_pflush2.c
+++ b/testpar/t_pflush2.c
@@ -89,25 +89,26 @@ int check_file(char* name, hid_t fapl)
}
/* Open some groups */
- if ((groups=H5Gopen(file, "some_groups"))<0) goto error;
- for (i=0; i<100; i++) {
+ if((groups = H5Gopen2(file, "some_groups", H5P_DEFAULT)) < 0) goto error;
+ for(i = 0; i < 100; i++) {
sprintf(name, "grp%02u", (unsigned)i);
- if ((grp=H5Gopen(groups, name))<0) goto error;
- if (H5Gclose(grp)<0) goto error;
+ if((grp = H5Gopen2(groups, name, H5P_DEFAULT)) < 0) goto error;
+ if(H5Gclose(grp) < 0) goto error;
}
- if (H5Gclose(groups)<0) goto error;
- if (H5Dclose(dset)<0) goto error;
- if (H5Fclose(file)<0) goto error;
- if (H5Pclose(plist)<0) goto error;
+ if(H5Gclose(groups) < 0) goto error;
+ if(H5Dclose(dset) < 0) goto error;
+ if(H5Fclose(file) < 0) goto error;
+ if(H5Pclose(plist) < 0) goto error;
+
return 0;
-error:
- if (H5Fclose(file)<0) goto error;
- if (H5Pclose(plist)<0) goto error;
+error:
+ H5E_BEGIN_TRY {
+ H5Fclose(file);
+ H5Pclose(plist);
+ } H5E_END_TRY;
return 1;
-
-
}
/*-------------------------------------------------------------------------