From 51feafa8a08b2c9186bf0cf278587a0f85fabe49 Mon Sep 17 00:00:00 2001 From: goodale Date: Tue, 9 Feb 1999 13:04:08 +0000 Subject: Sets the dfault for a logical properly. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@229 17b73243-c579-4c4c-a9d2-2d5706c11dac --- lib/sbin/create_c_stuff.pl | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/sbin/create_c_stuff.pl') diff --git a/lib/sbin/create_c_stuff.pl b/lib/sbin/create_c_stuff.pl index 4233bf65..50365261 100644 --- a/lib/sbin/create_c_stuff.pl +++ b/lib/sbin/create_c_stuff.pl @@ -220,6 +220,7 @@ sub set_parameter_default local($type, $type_string); local($line, @lines); local($default); + local($temp_default); $default = $parameter_database{"\U$implementation $parameter\E default"}; $type = $parameter_database{"\U$implementation $parameter\E type"}; @@ -238,6 +239,17 @@ sub set_parameter_default $line = " strcpy($structure.$parameter, $default);"; push(@lines, $line); } + elsif($type eq "LOGICAL") + { + # Logicals need to be done specially. + + # Strip out any quote marks. + $temp_default = $default; + $temp_default =~ s:\"::g; + + $line = " CCTK_SetLogical(\&($structure.$parameter),\"$temp_default\");"; + push(@lines, $line); + } else { $line = " $structure.$parameter = $default;"; -- cgit v1.2.3