summaryrefslogtreecommitdiffstats
path: root/examples/h5_interm_group.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2008-09-16 15:52:51 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2008-09-16 15:52:51 (GMT)
commitbdd7d59902483885dd8b883f3b2393e77383e5e8 (patch)
treeaaf20ab132d057b95b3c016d50fc22b77719084b /examples/h5_interm_group.c
parent8bc0d5ed9019a681e1ea20c24264415d01c1cf2a (diff)
downloadhdf5-bdd7d59902483885dd8b883f3b2393e77383e5e8.zip
hdf5-bdd7d59902483885dd8b883f3b2393e77383e5e8.tar.gz
hdf5-bdd7d59902483885dd8b883f3b2393e77383e5e8.tar.bz2
[svn-r15628] Description:
Remove trailing whitespace from C/C++ source files, with the following script: foreach f (*.[ch] *.cpp) sed 's/[[:blank:]]*$//' $f > sed.out && mv sed.out $f end Tested on: Mac OS X/32 10.5.5 (amazon) No need for h5committest, just whitespace changes...
Diffstat (limited to 'examples/h5_interm_group.c')
-rw-r--r--examples/h5_interm_group.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/examples/h5_interm_group.c b/examples/h5_interm_group.c
index 3d04d2e..bd9c7c4 100644
--- a/examples/h5_interm_group.c
+++ b/examples/h5_interm_group.c
@@ -61,47 +61,47 @@ main(void)
/*
* Check if group /G1 exists in the file.
*/
- if(H5Lexists(file, "/G1", H5P_DEFAULT) !=FALSE)
+ if(H5Lexists(file, "/G1", H5P_DEFAULT) !=FALSE)
printf("Group /G1 exists in the file\n");
-
+
/*
- * Check that group G2/G3 exists in /G1 and if not create it using
+ * Check that group G2/G3 exists in /G1 and if not create it using
* intermediate group creation property.
*/
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
+ * works fine; is it a bug or a feature? EIP 04-25-07
*/
-/* if (H5Lexists(g1_id, "G2/G3", H5P_DEFAULT) !=TRUE) { */
- if (H5Lexists(g1_id, "G2", H5P_DEFAULT) !=TRUE) {
-
+/* if (H5Lexists(g1_id, "G2/G3", H5P_DEFAULT) !=TRUE) { */
+ if (H5Lexists(g1_id, "G2", H5P_DEFAULT) !=TRUE) {
+
grp_crt_plist = H5Pcreate(H5P_LINK_CREATE);
/* Set flag for intermediate group creation */
status = H5Pset_create_intermediate_group(grp_crt_plist, TRUE);
g3_id = H5Gcreate2(g1_id, "G2/G3", grp_crt_plist, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(g3_id);
- }
+ }
H5Gclose(g1_id);
/* Now check if group /G1/G2 exists in the file, then open it and print
* its members names
*/
- if (H5Lexists(file, "/G1/G2", H5P_DEFAULT)) {
+ if (H5Lexists(file, "/G1/G2", H5P_DEFAULT)) {
g2_id = H5Gopen2(file, "/G1/G2", 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++) {
- H5Lget_name_by_idx(g2_id, ".", H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)i,
+ H5Lget_name_by_idx(g2_id, ".", H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)i,
name, 3, H5P_DEFAULT);
printf("Object's name is %s\n", name);
}
H5Gclose(g2_id);
- }
+ }
H5Fclose(file);
return 0;
}