| 1 | 
  | 
#!/usr/bin/perl -w | 
| 2 | 
– | 
 | 
| 3 | 
– | 
package FileEntry; | 
| 4 | 
– | 
 | 
| 5 | 
– | 
sub new { | 
| 6 | 
– | 
    my $type = shift; | 
| 7 | 
– | 
    my $filename = shift; | 
| 8 | 
– | 
    my $path = shift; | 
| 9 | 
– | 
    my $self = {}; | 
| 10 | 
– | 
    $self->{'source_file'} = $filename; | 
| 11 | 
– | 
    $self->{'filepath'} = $path; | 
| 12 | 
– | 
    $self->{'includes'} = {}; | 
| 13 | 
– | 
    $self->{'uses'} = {}; | 
| 14 | 
– | 
    $self->{'modules'} = {}; | 
| 15 | 
– | 
    bless $self; | 
| 16 | 
– | 
} | 
| 17 | 
– | 
 | 
| 2 | 
  | 
######################################################################## | 
| 3 | 
  | 
# | 
| 4 | 
  | 
# filepp is free software; you can redistribute it and/or modify | 
| 21 | 
  | 
#  Filename     :  $RCSfile: filepp,v $ | 
| 22 | 
  | 
#  Author       :  $Author: tim $ | 
| 23 | 
  | 
#  Maintainer   :  Darren Miller: darren@cabaret.demon.co.uk | 
| 24 | 
< | 
#  File version :  $Revision: 1.1 $ | 
| 25 | 
< | 
#  Last changed :  $Date: 2004-10-01 21:11:29 $ | 
| 24 | 
> | 
#  File version :  $Revision: 1.2 $ | 
| 25 | 
> | 
#  Last changed :  $Date: 2004-10-02 04:40:48 $ | 
| 26 | 
  | 
#  Description  :  Main program | 
| 27 | 
  | 
#  Licence      :  GNU copyleft | 
| 28 | 
  | 
# | 
| 2437 | 
  | 
    my $file; | 
| 2438 | 
  | 
    if ($modulename !~ /^procedure/){ | 
| 2439 | 
  | 
         | 
| 2440 | 
+ | 
        $modulename =~ s/\s+$//; | 
| 2441 | 
  | 
        $parsedModList{uc($modulename) . ".mod"} =  Filepp::GetDefine('__FILE__'); | 
| 2442 | 
  | 
         | 
| 2443 | 
  | 
        #$modulefile = Filepp::GetDefine('__BASE_FILE__'); | 
| 2459 | 
  | 
    my $line = shift; | 
| 2460 | 
  | 
    $line =~ /^(\w+).*/; | 
| 2461 | 
  | 
    my $f90module = $1; | 
| 2462 | 
+ | 
    $f90module =~ s/\s+$//; | 
| 2463 | 
  | 
    $f90module = uc($f90module); | 
| 2464 | 
  | 
     | 
| 2465 | 
  | 
    print " " . $objDir . $f90module . '.mod \\', "\n"; | 
| 2477 | 
  | 
Filepp::AddKeyword("include", "Filepp::Include"); | 
| 2478 | 
  | 
 | 
| 2479 | 
  | 
############################################################################## | 
| 2480 | 
< | 
# add RecordFileInfo info Filepp. Every time a file is opened, an entry | 
| 2495 | 
< | 
# of this file is created   | 
| 2480 | 
> | 
# test whether a file is visited or not | 
| 2481 | 
  | 
############################################################################## | 
| 2497 | 
– | 
 | 
| 2498 | 
– | 
sub RecordFileInfo{ | 
| 2499 | 
– | 
    my $file = Filepp::GetDefine('__FILE__'); | 
| 2500 | 
– | 
#    dependenyGraph->add_vertex(new ); | 
| 2501 | 
– | 
     | 
| 2502 | 
– | 
    #if it is not base file, we need to add an edge  | 
| 2503 | 
– | 
    if ($include_level > 0) { | 
| 2504 | 
– | 
     | 
| 2505 | 
– | 
    } | 
| 2506 | 
– | 
 | 
| 2507 | 
– | 
} | 
| 2508 | 
– | 
 | 
| 2509 | 
– | 
Filepp::AddOpenInputFunc("Filepp::RecordFileInfo"); | 
| 2510 | 
– | 
 | 
| 2482 | 
  | 
sub IsVisited { | 
| 2483 | 
  | 
        my $fullfile = shift; | 
| 2484 | 
  | 
         |