aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-11-09 20:04:00 +0000
committerNick Mathewson <nickm@torproject.org>2004-11-09 20:04:00 +0000
commit5a5be93f80a3cdb3d72311ece04ccc510c15626c (patch)
treee8c93b2cc57de810b0dfb0dc35a90727be4a57dc /contrib
parentd9d053d70b23ef46610867298dabdec579cef9c4 (diff)
downloadtor-5a5be93f80a3cdb3d72311ece04ccc510c15626c.tar
tor-5a5be93f80a3cdb3d72311ece04ccc510c15626c.tar.gz
Normalize whitespace; add a "tell me about all the unnormalized whitespace" target; fix a braino in dirserv.c
svn:r2758
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/checkSpace.pl25
1 files changed, 25 insertions, 0 deletions
diff --git a/contrib/checkSpace.pl b/contrib/checkSpace.pl
new file mode 100755
index 000000000..435df1060
--- /dev/null
+++ b/contrib/checkSpace.pl
@@ -0,0 +1,25 @@
+#!/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);
+}