diff options
author | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-07-04 20:44:58 +0000 |
---|---|---|
committer | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-07-04 20:44:58 +0000 |
commit | 60b45d66a082bc7bf84575907723397ce52dff3a (patch) | |
tree | 95fed523a75f51e202828171fca81b1f290b37b7 /src/main/SetParams.c | |
parent | 3a49de09ea001f18d6e58d236c80e2b39a4b78d0 (diff) |
Stuff for the ActiveThorns parameter.
Now need to specify ActiveThorns before any other parameters to list those
thorns which are active. No parameters or startup or rfr routines are
available from inactive thorns.
Note that this isn't quite working yet but I hope to track it down by morning.
In the meantime either don't update or be prepared for things to be slightly
broken.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@645 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/main/SetParams.c')
-rw-r--r-- | src/main/SetParams.c | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/src/main/SetParams.c b/src/main/SetParams.c index e1eb3d91..297b66d8 100644 --- a/src/main/SetParams.c +++ b/src/main/SetParams.c @@ -28,13 +28,41 @@ static char *rcsid = "$Id$"; int CCTK_SetParameter(const char *parameter, const char *value) { int retval; + char thornname[101]; + const char *position; + int length; - retval = CCTK_BindingsParameterSet(parameter, value); + if(CCTK_Equals(parameter, "ActiveThorns")) + { + position = value; + + while(*position) + { + length=0; + + for(;*position && *position != ' ';position++) + { + thornname[length] = *position; + if(length < 100) length++; + } + thornname[length] = '\0'; + CCTK_ActivateThorn(thornname); + if(position) position++; + } + CCTK_ActivateThorn("Cactus"); + } + else + { + retval = CCTK_BindingsParameterSet(parameter, value); + } if(retval) { - fprintf(stderr, "Unknown parameter %s\n", parameter); + if(retval == -1) + { + fprintf(stderr, "Unknown parameter %s\n", parameter); + } } return retval; |