X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fblank.pl;h=4a91b70fdc6374aa0cbd77fbc9b245b94748cf8f;hb=refs%2Fheads%2Fspider;hp=fb559a92ca75c9068bdddc749e797d35eeff5df3;hpb=46ac39b6f5ae340d6ce5ab930f712e1f3a367b57;p=spider.git diff --git a/cmd/blank.pl b/cmd/blank.pl index fb559a92..4a91b70f 100644 --- a/cmd/blank.pl +++ b/cmd/blank.pl @@ -3,23 +3,32 @@ # # Copyright (c) 1998 Dirk Koopman G1TLH # -# $Id$ +# # -my ($self, $line) = @_; -my $lines = 1; -my $data = ' '; -my @f = split /\s+/, $line; -if (@f && $f[0] !~ /^\d+$/) { - $data = shift @f; - $data = $data x int(($self->width-1) / length($data)); - $data .= substr $data, 0, int(($self->width-1) % length($data)) -} -if (@f && $f[0] =~ /^\d+$/) { - $lines = shift @f; - $lines = 9 if $lines < 9; - $lines = 1 if $lines < 1; +sub this {}; + +sub that {}; + +sub another {} + +sub handle +{ + my ($self, $line) = @_; + my $lines = 1; + my $data = ' '; + my @f = split /\s+/, $line; + if (@f && $f[0] !~ /^\d+$/) { + $data = shift @f; + $data = $data x int(($self->width-1) / length($data)); + $data .= substr $data, 0, int(($self->width-1) % length($data)) + } + if (@f && $f[0] =~ /^\d+$/) { + $lines = shift @f; + $lines = 9 if $lines > 9; + $lines = 1 if $lines < 1; + } + my @out; + push @out, $data for (1..$lines); + return (1, @out); } -my @out; -push @out, $data for (1..$lines); -return (1, @out);