summaryrefslogtreecommitdiff
path: root/lib/sbin/c_file_processor.pl
diff options
context:
space:
mode:
authorcactus_cvs <cactus_cvs@17b73243-c579-4c4c-a9d2-2d5706c11dac>1998-09-25 08:07:40 +0000
committercactus_cvs <cactus_cvs@17b73243-c579-4c4c-a9d2-2d5706c11dac>1998-09-25 08:07:40 +0000
commitc915d9737763b475991568082d194a786a387938 (patch)
treef467243c2db8dc8796ce21d49214f63a4457f802 /lib/sbin/c_file_processor.pl
parent27d1d68f67ecd5e856ecdb8435dc6f1fd52efdce (diff)
Initial import
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/c_file_processor.pl')
-rw-r--r--lib/sbin/c_file_processor.pl30
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/sbin/c_file_processor.pl b/lib/sbin/c_file_processor.pl
new file mode 100644
index 00000000..2e7084ab
--- /dev/null
+++ b/lib/sbin/c_file_processor.pl
@@ -0,0 +1,30 @@
+#!/bin/perl
+
+$home = shift(@ARGV);
+
+$/ = ";";
+$*=1;
+
+if (! -e "$home/fortran_name.pl" )
+{
+ die "Unable to get fortran name file!";
+}
+
+require "$home/fortran_name.pl";
+
+while(<>)
+{
+ $line = $_;
+ if($line =~ m:FORTRAN_NAME\s*\(([^\)]*)\):)
+ {
+ $arglist = $1;
+ $arglist =~ s:[\s\n\t]+::g;
+
+ @args = split(",", $arglist );
+
+ $new = &fortran_name($args[$#args]);
+
+ $line =~ s:FORTRAN_NAME\s*\(([^\)]*)\):$new:;
+ }
+ print $line;
+}