diff options
author | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-02-19 08:51:41 +0000 |
---|---|---|
committer | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-02-19 08:51:41 +0000 |
commit | ddabec101c52739c0bb4a8d8ab0628cdd4b1ed49 (patch) | |
tree | a68b9b04507b872b96fd0402329b2fef2c0d68e0 /lib/sbin/create_c_stuff.pl | |
parent | 67f5c6d7052c6495f867a47e3a91b2b2a7699680 (diff) |
Strip off spaces at the start and end of the default string, otherwise
CCTK_Equals will fail if the default is "no"_ .
Gab
git-svn-id: http://svn.cactuscode.org/flesh/trunk@310 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/create_c_stuff.pl')
-rw-r--r-- | lib/sbin/create_c_stuff.pl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sbin/create_c_stuff.pl b/lib/sbin/create_c_stuff.pl index 70373dcd..27311f86 100644 --- a/lib/sbin/create_c_stuff.pl +++ b/lib/sbin/create_c_stuff.pl @@ -243,9 +243,11 @@ sub set_parameter_default { # Logicals need to be done specially. - # Strip out any quote marks. + # Strip out any quote marks, and spaces at start and end. $temp_default = $default; $temp_default =~ s:\"::g; + $temp_default =~ s:\s*$:: ; + $temp_default =~ s:^\s*:: ; $line = " CCTK_SetLogical(\&($structure.$parameter),\"$temp_default\");"; push(@lines, $line); |