summaryrefslogtreecommitdiffstats
path: root/examples
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 /examples
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 'examples')
-rw-r--r--examples/h5_elink_unix2win.c2
-rw-r--r--examples/h5_extlink.c10
-rw-r--r--examples/h5_group.c2
-rw-r--r--examples/h5_interm_group.c4
4 files changed, 9 insertions, 9 deletions
diff --git a/examples/h5_elink_unix2win.c b/examples/h5_elink_unix2win.c
index f9a7fca..a82e23d 100644
--- a/examples/h5_elink_unix2win.c
+++ b/examples/h5_elink_unix2win.c
@@ -169,7 +169,7 @@ unix2win_example(void)
#endif
/* Now follow the link */
- if((gid = H5Gopen(fid, "ext_link")) < 0) goto error;
+ if((gid = H5Gopen2(fid, "ext_link", H5P_DEFAULT)) < 0) goto error;
printf("Successfully followed external link.\n");
/* Close the group and the file */
diff --git a/examples/h5_extlink.c b/examples/h5_extlink.c
index ecd8b52..0f86135 100644
--- a/examples/h5_extlink.c
+++ b/examples/h5_extlink.c
@@ -82,7 +82,7 @@ static void extlink_example(void)
* Here, group_id and group2_id point to the same group inside the
* target file.
*/
- group2_id = H5Gopen(targ_file_id, "target_group/new_group");
+ group2_id = H5Gopen2(targ_file_id, "target_group/new_group", H5P_DEFAULT);
/* Don't forget to close the IDs we opened. */
H5Gclose(group2_id);
@@ -173,8 +173,8 @@ static void extlink_prefix_example(void)
H5Gclose(group_id);
/* Each file has had a group created inside it using the same external link. */
- group_id = H5Gopen(red_file_id, "pink");
- group2_id = H5Gopen(blue_file_id, "sky blue");
+ group_id = H5Gopenw(red_file_id, "pink", H5P_DEFAULT);
+ group2_id = H5Gopen2(blue_file_id, "sky blue", H5P_DEFAULT);
/* Clean up our open IDs */
H5Gclose(group2_id);
@@ -265,7 +265,7 @@ static void soft_link_example(void)
* a normal soft link. This link will still dangle if the object's
* original name is changed or unlinked.
*/
- group_id = H5Gopen(file_id, UD_SOFT_LINK_NAME);
+ group_id = H5Gopen2(file_id, UD_SOFT_LINK_NAME, H5P_DEFAULT);
/* The group is now open normally. Don't forget to close it! */
H5Gclose(group_id);
@@ -382,7 +382,7 @@ static void hard_link_example(void)
/* The group is still accessible through the UD hard link. If this were
* a soft link instead, the object would have been deleted when the last
* hard link to it was unlinked. */
- group_id = H5Gopen(file_id, UD_HARD_LINK_NAME);
+ group_id = H5Gopen2(file_id, UD_HARD_LINK_NAME, H5P_DEFAULT);
/* The group is now open normally. Don't forget to close it! */
H5Gclose(group_id);
diff --git a/examples/h5_group.c b/examples/h5_group.c
index 80cfd04..52f9f53 100644
--- a/examples/h5_group.c
+++ b/examples/h5_group.c
@@ -101,7 +101,7 @@ main(void)
* Now reopen the file and group in the file.
*/
file = H5Fopen(H5FILE_NAME, H5F_ACC_RDWR, H5P_DEFAULT);
- grp = H5Gopen(file, "Data");
+ grp = H5Gopen2(file, "Data", H5P_DEFAULT);
/*
* Access "Compressed_Data" dataset in the group.
diff --git a/examples/h5_interm_group.c b/examples/h5_interm_group.c
index caa0a88..95ed910 100644
--- a/examples/h5_interm_group.c
+++ b/examples/h5_interm_group.c
@@ -68,7 +68,7 @@ main(void)
* Check that group G2/G3 exists in /G1 and if not create it using
* intermediate group creation property.
*/
- g1_id = H5Gopen(file, "/G1");
+ g1_id = H5Gopen2(file, "/G1", H5P_DEFAULT);
/* Next commented call causes error stack to be printed out; the next one
* works fine; is it a bug or a feature? EIP 04-25-07
*/
@@ -90,7 +90,7 @@ main(void)
*/
if (H5Lexists(file, "/G1/G2", H5P_DEFAULT)) {
- g2_id = H5Gopen(file, "/G1/G2");
+ g2_id = H5Gopen2(file, "/G1/G2", H5P_DEFAULT);
status = H5Gget_info(g2_id, ".", &g2_info, H5P_DEFAULT);
printf("Group /G1/G2 has %d member(s)\n", (int)g2_info.nlinks);