summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/make_vers6
-rw-r--r--c++/src/H5CommonFG.cpp24
-rw-r--r--examples/Attributes.txt2
-rw-r--r--examples/h5_extlink.c16
-rw-r--r--examples/h5_group.c2
-rw-r--r--examples/h5_interm_group.c2
-rw-r--r--examples/h5_mount.c2
-rw-r--r--examples/h5_reference.c2
-rw-r--r--fortran/src/H5Gf.c70
-rw-r--r--hl/test/test_ds.c6
-rw-r--r--hl/test/test_lite.c149
-rw-r--r--src/H5G.c2
-rw-r--r--src/H5Gdeprec.c10
-rw-r--r--src/H5Gpublic.h13
-rw-r--r--src/H5vers.txt1
-rw-r--r--src/H5version.h20
-rw-r--r--test/big.c2
-rw-r--r--test/dangle.c7
-rw-r--r--test/dsets.c4
-rw-r--r--test/enum.c278
-rw-r--r--test/external.c38
-rw-r--r--test/flush1.c33
-rw-r--r--test/gen_mergemsg.c6
-rw-r--r--test/gen_new_group.c4
-rw-r--r--test/gen_old_group.c2
-rw-r--r--test/gen_udlinks.c4
-rw-r--r--test/getname.c281
-rw-r--r--test/h5test.c8
-rw-r--r--test/links.c226
-rw-r--r--test/mount.c165
-rw-r--r--test/ntypes.c3
-rwxr-xr-xtest/objcopy.c152
-rw-r--r--test/stab.c214
-rw-r--r--test/tattr.c16
-rw-r--r--test/testmeta.c12
-rw-r--r--test/tfile.c34
-rw-r--r--test/th5o.c16
-rw-r--r--test/titerate.c20
-rw-r--r--test/tmisc.c66
-rw-r--r--test/trefer.c16
-rw-r--r--test/tsohm.c16
-rw-r--r--test/tunicode.c20
-rw-r--r--test/tvltypes.c12
-rw-r--r--test/unlink.c89
-rw-r--r--testpar/t_mdset.c6
-rw-r--r--testpar/t_pflush1.c11
-rw-r--r--tools/h5copy/h5copygentest.c6
-rw-r--r--tools/h5diff/h5diffgentest.c315
-rw-r--r--tools/h5dump/h5dumpgentest.c512
-rwxr-xr-xtools/h5import/h5import.c63
-rw-r--r--tools/h5jam/h5jamgentest.c50
-rw-r--r--tools/h5repack/h5repack_copy.c4
-rw-r--r--tools/h5repack/h5repacktst.c301
-rw-r--r--tools/h5stat/h5stat_gentest.c61
54 files changed, 1735 insertions, 1665 deletions
diff --git a/bin/make_vers b/bin/make_vers
index 25e1297..fafa28d 100755
--- a/bin/make_vers
+++ b/bin/make_vers
@@ -117,7 +117,7 @@ sub print_globalapivers ($) {
print $fh "/* Functions */\n";
print $fh "/*************/\n";
for $name (sort keys %{$func_vers[$curr_idx]}) {
- print $fh "#if !defined(", $name, "_vers)\n";
+ print $fh "\n#if !defined(", $name, "_vers)\n";
print $fh "#define ", $name, "_vers $func_vers[$curr_idx]{$name}\n";
print $fh "#endif /* !defined(", $name, "_vers) */\n";
}
@@ -128,7 +128,7 @@ sub print_globalapivers ($) {
print $fh "/* Typedefs */\n";
print $fh "/************/\n";
for $name (sort keys %{$type_vers[$curr_idx]}) {
- print $fh "#if !defined(", $name, "_vers)\n";
+ print $fh "\n#if !defined(", $name, "_vers)\n";
print $fh "#define ", $name, "_vers $type_vers[$curr_idx]{$name}\n";
print $fh "#endif /* !defined(", $name, "_vers) */\n";
}
@@ -211,7 +211,7 @@ sub print_defaultapivers ($) {
$curr_vers = $typedefs{$curr_name};
# Set up default/latest version name mapping
- print $fh "#if !defined($curr_vers_name) || $curr_vers_name == $curr_vers\n";
+ print $fh "\n#if !defined($curr_vers_name) || $curr_vers_name == $curr_vers\n";
print $fh "#define ${curr_name}_t $curr_name${curr_vers}_t\n";
# Loop to print earlier version name mappings
diff --git a/c++/src/H5CommonFG.cpp b/c++/src/H5CommonFG.cpp
index 139a105..ee4303c 100644
--- a/c++/src/H5CommonFG.cpp
+++ b/c++/src/H5CommonFG.cpp
@@ -67,15 +67,29 @@ namespace H5 {
//--------------------------------------------------------------------------
Group CommonFG::createGroup( const char* name, size_t size_hint ) const
{
- // Call C routine H5Gcreate to create the named group, giving the
+ // Create group creation property list for size_hint
+ hid_t gcpl_id = H5Pcreate(H5P_GROUP_CREATE);
+
+ // If the creation of the property list failed, throw an exception
+ if( gcpl_id < 0 )
+ throwException("createGroup", "H5Pcreate failed");
+
+ // Set the local heap size hint
+ if( H5Pset_local_heap_size_hint(gcpl_id, size_hint) < 0) {
+ H5Pclose(gcpl_id);
+ throwException("createGroup", "H5Pset_local_heap_size failed");
+ }
+
+ // Call C routine H5Gcreate2 to create the named group, giving the
// location id which can be a file id or a group id
- hid_t group_id = H5Gcreate( getLocId(), name, size_hint );
+ hid_t group_id = H5Gcreate2( getLocId(), name, H5P_DEFAULT, gcpl_id, H5P_DEFAULT );
+
+ // Close the group creation property list
+ H5Pclose(gcpl_id);
// If the creation of the group failed, throw an exception
if( group_id < 0 )
- {
- throwException("createGroup", "H5Gcreate failed");
- }
+ throwException("createGroup", "H5Gcreate2 failed");
// No failure, create and return the Group object
Group group( group_id );
diff --git a/examples/Attributes.txt b/examples/Attributes.txt
index 8d090fc..4af986b 100644
--- a/examples/Attributes.txt
+++ b/examples/Attributes.txt
@@ -39,7 +39,7 @@ H5Acreate example: Show how to create an attribute for a dataset and a group
H5Dclose(dataset);
/* Create a group */
- group=H5Gcreate(file,"/Group One",0);
+ group=H5Gcreate2(file, "/Group One", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/* Create an attribute for the dataset */
attr=H5Acreate(group,"Attr1",H5T_INT32,H5S_SCALAR,H5P_DEFAULT);
diff --git a/examples/h5_extlink.c b/examples/h5_extlink.c
index 113d269..ecd8b52 100644
--- a/examples/h5_extlink.c
+++ b/examples/h5_extlink.c
@@ -61,7 +61,7 @@ static void extlink_example(void)
targ_file_id = H5Fcreate(TARGET_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/* Create a group in the target file for the external link to point to. */
- group_id = H5Gcreate(targ_file_id, "target_group", (size_t) 0);
+ group_id = H5Gcreate2(targ_file_id, "target_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/* Close the group and the target file */
H5Gclose(group_id);
@@ -76,7 +76,7 @@ static void extlink_example(void)
* target group (even though the target file is closed!). The external
* link works just like a soft link.
*/
- group_id = H5Gcreate(source_file_id, "ext_link/new_group", (size_t) 0);
+ group_id = H5Gcreate2(source_file_id, "ext_link/new_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/* The group is inside the target file and we can access it normally.
* Here, group_id and group2_id point to the same group inside the
@@ -155,7 +155,7 @@ static void extlink_prefix_example(void)
/* Now we can use the open group ID to create a new group inside the
* "red" file.
*/
- group2_id = H5Gcreate(group_id, "pink", (size_t) 0);
+ group2_id = H5Gcreate2(group_id, "pink", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/* Close both groups. */
H5Gclose(group2_id);
@@ -166,7 +166,7 @@ static void extlink_prefix_example(void)
*/
H5Pset_elink_prefix(gapl_id, "blue/");
group_id = H5Gopen2(source_file_id, "ext_link", gapl_id);
- group2_id = H5Gcreate(group_id, "sky blue", (size_t) 0);
+ group2_id = H5Gcreate2(group_id, "sky blue", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/* Close both groups. */
H5Gclose(group2_id);
@@ -243,7 +243,7 @@ static void soft_link_example(void)
* point to.
*/
file_id = H5Fcreate(SOFT_LINK_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- group_id = H5Gcreate(file_id, TARGET_GROUP, (size_t) 0);
+ group_id = H5Gcreate2(file_id, TARGET_GROUP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group_id);
/* This is how we create a normal soft link to the group.
@@ -346,7 +346,7 @@ static void hard_link_example(void)
* point to.
*/
file_id = H5Fcreate(HARD_LINK_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- group_id = H5Gcreate(file_id, TARGET_GROUP, (size_t) 0);
+ group_id = H5Gcreate2(file_id, TARGET_GROUP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group_id);
/* This is how we create a normal hard link to the group. This
@@ -565,9 +565,9 @@ static void plist_link_example(void)
* point to.
*/
file_id = H5Fcreate(HARD_LINK_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- group_id = H5Gcreate(file_id, "group_1", (size_t) 0);
+ group_id = H5Gcreate2(file_id, "group_1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group_id);
- group_id = H5Gcreate(file_id, "group_1/group_2", (size_t) 0);
+ group_id = H5Gcreate2(file_id, "group_1/group_2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group_id);
/* Register "plist links" and create one. It has no udata at all. */
diff --git a/examples/h5_group.c b/examples/h5_group.c
index 82d177b..80cfd04 100644
--- a/examples/h5_group.c
+++ b/examples/h5_group.c
@@ -55,7 +55,7 @@ main(void)
/*
* Create a group in the file.
*/
- grp = H5Gcreate(file, "/Data", 0);
+ grp = H5Gcreate2(file, "/Data", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/*
* Create dataset "Compressed Data" in the group using absolute
diff --git a/examples/h5_interm_group.c b/examples/h5_interm_group.c
index 7889abf..caa0a88 100644
--- a/examples/h5_interm_group.c
+++ b/examples/h5_interm_group.c
@@ -48,7 +48,7 @@ main(void)
/*
* Create a group in the file.
*/
- g1_id = H5Gcreate(file, "/G1", 0);
+ g1_id = H5Gcreate2(file, "/G1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(g1_id);
H5Fclose(file);
diff --git a/examples/h5_mount.c b/examples/h5_mount.c
index f863aea..04c6184 100644
--- a/examples/h5_mount.c
+++ b/examples/h5_mount.c
@@ -54,7 +54,7 @@ int main(void)
* Create first file and a group in it.
*/
fid1 = H5Fcreate(FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- gid = H5Gcreate(fid1, "/G", 0);
+ gid = H5Gcreate2(fid1, "/G", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/*
* Close group and file
diff --git a/examples/h5_reference.c b/examples/h5_reference.c
index a84a6cb..5cd6cb1 100644
--- a/examples/h5_reference.c
+++ b/examples/h5_reference.c
@@ -52,7 +52,7 @@ main(void) {
/*
* Create group "A" in the file.
*/
- gid_a = H5Gcreate(fid, "A", 0);
+ gid_a = H5Gcreate2(fid, "A", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/*
* Create dataset "B" in the file.
diff --git a/fortran/src/H5Gf.c b/fortran/src/H5Gf.c
index ff4d4d0..3a78567 100644
--- a/fortran/src/H5Gf.c
+++ b/fortran/src/H5Gf.c
@@ -29,40 +29,54 @@
* Programmer: Elena Pourmal
* Wednesday, August 5, 1999
* Modifications:
+ * Changed to call H5Gcreate2 because H5Gcreate flip-flops and
+ * H5Gcreate1 can be compiled out of the library
+ * QAK - 2007/08/23
*---------------------------------------------------------------------------*/
int_f
nh5gcreate_c (hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size_hint, hid_t_f *grp_id)
{
- int ret_value = -1;
- char *c_name;
- size_t c_namelen;
- size_t c_size_hint;
- hid_t c_grp_id;
- hid_t c_loc_id;
-
- /*
- * Convert FORTRAN name to C name
- */
- c_namelen = *namelen;
- c_name = (char *)HD5f2cstring(name, c_namelen);
- if (c_name == NULL) return ret_value;
- /*
- * Call H5Gcreate function.
- */
- c_loc_id = *loc_id;
- if ( *size_hint == OBJECT_NAMELEN_DEFAULT_F )
- c_grp_id = H5Gcreate(c_loc_id, c_name, 0);
- else {
- c_size_hint = (size_t)*size_hint;
- c_grp_id = H5Gcreate(c_loc_id, c_name, c_size_hint);
- }
- if (c_grp_id < 0) goto DONE;
- *grp_id = (hid_t_f)c_grp_id;
- ret_value = 0;
+ hid_t gcpl_id = -1; /* Group creation property list */
+ char *c_name = NULL;
+ hid_t c_grp_id;
+ int_f ret_value = -1;
+
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ goto DONE;
+
+ /*
+ * Call H5Gcreate function.
+ */
+ if(*size_hint == OBJECT_NAMELEN_DEFAULT_F )
+ c_grp_id = H5Gcreate2((hid_t)*loc_id, c_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ else {
+ /* Create the group creation property list */
+ if((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0)
+ goto DONE;
+
+ /* Set the local heap size hint */
+ if(H5Pset_local_heap_size_hint(gcpl_id, (size_t)*size_hint) < 0)
+ goto DONE;
+
+ /* Create the group */
+ c_grp_id = H5Gcreate2((hid_t)*loc_id, c_name, H5P_DEFAULT, gcpl_id, H5P_DEFAULT);
+ }
+ if(c_grp_id < 0)
+ goto DONE;
+
+ /* Everything OK, set values to return */
+ *grp_id = (hid_t_f)c_grp_id;
+ ret_value = 0;
DONE:
- HDfree(c_name);
- return ret_value;
+ if(gcpl_id > 0)
+ H5Pclose(gcpl_id);
+ if(c_name)
+ HDfree(c_name);
+ return ret_value;
}
/*----------------------------------------------------------------------------
diff --git a/hl/test/test_ds.c b/hl/test/test_ds.c
index 92365ee..265a45e 100644
--- a/hl/test/test_ds.c
+++ b/hl/test/test_ds.c
@@ -854,7 +854,7 @@ static int test_simple(void)
*/
/* create a group */
- if ((gid=H5Gcreate(fid,"grp",(size_t)0))<0)
+ if((gid = H5Gcreate2(fid, "grp", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
/* create the data space for the dataset */
@@ -1733,7 +1733,7 @@ static int test_errors(void)
if ((fid=H5Fcreate(FILE2,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT))<0)
goto out;
/* create a group */
- if ((gid=H5Gcreate(fid,"grp",(size_t)0))<0)
+ if((gid = H5Gcreate2(fid, "grp", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
/* create the data space for the dataset */
if ((sid=H5Screate_simple(rank,dims,NULL))<0)
@@ -2111,7 +2111,7 @@ static int test_iterators(void)
if ((fid=H5Fcreate(FILE3,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT))<0)
goto out;
/* create a group */
- if ((gid=H5Gcreate(fid,"grp",(size_t)0))<0)
+ if((gid = H5Gcreate2(fid, "grp", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
/* close */
if (H5Gclose(gid)<0)
diff --git a/hl/test/test_lite.c b/hl/test/test_lite.c
index 5055099..61d9bca 100644
--- a/hl/test/test_lite.c
+++ b/hl/test/test_lite.c
@@ -398,87 +398,82 @@ out:
*-------------------------------------------------------------------------
*/
-static int test_attr( void )
+static int test_attr(void)
{
+ hid_t file_id;
+ hid_t dataset_id;
+ hid_t group_id;
+ hid_t space_id;
+ hsize_t dims[1] = { 5 };
+
+ /* Create a new file using default properties. */
+ file_id = H5Fcreate(FILE_NAME2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ /*-------------------------------------------------------------------------
+ * Create a dataset named "dset" on the root group
+ *-------------------------------------------------------------------------
+ */
+
+ /* Create the data space */
+ if((space_id = H5Screate_simple(1, dims, NULL)) < 0) goto out;
+
+ /* Create the dataset */
+ if((dataset_id = H5Dcreate(file_id , "dset", H5T_NATIVE_INT, space_id, H5P_DEFAULT)) < 0) goto out;
+
+ /* Close */
+ H5Dclose(dataset_id);
+
+ /*-------------------------------------------------------------------------
+ * Create a group named "grp" on the root group
+ *-------------------------------------------------------------------------
+ */
+
+ /* Create a group. */
+ if((group_id = H5Gcreate2(file_id, "grp", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto out;
+
+ /* Close */
+ H5Gclose(group_id);
+
+ /*-------------------------------------------------------------------------
+ *
+ * Create attributes in the root group
+ * Note that we are calling the H5LTset_attribute functions with the name "."
+ *
+ *-------------------------------------------------------------------------
+ */
+ if(make_attributes(file_id, ".") < 0) goto out;
+
+ /*-------------------------------------------------------------------------
+ *
+ * Create attributes in the dataset "dset"
+ *
+ *-------------------------------------------------------------------------
+ */
+ if(make_attributes(file_id, "dset") < 0) goto out;
+
+ /*-------------------------------------------------------------------------
+ *
+ * Create attributes in the group "grp"
+ *
+ *-------------------------------------------------------------------------
+ */
+ if(make_attributes(file_id, "grp") < 0) goto out;
+
+ /*-------------------------------------------------------------------------
+ * end
+ *-------------------------------------------------------------------------
+ */
+ /* Close the file. */
+ H5Fclose(file_id);
- hid_t file_id;
- hid_t dataset_id;
- hid_t group_id;
- hid_t space_id;
- hsize_t dims[1] = { 5 };
-
- /* Create a new file using default properties. */
- file_id = H5Fcreate( FILE_NAME2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT );
-
-/*-------------------------------------------------------------------------
- * Create a dataset named "dset" on the root group
- *-------------------------------------------------------------------------
- */
-
- /* Create the data space */
- if ((space_id = H5Screate_simple( 1, dims, NULL ))<0) goto out;
-
- /* Create the dataset */
- if ((dataset_id = H5Dcreate( file_id , "dset", H5T_NATIVE_INT, space_id,
- H5P_DEFAULT ))<0) goto out;
-
- /* Close */
- H5Dclose( dataset_id );
-
-/*-------------------------------------------------------------------------
- * Create a group named "grp" on the root group
- *-------------------------------------------------------------------------
- */
-
- /* Create a group. */
- if ((group_id = H5Gcreate( file_id, "grp", (size_t)0 ))<0)
- goto out;
-
- /* Close */
- H5Gclose( group_id );
-
-/*-------------------------------------------------------------------------
- *
- * Create attributes in the root group
- * Note that we are calling the H5LTset_attribute functions with the name "."
- *
- *-------------------------------------------------------------------------
- */
- if (make_attributes( file_id, "." )<0)
- goto out;
-
-/*-------------------------------------------------------------------------
- *
- * Create attributes in the dataset "dset"
- *
- *-------------------------------------------------------------------------
- */
- if (make_attributes( file_id, "dset" )<0)
- goto out;
-
-/*-------------------------------------------------------------------------
- *
- * Create attributes in the group "grp"
- *
- *-------------------------------------------------------------------------
- */
- if (make_attributes( file_id, "grp" )<0)
- goto out;
-
-/*-------------------------------------------------------------------------
- * end
- *-------------------------------------------------------------------------
- */
- /* Close the file. */
- H5Fclose( file_id );
-
- return 0;
+ return 0;
out:
- /* Close the file. */
- H5Fclose( file_id );
- H5_FAILED();
- return -1;
+ /* Close the file. */
+ H5Fclose(file_id);
+
+ H5_FAILED();
+ return -1;
}
/*-------------------------------------------------------------------------
diff --git a/src/H5G.c b/src/H5G.c
index f68ce1e..160fda0 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -255,7 +255,7 @@ done:
* H5Llink or it will be deleted when closed.
*
* Given the default setting, H5Gcreate_anon() followed by
- * H5Llink() will have the same function as H5Gcreate().
+ * H5Llink() will have the same function as H5Gcreate2().
*
* Usage: H5Gcreate_anon(loc_id, char *name, gcpl_id, gapl_id)
* hid_t loc_id; IN: File or group identifier
diff --git a/src/H5Gdeprec.c b/src/H5Gdeprec.c
index b94a365..613c922 100644
--- a/src/H5Gdeprec.c
+++ b/src/H5Gdeprec.c
@@ -126,9 +126,10 @@ H5G_init_deprec_interface(void)
FUNC_LEAVE_NOAPI(H5G_init())
} /* H5G_init_deprec_interface() */
+#ifndef H5_NO_DEPRECATED_SYMBOLS
/*-------------------------------------------------------------------------
- * Function: H5Gcreate
+ * Function: H5Gcreate1
*
* Purpose: Creates a new group relative to LOC_ID and gives it the
* specified NAME. The group is opened for write access
@@ -151,14 +152,14 @@ H5G_init_deprec_interface(void)
*-------------------------------------------------------------------------
*/
hid_t
-H5Gcreate(hid_t loc_id, const char *name, size_t size_hint)
+H5Gcreate1(hid_t loc_id, const char *name, size_t size_hint)
{
H5G_loc_t loc; /* Location to create group */
H5G_t *grp = NULL; /* New group created */
hid_t tmp_gcpl = (-1); /* Temporary group creation property list */
hid_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Gcreate, FAIL)
+ FUNC_ENTER_API(H5Gcreate1, FAIL)
H5TRACE3("i", "i*sz", loc_id, name, size_hint);
/* Check arguments */
@@ -213,7 +214,8 @@ done:
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "unable to release group")
FUNC_LEAVE_API(ret_value)
-} /* end H5Gcreate() */
+} /* end H5Gcreate1() */
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
/*-------------------------------------------------------------------------
diff --git a/src/H5Gpublic.h b/src/H5Gpublic.h
index 59c9307..912a637 100644
--- a/src/H5Gpublic.h
+++ b/src/H5Gpublic.h
@@ -137,7 +137,6 @@ H5_DLL herr_t H5Gclose(hid_t group_id);
*
* Use of these functions and variables is deprecated.
*/
-H5_DLL hid_t H5Gcreate(hid_t loc_id, const char *name, size_t size_hint);
H5_DLL hid_t H5Gopen(hid_t loc_id, const char *name);
H5_DLL herr_t H5Glink(hid_t cur_loc_id, H5L_type_t type, const char *cur_name,
const char *new_name);
@@ -161,6 +160,18 @@ H5_DLL H5G_obj_t H5Gget_objtype_by_idx(hid_t loc_id, hsize_t idx);
H5_DLL herr_t H5Gget_objinfo(hid_t loc_id, const char *name,
hbool_t follow_link, H5G_stat_t *statbuf/*out*/);
H5_DLL herr_t H5Gget_num_objs(hid_t loc_id, hsize_t *num_objs);
+/* Symbols defined for compatibility with previous versions of the HDF5 API.
+ *
+ * Use of these symbols is deprecated.
+ */
+#ifndef H5_NO_DEPRECATED_SYMBOLS
+
+/* Typedefs */
+
+/* Function prototypes */
+H5_DLL hid_t H5Gcreate1(hid_t loc_id, const char *name, size_t size_hint);
+
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
#ifdef __cplusplus
}
diff --git a/src/H5vers.txt b/src/H5vers.txt
index e01ea81..4a3ee46 100644
--- a/src/H5vers.txt
+++ b/src/H5vers.txt
@@ -51,6 +51,7 @@ FUNCTION: H5Eprint; ; v10, v18
FUNCTION: H5Epush; ; v14, v18
FUNCTION: H5Eset_auto; ; v10, v18
FUNCTION: H5Ewalk; H5E_walk, H5E_error; v10, v18
+FUNCTION: H5Gcreate; ; v10, v18
# API typedefs
# (although not required, it's easier to compare this file with the headers
diff --git a/src/H5version.h b/src/H5version.h
index 43e82dc..ac6020e 100644
--- a/src/H5version.h
+++ b/src/H5version.h
@@ -37,28 +37,39 @@
/*************/
/* Functions */
/*************/
+
#if !defined(H5Eclear_vers)
#define H5Eclear_vers 1
#endif /* !defined(H5Eclear_vers) */
+
#if !defined(H5Eget_auto_vers)
#define H5Eget_auto_vers 1
#endif /* !defined(H5Eget_auto_vers) */
+
#if !defined(H5Eprint_vers)
#define H5Eprint_vers 1
#endif /* !defined(H5Eprint_vers) */
+
#if !defined(H5Epush_vers)
#define H5Epush_vers 1
#endif /* !defined(H5Epush_vers) */
+
#if !defined(H5Eset_auto_vers)
#define H5Eset_auto_vers 1
#endif /* !defined(H5Eset_auto_vers) */
+
#if !defined(H5Ewalk_vers)
#define H5Ewalk_vers 1
#endif /* !defined(H5Ewalk_vers) */
+#if !defined(H5Gcreate_vers)
+#define H5Gcreate_vers 1
+#endif /* !defined(H5Gcreate_vers) */
+
/************/
/* Typedefs */
/************/
+
#if !defined(H5E_auto_vers)
#define H5E_auto_vers 1
#endif /* !defined(H5E_auto_vers) */
@@ -128,9 +139,18 @@
#error "H5Ewalk_vers set to invalid value"
#endif /* H5Ewalk_vers */
+#if !defined(H5Gcreate_vers) || H5Gcreate_vers == 2
+#define H5Gcreate H5Gcreate2
+#elif H5Gcreate_vers == 1
+#define H5Gcreate H5Gcreate1
+#else /* H5Gcreate_vers */
+#error "H5Gcreate_vers set to invalid value"
+#endif /* H5Gcreate_vers */
+
/************/
/* Typedefs */
/************/
+
#if !defined(H5E_auto_vers) || H5E_auto_vers == 2
#define H5E_auto_t H5E_auto2_t
#elif H5E_auto_vers == 1
diff --git a/test/big.c b/test/big.c
index 5481cd0..f75a6f3 100644
--- a/test/big.c
+++ b/test/big.c
@@ -33,7 +33,7 @@ const char *FILENAME[] = {
#define FAMILY_SIZE 1024*1024*1024
/* Define big file as 2GB */
-#define BIG_FILE 0x80000000UL
+#define BIG_FILE (off_t)0x80000000UL
#define MAX_TRIES 100
diff --git a/test/dangle.c b/test/dangle.c
index 9b5d0dd..4e1154a 100644
--- a/test/dangle.c
+++ b/test/dangle.c
@@ -174,17 +174,16 @@ test_dangle_group(H5F_close_degree_t degree)
if((fid = H5Fcreate (filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0)
TEST_ERROR;
- if((gid = H5Gcreate (fid, GROUPNAME, 0))<0)
- TEST_ERROR;
+ if((gid = H5Gcreate2(fid, GROUPNAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
if(H5Gclose(gid)<0)
TEST_ERROR;
/* Try creating duplicate group */
H5E_BEGIN_TRY {
- if((gid = H5Gcreate (fid, GROUPNAME, 0))>=0)
- TEST_ERROR;
+ gid = H5Gcreate2(fid, GROUPNAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
} H5E_END_TRY;
+ if(gid >= 0) TEST_ERROR
/* Leave open a _lot_ of objects */
for(u=0; u<MAX_DANGLE; u++) {
diff --git a/test/dsets.c b/test/dsets.c
index 4242a26..d1c6e17 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -4690,7 +4690,7 @@ test_types(hid_t file)
unsigned char buf[32];
TESTING("various datatypes");
- if((grp = H5Gcreate(file, "typetests", (size_t)0)) < 0) goto error;
+ if((grp = H5Gcreate2(file, "typetests", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error;
/* bitfield_1 */
nelmts = sizeof(buf);
@@ -6271,7 +6271,7 @@ main(void)
goto error;
/* Cause the library to emit initial messages */
- if((grp = H5Gcreate(file, "emit diagnostics", (size_t)0)) < 0)
+ if((grp = H5Gcreate2(file, "emit diagnostics", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
if(H5Gset_comment(grp, ".", "Causes diagnostic messages to be emitted") < 0)
goto error;
diff --git a/test/enum.c b/test/enum.c
index 7574e40..5f73969 100644
--- a/test/enum.c
+++ b/test/enum.c
@@ -53,48 +53,49 @@ typedef enum {
static int
test_named(hid_t file)
{
- hid_t type=-1, cwg=-1;
+ hid_t type = -1, cwg = -1;
c_e1 val;
signed char val8;
TESTING("named enumeration types");
- if ((cwg=H5Gcreate(file, "test_named", 0))<0) goto error;
+ if((cwg = H5Gcreate2(file, "test_named", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* A native integer */
- if ((type = H5Tcreate(H5T_ENUM, sizeof(c_e1)))<0) goto error;
- if (H5Tenum_insert(type, "RED", CPTR(val, E1_RED ))<0) goto error;
- if (H5Tenum_insert(type, "GREEN", CPTR(val, E1_GREEN))<0) goto error;
- if (H5Tenum_insert(type, "BLUE", CPTR(val, E1_BLUE ))<0) goto error;
- if (H5Tenum_insert(type, "WHITE", CPTR(val, E1_WHITE))<0) goto error;
- if (H5Tenum_insert(type, "BLACK", CPTR(val, E1_BLACK))<0) goto error;
- if (H5Tcommit(cwg, "e1_a", type)<0) goto error;
- if (H5Tclose(type)<0) goto error;
+ if((type = H5Tcreate(H5T_ENUM, sizeof(c_e1))) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(type, "RED", CPTR(val, E1_RED )) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(type, "GREEN", CPTR(val, E1_GREEN)) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(type, "BLUE", CPTR(val, E1_BLUE )) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(type, "WHITE", CPTR(val, E1_WHITE)) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(type, "BLACK", CPTR(val, E1_BLACK)) < 0) FAIL_STACK_ERROR
+ if(H5Tcommit(cwg, "e1_a", type) < 0) FAIL_STACK_ERROR
+ if(H5Tclose(type) < 0) FAIL_STACK_ERROR
/* A smaller type */
- if ((type = H5Tcreate(H5T_ENUM, 1))<0) goto error;
- if (H5Tenum_insert(type, "RED", CPTR(val8, E1_RED ))<0) goto error;
- if (H5Tenum_insert(type, "GREEN", CPTR(val8, E1_GREEN))<0) goto error;
- if (H5Tenum_insert(type, "BLUE", CPTR(val8, E1_BLUE ))<0) goto error;
- if (H5Tenum_insert(type, "WHITE", CPTR(val8, E1_WHITE))<0) goto error;
- if (H5Tenum_insert(type, "BLACK", CPTR(val8, E1_BLACK))<0) goto error;
- if (H5Tcommit(cwg, "e1_b", type)<0) goto error;
- if (H5Tclose(type)<0) goto error;
+ if((type = H5Tcreate(H5T_ENUM, 1)) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(type, "RED", CPTR(val8, E1_RED )) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(type, "GREEN", CPTR(val8, E1_GREEN)) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(type, "BLUE", CPTR(val8, E1_BLUE )) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(type, "WHITE", CPTR(val8, E1_WHITE)) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(type, "BLACK", CPTR(val8, E1_BLACK)) < 0) FAIL_STACK_ERROR
+ if(H5Tcommit(cwg, "e1_b", type) < 0) FAIL_STACK_ERROR
+ if(H5Tclose(type) < 0) FAIL_STACK_ERROR
/* A non-native type */
- if (H5T_ORDER_BE==H5Tget_order(H5T_NATIVE_INT)) {
- if ((type = H5Tenum_create(H5T_STD_U8LE))<0) goto error;
+ if(H5T_ORDER_BE == H5Tget_order(H5T_NATIVE_INT)) {
+ if ((type = H5Tenum_create(H5T_STD_U8LE)) < 0) FAIL_STACK_ERROR
} else {
- if ((type = H5Tenum_create(H5T_STD_U8BE))<0) goto error;
+ if ((type = H5Tenum_create(H5T_STD_U8BE)) < 0) FAIL_STACK_ERROR
}
- if (H5Tenum_insert(type, "RED", CPTR(val8, E1_RED ))<0) goto error;
- if (H5Tenum_insert(type, "GREEN", CPTR(val8, E1_GREEN))<0) goto error;
- if (H5Tenum_insert(type, "BLUE", CPTR(val8, E1_BLUE ))<0) goto error;
- if (H5Tenum_insert(type, "WHITE", CPTR(val8, E1_WHITE))<0) goto error;
- if (H5Tenum_insert(type, "BLACK", CPTR(val8, E1_BLACK))<0) goto error;
- if (H5Tcommit(cwg, "e1_c", type)<0) goto error;
- if (H5Tclose(type)<0) goto error;
+ if(H5Tenum_insert(type, "RED", CPTR(val8, E1_RED )) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(type, "GREEN", CPTR(val8, E1_GREEN)) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(type, "BLUE", CPTR(val8, E1_BLUE )) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(type, "WHITE", CPTR(val8, E1_WHITE)) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(type, "BLACK", CPTR(val8, E1_BLACK)) < 0) FAIL_STACK_ERROR
+ if(H5Tcommit(cwg, "e1_c", type) < 0) FAIL_STACK_ERROR
+ if(H5Tclose(type) < 0) FAIL_STACK_ERROR
+
+ if(H5Gclose(cwg) < 0) FAIL_STACK_ERROR
- if (H5Gclose(cwg)<0) goto error;
PASSED();
return 0;
@@ -137,35 +138,35 @@ test_noconv(hid_t file)
size_t i;
TESTING("no-conversion datasets");
- if ((cwg=H5Gcreate(file, "test_noconv", 0))<0) goto error;
- if ((type = H5Tcreate(H5T_ENUM, sizeof(c_e1)))<0) goto error;
- if (H5Tenum_insert(type, "RED", CPTR(val, E1_RED ))<0) goto error;
- if (H5Tenum_insert(type, "GREEN", CPTR(val, E1_GREEN))<0) goto error;
- if (H5Tenum_insert(type, "BLUE", CPTR(val, E1_BLUE ))<0) goto error;
- if (H5Tenum_insert(type, "WHITE", CPTR(val, E1_WHITE))<0) goto error;
- if (H5Tenum_insert(type, "BLACK", CPTR(val, E1_BLACK))<0) goto error;
+ if((cwg = H5Gcreate2(file, "test_noconv", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
- if ((space=H5Screate_simple(1, ds_size, NULL))<0) goto error;
- if ((dset=H5Dcreate(cwg, "color_table", type, space, H5P_DEFAULT))<0)
- goto error;
- if (H5Dwrite(dset, type, space, space, H5P_DEFAULT, data1)<0) goto error;
- if (H5Dread(dset, type, space, space, H5P_DEFAULT, data2)<0) goto error;
+ if((type = H5Tcreate(H5T_ENUM, sizeof(c_e1))) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(type, "RED", CPTR(val, E1_RED )) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(type, "GREEN", CPTR(val, E1_GREEN)) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(type, "BLUE", CPTR(val, E1_BLUE )) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(type, "WHITE", CPTR(val, E1_WHITE)) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(type, "BLACK", CPTR(val, E1_BLACK)) < 0) FAIL_STACK_ERROR
- for (i=0; i<(size_t)ds_size[0]; i++) {
- if (data1[i]!=data2[i]) {
+ if((space=H5Screate_simple(1, ds_size, NULL)) < 0) FAIL_STACK_ERROR
+ if((dset=H5Dcreate(cwg, "color_table", type, space, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if(H5Dwrite(dset, type, space, space, H5P_DEFAULT, data1) < 0) FAIL_STACK_ERROR
+ if(H5Dread(dset, type, space, space, H5P_DEFAULT, data2) < 0) FAIL_STACK_ERROR
+
+ for(i = 0; i < (size_t)ds_size[0]; i++)
+ if(data1[i] != data2[i]) {
H5_FAILED();
printf(" data1[%lu]=%d, data2[%lu]=%d (should be same)\n",
(unsigned long)i, (int)(data1[i]),
(unsigned long)i, (int)(data2[i]));
goto error;
- }
- }
+ } /* end if */
+
+ if(H5Dclose(dset) < 0) FAIL_STACK_ERROR
+ if(H5Sclose(space) < 0) FAIL_STACK_ERROR
+ if(H5Tclose(type) < 0) FAIL_STACK_ERROR
+ if(H5Gclose(cwg) < 0) FAIL_STACK_ERROR
- if (H5Dclose(dset)<0) goto error;
- if (H5Sclose(space)<0) goto error;
- if (H5Tclose(type)<0) goto error;
- if (H5Gclose(cwg)<0) goto error;
PASSED();
return 0;
@@ -202,76 +203,77 @@ test_noconv(hid_t file)
static int
test_tr1(hid_t file)
{
- hid_t cwg=-1, m_type=-1, f_type=-1, space=-1, dset=-1;
- hsize_t ds_size[1]={10};
+ hid_t cwg = -1, m_type = -1, f_type = -1, space = -1, dset = -1;
+ hsize_t ds_size[1] = {10};
size_t i;
c_e1 eval;
int ival;
- static c_e1 data1[10]={E1_RED, E1_GREEN, E1_BLUE, E1_GREEN, E1_WHITE,
+ static c_e1 data1[10] = {E1_RED, E1_GREEN, E1_BLUE, E1_GREEN, E1_WHITE,
E1_WHITE, E1_BLACK, E1_GREEN, E1_BLUE, E1_RED};
c_e1 data2[10];
const char *envval = NULL;
TESTING("O(1) conversions");
+
envval = HDgetenv("HDF5_DRIVER");
- if (envval == NULL)
+ if(envval == NULL)
envval = "nomatch";
- if (HDstrcmp(envval, "split")) {
- if ((cwg=H5Gcreate(file, "test_tr1", 0))<0) goto error;
-
- if ((m_type = H5Tcreate(H5T_ENUM, sizeof(c_e1)))<0) goto error;
- if (H5Tenum_insert(m_type, "RED", CPTR(eval, E1_RED ))<0) goto error;
- if (H5Tenum_insert(m_type, "GREEN", CPTR(eval, E1_GREEN))<0) goto error;
- if (H5Tenum_insert(m_type, "BLUE", CPTR(eval, E1_BLUE ))<0) goto error;
- if (H5Tenum_insert(m_type, "WHITE", CPTR(eval, E1_WHITE))<0) goto error;
- if (H5Tenum_insert(m_type, "BLACK", CPTR(eval, E1_BLACK))<0) goto error;
-
-
- if ((f_type = H5Tcreate(H5T_ENUM, sizeof(c_e1)))<0) goto error;
- if (H5Tenum_insert(f_type, "RED", CPTR(ival, 105))<0) goto error;
- if (H5Tenum_insert(f_type, "GREEN", CPTR(ival, 104))<0) goto error;
- if (H5Tenum_insert(f_type, "BLUE", CPTR(ival, 103))<0) goto error;
- if (H5Tenum_insert(f_type, "WHITE", CPTR(ival, 102))<0) goto error;
- if (H5Tenum_insert(f_type, "BLACK", CPTR(ival, 101))<0) goto error;
-
- if ((space=H5Screate_simple(1, ds_size, NULL))<0) goto error;
- if ((dset=H5Dcreate(cwg, "color_table", f_type, space, H5P_DEFAULT))<0)
- goto error;
- if (H5Dwrite(dset, m_type, space, space, H5P_DEFAULT, data1)<0) goto error;
- if (H5Dread(dset, m_type, space, space, H5P_DEFAULT, data2)<0) goto error;
-
- for (i=0; i<(size_t)ds_size[0]; i++) {
- if (data1[i]!=data2[i]) {
+ if(HDstrcmp(envval, "split")) {
+ if((cwg = H5Gcreate2(file, "test_tr1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+
+ if((m_type = H5Tcreate(H5T_ENUM, sizeof(c_e1))) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(m_type, "RED", CPTR(eval, E1_RED )) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(m_type, "GREEN", CPTR(eval, E1_GREEN)) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(m_type, "BLUE", CPTR(eval, E1_BLUE )) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(m_type, "WHITE", CPTR(eval, E1_WHITE)) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(m_type, "BLACK", CPTR(eval, E1_BLACK)) < 0) FAIL_STACK_ERROR
+
+
+ if((f_type = H5Tcreate(H5T_ENUM, sizeof(c_e1))) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(f_type, "RED", CPTR(ival, 105)) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(f_type, "GREEN", CPTR(ival, 104)) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(f_type, "BLUE", CPTR(ival, 103)) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(f_type, "WHITE", CPTR(ival, 102)) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(f_type, "BLACK", CPTR(ival, 101)) < 0) FAIL_STACK_ERROR
+
+ if((space = H5Screate_simple(1, ds_size, NULL)) < 0) FAIL_STACK_ERROR
+ if((dset = H5Dcreate(cwg, "color_table", f_type, space, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if(H5Dwrite(dset, m_type, space, space, H5P_DEFAULT, data1) < 0) FAIL_STACK_ERROR
+ if(H5Dread(dset, m_type, space, space, H5P_DEFAULT, data2) < 0) FAIL_STACK_ERROR
+
+ for(i = 0; i < (size_t)ds_size[0]; i++)
+ if(data1[i] != data2[i]) {
H5_FAILED();
printf(" data1[%lu]=%d, data2[%lu]=%d (should be same)\n",
(unsigned long)i, (int)(data1[i]),
(unsigned long)i, (int)(data2[i]));
goto error;
}
- }
- if (H5Dclose(dset)<0) goto error;
- if (H5Sclose(space)<0) goto error;
- if (H5Tclose(m_type)<0) goto error;
- if (H5Tclose(f_type)<0) goto error;
- if (H5Gclose(cwg)<0) goto error;
+ if(H5Dclose(dset) < 0) FAIL_STACK_ERROR
+ if(H5Sclose(space) < 0) FAIL_STACK_ERROR
+ if(H5Tclose(m_type) < 0) FAIL_STACK_ERROR
+ if(H5Tclose(f_type) < 0) FAIL_STACK_ERROR
+ if(H5Gclose(cwg) < 0) FAIL_STACK_ERROR
+
PASSED();
}
else
{
SKIPPED();
+ puts(" Test not compatible with current Virtual File Driver");
}
return 0;
- error:
- H5E_BEGIN_TRY {
- H5Dclose(dset);
- H5Sclose(space);
- H5Tclose(m_type);
- H5Tclose(f_type);
- H5Gclose(cwg);
- } H5E_END_TRY;
- return 1;
+error:
+ H5E_BEGIN_TRY {
+ H5Dclose(dset);
+ H5Sclose(space);
+ H5Tclose(m_type);
+ H5Tclose(f_type);
+ H5Gclose(cwg);
+ } H5E_END_TRY;
+ return 1;
}
@@ -294,58 +296,58 @@ test_tr1(hid_t file)
static int
test_tr2(hid_t file)
{
- hid_t cwg=-1, m_type=-1, f_type=-1, space=-1, dset=-1;
- hsize_t ds_size[1]={10};
+ hid_t cwg = -1, m_type = -1, f_type = -1, space = -1, dset = -1;
+ hsize_t ds_size[1] = {10};
size_t i;
c_e1 val1;
int val2;
- static c_e1 data1[10]={E1_RED, E1_GREEN, E1_BLUE, E1_GREEN, E1_WHITE,
+ static c_e1 data1[10] = {E1_RED, E1_GREEN, E1_BLUE, E1_GREEN, E1_WHITE,
E1_WHITE, E1_BLACK, E1_GREEN, E1_BLUE, E1_RED};
c_e1 data2[10];
const char *envval = NULL;
TESTING("O(log N) converions");
+
envval = HDgetenv("HDF5_DRIVER");
- if (envval == NULL)
+ if(envval == NULL)
envval = "nomatch";
- if (HDstrcmp(envval, "split")) {
- if ((cwg=H5Gcreate(file, "test_tr2", 0))<0) goto error;
-
- if ((m_type = H5Tcreate(H5T_ENUM, sizeof(c_e1)))<0) goto error;
- if (H5Tenum_insert(m_type, "RED", CPTR(val1, E1_RED ))<0) goto error;
- if (H5Tenum_insert(m_type, "GREEN", CPTR(val1, E1_GREEN))<0) goto error;
- if (H5Tenum_insert(m_type, "BLUE", CPTR(val1, E1_BLUE ))<0) goto error;
- if (H5Tenum_insert(m_type, "WHITE", CPTR(val1, E1_WHITE))<0) goto error;
- if (H5Tenum_insert(m_type, "BLACK", CPTR(val1, E1_BLACK))<0) goto error;
-
- if ((f_type = H5Tcreate(H5T_ENUM, sizeof(int)))<0) goto error;
- if (H5Tenum_insert(f_type, "RED", CPTR(val2, 1050))<0) goto error;
- if (H5Tenum_insert(f_type, "GREEN", CPTR(val2, 1040))<0) goto error;
- if (H5Tenum_insert(f_type, "BLUE", CPTR(val2, 1030))<0) goto error;
- if (H5Tenum_insert(f_type, "WHITE", CPTR(val2, 1020))<0) goto error;
- if (H5Tenum_insert(f_type, "BLACK", CPTR(val2, 1010))<0) goto error;
-
- if ((space=H5Screate_simple(1, ds_size, NULL))<0) goto error;
- if ((dset=H5Dcreate(cwg, "color_table", f_type, space, H5P_DEFAULT))<0)
- goto error;
- if (H5Dwrite(dset, m_type, space, space, H5P_DEFAULT, data1)<0) goto error;
- if (H5Dread(dset, m_type, space, space, H5P_DEFAULT, data2)<0) goto error;
-
- for (i=0; i<(size_t)ds_size[0]; i++) {
- if (data1[i]!=data2[i]) {
+ if(HDstrcmp(envval, "split")) {
+ if((cwg = H5Gcreate2(file, "test_tr2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+
+ if((m_type = H5Tcreate(H5T_ENUM, sizeof(c_e1))) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(m_type, "RED", CPTR(val1, E1_RED )) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(m_type, "GREEN", CPTR(val1, E1_GREEN)) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(m_type, "BLUE", CPTR(val1, E1_BLUE )) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(m_type, "WHITE", CPTR(val1, E1_WHITE)) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(m_type, "BLACK", CPTR(val1, E1_BLACK)) < 0) FAIL_STACK_ERROR
+
+ if((f_type = H5Tcreate(H5T_ENUM, sizeof(int))) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(f_type, "RED", CPTR(val2, 1050)) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(f_type, "GREEN", CPTR(val2, 1040)) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(f_type, "BLUE", CPTR(val2, 1030)) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(f_type, "WHITE", CPTR(val2, 1020)) < 0) FAIL_STACK_ERROR
+ if(H5Tenum_insert(f_type, "BLACK", CPTR(val2, 1010)) < 0) FAIL_STACK_ERROR
+
+ if((space = H5Screate_simple(1, ds_size, NULL)) < 0) FAIL_STACK_ERROR
+ if((dset = H5Dcreate(cwg, "color_table", f_type, space, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if(H5Dwrite(dset, m_type, space, space, H5P_DEFAULT, data1) < 0) FAIL_STACK_ERROR
+ if(H5Dread(dset, m_type, space, space, H5P_DEFAULT, data2) < 0) FAIL_STACK_ERROR
+
+ for(i = 0; i < (size_t)ds_size[0]; i++)
+ if(data1[i] != data2[i]) {
H5_FAILED();
printf(" data1[%lu]=%d, data2[%lu]=%d (should be same)\n",
(unsigned long)i, (int)(data1[i]),
(unsigned long)i, (int)(data2[i]));
goto error;
}
- }
- if (H5Dclose(dset)<0) goto error;
- if (H5Sclose(space)<0) goto error;
- if (H5Tclose(m_type)<0) goto error;
- if (H5Tclose(f_type)<0) goto error;
- if (H5Gclose(cwg)<0) goto error;
+ if(H5Dclose(dset) < 0) FAIL_STACK_ERROR
+ if(H5Sclose(space) < 0) FAIL_STACK_ERROR
+ if(H5Tclose(m_type) < 0) FAIL_STACK_ERROR
+ if(H5Tclose(f_type) < 0) FAIL_STACK_ERROR
+ if(H5Gclose(cwg) < 0) FAIL_STACK_ERROR
+
PASSED();
}
else
@@ -355,15 +357,15 @@ test_tr2(hid_t file)
}
return 0;
- error:
- H5E_BEGIN_TRY {
- H5Dclose(dset);
- H5Sclose(space);
- H5Tclose(m_type);
- H5Tclose(f_type);
- H5Gclose(cwg);
- } H5E_END_TRY;
- return 1;
+error:
+ H5E_BEGIN_TRY {
+ H5Dclose(dset);
+ H5Sclose(space);
+ H5Tclose(m_type);
+ H5Tclose(f_type);
+ H5Gclose(cwg);
+ } H5E_END_TRY;
+ return 1;
}
diff --git a/test/external.c b/test/external.c
index db57afb..518527b 100644
--- a/test/external.c
+++ b/test/external.c
@@ -623,31 +623,27 @@ test_2 (hid_t fapl)
* output looks like.
*/
h5_fixname(FILENAME[1], fapl, filename, sizeof filename);
- if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) {
- goto error;
- }
- if ((grp=H5Gcreate(file, "emit-diagnostics", 8))<0) goto error;
- if (H5Gclose(grp)<0) goto error;
+ if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR
+ if((grp = H5Gcreate2(file, "emit-diagnostics", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if(H5Gclose(grp) < 0) FAIL_STACK_ERROR
/* Create the dataset */
- if((dcpl=H5Pcreate(H5P_DATASET_CREATE))<0) goto error;
- if (H5Pset_external (dcpl, "extern_1a.raw", (off_t)0, (hsize_t)sizeof part)<0 ||
- H5Pset_external (dcpl, "extern_2a.raw", (off_t)10, (hsize_t)sizeof part)<0 ||
- H5Pset_external (dcpl, "extern_3a.raw", (off_t)20, (hsize_t)sizeof part)<0 ||
- H5Pset_external (dcpl, "extern_4a.raw", (off_t)30, (hsize_t)sizeof part)<0)
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE))<0) goto error;
+ if(H5Pset_external(dcpl, "extern_1a.raw", (off_t)0, (hsize_t)sizeof part) < 0 ||
+ H5Pset_external(dcpl, "extern_2a.raw", (off_t)10, (hsize_t)sizeof part) < 0 ||
+ H5Pset_external(dcpl, "extern_3a.raw", (off_t)20, (hsize_t)sizeof part) < 0 ||
+ H5Pset_external(dcpl, "extern_4a.raw", (off_t)30, (hsize_t)sizeof part) < 0)
goto error;
cur_size = 100;
- if ((space=H5Screate_simple (1, &cur_size, NULL))<0) goto error;
- if ((dset=H5Dcreate(file, "dset1", H5T_NATIVE_INT, space, dcpl))<0)
- goto error;
+ if((space = H5Screate_simple(1, &cur_size, NULL)) < 0) goto error;
+ if((dset = H5Dcreate(file, "dset1", H5T_NATIVE_INT, space, dcpl)) < 0) goto error;
/*
* Read the entire dataset and compare with the original
*/
- memset (whole, 0, sizeof(whole));
- if (H5Dread(dset, H5T_NATIVE_INT, space, space, H5P_DEFAULT, whole)<0)
- goto error;
- for (i=0; i<100; i++) {
+ memset(whole, 0, sizeof(whole));
+ if(H5Dread(dset, H5T_NATIVE_INT, space, space, H5P_DEFAULT, whole) < 0) goto error;
+ for(i = 0; i < 100; i++) {
if (whole[i]!=(signed)i) {
H5_FAILED();
puts(" Incorrect value(s) read.");
@@ -842,11 +838,9 @@ main (void)
h5_reset();
fapl = h5_fileaccess();
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
- if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) {
- goto error;
- }
- if ((grp=H5Gcreate(file, "emit-diagnostics", 8))<0) goto error;
- if (H5Gclose (grp)<0) goto error;
+ if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR
+ if((grp = H5Gcreate2(file, "emit-diagnostics", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if(H5Gclose(grp) < 0) goto error;
nerrors += test_1a(file);
nerrors += test_1b(file);
diff --git a/test/flush1.c b/test/flush1.c
index 5f8eefc..04345e0 100644
--- a/test/flush1.c
+++ b/test/flush1.c
@@ -58,42 +58,37 @@ create_file(char* name, hid_t fapl)
hsize_t ch_size[2] = {5, 5};
size_t i, j;
- if ((file=H5Fcreate(name, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) goto error;
+ if((file = H5Fcreate(name, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR
/* Create a chunked dataset */
- if ((dcpl=H5Pcreate(H5P_DATASET_CREATE))<0) goto error;
- if (H5Pset_chunk(dcpl, 2, ch_size)<0) goto error;
- if ((space=H5Screate_simple(2, ds_size, NULL))<0) goto error;
- if ((dset=H5Dcreate(file, "dset", H5T_NATIVE_FLOAT, space, H5P_DEFAULT))<0)
- goto error;
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) FAIL_STACK_ERROR
+ if(H5Pset_chunk(dcpl, 2, ch_size) < 0) FAIL_STACK_ERROR
+ if((space = H5Screate_simple(2, ds_size, NULL)) < 0) FAIL_STACK_ERROR
+ if((dset = H5Dcreate(file, "dset", H5T_NATIVE_FLOAT, space, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Write some data */
- for (i=0; i<ds_size[0]; i++) {
+ for(i = 0; i < ds_size[0]; i++)
/*
* The extra cast in the following statement is a bug workaround
* for the Win32 version 5.0 compiler.
* 1998-11-06 ptl
*/
- for (j=0; j<(size_t)ds_size[1]; j++) {
+ for(j = 0; j < (size_t)ds_size[1]; j++)
the_data[i][j] = (double)(hssize_t)i/(hssize_t)(j+1);
- }
- }
- if (H5Dwrite(dset, H5T_NATIVE_DOUBLE, space, space, H5P_DEFAULT,
- the_data)<0) goto error;
+ if(H5Dwrite(dset, H5T_NATIVE_DOUBLE, space, space, H5P_DEFAULT, the_data) < 0) FAIL_STACK_ERROR
/* Create some groups */
- if ((groups=H5Gcreate(file, "some_groups", 0))<0) goto error;
- for (i=0; i<100; i++) {
+ if((groups = H5Gcreate2(file, "some_groups", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ for(i = 0; i < 100; i++) {
sprintf(name, "grp%02u", (unsigned)i);
- if ((grp=H5Gcreate(groups, name, 0))<0) goto error;
- if (H5Gclose(grp)<0) goto error;
- }
+ if((grp = H5Gcreate2(groups, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if(H5Gclose(grp)<0) FAIL_STACK_ERROR
+ } /* end for */
return file;
error:
- HD_exit(1);
-
+ HD_exit(1);
}
diff --git a/test/gen_mergemsg.c b/test/gen_mergemsg.c
index 8777197..f070901 100644
--- a/test/gen_mergemsg.c
+++ b/test/gen_mergemsg.c
@@ -52,7 +52,7 @@ int main()
assert(fid > 0);
/* Create first group */
- gid = H5Gcreate(fid, GROUP1, (size_t)0);
+ gid = H5Gcreate2(fid, GROUP1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
assert(gid > 0);
/* Close first group */
@@ -60,7 +60,7 @@ int main()
assert(ret >= 0);
/* Create second group */
- gid2 = H5Gcreate(fid, GROUP2, (size_t)0);
+ gid2 = H5Gcreate2(fid, GROUP2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
assert(gid2 > 0);
/* Close second group */
@@ -146,7 +146,7 @@ int main()
assert(fid > 0);
/* Create third group */
- gid3 = H5Gcreate(fid, GROUP3, (size_t)0);
+ gid3 = H5Gcreate2(fid, GROUP3, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
assert(gid3 > 0);
/* Close third group */
diff --git a/test/gen_new_group.c b/test/gen_new_group.c
index 5a3dbfe..18a5416 100644
--- a/test/gen_new_group.c
+++ b/test/gen_new_group.c
@@ -73,11 +73,11 @@ int main(void)
if((sid = H5Screate(H5S_SCALAR)) < 0) goto error;
/* Create empty group (w/default group creation properties) */
- if((gid = H5Gcreate(fid, "empty", (size_t)0)) < 0) goto error;
+ if((gid = H5Gcreate2(fid, "empty", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error;
if(H5Gclose(gid) < 0) goto error;
/* Create group which will contain link messages (w/default group creation properties) */
- if((gid = H5Gcreate(fid, "links", (size_t)0)) < 0) goto error;
+ if((gid = H5Gcreate2(fid, "links", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error;
/* Create dataset in group */
if((did = H5Dcreate(gid, "dset1", H5T_NATIVE_INT, sid, H5P_DEFAULT)) < 0) goto error;
diff --git a/test/gen_old_group.c b/test/gen_old_group.c
index 46f60ee..1b33cea 100644
--- a/test/gen_old_group.c
+++ b/test/gen_old_group.c
@@ -42,7 +42,7 @@ int main(void)
if((fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) <0) goto error;
/* Create empty group that uses "symbol table" form to store links */
- if((gid = H5Gcreate(fid, "old", (size_t)0)) < 0) goto error;
+ if((gid = H5Gcreate2(fid, "old", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error;
if(H5Gclose(gid) < 0) goto error;
/* Close file */
diff --git a/test/gen_udlinks.c b/test/gen_udlinks.c
index 5e52ace..b7e35ef 100644
--- a/test/gen_udlinks.c
+++ b/test/gen_udlinks.c
@@ -62,9 +62,9 @@ main (void)
if((fid2 = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error;
/* Create two groups in the second file */
- if((gid = H5Gcreate(fid2, "group", (size_t)0)) < 0) goto error;
+ if((gid = H5Gcreate2(fid2, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error;
if((H5Gclose(gid)) < 0) goto error;
- if((gid = H5Gcreate(fid2, "group/subgroup", (size_t)0)) < 0) goto error;
+ if((gid = H5Gcreate2(fid2, "group/subgroup", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error;
if((H5Gclose(gid)) < 0) goto error;
/* Create an external link in the first file pointing to the group in the second file */
diff --git a/test/getname.c b/test/getname.c
index 5fa673b..9700df3 100644
--- a/test/getname.c
+++ b/test/getname.c
@@ -108,14 +108,14 @@ test_main(hid_t file_id, hid_t fapl)
h5_fixname(FILENAME[3], fapl, filename3, sizeof filename3);
/*-------------------------------------------------------------------------
- * Test H5Iget_name with H5Gcreate, one group
+ * Test H5Iget_name with one group
*-------------------------------------------------------------------------
*/
- TESTING("H5Iget_name with H5Gcreate, one group");
+ TESTING("H5Iget_name with one group");
/* Create group "g0" in the root group using absolute name */
- if ((group_id = H5Gcreate( file_id, "/g0", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file_id, "/g0", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
if(check_name(group_id, "/g0", "/g0") < 0) TEST_ERROR;
@@ -128,16 +128,16 @@ test_main(hid_t file_id, hid_t fapl)
/*-------------------------------------------------------------------------
- * Test H5Iget_name with H5Gcreate, more than one group
+ * Test H5Iget_name with more than one group
*-------------------------------------------------------------------------
*/
- TESTING("H5Iget_name with H5Gcreate, more than one group");
+ TESTING("H5Iget_name with more than one group");
/* Create group "g1" in the root group using absolute name */
- if ((group_id = H5Gcreate( file_id, "/g1", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file_id, "/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Create group "g2" in group "g1" using absolute name */
- if ((group2_id = H5Gcreate( file_id, "/g1/g2", 0 ))<0) TEST_ERROR;
+ if((group2_id = H5Gcreate2(file_id, "/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
if(check_name(group_id, "/g1", "/g1") < 0) TEST_ERROR;
@@ -259,14 +259,13 @@ test_main(hid_t file_id, hid_t fapl)
TESTING("H5Iget_name with a long path");
/* Create group "g2/bar/baz" */
- if ((group_id = H5Gcreate( file_id, "g2", 0 ))<0) TEST_ERROR;
- if ((group2_id = H5Gcreate( file_id, "g2/bar", 0 ))<0) TEST_ERROR;
- if ((group3_id = H5Gcreate( file_id, "g2/bar/baz", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file_id, "g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group2_id = H5Gcreate2(file_id, "g2/bar", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group3_id = H5Gcreate2(file_id, "g2/bar/baz", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Create a dataset */
- if ((space_id = H5Screate_simple( 1, dims, NULL ))<0) TEST_ERROR;
- if ((dataset_id = H5Dcreate( group3_id , "d1", H5T_NATIVE_INT, space_id,
- H5P_DEFAULT ))<0) TEST_ERROR;
+ if((space_id = H5Screate_simple( 1, dims, NULL ))<0) TEST_ERROR;
+ if((dataset_id = H5Dcreate(group3_id , "d1", H5T_NATIVE_INT, space_id, H5P_DEFAULT ))<0) TEST_ERROR;
/* Close */
H5Dclose( dataset_id );
@@ -410,10 +409,10 @@ test_main(hid_t file_id, hid_t fapl)
TESTING("H5Iget_name with H5Gmove and relative names");
/* Create group "/g3" */
- if ((group_id = H5Gcreate( file_id, "/g3", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file_id, "/g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Create group "/g3/foo" using absolute name */
- if ((group2_id = H5Gcreate( file_id, "/g3/foo1", 0 ))<0) TEST_ERROR;
+ if((group2_id = H5Gcreate2(file_id, "/g3/foo1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Open group "/g3/foo" again */
if ((group3_id = H5Gopen( file_id, "/g3/foo1"))<0) TEST_ERROR;
@@ -460,13 +459,13 @@ test_main(hid_t file_id, hid_t fapl)
TESTING("H5Iget_name with H5Gmove and a long path");
/* Create group "g4/A/B" */
- if ((group_id = H5Gcreate( file_id, "g4", 0 ))<0) TEST_ERROR;
- if ((group2_id = H5Gcreate( file_id, "g4/A", 0 ))<0) TEST_ERROR;
- if ((group3_id = H5Gcreate( file_id, "g4/A/B", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file_id, "g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group2_id = H5Gcreate2(file_id, "g4/A", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group3_id = H5Gcreate2(file_id, "g4/A/B", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Create group "g5/C" */
- if ((group4_id = H5Gcreate( file_id, "g5", 0 ))<0) TEST_ERROR;
- if ((group5_id = H5Gcreate( file_id, "g5/C", 0 ))<0) TEST_ERROR;
+ if((group4_id = H5Gcreate2(file_id, "g5", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group5_id = H5Gcreate2(file_id, "g5/C", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
if(check_name(group3_id, "/g4/A/B", "/g4/A/B") < 0) TEST_ERROR;
@@ -510,10 +509,10 @@ test_main(hid_t file_id, hid_t fapl)
TESTING("H5Iget_name with H5Gmove and a long path #2");
/* Create group "g6/A/B" and "g7" */
- if ((group_id = H5Gcreate( file_id, "g6", 0 ))<0) TEST_ERROR;
- if ((group2_id = H5Gcreate( file_id, "g6/A", 0 ))<0) TEST_ERROR;
- if ((group3_id = H5Gcreate( file_id, "g6/A/B", 0 ))<0) TEST_ERROR;
- if ((group4_id = H5Gcreate( file_id, "g7", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file_id, "g6", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group2_id = H5Gcreate2(file_id, "g6/A", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group3_id = H5Gcreate2(file_id, "g6/A/B", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group4_id = H5Gcreate2(file_id, "g7", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
if(check_name(group3_id, "/g6/A/B", "/g6/A/B") < 0) TEST_ERROR;
@@ -543,7 +542,7 @@ test_main(hid_t file_id, hid_t fapl)
TESTING("H5Iget_name with H5Gunlink");
/* Create a new group. */
- if ((group_id = H5Gcreate( file_id, "/g8", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file_id, "/g8", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Delete */
if (H5Gunlink( file_id, "/g8")<0) TEST_ERROR;
@@ -564,9 +563,9 @@ test_main(hid_t file_id, hid_t fapl)
TESTING("H5Iget_name with H5Gunlink and a long path");
/* Create group "g9/a/b" */
- if ((group_id = H5Gcreate( file_id, "g9", 0 ))<0) TEST_ERROR;
- if ((group2_id = H5Gcreate( file_id, "g9/a", 0 ))<0) TEST_ERROR;
- if ((group3_id = H5Gcreate( file_id, "g9/a/b", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file_id, "g9", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group2_id = H5Gcreate2(file_id, "g9/a", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group3_id = H5Gcreate2(file_id, "g9/a/b", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Delete */
if (H5Gunlink( file_id, "/g9/a")<0) TEST_ERROR;
@@ -582,8 +581,8 @@ test_main(hid_t file_id, hid_t fapl)
H5Gclose( group3_id );
/* Recreate groups */
- if ((group2_id = H5Gcreate( group_id, "a", 0 ))<0) TEST_ERROR;
- if ((group3_id = H5Gcreate( group_id, "a/b", 0 ))<0) TEST_ERROR;
+ if((group2_id = H5Gcreate2(group_id, "a", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group3_id = H5Gcreate2(group_id, "a/b", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Delete, using relative path */
if (H5Gunlink( group_id, "a")<0) TEST_ERROR;
@@ -602,9 +601,9 @@ test_main(hid_t file_id, hid_t fapl)
H5Gclose( group_id );
/* Create group "g10/a/b" */
- if ((group_id = H5Gcreate( file_id, "g10", 0 ))<0) TEST_ERROR;
- if ((group2_id = H5Gcreate( file_id, "g10/a", 0 ))<0) TEST_ERROR;
- if ((group3_id = H5Gcreate( file_id, "g10/a/b", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file_id, "g10", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group2_id = H5Gcreate2(file_id, "g10/a", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group3_id = H5Gcreate2(file_id, "g10/a/b", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Delete */
if (H5Gunlink( file_id, "/g10/a/b")<0) TEST_ERROR;
@@ -616,7 +615,7 @@ test_main(hid_t file_id, hid_t fapl)
H5Gclose( group3_id );
/* Recreate group */
- if ((group3_id = H5Gcreate( group_id, "a/b", 0 ))<0) TEST_ERROR;
+ if((group3_id = H5Gcreate2(group_id, "a/b", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Delete, using relative path */
if (H5Gunlink( group_id, "a/b")<0) TEST_ERROR;
@@ -642,8 +641,8 @@ test_main(hid_t file_id, hid_t fapl)
/* Create group "g11/g" */
- if ((group_id = H5Gcreate( file_id, "g11", 0 ))<0) TEST_ERROR;
- if ((group2_id = H5Gcreate( file_id, "g11/g", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file_id, "g11", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group2_id = H5Gcreate2(file_id, "g11/g", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Create two datasets "g11/d" and "g11/g/d"*/
if ((space_id = H5Screate_simple( 1, dims, NULL ))<0) TEST_ERROR;
@@ -677,7 +676,7 @@ test_main(hid_t file_id, hid_t fapl)
TESTING("H5Iget_name with H5Fmount; with IDs on the list");
/* Create a group "g12" in the first file */
- if ((group_id = H5Gcreate( file_id, "/g12", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file_id, "/g12", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
H5Gclose( group_id );
@@ -722,9 +721,9 @@ test_main(hid_t file_id, hid_t fapl)
TESTING("H5Iget_name with H5Fmount; long name");
/* Create a group "g13/g1/g2" in the first file */
- if ((group_id = H5Gcreate( file_id, "/g13", 0 ))<0) TEST_ERROR;
- if ((group2_id = H5Gcreate( file_id, "/g13/g1", 0 ))<0) TEST_ERROR;
- if ((group3_id = H5Gcreate( file_id, "/g13/g1/g2", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file_id, "/g13", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group2_id = H5Gcreate2(file_id, "/g13/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group3_id = H5Gcreate2(file_id, "/g13/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
H5Gclose( group_id );
@@ -734,9 +733,9 @@ test_main(hid_t file_id, hid_t fapl)
/* Create second file and group "g" in it */
file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
- if ((group_id = H5Gcreate( file1_id, "/g14", 0 ))<0) TEST_ERROR;
- if ((group2_id = H5Gcreate( file1_id, "/g14/g3", 0 ))<0) TEST_ERROR;
- if ((group3_id = H5Gcreate( file1_id, "/g14/g3/g4", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file1_id, "/g14", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group2_id = H5Gcreate2(file1_id, "/g14/g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group3_id = H5Gcreate2(file1_id, "/g14/g3/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
H5Gclose( group_id );
@@ -911,10 +910,10 @@ test_main(hid_t file_id, hid_t fapl)
TESTING("H5Iget_name with H5Funmount");
/* Create a group "g15/g1/g2" in the first file */
- if ((group_id = H5Gcreate( file_id, "/g15", 0 ))<0) TEST_ERROR;
- if ((group2_id = H5Gcreate( file_id, "/g15/g1", 0 ))<0) TEST_ERROR;
- if ((group3_id = H5Gcreate( file_id, "/g15/g1/g2", 0 ))<0) TEST_ERROR;
- if ((group4_id = H5Gcreate( file_id, "/g15/g1/g2/g3", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file_id, "/g15", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group2_id = H5Gcreate2(file_id, "/g15/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group3_id = H5Gcreate2(file_id, "/g15/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group4_id = H5Gcreate2(file_id, "/g15/g1/g2/g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
H5Gclose( group_id );
@@ -925,9 +924,9 @@ test_main(hid_t file_id, hid_t fapl)
/* Create second file and group "g" in it */
file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
- if ((group_id = H5Gcreate( file1_id, "/g16", 0 ))<0) TEST_ERROR;
- if ((group2_id = H5Gcreate( file1_id, "/g16/g4", 0 ))<0) TEST_ERROR;
- if ((group3_id = H5Gcreate( file1_id, "/g16/g4/g5", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file1_id, "/g16", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group2_id = H5Gcreate2(file1_id, "/g16/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group3_id = H5Gcreate2(file1_id, "/g16/g4/g5", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
H5Gclose( group_id );
@@ -982,7 +981,7 @@ test_main(hid_t file_id, hid_t fapl)
if (H5Tinsert (type_id, "c", HOFFSET(s1_t,c), H5T_NATIVE_FLOAT)<0) TEST_ERROR;
/* Create group "g17" */
- if ((group_id = H5Gcreate( file_id, "g17", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file_id, "g17", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Save datatype for later */
if (H5Tcommit (group_id, "t", type_id)<0) TEST_ERROR;
@@ -1250,8 +1249,8 @@ PASSED();
TESTING("H5Iget_name with added names with mounting");
/* Create a group "g18/g2" in the first file */
- if ((group_id = H5Gcreate( file_id, "/g18", 0 ))<0) TEST_ERROR;
- if ((group2_id = H5Gcreate( file_id, "/g18/g2", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file_id, "/g18", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group2_id = H5Gcreate2(file_id, "/g18/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Also create a dataset and a datatype */
if ((space_id = H5Screate_simple( 1, dims, NULL ))<0) TEST_ERROR;
@@ -1263,9 +1262,9 @@ PASSED();
/* Create second file and group "/g3/g4/g5" in it */
file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
- if ((group3_id = H5Gcreate( file1_id, "/g3", 0 ))<0) TEST_ERROR;
- if ((group4_id = H5Gcreate( file1_id, "/g3/g4", 0 ))<0) TEST_ERROR;
- if ((group5_id = H5Gcreate( file1_id, "/g3/g4/g5", 0 ))<0) TEST_ERROR;
+ if((group3_id = H5Gcreate2(file1_id, "/g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group4_id = H5Gcreate2(file1_id, "/g3/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group5_id = H5Gcreate2(file1_id, "/g3/g4/g5", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Mount first file at "g3/g4" in the second file */
if (H5Fmount(file1_id, "/g3/g4", file_id, H5P_DEFAULT)<0) TEST_ERROR;
@@ -1319,7 +1318,7 @@ PASSED();
H5Gclose( group6_id );
H5Fclose( file1_id );
-PASSED();
+ PASSED();
/*-------------------------------------------------------------------------
@@ -1331,8 +1330,8 @@ PASSED();
/* Create a file and group "/g1/g2" in it */
file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
- if ((group_id = H5Gcreate( file1_id, "/g1", 0 ))<0) TEST_ERROR;
- if ((group2_id = H5Gcreate( file1_id, "/g1/g2", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file1_id, "/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group2_id = H5Gcreate2(file1_id, "/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
if(check_name(group2_id, "/g1/g2", "/g1/g2") < 0) TEST_ERROR;
@@ -1359,13 +1358,13 @@ PASSED();
/* Create a file and group "/g1/g2" in it */
file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
- if ((group_id = H5Gcreate( file1_id, "/g1", 0 ))<0) TEST_ERROR;
- if ((group2_id = H5Gcreate( file1_id, "/g1/g2", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file1_id, "/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group2_id = H5Gcreate2(file1_id, "/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Create a new file and group "/g3/g4" in it */
- if ((file2_id = H5Fcreate( filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl ))<0) TEST_ERROR;
- if ((group3_id = H5Gcreate( file2_id, "/g3", 0 ))<0) TEST_ERROR;
- if ((group4_id = H5Gcreate( file2_id, "/g3/g4", 0 ))<0) TEST_ERROR;
+ if((file2_id = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl )) < 0) FAIL_STACK_ERROR
+ if((group3_id = H5Gcreate2(file2_id, "/g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group4_id = H5Gcreate2(file2_id, "/g3/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Mount first file at "/g3/g4" in the second file */
if(H5Fmount(file2_id, "/g3/g4", file1_id, H5P_DEFAULT)<0) TEST_ERROR;
@@ -1407,13 +1406,13 @@ PASSED();
/* Create a file and group "/g1/g2" in it */
file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
- if ((group_id = H5Gcreate( file1_id, "/g1", 0 ))<0) TEST_ERROR;
- if ((group2_id = H5Gcreate( file1_id, "/g1/g2", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file1_id, "/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group2_id = H5Gcreate2(file1_id, "/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Create a new file and group "/g3/g4" in it */
- if ((file2_id = H5Fcreate( filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl ))<0) TEST_ERROR;
- if ((group3_id = H5Gcreate( file2_id, "/g3", 0 ))<0) TEST_ERROR;
- if ((group4_id = H5Gcreate( file2_id, "/g3/g4", 0 ))<0) TEST_ERROR;
+ if((file2_id = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl )) < 0) FAIL_STACK_ERROR
+ if((group3_id = H5Gcreate2(file2_id, "/g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group4_id = H5Gcreate2(file2_id, "/g3/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Mount first file at "g3/g4" in the second file */
if(H5Fmount(file2_id, "/g3/g4", file1_id, H5P_DEFAULT)<0) TEST_ERROR;
@@ -1505,8 +1504,8 @@ PASSED();
TESTING("H5Iget_name with H5Glink hard");
/* Create group "g19/g1" */
- if ((group_id = H5Gcreate( file_id, "/g19", 0 ))<0) TEST_ERROR;
- if ((group2_id = H5Gcreate( file_id, "/g19/g1", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file_id, "/g19", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group2_id = H5Gcreate2(file_id, "/g19/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Create hard link to "g19/g1/ group */
if (H5Glink(file_id, H5G_LINK_HARD, "/g19/g1", "/g19/g2")<0) TEST_ERROR;
@@ -1591,8 +1590,8 @@ PASSED();
TESTING("H5Iget_name with H5Glink symbolic");
/* Create group "g20/g1" */
- if ((group_id = H5Gcreate( file_id, "/g20", 0 ))<0) TEST_ERROR;
- if ((group2_id = H5Gcreate( file_id, "/g20/g1", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file_id, "/g20", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group2_id = H5Gcreate2(file_id, "/g20/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Create symbolic link to "g20/g1/ group */
if (H5Glink(file_id, H5G_LINK_SOFT, "/g20/g1", "/g20/g2")<0) TEST_ERROR;
@@ -1622,8 +1621,8 @@ PASSED();
TESTING("H5Iget_name with H5Glink symbolic and move target");
/* Create group "g21/g1" */
- if ((group_id = H5Gcreate( file_id, "/g21", 0 ))<0) TEST_ERROR;
- if ((group2_id = H5Gcreate( file_id, "/g21/g1", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file_id, "/g21", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group2_id = H5Gcreate2(file_id, "/g21/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Create symbolic link to "g21/g1/ group */
if (H5Glink(file_id, H5G_LINK_SOFT, "/g21/g1", "/g21/g2")<0) TEST_ERROR;
@@ -1657,8 +1656,8 @@ PASSED();
TESTING("H5Iget_name with H5Glink symbolic and move source");
/* Create group "g22/g1" */
- if ((group_id = H5Gcreate( file_id, "/g22", 0 ))<0) TEST_ERROR;
- if ((group2_id = H5Gcreate( file_id, "/g22/g1", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file_id, "/g22", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group2_id = H5Gcreate2(file_id, "/g22/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Create symbolic link to "g22/g1/ group */
if (H5Glink(file_id, H5G_LINK_SOFT, "/g22/g1", "/g22/g2")<0) TEST_ERROR;
@@ -1700,8 +1699,8 @@ PASSED();
TESTING("H5Iget_name with H5Glink symbolic and unlink target");
/* Create group "g23/g1" */
- if ((group_id = H5Gcreate( file_id, "/g23", 0 ))<0) TEST_ERROR;
- if ((group2_id = H5Gcreate( file_id, "/g23/g1", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file_id, "/g23", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group2_id = H5Gcreate2(file_id, "/g23/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Create symbolic link to "g23/g1/ group */
if (H5Glink(file_id, H5G_LINK_SOFT, "/g23/g1", "/g23/g2")<0) TEST_ERROR;
@@ -1733,8 +1732,8 @@ PASSED();
TESTING("H5Iget_name with H5Glink symbolic and unlink source");
/* Create group "g24/g1" */
- if ((group_id = H5Gcreate( file_id, "/g24", 0 ))<0) TEST_ERROR;
- if ((group2_id = H5Gcreate( file_id, "/g24/g1", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file_id, "/g24", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group2_id = H5Gcreate2(file_id, "/g24/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Create symbolic link to "g24/g1/ group */
if (H5Glink(file_id, H5G_LINK_SOFT, "/g24/g1", "/g24/g2")<0) TEST_ERROR;
@@ -1766,9 +1765,9 @@ PASSED();
TESTING("H5Iget_name with several nested mounted files");
/* Create a group "g25/g1/g2" in the first file */
- if ((group_id = H5Gcreate( file_id, "/g25", 0 ))<0) TEST_ERROR;
- if ((group2_id = H5Gcreate( file_id, "/g25/g1", 0 ))<0) TEST_ERROR;
- if ((group3_id = H5Gcreate( file_id, "/g25/g1/g2", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file_id, "/g25", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group2_id = H5Gcreate2(file_id, "/g25/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group3_id = H5Gcreate2(file_id, "/g25/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
H5Gclose( group_id );
@@ -1778,9 +1777,9 @@ PASSED();
/* Create second file and group "/g26/g3/g4" in it */
file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
- if ((group_id = H5Gcreate( file1_id, "/g26", 0 ))<0) TEST_ERROR;
- if ((group2_id = H5Gcreate( file1_id, "/g26/g3", 0 ))<0) TEST_ERROR;
- if ((group3_id = H5Gcreate( file1_id, "/g26/g3/g4", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file1_id, "/g26", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group2_id = H5Gcreate2(file1_id, "/g26/g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group3_id = H5Gcreate2(file1_id, "/g26/g3/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
H5Gclose( group_id );
@@ -1790,9 +1789,9 @@ PASSED();
/* Create third file and group "/g27/g5/g6" in it */
file2_id = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
- if ((group_id = H5Gcreate( file2_id, "/g27", 0 ))<0) TEST_ERROR;
- if ((group2_id = H5Gcreate( file2_id, "/g27/g5", 0 ))<0) TEST_ERROR;
- if ((group3_id = H5Gcreate( file2_id, "/g27/g5/g6", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file2_id, "/g27", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group2_id = H5Gcreate2(file2_id, "/g27/g5", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group3_id = H5Gcreate2(file2_id, "/g27/g5/g6", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
H5Gclose( group_id );
@@ -1802,9 +1801,9 @@ PASSED();
/* Create fourth file and group "/g28/g5/g6" in it */
file3_id = H5Fcreate(filename3, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
- if ((group_id = H5Gcreate( file3_id, "/g28", 0 ))<0) TEST_ERROR;
- if ((group2_id = H5Gcreate( file3_id, "/g28/g7", 0 ))<0) TEST_ERROR;
- if ((group3_id = H5Gcreate( file3_id, "/g28/g7/g8", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file3_id, "/g28", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group2_id = H5Gcreate2(file3_id, "/g28/g7", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group3_id = H5Gcreate2(file3_id, "/g28/g7/g8", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
H5Gclose( group_id );
@@ -1899,11 +1898,11 @@ PASSED();
TESTING("H5Iget_name and H5Gmove with repeated path components");
/* Create a group "g29/g1/g2/g1/g2" in a file */
- if ((group_id = H5Gcreate( file_id, "/g29", 0 ))<0) TEST_ERROR;
- if ((group2_id = H5Gcreate( file_id, "/g29/g1", 0 ))<0) TEST_ERROR;
- if ((group3_id = H5Gcreate( file_id, "/g29/g1/g2", 0 ))<0) TEST_ERROR;
- if ((group4_id = H5Gcreate( file_id, "/g29/g1/g2/g1", 0 ))<0) TEST_ERROR;
- if ((group5_id = H5Gcreate( file_id, "/g29/g1/g2/g1/g2", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file_id, "/g29", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group2_id = H5Gcreate2(file_id, "/g29/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group3_id = H5Gcreate2(file_id, "/g29/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group4_id = H5Gcreate2(file_id, "/g29/g1/g2/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group5_id = H5Gcreate2(file_id, "/g29/g1/g2/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Rename group */
if (H5Gmove( file_id, "/g29/g1/g2/g1/g2", "/g29/g1/g2/g1/g3" )<0) TEST_ERROR;
@@ -1943,9 +1942,9 @@ PASSED();
TESTING("H5Iget_name with higher mounted file");
/* Create a group "/g30/g1/g2" in the first file */
- if ((group_id = H5Gcreate( file_id, "/g30", 0 ))<0) TEST_ERROR;
- if ((group2_id = H5Gcreate( file_id, "/g30/g1", 0 ))<0) TEST_ERROR;
- if ((group3_id = H5Gcreate( file_id, "/g30/g1/g2", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file_id, "/g30", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group2_id = H5Gcreate2(file_id, "/g30/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group3_id = H5Gcreate2(file_id, "/g30/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
H5Gclose( group_id );
@@ -1955,9 +1954,9 @@ PASSED();
/* Create second file and group "/g31/g3/g4" in it */
file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
- if ((group_id = H5Gcreate( file1_id, "/g31", 0 ))<0) TEST_ERROR;
- if ((group2_id = H5Gcreate( file1_id, "/g31/g3", 0 ))<0) TEST_ERROR;
- if ((group3_id = H5Gcreate( file1_id, "/g31/g3/g4", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file1_id, "/g31", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group2_id = H5Gcreate2(file1_id, "/g31/g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group3_id = H5Gcreate2(file1_id, "/g31/g3/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
H5Gclose( group_id );
@@ -1967,9 +1966,9 @@ PASSED();
/* Create third file and group "/g32/g5/g6" in it */
file2_id = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
- if ((group_id = H5Gcreate( file2_id, "/g32", 0 ))<0) TEST_ERROR;
- if ((group2_id = H5Gcreate( file2_id, "/g32/g5", 0 ))<0) TEST_ERROR;
- if ((group3_id = H5Gcreate( file2_id, "/g32/g5/g6", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file2_id, "/g32", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group2_id = H5Gcreate2(file2_id, "/g32/g5", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group3_id = H5Gcreate2(file2_id, "/g32/g5/g6", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
H5Gclose( group_id );
@@ -1979,9 +1978,9 @@ PASSED();
/* Create fourth file and group "/g33/g5/g6" in it */
file3_id = H5Fcreate(filename3, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
- if ((group_id = H5Gcreate( file3_id, "/g33", 0 ))<0) TEST_ERROR;
- if ((group2_id = H5Gcreate( file3_id, "/g33/g7", 0 ))<0) TEST_ERROR;
- if ((group3_id = H5Gcreate( file3_id, "/g33/g7/g8", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file3_id, "/g33", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group2_id = H5Gcreate2(file3_id, "/g33/g7", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group3_id = H5Gcreate2(file3_id, "/g33/g7/g8", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
H5Gclose( group_id );
@@ -2081,9 +2080,9 @@ PASSED();
/* Create second file and group "/g35/g3/g4" in it */
file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
- if ((group_id = H5Gcreate( file1_id, "/g35", 0 ))<0) TEST_ERROR;
- if ((group2_id = H5Gcreate( file1_id, "/g35/g3", 0 ))<0) TEST_ERROR;
- if ((group3_id = H5Gcreate( file1_id, "/g35/g3/g4", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file1_id, "/g35", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group2_id = H5Gcreate2(file1_id, "/g35/g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group3_id = H5Gcreate2(file1_id, "/g35/g3/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
H5Gclose( group_id );
@@ -2091,9 +2090,9 @@ PASSED();
H5Gclose( group3_id );
/* Create group "/g34/g1/g2" in first file */
- if ((group_id = H5Gcreate( file_id, "/g34", 0 ))<0) TEST_ERROR;
- if ((group2_id = H5Gcreate( file_id, "/g34/g1", 0 ))<0) TEST_ERROR;
- if ((group3_id = H5Gcreate( file_id, "/g34/g1/g2", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file_id, "/g34", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group2_id = H5Gcreate2(file_id, "/g34/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group3_id = H5Gcreate2(file_id, "/g34/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Create hard link to "/g34/g1/g2 group */
if (H5Glink(file_id, H5G_LINK_HARD, "/g34/g1/g2", "/g34/g2a")<0) TEST_ERROR;
@@ -2140,9 +2139,9 @@ PASSED();
TESTING("H5Iget_name with mounted files and unlinking");
/* Create group "/g36/g1/g2" in first file */
- if ((group_id = H5Gcreate( file_id, "/g36", 0 ))<0) TEST_ERROR;
- if ((group2_id = H5Gcreate( file_id, "/g36/g1", 0 ))<0) TEST_ERROR;
- if ((group3_id = H5Gcreate( file_id, "/g36/g1/g2", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file_id, "/g36", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group2_id = H5Gcreate2(file_id, "/g36/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group3_id = H5Gcreate2(file_id, "/g36/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
H5Gclose( group_id );
@@ -2152,10 +2151,10 @@ PASSED();
/* Create second file and group "/g37/g4" in it */
file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
- if ((group_id = H5Gcreate( file1_id, "/g37", 0 ))<0) TEST_ERROR;
- if ((group2_id = H5Gcreate( file1_id, "/g37/g4", 0 ))<0) TEST_ERROR;
- if ((group3_id = H5Gcreate( file1_id, "/g37/g4/g5a", 0 ))<0) TEST_ERROR;
- if ((group4_id = H5Gcreate( file1_id, "/g37/g4/g5b", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file1_id, "/g37", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group2_id = H5Gcreate2(file1_id, "/g37/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group3_id = H5Gcreate2(file1_id, "/g37/g4/g5a", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group4_id = H5Gcreate2(file1_id, "/g37/g4/g5b", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Mount second file under "/g36/g1" in the first file */
if (H5Fmount(file_id, "/g36/g1", file1_id, H5P_DEFAULT)<0) TEST_ERROR;
@@ -2229,9 +2228,9 @@ PASSED();
/* Create file and group "/g38/g1/g2" in it */
file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
- if ((group_id = H5Gcreate( file1_id, "/g38", 0 ))<0) TEST_ERROR;
- if ((group2_id = H5Gcreate( file1_id, "/g38/g1", 0 ))<0) TEST_ERROR;
- if ((group3_id = H5Gcreate( file1_id, "/g38/g1/g2", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file1_id, "/g38", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group2_id = H5Gcreate2(file1_id, "/g38/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group3_id = H5Gcreate2(file1_id, "/g38/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
H5Gclose( group_id );
@@ -2241,9 +2240,9 @@ PASSED();
/* Create second file and group "/g39/g1/g2" in it */
file2_id = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
- if ((group_id = H5Gcreate( file2_id, "/g39", 0 ))<0) TEST_ERROR;
- if ((group2_id = H5Gcreate( file2_id, "/g39/g3", 0 ))<0) TEST_ERROR;
- if ((group3_id = H5Gcreate( file2_id, "/g39/g3/g4", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file2_id, "/g39", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group2_id = H5Gcreate2(file2_id, "/g39/g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group3_id = H5Gcreate2(file2_id, "/g39/g3/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
H5Gclose( group_id );
@@ -2253,9 +2252,9 @@ PASSED();
/* Create third file and group "/g40/g5/g6" in it */
file3_id = H5Fcreate(filename3, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
- if ((group_id = H5Gcreate( file3_id, "/g40", 0 ))<0) TEST_ERROR;
- if ((group2_id = H5Gcreate( file3_id, "/g40/g5", 0 ))<0) TEST_ERROR;
- if ((group3_id = H5Gcreate( file3_id, "/g40/g5/g6", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file3_id, "/g40", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group2_id = H5Gcreate2(file3_id, "/g40/g5", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group3_id = H5Gcreate2(file3_id, "/g40/g5/g6", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
H5Gclose( group_id );
@@ -2311,9 +2310,9 @@ PASSED();
/* Create file and group "/g39/g1/g2" in it */
file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
- if ((group_id = H5Gcreate( file1_id, "/g41", 0 ))<0) TEST_ERROR;
- if ((group2_id = H5Gcreate( file1_id, "/g41/g1", 0 ))<0) TEST_ERROR;
- if ((group3_id = H5Gcreate( file1_id, "/g41/g1/g2", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file1_id, "/g41", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group2_id = H5Gcreate2(file1_id, "/g41/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group3_id = H5Gcreate2(file1_id, "/g41/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
H5Gclose( group_id );
@@ -2323,9 +2322,9 @@ PASSED();
/* Create second file and group "/g42/g1/g2" in it */
file2_id = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
- if ((group_id = H5Gcreate( file2_id, "/g42", 0 ))<0) TEST_ERROR;
- if ((group2_id = H5Gcreate( file2_id, "/g42/g3", 0 ))<0) TEST_ERROR;
- if ((group3_id = H5Gcreate( file2_id, "/g42/g3/g4", 0 ))<0) TEST_ERROR;
+ if((group_id = H5Gcreate2(file2_id, "/g42", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group2_id = H5Gcreate2(file2_id, "/g42/g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group3_id = H5Gcreate2(file2_id, "/g42/g3/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
H5Gclose( group_id );
@@ -2393,8 +2392,7 @@ test_obj_ref(hid_t fapl)
TEST_ERROR
/* Create a group */
- if((group = H5Gcreate(fid1, "Group1", (size_t)0)) < 0)
- TEST_ERROR
+ if((group = H5Gcreate2(fid1, "Group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Create a single dataset inside the second file, which will be mounted
* and used to mask objects in the first file */
@@ -2448,8 +2446,7 @@ test_obj_ref(hid_t fapl)
TEST_ERROR
/* Create a new group in group1 */
- if((group2 = H5Gcreate(group, "Group2", (size_t)0)) < 0)
- TEST_ERROR
+ if((group2 = H5Gcreate2(group, "Group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Create a hard link to group1 in group2 */
if(H5Glink(fid1, H5G_LINK_HARD, "/Group1", "/Group1/Group2/Link") < 0)
diff --git a/test/h5test.c b/test/h5test.c
index 2eb87c1..db56860 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -90,7 +90,7 @@ MPI_Info h5_io_info_g=MPI_INFO_NULL;/* MPI INFO object for IO */
*/
static const char *multi_letters = "msbrglo";
-static herr_t h5_errors(void *client_data);
+static herr_t h5_errors(hid_t estack, void *client_data);
/*-------------------------------------------------------------------------
@@ -110,10 +110,10 @@ static herr_t h5_errors(void *client_data);
*-------------------------------------------------------------------------
*/
static herr_t
-h5_errors(void UNUSED *client_data)
+h5_errors(hid_t estack, void UNUSED *client_data)
{
H5_FAILED();
- H5Eprint2(H5E_DEFAULT, stdout);
+ H5Eprint2(estack, stdout);
return 0;
}
@@ -225,7 +225,7 @@ h5_reset(void)
H5E_BEGIN_TRY {
hid_t file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT,
H5P_DEFAULT);
- hid_t grp = H5Gcreate(file, "emit", (size_t)0);
+ hid_t grp = H5Gcreate2(file, "emit", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(grp);
H5Fclose(file);
HDunlink(filename);
diff --git a/test/links.c b/test/links.c
index 67301dc..45baae6 100644
--- a/test/links.c
+++ b/test/links.c
@@ -130,8 +130,8 @@ mklinks(hid_t fapl, hbool_t new_format)
if ((scalar=H5Screate_simple (1, size, size)) < 0) TEST_ERROR
/* Create a group */
- if ((grp=H5Gcreate (file, "grp1", (size_t)0)) < 0) TEST_ERROR
- if (H5Gclose (grp) < 0) TEST_ERROR
+ if((grp = H5Gcreate2(file, "grp1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
+ if(H5Gclose (grp) < 0) TEST_ERROR
/* Create a dataset */
if ((d1=H5Dcreate (file, "d1", H5T_NATIVE_INT, scalar, H5P_DEFAULT)) < 0) TEST_ERROR
@@ -202,10 +202,10 @@ new_links(hid_t fapl, hbool_t new_format)
if ((scalar=H5Screate_simple (1, size, size)) < 0) TEST_ERROR
/* Create two groups in each file */
- if ((grp1_a=H5Gcreate (file_a, "grp1", (size_t)0)) < 0) TEST_ERROR
- if ((grp2_a=H5Gcreate (file_a, "grp2", (size_t)0)) < 0) TEST_ERROR
- if ((grp1_b=H5Gcreate (file_b, "grp1", (size_t)0)) < 0) TEST_ERROR
- if ((grp2_b=H5Gcreate (file_b, "grp2", (size_t)0)) < 0) TEST_ERROR
+ if((grp1_a = H5Gcreate2(file_a, "grp1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
+ if((grp2_a = H5Gcreate2(file_a, "grp2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
+ if((grp1_b = H5Gcreate2(file_b, "grp1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
+ if((grp2_b = H5Gcreate2(file_b, "grp2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Create datasets */
if((dset1=H5Dcreate(file_a, "dataset1", H5T_NATIVE_INT, scalar, H5P_DEFAULT)) < 0) TEST_ERROR
@@ -498,7 +498,7 @@ long_links(hid_t fapl, hbool_t new_format)
if((fid=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR
/* Create group with short name in file (used as target for hard links) */
- if((gid=H5Gcreate (fid, "grp1", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid, "grp1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Construct very long file name */
if((objname = HDmalloc((size_t)(MAX_NAME_LEN + 1))) == NULL) TEST_ERROR
@@ -514,7 +514,7 @@ long_links(hid_t fapl, hbool_t new_format)
if(H5Lcreate_soft("grp1", fid, objname, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
/* Create group with long name in existing group */
- if((gid2=H5Gcreate(gid, objname, (size_t)0)) < 0) TEST_ERROR
+ if((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Close objects */
if(H5Gclose(gid2) < 0) TEST_ERROR
@@ -579,7 +579,7 @@ toomany(hid_t fapl, hbool_t new_format)
if((fid=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR
/* Create group with short name in file (used as target for hard links) */
- if((gid=H5Gcreate (fid, "final", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid, "final", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Create chain of hard links to existing object (no limit on #) */
if(H5Lcreate_hard(fid, "final", fid, "hard1", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -638,7 +638,7 @@ toomany(hid_t fapl, hbool_t new_format)
if(HDstrcmp(objname, "/hard21")) TEST_ERROR
/* Create object in hard-linked group */
- if((gid2 = H5Gcreate(gid, "new_hard", (size_t)0)) < 0) TEST_ERROR
+ if((gid2 = H5Gcreate2(gid, "new_hard", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Close group in hard-linked group */
if(H5Gclose(gid2) < 0) TEST_ERROR
@@ -664,7 +664,7 @@ toomany(hid_t fapl, hbool_t new_format)
if(HDstrcmp(objname, "/soft16")) TEST_ERROR
/* Create object using soft links */
- if((gid2 = H5Gcreate(gid, "new_soft", (size_t)0)) < 0) TEST_ERROR
+ if((gid2 = H5Gcreate2(gid, "new_soft", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Close groups */
if(H5Gclose(gid2) < 0) TEST_ERROR
@@ -1011,9 +1011,9 @@ test_move(hid_t fapl, hbool_t new_format)
TEST_ERROR
/* Create groups in first file */
- if((grp_1=H5Gcreate(file_a, "group1", (size_t)0)) < 0) TEST_ERROR
- if((grp_2=H5Gcreate(file_a, "group2", (size_t)0)) < 0) TEST_ERROR
- if((grp_move=H5Gcreate(grp_1, "group_move", (size_t)0)) < 0) TEST_ERROR
+ if((grp_1 = H5Gcreate2(file_a, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
+ if((grp_2 = H5Gcreate2(file_a, "group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
+ if((grp_move = H5Gcreate2(grp_1, "group_move", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Create hard and soft links. */
if(H5Lcreate_hard(grp_1, "group_move", H5L_SAME_LOC, "hard", H5P_DEFAULT, H5P_DEFAULT) < 0)
@@ -1153,9 +1153,9 @@ test_copy(hid_t fapl, hbool_t new_format)
TEST_ERROR
/* Create groups in first file */
- if((grp_1=H5Gcreate(file_a, "group1", (size_t)0)) < 0) TEST_ERROR
- if((grp_2=H5Gcreate(file_a, "group2", (size_t)0)) < 0) TEST_ERROR
- if((grp_move=H5Gcreate(grp_1, "group_copy", (size_t)0)) < 0) TEST_ERROR
+ if((grp_1 = H5Gcreate2(file_a, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
+ if((grp_2 = H5Gcreate2(file_a, "group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
+ if((grp_move = H5Gcreate2(grp_1, "group_copy", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Create hard and soft links. */
if(H5Lcreate_hard(grp_1, "group_copy", H5L_SAME_LOC, "hard", H5P_DEFAULT, H5P_DEFAULT) < 0)
@@ -1484,8 +1484,8 @@ test_compat(hid_t fapl, hbool_t new_format)
if((file_id = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR
/* Create two groups in the file */
- if((group1_id = H5Gcreate(file_id, "group1", (size_t)1)) < 0) TEST_ERROR
- if((group2_id = H5Gcreate(file_id, "group2", (size_t)1)) < 0) TEST_ERROR
+ if((group1_id = H5Gcreate2(file_id, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
+ if((group2_id = H5Gcreate2(file_id, "group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Create links using H5Glink and H5Glink2 */
if(H5Glink(file_id, H5G_LINK_HARD, "group2", "group1/link_to_group2") < 0) TEST_ERROR
@@ -1646,7 +1646,7 @@ external_link_root(hid_t fapl, hbool_t new_format)
if(HDstrcmp(objname, "/")) TEST_ERROR
/* Create object in external file */
- if((gid2 = H5Gcreate(gid, "new_group", (size_t)0)) < 0) TEST_ERROR
+ if((gid2 = H5Gcreate2(gid, "new_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Close group in external file */
if(H5Gclose(gid2) < 0) TEST_ERROR
@@ -1654,10 +1654,10 @@ external_link_root(hid_t fapl, hbool_t new_format)
/* Close external object (lets first file close) */
if(H5Gclose(gid) < 0) TEST_ERROR
- /* Create a new object using H5Gcreate through the external link
+ /* Create a new object using H5Gcreate2 through the external link
* directly
*/
- if((gid = H5Gcreate(fid, "ext_link/newer_group", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid, "ext_link/newer_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Close file and group */
if(H5Gclose(gid) < 0) TEST_ERROR
@@ -1689,7 +1689,7 @@ external_link_root(hid_t fapl, hbool_t new_format)
if((fid = H5Fopen(filename2, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) TEST_ERROR
H5E_BEGIN_TRY {
- gid = H5Gcreate(fid, "ext_link/readonly_group", (size_t)0);
+ gid = H5Gcreate2(fid, "ext_link/readonly_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
} H5E_END_TRY
if(gid >= 0) TEST_ERROR
@@ -1749,13 +1749,13 @@ external_link_path(hid_t fapl, hbool_t new_format)
if((fid=H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR
/* Create object down a path */
- if((gid = H5Gcreate(fid, "A", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid, "A", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid) < 0) TEST_ERROR
- if((gid = H5Gcreate(fid, "A/B", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid, "A/B", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid) < 0) TEST_ERROR
- if((gid = H5Gcreate(fid, "A/B/C", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid, "A/B/C", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid) < 0) TEST_ERROR
/* Close file */
@@ -1776,7 +1776,7 @@ external_link_path(hid_t fapl, hbool_t new_format)
if(HDstrcmp(objname, "/A/B/C")) TEST_ERROR
/* Create object in external file */
- if((gid2 = H5Gcreate(gid, "new_group", (size_t)0)) < 0) TEST_ERROR
+ if((gid2 = H5Gcreate2(gid, "new_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Close group in external file */
if(H5Gclose(gid2) < 0) TEST_ERROR
@@ -1862,13 +1862,13 @@ external_link_mult(hid_t fapl, hbool_t new_format)
if((fid=H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR
/* Create object down a path */
- if((gid = H5Gcreate(fid, "A", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid, "A", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid) < 0) TEST_ERROR
- if((gid = H5Gcreate(fid, "A/B", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid, "A/B", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid) < 0) TEST_ERROR
- if((gid = H5Gcreate(fid, "A/B/C", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid, "A/B/C", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid) < 0) TEST_ERROR
/* Close file */
@@ -1878,10 +1878,10 @@ external_link_mult(hid_t fapl, hbool_t new_format)
if((fid=H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR
/* Create external link down a path */
- if((gid = H5Gcreate(fid, "D", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid, "D", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid) < 0) TEST_ERROR
- if((gid = H5Gcreate(fid, "D/E", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid, "D/E", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Create external link to object in first file */
if(H5Lcreate_external(filename1, "/A/B/C", gid, "F", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -1895,10 +1895,10 @@ external_link_mult(hid_t fapl, hbool_t new_format)
if((fid=H5Fcreate(filename3, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR
/* Create external link down a path */
- if((gid = H5Gcreate(fid, "G", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid, "G", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid) < 0) TEST_ERROR
- if((gid = H5Gcreate(fid, "G/H", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid, "G/H", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Create external link to object in second file */
if(H5Lcreate_external(filename2, "/D/E/F", gid, "I", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -1923,7 +1923,7 @@ external_link_mult(hid_t fapl, hbool_t new_format)
if(HDstrcmp(objname, "/A/B/C")) TEST_ERROR
/* Create object in external file */
- if((gid2 = H5Gcreate(gid, "new_group", (size_t)0)) < 0) TEST_ERROR
+ if((gid2 = H5Gcreate2(gid, "new_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Close group in external file */
if(H5Gclose(gid2) < 0) TEST_ERROR
@@ -2047,7 +2047,7 @@ external_link_self(hid_t fapl, hbool_t new_format)
if(HDstrcmp(objname, "/X")) TEST_ERROR
/* Create object through external link */
- if((gid2 = H5Gcreate(gid, "new_group", (size_t)0)) < 0) TEST_ERROR
+ if((gid2 = H5Gcreate2(gid, "new_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Close created group */
if(H5Gclose(gid2) < 0) TEST_ERROR
@@ -2083,7 +2083,7 @@ external_link_self(hid_t fapl, hbool_t new_format)
/* Create file3 as a target */
if((fid=H5Fcreate(filename3, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR
- if((gid=H5Gcreate(fid, "end", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid, "end", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid) < 0) TEST_ERROR
if(H5Fclose(fid) < 0) TEST_ERROR
@@ -2102,7 +2102,7 @@ external_link_self(hid_t fapl, hbool_t new_format)
if((gid=H5Gopen(fid, "ext_link/B/C/Y/Z/end")) < 0) TEST_ERROR
/* Create object through external link */
- if((gid2 = H5Gcreate(gid, "newer_group", (size_t)0)) < 0) TEST_ERROR
+ if((gid2 = H5Gcreate2(gid, "newer_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Cleanup */
if(H5Gclose(gid2) < 0) TEST_ERROR
@@ -2184,7 +2184,7 @@ external_link_pingpong(hid_t fapl, hbool_t new_format)
if(H5Lcreate_external(filename2, "/link6", fid, "link5", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
/* Create final object */
- if((gid = H5Gcreate(fid, "final", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid, "final", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid) < 0) TEST_ERROR
/* Close file */
@@ -2213,7 +2213,7 @@ external_link_pingpong(hid_t fapl, hbool_t new_format)
if(HDstrcmp(objname, "/final")) TEST_ERROR
/* Create object in external file */
- if((gid2 = H5Gcreate(gid, "new_group", (size_t)0)) < 0) TEST_ERROR
+ if((gid2 = H5Gcreate2(gid, "new_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Close group in external file */
if(H5Gclose(gid2) < 0) TEST_ERROR
@@ -2348,7 +2348,7 @@ external_link_toomany(hid_t fapl, hbool_t new_format)
if(H5Lcreate_external(filename1, "/link17", fid, "link16", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
/* Create final object */
- if((gid = H5Gcreate(fid, "final", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid, "final", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid) < 0) TEST_ERROR
/* Close file */
@@ -2376,7 +2376,7 @@ external_link_toomany(hid_t fapl, hbool_t new_format)
if(HDstrcmp(objname, "/final")) TEST_ERROR
/* Create object in external file */
- if((gid2 = H5Gcreate(gid, "new_group", (size_t)0)) < 0) TEST_ERROR
+ if((gid2 = H5Gcreate2(gid, "new_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Close group in external file */
if(H5Gclose(gid2) < 0) TEST_ERROR
@@ -2620,7 +2620,7 @@ external_link_query(hid_t fapl, hbool_t new_format)
if((fid=H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR
/* Create object to link to */
- if((gid = H5Gcreate(fid, "dst", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid, "dst", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid) < 0) TEST_ERROR
/* Close file */
@@ -2732,7 +2732,7 @@ external_link_unlink_compact(hid_t fapl, hbool_t new_format)
if((fid = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR
/* Create object to link to */
- if((gid = H5Gcreate(fid, "dst", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid, "dst", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid) < 0) TEST_ERROR
/* Close file */
@@ -2837,7 +2837,7 @@ external_link_unlink_dense(hid_t fapl, hbool_t new_format)
/* Create enough objects in the root group to change it into a "dense" group */
for(u = 0; u < max_compact; u++) {
sprintf(objname, "filler %u", u);
- if((gid2 = H5Gcreate(gid, objname, (size_t)0)) < 0) TEST_ERROR
+ if((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid2) < 0) TEST_ERROR
} /* end for */
@@ -2859,7 +2859,7 @@ external_link_unlink_dense(hid_t fapl, hbool_t new_format)
if((fid = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR
/* Create object to link to */
- if((gid = H5Gcreate(fid, "dst", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid, "dst", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid) < 0) TEST_ERROR
/* Close file */
@@ -2966,7 +2966,7 @@ external_link_move(hid_t fapl, hbool_t new_format)
if((fid = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR
/* Create object to link to */
- if((gid = H5Gcreate(fid, "dst", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid, "dst", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid) < 0) TEST_ERROR
/* Close file */
@@ -2989,7 +2989,7 @@ external_link_move(hid_t fapl, hbool_t new_format)
if(HDstrcmp(objname, "/dst")) TEST_ERROR
/* Create object in external file */
- if((gid2 = H5Gcreate(gid, "new_group", (size_t)0)) < 0) TEST_ERROR
+ if((gid2 = H5Gcreate2(gid, "new_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Close group in external file */
if(H5Gclose(gid2) < 0) TEST_ERROR
@@ -3018,7 +3018,7 @@ external_link_move(hid_t fapl, hbool_t new_format)
if((fid = H5Fopen(filename1, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR
/* Create another group, to move the external link into */
- if((gid = H5Gcreate(fid, "group2", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid, "group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Move external link to different group */
if(H5Gmove2(fid, "src2", gid, "src3") < 0) TEST_ERROR
@@ -3034,7 +3034,7 @@ external_link_move(hid_t fapl, hbool_t new_format)
if(HDstrcmp(objname, "/dst")) TEST_ERROR
/* Create object in external file */
- if((gid2 = H5Gcreate(gid, "new_group2", (size_t)0)) < 0) TEST_ERROR
+ if((gid2 = H5Gcreate2(gid, "new_group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Close group in external file */
if(H5Gclose(gid2) < 0) TEST_ERROR
@@ -3077,7 +3077,7 @@ external_link_move(hid_t fapl, hbool_t new_format)
if(HDstrcmp(objname, "/dst")) TEST_ERROR
/* Create object in external file */
- if((gid2 = H5Gcreate(gid, "new_group3", (size_t)0)) < 0) TEST_ERROR
+ if((gid2 = H5Gcreate2(gid, "new_group3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Close group in external file */
if(H5Gclose(gid2) < 0) TEST_ERROR
@@ -3167,7 +3167,7 @@ external_link_ride(hid_t fapl, hbool_t new_format)
/* Create enough objects in the root group to change it into a "dense" group */
for(u = 0; u < (max_compact + 1); u++) {
sprintf(objname, "filler %u", u);
- if((gid2 = H5Gcreate(gid, objname, (size_t)0)) < 0) TEST_ERROR
+ if((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid2) < 0) TEST_ERROR
} /* end for */
@@ -3203,7 +3203,7 @@ external_link_ride(hid_t fapl, hbool_t new_format)
if((fid = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR
/* Create object to link to */
- if((gid = H5Gcreate(fid, "dst", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid, "dst", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid) < 0) TEST_ERROR
/* Close file */
@@ -3222,7 +3222,7 @@ external_link_ride(hid_t fapl, hbool_t new_format)
if(HDstrcmp(objname, "/dst")) TEST_ERROR
/* Create object in external file */
- if((gid2 = H5Gcreate(gid, "new_group", (size_t)0)) < 0) TEST_ERROR
+ if((gid2 = H5Gcreate2(gid, "new_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Close group in external file */
if(H5Gclose(gid2) < 0) TEST_ERROR
@@ -3257,7 +3257,7 @@ external_link_ride(hid_t fapl, hbool_t new_format)
if(HDstrcmp(objname, "/dst")) TEST_ERROR
/* Create object in external file */
- if((gid2 = H5Gcreate(gid, "new_group2", (size_t)0)) < 0) TEST_ERROR
+ if((gid2 = H5Gcreate2(gid, "new_group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Close group in external file */
if(H5Gclose(gid2) < 0) TEST_ERROR
@@ -3373,7 +3373,7 @@ external_link_closing(hid_t fapl, hbool_t new_format)
if(H5Fclose(fid2) < 0) TEST_ERROR
/* Test creating each kind of object */
- if((gid = H5Gcreate(fid1, "elink/elink/elink/group1", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid1, "elink/elink/elink/group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Tcommit(fid1, "elink/elink/elink/type1", tid) < 0) TEST_ERROR
if((did = H5Dcreate(fid1, "elink/elink/elink/dataset1", tid2, sid, H5P_DEFAULT)) < 0) TEST_ERROR
/* Close objects */
@@ -3435,7 +3435,7 @@ external_link_closing(hid_t fapl, hbool_t new_format)
if(H5Dclose(did) < 0) TEST_ERROR
/* Test H5Fmount */
- if((gid = H5Gcreate(fid1, "elink/elink/elink/mnt", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid1, "elink/elink/elink/mnt", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid) < 0) TEST_ERROR
H5E_BEGIN_TRY {
if(H5Fmount(fid1, "elink/elink/elink/mnt", fid1, H5P_DEFAULT) >= 0) TEST_ERROR
@@ -3462,15 +3462,15 @@ external_link_closing(hid_t fapl, hbool_t new_format)
if(H5Fclose(fid2) < 0) TEST_ERROR
/* Do an external link traversal that recursively calls another external link. */
- if((gid = H5Gcreate(fid1, "elink/elink2/group2", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid1, "elink/elink2/group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid) < 0) TEST_ERROR
/* Create two more groups so that the last three elements in the path are
* all within the same external file
*/
- if((gid = H5Gcreate(fid1, "elink/elink2/group2/group3", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid1, "elink/elink2/group2/group3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid) < 0) TEST_ERROR
- if((gid = H5Gcreate(fid1, "elink/elink2/group2/group3/group4", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid1, "elink/elink2/group2/group3/group4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid) < 0) TEST_ERROR
if(H5Gget_objinfo(fid1, "elink/elink2/group2/group3/group4", TRUE, &sb) < 0) TEST_ERROR
@@ -3484,12 +3484,12 @@ external_link_closing(hid_t fapl, hbool_t new_format)
* slink points to (file2)/elink2, which points to (file3)/elink, which
* points to file 4.
*/
- if((gid = H5Gcreate(fid1, "elink/file2group1/file2group2/slink/group3", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid1, "elink/file2group1/file2group2/slink/group3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid) < 0) TEST_ERROR
if(H5Lget_info(fid1, "elink/file2group1/file2group2/slink/group3", &li, H5P_DEFAULT) < 0) TEST_ERROR
/* Some simpler tests */
- if((gid = H5Gcreate(fid1, "elink/file2group3", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid1, "elink/file2group3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid) < 0) TEST_ERROR
if(H5Lget_info(fid1, "elink/file2group3", &li, H5P_DEFAULT) < 0) TEST_ERROR
if(H5Lget_info(fid1, "elink/elink", &li, H5P_DEFAULT) < 0) TEST_ERROR
@@ -3664,19 +3664,19 @@ external_link_strong(hid_t fapl, hbool_t new_format)
/* Create a group at /A/B/C in first file */
if((fid1 = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, my_fapl)) < 0) TEST_ERROR
- if((gid1 = H5Gcreate(fid1, "A", (size_t)0)) < 0) TEST_ERROR
+ if((gid1 = H5Gcreate2(fid1, "A", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid1) < 0) TEST_ERROR
- if((gid1 = H5Gcreate(fid1, "A/B", (size_t)0)) < 0) TEST_ERROR
+ if((gid1 = H5Gcreate2(fid1, "A/B", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid1) < 0) TEST_ERROR
- if((gid1 = H5Gcreate(fid1, "A/B/C", (size_t)0)) < 0) TEST_ERROR
+ if((gid1 = H5Gcreate2(fid1, "A/B/C", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid1) < 0) TEST_ERROR
if(H5Fclose(fid1) < 0) TEST_ERROR
/* Create an external link /W/X/DLINK in second file to <filename1>:/A/B/C */
if((fid2 = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR
- if((gid2 = H5Gcreate(fid2, "/W", (size_t)0)) < 0) TEST_ERROR
+ if((gid2 = H5Gcreate2(fid2, "/W", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid2) < 0) TEST_ERROR
- if((gid2 = H5Gcreate(fid2, "/W/X", (size_t)0)) < 0) TEST_ERROR
+ if((gid2 = H5Gcreate2(fid2, "/W/X", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Lcreate_external(filename1, "/A/B/C", gid2, "DLINK", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
if(H5Gclose(gid2) < 0) TEST_ERROR
if(H5Fclose(fid2) < 0) TEST_ERROR
@@ -3892,7 +3892,7 @@ ud_hard_links(hid_t fapl)
if(H5Lis_registered(UD_HARD_TYPE) != TRUE) TEST_ERROR
/* Create a group for the UD hard link to point to */
- if((gid = H5Gcreate(fid, "group", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Get address for the group to give to the hard link */
if(H5Lget_info(fid, "group", &li, H5P_DEFAULT) < 0) TEST_ERROR
@@ -3916,7 +3916,7 @@ ud_hard_links(hid_t fapl)
if(HDstrcmp(objname, "/group")) TEST_ERROR
/* Create object in group */
- if((gid2 = H5Gcreate(gid, "new_group", (size_t)0)) < 0) TEST_ERROR
+ if((gid2 = H5Gcreate2(gid, "new_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Close groups*/
if(H5Gclose(gid2) < 0) TEST_ERROR
@@ -4057,7 +4057,7 @@ ud_link_reregister(hid_t fapl)
if(H5Lis_registered(UD_HARD_TYPE) != TRUE) TEST_ERROR
/* Point a UD defined hard link to a group in the same way as the previous test */
- if((gid = H5Gcreate(fid, "group", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if (H5Lget_info(fid, "group", &li, H5P_DEFAULT) < 0) TEST_ERROR
if(H5Gclose(gid) < 0) TEST_ERROR
@@ -4066,7 +4066,7 @@ ud_link_reregister(hid_t fapl)
TEST_ERROR
/* Create a group named REREG_TARGET_NAME in the same group as the ud link */
- if((gid = H5Gcreate(fid, REREG_TARGET_NAME, (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid, REREG_TARGET_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid) < 0) TEST_ERROR
/* Now unregister UD hard links */
@@ -4103,7 +4103,7 @@ ud_link_reregister(hid_t fapl)
if(HDstrcmp(objname, "/" REREG_TARGET_NAME)) TEST_ERROR
/* Create object in group */
- if((gid2 = H5Gcreate(gid, "new_group", (size_t)0)) < 0) TEST_ERROR
+ if((gid2 = H5Gcreate2(gid, "new_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Close groups*/
if(H5Gclose(gid2) < 0) TEST_ERROR
@@ -4339,7 +4339,7 @@ ud_callbacks(hid_t fapl, hbool_t new_format)
if(H5Lis_registered(UD_CB_TYPE) != TRUE) TEST_ERROR
/* Create a group for the UD link to point to */
- if((gid = H5Gcreate(fid, UD_CB_TARGET, (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid, UD_CB_TARGET, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Create a user-defined link to the group. These UD links behave like soft links. */
if(H5Lcreate_ud(fid, UD_CB_LINK_NAME, UD_CB_TYPE, ud_target_name, (size_t)UD_CB_TARGET_LEN, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -4506,9 +4506,9 @@ lapl_udata(hid_t fapl, hbool_t new_format)
if(H5Lunregister(UD_CB_TYPE) < 0) TEST_ERROR
/* Create two groups for the UD link to point to */
- if((gid = H5Gcreate(fid, "group_a", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid, "group_a", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid) < 0) TEST_ERROR
- if((gid = H5Gcreate(fid, "group_b", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid, "group_b", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid) < 0) TEST_ERROR
/* Create a user-defined link to the group. These UD links have no udata. */
@@ -4525,7 +4525,7 @@ lapl_udata(hid_t fapl, hbool_t new_format)
/* Try opening group through UD link */
if((gid = H5Oopen(fid, "ud_link", plist_id)) < 0) TEST_ERROR
- if((gid2 = H5Gcreate(gid, "subgroup_a", (size_t)0)) < 0) TEST_ERROR
+ if((gid2 = H5Gcreate2(gid, "subgroup_a", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid2) < 0) TEST_ERROR
if(H5Gclose(gid) < 0) TEST_ERROR
@@ -4539,7 +4539,7 @@ lapl_udata(hid_t fapl, hbool_t new_format)
/* Create a subgroup */
if((gid = H5Oopen(fid, "ud_link", plist_id)) < 0) TEST_ERROR
- if((gid2 = H5Gcreate(gid, "subgroup_b", (size_t)0)) < 0) TEST_ERROR
+ if((gid2 = H5Gcreate2(gid, "subgroup_b", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid2) < 0) TEST_ERROR
if(H5Gclose(gid) < 0) TEST_ERROR
@@ -4806,7 +4806,7 @@ ud_link_errors(hid_t fapl, hbool_t new_format)
if(H5Lregister(UD_cbfail_class1) < 0) TEST_ERROR
/* Create a group for the UD link to point to */
- if((gid = H5Gcreate(fid, "group", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid) < 0) TEST_ERROR
/* Create a user-defined link to the group. */
@@ -4928,7 +4928,7 @@ lapl_nlinks(hid_t fapl, hbool_t new_format)
if((fid=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR
/* Create group with short name in file (used as target for links) */
- if((gid=H5Gcreate (fid, "final", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid, "final", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Create chain of soft links to existing object (limited) */
if(H5Glink2(fid, "final", H5G_LINK_SOFT, fid, "soft1") < 0) TEST_ERROR
@@ -4976,7 +4976,7 @@ lapl_nlinks(hid_t fapl, hbool_t new_format)
if(HDstrcmp(objname, "/soft17")) TEST_ERROR
/* Create group using soft link */
- if((gid2 = H5Gcreate(gid, "new_soft", (size_t)0)) < 0) TEST_ERROR
+ if((gid2 = H5Gcreate2(gid, "new_soft", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Close groups */
if(H5Gclose(gid2) < 0) TEST_ERROR
@@ -5167,7 +5167,7 @@ linkinfo(hid_t fapl, hbool_t new_format)
/* Create an object of each type */
if((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) TEST_ERROR
if(H5Tcommit(fid, "datatype", tid) < 0) TEST_ERROR
- if((gid = H5Gcreate(fid, "group", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Glink(fid, H5G_LINK_SOFT, "group", "softlink") < 0) TEST_ERROR
if((sid = H5Screate(H5S_SCALAR)) < 0) TEST_ERROR
@@ -5429,7 +5429,7 @@ corder_create_compact(hid_t fapl)
/* Create several links, but keep group in compact form */
for(u = 0; u < max_compact; u++) {
sprintf(objname, "filler %u", u);
- if((group_id2 = H5Gcreate(group_id, objname, (size_t)0)) < 0) TEST_ERROR
+ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(group_id2) < 0) TEST_ERROR
/* Verify state of group */
@@ -5549,7 +5549,7 @@ corder_create_dense(hid_t fapl)
/* Create several links, up to limit of compact form */
for(u = 0; u < max_compact; u++) {
sprintf(objname, "filler %u", u);
- if((group_id2 = H5Gcreate(group_id, objname, (size_t)0)) < 0) TEST_ERROR
+ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(group_id2) < 0) TEST_ERROR
/* Verify state of group */
@@ -5561,7 +5561,7 @@ corder_create_dense(hid_t fapl)
/* Create another link, to push group into dense form */
sprintf(objname, "filler %u", max_compact);
- if((group_id2 = H5Gcreate(group_id, objname, (size_t)0)) < 0) TEST_ERROR
+ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(group_id2) < 0) TEST_ERROR
/* Verify state of group */
@@ -5703,13 +5703,13 @@ corder_transition(hid_t fapl)
/* Create several links, up to limit of compact form */
for(u = 0; u < max_compact; u++) {
sprintf(objname, "filler %u", u);
- if((group_id2 = H5Gcreate(group_id, objname, (size_t)0)) < 0) TEST_ERROR
+ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(group_id2) < 0) TEST_ERROR
} /* end for */
/* Create another link, to push group into dense form */
sprintf(objname, "filler %u", max_compact);
- if((group_id2 = H5Gcreate(group_id, objname, (size_t)0)) < 0) TEST_ERROR
+ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(group_id2) < 0) TEST_ERROR
/* Verify state of group */
@@ -5749,7 +5749,7 @@ corder_transition(hid_t fapl)
/* Re-add links to get back into dense form */
for(u = (min_dense - 1); u < (max_compact + 1); u++) {
sprintf(objname, "filler %u", u);
- if((group_id2 = H5Gcreate(group_id, objname, (size_t)0)) < 0) TEST_ERROR
+ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(group_id2) < 0) TEST_ERROR
} /* end for */
@@ -5812,7 +5812,7 @@ corder_transition(hid_t fapl)
/* Re-add links to get back into dense form */
for(u = (min_dense - 1); u < (max_compact + 1); u++) {
sprintf(objname, "filler %u", u);
- if((group_id2 = H5Gcreate(group_id, objname, (size_t)0)) < 0) TEST_ERROR
+ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(group_id2) < 0) TEST_ERROR
} /* end for */
@@ -5929,7 +5929,7 @@ corder_delete(hid_t fapl)
/* Create links until the group is in dense form */
for(u = 0; u < max_compact * 2; u++) {
sprintf(objname, "filler %u", u);
- if((group_id2 = H5Gcreate(group_id, objname, (size_t)0)) < 0) FAIL_STACK_ERROR
+ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
if(H5Gclose(group_id2) < 0) FAIL_STACK_ERROR
} /* end for */
@@ -6227,7 +6227,7 @@ link_info_by_idx(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Create hard link, with group object */
- if((group_id2 = H5Gcreate(group_id, objname, (size_t)0)) < 0) TEST_ERROR
+ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(group_id2) < 0) TEST_ERROR
} /* end if */
else {
@@ -6269,7 +6269,7 @@ link_info_by_idx(hid_t fapl)
hid_t group_id2; /* Group ID */
/* Create hard link, with group object */
- if((group_id2 = H5Gcreate(group_id, objname, (size_t)0)) < 0) TEST_ERROR
+ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(group_id2) < 0) TEST_ERROR
} /* end if */
else {
@@ -6368,7 +6368,7 @@ link_info_by_idx_old(hid_t fapl)
if((file_id = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR
/* Create group to operate on */
- if((group_id = H5Gcreate(file_id, CORDER_GROUP_NAME, (size_t)0)) < 0) TEST_ERROR
+ if((group_id = H5Gcreate2(file_id, CORDER_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Create several links */
for(u = 0; u < CORDER_NLINKS; u++) {
@@ -6380,7 +6380,7 @@ link_info_by_idx_old(hid_t fapl)
H5G_stat_t sb; /* Buffer for querying object's info */
/* Create group */
- if((group_id2 = H5Gcreate(group_id, objname, (size_t)0)) < 0) TEST_ERROR
+ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Retrieve group's address on disk */
if(H5Gget_objinfo(group_id2, ".", FALSE, &sb) < 0) TEST_ERROR
@@ -6598,7 +6598,7 @@ delete_by_idx(hid_t fapl)
sprintf(objname, "filler %02u", u);
/* Create hard link, with group object */
- if((group_id2 = H5Gcreate(group_id, objname, (size_t)0)) < 0) TEST_ERROR
+ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(group_id2) < 0) TEST_ERROR
/* Verify link information for new link */
@@ -6653,7 +6653,7 @@ delete_by_idx(hid_t fapl)
sprintf(objname, "filler %02u", u);
/* Create hard link, with group object */
- if((group_id2 = H5Gcreate(group_id, objname, (size_t)0)) < 0) TEST_ERROR
+ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(group_id2) < 0) TEST_ERROR
/* Verify state of group (dense) */
@@ -6720,7 +6720,7 @@ delete_by_idx(hid_t fapl)
sprintf(objname, "filler %02u", u);
/* Create hard link, with group object */
- if((group_id2 = H5Gcreate(group_id, objname, (size_t)0)) < 0) TEST_ERROR
+ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(group_id2) < 0) TEST_ERROR
/* Verify state of group (dense) */
@@ -6857,7 +6857,7 @@ delete_by_idx_old(hid_t fapl)
if((file_id = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR
/* Create group to operate on */
- if((group_id = H5Gcreate(file_id, CORDER_GROUP_NAME, (size_t)0)) < 0) TEST_ERROR
+ if((group_id = H5Gcreate2(file_id, CORDER_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Delete links from one end */
@@ -6877,7 +6877,7 @@ delete_by_idx_old(hid_t fapl)
sprintf(objname, "filler %02u", u);
/* Create group */
- if((group_id2 = H5Gcreate(group_id, objname, (size_t)0)) < 0) TEST_ERROR
+ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Retrieve group's address on disk */
if(H5Gget_objinfo(group_id2, ".", FALSE, &sb) < 0) TEST_ERROR
@@ -6954,7 +6954,7 @@ delete_by_idx_old(hid_t fapl)
sprintf(objname, "filler %02u", u);
/* Create group */
- if((group_id2 = H5Gcreate(group_id, objname, (size_t)0)) < 0) TEST_ERROR
+ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Retrieve group's address on disk */
if(H5Gget_objinfo(group_id2, ".", FALSE, &sb) < 0) TEST_ERROR
@@ -7445,7 +7445,7 @@ link_iterate(hid_t fapl)
sprintf(objname, "filler %02u", u);
/* Create hard link, with group object */
- if((group_id2 = H5Gcreate(group_id, objname, (size_t)0)) < 0) TEST_ERROR
+ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(group_id2) < 0) TEST_ERROR
} /* end for */
@@ -7471,7 +7471,7 @@ link_iterate(hid_t fapl)
sprintf(objname, "filler %02u", u);
/* Create hard link, with group object */
- if((group_id2 = H5Gcreate(group_id, objname, (size_t)0)) < 0) TEST_ERROR
+ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(group_id2) < 0) TEST_ERROR
} /* end for */
@@ -7826,7 +7826,7 @@ link_iterate_old(hid_t fapl)
if((file_id = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR
/* Create group with creation order tracking on */
- if((group_id = H5Gcreate(file_id, CORDER_GROUP_NAME, (size_t)0)) < 0) TEST_ERROR
+ if((group_id = H5Gcreate2(file_id, CORDER_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Check for iteration on empty group */
@@ -7841,7 +7841,7 @@ link_iterate_old(hid_t fapl)
sprintf(objname, "filler %02u", u);
/* Create hard link, with group object */
- if((group_id2 = H5Gcreate(group_id, objname, (size_t)0)) < 0) TEST_ERROR
+ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(group_id2) < 0) TEST_ERROR
} /* end for */
@@ -8142,7 +8142,7 @@ open_by_idx(hid_t fapl)
sprintf(objname, "filler %02u", u);
/* Create hard link, with group object */
- if((group_id2 = H5Gcreate(group_id, objname, (size_t)0)) < 0) TEST_ERROR
+ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Retrieve group's address on disk */
if(H5Gget_objinfo(group_id2, ".", FALSE, &sb) < 0) TEST_ERROR
@@ -8181,7 +8181,7 @@ open_by_idx(hid_t fapl)
sprintf(objname, "filler %02u", u);
/* Create hard link, with group object */
- if((group_id2 = H5Gcreate(group_id, objname, (size_t)0)) < 0) TEST_ERROR
+ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Retrieve group's address on disk */
if(H5Gget_objinfo(group_id2, ".", FALSE, &sb) < 0) TEST_ERROR
@@ -8327,7 +8327,7 @@ open_by_idx_old(hid_t fapl)
sprintf(objname, "filler %02u", u);
/* Create hard link, with group object */
- if((group_id2 = H5Gcreate(group_id, objname, (size_t)0)) < 0) TEST_ERROR
+ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Retrieve group's address on disk */
if(H5Gget_objinfo(group_id2, ".", FALSE, &sb) < 0) TEST_ERROR
@@ -8595,7 +8595,7 @@ object_info(hid_t fapl)
sprintf(objname, "filler %02u", u);
/* Create hard link, with group object */
- if((group_id2 = H5Gcreate(group_id, objname, (size_t)0)) < 0) TEST_ERROR
+ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Retrieve group's address on disk */
if(H5Oget_info(group_id2, ".", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR
@@ -8643,7 +8643,7 @@ object_info(hid_t fapl)
sprintf(objname, "filler %02u", u);
/* Create hard link, with group object */
- if((group_id2 = H5Gcreate(group_id, objname, (size_t)0)) < 0) TEST_ERROR
+ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Retrieve group's address on disk */
if(H5Oget_info(group_id2, ".", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR
@@ -8792,7 +8792,7 @@ object_info_old(hid_t fapl)
sprintf(objname, "filler %02u", u);
/* Create hard link, with group object */
- if((group_id2 = H5Gcreate(group_id, objname, (size_t)0)) < 0) TEST_ERROR
+ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Retrieve group's address on disk */
if(H5Oget_info(group_id2, ".", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR
@@ -8999,7 +8999,7 @@ group_info(hid_t fapl)
sprintf(objname2, "filler %02u", v);
/* Create hard link, with group object */
- if((group_id3 = H5Gcreate(group_id2, objname2, (size_t)0)) < 0) TEST_ERROR
+ if((group_id3 = H5Gcreate2(group_id2, objname2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Close group created */
if(H5Gclose(group_id3) < 0) TEST_ERROR
@@ -9088,7 +9088,7 @@ group_info(hid_t fapl)
sprintf(objname2, "filler %02u", v);
/* Create hard link, with group object */
- if((group_id3 = H5Gcreate(group_id2, objname2, (size_t)0)) < 0) TEST_ERROR
+ if((group_id3 = H5Gcreate2(group_id2, objname2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Close group created */
if(H5Gclose(group_id3) < 0) TEST_ERROR
@@ -9250,7 +9250,7 @@ group_info_old(hid_t fapl)
sprintf(objname, "filler %02u", u);
/* Create hard link, with group object */
- if((group_id2 = H5Gcreate(group_id, objname, (size_t)0)) < 0) TEST_ERROR
+ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Retrieve group's information */
if(H5Gget_info(group_id2, ".", &grp_info, H5P_DEFAULT) < 0) TEST_ERROR
@@ -9266,7 +9266,7 @@ group_info_old(hid_t fapl)
sprintf(objname2, "filler %02u", v);
/* Create hard link, with group object */
- if((group_id3 = H5Gcreate(group_id2, objname2, (size_t)0)) < 0) TEST_ERROR
+ if((group_id3 = H5Gcreate2(group_id2, objname2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Close group created */
if(H5Gclose(group_id3) < 0) TEST_ERROR
diff --git a/test/mount.c b/test/mount.c
index 6a8dc1e..11c769d 100644
--- a/test/mount.c
+++ b/test/mount.c
@@ -61,40 +61,37 @@ int bm[NX][NY], bm_out[NX][NY]; /* Data buffers */
static int
setup(hid_t fapl)
{
- hid_t file=-1;
+ hid_t file = -1;
char filename[1024];
/* file 1 */
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
- if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0)
- goto error;
- if (H5Gclose(H5Gcreate(file, "/mnt1", (size_t)0))<0) goto error;
- if (H5Gclose(H5Gcreate(file, "/mnt1/file1", (size_t)0))<0) goto error;
- if (H5Gclose(H5Gcreate(file, "/mnt_unlink", (size_t)0))<0) goto error;
- if (H5Gclose(H5Gcreate(file, "/mnt_move_a", (size_t)0))<0) goto error;
- if (H5Glink(file, H5L_TYPE_HARD, "/mnt1/file1", "/file1")<0) goto error;
- if (H5Glink(file, H5L_TYPE_HARD, "/mnt1", "/mnt1_link")<0) goto error;
- if (H5Fclose(file)<0) goto error;
+ if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR
+ if(H5Gclose(H5Gcreate2(file, "/mnt1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if(H5Gclose(H5Gcreate2(file, "/mnt1/file1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if(H5Gclose(H5Gcreate2(file, "/mnt_unlink", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if(H5Gclose(H5Gcreate2(file, "/mnt_move_a", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if(H5Glink(file, H5L_TYPE_HARD, "/mnt1/file1", "/file1") < 0) FAIL_STACK_ERROR
+ if(H5Glink(file, H5L_TYPE_HARD, "/mnt1", "/mnt1_link") < 0) FAIL_STACK_ERROR
+ if(H5Fclose(file) < 0) FAIL_STACK_ERROR
/* file 2 */
h5_fixname(FILENAME[1], fapl, filename, sizeof filename);
- if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0)
- goto error;
- if (H5Gclose(H5Gcreate(file, "/file2", (size_t)0))<0) goto error;
- if (H5Gclose(H5Gcreate(file, "/rename_a", (size_t)0))<0) goto error;
- if (H5Gclose(H5Gcreate(file, "/rename_b", (size_t)0))<0) goto error;
- if (H5Gclose(H5Gcreate(file, "/rename_a/x", (size_t)0))<0) goto error;
- if (H5Fclose(file)<0) goto error;
+ if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR
+ if(H5Gclose(H5Gcreate2(file, "/file2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if(H5Gclose(H5Gcreate2(file, "/rename_a", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if(H5Gclose(H5Gcreate2(file, "/rename_b", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if(H5Gclose(H5Gcreate2(file, "/rename_a/x", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if(H5Fclose(file) < 0) FAIL_STACK_ERROR
/* file 3 */
h5_fixname(FILENAME[2], fapl, filename, sizeof filename);
- if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0)
- goto error;
- if (H5Fclose(file)<0) goto error;
+ if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR
+ if(H5Fclose(file) < 0) FAIL_STACK_ERROR
return 0;
- error:
+error:
H5E_BEGIN_TRY {
H5Fclose(file);
} H5E_END_TRY;
@@ -1103,11 +1100,11 @@ test_mount_after_close(hid_t fapl)
*/
if((fid1 = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR
- if((gidA = H5Gcreate(fid1, "A", (size_t)0)) < 0)
+ if((gidA = H5Gcreate2(fid1, "A", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if((gidAB = H5Gcreate(gidA , "B", (size_t)0)) < 0)
+ if((gidAB = H5Gcreate2(gidA, "B", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if((gidABM = H5Gcreate(gidAB , "M", (size_t)0)) < 0) /* Mount point */
+ if((gidABM = H5Gcreate2(gidAB, "M", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) /* Mount point */
TEST_ERROR
if(H5Glink(gidAB, H5L_TYPE_SOFT, "./M/X/Y", "C") < 0) /* Soft link */
TEST_ERROR
@@ -1139,9 +1136,9 @@ test_mount_after_close(hid_t fapl)
if((sid = H5Screate_simple(RANK, dims, NULL)) < 0)
TEST_ERROR
- if((gidX = H5Gcreate(fid2, "/X", (size_t)0)) < 0)
+ if((gidX = H5Gcreate2(fid2, "/X", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if((gidXY = H5Gcreate(gidX, "Y", (size_t)0)) < 0)
+ if((gidXY = H5Gcreate2(gidX, "Y", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if((did = H5Dcreate(gidXY, "D", H5T_NATIVE_INT, sid, H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -1322,17 +1319,17 @@ test_mount_after_unmount(hid_t fapl)
/* Create first file and some groups in it. */
if((fid1 = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR
- if((gidA = H5Gcreate(fid1, "A", (size_t)0)) < 0)
+ if((gidA = H5Gcreate2(fid1, "A", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if((gidAM = H5Gcreate(gidA, "M", (size_t)0)) < 0)
+ if((gidAM = H5Gcreate2(gidA, "M", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidAM) < 0)
TEST_ERROR
if(H5Gclose(gidA) < 0)
TEST_ERROR
- if((gidB = H5Gcreate(fid1, "B", (size_t)0)) < 0)
+ if((gidB = H5Gcreate2(fid1, "B", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if((gidBM = H5Gcreate(gidB, "M", (size_t)0)) < 0)
+ if((gidBM = H5Gcreate2(gidB, "M", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidBM) < 0)
TEST_ERROR
@@ -1344,13 +1341,13 @@ test_mount_after_unmount(hid_t fapl)
/* Create second file and a group in it. */
if((fid2 = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR
- if((gidX = H5Gcreate(fid2, "/X", (size_t)0)) < 0)
+ if((gidX = H5Gcreate2(fid2, "/X", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if((gidXM = H5Gcreate(gidX, "M", (size_t)0)) < 0)
+ if((gidXM = H5Gcreate2(gidX, "M", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidXM) < 0)
TEST_ERROR
- if((gidXX = H5Gcreate(gidX, "X", (size_t)0)) < 0)
+ if((gidXX = H5Gcreate2(gidX, "X", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidXX) < 0)
TEST_ERROR
@@ -1362,7 +1359,7 @@ test_mount_after_unmount(hid_t fapl)
/* Create third file and a group in it. */
if((fid3 = H5Fcreate(filename3, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR
- if((gidY = H5Gcreate(fid3, "/Y", (size_t)0)) < 0)
+ if((gidY = H5Gcreate2(fid3, "/Y", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidY) < 0)
TEST_ERROR
@@ -1372,7 +1369,7 @@ test_mount_after_unmount(hid_t fapl)
/* Create fourth file and a group in it. */
if((fid4 = H5Fcreate(filename4, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR
- if((gidZ = H5Gcreate(fid4, "/Z", (size_t)0)) < 0)
+ if((gidZ = H5Gcreate2(fid4, "/Z", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidZ) < 0)
TEST_ERROR
@@ -1583,7 +1580,7 @@ test_missing_unmount(hid_t fapl)
if((fid1 = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if((gidA = H5Gcreate(fid1, "A", (size_t)0)) < 0)
+ if((gidA = H5Gcreate2(fid1, "A", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidA) < 0)
@@ -1597,7 +1594,7 @@ test_missing_unmount(hid_t fapl)
if((fid2 = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if((gidE = H5Gcreate(fid2, "E", (size_t)0)) < 0)
+ if((gidE = H5Gcreate2(fid2, "E", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidE) < 0)
@@ -1611,7 +1608,7 @@ test_missing_unmount(hid_t fapl)
if((fid3 = H5Fcreate(filename3, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if((gidM = H5Gcreate(fid3, "M", (size_t)0)) < 0)
+ if((gidM = H5Gcreate2(fid3, "M", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidM) < 0)
@@ -1737,7 +1734,7 @@ test_hold_open_file(hid_t fapl)
if((fid1 = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if((gidA = H5Gcreate(fid1, "A", (size_t)0)) < 0)
+ if((gidA = H5Gcreate2(fid1, "A", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidA) < 0)
@@ -1751,7 +1748,7 @@ test_hold_open_file(hid_t fapl)
if((fid2 = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if((gidM = H5Gcreate(fid2, "M", (size_t)0)) < 0)
+ if((gidM = H5Gcreate2(fid2, "M", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidM) < 0)
@@ -1870,7 +1867,7 @@ test_hold_open_group(hid_t fapl)
if((fid1 = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if((gidA = H5Gcreate(fid1, "A", (size_t)0)) < 0)
+ if((gidA = H5Gcreate2(fid1, "A", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidA) < 0)
@@ -1884,7 +1881,7 @@ test_hold_open_group(hid_t fapl)
if((fid2 = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if((gidM = H5Gcreate(fid2, "M", (size_t)0)) < 0)
+ if((gidM = H5Gcreate2(fid2, "M", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidM) < 0)
@@ -2031,7 +2028,7 @@ test_fcdegree_same(hid_t fapl)
if((fid1 = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if((gidA = H5Gcreate(fid1, "A", (size_t)0)) < 0)
+ if((gidA = H5Gcreate2(fid1, "A", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidA) < 0)
@@ -2045,7 +2042,7 @@ test_fcdegree_same(hid_t fapl)
if((fid2 = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if((gidM = H5Gcreate(fid2, "M", (size_t)0)) < 0)
+ if((gidM = H5Gcreate2(fid2, "M", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidM) < 0)
@@ -2176,7 +2173,7 @@ test_fcdegree_semi(hid_t fapl)
if((fid1 = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if((gidA = H5Gcreate(fid1, "A", (size_t)0)) < 0)
+ if((gidA = H5Gcreate2(fid1, "A", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidA) < 0)
@@ -2190,7 +2187,7 @@ test_fcdegree_semi(hid_t fapl)
if((fid2 = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if((gidM = H5Gcreate(fid2, "M", (size_t)0)) < 0)
+ if((gidM = H5Gcreate2(fid2, "M", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidM) < 0)
@@ -2318,7 +2315,7 @@ test_fcdegree_strong(hid_t fapl)
if((fid1 = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if((gidA = H5Gcreate(fid1, "A", (size_t)0)) < 0)
+ if((gidA = H5Gcreate2(fid1, "A", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidA) < 0)
@@ -2332,7 +2329,7 @@ test_fcdegree_strong(hid_t fapl)
if((fid2 = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if((gidM = H5Gcreate(fid2, "M", (size_t)0)) < 0)
+ if((gidM = H5Gcreate2(fid2, "M", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidM) < 0)
@@ -2461,7 +2458,7 @@ test_acc_perm(hid_t fapl)
if((fid1 = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if((gidA = H5Gcreate(fid1, "A", (size_t)0)) < 0)
+ if((gidA = H5Gcreate2(fid1, "A", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidA) < 0)
@@ -2475,7 +2472,7 @@ test_acc_perm(hid_t fapl)
if((fid2 = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if((gidM = H5Gcreate(fid2, "M", (size_t)0)) < 0)
+ if((gidM = H5Gcreate2(fid2, "M", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidM) < 0)
@@ -2529,24 +2526,24 @@ test_acc_perm(hid_t fapl)
/* Attempt to create objects in read only file (should fail) */
H5E_BEGIN_TRY {
- bad_id = H5Gcreate(gidAM, "Z", (size_t)0);
+ bad_id = H5Gcreate2(gidAM, "Z", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
} H5E_END_TRY;
if(bad_id >= 0)
TEST_ERROR
H5E_BEGIN_TRY {
- bad_id = H5Gcreate(fid1, "/A/L", (size_t)0);
+ bad_id = H5Gcreate2(fid1, "/A/L", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
} H5E_END_TRY;
if(bad_id >= 0)
TEST_ERROR
/* Attempt to create objects in read/write file (should succeed) */
- if((gidB = H5Gcreate(fid2, "/B", (size_t)0)) < 0)
+ if((gidB = H5Gcreate2(fid2, "/B", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidB) < 0)
TEST_ERROR
/* (Note that this object should get created in the "hidden" group for "A" in parent file) */
- if((gidC = H5Gcreate(gidA, "C", (size_t)0)) < 0)
+ if((gidC = H5Gcreate2(gidA, "C", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidC) < 0)
TEST_ERROR
@@ -2560,7 +2557,7 @@ test_acc_perm(hid_t fapl)
TEST_ERROR
/* Attempt to create objects in read/write file (should succeed) */
- if((gidAMZ = H5Gcreate(fid1, "/A/M/Z", (size_t)0)) < 0)
+ if((gidAMZ = H5Gcreate2(fid1, "/A/M/Z", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
/* Get and verify file name */
@@ -2576,7 +2573,7 @@ test_acc_perm(hid_t fapl)
/* Attempt to create objects in read only file again (should fail) */
H5E_BEGIN_TRY {
- bad_id = H5Gcreate(fid1, "/A/L", (size_t)0);
+ bad_id = H5Gcreate2(fid1, "/A/L", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
} H5E_END_TRY;
if(bad_id >= 0)
TEST_ERROR
@@ -2666,13 +2663,13 @@ test_mult_mount(hid_t fapl)
if((fid1 = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if((gidA = H5Gcreate(fid1, "A", (size_t)0)) < 0)
+ if((gidA = H5Gcreate2(fid1, "A", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidA) < 0)
TEST_ERROR
- if((gidB = H5Gcreate(fid1, "B", (size_t)0)) < 0)
+ if((gidB = H5Gcreate2(fid1, "B", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidB) < 0)
@@ -2686,13 +2683,13 @@ test_mult_mount(hid_t fapl)
if((fid2 = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if((gidM = H5Gcreate(fid2, "M", (size_t)0)) < 0)
+ if((gidM = H5Gcreate2(fid2, "M", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidM) < 0)
TEST_ERROR
- if((gidN = H5Gcreate(fid2, "N", (size_t)0)) < 0)
+ if((gidN = H5Gcreate2(fid2, "N", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidN) < 0)
@@ -2706,13 +2703,13 @@ test_mult_mount(hid_t fapl)
if((fid3 = H5Fcreate(filename3, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if((gidS = H5Gcreate(fid3, "S", (size_t)0)) < 0)
+ if((gidS = H5Gcreate2(fid3, "S", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidS) < 0)
TEST_ERROR
- if((gidT = H5Gcreate(fid3, "T", (size_t)0)) < 0)
+ if((gidT = H5Gcreate2(fid3, "T", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidT) < 0)
@@ -2770,7 +2767,7 @@ test_mult_mount(hid_t fapl)
TEST_ERROR
/* Create object in file #3 */
- if((gidU = H5Gcreate(gidAMT, "U", (size_t)0)) < 0)
+ if((gidU = H5Gcreate2(gidAMT, "U", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidU) < 0)
@@ -2894,7 +2891,7 @@ test_nested_survive(hid_t fapl)
if((fid1 = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if((gidA = H5Gcreate(fid1, "A", (size_t)0)) < 0)
+ if((gidA = H5Gcreate2(fid1, "A", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidA) < 0)
@@ -2908,7 +2905,7 @@ test_nested_survive(hid_t fapl)
if((fid2 = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if((gidM = H5Gcreate(fid2, "M", (size_t)0)) < 0)
+ if((gidM = H5Gcreate2(fid2, "M", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidM) < 0)
@@ -2922,7 +2919,7 @@ test_nested_survive(hid_t fapl)
if((fid3 = H5Fcreate(filename3, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if((gidS = H5Gcreate(fid3, "S", (size_t)0)) < 0)
+ if((gidS = H5Gcreate2(fid3, "S", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidS) < 0)
@@ -3104,7 +3101,7 @@ test_close_parent(hid_t fapl)
if((fid1 = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if((gidA = H5Gcreate(fid1, "A", (size_t)0)) < 0)
+ if((gidA = H5Gcreate2(fid1, "A", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidA) < 0)
@@ -3118,7 +3115,7 @@ test_close_parent(hid_t fapl)
if((fid2 = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if((gidM = H5Gcreate(fid2, "M", (size_t)0)) < 0)
+ if((gidM = H5Gcreate2(fid2, "M", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidM) < 0)
@@ -3295,12 +3292,12 @@ test_cut_graph(hid_t fapl)
if((fid1 = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if((gidA = H5Gcreate(fid1, "A", (size_t)0)) < 0)
+ if((gidA = H5Gcreate2(fid1, "A", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidA) < 0)
TEST_ERROR
- if((gidB = H5Gcreate(fid1, "B", (size_t)0)) < 0)
+ if((gidB = H5Gcreate2(fid1, "B", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidB) < 0)
TEST_ERROR
@@ -3313,12 +3310,12 @@ test_cut_graph(hid_t fapl)
if((fid2 = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if((gidD = H5Gcreate(fid2, "D", (size_t)0)) < 0)
+ if((gidD = H5Gcreate2(fid2, "D", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidD) < 0)
TEST_ERROR
- if((gidE = H5Gcreate(fid2, "E", (size_t)0)) < 0)
+ if((gidE = H5Gcreate2(fid2, "E", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidE) < 0)
TEST_ERROR
@@ -3331,12 +3328,12 @@ test_cut_graph(hid_t fapl)
if((fid3 = H5Fcreate(filename3, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if((gidH = H5Gcreate(fid3, "H", (size_t)0)) < 0)
+ if((gidH = H5Gcreate2(fid3, "H", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidH) < 0)
TEST_ERROR
- if((gidI = H5Gcreate(fid3, "I", (size_t)0)) < 0)
+ if((gidI = H5Gcreate2(fid3, "I", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidI) < 0)
TEST_ERROR
@@ -3348,7 +3345,7 @@ test_cut_graph(hid_t fapl)
if((fid4 = H5Fcreate(filename4, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if((gidK = H5Gcreate(fid4, "K", (size_t)0)) < 0)
+ if((gidK = H5Gcreate2(fid4, "K", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidK) < 0)
TEST_ERROR
@@ -3360,7 +3357,7 @@ test_cut_graph(hid_t fapl)
if((fid5 = H5Fcreate(filename5, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if((gidM = H5Gcreate(fid5, "M", (size_t)0)) < 0)
+ if((gidM = H5Gcreate2(fid5, "M", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidM) < 0)
TEST_ERROR
@@ -3372,7 +3369,7 @@ test_cut_graph(hid_t fapl)
if((fid6 = H5Fcreate(filename6, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if((gidO = H5Gcreate(fid6, "O", (size_t)0)) < 0)
+ if((gidO = H5Gcreate2(fid6, "O", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidO) < 0)
TEST_ERROR
@@ -3384,7 +3381,7 @@ test_cut_graph(hid_t fapl)
if((fid7 = H5Fcreate(filename7, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if((gidQ = H5Gcreate(fid7, "Q", (size_t)0)) < 0)
+ if((gidQ = H5Gcreate2(fid7, "Q", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidQ) < 0)
TEST_ERROR
@@ -3676,12 +3673,12 @@ test_symlink(hid_t fapl)
if((fid1 = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if((gidA = H5Gcreate(fid1, "A", (size_t)0)) < 0)
+ if((gidA = H5Gcreate2(fid1, "A", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidA) < 0)
TEST_ERROR
- if((gidB = H5Gcreate(fid1, "B", (size_t)0)) < 0)
+ if((gidB = H5Gcreate2(fid1, "B", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidB) < 0)
TEST_ERROR
@@ -3698,12 +3695,12 @@ test_symlink(hid_t fapl)
if((fid2 = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if((gidD = H5Gcreate(fid2, "D", (size_t)0)) < 0)
+ if((gidD = H5Gcreate2(fid2, "D", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidD) < 0)
TEST_ERROR
- if((gidE = H5Gcreate(fid2, "E", (size_t)0)) < 0)
+ if((gidE = H5Gcreate2(fid2, "E", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidE) < 0)
TEST_ERROR
@@ -3716,12 +3713,12 @@ test_symlink(hid_t fapl)
if((fid3 = H5Fcreate(filename3, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
- if((gidH = H5Gcreate(fid3, "H", (size_t)0)) < 0)
+ if((gidH = H5Gcreate2(fid3, "H", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidH) < 0)
TEST_ERROR
- if((gidI = H5Gcreate(fid3, "I", (size_t)0)) < 0)
+ if((gidI = H5Gcreate2(fid3, "I", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
if(H5Gclose(gidI) < 0)
TEST_ERROR
diff --git a/test/ntypes.c b/test/ntypes.c
index 097b032..a842ddb 100644
--- a/test/ntypes.c
+++ b/test/ntypes.c
@@ -1906,8 +1906,7 @@ test_refer_dtype(hid_t file)
TEST_ERROR;
/* Create a group */
- if((group=H5Gcreate(file,"Group1",(size_t)-1))<0)
- TEST_ERROR;
+ if((group = H5Gcreate2(file, "Group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Create a datatype to refer to */
if((tid1 = H5Tcreate (H5T_COMPOUND, sizeof(s1_t)))<0)
diff --git a/test/objcopy.c b/test/objcopy.c
index 105de75..32b0995 100755
--- a/test/objcopy.c
+++ b/test/objcopy.c
@@ -1464,7 +1464,7 @@ test_copy_named_datatype(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the datatype from SRC to DST */
if(H5Ocopy(fid_src, NAME_DATATYPE_SIMPLE, fid_dst, NAME_DATATYPE_SIMPLE, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -1557,7 +1557,7 @@ test_copy_named_datatype_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the datatype from SRC to DST */
if(H5Ocopy(fid_src, NAME_DATATYPE_VL, fid_dst, NAME_DATATYPE_VL, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -1656,7 +1656,7 @@ test_copy_named_datatype_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the datatype from SRC to DST */
if(H5Ocopy(fid_src, NAME_DATATYPE_VL_VL, fid_dst, NAME_DATATYPE_VL_VL, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -1773,7 +1773,7 @@ test_copy_dataset_simple(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_DATASET_SIMPLE, fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -1880,7 +1880,7 @@ test_copy_dataset_simple_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_DATASET_SIMPLE, fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -2010,7 +2010,7 @@ test_copy_dataset_compound(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_DATASET_COMPOUND, fid_dst, NAME_DATASET_COMPOUND, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -2138,7 +2138,7 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_DATASET_CHUNKED, fid_dst, NAME_DATASET_CHUNKED, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -2255,7 +2255,7 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_DATASET_CHUNKED, fid_dst, NAME_DATASET_CHUNKED, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -2393,7 +2393,7 @@ test_copy_dataset_chunked_sparse(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_DATASET_CHUNKED, fid_dst, NAME_DATASET_CHUNKED, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -2526,7 +2526,7 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_DATASET_CHUNKED, fid_dst, NAME_DATASET_CHUNKED, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -2654,7 +2654,7 @@ test_copy_dataset_compact(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_DATASET_COMPACT, fid_dst, NAME_DATASET_COMPACT, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -2781,7 +2781,7 @@ test_copy_dataset_external(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_DATASET_EXTERNAL, fid_dst, NAME_DATASET_EXTERNAL, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -2902,7 +2902,7 @@ test_copy_dataset_named_dtype(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_DATASET_NAMED_DTYPE, fid_dst, NAME_DATASET_NAMED_DTYPE, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -2989,7 +2989,7 @@ test_copy_dataset_named_dtype_hier(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR
/* Create group to place all objects in */
- if((gid = H5Gcreate(fid_src, NAME_GROUP_TOP, (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Set dataspace dimensions */
dim1d[0]=DIM_SIZE_1;
@@ -3039,7 +3039,7 @@ test_copy_dataset_named_dtype_hier(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_GROUP_TOP, fid_dst, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -3128,7 +3128,7 @@ test_copy_dataset_named_dtype_hier_outside(hid_t fcpl_src, hid_t fcpl_dst, hid_t
if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR
/* Create group to place all objects in */
- if((gid = H5Gcreate(fid_src, NAME_GROUP_TOP, (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Set dataspace dimensions */
dim1d[0]=DIM_SIZE_1;
@@ -3178,7 +3178,7 @@ test_copy_dataset_named_dtype_hier_outside(hid_t fcpl_src, hid_t fcpl_dst, hid_t
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_GROUP_TOP, fid_dst, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -3266,7 +3266,7 @@ test_copy_dataset_multi_ohdr_chunks(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR
/* Create group to place all objects in */
- if((gid = H5Gcreate(fid_src, NAME_GROUP_TOP, (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Set dataspace dimensions */
dim1d[0]=DIM_SIZE_1;
@@ -3312,7 +3312,7 @@ test_copy_dataset_multi_ohdr_chunks(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_GROUP_TOP, fid_dst, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -3400,7 +3400,7 @@ test_copy_dataset_attr_named_dtype(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR
/* Create group to place all objects in */
- if((gid = H5Gcreate(fid_src, NAME_GROUP_TOP, (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Set dataspace dimensions */
dim1d[0]=DIM_SIZE_1;
@@ -3453,7 +3453,7 @@ test_copy_dataset_attr_named_dtype(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_GROUP_TOP, fid_dst, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -3573,7 +3573,7 @@ test_copy_dataset_contig_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_DATASET_VL, fid_dst, NAME_DATASET_VL, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -3711,7 +3711,7 @@ test_copy_dataset_chunked_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_DATASET_VL, fid_dst, NAME_DATASET_VL, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -3848,7 +3848,7 @@ test_copy_dataset_compact_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_DATASET_VL, fid_dst, NAME_DATASET_VL, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -3968,7 +3968,7 @@ test_copy_attribute_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_DATASET_SIMPLE, fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -4111,7 +4111,7 @@ test_copy_dataset_compressed_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_DATASET_CHUNKED, fid_dst, NAME_DATASET_CHUNKED, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -4203,7 +4203,7 @@ test_copy_group_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR
/* create group at the SRC file */
- if((gid = H5Gcreate(fid_src, NAME_GROUP_EMPTY, (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid_src, NAME_GROUP_EMPTY, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* attach attributes to the group */
if(test_copy_attach_attributes(gid, H5T_NATIVE_INT) < 0) TEST_ERROR
@@ -4222,7 +4222,7 @@ test_copy_group_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the group from SRC to DST */
if(H5Ocopy(fid_src, NAME_GROUP_EMPTY, fid_dst, NAME_GROUP_EMPTY, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -4309,7 +4309,7 @@ test_copy_group(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR
/* create group at the SRC file */
- if((gid = H5Gcreate(fid_src, NAME_GROUP_TOP, (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* attach attributes to the group */
if(test_copy_attach_attributes(gid, H5T_NATIVE_INT) < 0) TEST_ERROR
@@ -4332,11 +4332,11 @@ test_copy_group(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if(H5Dclose(did) < 0) TEST_ERROR
/* create a sub-group */
- if((gid_sub = H5Gcreate(fid_src, NAME_GROUP_SUB, (size_t)0)) < 0) TEST_ERROR
+ if((gid_sub = H5Gcreate2(fid_src, NAME_GROUP_SUB, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if( H5Gclose(gid_sub) < 0) TEST_ERROR
/* create another sub-group */
- if((gid_sub = H5Gcreate(fid_src, NAME_GROUP_SUB_2, (size_t)0)) < 0) TEST_ERROR
+ if((gid_sub = H5Gcreate2(fid_src, NAME_GROUP_SUB_2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if( H5Gclose(gid_sub) < 0) TEST_ERROR
/* close the group */
@@ -4353,7 +4353,7 @@ test_copy_group(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the group from SRC to DST */
if(H5Ocopy(fid_src, NAME_GROUP_TOP, fid_dst, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -4443,7 +4443,7 @@ test_copy_root_group(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR
/* create group at the SRC file */
- if((gid = H5Gcreate(fid_src, NAME_GROUP_TOP, (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* attach attributes to the group */
if(test_copy_attach_attributes(gid, H5T_NATIVE_INT) < 0) TEST_ERROR
@@ -4466,11 +4466,11 @@ test_copy_root_group(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if(H5Dclose(did) < 0) TEST_ERROR
/* create a sub-group */
- if((gid_sub = H5Gcreate(fid_src, NAME_GROUP_SUB, (size_t)0)) < 0) TEST_ERROR
+ if((gid_sub = H5Gcreate2(fid_src, NAME_GROUP_SUB, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid_sub) < 0) TEST_ERROR
/* create another sub-group */
- if((gid_sub = H5Gcreate(fid_src, NAME_GROUP_SUB_2, (size_t)0)) < 0) TEST_ERROR
+ if((gid_sub = H5Gcreate2(fid_src, NAME_GROUP_SUB_2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid_sub) < 0) TEST_ERROR
/* close the group */
@@ -4486,7 +4486,7 @@ test_copy_root_group(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the group from SRC to DST */
if(H5Ocopy(fid_src, "/", fid_dst, "/root_from_src", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -4575,7 +4575,7 @@ test_copy_group_deep(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR
/* create group at the SRC file */
- if((gid = H5Gcreate(fid_src, NAME_GROUP_TOP, (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* attach attributes to the group */
if(test_copy_attach_attributes(gid, H5T_NATIVE_INT) < 0) TEST_ERROR
@@ -4590,11 +4590,11 @@ test_copy_group_deep(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
/* create nested sub-groups & datasets */
for(i = 0; i < NUM_SUB_GROUPS; i++) {
sprintf(objname, "Group #%d", i);
- if((gid_sub = H5Gcreate(gid, objname, (size_t)0)) < 0) TEST_ERROR
+ if((gid_sub = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
for(j = 0; j < NUM_SUB_GROUPS; j++) {
sprintf(objname, "Group #%d", j);
- if((gid_sub2 = H5Gcreate(gid_sub, objname, (size_t)0)) < 0) TEST_ERROR
+ if((gid_sub2 = H5Gcreate2(gid_sub, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
for(k = 0; k < NUM_DATASETS; k++) {
sprintf(objname, "Dataset #%d", k);
@@ -4628,7 +4628,7 @@ test_copy_group_deep(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the group from SRC to DST */
if(H5Ocopy(fid_src, NAME_GROUP_TOP, fid_dst, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -4706,15 +4706,15 @@ test_copy_group_loop(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR
/* create group at the SRC file */
- if((gid = H5Gcreate(fid_src, NAME_GROUP_TOP, (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* attach attributes to the group */
if(test_copy_attach_attributes(gid, H5T_NATIVE_INT) < 0) TEST_ERROR
/* create sub-groups */
- if((gid_sub = H5Gcreate(gid, NAME_GROUP_SUB, (size_t)0)) < 0) TEST_ERROR
+ if((gid_sub = H5Gcreate2(gid, NAME_GROUP_SUB, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
- if((gid_sub2 = H5Gcreate(gid, NAME_GROUP_SUB_SUB, (size_t)0)) < 0) TEST_ERROR
+ if((gid_sub2 = H5Gcreate2(gid, NAME_GROUP_SUB_SUB, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Create link to top group */
if(H5Glink2(gid, ".", H5L_TYPE_HARD, gid_sub2, NAME_GROUP_LOOP) < 0) TEST_ERROR
@@ -4739,7 +4739,7 @@ test_copy_group_loop(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the group from SRC to DST */
if(H5Ocopy(fid_src, NAME_GROUP_TOP, fid_dst, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -4823,7 +4823,7 @@ test_copy_group_wide_loop(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR
/* create group at the SRC file */
- if((gid = H5Gcreate(fid_src, NAME_GROUP_TOP, (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* attach attributes to the group */
if(test_copy_attach_attributes(gid, H5T_NATIVE_INT) < 0) TEST_ERROR
@@ -4831,11 +4831,11 @@ test_copy_group_wide_loop(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
/* create wide sub-group hierarchy, with multiple links to higher groups */
for(u = 0; u < NUM_WIDE_LOOP_GROUPS; u++) {
sprintf(objname, "%s-%u", NAME_GROUP_SUB, u);
- if((gid_sub = H5Gcreate(gid, objname, (size_t)0)) < 0) TEST_ERROR
+ if((gid_sub = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
for(v = 0; v < NUM_WIDE_LOOP_GROUPS; v++) {
sprintf(objname, "%s-%u", NAME_GROUP_SUB_SUB2, v);
- if((gid_sub2 = H5Gcreate(gid_sub, objname, (size_t)0)) < 0) TEST_ERROR
+ if((gid_sub2 = H5Gcreate2(gid_sub, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Create link to top group */
if(H5Glink2(gid, ".", H5L_TYPE_HARD, gid_sub2, NAME_GROUP_LOOP) < 0) TEST_ERROR
@@ -4868,7 +4868,7 @@ test_copy_group_wide_loop(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the group from SRC to DST */
if(H5Ocopy(fid_src, NAME_GROUP_TOP, fid_dst, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -4956,7 +4956,7 @@ test_copy_group_links(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR
/* create group at the SRC file */
- if((gid = H5Gcreate(fid_src, NAME_GROUP_LINK, (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid_src, NAME_GROUP_LINK, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* attach attributes to the group */
if(test_copy_attach_attributes(gid, H5T_NATIVE_INT) < 0) TEST_ERROR
@@ -5004,7 +5004,7 @@ test_copy_group_links(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the group from SRC to DST */
if(H5Ocopy(fid_src, NAME_GROUP_LINK, fid_dst, NAME_GROUP_LINK, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -5091,7 +5091,7 @@ test_copy_soft_link(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR
/* create group at the SRC file */
- if((gid = H5Gcreate(fid_src, NAME_GROUP_LINK, (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid_src, NAME_GROUP_LINK, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* attach attributes to the group */
if(test_copy_attach_attributes(gid, H5T_NATIVE_INT) < 0) TEST_ERROR
@@ -5130,7 +5130,7 @@ test_copy_soft_link(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_LINK_SOFT, fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -5218,7 +5218,7 @@ test_copy_ext_link(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR
/* create group at the SRC file */
- if((gid = H5Gcreate(fid_src, NAME_GROUP_LINK, (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid_src, NAME_GROUP_LINK, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* attach attributes to the group */
if(test_copy_attach_attributes(gid, H5T_NATIVE_INT) < 0) TEST_ERROR
@@ -5245,7 +5245,7 @@ test_copy_ext_link(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_ext = H5Fcreate(ext_filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR
/* create group in the file that will hold the external link */
- if((gid = H5Gcreate(fid_ext, NAME_GROUP_LINK, (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid_ext, NAME_GROUP_LINK, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Create an external link to the dataset in the source file */
if(H5Lcreate_external(src_filename, NAME_LINK_DATASET, fid_ext, NAME_LINK_EXTERN, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -5261,7 +5261,7 @@ test_copy_ext_link(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_ext, NAME_LINK_EXTERN, fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -5383,7 +5383,7 @@ test_copy_exist(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_DATASET_SIMPLE,fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -5492,7 +5492,7 @@ test_copy_path(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the dataset from SRC to DST (should fail - intermediate groups not there) */
H5E_BEGIN_TRY {
@@ -5501,13 +5501,13 @@ test_copy_path(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if( ret >= 0) TEST_ERROR
/* Create the intermediate groups in destination file */
- if((gid = H5Gcreate(fid_dst, NAME_GROUP_TOP, (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid_dst, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid) < 0) TEST_ERROR
- if((gid = H5Gcreate(fid_dst, NAME_GROUP_SUB, (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid_dst, NAME_GROUP_SUB, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid) < 0) TEST_ERROR
- if((gid = H5Gcreate(fid_dst, NAME_GROUP_SUB_SUB, (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid_dst, NAME_GROUP_SUB_SUB, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid) < 0) TEST_ERROR
/* copy the dataset from SRC to DST, using full path */
@@ -5667,7 +5667,7 @@ test_copy_old_layout(hid_t fcpl_dst, hid_t fapl)
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_OLD_FORMAT, fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -5800,7 +5800,7 @@ test_copy_dataset_compact_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_DATASET_VL, fid_dst, NAME_DATASET_VL, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -5940,7 +5940,7 @@ test_copy_dataset_contig_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_DATASET_VL, fid_dst, NAME_DATASET_VL, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -6088,7 +6088,7 @@ test_copy_dataset_chunked_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_DATASET_VL, fid_dst, NAME_DATASET_VL, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -6238,7 +6238,7 @@ test_copy_dataset_compressed_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_DATASET_VL, fid_dst, NAME_DATASET_VL, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -6394,7 +6394,7 @@ test_copy_dataset_compact_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_DATASET_VL_VL, fid_dst, NAME_DATASET_VL_VL, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -6548,7 +6548,7 @@ test_copy_dataset_contig_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
/* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_DATASET_VL_VL, fid_dst, NAME_DATASET_VL_VL, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -6702,7 +6702,7 @@ test_copy_dataset_chunked_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
/* create destination file */
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_DATASET_VL_VL, fid_dst, NAME_DATASET_VL_VL, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -6859,7 +6859,7 @@ test_copy_dataset_compressed_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
/* create destination file */
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, fapl)) < 0) TEST_ERROR
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_DATASET_VL_VL, fid_dst, NAME_DATASET_VL_VL, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -6965,7 +6965,7 @@ test_copy_option(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl, unsigned flag, hboo
if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, fapl)) < 0) TEST_ERROR
/* create group at the SRC file */
- if((gid = H5Gcreate(fid_src, NAME_GROUP_TOP, (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* attach attributes to the group */
if(test_copy_attach_attributes(gid, H5T_NATIVE_INT) < 0) TEST_ERROR
@@ -6983,7 +6983,7 @@ test_copy_option(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl, unsigned flag, hboo
if(H5Dclose(did) < 0) TEST_ERROR
/* create a sub-group */
- if((gid_sub = H5Gcreate(fid_src, NAME_GROUP_SUB, (size_t)0)) < 0) TEST_ERROR
+ if((gid_sub = H5Gcreate2(fid_src, NAME_GROUP_SUB, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* add a dataset to the sub group */
if((did = H5Dcreate(gid_sub, NAME_DATASET_SIMPLE, H5T_NATIVE_INT, sid, H5P_DEFAULT) ) < 0) TEST_ERROR
@@ -6991,7 +6991,7 @@ test_copy_option(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl, unsigned flag, hboo
if(H5Dclose(did) < 0) TEST_ERROR
/* create sub-sub-group */
- if((gid_sub_sub = H5Gcreate(gid_sub, NAME_GROUP_SUB_SUB2, (size_t)0)) < 0) TEST_ERROR
+ if((gid_sub_sub = H5Gcreate2(gid_sub, NAME_GROUP_SUB_SUB2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* add a dataset to the sub sub group */
if((did = H5Dcreate(gid_sub_sub, NAME_DATASET_SIMPLE, H5T_NATIVE_INT, sid, H5P_DEFAULT) ) < 0) TEST_ERROR
@@ -7012,20 +7012,20 @@ test_copy_option(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl, unsigned flag, hboo
if((flag & H5O_COPY_EXPAND_SOFT_LINK_FLAG) > 0) {
/* Create group to copy */
- if((gid = H5Gcreate(fid_src, NAME_GROUP_LINK, (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid_src, NAME_GROUP_LINK, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Glink(fid_src, H5L_TYPE_SOFT, NAME_DATASET_SUB_SUB, NAME_LINK_SOFT) < 0) TEST_ERROR
if(H5Glink(fid_src, H5L_TYPE_SOFT, "nowhere", NAME_LINK_SOFT_DANGLE) < 0) TEST_ERROR
if(H5Gclose(gid) < 0) TEST_ERROR
/* Create group to compare with */
- if((gid = H5Gcreate(fid_src, NAME_GROUP_LINK2, (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid_src, NAME_GROUP_LINK2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Glink(fid_src, H5L_TYPE_HARD, NAME_DATASET_SUB_SUB, NAME_LINK_SOFT2) < 0) TEST_ERROR
if(H5Glink(fid_src, H5L_TYPE_SOFT, "nowhere", NAME_LINK_SOFT_DANGLE2) < 0) TEST_ERROR
if(H5Gclose(gid) < 0) TEST_ERROR
} /* end if */
if((flag & H5O_COPY_EXPAND_REFERENCE_FLAG) > 0) {
- if((gid_ref = H5Gcreate(fid_src, NAME_GROUP_REF, (size_t)0)) < 0) TEST_ERROR
+ if((gid_ref = H5Gcreate2(fid_src, NAME_GROUP_REF, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* create an attribute of object references */
if(attach_ref_attr(fid_src, gid_ref) < 0) TEST_ERROR
@@ -7058,7 +7058,7 @@ test_copy_option(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl, unsigned flag, hboo
/* Create an uncopied object in destination file so that addresses in source and destination
files aren't the same */
- if(H5Gclose(H5Gcreate(fid_dst, NAME_GROUP_UNCOPIED, (size_t)0)) < 0) TEST_ERROR
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* create property to pass copy options */
if((pid = H5Pcreate(H5P_OBJECT_COPY)) < 0) TEST_ERROR
diff --git a/test/stab.c b/test/stab.c
index 1638982..5e51131 100644
--- a/test/stab.c
+++ b/test/stab.c
@@ -25,7 +25,6 @@
#include "h5test.h"
#include "H5Gpkg.h" /* Groups */
-#include "H5HLprivate.h" /* Local Heaps */
const char *FILENAME[] = {
"stab",
@@ -67,12 +66,15 @@ const char *FILENAME[] = {
#define NO_COMPACT_MAX_COMPACT 0
#define NO_COMPACT_MIN_DENSE 0
-/* Definitions for 'no_compact' test */
+/* Definitions for 'gcpl_on_root' test */
#define GCPL_ON_ROOT_MIDDLE_GROUP "/middle"
#define GCPL_ON_ROOT_BOTTOM_GROUP "/middle/bottom"
#define GCPL_ON_ROOT_MAX_COMPACT 4
#define GCPL_ON_ROOT_MIN_DENSE 2
+/* Definitions for 'old_api' test */
+#define OLD_API_GROUP "/old_api"
+
/*-------------------------------------------------------------------------
* Function: test_misc
@@ -106,9 +108,9 @@ test_misc(hid_t fapl, hbool_t new_format)
if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR
/* Create initial groups for testing, then close */
- if((g1 = H5Gcreate(fid, "test_1a", (size_t)0)) < 0) TEST_ERROR
- if((g2 = H5Gcreate(g1, "sub_1", (size_t)0)) < 0) TEST_ERROR
- if((g3 = H5Gcreate(fid, "test_1b", (size_t)0)) < 0) TEST_ERROR
+ if((g1 = H5Gcreate2(fid, "test_1a", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
+ if((g2 = H5Gcreate2(g1, "sub_1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
+ if((g3 = H5Gcreate2(fid, "test_1b", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gset_comment(g3, ".", "hello world") < 0) TEST_ERROR
if(H5Gclose(g1) < 0) TEST_ERROR
if(H5Gclose(g2) < 0) TEST_ERROR
@@ -131,12 +133,12 @@ test_misc(hid_t fapl, hbool_t new_format)
/* Check that creating groups with no-op names isn't allowed */
H5E_BEGIN_TRY {
- g1 = H5Gcreate(fid, "/", (size_t)0);
+ g1 = H5Gcreate2(fid, "/", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
} H5E_END_TRY
if(g1 >= 0) TEST_ERROR
H5E_BEGIN_TRY {
- g1 = H5Gcreate(fid, "./././", (size_t)0);
+ g1 = H5Gcreate2(fid, "./././", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
} H5E_END_TRY
if(g1 >= 0) TEST_ERROR
@@ -196,8 +198,8 @@ test_long(hid_t fapl, hbool_t new_format)
sprintf(name2, "%s/%s", name1, name1);
/* Create groups */
- if((g1 = H5Gcreate(fid, name1, (size_t)0)) < 0) TEST_ERROR
- if((g2 = H5Gcreate(g1, name1, (size_t)0)) < 0) TEST_ERROR
+ if((g1 = H5Gcreate2(fid, name1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
+ if((g2 = H5Gcreate2(g1, name1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(g1) < 0) TEST_ERROR
if(H5Gclose(g2) < 0) TEST_ERROR
@@ -242,9 +244,6 @@ error:
* robb@maya.nuance.com
* Aug 29 1997
*
- * Modifications:
- * Robb Matzke, 2002-03-28
- * File is opened by parent instead of here.
*-------------------------------------------------------------------------
*/
static int
@@ -269,12 +268,12 @@ test_large(hid_t fapl, hbool_t new_format)
* Create a directory that has so many entries that the root
* of the B-tree ends up splitting.
*/
- if((cwg = H5Gcreate(fid, "/big", (size_t)(LARGE_NOBJS * 16 + 2))) < 0) TEST_ERROR
+ if((cwg = H5Gcreate2(fid, "/big", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(new_format)
if(H5G_has_stab_test(cwg) != FALSE) TEST_ERROR
for(i = 0; i < LARGE_NOBJS; i++) {
sprintf(name, "%05d%05d", (HDrandom() % 100000), i);
- if((dir = H5Gcreate(cwg, name, (size_t)0)) < 0) TEST_ERROR
+ if((dir = H5Gcreate2(cwg, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(dir) < 0) TEST_ERROR
}
if(new_format)
@@ -314,13 +313,12 @@ test_large(hid_t fapl, hbool_t new_format)
*-------------------------------------------------------------------------
*/
static int
-lifecycle(hid_t fapl)
+lifecycle(hid_t fapl2)
{
hid_t fid = (-1); /* File ID */
hid_t gid = (-1); /* Group ID */
hid_t gid2 = (-1); /* Datatype ID */
hid_t gcpl = (-1); /* Group creation property list ID */
- hid_t fapl2 = (-1); /* File access property list ID */
size_t lheap_size_hint; /* Local heap size hint */
unsigned max_compact; /* Maximum # of links to store in group compactly */
unsigned min_dense; /* Minimum # of links to store in group "densely" */
@@ -336,12 +334,6 @@ lifecycle(hid_t fapl)
TESTING("group lifecycle");
- /* Copy the file access property list */
- if((fapl2 = H5Pcopy(fapl)) < 0) TEST_ERROR
-
- /* Set the "use the latest version of the format" flag for creating objects in the file */
- if(H5Pset_latest_format(fapl2, TRUE) < 0) TEST_ERROR
-
/* Create file */
h5_fixname(FILENAME[0], fapl2, filename, sizeof(filename));
if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl2)) < 0) TEST_ERROR
@@ -391,7 +383,7 @@ lifecycle(hid_t fapl)
/* Create first "bottom" group */
sprintf(objname, LIFECYCLE_BOTTOM_GROUP, (unsigned)0);
- if((gid2 = H5Gcreate(gid, objname, (size_t)0)) < 0) TEST_ERROR
+ if((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Check on bottom group's status */
if(H5G_is_empty_test(gid2) != TRUE) TEST_ERROR
@@ -408,7 +400,7 @@ lifecycle(hid_t fapl)
/* (Start counting at '1', since we've already created one bottom group */
for(u = 1; u < LIFECYCLE_MAX_COMPACT; u++) {
sprintf(objname, LIFECYCLE_BOTTOM_GROUP, u);
- if((gid2 = H5Gcreate(gid, objname, (size_t)0)) < 0) TEST_ERROR
+ if((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Check on bottom group's status */
if(H5G_is_empty_test(gid2) != TRUE) TEST_ERROR
@@ -436,7 +428,7 @@ lifecycle(hid_t fapl)
/* Create one more "bottom" group, which should push top group into using a symbol table */
sprintf(objname, LIFECYCLE_BOTTOM_GROUP, u);
- if((gid2 = H5Gcreate(gid, objname, (size_t)0)) < 0) TEST_ERROR
+ if((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Check on bottom group's status */
if(H5G_is_empty_test(gid2) != TRUE) TEST_ERROR
@@ -503,9 +495,6 @@ lifecycle(hid_t fapl)
/* Close GCPL */
if(H5Pclose(gcpl) < 0) TEST_ERROR
- /* Close FAPL copy */
- if(H5Pclose(fapl2) < 0) TEST_ERROR
-
/* Close file */
if(H5Fclose(fid) < 0) TEST_ERROR
@@ -521,7 +510,6 @@ lifecycle(hid_t fapl)
error:
H5E_BEGIN_TRY {
- H5Pclose(fapl2);
H5Gclose(gcpl);
H5Gclose(gid2);
H5Gclose(gid);
@@ -547,12 +535,11 @@ error:
*-------------------------------------------------------------------------
*/
static int
-long_compact(hid_t fapl)
+long_compact(hid_t fapl2)
{
hid_t fid = (-1); /* File ID */
hid_t gid = (-1); /* Group ID */
hid_t gid2 = (-1); /* Group ID */
- hid_t fapl2 = (-1); /* File access property list ID */
char *objname; /* Object name */
char filename[NAME_BUF_SIZE];
h5_stat_size_t empty_size; /* Size of an empty file */
@@ -560,12 +547,6 @@ long_compact(hid_t fapl)
TESTING("long link names in compact groups");
- /* Copy the file access property list */
- if((fapl2 = H5Pcopy(fapl)) < 0) TEST_ERROR
-
- /* Set the "use the latest version of the format" flag for creating objects in the file */
- if(H5Pset_latest_format(fapl2, TRUE) < 0) TEST_ERROR
-
/* Create file */
h5_fixname(FILENAME[0], fapl2, filename, sizeof(filename));
if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl2)) < 0) TEST_ERROR
@@ -585,13 +566,13 @@ long_compact(hid_t fapl)
if((fid = H5Fopen(filename, H5F_ACC_RDWR, fapl2)) < 0) TEST_ERROR
/* Create top group */
- if((gid = H5Gcreate(fid, "top", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid, "top", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Use internal testing routine to check that the group has no links or dense storage */
if(H5G_is_empty_test(gid) != TRUE) TEST_ERROR
/* Create first group with "long" name */
- if((gid2 = H5Gcreate(gid, objname, (size_t)0)) < 0) TEST_ERROR
+ if((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Check on bottom group's status */
if(H5G_is_empty_test(gid2) != TRUE) TEST_ERROR
@@ -607,7 +588,7 @@ long_compact(hid_t fapl)
/* Create second group with "long" name */
objname[0] = 'b';
- if((gid2 = H5Gcreate(gid, objname, (size_t)0)) < 0) TEST_ERROR
+ if((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Check on bottom group's status */
if(H5G_is_empty_test(gid2) != TRUE) TEST_ERROR
@@ -647,9 +628,6 @@ long_compact(hid_t fapl)
/* Unlink top group */
if(H5Gunlink(fid, "top") < 0) TEST_ERROR
- /* Close FAPL copy */
- if(H5Pclose(fapl2) < 0) TEST_ERROR
-
/* Close file */
if(H5Fclose(fid) < 0) TEST_ERROR
@@ -664,7 +642,6 @@ long_compact(hid_t fapl)
error:
H5E_BEGIN_TRY {
- H5Pclose(fapl2);
H5Gclose(gid2);
H5Gclose(gid);
H5Fclose(fid);
@@ -688,7 +665,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-read_old(hid_t fapl)
+read_old(hid_t fapl2)
{
int fd_old = (-1), fd_new = (-1); /* File descriptors for copying data */
hid_t fid = (-1); /* File ID */
@@ -712,7 +689,7 @@ read_old(hid_t fapl)
HDstrcat(filename, FILE_OLD_GROUPS);
/* Create filename */
- h5_fixname(FILENAME[0], fapl, filename2, sizeof(filename2));
+ h5_fixname(FILENAME[0], fapl2, filename2, sizeof(filename2));
/* Copy old file into temporary file */
if((fd_old = HDopen(filename, O_RDONLY, 0666)) < 0) TEST_ERROR
@@ -728,7 +705,7 @@ read_old(hid_t fapl)
/* Open copied file */
- if((fid = H5Fopen(filename2, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR
+ if((fid = H5Fopen(filename2, H5F_ACC_RDWR, fapl2)) < 0) TEST_ERROR
/* Attempt to open "old" group */
if((gid = H5Gopen(fid, "old")) < 0) TEST_ERROR
@@ -741,7 +718,7 @@ read_old(hid_t fapl)
/* Create a bunch of objects in the group */
for(u = 0; u < READ_OLD_NGROUPS; u++) {
sprintf(objname, "Group %u", u);
- if((gid2 = H5Gcreate(gid, objname, (size_t)0)) < 0) TEST_ERROR
+ if((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Check on bottom group's status */
if(H5G_is_empty_test(gid2) != TRUE) TEST_ERROR
@@ -802,13 +779,12 @@ error:
*-------------------------------------------------------------------------
*/
static int
-no_compact(hid_t fapl)
+no_compact(hid_t fapl2)
{
hid_t fid = (-1); /* File ID */
hid_t gid = (-1); /* Group ID */
hid_t gid2 = (-1); /* Datatype ID */
hid_t gcpl = (-1); /* Group creation property list ID */
- hid_t fapl2 = (-1); /* File access property list ID */
char objname[NAME_BUF_SIZE]; /* Object name */
char filename[NAME_BUF_SIZE];
h5_stat_size_t empty_size; /* Size of an empty file */
@@ -818,12 +794,6 @@ no_compact(hid_t fapl)
TESTING("group without compact form");
- /* Copy the file access property list */
- if((fapl2 = H5Pcopy(fapl)) < 0) TEST_ERROR
-
- /* Set the "use the latest version of the format" flag for creating objects in the file */
- if(H5Pset_latest_format(fapl2, TRUE) < 0) TEST_ERROR
-
/* Create file */
h5_fixname(FILENAME[0], fapl2, filename, sizeof(filename));
if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl2)) < 0) TEST_ERROR
@@ -859,7 +829,7 @@ no_compact(hid_t fapl)
/* Create first "bottom" group */
sprintf(objname, NO_COMPACT_BOTTOM_GROUP, (unsigned)0);
- if((gid2 = H5Gcreate(gid, objname, (size_t)0)) < 0) TEST_ERROR
+ if((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Check on bottom group's status */
if(H5G_is_empty_test(gid2) != TRUE) TEST_ERROR
@@ -885,9 +855,6 @@ no_compact(hid_t fapl)
/* Unlink top group */
if(H5Gunlink(fid, NO_COMPACT_TOP_GROUP) < 0) TEST_ERROR
- /* Close FAPL copy */
- if(H5Pclose(fapl2) < 0) TEST_ERROR
-
/* Close file */
if(H5Fclose(fid) < 0) TEST_ERROR
@@ -903,7 +870,6 @@ no_compact(hid_t fapl)
error:
H5E_BEGIN_TRY {
- H5Pclose(fapl2);
H5Gclose(gcpl);
H5Gclose(gid2);
H5Gclose(gid);
@@ -928,13 +894,12 @@ error:
*-------------------------------------------------------------------------
*/
static int
-gcpl_on_root(hid_t fapl)
+gcpl_on_root(hid_t fapl2)
{
hid_t fid = (-1); /* File ID */
hid_t gid = (-1); /* Group ID */
hid_t gid2 = (-1); /* Datatype ID */
hid_t fcpl = (-1); /* File creation property list ID */
- hid_t fapl2 = (-1); /* File access property list ID */
hid_t gcpl = (-1); /* Group creation property list ID */
hid_t lcpl = (-1); /* Link creation property list ID */
unsigned max_compact; /* Maximum # of links to store in group compactly */
@@ -943,12 +908,6 @@ gcpl_on_root(hid_t fapl)
TESTING("setting root group creation properties");
- /* Copy the file access property list */
- if((fapl2 = H5Pcopy(fapl)) < 0) TEST_ERROR
-
- /* Set the "use the latest version of the format" flag for creating objects in the file */
- if(H5Pset_latest_format(fapl2, TRUE) < 0) TEST_ERROR
-
/* Create file */
h5_fixname(FILENAME[0], fapl2, filename, sizeof(filename));
@@ -1021,9 +980,6 @@ gcpl_on_root(hid_t fapl)
/* Close root group */
if(H5Gclose(gid) < 0) TEST_ERROR
- /* Close FAPL copy */
- if(H5Pclose(fapl2) < 0) TEST_ERROR
-
/* Close file */
if(H5Fclose(fid) < 0) TEST_ERROR
@@ -1037,7 +993,6 @@ error:
H5Gclose(gcpl);
H5Gclose(gid2);
H5Gclose(gid);
- H5Pclose(fapl2);
H5Gclose(fcpl);
H5Fclose(fid);
} H5E_END_TRY;
@@ -1046,6 +1001,91 @@ error:
/*-------------------------------------------------------------------------
+ * Function: old_api
+ *
+ * Purpose: Test old API routines
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Programmer: Quincey Koziol
+ * Thursday, August 23, 2007
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+old_api(hid_t fapl)
+{
+#ifndef H5_NO_DEPRECATED_SYMBOLS
+ hid_t fid = (-1); /* File ID */
+ hid_t gid = (-1); /* Group ID */
+ h5_stat_size_t small_file_size; /* Size of small group file */
+ h5_stat_size_t large_file_size; /* Size of large group file */
+ char filename[NAME_BUF_SIZE];
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
+
+ TESTING("old API routines");
+
+#ifndef H5_NO_DEPRECATED_SYMBOLS
+ /* Create file */
+ h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
+
+ /* Create file */
+ if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR
+
+ /* Create a group, with the old API routine and a "small" heap */
+ if((gid = H5Gcreate1(fid, OLD_API_GROUP, (size_t)0)) < 0) FAIL_STACK_ERROR
+
+ /* Close group */
+ if(H5Gclose(gid) < 0) FAIL_STACK_ERROR
+
+ /* Close file */
+ if(H5Fclose(fid) < 0) FAIL_STACK_ERROR
+
+ /* Get the size of the file with a "small" heap for group */
+ if((small_file_size = h5_get_file_size(filename)) < 0) TEST_ERROR
+
+ /* Create file */
+ if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR
+
+ /* Create a group, with the old API routine and a "large" heap */
+ if((gid = H5Gcreate1(fid, OLD_API_GROUP, (size_t)10000)) < 0) FAIL_STACK_ERROR
+
+ /* Close group */
+ if(H5Gclose(gid) < 0) FAIL_STACK_ERROR
+
+ /* Close file */
+ if(H5Fclose(fid) < 0) FAIL_STACK_ERROR
+
+ /* Get the size of the file with a "large" heap for group */
+ if((large_file_size = h5_get_file_size(filename)) < 0) TEST_ERROR
+
+ /* Check that the file with a "large" group heap is actually bigger */
+ if(large_file_size <= small_file_size) TEST_ERROR
+
+ PASSED();
+#else /* H5_NO_DEPRECATED_SYMBOLS */
+ /* Shut compiler up */
+ fapl = fapl;
+
+ SKIPPED();
+ puts(" Deprecated API symbols not enabled");
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
+
+ return 0;
+
+#ifndef H5_NO_DEPRECATED_SYMBOLS
+error:
+ H5E_BEGIN_TRY {
+ H5Gclose(gid);
+ H5Fclose(fid);
+ } H5E_END_TRY;
+ return 1;
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
+} /* end old_api() */
+
+
+/*-------------------------------------------------------------------------
* Function: main
*
* Purpose: Test groups
@@ -1072,6 +1112,7 @@ main(void)
envval = "nomatch";
if(HDstrcmp(envval, "split") && HDstrcmp(envval, "multi") && HDstrcmp(envval, "family")) {
hid_t fapl, fapl2; /* File access property list IDs */
+ hbool_t new_format; /* Whether to use the new format or not */
int nerrors = 0;
/* Reset library */
@@ -1084,20 +1125,23 @@ main(void)
/* Set the "use the latest version of the format" flag for creating objects in the file */
if(H5Pset_latest_format(fapl2, TRUE) < 0) TEST_ERROR
- /* Perform basic tests, with old & new style groups */
- nerrors += test_misc(fapl, FALSE); /* with old-style group */
- nerrors += test_misc(fapl2, TRUE); /* with new-style group */
- nerrors += test_long(fapl, FALSE); /* with old-style group */
- nerrors += test_long(fapl2, TRUE); /* with new-style group */
- nerrors += test_large(fapl, FALSE); /* with old-style group */
- nerrors += test_large(fapl2, TRUE); /* with new-style group */
+ /* Loop over using new group format */
+ for(new_format = FALSE; new_format <= TRUE; new_format++) {
+ /* Perform basic tests, with old & new style groups */
+ nerrors += test_misc((new_format ? fapl2 : fapl), new_format);
+ nerrors += test_long((new_format ? fapl2 : fapl), new_format);
+ nerrors += test_large((new_format ? fapl2 : fapl), new_format);
+ } /* end for */
/* New format group specific tests (require new format features) */
- nerrors += lifecycle(fapl);
- nerrors += long_compact(fapl);
- nerrors += read_old(fapl);
- nerrors += no_compact(fapl);
- nerrors += gcpl_on_root(fapl);
+ nerrors += lifecycle(fapl2);
+ nerrors += long_compact(fapl2);
+ nerrors += read_old(fapl2);
+ nerrors += no_compact(fapl2);
+ nerrors += gcpl_on_root(fapl2);
+
+ /* Old group API specific tests */
+ nerrors += old_api(fapl);
/* Close 2nd FAPL */
H5Pclose(fapl2);
diff --git a/test/tattr.c b/test/tattr.c
index 55b3f01..969a0d9 100644
--- a/test/tattr.c
+++ b/test/tattr.c
@@ -334,8 +334,8 @@ test_attr_basic_write(hid_t fapl)
CHECK(ret, FAIL, "H5Dclose");
/* Create group */
- group = H5Gcreate(fid1, GROUP1_NAME, (size_t)0);
- CHECK(group, FAIL, "H5Gcreate");
+ group = H5Gcreate2(fid1, GROUP1_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(group, FAIL, "H5Gcreate2");
/* Create dataspace for attribute */
sid2 = H5Screate_simple(ATTR2_RANK, dims3, NULL);
@@ -8099,8 +8099,8 @@ test_attr_bug1(hid_t fcpl, hid_t fapl)
fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl, fapl);
CHECK(fid, FAIL, "H5Fcreate");
- gid = H5Gcreate(fid, GROUP1_NAME, (size_t)0);
- CHECK(gid, FAIL, "H5Gcreate");
+ gid = H5Gcreate2(fid, GROUP1_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(gid, FAIL, "H5Gcreate2");
ret = H5Gclose(gid);
CHECK(ret, FAIL, "H5Gclose");
@@ -8114,8 +8114,8 @@ test_attr_bug1(hid_t fcpl, hid_t fapl)
CHECK(fid, FAIL, "H5Fopen");
/* Create second group */
- gid = H5Gcreate(fid, GROUP2_NAME, (size_t)0);
- CHECK(gid, FAIL, "H5Gcreate");
+ gid = H5Gcreate2(fid, GROUP2_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(gid, FAIL, "H5Gcreate2");
ret = H5Gclose(gid);
CHECK(ret, FAIL, "H5Gclose");
@@ -8143,8 +8143,8 @@ test_attr_bug1(hid_t fcpl, hid_t fapl)
CHECK(fid, FAIL, "H5Fopen");
/* Create third group */
- gid = H5Gcreate(fid, GROUP3_NAME, (size_t)0);
- CHECK(gid, FAIL, "H5Gcreate");
+ gid = H5Gcreate2(fid, GROUP3_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(gid, FAIL, "H5Gcreate2");
ret = H5Gclose(gid);
CHECK(ret, FAIL, "H5Gclose");
diff --git a/test/testmeta.c b/test/testmeta.c
index 034233c..db97b28 100644
--- a/test/testmeta.c
+++ b/test/testmeta.c
@@ -18,10 +18,10 @@
* to HDF5 1.4.1-post2 or 1.4.2-pre3 debug library.
*
* If the assertion errors are ignored, the program eventially causes
- * an error in H5Gcreate when writing object 83381.
+ * an error in H5Gcreate2 when writing object 83381.
*
* When writing in single file mode, the assertion errors still occur
- * but the H5Gcreate error does not.
+ * but the H5Gcreate2 error does not.
*/
@@ -102,7 +102,7 @@ int main(void)
status = H5Pclose(prop_id);
/* Create group to hold data object data arrays */
- group_id = H5Gcreate(file_id, "/DataArray", 0);
+ group_id = H5Gcreate2(file_id, "/DataArray", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group_id);
for(j=0; j<NDATAOBJECTS; j++)
@@ -114,9 +114,8 @@ int main(void)
/* Create group to hold data arrays for this object */
sprintf(name, "/DataArray/%06d", j);
- group_id = H5Gcreate(file_id, name, 0);
- if(group_id < 0)
- {
+ group_id = H5Gcreate2(file_id, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ if(group_id < 0) {
fprintf(stderr, "Failed to create DataArray group.\n");
status = H5Fclose(file_id);
return -1;
@@ -240,3 +239,4 @@ int main(void)
return 0;
}
+
diff --git a/test/tfile.c b/test/tfile.c
index 91cfa58..882061f 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -828,8 +828,8 @@ create_objects(hid_t fid1, hid_t fid2, hid_t *ret_did, hid_t *ret_gid1,
/* Create a group in the second file open */
{
hid_t gid1, gid2, gid3;
- gid1 = H5Gcreate(fid2, "/group", (size_t)0);
- CHECK(gid1, FAIL, "H5Gcreate");
+ gid1 = H5Gcreate2(fid2, "/group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(gid1, FAIL, "H5Gcreate2");
if(ret_gid1 != NULL)
*ret_gid1 = gid1;
@@ -897,8 +897,8 @@ test_get_file_id(void)
/* Create a group in the file. Make a duplicated file ID from the group.
* And close this duplicated ID
*/
- group_id = H5Gcreate(fid, GRP_NAME, (size_t)0);
- CHECK(group_id, FAIL, "H5Gcreate");
+ group_id = H5Gcreate2(fid, GRP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(group_id, FAIL, "H5Gcreate2");
/* Test H5Iget_file_id() */
check_file_id(fid, group_id);
@@ -918,7 +918,7 @@ test_get_file_id(void)
CHECK(fid, FAIL, "H5Fcreate");
group_id = H5Gopen(fid, GRP_NAME);
- CHECK(group_id, FAIL, "H5Gcreate");
+ CHECK(group_id, FAIL, "H5Gopen");
/* Test H5Iget_file_id() */
check_file_id(fid, group_id);
@@ -1374,8 +1374,8 @@ test_file_open_dot(void)
CHECK(fid, FAIL, "H5Fcreate");
/* Create a group in the HDF5 file */
- gid = H5Gcreate(fid, GRP_NAME, (size_t)0);
- CHECK(gid, FAIL, "H5Gcreate");
+ gid = H5Gcreate2(fid, GRP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(gid, FAIL, "H5Gcreate2");
/* Create a dataspace for creating datasets */
sid = H5Screate(H5S_SCALAR);
@@ -1435,15 +1435,15 @@ test_file_open_dot(void)
/* Create a group with no name using the file ID */
H5E_BEGIN_TRY {
- gid2 = H5Gcreate(fid, ".", (size_t)0);
+ gid2 = H5Gcreate2(fid, ".", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
} H5E_END_TRY;
- VERIFY(gid2, FAIL, "H5Gcreate");
+ VERIFY(gid2, FAIL, "H5Gcreate2");
/* Create a group with no name using the group ID */
H5E_BEGIN_TRY {
- gid2 = H5Gcreate(gid, ".", (size_t)0);
+ gid2 = H5Gcreate2(gid, ".", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
} H5E_END_TRY;
- VERIFY(gid2, FAIL, "H5Gcreate");
+ VERIFY(gid2, FAIL, "H5Gcreate2");
/* Open a group with no name using the file ID (should open the root group) */
gid2 = H5Gopen(fid, ".");
@@ -1507,8 +1507,8 @@ test_file_open_overlap(void)
VERIFY(intent, H5F_ACC_RDWR, "H5Fget_intent");
/* Create a group in file */
- gid = H5Gcreate(fid1, GROUP1, (size_t)0);
- CHECK(gid, FAIL, "H5Gcreate");
+ gid = H5Gcreate2(fid1, GROUP1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(gid, FAIL, "H5Gcreate2");
/* Create dataspace for dataset */
sid = H5Screate(H5S_SCALAR);
@@ -1595,8 +1595,8 @@ test_file_getname(void)
VERIFY_STR(name, FILE1, "H5Fget_name");
/* Create a group in the root group */
- group_id = H5Gcreate(file_id, TESTA_GROUPNAME, (size_t)0);
- CHECK(group_id, FAIL, "H5Gcreate");
+ group_id = H5Gcreate2(file_id, TESTA_GROUPNAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(group_id, FAIL, "H5Gcreate2");
/* Get and verify file name */
name_len = H5Fget_name(group_id, name, (size_t)TESTA_NAME_BUF_SIZE);
@@ -1734,8 +1734,8 @@ test_file_double_group_open(void)
file2_id = H5Fopen (FILE1, H5F_ACC_RDONLY, H5P_DEFAULT);
CHECK(file2_id, FAIL, "H5Fopen");
- grp1_id = H5Gcreate(file1_id, GRP_NAME, (size_t)0);
- CHECK(grp1_id, FAIL, "H5Gcreate");
+ grp1_id = H5Gcreate2(file1_id, GRP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(grp1_id, FAIL, "H5Gcreate2");
grp2_id = H5Gopen(file2_id, GRP_NAME);
CHECK(grp2_id, FAIL, "H5Gopen");
diff --git a/test/th5o.c b/test/th5o.c
index 09ba28f..e83b920 100644
--- a/test/th5o.c
+++ b/test/th5o.c
@@ -57,8 +57,8 @@ test_h5o_open(void)
/* Create a group, dataset, and committed datatype within the file */
/* Create the group */
- grp = H5Gcreate(fid, "group", (size_t)0);
- CHECK(grp, FAIL, "H5Gcreate");
+ grp = H5Gcreate2(fid, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(grp, FAIL, "H5Gcreate2");
ret = H5Gclose(grp);
CHECK(ret, FAIL, "H5Gclose");
@@ -162,8 +162,8 @@ test_h5o_close(void)
/* Create a group, dataset, and committed datatype within the file */
/* Create the group and close it with H5Oclose */
- grp = H5Gcreate(fid, "group", (size_t)0);
- CHECK(grp, FAIL, "H5Gcreate");
+ grp = H5Gcreate2(fid, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(grp, FAIL, "H5Gcreate2");
VERIFY(H5Iget_type(grp), H5I_GROUP, "H5Iget_type");
ret = H5Oclose(grp);
CHECK(ret, FAIL, "H5Oclose");
@@ -259,8 +259,8 @@ test_h5o_open_by_addr(void)
/* Create a group, dataset, and committed datatype within the file */
/* Create the group */
- grp = H5Gcreate(fid, "group", (size_t)0);
- CHECK(grp, FAIL, "H5Gcreate");
+ grp = H5Gcreate2(fid, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(grp, FAIL, "H5Gcreate2");
ret = H5Gclose(grp);
CHECK(ret, FAIL, "H5Gclose");
@@ -388,8 +388,8 @@ test_h5o_refcount(void)
/* Create a group, dataset, and committed datatype within the file */
/* Create the group */
- grp = H5Gcreate(fid, "group", (size_t)0);
- CHECK(grp, FAIL, "H5Gcreate");
+ grp = H5Gcreate2(fid, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(grp, FAIL, "H5Gcreate2");
/* Commit the type inside the group */
dtype = H5Tcopy(H5T_NATIVE_INT);
diff --git a/test/titerate.c b/test/titerate.c
index e60d98a..5fc568f 100644
--- a/test/titerate.c
+++ b/test/titerate.c
@@ -165,8 +165,8 @@ static void test_iter_group(hid_t fapl, hbool_t new_format)
/* Create a group and named datatype under root group for testing
* H5Gget_objtype_by_idx.
*/
- grp = H5Gcreate(file, "grp", (size_t)0);
- CHECK(ret, FAIL, "H5Gcreate");
+ grp = H5Gcreate2(file, "grp", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Gcreate2");
lnames[NDATASETS] = HDstrdup("grp");
CHECK(lnames[NDATASETS], NULL, "strdup");
@@ -611,8 +611,8 @@ static void test_iter_group_large(hid_t fapl)
names[i].type = H5G_GROUP;
/* Create a group */
- group = H5Gcreate(file, gname, (size_t)0);
- CHECK(group, FAIL, "H5Gcreate");
+ group = H5Gcreate2(file, gname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(group, FAIL, "H5Gcreate2");
/* Close a group */
ret = H5Gclose(group);
@@ -730,8 +730,8 @@ static void test_grp_memb_funcs(hid_t fapl)
/* Create a group and named datatype under root group for testing
* H5Gget_objtype_by_idx.
*/
- grp = H5Gcreate(file, "grp", (size_t)0);
- CHECK(ret, FAIL, "H5Gcreate");
+ grp = H5Gcreate2(file, "grp", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Gcreate2");
dnames[NDATASETS] = HDstrdup("grp");
CHECK(dnames[NDATASETS], NULL, "strdup");
@@ -852,11 +852,11 @@ static void test_links(hid_t fapl)
CHECK(file, FAIL, "H5Fcreate");
/* create groups */
- gid = H5Gcreate(file, "/g1", (size_t)0);
- CHECK(gid, FAIL, "H5Gcreate");
+ gid = H5Gcreate2(file, "/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(gid, FAIL, "H5Gcreate2");
- gid1 = H5Gcreate(file, "/g1/g1.1", (size_t)0);
- CHECK(gid1, FAIL, "H5Gcreate");
+ gid1 = H5Gcreate2(file, "/g1/g1.1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(gid1, FAIL, "H5Gcreate2");
/* create soft and hard links to the group "/g1". */
ret = H5Glink (gid, H5L_TYPE_SOFT, "something", "softlink");
diff --git a/test/tmisc.c b/test/tmisc.c
index 1803087..58cad14 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -628,19 +628,19 @@ test_misc4(void)
CHECK(file1, FAIL, "H5Fcreate");
/* Create the first group */
- group1 = H5Gcreate(file1, MISC4_GROUP_1, (size_t)0);
- CHECK(group1, FAIL, "H5Gcreate");
+ group1 = H5Gcreate2(file1, MISC4_GROUP_1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(group1, FAIL, "H5Gcreate2");
/* Create the second group */
- group2 = H5Gcreate(file1, MISC4_GROUP_2, (size_t)0);
- CHECK(group2, FAIL, "H5Gcreate");
+ group2 = H5Gcreate2(file1, MISC4_GROUP_2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(group2, FAIL, "H5Gcreate2");
file2 = H5Fcreate(MISC4_FILE_2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
CHECK(file2, FAIL, "H5Fcreate");
/* Create the first group */
- group3 = H5Gcreate(file2, MISC4_GROUP_1, (size_t)0);
- CHECK(group3, FAIL, "H5Gcreate");
+ group3 = H5Gcreate2(file2, MISC4_GROUP_1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(group3, FAIL, "H5Gcreate2");
/* Get the stat information for each group */
ret = H5Gget_objinfo(file1,MISC4_GROUP_1,0,&stat1);
@@ -2181,12 +2181,12 @@ create_hdf_file(const char *name)
CHECK(ret, FAIL, "H5Tclose");
/* Create a group in the root group */
- gid = H5Gcreate(fid, MISC13_GROUP1_NAME, (size_t)0);
- CHECK(gid, FAIL, "H5Gcreate");
+ gid = H5Gcreate2(fid, MISC13_GROUP1_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(gid, FAIL, "H5Gcreate2");
/* Create another group in the new group */
- gid2 = H5Gcreate(gid, MISC13_GROUP2_NAME, (size_t)0);
- CHECK(gid2, FAIL, "H5Gcreate");
+ gid2 = H5Gcreate2(gid, MISC13_GROUP2_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(gid2, FAIL, "H5Gcreate2");
/* Close the second group */
ret = H5Gclose(gid2);
@@ -3255,8 +3255,8 @@ test_misc19(void)
CHECK(fid, FAIL, "H5Fcreate");
/* Create a group */
- gid = H5Gcreate(fid, MISC19_GROUP_NAME, (size_t)0);
- CHECK(gid, FAIL, "H5Gcreate");
+ gid = H5Gcreate2(fid, MISC19_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(gid, FAIL, "H5Gcreate2");
/* Check the reference count */
rc = H5Iget_ref(gid);
@@ -3813,8 +3813,8 @@ test_misc23(void)
/* Build some infrastructure */
- group_id = H5Gcreate(file_id, "/A", (size_t)0);
- CHECK(group_id, FAIL, "H5Gcreate");
+ group_id = H5Gcreate2(file_id, "/A", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(group_id, FAIL, "H5Gcreate2");
space_id = H5Screate_simple(1, dims, NULL);
CHECK(space_id, FAIL, "H5Screate_simple");
@@ -3828,13 +3828,13 @@ test_misc23(void)
**********************************************************************/
H5E_BEGIN_TRY {
- tmp_id = H5Gcreate(file_id, "/A/B00a/grp", (size_t)0);
+ tmp_id = H5Gcreate2(file_id, "/A/B00a/grp", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
} H5E_END_TRY;
- VERIFY(tmp_id, FAIL, "H5Gcreate");
+ VERIFY(tmp_id, FAIL, "H5Gcreate2");
- tmp_id = H5Gcreate(file_id, "/A/grp", (size_t)0);
- CHECK(tmp_id, FAIL, "H5Gcreate");
+ tmp_id = H5Gcreate2(file_id, "/A/grp", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(tmp_id, FAIL, "H5Gcreate2");
status = H5Gclose(tmp_id);
CHECK(status, FAIL, "H5Gclose");
@@ -4075,8 +4075,8 @@ test_misc24(void)
CHECK(space_id, FAIL, "H5Screate");
/* Create group, dataset & named datatype objects */
- group_id = H5Gcreate(file_id, MISC24_GROUP_NAME, (size_t)0);
- CHECK(group_id, FAIL, "H5Gcreate");
+ group_id = H5Gcreate2(file_id, MISC24_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(group_id, FAIL, "H5Gcreate2");
dset_id = H5Dcreate(file_id, MISC24_DATASET_NAME, H5T_NATIVE_INT, space_id, H5P_DEFAULT);
CHECK(dset_id, FAIL, "H5Dcreate");
@@ -4282,24 +4282,24 @@ test_misc25a(void)
CHECK(fid, FAIL, "H5Fcreate");
/* Create top group */
- gid = H5Gcreate(fid, MISC25A_GROUP0_NAME, (size_t)0);
- CHECK(gid, FAIL, "H5Gcreate");
+ gid = H5Gcreate2(fid, MISC25A_GROUP0_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(gid, FAIL, "H5Gcreate2");
/* Close top group */
ret = H5Gclose(gid);
CHECK(ret, FAIL, "H5Gclose");
/* Create first group */
- gid = H5Gcreate(fid, MISC25A_GROUP1_NAME, (size_t)0);
- CHECK(gid, FAIL, "H5Gcreate");
+ gid = H5Gcreate2(fid, MISC25A_GROUP1_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(gid, FAIL, "H5Gcreate2");
/* Close first group */
ret = H5Gclose(gid);
CHECK(ret, FAIL, "H5Gclose");
/* Create second group */
- gid2 = H5Gcreate(fid, MISC25A_GROUP2_NAME, (size_t)0);
- CHECK(gid2, FAIL, "H5Gcreate");
+ gid2 = H5Gcreate2(fid, MISC25A_GROUP2_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(gid2, FAIL, "H5Gcreate2");
/* Close second group */
ret = H5Gclose(gid2);
@@ -4384,8 +4384,8 @@ test_misc25a(void)
CHECK(fid, FAIL, "H5Fopen");
/* Create third group */
- gid3 = H5Gcreate(fid, MISC25A_GROUP3_NAME, (size_t)0);
- CHECK(gid3, FAIL, "H5Gcreate");
+ gid3 = H5Gcreate2(fid, MISC25A_GROUP3_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(gid3, FAIL, "H5Gcreate2");
/* Close third group */
ret = H5Gclose(gid3);
@@ -4651,7 +4651,7 @@ test_misc25c(void)
/* Create a group for the dataset */
gid = H5Gcreate2(fid, MISC25C_DSETGRPNAME, H5P_DEFAULT, gcpl, H5P_DEFAULT);
- CHECK(gid, FAIL, "H5Gcreate");
+ CHECK(gid, FAIL, "H5Gcreate2");
/* Create the dataspace */
sid = H5Screate(H5S_SCALAR);
@@ -4662,8 +4662,8 @@ test_misc25c(void)
CHECK(did, FAIL, "H5Dcreate");
/* Create an extra group */
- gid2 = H5Gcreate(fid, MISC25C_GRPNAME, (size_t)0);
- CHECK(gid2, FAIL, "H5Gcreate");
+ gid2 = H5Gcreate2(fid, MISC25C_GRPNAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(gid2, FAIL, "H5Gcreate2");
/* Close the extra group */
ret = H5Gclose(gid2);
@@ -4678,8 +4678,8 @@ test_misc25c(void)
CHECK(ret, FAIL, "H5Aclose");
/* Create a second extra group */
- gid2 = H5Gcreate(fid, MISC25C_GRPNAME2, (size_t)0);
- CHECK(gid2, FAIL, "H5Gcreate");
+ gid2 = H5Gcreate2(fid, MISC25C_GRPNAME2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(gid2, FAIL, "H5Gcreate2");
/* Close the second extra group */
ret = H5Gclose(gid2);
diff --git a/test/trefer.c b/test/trefer.c
index 924d72c..6f984f3 100644
--- a/test/trefer.c
+++ b/test/trefer.c
@@ -106,8 +106,8 @@ test_reference_obj(void)
CHECK(sid1, FAIL, "H5Screate_simple");
/* Create a group */
- group=H5Gcreate(fid1,"Group1",(size_t)-1);
- CHECK(group, FAIL, "H5Gcreate");
+ group = H5Gcreate2(fid1, "Group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(group, FAIL, "H5Gcreate2");
/* Set group's comment */
ret=H5Gset_comment(group,".",write_comment);
@@ -999,17 +999,17 @@ test_reference_group(void)
CHECK(sid, FAIL, "H5Screate");
/* Create group to refer to */
- gid = H5Gcreate(fid, GROUPNAME, (size_t)0);
- CHECK(gid, FAIL, "H5Gcreate");
+ gid = H5Gcreate2(fid, GROUPNAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(gid, FAIL, "H5Gcreate2");
/* Create nested groups */
- gid2 = H5Gcreate(gid, GROUPNAME2, (size_t)0);
- CHECK(gid2, FAIL, "H5Gcreate");
+ gid2 = H5Gcreate2(gid, GROUPNAME2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(gid2, FAIL, "H5Gcreate2");
ret = H5Gclose(gid2);
CHECK(ret, FAIL, "H5Gclose");
- gid2 = H5Gcreate(gid, GROUPNAME3, (size_t)0);
- CHECK(gid2, FAIL, "H5Gcreate");
+ gid2 = H5Gcreate2(gid, GROUPNAME3, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(gid2, FAIL, "H5Gcreate2");
ret = H5Gclose(gid2);
CHECK(ret, FAIL, "H5Gclose");
diff --git a/test/tsohm.c b/test/tsohm.c
index 934c256..7948443 100644
--- a/test/tsohm.c
+++ b/test/tsohm.c
@@ -996,8 +996,8 @@ static void sohm_attr_helper(hid_t fcpl_id)
CHECK_I(space_id, "H5Screate_simple");
/* Create and verify an attribute on a group */
- group_id = H5Gcreate(file_id, "group", 100);
- CHECK_I(group_id, "H5Gcreate");
+ group_id = H5Gcreate2(file_id, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK_I(group_id, "H5Gcreate2");
attr_id = H5Acreate(group_id, "attribute", type_id, space_id, H5P_DEFAULT);
CHECK_I(attr_id, "H5Acreate");
ret = H5Awrite(attr_id, H5T_NATIVE_INT, wdata);
@@ -1032,8 +1032,8 @@ static void sohm_attr_helper(hid_t fcpl_id)
CHECK_I(ret, "H5Tcommit");
/* Create and verify an attribute */
- group_id = H5Gcreate(file_id, "another_group", 100);
- CHECK_I(group_id, "H5Gcreate");
+ group_id = H5Gcreate2(file_id, "another_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK_I(group_id, "H5Gcreate2");
attr_id = H5Acreate(group_id, "attribute", type_id, space_id, H5P_DEFAULT);
CHECK_I(attr_id, "H5Acreate");
ret = H5Awrite(attr_id, H5T_NATIVE_INT, wdata);
@@ -1524,8 +1524,8 @@ size2_helper(hid_t fcpl_id, int test_file_closing, size2_helper_struct *ret_size
/* Now create a new group filled with datasets that use all different messages */
file_id = H5Fopen(FILENAME, H5F_ACC_RDWR, H5P_DEFAULT);
CHECK_I(file_id, "H5Fopen");
- group_id = H5Gcreate(file_id, "group", 0);
- CHECK_I(group_id, "H5Gcreate");
+ group_id = H5Gcreate2(file_id, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK_I(group_id, "H5Gcreate2");
/* Create NUM_DATASETS datasets in the new group */
for(x=0; x<NUM_DATASETS; ++x)
@@ -1565,8 +1565,8 @@ size2_helper(hid_t fcpl_id, int test_file_closing, size2_helper_struct *ret_size
/* Create a new group and interleave writes of datasets types 1 and 2. */
file_id = H5Fopen(FILENAME, H5F_ACC_RDWR, H5P_DEFAULT);
CHECK_I(file_id, "H5Fopen");
- group_id = H5Gcreate(file_id, "interleaved group", 0);
- CHECK_I(group_id, "H5Gcreate");
+ group_id = H5Gcreate2(file_id, "interleaved group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK_I(group_id, "H5Gcreate2");
/* Create NUM_DATASETS datasets in the new group */
for(x=0; x<NUM_DATASETS; x+=2)
diff --git a/test/tunicode.c b/test/tunicode.c
index 67cdd61..7135272 100644
--- a/test/tunicode.c
+++ b/test/tunicode.c
@@ -391,8 +391,8 @@ void test_objnames(hid_t fid, const char* string)
herr_t ret;
/* Create a group with a UTF-8 name */
- grp_id = H5Gcreate(fid, string, (size_t)0);
- CHECK(grp_id, FAIL, "H5Gcreate");
+ grp_id = H5Gcreate2(fid, string, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(grp_id, FAIL, "H5Gcreate2");
/* Set a comment on the group to test that we can access the group
* Also test that UTF-8 comments can be read.
@@ -408,8 +408,8 @@ void test_objnames(hid_t fid, const char* string)
VERIFY(strcmp(string, read_buf), 0, "strcmp");
/* Create a new dataset with a UTF-8 name */
- grp1_id = H5Gcreate(fid, GROUP1_NAME, (size_t)0);
- CHECK(grp1_id, FAIL, "H5Gcreate");
+ grp1_id = H5Gcreate2(fid, GROUP1_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(grp1_id, FAIL, "H5Gcreate2");
space_id = H5Screate_simple(RANK, &dims, NULL);
CHECK(space_id, FAIL, "H5Screate_simple");
@@ -430,8 +430,8 @@ void test_objnames(hid_t fid, const char* string)
CHECK(ret, FAIL, "H5Gclose");
/* Do the same for a named datatype */
- grp2_id = H5Gcreate(fid, GROUP2_NAME, (size_t)0);
- CHECK(grp2_id, FAIL, "H5Gcreate");
+ grp2_id = H5Gcreate2(fid, GROUP2_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(grp2_id, FAIL, "H5Gcreate2");
type_id = H5Tcreate(H5T_OPAQUE, (size_t)1);
CHECK(type_id, FAIL, "H5Tcreate");
@@ -483,8 +483,8 @@ void test_objnames(hid_t fid, const char* string)
* pointing through the hard link to the datatype. Give the soft
* link a name in UTF-8. Ensure that the soft link works. */
- grp3_id = H5Gcreate(fid, GROUP3_NAME, (size_t)0);
- CHECK(grp3_id, FAIL, "H5Gcreate");
+ grp3_id = H5Gcreate2(fid, GROUP3_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(grp3_id, FAIL, "H5Gcreate2");
ret = H5Glink2(fid, GROUP2_NAME, H5G_LINK_HARD, grp3_id, GROUP2_NAME);
CHECK(ret, FAIL, "H5Glink2");
@@ -519,8 +519,8 @@ void test_attrname(hid_t fid, const char * string)
/* Create a new group and give it an attribute whose
* name and value are UTF-8 strings.
*/
- group_id = H5Gcreate(fid, GROUP4_NAME, (size_t)0);
- CHECK(group_id, FAIL, "H5Gcreate");
+ group_id = H5Gcreate2(fid, GROUP4_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(group_id, FAIL, "H5Gcreate2");
space_id = H5Screate_simple(RANK, &dims, NULL);
CHECK(space_id, FAIL, "H5Screate_simple");
diff --git a/test/tvltypes.c b/test/tvltypes.c
index b86bc9c..12c523c 100644
--- a/test/tvltypes.c
+++ b/test/tvltypes.c
@@ -2602,6 +2602,10 @@ test_vltypes_fill_value(void)
#endif /* H5_HAVE_FILTER_DEFLATE */
}
break;
+
+ default:
+ assert(0 && "Unknown layout type!");
+ break;
} /* end switch */
/* Create first data set with default setting - no space is allocated */
@@ -2699,6 +2703,10 @@ test_vltypes_fill_value(void)
dset_select_dspace_id = large_select_dspace_id;
dset_elmts = SPACE4_DIM_LARGE;
break;
+
+ default:
+ assert(0 && "Unknown layout type!");
+ break;
} /* end switch */
/* Open first data set */
@@ -2890,6 +2898,10 @@ test_vltypes_fill_value(void)
dset_select_dspace_id = large_select_dspace_id;
dset_elmts = SPACE4_DIM_LARGE;
break;
+
+ default:
+ assert(0 && "Unknown layout type!");
+ break;
} /* end switch */
/* Copy the dataset's dataspace */
diff --git a/test/unlink.c b/test/unlink.c
index 27401ed..9a515b3 100644
--- a/test/unlink.c
+++ b/test/unlink.c
@@ -107,25 +107,25 @@ test_one(hid_t file)
herr_t status;
/* Create a test group */
- if((work=H5Gcreate(file, "/test_one", (size_t)0)) < 0) goto error;
+ if((work = H5Gcreate2(file, "/test_one", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error;
/* Delete by absolute name */
TESTING("unlink by absolute name");
- if((grp=H5Gcreate(work, "foo", (size_t)0)) < 0) TEST_ERROR
+ if((grp = H5Gcreate2(work, "foo", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(grp) < 0) TEST_ERROR
if(H5Gunlink(file, "/test_one/foo") < 0) TEST_ERROR
PASSED();
/* Delete by local name */
TESTING("unlink by local name");
- if((grp=H5Gcreate(work, "foo", (size_t)0)) < 0) TEST_ERROR
+ if((grp = H5Gcreate2(work, "foo", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(grp) < 0) TEST_ERROR
if(H5Gunlink(work, "foo") < 0) TEST_ERROR
PASSED();
/* Delete directly - should fail */
TESTING("unlink without a name");
- if((grp=H5Gcreate(work, "foo", (size_t)0)) < 0) TEST_ERROR
+ if((grp = H5Gcreate2(work, "foo", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
H5E_BEGIN_TRY {
status = H5Gunlink(grp, ".");
} H5E_END_TRY;
@@ -172,8 +172,8 @@ test_many(hid_t file)
char name[32];
/* Create a test group */
- if((work=H5Gcreate(file, "/test_many", (size_t)0)) < 0) goto error;
- if((grp = H5Gcreate(work, "/test_many_foo", (size_t)0)) < 0) goto error;
+ if((work = H5Gcreate2(file, "/test_many", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error;
+ if((grp = H5Gcreate2(work, "/test_many_foo", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error;
if(H5Gclose(grp) < 0) goto error;
/* Create a bunch of names and unlink them in order */
@@ -268,9 +268,9 @@ test_symlink(hid_t file)
TESTING("symlink removal");
/* Create a test group and symlink */
- if ((work=H5Gcreate(file, "/test_symlink", (size_t)0)) < 0) TEST_ERROR
- if (H5Glink(work, H5L_TYPE_SOFT, "link_value", "link") < 0) TEST_ERROR
- if (H5Gunlink(work, "link") < 0) TEST_ERROR
+ if((work = H5Gcreate2(file, "/test_symlink", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
+ if(H5Glink(work, H5L_TYPE_SOFT, "link_value", "link") < 0) TEST_ERROR
+ if(H5Gunlink(work, "link") < 0) TEST_ERROR
/* Cleanup */
if (H5Gclose(work) < 0) TEST_ERROR
@@ -308,14 +308,14 @@ test_rename(hid_t file)
/* Create a test group and rename something */
TESTING("object renaming");
- if ((work=H5Gcreate(file, "/test_rename", (size_t)0)) < 0) TEST_ERROR
- if ((foo=H5Gcreate(work, "foo", (size_t)0)) < 0) TEST_ERROR
- if (H5Gmove(work, "foo", "bar") < 0) TEST_ERROR
- if ((inner=H5Gcreate(foo, "inner", (size_t)0)) < 0) TEST_ERROR
- if (H5Gclose(inner) < 0) TEST_ERROR
- if (H5Gclose(foo) < 0) TEST_ERROR
- if ((inner=H5Gopen(work, "bar/inner")) < 0) TEST_ERROR
- if (H5Gclose(inner) < 0) TEST_ERROR
+ if((work = H5Gcreate2(file, "/test_rename", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
+ if((foo = H5Gcreate2(work, "foo", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
+ if(H5Gmove(work, "foo", "bar") < 0) TEST_ERROR
+ if((inner = H5Gcreate2(foo, "inner", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
+ if(H5Gclose(inner) < 0) TEST_ERROR
+ if(H5Gclose(foo) < 0) TEST_ERROR
+ if((inner = H5Gopen(work, "bar/inner")) < 0) TEST_ERROR
+ if(H5Gclose(inner) < 0) TEST_ERROR
PASSED();
/* Try renaming a symlink */
@@ -370,9 +370,9 @@ test_new_move(hid_t fapl)
if((file_b = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR
/* Create groups in first file */
- if((grp_1 = H5Gcreate(file_a, "group1", (size_t)0)) < 0) TEST_ERROR
- if((grp_2 = H5Gcreate(file_a, "group2", (size_t)0)) < 0) TEST_ERROR
- if((grp_move = H5Gcreate(grp_1, "group_move", (size_t)0)) < 0) TEST_ERROR
+ if((grp_1 = H5Gcreate2(file_a, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
+ if((grp_2 = H5Gcreate2(file_a, "group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
+ if((grp_move = H5Gcreate2(grp_1, "group_move", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Create hard and soft links. */
if(H5Glink2(grp_1, "group_move", H5L_TYPE_HARD, H5G_SAME_LOC, "hard") < 0) TEST_ERROR
@@ -886,7 +886,7 @@ test_filespace(hid_t fapl)
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR
/* Create a single group to remove */
- if((group = H5Gcreate (file, GROUPNAME, (size_t)0)) < 0) TEST_ERROR
+ if((group = H5Gcreate2(file, GROUPNAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose (group) < 0) TEST_ERROR
/* Remove the group */
@@ -912,7 +912,7 @@ test_filespace(hid_t fapl)
/* Create a many groups to remove */
for(u = 0; u < UNLINK_NGROUPS; u++) {
sprintf(objname, "%s %u", GROUPNAME, u);
- if((group = H5Gcreate(file, objname, (size_t)0)) < 0) TEST_ERROR
+ if((group = H5Gcreate2(file, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose (group) < 0) TEST_ERROR
} /* end for */
@@ -941,8 +941,8 @@ test_filespace(hid_t fapl)
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR
/* Create a small group hierarchy to remove */
- if((group = H5Gcreate(file, GROUPNAME, (size_t)0)) < 0) TEST_ERROR
- if((group2 = H5Gcreate (group, GROUP2NAME, (size_t)0)) < 0) TEST_ERROR
+ if((group = H5Gcreate2(file, GROUPNAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
+ if((group2 = H5Gcreate2(group, GROUP2NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose (group2) < 0) TEST_ERROR
if(H5Gclose (group) < 0) TEST_ERROR
@@ -981,13 +981,13 @@ test_filespace(hid_t fapl)
for(u=0; u<FILESPACE_TOP_GROUPS; u++) {
/* Create group */
sprintf(objname,"%s %u",GROUPNAME,u);
- if((group = H5Gcreate (file, objname, (size_t)0)) < 0) TEST_ERROR
+ if((group = H5Gcreate2(file, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Create nested groups inside top groups */
for(v=0; v<FILESPACE_NESTED_GROUPS; v++) {
/* Create group */
sprintf(objname,"%s %u",GROUP2NAME,v);
- if((group2 = H5Gcreate (group, objname, (size_t)0)) < 0) TEST_ERROR
+ if((group2 = H5Gcreate2(group, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Create datasets inside nested groups */
for(w=0; w<FILESPACE_NDATASETS; w++) {
@@ -1093,12 +1093,12 @@ test_filespace(hid_t fapl)
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR
/* Create a single group to remove */
- if((group = H5Gcreate (file, GROUPNAME, (size_t)0)) < 0) TEST_ERROR
+ if((group = H5Gcreate2(file, GROUPNAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose (group) < 0) TEST_ERROR
/* Create another group with same name */
H5E_BEGIN_TRY {
- group = H5Gcreate (file, GROUPNAME, (size_t)0);
+ group = H5Gcreate2(file, GROUPNAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
} H5E_END_TRY;
if (group>=0) {
H5Gclose(group);
@@ -1249,7 +1249,8 @@ error:
*
*-------------------------------------------------------------------------
*/
-static int test_create_unlink(const char *msg, hid_t fapl)
+static int
+test_create_unlink(const char *msg, hid_t fapl)
{
hid_t file, group;
unsigned u;
@@ -1266,7 +1267,7 @@ static int test_create_unlink(const char *msg, hid_t fapl)
/* Create a many groups to remove */
for(u=0; u<UNLINK_NGROUPS; u++) {
sprintf(groupname,"%s %u",GROUPNAME,u);
- if((group = H5Gcreate (file, groupname, (size_t)0)) < 0) {
+ if((group = H5Gcreate2(file, groupname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
printf("group %s creation failed\n", groupname);
goto error;
@@ -1331,10 +1332,10 @@ test_link_slashes(hid_t fapl)
if((fid=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Create a group in the root group */
- if((gid = H5Gcreate(fid, SLASHES_GROUP_NAME, (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(fid, SLASHES_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Create a nested group in the root group */
- if((gid2 = H5Gcreate(gid, SLASHES_GROUP_NAME, (size_t)0)) < 0) TEST_ERROR
+ if((gid2 = H5Gcreate2(gid, SLASHES_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Close the nested group */
if(H5Gclose(gid2) < 0) TEST_ERROR
@@ -1500,14 +1501,14 @@ test_unlink_rightleaf(hid_t fid)
/* Create all the groups */
for (n = 0; n < ngroups; n++) {
sprintf(name, "Zone%d", n + 1);
- if((gids[n] = H5Gcreate (rootid, name, (size_t)0)) < 0) TEST_ERROR
+ if((gids[n] = H5Gcreate2(rootid, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
} /* end for */
/* Unlink & re-create each group */
for (n = 0; n < ngroups; n++) {
if(delete_node (rootid, gids[n]) < 0) TEST_ERROR
sprintf(name, "Zone%d", n + 1);
- if((gids[n] = H5Gcreate (rootid, name, (size_t)0)) < 0) TEST_ERROR
+ if((gids[n] = H5Gcreate2(rootid, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
} /* end for */
/* Close all the groups */
@@ -1564,7 +1565,7 @@ test_unlink_rightnode(hid_t fid)
/* Create all the groups */
for (n = 0; n < ngroups; n++) {
sprintf(name, "ZoneB%d", n + 1);
- if((gids[n] = H5Gcreate (rootid, name, (size_t)0)) < 0) TEST_ERROR
+ if((gids[n] = H5Gcreate2(rootid, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
} /* end for */
/* Close all the groups */
@@ -1628,7 +1629,7 @@ test_unlink_middlenode(hid_t fid)
/* Create all the groups */
for (n = 0; n < ngroups; n++) {
sprintf(name, "ZoneC%d", n + 1);
- if((gids[n] = H5Gcreate (rootid, name, (size_t)0)) < 0) TEST_ERROR
+ if((gids[n] = H5Gcreate2(rootid, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
} /* end for */
/* Close all the groups */
@@ -1970,7 +1971,7 @@ test_resurrect_group(hid_t fapl)
if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR
/* Create a group in the file */
- if((group = H5Gcreate (file, GROUPNAME, (size_t)0)) < 0) TEST_ERROR
+ if((group = H5Gcreate2(file, GROUPNAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Unlink the group while it's open (will mark it for deletion when closed) */
if(H5Gunlink(file, GROUPNAME) < 0) TEST_ERROR
@@ -2127,12 +2128,12 @@ test_full_group_compact(hid_t fapl)
if((file_id = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR
/* Create group to link objects to */
- if((gid = H5Gcreate(file_id, "/keep", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(file_id, "/keep", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Create several objects to link to */
for(u = 0; u < FULL_GROUP_NUM_KEEP; u++) {
sprintf(objname, "keep %u\n", u);
- if((gid2 = H5Gcreate(gid, objname, (size_t)0)) < 0) TEST_ERROR
+ if((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid2) < 0) TEST_ERROR
} /* end for */
@@ -2149,7 +2150,7 @@ test_full_group_compact(hid_t fapl)
if((file_id = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR
/* Create group to delete */
- if((gid = H5Gcreate(file_id, "/delete", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(file_id, "/delete", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Create external link (doesn't matter if it dangles) */
if(H5Lcreate_external("foo.h5", "/dst", gid, "external", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -2167,7 +2168,7 @@ test_full_group_compact(hid_t fapl)
/* Create several objects to delete */
for(u = 0; u < FULL_GROUP_NUM_DELETE_COMPACT; u++) {
sprintf(objname, "delete %u\n", u);
- if((gid2 = H5Gcreate(gid, objname, (size_t)0)) < 0) TEST_ERROR
+ if((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid2) < 0) TEST_ERROR
} /* end for */
@@ -2261,12 +2262,12 @@ test_full_group_dense(hid_t fapl)
if((file_id = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR
/* Create group to link objects to */
- if((gid = H5Gcreate(file_id, "/keep", (size_t)0)) < 0) TEST_ERROR
+ if((gid = H5Gcreate2(file_id, "/keep", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Create several objects to link to */
for(u = 0; u < FULL_GROUP_NUM_KEEP; u++) {
sprintf(objname, "keep %u\n", u);
- if((gid2 = H5Gcreate(gid, objname, (size_t)0)) < 0) TEST_ERROR
+ if((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid2) < 0) TEST_ERROR
} /* end for */
@@ -2313,7 +2314,7 @@ test_full_group_dense(hid_t fapl)
/* Create several objects to delete */
for(u = 0; u < FULL_GROUP_NUM_DELETE_DENSE; u++) {
sprintf(objname, "delete %u\n", u);
- if((gid2 = H5Gcreate(gid, objname, (size_t)0)) < 0) TEST_ERROR
+ if((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Gclose(gid2) < 0) TEST_ERROR
} /* end for */
diff --git a/testpar/t_mdset.c b/testpar/t_mdset.c
index da67fe9..c282408 100644
--- a/testpar/t_mdset.c
+++ b/testpar/t_mdset.c
@@ -794,7 +794,7 @@ void collective_group_write(void)
* datasets in parallel. */
for(m = 0; m < ngroups; m++) {
sprintf(gname, "group%d", m);
- gid = H5Gcreate(fid, gname, 0);
+ gid = H5Gcreate2(fid, gname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
VRFY((gid > 0), gname);
sprintf(dname, "dataset%d", m);
@@ -1000,7 +1000,7 @@ void multiple_group_write(void)
* parallel. */
for(m = 0; m < ngroups; m++) {
sprintf(gname, "group%d", m);
- gid = H5Gcreate(fid, gname, 0);
+ gid = H5Gcreate2(fid, gname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
VRFY((gid > 0), gname);
/* create attribute for these groups. */
@@ -1101,7 +1101,7 @@ void create_group_recursive(hid_t memspace, hid_t filespace, hid_t gid,
#endif /* BARRIER_CHECKS */
sprintf(gname, "%dth_child_group", counter+1);
- child_gid = H5Gcreate(gid, gname, 0);
+ child_gid = H5Gcreate2(gid, gname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
VRFY((child_gid > 0), gname);
/* write datasets in parallel. */
diff --git a/testpar/t_pflush1.c b/testpar/t_pflush1.c
index 8963627..e35ac2c 100644
--- a/testpar/t_pflush1.c
+++ b/testpar/t_pflush1.c
@@ -83,15 +83,14 @@ hid_t create_file(char* name, hid_t fapl)
the_data[i][j] = (double)(hssize_t)i/(hssize_t)(j+1);
}
}
- if (H5Dwrite(dset, H5T_NATIVE_DOUBLE, space, space, plist,
- the_data)<0) goto error;
+ if(H5Dwrite(dset, H5T_NATIVE_DOUBLE, space, space, plist, the_data) < 0) goto error;
/* Create some groups */
- if ((groups=H5Gcreate(file, "some_groups", 0))<0) goto error;
- for (i=0; i<100; i++) {
+ if((groups = H5Gcreate2(file, "some_groups", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error;
+ for(i = 0; i < 100; i++) {
sprintf(name, "grp%02u", (unsigned)i);
- if ((grp=H5Gcreate(groups, name, 0))<0) goto error;
- if (H5Gclose(grp)<0) goto error;
+ if((grp = H5Gcreate2(groups, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error;
+ if(H5Gclose(grp) < 0) goto error;
}
diff --git a/tools/h5copy/h5copygentest.c b/tools/h5copy/h5copygentest.c
index ee6862a..70c4694 100644
--- a/tools/h5copy/h5copygentest.c
+++ b/tools/h5copy/h5copygentest.c
@@ -336,7 +336,7 @@ static void gent_empty_group(hid_t loc_id)
hid_t gid;
/* Create group in location */
- gid = H5Gcreate(loc_id, GROUP_EMPTY, (size_t)0);
+ gid = H5Gcreate2(loc_id, GROUP_EMPTY, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/* Release resources */
H5Gclose(gid);
@@ -355,7 +355,7 @@ static void gent_nested_datasets(hid_t loc_id)
hid_t gid;
/* Create group in location */
- gid = H5Gcreate(loc_id, GROUP_DATASETS, (size_t)0);
+ gid = H5Gcreate2(loc_id, GROUP_DATASETS, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/* Add datasets to group created */
gent_datasets(gid);
@@ -377,7 +377,7 @@ static void gent_nested_group(hid_t loc_id)
hid_t gid;
/* Create group in location */
- gid = H5Gcreate(loc_id, GROUP_NESTED, (size_t)0);
+ gid = H5Gcreate2(loc_id, GROUP_NESTED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/* Add datasets to group created */
gent_nested_datasets(gid);
diff --git a/tools/h5diff/h5diffgentest.c b/tools/h5diff/h5diffgentest.c
index 09f2656..12acd77 100644
--- a/tools/h5diff/h5diffgentest.c
+++ b/tools/h5diff/h5diffgentest.c
@@ -48,7 +48,7 @@
#define MY_LINKCLASS 187
/* A UD link traversal function. Shouldn't actually be called. */
static hid_t UD_traverse(UNUSED const char * link_name, UNUSED hid_t cur_group,
- UNUSED void * udata, UNUSED size_t udata_size, UNUSED hid_t lapl_id)
+ UNUSED const void * udata, UNUSED size_t udata_size, UNUSED hid_t lapl_id)
{
return -1;
}
@@ -151,9 +151,9 @@ int test_basic(const char *fname1,
*-------------------------------------------------------------------------
*/
- gid1 = H5Gcreate(fid1, "g1", 0);
- gid2 = H5Gcreate(fid2, "g1", 0);
- gid3 = H5Gcreate(fid2, "g2", 0);
+ gid1 = H5Gcreate2(fid1, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ gid2 = H5Gcreate2(fid2, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ gid3 = H5Gcreate2(fid2, "g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/*-------------------------------------------------------------------------
* tests:
@@ -256,15 +256,15 @@ int test_basic(const char *fname1,
float data15[6];
float data16[6];
- data15[0] = (float) sqrt( -1 );
+ data15[0] = (float) sqrt( (double)-1 );
data15[1] = 1;
- data15[2] = (float) sqrt( -1 );
+ data15[2] = (float) sqrt( (double)-1 );
data15[3] = 1;
data15[4] = 1;
data15[5] = 1;
- data16[0] = (float) sqrt( -1 );
- data16[1] = (float) sqrt( -1 );
+ data16[0] = (float) sqrt( (double)-1 );
+ data16[1] = (float) sqrt( (double)-1 );
data16[2] = 1;
data16[3] = 1;
data16[4] = 1;
@@ -305,84 +305,83 @@ out:
static
int test_types(const char *fname)
{
+ hid_t fid1;
+ hid_t gid1;
+ hid_t gid2;
+ hid_t tid1;
+ hid_t tid2;
+ herr_t status;
+ hsize_t dims[1]={1};
+ typedef struct s1_t
+ {
+ int a;
+ float b;
+ } s1_t;
+ typedef struct s2_t
+ {
+ int a;
+ } s2_t;
- hid_t fid1;
- hid_t gid1;
- hid_t gid2;
- hid_t tid1;
- hid_t tid2;
- herr_t status;
- hsize_t dims[1]={1};
- typedef struct s1_t
- {
- int a;
- float b;
- } s1_t;
- typedef struct s2_t
- {
- int a;
- } s2_t;
-
-/*-------------------------------------------------------------------------
- * Create one file
- *-------------------------------------------------------------------------
- */
- fid1 = H5Fcreate (fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
-
-/*-------------------------------------------------------------------------
- * H5G_DATASET
- *-------------------------------------------------------------------------
- */
- write_dset(fid1,1,dims,"dset",H5T_NATIVE_INT,0);
+ /*-------------------------------------------------------------------------
+ * Create one file
+ *-------------------------------------------------------------------------
+ */
+ fid1 = H5Fcreate (fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
-/*-------------------------------------------------------------------------
- * H5G_GROUP
- *-------------------------------------------------------------------------
- */
- gid1 = H5Gcreate(fid1, "g1", 0);
- status = H5Gclose(gid1);
- gid2 = H5Gcreate(fid1, "g2", 0);
- status = H5Gclose(gid2);
+ /*-------------------------------------------------------------------------
+ * H5G_DATASET
+ *-------------------------------------------------------------------------
+ */
+ write_dset(fid1,1,dims,"dset",H5T_NATIVE_INT,0);
-/*-------------------------------------------------------------------------
- * H5G_TYPE
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * H5G_GROUP
+ *-------------------------------------------------------------------------
+ */
+ gid1 = H5Gcreate2(fid1, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ status = H5Gclose(gid1);
+ gid2 = H5Gcreate2(fid1, "g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ status = H5Gclose(gid2);
- /* create and commit datatype 1 */
- tid1 = H5Tcreate (H5T_COMPOUND, sizeof(s1_t));
- H5Tinsert(tid1, "a", HOFFSET(s1_t, a), H5T_NATIVE_INT);
- H5Tinsert(tid1, "b", HOFFSET(s1_t, b), H5T_NATIVE_FLOAT);
- H5Tcommit(fid1, "t1", tid1);
- H5Tclose(tid1);
- /* create and commit datatype 2 */
- tid2 = H5Tcreate (H5T_COMPOUND, sizeof(s2_t));
- H5Tinsert(tid2, "a", HOFFSET(s2_t, a), H5T_NATIVE_INT);
- H5Tcommit(fid1, "t2", tid2);
- H5Tclose(tid2);
+ /*-------------------------------------------------------------------------
+ * H5G_TYPE
+ *-------------------------------------------------------------------------
+ */
-/*-------------------------------------------------------------------------
- * H5G_LINK
- *-------------------------------------------------------------------------
- */
+ /* create and commit datatype 1 */
+ tid1 = H5Tcreate (H5T_COMPOUND, sizeof(s1_t));
+ H5Tinsert(tid1, "a", HOFFSET(s1_t, a), H5T_NATIVE_INT);
+ H5Tinsert(tid1, "b", HOFFSET(s1_t, b), H5T_NATIVE_FLOAT);
+ H5Tcommit(fid1, "t1", tid1);
+ H5Tclose(tid1);
+ /* create and commit datatype 2 */
+ tid2 = H5Tcreate (H5T_COMPOUND, sizeof(s2_t));
+ H5Tinsert(tid2, "a", HOFFSET(s2_t, a), H5T_NATIVE_INT);
+ H5Tcommit(fid1, "t2", tid2);
+ H5Tclose(tid2);
+
+ /*-------------------------------------------------------------------------
+ * H5G_LINK
+ *-------------------------------------------------------------------------
+ */
- status = H5Glink(fid1, H5L_TYPE_SOFT, "g1", "l1");
- status = H5Glink(fid1, H5L_TYPE_SOFT, "g2", "l2");
+ status = H5Glink(fid1, H5L_TYPE_SOFT, "g1", "l1");
+ status = H5Glink(fid1, H5L_TYPE_SOFT, "g2", "l2");
-/*-------------------------------------------------------------------------
- * H5G_UDLINK
- *-------------------------------------------------------------------------
- */
- H5Lcreate_external("filename", "objname", fid1, "ext_link", H5P_DEFAULT, H5P_DEFAULT);
- H5Lregister(UD_link_class);
- H5Lcreate_ud(fid1, "ud_link", MY_LINKCLASS, NULL, 0, H5P_DEFAULT, H5P_DEFAULT);
+ /*-------------------------------------------------------------------------
+ * H5G_UDLINK
+ *-------------------------------------------------------------------------
+ */
+ H5Lcreate_external("filename", "objname", fid1, "ext_link", H5P_DEFAULT, H5P_DEFAULT);
+ H5Lregister(UD_link_class);
+ H5Lcreate_ud(fid1, "ud_link", MY_LINKCLASS, NULL, 0, H5P_DEFAULT, H5P_DEFAULT);
-/*-------------------------------------------------------------------------
- * Close
- *-------------------------------------------------------------------------
- */
- status = H5Fclose(fid1);
- return status;
+ /*-------------------------------------------------------------------------
+ * Close
+ *-------------------------------------------------------------------------
+ */
+ status = H5Fclose(fid1);
+ return status;
}
@@ -610,50 +609,50 @@ static
int test_attributes(const char *file,
int make_diffs /* flag to modify data buffers */)
{
- hid_t fid;
- hid_t did;
- hid_t gid;
- hid_t root_id;
- hid_t sid;
- hsize_t dims[1]={2};
- herr_t status;
-
- /* Create a file */
- if ((fid = H5Fcreate(file, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT))<0)
- return -1;
-
- /* Create a 1D dataset */
- sid = H5Screate_simple(1,dims,NULL);
- did = H5Dcreate(fid,"dset",H5T_NATIVE_INT,sid,H5P_DEFAULT);
- status = H5Sclose(sid);
- assert(status>=0);
-
- /* Create groups */
- gid = H5Gcreate(fid,"g1",0);
- root_id = H5Gopen(fid, "/");
-
-/*-------------------------------------------------------------------------
- * write a series of attributes on the dataset, group, and root group
- *-------------------------------------------------------------------------
- */
+ hid_t fid;
+ hid_t did;
+ hid_t gid;
+ hid_t root_id;
+ hid_t sid;
+ hsize_t dims[1]={2};
+ herr_t status;
+
+ /* Create a file */
+ if ((fid = H5Fcreate(file, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT))<0)
+ return -1;
+
+ /* Create a 1D dataset */
+ sid = H5Screate_simple(1,dims,NULL);
+ did = H5Dcreate(fid,"dset",H5T_NATIVE_INT,sid,H5P_DEFAULT);
+ status = H5Sclose(sid);
+ assert(status>=0);
+
+ /* Create groups */
+ gid = H5Gcreate2(fid, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ root_id = H5Gopen(fid, "/");
+
+ /*-------------------------------------------------------------------------
+ * write a series of attributes on the dataset, group, and root group
+ *-------------------------------------------------------------------------
+ */
- write_attr_in(did,"dset",fid,make_diffs);
- write_attr_in(gid,NULL,0,make_diffs);
- write_attr_in(root_id,NULL,0,make_diffs);
+ write_attr_in(did,"dset",fid,make_diffs);
+ write_attr_in(gid,NULL,0,make_diffs);
+ write_attr_in(root_id,NULL,0,make_diffs);
- /* Close */
- status = H5Dclose(did);
- assert(status>=0);
- status = H5Gclose(gid);
- assert(status>=0);
- status = H5Gclose(root_id);
- assert(status>=0);
+ /* Close */
+ status = H5Dclose(did);
+ assert(status>=0);
+ status = H5Gclose(gid);
+ assert(status>=0);
+ status = H5Gclose(root_id);
+ assert(status>=0);
- /* Close file */
- status = H5Fclose(fid);
- assert(status>=0);
- return status;
+ /* Close file */
+ status = H5Fclose(fid);
+ assert(status>=0);
+ return status;
}
@@ -671,50 +670,48 @@ static
int test_datasets(const char *file,
int make_diffs /* flag to modify data buffers */)
{
- hid_t fid;
- hid_t did;
- hid_t gid;
- hid_t sid;
- hsize_t dims[1]={2};
- herr_t status;
- int buf[2]={1,2};
-
- if (make_diffs)
- {
- memset(buf,0,sizeof buf);
- }
-
- /* Create a file */
- if ((fid = H5Fcreate(file, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT))<0)
- return -1;
-
- /* Create a 1D dataset */
- sid = H5Screate_simple(1,dims,NULL);
- did = H5Dcreate(fid,"dset",H5T_NATIVE_INT,sid,H5P_DEFAULT);
- status = H5Dwrite(did,H5T_NATIVE_INT,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf);
- status = H5Sclose(sid);
- assert(status>=0);
-
- /* Create a group */
- gid = H5Gcreate(fid,"g1",0);
+ hid_t fid;
+ hid_t did;
+ hid_t gid;
+ hid_t sid;
+ hsize_t dims[1]={2};
+ herr_t status;
+ int buf[2]={1,2};
+
+ if (make_diffs)
+ memset(buf,0,sizeof buf);
+
+ /* Create a file */
+ if ((fid = H5Fcreate(file, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT))<0)
+ return -1;
+
+ /* Create a 1D dataset */
+ sid = H5Screate_simple(1,dims,NULL);
+ did = H5Dcreate(fid,"dset",H5T_NATIVE_INT,sid,H5P_DEFAULT);
+ status = H5Dwrite(did,H5T_NATIVE_INT,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf);
+ status = H5Sclose(sid);
+ assert(status>=0);
+
+ /* Create a group */
+ gid = H5Gcreate2(fid, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ /*-------------------------------------------------------------------------
+ * write a series of datasets on the group
+ *-------------------------------------------------------------------------
+ */
-/*-------------------------------------------------------------------------
- * write a series of datasets on the group
- *-------------------------------------------------------------------------
- */
+ write_dset_in(gid,"/dset",fid,make_diffs);
- write_dset_in(gid,"/dset",fid,make_diffs);
+ /* Close */
+ status = H5Dclose(did);
+ assert(status>=0);
+ status = H5Gclose(gid);
+ assert(status>=0);
- /* Close */
- status = H5Dclose(did);
- assert(status>=0);
- status = H5Gclose(gid);
- assert(status>=0);
-
- /* Close file */
- status = H5Fclose(fid);
- assert(status>=0);
- return status;
+ /* Close file */
+ status = H5Fclose(fid);
+ assert(status>=0);
+ return status;
}
/*-------------------------------------------------------------------------
diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c
index 463230e..321a15d 100644
--- a/tools/h5dump/h5dumpgentest.c
+++ b/tools/h5dump/h5dumpgentest.c
@@ -125,7 +125,7 @@ const H5Z_class_t H5Z_MYFILTER[1] = {{
/* A UD link traversal function. Shouldn't actually be called. */
static hid_t UD_traverse(UNUSED const char * link_name, UNUSED hid_t cur_group,
- UNUSED void * udata, UNUSED size_t udata_size, UNUSED hid_t lapl_id)
+ UNUSED const void * udata, UNUSED size_t udata_size, UNUSED hid_t lapl_id)
{
return -1;
}
@@ -232,39 +232,39 @@ static void gent_group(void)
fid = H5Fcreate(FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/* / */
- group = H5Gcreate (fid, "/g1", 0);
+ group = H5Gcreate2(fid, "/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group);
- group = H5Gcreate (fid, "/g2", 0);
+ group = H5Gcreate2(fid, "/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group);
- group = H5Gcreate (fid, "/g3", 0);
+ group = H5Gcreate2(fid, "/g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group);
/* /g1 */
- group = H5Gcreate (fid, "/g1/g1.1", 0);
+ group = H5Gcreate2(fid, "/g1/g1.1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group);
- group = H5Gcreate (fid, "/g1/g1.2", 0);
+ group = H5Gcreate2(fid, "/g1/g1.2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group);
/* /g2 */
- group = H5Gcreate (fid, "/g2/g2.1", 0);
+ group = H5Gcreate2(fid, "/g2/g2.1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group);
/* /g3 */
- group = H5Gcreate (fid, "/g3/g3.1", 0);
+ group = H5Gcreate2(fid, "/g3/g3.1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group);
- group = H5Gcreate (fid, "/g3/g3.2", 0);
+ group = H5Gcreate2(fid, "/g3/g3.2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group);
- group = H5Gcreate (fid, "/g3/g3.3", 0);
+ group = H5Gcreate2(fid, "/g3/g3.3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group);
- group = H5Gcreate (fid, "/g3/g3.4", 0);
+ group = H5Gcreate2(fid, "/g3/g3.4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group);
/* /g2/g2.1 */
- group = H5Gcreate (fid, "/g2/g2.1/g2.1.1", 0);
+ group = H5Gcreate2(fid, "/g2/g2.1/g2.1.1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group);
- group = H5Gcreate (fid, "/g2/g2.1/g2.1.2", 0);
+ group = H5Gcreate2(fid, "/g2/g2.1/g2.1.2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group);
- group = H5Gcreate (fid, "/g2/g2.1/g2.1.3", 0);
+ group = H5Gcreate2(fid, "/g2/g2.1/g2.1.3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group);
H5Fclose(fid);
@@ -464,11 +464,11 @@ static void gent_hardlink(void)
H5Sclose(space);
H5Dclose(dataset);
- group = H5Gcreate (fid, "/g1", 0);
+ group = H5Gcreate2(fid, "/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Glink (group, H5L_TYPE_HARD, "/dset1", "dset2");
H5Gclose(group);
- group = H5Gcreate (fid, "/g2", 0);
+ group = H5Gcreate2(fid, "/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Glink (group, H5L_TYPE_HARD, "/dset1", "dset3");
H5Gclose(group);
@@ -602,7 +602,7 @@ static void gent_compound_dt(void) { /* test compound data type */
type2 = H5Tcreate (H5T_COMPOUND, sizeof(dset2_t));
H5Tinsert(type2, "int_name", HOFFSET(dset2_t, a), H5T_NATIVE_INT);
H5Tinsert(type2, "float_name", HOFFSET(dset2_t, b), H5T_NATIVE_FLOAT);
- group = H5Gcreate (fid, "/group1", 0);
+ group = H5Gcreate2(fid, "/group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
dataset = H5Dcreate(group, "dset2", type, space, H5P_DEFAULT);
H5Dwrite(dataset, type2, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2);
@@ -674,7 +674,7 @@ static void gent_compound_dt(void) { /* test compound data type */
/* unamed data type */
- group = H5Gcreate (fid, "/group2", 0);
+ group = H5Gcreate2(fid, "/group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
type = H5Tcreate (H5T_COMPOUND, sizeof(dset5_t));
H5Tinsert(type, "int", HOFFSET(dset5_t, a), H5T_STD_I32BE);
@@ -806,7 +806,7 @@ static void gent_compound_dt2(void) { /* test compound data type */
H5Tinsert(type, "float_name", HOFFSET(dset2_t, b), H5T_IEEE_F32BE);
H5Tcommit(fid, "type1", type);
- group = H5Gcreate (fid, "/group1", 0);
+ group = H5Gcreate2(fid, "/group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
dataset = H5Dcreate(group, "dset2", type, space, create_plist);
@@ -856,7 +856,7 @@ static void gent_compound_dt2(void) { /* test compound data type */
/* unamed data type */
- group = H5Gcreate (fid, "/group2", 0);
+ group = H5Gcreate2(fid, "/group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
type = H5Tcreate (H5T_COMPOUND, sizeof(dset5_t));
H5Tinsert(type, "int", HOFFSET(dset5_t, a), H5T_STD_I32BE);
@@ -905,19 +905,19 @@ static void gent_all(void)
fid = H5Fcreate(FILE7, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/* create groups */
- group = H5Gcreate (fid, "/g1", 0);
+ group = H5Gcreate2(fid, "/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group);
- group = H5Gcreate (fid, "/g2", 0);
+ group = H5Gcreate2(fid, "/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group);
- group = H5Gcreate (fid, "/g1/g1.1", 0);
+ group = H5Gcreate2(fid, "/g1/g1.1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group);
- group = H5Gcreate (fid, "/g1/g1.2", 0);
+ group = H5Gcreate2(fid, "/g1/g1.2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group);
- group = H5Gcreate (fid, "/g1/g1.2/g1.2.1", 0);
+ group = H5Gcreate2(fid, "/g1/g1.2/g1.2.1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group);
/* root attributes */
@@ -1041,9 +1041,9 @@ hid_t fid, group;
fid = H5Fcreate(FILE10, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- group = H5Gcreate (fid, "/g1", 0);
+ group = H5Gcreate2(fid, "/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group);
- group = H5Gcreate (fid, "/g2", 0);
+ group = H5Gcreate2(fid, "/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group);
H5Glink(fid, H5L_TYPE_HARD, "/g2", "/g1/g1.1");
@@ -1058,11 +1058,11 @@ hid_t fid, group;
fid = H5Fcreate(FILE11, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/* create group object g1 and implcit path from root object */
- group = H5Gcreate (fid, "/g1", 0);
+ group = H5Gcreate2(fid, "/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group);
/* create group object g2 and implcit path from root object */
- group = H5Gcreate (fid, "/g2", 0);
+ group = H5Gcreate2(fid, "/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group);
/* create path from object at /g1 to object at /g2 and name it g1.1 */
@@ -1111,7 +1111,7 @@ static void gent_many(void)
fid = H5Fcreate(FILE12, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- group = H5Gcreate (fid, "/g1", 0);
+ group = H5Gcreate2(fid, "/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group);
create_plist = H5Pcreate(H5P_DATASET_CREATE);
@@ -1119,7 +1119,7 @@ static void gent_many(void)
sdim = 2;
H5Pset_chunk(create_plist, 1, &sdim);
- group = H5Gcreate (fid, "/g1/g1.1", 0);
+ group = H5Gcreate2(fid, "/g1/g1.1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
type = H5Tcreate (H5T_COMPOUND, sizeof(dset1[0]));
@@ -1210,18 +1210,18 @@ static void gent_many(void)
H5Tclose(type2);
H5Gclose(group);
- group = H5Gcreate (fid, "/g1/g1.2", 0);
+ group = H5Gcreate2(fid, "/g1/g1.2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Glink (group, H5L_TYPE_HARD, "/g1/g1.1/dset1", "link1");
H5Gclose(group);
- group = H5Gcreate (fid, "/g2", 0);
+ group = H5Gcreate2(fid, "/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Glink (group, H5L_TYPE_SOFT, "/g1", "slink2");
H5Gclose(group);
- group = H5Gcreate (fid, "/g3", 0);
+ group = H5Gcreate2(fid, "/g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group);
- group = H5Gcreate (fid, "/g4", 0);
+ group = H5Gcreate2(fid, "/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/* dset2 */
dims[0] = 10; dims[1] = 10;
@@ -1242,10 +1242,10 @@ static void gent_many(void)
H5Glink (group, H5L_TYPE_HARD, "/g4/dset2", "link3");
H5Gclose(group);
- group = H5Gcreate (fid, "/g5", 0);
+ group = H5Gcreate2(fid, "/g5", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group);
- group = H5Gcreate (fid, "/g6", 0);
+ group = H5Gcreate2(fid, "/g6", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/* dset3 */
dims[0] = 10; dims[1] = 10;
space = H5Screate_simple(2, dims, NULL);
@@ -1266,9 +1266,9 @@ static void gent_many(void)
H5Gclose(group);
H5Pclose(create_plist);
- group = H5Gcreate (fid, "/g7", 0);
+ group = H5Gcreate2(fid, "/g7", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group);
- group = H5Gcreate (fid, "/g8", 0);
+ group = H5Gcreate2(fid, "/g8", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group);
/* Create dangling external and UD links */
@@ -1472,7 +1472,7 @@ hsize_t sdim;
/* dset1 */
- group = H5Gcreate (fid, "/g1", 0);
+ group = H5Gcreate2(fid, "/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
dataset = H5Dcreate(group, "dset1", fxdlenstr, space, H5P_DEFAULT);
/* add attributes to dset1 */
@@ -1507,7 +1507,7 @@ hsize_t sdim;
H5Dclose(dataset);
H5Gclose(group);
- group = H5Gcreate (fid, "/g2", 0);
+ group = H5Gcreate2(fid, "/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
dataset = H5Dcreate(group, "dset2", fxdlenstr, space, H5P_DEFAULT);
for (i = 0; (hsize_t)i < sdim; i++) {
@@ -1527,7 +1527,7 @@ hsize_t sdim;
H5Tset_cset(fxdlenstr, H5T_CSET_ASCII);
H5Tset_strpad(fxdlenstr, H5T_STR_NULLPAD);
- group = H5Gcreate (fid, "/g3", 0);
+ group = H5Gcreate2(fid, "/g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
dataset = H5Dcreate(group, "dset3", fxdlenstr, space, H5P_DEFAULT);
for (i = 0;(hsize_t) i < sdim; i++) {
@@ -1541,7 +1541,7 @@ hsize_t sdim;
H5Gclose(group);
- group = H5Gcreate (fid, "/g4", 0);
+ group = H5Gcreate2(fid, "/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
dataset = H5Dcreate(group, "dset4", fxdlenstr, space, H5P_DEFAULT);
for (i = 0; (hsize_t)i < sdim; i++) {
@@ -1560,7 +1560,7 @@ hsize_t sdim;
H5Tset_cset(fxdlenstr, H5T_CSET_ASCII);
H5Tset_strpad(fxdlenstr, H5T_STR_SPACEPAD);
- group = H5Gcreate (fid, "/g5", 0);
+ group = H5Gcreate2(fid, "/g5", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
dataset = H5Dcreate(group, "dset5", fxdlenstr, space, H5P_DEFAULT);
for (i = 0; (hsize_t)i < sdim; i++) {
@@ -1574,7 +1574,7 @@ hsize_t sdim;
H5Gclose(group);
- group = H5Gcreate (fid, "/g6", 0);
+ group = H5Gcreate2(fid, "/g6", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
dataset = H5Dcreate(group, "dset6", fxdlenstr, space, H5P_DEFAULT);
for (i = 0; (hsize_t)i < sdim; i++) {
@@ -1655,7 +1655,7 @@ static void gent_objref(void)
sid1 = H5Screate_simple(SPACE1_RANK, dims1, NULL);
/* Create a group */
- group=H5Gcreate(fid1,"Group1",(size_t)-1);
+ group = H5Gcreate2(fid1, "Group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/* Set group's comment */
H5Gset_comment(group,".",write_comment);
@@ -1994,7 +1994,7 @@ static void gent_bitfields(void)
file = H5Fcreate(FILE20, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- if ((grp=H5Gcreate(file, "typetests", 0))<0) goto error;
+ if((grp = H5Gcreate2(file, "typetests", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error;
/* bitfield_1 */
nelmts = sizeof(buf);
@@ -2875,51 +2875,51 @@ static void gent_group_comments(void)
fid = H5Fcreate(FILE33, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/* / */
- group = H5Gcreate (fid, "/g1", 0);
+ group = H5Gcreate2(fid, "/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gset_comment(group, "/g1", "Comment for group /g1");
H5Gclose(group);
- group = H5Gcreate (fid, "/g2", 0);
+ group = H5Gcreate2(fid, "/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gset_comment(group, "/g2", "Comment for group /g2");
H5Gclose(group);
- group = H5Gcreate (fid, "/g3", 0);
+ group = H5Gcreate2(fid, "/g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gset_comment(group, "/g3", "Comment for group /g3");
H5Gclose(group);
/* /g1 */
- group = H5Gcreate (fid, "/g1/g1.1", 0);
+ group = H5Gcreate2(fid, "/g1/g1.1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gset_comment(group, "/g1/g1.1", "Comment for group /g1/g1.1");
H5Gclose(group);
- group = H5Gcreate (fid, "/g1/g1.2", 0);
+ group = H5Gcreate2(fid, "/g1/g1.2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gset_comment(group, "/g1/g1.2", "Comment for group /g1/g1.2");
H5Gclose(group);
/* /g2 */
- group = H5Gcreate (fid, "/g2/g2.1", 0);
+ group = H5Gcreate2(fid, "/g2/g2.1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gset_comment(group, "/g2/g2.1", "Comment for group /g2/g2.1");
H5Gclose(group);
/* /g3 */
- group = H5Gcreate (fid, "/g3/g3.1", 0);
+ group = H5Gcreate2(fid, "/g3/g3.1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gset_comment(group, "/g3/g3.1", "Comment for group /g3/g3.1");
H5Gclose(group);
- group = H5Gcreate (fid, "/g3/g3.2", 0);
+ group = H5Gcreate2(fid, "/g3/g3.2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gset_comment(group, "/g3/g3.2", "Comment for group /g3/g3.2");
H5Gclose(group);
- group = H5Gcreate (fid, "/g3/g3.3", 0);
+ group = H5Gcreate2(fid, "/g3/g3.3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gset_comment(group, "/g3/g3.3", "Comment for group /g3/g3.3");
H5Gclose(group);
- group = H5Gcreate (fid, "/g3/g3.4", 0);
+ group = H5Gcreate2(fid, "/g3/g3.4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gset_comment(group, "/g3/g3.4", "Comment for group /g3/g3.4");
H5Gclose(group);
/* /g2/g2.1 */
- group = H5Gcreate (fid, "/g2/g2.1/g2.1.1", 0);
+ group = H5Gcreate2(fid, "/g2/g2.1/g2.1.1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gset_comment(group, "/g2/g2.1/g2.1.1", "Comment for group /g2/g2.1/g2.1.1");
H5Gclose(group);
- group = H5Gcreate (fid, "/g2/g2.1/g2.1.2", 0);
+ group = H5Gcreate2(fid, "/g2/g2.1/g2.1.2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gset_comment(group, "/g2/g2.1/g2.1.2", "Comment for group /g2/g2.1/g2.1.2");
H5Gclose(group);
- group = H5Gcreate (fid, "/g2/g2.1/g2.1.3", 0);
+ group = H5Gcreate2(fid, "/g2/g2.1/g2.1.3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gset_comment(group, "/g2/g2.1/g2.1.3", "Comment for group /g2/g2.1/g2.1.3");
H5Gclose(group);
@@ -3066,11 +3066,11 @@ static void gent_large_objname(void)
fid = H5Fcreate(FILE37, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- group = H5Gcreate(fid, "this_is_a_large_group_name", 0);
+ group = H5Gcreate2(fid, "this_is_a_large_group_name", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- for (i = 0; i < 50; ++i) {
+ for(i = 0; i < 50; ++i) {
sprintf(grp_name, "this_is_a_large_group_name%d", i);
- group2 = H5Gcreate(group, grp_name, 0);
+ group2 = H5Gcreate2(group, grp_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group2);
}
@@ -4073,58 +4073,58 @@ static void write_dset_in(hid_t loc_id,
static void gent_attr_all(void)
{
- hid_t fid;
- hid_t did;
- hid_t group_id;
- hid_t group2_id;
- hid_t root_id;
- hid_t sid;
- hsize_t dims[1]={2};
- herr_t status;
-
- /* Create a file and a dataset */
- fid = H5Fcreate(FILE40, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
-
- /* Create a 1D dataset */
- sid = H5Screate_simple(1,dims,NULL);
- did = H5Dcreate(fid,"dset",H5T_NATIVE_INT,sid,H5P_DEFAULT);
- status = H5Sclose(sid);
- assert(status>=0);
-
- /* Create groups */
- group_id = H5Gcreate(fid,"g1",0);
- group2_id = H5Gcreate(fid,"g2",0);
- root_id = H5Gopen(fid, "/");
-
-/*-------------------------------------------------------------------------
- * write a series of attributes on the dataset, group
- *-------------------------------------------------------------------------
- */
-
- write_attr_in(did,"dset",fid);
- write_attr_in(group_id,NULL,0);
- write_attr_in(root_id,NULL,0);
-
-/*-------------------------------------------------------------------------
- * write a series of datasets on group 2
- *-------------------------------------------------------------------------
- */
-
- write_dset_in(group2_id,"/dset",fid);
+ hid_t fid;
+ hid_t did;
+ hid_t group_id;
+ hid_t group2_id;
+ hid_t root_id;
+ hid_t sid;
+ hsize_t dims[1]={2};
+ herr_t status;
+
+ /* Create a file and a dataset */
+ fid = H5Fcreate(FILE40, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Create a 1D dataset */
+ sid = H5Screate_simple(1,dims,NULL);
+ did = H5Dcreate(fid,"dset",H5T_NATIVE_INT,sid,H5P_DEFAULT);
+ status = H5Sclose(sid);
+ assert(status>=0);
+
+ /* Create groups */
+ group_id = H5Gcreate2(fid, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ group2_id = H5Gcreate2(fid, "g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ root_id = H5Gopen(fid, "/");
+
+ /*-------------------------------------------------------------------------
+ * write a series of attributes on the dataset, group
+ *-------------------------------------------------------------------------
+ */
+
+ write_attr_in(did,"dset",fid);
+ write_attr_in(group_id,NULL,0);
+ write_attr_in(root_id,NULL,0);
+
+ /*-------------------------------------------------------------------------
+ * write a series of datasets on group 2
+ *-------------------------------------------------------------------------
+ */
+
+ write_dset_in(group2_id,"/dset",fid);
- /* Close */
- status = H5Dclose(did);
- assert(status>=0);
- status = H5Gclose(group_id);
- assert(status>=0);
- status = H5Gclose(group2_id);
- assert(status>=0);
- status = H5Gclose(root_id);
- assert(status>=0);
+ /* Close */
+ status = H5Dclose(did);
+ assert(status>=0);
+ status = H5Gclose(group_id);
+ assert(status>=0);
+ status = H5Gclose(group2_id);
+ assert(status>=0);
+ status = H5Gclose(root_id);
+ assert(status>=0);
- /* Close file */
- status = H5Fclose(fid);
- assert(status>=0);
+ /* Close file */
+ status = H5Fclose(fid);
+ assert(status>=0);
}
@@ -4446,7 +4446,7 @@ static void gent_named_dtype_attr(void)
*/
/* Create a group */
- gid=H5Gcreate(fid,"g1",0);
+ gid = H5Gcreate2(fid, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
assert(gid>0);
/* Create attribute on group */
@@ -4982,112 +4982,112 @@ set_local_myfilter(hid_t dcpl_id, hid_t UNUSED tid, hid_t UNUSED sid)
*/
static void gent_fcontents(void)
{
- hid_t fid; /* file id */
- hid_t gid1; /* group ID */
- hid_t tid; /* datatype ID */
- hsize_t dims[1]={4};
- int buf[4]={1,2,3,4};
- int ret;
+ hid_t fid; /* file id */
+ hid_t gid1; /* group ID */
+ hid_t tid; /* datatype ID */
+ hsize_t dims[1]={4};
+ int buf[4]={1,2,3,4};
+ int ret;
- /* create a file */
- fid = H5Fcreate(FILE46, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- assert(fid>=0);
+ /* create a file */
+ fid = H5Fcreate(FILE46, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ assert(fid>=0);
- write_dset(fid,1,dims,"dset",H5T_NATIVE_INT,buf);
+ write_dset(fid,1,dims,"dset",H5T_NATIVE_INT,buf);
-/*-------------------------------------------------------------------------
- * links
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * links
+ *-------------------------------------------------------------------------
+ */
- /* hard link to "dset" */
- gid1 = H5Gcreate (fid, "/g1", 0);
- H5Glink (gid1, H5L_TYPE_HARD, "/dset", "dset1");
- H5Gclose(gid1);
+ /* hard link to "dset" */
+ gid1 = H5Gcreate2(fid, "/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Glink (gid1, H5L_TYPE_HARD, "/dset", "dset1");
+ H5Gclose(gid1);
- /* hard link to "dset" */
- gid1 = H5Gcreate (fid, "/g2", 0);
- H5Glink (gid1, H5L_TYPE_HARD, "/dset", "dset2");
- H5Gclose(gid1);
+ /* hard link to "dset" */
+ gid1 = H5Gcreate2(fid, "/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Glink (gid1, H5L_TYPE_HARD, "/dset", "dset2");
+ H5Gclose(gid1);
- /* hard link to "g2" */
- gid1 = H5Gopen(fid, "/g1");
- H5Glink (gid1, H5L_TYPE_HARD, "/g2", "g1.1");
- H5Gclose(gid1);
+ /* hard link to "g2" */
+ gid1 = H5Gopen(fid, "/g1");
+ H5Glink (gid1, H5L_TYPE_HARD, "/g2", "g1.1");
+ H5Gclose(gid1);
- /* hard link to "dset" */
- ret=H5Glink (fid, H5L_TYPE_HARD, "/dset", "dset3");
- assert(ret>=0);
+ /* hard link to "dset" */
+ ret=H5Glink (fid, H5L_TYPE_HARD, "/dset", "dset3");
+ assert(ret>=0);
- /* hard link to "dset" */
- ret=H5Glink (fid, H5L_TYPE_HARD, "/dset", "dset4");
- assert(ret>=0);
+ /* hard link to "dset" */
+ ret=H5Glink (fid, H5L_TYPE_HARD, "/dset", "dset4");
+ assert(ret>=0);
- /* soft link to itself */
- ret=H5Glink (fid, H5L_TYPE_SOFT, "mylink", "mylink");
- assert(ret>=0);
+ /* soft link to itself */
+ ret=H5Glink (fid, H5L_TYPE_SOFT, "mylink", "mylink");
+ assert(ret>=0);
- /* soft link to "dset" */
- ret=H5Glink (fid, H5L_TYPE_SOFT, "/dset", "softlink");
- assert(ret>=0);
+ /* soft link to "dset" */
+ ret=H5Glink (fid, H5L_TYPE_SOFT, "/dset", "softlink");
+ assert(ret>=0);
- /* dangling external link */
- ret=H5Lcreate_external("fname", "oname", fid, "extlink", H5P_DEFAULT, H5P_DEFAULT);
- assert(ret>=0);
+ /* dangling external link */
+ ret=H5Lcreate_external("fname", "oname", fid, "extlink", H5P_DEFAULT, H5P_DEFAULT);
+ assert(ret>=0);
- /* dangling udlink */
- ret=H5Lcreate_ud(fid, "udlink", MY_LINKCLASS, NULL, 0, H5P_DEFAULT, H5P_DEFAULT);
- assert(ret>=0);
+ /* dangling udlink */
+ ret=H5Lcreate_ud(fid, "udlink", MY_LINKCLASS, NULL, 0, H5P_DEFAULT, H5P_DEFAULT);
+ assert(ret>=0);
-/*-------------------------------------------------------------------------
- * datatypes
- *-------------------------------------------------------------------------
- */
- tid=H5Tcopy(H5T_NATIVE_INT);
- ret=H5Tcommit(fid, "mytype", tid);
- assert(ret>=0);
- ret=H5Tclose(tid);
- assert(ret>=0);
+ /*-------------------------------------------------------------------------
+ * datatypes
+ *-------------------------------------------------------------------------
+ */
+ tid=H5Tcopy(H5T_NATIVE_INT);
+ ret=H5Tcommit(fid, "mytype", tid);
+ assert(ret>=0);
+ ret=H5Tclose(tid);
+ assert(ret>=0);
- /* no name datatype */
- tid=H5Tcopy(H5T_NATIVE_INT);
- ret=H5Tcommit(fid, "mytype2", tid);
- assert(ret>=0);
- write_dset(fid,1,dims,"dsetmytype2",tid,buf);
- ret=H5Gunlink(fid,"mytype2");
- assert(ret>=0);
- ret=H5Tclose(tid);
- assert(ret>=0);
+ /* no name datatype */
+ tid=H5Tcopy(H5T_NATIVE_INT);
+ ret=H5Tcommit(fid, "mytype2", tid);
+ assert(ret>=0);
+ write_dset(fid,1,dims,"dsetmytype2",tid,buf);
+ ret=H5Gunlink(fid,"mytype2");
+ assert(ret>=0);
+ ret=H5Tclose(tid);
+ assert(ret>=0);
-/*-------------------------------------------------------------------------
- * close
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * close
+ *-------------------------------------------------------------------------
+ */
- ret=H5Fclose(fid);
- assert(ret>=0);
+ ret=H5Fclose(fid);
+ assert(ret>=0);
- /* create a file for the bootblock test */
- fid = H5Fcreate(FILE47, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- assert(fid>=0);
+ /* create a file for the bootblock test */
+ fid = H5Fcreate(FILE47, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ assert(fid>=0);
- ret=H5Fclose(fid);
- assert(ret>=0);
+ ret=H5Fclose(fid);
+ assert(ret>=0);
}
/*-------------------------------------------------------------------------
@@ -5366,80 +5366,70 @@ static void gent_string(void)
*/
static void gent_aindices(void)
{
- hid_t fid; /* file id */
- hid_t gid[6]; /* group ids */
- hsize_t dims1[1] = {100};
- hsize_t dims2[2] = {10,10};
- hsize_t dims3[3] = {2,10,10};
- hsize_t dims4[4] = {2,2,10,10};
- int buf1[100];
- int buf2[10][10];
- int buf3[2][10][10];
- int buf4[2][2][10][10];
- int i, j, k, l, n, ret;
-
- for (i=n=0; i<100; i++){
- buf1[i]=n++;
- }
-
- for (i=n=0; i<10; i++){
- for (j=0; j<10; j++){
- buf2[i][j]=n++;
- }
- }
- for (i=n=0; i<2; i++){
- for (j=0; j<10; j++){
- for (k=0; k<10; k++){
- buf3[i][j][k]=n++;
- }
- }
- }
- for (i=n=0; i<2; i++){
- for (j=0; j<2; j++){
- for (k=0; k<10; k++){
- for (l=0; l<10; l++){
- buf4[i][j][k][l]=n++;
- }
- }
- }
- }
-
- /* create a file */
- fid = H5Fcreate(FILE50, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- assert(fid>=0);
-
-/*-------------------------------------------------------------------------
- * root datasets
- *-------------------------------------------------------------------------
- */
- write_dset(fid,1,dims1,"1d",H5T_NATIVE_INT,buf1);
- write_dset(fid,2,dims2,"2d",H5T_NATIVE_INT,buf2);
- write_dset(fid,3,dims3,"3d",H5T_NATIVE_INT,buf3);
- write_dset(fid,4,dims4,"4d",H5T_NATIVE_INT,buf4);
+ hid_t fid; /* file id */
+ hid_t gid[6]; /* group ids */
+ hsize_t dims1[1] = {100};
+ hsize_t dims2[2] = {10,10};
+ hsize_t dims3[3] = {2,10,10};
+ hsize_t dims4[4] = {2,2,10,10};
+ int buf1[100];
+ int buf2[10][10];
+ int buf3[2][10][10];
+ int buf4[2][2][10][10];
+ int i, j, k, l, n, ret;
+
+ for(i = n = 0; i < 100; i++)
+ buf1[i] = n++;
+
+ for(i = n = 0; i < 10; i++)
+ for(j = 0; j < 10; j++)
+ buf2[i][j] = n++;
+ for(i = n = 0; i < 2; i++)
+ for(j = 0; j < 10; j++)
+ for(k = 0; k < 10; k++)
+ buf3[i][j][k] = n++;
+ for(i = n = 0; i < 2; i++)
+ for(j = 0; j < 2; j++)
+ for(k = 0; k < 10; k++)
+ for(l = 0; l < 10; l++)
+ buf4[i][j][k][l] = n++;
-/*-------------------------------------------------------------------------
- * test with group indentation
- *-------------------------------------------------------------------------
- */
- gid[0] = H5Gcreate (fid, "/g1", 0);
- gid[1] = H5Gcreate (fid, "g1/g2", 0);
- gid[2] = H5Gcreate (fid, "g1/g2/g3", 0);
- gid[3] = H5Gcreate (fid, "g1/g2/g3/g4", 0);
- gid[4] = H5Gcreate (fid, "g1/g2/g3/g4/g5", 0);
- gid[5] = H5Gcreate (fid, "g1/g2/g3/g4/g5/g6", 0);
- write_dset(gid[5],1,dims1,"1d",H5T_NATIVE_INT,buf1);
- write_dset(gid[5],2,dims2,"2d",H5T_NATIVE_INT,buf2);
- write_dset(gid[5],3,dims3,"3d",H5T_NATIVE_INT,buf3);
- write_dset(gid[5],4,dims4,"4d",H5T_NATIVE_INT,buf4);
- for (i=0; i<6; i++)
- H5Gclose(gid[i]);
+ /* create a file */
+ fid = H5Fcreate(FILE50, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ assert(fid>=0);
-/*-------------------------------------------------------------------------
- * close
- *-------------------------------------------------------------------------
- */
- ret=H5Fclose(fid);
- assert(ret>=0);
+ /*-------------------------------------------------------------------------
+ * root datasets
+ *-------------------------------------------------------------------------
+ */
+ write_dset(fid,1,dims1,"1d",H5T_NATIVE_INT,buf1);
+ write_dset(fid,2,dims2,"2d",H5T_NATIVE_INT,buf2);
+ write_dset(fid,3,dims3,"3d",H5T_NATIVE_INT,buf3);
+ write_dset(fid,4,dims4,"4d",H5T_NATIVE_INT,buf4);
+
+ /*-------------------------------------------------------------------------
+ * test with group indentation
+ *-------------------------------------------------------------------------
+ */
+ gid[0] = H5Gcreate2(fid, "/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ gid[1] = H5Gcreate2(fid, "g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ gid[2] = H5Gcreate2(fid, "g1/g2/g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ gid[3] = H5Gcreate2(fid, "g1/g2/g3/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ gid[4] = H5Gcreate2(fid, "g1/g2/g3/g4/g5", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ gid[5] = H5Gcreate2(fid, "g1/g2/g3/g4/g5/g6", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ write_dset(gid[5],1,dims1,"1d",H5T_NATIVE_INT,buf1);
+ write_dset(gid[5],2,dims2,"2d",H5T_NATIVE_INT,buf2);
+ write_dset(gid[5],3,dims3,"3d",H5T_NATIVE_INT,buf3);
+ write_dset(gid[5],4,dims4,"4d",H5T_NATIVE_INT,buf4);
+ for(i = 0; i < 6; i++)
+ H5Gclose(gid[i]);
+
+ /*-------------------------------------------------------------------------
+ * close
+ *-------------------------------------------------------------------------
+ */
+ ret=H5Fclose(fid);
+ assert(ret>=0);
}
@@ -5464,7 +5454,7 @@ static void gent_longlinks(void)
assert(fid >= 0);
/* Create group with short name in file (used as target for hard links) */
- gid=H5Gcreate(fid, "grp1", (size_t)0);
+ gid = H5Gcreate2(fid, "grp1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
assert(gid >= 0);
/* Construct very long file name */
@@ -5482,7 +5472,7 @@ static void gent_longlinks(void)
assert(H5Lcreate_soft("grp1", fid, objname, H5P_DEFAULT, H5P_DEFAULT) >= 0);
/* Create group with long name in existing group */
- gid2=H5Gcreate(gid, objname, (size_t)0);
+ gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
assert(gid2 >= 0);
/* Close objects */
diff --git a/tools/h5import/h5import.c b/tools/h5import/h5import.c
index cd99ce0..b494a67 100755
--- a/tools/h5import/h5import.c
+++ b/tools/h5import/h5import.c
@@ -848,17 +848,14 @@ processStrData(FILE **strm, struct Input *in, hid_t file_id)
{
/* create parent groups */
- if (in->path.count > 1)
- {
+ if(in->path.count > 1) {
j = 0;
handle = file_id;
- while (j<in->path.count-1)
- {
- if ((group_id = H5Gopen(handle, in->path.group[j])) < 0)
- {
- group_id = H5Gcreate(handle, in->path.group[j++], 0);
- for (; j<in->path.count-1; j++)
- group_id = H5Gcreate(group_id, in->path.group[j], 0);
+ while(j < in->path.count - 1) {
+ if((group_id = H5Gopen(handle, in->path.group[j])) < 0) {
+ group_id = H5Gcreate2(handle, in->path.group[j++], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ for(; j < in->path.count - 1; j++)
+ group_id = H5Gcreate2(group_id, in->path.group[j], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
handle = group_id;
break;
}
@@ -866,10 +863,9 @@ processStrData(FILE **strm, struct Input *in, hid_t file_id)
j++;
}
}
- else
- {
+ else {
handle = file_id;
- j=0;
+ j = 0;
}
/*enable error reporting */
@@ -2443,31 +2439,26 @@ process(struct Options *opt)
/* disable error reporting */
H5E_BEGIN_TRY {
-
- /* create parent groups */
- if (in->path.count > 1)
- {
- j = 0;
- handle = file_id;
- while (j<in->path.count-1)
- {
- if ((group_id = H5Gopen(handle, in->path.group[j])) < 0)
- {
- group_id = H5Gcreate(handle, in->path.group[j++], 0);
- for (; j<in->path.count-1; j++)
- group_id = H5Gcreate(group_id, in->path.group[j], 0);
- handle = group_id;
- break;
+ /* create parent groups */
+ if(in->path.count > 1) {
+ j = 0;
+ handle = file_id;
+ while(j < in->path.count - 1) {
+ if((group_id = H5Gopen(handle, in->path.group[j])) < 0) {
+ group_id = H5Gcreate2(handle, in->path.group[j++], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ for (; j < in->path.count - 1; j++)
+ group_id = H5Gcreate2(group_id, in->path.group[j], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ handle = group_id;
+ break;
+ }
+ handle = group_id;
+ j++;
+ }
+ }
+ else {
+ handle = file_id;
+ j=0;
}
- handle = group_id;
- j++;
- }
- }
- else
- {
- handle = file_id;
- j=0;
- }
/*enable error reporting */
} H5E_END_TRY;
diff --git a/tools/h5jam/h5jamgentest.c b/tools/h5jam/h5jamgentest.c
index 0ae81d8..d0c1283 100644
--- a/tools/h5jam/h5jamgentest.c
+++ b/tools/h5jam/h5jamgentest.c
@@ -22,6 +22,7 @@
* trying it on a new platform, ...), you need to verify the correctness
* of the expected output and update the corresponding *.ddl files.
*/
+#include <assert.h>
#include <limits.h>
#include "hdf5.h"
@@ -122,10 +123,12 @@ typedef struct s1_t {
#define VLSTR_TYPE "vl_string_type"
/* A UD link traversal function. Shouldn't actually be called. */
-static hid_t UD_traverse(const char UNUSED * link_name, hid_t UNUSED cur_group, void UNUSED * udata, size_t UNUSED udata_size, hid_t UNUSED lapl_id)
+static hid_t UD_traverse(const char UNUSED * link_name, hid_t UNUSED cur_group,
+ const void UNUSED * udata, size_t UNUSED udata_size, hid_t UNUSED lapl_id)
{
-return -1;
+ return -1;
}
+
#define MY_LINKCLASS 187
const H5L_class_t UD_link_class[1] = {{
H5L_LINK_CLASS_T_VERS, /* H5L_class_t version */
@@ -184,19 +187,19 @@ gent_ub(const char * filename, size_t ub_size, size_t ub_fill)
}
/* create groups */
- group = H5Gcreate(fid, "/g1", (size_t)0);
+ group = H5Gcreate2(fid, "/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group);
- group = H5Gcreate(fid, "/g2", (size_t)0);
+ group = H5Gcreate2(fid, "/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group);
- group = H5Gcreate(fid, "/g1/g1.1", (size_t)0);
+ group = H5Gcreate2(fid, "/g1/g1.1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group);
- group = H5Gcreate(fid, "/g1/g1.2", (size_t)0);
+ group = H5Gcreate2(fid, "/g1/g1.2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group);
- group = H5Gcreate(fid, "/g1/g1.2/g1.2.1", (size_t)0);
+ group = H5Gcreate2(fid, "/g1/g1.2/g1.2.1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group);
/* root attributes */
@@ -330,28 +333,23 @@ create_textfile(const char *name, size_t size)
size_t i;
char *bp;
- #ifdef _WIN32
- fd = _creat(name, _S_IREAD | _S_IWRITE);
- #else /* _WIN32 */
- fd = creat(name,(mode_t)0777);
- #endif /* _WIN32 */
- if (fd < 0) {
- /* panic */
- }
- buf = calloc(size, (size_t)1);
- if (buf == NULL) {
- /* panic */
- }
- /* fill buf with pattern */
- bp = buf;
- for (i = 0; i < size; i++) {
- *bp++ = pattern[i%10];
- }
+#ifdef _WIN32
+ fd = _creat(name, _S_IREAD | _S_IWRITE);
+#else /* _WIN32 */
+ fd = creat(name,(mode_t)0777);
+#endif /* _WIN32 */
+ assert(fd >= 0);
+ buf = calloc(size, (size_t)1);
+ assert(buf);
+ /* fill buf with pattern */
+ bp = buf;
+ for(i = 0; i < size; i++)
+ *bp++ = pattern[i % 10];
- HDwrite(fd,buf,size);
+ HDwrite(fd, buf, size);
- close(fd);
+ close(fd);
}
#ifdef notdef
diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c
index bbb8d1c..e9a89e2 100644
--- a/tools/h5repack/h5repack_copy.c
+++ b/tools/h5repack/h5repack_copy.c
@@ -346,8 +346,8 @@ int do_copy_objects(hid_t fidin,
goto error;
}
else {
- if ((grp_out=H5Gcreate(fidout,travt->objs[i].name, 0))<0)
- goto error;
+ if((grp_out = H5Gcreate2(fidout, travt->objs[i].name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ goto error;
}
if((grp_in = H5Gopen (fidin,travt->objs[i].name))<0)
diff --git a/tools/h5repack/h5repacktst.c b/tools/h5repack/h5repacktst.c
index 93d9b23..3328c70 100644
--- a/tools/h5repack/h5repacktst.c
+++ b/tools/h5repack/h5repacktst.c
@@ -1544,75 +1544,75 @@ out:
*/
int make_all_objects(hid_t loc_id)
{
- hid_t dset_id;
- hid_t group_id;
- hid_t type_id;
- hid_t root_id;
- hid_t space_id;
- hsize_t dims[1]={2};
- /* Compound datatype */
- typedef struct s_t
- {
- int a;
- float b;
- } s_t;
-
-/*-------------------------------------------------------------------------
- * H5G_DATASET
- *-------------------------------------------------------------------------
- */
- space_id = H5Screate_simple(1,dims,NULL);
- dset_id = H5Dcreate(loc_id,"dset_referenced",H5T_NATIVE_INT,space_id,H5P_DEFAULT);
- H5Sclose(space_id);
-
-/*-------------------------------------------------------------------------
- * H5G_GROUP
- *-------------------------------------------------------------------------
- */
- group_id = H5Gcreate(loc_id,"g1",0);
- root_id = H5Gopen(loc_id, "/");
-
-/*-------------------------------------------------------------------------
- * H5G_TYPE
- *-------------------------------------------------------------------------
- */
-
- /* Create a memory compound datatype */
- type_id = H5Tcreate (H5T_COMPOUND, sizeof(s_t));
- H5Tinsert(type_id, "a", HOFFSET(s_t, a), H5T_NATIVE_INT);
- H5Tinsert(type_id, "b", HOFFSET(s_t, b), H5T_NATIVE_FLOAT);
- /* Commit compound datatype and close it */
- H5Tcommit(loc_id, "type", type_id);
- H5Tclose(type_id);
-
-/*-------------------------------------------------------------------------
- * H5G_LINK
- *-------------------------------------------------------------------------
- */
-
- H5Glink(loc_id, H5L_TYPE_SOFT, "dset", "link");
-
-/*-------------------------------------------------------------------------
- * H5G_UDLINK
- *-------------------------------------------------------------------------
- */
- /* Create an external link. Other UD links are not supported by h5repack */
- H5Lcreate_external("file", "path", loc_id, "ext_link", H5P_DEFAULT, H5P_DEFAULT);
-
-/*-------------------------------------------------------------------------
- * write a series of datasetes
- *-------------------------------------------------------------------------
- */
-
- write_dset_in(root_id,"dset_referenced",loc_id,0);
-
- /* Close */
- H5Dclose(dset_id);
- H5Gclose(group_id);
- H5Gclose(root_id);
-
- return 0;
-
+ hid_t dset_id;
+ hid_t group_id;
+ hid_t type_id;
+ hid_t root_id;
+ hid_t space_id;
+ hsize_t dims[1]={2};
+ /* Compound datatype */
+ typedef struct s_t
+ {
+ int a;
+ float b;
+ } s_t;
+
+ /*-------------------------------------------------------------------------
+ * H5G_DATASET
+ *-------------------------------------------------------------------------
+ */
+ space_id = H5Screate_simple(1,dims,NULL);
+ dset_id = H5Dcreate(loc_id,"dset_referenced",H5T_NATIVE_INT,space_id,H5P_DEFAULT);
+ H5Sclose(space_id);
+
+ /*-------------------------------------------------------------------------
+ * H5G_GROUP
+ *-------------------------------------------------------------------------
+ */
+ group_id = H5Gcreate2(loc_id, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ root_id = H5Gopen(loc_id, "/");
+
+ /*-------------------------------------------------------------------------
+ * H5G_TYPE
+ *-------------------------------------------------------------------------
+ */
+
+ /* Create a memory compound datatype */
+ type_id = H5Tcreate (H5T_COMPOUND, sizeof(s_t));
+ H5Tinsert(type_id, "a", HOFFSET(s_t, a), H5T_NATIVE_INT);
+ H5Tinsert(type_id, "b", HOFFSET(s_t, b), H5T_NATIVE_FLOAT);
+
+ /* Commit compound datatype and close it */
+ H5Tcommit(loc_id, "type", type_id);
+ H5Tclose(type_id);
+
+ /*-------------------------------------------------------------------------
+ * H5G_LINK
+ *-------------------------------------------------------------------------
+ */
+
+ H5Glink(loc_id, H5L_TYPE_SOFT, "dset", "link");
+
+ /*-------------------------------------------------------------------------
+ * H5G_UDLINK
+ *-------------------------------------------------------------------------
+ */
+ /* Create an external link. Other UD links are not supported by h5repack */
+ H5Lcreate_external("file", "path", loc_id, "ext_link", H5P_DEFAULT, H5P_DEFAULT);
+
+ /*-------------------------------------------------------------------------
+ * write a series of datasetes
+ *-------------------------------------------------------------------------
+ */
+
+ write_dset_in(root_id,"dset_referenced",loc_id,0);
+
+ /* Close */
+ H5Dclose(dset_id);
+ H5Gclose(group_id);
+ H5Gclose(root_id);
+
+ return 0;
}
@@ -1625,45 +1625,43 @@ int make_all_objects(hid_t loc_id)
*/
int make_attributes(hid_t loc_id)
{
- hid_t dset_id;
- hid_t group_id;
- hid_t root_id;
- hid_t space_id;
- hsize_t dims[1]={2};
-
-
-/*-------------------------------------------------------------------------
- * H5G_DATASET
- *-------------------------------------------------------------------------
- */
-
- space_id = H5Screate_simple(1,dims,NULL);
- dset_id = H5Dcreate(loc_id,"dset",H5T_NATIVE_INT,space_id,H5P_DEFAULT);
- H5Sclose(space_id);
-
-/*-------------------------------------------------------------------------
- * H5G_GROUP
- *-------------------------------------------------------------------------
- */
- group_id = H5Gcreate(loc_id,"g1",0);
- root_id = H5Gopen(loc_id, "/");
-
-/*-------------------------------------------------------------------------
- * write a series of attributes on the dataset, group, and root group
- *-------------------------------------------------------------------------
- */
-
- write_attr_in(dset_id,"dset",loc_id,0);
- write_attr_in(group_id,"dset",loc_id,0);
- write_attr_in(root_id,"dset",loc_id,0);
-
- /* Close */
- H5Dclose(dset_id);
- H5Gclose(group_id);
- H5Gclose(root_id);
-
- return 0;
-
+ hid_t dset_id;
+ hid_t group_id;
+ hid_t root_id;
+ hid_t space_id;
+ hsize_t dims[1]={2};
+
+ /*-------------------------------------------------------------------------
+ * H5G_DATASET
+ *-------------------------------------------------------------------------
+ */
+
+ space_id = H5Screate_simple(1,dims,NULL);
+ dset_id = H5Dcreate(loc_id,"dset",H5T_NATIVE_INT,space_id,H5P_DEFAULT);
+ H5Sclose(space_id);
+
+ /*-------------------------------------------------------------------------
+ * H5G_GROUP
+ *-------------------------------------------------------------------------
+ */
+ group_id = H5Gcreate2(loc_id, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ root_id = H5Gopen(loc_id, "/");
+
+ /*-------------------------------------------------------------------------
+ * write a series of attributes on the dataset, group, and root group
+ *-------------------------------------------------------------------------
+ */
+
+ write_attr_in(dset_id,"dset",loc_id,0);
+ write_attr_in(group_id,"dset",loc_id,0);
+ write_attr_in(root_id,"dset",loc_id,0);
+
+ /* Close */
+ H5Dclose(dset_id);
+ H5Gclose(group_id);
+ H5Gclose(root_id);
+
+ return 0;
}
/*-------------------------------------------------------------------------
@@ -1675,50 +1673,49 @@ int make_attributes(hid_t loc_id)
*/
int make_hlinks(hid_t loc_id)
{
- hid_t group1_id;
- hid_t group2_id;
- hid_t group3_id;
- hsize_t dims[2]={3,2};
- int buf[3][2]= {{1,1},{1,2},{2,2}};
-
-/*-------------------------------------------------------------------------
- * create a dataset and some hard links to it
- *-------------------------------------------------------------------------
- */
-
- if (write_dset(loc_id,2,dims,"dset",H5T_NATIVE_INT,buf)<0)
- return -1;
- if (H5Glink(loc_id, H5L_TYPE_HARD, "dset", "link1 to dset")<0)
- return -1;
- if (H5Glink(loc_id, H5L_TYPE_HARD, "dset", "link2 to dset")<0)
- return -1;
- if (H5Glink(loc_id, H5L_TYPE_HARD, "dset", "link3 to dset")<0)
- return -1;
-
-
-/*-------------------------------------------------------------------------
- * create a group and some hard links to it
- *-------------------------------------------------------------------------
- */
-
- if ((group1_id = H5Gcreate(loc_id,"g1",0))<0)
- return -1;
- if ((group2_id = H5Gcreate(group1_id,"g2",0))<0)
- return -1;
- if ((group3_id = H5Gcreate(group2_id,"g3",0))<0)
- return -1;
-
- if (H5Glink2(loc_id, "g1", H5L_TYPE_HARD, group2_id, "link1 to g1")<0)
- return -1;
- if (H5Glink2(group1_id, "g2", H5L_TYPE_HARD, group3_id, "link1 to g2")<0)
- return -1;
-
- H5Gclose(group1_id);
- H5Gclose(group2_id);
- H5Gclose(group3_id);
-
- return 0;
-
+ hid_t group1_id;
+ hid_t group2_id;
+ hid_t group3_id;
+ hsize_t dims[2]={3,2};
+ int buf[3][2]= {{1,1},{1,2},{2,2}};
+
+ /*-------------------------------------------------------------------------
+ * create a dataset and some hard links to it
+ *-------------------------------------------------------------------------
+ */
+
+ if(write_dset(loc_id,2,dims,"dset",H5T_NATIVE_INT,buf)<0)
+ return -1;
+ if(H5Glink(loc_id, H5L_TYPE_HARD, "dset", "link1 to dset")<0)
+ return -1;
+ if(H5Glink(loc_id, H5L_TYPE_HARD, "dset", "link2 to dset")<0)
+ return -1;
+ if(H5Glink(loc_id, H5L_TYPE_HARD, "dset", "link3 to dset")<0)
+ return -1;
+
+
+ /*-------------------------------------------------------------------------
+ * create a group and some hard links to it
+ *-------------------------------------------------------------------------
+ */
+
+ if((group1_id = H5Gcreate2(loc_id, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ return -1;
+ if((group2_id = H5Gcreate2(group1_id, "g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ return -1;
+ if((group3_id = H5Gcreate2(group2_id, "g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ return -1;
+
+ if(H5Glink2(loc_id, "g1", H5L_TYPE_HARD, group2_id, "link1 to g1")<0)
+ return -1;
+ if(H5Glink2(group1_id, "g2", H5L_TYPE_HARD, group3_id, "link1 to g2")<0)
+ return -1;
+
+ H5Gclose(group1_id);
+ H5Gclose(group2_id);
+ H5Gclose(group3_id);
+
+ return 0;
}
diff --git a/tools/h5stat/h5stat_gentest.c b/tools/h5stat/h5stat_gentest.c
index f0219bd..6d82e43 100644
--- a/tools/h5stat/h5stat_gentest.c
+++ b/tools/h5stat/h5stat_gentest.c
@@ -35,45 +35,45 @@
/*
* Generate 1.8 HDF5 file
* with NUM_GRPS groups
- * with NUM_ATTRS for the
+ * with NUM_ATTRS attributes on the dataset
*/
static void gen_file(void)
{
- int ret, i;
- hid_t fapl, gid;
- hid_t file, type_id, space_id, attr_id, dset_id;
- char name[30];
- char attrname[30];
+ int ret, i;
+ hid_t fapl, gid;
+ hid_t file, type_id, space_id, attr_id, dset_id;
+ char name[30];
+ char attrname[30];
+ fapl = H5Pcreate(H5P_FILE_ACCESS);
+ ret = H5Pset_latest_format(fapl, 1);
- fapl = H5Pcreate(H5P_FILE_ACCESS);
- ret = H5Pset_latest_format(fapl,1);
+ /* Create dataset */
+ file = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
+ for(i = 1; i <= NUM_GRPS; i++) {
+ sprintf(name, "%s%d", GROUP_NAME,i);
+ gid = H5Gcreate2(file, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Gclose(gid);
+ }
- /* Create dataset */
- file=H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
- for (i=1; i<=NUM_GRPS; i++) {
- sprintf(name, "%s%d", GROUP_NAME,i);
- gid = H5Gcreate(file, name, (size_t)0);
- H5Gclose(gid);
- }
+ /* Create a datatype to commit and use */
+ type_id = H5Tcopy(H5T_NATIVE_INT);
+ /* Create dataspace for dataset */
+ space_id = H5Screate(H5S_SCALAR);
- /* Create a datatype to commit and use */
- type_id=H5Tcopy(H5T_NATIVE_INT);
- /* Create dataspace for dataset */
- space_id=H5Screate(H5S_SCALAR);
- /* Create dataset */
- dset_id=H5Dcreate(file, DATASET_NAME,type_id,space_id,H5P_DEFAULT);
- for (i=1; i<=NUM_ATTRS; i++) {
- sprintf(attrname, "%s%d", ATTR_NAME,i);
- attr_id=H5Acreate(dset_id,attrname, type_id,space_id,H5P_DEFAULT);
- ret=H5Aclose(attr_id);
- }
+ /* Create dataset */
+ dset_id = H5Dcreate(file, DATASET_NAME, type_id, space_id, H5P_DEFAULT);
+ for(i = 1; i <= NUM_ATTRS; i++) {
+ sprintf(attrname, "%s%d", ATTR_NAME,i);
+ attr_id = H5Acreate(dset_id, attrname, type_id, space_id, H5P_DEFAULT);
+ ret = H5Aclose(attr_id);
+ }
- ret=H5Dclose(dset_id);
- ret=H5Sclose(space_id);
- ret=H5Tclose(type_id);
- ret=H5Fclose(file);
+ ret = H5Dclose(dset_id);
+ ret = H5Sclose(space_id);
+ ret = H5Tclose(type_id);
+ ret = H5Fclose(file);
}
int main(void)
@@ -82,3 +82,4 @@ int main(void)
return 0;
}
+