summaryrefslogtreecommitdiff
path: root/src/main/Parameters.c
diff options
context:
space:
mode:
authorschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2005-09-26 03:16:42 +0000
committerschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2005-09-26 03:16:42 +0000
commitf229ce08ca3956fd7ecbe2b9a83067eeb55d0afb (patch)
tree15ee1e1d2c05708018c35b9f52107c6a7950cfd8 /src/main/Parameters.c
parent6088cd914c9e75fa2a2e88a463528594c50d710d (diff)
Print run time warnings while setting parameters with CCTK_WARN
instead of with fprintf (stderr, ...). Correct critical error in looking at the values of cctk_full_warnings, highlight_warning_messages, and cctk_strong_param_check. Handle the empty regular expression specially in CCTK_RegexMatch, since regcomp may treat it as illegal expression. In Cactus, an empty regular expression matches everything. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4150 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/main/Parameters.c')
-rw-r--r--src/main/Parameters.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/main/Parameters.c b/src/main/Parameters.c
index d662f92e..4b78264f 100644
--- a/src/main/Parameters.c
+++ b/src/main/Parameters.c
@@ -1978,8 +1978,9 @@ static int ParameterSetKeyword (t_param *param, const char *value)
if (*(char **) param->data == NULL)
{
- fprintf (stderr, "Since this was the default value, "
- "setting anyway - please fix!\n");
+ CCTK_VWarn (1, __LINE__, __FILE__, "Cactus",
+ "Since this was the default value, "
+ "setting anyway - please fix!");
CCTK_SetString (param->data, value);
}
}
@@ -2021,8 +2022,9 @@ static int ParameterSetString (t_param *param, const char *value)
if (*(char **) param->data == NULL)
{
- fprintf (stderr, "Since this was the default value, "
- "setting anyway - please fix!\n");
+ CCTK_VWarn (1, __LINE__, __FILE__, "Cactus",
+ "Since this was the default value, "
+ "setting anyway - please fix!");
CCTK_SetString (param->data, value);
}
}
@@ -2064,8 +2066,9 @@ static int ParameterSetSentence (t_param *param, const char *value)
if (*(char **) param->data == NULL)
{
- fprintf (stderr, "Since this was the default value, "
- "setting anyway - please fix!\n");
+ CCTK_VWarn (1, __LINE__, __FILE__, "Cactus",
+ "Since this was the default value, "
+ "setting anyway - please fix!");
CCTK_SetString (param->data, value);
}
}