fix console.pl max scroll depth
[spider.git] / cmd / blank.pl
1 #
2 # Print n blank lines
3 #
4 # Copyright (c) 1998 Dirk Koopman G1TLH
5 #
6 #
7 #
8
9 sub this {};
10
11 sub that {};
12
13 sub another {}
14
15 sub handle
16 {
17                 my ($self, $line) = @_;
18                 my $lines = 1;
19                 my $data = ' ';
20                 my @f = split /\s+/, $line;
21                 if (@f && $f[0] !~ /^\d+$/) {
22                         $data = shift @f;
23                         $data = $data x int(($self->width-1) / length($data));
24                         $data .= substr $data, 0, int(($self->width-1) % length($data))
25                 }
26                 if (@f && $f[0] =~ /^\d+$/) {
27                         $lines = shift @f;
28                         $lines = 9 if $lines > 9;
29                         $lines = 1 if $lines < 1;
30                 }
31                 my @out;
32                 push @out, $data for (1..$lines);
33                 return (1, @out);
34 }