diff options
author | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-02-09 13:04:08 +0000 |
---|---|---|
committer | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-02-09 13:04:08 +0000 |
commit | 51feafa8a08b2c9186bf0cf278587a0f85fabe49 (patch) | |
tree | 87dea34f89ee005ebc9b1e7be17f6d0b13a7cb0d /lib/sbin/create_c_stuff.pl | |
parent | ec93f400006fd4e1e47698de2c0ef15b48dcc0e0 (diff) |
Sets the dfault for a logical properly.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@229 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/create_c_stuff.pl')
-rw-r--r-- | lib/sbin/create_c_stuff.pl | 12 |
1 files changed, 12 insertions, 0 deletions
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;"; |