aboutsummaryrefslogtreecommitdiff
path: root/src/CopyBoundary.c
diff options
context:
space:
mode:
authortradke <tradke@6a38eb6e-646e-4a02-a296-d141613ad6c4>2001-05-19 18:07:25 +0000
committertradke <tradke@6a38eb6e-646e-4a02-a296-d141613ad6c4>2001-05-19 18:07:25 +0000
commitaa053d5cefbff13267865d01330c49135273904c (patch)
tree449d9d22ddd26d88170fd5c1dbf86ceb1f84b110 /src/CopyBoundary.c
parentb0e4eff508d829f16a5069e17d34323ab2f602e6 (diff)
Fixed compiler warnings with non-const pointers.
This closes PR CactusBase 692. git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/Boundary/trunk@146 6a38eb6e-646e-4a02-a296-d141613ad6c4
Diffstat (limited to 'src/CopyBoundary.c')
-rw-r--r--src/CopyBoundary.c202
1 files changed, 101 insertions, 101 deletions
diff --git a/src/CopyBoundary.c b/src/CopyBoundary.c
index bff9a6d..b18d34b 100644
--- a/src/CopyBoundary.c
+++ b/src/CopyBoundary.c
@@ -34,60 +34,60 @@ CCTK_FILEVERSION(CactusBase_Boundary_CopyBoundary_c)
here only follow the fortran wrapper prototypes */
void CCTK_FCALL CCTK_FNAME (BndCopyDirVI)
(int *ierr,
- cGH *GH,
+ const cGH *GH,
const int *stencil_size,
const int *dir,
const int *vi_to,
const int *vi_from);
void CCTK_FCALL CCTK_FNAME (BndCopyVI)
(int *ierr,
- cGH *GH,
- int stencil[],
+ const cGH *GH,
+ const int *stencil,
const int *vi_to,
const int *vi_from);
void CCTK_FCALL CCTK_FNAME (BndCopyDirGI)
(int *ierr,
- cGH *GH,
+ const cGH *GH,
const int *stencil_size,
const int *dir,
const int *gi_to,
const int *gi_from);
void CCTK_FCALL CCTK_FNAME (BndCopyGI)
(int *ierr,
- cGH *GH,
- int stencil[],
+ const cGH *GH,
+ const int *stencil,
const int *gi_to,
const int *gi_from);
void CCTK_FCALL CCTK_FNAME (BndCopyDirVN)
(int *ierr,
- cGH *GH,
+ const cGH *GH,
const int *stencil_size,
const int *dir,
TWO_FORTSTRINGS_ARGS);
void CCTK_FCALL CCTK_FNAME (BndCopyVN)
(int *ierr,
- cGH *GH,
- int stencil[],
+ const cGH *GH,
+ const int *stencil,
TWO_FORTSTRINGS_ARGS);
void CCTK_FCALL CCTK_FNAME (BndCopyDirGN)
(int *ierr,
- cGH *GH,
+ const cGH *GH,
const int *stencil_size,
const int *dir,
TWO_FORTSTRINGS_ARGS);
void CCTK_FCALL CCTK_FNAME (BndCopyGN)
(int *ierr,
- cGH *GH,
- int stencil[],
+ const cGH *GH,
+ const int *stencil,
TWO_FORTSTRINGS_ARGS);
/********************************************************************
******************** Internal Routines ************************
********************************************************************/
-static int ApplyBndCopy (cGH *GH,
+static int ApplyBndCopy (const cGH *GH,
int stencil_dir,
- int stencil_alldirs[],
+ const int *stencil_alldirs,
int dir,
int first_var_to,
int first_var_from,
@@ -105,7 +105,7 @@ static int ApplyBndCopy (cGH *GH,
@var GH
@vdesc Pointer to CCTK grid hierarchy
- @vtype cGH *
+ @vtype const cGH *
@vio in
@endvar
@var stencil_size
@@ -135,7 +135,7 @@ static int ApplyBndCopy (cGH *GH,
-1 if invalid variable indices are given
@endreturndesc
@@*/
-int BndCopyDirVI (cGH *GH,
+int BndCopyDirVI (const cGH *GH,
int stencil_size,
int dir,
int vi_to,
@@ -162,7 +162,7 @@ int BndCopyDirVI (cGH *GH,
void CCTK_FCALL CCTK_FNAME (BndCopyDirVI)
(int *ierr,
- cGH *GH,
+ const cGH *GH,
const int *stencil_size,
const int *dir,
const int *vi_to,
@@ -183,7 +183,7 @@ void CCTK_FCALL CCTK_FNAME (BndCopyDirVI)
@var GH
@vdesc Pointer to CCTK grid hierarchy
- @vtype cGH *
+ @vtype const cGH *
@vio in
@endvar
@var stencil
@@ -208,8 +208,8 @@ void CCTK_FCALL CCTK_FNAME (BndCopyDirVI)
-1 if invalid variable indices are given
@endreturndesc
@@*/
-int BndCopyVI (cGH *GH,
- int stencil[],
+int BndCopyVI (const cGH *GH,
+ const int *stencil,
int vi_to,
int vi_from)
{
@@ -234,8 +234,8 @@ int BndCopyVI (cGH *GH,
void CCTK_FCALL CCTK_FNAME (BndCopyVI)
(int *ierr,
- cGH *GH,
- int stencil[],
+ const cGH *GH,
+ const int *stencil,
const int *vi_to,
const int *vi_from)
{
@@ -256,7 +256,7 @@ void CCTK_FCALL CCTK_FNAME (BndCopyVI)
@var GH
@vdesc Pointer to CCTK grid hierarchy
- @vtype cGH *
+ @vtype const cGH *
@vio in
@endvar
@var stencil_size
@@ -286,7 +286,7 @@ void CCTK_FCALL CCTK_FNAME (BndCopyVI)
-1 if invalid group indices are given
@endreturndesc
@@*/
-int BndCopyDirGI (cGH *GH,
+int BndCopyDirGI (const cGH *GH,
int stencil_size,
int dir,
int gi_to,
@@ -315,7 +315,7 @@ int BndCopyDirGI (cGH *GH,
void CCTK_FCALL CCTK_FNAME (BndCopyDirGI)
(int *ierr,
- cGH *GH,
+ const cGH *GH,
const int *stencil_size,
const int *dir,
const int *gi_to,
@@ -336,7 +336,7 @@ void CCTK_FCALL CCTK_FNAME (BndCopyDirGI)
@var GH
@vdesc Pointer to CCTK grid hierarchy
- @vtype cGH *
+ @vtype const cGH *
@vio in
@endvar
@var stencil
@@ -361,8 +361,8 @@ void CCTK_FCALL CCTK_FNAME (BndCopyDirGI)
-1 if invalid group indices are given
@endreturndesc
@@*/
-int BndCopyGI (cGH *GH,
- int stencil[],
+int BndCopyGI (const cGH *GH,
+ const int *stencil,
int gi_to,
int gi_from)
{
@@ -389,8 +389,8 @@ int BndCopyGI (cGH *GH,
void CCTK_FCALL CCTK_FNAME (BndCopyGI)
(int *ierr,
- cGH *GH,
- int stencil[],
+ const cGH *GH,
+ const int *stencil,
const int *gi_to,
const int *gi_from)
{
@@ -411,7 +411,7 @@ void CCTK_FCALL CCTK_FNAME (BndCopyGI)
@var GH
@vdesc Pointer to CCTK grid hierarchy
- @vtype cGH *
+ @vtype const cGH *
@vio in
@endvar
@var stencil_size
@@ -424,14 +424,14 @@ void CCTK_FCALL CCTK_FNAME (BndCopyGI)
@vtype int
@vio in
@endvar
- @var gn_to
+ @var gname_to
@vdesc name of group to copy boundaries to
- @vtype char []
+ @vtype const char *
@vio in
@endvar
- @var gn_from
+ @var gname_from
@vdesc name of group to copy boundaries from
- @vtype char []
+ @vtype const char *
@vio in
@endvar
@@ -441,17 +441,17 @@ void CCTK_FCALL CCTK_FNAME (BndCopyGI)
-1 if invalid group names are given
@endreturndesc
@@*/
-int BndCopyDirGN (cGH *GH,
+int BndCopyDirGN (const cGH *GH,
int stencil_size,
int dir,
- char gn_to[],
- char gn_from[])
+ const char *gname_to,
+ const char *gname_from)
{
int gi_to, gi_from, num_groups, retval;
- gi_to = CCTK_GroupIndex (gn_to);
- gi_from = CCTK_GroupIndex (gn_from);
+ gi_to = CCTK_GroupIndex (gname_to);
+ gi_from = CCTK_GroupIndex (gname_from);
num_groups = CCTK_NumGroups ();
if (gi_to >= 0 && gi_to < num_groups && gi_from >= 0 && gi_from < num_groups)
@@ -462,7 +462,7 @@ int BndCopyDirGN (cGH *GH,
{
CCTK_VWarn (2, __LINE__, __FILE__, CCTK_THORNSTRING,
"Invalid group names '%s' and/or '%s' in BndCopyDirGN",
- gn_to, gn_from);
+ gname_to, gname_from);
retval = -1;
}
@@ -471,15 +471,15 @@ int BndCopyDirGN (cGH *GH,
void CCTK_FCALL CCTK_FNAME (BndCopyDirGN)
(int *ierr,
- cGH *GH,
+ const cGH *GH,
const int *stencil_size,
const int *dir,
TWO_FORTSTRINGS_ARGS)
{
- TWO_FORTSTRINGS_CREATE (gn_to, gn_from)
- *ierr = BndCopyDirGN (GH, *stencil_size, *dir, gn_to, gn_from);
- free (gn_to);
- free (gn_from);
+ TWO_FORTSTRINGS_CREATE (gname_to, gname_from)
+ *ierr = BndCopyDirGN (GH, *stencil_size, *dir, gname_to, gname_from);
+ free (gname_to);
+ free (gname_from);
}
@@ -494,7 +494,7 @@ void CCTK_FCALL CCTK_FNAME (BndCopyDirGN)
@var GH
@vdesc Pointer to CCTK grid hierarchy
- @vtype cGH *
+ @vtype const cGH *
@vio in
@endvar
@var stencil
@@ -502,14 +502,14 @@ void CCTK_FCALL CCTK_FNAME (BndCopyDirGN)
@vtype int [ dimension of group ]
@vio in
@endvar
- @var gn_to
+ @var gname_to
@vdesc name of group to copy boundaries to
- @vtype char []
+ @vtype const char *
@vio in
@endvar
- @var gn_from
+ @var gname_from
@vdesc name of group to copy boundaries from
- @vtype char []
+ @vtype const char *
@vio in
@endvar
@@ -519,16 +519,16 @@ void CCTK_FCALL CCTK_FNAME (BndCopyDirGN)
-1 if invalid group names are given
@endreturndesc
@@*/
-int BndCopyGN (cGH *GH,
- int stencil[],
- char gn_to[],
- char gn_from[])
+int BndCopyGN (const cGH *GH,
+ const int *stencil,
+ const char *gname_to,
+ const char *gname_from)
{
int gi_to, gi_from, num_groups, retval;
- gi_to = CCTK_GroupIndex (gn_to);
- gi_from = CCTK_GroupIndex (gn_from);
+ gi_to = CCTK_GroupIndex (gname_to);
+ gi_from = CCTK_GroupIndex (gname_from);
num_groups = CCTK_NumGroups ();
if (gi_to >= 0 && gi_to < num_groups && gi_from >= 0 && gi_from < num_groups)
@@ -539,7 +539,7 @@ int BndCopyGN (cGH *GH,
{
CCTK_VWarn (2, __LINE__, __FILE__, CCTK_THORNSTRING,
"Invalid group names '%s' and/or '%s' in BndCopyGN",
- gn_to, gn_from);
+ gname_to, gname_from);
retval = -1;
}
@@ -548,14 +548,14 @@ int BndCopyGN (cGH *GH,
void CCTK_FCALL CCTK_FNAME (BndCopyGN)
(int *ierr,
- cGH *GH,
- int stencil[],
+ const cGH *GH,
+ const int *stencil,
TWO_FORTSTRINGS_ARGS)
{
- TWO_FORTSTRINGS_CREATE (gn_to, gn_from)
- *ierr = BndCopyGN (GH, stencil, gn_to, gn_from);
- free (gn_to);
- free (gn_from);
+ TWO_FORTSTRINGS_CREATE (gname_to, gname_from)
+ *ierr = BndCopyGN (GH, stencil, gname_to, gname_from);
+ free (gname_to);
+ free (gname_from);
}
@@ -572,7 +572,7 @@ void CCTK_FCALL CCTK_FNAME (BndCopyGN)
@var GH
@vdesc Pointer to CCTK grid hierarchy
- @vtype cGH *
+ @vtype const cGH *
@vio in
@endvar
@var stencil_size
@@ -585,14 +585,14 @@ void CCTK_FCALL CCTK_FNAME (BndCopyGN)
@vtype int
@vio in
@endvar
- @var vn_to
+ @var vname_to
@vdesc name of variable to copy boundaries to
- @vtype char []
+ @vtype const char *
@vio in
@endvar
- @var vn_from
+ @var vname_from
@vdesc name of variable to copy boundaries from
- @vtype char []
+ @vtype const char *
@vio in
@endvar
@@ -602,17 +602,17 @@ void CCTK_FCALL CCTK_FNAME (BndCopyGN)
-1 if invalid variable names are given
@endreturndesc
@@*/
-int BndCopyDirVN (cGH *GH,
+int BndCopyDirVN (const cGH *GH,
int stencil_size,
int dir,
- char vn_to[],
- char vn_from[])
+ const char *vname_to,
+ const char *vname_from)
{
int vi_to, vi_from, num_vars, retval;
- vi_to = CCTK_VarIndex (vn_to);
- vi_from = CCTK_VarIndex (vn_from);
+ vi_to = CCTK_VarIndex (vname_to);
+ vi_from = CCTK_VarIndex (vname_from);
num_vars = CCTK_NumVars ();
if (vi_to >= 0 && vi_to < num_vars && vi_from >= 0 && vi_from < num_vars)
@@ -623,7 +623,7 @@ int BndCopyDirVN (cGH *GH,
{
CCTK_VWarn (2, __LINE__, __FILE__, CCTK_THORNSTRING,
"Invalid variable names '%s' and/or '%s' in BndCopyDirVN",
- vn_to, vn_from);
+ vname_to, vname_from);
retval = -1;
}
@@ -632,15 +632,15 @@ int BndCopyDirVN (cGH *GH,
void CCTK_FCALL CCTK_FNAME (BndCopyDirVN)
(int *ierr,
- cGH *GH,
+ const cGH *GH,
const int *stencil_size,
const int *dir,
TWO_FORTSTRINGS_ARGS)
{
- TWO_FORTSTRINGS_CREATE (vn_to, vn_from)
- *ierr = BndCopyDirVN (GH, *stencil_size, *dir, vn_to, vn_from);
- free (vn_to);
- free (vn_from);
+ TWO_FORTSTRINGS_CREATE (vname_to, vname_from)
+ *ierr = BndCopyDirVN (GH, *stencil_size, *dir, vname_to, vname_from);
+ free (vname_to);
+ free (vname_from);
}
@@ -655,7 +655,7 @@ void CCTK_FCALL CCTK_FNAME (BndCopyDirVN)
@var GH
@vdesc Pointer to CCTK grid hierarchy
- @vtype cGH *
+ @vtype const cGH *
@vio in
@endvar
@var stencil
@@ -663,14 +663,14 @@ void CCTK_FCALL CCTK_FNAME (BndCopyDirVN)
@vtype int [ dimension of variable ]
@vio in
@endvar
- @var vn_to
+ @var vname_to
@vdesc name of variable to copy boundaries to
- @vtype char []
+ @vtype const char *
@vio in
@endvar
- @var vn_from
+ @var vname_from
@vdesc name of variable to copy boundaries from
- @vtype char []
+ @vtype const char *
@vio in
@endvar
@@ -680,16 +680,16 @@ void CCTK_FCALL CCTK_FNAME (BndCopyDirVN)
-1 if invalid variable names are given
@endreturndesc
@@*/
-int BndCopyVN (cGH *GH,
- int stencil[],
- char vn_to[],
- char vn_from[])
+int BndCopyVN (const cGH *GH,
+ const int *stencil,
+ const char *vname_to,
+ const char *vname_from)
{
int vi_to, vi_from, num_vars, retval;
- vi_to = CCTK_VarIndex (vn_to);
- vi_from = CCTK_VarIndex (vn_from);
+ vi_to = CCTK_VarIndex (vname_to);
+ vi_from = CCTK_VarIndex (vname_from);
num_vars = CCTK_NumVars ();
if (vi_to >= 0 && vi_to < num_vars && vi_from >= 0 && vi_from < num_vars)
@@ -700,7 +700,7 @@ int BndCopyVN (cGH *GH,
{
CCTK_VWarn (2, __LINE__, __FILE__, CCTK_THORNSTRING,
"Invalid variable names '%s' and/or '%s' in BndCopyVN",
- vn_to, vn_from);
+ vname_to, vname_from);
retval = -1;
}
@@ -709,14 +709,14 @@ int BndCopyVN (cGH *GH,
void CCTK_FCALL CCTK_FNAME (BndCopyVN)
(int *ierr,
- cGH *GH,
- int stencil[],
+ const cGH *GH,
+ const int *stencil,
TWO_FORTSTRINGS_ARGS)
{
- TWO_FORTSTRINGS_CREATE (vn_to, vn_from)
- *ierr = BndCopyVN (GH, stencil, vn_to, vn_from);
- free (vn_to);
- free (vn_from);
+ TWO_FORTSTRINGS_CREATE (vname_to, vname_from)
+ *ierr = BndCopyVN (GH, stencil, vname_to, vname_from);
+ free (vname_to);
+ free (vname_from);
}
@@ -797,7 +797,7 @@ void CCTK_FCALL CCTK_FNAME (BndCopyVN)
@var GH
@vdesc Pointer to CCTK grid hierarchy
- @vtype cGH *
+ @vtype const cGH *
@vio in
@endvar
@var stencil_dir
@@ -851,9 +851,9 @@ void CCTK_FCALL CCTK_FNAME (BndCopyVN)
-3 if stencil width array parameter is NULL
@endreturndesc
@@*/
-static int ApplyBndCopy (cGH *GH,
+static int ApplyBndCopy (const cGH *GH,
int stencil_dir,
- int stencil_alldirs[],
+ const int *stencil_alldirs,
int dir,
int first_var_to,
int first_var_from,