From fc5c3c2c46a9f061960b2bae79733eccfa212db7 Mon Sep 17 00:00:00 2001 From: allen Date: Sat, 7 Sep 2002 06:57:23 +0000 Subject: 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 --- lib/sbin/f_file_processor.pl | 16 +++++++++++++--- 1 file 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 { -- cgit v1.2.3