summaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/Coord.c52
-rw-r--r--src/main/GHExtensions.c2
-rw-r--r--src/main/Groups.c12
-rw-r--r--src/main/GroupsOnGH.c2
-rw-r--r--src/main/Parameters.c78
-rw-r--r--src/main/ScheduleInterface.c114
-rw-r--r--src/main/SetParams.c2
-rw-r--r--src/main/Stagger.c22
-rw-r--r--src/main/WarnLevel.c46
9 files changed, 173 insertions, 157 deletions
diff --git a/src/main/Coord.c b/src/main/Coord.c
index 0d7f9d12..81c6cf9f 100644
--- a/src/main/Coord.c
+++ b/src/main/Coord.c
@@ -203,7 +203,7 @@ void FMODIFIER FORTRAN_NAME(CCTK_CoordRegisterI)(int *handle, int *dir, int *ind
@@*/
int CCTK_CoordRegister(int dir,
- const char *gfname,
+ const char *gfname,
const char *coordname)
{
@@ -227,8 +227,8 @@ int CCTK_CoordRegister(int dir,
}
void FMODIFIER FORTRAN_NAME(CCTK_CoordRegister)(int *handle,
- int *dir,
- TWO_FORTSTRINGS_ARGS)
+ int *dir,
+ TWO_FORTSTRINGS_ARGS)
{
TWO_FORTSTRINGS_CREATE(gf,name)
*handle = CCTK_CoordRegister(*dir, gf, name);
@@ -240,8 +240,8 @@ void FMODIFIER FORTRAN_NAME(CCTK_CoordRegister)(int *handle,
int CCTK_CoordRegisterRange(cGH *GH,
- CCTK_REAL min,
- CCTK_REAL max,
+ CCTK_REAL min,
+ CCTK_REAL max,
const char *coordname)
{
coord_range *newguy;
@@ -279,9 +279,9 @@ int CCTK_CoordRegisterRange(cGH *GH,
}
void FMODIFIER FORTRAN_NAME(CCTK_CoordRegisterRange)(cGH *GH,
- CCTK_REAL *lower,
- CCTK_REAL *upper,
- ONE_FORTSTRING_ARG)
+ CCTK_REAL *lower,
+ CCTK_REAL *upper,
+ ONE_FORTSTRING_ARG)
{
ONE_FORTSTRING_CREATE(name)
CCTK_CoordRegisterRange (GH,*lower,*upper,name);
@@ -389,9 +389,9 @@ void FMODIFIER FORTRAN_NAME(CCTK_CoordDir)(int *dir, ONE_FORTSTRING_ARG)
@@*/
int CCTK_CoordRange(cGH *GH,
- CCTK_REAL *lower,
- CCTK_REAL *upper,
- const char *name)
+ CCTK_REAL *lower,
+ CCTK_REAL *upper,
+ const char *name)
{
coord_range *curr;
@@ -409,7 +409,7 @@ int CCTK_CoordRange(cGH *GH,
#ifdef DEBUG_COORD
printf("Returning range (%f,%f) for %s (from %x)\n",
- *lower,*upper,name,curr);
+ *lower,*upper,name,curr);
#endif
return 0;
@@ -441,7 +441,7 @@ void FMODIFIER FORTRAN_NAME(CCTK_CoordRange)(int *ierr,
@author Gabrielle Allen
@desc
Returns the range of the coordinate on this processor
- For now this is done in a straightforward manner, assuming
+ For now this is done in a straightforward manner, assuming
that a regular grid is used and that the coordinate is a
Grid function.
@enddesc
@@ -461,9 +461,9 @@ void FMODIFIER FORTRAN_NAME(CCTK_CoordRange)(int *ierr,
@@*/
int CCTK_CoordLocalRange(cGH *GH,
- CCTK_REAL *lower,
- CCTK_REAL *upper,
- const char *name)
+ CCTK_REAL *lower,
+ CCTK_REAL *upper,
+ const char *name)
{
CCTK_REAL global_lower;
@@ -480,10 +480,10 @@ int CCTK_CoordLocalRange(cGH *GH,
}
void FMODIFIER FORTRAN_NAME(CCTK_CoordLocalRange)(int *ierr,
- cGH *GH,
- CCTK_REAL *lower,
- CCTK_REAL *upper,
- ONE_FORTSTRING_ARG)
+ cGH *GH,
+ CCTK_REAL *lower,
+ CCTK_REAL *upper,
+ ONE_FORTSTRING_ARG)
{
ONE_FORTSTRING_CREATE(name)
*ierr = CCTK_CoordLocalRange (GH,lower,upper,name);
@@ -570,17 +570,17 @@ void FMODIFIER FORTRAN_NAME(CCTK_RegisterCoord)(int *handle, int *dir, TWO_FORTS
}
int CCTK_RegisterCoordRange(cGH *GH,
- CCTK_REAL min,
- CCTK_REAL max,
+ CCTK_REAL min,
+ CCTK_REAL max,
const char *coordname)
{
return CCTK_CoordRegisterRange(GH,min,max,coordname);
}
void FMODIFIER FORTRAN_NAME(CCTK_RegisterCoordRange)(cGH *GH,
- CCTK_REAL *lower,
- CCTK_REAL *upper,
- ONE_FORTSTRING_ARG)
+ CCTK_REAL *lower,
+ CCTK_REAL *upper,
+ ONE_FORTSTRING_ARG)
{
ONE_FORTSTRING_CREATE(name)
CCTK_RegisterCoordRange (GH,*lower,*upper,name);
@@ -588,7 +588,7 @@ void FMODIFIER FORTRAN_NAME(CCTK_RegisterCoordRange)(cGH *GH,
}
int CCTK_RegisterCoord(int dir,
- const char *gfname,
+ const char *gfname,
const char *coordname)
{
return CCTK_CoordRegister(dir,gfname,coordname);
diff --git a/src/main/GHExtensions.c b/src/main/GHExtensions.c
index f0e51f8d..f66b2fa4 100644
--- a/src/main/GHExtensions.c
+++ b/src/main/GHExtensions.c
@@ -280,7 +280,7 @@ int CCTKi_SetupGHExtensions(tFleshConfig *config,
convergence_level,
GH);
#ifdef DEBUG
- printf("CCTKi_SetupGHExtensions: Set up extension for handle %d\n",handle);
+ printf("CCTKi_SetupGHExtensions: Set up extension for handle %d\n",handle);
#endif
}
return_code = 0;
diff --git a/src/main/Groups.c b/src/main/Groups.c
index 60a9de96..ae93f22f 100644
--- a/src/main/Groups.c
+++ b/src/main/Groups.c
@@ -89,7 +89,7 @@ int _cctk_one = 1;
static cGroupDefinition *CCTKi_SetupGroup(const char *implementation,
const char *name,
- int staggercode,
+ int staggercode,
int n_variables);
static CCTK_INT **CCTKi_ExtractSize(int dimension, const char *thorn, const char *sizestring);
@@ -196,9 +196,9 @@ void CCTKi_PrintGroupInfo(void) {
for(group_num = 0; group_num < n_groups; group_num++) {
printf("GROUP INFO: GrpNo./imp_name/name/stag %d >%s< >%s< %d\n",
group_num,
- groups[group_num].implementation,
- groups[group_num].name,
- groups[group_num].staggertype);
+ groups[group_num].implementation,
+ groups[group_num].name,
+ groups[group_num].staggertype);
}
}
@@ -369,7 +369,7 @@ int CCTKi_CreateGroup
@@*/
static cGroupDefinition *CCTKi_SetupGroup(const char *implementation,
const char *name,
- int staggercode,
+ int staggercode,
int n_variables)
{
int *temp_int;
@@ -1058,7 +1058,7 @@ int CCTK_GroupScopeNumber(const char *type)
}
void FMODIFIER FORTRAN_NAME(CCTK_GroupScopeNumber)(int *number,
- ONE_FORTSTRING_ARG)
+ ONE_FORTSTRING_ARG)
{
ONE_FORTSTRING_CREATE(type)
*number = CCTK_GroupScopeNumber(type);
diff --git a/src/main/GroupsOnGH.c b/src/main/GroupsOnGH.c
index b4177a68..d638f6cd 100644
--- a/src/main/GroupsOnGH.c
+++ b/src/main/GroupsOnGH.c
@@ -134,7 +134,7 @@ void *CCTK_VarDataPtrI(cGH *GH, int timelevel, int vari)
{
if (vari < 0)
CCTK_Warn(1,__LINE__,__FILE__,"Cactus",
- "WARNING: calling CCTK_VarDataPtrI with negative index");
+ "WARNING: calling CCTK_VarDataPtrI with negative index");
return GH->data[vari][timelevel];
}
diff --git a/src/main/Parameters.c b/src/main/Parameters.c
index 00e1ac46..9980d8de 100644
--- a/src/main/Parameters.c
+++ b/src/main/Parameters.c
@@ -81,26 +81,26 @@ typedef struct PARAMTREENODE
} t_paramtreenode;
static t_param *ParameterFind(const char *name,
- const char *thorn,
- int scope);
+ const char *thorn,
+ int scope);
static t_param *ParameterNew(const char *thorn,
- const char *name,
- const char *type,
- const char *scope,
- int steerable,
- const char *description,
- const char *defval,
- void *data);
+ const char *name,
+ const char *type,
+ const char *scope,
+ int steerable,
+ const char *description,
+ const char *defval,
+ void *data);
static int ParameterCheck(const char *thorn,
- const char *name,
- const char *type,
- const char *scope,
- int steerable,
- const char *description,
- const char *defval,
- void *data);
+ const char *name,
+ const char *type,
+ const char *scope,
+ int steerable,
+ const char *description,
+ const char *defval,
+ void *data);
static void *ParameterGetSimple (t_param *param,
int *type);
@@ -214,15 +214,15 @@ static t_sktree *paramtree=NULL;
@@*/
int CCTKi_ParameterCreate(const char *name,
- const char *thorn,
- const char *type,
- const char *scope,
- int steerable,
- const char *description,
- const char *defval,
- void *data,
- int n_ranges,
- ...)
+ const char *thorn,
+ const char *type,
+ const char *scope,
+ int steerable,
+ const char *description,
+ const char *defval,
+ void *data,
+ int n_ranges,
+ ...)
{
int retval;
int iscope;
@@ -324,10 +324,10 @@ int CCTKi_ParameterCreate(const char *name,
@@*/
int CCTKi_ParameterAddRange(const char *implementation,
- const char *name,
- const char *range_origin,
- const char *range,
- const char *range_description)
+ const char *name,
+ const char *range_origin,
+ const char *range,
+ const char *range_description)
{
int retval;
t_param *param;
@@ -414,8 +414,8 @@ int CCTKi_ParameterAddRange(const char *implementation,
@@*/
int CCTK_ParameterSet(const char *name,
- const char *thorn,
- const char *value)
+ const char *thorn,
+ const char *value)
{
int retval;
t_param *param;
@@ -1489,7 +1489,7 @@ static int ParameterSetKeyword(t_param *param, const char *value)
char *msg;
msg = (char *)malloc( 200*sizeof(char) );
sprintf(msg,"Unable to set keyword %s::%s - %s not in any active range",
- param->props->thorn,
+ param->props->thorn,
param->props->name,
value);
CCTK_Warn(0,__LINE__,__FILE__,"Cactus",msg);
@@ -1532,7 +1532,7 @@ static int ParameterSetString(t_param *param, const char *value)
char *msg;
msg = (char *)malloc( 200*sizeof(char) );
sprintf(msg,"Unable to set string %s::%s - %s not in any active range",
- param->props->thorn,
+ param->props->thorn,
param->props->name,
value);
CCTK_Warn(0,__LINE__,__FILE__,"Cactus",msg);
@@ -1578,7 +1578,7 @@ static int ParameterSetSentence(t_param *param, const char *value)
char *msg;
msg = (char *)malloc( 200*sizeof(char) );
sprintf(msg,"Unable to set sentance %s::%s - %s not in any active range",
- param->props->thorn,
+ param->props->thorn,
param->props->name,
value);
CCTK_Warn(0,__LINE__,__FILE__,"Cactus",msg);
@@ -1627,7 +1627,7 @@ static int ParameterSetInteger(t_param *param, const char *value)
char *msg;
msg = (char *)malloc( 200*sizeof(char) );
sprintf(msg,"Unable to set integer %s::%s - %s not in any active range",
- param->props->thorn,
+ param->props->thorn,
param->props->name,
value);
CCTK_Warn(0,__LINE__,__FILE__,"Cactus",msg);
@@ -1686,7 +1686,7 @@ static int ParameterSetReal(t_param *param, const char *value)
char *msg;
msg = (char *)malloc( 200*sizeof(char) );
sprintf(msg,"Unable to set real %s::%s - %s not in any active range",
- param->props->thorn,
+ param->props->thorn,
param->props->name,
value);
CCTK_Warn(0,__LINE__,__FILE__,"Cactus",msg);
@@ -1709,7 +1709,7 @@ static int ParameterSetBoolean(t_param *param, const char *value)
char *msg;
msg = (char *)malloc( 200*sizeof(char) );
sprintf(msg,"Unable to set boolean %s::%s - %s not recognised",
- param->props->thorn,
+ param->props->thorn,
param->props->name,
value);
CCTK_Warn(0,__LINE__,__FILE__,"Cactus",msg);
@@ -1732,10 +1732,10 @@ struct
int main(void)
{
CCTKi_ParameterCreate("a", "thorn1", "imp1", "int", "global", 0,
- "The a param", "2", &(params.a));
+ "The a param", "2", &(params.a));
CCTKi_ParameterCreate("foo", "thorn2", "imp2", "keyword", "private", 0,
- "The foo param", "bingo", &(params.foo));
+ "The foo param", "bingo", &(params.foo));
printf("Testing thorn,null\n");
diff --git a/src/main/ScheduleInterface.c b/src/main/ScheduleInterface.c
index ba16e87d..2c6f9e69 100644
--- a/src/main/ScheduleInterface.c
+++ b/src/main/ScheduleInterface.c
@@ -1,4 +1,4 @@
- /*@@
+/*@@
@file ScheduleInterface.c
@date Thu Sep 16 14:06:21 1999
@author Tom Goodale
@@ -213,7 +213,7 @@ int CCTK_CallFunction(void *function,
return 0;
}
- /*@@
+/*@@
@routine CCTKi_ScheduleFunction
@date Thu Sep 16 18:19:01 1999
@author Tom Goodale
@@ -228,20 +228,20 @@ int CCTK_CallFunction(void *function,
@@*/
int CCTKi_ScheduleFunction(void *function,
- const char *name,
- const char *thorn,
- const char *implementation,
- const char *description,
- const char *where,
- const char *language,
- int n_mem_groups,
- int n_comm_groups,
- int n_trigger_groups,
- int n_before,
- int n_after,
- int n_while,
- ...
- )
+ const char *name,
+ const char *thorn,
+ const char *implementation,
+ const char *description,
+ const char *where,
+ const char *language,
+ int n_mem_groups,
+ int n_comm_groups,
+ int n_trigger_groups,
+ int n_before,
+ int n_after,
+ int n_while,
+ ...
+ )
{
int retcode;
t_attribute *attribute;
@@ -276,7 +276,7 @@ int CCTKi_ScheduleFunction(void *function,
return retcode;
}
- /*@@
+/*@@
@routine CCTKi_ScheduleGroup
@date Thu Sep 16 18:19:18 1999
@author Tom Goodale
@@ -291,18 +291,18 @@ int CCTKi_ScheduleFunction(void *function,
@@*/
int CCTKi_ScheduleGroup(const char *name,
- const char *thorn,
- const char *implementation,
- const char *description,
- const char *where,
- int n_mem_groups,
- int n_comm_groups,
- int n_trigger_groups,
- int n_before,
- int n_after,
- int n_while,
- ...
- )
+ const char *thorn,
+ const char *implementation,
+ const char *description,
+ const char *where,
+ int n_mem_groups,
+ int n_comm_groups,
+ int n_trigger_groups,
+ int n_before,
+ int n_after,
+ int n_while,
+ ...
+ )
{
int retcode;
t_attribute *attribute;
@@ -337,7 +337,7 @@ int CCTKi_ScheduleGroup(const char *name,
}
- /*@@
+/*@@
@routine CCTKi_ScheduleGroupStorage
@date Fri Sep 17 18:55:59 1999
@author Tom Goodale
@@ -378,7 +378,7 @@ int CCTKi_ScheduleGroupStorage(const char *group)
}
- /*@@
+/*@@
@routine CCTKi_ScheduleGroupComm
@date Fri Sep 17 18:55:59 1999
@author Tom Goodale
@@ -419,7 +419,7 @@ int CCTKi_ScheduleGroupComm(const char *group)
}
- /*@@
+/*@@
@routine CCTKi_ScheduleTraverse
@date Fri Sep 17 21:52:44 1999
@author Tom Goodale
@@ -435,8 +435,8 @@ int CCTKi_ScheduleGroupComm(const char *group)
@@*/
int CCTKi_ScheduleTraverse(const char *where,
- void *GH,
- int (*CallFunction)(void *, cFunctionData *, void *))
+ void *GH,
+ int (*CallFunction)(void *, cFunctionData *, void *))
{
t_sched_data data;
@@ -479,12 +479,12 @@ int CCTKi_ScheduleTraverse(const char *where,
(int (*)(int, char **, void *, void *))CCTKi_ScheduleCallWhile,
(int (*)(void *, void *, void *)) calling_function,
(void *)&data
- );
+ );
return 0;
}
- /*@@
+/*@@
@routine CCTKi_ScheduleGHInit
@date Fri Sep 17 21:25:13 1999
@author Tom Goodale
@@ -515,7 +515,7 @@ int CCTKi_ScheduleGHInit(void *GH)
return 0;
}
- /*@@
+/*@@
@routine CCTK_SchedulePrint
@date Fri Sep 17 21:52:44 1999
@author Tom Goodale
@@ -605,7 +605,7 @@ int CCTK_SchedulePrintTimes(const char *where)
return 0;
}
- /*@@
+/*@@
@routine CCTK_TranslateLanguage
@date Thu Sep 16 18:18:31 1999
@author Tom Goodale
@@ -730,7 +730,7 @@ static t_attribute *CreateAttribute(const char *description,
return this;
}
- /*@@
+/*@@
@routine CreateModifier
@date Thu Sep 16 18:23:13 1999
@author Tom Goodale
@@ -758,7 +758,7 @@ static t_sched_modifier *CreateModifiers(int n_before,
return modifier;
}
- /*@@
+/*@@
@routine CreateGroupIndexList
@date Fri Sep 17 21:51:51 1999
@author Tom Goodale
@@ -788,7 +788,7 @@ static int CreateGroupIndexList(int n_items, int *array, va_list *ap)
return 0;
}
- /*@@
+/*@@
@routine CreateTypedModifier
@date Fri Sep 17 21:50:59 1999
@author Tom Goodale
@@ -821,7 +821,7 @@ static t_sched_modifier *CreateTypedModifier(t_sched_modifier *modifier,
return modifier;
}
- /*@@
+/*@@
@routine TranslateFunctionType
@date Mon Jan 24 16:52:06 2000
@author Tom Goodale
@@ -855,7 +855,7 @@ static cFunctionType TranslateFunctionType(const char *where)
return retcode;
}
- /*@@
+/*@@
@routine SchedulePrint
@date Sun Sep 19 13:31:23 1999
@author Tom Goodale
@@ -889,7 +889,7 @@ static int SchedulePrint(const char *where)
(int (*)(int, char **, void *, void *))CCTKi_SchedulePrintWhile,
(int (*)(void *, void *, void *)) CCTKi_SchedulePrintFunction,
(void *)&data
- );
+ );
}
else
{
@@ -899,7 +899,7 @@ static int SchedulePrint(const char *where)
return retcode;
}
- /*@@
+/*@@
@routine SchedulePrintTimes
@date Fri Oct 22 12:35:06 1999
@author Tom Goodale
@@ -927,7 +927,7 @@ static int SchedulePrintTimes(const char *where, t_sched_data *data)
(int (*)(int, char **, void *, void *))CCTKi_SchedulePrintTimesWhile,
(int (*)(void *, void *, void *)) CCTKi_SchedulePrintTimesFunction,
(void *)data
- );
+ );
}
else
{
@@ -963,7 +963,7 @@ static int CCTKi_SchedulePrintEntry(t_attribute *attribute,
return 1;
}
- /*@@
+/*@@
@routine CCTKi_SchedulePrintExit
@date Sun Sep 19 13:31:23 1999
@author Tom Goodale
@@ -984,7 +984,7 @@ static int CCTKi_SchedulePrintExit(t_attribute *attribute,
return 1;
}
- /*@@
+/*@@
@routine CCTKi_SchedulePrintWhile
@date Sun Sep 19 13:31:23 1999
@author Tom Goodale
@@ -1035,7 +1035,7 @@ static int CCTKi_SchedulePrintWhile(int n_whiles,
return data->whiling;
}
- /*@@
+/*@@
@routine CCTKi_SchedulePrintFunction
@date Sun Sep 19 13:36:25 1999
@author Tom Goodale
@@ -1137,7 +1137,7 @@ static int CCTKi_ScheduleCallEntry(t_attribute *attribute,
return go;
}
- /*@@
+/*@@
@routine CCTKi_ScheduleCallExit
@date Sun Sep 19 13:25:24 1999
@author Tom Goodale
@@ -1192,7 +1192,7 @@ static int CCTKi_ScheduleCallExit(t_attribute *attribute,
return 1;
}
- /*@@
+/*@@
@routine CCTKi_ScheduleCallWhile
@date Sun Sep 19 13:27:53 1999
@author Tom Goodale
@@ -1225,7 +1225,7 @@ static int CCTKi_ScheduleCallWhile(int n_whiles,
return retcode;
}
- /*@@
+/*@@
@routine CCTKi_ScheduleCallFunction
@date Sun Sep 19 13:29:14 1999
@author Tom Goodale
@@ -1335,7 +1335,7 @@ static int CCTKi_SchedulePrintTimesEntry(t_attribute *attribute,
return 1;
}
- /*@@
+/*@@
@routine CCTKi_SchedulePrintTimesExit
@date Fri Oct 22 12:26:26 1999
@author Tom Goodale
@@ -1356,7 +1356,7 @@ static int CCTKi_SchedulePrintTimesExit(t_attribute *attribute,
return 1;
}
- /*@@
+/*@@
@routine CCTKi_SchedulePrintTimesWhile
@date Fri Oct 22 12:26:26 1999
@author Tom Goodale
@@ -1409,7 +1409,7 @@ static int CCTKi_SchedulePrintTimesWhile(int n_whiles,
return data->whiling;
}
- /*@@
+/*@@
@routine CCTKi_SchedulePrintTimesFunction
@date Fri Oct 22 12:26:26 1999
@author Tom Goodale
@@ -1472,8 +1472,8 @@ static void CCTKi_SchedulePrintTimerInfo(t_TimerInfo *info)
printf("\t%ld", info->vals[i].val.l); break;
case val_double:
printf("\t%g", info->vals[i].val.d); break;
- default:
- printf("Unknown value type at line %d of %s\n", __LINE__, __FILE__);
+ default:
+ printf("Unknown value type at line %d of %s\n", __LINE__, __FILE__);
}
}
diff --git a/src/main/SetParams.c b/src/main/SetParams.c
index 29276ce2..a0c92eda 100644
--- a/src/main/SetParams.c
+++ b/src/main/SetParams.c
@@ -84,7 +84,7 @@ int CCTKi_SetParameter(const char *parameter, const char *value)
if(n_errors)
{
CCTK_Warn(0,__LINE__,__FILE__,"Cactus",
- "Errors while activating thorns\n");
+ "Errors while activating thorns\n");
}
}
else
diff --git a/src/main/Stagger.c b/src/main/Stagger.c
index 68286e3f..01bc5dc0 100644
--- a/src/main/Stagger.c
+++ b/src/main/Stagger.c
@@ -226,17 +226,17 @@ int CCTK_DirStaggerCodeName(int dir, const char *stype) {
}
switch (hs[dir])
- {
+ {
case 'M': scode = 0; break;
case 'C': scode = 1; break;
case 'P': scode = 2; break;
default:
- info = (char*)malloc (256*sizeof(char));
- sprintf(info,"Unknown stagger type: >%s< \n", hs);
- CCTK_Warn(1,__LINE__,__FILE__,"Cactus",info);
- free(info);
- return(-1);
- }
+ info = (char*)malloc (256*sizeof(char));
+ sprintf(info,"Unknown stagger type: >%s< \n", hs);
+ CCTK_Warn(1,__LINE__,__FILE__,"Cactus",info);
+ free(info);
+ return(-1);
+ }
return(scode);
}
@@ -244,8 +244,10 @@ void FMODIFIER FORTRAN_NAME(CCTK_DirStaggerCodeName)
(int *ierr, int *dsc, int *dir, ONE_FORTSTRING_ARG)
{
ONE_FORTSTRING_CREATE(sname);
+
*ierr= 0;
*dsc = CCTK_DirStaggerCodeName((*dir)-1,sname);
+
if ((*dsc)>=0)
{
(*dsc)++;
@@ -269,9 +271,9 @@ void FMODIFIER FORTRAN_NAME(CCTK_DirStaggerCodeName)
@@*/
int CCTKi_ParseStaggerString(int dim,
- const char *imp,
- const char *gname,
- const char *stype)
+ const char *imp,
+ const char *gname,
+ const char *stype)
{
int i,m;
int base = 1;
diff --git a/src/main/WarnLevel.c b/src/main/WarnLevel.c
index 7b21df46..1160963f 100644
--- a/src/main/WarnLevel.c
+++ b/src/main/WarnLevel.c
@@ -1,4 +1,4 @@
- /*@@
+/*@@
@file WarnLevel.c
@date Wed Feb 17 00:30:09 1999
@author Tom Goodale
@@ -101,7 +101,7 @@ int CCTKi_SetWarnLevel(int level)
return retval;
}
- /*@@
+/*@@
@routine CCTK_Warn
@date Wed Feb 17 00:45:07 1999
@author Tom Goodale
@@ -125,9 +125,9 @@ int CCTK_Warn(int level, int line, const char *file, const char *thorn, const ch
if (cctk_full_warnings)
{
fprintf(stderr, "WARNING level %d in thorn %s \n (line %d of %s): \n",
- level, thorn, line, file);
+ level, thorn, line, file);
fprintf(stderr, " -> %s\n",message);
- fflush(stderr);
+ fflush(stderr);
}
else
{
@@ -150,6 +150,7 @@ int CCTK_Warn(int level, int line, const char *file, const char *thorn, const ch
void FMODIFIER FORTRAN_NAME(CCTK_Warn)(int *level, int *line, THREE_FORTSTRINGS_ARGS)
{
THREE_FORTSTRINGS_CREATE(file,thorn,message)
+
CCTK_Warn(*level,*line,file,thorn,message);
free(thorn);
free(message);
@@ -175,8 +176,8 @@ void FMODIFIER FORTRAN_NAME(CCTK_Warn)(int *level, int *line, THREE_FORTSTRINGS_
@@*/
void CCTKi_ExpectError(int in, int err, int warnonerr, int line,
- const char *file, const char *thorn,
- const char *message)
+ const char *file, const char *thorn,
+ const char *message)
{
if (in==err) CCTK_Warn(warnonerr, line, file, thorn, message);
}
@@ -186,12 +187,15 @@ void FMODIFIER FORTRAN_NAME(CCTKi_ExpectError)
(int *in, int *err, int *warnonerr, int *line, THREE_FORTSTRINGS_ARGS)
{
THREE_FORTSTRINGS_CREATE(file,thorn,message)
+
CCTKi_ExpectError(*in, *err, *warnonerr, *line,
- file,thorn,message);
+ file,thorn,message);
free(file);
free(thorn);
free(message);
}
+
+
/*@@
@routine CCTKi_ExpectOK
@date Thanksgiving 99
@@ -210,8 +214,8 @@ void FMODIFIER FORTRAN_NAME(CCTKi_ExpectError)
@@*/
void CCTKi_ExpectOK(int in, int ok, int warnonerr, int line,
- const char *file, const char *thorn,
- const char *message)
+ const char *file, const char *thorn,
+ const char *message)
{
if (in!=ok) CCTK_Warn(warnonerr, line, file, thorn, message);
}
@@ -220,8 +224,10 @@ void FMODIFIER FORTRAN_NAME(CCTKi_ExpectOK)
(int *in, int *ok, int *warnonerr, int *line, THREE_FORTSTRINGS_ARGS)
{
THREE_FORTSTRINGS_CREATE(file,thorn,message)
+
CCTKi_ExpectOK(*in, *ok, *warnonerr, *line,
- file,thorn,message);
+ file,thorn,message);
+
free(file);
free(thorn);
free(message);
@@ -257,7 +263,7 @@ int CCTK_VWarn(int level, int line, const char *file, const char *thorn, const c
if (cctk_full_warnings)
{
fprintf(stderr, "WARNING level %d in thorn %s \n (line %d of %s): \n",
- level, thorn, line, file);
+ level, thorn, line, file);
fprintf(stderr, " -> ");
vfprintf(stderr, format, ap);
fprintf(stderr, "\n");
@@ -324,6 +330,7 @@ int CCTK_ParamWarn(const char *thorn, const char *message)
void FMODIFIER FORTRAN_NAME(CCTK_ParamWarn)(TWO_FORTSTRINGS_ARGS)
{
TWO_FORTSTRINGS_CREATE(thorn,message)
+
CCTK_ParamWarn(thorn,message);
free(thorn);
free(message);
@@ -331,7 +338,7 @@ void FMODIFIER FORTRAN_NAME(CCTK_ParamWarn)(TWO_FORTSTRINGS_ARGS)
- /*@@
+/*@@
@routine CCTK_Info
@date Tue Mar 30 1999
@author Gabrielle Allen
@@ -355,13 +362,15 @@ int CCTK_Info(const char *thorn, const char *message)
void FMODIFIER FORTRAN_NAME(CCTK_Info)(TWO_FORTSTRINGS_ARGS)
{
TWO_FORTSTRINGS_CREATE(thorn,message)
+
+
CCTK_Info(thorn,message);
free(thorn);
free(message);
}
- /*@@
+/*@@
@routine CCTKi_SetErrorLevel
@date Wed Feb 17 00:48:02 1999
@author Tom Goodale
@@ -416,7 +425,7 @@ int CCTKi_SetErrorLevel(int level)
return retval;
}
- /*@@
+/*@@
@routine CCTKi_FinaliseParamWarn
@date June 1999
@author Gabrielle Allen
@@ -447,9 +456,13 @@ void CCTKi_FinaliseParamWarn(void)
else
{
if (param_errors==1)
+ {
fprintf(stderr, "\nThere was 1 parameter warning\n\n");
+ }
else
+ {
fprintf(stderr, "\nThere were %d parameter warnings\n\n",param_errors);
+ }
fflush(stderr);
}
@@ -459,7 +472,7 @@ void CCTKi_FinaliseParamWarn(void)
}
- /*@@
+/*@@
@routine CCTK_MessageFormat
@date Mon Jul 26 19:51:26 1999
@author Tom Goodale
@@ -523,7 +536,7 @@ void FMODIFIER FORTRAN_NAME(CCTK_VInfo)(int format_number, ...)
}
- /*@@
+/*@@
@routine CCTK_NotYetImplemented
@routine CCTKi_NotYetImplemented
@date July 1999
@@ -552,6 +565,7 @@ void CCTKi_NotYetImplemented(const char *message)
void FMODIFIER FORTRAN_NAME(CCTKi_NotYetImplemented)(ONE_FORTSTRING_ARG)
{
ONE_FORTSTRING_CREATE(message)
+
CCTKi_NotYetImplemented(message);
free(message);
}