From ddabec101c52739c0bb4a8d8ab0628cdd4b1ed49 Mon Sep 17 00:00:00 2001 From: allen Date: Fri, 19 Feb 1999 08:51:41 +0000 Subject: 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 --- lib/sbin/create_c_stuff.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (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 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); -- cgit v1.2.3