[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



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