mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-21 01:04:10 +08:00
Merge branch 'develop' into dset_ohdr_minimize
This commit is contained in:
commit
5efc08a06d
2
MANIFEST
2
MANIFEST
@ -1390,6 +1390,7 @@
|
||||
./tools/test/h5format_convert/testfiles/h5fc_v_non_chunked.ddl
|
||||
./tools/test/h5format_convert/testfiles/h5fc_d_file.ddl
|
||||
./tools/test/h5format_convert/testfiles/h5fc_d_file.ddl.err
|
||||
./tools/test/h5format_convert/testfiles/h5fc_d_file-d.ddl
|
||||
./tools/test/h5format_convert/testfiles/h5fc_v_ndata_bt1.ddl
|
||||
./tools/test/h5format_convert/testfiles/h5fc_dname.ddl
|
||||
./tools/test/h5format_convert/testfiles/h5fc_dname.err
|
||||
@ -1528,6 +1529,7 @@
|
||||
./tools/test/misc/testfiles/h5clear_less_after_size.ddl
|
||||
./tools/test/misc/testfiles/h5clear_less_before_size.ddl
|
||||
./tools/test/misc/testfiles/h5clear_missing_file.ddl
|
||||
./tools/test/misc/testfiles/h5clear_missing_file.err
|
||||
./tools/test/misc/testfiles/h5clear_noclose_after_size.ddl
|
||||
./tools/test/misc/testfiles/h5clear_noclose_before_size.ddl
|
||||
./tools/test/misc/testfiles/h5clear_no_mdc_image.err
|
||||
|
@ -174,7 +174,6 @@ H5I_type_t IdComponent::getHDFObjType() const
|
||||
/// \li \c H5I_DATASPACE
|
||||
/// \li \c H5I_DATASET
|
||||
/// \li \c H5I_ATTR
|
||||
/// \li \c H5I_REFERENCE (DEPRECATED)
|
||||
/// \li \c H5I_VFL
|
||||
/// \li \c H5I_VOL
|
||||
/// \li \c H5I_GENPROP_CLS
|
||||
@ -228,7 +227,6 @@ bool IdComponent::isValid(hid_t an_id)
|
||||
/// \li \c H5I_DATASPACE
|
||||
/// \li \c H5I_DATASET
|
||||
/// \li \c H5I_ATTR
|
||||
/// \li \c H5I_REFERENCE (DEPRECATED)
|
||||
/// \li \c H5I_VFL
|
||||
/// \li \c H5I_VOL
|
||||
/// \li \c H5I_GENPROP_CLS
|
||||
|
@ -149,7 +149,6 @@ PropList::PropList(const hid_t plist_id) : IdComponent()
|
||||
case H5I_DATASPACE:
|
||||
case H5I_DATASET:
|
||||
case H5I_ATTR:
|
||||
case H5I_REFERENCE:
|
||||
case H5I_VFL:
|
||||
case H5I_VOL:
|
||||
case H5I_ERROR_CLASS:
|
||||
|
@ -144,7 +144,7 @@ if (TEST_MASK_ERROR)
|
||||
# the error stack remains in the .err file
|
||||
file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM)
|
||||
endif ()
|
||||
string (REGEX REPLACE "[.]*_pmi_alps[.]*\n" "" TEST_STREAM "${TEST_STREAM}")
|
||||
string (REGEX REPLACE "^.*_pmi_alps[^\n]+\n" "" TEST_STREAM "${TEST_STREAM}")
|
||||
string (REGEX REPLACE "thread [0-9]*:" "thread (IDs):" TEST_STREAM "${TEST_STREAM}")
|
||||
string (REGEX REPLACE ": ([^\n]*)[.]c " ": (file name) " TEST_STREAM "${TEST_STREAM}")
|
||||
string (REGEX REPLACE " line [0-9]*" " line (number)" TEST_STREAM "${TEST_STREAM}")
|
||||
|
@ -3077,9 +3077,28 @@ public class H5 implements java.io.Serializable {
|
||||
* - Error from the HDF-5 Library.
|
||||
* @exception NullPointerException
|
||||
* - name is null.
|
||||
*
|
||||
* @deprecated As of HDF5 1.10.5 in favor of H5Fis_accessible.
|
||||
**/
|
||||
public synchronized static native boolean H5Fis_hdf5(String name) throws HDF5LibraryException, NullPointerException;
|
||||
|
||||
/**
|
||||
* H5Fis_accessible determines if the file can be opened with the given fapl.
|
||||
*
|
||||
* @param name
|
||||
* IN: File name to check.
|
||||
* @param file_id
|
||||
* IN: File identifier for a currently-open HDF5 file
|
||||
*
|
||||
* @return true if file is accessible, false if not.
|
||||
*
|
||||
* @exception HDF5LibraryException
|
||||
* - Error from the HDF-5 Library.
|
||||
* @exception NullPointerException
|
||||
* - name is null.
|
||||
**/
|
||||
public synchronized static native boolean H5Fis_accessible(String name, long file_id) throws HDF5LibraryException, NullPointerException;
|
||||
|
||||
/**
|
||||
* H5Fmount mounts the file specified by child_id onto the group specified by loc_id and name using the mount
|
||||
* properties plist_id.
|
||||
|
@ -315,7 +315,6 @@ public class HDF5Constants {
|
||||
public static final int H5I_GROUP = H5I_GROUP();
|
||||
public static final int H5I_INVALID_HID = H5I_INVALID_HID();
|
||||
public static final int H5I_NTYPES = H5I_NTYPES();
|
||||
public static final int H5I_REFERENCE = H5I_REFERENCE();
|
||||
public static final int H5I_UNINIT = H5I_UNINIT();
|
||||
public static final int H5I_VFL = H5I_VFL();
|
||||
public static final int H5I_VOL = H5I_VOL();
|
||||
@ -1222,8 +1221,6 @@ public class HDF5Constants {
|
||||
|
||||
private static native final int H5I_NTYPES();
|
||||
|
||||
private static native final int H5I_REFERENCE();
|
||||
|
||||
private static native final int H5I_UNINIT();
|
||||
|
||||
private static native final int H5I_VFL();
|
||||
|
@ -48,7 +48,9 @@ set (CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON)
|
||||
|
||||
########### JNI libraries always must be built shared ###############
|
||||
add_library (${HDF5_JAVA_JNI_LIB_TARGET} SHARED ${HDF5_JAVA_JNI_CSRCS} ${HDF5_JAVA_JNI_CHDRS})
|
||||
target_include_directories(${HDF5_JAVA_JNI_LIB_TARGET} PRIVATE ${HDF5_BINARY_DIR} ${HDF5_JAVA_JNI_SOURCE_DIR})
|
||||
target_include_directories(${HDF5_JAVA_JNI_LIB_TARGET}
|
||||
PRIVATE "${HDF5_BINARY_DIR};${HDF5_JAVA_JNI_SOURCE_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
|
||||
)
|
||||
TARGET_C_PROPERTIES (${HDF5_JAVA_JNI_LIB_TARGET} SHARED)
|
||||
target_link_libraries (${HDF5_JAVA_JNI_LIB_TARGET} PUBLIC ${HDF5_LIBSH_TARGET})
|
||||
set_target_properties (${HDF5_JAVA_JNI_LIB_TARGET} PROPERTIES FOLDER libraries/jni)
|
||||
|
@ -603,8 +603,6 @@ Java_hdf_hdf5lib_HDF5Constants_H5I_1DATASET(JNIEnv *env, jclass cls) { return H5
|
||||
JNIEXPORT jint JNICALL
|
||||
Java_hdf_hdf5lib_HDF5Constants_H5I_1ATTR(JNIEnv *env, jclass cls) { return H5I_ATTR; }
|
||||
JNIEXPORT jint JNICALL
|
||||
Java_hdf_hdf5lib_HDF5Constants_H5I_1REFERENCE(JNIEnv *env, jclass cls) { return H5I_REFERENCE; }
|
||||
JNIEXPORT jint JNICALL
|
||||
Java_hdf_hdf5lib_HDF5Constants_H5I_1VFL(JNIEnv *env, jclass cls) { return H5I_VFL; }
|
||||
JNIEXPORT jint JNICALL
|
||||
Java_hdf_hdf5lib_HDF5Constants_H5I_1VOL(JNIEnv *env, jclass cls) { return H5I_VOL; }
|
||||
|
@ -166,6 +166,33 @@ Java_hdf_hdf5lib_H5_H5Fis_1hdf5
|
||||
return (jboolean)bval;
|
||||
} /* end Java_hdf_hdf5lib_H5_H5Fis_1hdf5 */
|
||||
|
||||
/*
|
||||
* Class: hdf_hdf5lib_H5
|
||||
* Method: H5Fis_accessible
|
||||
* Signature: (Ljava/lang/String;J)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Fis_1accessible
|
||||
(JNIEnv *env, jclass clss, jstring name, jlong file_id)
|
||||
{
|
||||
htri_t bval = JNI_FALSE;
|
||||
const char *fileName;
|
||||
|
||||
PIN_JAVA_STRING(name, fileName);
|
||||
if (fileName != NULL) {
|
||||
bval = H5Fis_accessible(fileName, (hid_t)file_id);
|
||||
|
||||
UNPIN_JAVA_STRING(name, fileName);
|
||||
|
||||
if (bval > 0)
|
||||
bval = JNI_TRUE;
|
||||
else if (bval < 0)
|
||||
h5libraryError(env);
|
||||
}
|
||||
|
||||
return (jboolean)bval;
|
||||
} /* end Java_hdf_hdf5lib_H5_H5Fis_1accessible */
|
||||
|
||||
/*
|
||||
* Class: hdf_hdf5lib_H5
|
||||
* Method: H5Fget_create_plist
|
||||
@ -177,7 +204,7 @@ Java_hdf_hdf5lib_H5__1H5Fget_1create_1plist
|
||||
{
|
||||
hid_t retVal = -1;
|
||||
|
||||
retVal = H5Fget_create_plist((hid_t)file_id );
|
||||
retVal = H5Fget_create_plist((hid_t)file_id);
|
||||
if (retVal < 0)
|
||||
h5libraryError(env);
|
||||
|
||||
|
@ -66,6 +66,15 @@ JNIEXPORT jboolean JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Fis_1hdf5
|
||||
(JNIEnv*, jclass, jstring);
|
||||
|
||||
/*
|
||||
* Class: hdf_hdf5lib_H5
|
||||
* Method: H5Fis_accessible
|
||||
* Signature: (Ljava/lang/String;J)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL
|
||||
Java_hdf_hdf5lib_H5_H5Fis_1ccessible
|
||||
(JNIEnv*, jclass, jstring, jlong);
|
||||
|
||||
/*
|
||||
* Class: hdf_hdf5lib_H5
|
||||
* Method: H5Fget_create_plist
|
||||
|
@ -81,6 +81,19 @@ public class TestH5Fbasic {
|
||||
assertTrue(isH5 == true);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testH5Fis_accessible() {
|
||||
boolean isH5 = false;
|
||||
|
||||
try {
|
||||
isH5 = H5.H5Fis_accessible(H5_FILE, HDF5Constants.H5P_DEFAULT);
|
||||
}
|
||||
catch (Throwable err) {
|
||||
fail("H5.H5Fis_accessible failed on " + H5_FILE + ": " + err);
|
||||
}
|
||||
assertTrue(isH5 == true);
|
||||
}
|
||||
|
||||
@Test(expected = HDF5LibraryException.class)
|
||||
public void testH5Fcreate_EXCL() throws Throwable {
|
||||
H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_EXCL,
|
||||
|
@ -59,6 +59,11 @@ public class TestH5Fparams {
|
||||
H5.H5Fis_hdf5(null);
|
||||
}
|
||||
|
||||
@Test(expected = NullPointerException.class)
|
||||
public void testH5Fis_accessible_null() throws Throwable {
|
||||
H5.H5Fis_accessible(null, -1);
|
||||
}
|
||||
|
||||
@Test(expected = NullPointerException.class)
|
||||
public void testH5Fmount_null() throws Throwable {
|
||||
H5.H5Fmount(-1, null, -1, HDF5Constants.H5P_DEFAULT);
|
||||
|
@ -9,6 +9,7 @@ JUnit version 4.11
|
||||
.testH5Freopen_closed
|
||||
.testH5Freset_mdc_hit_rate_stats
|
||||
.testH5Fget_name
|
||||
.testH5Fis_accessible
|
||||
.testH5Fcreate
|
||||
.testH5Fclear_elink_file_cache
|
||||
.testH5Fclose_twice
|
||||
@ -17,5 +18,5 @@ JUnit version 4.11
|
||||
|
||||
Time: XXXX
|
||||
|
||||
OK (15 tests)
|
||||
OK (16 tests)
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
JUnit version 4.11
|
||||
.testH5Fis_accessible_null
|
||||
.testH5Fcreate_null
|
||||
.testH5Fflush_local
|
||||
.testH5Fget_info
|
||||
@ -13,5 +14,5 @@ JUnit version 4.11
|
||||
|
||||
Time: XXXX
|
||||
|
||||
OK (11 tests)
|
||||
OK (12 tests)
|
||||
|
||||
|
@ -129,6 +129,12 @@ New Features
|
||||
|
||||
(ADB - 2018/09/18, HDFFV-10332)
|
||||
|
||||
- Remove H5I_REFERENCE from the library
|
||||
|
||||
This ID class was never used by the library and has been removed.
|
||||
|
||||
(DER - 2018/12/08, HDFFV-10252)
|
||||
|
||||
|
||||
Parallel Library:
|
||||
-----------------
|
||||
@ -200,6 +206,14 @@ New Features
|
||||
(ADB - 2018/12/12, HDFVIEW-4)
|
||||
|
||||
|
||||
- Removed H5I_REFERENCE from the Java wrappers
|
||||
|
||||
This ID class was never used by the library and has been removed
|
||||
from the Java wrappers.
|
||||
|
||||
(DER - 2018/12/08, HDFFV-10252)
|
||||
|
||||
|
||||
Tools:
|
||||
------
|
||||
-
|
||||
|
@ -950,6 +950,7 @@ if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c)
|
||||
)
|
||||
add_custom_command (
|
||||
OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c
|
||||
${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1
|
||||
COMMAND ${HDF5_BATCH_CMD}
|
||||
ARGS ${HDF5_BINARY_DIR}/${HDF5_BATCH_H5DETECT_SCRIPT}
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
@ -965,6 +966,7 @@ if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c)
|
||||
if (BUILD_SHARED_LIBS)
|
||||
add_custom_command (
|
||||
OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c
|
||||
${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
ARGS -E copy_if_different "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c" "${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c"
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
@ -977,6 +979,7 @@ if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c)
|
||||
else ()
|
||||
add_custom_command (
|
||||
OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c
|
||||
${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1
|
||||
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR}$<TARGET_FILE:H5detect>
|
||||
ARGS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
@ -987,6 +990,7 @@ if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c)
|
||||
if (BUILD_SHARED_LIBS)
|
||||
add_custom_command (
|
||||
OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c
|
||||
${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
ARGS -E copy_if_different "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c" "${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c"
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
@ -998,6 +1002,26 @@ if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c)
|
||||
endif ()
|
||||
endif ()
|
||||
set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c PROPERTIES GENERATED TRUE)
|
||||
else ()
|
||||
add_custom_command (
|
||||
OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1
|
||||
DEPENDS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c
|
||||
WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR}
|
||||
)
|
||||
if (BUILD_SHARED_LIBS)
|
||||
add_custom_command (
|
||||
OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
ARGS -E copy_if_different "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c" "${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c"
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1
|
||||
DEPENDS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c
|
||||
WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR}
|
||||
)
|
||||
set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c PROPERTIES GENERATED TRUE)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
add_executable (H5make_libsettings ${HDF5_SRC_DIR}/H5make_libsettings.c)
|
||||
@ -1011,6 +1035,7 @@ target_link_libraries (H5make_libsettings
|
||||
|
||||
add_custom_command (
|
||||
OUTPUT ${HDF5_BINARY_DIR}/H5lib_settings.c
|
||||
${HDF5_BINARY_DIR}/gen_SRCS.stamp2
|
||||
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR}$<TARGET_FILE:H5make_libsettings>
|
||||
ARGS ${HDF5_BINARY_DIR}/H5lib_settings.c
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
@ -1022,6 +1047,7 @@ set_source_files_properties (${HDF5_BINARY_DIR}/H5lib_settings.c PROPERTIES GENE
|
||||
if (BUILD_SHARED_LIBS)
|
||||
add_custom_command (
|
||||
OUTPUT ${HDF5_BINARY_DIR}/shared/H5lib_settings.c
|
||||
${HDF5_BINARY_DIR}/shared/shared_gen_SRCS.stamp2
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
ARGS -E copy_if_different "${HDF5_BINARY_DIR}/H5lib_settings.c" "${HDF5_BINARY_DIR}/shared/H5lib_settings.c"
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
|
@ -343,7 +343,7 @@ H5Aget_num_attrs(hid_t loc_id)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid location identifier")
|
||||
|
||||
/* Get the number of attributes for the object */
|
||||
if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_OBJECT_GET_INFO, &loc_params, &oinfo, H5O_INFO_ALL) < 0)
|
||||
if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_OBJECT_GET_INFO, &loc_params, &oinfo, H5O_INFO_ALL) < 0)
|
||||
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, (-1), "unable to get attribute count for object")
|
||||
|
||||
H5_CHECKED_ASSIGN(ret_value, int, oinfo.num_attrs, hsize_t);
|
||||
@ -408,7 +408,7 @@ H5Aiterate1(hid_t loc_id, unsigned *attr_num, H5A_operator1_t op, void *op_data)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_BADTYPE, H5_ITER_ERROR, "invalid location identifier")
|
||||
|
||||
/* Call attribute iteration routine */
|
||||
if((ret_value = H5VL_attr_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_ATTR_ITERATE_OLD, loc_id, attr_num, op, op_data)) < 0)
|
||||
if((ret_value = H5VL_attr_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_ATTR_ITERATE_OLD, loc_id, attr_num, op, op_data)) < 0)
|
||||
HERROR(H5E_VOL, H5E_BADITER, "error iterating over attributes");
|
||||
|
||||
done:
|
||||
|
15
src/H5Apkg.h
15
src/H5Apkg.h
@ -155,21 +155,6 @@ typedef struct {
|
||||
H5A_t **attrs; /* Pointer to array of attribute pointers */
|
||||
} H5A_attr_table_t;
|
||||
|
||||
/* Types for optional attribute VOL operations */
|
||||
typedef enum H5VL_attr_optional_t {
|
||||
H5VL_ATTR_ITERATE_OLD /* H5Aiterate (deprecated routine) */
|
||||
/* (This enum value should have an
|
||||
* "#ifndefH5_NO_DEPRECATED_SYMBOLS"
|
||||
* around it, but the compiler
|
||||
* complains about an empty enum
|
||||
* when deprecated symbols are
|
||||
* disabled currently. When
|
||||
* another enum value is added,
|
||||
* please put the #ifdef around
|
||||
* this symbol. QAK - 2018/12/06
|
||||
*/
|
||||
} H5VL_attr_optional_t;
|
||||
|
||||
|
||||
/*****************************/
|
||||
/* Package Private Variables */
|
||||
|
@ -38,6 +38,22 @@ typedef struct {
|
||||
typedef herr_t (*H5A_operator2_t)(hid_t location_id/*in*/,
|
||||
const char *attr_name/*in*/, const H5A_info_t *ainfo/*in*/, void *op_data/*in,out*/);
|
||||
|
||||
/* Enumeration for native VOL connector attribute optional VOL operations */
|
||||
typedef enum H5VL_native_attr_optional_t {
|
||||
H5VL_NATIVE_ATTR_ITERATE_OLD /* H5Aiterate (deprecated routine) */
|
||||
/* (This enum value should have an
|
||||
* "#ifndefH5_NO_DEPRECATED_SYMBOLS"
|
||||
* around it, but the compiler
|
||||
* complains about an empty enum
|
||||
* when deprecated symbols are
|
||||
* disabled currently. When
|
||||
* another enum value is added,
|
||||
* please put the #ifdef around
|
||||
* this symbol. QAK - 2018/12/06
|
||||
*/
|
||||
} H5VL_native_attr_optional_t;
|
||||
|
||||
|
||||
/* Public function prototypes */
|
||||
H5_DLL hid_t H5Acreate2(hid_t loc_id, const char *attr_name, hid_t type_id,
|
||||
hid_t space_id, hid_t acpl_id, hid_t aapl_id);
|
||||
|
@ -1027,7 +1027,7 @@ H5Dformat_convert(hid_t dset_id)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set collective metadata read info")
|
||||
|
||||
/* Convert the dataset */
|
||||
if(H5VL_dataset_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_DATASET_FORMAT_CONVERT) < 0)
|
||||
if(H5VL_dataset_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_DATASET_FORMAT_CONVERT) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_INTERNAL, FAIL, "can't convert dataset format")
|
||||
|
||||
done:
|
||||
@ -1063,7 +1063,7 @@ H5Dget_chunk_index_type(hid_t dset_id, H5D_chunk_index_t *idx_type)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "idx_type parameter cannot be NULL")
|
||||
|
||||
/* Get the chunk indexing type */
|
||||
if(H5VL_dataset_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_DATASET_GET_CHUNK_INDEX_TYPE, idx_type) < 0)
|
||||
if(H5VL_dataset_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_DATASET_GET_CHUNK_INDEX_TYPE, idx_type) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk index type")
|
||||
|
||||
done:
|
||||
@ -1104,7 +1104,7 @@ H5Dget_chunk_storage_size(hid_t dset_id, const hsize_t *offset, hsize_t *chunk_n
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "chunk_nbytes parameter cannot be NULL")
|
||||
|
||||
/* Get the dataset creation property list */
|
||||
if(H5VL_dataset_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_DATASET_GET_CHUNK_STORAGE_SIZE, offset, chunk_nbytes) < 0)
|
||||
if(H5VL_dataset_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_DATASET_GET_CHUNK_STORAGE_SIZE, offset, chunk_nbytes) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get storage size of chunk")
|
||||
|
||||
done:
|
||||
|
@ -242,7 +242,7 @@ H5Dread_chunk(hid_t dset_id, hid_t dxpl_id, const hsize_t *offset, uint32_t *fil
|
||||
H5CX_set_dxpl(dxpl_id);
|
||||
|
||||
/* Read the raw chunk */
|
||||
if(H5VL_dataset_optional(vol_obj, dxpl_id, H5_REQUEST_NULL, H5VL_DATASET_CHUNK_READ, offset, filters, buf) < 0)
|
||||
if(H5VL_dataset_optional(vol_obj, dxpl_id, H5_REQUEST_NULL, H5VL_NATIVE_DATASET_CHUNK_READ, offset, filters, buf) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read unprocessed chunk data")
|
||||
|
||||
done:
|
||||
@ -370,7 +370,7 @@ H5Dwrite_chunk(hid_t dset_id, hid_t dxpl_id, uint32_t filters, const hsize_t *of
|
||||
H5CX_set_dxpl(dxpl_id);
|
||||
|
||||
/* Write chunk */
|
||||
if(H5VL_dataset_optional(vol_obj, dxpl_id, H5_REQUEST_NULL, H5VL_DATASET_CHUNK_WRITE, filters, offset, data_size_32, buf) < 0)
|
||||
if(H5VL_dataset_optional(vol_obj, dxpl_id, H5_REQUEST_NULL, H5VL_NATIVE_DATASET_CHUNK_WRITE, filters, offset, data_size_32, buf) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't write unprocessed chunk data")
|
||||
|
||||
done:
|
||||
|
@ -110,15 +110,6 @@ typedef struct H5D_type_info_t {
|
||||
hbool_t bkg_buf_allocated; /* Whether the background buffer was allocated */
|
||||
} H5D_type_info_t;
|
||||
|
||||
/* Types for dataset optional VOL operations */
|
||||
typedef enum H5VL_dataset_optional_t {
|
||||
H5VL_DATASET_FORMAT_CONVERT, /* H5Dformat_convert (internal) */
|
||||
H5VL_DATASET_GET_CHUNK_INDEX_TYPE, /* H5Dget_chunk_index_type */
|
||||
H5VL_DATASET_GET_CHUNK_STORAGE_SIZE, /* H5Dget_chunk_storage_size */
|
||||
H5VL_DATASET_CHUNK_READ, /* H5Dchunk_read */
|
||||
H5VL_DATASET_CHUNK_WRITE, /* H5Dchunk_write */
|
||||
} H5VL_dataset_optional_t;
|
||||
|
||||
/* Forward declaration of structs used below */
|
||||
struct H5D_io_info_t;
|
||||
struct H5D_chunk_map_t;
|
||||
|
@ -104,6 +104,16 @@ typedef enum H5D_vds_view_t {
|
||||
/* Callback for H5Pset_append_flush() in a dataset access property list */
|
||||
typedef herr_t (*H5D_append_cb_t)(hid_t dataset_id, hsize_t *cur_dims, void *op_data);
|
||||
|
||||
/* Enumeration for native VOL connector dataset optional VOL operations */
|
||||
typedef enum H5VL_native_dataset_optional_t {
|
||||
H5VL_NATIVE_DATASET_FORMAT_CONVERT, /* H5Dformat_convert (internal) */
|
||||
H5VL_NATIVE_DATASET_GET_CHUNK_INDEX_TYPE, /* H5Dget_chunk_index_type */
|
||||
H5VL_NATIVE_DATASET_GET_CHUNK_STORAGE_SIZE, /* H5Dget_chunk_storage_size */
|
||||
H5VL_NATIVE_DATASET_CHUNK_READ, /* H5Dchunk_read */
|
||||
H5VL_NATIVE_DATASET_CHUNK_WRITE, /* H5Dchunk_write */
|
||||
} H5VL_native_dataset_optional_t;
|
||||
|
||||
|
||||
/********************/
|
||||
/* Public Variables */
|
||||
/********************/
|
||||
|
69
src/H5F.c
69
src/H5F.c
@ -545,7 +545,7 @@ H5Fget_vfd_handle(hid_t file_id, hid_t fapl_id, void **file_handle)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier")
|
||||
|
||||
/* Retrieve the VFD handle for the file */
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_GET_VFD_HANDLE, file_handle, fapl_id) < 0)
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_VFD_HANDLE, file_handle, fapl_id) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get VFD handle")
|
||||
|
||||
done:
|
||||
@ -931,7 +931,7 @@ H5Fget_freespace(hid_t file_id)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid file identifier")
|
||||
|
||||
/* Get the amount of free space in the file */
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_GET_FREE_SPACE, &ret_value) < 0)
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_FREE_SPACE, &ret_value) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, (-1), "unable to get file free space")
|
||||
|
||||
done:
|
||||
@ -966,7 +966,7 @@ H5Fget_filesize(hid_t file_id, hsize_t *size)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID")
|
||||
|
||||
/* Get the file size */
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_GET_SIZE, size) < 0)
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_SIZE, size) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get file size")
|
||||
|
||||
done:
|
||||
@ -1027,7 +1027,7 @@ H5Fget_file_image(hid_t file_id, void *buf_ptr, size_t buf_len)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "not a file ID")
|
||||
|
||||
/* Get the file image */
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_GET_FILE_IMAGE, buf_ptr, &ret_value, buf_len) < 0)
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_FILE_IMAGE, buf_ptr, &ret_value, buf_len) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, (-1), "unable to get file image")
|
||||
|
||||
done:
|
||||
@ -1067,7 +1067,7 @@ H5Fget_mdc_config(hid_t file_id, H5AC_cache_config_t *config_ptr)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier")
|
||||
|
||||
/* Get the metadata cache configuration */
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_GET_MDC_CONF, config_ptr) < 0)
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_MDC_CONF, config_ptr) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get metadata cache configuration")
|
||||
|
||||
done:
|
||||
@ -1100,7 +1100,7 @@ H5Fset_mdc_config(hid_t file_id, H5AC_cache_config_t *config_ptr)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier")
|
||||
|
||||
/* Set the metadata cache configuration */
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_SET_MDC_CONFIG, config_ptr) < 0)
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_SET_MDC_CONFIG, config_ptr) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set metadata cache configuration")
|
||||
|
||||
done:
|
||||
@ -1136,7 +1136,7 @@ H5Fget_mdc_hit_rate(hid_t file_id, double *hit_rate_ptr)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID")
|
||||
|
||||
/* Get the current hit rate */
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_GET_MDC_HR, hit_rate_ptr) < 0)
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_MDC_HR, hit_rate_ptr) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get MDC hit rate")
|
||||
|
||||
done:
|
||||
@ -1173,7 +1173,7 @@ H5Fget_mdc_size(hid_t file_id, size_t *max_size_ptr, size_t *min_clean_size_ptr,
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID")
|
||||
|
||||
/* Get the size data */
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_GET_MDC_SIZE, max_size_ptr, min_clean_size_ptr, cur_size_ptr, cur_num_entries_ptr) < 0)
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_MDC_SIZE, max_size_ptr, min_clean_size_ptr, cur_size_ptr, cur_num_entries_ptr) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get MDC size")
|
||||
|
||||
done:
|
||||
@ -1211,7 +1211,7 @@ H5Freset_mdc_hit_rate_stats(hid_t file_id)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier")
|
||||
|
||||
/* Reset the hit rate statistic */
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_RESET_MDC_HIT_RATE) < 0)
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_RESET_MDC_HIT_RATE) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't reset cache hit rate")
|
||||
|
||||
done:
|
||||
@ -1305,7 +1305,7 @@ H5Fget_info2(hid_t obj_id, H5F_info2_t *finfo)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier")
|
||||
|
||||
/* Get the file information */
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_GET_INFO, type, finfo) < 0)
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_INFO, type, finfo) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to retrieve file info")
|
||||
|
||||
done:
|
||||
@ -1333,7 +1333,7 @@ H5Fget_metadata_read_retry_info(hid_t file_id, H5F_retry_info_t *info)
|
||||
H5TRACE2("e", "i*x", file_id, info);
|
||||
|
||||
/* Check args */
|
||||
if (!info)
|
||||
if(!info)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no info struct")
|
||||
|
||||
/* Get the file pointer */
|
||||
@ -1341,7 +1341,7 @@ H5Fget_metadata_read_retry_info(hid_t file_id, H5F_retry_info_t *info)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID")
|
||||
|
||||
/* Get the retry info */
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_GET_METADATA_READ_RETRY_INFO, info) < 0)
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_METADATA_READ_RETRY_INFO, info) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "can't get metadata read retry info")
|
||||
|
||||
done:
|
||||
@ -1380,7 +1380,7 @@ H5Fget_free_sections(hid_t file_id, H5F_mem_t type, size_t nsects,
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "nsects must be > 0")
|
||||
|
||||
/* Get the free-space section information in the file */
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_GET_FREE_SECTIONS, sect_info, &ret_value, type, nsects) < 0)
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_FREE_SECTIONS, sect_info, &ret_value, type, nsects) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, (-1), "unable to get file free sections")
|
||||
|
||||
done:
|
||||
@ -1413,7 +1413,7 @@ H5Fclear_elink_file_cache(hid_t file_id)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID")
|
||||
|
||||
/* Release the EFC */
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_CLEAR_ELINK_CACHE) < 0)
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_CLEAR_ELINK_CACHE) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "can't release external file cache")
|
||||
|
||||
done:
|
||||
@ -1473,7 +1473,7 @@ H5Fstart_swmr_write(hid_t file_id)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set collective metadata read info")
|
||||
|
||||
/* Start SWMR writing */
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_START_SWMR_WRITE) < 0)
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_START_SWMR_WRITE) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_SYSTEM, FAIL, "unable to start SWMR writing")
|
||||
|
||||
done:
|
||||
@ -1505,7 +1505,7 @@ H5Fstart_mdc_logging(hid_t file_id)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "hid_t identifier is not a file ID")
|
||||
|
||||
/* Call mdc logging function */
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_START_MDC_LOGGING) < 0)
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_START_MDC_LOGGING) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_LOGFAIL, FAIL, "unable to start mdc logging")
|
||||
|
||||
done:
|
||||
@ -1538,7 +1538,7 @@ H5Fstop_mdc_logging(hid_t file_id)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "hid_t identifier is not a file ID")
|
||||
|
||||
/* Call mdc logging function */
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_STOP_MDC_LOGGING) < 0)
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_STOP_MDC_LOGGING) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_LOGFAIL, FAIL, "unable to stop mdc logging")
|
||||
|
||||
done:
|
||||
@ -1572,7 +1572,7 @@ H5Fget_mdc_logging_status(hid_t file_id, hbool_t *is_enabled,
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "hid_t identifier is not a file ID")
|
||||
|
||||
/* Call mdc logging function */
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_GET_MDC_LOGGING_STATUS, is_enabled, is_currently_logging) < 0)
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_MDC_LOGGING_STATUS, is_enabled, is_currently_logging) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_LOGFAIL, FAIL, "unable to get logging status")
|
||||
|
||||
done:
|
||||
@ -1610,7 +1610,7 @@ H5Fset_libver_bounds(hid_t file_id, H5F_libver_t low, H5F_libver_t high)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set collective metadata read info")
|
||||
|
||||
/* Set the library's version bounds */
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_SET_LIBVER_BOUNDS, low, high) < 0)
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_SET_LIBVER_BOUNDS, low, high) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set library version bounds")
|
||||
|
||||
done:
|
||||
@ -1647,7 +1647,7 @@ H5Fformat_convert(hid_t file_id)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set collective metadata read info")
|
||||
|
||||
/* Convert the format */
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_FORMAT_CONVERT) < 0)
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_FORMAT_CONVERT) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTCONVERT, FAIL, "can't convert file format")
|
||||
|
||||
done:
|
||||
@ -1678,7 +1678,7 @@ H5Freset_page_buffering_stats(hid_t file_id)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier")
|
||||
|
||||
/* Reset the statistics */
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_RESET_PAGE_BUFFERING_STATS) < 0)
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_RESET_PAGE_BUFFERING_STATS) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't reset stats for page buffering")
|
||||
|
||||
done:
|
||||
@ -1713,7 +1713,7 @@ H5Fget_page_buffering_stats(hid_t file_id, unsigned accesses[2], unsigned hits[2
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL input parameters for stats")
|
||||
|
||||
/* Get the statistics */
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_GET_PAGE_BUFFERING_STATS, accesses, hits, misses, evictions, bypasses) < 0)
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_PAGE_BUFFERING_STATS, accesses, hits, misses, evictions, bypasses) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve stats for page buffering")
|
||||
|
||||
done:
|
||||
@ -1748,7 +1748,7 @@ H5Fget_mdc_image_info(hid_t file_id, haddr_t *image_addr, hsize_t *image_len)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "hid_t identifier is not a file ID")
|
||||
|
||||
/* Go get the address and size of the cache image */
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_GET_MDC_IMAGE_INFO, image_addr, image_len) < 0)
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_MDC_IMAGE_INFO, image_addr, image_len) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve cache image info")
|
||||
|
||||
done:
|
||||
@ -1782,7 +1782,7 @@ H5Fget_eoa(hid_t file_id, haddr_t *eoa)
|
||||
/* Only do work if valid pointer to fill in */
|
||||
if(eoa) {
|
||||
/* Retrieve the EOA for the file */
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_GET_EOA, eoa) < 0)
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_EOA, eoa) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get EOA")
|
||||
} /* end if */
|
||||
|
||||
@ -1813,7 +1813,7 @@ H5Fincrement_filesize(hid_t file_id, hsize_t increment)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "hid_t identifier is not a file ID")
|
||||
|
||||
/* Increment the file size */
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_INCR_FILESIZE, increment) < 0)
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_INCR_FILESIZE, increment) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to increment file size")
|
||||
|
||||
done:
|
||||
@ -1851,15 +1851,20 @@ H5Fget_dset_no_attrs_hint(hid_t file_id, hbool_t *minimize)
|
||||
FUNC_ENTER_API(FAIL)
|
||||
H5TRACE2("e", "i*b", file_id, minimize);
|
||||
|
||||
if (NULL == minimize)
|
||||
if(NULL == minimize)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "out pointer 'minimize' cannot be NULL")
|
||||
|
||||
vol_obj = (H5VL_object_t *)H5I_object(file_id);
|
||||
if (NULL == vol_obj)
|
||||
vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE);
|
||||
if(NULL == vol_obj)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier")
|
||||
|
||||
if (0 > H5VL_file_get(vol_obj, H5VL_FILE_GET_MIN_DSET_OHDR_FLAG, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, minimize))
|
||||
#if 1
|
||||
if(H5VL_file_get(vol_obj, H5VL_FILE_GET_MIN_DSET_OHDR_FLAG, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, minimize) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get file's dataset header minimization flag")
|
||||
#else
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_MIN_DSET_OHDR_FLAG, minimize) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set file's dataset header minimization flag")
|
||||
#endif
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_API(ret_value)
|
||||
@ -1895,11 +1900,11 @@ H5Fset_dset_no_attrs_hint(hid_t file_id, hbool_t minimize)
|
||||
FUNC_ENTER_API(FAIL)
|
||||
H5TRACE2("e", "ib", file_id, minimize);
|
||||
|
||||
vol_obj = (H5VL_object_t *)H5I_object(file_id);
|
||||
if (NULL == vol_obj)
|
||||
vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE);
|
||||
if(NULL == vol_obj)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier")
|
||||
|
||||
if (0 > H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_SET_MIN_DSET_OHDR_FLAG, minimize))
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_SET_MIN_DSET_OHDR_FLAG, minimize) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set file's dataset header minimization flag")
|
||||
|
||||
done:
|
||||
|
@ -118,7 +118,7 @@ H5Fget_info1(hid_t obj_id, H5F_info1_t *finfo)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier")
|
||||
|
||||
/* Get the file information */
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_GET_INFO, type, &finfo2) < 0)
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_INFO, type, &finfo2) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to retrieve file info")
|
||||
|
||||
/* Copy the compatible fields into the older struct */
|
||||
@ -225,7 +225,7 @@ H5Fset_latest_format(hid_t file_id, hbool_t latest_format)
|
||||
low = H5F_LIBVER_EARLIEST;
|
||||
|
||||
/* Set the library's version bounds */
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_SET_LIBVER_BOUNDS, low, high) < 0)
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_SET_LIBVER_BOUNDS, low, high) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set library version bounds")
|
||||
|
||||
done:
|
||||
|
80
src/H5Fint.c
80
src/H5Fint.c
@ -74,6 +74,7 @@ typedef struct H5F_olist_t {
|
||||
/* Local Prototypes */
|
||||
/********************/
|
||||
|
||||
static herr_t H5F__set_vol_conn(H5F_t *file, hid_t vol_id, const void *vol_info);
|
||||
static herr_t H5F__get_objects(const H5F_t *f, unsigned types, size_t max_index, hid_t *obj_id_list, hbool_t app_ref, size_t *obj_id_count_ptr);
|
||||
static int H5F__get_objects_cb(void *obj_ptr, hid_t obj_id, void *key);
|
||||
static herr_t H5F__build_name(const char *prefix, const char *file_name, char **full_name/*out*/);
|
||||
@ -115,39 +116,36 @@ H5FL_DEFINE(H5F_file_t);
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
static herr_t
|
||||
H5F__set_vol_conn(H5F_t *file, hid_t vol_id, const void *vol_info)
|
||||
{
|
||||
void *new_connector_info = NULL; /* Copy of connector info */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_PACKAGE
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Sanity check */
|
||||
HDassert(file);
|
||||
|
||||
/* Only cache VOL connector ID & info the first time the file is opened */
|
||||
if(file->shared->nrefs == 1) {
|
||||
/* Copy connector info, if it exists */
|
||||
if(vol_info) {
|
||||
H5VL_class_t *connector; /* Pointer to connector */
|
||||
/* Copy connector info, if it exists */
|
||||
if(vol_info) {
|
||||
H5VL_class_t *connector; /* Pointer to connector */
|
||||
|
||||
/* Retrieve the connector for the ID */
|
||||
if(NULL == (connector = (H5VL_class_t *)H5I_object(vol_id)))
|
||||
HGOTO_ERROR(H5E_FILE, H5E_BADTYPE, FAIL, "not a VOL connector ID")
|
||||
/* Retrieve the connector for the ID */
|
||||
if(NULL == (connector = (H5VL_class_t *)H5I_object(vol_id)))
|
||||
HGOTO_ERROR(H5E_FILE, H5E_BADTYPE, FAIL, "not a VOL connector ID")
|
||||
|
||||
/* Allocate and copy connector info */
|
||||
if(H5VL_copy_connector_info(connector, &new_connector_info, vol_info) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTCOPY, FAIL, "connector info copy failed")
|
||||
} /* end if */
|
||||
|
||||
/* Cache the connector ID & info for the container */
|
||||
file->shared->vol_id = vol_id;
|
||||
file->shared->vol_info = new_connector_info;
|
||||
if(H5I_inc_ref(file->shared->vol_id, FALSE) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTINC, FAIL, "incrementing VOL connector ID failed")
|
||||
/* Allocate and copy connector info */
|
||||
if(H5VL_copy_connector_info(connector, &new_connector_info, vol_info) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTCOPY, FAIL, "connector info copy failed")
|
||||
} /* end if */
|
||||
|
||||
/* Cache the connector ID & info for the container */
|
||||
file->shared->vol_id = vol_id;
|
||||
file->shared->vol_info = new_connector_info;
|
||||
if(H5I_inc_ref(file->shared->vol_id, FALSE) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTINC, FAIL, "incrementing VOL connector ID failed")
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5F__set_vol_conn() */
|
||||
@ -492,7 +490,6 @@ H5F__get_objects_cb(void *obj_ptr, hid_t obj_id, void *key)
|
||||
case H5I_BADID:
|
||||
case H5I_FILE:
|
||||
case H5I_DATASPACE:
|
||||
case H5I_REFERENCE:
|
||||
case H5I_VFL:
|
||||
case H5I_VOL:
|
||||
case H5I_GENPROP_CLS:
|
||||
@ -937,9 +934,6 @@ H5F__new(H5F_file_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5FD_
|
||||
/* intialize point of no return */
|
||||
f->shared->point_of_no_return = FALSE;
|
||||
|
||||
/* set default value for minimizing dataset object headers */
|
||||
f->shared->crt_dset_min_ohdr_flag = FALSE;
|
||||
|
||||
/* Copy the file creation and file access property lists into the
|
||||
* new file handle. We do this early because some values might need
|
||||
* to change as the file is being opened.
|
||||
@ -1093,6 +1087,16 @@ H5F__new(H5F_file_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5FD_
|
||||
if(H5P_get(plist, H5F_ACS_OBJECT_FLUSH_CB_NAME, &(f->shared->object_flush)) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't get object flush cb info")
|
||||
|
||||
/* Get the VOL connector info */
|
||||
{
|
||||
H5VL_connector_prop_t connector_prop; /* Property for VOL connector ID & info */
|
||||
|
||||
if(H5P_peek(plist, H5F_ACS_VOL_CONN_NAME, &connector_prop) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't get VOL connector info")
|
||||
if(H5F__set_vol_conn(f, connector_prop.connector_id, connector_prop.connector_info) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "can't cache VOL connector info")
|
||||
} /* end block */
|
||||
|
||||
/* Create a metadata cache with the specified number of elements.
|
||||
* The cache might be created with a different number of elements and
|
||||
* the access property list should be updated to reflect that.
|
||||
@ -3604,7 +3608,6 @@ H5F__get_file(void *obj, H5I_type_t type)
|
||||
case H5I_UNINIT:
|
||||
case H5I_BADID:
|
||||
case H5I_DATASPACE:
|
||||
case H5I_REFERENCE:
|
||||
case H5I_VFL:
|
||||
case H5I_VOL:
|
||||
case H5I_GENPROP_CLS:
|
||||
@ -3698,7 +3701,7 @@ H5F_get_file_id(hid_t obj_id, H5I_type_t type)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid identifier")
|
||||
|
||||
/* Get the file through the VOL */
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_GET_FILE_ID, type, &file_id) < 0)
|
||||
if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_FILE_ID, type, &file_id) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, H5I_INVALID_HID, "unable to get file ID")
|
||||
if(H5I_INVALID_HID == file_id)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, H5I_INVALID_HID, "unable to get the file ID through the VOL")
|
||||
@ -3710,28 +3713,3 @@ done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5F_get_file_id() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5F_set_min_dset_ohdr
|
||||
*
|
||||
* Purpose: Set the crt_dset_ohdr_flag field with a new value.
|
||||
*
|
||||
* Return: SUCCEED/FAIL
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5F_set_min_dset_ohdr(H5F_t *f, hbool_t minimize)
|
||||
{
|
||||
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
|
||||
/* Sanity check */
|
||||
HDassert(f);
|
||||
HDassert(f->shared);
|
||||
|
||||
f->shared->crt_dset_min_ohdr_flag = minimize;
|
||||
|
||||
FUNC_LEAVE_NOAPI(SUCCEED)
|
||||
} /* H5F_set_min_dset_ohdr() */
|
||||
|
||||
|
32
src/H5Fpkg.h
32
src/H5Fpkg.h
@ -383,37 +383,6 @@ struct H5F_t {
|
||||
#endif /* H5_HAVE_PARALLEL */
|
||||
};
|
||||
|
||||
/* types for file optional VOL operations */
|
||||
typedef enum H5VL_file_optional_t {
|
||||
H5VL_FILE_CLEAR_ELINK_CACHE, /* Clear external link cache */
|
||||
H5VL_FILE_GET_FILE_IMAGE, /* file image */
|
||||
H5VL_FILE_GET_FREE_SECTIONS, /* file free selections */
|
||||
H5VL_FILE_GET_FREE_SPACE, /* file freespace */
|
||||
H5VL_FILE_GET_INFO, /* file info */
|
||||
H5VL_FILE_GET_MDC_CONF, /* file metadata cache configuration */
|
||||
H5VL_FILE_GET_MDC_HR, /* file metadata cache hit rate */
|
||||
H5VL_FILE_GET_MDC_SIZE, /* file metadata cache size */
|
||||
H5VL_FILE_GET_SIZE, /* file size */
|
||||
H5VL_FILE_GET_VFD_HANDLE, /* file VFD handle */
|
||||
H5VL_FILE_GET_FILE_ID, /* retrieve or resurrect file ID of object */
|
||||
H5VL_FILE_RESET_MDC_HIT_RATE, /* get metadata cache hit rate */
|
||||
H5VL_FILE_SET_MDC_CONFIG, /* set metadata cache configuration */
|
||||
H5VL_FILE_GET_METADATA_READ_RETRY_INFO,
|
||||
H5VL_FILE_START_SWMR_WRITE,
|
||||
H5VL_FILE_START_MDC_LOGGING,
|
||||
H5VL_FILE_STOP_MDC_LOGGING,
|
||||
H5VL_FILE_GET_MDC_LOGGING_STATUS,
|
||||
H5VL_FILE_FORMAT_CONVERT,
|
||||
H5VL_FILE_RESET_PAGE_BUFFERING_STATS,
|
||||
H5VL_FILE_GET_PAGE_BUFFERING_STATS,
|
||||
H5VL_FILE_GET_MDC_IMAGE_INFO,
|
||||
H5VL_FILE_GET_EOA,
|
||||
H5VL_FILE_INCR_FILESIZE,
|
||||
H5VL_FILE_SET_LIBVER_BOUNDS,
|
||||
H5VL_FILE_SET_MIN_DSET_OHDR_FLAG
|
||||
} H5VL_file_optional_t;
|
||||
|
||||
|
||||
/*****************************/
|
||||
/* Package Private Variables */
|
||||
/*****************************/
|
||||
@ -442,7 +411,6 @@ H5_DLL herr_t H5F__close(H5F_t *f);
|
||||
H5_DLL herr_t H5F__set_libver_bounds(H5F_t *f, H5F_libver_t low, H5F_libver_t high);
|
||||
H5_DLL H5F_t *H5F__get_file(void *obj, H5I_type_t type);
|
||||
H5_DLL hid_t H5F__get_file_id(H5F_t *file);
|
||||
H5_DLL herr_t H5F__set_vol_conn(H5F_t *file, hid_t vol_id, const void *vol_info);
|
||||
|
||||
/* File mount related routines */
|
||||
H5_DLL herr_t H5F__mount(H5G_loc_t *loc, const char *name, H5F_t *child, hid_t plist_id);
|
||||
|
@ -217,6 +217,36 @@ typedef struct H5F_retry_info_t {
|
||||
/* Callback for H5Pset_object_flush_cb() in a file access property list */
|
||||
typedef herr_t (*H5F_flush_cb_t)(hid_t object_id, void *udata);
|
||||
|
||||
/* Enumeration for native VOL connector file optional VOL operations */
|
||||
typedef enum H5VL_native_file_optional_t {
|
||||
H5VL_NATIVE_FILE_CLEAR_ELINK_CACHE, /* H5Fclear_elink_file_cache */
|
||||
H5VL_NATIVE_FILE_GET_FILE_IMAGE, /* H5Fget_file_image */
|
||||
H5VL_NATIVE_FILE_GET_FREE_SECTIONS, /* H5Fget_free_sections */
|
||||
H5VL_NATIVE_FILE_GET_FREE_SPACE, /* H5Fget_freespace */
|
||||
H5VL_NATIVE_FILE_GET_INFO, /* H5Fget_info1/2 */
|
||||
H5VL_NATIVE_FILE_GET_MDC_CONF, /* H5Fget_mdc_config */
|
||||
H5VL_NATIVE_FILE_GET_MDC_HR, /* H5Fget_mdc_hit_rate */
|
||||
H5VL_NATIVE_FILE_GET_MDC_SIZE, /* H5Fget_mdc_size */
|
||||
H5VL_NATIVE_FILE_GET_SIZE, /* H5Fget_filesize */
|
||||
H5VL_NATIVE_FILE_GET_VFD_HANDLE, /* H5Fget_vfd_handle */
|
||||
H5VL_NATIVE_FILE_GET_FILE_ID, /* H5Fget_file_id */
|
||||
H5VL_NATIVE_FILE_RESET_MDC_HIT_RATE, /* H5Freset_mdc_hit_rate_stats */
|
||||
H5VL_NATIVE_FILE_SET_MDC_CONFIG, /* H5Fset_mdc_config */
|
||||
H5VL_NATIVE_FILE_GET_METADATA_READ_RETRY_INFO, /* H5Fget_metadata_read_retry_info */
|
||||
H5VL_NATIVE_FILE_START_SWMR_WRITE, /* H5Fstart_swmr_write */
|
||||
H5VL_NATIVE_FILE_START_MDC_LOGGING, /* H5Fstart_mdc_logging */
|
||||
H5VL_NATIVE_FILE_STOP_MDC_LOGGING, /* H5Fstop_mdc_logging */
|
||||
H5VL_NATIVE_FILE_GET_MDC_LOGGING_STATUS, /* H5Fget_mdc_logging_status */
|
||||
H5VL_NATIVE_FILE_FORMAT_CONVERT, /* H5Fformat_convert */
|
||||
H5VL_NATIVE_FILE_RESET_PAGE_BUFFERING_STATS, /* H5Freset_page_buffering_stats */
|
||||
H5VL_NATIVE_FILE_GET_PAGE_BUFFERING_STATS, /* H5Fget_page_buffering_stats */
|
||||
H5VL_NATIVE_FILE_GET_MDC_IMAGE_INFO, /* H5Fget_mdc_image_info */
|
||||
H5VL_NATIVE_FILE_GET_EOA, /* H5Fget_eoa */
|
||||
H5VL_NATIVE_FILE_INCR_FILESIZE, /* H5Fincrement_filesize */
|
||||
H5VL_NATIVE_FILE_SET_LIBVER_BOUNDS, /* H5Fset_latest_format/libver_bounds */
|
||||
H5VL_NATIVE_FILE_SET_MIN_DSET_OHDR_FLAG /* H5Fset_dset_no_attrs_hint*/
|
||||
} H5VL_native_file_optional_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -734,7 +734,7 @@ H5Gset_comment(hid_t loc_id, const char *name, const char *comment)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
|
||||
|
||||
/* Set the comment */
|
||||
if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_OBJECT_SET_COMMENT, &loc_params, comment) < 0)
|
||||
if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_OBJECT_SET_COMMENT, &loc_params, comment) < 0)
|
||||
HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "unable to set comment value")
|
||||
|
||||
done:
|
||||
@ -795,7 +795,7 @@ H5Gget_comment(hid_t loc_id, const char *name, size_t bufsize, char *buf)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
|
||||
|
||||
/* Get the comment */
|
||||
if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_OBJECT_GET_COMMENT, &loc_params, buf, bufsize, &ret_value) < 0)
|
||||
if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_OBJECT_GET_COMMENT, &loc_params, buf, bufsize, &ret_value) < 0)
|
||||
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get comment value")
|
||||
|
||||
done:
|
||||
@ -868,7 +868,7 @@ H5Giterate(hid_t loc_id, const char *name, int *idx_p, H5G_iterate_t op,
|
||||
HGOTO_ERROR(H5E_ATOM, H5E_BADTYPE, (-1), "invalid identifier")
|
||||
|
||||
/* Call private iteration function, through VOL callback */
|
||||
if((ret_value = H5VL_group_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_GROUP_ITERATE_OLD, &loc_params, idx, &last_obj, &lnk_op, op_data)) < 0)
|
||||
if((ret_value = H5VL_group_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_GROUP_ITERATE_OLD, &loc_params, idx, &last_obj, &lnk_op, op_data)) < 0)
|
||||
HERROR(H5E_SYM, H5E_BADITER, "error iterating over group's links");
|
||||
|
||||
/* Set the index we stopped at */
|
||||
@ -985,7 +985,7 @@ H5Gget_objinfo(hid_t loc_id, const char *name, hbool_t follow_link,
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
|
||||
|
||||
/* Retrieve the object's information */
|
||||
if(H5VL_group_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_GROUP_GET_OBJINFO, &loc_params, (unsigned)follow_link, statbuf) < 0)
|
||||
if(H5VL_group_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_GROUP_GET_OBJINFO, &loc_params, (unsigned)follow_link, statbuf) < 0)
|
||||
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get info for object: '%s'", name)
|
||||
} /* end if */
|
||||
|
||||
@ -1239,7 +1239,7 @@ H5Gget_objtype_by_idx(hid_t loc_id, hsize_t idx)
|
||||
|
||||
/* Retrieve the object's basic information (which includes its type) */
|
||||
fields = H5O_INFO_BASIC;
|
||||
if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_OBJECT_GET_INFO, &loc_params, &oinfo, fields) < 0)
|
||||
if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_OBJECT_GET_INFO, &loc_params, &oinfo, fields) < 0)
|
||||
HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, H5G_UNKNOWN, "can't get object info")
|
||||
|
||||
/* Map to group object type */
|
||||
|
@ -210,9 +210,6 @@ H5G_loc_real(void *obj, H5I_type_t type, H5G_loc_t *loc)
|
||||
break;
|
||||
}
|
||||
|
||||
case H5I_REFERENCE:
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get group location of reference")
|
||||
|
||||
case H5I_DATASPACE:
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get group location of dataspace")
|
||||
|
||||
|
@ -821,7 +821,6 @@ H5G_name_replace_cb(void *obj_ptr, hid_t obj_id, void *key)
|
||||
case H5I_FILE:
|
||||
case H5I_DATASPACE:
|
||||
case H5I_ATTR:
|
||||
case H5I_REFERENCE:
|
||||
case H5I_VFL:
|
||||
case H5I_VOL:
|
||||
case H5I_GENPROP_CLS:
|
||||
|
16
src/H5Gpkg.h
16
src/H5Gpkg.h
@ -299,22 +299,6 @@ typedef struct H5G_copy_file_ud_t {
|
||||
H5G_cache_t cache; /* Cached data for symbol table entry */
|
||||
} H5G_copy_file_ud_t;
|
||||
|
||||
/* Types for optional group VOL operations */
|
||||
typedef enum H5VL_group_optional_t {
|
||||
H5VL_GROUP_ITERATE_OLD, /* HG5Giterate (deprecated routine) */
|
||||
H5VL_GROUP_GET_OBJINFO /* HG5Gget_objinfo (deprecated routine) */
|
||||
/* (These two enum values should have an
|
||||
* "#ifndefH5_NO_DEPRECATED_SYMBOLS"
|
||||
* around them, but the compiler
|
||||
* complains about an empty enum
|
||||
* when deprecated symbols are
|
||||
* disabled currently. When
|
||||
* another enum value is added,
|
||||
* please put the #ifdef around
|
||||
* these symbols. QAK - 2018/12/06
|
||||
*/
|
||||
} H5VL_group_optional_t;
|
||||
|
||||
|
||||
/*****************************/
|
||||
/* Package Private Variables */
|
||||
|
@ -62,6 +62,22 @@ typedef struct H5G_info_t {
|
||||
hbool_t mounted; /* Whether group has a file mounted on it */
|
||||
} H5G_info_t;
|
||||
|
||||
/* Enumeration for native VOL connector group optional VOL operations */
|
||||
typedef enum H5VL_native_group_optional_t {
|
||||
H5VL_NATIVE_GROUP_ITERATE_OLD, /* HG5Giterate (deprecated routine) */
|
||||
H5VL_NATIVE_GROUP_GET_OBJINFO /* HG5Gget_objinfo (deprecated routine) */
|
||||
/* (These two enum values should have an
|
||||
* "#ifndefH5_NO_DEPRECATED_SYMBOLS"
|
||||
* around them, but the compiler
|
||||
* complains about an empty enum
|
||||
* when deprecated symbols are
|
||||
* disabled currently. When
|
||||
* another enum value is added,
|
||||
* please put the #ifdef around
|
||||
* these symbols. QAK - 2018/12/06
|
||||
*/
|
||||
} H5VL_native_group_optional_t;
|
||||
|
||||
/********************/
|
||||
/* Public Variables */
|
||||
/********************/
|
||||
|
@ -609,7 +609,6 @@ H5G__user_path_test(hid_t obj_id, char *user_path, size_t *user_path_len, unsign
|
||||
case H5I_FILE:
|
||||
case H5I_DATASPACE:
|
||||
case H5I_ATTR:
|
||||
case H5I_REFERENCE:
|
||||
case H5I_VFL:
|
||||
case H5I_VOL:
|
||||
case H5I_GENPROP_CLS:
|
||||
|
@ -2372,7 +2372,6 @@ H5I__id_dump_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
|
||||
case H5I_FILE:
|
||||
case H5I_DATASPACE:
|
||||
case H5I_ATTR:
|
||||
case H5I_REFERENCE:
|
||||
case H5I_VFL:
|
||||
case H5I_VOL:
|
||||
case H5I_GENPROP_CLS:
|
||||
|
@ -29,9 +29,6 @@
|
||||
*
|
||||
* When adding types here, add a section to the 'misc19' test in test/tmisc.c
|
||||
* to verify that the H5I{inc|dec|get}_ref() routines work correctly with it.
|
||||
*
|
||||
* NOTE: H5I_REFERENCE is not used by the library and has been deprecated
|
||||
* with a tentative removal version of 1.12.0. (DER, July 2017)
|
||||
*/
|
||||
typedef enum H5I_type_t {
|
||||
H5I_UNINIT = (-2), /* uninitialized type */
|
||||
@ -42,7 +39,6 @@ typedef enum H5I_type_t {
|
||||
H5I_DATASPACE, /* type ID for Dataspace objects */
|
||||
H5I_DATASET, /* type ID for Dataset objects */
|
||||
H5I_ATTR, /* type ID for Attribute objects */
|
||||
H5I_REFERENCE, /* *DEPRECATED* type ID for Reference objects */
|
||||
H5I_VFL, /* type ID for virtual file layer */
|
||||
H5I_VOL, /* type ID for virtual object layer */
|
||||
H5I_GENPROP_CLS, /* type ID for generic property list classes */
|
||||
|
15
src/H5O.c
15
src/H5O.c
@ -575,7 +575,7 @@ H5Oget_info2(hid_t loc_id, H5O_info_t *oinfo, unsigned fields)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
|
||||
|
||||
/* Retrieve the object's information */
|
||||
if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_OBJECT_GET_INFO, &loc_params, oinfo, fields) < 0)
|
||||
if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_OBJECT_GET_INFO, &loc_params, oinfo, fields) < 0)
|
||||
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get info for object")
|
||||
|
||||
done:
|
||||
@ -633,7 +633,7 @@ H5Oget_info_by_name2(hid_t loc_id, const char *name, H5O_info_t *oinfo,
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
|
||||
|
||||
/* Retrieve the object's information */
|
||||
if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_OBJECT_GET_INFO, &loc_params, oinfo, fields) < 0)
|
||||
if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_OBJECT_GET_INFO, &loc_params, oinfo, fields) < 0)
|
||||
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get info for object: '%s'", name)
|
||||
|
||||
done:
|
||||
@ -698,7 +698,7 @@ H5Oget_info_by_idx2(hid_t loc_id, const char *group_name, H5_index_t idx_type,
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
|
||||
|
||||
/* Retrieve the object's information */
|
||||
if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_OBJECT_GET_INFO, &loc_params, oinfo, fields) < 0)
|
||||
if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_OBJECT_GET_INFO, &loc_params, oinfo, fields) < 0)
|
||||
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get info for object")
|
||||
|
||||
done:
|
||||
@ -746,7 +746,7 @@ H5Oset_comment(hid_t obj_id, const char *comment)
|
||||
loc_params.obj_type = H5I_get_type(obj_id);
|
||||
|
||||
/* (Re)set the object's comment */
|
||||
if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_OBJECT_SET_COMMENT, &loc_params, comment) < 0)
|
||||
if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_OBJECT_SET_COMMENT, &loc_params, comment) < 0)
|
||||
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set comment for object")
|
||||
|
||||
done:
|
||||
@ -801,7 +801,7 @@ H5Oset_comment_by_name(hid_t loc_id, const char *name, const char *comment,
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
|
||||
|
||||
/* (Re)set the object's comment */
|
||||
if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_OBJECT_SET_COMMENT, &loc_params, comment) < 0)
|
||||
if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_OBJECT_SET_COMMENT, &loc_params, comment) < 0)
|
||||
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set comment for object: '%s'", name)
|
||||
|
||||
done:
|
||||
@ -844,7 +844,7 @@ H5Oget_comment(hid_t obj_id, char *comment, size_t bufsize)
|
||||
loc_params.obj_type = H5I_get_type(obj_id);
|
||||
|
||||
/* Retrieve the object's comment */
|
||||
if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_OBJECT_GET_COMMENT, &loc_params, comment, bufsize, &ret_value) < 0)
|
||||
if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_OBJECT_GET_COMMENT, &loc_params, comment, bufsize, &ret_value) < 0)
|
||||
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, (-1), "can't get comment for object")
|
||||
|
||||
done:
|
||||
@ -898,7 +898,7 @@ H5Oget_comment_by_name(hid_t loc_id, const char *name, char *comment, size_t buf
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid location identifier")
|
||||
|
||||
/* Retrieve the object's comment */
|
||||
if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_OBJECT_GET_COMMENT, &loc_params, comment, bufsize, &ret_value) < 0)
|
||||
if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_OBJECT_GET_COMMENT, &loc_params, comment, bufsize, &ret_value) < 0)
|
||||
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, (-1), "can't get comment for object: '%s'", name)
|
||||
|
||||
done:
|
||||
@ -1104,7 +1104,6 @@ H5Oclose(hid_t object_id)
|
||||
case H5I_FILE:
|
||||
case H5I_DATASPACE:
|
||||
case H5I_ATTR:
|
||||
case H5I_REFERENCE:
|
||||
case H5I_VFL:
|
||||
case H5I_VOL:
|
||||
case H5I_GENPROP_CLS:
|
||||
|
@ -109,7 +109,7 @@ H5Oget_info1(hid_t loc_id, H5O_info_t *oinfo)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
|
||||
|
||||
/* Retrieve the object's information */
|
||||
if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_OBJECT_GET_INFO, &loc_params, oinfo, H5O_INFO_ALL) < 0)
|
||||
if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_OBJECT_GET_INFO, &loc_params, oinfo, H5O_INFO_ALL) < 0)
|
||||
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get info for object")
|
||||
|
||||
done:
|
||||
@ -160,7 +160,7 @@ H5Oget_info_by_name1(hid_t loc_id, const char *name, H5O_info_t *oinfo, hid_t la
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
|
||||
|
||||
/* Retrieve the object's information */
|
||||
if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_OBJECT_GET_INFO, &loc_params, oinfo, H5O_INFO_ALL) < 0)
|
||||
if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_OBJECT_GET_INFO, &loc_params, oinfo, H5O_INFO_ALL) < 0)
|
||||
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get info for object: '%s'", name)
|
||||
|
||||
done:
|
||||
@ -221,7 +221,7 @@ H5Oget_info_by_idx1(hid_t loc_id, const char *group_name, H5_index_t idx_type,
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
|
||||
|
||||
/* Retrieve the object's information */
|
||||
if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_OBJECT_GET_INFO, &loc_params, oinfo, H5O_INFO_ALL) < 0)
|
||||
if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_OBJECT_GET_INFO, &loc_params, oinfo, H5O_INFO_ALL) < 0)
|
||||
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get info for object")
|
||||
|
||||
done:
|
||||
|
@ -484,7 +484,6 @@ H5O_refresh_metadata_reopen(hid_t oid, H5G_loc_t *obj_loc, H5VL_t *vol_connector
|
||||
case H5I_FILE:
|
||||
case H5I_DATASPACE:
|
||||
case H5I_ATTR:
|
||||
case H5I_REFERENCE:
|
||||
case H5I_VFL:
|
||||
case H5I_VOL:
|
||||
case H5I_GENPROP_CLS:
|
||||
|
@ -1847,7 +1847,6 @@ H5O_get_loc(hid_t object_id)
|
||||
case H5I_FILE:
|
||||
case H5I_DATASPACE:
|
||||
case H5I_ATTR:
|
||||
case H5I_REFERENCE:
|
||||
case H5I_VFL:
|
||||
case H5I_VOL:
|
||||
case H5I_GENPROP_CLS:
|
||||
|
@ -857,13 +857,6 @@ typedef struct {
|
||||
} u;
|
||||
} H5O_mesg_operator_t;
|
||||
|
||||
/* Types for object optional VOL operations */
|
||||
typedef enum H5VL_object_optional_t {
|
||||
H5VL_OBJECT_GET_COMMENT, /* get object comment */
|
||||
H5VL_OBJECT_GET_INFO, /* get object info */
|
||||
H5VL_OBJECT_SET_COMMENT /* set object comment */
|
||||
} H5VL_object_optional_t;
|
||||
|
||||
/* Typedef for abstract object creation */
|
||||
typedef struct {
|
||||
H5O_type_t obj_type; /* Type of object to create */
|
||||
|
@ -150,6 +150,13 @@ typedef enum H5O_mcdt_search_ret_t {
|
||||
/* Callback to invoke when completing the search for a matching committed datatype from the committed dtype list */
|
||||
typedef H5O_mcdt_search_ret_t (*H5O_mcdt_search_cb_t)(void *op_data);
|
||||
|
||||
/* Enumeration for native VOL connector object optional VOL operations */
|
||||
typedef enum H5VL_native_object_optional_t {
|
||||
H5VL_NATIVE_OBJECT_GET_COMMENT, /* H5G|H5Oget_comment, H5Oget_comment_by_name */
|
||||
H5VL_NATIVE_OBJECT_GET_INFO, /* H5Oget_info(_by_idx, _by_name)(2?) */
|
||||
H5VL_NATIVE_OBJECT_SET_COMMENT /* H5G|H5Oset_comment, H5Oset_comment_by_name */
|
||||
} H5VL_native_object_optional_t;
|
||||
|
||||
/********************/
|
||||
/* Public Variables */
|
||||
/********************/
|
||||
|
@ -262,7 +262,7 @@ H5PL_load(H5PL_type_t type, const H5PL_key_t *key)
|
||||
|
||||
/* Set up the search parameters */
|
||||
search_params.type = type;
|
||||
search_params.key.id = key->id;
|
||||
search_params.key = key;
|
||||
|
||||
/* Search in the table of already loaded plugin libraries */
|
||||
if(H5PL__find_plugin_in_cache(&search_params, &found, &plugin_info) < 0)
|
||||
|
@ -242,6 +242,7 @@ H5PL__create_path_table(void)
|
||||
* environment variable or the default.
|
||||
*/
|
||||
char *next_path = NULL; /* A path tokenized from the paths string */
|
||||
char *lasts = NULL; /* Context pointer for strtok_r() call */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_PACKAGE
|
||||
@ -265,8 +266,7 @@ H5PL__create_path_table(void)
|
||||
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path copy")
|
||||
|
||||
/* Separate the paths and store them */
|
||||
/* XXX: strtok() is not thread-safe */
|
||||
next_path = HDstrtok(paths, H5PL_PATH_SEPARATOR);
|
||||
next_path = HDstrtok_r(paths, H5PL_PATH_SEPARATOR, &lasts);
|
||||
while (next_path) {
|
||||
|
||||
/* Insert the path into the table */
|
||||
@ -274,7 +274,7 @@ H5PL__create_path_table(void)
|
||||
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't insert path: %s", next_path)
|
||||
|
||||
/* Get the next path from the environment string */
|
||||
next_path = HDstrtok(NULL, H5PL_PATH_SEPARATOR);
|
||||
next_path = HDstrtok_r(NULL, H5PL_PATH_SEPARATOR, &lasts);
|
||||
} /* end while */
|
||||
|
||||
done:
|
||||
@ -689,7 +689,7 @@ H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *fo
|
||||
continue;
|
||||
|
||||
/* attempt to open the dynamic library as a filter library */
|
||||
if (H5PL__open(path, search_params->type, &(search_params->key), found, plugin_info) < 0)
|
||||
if (H5PL__open(path, search_params->type, search_params->key, found, plugin_info) < 0)
|
||||
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "search in directory failed")
|
||||
if (*found)
|
||||
HGOTO_DONE(SUCCEED)
|
||||
@ -755,7 +755,7 @@ H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *fo
|
||||
continue;
|
||||
|
||||
/* attempt to open the dynamic library as a filter library */
|
||||
if (H5PL__open(path, search_params->type, &(search_params->key), found, plugin_info) < 0)
|
||||
if (H5PL__open(path, search_params->type, search_params->key, found, plugin_info) < 0)
|
||||
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "search in directory failed")
|
||||
if (*found)
|
||||
HGOTO_DONE(SUCCEED)
|
||||
|
@ -116,7 +116,7 @@
|
||||
/* Data used to search for plugins */
|
||||
typedef struct H5PL_search_params_t {
|
||||
H5PL_type_t type;
|
||||
H5PL_key_t key;
|
||||
const H5PL_key_t *key;
|
||||
} H5PL_search_params_t;
|
||||
|
||||
|
||||
|
@ -276,7 +276,7 @@ H5PL__find_plugin_in_cache(const H5PL_search_params_t *search_params, hbool_t *f
|
||||
for (u = 0; u < H5PL_num_plugins_g; u++) {
|
||||
|
||||
/* If the plugin type (filter, etc.) and ID match, query the plugin for its info */
|
||||
if ((search_params->type == (H5PL_cache_g[u]).type) && (search_params->key.id == (H5PL_cache_g[u]).key.id)) {
|
||||
if ((search_params->type == (H5PL_cache_g[u]).type) && (search_params->key->id == (H5PL_cache_g[u]).key.id)) {
|
||||
|
||||
H5PL_get_plugin_info_t get_plugin_info_function;
|
||||
const H5Z_class2_t *filter_info;
|
||||
|
38
src/H5Rint.c
38
src/H5Rint.c
@ -62,18 +62,6 @@ hbool_t H5_PKG_INIT_VAR = FALSE;
|
||||
/* Local Variables */
|
||||
/*******************/
|
||||
|
||||
/* Reference ID class
|
||||
*
|
||||
* NOTE: H5I_REFERENCE is not used by the library and has been deprecated
|
||||
* with a tentative removal version of 1.12.0. (DER, July 2017)
|
||||
*/
|
||||
static const H5I_class_t H5I_REFERENCE_CLS[1] = {{
|
||||
H5I_REFERENCE, /* ID class value */
|
||||
0, /* Class flags */
|
||||
0, /* # of reserved IDs for class */
|
||||
NULL /* Callback routine for closing objects of this class */
|
||||
}};
|
||||
|
||||
/* Flag indicating "top" of interface has been initialized */
|
||||
static hbool_t H5R_top_package_initialize_s = FALSE;
|
||||
|
||||
@ -97,11 +85,7 @@ H5R__init_package(void)
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
|
||||
/* Initialize the atom group for the file IDs */
|
||||
if (H5I_register_type(H5I_REFERENCE_CLS) < 0)
|
||||
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINIT, FAIL, "unable to initialize interface")
|
||||
|
||||
/* Mark "top" of interface as initialized, too */
|
||||
/* Mark "top" of interface as initialized */
|
||||
H5R_top_package_initialize_s = TRUE;
|
||||
|
||||
done:
|
||||
@ -134,16 +118,10 @@ H5R_top_term_package(void)
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
|
||||
if (H5R_top_package_initialize_s) {
|
||||
if (H5I_nmembers(H5I_REFERENCE) > 0) {
|
||||
(void)H5I_clear_type(H5I_REFERENCE, FALSE, FALSE);
|
||||
n++;
|
||||
}
|
||||
|
||||
/* Mark closed */
|
||||
if (0 == n)
|
||||
/* Mark closed if initialized */
|
||||
if(H5R_top_package_initialize_s)
|
||||
if(0 == n)
|
||||
H5R_top_package_initialize_s = FALSE;
|
||||
}
|
||||
|
||||
FUNC_LEAVE_NOAPI(n)
|
||||
} /* end H5R_top_term_package() */
|
||||
@ -176,16 +154,12 @@ H5R_term_package(void)
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
|
||||
if (H5_PKG_INIT_VAR) {
|
||||
if(H5_PKG_INIT_VAR) {
|
||||
/* Sanity checks */
|
||||
HDassert(0 == H5I_nmembers(H5I_REFERENCE));
|
||||
HDassert(FALSE == H5R_top_package_initialize_s);
|
||||
|
||||
/* Destroy the reference id group */
|
||||
n += (H5I_dec_type_ref(H5I_REFERENCE) > 0);
|
||||
|
||||
/* Mark closed */
|
||||
if (0 == n)
|
||||
if(0 == n)
|
||||
H5_PKG_INIT_VAR = FALSE;
|
||||
}
|
||||
|
||||
|
@ -1729,7 +1729,6 @@ H5Tcopy(hid_t type_id)
|
||||
case H5I_GROUP:
|
||||
case H5I_DATASPACE:
|
||||
case H5I_ATTR:
|
||||
case H5I_REFERENCE:
|
||||
case H5I_VFL:
|
||||
case H5I_VOL:
|
||||
case H5I_GENPROP_CLS:
|
||||
|
@ -95,8 +95,6 @@ static herr_t H5VL__dataset_optional(void *obj, const H5VL_class_t *cls,
|
||||
hid_t dxpl_id, void **req, va_list arguments);
|
||||
static herr_t H5VL__dataset_close(void *obj, const H5VL_class_t *cls, hid_t dxpl_id,
|
||||
void **req);
|
||||
static herr_t H5VL__file_cache_connector(void *obj, const H5VL_class_t *cls,
|
||||
hid_t dxpl_id, void **req, ...);
|
||||
static void * H5VL__file_create(const H5VL_class_t *cls, const char *name,
|
||||
unsigned flags, hid_t fcpl_id, hid_t fapl_id, hid_t dxpl_id, void **req);
|
||||
static void * H5VL__file_open(const H5VL_class_t *cls, const char *name,
|
||||
@ -1360,7 +1358,7 @@ H5VL_attr_get(const H5VL_object_t *vol_obj, H5VL_attr_get_t get_type,
|
||||
vol_wrapper_set = TRUE;
|
||||
|
||||
/* Call the corresponding internal VOL routine */
|
||||
va_start(arguments, req);
|
||||
HDva_start(arguments, req);
|
||||
arg_started = TRUE;
|
||||
if(H5VL__attr_get(vol_obj->data, vol_obj->connector->cls, get_type, dxpl_id, req, arguments) < 0)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "attribute get failed")
|
||||
@ -1368,7 +1366,7 @@ H5VL_attr_get(const H5VL_object_t *vol_obj, H5VL_attr_get_t get_type,
|
||||
done:
|
||||
/* End access to the va_list, if we started it */
|
||||
if(arg_started)
|
||||
va_end(arguments);
|
||||
HDva_end(arguments);
|
||||
|
||||
/* Reset object wrapping info in API context */
|
||||
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
|
||||
@ -1473,7 +1471,7 @@ H5VL_attr_specific(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_pa
|
||||
vol_wrapper_set = TRUE;
|
||||
|
||||
/* Call the corresponding internal VOL routine */
|
||||
va_start(arguments, req);
|
||||
HDva_start(arguments, req);
|
||||
arg_started = TRUE;
|
||||
if((ret_value = H5VL__attr_specific(vol_obj->data, loc_params, vol_obj->connector->cls, specific_type, dxpl_id, req, arguments)) < 0)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute attribute specific callback")
|
||||
@ -1481,7 +1479,7 @@ H5VL_attr_specific(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_pa
|
||||
done:
|
||||
/* End access to the va_list, if we started it */
|
||||
if(arg_started)
|
||||
va_end(arguments);
|
||||
HDva_end(arguments);
|
||||
|
||||
/* Reset object wrapping info in API context */
|
||||
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
|
||||
@ -1584,7 +1582,7 @@ H5VL_attr_optional(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req, ...)
|
||||
vol_wrapper_set = TRUE;
|
||||
|
||||
/* Call the corresponding internal VOL routine */
|
||||
va_start(arguments, req);
|
||||
HDva_start(arguments, req);
|
||||
arg_started = TRUE;
|
||||
if((ret_value = H5VL__attr_optional(vol_obj->data, vol_obj->connector->cls, dxpl_id, req, arguments)) < 0)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute attribute optional callback")
|
||||
@ -1592,7 +1590,7 @@ H5VL_attr_optional(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req, ...)
|
||||
done:
|
||||
/* End access to the va_list, if we started it */
|
||||
if(arg_started)
|
||||
va_end(arguments);
|
||||
HDva_end(arguments);
|
||||
|
||||
/* Reset object wrapping info in API context */
|
||||
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
|
||||
@ -2207,7 +2205,7 @@ H5VL_dataset_get(const H5VL_object_t *vol_obj, H5VL_dataset_get_t get_type,
|
||||
vol_wrapper_set = TRUE;
|
||||
|
||||
/* Call the corresponding internal VOL routine */
|
||||
va_start(arguments, req);
|
||||
HDva_start(arguments, req);
|
||||
arg_started = TRUE;
|
||||
if(H5VL__dataset_get(vol_obj->data, vol_obj->connector->cls, get_type, dxpl_id, req, arguments) < 0)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "dataset get failed")
|
||||
@ -2215,7 +2213,7 @@ H5VL_dataset_get(const H5VL_object_t *vol_obj, H5VL_dataset_get_t get_type,
|
||||
done:
|
||||
/* End access to the va_list, if we started it */
|
||||
if(arg_started)
|
||||
va_end(arguments);
|
||||
HDva_end(arguments);
|
||||
|
||||
/* Reset object wrapping info in API context */
|
||||
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
|
||||
@ -2319,7 +2317,7 @@ H5VL_dataset_specific(const H5VL_object_t *vol_obj, H5VL_dataset_specific_t spec
|
||||
vol_wrapper_set = TRUE;
|
||||
|
||||
/* Call the corresponding internal VOL routine */
|
||||
va_start(arguments, req);
|
||||
HDva_start(arguments, req);
|
||||
arg_started = TRUE;
|
||||
if(H5VL__dataset_specific(vol_obj->data, vol_obj->connector->cls, specific_type, dxpl_id, req, arguments) < 0)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute dataset specific callback")
|
||||
@ -2327,7 +2325,7 @@ H5VL_dataset_specific(const H5VL_object_t *vol_obj, H5VL_dataset_specific_t spec
|
||||
done:
|
||||
/* End access to the va_list, if we started it */
|
||||
if(arg_started)
|
||||
va_end(arguments);
|
||||
HDva_end(arguments);
|
||||
|
||||
/* Reset object wrapping info in API context */
|
||||
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
|
||||
@ -2432,7 +2430,7 @@ H5VL_dataset_optional(const H5VL_object_t *vol_obj, hid_t dxpl_id,
|
||||
vol_wrapper_set = TRUE;
|
||||
|
||||
/* Call the corresponding internal VOL routine */
|
||||
va_start(arguments, req);
|
||||
HDva_start(arguments, req);
|
||||
arg_started = TRUE;
|
||||
if(H5VL__dataset_optional(vol_obj->data, vol_obj->connector->cls, dxpl_id, req, arguments) < 0)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute dataset optional callback")
|
||||
@ -2440,7 +2438,7 @@ H5VL_dataset_optional(const H5VL_object_t *vol_obj, hid_t dxpl_id,
|
||||
done:
|
||||
/* End access to the va_list, if we started it */
|
||||
if(arg_started)
|
||||
va_end(arguments);
|
||||
HDva_end(arguments);
|
||||
|
||||
/* Reset object wrapping info in API context */
|
||||
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
|
||||
@ -2594,42 +2592,6 @@ done:
|
||||
FUNC_LEAVE_API_NOINIT(ret_value)
|
||||
} /* end H5VLdataset_close() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5VL__file_cache_connector
|
||||
*
|
||||
* Purpose: Wrap varargs and reissue 'cache VOL connector' operation
|
||||
* to file specific call
|
||||
*
|
||||
* Return: Success: Non-negative
|
||||
* Failure: Negative
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5VL__file_cache_connector(void *obj, const H5VL_class_t *cls, hid_t dxpl_id,
|
||||
void **req, ...)
|
||||
{
|
||||
va_list arguments; /* Argument list passed from the API call */
|
||||
hbool_t arg_started = FALSE; /* Whether the va_list has been started */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Re-issue call to internal file specific callback routine */
|
||||
va_start(arguments, req);
|
||||
arg_started = TRUE;
|
||||
if(H5VL__file_specific(obj, cls, H5VL_FILE_CACHE_VOL_CONN, dxpl_id, req, arguments) < 0)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "file specific failed")
|
||||
|
||||
done:
|
||||
/* End access to the va_list, if we started it */
|
||||
if(arg_started)
|
||||
va_end(arguments);
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5VL__file_cache_connector() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5VL__file_create
|
||||
@ -2695,10 +2657,6 @@ H5VL_file_create(const H5VL_connector_prop_t *connector_prop, const char *name,
|
||||
if(NULL == (ret_value = H5VL__file_create(cls, name, flags, fcpl_id, fapl_id, dxpl_id, req)))
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "file create failed")
|
||||
|
||||
/* Cache the connector ID & info */
|
||||
if(H5VL__file_cache_connector(ret_value, cls, dxpl_id, req, connector_prop->connector_id, connector_prop->connector_info) < 0)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "caching VOL connector ID & info failed")
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5VL_file_create() */
|
||||
@ -2806,10 +2764,6 @@ H5VL_file_open(const H5VL_connector_prop_t *connector_prop, const char *name,
|
||||
if(NULL == (ret_value = H5VL__file_open(cls, name, flags, fapl_id, dxpl_id, req)))
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "open failed")
|
||||
|
||||
/* Cache the connector ID & info */
|
||||
if(H5VL__file_cache_connector(ret_value, cls, dxpl_id, req, connector_prop->connector_id, connector_prop->connector_info) < 0)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "caching VOL connector ID & info failed")
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5VL_file_open() */
|
||||
@ -2914,7 +2868,7 @@ H5VL_file_get(const H5VL_object_t *vol_obj, H5VL_file_get_t get_type,
|
||||
vol_wrapper_set = TRUE;
|
||||
|
||||
/* Call the corresponding internal VOL routine */
|
||||
va_start(arguments, req);
|
||||
HDva_start(arguments, req);
|
||||
arg_started = TRUE;
|
||||
if(H5VL__file_get(vol_obj->data, vol_obj->connector->cls, get_type, dxpl_id, req, arguments) < 0)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "file get failed")
|
||||
@ -2922,7 +2876,7 @@ H5VL_file_get(const H5VL_object_t *vol_obj, H5VL_file_get_t get_type,
|
||||
done:
|
||||
/* End access to the va_list, if we started it */
|
||||
if(arg_started)
|
||||
va_end(arguments);
|
||||
HDva_end(arguments);
|
||||
|
||||
/* Reset object wrapping info in API context */
|
||||
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
|
||||
@ -3022,7 +2976,7 @@ H5VL_file_specific(const H5VL_object_t *vol_obj, H5VL_file_specific_t specific_t
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
|
||||
/* Start access to the varargs, so they are available in all situations below */
|
||||
va_start(arguments, req);
|
||||
HDva_start(arguments, req);
|
||||
arg_started = TRUE;
|
||||
|
||||
/* Special treatment of file access check */
|
||||
@ -3033,9 +2987,9 @@ H5VL_file_specific(const H5VL_object_t *vol_obj, H5VL_file_specific_t specific_t
|
||||
hid_t fapl_id; /* File access property list for accessing the file */
|
||||
|
||||
/* Get the file access property list to access the file */
|
||||
va_copy(tmp_args, arguments);
|
||||
HDva_copy(tmp_args, arguments);
|
||||
fapl_id = va_arg(tmp_args, hid_t);
|
||||
va_end(tmp_args);
|
||||
HDva_end(tmp_args);
|
||||
|
||||
/* Get the VOL info from the FAPL */
|
||||
if(NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id)))
|
||||
@ -3067,7 +3021,7 @@ H5VL_file_specific(const H5VL_object_t *vol_obj, H5VL_file_specific_t specific_t
|
||||
done:
|
||||
/* End access to the va_list, if we started it */
|
||||
if(arg_started)
|
||||
va_end(arguments);
|
||||
HDva_end(arguments);
|
||||
|
||||
/* Reset object wrapping info in API context */
|
||||
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
|
||||
@ -3170,7 +3124,7 @@ H5VL_file_optional(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req, ...)
|
||||
vol_wrapper_set = TRUE;
|
||||
|
||||
/* Call the corresponding internal VOL routine */
|
||||
va_start(arguments, req);
|
||||
HDva_start(arguments, req);
|
||||
arg_started = TRUE;
|
||||
if(H5VL__file_optional(vol_obj->data, vol_obj->connector->cls, dxpl_id, req, arguments) < 0)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "file optional failed")
|
||||
@ -3178,7 +3132,7 @@ H5VL_file_optional(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req, ...)
|
||||
done:
|
||||
/* End access to the va_list, if we started it */
|
||||
if(arg_started)
|
||||
va_end(arguments);
|
||||
HDva_end(arguments);
|
||||
|
||||
/* Reset object wrapping info in API context */
|
||||
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
|
||||
@ -3593,7 +3547,7 @@ H5VL_group_get(const H5VL_object_t *vol_obj, H5VL_group_get_t get_type,
|
||||
vol_wrapper_set = TRUE;
|
||||
|
||||
/* Call the corresponding internal VOL routine */
|
||||
va_start(arguments, req);
|
||||
HDva_start(arguments, req);
|
||||
arg_started = TRUE;
|
||||
if(H5VL__group_get(vol_obj->data, vol_obj->connector->cls, get_type, dxpl_id, req, arguments) < 0)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "group get failed")
|
||||
@ -3601,7 +3555,7 @@ H5VL_group_get(const H5VL_object_t *vol_obj, H5VL_group_get_t get_type,
|
||||
done:
|
||||
/* End access to the va_list, if we started it */
|
||||
if(arg_started)
|
||||
va_end(arguments);
|
||||
HDva_end(arguments);
|
||||
|
||||
/* Reset object wrapping info in API context */
|
||||
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
|
||||
@ -3705,7 +3659,7 @@ H5VL_group_specific(const H5VL_object_t *vol_obj, H5VL_group_specific_t specific
|
||||
vol_wrapper_set = TRUE;
|
||||
|
||||
/* Call the corresponding internal VOL routine */
|
||||
va_start(arguments, req);
|
||||
HDva_start(arguments, req);
|
||||
arg_started = TRUE;
|
||||
if(H5VL__group_specific(vol_obj->data, vol_obj->connector->cls, specific_type, dxpl_id, req, arguments) < 0)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute group specific callback")
|
||||
@ -3713,7 +3667,7 @@ H5VL_group_specific(const H5VL_object_t *vol_obj, H5VL_group_specific_t specific
|
||||
done:
|
||||
/* End access to the va_list, if we started it */
|
||||
if(arg_started)
|
||||
va_end(arguments);
|
||||
HDva_end(arguments);
|
||||
|
||||
/* Reset object wrapping info in API context */
|
||||
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
|
||||
@ -3816,7 +3770,7 @@ H5VL_group_optional(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req, ...
|
||||
vol_wrapper_set = TRUE;
|
||||
|
||||
/* Call the corresponding internal VOL routine */
|
||||
va_start(arguments, req);
|
||||
HDva_start(arguments, req);
|
||||
arg_started = TRUE;
|
||||
if((ret_value = H5VL__group_optional(vol_obj->data, vol_obj->connector->cls, dxpl_id, req, arguments)) < 0)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute group optional callback")
|
||||
@ -3824,7 +3778,7 @@ H5VL_group_optional(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req, ...
|
||||
done:
|
||||
/* End access to the va_list, if we started it */
|
||||
if(arg_started)
|
||||
va_end(arguments);
|
||||
HDva_end(arguments);
|
||||
|
||||
/* Reset object wrapping info in API context */
|
||||
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
|
||||
@ -4372,7 +4326,7 @@ H5VL_link_get(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_params,
|
||||
vol_wrapper_set = TRUE;
|
||||
|
||||
/* Call the corresponding internal VOL routine */
|
||||
va_start(arguments, req);
|
||||
HDva_start(arguments, req);
|
||||
arg_started = TRUE;
|
||||
if(H5VL__link_get(vol_obj->data, loc_params, vol_obj->connector->cls, get_type, dxpl_id, req, arguments) < 0)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "link get failed")
|
||||
@ -4380,7 +4334,7 @@ H5VL_link_get(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_params,
|
||||
done:
|
||||
/* End access to the va_list, if we started it */
|
||||
if(arg_started)
|
||||
va_end(arguments);
|
||||
HDva_end(arguments);
|
||||
|
||||
/* Reset object wrapping info in API context */
|
||||
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
|
||||
@ -4484,7 +4438,7 @@ H5VL_link_specific(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_pa
|
||||
vol_wrapper_set = TRUE;
|
||||
|
||||
/* Call the corresponding internal VOL routine */
|
||||
va_start(arguments, req);
|
||||
HDva_start(arguments, req);
|
||||
arg_started = TRUE;
|
||||
if((ret_value = H5VL__link_specific(vol_obj->data, loc_params, vol_obj->connector->cls, specific_type, dxpl_id, req, arguments)) < 0)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute link specific callback")
|
||||
@ -4492,7 +4446,7 @@ H5VL_link_specific(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_pa
|
||||
done:
|
||||
/* End access to the va_list, if we started it */
|
||||
if(arg_started)
|
||||
va_end(arguments);
|
||||
HDva_end(arguments);
|
||||
|
||||
/* Reset object wrapping info in API context */
|
||||
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
|
||||
@ -4595,7 +4549,7 @@ H5VL_link_optional(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req, ...)
|
||||
vol_wrapper_set = TRUE;
|
||||
|
||||
/* Call the corresponding internal VOL routine */
|
||||
va_start(arguments, req);
|
||||
HDva_start(arguments, req);
|
||||
arg_started = TRUE;
|
||||
if(H5VL__link_optional(vol_obj->data, vol_obj->connector->cls, dxpl_id, req, arguments) < 0)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute link optional callback")
|
||||
@ -4603,7 +4557,7 @@ H5VL_link_optional(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req, ...)
|
||||
done:
|
||||
/* End access to the va_list, if we started it */
|
||||
if(arg_started)
|
||||
va_end(arguments);
|
||||
HDva_end(arguments);
|
||||
|
||||
/* Reset object wrapping info in API context */
|
||||
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
|
||||
@ -4924,7 +4878,7 @@ H5VL_object_get(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_param
|
||||
vol_wrapper_set = TRUE;
|
||||
|
||||
/* Call the corresponding internal VOL routine */
|
||||
va_start(arguments, req);
|
||||
HDva_start(arguments, req);
|
||||
arg_started = TRUE;
|
||||
if(H5VL__object_get(vol_obj->data, loc_params, vol_obj->connector->cls, get_type, dxpl_id, req, arguments) < 0)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "get failed")
|
||||
@ -4932,7 +4886,7 @@ H5VL_object_get(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_param
|
||||
done:
|
||||
/* End access to the va_list, if we started it */
|
||||
if(arg_started)
|
||||
va_end(arguments);
|
||||
HDva_end(arguments);
|
||||
|
||||
/* Reset object wrapping info in API context */
|
||||
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
|
||||
@ -5037,7 +4991,7 @@ H5VL_object_specific(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_
|
||||
vol_wrapper_set = TRUE;
|
||||
|
||||
/* Call the corresponding internal VOL routine */
|
||||
va_start(arguments, req);
|
||||
HDva_start(arguments, req);
|
||||
arg_started = TRUE;
|
||||
if((ret_value = H5VL__object_specific(vol_obj->data, loc_params, vol_obj->connector->cls, specific_type, dxpl_id, req, arguments)) < 0)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "object specific failed")
|
||||
@ -5045,7 +4999,7 @@ H5VL_object_specific(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_
|
||||
done:
|
||||
/* End access to the va_list, if we started it */
|
||||
if(arg_started)
|
||||
va_end(arguments);
|
||||
HDva_end(arguments);
|
||||
|
||||
/* Reset object wrapping info in API context */
|
||||
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
|
||||
@ -5152,7 +5106,7 @@ H5VL_object_optional(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req, ..
|
||||
vol_wrapper_set = TRUE;
|
||||
|
||||
/* Call the corresponding internal VOL routine */
|
||||
va_start(arguments, req);
|
||||
HDva_start(arguments, req);
|
||||
arg_started = TRUE;
|
||||
if(H5VL__object_optional(vol_obj->data, vol_obj->connector->cls, dxpl_id, req, arguments) < 0)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute object optional callback")
|
||||
@ -5160,7 +5114,7 @@ H5VL_object_optional(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req, ..
|
||||
done:
|
||||
/* End access to the va_list, if we started it */
|
||||
if(arg_started)
|
||||
va_end(arguments);
|
||||
HDva_end(arguments);
|
||||
|
||||
/* Reset object wrapping info in API context */
|
||||
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
|
||||
@ -5473,7 +5427,7 @@ H5VL_datatype_get(const H5VL_object_t *vol_obj, H5VL_datatype_get_t get_type,
|
||||
vol_wrapper_set = TRUE;
|
||||
|
||||
/* Call the corresponding internal VOL routine */
|
||||
va_start(arguments, req);
|
||||
HDva_start(arguments, req);
|
||||
arg_started = TRUE;
|
||||
if(H5VL__datatype_get(vol_obj->data, vol_obj->connector->cls, get_type, dxpl_id, req, arguments) < 0)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "datatype get failed")
|
||||
@ -5481,7 +5435,7 @@ H5VL_datatype_get(const H5VL_object_t *vol_obj, H5VL_datatype_get_t get_type,
|
||||
done:
|
||||
/* End access to the va_list, if we started it */
|
||||
if(arg_started)
|
||||
va_end(arguments);
|
||||
HDva_end(arguments);
|
||||
|
||||
/* Reset object wrapping info in API context */
|
||||
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
|
||||
@ -5589,7 +5543,7 @@ H5VL_datatype_specific(const H5VL_object_t *vol_obj, H5VL_datatype_specific_t sp
|
||||
vol_wrapper_set = TRUE;
|
||||
|
||||
/* Call the corresponding internal VOL routine */
|
||||
va_start(arguments, req);
|
||||
HDva_start(arguments, req);
|
||||
arg_started = TRUE;
|
||||
if(H5VL__datatype_specific(vol_obj->data, vol_obj->connector->cls, specific_type, dxpl_id, req, arguments) < 0)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute datatype specific callback")
|
||||
@ -5597,7 +5551,7 @@ H5VL_datatype_specific(const H5VL_object_t *vol_obj, H5VL_datatype_specific_t sp
|
||||
done:
|
||||
/* End access to the va_list, if we started it */
|
||||
if(arg_started)
|
||||
va_end(arguments);
|
||||
HDva_end(arguments);
|
||||
|
||||
/* Reset object wrapping info in API context */
|
||||
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
|
||||
@ -5701,7 +5655,7 @@ H5VL_datatype_optional(const H5VL_object_t *vol_obj, hid_t dxpl_id,
|
||||
vol_wrapper_set = TRUE;
|
||||
|
||||
/* Call the corresponding internal VOL routine */
|
||||
va_start(arguments, req);
|
||||
HDva_start(arguments, req);
|
||||
arg_started = TRUE;
|
||||
if(H5VL__datatype_optional(vol_obj->data, vol_obj->connector->cls, dxpl_id, req, arguments) < 0)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute datatype optional callback")
|
||||
@ -5709,7 +5663,7 @@ H5VL_datatype_optional(const H5VL_object_t *vol_obj, hid_t dxpl_id,
|
||||
done:
|
||||
/* End access to the va_list, if we started it */
|
||||
if(arg_started)
|
||||
va_end(arguments);
|
||||
HDva_end(arguments);
|
||||
|
||||
/* Reset object wrapping info in API context */
|
||||
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
|
||||
@ -6265,7 +6219,7 @@ H5VL_request_specific(const H5VL_object_t *vol_obj,
|
||||
vol_wrapper_set = TRUE;
|
||||
|
||||
/* Call the corresponding internal VOL routine */
|
||||
va_start(arguments, specific_type);
|
||||
HDva_start(arguments, specific_type);
|
||||
arg_started = TRUE;
|
||||
if((ret_value = H5VL__request_specific(vol_obj->data, vol_obj->connector->cls, specific_type, arguments)) < 0)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute asynchronous request specific callback")
|
||||
@ -6273,7 +6227,7 @@ H5VL_request_specific(const H5VL_object_t *vol_obj,
|
||||
done:
|
||||
/* End access to the va_list, if we started it */
|
||||
if(arg_started)
|
||||
va_end(arguments);
|
||||
HDva_end(arguments);
|
||||
|
||||
/* Reset object wrapping info in API context */
|
||||
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
|
||||
@ -6379,7 +6333,7 @@ H5VL_request_optional(const H5VL_object_t *vol_obj, ...)
|
||||
vol_wrapper_set = TRUE;
|
||||
|
||||
/* Call the corresponding internal VOL routine */
|
||||
va_start(arguments, vol_obj);
|
||||
HDva_start(arguments, vol_obj);
|
||||
arg_started = TRUE;
|
||||
if((ret_value = H5VL__request_optional(vol_obj->data, vol_obj->connector->cls, arguments)) < 0)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute asynchronous request optional callback")
|
||||
@ -6387,7 +6341,7 @@ H5VL_request_optional(const H5VL_object_t *vol_obj, ...)
|
||||
done:
|
||||
/* End access to the va_list, if we started it */
|
||||
if(arg_started)
|
||||
va_end(arguments);
|
||||
HDva_end(arguments);
|
||||
|
||||
/* Reset object wrapping info in API context */
|
||||
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
|
||||
|
@ -625,9 +625,12 @@ H5VL_register_connector(const void *_cls, hbool_t app_ref, hid_t vipl_id)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register VOL connector ID")
|
||||
|
||||
done:
|
||||
if (ret_value < 0)
|
||||
if (saved)
|
||||
H5FL_FREE(H5VL_class_t, saved);
|
||||
if (ret_value < 0 && saved) {
|
||||
if (saved->name)
|
||||
H5MM_xfree(saved->name);
|
||||
|
||||
H5FL_FREE(H5VL_class_t, saved);
|
||||
}
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5VL_register_connector() */
|
||||
@ -793,7 +796,6 @@ H5VL__object(hid_t id, H5I_type_t obj_type)
|
||||
case H5I_UNINIT:
|
||||
case H5I_BADID:
|
||||
case H5I_DATASPACE:
|
||||
case H5I_REFERENCE:
|
||||
case H5I_VFL:
|
||||
case H5I_VOL:
|
||||
case H5I_GENPROP_CLS:
|
||||
|
490
src/H5VLnative.c
490
src/H5VLnative.c
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -125,8 +125,7 @@ typedef enum H5VL_file_specific_t {
|
||||
H5VL_FILE_REOPEN, /* Reopen the file */
|
||||
H5VL_FILE_MOUNT, /* Mount a file */
|
||||
H5VL_FILE_UNMOUNT, /* Unmount a file */
|
||||
H5VL_FILE_IS_ACCESSIBLE, /* Check if a file is accessible */
|
||||
H5VL_FILE_CACHE_VOL_CONN /* Cache VOL connector ID & info */
|
||||
H5VL_FILE_IS_ACCESSIBLE /* Check if a file is accessible */
|
||||
} H5VL_file_specific_t;
|
||||
|
||||
/* types for group GET callback */
|
||||
|
@ -1393,6 +1393,9 @@ typedef off_t h5_stat_size_t;
|
||||
#ifndef HDstrtok
|
||||
#define HDstrtok(X,Y) strtok(X,Y)
|
||||
#endif /* HDstrtok */
|
||||
#ifndef HDstrtok_r
|
||||
#define HDstrtok_r(X,Y,Z) strtok_r(X,Y,Z)
|
||||
#endif /* HDstrtok */
|
||||
#ifndef HDstrtol
|
||||
#define HDstrtol(S,R,N) strtol(S,R,N)
|
||||
#endif /* HDstrtol */
|
||||
@ -1495,6 +1498,9 @@ typedef off_t h5_stat_size_t;
|
||||
#ifndef HDva_arg
|
||||
#define HDva_arg(A,T) va_arg(A,T)
|
||||
#endif /* HDva_arg */
|
||||
#ifndef HDva_copy
|
||||
#define HDva_copy(D,S) va_copy(D,S)
|
||||
#endif /* HDva_copy */
|
||||
#ifndef HDva_end
|
||||
#define HDva_end(A) va_end(A)
|
||||
#endif /* HDva_end */
|
||||
|
@ -121,7 +121,7 @@ HDfprintf(FILE *stream, const char *fmt, ...)
|
||||
HDassert(stream);
|
||||
HDassert(fmt);
|
||||
|
||||
va_start (ap, fmt);
|
||||
HDva_start (ap, fmt);
|
||||
while (*fmt) {
|
||||
fwidth = prec = 0;
|
||||
zerofill = 0;
|
||||
@ -170,7 +170,7 @@ HDfprintf(FILE *stream, const char *fmt, ...)
|
||||
s = rest;
|
||||
} /* end if */
|
||||
else if ('*'==*s) {
|
||||
fwidth = va_arg(ap, int);
|
||||
fwidth = HDva_arg(ap, int);
|
||||
if(fwidth < 0) {
|
||||
leftjust = 1;
|
||||
fwidth = -fwidth;
|
||||
@ -185,7 +185,7 @@ HDfprintf(FILE *stream, const char *fmt, ...)
|
||||
prec = (int)HDstrtol(s, &rest, 10);
|
||||
s = rest;
|
||||
} else if('*'==*s) {
|
||||
prec = va_arg(ap, int);
|
||||
prec = HDva_arg(ap, int);
|
||||
s++;
|
||||
}
|
||||
if(prec < 1)
|
||||
@ -272,16 +272,16 @@ HDfprintf(FILE *stream, const char *fmt, ...)
|
||||
case 'd':
|
||||
case 'i':
|
||||
if(!HDstrcmp(modifier, "h")) {
|
||||
short x = (short)va_arg(ap, int);
|
||||
short x = (short)HDva_arg(ap, int);
|
||||
n = fprintf(stream, format_templ, x);
|
||||
} else if(!*modifier) {
|
||||
int x = va_arg(ap, int);
|
||||
int x = HDva_arg(ap, int);
|
||||
n = fprintf(stream, format_templ, x);
|
||||
} else if(!HDstrcmp(modifier, "l")) {
|
||||
long x = va_arg(ap, long);
|
||||
long x = HDva_arg(ap, long);
|
||||
n = fprintf(stream, format_templ, x);
|
||||
} else {
|
||||
int64_t x = va_arg(ap, int64_t);
|
||||
int64_t x = HDva_arg(ap, int64_t);
|
||||
n = fprintf(stream, format_templ, x);
|
||||
}
|
||||
break;
|
||||
@ -291,16 +291,16 @@ HDfprintf(FILE *stream, const char *fmt, ...)
|
||||
case 'x':
|
||||
case 'X':
|
||||
if(!HDstrcmp(modifier, "h")) {
|
||||
unsigned short x = (unsigned short)va_arg(ap, unsigned int);
|
||||
unsigned short x = (unsigned short)HDva_arg(ap, unsigned int);
|
||||
n = fprintf(stream, format_templ, x);
|
||||
} else if(!*modifier) {
|
||||
unsigned int x = va_arg(ap, unsigned int);
|
||||
unsigned int x = HDva_arg(ap, unsigned int);
|
||||
n = fprintf(stream, format_templ, x);
|
||||
} else if(!HDstrcmp(modifier, "l")) {
|
||||
unsigned long x = va_arg(ap, unsigned long);
|
||||
unsigned long x = HDva_arg(ap, unsigned long);
|
||||
n = fprintf(stream, format_templ, x);
|
||||
} else {
|
||||
uint64_t x = va_arg(ap, uint64_t);
|
||||
uint64_t x = HDva_arg(ap, uint64_t);
|
||||
n = fprintf(stream, format_templ, x);
|
||||
}
|
||||
break;
|
||||
@ -311,10 +311,10 @@ HDfprintf(FILE *stream, const char *fmt, ...)
|
||||
case 'g':
|
||||
case 'G':
|
||||
if(!HDstrcmp(modifier, "h")) {
|
||||
float x = (float)va_arg(ap, double);
|
||||
float x = (float)HDva_arg(ap, double);
|
||||
n = fprintf(stream, format_templ, (double)x);
|
||||
} else if(!*modifier || !HDstrcmp(modifier, "l")) {
|
||||
double x = va_arg(ap, double);
|
||||
double x = HDva_arg(ap, double);
|
||||
n = fprintf(stream, format_templ, x);
|
||||
} else {
|
||||
/*
|
||||
@ -322,10 +322,10 @@ HDfprintf(FILE *stream, const char *fmt, ...)
|
||||
* `double' are the same thing.
|
||||
*/
|
||||
#if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE
|
||||
long double x = va_arg(ap, long double);
|
||||
long double x = HDva_arg(ap, long double);
|
||||
n = fprintf(stream, format_templ, x);
|
||||
#else
|
||||
double x = va_arg(ap, double);
|
||||
double x = HDva_arg(ap, double);
|
||||
n = fprintf(stream, format_templ, x);
|
||||
#endif
|
||||
}
|
||||
@ -333,7 +333,7 @@ HDfprintf(FILE *stream, const char *fmt, ...)
|
||||
|
||||
case 'a':
|
||||
{
|
||||
haddr_t x = va_arg(ap, haddr_t);
|
||||
haddr_t x = HDva_arg(ap, haddr_t);
|
||||
|
||||
if(H5F_addr_defined(x)) {
|
||||
len = 0;
|
||||
@ -379,7 +379,7 @@ HDfprintf(FILE *stream, const char *fmt, ...)
|
||||
|
||||
case 'c':
|
||||
{
|
||||
char x = (char)va_arg(ap, int);
|
||||
char x = (char)HDva_arg(ap, int);
|
||||
n = fprintf(stream, format_templ, x);
|
||||
}
|
||||
break;
|
||||
@ -387,7 +387,7 @@ HDfprintf(FILE *stream, const char *fmt, ...)
|
||||
case 's':
|
||||
case 'p':
|
||||
{
|
||||
char *x = va_arg(ap, char*);
|
||||
char *x = HDva_arg(ap, char*);
|
||||
n = fprintf(stream, format_templ, x);
|
||||
}
|
||||
break;
|
||||
@ -399,7 +399,7 @@ HDfprintf(FILE *stream, const char *fmt, ...)
|
||||
|
||||
case 't':
|
||||
{
|
||||
htri_t tri_var = va_arg(ap, htri_t);
|
||||
htri_t tri_var = HDva_arg(ap, htri_t);
|
||||
|
||||
if(tri_var > 0)
|
||||
fprintf(stream, "TRUE");
|
||||
@ -423,7 +423,7 @@ HDfprintf(FILE *stream, const char *fmt, ...)
|
||||
nout++;
|
||||
}
|
||||
}
|
||||
va_end(ap);
|
||||
HDva_end(ap);
|
||||
return nout;
|
||||
} /* end HDfprintf() */
|
||||
|
||||
@ -492,7 +492,8 @@ HDstrtoll(const char *s, const char **rest, int base)
|
||||
/* Optional minus or plus sign */
|
||||
if ('+'==*s) {
|
||||
s++;
|
||||
} else if ('-'==*s) {
|
||||
}
|
||||
else if ('-'==*s) {
|
||||
sign = -1;
|
||||
s++;
|
||||
}
|
||||
@ -501,10 +502,12 @@ HDstrtoll(const char *s, const char **rest, int base)
|
||||
if (0==base && '0'==*s && ('x'==s[1] || 'X'==s[1])) {
|
||||
base = 16;
|
||||
s += 2;
|
||||
} else if (0==base && '0'==*s) {
|
||||
}
|
||||
else if (0==base && '0'==*s) {
|
||||
base = 8;
|
||||
s++;
|
||||
} else if (0==base) {
|
||||
}
|
||||
else if (0==base) {
|
||||
base = 10;
|
||||
}
|
||||
|
||||
@ -525,7 +528,8 @@ HDstrtoll(const char *s, const char **rest, int base)
|
||||
|
||||
if (acc*base+digit < acc) {
|
||||
overflow = TRUE;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
acc = acc*base + digit;
|
||||
}
|
||||
}
|
||||
@ -536,7 +540,8 @@ HDstrtoll(const char *s, const char **rest, int base)
|
||||
if (overflow) {
|
||||
if (sign>0) {
|
||||
acc = ((uint64_t)1<<(8*sizeof(int64_t)-1))-1;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
acc = (int64_t)((uint64_t)1<<(8*sizeof(int64_t)-1));
|
||||
}
|
||||
errno = ERANGE;
|
||||
@ -843,9 +848,9 @@ int c99_snprintf(char* str, size_t size, const char* format, ...)
|
||||
int count;
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, format);
|
||||
HDva_start(ap, format);
|
||||
count = c99_vsnprintf(str, size, format, ap);
|
||||
va_end(ap);
|
||||
HDva_end(ap);
|
||||
|
||||
return count;
|
||||
}
|
||||
|
191
src/H5trace.c
191
src/H5trace.c
@ -135,7 +135,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
|
||||
if(!out)
|
||||
return 0.0F; /*tracing is off*/
|
||||
va_start(ap, type);
|
||||
HDva_start(ap, type);
|
||||
|
||||
if(H5_debug_g.ttop) {
|
||||
if(returning) {
|
||||
@ -227,7 +227,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
* name is the null pointer then don't print the argument or the
|
||||
* following `='. This is used for return values.
|
||||
*/
|
||||
argname = va_arg(ap, char *);
|
||||
argname = HDva_arg(ap, char *);
|
||||
if(argname) {
|
||||
unsigned n = (unsigned)MAX (0, (int)HDstrlen(argname) - 3);
|
||||
|
||||
@ -243,7 +243,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
|
||||
/* The value */
|
||||
if(ptr)
|
||||
vp = va_arg(ap, void *);
|
||||
vp = HDva_arg(ap, void *);
|
||||
switch(type[0]) {
|
||||
case 'a':
|
||||
if(ptr) {
|
||||
@ -253,7 +253,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
haddr_t addr = va_arg(ap, haddr_t);
|
||||
haddr_t addr = HDva_arg(ap, haddr_t);
|
||||
|
||||
HDfprintf(out, "%a", addr);
|
||||
} /* end else */
|
||||
@ -267,8 +267,8 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
/* Can't pass hbool_t to va_arg() */
|
||||
hbool_t bool_var = (hbool_t)va_arg(ap, int);
|
||||
/* Can't pass hbool_t to HDva_arg() */
|
||||
hbool_t bool_var = (hbool_t)HDva_arg(ap, int);
|
||||
if(TRUE == bool_var)
|
||||
HDfprintf(out, "TRUE");
|
||||
else if(!bool_var)
|
||||
@ -286,7 +286,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
double dbl = va_arg(ap, double);
|
||||
double dbl = HDva_arg(ap, double);
|
||||
|
||||
HDfprintf(out, "%g", dbl);
|
||||
} /* end else */
|
||||
@ -302,7 +302,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5D_alloc_time_t alloc_time = (H5D_alloc_time_t)va_arg(ap, int);
|
||||
H5D_alloc_time_t alloc_time = (H5D_alloc_time_t)HDva_arg(ap, int);
|
||||
|
||||
switch(alloc_time) {
|
||||
case H5D_ALLOC_TIME_ERROR:
|
||||
@ -340,7 +340,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5FD_mpio_collective_opt_t opt = (H5FD_mpio_collective_opt_t)va_arg(ap, int);
|
||||
H5FD_mpio_collective_opt_t opt = (H5FD_mpio_collective_opt_t)HDva_arg(ap, int);
|
||||
|
||||
switch(opt) {
|
||||
case H5FD_MPIO_COLLECTIVE_IO:
|
||||
@ -366,7 +366,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5D_fill_time_t fill_time = (H5D_fill_time_t)va_arg(ap, int);
|
||||
H5D_fill_time_t fill_time = (H5D_fill_time_t)HDva_arg(ap, int);
|
||||
|
||||
switch(fill_time) {
|
||||
case H5D_FILL_TIME_ERROR:
|
||||
@ -400,7 +400,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5D_fill_value_t fill_value = (H5D_fill_value_t)va_arg(ap, int);
|
||||
H5D_fill_value_t fill_value = (H5D_fill_value_t)HDva_arg(ap, int);
|
||||
|
||||
switch(fill_value) {
|
||||
case H5D_FILL_VALUE_ERROR:
|
||||
@ -434,7 +434,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5FD_mpio_chunk_opt_t opt = (H5FD_mpio_chunk_opt_t)va_arg(ap, int);
|
||||
H5FD_mpio_chunk_opt_t opt = (H5FD_mpio_chunk_opt_t)HDva_arg(ap, int);
|
||||
|
||||
switch(opt) {
|
||||
case H5FD_MPIO_CHUNK_DEFAULT:
|
||||
@ -464,7 +464,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5D_mpio_actual_io_mode_t actual_io_mode = (H5D_mpio_actual_io_mode_t)va_arg(ap, int);
|
||||
H5D_mpio_actual_io_mode_t actual_io_mode = (H5D_mpio_actual_io_mode_t)HDva_arg(ap, int);
|
||||
|
||||
switch(actual_io_mode) {
|
||||
case H5D_MPIO_NO_COLLECTIVE:
|
||||
@ -502,7 +502,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5D_chunk_index_t idx = (H5D_chunk_index_t)va_arg(ap, int);
|
||||
H5D_chunk_index_t idx = (H5D_chunk_index_t)HDva_arg(ap, int);
|
||||
|
||||
switch(idx) {
|
||||
case H5D_CHUNK_IDX_BTREE:
|
||||
@ -548,7 +548,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5D_layout_t layout = (H5D_layout_t)va_arg(ap, int);
|
||||
H5D_layout_t layout = (H5D_layout_t)HDva_arg(ap, int);
|
||||
|
||||
switch(layout) {
|
||||
case H5D_LAYOUT_ERROR:
|
||||
@ -590,7 +590,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5D_mpio_no_collective_cause_t nocol_cause_mode = (H5D_mpio_no_collective_cause_t)va_arg(ap, int);
|
||||
H5D_mpio_no_collective_cause_t nocol_cause_mode = (H5D_mpio_no_collective_cause_t)HDva_arg(ap, int);
|
||||
hbool_t flag_already_displayed = FALSE;
|
||||
|
||||
/* Check for all bit-flags which might be set */
|
||||
@ -637,7 +637,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5D_mpio_actual_chunk_opt_mode_t chunk_opt_mode = (H5D_mpio_actual_chunk_opt_mode_t)va_arg(ap, int);
|
||||
H5D_mpio_actual_chunk_opt_mode_t chunk_opt_mode = (H5D_mpio_actual_chunk_opt_mode_t)HDva_arg(ap, int);
|
||||
|
||||
switch(chunk_opt_mode) {
|
||||
case H5D_MPIO_NO_CHUNK_OPTIMIZATION:
|
||||
@ -667,7 +667,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5D_space_status_t space_status = (H5D_space_status_t)va_arg(ap, int);
|
||||
H5D_space_status_t space_status = (H5D_space_status_t)HDva_arg(ap, int);
|
||||
|
||||
switch(space_status) {
|
||||
case H5D_SPACE_STATUS_NOT_ALLOCATED:
|
||||
@ -701,7 +701,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5FD_mpio_xfer_t transfer = (H5FD_mpio_xfer_t)va_arg(ap, int);
|
||||
H5FD_mpio_xfer_t transfer = (H5FD_mpio_xfer_t)HDva_arg(ap, int);
|
||||
|
||||
switch(transfer) {
|
||||
case H5FD_MPIO_INDEPENDENT:
|
||||
@ -727,7 +727,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5D_vds_view_t view = (H5D_vds_view_t)va_arg(ap, int);
|
||||
H5D_vds_view_t view = (H5D_vds_view_t)HDva_arg(ap, int);
|
||||
|
||||
switch(view) {
|
||||
case H5D_VDS_ERROR:
|
||||
@ -763,7 +763,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
herr_t status = va_arg(ap, herr_t);
|
||||
herr_t status = HDva_arg(ap, herr_t);
|
||||
|
||||
if(status >= 0)
|
||||
HDfprintf(out, "SUCCEED");
|
||||
@ -782,7 +782,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5E_direction_t direction = (H5E_direction_t)va_arg(ap, int);
|
||||
H5E_direction_t direction = (H5E_direction_t)HDva_arg(ap, int);
|
||||
|
||||
switch(direction) {
|
||||
case H5E_WALK_UPWARD:
|
||||
@ -808,7 +808,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5E_error2_t *error = va_arg(ap, H5E_error2_t *);
|
||||
H5E_error2_t *error = HDva_arg(ap, H5E_error2_t *);
|
||||
|
||||
HDfprintf(out, "0x%lx", (unsigned long)error);
|
||||
} /* end else */
|
||||
@ -822,7 +822,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5ES_status_t status = (H5ES_status_t)va_arg(ap, int);
|
||||
H5ES_status_t status = (H5ES_status_t)HDva_arg(ap, int);
|
||||
|
||||
switch(status) {
|
||||
case H5ES_STATUS_IN_PROGRESS:
|
||||
@ -853,7 +853,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5E_type_t etype = (H5E_type_t)va_arg(ap, int);
|
||||
H5E_type_t etype = (H5E_type_t)HDva_arg(ap, int);
|
||||
|
||||
switch(etype) {
|
||||
case H5E_MAJOR:
|
||||
@ -887,7 +887,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5F_close_degree_t degree = (H5F_close_degree_t)va_arg(ap, int);
|
||||
H5F_close_degree_t degree = (H5F_close_degree_t)HDva_arg(ap, int);
|
||||
|
||||
switch(degree) {
|
||||
case H5F_CLOSE_DEFAULT:
|
||||
@ -921,7 +921,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5F_fspace_strategy_t fs_strategy = (H5F_fspace_strategy_t)va_arg(ap, int);
|
||||
H5F_fspace_strategy_t fs_strategy = (H5F_fspace_strategy_t)HDva_arg(ap, int);
|
||||
|
||||
switch(fs_strategy) {
|
||||
case H5F_FSPACE_STRATEGY_FSM_AGGR:
|
||||
@ -956,7 +956,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5F_mem_t mem_type = (H5F_mem_t)va_arg(ap, int);
|
||||
H5F_mem_t mem_type = (H5F_mem_t)HDva_arg(ap, int);
|
||||
|
||||
switch(mem_type) {
|
||||
case H5FD_MEM_NOLIST:
|
||||
@ -1007,7 +1007,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5F_scope_t scope = (H5F_scope_t)va_arg(ap, int);
|
||||
H5F_scope_t scope = (H5F_scope_t)HDva_arg(ap, int);
|
||||
|
||||
switch(scope) {
|
||||
case H5F_SCOPE_LOCAL:
|
||||
@ -1042,7 +1042,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5F_libver_t libver_vers = (H5F_libver_t)va_arg(ap, int);
|
||||
H5F_libver_t libver_vers = (H5F_libver_t)HDva_arg(ap, int);
|
||||
|
||||
switch(libver_vers) {
|
||||
case H5F_LIBVER_EARLIEST:
|
||||
@ -1084,7 +1084,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5G_obj_t obj_type = (H5G_obj_t)va_arg(ap, int);
|
||||
H5G_obj_t obj_type = (H5G_obj_t)HDva_arg(ap, int);
|
||||
|
||||
switch(obj_type) {
|
||||
case H5G_UNKNOWN:
|
||||
@ -1132,7 +1132,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5G_stat_t *statbuf = va_arg(ap, H5G_stat_t*);
|
||||
H5G_stat_t *statbuf = HDva_arg(ap, H5G_stat_t*);
|
||||
|
||||
HDfprintf(out, "0x%lx", (unsigned long)statbuf);
|
||||
}
|
||||
@ -1166,7 +1166,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
hsize_t hsize = va_arg(ap, hsize_t);
|
||||
hsize_t hsize = HDva_arg(ap, hsize_t);
|
||||
|
||||
if(H5S_UNLIMITED == hsize)
|
||||
HDfprintf(out, "H5S_UNLIMITED");
|
||||
@ -1196,7 +1196,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
hssize_t hssize = va_arg(ap, hssize_t);
|
||||
hssize_t hssize = HDva_arg(ap, hssize_t);
|
||||
|
||||
HDfprintf(out, "%Hd", hssize);
|
||||
asize[argno] = (hssize_t)hssize;
|
||||
@ -1217,7 +1217,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
hid_t obj = va_arg(ap, hid_t);
|
||||
hid_t obj = HDva_arg(ap, hid_t);
|
||||
|
||||
if(H5P_DEFAULT == obj)
|
||||
HDfprintf(out, "H5P_DEFAULT");
|
||||
@ -1355,10 +1355,6 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "%ld (attr)", (long)obj);
|
||||
break;
|
||||
|
||||
case H5I_REFERENCE:
|
||||
HDfprintf(out, "%ld (reference)", (long)obj);
|
||||
break;
|
||||
|
||||
case H5I_VFL:
|
||||
HDfprintf(out, "%ld (file driver)", (long)obj);
|
||||
break;
|
||||
@ -1409,7 +1405,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5_index_t idx_type = (H5_index_t)va_arg(ap, int);
|
||||
H5_index_t idx_type = (H5_index_t)HDva_arg(ap, int);
|
||||
|
||||
switch(idx_type) {
|
||||
case H5_INDEX_UNKNOWN:
|
||||
@ -1443,7 +1439,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5_iter_order_t order = (H5_iter_order_t)va_arg(ap, int);
|
||||
H5_iter_order_t order = (H5_iter_order_t)HDva_arg(ap, int);
|
||||
|
||||
switch(order) {
|
||||
case H5_ITER_UNKNOWN:
|
||||
@ -1490,7 +1486,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
int is = va_arg(ap, int);
|
||||
int is = HDva_arg(ap, int);
|
||||
|
||||
HDfprintf (out, "%d", is);
|
||||
asize[argno] = is;
|
||||
@ -1505,7 +1501,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5I_type_t id_type = (H5I_type_t)va_arg(ap, int);
|
||||
H5I_type_t id_type = (H5I_type_t)HDva_arg(ap, int);
|
||||
|
||||
switch (id_type) {
|
||||
case H5I_UNINIT:
|
||||
@ -1540,10 +1536,6 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "H5I_ATTR");
|
||||
break;
|
||||
|
||||
case H5I_REFERENCE:
|
||||
HDfprintf(out, "H5I_REFERENCE");
|
||||
break;
|
||||
|
||||
case H5I_VFL:
|
||||
HDfprintf(out, "H5I_VFL");
|
||||
break;
|
||||
@ -1600,7 +1592,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
unsigned iu = va_arg(ap, unsigned);
|
||||
unsigned iu = HDva_arg(ap, unsigned);
|
||||
|
||||
HDfprintf(out, "%u", iu);
|
||||
asize[argno] = iu;
|
||||
@ -1623,7 +1615,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5L_type_t link_type = (H5L_type_t)va_arg(ap, int);
|
||||
H5L_type_t link_type = (H5L_type_t)HDva_arg(ap, int);
|
||||
|
||||
switch(link_type) {
|
||||
case H5L_TYPE_ERROR:
|
||||
@ -1670,7 +1662,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
} /* end if */
|
||||
#ifdef H5_HAVE_PARALLEL
|
||||
else {
|
||||
MPI_Comm comm = va_arg(ap, MPI_Comm);
|
||||
MPI_Comm comm = HDva_arg(ap, MPI_Comm);
|
||||
|
||||
HDfprintf(out, "%ld", (long)comm);
|
||||
} /* end else */
|
||||
@ -1686,7 +1678,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
} /* end if */
|
||||
#ifdef H5_HAVE_PARALLEL
|
||||
else {
|
||||
MPI_Info info = va_arg(ap, MPI_Info);
|
||||
MPI_Info info = HDva_arg(ap, MPI_Info);
|
||||
|
||||
HDfprintf(out, "%ld", (long)info);
|
||||
} /* end else */
|
||||
@ -1701,7 +1693,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5FD_mem_t mt = (H5FD_mem_t)va_arg(ap, int);
|
||||
H5FD_mem_t mt = (H5FD_mem_t)HDva_arg(ap, int);
|
||||
|
||||
switch(mt) {
|
||||
case H5FD_MEM_NOLIST:
|
||||
@ -1760,7 +1752,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
off_t offset = va_arg(ap, off_t);
|
||||
off_t offset = HDva_arg(ap, off_t);
|
||||
|
||||
HDfprintf (out, "%ld", (long)offset);
|
||||
} /* end else */
|
||||
@ -1776,7 +1768,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5O_type_t objtype = (H5O_type_t)va_arg(ap, int);
|
||||
H5O_type_t objtype = (H5O_type_t)HDva_arg(ap, int);
|
||||
|
||||
switch(objtype) {
|
||||
case H5O_TYPE_UNKNOWN:
|
||||
@ -1820,7 +1812,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
hid_t pclass_id = va_arg(ap, hid_t);
|
||||
hid_t pclass_id = HDva_arg(ap, hid_t);
|
||||
char *class_name = NULL;
|
||||
H5P_genclass_t *pclass;
|
||||
|
||||
@ -1844,7 +1836,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
hobj_ref_t ref = va_arg(ap, hobj_ref_t);
|
||||
hobj_ref_t ref = HDva_arg(ap, hobj_ref_t);
|
||||
|
||||
HDfprintf(out, "Reference Object=%a", ref);
|
||||
} /* end else */
|
||||
@ -1860,7 +1852,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5R_type_t reftype = (H5R_type_t)va_arg(ap, int);
|
||||
H5R_type_t reftype = (H5R_type_t)HDva_arg(ap, int);
|
||||
|
||||
switch(reftype) {
|
||||
case H5R_BADTYPE:
|
||||
@ -1902,7 +1894,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5S_class_t cls = (H5S_class_t)va_arg(ap, int);
|
||||
H5S_class_t cls = (H5S_class_t)HDva_arg(ap, int);
|
||||
|
||||
switch(cls) {
|
||||
case H5S_NO_CLASS:
|
||||
@ -1936,7 +1928,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5S_seloper_t so = (H5S_seloper_t)va_arg(ap, int);
|
||||
H5S_seloper_t so = (H5S_seloper_t)HDva_arg(ap, int);
|
||||
|
||||
switch(so) {
|
||||
case H5S_SELECT_NOOP:
|
||||
@ -1994,7 +1986,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5S_sel_type st = (H5S_sel_type)va_arg(ap, int);
|
||||
H5S_sel_type st = (H5S_sel_type)HDva_arg(ap, int);
|
||||
|
||||
switch(st) {
|
||||
case H5S_SEL_ERROR:
|
||||
@ -2042,7 +2034,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
const char *str = va_arg(ap, const char *);
|
||||
const char *str = HDva_arg(ap, const char *);
|
||||
|
||||
HDfprintf(out, "\"%s\"", str);
|
||||
} /* end else */
|
||||
@ -2058,7 +2050,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5T_cset_t cset = (H5T_cset_t)va_arg(ap, int);
|
||||
H5T_cset_t cset = (H5T_cset_t)HDva_arg(ap, int);
|
||||
|
||||
switch(cset) {
|
||||
case H5T_CSET_ERROR:
|
||||
@ -2105,7 +2097,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5T_direction_t direct = (H5T_direction_t)va_arg(ap, int);
|
||||
H5T_direction_t direct = (H5T_direction_t)HDva_arg(ap, int);
|
||||
|
||||
switch(direct) {
|
||||
case H5T_DIR_DEFAULT:
|
||||
@ -2135,7 +2127,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5T_pers_t pers = (H5T_pers_t)va_arg(ap, int);
|
||||
H5T_pers_t pers = (H5T_pers_t)HDva_arg(ap, int);
|
||||
|
||||
switch(pers) {
|
||||
case H5T_PERS_DONTCARE:
|
||||
@ -2165,7 +2157,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5T_norm_t norm = (H5T_norm_t)va_arg(ap, int);
|
||||
H5T_norm_t norm = (H5T_norm_t)HDva_arg(ap, int);
|
||||
|
||||
switch(norm) {
|
||||
case H5T_NORM_ERROR:
|
||||
@ -2199,7 +2191,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5T_order_t order = (H5T_order_t)va_arg(ap, int);
|
||||
H5T_order_t order = (H5T_order_t)HDva_arg(ap, int);
|
||||
|
||||
switch(order) {
|
||||
case H5T_ORDER_ERROR:
|
||||
@ -2241,7 +2233,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5T_pad_t pad = (H5T_pad_t)va_arg(ap, int);
|
||||
H5T_pad_t pad = (H5T_pad_t)HDva_arg(ap, int);
|
||||
|
||||
switch(pad) {
|
||||
case H5T_PAD_ERROR:
|
||||
@ -2279,7 +2271,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5T_sign_t sign = (H5T_sign_t)va_arg(ap, int);
|
||||
H5T_sign_t sign = (H5T_sign_t)HDva_arg(ap, int);
|
||||
|
||||
switch(sign) {
|
||||
case H5T_SGN_ERROR:
|
||||
@ -2313,7 +2305,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5T_class_t type_class = (H5T_class_t)va_arg(ap, int);
|
||||
H5T_class_t type_class = (H5T_class_t)HDva_arg(ap, int);
|
||||
|
||||
switch(type_class) {
|
||||
case H5T_NO_CLASS:
|
||||
@ -2383,7 +2375,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5T_str_t str = (H5T_str_t)va_arg(ap, int);
|
||||
H5T_str_t str = (H5T_str_t)HDva_arg(ap, int);
|
||||
|
||||
switch(str) {
|
||||
case H5T_STR_ERROR:
|
||||
@ -2439,7 +2431,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
htri_t tri_var = va_arg (ap, htri_t);
|
||||
htri_t tri_var = HDva_arg (ap, htri_t);
|
||||
|
||||
if(tri_var>0)
|
||||
HDfprintf (out, "TRUE");
|
||||
@ -2469,7 +2461,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
unsigned long iul = va_arg(ap, unsigned long);
|
||||
unsigned long iul = HDva_arg(ap, unsigned long);
|
||||
|
||||
HDfprintf(out, "%lu", iul);
|
||||
asize[argno] = (hssize_t)iul;
|
||||
@ -2493,7 +2485,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
unsigned long long iull = va_arg(ap, unsigned long long);
|
||||
unsigned long long iull = HDva_arg(ap, unsigned long long);
|
||||
|
||||
HDfprintf(out, "%llu", iull);
|
||||
asize[argno] = (hssize_t)iull;
|
||||
@ -2516,7 +2508,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5VL_attr_get_t get = (H5VL_attr_get_t)va_arg(ap, int);
|
||||
H5VL_attr_get_t get = (H5VL_attr_get_t)HDva_arg(ap, int);
|
||||
|
||||
switch(get) {
|
||||
case H5VL_ATTR_GET_SPACE:
|
||||
@ -2551,7 +2543,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5VL_attr_specific_t specific = (H5VL_attr_specific_t)va_arg(ap, int);
|
||||
H5VL_attr_specific_t specific = (H5VL_attr_specific_t)HDva_arg(ap, int);
|
||||
|
||||
switch(specific) {
|
||||
case H5VL_ATTR_DELETE:
|
||||
@ -2580,7 +2572,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5VL_class_value_t class_val = (H5VL_class_value_t)va_arg(ap, H5VL_class_value_t);
|
||||
H5VL_class_value_t class_val = (H5VL_class_value_t)HDva_arg(ap, H5VL_class_value_t);
|
||||
|
||||
if(H5_VOL_NATIVE == class_val)
|
||||
HDfprintf(out, "H5_VOL_NATIVE");
|
||||
@ -2596,7 +2588,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5VL_dataset_get_t get = (H5VL_dataset_get_t)va_arg(ap, int);
|
||||
H5VL_dataset_get_t get = (H5VL_dataset_get_t)HDva_arg(ap, int);
|
||||
|
||||
switch(get) {
|
||||
case H5VL_DATASET_GET_SPACE:
|
||||
@ -2634,7 +2626,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5VL_dataset_specific_t specific = (H5VL_dataset_specific_t)va_arg(ap, int);
|
||||
H5VL_dataset_specific_t specific = (H5VL_dataset_specific_t)HDva_arg(ap, int);
|
||||
|
||||
switch(specific) {
|
||||
case H5VL_DATASET_SET_EXTENT:
|
||||
@ -2660,7 +2652,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5VL_datatype_get_t get = (H5VL_datatype_get_t)va_arg(ap, int);
|
||||
H5VL_datatype_get_t get = (H5VL_datatype_get_t)HDva_arg(ap, int);
|
||||
|
||||
switch(get) {
|
||||
case H5VL_DATATYPE_GET_BINARY:
|
||||
@ -2683,7 +2675,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5VL_datatype_specific_t specific = (H5VL_datatype_specific_t)va_arg(ap, int);
|
||||
H5VL_datatype_specific_t specific = (H5VL_datatype_specific_t)HDva_arg(ap, int);
|
||||
|
||||
switch(specific) {
|
||||
case H5VL_DATATYPE_FLUSH:
|
||||
@ -2706,7 +2698,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5VL_file_get_t get = (H5VL_file_get_t)va_arg(ap, int);
|
||||
H5VL_file_get_t get = (H5VL_file_get_t)HDva_arg(ap, int);
|
||||
|
||||
switch(get) {
|
||||
case H5VL_FILE_GET_FAPL:
|
||||
@ -2744,7 +2736,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5VL_file_specific_t specific = (H5VL_file_specific_t)va_arg(ap, int);
|
||||
H5VL_file_specific_t specific = (H5VL_file_specific_t)HDva_arg(ap, int);
|
||||
|
||||
switch(specific) {
|
||||
case H5VL_FILE_FLUSH:
|
||||
@ -2762,9 +2754,6 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
case H5VL_FILE_IS_ACCESSIBLE:
|
||||
HDfprintf(out, "H5VL_FILE_IS_ACCESSIBLE");
|
||||
break;
|
||||
case H5VL_FILE_CACHE_VOL_CONN:
|
||||
HDfprintf(out, "H5VL_FILE_CACHE_VOL_CONN");
|
||||
break;
|
||||
default:
|
||||
HDfprintf(out, "%ld", (long)specific);
|
||||
break;
|
||||
@ -2779,7 +2768,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5VL_group_get_t get = (H5VL_group_get_t)va_arg(ap, int);
|
||||
H5VL_group_get_t get = (H5VL_group_get_t)HDva_arg(ap, int);
|
||||
|
||||
switch(get) {
|
||||
case H5VL_GROUP_GET_GCPL:
|
||||
@ -2802,7 +2791,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5VL_group_specific_t specific = (H5VL_group_specific_t)va_arg(ap, int);
|
||||
H5VL_group_specific_t specific = (H5VL_group_specific_t)HDva_arg(ap, int);
|
||||
|
||||
switch(specific) {
|
||||
case H5VL_GROUP_FLUSH:
|
||||
@ -2825,7 +2814,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5VL_link_create_type_t create = (H5VL_link_create_type_t)va_arg(ap, int);
|
||||
H5VL_link_create_type_t create = (H5VL_link_create_type_t)HDva_arg(ap, int);
|
||||
|
||||
switch(create) {
|
||||
case H5VL_LINK_CREATE_HARD:
|
||||
@ -2851,7 +2840,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5VL_link_get_t get = (H5VL_link_get_t)va_arg(ap, int);
|
||||
H5VL_link_get_t get = (H5VL_link_get_t)HDva_arg(ap, int);
|
||||
|
||||
switch(get) {
|
||||
case H5VL_LINK_GET_INFO:
|
||||
@ -2877,7 +2866,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5VL_link_specific_t specific = (H5VL_link_specific_t)va_arg(ap, int);
|
||||
H5VL_link_specific_t specific = (H5VL_link_specific_t)HDva_arg(ap, int);
|
||||
|
||||
switch(specific) {
|
||||
case H5VL_LINK_DELETE:
|
||||
@ -2903,7 +2892,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5VL_object_get_t get = (H5VL_object_get_t)va_arg(ap, int);
|
||||
H5VL_object_get_t get = (H5VL_object_get_t)HDva_arg(ap, int);
|
||||
|
||||
switch(get) {
|
||||
case H5VL_REF_GET_REGION:
|
||||
@ -2932,7 +2921,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5VL_object_specific_t specific = (H5VL_object_specific_t)va_arg(ap, int);
|
||||
H5VL_object_specific_t specific = (H5VL_object_specific_t)HDva_arg(ap, int);
|
||||
|
||||
switch(specific) {
|
||||
case H5VL_OBJECT_CHANGE_REF_COUNT:
|
||||
@ -2967,7 +2956,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5VL_request_specific_t specific = (H5VL_request_specific_t)va_arg(ap, int);
|
||||
H5VL_request_specific_t specific = (H5VL_request_specific_t)HDva_arg(ap, int);
|
||||
|
||||
switch(specific) {
|
||||
case H5VL_REQUEST_WAITANY:
|
||||
@ -3012,7 +3001,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
vp = va_arg (ap, void *);
|
||||
vp = HDva_arg (ap, void *);
|
||||
|
||||
if(vp)
|
||||
HDfprintf(out, "0x%lx", (unsigned long)vp);
|
||||
@ -3038,7 +3027,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
size_t size = va_arg(ap, size_t);
|
||||
size_t size = HDva_arg(ap, size_t);
|
||||
|
||||
HDfprintf(out, "%Zu", size);
|
||||
asize[argno] = (hssize_t)size;
|
||||
@ -3055,7 +3044,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5Z_SO_scale_type_t scale_type = (H5Z_SO_scale_type_t)va_arg(ap, int);
|
||||
H5Z_SO_scale_type_t scale_type = (H5Z_SO_scale_type_t)HDva_arg(ap, int);
|
||||
|
||||
switch(scale_type) {
|
||||
case H5Z_SO_FLOAT_DSCALE:
|
||||
@ -3085,7 +3074,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5Z_class2_t *filter = va_arg(ap, H5Z_class2_t*);
|
||||
H5Z_class2_t *filter = HDva_arg(ap, H5Z_class2_t*);
|
||||
|
||||
HDfprintf(out, "0x%lx", (unsigned long)filter);
|
||||
} /* end else */
|
||||
@ -3099,7 +3088,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5Z_EDC_t edc = (H5Z_EDC_t)va_arg(ap, int);
|
||||
H5Z_EDC_t edc = (H5Z_EDC_t)HDva_arg(ap, int);
|
||||
|
||||
if(H5Z_DISABLE_EDC == edc)
|
||||
HDfprintf(out, "H5Z_DISABLE_EDC");
|
||||
@ -3118,7 +3107,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
H5Z_filter_t id = va_arg(ap, H5Z_filter_t);
|
||||
H5Z_filter_t id = HDva_arg(ap, H5Z_filter_t);
|
||||
|
||||
if(H5Z_FILTER_DEFLATE == id)
|
||||
HDfprintf(out, "H5Z_FILTER_DEFLATE");
|
||||
@ -3144,7 +3133,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
HDfprintf(out, "NULL");
|
||||
} /* end if */
|
||||
else {
|
||||
ssize_t ssize = va_arg(ap, ssize_t);
|
||||
ssize_t ssize = HDva_arg(ap, ssize_t);
|
||||
|
||||
HDfprintf(out, "%Zd", ssize);
|
||||
asize[argno] = (hssize_t)ssize;
|
||||
@ -3172,7 +3161,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
|
||||
(event_time.etime - *returning));
|
||||
|
||||
error:
|
||||
va_end(ap);
|
||||
HDva_end(ap);
|
||||
if(returning)
|
||||
HDfprintf(out, ";\n");
|
||||
else {
|
||||
|
@ -62,9 +62,17 @@ typedef __int64 h5_stat_size_t;
|
||||
#define HDstat(S,B) _stati64(S,B)
|
||||
#define HDstrcasecmp(A,B) _stricmp(A,B)
|
||||
#define HDstrdup(S) _strdup(S)
|
||||
#define HDstrtok_r(X,Y,Z) strtok_s(X,Y,Z)
|
||||
#define HDtzset() _tzset()
|
||||
#define HDunlink(S) _unlink(S)
|
||||
#define HDwrite(F,M,Z) _write(F,M,Z)
|
||||
#if (_MSC_VER < 1800)
|
||||
/* va_copy() does not exist on pre-2013 Visual Studio. Since va_lists are
|
||||
* just pointers into the stack in those CRTs, the usual work-around
|
||||
* is to just define the operation as a pointer copy.
|
||||
*/
|
||||
#define HDva_copy(D,S) ((D) = (S))
|
||||
#endif /* MSC_VER < 1800 */
|
||||
|
||||
#ifdef H5_HAVE_VISUAL_STUDIO
|
||||
|
||||
|
@ -86,6 +86,9 @@ const char *FILENAME[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
#define OHMIN_FILENAME_A "ohdr_min_a"
|
||||
|
||||
|
||||
#define FILENAME_BUF_SIZE 1024
|
||||
#define KB 1024
|
||||
|
||||
@ -13067,6 +13070,7 @@ test_object_header_minimization_dcpl(void)
|
||||
{
|
||||
hid_t dcpl_id = -1;
|
||||
hid_t file_id = -1;
|
||||
char filename[FILENAME_BUF_SIZE] = "";
|
||||
hbool_t minimize = FALSE;
|
||||
|
||||
TESTING("dcpl flags to minimize dataset object header");
|
||||
@ -13075,7 +13079,10 @@ test_object_header_minimization_dcpl(void)
|
||||
/* SETUP */
|
||||
/*********/
|
||||
|
||||
file_id = H5Fcreate("some_arbitrary_filename", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
|
||||
if(NULL == h5_fixname(OHMIN_FILENAME_A, H5P_DEFAULT, filename, sizeof(filename)))
|
||||
FAIL_PUTS_ERROR("unable to prepare filename")
|
||||
|
||||
file_id = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
|
||||
if (0 > file_id)
|
||||
FAIL_PUTS_ERROR("unable to create test file\n");
|
||||
|
||||
|
@ -816,6 +816,7 @@ h5_get_vfd_fapl(hid_t fapl)
|
||||
{
|
||||
const char *env = NULL; /* HDF5_DRIVER environment variable */
|
||||
const char *tok = NULL; /* strtok pointer */
|
||||
char *lasts = NULL; /* Context pointer for strtok_r() call */
|
||||
char buf[1024]; /* buffer for tokenizing HDF5_DRIVER */
|
||||
|
||||
/* Get the environment variable, if it exists */
|
||||
@ -838,7 +839,7 @@ h5_get_vfd_fapl(hid_t fapl)
|
||||
*/
|
||||
HDstrncpy(buf, env, sizeof(buf));
|
||||
buf[sizeof(buf) - 1] = '\0';
|
||||
if(NULL == (tok = HDstrtok(buf, " \t\n\r")))
|
||||
if(NULL == (tok = HDstrtok_r(buf, " \t\n\r", &lasts)))
|
||||
goto done;
|
||||
|
||||
if(!HDstrcmp(tok, "sec2")) {
|
||||
@ -897,7 +898,7 @@ h5_get_vfd_fapl(hid_t fapl)
|
||||
hsize_t fam_size = 100 * 1024 * 1024; /* 100 MB */
|
||||
|
||||
/* Was a family size specified in the environment variable? */
|
||||
if((tok = HDstrtok(NULL, " \t\n\r")))
|
||||
if((tok = HDstrtok_r(NULL, " \t\n\r", &lasts)))
|
||||
fam_size = (hsize_t)(HDstrtod(tok, NULL) * 1024 * 1024);
|
||||
if(H5Pset_fapl_family(fapl, fam_size, H5P_DEFAULT) < 0)
|
||||
goto error;
|
||||
@ -906,7 +907,7 @@ h5_get_vfd_fapl(hid_t fapl)
|
||||
unsigned log_flags = H5FD_LOG_LOC_IO | H5FD_LOG_ALLOC;
|
||||
|
||||
/* Were special log file flags specified in the environment variable? */
|
||||
if((tok = HDstrtok(NULL, " \t\n\r")))
|
||||
if((tok = HDstrtok_r(NULL, " \t\n\r", &lasts)))
|
||||
log_flags = (unsigned)HDstrtol(tok, NULL, 0);
|
||||
|
||||
if(H5Pset_fapl_log(fapl, NULL, log_flags, (size_t)0) < 0)
|
||||
@ -951,6 +952,7 @@ h5_get_libver_fapl(hid_t fapl)
|
||||
{
|
||||
const char *env = NULL; /* HDF5_DRIVER environment variable */
|
||||
const char *tok = NULL; /* strtok pointer */
|
||||
char *lasts = NULL; /* Context pointer for strtok_r() call */
|
||||
char buf[1024]; /* buffer for tokenizing HDF5_DRIVER */
|
||||
|
||||
/* Get the environment variable, if it exists */
|
||||
@ -973,7 +975,7 @@ h5_get_libver_fapl(hid_t fapl)
|
||||
*/
|
||||
HDstrncpy(buf, env, sizeof(buf));
|
||||
buf[sizeof(buf) - 1] = '\0';
|
||||
if(NULL == (tok = HDstrtok(buf, " \t\n\r")))
|
||||
if(NULL == (tok = HDstrtok_r(buf, " \t\n\r", &lasts)))
|
||||
goto done;
|
||||
|
||||
if(!HDstrcmp(tok, "latest")) {
|
||||
@ -1014,6 +1016,7 @@ h5_get_vol_fapl(hid_t fapl)
|
||||
{
|
||||
const char *env = NULL;
|
||||
const char *tok = NULL;
|
||||
char *lasts = NULL; /* Context pointer for strtok_r() call */
|
||||
htri_t connector_is_registered;
|
||||
char buf[1024]; /* Buffer for tokenizing HDF5_VOL_CONNECTOR */
|
||||
void *vol_info = NULL; /* VOL connector info */
|
||||
@ -1036,7 +1039,7 @@ h5_get_vol_fapl(hid_t fapl)
|
||||
*/
|
||||
HDstrncpy(buf, env, sizeof(buf));
|
||||
buf[sizeof(buf) - 1] = '\0';
|
||||
if(NULL == (tok = HDstrtok(buf, " \t\n\r")))
|
||||
if(NULL == (tok = HDstrtok_r(buf, " \t\n\r", &lasts)))
|
||||
goto done;
|
||||
|
||||
/* First, check to see if the connector is already registered */
|
||||
@ -1066,7 +1069,7 @@ h5_get_vol_fapl(hid_t fapl)
|
||||
} /* end else */
|
||||
|
||||
/* Was there any connector info specified in the environment variable? */
|
||||
if(NULL != (tok = HDstrtok(NULL, " \t\n\r")))
|
||||
if(NULL != (tok = HDstrtok_r(NULL, " \t\n\r", &lasts)))
|
||||
if(H5VLconnector_str_to_info(tok, connector_id, &vol_info) < 0)
|
||||
goto error;
|
||||
|
||||
|
@ -7752,7 +7752,6 @@ done:
|
||||
case H5I_FILE:
|
||||
case H5I_DATASPACE:
|
||||
case H5I_ATTR:
|
||||
case H5I_REFERENCE:
|
||||
case H5I_VFL:
|
||||
case H5I_VOL:
|
||||
case H5I_GENPROP_CLS:
|
||||
@ -7841,7 +7840,6 @@ done:
|
||||
case H5I_FILE:
|
||||
case H5I_DATASPACE:
|
||||
case H5I_ATTR:
|
||||
case H5I_REFERENCE:
|
||||
case H5I_VFL:
|
||||
case H5I_VOL:
|
||||
case H5I_GENPROP_CLS:
|
||||
|
@ -9,8 +9,6 @@
|
||||
* TESTING MACROS *
|
||||
******************/
|
||||
|
||||
#define DEBUG_OH_SIZE 0 /* toggle some debug printing (0 off, 1 on)*/
|
||||
|
||||
/* basenames of test files created in this test suite */
|
||||
#define OHMIN_FILENAME_A "ohdr_min_a"
|
||||
#define OHMIN_FILENAME_B "ohdr_min_b"
|
||||
@ -20,40 +18,6 @@
|
||||
#define LT 2
|
||||
#define GT 3
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Macro: PRINT_DSET_OH_COMPARISON(...)
|
||||
*
|
||||
* Pretty-print metadata information about two dataset object headers.
|
||||
* Please use only at "top level" of test function.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#define PRINT_DSET_OH_COMPARISON(did1, did2) \
|
||||
{ H5O_info_t info1; \
|
||||
H5O_info_t info2; \
|
||||
\
|
||||
if(H5Oget_info2((did1), &info1, H5O_INFO_HDR) < 0) TEST_ERROR \
|
||||
if(H5Oget_info2((did2), &info2, H5O_INFO_HDR) < 0) TEST_ERROR \
|
||||
\
|
||||
HDprintf("\n==HEADERS== UNMINIMIZED MINIMIZED\n"); \
|
||||
HDprintf(" version: %11u %9u\n", \
|
||||
info1.hdr.version, \
|
||||
info2.hdr.version); \
|
||||
HDprintf(" # messages: %11u %9u\n", \
|
||||
info1.hdr.nmesgs, \
|
||||
info2.hdr.nmesgs); \
|
||||
HDprintf(" meta: %11llu %9llu\n", \
|
||||
info1.hdr.space.meta, \
|
||||
info2.hdr.space.meta); \
|
||||
HDprintf(" free: %11llu %9llu\n", \
|
||||
info1.hdr.space.free, \
|
||||
info2.hdr.space.free); \
|
||||
HDprintf(" total: %11llu %9llu\n", \
|
||||
info1.hdr.space.total, \
|
||||
info2.hdr.space.total); \
|
||||
}
|
||||
|
||||
|
||||
/*********************
|
||||
* UTILITY FUNCTIONS *
|
||||
*********************/
|
||||
@ -77,10 +41,10 @@
|
||||
static herr_t
|
||||
put_attribute(hid_t loc_id, const char *attrname, const void *attrvalue, hid_t datatype_id, hid_t dataspace_id, hid_t *attribute_id)
|
||||
{
|
||||
if ((*attribute_id) < 0) {
|
||||
if((*attribute_id) < 0) {
|
||||
hid_t id = -1;
|
||||
id = H5Acreate(loc_id, attrname, datatype_id, dataspace_id, H5P_DEFAULT, H5P_DEFAULT);
|
||||
if (id < 0)
|
||||
if(id < 0)
|
||||
return FAIL;
|
||||
*attribute_id = id;
|
||||
}
|
||||
@ -105,7 +69,7 @@ count_attributes(hid_t dset_id)
|
||||
{
|
||||
H5O_info_t info;
|
||||
|
||||
if (0 > H5Oget_info(dset_id, &info, H5O_INFO_ALL))
|
||||
if(0 > H5Oget_info(dset_id, &info, H5O_INFO_ALL))
|
||||
return -1;
|
||||
else
|
||||
return (int)info.num_attrs; /* should never exceed int bounds */
|
||||
@ -126,7 +90,7 @@ static herr_t
|
||||
_oh_getsize(hid_t did, hsize_t *size_out)
|
||||
{
|
||||
H5O_info_t info;
|
||||
if (FAIL == H5Oget_info2(did, &info, H5O_INFO_HDR))
|
||||
if(FAIL == H5Oget_info2(did, &info, H5O_INFO_HDR))
|
||||
return FAIL;
|
||||
*size_out = info.hdr.space.total;
|
||||
return SUCCEED;
|
||||
@ -150,14 +114,14 @@ oh_compare(hid_t did1, hid_t did2)
|
||||
hsize_t space1 = 0;
|
||||
hsize_t space2 = 0;
|
||||
|
||||
if (FAIL == _oh_getsize(did1, &space1))
|
||||
if(FAIL == _oh_getsize(did1, &space1))
|
||||
return -1;
|
||||
if (FAIL == _oh_getsize(did2, &space2))
|
||||
if(FAIL == _oh_getsize(did2, &space2))
|
||||
return -2;
|
||||
|
||||
if (space1 < space2)
|
||||
if(space1 < space2)
|
||||
return LT;
|
||||
else if (space1 > space2)
|
||||
else if(space1 > space2)
|
||||
return GT;
|
||||
else
|
||||
return EQ;
|
||||
@ -169,16 +133,13 @@ oh_compare(hid_t did1, hid_t did2)
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Function: test_attribute_addition()
|
||||
*
|
||||
* Purpose: Demonstrate attribute addition to datasets.
|
||||
*
|
||||
* Return: 0 (pass) or 1 (failure)
|
||||
*
|
||||
* Demonstrate attribute addition to datasets.
|
||||
* Conduct additions side-by-side with a standard datataset and one with
|
||||
* minimized dataset object headers.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
static int
|
||||
test_attribute_addition(void)
|
||||
static herr_t
|
||||
test_minimized_oh_attribute_addition(void)
|
||||
{
|
||||
hsize_t array_10[1] = {10}; /* dataspace extent */
|
||||
char buffer[10] = ""; /* to inspect string attribute */
|
||||
@ -210,10 +171,7 @@ test_attribute_addition(void)
|
||||
if(h5_fixname(OHMIN_FILENAME_A, H5P_DEFAULT, filename, sizeof(filename)) == NULL)
|
||||
TEST_ERROR
|
||||
|
||||
dspace_id = H5Screate_simple(
|
||||
1, /* rank */
|
||||
array_10, /* current dimensions */
|
||||
NULL); /* maximum dimensions */
|
||||
dspace_id = H5Screate_simple(1, array_10, NULL);
|
||||
if(dspace_id < 0) TEST_ERROR
|
||||
|
||||
dspace_scalar_id = H5Screate(H5S_SCALAR);
|
||||
@ -258,9 +216,6 @@ test_attribute_addition(void)
|
||||
count = count_attributes(mindset_id);
|
||||
if(count != 0) TEST_ERROR
|
||||
|
||||
if (DEBUG_OH_SIZE)
|
||||
PRINT_DSET_OH_COMPARISON(dset_id, mindset_id)
|
||||
|
||||
/* -----------------
|
||||
* add one attribute
|
||||
*/
|
||||
@ -283,9 +238,6 @@ test_attribute_addition(void)
|
||||
if(ret < 0) TEST_ERROR
|
||||
if(HDstrcmp("DEMO", buffer)) TEST_ERROR
|
||||
|
||||
if (DEBUG_OH_SIZE)
|
||||
PRINT_DSET_OH_COMPARISON(dset_id, mindset_id)
|
||||
|
||||
/* -----------------
|
||||
* modify one attribute
|
||||
*/
|
||||
@ -309,9 +261,6 @@ test_attribute_addition(void)
|
||||
if(ret < 0) TEST_ERROR
|
||||
if(HDstrcmp("REWRITE", buffer)) TEST_ERROR
|
||||
|
||||
if (DEBUG_OH_SIZE)
|
||||
PRINT_DSET_OH_COMPARISON(dset_id, mindset_id)
|
||||
|
||||
/* -----------------
|
||||
* add second attribute
|
||||
*/
|
||||
@ -337,9 +286,6 @@ test_attribute_addition(void)
|
||||
if(ret < 0) TEST_ERROR
|
||||
if(a_out != 3) TEST_ERROR
|
||||
|
||||
if (DEBUG_OH_SIZE)
|
||||
PRINT_DSET_OH_COMPARISON(dset_id, mindset_id)
|
||||
|
||||
/* -----------------
|
||||
* add third attribute
|
||||
*/
|
||||
@ -365,9 +311,6 @@ test_attribute_addition(void)
|
||||
if(ret < 0) TEST_ERROR
|
||||
if(a_out != 2185) TEST_ERROR
|
||||
|
||||
if (DEBUG_OH_SIZE)
|
||||
PRINT_DSET_OH_COMPARISON(dset_id, mindset_id)
|
||||
|
||||
/************
|
||||
* TEARDOWN *
|
||||
************/
|
||||
@ -387,7 +330,7 @@ test_attribute_addition(void)
|
||||
if(H5Fclose(file_id) < 0) TEST_ERROR
|
||||
|
||||
PASSED()
|
||||
return 0;
|
||||
return SUCCEED;
|
||||
|
||||
error :
|
||||
H5E_BEGIN_TRY {
|
||||
@ -405,21 +348,16 @@ error :
|
||||
(void)H5Aclose(attr_3a_id);
|
||||
(void)H5Fclose(file_id);
|
||||
} H5E_END_TRY;
|
||||
return 1;
|
||||
} /* test_attribute_addition */
|
||||
return FAIL;
|
||||
} /* test_minimized_oh_attribute_addition */
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Function: test_size_comparisons()
|
||||
*
|
||||
* Purpose: Examine when headers have been minimized.
|
||||
*
|
||||
* Return: 0 (pass) or 1 (failure)
|
||||
*
|
||||
* Compare header sizes against when headers have been minimized.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
static int
|
||||
test_size_comparisons(void)
|
||||
static herr_t
|
||||
test_minimized_oh_size_comparisons(void)
|
||||
{
|
||||
hsize_t array_10[1] = {10}; /* dataspace extents */
|
||||
|
||||
@ -519,9 +457,6 @@ test_size_comparisons(void)
|
||||
if(oh_compare(dset_F_x_id, dset_f_Y_id) != EQ) TEST_ERROR
|
||||
if(oh_compare(dset_F_x_id, dset_f_x_id) != LT) TEST_ERROR
|
||||
|
||||
if (DEBUG_OH_SIZE)
|
||||
PRINT_DSET_OH_COMPARISON(dset_f_x_id, dset_F_x_id)
|
||||
|
||||
/************
|
||||
* TEARDOWN *
|
||||
************/
|
||||
@ -542,7 +477,7 @@ test_size_comparisons(void)
|
||||
if(H5Dclose(dset_F_Y_id) < 0) TEST_ERROR
|
||||
|
||||
PASSED()
|
||||
return 0;
|
||||
return SUCCEED;
|
||||
|
||||
error :
|
||||
H5E_BEGIN_TRY {
|
||||
@ -561,16 +496,16 @@ error :
|
||||
(void)H5Dclose(dset_F_N_id);
|
||||
(void)H5Dclose(dset_F_Y_id);
|
||||
} H5E_END_TRY;
|
||||
return 1;
|
||||
} /* test_size_comparisons */
|
||||
return FAIL;
|
||||
} /* test_minimized_oh_size_comparisons */
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Test minimized dataset header with filter/pipeline message
|
||||
* Test minimized dataset object header with filter/pipeline message
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
static int
|
||||
test_minimized_with_filter(void)
|
||||
static herr_t
|
||||
test_minimized_oh_with_filter(void)
|
||||
{
|
||||
char filename[512] = "";
|
||||
const hsize_t extents[1] = {1024}; /* extents of dataspace */
|
||||
@ -656,9 +591,6 @@ test_minimized_with_filter(void)
|
||||
if(oh_compare(dset_mZ_id, dset_mx_id) != GT) TEST_ERROR
|
||||
if(oh_compare(dset_mZ_id, dset_xZ_id) != LT) TEST_ERROR
|
||||
|
||||
if (DEBUG_OH_SIZE)
|
||||
PRINT_DSET_OH_COMPARISON(dset_xZ_id, dset_mZ_id)
|
||||
|
||||
/************
|
||||
* TEARDOWN *
|
||||
************/
|
||||
@ -675,7 +607,7 @@ test_minimized_with_filter(void)
|
||||
if(H5Fclose(file_id) < 0) TEST_ERROR
|
||||
|
||||
PASSED()
|
||||
return 0;
|
||||
return SUCCEED;
|
||||
|
||||
error:
|
||||
H5E_BEGIN_TRY {
|
||||
@ -690,16 +622,16 @@ error:
|
||||
(void)H5Dclose(dset_mZ_id);
|
||||
(void)H5Fclose(file_id);
|
||||
} H5E_END_TRY;
|
||||
return 1;
|
||||
} /* test_minimized_with_filter */
|
||||
return FAIL;
|
||||
} /* test_minimized_oh_with_filter */
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Test minimized and recording modification times.
|
||||
* Test minimized dataset object header and recording modification times.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
static int
|
||||
test_modification_times(void)
|
||||
static herr_t
|
||||
test_minimized_oh_modification_times(void)
|
||||
{
|
||||
/* test-local structure for parameterized testing
|
||||
*/
|
||||
@ -778,7 +710,7 @@ test_modification_times(void)
|
||||
|
||||
fapl_id = H5P_DEFAULT;
|
||||
|
||||
if (cases[i].oh_version > 1) {
|
||||
if(cases[i].oh_version > 1) {
|
||||
fapl_id = H5Pcreate(H5P_FILE_ACCESS);
|
||||
if(fapl_id < 0) TEST_ERROR
|
||||
ret = H5Pset_libver_bounds(fapl_id, H5F_LIBVER_V18, H5F_LIBVER_V110);
|
||||
@ -811,12 +743,6 @@ test_modification_times(void)
|
||||
if(oh_compare(dset_mx_id, dset_xx_id) != LT) TEST_ERROR
|
||||
if(oh_compare(dset_mx_id, dset_xT_id) != LT) TEST_ERROR
|
||||
|
||||
if (DEBUG_OH_SIZE) {
|
||||
PRINT_DSET_OH_COMPARISON(dset_xx_id, dset_mx_id)
|
||||
PRINT_DSET_OH_COMPARISON(dset_xT_id, dset_mT_id)
|
||||
PRINT_DSET_OH_COMPARISON(dset_mT_id, dset_mN_id)
|
||||
}
|
||||
|
||||
if(oh_compare(dset_xx_id, dset_xT_id) != EQ) TEST_ERROR
|
||||
if(oh_compare(dset_mx_id, dset_mT_id) != EQ) TEST_ERROR
|
||||
if(oh_compare(dset_mN_id, dset_mT_id) != LT) TEST_ERROR
|
||||
@ -834,7 +760,7 @@ test_modification_times(void)
|
||||
if(H5Dclose(dset_mN_id) < 0) TEST_ERROR
|
||||
if(H5Fclose(file_id) < 0) TEST_ERROR
|
||||
|
||||
if ((fapl_id != H5P_DEFAULT) && (H5Pclose(fapl_id) < 0))
|
||||
if((fapl_id != H5P_DEFAULT) && (H5Pclose(fapl_id) < 0))
|
||||
TEST_ERROR
|
||||
|
||||
} /* for each version tested */
|
||||
@ -851,7 +777,7 @@ test_modification_times(void)
|
||||
if(H5Pclose(dcpl_mN_id) < 0) TEST_ERROR
|
||||
|
||||
PASSED()
|
||||
return 0;
|
||||
return SUCCEED;
|
||||
|
||||
error:
|
||||
H5E_BEGIN_TRY {
|
||||
@ -869,16 +795,16 @@ error:
|
||||
(void)H5Fclose(file_id);
|
||||
(void)H5Pclose(fapl_id);
|
||||
} H5E_END_TRY;
|
||||
return 1;
|
||||
} /* test_modification_times */
|
||||
return FAIL;
|
||||
} /* test_minimized_oh_modification_times */
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Test minimized dataset header with a fill value set.
|
||||
* Test minimized dataset object header with a fill value set.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
static int
|
||||
test_fillvalue_backwards_compatability(void)
|
||||
static herr_t
|
||||
test_minimized_oh_fillvalue_backwards_compatability(void)
|
||||
{
|
||||
char filename[512] = "";
|
||||
const hsize_t extents[1] = {64}; /* extents of dataspace */
|
||||
@ -952,9 +878,6 @@ test_fillvalue_backwards_compatability(void)
|
||||
* TESTS *
|
||||
*********/
|
||||
|
||||
if(DEBUG_OH_SIZE)
|
||||
PRINT_DSET_OH_COMPARISON(dset_1_id, dset_0_id)
|
||||
|
||||
/* dset not supporting pre-1.08 should be smaller? */
|
||||
if(oh_compare(dset_1_id, dset_0_id) != LT) TEST_ERROR
|
||||
|
||||
@ -971,7 +894,7 @@ test_fillvalue_backwards_compatability(void)
|
||||
if(H5Fclose(file_id) < 0) TEST_ERROR;
|
||||
|
||||
PASSED()
|
||||
return 0;
|
||||
return SUCCEED;
|
||||
|
||||
error:
|
||||
H5E_BEGIN_TRY {
|
||||
@ -983,8 +906,8 @@ error:
|
||||
(void)H5Dclose(dset_1_id);
|
||||
(void)H5Fclose(file_id);
|
||||
} H5E_END_TRY;
|
||||
return 1;
|
||||
} /* test_fillvalue_backwards_compatability */
|
||||
return FAIL;
|
||||
} /* test_minimized_oh_fillvalue_backwards_compatability */
|
||||
|
||||
/********
|
||||
* MAIN *
|
||||
@ -1004,19 +927,16 @@ main(void)
|
||||
|
||||
HDprintf("Testing minimized dataset object headers.\n");
|
||||
|
||||
nerrors += test_attribute_addition();
|
||||
nerrors += test_size_comparisons();
|
||||
nerrors += test_minimized_with_filter();
|
||||
nerrors += test_modification_times();
|
||||
nerrors += test_fillvalue_backwards_compatability();
|
||||
nerrors += test_minimized_oh_attribute_addition();
|
||||
nerrors += test_minimized_oh_size_comparisons();
|
||||
nerrors += test_minimized_oh_with_filter();
|
||||
nerrors += test_minimized_oh_modification_times();
|
||||
nerrors += test_minimized_oh_fillvalue_backwards_compatability();
|
||||
|
||||
if (nerrors > 0) {
|
||||
HDprintf("***** %d MINIMIZED DATASET OHDR TEST%s FAILED! *****\n",
|
||||
nerrors,
|
||||
nerrors > 1 ? "S" : "");
|
||||
} else {
|
||||
if(nerrors < 0)
|
||||
HDprintf("***** %d MINIMIZED DATASET OHDR TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
|
||||
else
|
||||
HDprintf("All minimized dataset object header tests passed.\n");
|
||||
}
|
||||
|
||||
return nerrors;
|
||||
} /* main */
|
||||
|
@ -1430,7 +1430,6 @@ test_obj_count_and_id(hid_t fid1, hid_t fid2, hid_t did, hid_t gid1,
|
||||
case H5I_DATATYPE:
|
||||
case H5I_DATASPACE:
|
||||
case H5I_ATTR:
|
||||
case H5I_REFERENCE:
|
||||
case H5I_VFL:
|
||||
case H5I_VOL:
|
||||
case H5I_GENPROP_CLS:
|
||||
|
@ -104,7 +104,7 @@ main (int argc, const char *argv[])
|
||||
hsize_t usize;
|
||||
htri_t testval;
|
||||
herr_t status;
|
||||
hid_t plist = -1;
|
||||
hid_t plist = H5I_INVALID_HID;
|
||||
|
||||
h5tools_setprogname(PROGRAMNAME);
|
||||
h5tools_setstatus(EXIT_SUCCESS);
|
||||
|
Loading…
Reference in New Issue
Block a user