[cig-commits] r20487 - seismo/2D/SPECFEM2D/trunk/UTILS
dkomati1 at geodynamics.org
dkomati1 at geodynamics.org
Sat Jul 7 08:15:13 PDT 2012
Author: dkomati1
Date: 2012-07-07 08:15:12 -0700 (Sat, 07 Jul 2012)
New Revision: 20487
Added:
seismo/2D/SPECFEM2D/trunk/UTILS/update_headers_change_word_f90.pl
Removed:
seismo/2D/SPECFEM2D/trunk/UTILS/change_words_in_all_files.pl
Log:
renamed a file to be consistent with the 3D codes
Deleted: seismo/2D/SPECFEM2D/trunk/UTILS/change_words_in_all_files.pl
===================================================================
--- seismo/2D/SPECFEM2D/trunk/UTILS/change_words_in_all_files.pl 2012-07-07 14:41:56 UTC (rev 20486)
+++ seismo/2D/SPECFEM2D/trunk/UTILS/change_words_in_all_files.pl 2012-07-07 15:15:12 UTC (rev 20487)
@@ -1,55 +0,0 @@
-#!/usr/bin/perl
-
-#
-# Script to change the version number in f90 codes
-#
-# Author : Dimitri Komatitsch, EPS - Harvard University, May 1998
-#
-
-#
-# read all f90 and F90 (and *.h) files in the current directory
-# f90 files are supposed to have the extension "*.f90" or "*.F90" or "*.h"
-#
-
-#
-# known bug : does the changes also in constant strings, and not only
-# in the code (which is dangerous, but really easier to program...)
-#
-
- @objects = `ls ../src/*/*.f90 ../src/*/*.F90 ../src/shared/force_ftz.c ../src/shared/param_reader.c ../setup/*.h.in`;
-
- foreach $name (@objects) {
- chop $name;
-# change tabs to white spaces
- system("expand -2 < $name > _____tutu01_____");
- $f90name = $name;
- print STDOUT "Changing word in file $name ...\n";
-
- open(FILEF77,"<_____tutu01_____");
- open(FILEF90,">$f90name");
-
-# open the source file
- while($line = <FILEF77>) {
- chop $line;
-
-# suppress trailing white spaces and carriage return
- $line =~ s/\s*$//;
-
-# change the version number and copyright information
- $line =~ s#! S P E C F E M 2 D Version 6 \. 2#! S P E C F E M 2 D Version 7 \. 0#og;
- $line =~ s#! ------------------------------#! --------------------------------#og;
- $line =~ s#! Copyright Universite de Pau, CNRS and INRIA, France,#! Copyright CNRS, INRIA and University of Pau, France,#og;
-# $line =~ s#rmass_sigma#rmass_time_integral_of_sigma#og;
-
-# write the modified line to the output file
- print FILEF90 "$line\n";
-
- }
-
- close(FILEF77);
- close(FILEF90);
-
- }
-
- system("rm -f _____tutu01_____");
-
Copied: seismo/2D/SPECFEM2D/trunk/UTILS/update_headers_change_word_f90.pl (from rev 20485, seismo/2D/SPECFEM2D/trunk/UTILS/change_words_in_all_files.pl)
===================================================================
--- seismo/2D/SPECFEM2D/trunk/UTILS/update_headers_change_word_f90.pl (rev 0)
+++ seismo/2D/SPECFEM2D/trunk/UTILS/update_headers_change_word_f90.pl 2012-07-07 15:15:12 UTC (rev 20487)
@@ -0,0 +1,55 @@
+#!/usr/bin/perl
+
+#
+# Script to change the version number in f90 codes
+#
+# Author : Dimitri Komatitsch, EPS - Harvard University, May 1998
+#
+
+#
+# read all f90 and F90 (and *.h) files in the current directory
+# f90 files are supposed to have the extension "*.f90" or "*.F90" or "*.h"
+#
+
+#
+# known bug : does the changes also in constant strings, and not only
+# in the code (which is dangerous, but really easier to program...)
+#
+
+ @objects = `ls ../src/*/*.f90 ../src/*/*.F90 ../src/shared/force_ftz.c ../src/shared/param_reader.c ../setup/*.h.in`;
+
+ foreach $name (@objects) {
+ chop $name;
+# change tabs to white spaces
+ system("expand -2 < $name > _____tutu01_____");
+ $f90name = $name;
+ print STDOUT "Changing word in file $name ...\n";
+
+ open(FILEF77,"<_____tutu01_____");
+ open(FILEF90,">$f90name");
+
+# open the source file
+ while($line = <FILEF77>) {
+ chop $line;
+
+# suppress trailing white spaces and carriage return
+ $line =~ s/\s*$//;
+
+# change the version number and copyright information
+ $line =~ s#! S P E C F E M 2 D Version 6 \. 2#! S P E C F E M 2 D Version 7 \. 0#og;
+ $line =~ s#! ------------------------------#! --------------------------------#og;
+ $line =~ s#! Copyright Universite de Pau, CNRS and INRIA, France,#! Copyright CNRS, INRIA and University of Pau, France,#og;
+# $line =~ s#rmass_sigma#rmass_time_integral_of_sigma#og;
+
+# write the modified line to the output file
+ print FILEF90 "$line\n";
+
+ }
+
+ close(FILEF77);
+ close(FILEF90);
+
+ }
+
+ system("rm -f _____tutu01_____");
+
More information about the CIG-COMMITS
mailing list