~ubuntu-branches/ubuntu/saucy/nwchem/saucy

« back to all changes in this revision

Viewing changes to src/config/64_to_32.pl

  • Committer: Package Import Robot
  • Author(s): Michael Banck, Michael Banck, Daniel Leidert
  • Date: 2012-02-09 20:02:41 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120209200241-jgk03qfsphal4ug2
Tags: 6.1-1
* New upstream release.

[ Michael Banck ]
* debian/patches/02_makefile_flags.patch: Updated.
* debian/patches/02_makefile_flags.patch: Use internal blas and lapack code.
* debian/patches/02_makefile_flags.patch: Define GCC4 for LINUX and LINUX64
  (Closes: #632611 and LP: #791308).
* debian/control (Build-Depends): Added openssh-client.
* debian/rules (USE_SCALAPACK, SCALAPACK): Removed variables (Closes:
  #654658).
* debian/rules (LIBDIR, USE_MPIF4, ARMCI_NETWORK): New variables.
* debian/TODO: New file.
* debian/control (Build-Depends): Removed libblas-dev, liblapack-dev and
  libscalapack-mpi-dev.
* debian/patches/04_show_testsuite_diff_output.patch: New patch, shows the
  diff output for failed tests.
* debian/patches/series: Adjusted.
* debian/testsuite: Optionally run all tests if "all" is passed as option.
* debian/rules: Run debian/testsuite with "all" if DEB_BUILD_OPTIONS
  contains "checkall".

[ Daniel Leidert ]
* debian/control: Used wrap-and-sort. Added Vcs-Svn and Vcs-Browser fields.
  (Priority): Moved to extra according to policy section 2.5.
  (Standards-Version): Bumped to 3.9.2.
  (Description): Fixed a typo.
* debian/watch: Added.
* debian/patches/03_hurd-i386_define_path_max.patch: Added.
  - Define MAX_PATH if not defines to fix FTBFS on hurd.
* debian/patches/series: Adjusted.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#
2
 
# $Id: 64_to_32.pl,v 1.2 2005-11-02 19:09:12 edo Exp $
 
2
# $Id: 64_to_32.pl 21538 2011-11-16 22:56:50Z d3p852 $
3
3
#
4
4
#
5
5
#
24
24
#           Pacific Northwest National Laboratory
25
25
#           P.O. Box 999
26
26
#           Richland, WA 99352-0999
27
 
#           email: ra_kendall@pnl.gov
28
27
#
 
28
 
 
29
sub copy_case() {   # Take case from "from" and apply it to "to" and return that new string
 
30
    my ($from, $to) = @_;
 
31
    my ($lf, $lt) = map length, @_;
 
32
    if ($lt < $lf) { $from = substr $from, 0, $lt }
 
33
    else { $from .= substr $to, $lf }
 
34
    return uc $to | ($from ^ uc $from);
 
35
}                   
 
36
 
29
37
$debug = 0;
30
38
@from = ();
31
39
@to   = ();
89
97
            {
90
98
                if (/$from[$compare]/i){
91
99
 
 
100
                    $froom = index(uc $_,uc $from[$compare]); # Find where the string starts ie the "from"
 
101
                    $toot = &copy_case(substr($_,$froom),$to[$compare]) ; # Generate a "to" that matches the case
 
102
 
92
103
                    if (/^[ ]{5}[^\s]/) {
93
 
                        s/([ ]{5}.)$from[$compare](\W{1})/$1$to[$compare]$2/gi ;
 
104
                        s/([ ]{5}.)$from[$compare](\W{1})/$1${toot}$2/gi ;
94
105
                    }
95
106
#this takes care of the tab chars in C
96
107
                    if (/^[ \t]/){
97
 
                        s/(\W{1})$from[$compare](\W{1})/$1$to[$compare]$2/gi ;
 
108
                        s/(\W{1})$from[$compare](\W{1})/$1${toot}$2/gi ;
98
109
                    }
99
110
#this takes care of declarations in C
100
111
                    if (/^[ \S]/){
101
 
                        s/(\W{1})$from[$compare](\W{1})/$1$to[$compare]$2/gi ;
 
112
                        s/(\W{1})$from[$compare](\W{1})/$1${toot}$2/gi ;
102
113
                    }
103
114
                    if (/^[ \d]/){
104
 
                        s/(\W{1})$from[$compare](\W{1})/$1$to[$compare]$2/gi ;
 
115
                        s/(\W{1})$from[$compare](\W{1})/$1${toot}$2/gi ;
105
116
                    }
106
117
                }
107
118
            }
108
 
            
109
119
            print FIXEDFILE $_;
110
120
        }
111
121
    }