summaryrefslogtreecommitdiff
path: root/lib/sbin/c_file_processor.pl
diff options
context:
space:
mode:
authorgoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-01-22 17:17:23 +0000
committergoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-01-22 17:17:23 +0000
commite1eef87a273d2d6bbb1b0155b62bea4baceb7586 (patch)
treeb1ff74a9c3038fc523715b3523f3a1eaabb18d42 /lib/sbin/c_file_processor.pl
parentffa24c2b1ddabae95b9b1eb77a86a588b1252be4 (diff)
Added FORTRAN_COMMON_NAME which maps the name of a common block.
Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@113 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/c_file_processor.pl')
-rw-r--r--lib/sbin/c_file_processor.pl21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/sbin/c_file_processor.pl b/lib/sbin/c_file_processor.pl
index 6807147c..c94b0db3 100644
--- a/lib/sbin/c_file_processor.pl
+++ b/lib/sbin/c_file_processor.pl
@@ -1,4 +1,13 @@
#!/bin/perl
+#/*@@
+# @file c_file_processor.pl
+# @date Fri Jan 22 18:09:47 1999
+# @author Tom Goodale
+# @desc
+# Processes a c file replacing certain strings which can't be dealt
+# with by the normal c preprocessor.
+# @enddesc
+#@@*/
$home = shift(@ARGV);
@@ -27,5 +36,17 @@ while(<>)
$line =~ s:FORTRAN_NAME\s*\(([^\)]*)\):$new:;
}
+ if($line =~ m:FORTRAN_COMMON_NAME\s*\(([^\)]*)\):)
+ {
+ $arglist = $1;
+ $arglist =~ s:[\s\n\t]+::g;
+
+ @args = split(",", $arglist );
+
+ $new = &fortran_common_name($args[$#args]);
+
+ $line =~ s:FORTRAN_COMMON_NAME\s*\(([^\)]*)\):$new:;
+ }
+
print $line;
}