From ce865934c54a2b7e2fc4ed7e6b0ed737c258234b Mon Sep 17 00:00:00 2001 From: schnetter Date: Tue, 28 Oct 2003 13:48:24 +0000 Subject: Change the way in which pointers are passed to and from Fortran. git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/CartGrid3D/trunk@187 c78560ca-4b45-4335-b268-5f3340f3cb52 --- src/GetSymmetry.c | 12 ++++++------ src/SetSymmetry.c | 24 ++++++++++++------------ src/Symmetry.c | 24 ++++++++++++------------ 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/GetSymmetry.c b/src/GetSymmetry.c index 7c6767c..f21a3ee 100644 --- a/src/GetSymmetry.c +++ b/src/GetSymmetry.c @@ -33,9 +33,9 @@ CCTK_FILEVERSION(CactusBase_CartGrid3D_GetSymmetry_c) void DecodeSymParameters3D(int sym[6]); void CCTK_FCALL CCTK_FNAME(GetCartSymVI) - (int *ierr, const cGH *GH, int *sym, const int *vi); + (int *ierr, const cGH **GH, int *sym, const int *vi); void CCTK_FCALL CCTK_FNAME(GetCartSymVN) - (int *ierr, const cGH *GH, int *sym, ONE_FORTSTRING_ARG); + (int *ierr, const cGH **GH, int *sym, ONE_FORTSTRING_ARG); /******************************************************************** ********************* External Routines ********************** @@ -81,9 +81,9 @@ int GetCartSymVI(const cGH *GH, int *sym, int vi) } void CCTK_FCALL CCTK_FNAME(GetCartSymVI) - (int *ierr, const cGH *GH, int *sym, const int *vi) + (int *ierr, const cGH **GH, int *sym, const int *vi) { - *ierr = GetCartSymVI(GH, sym, *vi); + *ierr = GetCartSymVI(*GH, sym, *vi); } @@ -113,10 +113,10 @@ int GetCartSymVN(const cGH *GH, int *sym, const char *vn) } void CCTK_FCALL CCTK_FNAME(GetCartSymVN) - (int *ierr, const cGH *GH, int *sym, ONE_FORTSTRING_ARG) + (int *ierr, const cGH **GH, int *sym, ONE_FORTSTRING_ARG) { ONE_FORTSTRING_CREATE(vn) - *ierr = GetCartSymVN(GH, sym, vn); + *ierr = GetCartSymVN(*GH, sym, vn); free(vn); } diff --git a/src/SetSymmetry.c b/src/SetSymmetry.c index c10c55b..263af8d 100644 --- a/src/SetSymmetry.c +++ b/src/SetSymmetry.c @@ -26,13 +26,13 @@ CCTK_FILEVERSION(CactusBase_CartGrid3D_SetSymmetry_c) ********************************************************************/ void DecodeSymParameters3D(int sym[6]); void CCTK_FCALL CCTK_FNAME(SetCartSymVI) - (int *ierr, const cGH *GH, const int *sym, const int *vi); + (int *ierr, const cGH **GH, const int *sym, const int *vi); void CCTK_FCALL CCTK_FNAME(SetCartSymVN) - (int *ierr, const cGH *GH, const int *sym, ONE_FORTSTRING_ARG); + (int *ierr, const cGH **GH, const int *sym, ONE_FORTSTRING_ARG); void CCTK_FCALL CCTK_FNAME(SetCartSymGI) - (int *ierr, const cGH *GH, const int *sym, const int *gi); + (int *ierr, const cGH **GH, const int *sym, const int *gi); void CCTK_FCALL CCTK_FNAME(SetCartSymGN) - (int *ierr, const cGH *GH, const int *sym, ONE_FORTSTRING_ARG); + (int *ierr, const cGH **GH, const int *sym, ONE_FORTSTRING_ARG); /*@@ @@ -107,9 +107,9 @@ int SetCartSymVI (const cGH *GH, const int *sym, int vi) } void CCTK_FCALL CCTK_FNAME(SetCartSymVI) - (int *ierr, const cGH *GH, const int *sym, const int *vi) + (int *ierr, const cGH **GH, const int *sym, const int *vi) { - *ierr = SetCartSymVI (GH, sym, *vi); + *ierr = SetCartSymVI (*GH, sym, *vi); } @@ -143,10 +143,10 @@ int SetCartSymVN(const cGH *GH, const int *sym, const char *vn) } void CCTK_FCALL CCTK_FNAME(SetCartSymVN) - (int *ierr, const cGH *GH, const int *sym, ONE_FORTSTRING_ARG) + (int *ierr, const cGH **GH, const int *sym, ONE_FORTSTRING_ARG) { ONE_FORTSTRING_CREATE(vn) - *ierr = SetCartSymVN(GH, sym, vn); + *ierr = SetCartSymVN(*GH, sym, vn); free(vn); } @@ -232,9 +232,9 @@ int SetCartSymGI(const cGH *GH, const int *sym, int gi) } void CCTK_FCALL CCTK_FNAME(SetCartSymGI) - (int *ierr, const cGH *GH, const int *sym, const int *gi) + (int *ierr, const cGH **GH, const int *sym, const int *gi) { - *ierr = SetCartSymGI(GH, sym, *gi); + *ierr = SetCartSymGI(*GH, sym, *gi); } @@ -268,9 +268,9 @@ int SetCartSymGN(const cGH *GH, const int *sym, const char *gn) } void CCTK_FCALL CCTK_FNAME(SetCartSymGN) - (int *ierr, const cGH *GH, const int *sym, ONE_FORTSTRING_ARG) + (int *ierr, const cGH **GH, const int *sym, ONE_FORTSTRING_ARG) { ONE_FORTSTRING_CREATE(gn) - *ierr = SetCartSymGN(GH, sym, gn); + *ierr = SetCartSymGN(*GH, sym, gn); free(gn); } diff --git a/src/Symmetry.c b/src/Symmetry.c index a1a1f64..8f3f832 100644 --- a/src/Symmetry.c +++ b/src/Symmetry.c @@ -36,12 +36,12 @@ static int ApplySymmetry (const cGH *GH, int gindex, int first_vindex, /******************************************************************** ******************* Fortran Wrapper Prototypes ********************* ********************************************************************/ -void CCTK_FCALL CCTK_FNAME (CartSymGI) (int *ierr, const cGH *GH, int *gindex); +void CCTK_FCALL CCTK_FNAME (CartSymGI) (int *ierr, const cGH **GH, int *gindex); void CCTK_FCALL CCTK_FNAME (CartSymGN) - (int *ierr, const cGH *GH, ONE_FORTSTRING_ARG); -void CCTK_FCALL CCTK_FNAME (CartSymVI) (int *ierr, const cGH *GH, int *vindex); + (int *ierr, const cGH **GH, ONE_FORTSTRING_ARG); +void CCTK_FCALL CCTK_FNAME (CartSymVI) (int *ierr, const cGH **GH, int *vindex); void CCTK_FCALL CCTK_FNAME (CartSymVN) - (int *ierr, const cGH *GH, ONE_FORTSTRING_ARG); + (int *ierr, const cGH **GH, ONE_FORTSTRING_ARG); /******************************************************************** @@ -97,9 +97,9 @@ int CartSymGI (const cGH *GH, int gindex) return (retval); } -void CCTK_FCALL CCTK_FNAME (CartSymGI) (int *ierr, const cGH *GH, int *gindex) +void CCTK_FCALL CCTK_FNAME (CartSymGI) (int *ierr, const cGH **GH, int *gindex) { - *ierr = CartSymGI (GH, *gindex); + *ierr = CartSymGI (*GH, *gindex); } @@ -150,10 +150,10 @@ int CartSymGN (const cGH *GH, const char *gname) } void CCTK_FCALL CCTK_FNAME (CartSymGN) - (int *ierr, const cGH *GH, ONE_FORTSTRING_ARG) + (int *ierr, const cGH **GH, ONE_FORTSTRING_ARG) { ONE_FORTSTRING_CREATE (gname) - *ierr = CartSymGN (GH, gname); + *ierr = CartSymGN (*GH, gname); free (gname); } @@ -204,9 +204,9 @@ int CartSymVI (const cGH *GH, int vindex) return (retval); } -void CCTK_FCALL CCTK_FNAME (CartSymVI) (int *ierr, const cGH *GH, int *vindex) +void CCTK_FCALL CCTK_FNAME (CartSymVI) (int *ierr, const cGH **GH, int *vindex) { - *ierr = CartSymVI (GH, *vindex); + *ierr = CartSymVI (*GH, *vindex); } @@ -257,10 +257,10 @@ int CartSymVN (const cGH *GH, const char *vname) } void CCTK_FCALL CCTK_FNAME (CartSymVN) - (int *ierr, const cGH *GH, ONE_FORTSTRING_ARG) + (int *ierr, const cGH **GH, ONE_FORTSTRING_ARG) { ONE_FORTSTRING_CREATE (vname) - *ierr = CartSymVN (GH, vname); + *ierr = CartSymVN (*GH, vname); free (vname); } -- cgit v1.2.3