summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/include/CommandLine.h2
-rw-r--r--src/include/cctk_ActiveThorns.h9
-rw-r--r--src/include/cctk_ParameterFunctions.h49
-rw-r--r--src/main/ActiveThorns.c184
-rw-r--r--src/main/CommandLine.c156
-rw-r--r--src/main/InitialiseDataStructures.c2
-rw-r--r--src/main/Parameters.c89
-rw-r--r--src/main/ProcessCommandLine.c20
-rw-r--r--src/main/Subsystems.c1
9 files changed, 379 insertions, 133 deletions
diff --git a/src/include/CommandLine.h b/src/include/CommandLine.h
index 8c873d90..0c679a89 100644
--- a/src/include/CommandLine.h
+++ b/src/include/CommandLine.h
@@ -15,7 +15,7 @@ extern "C" {
#endif
void CCTKi_CommandLineTestThornCompiled(const char *optarg);
-void CCTKi_CommandLineDescribeAllParameters(void);
+void CCTKi_CommandLineDescribeAllParameters(const char *optarg);
void CCTKi_CommandLineDescribeParameter(const char *optarg);
void CCTKi_CommandLineTestParameters(const char *optarg);
void CCTKi_CommandLineWarningLevel(const char *optarg);
diff --git a/src/include/cctk_ActiveThorns.h b/src/include/cctk_ActiveThorns.h
index 128efbe7..9b16d27a 100644
--- a/src/include/cctk_ActiveThorns.h
+++ b/src/include/cctk_ActiveThorns.h
@@ -21,6 +21,7 @@ extern "C" {
int CCTKi_RegisterThorn(const char *name, const char *imp);
int CCTKi_ActivateThorn(const char *name);
int CCTK_IsThornActive(const char *name);
+int CCTK_IsThornCompiled(const char *name);
int CCTK_IsImplementationActive(const char *name);
int CCTKi_ListThorns(FILE *file, const char *format, int active);
int CCTKi_ListImplementations(FILE *file, const char *format, int active);
@@ -30,8 +31,12 @@ const char *CCTK_ActivatingThorn(const char *imp);
t_sktree *CCTK_ImpThornList (const char *imp);
/* public routines to get information about thorns and imps */
-int CCTK_ImpList (int active, char ***list, int *n_implementations);
-int CCTK_ThornList (const char* imp, char ***list, int *n_thorns);
+int CCTK_ImplementationList (int active, char ***list, int *n_implementations);
+int CCTK_ImplementationThornList (const char *imp, char ***list, int *n_thorns);
+int CCTK_ThornList(int active, char ***list, int *n_items);
+
+const char *CCTK_ThornImplementation(const char *name);
+const char *CCTK_ImplementationThorn(const char *name);
#ifdef __cplusplus
diff --git a/src/include/cctk_ParameterFunctions.h b/src/include/cctk_ParameterFunctions.h
index 0babf36d..ce71d4ae 100644
--- a/src/include/cctk_ParameterFunctions.h
+++ b/src/include/cctk_ParameterFunctions.h
@@ -27,9 +27,9 @@
#define SCOPE_NOT_GLOBAL 4 /* parameter is not visible everywhere */
#define SCOPE_ANY 5 /* parameter scope is undefined/arbitrary */
+static char *cctk_parameter_scopes[] = {"GLOBAL", "RESTRICTED", "PRIVATE"};
-
-/* parameter types ***Tom: correct? *** */
+/* parameter types */
#define PARAMETER_KEYWORD 1 /* parameter is keyword */
#define PARAMETER_STRING 2 /* parameter is string */
@@ -39,7 +39,12 @@
#define PARAMETER_REAL 5 /* parameter is float */
#define PARAMETER_BOOLEAN 6 /* parameter is bool */
-
+static const char *cctk_parameter_type_names[] = {"KEYWORD",
+ "STRING",
+ "SENTENCE",
+ "INTEGER",
+ "REAL",
+ "BOOLEAN"};
/* what is a parameter range:
* list of independent ranges, each with
@@ -49,12 +54,12 @@
*/
typedef struct RANGE
{
- struct RANGE* last;
- struct RANGE* next;
- char* range;
- char* origin;
- int active;
- char* description;
+ struct RANGE *last;
+ struct RANGE *next;
+ char *range;
+ char *origin;
+ int active;
+ char *description;
} t_range;
@@ -72,18 +77,18 @@ typedef struct RANGE
*/
typedef struct PARAM_PROPS
{
- char* name;
- char* thorn;
- int scope;
-
- char* description;
- char* defval;
+ char *name;
+ char *thorn;
+ int scope;
+
+ char *description;
+ char *defval;
- int type;
- t_range* range;
+ int type;
+ t_range *range;
- int n_set;
- int steerable;
+ int n_set;
+ int steerable;
} t_param_prop;
@@ -91,11 +96,11 @@ typedef struct PARAM_PROPS
extern "C" {
#endif
/* get list of parameter names for given thorn */
-int CCTK_ParList (const char* thorn, char ***paramlist, int *n_param);
+int CCTK_ParameterList (const char* thorn, char ***paramlist, int *n_param);
/* get parameter properties for gven parameter/thorn pair */
-t_param_prop* CCTK_ParInfo (const char* name,
- const char* thorn);
+t_param_prop *CCTK_ParameterInfo (const char *name,
+ const char *thorn);
#ifdef __cplusplus
}
diff --git a/src/main/ActiveThorns.c b/src/main/ActiveThorns.c
index 18ded6bd..f887b77a 100644
--- a/src/main/ActiveThorns.c
+++ b/src/main/ActiveThorns.c
@@ -320,6 +320,121 @@ void FMODIFIER FORTRAN_NAME(CCTK_IsThornActive)(int *retval, ONE_FORTSTRING_ARG)
free(name);
}
+ /*@@
+ @routine CCTK_ThornImplementation
+ @date Sun Oct 17 21:10:19 1999
+ @author Tom Goodale
+ @desc
+ Returns the implementation provided by the thorn.
+ @enddesc
+ @calls
+ @calledby
+ @history
+
+ @endhistory
+
+@@*/
+const char *CCTK_ThornImplementation(const char *name)
+{
+ const char *retval;
+ t_sktree *node;
+
+ struct THORN *thorn;
+
+ /* Find the thorn */
+ node = SKTreeFindNode(thornlist, name);
+
+ retval = NULL;
+
+ if(node)
+ {
+ thorn = (struct THORN *)(node->data);
+
+ retval = thorn->implementation;
+ }
+
+ return retval;
+}
+
+ /*@@
+ @routine CCTK_ImplementationThorn
+ @date Sun Oct 17 22:04:13 1999
+ @author Tom Goodale
+ @desc
+ Returns the name of one thorn providing an implementation.
+ @enddesc
+ @calls
+ @calledby
+ @history
+
+ @endhistory
+
+@@*/
+const char *CCTK_ImplementationThorn(const char *name)
+{
+ const char *retval;
+
+ t_sktree *node;
+
+ struct IMPLEMENTATION *imp;
+
+ /* Find the implementation */
+ node = SKTreeFindNode(implist, name);
+
+ retval = NULL;
+
+ if(node)
+ {
+ imp = (struct IMPLEMENTATION *)(node->data);
+
+ retval = imp->thornlist->key;
+ }
+
+ return retval;
+}
+
+
+/*@@
+ @routine CCTK_IsThornCompiled
+ @date Sun Jul 4 17:46:56 1999
+ @author Tom Goodale
+ @desc
+ Checks if a thorn is compiled in.
+ @enddesc
+ @calls
+ @calledby
+ @history
+
+ @endhistory
+
+@@*/
+int CCTK_IsThornCompiled(const char *name)
+{
+ int retval;
+ t_sktree *node;
+
+ struct THORN *thorn;
+
+ /* Find the thorn */
+ node = SKTreeFindNode(thornlist, name);
+
+ retval = 0;
+
+ if(node)
+ {
+ retval = 1;
+ }
+
+ return retval;
+}
+
+void FMODIFIER FORTRAN_NAME(CCTK_IsThornCompiled)(int *retval, ONE_FORTSTRING_ARG)
+{
+ ONE_FORTSTRING_CREATE(name)
+ *retval = CCTK_IsThornCompiled(name);
+ free(name);
+}
+
/*@@
@routine CCTK_IsImplementationActive
@@ -448,9 +563,9 @@ int CCTKi_ListImplementations(FILE *file, const char *format, int active)
}
/*@@
- @routine CCTK_ImpList
+ @routine CCTK_ImplementationList
@date Thu Oct 14 16:14:22 1999
- @author Tom Goodale
+ @author Andre Merzky
@desc
Returns the list of implementations.
@enddesc
@@ -461,7 +576,7 @@ int CCTKi_ListImplementations(FILE *file, const char *format, int active)
@endhistory
@@*/
-int CCTK_ImpList(int active, char ***list, int *n_implementations)
+int CCTK_ImplementationList(int active, char ***list, int *n_implementations)
{
int retval;
t_sktree *node;
@@ -491,9 +606,52 @@ int CCTK_ImpList(int active, char ***list, int *n_implementations)
}
-
/*@@
@routine CCTK_ThornList
+ @date Sun Oct 17 17:49:23 1999
+ @author Tom Goodale
+ @desc
+ Returns the list of thorns.
+ @enddesc
+ @calls
+ @calledby
+ @history
+
+ @endhistory
+
+@@*/
+int CCTK_ThornList(int active, char ***list, int *n_items)
+{
+ int retval;
+ t_sktree *node;
+
+ struct THORN *thorn;
+
+ retval = 0;
+
+ *list = (char **)malloc(n_thorns*sizeof(char *));
+
+ for(node= SKTreeFindFirst(thornlist),
+ *n_items = 0;
+ node;
+ node = node->next, retval++)
+ {
+ thorn = (struct THORN *)(node->data);
+
+ if(thorn->active || !active)
+ {
+ (*list)[*n_items] = (char *) malloc(strlen(node->key)+1);
+ strcpy((*list)[*n_items], node->key);
+ (*n_items)++;
+ }
+ }
+
+ return retval;
+}
+
+
+ /*@@
+ @routine CCTK_ImplementationThornList
@date Thu Oct 14 16:04:59 1999
@author Andre Merzky
@desc
@@ -506,7 +664,7 @@ int CCTK_ImpList(int active, char ***list, int *n_implementations)
@endhistory
@@*/
-int CCTK_ThornList (const char* imp, char ***list, int *n_thorns)
+int CCTK_ImplementationThornList (const char *imp, char ***list, int *n_items)
{
int retval;
t_sktree *node;
@@ -534,12 +692,13 @@ int CCTK_ThornList (const char* imp, char ***list, int *n_thorns)
return (-1);
}
/* recourse thorn tree */
- for (node = SKTreeFindFirst (thornlist), *n_thorns = 0;
+ for (node = SKTreeFindFirst (thornlist),
+ *n_items = 0;
node;
node = node->next, retval++)
{
/* list long enough? */
- if ((*n_thorns) >= alloc_size)
+ if ((*n_items) >= alloc_size)
{
/* no: realloc! */
alloc_size += _MY_THORN_JUNK_SIZE;
@@ -554,16 +713,16 @@ int CCTK_ThornList (const char* imp, char ***list, int *n_thorns)
}
/* store thorn */
- (*list)[*n_thorns] = (char *) malloc ((strlen (node->key) + 1) * sizeof (char));
- strcpy ((*list)[*n_thorns], node->key);
- (*n_thorns)++;
+ (*list)[*n_items] = (char *) malloc ((strlen (node->key) + 1) * sizeof (char));
+ strcpy ((*list)[*n_items], node->key);
+ (*n_items)++;
}
}
/* if necessary, shrink paramlist again. */
- if ((*n_thorns) < alloc_size)
+ if ((*n_items) < alloc_size)
{
- alloc_size += (*n_thorns);
+ alloc_size += (*n_items);
*list = (char **) realloc ((*list), alloc_size);
if (! (*list))
@@ -647,7 +806,6 @@ t_sktree *CCTK_ImpThornList(const char *name)
/* Find the implementation */
node = SKTreeFindNode(implist, name);
-
if(node)
{
imp = (struct IMPLEMENTATION *)(node->data);
diff --git a/src/main/CommandLine.c b/src/main/CommandLine.c
index 4c6068b8..ab048f09 100644
--- a/src/main/CommandLine.c
+++ b/src/main/CommandLine.c
@@ -19,9 +19,8 @@
#include "cctk_WarnLevel.h"
#include "cctk_Bindings.h"
#include "cctk_Misc.h"
-
-/* FIXME. This shouldn't be here !*/
-#include "thornlist.h"
+#include "cctk_ActiveThorns.h"
+#include "cctk_ParameterFunctions.h"
static char *rcsid = "$Header$";
@@ -31,11 +30,9 @@ char *compileTime(void);
char *compileDate(void);
int CCTK_GetCommandLine(char ***outargv);
-static int redirectsubs;
-
-/* FIXME. This shouldn't be in this file */
-int CCTK_IsThornCompiled(const char *thorn) ;
+static void CCTKi_CommandLinePrintParameter(t_param_prop *properties);
+static int redirectsubs;
/* The functions used to deal with each option. */
@@ -58,7 +55,9 @@ int CCTK_IsThornCompiled(const char *thorn) ;
void CCTKi_CommandLineTestThornCompiled(const char *optarg)
{
- if(CCTK_IsThornCompiled(optarg))
+ int retval;
+
+ if(retval = CCTK_IsThornCompiled(optarg))
{
printf("Thorn '%s' available.\n", optarg);
}
@@ -66,44 +65,100 @@ void CCTKi_CommandLineTestThornCompiled(const char *optarg)
{
printf("Thorn '%s' unavailable.\n", optarg);
}
- exit(1);
+
+ exit(retval);
}
-void CCTKi_CommandLineDescribeAllParameters(void)
+
+void CCTKi_CommandLineDescribeAllParameters(const char *optarg)
{
- CCTKi_BindingsParameterHelp(NULL,"%s",stdout);
- exit(1);
+ int n_thorns;
+ char **thornlist;
+ int thorn;
+ int n_parameters;
+ char **parameterlist;
+ int parameter;
+ const char *implementation;
+ t_param_prop *properties;
+
+ CCTK_ThornList(0, &thornlist, &n_thorns);
+
+ for(thorn = 0; thorn < n_thorns; thorn++)
+ {
+ implementation = CCTK_ThornImplementation(thornlist[thorn]);
+ CCTK_ParameterList(thornlist[thorn], &parameterlist, &n_parameters);
+
+ for(parameter = 0 ; parameter < n_parameters; parameter++)
+ {
+ properties = CCTK_ParameterInfo(parameterlist[parameter], thornlist[thorn]);
+
+ if(optarg)
+ {
+ switch(*optarg)
+ {
+ case 'v':
+ CCTKi_CommandLinePrintParameter(properties);
+ break;
+ default :
+ fprintf(stderr, "Unknown verbosity option %s\n", optarg);
+ exit(2);
+ }
+ }
+ else
+ {
+ if(properties->scope == SCOPE_PRIVATE)
+ {
+ printf("%s::%s\n", thornlist[thorn], parameterlist[parameter]);
+ }
+ else
+ {
+ printf("%s::%s\n", implementation, parameterlist[parameter]);
+ }
+ }
+
+ free(parameterlist[parameter]);
+ }
+ free(parameterlist);
+ free(thornlist[thorn]);
+ }
+ free(thornlist);
+
+ /* CCTKi_BindingsParameterHelp(NULL,"%s",stdout);*/
+
+ exit(0);
}
void CCTKi_CommandLineDescribeParameter(const char *optarg)
{
char *thorn;
char *param;
+ t_param_prop *properties;
+ t_range *range;
+ const char *cthorn;
- /*
- CCTKi_BindingsParameterHelp(optarg,"%s",stdout);
- */
-
Util_SplitString(&thorn, &param, optarg, "::");
if(!param)
{
- ParameterPrintDescription(optarg,
- NULL, /*const char *thorn,*/
- "..%s..%s\n",/* const char *format,*/
- stdout);
+ properties = CCTK_ParameterInfo(optarg, NULL);
}
else
{
- ParameterPrintDescription(param,
- thorn, /*const char *thorn,*/
- "..%s..%s\n",/* const char *format,*/
- stdout);
- free(thorn);
- free(param);
+ properties = CCTK_ParameterInfo(param, thorn);
+
+ if(!properties)
+ {
+ cthorn = CCTK_ImplementationThorn(thorn);
+ properties = CCTK_ParameterInfo(param, cthorn);
+ }
+
+ free(thorn);
+ free(param);
}
- exit(1);
+ CCTKi_CommandLinePrintParameter(properties);
+
+ exit(0);
}
void CCTKi_CommandLineTestParameters(const char *optarg)
@@ -193,12 +248,8 @@ void CCTKi_CommandLineRedirectStdout(void)
void CCTKi_CommandLineListThorns(void)
{
- int i;
printf ("\n---------------Compiled Thorns-------------\n");
- for(i=0; i < nthorns; i++)
- {
- fprintf(stdout, "%s\n", thorn_name[i]);
- }
+ CCTKi_ListThorns(stdout, " %s\n", 0);
printf ("-------------------------------------------\n\n");
exit(1);
}
@@ -344,37 +395,38 @@ void CCTKi_CommandLineFinished(void)
}
-
-
/*@@
- @routine CCTK_IsThornCompiled
- @date Sat May 16 14:47:14 1998
+ @routine CCTKi_CommandLinePrintParameter
+ @date Sun Oct 17 22:11:31 1999
@author Tom Goodale
@desc
- Determines if a thorn was compiled into cactus.
- Returns 1 if the thorn is available, 0 otherwise.
+ Prints a parameter.
@enddesc
@calls
@calledby
@history
+
@endhistory
@@*/
-
-int CCTK_IsThornCompiled(const char *thorn)
+static void CCTKi_CommandLinePrintParameter(t_param_prop *properties)
{
- int i;
- char full_thorn_name[507];
+ t_range *range;
- for(i=0; i < nthorns; i++)
+ if(properties)
{
- if(!strcmp(thorn_name[i], thorn)) return 1;
- sprintf(full_thorn_name, "thorn_%s", thorn_name[i]);
- if(!strcmp(full_thorn_name, thorn)) return 1;
- };
-
- return 0;
-}
-
-
+ printf("Parameter: %s::%s - \"%s\"\n", properties->thorn, properties->name, properties->description);
+ printf("Type: %s\n", cctk_parameter_type_names[properties->type-1]);
+ printf("Default: %s\n", properties->defval);
+ printf("Scope: %s\n", cctk_parameter_scopes[properties->scope-1]);
+
+ for(range=properties->range; range; range=range->next)
+ {
+ printf(" Range: %s\n", range->range);
+ printf(" Origin: %s\n", range->origin);
+ printf(" Description: %s\n", range->description);
+ }
+ }
+ return;
+}
diff --git a/src/main/InitialiseDataStructures.c b/src/main/InitialiseDataStructures.c
index 449d427d..1391b6ec 100644
--- a/src/main/InitialiseDataStructures.c
+++ b/src/main/InitialiseDataStructures.c
@@ -49,7 +49,7 @@ int InitialiseDataStructures(tFleshConfig *ConfigData)
/* Initialise appropriate subsystems. */
- CCTKi_BindingsImplementationsInitialise();
+ /* CCTKi_BindingsImplementationsInitialise();*/
/* CCTKi_BindingsParametersInitialise();*/
CCTKi_BindingsVariablesInitialise();
/*CCTKi_BindingsScheduleInitialise();*/
diff --git a/src/main/Parameters.c b/src/main/Parameters.c
index 65d1c673..94b863ad 100644
--- a/src/main/Parameters.c
+++ b/src/main/Parameters.c
@@ -624,7 +624,7 @@ const char *ParameterWalk(int first,
/**********************************************************************/
/*@@
- @routine CCTK_ParList
+ @routine CCTK_ParameterList
@date Mon Aug 30 17:16:58 MSZ 1999
@author Andre Merzky
@desc
@@ -662,25 +662,27 @@ const char *ParameterWalk(int first,
@endreturndesc
@@*/
-int CCTK_ParList (const char* thorn, char ***paramlist, int *n_param)
+int CCTK_ParameterList (const char *thorn, char ***paramlist, int *n_param)
{
- t_paramtreenode* node;
- t_sktree* tnode;
- int alloc_size = 0;
+ t_paramtreenode *node;
+ t_sktree *tnode;
+ int alloc_size;
- t_paramlist* tmp_paramlist;
+ t_paramlist *tmp_paramlist;
node = NULL;
+
*n_param = 0;
/* FIXME */
#define _MY_PARAM_JUNK_SIZE 100
- alloc_size += _MY_PARAM_JUNK_SIZE;
+ alloc_size = _MY_PARAM_JUNK_SIZE;
*paramlist = (char **) malloc (sizeof (char *) * alloc_size);
- if (! (*paramlist)) {
- fprintf (stderr, "Cannot malloc paramlist*\n");
+ if (! *paramlist)
+ {
+ fprintf (stderr, "Cannot malloc paramlist* at line %d of %s\n", __LINE__, __FILE__);
return (-1);
}
@@ -698,16 +700,17 @@ int CCTK_ParList (const char* thorn, char ***paramlist, int *n_param)
for ( ; tmp_paramlist ; tmp_paramlist = tmp_paramlist->next)
{
/* is it a parameter of the given thorn? */
- if (!strcmp (thorn, tmp_paramlist->param->props->thorn))
+ if (!STR_CMP (thorn, tmp_paramlist->param->props->thorn))
{
/* list long enough? */
if ((*n_param) >= alloc_size)
{
alloc_size += _MY_PARAM_JUNK_SIZE;
- *paramlist = (char **) realloc ((*paramlist), alloc_size);
+ *paramlist = (char **) realloc (*paramlist, sizeof(char *)*alloc_size);
- if (! (*paramlist)) {
- fprintf (stderr, "Cannot realloc paramlist*\n");
+ if (! *paramlist)
+ {
+ fprintf (stderr, "Cannot realloc paramlist* at line %d of %s\n", __LINE__, __FILE__);
return (-1);
}
}
@@ -719,8 +722,8 @@ int CCTK_ParList (const char* thorn, char ***paramlist, int *n_param)
/* got memory? */
if (! (*paramlist)[(*n_param)])
{
- fprintf (stderr, "Cannot malloc paramlist*[%d]\n",
- (*n_param));
+ fprintf (stderr, "Cannot malloc paramlist*[%d]at line %d of %s\n",
+ (*n_param), __LINE__, __FILE__);
return (-1);
}
@@ -736,11 +739,13 @@ int CCTK_ParList (const char* thorn, char ***paramlist, int *n_param)
/* if necessary, shrink paramlist again. */
if ((*n_param) < alloc_size)
{
- alloc_size += (*n_param);
- *paramlist = (char **) realloc ((*paramlist), alloc_size);
+ alloc_size = (*n_param);
+ *paramlist = (char **) realloc ((*paramlist), sizeof(char *)*alloc_size);
- if (! (*paramlist)) {
- fprintf (stderr, "Cannot realloc paramlist*\n");
+ if (*n_param && ! (*paramlist))
+ {
+ fprintf (stderr, "Cannot realloc paramlist* at line %d of %s\n", __LINE__, __FILE__);
+ fprintf(stderr, "n_param is %d\n", *n_param);
return (-1);
}
}
@@ -752,7 +757,7 @@ int CCTK_ParList (const char* thorn, char ***paramlist, int *n_param)
/**********************************************************************/
/*@@
- @routine CCTK_ParInfo
+ @routine CCTK_ParameterInfo
@date Tue Aug 31 18:10:46 MSZ 1999
@author Andre Merzky
@desc
@@ -790,22 +795,42 @@ int CCTK_ParList (const char* thorn, char ***paramlist, int *n_param)
@endreturndesc
@@*/
-t_param_prop* CCTK_ParInfo (const char* name,
- const char* thorn)
+t_param_prop *CCTK_ParameterInfo (const char *name,
+ const char *thorn)
{
- /* what the heck is scope supposed to be? */
- t_param *param = ParameterFind (name, thorn, SCOPE_ANY);
-
- if (!param) {
- return (0);
- } else {
- return (param->props);
+ t_param_prop *retval;
+
+ t_param *param;
+
+ param = ParameterFind (name, thorn, SCOPE_ANY);
+
+ if (!param)
+ {
+ retval = NULL;
+ }
+ else
+ {
+ retval = param->props;
}
-
- /* done */
+
+ return retval;
}
+ /*@@
+ @routine ParameterFind
+ @date Sun Oct 17 16:20:48 1999
+ @author Tom Goodale
+ @desc
+ Finds a parameter.
+ @enddesc
+ @calls
+ @calledby
+ @history
+
+ @endhistory
+
+@@*/
static t_param *ParameterFind(const char *name,
const char *thorn,
int scope)
@@ -859,7 +884,7 @@ static t_param *ParameterFind(const char *name,
@date Mon Jul 26 10:59:42 1999
@author Tom Goodale
@desc
-
+ Creates a new parameter
@enddesc
@calls
@calledby
diff --git a/src/main/ProcessCommandLine.c b/src/main/ProcessCommandLine.c
index 7f33c3c3..31b405e7 100644
--- a/src/main/ProcessCommandLine.c
+++ b/src/main/ProcessCommandLine.c
@@ -53,19 +53,19 @@ int ProcessCommandLine(int *inargc, char ***inargv, tFleshConfig *ConfigData)
struct option long_options[] =
{
{"help", no_argument, NULL, 'h'},
- {"describe-all-parameters", no_argument, NULL, 'O'},
- {"describe-parameter", required_argument, NULL, 'o'},
- {"test-parameters", optional_argument, NULL, 'x'},
- {"warning-level", required_argument, NULL, 'W'},
- {"error-level", required_argument, NULL, 'E'},
- {"redirect-stdout", no_argument, NULL, 'r'},
- {"list-thorns", no_argument, NULL, 'T'},
- {"test-thorn-compiled", required_argument, NULL, 't'},
+ {"describe-all-parameters", optional_argument, NULL, 'O'},
+ {"describe-parameter", required_argument, NULL, 'o'},
+ {"test-parameters", optional_argument, NULL, 'x'},
+ {"warning-level", required_argument, NULL, 'W'},
+ {"error-level", required_argument, NULL, 'E'},
+ {"redirect-stdout", no_argument, NULL, 'r'},
+ {"list-thorns", no_argument, NULL, 'T'},
+ {"test-thorn-compiled", required_argument, NULL, 't'},
{"version", no_argument, NULL, 'v'},
{0, 0, 0, 0}
};
- c = getopt_long_only (argc, argv, "hOo:x::W:E:rTt:v",
+ c = getopt_long_only (argc, argv, "hO::o:x::W:E:rTt:v",
long_options, &option_index);
if (c == -1)
break;
@@ -73,7 +73,7 @@ int ProcessCommandLine(int *inargc, char ***inargv, tFleshConfig *ConfigData)
switch (c)
{
case 't': CCTKi_CommandLineTestThornCompiled(optarg); break;
- case 'O': CCTKi_CommandLineDescribeAllParameters(); break;
+ case 'O': CCTKi_CommandLineDescribeAllParameters(optarg); break;
case 'o': CCTKi_CommandLineDescribeParameter(optarg); break;
case 'x': CCTKi_CommandLineTestParameters(optarg); break;
case 'W': CCTKi_CommandLineWarningLevel(optarg); break;
diff --git a/src/main/Subsystems.c b/src/main/Subsystems.c
index 1274c1d9..1e27f6b5 100644
--- a/src/main/Subsystems.c
+++ b/src/main/Subsystems.c
@@ -30,6 +30,7 @@ int InitialiseSubsystemDefaults(void)
SetupCommFunctions();
SetupIOFunctions();
+ CCTKi_BindingsImplementationsInitialise();
CCTKi_BindingsParametersInitialise();
return 0;