diff options
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; +} |