|
From: <dgr...@us...> - 2010-02-22 21:00:18
|
Revision: 13004
http://x10.svn.sourceforge.net/x10/?rev=13004&view=rev
Author: dgrove-oss
Date: 2010-02-22 21:00:12 +0000 (Mon, 22 Feb 2010)
Log Message:
-----------
Tweak to bias script for the common case of wanting to strip
a header comment that appears above the package statement.
This makes sense now that standardizeAllHeaders.sh doesn't
blindly remove headers from files that already have them.
Modified Paths:
--------------
trunk/x10.dist/releng/standardizeHeader.pl
Modified: trunk/x10.dist/releng/standardizeHeader.pl
===================================================================
--- trunk/x10.dist/releng/standardizeHeader.pl 2010-02-22 20:42:29 UTC (rev 13003)
+++ trunk/x10.dist/releng/standardizeHeader.pl 2010-02-22 21:00:12 UTC (rev 13004)
@@ -17,17 +17,13 @@
}
while (<>) {
- if (m/^package /) {
- $packageFound = 1;
- printHeader();
- }
if ($packageFound) {
print $_;
} else {
- # sigh. Might be a class in the default package.
- # Recognize some other common indicators for the begining of the file contents
- # that appear in files in x10.tests.
- if (m/^import / || m/^interface / || m/^class / || m/^public / || m/^final / || m/\/\*\*/ || m/LIMITATION/ || m/STATUS/ || m/OPTION/) {
+ # Mainly want to look for the opening 'package statement', but we
+ # also have to deal with the fact that some of the programs (tests, samples)
+ # are in the default package and therefore don't have opening package statements.
+ if (m/^package / || m/^import / || m/^interface / || m/^class / || m/^public / || m/^final / || m/LIMITATION/ || m/STATUS/ || m/OPTION/) {
$packageFound = 1;
printHeader();
print $_;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|