Lines Matching +full:line +full:- +full:name
2 # SPDX-License-Identifier: GPL-2.0
4 # Clean a text file -- or directory of text files -- of stealth whitespace.
15 # Clean up space-tab sequences, either by removing spaces or
31 my $ntab = ($npos >> 3) - ($pos >> 3);
80 $name = basename($0);
85 if ($a =~ /^-/) {
86 if ($a eq '-width' || $a eq '-w') {
89 print STDERR "Usage: $name [-width #] files...\n";
98 print STDERR "$name: $f\n";
100 if (! -f $f) {
106 print STDERR "$name: Cannot open file: $f: $!\n";
125 print STDERR "$name: $f: binary file\n";
139 while ( defined($line = <FILE>) ) {
141 $in_bytes += length($line);
142 $line =~ s/[ \t\r]*$//; # Remove trailing spaces
143 $line = clean_space_tabs($line);
145 if ( $line eq "\n" ) {
146 push(@blanks, $line);
147 $blank_bytes += length($line);
151 push(@lines, $line);
152 $out_bytes += length($line);
157 $l_width = strwidth($line);
160 "$f:$lineno: line exceeds $max_width characters ($l_width)\n";
173 die "$name: Failed to truncate modified file: $f: $!\n";