[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Normalize whitespace; add a "tell me about all the unnormal...
- To: or-cvs@freehaven.net
- Subject: [or-cvs] Normalize whitespace; add a "tell me about all the unnormal...
- From: nickm@seul.org (Nick Mathewson)
- Date: Tue, 9 Nov 2004 15:04:02 -0500 (EST)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Tue, 09 Nov 2004 15:04:34 -0500
- Reply-to: or-dev@freehaven.net
- Sender: owner-or-cvs@freehaven.net
Update of /home/or/cvsroot/contrib
In directory moria.mit.edu:/tmp/cvs-serv28856/contrib
Added Files:
checkSpace.pl
Log Message:
Normalize whitespace; add a "tell me about all the unnormalized whitespace" target; fix a braino in dirserv.c
--- NEW FILE: checkSpace.pl ---
#!/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);
}