Skip to content

Commit

Permalink
fixed true/false and added missing h5_interm_group example
Browse files Browse the repository at this point in the history
  • Loading branch information
brtnfld committed Nov 12, 2024
1 parent faec68f commit b091c67
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions HDF5Examples/C/TUTR/C_sourcefiles.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ set (examples
h5_chunk_read
h5_compound
h5_group
h5_interm_group
h5_select
h5_attribute
h5_mount
Expand Down
8 changes: 4 additions & 4 deletions HDF5Examples/C/TUTR/h5_interm_group.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");

/*
Expand All @@ -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);
}
Expand Down

0 comments on commit b091c67

Please sign in to comment.