From b091c67a6cb207a8d7ecf67fcb2b5cd75aad3880 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 12 Nov 2024 16:36:58 -0600 Subject: [PATCH] fixed true/false and added missing h5_interm_group example --- HDF5Examples/C/TUTR/C_sourcefiles.cmake | 1 + HDF5Examples/C/TUTR/h5_interm_group.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/HDF5Examples/C/TUTR/C_sourcefiles.cmake b/HDF5Examples/C/TUTR/C_sourcefiles.cmake index 147ee7ab4aa..6e2822fb09a 100644 --- a/HDF5Examples/C/TUTR/C_sourcefiles.cmake +++ b/HDF5Examples/C/TUTR/C_sourcefiles.cmake @@ -17,6 +17,7 @@ set (examples h5_chunk_read h5_compound h5_group + h5_interm_group h5_select h5_attribute h5_mount diff --git a/HDF5Examples/C/TUTR/h5_interm_group.c b/HDF5Examples/C/TUTR/h5_interm_group.c index 00ffaededa5..9845a89fe88 100644 --- a/HDF5Examples/C/TUTR/h5_interm_group.c +++ b/HDF5Examples/C/TUTR/h5_interm_group.c @@ -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); }