Skip to content

Commit 724ad81

Browse files
authored
col: dead buffering code (#737)
* Partial file buffering code was removed in commit 5da850a * Argument to option -l was being validated as a number, but $opt_l was effectively unused * Remove validation code but it's not harmful keeping -l option as a stub since it appears in other versions (e.g. GNU and FreeBSD) * Update description of -l in POD
1 parent ce7db09 commit 724ad81

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

bin/col

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,9 @@ use constant EX_FAILURE => 1;
2323
my $Program = basename($0);
2424
our $VERSION = '1.2';
2525

26-
use vars qw($opt_b $opt_f $opt_h $opt_l $opt_p $opt_s $opt_t $opt_x);
26+
use vars qw($opt_b $opt_f $opt_h $opt_p $opt_s $opt_t $opt_x);
2727

2828
getopts('bfhpxl:st') or usage();
29-
if (defined $opt_l) {
30-
if ($opt_l !~ m/\A[0-9]+\Z/ || $opt_l == 0) {
31-
warn "$Program: bad -l argument: '$opt_l'\n";
32-
exit EX_FAILURE;
33-
}
34-
# multiply by 2 for half-lines
35-
$opt_l *= 2;
36-
} else {
37-
$opt_l = 512;
38-
}
3929
usage() if @ARGV;
4030

4131
my @buf = []; # character buffer
@@ -322,8 +312,7 @@ characters apart. This option takes precedence over the B<-h> option.
322312
323313
=item B<-l> I<num>
324314
325-
Buffer at least I<num> lines in memory. By default 256 lines (or 512
326-
half-lines) are buffered.
315+
This option is ignored for compatibility reasons.
327316
328317
=back
329318

0 commit comments

Comments
 (0)