Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Don't remove forward declarations for subroutines.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Thu, 12 Sep 2013 11:52:30 +0000 (13:52 +0200)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Fri, 13 Sep 2013 15:16:01 +0000 (17:16 +0200)
I can't see any good reason to remove them, and it removes compile errors
about implicit function declarations.

src/smpi/smpif2c.in

index 4b99f2b..0a48d50 100755 (executable)
@@ -25,7 +25,6 @@ foreach my $fortran (@ARGV) {
    die "F2C failed\n" if $?;
    open F2C,"<$output" or die "Unable to open file $output";
    my $started = 0;
-   my $cutext = 0;
    print $tmp "#ifndef INTEGER_STAR_8\n";
    print $tmp "#define INTEGER_STAR_8\n";
    print $tmp "#endif\n";
@@ -52,16 +51,7 @@ foreach my $fortran (@ARGV) {
       if(/\/\* Table of constant values \*\// || /MAIN__/) {
          $started = 0;
       }
-      if(/extern \/\* Subroutine \*\//) {
-         $cutext = 1;
-      }
       $_ =~ s/(mpi_[\w]*_)_/$1/g;
-      if($cutext) {
-         if(/;$/) {
-            $cutext = 0;
-         }
-         next;
-      }
       if(/\/* Main program alias \*\/\s*int\s+.*\s*\(\s*\)\s*{(.*)}/) {
          $_ = "int smpi_simulated_main_(int argc, char** argv) { smpi_process_init(&argc, &argv); $1 }\n";
       }