diff options
author | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-02-24 14:26:48 +0000 |
---|---|---|
committer | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-02-24 14:26:48 +0000 |
commit | 5aeda156209ba70b003a0167a5e811649c00fc72 (patch) | |
tree | a0bd9c068cb6667ab3d14c5d996169062e4bb6ec /src/main/CommandLine.c | |
parent | f59c082b5fd380dfc27c47ba63f0d368e9a4ac05 (diff) |
Adding command line argument for level of parameter checking
-parameter-level=strict|normal|relaxed
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2045 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/main/CommandLine.c')
-rw-r--r-- | src/main/CommandLine.c | 53 |
1 files changed, 52 insertions, 1 deletions
diff --git a/src/main/CommandLine.c b/src/main/CommandLine.c index 16b1a125..24118800 100644 --- a/src/main/CommandLine.c +++ b/src/main/CommandLine.c @@ -345,6 +345,55 @@ void CCTKi_CommandLineErrorLevel(const char *argument) } /*@@ + @routine CCTKi_CommandLineParameterLevel + @date Wed Feb 21 2001 + @author Gabrielle Allen + @desc + Sets the parameter checking level from a command line argument. + @enddesc + @calls CCTKi_SetParameterLevel + @calledby + @history + + @endhistory + @var argument + @vdesc option argument + @vtype const char * + @vio in + @vcomment + + @endvar + +@@*/ +void CCTKi_CommandLineParameterLevel(const char *argument) +{ + int parameterlevel; + + if (CCTK_Equals(argument,"strict")) + { + parameterlevel = CCTK_PARAMETER_STRICT; + } + else if (CCTK_Equals(argument,"normal")) + { + parameterlevel = CCTK_PARAMETER_NORMAL; + } + else if (CCTK_Equals(argument,"relaxed")) + { + parameterlevel = CCTK_PARAMETER_RELAXED; + } + else + { + CCTK_VWarn(1,__LINE__,__FILE__,"Cactus","CCTKi_CommandLineParameterLevel:" + " Parameter checking level %s not recognized, defaulting to " + "normal",argument); + parameterlevel = CCTK_PARAMETER_NORMAL; + } + + CCTKi_SetParameterLevel(parameterlevel); + +} + + /*@@ @routine CCTKi_CommandLineRedirectStdout @date Fri Jul 23 11:32:46 1999 @author Tom Goodale @@ -449,7 +498,7 @@ void CCTKi_CommandLineHelp(void) CCTK_CommandLine(&argv); printf("%s, compiled on %s at %s\n", argv[0], CCTK_CompileDate(), CCTK_CompileTime()); - printf("Usage: %s [-h] [-O] [-o paramname] [-x [nprocs]] [-W n] [-E n] [-r] [-T] [-t name] [-v] <parameter_file_name>\n", argv[0]); + printf("Usage: %s [-h] [-O] [-o paramname] [-x [nprocs]] [-W n] [-E n] [-r] [-T] [-t name] [-parameter-level <level>] [-v] <parameter_file_name>\n", argv[0]); printf("\n"); printf("Valid options:\n"); @@ -464,6 +513,8 @@ void CCTKi_CommandLineHelp(void) printf("-r, -redirect-stdout : Redirects standard output to files.\n"); printf("-T, -list-thorns : Lists the compiled-in thorns.\n"); printf("-t, -test-thorn-compiled <name> : Tests for the presence of thorn <name>.\n"); + printf(" -parameter-level <level> : Sets the amount of parameter checking, \n" + " level can be script, normal, relaxed.\n"); printf("-v, -version : Prints the version.\n"); printf("-i, -ignore-next : Ignores the next argument.\n"); } |