diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-11-09 20:04:00 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-11-09 20:04:00 +0000 |
commit | 5a5be93f80a3cdb3d72311ece04ccc510c15626c (patch) | |
tree | e8c93b2cc57de810b0dfb0dc35a90727be4a57dc /contrib/checkSpace.pl | |
parent | d9d053d70b23ef46610867298dabdec579cef9c4 (diff) | |
download | tor-5a5be93f80a3cdb3d72311ece04ccc510c15626c.tar.gz tor-5a5be93f80a3cdb3d72311ece04ccc510c15626c.zip |
Normalize whitespace; add a "tell me about all the unnormalized whitespace" target; fix a braino in dirserv.c
svn:r2758
Diffstat (limited to 'contrib/checkSpace.pl')
-rwxr-xr-x | contrib/checkSpace.pl | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/contrib/checkSpace.pl b/contrib/checkSpace.pl new file mode 100755 index 0000000000..435df10601 --- /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); +} |