summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5Eff.f90
diff options
context:
space:
mode:
authorElena Pourmal <epourmal@hdfgroup.org>2001-04-27 03:47:27 (GMT)
committerElena Pourmal <epourmal@hdfgroup.org>2001-04-27 03:47:27 (GMT)
commit6182da802691e5702681faf509ac151fe652dd51 (patch)
treeec6a41f8882327da936a0a1709458dba606ef35b /fortran/src/H5Eff.f90
parentc048eed3be375907a030a7f27cb958fcbc95a3ef (diff)
downloadhdf5-6182da802691e5702681faf509ac151fe652dd51.zip
hdf5-6182da802691e5702681faf509ac151fe652dd51.tar.gz
hdf5-6182da802691e5702681faf509ac151fe652dd51.tar.bz2
[svn-r3860]
Purpose: Windows port Description: Multiple changes: * Windows platforms require special compiler directives in order to create DLLs. * In read/write subroutines data arrays were passed by descriptor. This worked on UNIX but did not work on Windows. Solution: * added compiler directives. * read/write APIs have been changed. There is an additional parameter (array that contains the sizes of data buffer dimensions) and regular arrays are used instead of assumed-shaped arrays. Platforms tested: * Currently this feature does not work. Common blocks are not exported correctly from one F90 module to another. I am checking this in so I can ask DEC for help. * For static library tests passed on Windows 98 ( except flush2_fortran) All tests passed on Linux, Solaris 2.7, O2K and T3E
Diffstat (limited to 'fortran/src/H5Eff.f90')
-rw-r--r--fortran/src/H5Eff.f90243
1 files changed, 232 insertions, 11 deletions
diff --git a/fortran/src/H5Eff.f90 b/fortran/src/H5Eff.f90
index a8393dd..0c7b513 100644
--- a/fortran/src/H5Eff.f90
+++ b/fortran/src/H5Eff.f90
@@ -3,57 +3,278 @@
!
MODULE H5E
- USE H5FORTRAN_TYPES
- USE H5FORTRAN_FLAGS
+ USE H5GLOBAL
CONTAINS
+!----------------------------------------------------------------------
+! Name: h5eclear_f
+!
+! Purpose: Clears the error stack for the current thread.
+!
+! Inputs:
+! Outputs:
+! hdferr: - error code
+! Success: 0
+! Failure: -1
+! Optional parameters:
+!
+!
+!
+!
+! Programmer: Elena Pourmal
+! August 12, 1999
+!
+! Modifications: Explicit Fortran interfaces were added for
+! called C functions (it is needed for Windows
+! port). April 6, 2001
+!
+! Comment:
+!----------------------------------------------------------------------
+
SUBROUTINE h5eclear_f(hdferr)
+!
+!This definition is needed for Windows DLLs
+!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$attributes dllexport :: h5eclear_f
+!DEC$endif
+!
IMPLICIT NONE
INTEGER, INTENT(OUT) :: hdferr ! Error code
- INTEGER, EXTERNAL :: h5eclear_c
+! INTEGER, EXTERNAL :: h5eclear_c
+! MS FORTRAN needs explicit interface for C functions called here.
+!
+ INTERFACE
+ INTEGER FUNCTION h5eclear_c()
+ USE H5GLOBAL
+ !MS$ATTRIBUTES C,reference,alias:'_H5ECLEAR_C'::h5eclear_c
+ END FUNCTION h5eclear_c
+ END INTERFACE
hdferr = h5eclear_c()
END SUBROUTINE h5eclear_f
+!----------------------------------------------------------------------
+! Name: h5h5eprint_f
+!
+! Purpose: Prints the error stack in a default manner.
+!
+! Inputs:
+! Outputs:
+! hdferr: - error code
+! Success: 0
+! Failure: -1
+! Optional parameters:
+! name - name of the file that
+! contains print output
+!
+! Programmer: Elena Pourmal
+! August 12, 1999
+!
+! Modifications: Explicit Fortran interfaces were added for
+! called C functions (it is needed for Windows
+! port). April 6, 2001
+!
+! Comment:
+!----------------------------------------------------------------------
+
SUBROUTINE h5eprint_f(hdferr, name)
+!
+!This definition is needed for Windows DLLs
+!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$attributes dllexport :: h5eprint_f
+!DEC$endif
+!
CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: name ! File name
INTEGER, INTENT(OUT) :: hdferr ! Error code
- INTEGER, EXTERNAL :: h5eprint_c1, h5eprint_c2
-
+! INTEGER, EXTERNAL :: h5eprint_c1, h5eprint_c2
INTEGER :: namelen
+! MS FORTRAN needs explicit interface for C functions called here.
+!
+ INTERFACE
+ INTEGER FUNCTION h5eprint_c1(name, namelen)
+ USE H5GLOBAL
+ !MS$ATTRIBUTES C,reference,alias:'_H5EPRINT_C1'::h5eprint_c1
+ !DEC$ATTRIBUTES reference :: name
+ INTEGER :: namelen
+ CHARACTER(LEN=*),INTENT(IN) :: name
+ END FUNCTION h5eprint_c1
+ END INTERFACE
+! MS FORTRAN needs explicit interface for C functions called here.
+!
+ INTERFACE
+ INTEGER FUNCTION h5eprint_c2()
+ USE H5GLOBAL
+ !MS$ATTRIBUTES C,reference,alias:'_H5EPRINT_C2'::h5eprint_c2
+ END FUNCTION h5eprint_c2
+ END INTERFACE
namelen = LEN(NAME)
if (present(name)) hdferr = h5eprint_c1(name, namelen)
hdferr = h5eprint_c2()
END SUBROUTINE h5eprint_f
+!----------------------------------------------------------------------
+! Name: h5eget_major_f
+!
+! Purpose: Returns a character string describing an error specified
+! by a major error number.
+!
+! Inputs:
+! error_no - mojor error number
+! Outputs:
+! name - character string describing the error
+! hdferr: - error code
+! Success: 0
+! Failure: -1
+! Optional parameters:
+!
+! Programmer: Elena Pourmal
+! August 12, 1999
+!
+! Modifications: Explicit Fortran interfaces were added for
+! called C functions (it is needed for Windows
+! port). April 6, 2001
+!
+! Comment:
+!----------------------------------------------------------------------
+
SUBROUTINE h5eget_major_f(error_no, name, hdferr)
+!
+!This definition is needed for Windows DLLs
+!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$attributes dllexport :: h5eget_major_f
+!DEC$endif
+!
INTEGER, INTENT(IN) :: error_no !Major error number
- CHARACTER(LEN=*), INTENT(OUT) :: name ! File name
+ CHARACTER(LEN=*), INTENT(OUT) :: name ! Character string describing
+ ! the error.
INTEGER, INTENT(OUT) :: hdferr ! Error code
- INTEGER, EXTERNAL :: h5eget_major_c
+
+! INTEGER, EXTERNAL :: h5eget_major_c
+! MS FORTRAN needs explicit interface for C functions called here.
+!
+ INTERFACE
+ INTEGER FUNCTION h5eget_major_c(error_no, name)
+ USE H5GLOBAL
+ !MS$ATTRIBUTES C,reference,alias:'_H5EGET_MAJOR_C'::h5eget_major_c
+ !DEC$ATTRIBUTES reference :: name
+ INTEGER :: error_no
+ CHARACTER(LEN=*) :: name
+ END FUNCTION h5eget_major_c
+ END INTERFACE
hdferr = h5eget_major_c(error_no, name)
END SUBROUTINE h5eget_major_f
+!----------------------------------------------------------------------
+! Name: h5eget_minor_f
+!
+! Purpose: Returns a character string describing an error specified
+! by a minor error number.
+!
+! Inputs:
+! error_no - minor error number
+! Outputs:
+! name - character string describing the error
+! hdferr: - error code
+! Success: 0
+! Failure: -1
+! Optional parameters:
+!
+!
+!
+!
+! Programmer: Elena Pourmal
+! August 12, 1999
+!
+! Modifications: Explicit Fortran interfaces were added for
+! called C functions (it is needed for Windows
+! port). April 6, 2001
+!
+! Comment:
+!----------------------------------------------------------------------
+
SUBROUTINE h5eget_minor_f(error_no, name, hdferr)
+!
+!This definition is needed for Windows DLLs
+!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$attributes dllexport :: h5eget_minor_f
+!DEC$endif
+!
INTEGER, INTENT(IN) :: error_no !Major error number
- CHARACTER(LEN=*), INTENT(OUT) :: name ! File name
- INTEGER, INTENT(OUT) :: hdferr ! Error code
- INTEGER, EXTERNAL :: h5eget_minor_c
+ CHARACTER(LEN=*), INTENT(OUT) :: name ! Character string describing
+ ! the error
+ INTEGER, INTENT(OUT) :: hdferr ! Error code
+
+! INTEGER, EXTERNAL :: h5eget_minor_c
+! MS FORTRAN needs explicit interface for C functions called here.
+!
+ INTERFACE
+ INTEGER FUNCTION h5eget_minor_c(error_no, name)
+ USE H5GLOBAL
+ !MS$ATTRIBUTES C,reference,alias:'_H5EGET_MINOR_C'::h5eget_minor_c
+ !DEC$ATTRIBUTES reference :: name
+ INTEGER :: error_no
+ CHARACTER(LEN=*) :: name
+ END FUNCTION h5eget_minor_c
+ END INTERFACE
hdferr = h5eget_minor_c(error_no, name)
END SUBROUTINE h5eget_minor_f
+!----------------------------------------------------------------------
+! Name: h5eset_auto_f
+!
+! Purpose: Turns automatic error printing on or off
+!
+! Inputs:
+! printflag - flag to turn automatic error
+! - Possible values are:
+! - 1 (on), 0 (off)
+! Outputs:
+! hdferr: - error code
+! Success: 0
+! Failure: -1
+! Optional parameters:
+!
+!
+!
+!
+! Programmer: Elena Pourmal
+! August 12, 1999
+!
+! Modifications: Explicit Fortran interfaces were added for
+! called C functions (it is needed for Windows
+! port). April 6, 2001
+!
+! Comment:
+!----------------------------------------------------------------------
+
SUBROUTINE h5eset_auto_f(printflag, hdferr)
+!
+!This definition is needed for Windows DLLs
+!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$attributes dllexport :: h5eset_auto_f
+!DEC$endif
+!
INTEGER, INTENT(IN) :: printflag !flag to turn automatic error
!printing on or off
!possible values are:
!printon (1)
!printoff(0)
INTEGER, INTENT(OUT) :: hdferr ! Error code
- INTEGER, EXTERNAL :: h5eset_auto_c
+
+! INTEGER, EXTERNAL :: h5eset_auto_c
+! MS FORTRAN needs explicit interface for C functions called here.
+!
+ INTERFACE
+ INTEGER FUNCTION h5eset_auto_c(printflag)
+ USE H5GLOBAL
+ !MS$ATTRIBUTES C,reference,alias:'_H5ESET_AUTO_C'::h5eset_auto_c
+ INTEGER :: printflag
+ END FUNCTION h5eset_auto_c
+ END INTERFACE
hdferr = h5eset_auto_c(printflag)
END SUBROUTINE h5eset_auto_f