diff options
-rw-r--r-- | fortran/src/H5If.c | 29 | ||||
-rw-r--r-- | fortran/src/H5Iff.f90 | 46 | ||||
-rw-r--r-- | fortran/src/H5Pf.c | 29 | ||||
-rw-r--r-- | fortran/src/H5Pff.f90 | 51 | ||||
-rw-r--r-- | fortran/src/H5_f.c | 1 | ||||
-rw-r--r-- | fortran/src/H5f90global.f90 | 4 | ||||
-rw-r--r-- | fortran/src/H5f90proto.h | 6 |
7 files changed, 165 insertions, 1 deletions
diff --git a/fortran/src/H5If.c b/fortran/src/H5If.c index 625f29e..c5a3ac7 100644 --- a/fortran/src/H5If.c +++ b/fortran/src/H5If.c @@ -176,3 +176,32 @@ nh5iget_ref_c(hid_t_f *obj_id, int_f *ref_count) done: return ret_value; } +/*---------------------------------------------------------------------------- + * Name: h5iget_file_id_c + * Purpose: Call H5Iget_file_id to obtain file identifier from object identifier + * Inputs: obj_id - object identifier + * Outputs: file_id - file identifier + * Returns: 0 on success, -1 on failure + * Programmer: Elena Pourmal + * Tuesday, August 24, 2004 + * Modifications: + *---------------------------------------------------------------------------*/ +int_f +nh5iget_file_id_c(hid_t_f *obj_id, hid_t_f *file_id) +{ + int ret_value; + hid_t c_file_id; + + /* + * Call H5Iget_file_id + */ + if ((c_file_id = H5Iget_file_id(*obj_id)) < 0) + HGOTO_DONE(FAIL); + + /* Set output & return values */ + *file_id=(hid_t_f)c_file_id; + ret_value=0; + +done: + return ret_value; +} diff --git a/fortran/src/H5Iff.f90 b/fortran/src/H5Iff.f90 index a4bc6f6..f2d3334 100644 --- a/fortran/src/H5Iff.f90 +++ b/fortran/src/H5Iff.f90 @@ -292,6 +292,52 @@ END INTERFACE hdferr = h5iget_ref_c(obj_id, ref_count) END SUBROUTINE h5iget_ref_f +!---------------------------------------------------------------------- +! Name: h5iget_file_id_f +! +! Purpose: Obtains file identifier from the object identifier +! +! Inputs: obj_id - object identifier +! Outputs: +! file_id - file identifier +! hdferr: - error code +! Success: 0 +! Failure: -1 +! Optional parameters: +! NONE +! +! Programmer: Elena Pourmal +! August 23, 2004 +! +! Modifications: +! +! Comment: +!---------------------------------------------------------------------- + SUBROUTINE h5iget_file_id_f(obj_id, file_id, hdferr) +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_DLL) +!DEC$attributes dllexport :: h5iget_file_id_f +!DEC$endif +! + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + INTEGER(HID_T), INTENT(OUT) :: file_id ! File identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTERFACE + INTEGER FUNCTION h5iget_file_id_c(obj_id, file_id) + USE H5GLOBAL + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !MS$ATTRIBUTES C,reference,alias:'_H5IGET_FILE_ID_C':: h5iget_file_id_c + !DEC$ ENDIF + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER(HID_T), INTENT(OUT) :: file_id + END FUNCTION h5iget_file_id_c + END INTERFACE + hdferr = h5iget_file_id_c(obj_id, file_id) + END SUBROUTINE h5iget_file_id_f + END MODULE H5I diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c index 4fc934a..c965608 100644 --- a/fortran/src/H5Pf.c +++ b/fortran/src/H5Pf.c @@ -3309,3 +3309,32 @@ DONE: return ret_value; } +/*---------------------------------------------------------------------------- + * Name: h5premove_filter_c + * Purpose: Call H5Premove_filter to remove a filter + * Inputs: prp_id - dataset creation property list identifier + * filter - filter to be removed + * Returns: 0 on success, -1 on failure + * Programmer: Elena Pourmal + * Tuesday, August 24, 2004 + * Modifications: + *---------------------------------------------------------------------------*/ +int_f +nh5premove_filter_c (hid_t_f *prp_id, int_f* filter) +{ + int_f ret_value = -1; + hid_t c_prp_id; + herr_t ret; + H5Z_filter_t c_filter; + + c_filter = (H5Z_filter_t)*filter; + c_prp_id = (hid_t)*prp_id; + /* + * Call H5Premove_filter function. + */ + if((ret = H5Premove_filter(c_prp_id, c_filter)) < 0) goto DONE; + ret_value = 0; + +DONE: + return ret_value; +} diff --git a/fortran/src/H5Pff.f90 b/fortran/src/H5Pff.f90 index 87ccdee..206b1e2 100644 --- a/fortran/src/H5Pff.f90 +++ b/fortran/src/H5Pff.f90 @@ -6450,5 +6450,56 @@ hdferr = h5pmodify_filter_c(prp_id, filter, flags, cd_nelmts, cd_values ) END SUBROUTINE h5pmodify_filter_f +!---------------------------------------------------------------------- +! Name: h5premove_filter_f +! +! Purpose: Removes filter from the dataset creation property list. +! +! Inputs: +! prp_id - data creation property list +! identifier +! filter - filter to be removed +! Outputs: +! hdferr: - error code +! Success: 0 +! Failure: -1 +! Optional parameters: +! NONE +! +! Programmer: Elena Pourmal +! August 23, 2004 +! +! Modifications: +! +! Comment: +!---------------------------------------------------------------------- + + SUBROUTINE h5premove_filter_f(prp_id, filter, hdferr) +! +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_DLL) +!DEC$attributes dllexport :: h5premove_filter_f +!DEC$endif +! + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset creation property list + ! identifier + INTEGER, INTENT(IN) :: filter ! Filter to be removed + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTERFACE + INTEGER FUNCTION h5premove_filter_c(prp_id, filter) + USE H5GLOBAL + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !MS$ATTRIBUTES C,reference,alias:'_H5PREMOVE_FILTER_C'::h5premove_filter_c + !DEC$ ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: filter + END FUNCTION h5premove_filter_c + END INTERFACE + + hdferr = h5premove_filter_c(prp_id, filter) + END SUBROUTINE h5premove_filter_f + END MODULE H5P diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c index 22ad763..24d5655 100644 --- a/fortran/src/H5_f.c +++ b/fortran/src/H5_f.c @@ -398,6 +398,7 @@ nh5init_flags_c( int_f *h5d_flags, int_f *h5e_flags, int_f *h5f_flags, h5z_flags[10] = H5Z_FLAG_OPTIONAL; h5z_flags[11] = H5Z_FILTER_CONFIG_ENCODE_ENABLED; h5z_flags[12] = H5Z_FILTER_CONFIG_DECODE_ENABLED; + h5z_flags[13] = H5Z_FILTER_ALL; ret_value = 0; return ret_value; diff --git a/fortran/src/H5f90global.f90 b/fortran/src/H5f90global.f90 index 83d8f9c..5199c6a 100644 --- a/fortran/src/H5f90global.f90 +++ b/fortran/src/H5f90global.f90 @@ -572,7 +572,7 @@ ! ! H5Z flags declaration ! - INTEGER, PARAMETER :: H5Z_FLAGS_LEN = 13 + INTEGER, PARAMETER :: H5Z_FLAGS_LEN = 14 INTEGER H5Z_flags(H5Z_FLAGS_LEN) !DEC$if defined(BUILD_HDF5_DLL) !DEC$ ATTRIBUTES DLLEXPORT :: /H5Z_FLAGS/ @@ -581,6 +581,7 @@ INTEGER :: H5Z_FILTER_ERROR_F INTEGER :: H5Z_FILTER_NONE_F + INTEGER :: H5Z_FILTER_ALL_F INTEGER :: H5Z_FILTER_DEFLATE_F INTEGER :: H5Z_FILTER_SHUFFLE_F INTEGER :: H5Z_FILTER_FLETCHER32_F @@ -606,6 +607,7 @@ EQUIVALENCE(H5Z_flags(11), H5Z_FLAG_OPTIONAL_F) EQUIVALENCE(H5Z_flags(12), H5Z_FILTER_ENCODE_ENABLED_F) EQUIVALENCE(H5Z_flags(13), H5Z_FILTER_DECODE_ENABLED_F) + EQUIVALENCE(H5Z_flags(14), H5Z_FILTER_ALL_F) ! diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h index 381b835..3cda458 100644 --- a/fortran/src/H5f90proto.h +++ b/fortran/src/H5f90proto.h @@ -798,6 +798,7 @@ H5_DLL int_f nh5tis_variable_str_c ( hid_t_f *type_id , int_f *flag ); # define nh5pset_fapl_multi_sc FNAME(H5PSET_FAPL_MULTI_SC) # define nh5pset_szip_c FNAME(H5PSET_SZIP_C) # define nh5pall_filters_avail_c FNAME(H5PALL_FILTERS_AVAIL_C) +# define nh5premove_filter_c FNAME(H5PREMOVE_FILTER_C) #else # define nh5pcreate_c FNAME(h5pcreate_c) @@ -906,6 +907,7 @@ H5_DLL int_f nh5tis_variable_str_c ( hid_t_f *type_id , int_f *flag ); # define nh5pset_fapl_multi_sc FNAME(h5pset_fapl_multi_sc) # define nh5pset_szip_c FNAME(h5pset_szip_c) # define nh5pall_filters_avail_c FNAME(h5pall_filters_avail_c) +# define nh5premove_filter_c FNAME(h5premove_filter_c) #endif @@ -1103,6 +1105,7 @@ H5_DLL int_f nh5pset_fapl_multi_sc ( hid_t_f *prp_id , int_f *flag); H5_DLL int_f nh5pset_szip_c ( hid_t_f *prp_id , int_f *options_mask, int_f *pixels_per_block); H5_DLL int_f nh5pall_filters_avail_c ( hid_t_f *prp_id , int_f *status); H5_DLL int_f nh5pfill_value_defined_c ( hid_t_f *prp_id , int_f *flag); +H5_DLL int_f nh5premove_filter_c ( hid_t_f *prp_id , int_f *filter); /* * Functions frome H5Rf.c @@ -1156,12 +1159,14 @@ nh5rget_object_type_obj_c (hid_t_f *dset_id, int_f *ref, int_f *obj_type); # define nh5iinc_ref_c FNAME(H5IINC_REF_C) # define nh5idec_ref_c FNAME(H5IDEC_REF_C) # define nh5iget_ref_c FNAME(H5IGET_REF_C) +# define nh5iget_file_id_c FNAME(H5IGET_FILE_ID_C) #else # define nh5iget_type_c FNAME(h5iget_type_c) # define nh5iget_name_c FNAME(h5iget_name_c) # define nh5iinc_ref_c FNAME(h5iinc_ref_c) # define nh5idec_ref_c FNAME(h5idec_ref_c) # define nh5iget_ref_c FNAME(h5iget_ref_c) +# define nh5iget_file_id_c FNAME(h5iget_file_id_c) #endif #endif @@ -1170,6 +1175,7 @@ H5_DLL int_f nh5iget_name_c(hid_t_f *obj_id, _fcd buf, size_t_f *buf_size, size_ H5_DLL int_f nh5iinc_ref_c(hid_t_f *obj_id, int_f *ref_count); H5_DLL int_f nh5idec_ref_c(hid_t_f *obj_id, int_f *ref_count); H5_DLL int_f nh5iget_ref_c(hid_t_f *obj_id, int_f *ref_count); +H5_DLL int_f nh5iget_file_id_c(hid_t_f *obj_id, hid_t_f *file_id); #ifndef H5Ef90_FNAMES |