[or-cvs] Normalize whitespace; add a "tell me about all the unnormal...

Nick Mathewson nickm at seul.org
Tue Nov 9 20:04:02 UTC 2004


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);
}



More information about the tor-commits mailing list