summaryrefslogtreecommitdiff
path: root/lib/sbin/CreateParameterBindings.pl
diff options
context:
space:
mode:
authorgoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-09-13 18:08:45 +0000
committergoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-09-13 18:08:45 +0000
commit034bea519a90439fcab0b0b2fd6db3aa80560a20 (patch)
treec0116d27045e7abd9f4a712d81f9586eb43d799b /lib/sbin/CreateParameterBindings.pl
parenta3c4117fa845468cceeeb02cc754c505240b8060 (diff)
Commented out some old unused parameter stuff.
Hopefully fixed the space at end of line after the closing " problem - the parameter database now stores the default value after stripping the quotes from it. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@901 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/CreateParameterBindings.pl')
-rw-r--r--lib/sbin/CreateParameterBindings.pl213
1 files changed, 108 insertions, 105 deletions
diff --git a/lib/sbin/CreateParameterBindings.pl b/lib/sbin/CreateParameterBindings.pl
index e034ed93..2eae2c6f 100644
--- a/lib/sbin/CreateParameterBindings.pl
+++ b/lib/sbin/CreateParameterBindings.pl
@@ -210,8 +210,8 @@ EOT
foreach $routine ((keys %routines), "CCTK_BindingsParametersGlobal")
{
print OUT "int $routine"."Initialise(void);\n";
- print OUT "int $routine"."Set(const char *param, const char *value);\n";
- print OUT "int $routine"."Get(const char *param, void **data);\n";
+# print OUT "int $routine"."Set(const char *param, const char *value);\n";
+# print OUT "int $routine"."Get(const char *param, void **data);\n";
print OUT "int $routine"."Help(const char *param, const char *format, FILE *file);\n";
}
@@ -222,10 +222,10 @@ int CCTKi_BindingsParametersInitialise(void)
EOT
- foreach $routine (keys %routines, "CCTK_BindingsParametersGlobal")
- {
- print OUT " $routine"."Initialise();\n";
- }
+# foreach $routine (keys %routines, "CCTK_BindingsParametersGlobal")
+# {
+# print OUT " $routine"."Initialise();\n";
+# }
foreach $thorn (split(" ",$interface_database{"THORNS"}))
{
@@ -242,109 +242,112 @@ EOT
return 0;
}
-int CCTKi_BindingsParameterSet(const char *identifier, const char *value)
-{
- int retval = 1;
- int temp_retval;
- char *implementation = NULL;
- char *param_name = NULL;
-
- Util_SplitString(&implementation, &param_name, identifier, "::");
-
- if(!implementation)
- {
- retval = CCTK_BindingsParametersGlobalSet(identifier, value);
- }
- else
- {
-
- if(CCTK_IsThornActive(implementation) ||
- CCTK_IsImplementationActive(implementation))
- {
EOT
- foreach $routine (keys %routines, "CCTK_BindingsParametersGlobal")
- {
-
- print OUT <<EOT;
-
- if(CCTK_Equals(implementation, \"$routines{$routine}\"))
- {
-EOT
- print OUT " temp_retval = $routine"."Set(param_name, value);";
-
- print OUT <<EOT;
-
- if(!temp_retval)
- {
- retval = 0;
- }
- }
-EOT
- }
-
- print OUT <<EOT;
- }
- else
- {
- char *message = malloc( (200+strlen(param_name)+strlen(implementation))*sizeof(char) );
- sprintf(message, "Can't set %s - %s is not active", param_name, implementation);
- CCTK_Warn(0,__LINE__,__FILE__,"CactusBindings",message);
- free(message);
- retval = -2;
- }
- }
+#int CCTKi_BindingsParameterSet(const char *identifier, const char *value)
+#{
+# int retval = 1;
+# int temp_retval;
+# char *implementation = NULL;
+# char *param_name = NULL;
+
+# Util_SplitString(&implementation, &param_name, identifier, "::");
+
+# if(!implementation)
+# {
+# retval = CCTK_BindingsParametersGlobalSet(identifier, value);
+# }
+# else
+# {
+
+# if(CCTK_IsThornActive(implementation) ||
+# CCTK_IsImplementationActive(implementation))
+# {
+#EOT
+
+# foreach $routine (keys %routines, "CCTK_BindingsParametersGlobal")
+# {
+#
+# print OUT <<EOT;
+#
+# if(CCTK_Equals(implementation, \"$routines{$routine}\"))
+# {
+#EOT
+# print OUT " temp_retval = $routine"."Set(param_name, value);";
+#
+# print OUT <<EOT;
+#
+# if(!temp_retval)
+# {
+# retval = 0;
+# }
+# }
+#EOT
+# }
- free(implementation);
- free(param_name);
- return retval;
-}
+# print OUT <<EOT;
+# }
+# else
+# {
+# char *message = malloc( (200+strlen(param_name)+strlen(implementation))*sizeof(char) );
+# sprintf(message, "Can't set %s - %s is not active", param_name, implementation);
+# CCTK_Warn(0,__LINE__,__FILE__,"CactusBindings",message);
+# free(message);
+# retval = -2;
+# }
+# }
+#
+# free(implementation);
+# free(param_name);
+# return retval;
+#}
-int CCTKi_BindingsParameterGet(const char *identifier, void **value)
-{
- int retval = 1;
- int temp_retval;
- char *implementation = NULL;
- char *param_name = NULL;
-
- Util_SplitString(&implementation, &param_name, identifier, "::");
-
- if(!implementation)
- {
- retval = CCTK_BindingsParametersGlobalGet(identifier, value);
- }
- else
- {
-EOT
-
- foreach $routine (keys %routines, "CCTK_BindingsParametersGlobal")
- {
-
- print OUT <<EOT;
-
- if(CCTK_Equals(implementation, \"$routines{$routine}\"))
- {
-EOT
- print OUT " temp_retval = $routine"."Get(param_name, value);";
+#int CCTKi_BindingsParameterGet(const char *identifier, void **value)
+#{
+# int retval = 1;
+# int temp_retval;
+# char *implementation = NULL;
+# char *param_name = NULL;
+#
+# Util_SplitString(&implementation, &param_name, identifier, "::");
+#
+# if(!implementation)
+# {
+# retval = CCTK_BindingsParametersGlobalGet(identifier, value);
+# }
+# else
+# {
+#EOT
+#
+# foreach $routine (keys %routines, "CCTK_BindingsParametersGlobal")
+# {
+#
+# print OUT <<EOT;
+#
+# if(CCTK_Equals(implementation, \"$routines{$routine}\"))
+# {
+#EOT
+# print OUT " temp_retval = $routine"."Get(param_name, value);";
+#
+# print OUT <<EOT;
+#
+# if(!temp_retval)
+# {
+# retval = 0;
+# }
+# }
+#EOT
+# }
+#
+# print OUT <<EOT;
+# }
+#
+# free(implementation);
+# free(param_name);
+# return retval;
+#}
- print OUT <<EOT;
-
- if(!temp_retval)
- {
- retval = 0;
- }
- }
-EOT
- }
-
print OUT <<EOT;
- }
-
- free(implementation);
- free(param_name);
- return retval;
-}
-
int CCTKi_BindingsParameterHelp(const char *identifier, const char *format, FILE *file)
{
int retval = 1;
@@ -739,8 +742,8 @@ sub CreateParameterRegistrationStuff
# print "N_ranges is $n_ranges\n";
$quoted_default = $parameter_database{"\U$thorn $parameter\E default"};
-
- $quoted_default =~ s:\"::g;
+
+# $quoted_default =~ s:\"::g; The database now strips all unescaped quotes.
$line=" ParameterCreate(\"$parameter\", /* The parameter name */\n".
" \"$thorn\", /* The thorn */\n".