mirror of
https://github.com/HDFGroup/hdf5.git
synced 2026-09-25 04:09:44 +03:00
fixed true/false and added missing h5_interm_group example (#5092)
This commit is contained in:
@@ -17,6 +17,7 @@ set (examples
|
||||
h5_chunk_read
|
||||
h5_compound
|
||||
h5_group
|
||||
h5_interm_group
|
||||
h5_select
|
||||
h5_attribute
|
||||
h5_mount
|
||||
|
||||
@@ -53,7 +53,7 @@ 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");
|
||||
|
||||
/*
|
||||
@@ -64,13 +64,13 @@ main(void)
|
||||
/* 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
|
||||
*/
|
||||
/* 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);
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user