Lines Matching +full:sub +full:- +full:spaces
1 #!/usr/bin/perl -w
3 # Clean a patch file -- or directory of patch files -- of stealth whitespace.
13 # Clean up space-tab sequences, either by removing spaces or
15 sub clean_space_tabs($)
29 my $ntab = ($npos >> 3) - ($pos >> 3);
54 sub strwidth($) {
83 if ($a =~ /^-/) {
84 if ($a eq '-width' || $a eq '-w') {
87 print STDERR "Usage: $name [-width #] files...\n";
98 if (! -f $f) {
144 /^\@\@\s+\-([0-9]+),([0-9]+)\s+\+([0-9]+),([0-9]+)\s\@\@/) {
159 $plus_lines--;
162 $text =~ s/[ \t\r]*$//; # Remove trailing spaces
173 } elsif ($line =~ /^\-/) {
174 $minus_lines--;
177 $plus_lines--;
178 $minus_lines--;
198 for ($i = scalar(@hunk_lines)-1; $i > 0; $i--) {
215 ($l =~ /^\@\@\s+\-([0-9]+),([0-9]+)\s+\+([0-9]+),([0-9]+)\s\@\@(.*)$/);
222 $l = sprintf("@@ -%d,%d +%d,%d @@%s\n",
223 $mstart, $mlin, $pstart, $plin-$adj,