summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>2002-09-07 06:57:23 +0000
committerallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>2002-09-07 06:57:23 +0000
commitfc5c3c2c46a9f061960b2bae79733eccfa212db7 (patch)
tree8d2bb9f9a656005c20ed51cbfe6d15cf6c7dad18
parent75e035c581933a7ad882273179a423ed9dc9fae6 (diff)
Chop comment lines (which are now not removed by the Fortran preprocessor)
to 72 columns after macros are expanded and quotes are removed. This will hopefully solve the problems of macro names in comments being expandedand still allow machine specific directives to be included in comments. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2996 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rw-r--r--lib/sbin/f_file_processor.pl16
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/sbin/f_file_processor.pl b/lib/sbin/f_file_processor.pl
index 8a4e359e..5a1d83ae 100644
--- a/lib/sbin/f_file_processor.pl
+++ b/lib/sbin/f_file_processor.pl
@@ -66,12 +66,22 @@ while (<>)
# Get rid of any tabs
s/\t/ /g;
- # Ignore some fortran comments (they stay in code)
+ # Chop fortran comments to 72 columns (they stay in code)
+ # removing any quotes
# (standard c C, or even ! comments)
if (/^$standard_comments.*$/ || /(.)![^'"]*$/)
{
- print;
- print "\n";
+ # Remove quotes
+ s/['"]//g;
+ if (/(.{72,72}).*/)
+ {
+ print $1;
+ }
+ else
+ {
+ print;
+ }
+ print "\n";
}
else
{