summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
Diffstat (limited to 'fortran')
-rw-r--r--fortran/doc/DevelGuide/masterindex.html2
-rw-r--r--fortran/doc/DevelGuide/robo_subroutines.html2
-rw-r--r--fortran/doc/DevelGuide/src/H5Fff_f90.html18
-rw-r--r--fortran/doc/DevelGuide/toc_index.html2
-rw-r--r--fortran/src/H5Ff.c17
-rw-r--r--fortran/src/H5Fff.f9029
-rw-r--r--fortran/src/H5f90proto.h4
-rw-r--r--fortran/src/hdf5_fortrandll.def.in2
-rw-r--r--fortran/test/tH5F.f908
9 files changed, 50 insertions, 34 deletions
diff --git a/fortran/doc/DevelGuide/masterindex.html b/fortran/doc/DevelGuide/masterindex.html
index 9765ea0..b187d66 100644
--- a/fortran/doc/DevelGuide/masterindex.html
+++ b/fortran/doc/DevelGuide/masterindex.html
@@ -164,7 +164,7 @@
<a href="./src/H5Fff_f90.html#robo142" class="indexitem" >h5fget_name_f</a>
<a href="./src/H5Fff_f90.html#robo143" class="indexitem" >h5fget_obj_count_f</a>
<a href="./src/H5Fff_f90.html#robo144" class="indexitem" >h5fget_obj_ids_f</a>
-<a href="./src/H5Fff_f90.html#robo145" class="indexitem" >h5fis_hdf5_f</a>
+<a href="./src/H5Fff_f90.html#robo145" class="indexitem" >h5fis_accessible_f</a>
<a href="./src/H5Fff_f90.html#robo146" class="indexitem" >h5fmount_f</a>
<a href="./src/H5Fff_f90.html#robo147" class="indexitem" >h5fopen_f</a>
<a href="./src/H5Fff_f90.html#robo148" class="indexitem" >h5freopen_f</a>
diff --git a/fortran/doc/DevelGuide/robo_subroutines.html b/fortran/doc/DevelGuide/robo_subroutines.html
index 0846c77..a5ce815 100644
--- a/fortran/doc/DevelGuide/robo_subroutines.html
+++ b/fortran/doc/DevelGuide/robo_subroutines.html
@@ -92,7 +92,7 @@
<a href="./src/H5Fff_f90.html#robo142" class="indexitem" >h5fget_name_f</a>
<a href="./src/H5Fff_f90.html#robo143" class="indexitem" >h5fget_obj_count_f</a>
<a href="./src/H5Fff_f90.html#robo144" class="indexitem" >h5fget_obj_ids_f</a>
-<a href="./src/H5Fff_f90.html#robo145" class="indexitem" >h5fis_hdf5_f</a>
+<a href="./src/H5Fff_f90.html#robo145" class="indexitem" >h5fis_accessible_f</a>
<a href="./src/H5Fff_f90.html#robo146" class="indexitem" >h5fmount_f</a>
<a href="./src/H5Fff_f90.html#robo147" class="indexitem" >h5fopen_f</a>
<a href="./src/H5Fff_f90.html#robo148" class="indexitem" >h5freopen_f</a>
diff --git a/fortran/doc/DevelGuide/src/H5Fff_f90.html b/fortran/doc/DevelGuide/src/H5Fff_f90.html
index b0164c9..fd8e579 100644
--- a/fortran/doc/DevelGuide/src/H5Fff_f90.html
+++ b/fortran/doc/DevelGuide/src/H5Fff_f90.html
@@ -443,22 +443,24 @@
</pre>
<hr />
-<a name="H5F2fh5fis5fhdf55ff"></a>
-<a name="robo145"></a><h2>h5fis_hdf5_f</h2>
+<a name="H5F2fh5fis5f5accessibleff"></a>
+<a name="robo145"></a><h2>h5fis_accessible_f</h2>
<p>[ <a href="#robo_top_of_doc">Top</a> ] [ <a href="#robo39">H5F</a> ] [ <a href="../robo_subroutines.html#robo_top_of_doc">Subroutines</a> ]</p>
<p class="item_name">NAME</p>
-<pre> <strong>h5fis_hdf5_f</strong>
+<pre> <strong>h5fis_accessible_f</strong>
</pre>
<p class="item_name">PURPOSE</p>
-<pre> Determines whether a file is in the <a href="./HDF5_f90.html#robo76">HDF5</a> format.
+<pre> Check if the file can be opened with the given fapl.
</pre>
<p class="item_name">INPUTS</p>
<pre> name - name of the file to check
+ fapl_id - the file access property list with which to
+ attempt to access the file.
</pre>
<p class="item_name">OUTPUTS</p>
-<pre> status - indicates if file is and <a href="./HDF5_f90.html#robo76">HDF5</a> file
- hdferr - Returns 0 if successful and -1 if fails
+<pre> status - indicates if file is accessible
+ hdferr - Returns TRUE/FALSE if successful and -1 if fails
</pre>
<p class="item_name">AUTHOR</p>
<pre> Elena Pourmal
@@ -470,9 +472,11 @@
port). February 28, 2001
</pre>
<p class="item_name">SOURCE</p>
-<pre class="source"> SUBROUTINE <strong>h5fis_hdf5_f</strong><span class="sign">(</span>name<span class="sign">,</span> status<span class="sign">,</span> hdferr<span class="sign">)</span>
+<pre class="source"> SUBROUTINE <strong>h5fis_accessible_f</strong><span class="sign">(</span>name<span class="sign">,</span> status<span class="sign">,</span> hdferr<span class="sign">)</span>
IMPLICIT NONE
CHARACTER<span class="sign">(</span>LEN<span class="sign">=</span><span class="sign">*</span><span class="sign">)</span><span class="sign">,</span> INTENT<span class="sign">(</span>IN<span class="sign">)</span> <span class="sign">:</span><span class="sign">:</span> name <span class="sign">!</span> Name of the file
+ INTEGER<span class="sign">(</span>HID_T<span class="sign">)</span><span class="sign">,</span> INTENT<span class="sign">(</span>IN<span class="sign">)</span> <span class="sign">:</span><span class="sign">:</span> fapl_id <span class="sign">!</span> Identifier <span class="keyword">for</span> file access property list
+ <span class="sign">!</span> with which to attempt to access the file
LOGICAL<span class="sign">,</span> INTENT<span class="sign">(</span>OUT<span class="sign">)</span> <span class="sign">:</span><span class="sign">:</span> status <span class="sign">!</span> Indicates <span class="keyword">if</span> file
<span class="sign">!</span> is an <a href="./HDF5_f90.html#robo76">HDF5</a> file
INTEGER<span class="sign">,</span> INTENT<span class="sign">(</span>OUT<span class="sign">)</span> <span class="sign">:</span><span class="sign">:</span> hdferr <span class="sign">!</span> Error code
diff --git a/fortran/doc/DevelGuide/toc_index.html b/fortran/doc/DevelGuide/toc_index.html
index 94a2792..8460580 100644
--- a/fortran/doc/DevelGuide/toc_index.html
+++ b/fortran/doc/DevelGuide/toc_index.html
@@ -133,7 +133,7 @@
<li><a href="./src/H5Fff_f90.html#robo142">h5fget_name_f</a></li>
<li><a href="./src/H5Fff_f90.html#robo143">h5fget_obj_count_f</a></li>
<li><a href="./src/H5Fff_f90.html#robo144">h5fget_obj_ids_f</a></li>
-<li><a href="./src/H5Fff_f90.html#robo145">h5fis_hdf5_f</a></li>
+<li><a href="./src/H5Fff_f90.html#robo145">h5fis_accessible_f</a></li>
<li><a href="./src/H5Fff_f90.html#robo146">h5fmount_f</a></li>
<li><a href="./src/H5Fff_f90.html#robo147">h5fopen_f</a></li>
<li><a href="./src/H5Fff_f90.html#robo148">h5freopen_f</a></li>
diff --git a/fortran/src/H5Ff.c b/fortran/src/H5Ff.c
index 4910aca..fbfb0b2 100644
--- a/fortran/src/H5Ff.c
+++ b/fortran/src/H5Ff.c
@@ -404,17 +404,18 @@ nh5fget_access_plist_c (hid_t_f *file_id, hid_t_f *access_id)
return ret_value;
}
-/****if* H5Ff/h5fis_hdf5_c
+/****if* H5Ff/h5fis_accessible_c
* NAME
- * h5fis_hdf5_c
+ * h5fis_accessible_c
* PURPOSE
- * Call H5Fis_hdf5 to determone if the file is an HDF5 file
+ * Call H5Fis_accessible to determone if the file is accessible with fapl
* INPUTS
* name - name of the file
* namelen - name length
+ * acc_prp - identifier of access property list
* OUTPUTS
- * flag - 0 if file is not HDF5 file , positive if a file
- * is an HDF5 file, and negative on failure.
+ * flag - 0 if file is not accessible , positive if a file
+ * is accessible, and negative on failure.
* RETURNS
* 0 on success, -1 on failure
* AUTHOR
@@ -425,14 +426,16 @@ nh5fget_access_plist_c (hid_t_f *file_id, hid_t_f *access_id)
* SOURCE
*/
int_f
-nh5fis_hdf5_c (_fcd name, int_f *namelen, int_f *flag)
+nh5fis_accessible_c (_fcd name, int_f *namelen, hid_t_f *acc_prp, int_f *flag)
/******/
{
int ret_value = -1;
char *c_name;
int_f c_namelen;
+ hid_t c_acc_prp;
htri_t status;
+ c_acc_prp = (hid_t)*acc_prp;
/*
* Convert FORTRAN name to C name
*/
@@ -443,7 +446,7 @@ nh5fis_hdf5_c (_fcd name, int_f *namelen, int_f *flag)
/*
* Call H5Fopen function.
*/
- status = H5Fis_hdf5(c_name);
+ status = H5Fis_accessible(c_name, c_acc_prp);
*flag = (int_f)status;
if (status >= 0) ret_value = 0;
diff --git a/fortran/src/H5Fff.f90 b/fortran/src/H5Fff.f90
index faa1967..c3af8c4 100644
--- a/fortran/src/H5Fff.f90
+++ b/fortran/src/H5Fff.f90
@@ -494,19 +494,21 @@ CONTAINS
END SUBROUTINE h5fget_access_plist_f
-!****s* H5F/h5fis_hdf5_f
+!****s* H5F/h5fis_accessible_f
!
! NAME
-! h5fis_hdf5_f
+! h5fis_accessible_f
!
! PURPOSE
-! Determines whether a file is in the HDF5 format.
+! Determines whether a file is accessible with the fapl.
!
! INPUTS
! name - name of the file to check
! OUTPUTS
-! status - indicates if file is and HDF5 file
+! status - indicates if file is accessible
! hdferr - Returns 0 if successful and -1 if fails
+! OPTIONAL PARAMETERS
+! access_prp - file access property list identifier
! AUTHOR
! Elena Pourmal
! August 12, 1999
@@ -517,36 +519,43 @@ CONTAINS
! port). February 28, 2001
!
! SOURCE
- SUBROUTINE h5fis_hdf5_f(name, status, hdferr)
+ SUBROUTINE h5fis_accessible_f(name, status, hdferr, access_prp)
IMPLICIT NONE
CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the file
LOGICAL, INTENT(OUT) :: status ! Indicates if file
! is an HDF5 file
INTEGER, INTENT(OUT) :: hdferr ! Error code
+ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: access_prp
+ ! File access property list
+ ! identifier
!*****
INTEGER :: namelen ! Length of the name character string
+ INTEGER(HID_T) :: access_prp_default
INTEGER :: flag ! "TRUE/FALSE" flag from C routine
! to define status value.
INTERFACE
- INTEGER FUNCTION h5fis_hdf5_c(name, namelen, flag)
+ INTEGER FUNCTION h5fis_accessible_c(name, namelen, access_prp_default, flag)
USE H5GLOBAL
!DEC$IF DEFINED(HDF5F90_WINDOWS)
- !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FIS_HDF5_C':: h5fis_hdf5_c
+ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FIS_ACCESSIBLE_C':: h5fis_accessible_c
!DEC$ENDIF
!DEC$ATTRIBUTES reference :: name
CHARACTER(LEN=*), INTENT(IN) :: name
INTEGER :: namelen
+ INTEGER(HID_T), INTENT(IN) :: access_prp_default
INTEGER :: flag
- END FUNCTION h5fis_hdf5_c
+ END FUNCTION h5fis_accessible_c
END INTERFACE
namelen = LEN_TRIM(name)
- hdferr = h5fis_hdf5_c(name, namelen, flag)
+ access_prp_default = H5P_DEFAULT_F
+ IF (PRESENT(access_prp)) access_prp_default = access_prp
+ hdferr = h5fis_accessible_c(name, namelen, access_prp_default, flag)
status = .TRUE.
IF (flag .EQ. 0) status = .FALSE.
- END SUBROUTINE h5fis_hdf5_f
+ END SUBROUTINE h5fis_accessible_f
!****s* H5F/h5fclose_f
!
! NAME
diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h
index 34638ee..7c712d4 100644
--- a/fortran/src/H5f90proto.h
+++ b/fortran/src/H5f90proto.h
@@ -84,7 +84,7 @@ typedef struct H5O_info_t_f {
#define nh5fflush_c H5_FC_FUNC_(h5fflush_c, H5FFLUSH_C)
#define nh5fclose_c H5_FC_FUNC_(h5fclose_c, H5FCLOSE_C)
#define nh5fopen_c H5_FC_FUNC_(h5fopen_c, H5FOPEN_C)
-#define nh5fis_hdf5_c H5_FC_FUNC_(h5fis_hdf5_c, H5FIS_HDF5_C)
+#define nh5fis_accessible_c H5_FC_FUNC_(h5fis_accessible_c, H5FIS_ACCESSIBLE_C)
#define nh5fmount_c H5_FC_FUNC_(h5fmount_c, H5FMOUNT_C)
#define nh5funmount_c H5_FC_FUNC_(h5funmount_c, H5FUNMOUNT_C)
#define nh5freopen_c H5_FC_FUNC_(h5freopen_c, H5FREOPEN_C)
@@ -99,7 +99,7 @@ typedef struct H5O_info_t_f {
H5_FCDLL int_f nh5fcreate_c (_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *crt_prp, hid_t_f *acc_prp, hid_t_f *file_id);
H5_FCDLL int_f nh5fopen_c (_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *acc_prp, hid_t_f *file_id);
-H5_FCDLL int_f nh5fis_hdf5_c (_fcd name, int_f *namelen, int_f *flag);
+H5_FCDLL int_f nh5fis_accessible_c (_fcd name, int_f *namelen, hid_t_f *acc_prp, int_f *flag);
H5_FCDLL int_f nh5fclose_c (hid_t_f *file_id);
H5_FCDLL int_f nh5fmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen, hid_t_f *file_id, hid_t_f *acc_prp);
H5_FCDLL int_f nh5funmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen);
diff --git a/fortran/src/hdf5_fortrandll.def.in b/fortran/src/hdf5_fortrandll.def.in
index c9c5e76..b679aed 100644
--- a/fortran/src/hdf5_fortrandll.def.in
+++ b/fortran/src/hdf5_fortrandll.def.in
@@ -226,7 +226,7 @@ H5F_mp_H5FOPEN_F
H5F_mp_H5FREOPEN_F
H5F_mp_H5FGET_CREATE_PLIST_F
H5F_mp_H5FGET_ACCESS_PLIST_F
-H5F_mp_H5FIS_HDF5_F
+H5F_mp_H5FIS_ACCESSIBLE_F
H5F_mp_H5FGET_NAME_F
H5F_mp_H5FGET_FILESIZE_F
@H5_NOF03EXP@H5F_PROVISIONAL_mp_H5FGET_FILE_IMAGE_F
diff --git a/fortran/test/tH5F.f90 b/fortran/test/tH5F.f90
index 931a046..6b62aea 100644
--- a/fortran/test/tH5F.f90
+++ b/fortran/test/tH5F.f90
@@ -196,15 +196,15 @@ CONTAINS
!
!test whether files are in hdf5 format
!
- CALL h5fis_hdf5_f(fix_filename1, status, error)
- CALL check("h5fis_hdf5_f",error,total_error)
+ CALL h5fis_accessible_f(fix_filename1, status, error)
+ CALL check("h5fis_accessible_f",error,total_error)
IF ( .NOT. status ) THEN
write(*,*) "File ", fix_filename1, " is not in hdf5 format"
stop
END IF
- CALL h5fis_hdf5_f(fix_filename2, status, error)
- CALL check("h5fis_hdf5_f",error,total_error)
+ CALL h5fis_accessible_f(fix_filename2, status, error)
+ CALL check("h5fis_accessible_f",error,total_error)
IF ( .NOT. status ) THEN
write(*,*) "File ", fix_filename2, " is not in hdf5 format"
stop