summaryrefslogtreecommitdiff
path: root/src/main/SetParams.c
diff options
context:
space:
mode:
authorgoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-01-20 13:44:41 +0000
committergoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-01-20 13:44:41 +0000
commit1f10d3bd318ef12f514e79e46ff47413ed9f3622 (patch)
tree4063148c5a4a1a99b9651d10bc5b22f9fe6ae471 /src/main/SetParams.c
parentd25894eab7b221c93644a721e3cd27084809b606 (diff)
Some tidying up.
Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@89 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/main/SetParams.c')
-rw-r--r--src/main/SetParams.c67
1 files changed, 1 insertions, 66 deletions
diff --git a/src/main/SetParams.c b/src/main/SetParams.c
index cce1c646..e1eb3d91 100644
--- a/src/main/SetParams.c
+++ b/src/main/SetParams.c
@@ -8,11 +8,6 @@
@@*/
#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "flesh.h"
-#include "Implementations.h"
static char *rcsid = "$Id$";
@@ -37,7 +32,7 @@ int CCTK_SetParameter(const char *parameter, const char *value)
retval = CCTK_BindingsParameterSet(parameter, value);
- if(!retval)
+ if(retval)
{
fprintf(stderr, "Unknown parameter %s\n", parameter);
}
@@ -45,63 +40,3 @@ int CCTK_SetParameter(const char *parameter, const char *value)
return retval;
}
- /*@@
- @routine CCTK_ExtractImplementation
- @date Wed Jan 13 11:23:37 1999
- @author Tom Goodale
- @desc
- Takes a parameter name of the form imp::name and splits it.
- @enddesc
- @calls
- @calledby
- @history
-
- @endhistory
-
-@@*/
-int CCTK_ExtractImplementation(char **imp, char **name, const char *parameter)
-{
- int retval;
- char *position;
-
- /* Find location of the seperator */
- position = strstr(parameter, "::");
-
- if(position)
- {
- /*Allocate memory for return strings. */
- *imp = (char *)malloc((position-parameter+1)*sizeof(char));
- *name = (char *)malloc((strlen(parameter)-(position-parameter)-2+1)*sizeof(char));
-
- /* Check that the allocation succeeded. */
- if(!*imp || !*name)
- {
- free(*imp);
- *imp = NULL;
- free(*name);
- *name = NULL;
- retval = 2;
- }
- }
- else
- {
- *imp = NULL;
- *name = NULL;
- retval = 1;
- }
-
- if(position && imp && name)
- {
- /* Copy the data */
- strncpy(*imp, parameter, (int)(position-parameter));
- (*imp)[(int)(position-parameter)] = '\0';
-
- strncpy(*name, position+2, strlen(parameter)-(int)(position-parameter)-2);
- (*name)[strlen(parameter)-(position-parameter)-2] = '\0';
-
- retval = 0;
- }
-
- return retval;
-}
-