[cig-commits] [commit] devel: added removal / conversion of accented letters and other non-ASCII characters to utils/clean_listings_specfem.pl (151942b)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Wed Jan 21 17:09:36 PST 2015
Repository : https://github.com/geodynamics/specfem3d
On branch : devel
Link : https://github.com/geodynamics/specfem3d/compare/0ecfc058a77e4ee8acb60ad722b404a245f1c25c...151942b2854a2a62a0c8668f74626910e28cb924
>---------------------------------------------------------------
commit 151942b2854a2a62a0c8668f74626910e28cb924
Author: Dimitri Komatitsch <komatitsch at lma.cnrs-mrs.fr>
Date: Thu Jan 22 02:06:37 2015 +0100
added removal / conversion of accented letters and other non-ASCII characters to utils/clean_listings_specfem.pl
>---------------------------------------------------------------
151942b2854a2a62a0c8668f74626910e28cb924
utils/clean_listings_specfem.pl | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/utils/clean_listings_specfem.pl b/utils/clean_listings_specfem.pl
old mode 100755
new mode 100644
index 66cafa7..8ec0f9d
--- a/utils/clean_listings_specfem.pl
+++ b/utils/clean_listings_specfem.pl
@@ -125,6 +125,10 @@
system("rm -f _____temp08_____");
+################################################################################################
+################################################################################################
+################################################################################################
+
#
# Clean spaces in C files
#
@@ -164,3 +168,25 @@
system("rm -f _____temp08_____");
+################################################################################################
+################################################################################################
+################################################################################################
+
+#
+# Clean all accented letters and non-ASCII characters to remain portable
+#
+# Authors : David Luet, Princeton University, USA and Dimitri Komatitsch, CNRS, France, January 2015
+#
+
+ @objects = `ls *.c *.cu *.h *.h.in *.fh */*.c */*.cu */*.h */*.h.in */*.fh */*/*.c */*/*.cu */*/*.h */*/*.h.in */*/*.fh */*/*/*.c */*/*/*.cu */*/*/*.h */*/*/*.h.in */*/*/*.fh *.f90 *.F90 *.h *.h.in *.fh */*.f90 */*.F90 */*.h */*.h.in */*.fh */*/*.f90 */*/*.F90 */*/*.h */*/*.h.in */*/*.fh */*/*/*.f90 */*/*/*.F90 */*/*/*.h */*/*/*.h.in */*/*/*.fh */*.txt */*/*.txt */*/*/*.txt */*.tex */*/*.tex */*/*/*.tex */*.sh */*/*.sh */*/*/*.sh */*.csh */*/*.csh */*/*/*.csh */*.bash */*/*.bash */*/*/*.bash */*.pl */*/*.pl */*/*/*.pl `;
+
+ foreach $name (@objects) {
+ chop $name;
+ print STDOUT "Cleaning $name ...\n";
+
+ system("iconv -f utf-8 -t ASCII//TRANSLIT $name -o _____temp08_____ ; mv _____temp08_____ $name");
+
+ }
+
+ system("rm -f _____temp08_____");
+
More information about the CIG-COMMITS
mailing list