From 7c1ed9855019e286ec8ac1a6355f70ffda91b1b7 Mon Sep 17 00:00:00 2001 From: schnetter Date: Fri, 2 Apr 2004 17:38:53 +0000 Subject: Rename a module to prevent a name clash. Add more prototypes. git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/Fortran/trunk@3 51d2df92-0e4f-0410-a727-bd43d766d6b6 --- src/cctk.F90 | 4 ++- src/cctk_FortranString.F90 | 17 ----------- src/cctk_FortranString0.F90 | 18 ++++++++++++ src/cctk_FortranWrappers.F90 | 34 ++++++++++++++++++++++ src/cctk_GHExtensions.F90 | 67 ++++++++++++++++++++++++++++++++++++++++++++ src/make.code.defn | 34 ++++++++++++---------- 6 files changed, 141 insertions(+), 33 deletions(-) delete mode 100644 src/cctk_FortranString.F90 create mode 100644 src/cctk_FortranString0.F90 create mode 100644 src/cctk_FortranWrappers.F90 create mode 100644 src/cctk_GHExtensions.F90 diff --git a/src/cctk.F90 b/src/cctk.F90 index 9f69404..834575f 100644 --- a/src/cctk.F90 +++ b/src/cctk.F90 @@ -23,6 +23,8 @@ module cctk use cctk_Faces use cctk_File use cctk_Flesh - use cctk_FortranString + use cctk_FortranString0 + use cctk_FortranWrappers + use cctk_GHExtensions implicit none end module cctk diff --git a/src/cctk_FortranString.F90 b/src/cctk_FortranString.F90 deleted file mode 100644 index be32bec..0000000 --- a/src/cctk_FortranString.F90 +++ /dev/null @@ -1,17 +0,0 @@ -/*@@ - @file $RCSfile$ - @author $Author$ - @date $Date$ - @desc - Fortran 90 interface declarations for the routines - which have their C declarations in cctk_FortranString.h - @enddesc - @version $Header$ -@@*/ - -#include "cctk.h" - -module cctk_FortranString - implicit none - -end module cctk_FortranString diff --git a/src/cctk_FortranString0.F90 b/src/cctk_FortranString0.F90 new file mode 100644 index 0000000..c1d8d88 --- /dev/null +++ b/src/cctk_FortranString0.F90 @@ -0,0 +1,18 @@ +/*@@ + @file $RCSfile$ + @author $Author$ + @date $Date$ + @desc + Fortran 90 interface declarations for the routines + which have their C declarations in cctk_FortranString.h + @enddesc + @version $Header$ +@@*/ + +#include "cctk.h" + +! This is the name of a subroutine, so the module must be called differently. +module cctk_FortranString0 + implicit none + +end module cctk_FortranString0 diff --git a/src/cctk_FortranWrappers.F90 b/src/cctk_FortranWrappers.F90 new file mode 100644 index 0000000..ac69c26 --- /dev/null +++ b/src/cctk_FortranWrappers.F90 @@ -0,0 +1,34 @@ +/*@@ + @file $RCSfile$ + @author $Author$ + @date $Date$ + @desc + Fortran 90 interface declarations for the routines + which have their C declarations in cctk_FortranWrappers.h + @enddesc + @version $Header$ +@@*/ + +#include "cctk.h" + +module cctk_FortranWrappers + implicit none + + interface + + subroutine CCTK_RegisterFortranWrapper (ierr, name, function) + implicit none + integer ierr + character(*) name + CCTK_FPOINTER function + end subroutine CCTK_RegisterFortranWrapper + + subroutine CCTK_FortranWrapper (function, name) + implicit none + CCTK_FPOINTER function + character(*) name + end subroutine CCTK_FortranWrapper + + end interface + +end module cctk_FortranWrappers diff --git a/src/cctk_GHExtensions.F90 b/src/cctk_GHExtensions.F90 new file mode 100644 index 0000000..d038413 --- /dev/null +++ b/src/cctk_GHExtensions.F90 @@ -0,0 +1,67 @@ +/*@@ + @file $RCSfile$ + @author $Author$ + @date $Date$ + @desc + Fortran 90 interface declarations for the routines + which have their C declarations in cctk_GHExtensions.h + @enddesc + @version $Header$ +@@*/ + +#include "cctk.h" + +module cctk_GHExtensions + implicit none + + interface + + subroutine CCTK_RegisterGHExtension (ierr, name) + implicit none + integer ierr + character(*) name + end subroutine CCTK_RegisterGHExtension + + subroutine CCTK_UnregisterGHExtension (ierr, name) + implicit none + integer ierr + character(*) name + end subroutine CCTK_UnregisterGHExtension + + subroutine CCTK_RegisterGHExtensionSetupGH (ierr, handle, func) + implicit none + integer ierr + integer handle + CCTK_FPOINTER func + end subroutine CCTK_RegisterGHExtensionSetupGH + + subroutine CCTK_RegisterGHExtensionInitGH (ierr, handle, func) + implicit none + integer ierr + integer handle + CCTK_FPOINTER func + end subroutine CCTK_RegisterGHExtensionInitGH + + subroutine CCTK_RegisterGHExtensionScheduleTraverseGH (ierr, handle, func) + implicit none + integer ierr + integer handle + CCTK_FPOINTER func + end subroutine CCTK_RegisterGHExtensionScheduleTraverseGH + + subroutine CCTK_GHExtensionHandle (ierr, name) + implicit none + integer ierr + character(*) name + end subroutine CCTK_GHExtensionHandle + + subroutine CCTK_GHExtension (extension, GH, name) + implicit none + CCTK_POINTER extension + CCTK_POINTER_TO_CONST GH + character(*) name + end subroutine CCTK_GHExtension + + end interface + +end module cctk_GHExtensions diff --git a/src/make.code.defn b/src/make.code.defn index 19af82d..02688ae 100644 --- a/src/make.code.defn +++ b/src/make.code.defn @@ -3,22 +3,26 @@ ifneq ($(strip $(F90)),none) -SRCS = cctk.F90 \ - cctk_ActiveThorns.F90 \ - cctk_Banner.F90 \ - cctk_Cache.F90 \ - cctk_Comm.F90 \ - cctk_CommandLine.F90 \ - cctk_Complex.F90 \ - cctk_Constants.F90 \ - cctk_Coord.F90 \ - cctk_DebugDefines.F90 \ - cctk_Faces.F90 \ - cctk_File.F90 \ - cctk_Flesh.F90 \ - cctk_FortranString.F90 \ +SRCS = cctk.F90 \ + cctk_ActiveThorns.F90 \ + cctk_Banner.F90 \ + cctk_Cache.F90 \ + cctk_Comm.F90 \ + cctk_CommandLine.F90 \ + cctk_Complex.F90 \ + cctk_Constants.F90 \ + cctk_Coord.F90 \ + cctk_DebugDefines.F90 \ + cctk_Faces.F90 \ + cctk_File.F90 \ + cctk_Flesh.F90 \ + cctk_FortranString0.F90 \ + cctk_FortranWrappers.F90 \ + cctk_GHExtensions.F90 \ util_Table.F90 else -SRCS= + +SRCS = + endif -- cgit v1.2.3