summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--c++/src/H5CommonFG.cpp72
-rw-r--r--fortran/src/H5Tf.c44
-rw-r--r--src/H5Tdeprec.c8
-rw-r--r--src/H5Tpublic.h8
-rw-r--r--src/H5vers.txt1
-rw-r--r--src/H5version.h15
-rw-r--r--test/dangle.c7
-rw-r--r--test/dt_arith.c54
-rw-r--r--test/dtypes.c48
-rw-r--r--test/getname.c115
-rw-r--r--test/links.c25
-rwxr-xr-xtest/objcopy.c14
-rw-r--r--test/tfile.c12
-rw-r--r--test/th5o.c16
-rw-r--r--test/tmisc.c46
-rw-r--r--test/ttime.c16
-rw-r--r--test/tunicode.c8
-rw-r--r--test/tvlstr.c8
-rw-r--r--test/unlink.c2
-rw-r--r--tools/h5dump/h5dump.c18
-rw-r--r--tools/h5repack/h5repack_copy.c2
-rw-r--r--tools/h5repack/h5repack_refs.c4
-rw-r--r--tools/lib/h5diff.c4
-rw-r--r--tools/lib/h5diff_attr.c2
24 files changed, 256 insertions, 293 deletions
diff --git a/c++/src/H5CommonFG.cpp b/c++/src/H5CommonFG.cpp
index a1f1f90..653cbd1 100644
--- a/c++/src/H5CommonFG.cpp
+++ b/c++/src/H5CommonFG.cpp
@@ -659,15 +659,14 @@ void CommonFG::unmount( const H5std_string& name ) const
//--------------------------------------------------------------------------
DataType CommonFG::openDataType( const char* name ) const
{
- // Call C function H5Topen to open the named datatype in this group,
+ // Call C function H5Topen2 to open the named datatype in this group,
// given either the file or group id
- hid_t type_id = H5Topen(getLocId(), name);
+ hid_t type_id = H5Topen2(getLocId(), name, H5P_DEFAULT);
// If the datatype's opening failed, throw an exception
if( type_id < 0 )
- {
- throwException("openDataType", "H5Topen failed");
- }
+ throwException("openDataType", "H5Topen2 failed");
+
// No failure, create and return the DataType object
DataType data_type(type_id);
return(data_type);
@@ -695,15 +694,14 @@ DataType CommonFG::openDataType( const H5std_string& name ) const
//--------------------------------------------------------------------------
ArrayType CommonFG::openArrayType( const char* name ) const
{
- // Call C function H5Topen to open the named datatype in this group,
+ // Call C function H5Topen2 to open the named datatype in this group,
// given either the file or group id
- hid_t type_id = H5Topen(getLocId(), name);
+ hid_t type_id = H5Topen2(getLocId(), name, H5P_DEFAULT);
// If the datatype's opening failed, throw an exception
if( type_id < 0 )
- {
- throwException("openArrayType", "H5Topen failed");
- }
+ throwException("openArrayType", "H5Topen2 failed");
+
// No failure, create and return the ArrayType object
ArrayType array_type (type_id);
return(array_type);
@@ -731,15 +729,14 @@ ArrayType CommonFG::openArrayType( const H5std_string& name ) const
//--------------------------------------------------------------------------
CompType CommonFG::openCompType( const char* name ) const
{
- // Call C function H5Topen to open the named datatype in this group,
+ // Call C function H5Topen2 to open the named datatype in this group,
// given either the file or group id
- hid_t type_id = H5Topen(getLocId(), name);
+ hid_t type_id = H5Topen2(getLocId(), name, H5P_DEFAULT);
// If the datatype's opening failed, throw an exception
if( type_id < 0 )
- {
- throwException("openCompType", "H5Topen failed");
- }
+ throwException("openCompType", "H5Topen2 failed");
+
// No failure, create and return the CompType object
CompType comp_type(type_id);
return(comp_type);
@@ -767,15 +764,14 @@ CompType CommonFG::openCompType( const H5std_string& name ) const
//--------------------------------------------------------------------------
EnumType CommonFG::openEnumType( const char* name ) const
{
- // Call C function H5Topen to open the named datatype in this group,
+ // Call C function H5Topen2 to open the named datatype in this group,
// given either the file or group id
- hid_t type_id = H5Topen(getLocId(), name);
+ hid_t type_id = H5Topen2(getLocId(), name, H5P_DEFAULT);
// If the datatype's opening failed, throw an exception
if( type_id < 0 )
- {
- throwException("openEnumType", "H5Topen failed");
- }
+ throwException("openEnumType", "H5Topen2 failed");
+
// No failure, create and return the EnumType object
EnumType enum_type(type_id);
return(enum_type);
@@ -803,15 +799,14 @@ EnumType CommonFG::openEnumType( const H5std_string& name ) const
//--------------------------------------------------------------------------
IntType CommonFG::openIntType( const char* name ) const
{
- // Call C function H5Topen to open the named datatype in this group,
+ // Call C function H5Topen2 to open the named datatype in this group,
// given either the file or group id
- hid_t type_id = H5Topen(getLocId(), name);
+ hid_t type_id = H5Topen2(getLocId(), name, H5P_DEFAULT);
// If the datatype's opening failed, throw an exception
if( type_id < 0 )
- {
- throwException("openIntType", "H5Topen failed");
- }
+ throwException("openIntType", "H5Topen2 failed");
+
// No failure, create and return the IntType object
IntType int_type(type_id);
return(int_type);
@@ -839,15 +834,14 @@ IntType CommonFG::openIntType( const H5std_string& name ) const
//--------------------------------------------------------------------------
FloatType CommonFG::openFloatType( const char* name ) const
{
- // Call C function H5Topen to open the named datatype in this group,
+ // Call C function H5Topen2 to open the named datatype in this group,
// given either the file or group id
- hid_t type_id = H5Topen(getLocId(), name);
+ hid_t type_id = H5Topen2(getLocId(), name, H5P_DEFAULT);
// If the datatype's opening failed, throw an exception
if( type_id < 0 )
- {
- throwException("openFloatType", "H5Topen failed");
- }
+ throwException("openFloatType", "H5Topen2 failed");
+
// No failure, create and return the FloatType object
FloatType float_type(type_id);
return(float_type);
@@ -875,15 +869,14 @@ FloatType CommonFG::openFloatType( const H5std_string& name ) const
//--------------------------------------------------------------------------
StrType CommonFG::openStrType( const char* name ) const
{
- // Call C function H5Topen to open the named datatype in this group,
+ // Call C function H5Topen2 to open the named datatype in this group,
// given either the file or group id
- hid_t type_id = H5Topen(getLocId(), name);
+ hid_t type_id = H5Topen2(getLocId(), name, H5P_DEFAULT);
// If the datatype's opening failed, throw an exception
if( type_id < 0 )
- {
- throwException("openStrType", "H5Topen failed");
- }
+ throwException("openStrType", "H5Topen2 failed");
+
// No failure, create and return the StrType object
StrType str_type(type_id);
return(str_type);
@@ -911,15 +904,14 @@ StrType CommonFG::openStrType( const H5std_string& name ) const
//--------------------------------------------------------------------------
VarLenType CommonFG::openVarLenType( const char* name ) const
{
- // Call C function H5Topen to open the named datatype in this group,
+ // Call C function H5Topen2 to open the named datatype in this group,
// given either the file or group id
- hid_t type_id = H5Topen(getLocId(), name);
+ hid_t type_id = H5Topen2(getLocId(), name, H5P_DEFAULT);
// If the datatype's opening failed, throw an exception
if( type_id < 0 )
- {
- throwException("openVarLenType", "H5Topen failed");
- }
+ throwException("openVarLenType", "H5Topen2 failed");
+
// No failure, create and return the VarLenType object
VarLenType varlen_type(type_id);
return(varlen_type);
diff --git a/fortran/src/H5Tf.c b/fortran/src/H5Tf.c
index 044da79..1bd5212 100644
--- a/fortran/src/H5Tf.c
+++ b/fortran/src/H5Tf.c
@@ -20,7 +20,7 @@
/*----------------------------------------------------------------------------
* Name: h5topen_c
- * Purpose: Call H5Topen to open a datatype
+ * Purpose: Call H5Topen2 to open a datatype
* Inputs: loc_id - file or group identifier
* name - name of the datatype within file or group
* namelen - name length
@@ -33,30 +33,30 @@
int_f
nh5topen_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id)
{
- int ret_value = -1;
- char *c_name;
- size_t c_namelen;
- hid_t c_type_id;
- hid_t c_loc_id;
+ char *c_name = NULL;
+ hid_t c_type_id;
+ int ret_value = -1;
- /*
- * Convert FORTRAN name to C name
- */
- c_namelen = *namelen;
- c_name = (char *)HD5f2cstring(name, c_namelen);
- if (c_name == NULL) return ret_value;
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ goto done;
- /*
- * Call H5Topen function.
- */
- c_loc_id = *loc_id;
- c_type_id = H5Topen(c_loc_id, c_name);
+ /*
+ * Call H5Topen2 function.
+ */
+ if((c_type_id = H5Topen2((hid_t)*loc_id, c_name, H5P_DEFAULT)) < 0)
+ goto done;
+ *type_id = (hid_t_f)c_type_id;
- if (c_type_id < 0) return ret_value;
- *type_id = (hid_t_f)c_type_id;
- HDfree(c_name);
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+
+done:
+ if(c_name)
+ HDfree(c_name);
+
+ return ret_value;
}
diff --git a/src/H5Tdeprec.c b/src/H5Tdeprec.c
index 8dbcc4a..6b30c55 100644
--- a/src/H5Tdeprec.c
+++ b/src/H5Tdeprec.c
@@ -148,7 +148,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Topen
+ * Function: H5Topen1
*
* Purpose: Opens a named datatype.
*
@@ -164,7 +164,7 @@ done:
*-------------------------------------------------------------------------
*/
hid_t
-H5Topen(hid_t loc_id, const char *name)
+H5Topen1(hid_t loc_id, const char *name)
{
H5T_t *type = NULL;
H5G_loc_t loc;
@@ -176,7 +176,7 @@ H5Topen(hid_t loc_id, const char *name)
hid_t dxpl_id = H5AC_dxpl_id; /* dxpl to use to open datatype */
hid_t ret_value = FAIL;
- FUNC_ENTER_API(H5Topen, FAIL)
+ FUNC_ENTER_API(H5Topen1, FAIL)
H5TRACE2("i", "i*s", loc_id, name);
/* Check args */
@@ -223,5 +223,5 @@ done:
} /* end if */
FUNC_LEAVE_API(ret_value)
-} /* end H5Topen() */
+} /* end H5Topen1() */
diff --git a/src/H5Tpublic.h b/src/H5Tpublic.h
index fbdcba8..97862b5 100644
--- a/src/H5Tpublic.h
+++ b/src/H5Tpublic.h
@@ -592,13 +592,6 @@ H5_DLL htri_t H5Tcompiler_conv(hid_t src_id, hid_t dst_id);
H5_DLL herr_t H5Tconvert(hid_t src_id, hid_t dst_id, size_t nelmts,
void *buf, void *background, hid_t plist_id);
-/* Functions and variables defined for compatibility with previous versions
- * of the HDF5 API.
- *
- * Use of these functions and variables is deprecated.
- */
-H5_DLL hid_t H5Topen(hid_t loc_id, const char *name);
-
/* Symbols defined for compatibility with previous versions of the HDF5 API.
*
* Use of these symbols is deprecated.
@@ -613,6 +606,7 @@ H5_DLL hid_t H5Topen(hid_t loc_id, const char *name);
/* Function prototypes */
H5_DLL herr_t H5Tcommit1(hid_t loc_id, const char *name, hid_t type_id);
+H5_DLL hid_t H5Topen1(hid_t loc_id, const char *name);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
diff --git a/src/H5vers.txt b/src/H5vers.txt
index 6d8e732..ec7910d 100644
--- a/src/H5vers.txt
+++ b/src/H5vers.txt
@@ -55,6 +55,7 @@ FUNCTION: H5Gcreate; ; v10, v18
FUNCTION: H5Gopen; ; v10, v18
FUNCTION: H5Rget_obj_type; ; v16, v18
FUNCTION: H5Tcommit; ; v10, v18
+FUNCTION: H5Topen; ; 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 818b699..a1418f4 100644
--- a/src/H5version.h
+++ b/src/H5version.h
@@ -78,6 +78,10 @@
#define H5Tcommit_vers 1
#endif /* !defined(H5Tcommit_vers) */
+#if !defined(H5Topen_vers)
+#define H5Topen_vers 1
+#endif /* !defined(H5Topen_vers) */
+
/************/
/* Typedefs */
/************/
@@ -213,6 +217,17 @@
#error "H5Tcommit_vers set to invalid value"
#endif /* H5Tcommit_vers */
+#if !defined(H5Topen_vers) || H5Topen_vers == 2
+#ifndef H5Topen_vers
+#define H5Topen_vers 2
+#endif /* H5Topen_vers */
+#define H5Topen H5Topen2
+#elif H5Topen_vers == 1
+#define H5Topen H5Topen1
+#else /* H5Topen_vers */
+#error "H5Topen_vers set to invalid value"
+#endif /* H5Topen_vers */
+
/************/
/* Typedefs */
/************/
diff --git a/test/dangle.c b/test/dangle.c
index 7b657ac..cbd29a1 100644
--- a/test/dangle.c
+++ b/test/dangle.c
@@ -285,10 +285,9 @@ test_dangle_datatype1(H5F_close_degree_t degree)
TEST_ERROR;
/* Leave open a _lot_ of objects */
- for(u = 0; u < MAX_DANGLE; u++) {
- if((tid = H5Topen(fid, TYPENAME)) < 0)
- TEST_ERROR;
- } /* end for */
+ for(u = 0; u < MAX_DANGLE; u++)
+ if((tid = H5Topen2(fid, TYPENAME, H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
if(degree == H5F_CLOSE_SEMI) {
H5E_BEGIN_TRY {
diff --git a/test/dt_arith.c b/test/dt_arith.c
index e27176d..67885a3 100644
--- a/test/dt_arith.c
+++ b/test/dt_arith.c
@@ -1001,23 +1001,20 @@ test_derived_flt(void)
goto error;
}
- if((tid1 = H5Topen(file, "new float type 1")) < 0) {
- H5_FAILED();
- printf("Can't open datatype\n");
- goto error;
- }
- if(H5Tget_fields(tid1, &spos, &epos, &esize, &mpos, &msize)<0) {
+ if((tid1 = H5Topen2(file, "new float type 1", H5P_DEFAULT)) < 0)
+ FAIL_PUTS_ERROR("Can't open datatype")
+ if(H5Tget_fields(tid1, &spos, &epos, &esize, &mpos, &msize) < 0) {
H5_FAILED();
printf("Can't get fields\n");
goto error;
}
- if(spos!=44 || epos!=34 || esize!=10 || mpos!=3 || msize!=31) {
+ if(spos != 44 || epos != 34 || esize != 10 || mpos != 3 || msize != 31) {
H5_FAILED();
printf("Wrong field values\n");
goto error;
}
- if(H5Tget_precision(tid1)!=42) {
+ if(H5Tget_precision(tid1) != 42) {
H5_FAILED();
printf("Can't get precision or wrong precision\n");
goto error;
@@ -1163,23 +1160,20 @@ test_derived_flt(void)
goto error;
}
- if((tid2 = H5Topen(file, "new float type 2")) < 0) {
- H5_FAILED();
- printf("Can't open datatype\n");
- goto error;
- }
- if(H5Tget_fields(tid2, &spos, &epos, &esize, &mpos, &msize)<0) {
+ if((tid2 = H5Topen2(file, "new float type 2", H5P_DEFAULT)) < 0)
+ FAIL_PUTS_ERROR("Can't open datatype")
+ if(H5Tget_fields(tid2, &spos, &epos, &esize, &mpos, &msize) < 0) {
H5_FAILED();
printf("Can't get fields\n");
goto error;
}
- if(spos!=23 || epos!=16 || esize!=7 || mpos!=0 || msize!=16) {
+ if(spos != 23 || epos != 16 || esize != 7 || mpos != 0 || msize != 16) {
H5_FAILED();
printf("Wrong field values\n");
goto error;
}
- if(H5Tget_precision(tid2)!=24) {
+ if(H5Tget_precision(tid2) != 24) {
H5_FAILED();
printf("Can't get precision or wrong precision\n");
goto error;
@@ -1427,23 +1421,19 @@ test_derived_integer(void)
goto error;
}
- if((tid1 = H5Topen(file, "new integer type 1")) < 0) {
- H5_FAILED();
- printf("Can't open datatype\n");
- goto error;
- }
-
- if(H5Tget_precision(tid1)!=24) {
+ if((tid1 = H5Topen2(file, "new integer type 1", H5P_DEFAULT)) < 0)
+ FAIL_PUTS_ERROR("Can't open datatype")
+ if(H5Tget_precision(tid1) != 24) {
H5_FAILED();
printf("Can't get precision or wrong precision\n");
goto error;
}
- if(H5Tget_offset(tid1)!=0) {
+ if(H5Tget_offset(tid1) != 0) {
H5_FAILED();
printf("Can't get offset or wrong offset\n");
goto error;
}
- if(H5Tget_size(tid1)!=3) {
+ if(H5Tget_size(tid1) != 3) {
H5_FAILED();
printf("Can't get size or wrong size\n");
goto error;
@@ -1492,23 +1482,19 @@ test_derived_integer(void)
goto error;
}
- if((tid2 = H5Topen(file, "new integer type 2")) < 0) {
- H5_FAILED();
- printf("Can't open datatype\n");
- goto error;
- }
-
- if(H5Tget_precision(tid2)!=48) {
+ if((tid2 = H5Topen2(file, "new integer type 2", H5P_DEFAULT)) < 0)
+ FAIL_PUTS_ERROR("Can't open datatype")
+ if(H5Tget_precision(tid2) != 48) {
H5_FAILED();
printf("Can't get precision or wrong precision\n");
goto error;
}
- if(H5Tget_offset(tid2)!=10) {
+ if(H5Tget_offset(tid2) != 10) {
H5_FAILED();
printf("Can't get offset or wrong offset\n");
goto error;
}
- if(H5Tget_size(tid2)!=8) {
+ if(H5Tget_size(tid2) != 8) {
H5_FAILED();
printf("Can't get size or wrong size\n");
goto error;
diff --git a/test/dtypes.c b/test/dtypes.c
index d0e4d83..2f8f030 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -1584,20 +1584,17 @@ test_compound_9(void)
goto error;
} /* end if */
- if((cmpd_tid = H5Topen(file, "compound")) < 0) {
- H5_FAILED(); AT();
- printf("Can't open datatype\n");
- goto error;
- } /* end if */
+ if((cmpd_tid = H5Topen2(file, "compound", H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
- if((dup_tid = H5Tcopy(cmpd_tid))<0) {
+ if((dup_tid = H5Tcopy(cmpd_tid)) < 0) {
H5_FAILED(); AT();
printf("Can't copy datatype\n");
goto error;
} /* end if */
dim1[0] = 1;
- if((space_id=H5Screate_simple(1,dim1,NULL))<0) {
+ if((space_id = H5Screate_simple(1, dim1, NULL)) < 0) {
H5_FAILED(); AT();
printf("Can't create space\n");
goto error;
@@ -2337,16 +2334,10 @@ test_query(void)
} /* end if */
/* Open the dataytpe for query */
- if((tid1 = H5Topen(file, compnd_type)) < 0) {
- H5_FAILED();
- printf("Can't open datatype\n");
- goto error;
- } /* end if */
- if((tid2 = H5Topen(file, enum_type)) < 0) {
- H5_FAILED();
- printf("Can't open datatype\n");
- goto error;
- } /* end if */
+ if((tid1 = H5Topen2(file, compnd_type, H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
+ if((tid2 = H5Topen2(file, enum_type, H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
/* Query member number and member index by name, for compound type */
if(H5Tget_nmembers(tid1) != 4) {
@@ -2668,7 +2659,8 @@ test_named (hid_t fapl)
* Close the committed type and reopen it. It should return a named type.
*/
if(H5Tclose(type) < 0) goto error;
- if((type = H5Topen(file, "native-int")) < 0) goto error;
+ if((type = H5Topen2(file, "native-int", H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
if((status = H5Tcommitted(type)) < 0) goto error;
if(!status) {
H5_FAILED();
@@ -4186,16 +4178,10 @@ test_encode(void)
enum_buf_size = 0;
/* Open the dataytpe for query */
- if((tid1=H5Topen(file, compnd_type))<0) {
- H5_FAILED();
- printf("Can't open datatype\n");
- goto error;
- } /* end if */
- if((tid2=H5Topen(file, enum_type))<0) {
- H5_FAILED();
- printf("Can't open datatype\n");
- goto error;
- } /* end if */
+ if((tid1 = H5Topen2(file, compnd_type, H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
+ if((tid2 = H5Topen2(file, enum_type, H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
/* Encode compound type in a buffer */
@@ -4411,7 +4397,7 @@ test_latest(void)
FAIL_STACK_ERROR
/* Open the dataytpe for query */
- if((tid2 = H5Topen(file, compnd_type)) < 0)
+ if((tid2 = H5Topen2(file, compnd_type, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR
/* Verify that the datatype was encoded/decoded correctly */
@@ -4476,7 +4462,7 @@ test_latest(void)
FAIL_STACK_ERROR
/* Open the dataytpe for query */
- if((tid2 = H5Topen(file, compnd_type)) < 0)
+ if((tid2 = H5Topen2(file, compnd_type, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR
/* Verify that the datatype was encoded/decoded correctly */
@@ -4755,7 +4741,7 @@ test_compat(hid_t fapl)
* Close the committed type and reopen it. It should return a named type.
*/
if(H5Tclose(type) < 0) FAIL_STACK_ERROR
- if((type = H5Topen(file, "native-int")) < 0) FAIL_STACK_ERROR
+ if((type = H5Topen1(file, "native-int")) < 0) FAIL_STACK_ERROR
if((status = H5Tcommitted(type)) < 0) FAIL_STACK_ERROR
if(!status)
FAIL_PUTS_ERROR(" Opened named types should be named types!")
diff --git a/test/getname.c b/test/getname.c
index b6d13d3..2f3a020 100644
--- a/test/getname.c
+++ b/test/getname.c
@@ -251,10 +251,10 @@ test_main(hid_t file_id, hid_t fapl)
-/*-------------------------------------------------------------------------
- * Test H5Iget_name with a long path
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * Test H5Iget_name with a long path
+ *-------------------------------------------------------------------------
+ */
TESTING("H5Iget_name with a long path");
@@ -312,21 +312,21 @@ test_main(hid_t file_id, hid_t fapl)
PASSED();
-/*-------------------------------------------------------------------------
- * Test H5Iget_name with H5Topen
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * Test H5Iget_name with H5Topen2
+ *-------------------------------------------------------------------------
+ */
- TESTING("H5Iget_name with H5Topen");
+ TESTING("H5Iget_name with H5Topen2");
/* Open the named datatype */
- if((type_id=H5Topen(file_id, "t1")) < 0) TEST_ERROR
+ if((type_id = H5Topen2(file_id, "t1", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
if(check_name(type_id, "/t1", "/t1") < 0) TEST_ERROR
/* Close datatype */
- H5Tclose(type_id);
+ if(H5Tclose(type_id) < 0) FAIL_STACK_ERROR
PASSED();
@@ -379,14 +379,14 @@ test_main(hid_t file_id, hid_t fapl)
/*-------------------------------------------------------------------------
- * Test H5Iget_name with H5Lmove and H5Topen
+ * Test H5Iget_name with H5Lmove and H5Topen2
*-------------------------------------------------------------------------
*/
- TESTING("H5Iget_name with H5Lmove and H5Topen");
+ TESTING("H5Iget_name with H5Lmove and H5Topen2");
/* Open the named datatype */
- if((type_id = H5Topen(file_id, "/t1")) < 0) FAIL_STACK_ERROR
+ if((type_id = H5Topen2(file_id, "/t1", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Rename datatype */
if(H5Lmove(file_id, "/t1", H5L_SAME_LOC, "/t1a", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
@@ -965,61 +965,60 @@ test_main(hid_t file_id, hid_t fapl)
PASSED();
-/*-------------------------------------------------------------------------
- * Test H5Iget_name with a defined type dataset
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * Test H5Iget_name with a defined type dataset
+ *-------------------------------------------------------------------------
+ */
TESTING("H5Iget_name with a defined type dataset");
/* Create a datatype */
- if((type_id = H5Tcreate(H5T_COMPOUND, sizeof(s1_t))) < 0) TEST_ERROR
+ if((type_id = H5Tcreate(H5T_COMPOUND, sizeof(s1_t))) < 0) FAIL_STACK_ERROR
/* Insert fields */
- if(H5Tinsert(type_id, "a", HOFFSET(s1_t, a), H5T_NATIVE_INT) < 0) TEST_ERROR
- if(H5Tinsert(type_id, "b", HOFFSET(s1_t, b), H5T_NATIVE_INT) < 0) TEST_ERROR
- if(H5Tinsert(type_id, "c", HOFFSET(s1_t, c), H5T_NATIVE_FLOAT) < 0) TEST_ERROR
+ if(H5Tinsert(type_id, "a", HOFFSET(s1_t, a), H5T_NATIVE_INT) < 0) FAIL_STACK_ERROR
+ if(H5Tinsert(type_id, "b", HOFFSET(s1_t, b), H5T_NATIVE_INT) < 0) FAIL_STACK_ERROR
+ if(H5Tinsert(type_id, "c", HOFFSET(s1_t, c), H5T_NATIVE_FLOAT) < 0) FAIL_STACK_ERROR
/* Create group "g17" */
if((group_id = H5Gcreate2(file_id, "g17", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Save datatype for later */
- if(H5Tcommit2(group_id, "t", type_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Tcommit2(group_id, "t", type_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
/* Create a dataspace */
- if((space_id = H5Screate_simple(1, dims, NULL)) < 0) TEST_ERROR
+ if((space_id = H5Screate_simple(1, dims, NULL)) < 0) FAIL_STACK_ERROR
/* Create a new dataset */
- if((dataset_id = H5Dcreate(group_id , "d", type_id, space_id,
- H5P_DEFAULT)) < 0) TEST_ERROR
+ if((dataset_id = H5Dcreate(group_id , "d", type_id, space_id, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
- H5Dclose(dataset_id);
- H5Tclose(type_id);
- H5Sclose(space_id);
- H5Gclose(group_id);
+ if(H5Dclose(dataset_id) < 0) FAIL_STACK_ERROR
+ if(H5Tclose(type_id) < 0) FAIL_STACK_ERROR
+ if(H5Sclose(space_id) < 0) FAIL_STACK_ERROR
+ if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
/* Open the named datatype */
- if((type_id=H5Topen(file_id, "/g17/t")) < 0) TEST_ERROR
+ if((type_id = H5Topen2(file_id, "/g17/t", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
if(check_name(type_id, "/g17/t", "/g17/t") < 0) TEST_ERROR
/* Close datatype */
- H5Tclose(type_id);
+ if(H5Tclose(type_id) < 0) FAIL_STACK_ERROR
/* Reopen the dataset */
- if((dataset_id = H5Dopen(file_id, "/g17/d")) < 0) TEST_ERROR
+ if((dataset_id = H5Dopen(file_id, "/g17/d")) < 0) FAIL_STACK_ERROR
/* Get datatype*/
- if((type_id=H5Dget_type(dataset_id)) < 0) TEST_ERROR
+ if((type_id = H5Dget_type(dataset_id)) < 0) FAIL_STACK_ERROR
/* Verify */
if(check_name(type_id, "/g17/t", "/g17/t") < 0) TEST_ERROR
/* Close */
- H5Dclose(dataset_id);
- H5Tclose(type_id);
+ if(H5Dclose(dataset_id) < 0) FAIL_STACK_ERROR
+ if(H5Tclose(type_id) < 0) FAIL_STACK_ERROR
PASSED();
@@ -1243,10 +1242,10 @@ test_main(hid_t file_id, hid_t fapl)
PASSED();
-/*-------------------------------------------------------------------------
- * Test H5Iget_name with added names with mounting
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * Test H5Iget_name with added names with mounting
+ *-------------------------------------------------------------------------
+ */
TESTING("H5Iget_name with added names with mounting");
@@ -1255,14 +1254,14 @@ test_main(hid_t file_id, hid_t fapl)
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
- if((type_id = H5Tcopy(H5T_NATIVE_INT)) < 0) TEST_ERROR
- if((dataset_id = H5Dcreate(file_id, "g18/d2", type_id, space_id, H5P_DEFAULT)) < 0) TEST_ERROR
+ if((space_id = H5Screate_simple(1, dims, NULL)) < 0) FAIL_STACK_ERROR
+ if((type_id = H5Tcopy(H5T_NATIVE_INT)) < 0) FAIL_STACK_ERROR
+ if((dataset_id = H5Dcreate(file_id, "g18/d2", type_id, space_id, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
- if(H5Tcommit2(file_id, "g18/t2", type_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Tcommit2(file_id, "g18/t2", type_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
/* Create second file and group "/g3/g4/g5" in it */
- file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
+ if((file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_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
@@ -1282,7 +1281,7 @@ test_main(hid_t file_id, hid_t fapl)
/* Open the mounted group, dataset, and datatype through their new names */
if((group6_id = H5Gopen2(file1_id, "/g3/g4/g18/g2", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
if((dataset2_id = H5Dopen(file1_id, "/g3/g4/g18/d2")) < 0) FAIL_STACK_ERROR
- if((type2_id = H5Topen(file1_id, "/g3/g4/g18/t2")) < 0) FAIL_STACK_ERROR
+ if((type2_id = H5Topen2(file1_id, "/g3/g4/g18/t2", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify names */
if(check_name(group6_id, "/g3/g4/g18/g2", "/g3/g4/g18/g2") < 0) TEST_ERROR
@@ -1295,7 +1294,7 @@ test_main(hid_t file_id, hid_t fapl)
if(check_name(type_id, "/g18/t2", "/g18/t2") < 0) TEST_ERROR
/* Unmount */
- if(H5Funmount(file1_id, "/g3/g4") < 0) TEST_ERROR
+ if(H5Funmount(file1_id, "/g3/g4") < 0) FAIL_STACK_ERROR
/* Get name for the IDs of the first file, should be unchanged */
if(check_name(group2_id, "/g18/g2", "/g18/g2") < 0) TEST_ERROR
@@ -1307,17 +1306,17 @@ test_main(hid_t file_id, hid_t fapl)
if(check_name(dataset2_id, "/g18/d2", "") < 0) TEST_ERROR
if(check_name(type2_id, "/g18/t2", "") < 0) TEST_ERROR
- H5Tclose(type_id);
- H5Tclose(type2_id);
- H5Dclose(dataset_id);
- H5Dclose(dataset2_id);
- H5Gclose(group_id);
- H5Gclose(group2_id);
- H5Gclose(group3_id);
- H5Gclose(group4_id);
- H5Gclose(group5_id);
- H5Gclose(group6_id);
- H5Fclose(file1_id);
+ if(H5Tclose(type_id) < 0) FAIL_STACK_ERROR
+ if(H5Tclose(type2_id) < 0) FAIL_STACK_ERROR
+ if(H5Dclose(dataset_id) < 0) FAIL_STACK_ERROR
+ if(H5Dclose(dataset2_id) < 0) FAIL_STACK_ERROR
+ if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
+ if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
+ if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR
+ if(H5Gclose(group4_id) < 0) FAIL_STACK_ERROR
+ if(H5Gclose(group5_id) < 0) FAIL_STACK_ERROR
+ if(H5Gclose(group6_id) < 0) FAIL_STACK_ERROR
+ if(H5Fclose(file1_id) < 0) FAIL_STACK_ERROR
PASSED();
diff --git a/test/links.c b/test/links.c
index 30509b4..8aa5f4a 100644
--- a/test/links.c
+++ b/test/links.c
@@ -778,7 +778,7 @@ test_h5l_create(hid_t fapl, hbool_t new_format)
if(H5Tclose(type_id) < 0) TEST_ERROR
/* Re-open datatype using new link */
- if((type_id = H5Topen(group_id, "datatype")) < 0) TEST_ERROR
+ if((type_id = H5Topen2(group_id, "datatype", H5P_DEFAULT)) < 0) TEST_ERROR
/* Link nameless group to root group and close the group ID*/
if(H5Llink(file_id, "/group", group_id, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
@@ -3450,7 +3450,7 @@ external_link_closing(hid_t fapl, hbool_t new_format)
/* Test H5*open */
if((gid = H5Gopen2(fid1, "elink/elink/elink/group1_moved", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
- if((tid = H5Topen(fid1, "elink/elink/elink/type1_moved")) < 0) FAIL_STACK_ERROR
+ if((tid = H5Topen2(fid1, "elink/elink/elink/type1_moved", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
if((did = H5Dopen(fid1, "elink/elink/elink/dataset1_moved")) < 0) FAIL_STACK_ERROR
/* Close objects */
if(H5Gclose(gid) < 0) FAIL_STACK_ERROR
@@ -5095,21 +5095,12 @@ lapl_nlinks(hid_t fapl, hbool_t new_format)
/* Try to open the objects using too many symlinks with default *APLs */
H5E_BEGIN_TRY {
- if((gid = H5Gopen2(fid, "soft17", H5P_DEFAULT)) >=0) {
- H5_FAILED();
- puts(" Should have failed for too many nested links.");
- TEST_ERROR
- }
- if((tid = H5Topen2(fid, "soft17/datatype", H5P_DEFAULT)) >=0) {
- H5_FAILED();
- puts(" Should have failed for too many nested links.");
- TEST_ERROR
- }
- if((did = H5Dopen2(fid, "soft17/dataset", H5P_DEFAULT)) >=0) {
- H5_FAILED();
- puts(" Should have failed for too many nested links.");
- TEST_ERROR
- }
+ if((gid = H5Gopen2(fid, "soft17", H5P_DEFAULT)) >= 0)
+ FAIL_PUTS_ERROR(" Should have failed for too many nested links.")
+ if((tid = H5Topen2(fid, "soft17/datatype", H5P_DEFAULT)) >= 0)
+ FAIL_PUTS_ERROR(" Should have failed for too many nested links.")
+ if((did = H5Dopen2(fid, "soft17/dataset", H5P_DEFAULT)) >= 0)
+ FAIL_PUTS_ERROR(" Should have failed for too many nested links.")
} H5E_END_TRY
/* Create property lists with nlinks set */
diff --git a/test/objcopy.c b/test/objcopy.c
index ef35c54..f6d32d1 100755
--- a/test/objcopy.c
+++ b/test/objcopy.c
@@ -1434,10 +1434,10 @@ test_copy_named_datatype(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if(H5Ocopy(fid_src, NAME_DATATYPE_SIMPLE, fid_dst, NAME_DATATYPE_SIMPLE, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
/* open the datatype for copy */
- if((tid = H5Topen(fid_src, NAME_DATATYPE_SIMPLE)) < 0) TEST_ERROR
+ if((tid = H5Topen2(fid_src, NAME_DATATYPE_SIMPLE, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* open the copied datatype */
- if((tid2 = H5Topen(fid_dst, NAME_DATATYPE_SIMPLE)) < 0) TEST_ERROR
+ if((tid2 = H5Topen2(fid_dst, NAME_DATATYPE_SIMPLE, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Compare the datatypes */
if(H5Tequal(tid, tid2) != TRUE) TEST_ERROR
@@ -1527,10 +1527,10 @@ test_copy_named_datatype_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if(H5Ocopy(fid_src, NAME_DATATYPE_VL, fid_dst, NAME_DATATYPE_VL, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
/* open the datatype for copy */
- if((tid = H5Topen(fid_src, NAME_DATATYPE_VL)) < 0) TEST_ERROR
+ if((tid = H5Topen2(fid_src, NAME_DATATYPE_VL, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* open the copied datatype */
- if((tid2 = H5Topen(fid_dst, NAME_DATATYPE_VL)) < 0) TEST_ERROR
+ if((tid2 = H5Topen2(fid_dst, NAME_DATATYPE_VL, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Compare the datatypes */
if(H5Tequal(tid, tid2) != TRUE) TEST_ERROR
@@ -1626,10 +1626,10 @@ test_copy_named_datatype_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if(H5Ocopy(fid_src, NAME_DATATYPE_VL_VL, fid_dst, NAME_DATATYPE_VL_VL, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
/* open the datatype for copy */
- if((tid = H5Topen(fid_src, NAME_DATATYPE_VL_VL)) < 0) TEST_ERROR
+ if((tid = H5Topen2(fid_src, NAME_DATATYPE_VL_VL, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* open the copied datatype */
- if((tid2 = H5Topen(fid_dst, NAME_DATATYPE_VL_VL)) < 0) TEST_ERROR
+ if((tid2 = H5Topen2(fid_dst, NAME_DATATYPE_VL_VL, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Compare the datatypes */
if(H5Tequal(tid, tid2) != TRUE) TEST_ERROR
@@ -5556,7 +5556,7 @@ test_copy_same_file_named_datatype(hid_t fcpl_src, hid_t fapl)
if(H5Ocopy(fid, NAME_DATATYPE_SIMPLE, fid, NAME_DATATYPE_SIMPLE2, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
/* open the copied datatype */
- if((tid2 = H5Topen(fid, NAME_DATATYPE_SIMPLE2)) < 0) TEST_ERROR
+ if((tid2 = H5Topen2(fid, NAME_DATATYPE_SIMPLE2, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Compare the datatypes */
if(H5Tequal(tid, tid2) != TRUE) TEST_ERROR
diff --git a/test/tfile.c b/test/tfile.c
index 26a92fa..e37a060 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -1420,15 +1420,15 @@ test_file_open_dot(void)
/* Open a named datatype with no name using the file ID */
H5E_BEGIN_TRY {
- tid2 = H5Topen(fid, ".");
+ tid2 = H5Topen2(fid, ".", H5P_DEFAULT);
} H5E_END_TRY;
- VERIFY(tid2, FAIL, "H5Topen");
+ VERIFY(tid2, FAIL, "H5Topen2");
/* Open a named datatype with no name using the group ID */
H5E_BEGIN_TRY {
- tid2 = H5Topen(gid, ".");
+ tid2 = H5Topen2(gid, ".", H5P_DEFAULT);
} H5E_END_TRY;
- VERIFY(tid2, FAIL, "H5Topen");
+ VERIFY(tid2, FAIL, "H5Topen2");
/* Create a group with no name using the file ID */
H5E_BEGIN_TRY {
@@ -1822,8 +1822,8 @@ test_file_double_datatype_open(void)
CHECK(type1_id, FAIL, "H5Tcopy");
ret = H5Tcommit2(file1_id, TYPE_NAME, type1_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Tcommit2");
- type2_id = H5Topen(file2_id, TYPE_NAME);
- CHECK(type2_id, FAIL, "H5Topen");
+ type2_id = H5Topen2(file2_id, TYPE_NAME, H5P_DEFAULT);
+ CHECK(type2_id, FAIL, "H5Topen2");
/* Note "assymetric" close order */
ret = H5Tclose(type1_id);
diff --git a/test/th5o.c b/test/th5o.c
index 49f982a..a1843ea 100644
--- a/test/th5o.c
+++ b/test/th5o.c
@@ -215,8 +215,8 @@ test_h5o_close(void)
/* Make sure H5Oclose can close objects opened with H5*open */
grp = H5Gopen2(fid, "group", H5P_DEFAULT);
CHECK(grp, FAIL, "H5Gopen2");
- dtype = H5Topen(fid, "group/datatype");
- CHECK(dtype, FAIL, "H5Topen");
+ dtype = H5Topen2(fid, "group/datatype", H5P_DEFAULT);
+ CHECK(dtype, FAIL, "H5Topen2");
dset = H5Dopen(fid, "dataset");
CHECK(dset, FAIL, "H5Dopen");
@@ -480,8 +480,8 @@ test_h5o_refcount(void)
grp = H5Gopen2(fid, "group", H5P_DEFAULT);
CHECK(grp, FAIL, "H5Gopen2");
- dtype = H5Topen(fid, "datatype");
- CHECK(dtype, FAIL, "H5Topen");
+ dtype = H5Topen2(fid, "datatype", H5P_DEFAULT);
+ CHECK(dtype, FAIL, "H5Topen2");
dset = H5Dopen(fid, "dataset");
CHECK(dset, FAIL, "H5Dopen");
@@ -518,8 +518,8 @@ test_h5o_refcount(void)
grp = H5Gopen2(fid, "group", H5P_DEFAULT);
CHECK(grp, FAIL, "H5Gopen2");
- dtype = H5Topen(fid, "datatype");
- CHECK(dtype, FAIL, "H5Topen");
+ dtype = H5Topen2(fid, "datatype", H5P_DEFAULT);
+ CHECK(dtype, FAIL, "H5Topen2");
dset = H5Dopen(fid, "dataset");
CHECK(dset, FAIL, "H5Dopen");
@@ -708,8 +708,8 @@ test_h5o_plist(void)
/* Re-open objects */
grp = H5Gopen2(fid, "group", H5P_DEFAULT);
CHECK(grp, FAIL, "H5Gopen2");
- dtype = H5Topen(fid, "datatype");
- CHECK(dtype, FAIL, "H5Topen");
+ dtype = H5Topen2(fid, "datatype", H5P_DEFAULT);
+ CHECK(dtype, FAIL, "H5Topen2");
dset = H5Dopen(fid, "dataset");
CHECK(dset, FAIL, "H5Dopen");
diff --git a/test/tmisc.c b/test/tmisc.c
index 7882120..4656afa 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -2314,8 +2314,8 @@ verify_file(const char *name, hsize_t blk_size, unsigned check_new_data)
verify_dataset(fid,MISC13_DSET3_NAME);
/* Open the named datatype in the root group */
- tid = H5Topen(fid, MISC13_DTYPE_NAME);
- CHECK(tid, FAIL, "H5Topen");
+ tid = H5Topen2(fid, MISC13_DTYPE_NAME, H5P_DEFAULT);
+ CHECK(tid, FAIL, "H5Topen2");
/* Verify the type is correct */
VERIFY(H5Tequal(tid,H5T_NATIVE_INT), TRUE, "H5Tequal");
@@ -2335,8 +2335,8 @@ verify_file(const char *name, hsize_t blk_size, unsigned check_new_data)
verify_dataset(gid,MISC13_DSET2_NAME);
/* Open the named datatype in the first group */
- tid = H5Topen(gid,MISC13_DTYPE_NAME);
- CHECK(tid, FAIL, "H5Topen");
+ tid = H5Topen2(gid,MISC13_DTYPE_NAME, H5P_DEFAULT);
+ CHECK(tid, FAIL, "H5Topen2");
/* Verify the type is correct */
VERIFY(H5Tequal(tid,H5T_NATIVE_INT), TRUE, "H5Tequal");
@@ -3717,7 +3717,7 @@ test_misc22(void)
CHECK(ret, FAIL, "H5Pclose");
dsid = H5Dopen(fid, MISC22_DSET_NAME);
- CHECK(dsid, FAIL, "H5Topen");
+ CHECK(dsid, FAIL, "H5Dopen");
dcpl2 = H5Dget_create_plist(dsid);
CHECK(dcpl2, FAIL, "H5Dget_create_plist");
@@ -4089,14 +4089,14 @@ test_misc24(void)
VERIFY(tmp_id, FAIL, "H5Dopen");
H5E_BEGIN_TRY {
- tmp_id = H5Topen(file_id, MISC24_GROUP_NAME);
+ tmp_id = H5Topen2(file_id, MISC24_GROUP_NAME, H5P_DEFAULT);
} H5E_END_TRY;
- VERIFY(tmp_id, FAIL, "H5Topen");
+ VERIFY(tmp_id, FAIL, "H5Topen2");
H5E_BEGIN_TRY {
- tmp_id = H5Topen(file_id, MISC24_GROUP_LINK);
+ tmp_id = H5Topen2(file_id, MISC24_GROUP_LINK, H5P_DEFAULT);
} H5E_END_TRY;
- VERIFY(tmp_id, FAIL, "H5Topen");
+ VERIFY(tmp_id, FAIL, "H5Topen2");
H5E_BEGIN_TRY {
tmp_id = H5Gopen2(file_id, MISC24_DATASET_NAME, H5P_DEFAULT);
@@ -4109,14 +4109,14 @@ test_misc24(void)
VERIFY(tmp_id, FAIL, "H5Gopen2");
H5E_BEGIN_TRY {
- tmp_id = H5Topen(file_id, MISC24_DATASET_NAME);
+ tmp_id = H5Topen2(file_id, MISC24_DATASET_NAME, H5P_DEFAULT);
} H5E_END_TRY;
- VERIFY(tmp_id, FAIL, "H5Topen");
+ VERIFY(tmp_id, FAIL, "H5Topen2");
H5E_BEGIN_TRY {
- tmp_id = H5Topen(file_id, MISC24_DATASET_LINK);
+ tmp_id = H5Topen2(file_id, MISC24_DATASET_LINK, H5P_DEFAULT);
} H5E_END_TRY;
- VERIFY(tmp_id, FAIL, "H5Topen");
+ VERIFY(tmp_id, FAIL, "H5Topen2");
H5E_BEGIN_TRY {
tmp_id = H5Gopen2(file_id, MISC24_DATATYPE_NAME, H5P_DEFAULT);
@@ -4154,14 +4154,14 @@ test_misc24(void)
VERIFY(tmp_id, FAIL, "H5Dopen");
H5E_BEGIN_TRY {
- tmp_id = H5Topen(file_id, MISC24_GROUP_NAME);
+ tmp_id = H5Topen2(file_id, MISC24_GROUP_NAME, H5P_DEFAULT);
} H5E_END_TRY;
- VERIFY(tmp_id, FAIL, "H5Topen");
+ VERIFY(tmp_id, FAIL, "H5Topen2");
H5E_BEGIN_TRY {
- tmp_id = H5Topen(file_id, MISC24_GROUP_LINK);
+ tmp_id = H5Topen2(file_id, MISC24_GROUP_LINK, H5P_DEFAULT);
} H5E_END_TRY;
- VERIFY(tmp_id, FAIL, "H5Topen");
+ VERIFY(tmp_id, FAIL, "H5Topen2");
ret = H5Gclose(group_id);
CHECK(ret, FAIL, "H5Gclose");
@@ -4181,21 +4181,21 @@ test_misc24(void)
VERIFY(tmp_id, FAIL, "H5Gopen2");
H5E_BEGIN_TRY {
- tmp_id = H5Topen(file_id, MISC24_DATASET_NAME);
+ tmp_id = H5Topen2(file_id, MISC24_DATASET_NAME, H5P_DEFAULT);
} H5E_END_TRY;
- VERIFY(tmp_id, FAIL, "H5Topen");
+ VERIFY(tmp_id, FAIL, "H5Topen2");
H5E_BEGIN_TRY {
- tmp_id = H5Topen(file_id, MISC24_DATASET_LINK);
+ tmp_id = H5Topen2(file_id, MISC24_DATASET_LINK, H5P_DEFAULT);
} H5E_END_TRY;
- VERIFY(tmp_id, FAIL, "H5Topen");
+ VERIFY(tmp_id, FAIL, "H5Topen2");
ret = H5Dclose(dset_id);
CHECK(ret, FAIL, "H5Dclose");
/* Open named datatype */
- type_id = H5Topen(file_id, MISC24_DATATYPE_NAME);
- CHECK(ret, FAIL, "H5Topen");
+ type_id = H5Topen2(file_id, MISC24_DATATYPE_NAME, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Topen2");
H5E_BEGIN_TRY {
tmp_id = H5Gopen2(file_id, MISC24_DATATYPE_NAME, H5P_DEFAULT);
diff --git a/test/ttime.c b/test/ttime.c
index 927d68a..37e0b5e 100644
--- a/test/ttime.c
+++ b/test/ttime.c
@@ -81,8 +81,8 @@ test_time_commit(void)
file_id = H5Fopen(DATAFILE, H5F_ACC_RDWR, H5P_DEFAULT);
CHECK(file_id, FAIL, "H5Fopen");
- tid = H5Topen(file_id, "Committed D32LE type");
- CHECK(tid, FAIL, "H5Topen");
+ tid = H5Topen2(file_id, "Committed D32LE type", H5P_DEFAULT);
+ CHECK(tid, FAIL, "H5Topen2");
if(!H5Tequal(tid, H5T_UNIX_D32LE))
TestErrPrintf("H5T_UNIX_D32LE datatype not found\n");
@@ -90,8 +90,8 @@ test_time_commit(void)
status = H5Tclose (tid);
CHECK(status, FAIL, "H5Tclose");
- tid = H5Topen(file_id, "Committed D32BE type");
- CHECK(tid, FAIL, "H5Topen");
+ tid = H5Topen2(file_id, "Committed D32BE type", H5P_DEFAULT);
+ CHECK(tid, FAIL, "H5Topen2");
if(!H5Tequal(tid, H5T_UNIX_D32BE))
TestErrPrintf("H5T_UNIX_D32BE datatype not found\n");
@@ -99,8 +99,8 @@ test_time_commit(void)
status = H5Tclose (tid);
CHECK(status, FAIL, "H5Tclose");
- tid = H5Topen(file_id, "Committed D64LE type");
- CHECK(tid, FAIL, "H5Topen");
+ tid = H5Topen2(file_id, "Committed D64LE type", H5P_DEFAULT);
+ CHECK(tid, FAIL, "H5Topen2");
if(!H5Tequal(tid, H5T_UNIX_D64LE))
TestErrPrintf("H5T_UNIX_D64LE datatype not found");
@@ -108,8 +108,8 @@ test_time_commit(void)
status = H5Tclose (tid);
CHECK(status, FAIL, "H5Tclose");
- tid = H5Topen(file_id, "Committed D64BE type");
- CHECK(tid, FAIL, "H5Topen");
+ tid = H5Topen2(file_id, "Committed D64BE type", H5P_DEFAULT);
+ CHECK(tid, FAIL, "H5Topen2");
if(!H5Tequal(tid, H5T_UNIX_D64BE))
TestErrPrintf("H5T_UNIX_D64BE datatype not found");
diff --git a/test/tunicode.c b/test/tunicode.c
index de22dfc..20ca9bc 100644
--- a/test/tunicode.c
+++ b/test/tunicode.c
@@ -440,8 +440,8 @@ void test_objnames(hid_t fid, const char* string)
ret = H5Tclose(type_id);
CHECK(type_id, FAIL, "H5Tclose");
- type_id = H5Topen(grp2_id, string);
- CHECK(type_id, FAIL, "H5Topen");
+ type_id = H5Topen2(grp2_id, string, H5P_DEFAULT);
+ CHECK(type_id, FAIL, "H5Topen2");
ret = H5Tclose(type_id);
CHECK(type_id, FAIL, "H5Tclose");
@@ -495,8 +495,8 @@ void test_objnames(hid_t fid, const char* string)
CHECK(ret, FAIL, "H5Lcreate_hard");
/* Open named datatype using soft link */
- type_id = H5Topen(grp3_id, string);
- CHECK(type_id, FAIL, "H5Topen");
+ type_id = H5Topen2(grp3_id, string, H5P_DEFAULT);
+ CHECK(type_id, FAIL, "H5Topen2");
ret = H5Tclose(type_id);
CHECK(type_id, FAIL, "H5Tclose");
diff --git a/test/tvlstr.c b/test/tvlstr.c
index 8d8c4a4..a0eedc6 100644
--- a/test/tvlstr.c
+++ b/test/tvlstr.c
@@ -442,8 +442,8 @@ static void test_vlstring_type(void)
ret = H5Tclose(tid_vlstr);
CHECK(ret, FAIL, "H5Tclose");
- tid_vlstr = H5Topen(fid, VLSTR_TYPE);
- CHECK(tid_vlstr, FAIL, "H5Topen");
+ tid_vlstr = H5Topen2(fid, VLSTR_TYPE, H5P_DEFAULT);
+ CHECK(tid_vlstr, FAIL, "H5Topen2");
ret = H5Tclose(tid_vlstr);
CHECK(ret, FAIL, "H5Tclose");
@@ -456,8 +456,8 @@ static void test_vlstring_type(void)
CHECK(fid, FAIL, "H5Fopen");
/* Open the variable-length string datatype just created */
- tid_vlstr = H5Topen(fid, VLSTR_TYPE);
- CHECK(tid_vlstr, FAIL, "H5Topen");
+ tid_vlstr = H5Topen2(fid, VLSTR_TYPE, H5P_DEFAULT);
+ CHECK(tid_vlstr, FAIL, "H5Topen2");
/* Verify character set and padding */
cset = H5Tget_cset(tid_vlstr);
diff --git a/test/unlink.c b/test/unlink.c
index f99a1cc..1d89c29 100644
--- a/test/unlink.c
+++ b/test/unlink.c
@@ -1943,7 +1943,7 @@ test_resurrect_datatype(hid_t fapl)
if((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0) FAIL_STACK_ERROR
/* Attempt to open the datatype under the new name */
- if((type = H5Topen(file,TYPE2NAME)) < 0) FAIL_STACK_ERROR
+ if((type = H5Topen2(file,TYPE2NAME, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close things */
if(H5Tclose(type) < 0) FAIL_STACK_ERROR
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index 5706837..35e17a2 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -1500,7 +1500,7 @@ dump_all(hid_t group, const char *name, const H5L_info_t *linfo, void UNUSED *op
break;
case H5O_TYPE_NAMED_DATATYPE:
- if((obj = H5Topen(group, name)) < 0) {
+ if((obj = H5Topen2(group, name, H5P_DEFAULT)) < 0) {
error_msg(progname, "unable to dump datatype \"%s\"\n", name);
d_status = EXIT_FAILURE;
ret = FAIL;
@@ -3232,25 +3232,25 @@ handle_datatypes(hid_t fid, char *type, void UNUSED * data)
{
hid_t type_id;
- if ((type_id = H5Topen(fid, type)) < 0) {
+ if((type_id = H5Topen2(fid, type, H5P_DEFAULT)) < 0) {
/* check if type is unamed datatype */
unsigned idx = 0;
- while (idx < type_table->nobjs ) {
+ while(idx < type_table->nobjs ) {
char name[128];
- if (!type_table->objs[idx].recorded) {
+ if(!type_table->objs[idx].recorded) {
/* unamed datatype */
sprintf(name, "/#"H5_PRINTF_HADDR_FMT, type_table->objs[idx].objno);
- if (!HDstrcmp(name, type))
+ if(!HDstrcmp(name, type))
break;
- }
+ } /* end if */
idx++;
- }
+ } /* end while */
- if (idx == type_table->nobjs) {
+ if(idx == type_table->nobjs) {
/* unknown type */
begin_obj(dump_header_format->datatypebegin, type,
dump_header_format->datatypeblockbegin);
@@ -3269,7 +3269,7 @@ handle_datatypes(hid_t fid, char *type, void UNUSED * data)
} else {
dump_named_datatype(type_id, type);
- if (H5Tclose(type_id) < 0)
+ if(H5Tclose(type_id) < 0)
d_status = EXIT_FAILURE;
}
}
diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c
index 11b08b2..dedca0a 100644
--- a/tools/h5repack/h5repack_copy.c
+++ b/tools/h5repack/h5repack_copy.c
@@ -782,7 +782,7 @@ int do_copy_objects(hid_t fidin,
*/
case H5TRAV_TYPE_NAMED_DATATYPE:
- if((type_in = H5Topen(fidin, travt->objs[i].name)) < 0)
+ if((type_in = H5Topen2(fidin, travt->objs[i].name, H5P_DEFAULT)) < 0)
goto error;
if((type_out = H5Tcopy(type_in)) < 0)
diff --git a/tools/h5repack/h5repack_refs.c b/tools/h5repack/h5repack_refs.c
index d3dff90..f1738e8 100644
--- a/tools/h5repack/h5repack_refs.c
+++ b/tools/h5repack/h5repack_refs.c
@@ -345,7 +345,7 @@ int do_copy_refobjs(hid_t fidin,
*-------------------------------------------------------------------------
*/
case H5TRAV_TYPE_NAMED_DATATYPE:
- if((type_in = H5Topen(fidin, travt->objs[i].name)) < 0)
+ if((type_in = H5Topen2(fidin, travt->objs[i].name, H5P_DEFAULT)) < 0)
goto error;
if(H5Tclose(type_in) < 0)
goto error;
@@ -390,7 +390,7 @@ error:
* relative to LOC_IN, which is obtained either from
* loc_id = H5Gopen2( fid, name, H5P_DEFAULT);
* loc_id = H5Dopen( fid, name);
- * loc_id = H5Topen( fid, name);
+ * loc_id = H5Topen2( fid, name, H5P_DEFAULT);
*
* Return: 0, ok, -1 no
*
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c
index 3edd6e8..4a6a8cd 100644
--- a/tools/lib/h5diff.c
+++ b/tools/lib/h5diff.c
@@ -839,9 +839,9 @@ hsize_t diff(hid_t file1_id,
*-------------------------------------------------------------------------
*/
case H5TRAV_TYPE_NAMED_DATATYPE:
- if((type1_id = H5Topen(file1_id, path1)) < 0)
+ if((type1_id = H5Topen2(file1_id, path1, H5P_DEFAULT)) < 0)
goto out;
- if((type2_id = H5Topen(file2_id, path2)) < 0)
+ if((type2_id = H5Topen2(file2_id, path2, H5P_DEFAULT)) < 0)
goto out;
if((ret = H5Tequal(type1_id, type2_id)) < 0)
diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c
index ab089cb..89d18d3 100644
--- a/tools/lib/h5diff_attr.c
+++ b/tools/lib/h5diff_attr.c
@@ -24,7 +24,7 @@
* obtained either from
* loc_id = H5Gopen2( fid, name, H5P_DEFAULT);
* loc_id = H5Dopen( fid, name);
- * loc_id = H5Topen( fid, name);
+ * loc_id = H5Topen2( fid, name, H5P_DEFAULT);
*
* Return: number of differences found
*