diff options
author | cactus_cvs <cactus_cvs@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1998-09-25 08:07:40 +0000 |
---|---|---|
committer | cactus_cvs <cactus_cvs@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1998-09-25 08:07:40 +0000 |
commit | c915d9737763b475991568082d194a786a387938 (patch) | |
tree | f467243c2db8dc8796ce21d49214f63a4457f802 /lib/sbin/c_file_processor.pl | |
parent | 27d1d68f67ecd5e856ecdb8435dc6f1fd52efdce (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.pl | 30 |
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; +} |