tor/contrib/checkSpace.pl
Nick Mathewson 21c92dace0 More whitespace normalization
svn:r2768
2004-11-10 01:20:17 +00:00

26 lines
504 B
Perl
Executable File

#!/usr/bin/perl -w
for $fn (@ARGV) {
open(F, "$fn");
$lastnil = 0;
while (<F>) {
if (/\r/) {
print " CR:$fn:$.\n";
}
if (/\t/) {
print " TAB:$fn:$.\n";
}
if (/ +$/) {
print "Space\@EOL:$fn:$.\n";
}
if ($lastnil && /^$/) {
print " DoubleNL:$fn:$.\n";
} elsif (/^$/) {
$lastnil = 1;
} else {
$lastnil = 0;
}
}
close(F);
}