summaryrefslogtreecommitdiff
path: root/lib/sbin/create_fortran_stuff.pl
diff options
context:
space:
mode:
authorallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-02-15 10:05:57 +0000
committerallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-02-15 10:05:57 +0000
commitdb5231a3be473e7fb31d882e039dd151dfa45e1c (patch)
tree13dcbf40714909173406708f5fd475f94d7a3471 /lib/sbin/create_fortran_stuff.pl
parentffb751aa704d7986effb86927b7d9d83e5a5221b (diff)
Put CCTK_STRINGs at the start of the common block statement to avoid
misalignment warnings from compiler git-svn-id: http://svn.cactuscode.org/flesh/trunk@273 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/create_fortran_stuff.pl')
-rw-r--r--lib/sbin/create_fortran_stuff.pl28
1 files changed, 23 insertions, 5 deletions
diff --git a/lib/sbin/create_fortran_stuff.pl b/lib/sbin/create_fortran_stuff.pl
index d19c0e3a..d409ee18 100644
--- a/lib/sbin/create_fortran_stuff.pl
+++ b/lib/sbin/create_fortran_stuff.pl
@@ -130,7 +130,8 @@ sub CreateFortranCommonDeclaration
# Create the data
- $definition = "COMMON /$common_block/";
+ $definition_front = "COMMON /$common_block/";
+ $definition = "";
$sepchar = "";
@@ -152,21 +153,38 @@ sub CreateFortranCommonDeclaration
push(@data, $line);
+ # Make up the common block declaration, putting
+ # strings at the start to avoid misalignment
if($aliases == 0)
{
- $definition .= "$sepchar$parameter";
+ if ($type_string =~ /CCTK_STRING/)
+ {
+ $definition = "$parameter$sepchar$definition";
+ }
+ else
+ {
+ $definition .= "$sepchar$parameter";
+ }
}
else
{
- $definition .= "$sepchar$alias_names[$n]";
+ if ($type_string =~ /CCTK_STRING/)
+ {
+ $definition = "$alias_names[$n]$sepchar$definition";
+ }
+ else
+ {
+ $definition .= "$sepchar$alias_names[$n]";
+ }
}
-
+ print("Type is $type_string\n");
+ print("String is $definition\n");
$sepchar = ",";
$n++;
}
- push(@data, $definition);
+ push(@data, $definition_front.$definition);
return @data;
}