161
194
print ",..." if ( $opt->{max_values} > 1 );
163
196
elsif ( $opt->{constraint_type} == SANE_CONSTRAINT_RANGE ) {
164
my $format = "%g..%g";
165
$format = "%d..%d" if ( $opt->{type} == SANE_TYPE_INT );
197
my $string_format = "%g..%g";
198
$string_format = "%d..%d" if ( $opt->{type} == SANE_TYPE_INT );
166
199
if ( $opt->{name} eq SANE_NAME_SCAN_BR_X ) {
167
$maxwindow = $opt->{constraint}{max} - $tl_x;
168
printf $format, $opt->{constraint}{min}, $maxwindow;
200
printf $string_format, $opt->{constraint}{min},
201
$opt->{constraint}{max} - $tl_x;
170
203
elsif ( $opt->{name} eq SANE_NAME_SCAN_BR_Y ) {
171
$maxwindow = $opt->{constraint}{max} - $tl_y;
172
printf $format, $opt->{constraint}{min}, $maxwindow;
204
printf $string_format, $opt->{constraint}{min},
205
$opt->{constraint}{max} - $tl_y;
175
printf $format, $opt->{constraint}{min}, $opt->{constraint}{max};
208
printf $string_format, $opt->{constraint}{min}, $opt->{constraint}{max};
177
210
print_unit( $opt->{unit} );
178
211
print ",..." if ( $opt->{max_values} > 1 );
427
443
and ( $opt->{unit} == SANE_UNIT_DPI )
428
444
and ( $opt->{name} eq SANE_NAME_SCAN_RESOLUTION ) );
430
# Keep track of top-left corner options (if they exist at
431
# all) and replace the bottom-right corner options by a
432
# width/height option (if they exist at all).
433
if ( ( $opt->{type} == SANE_TYPE_FIXED || $opt->{type} == SANE_TYPE_INT )
434
and ( $opt->{unit} == SANE_UNIT_MM || $opt->{unit} == SANE_UNIT_PIXEL ) )
436
if ( $opt->{name} eq SANE_NAME_SCAN_TL_X ) {
446
update_geometry( $opt, $i );
448
if ( $opt->{type} == SANE_TYPE_BOOL ) {
449
push @args, "$opt->{name}:s";
451
elsif ( $opt->{type} == SANE_TYPE_BUTTON ) {
452
push @args, $opt->{name};
455
push @args, "$opt->{name}=s";
459
# Initialize width & height options based on backend default
460
# values for top-left x/y and bottom-right x/y:
461
for ( my $i = 0 ; $i < 2 ; ++$i ) {
462
if ( $window[$i] and $window[ $i + 2 ] and not $window_val_user[$i] ) {
463
my $pos = $device->get_option( $window[ $i + 2 ] );
464
$window_val[$i] = $window_val[$i] - $pos if ( defined $pos );
470
# Keep track of top-left corner options (if they exist at
471
# all) and replace the bottom-right corner options by a
472
# width/height option (if they exist at all).
473
sub update_geometry {
474
my ( $opt, $i ) = @_;
475
if ( ( $opt->{type} == SANE_TYPE_FIXED || $opt->{type} == SANE_TYPE_INT )
476
and ( $opt->{unit} == SANE_UNIT_MM || $opt->{unit} == SANE_UNIT_PIXEL ) )
478
given ( $opt->{name} ) {
479
when (SANE_NAME_SCAN_TL_X) {
438
481
$opt->{name} = 'l';
440
elsif ( $opt->{name} eq SANE_NAME_SCAN_TL_Y ) {
483
when (SANE_NAME_SCAN_TL_Y) {
442
485
$opt->{name} = 't';
444
elsif ( $opt->{name} eq SANE_NAME_SCAN_BR_X ) {
487
when (SANE_NAME_SCAN_BR_X) {
446
489
$opt->{name} = 'x';
447
490
$window_option[0] = $opt;
544
if ( $opt->{type} == SANE_TYPE_BOOL ) {
545
$value = 1; # no argument means option is set
547
if ( $optarg =~ /^yes$/i ) {
550
elsif ( $optarg =~ /^no$/i ) {
555
"$prog_name: option --$opt->{name}: bad option value `$optarg'\n";
560
elsif ( $opt->{type} == SANE_TYPE_INT or $opt->{type} == SANE_TYPE_FIXED ) {
561
my @vector = parse_vector( $opt, $optarg );
564
elsif ( $opt->{type} == SANE_TYPE_STRING ) {
567
elsif ( $opt->{type} == SANE_TYPE_BUTTON ) {
568
$value = 0; # value doesn't matter
571
printf STDERR "$prog_name: duh, got unknown option type $opt->{type}\n";
568
given ( $opt->{type} ) {
569
when (SANE_TYPE_BOOL) {
570
$value = 1; # no argument means option is set
572
if ( $optarg =~ /^yes$/ix ) {
575
elsif ( $optarg =~ /^no$/ix ) {
580
"$prog_name: option --$opt->{name}: bad option value `$optarg'\n";
585
when ( $opt->{type} == SANE_TYPE_INT or $opt->{type} == SANE_TYPE_FIXED ) {
586
my @vector = parse_vector( $opt, $optarg );
589
when (SANE_TYPE_STRING) {
592
when (SANE_TYPE_BUTTON) {
593
$value = 0; # value doesn't matter
596
printf STDERR "$prog_name: duh, got unknown option type $opt->{type}\n";
574
600
set_option( $device, $optnum, $value );
578
604
sub write_pnm_header_to_file {
579
my ( $fh, $format, $width, $height, $depth ) = @_;
605
my ( $fh, $frame_format, $width, $height, $depth ) = @_;
581
607
# The netpbm-package does not define raw image data with maxval > 255.
582
608
# But writing maxval 65535 for 16bit data gives at least a chance
583
609
# to read the image.
585
if ($format == SANE_FRAME_RED
586
or $format == SANE_FRAME_GREEN
587
or $format == SANE_FRAME_BLUE
588
or $format == SANE_FRAME_RGB )
611
if ($frame_format == SANE_FRAME_RED
612
or $frame_format == SANE_FRAME_GREEN
613
or $frame_format == SANE_FRAME_BLUE
614
or $frame_format == SANE_FRAME_RGB )
590
616
printf $fh "P6\n# SANE data follows\n%d %d\n%d\n", $width, $height,
591
617
( $depth <= 8 ) ? 255 : 65535;
593
elsif ( $format == SANE_FRAME_GRAY ) {
619
elsif ( $frame_format == SANE_FRAME_GRAY ) {
594
620
if ( $depth == 1 ) {
595
621
printf $fh "P4\n# SANE data follows\n%d %d\n", $width, $height;
614
640
do { # extra braces to get last to work.
616
if ( $Sane::STATUS != SANE_STATUS_GOOD ) {
617
print STDERR "$prog_name: sane_start: $Sane::STATUS\n"
618
if ( $Sane::STATUS != SANE_STATUS_NO_DOCS );
622
$parm = $device->get_parameters;
623
if ( $Sane::STATUS != SANE_STATUS_GOOD ) {
624
print STDERR "$prog_name: sane_get_parameters: $Sane::STATUS\n";
628
open $fp, '>', $fname; ## no critic
630
print STDERR "Error opening output `$fname': $@\n";
631
$Sane::_status = SANE_STATUS_IO_ERROR;
637
if ( sane_isbasicframe( $parm->{format} ) ) {
638
if ( $parm->{lines} >= 0 ) {
639
printf STDERR "$prog_name: scanning image of size %dx%d pixels at "
641
$parm->{pixels_per_line}, $parm->{lines},
642
8 * $parm->{bytes_per_line} / $parm->{pixels_per_line};
645
printf STDERR "$prog_name: scanning image %d pixels wide and "
646
. "variable height at %d bits/pixel\n",
647
$parm->{pixels_per_line},
648
8 * $parm->{bytes_per_line} / $parm->{pixels_per_line};
652
printf STDERR "$prog_name: receiving %s frame "
657
, sane_strframe( $parm->{format} ),
658
$parm->{bytes_per_line},
659
$parm->{pixels_per_line},
665
printf STDERR "$prog_name: acquiring %s frame\n",
666
sane_strframe( $parm->{format} );
670
if ($parm->{format} == SANE_FRAME_RED
671
or $parm->{format} == SANE_FRAME_GREEN
672
or $parm->{format} == SANE_FRAME_BLUE )
674
die unless ( $parm->{depth} == 8 );
676
$offset = $parm->{format} - SANE_FRAME_RED;
678
elsif ( $parm->{format} == SANE_FRAME_RGB ) {
679
die unless ( $parm->{depth} == 8 );
681
if ($parm->{format} == SANE_FRAME_RGB
682
or $parm->{format} == SANE_FRAME_GRAY )
684
die unless ( ( $parm->{depth} == 1 ) || ( $parm->{depth} == 8 ) );
686
# if we're writing raw, we skip the header and never
687
# have to buffer a single frame format.
688
if ( $raw == SANE_FALSE ) {
689
if ( $parm->{lines} < 0 ) {
694
write_pnm_header_to_file( $fp, $parm->{format}, $parm->{pixels_per_line},
695
$parm->{lines}, $parm->{depth} );
699
elsif ( $parm->{format} == $SANE_FRAME_TEXT
700
or $parm->{format} == $SANE_FRAME_JPEG
701
or $parm->{format} == $SANE_FRAME_G31D
702
or $parm->{format} == $SANE_FRAME_G32D
703
or $parm->{format} == $SANE_FRAME_G42D )
705
if ( !$parm->{last_frame} ) {
706
$Sane::_status = SANE_STATUS_INVAL;
707
printf STDERR "$prog_name: bad %s frame: must be last_frame\n",
708
sane_strframe( $parm->{format} );
713
# write them out without a header; don't buffer
716
# Default action for unknown frametypes; write them out
717
# without a header; issue a warning in verbose mode.
718
# Since we're not writing a header, there's no need to
720
printf STDERR "$prog_name: unknown frame format $parm->{format}\n"
722
if ( !$parm->{last_frame} ) {
723
$Sane::_status = SANE_STATUS_INVAL;
724
printf STDERR "$prog_name: bad %s frame: must be last_frame\n",
725
sane_strframe( $parm->{format} );
732
unless ( $parm->{format} >= SANE_FRAME_RED
733
&& $parm->{format} <= SANE_FRAME_BLUE );
734
$offset = $parm->{format} - SANE_FRAME_RED;
735
$image{x} = $image{y} = 0;
641
log_frame_info( $parm, $fp, $fname, $first_frame );
643
my ( $must_buffer, $offset ) = initialise_scan( $parm, $first_frame, $fp );
739
646
my ( $buffer, $len ) = $device->read($buffer_size);
752
# We're either scanning a multi-frame image or the
753
# scanner doesn't know what the eventual image height
754
# will be (common for hand-held scanners). In either
755
# case, we need to buffer all data before we can write
757
if ($parm->{format} == SANE_FRAME_RED
758
or $parm->{format} == SANE_FRAME_GREEN
759
or $parm->{format} == SANE_FRAME_BLUE )
761
for ( my $i = 0 ; $i < $len ; ++$i ) {
762
$image{data}[ $offset + 3 * $i ] = substr( $buffer, $i, 1 );
766
elsif ( $parm->{format} == SANE_FRAME_RGB
767
or $parm->{format} == SANE_FRAME_GRAY )
769
for ( my $i = 0 ; $i < $len ; ++$i ) {
770
$image{data}[ $offset + $i ] = substr( $buffer, $i, 1 );
776
# optional frametypes are never buffered
777
printf STDERR "$prog_name: ERROR: trying to buffer %s frametype\n",
778
sane_strframe( $parm->{format} );
658
buffer_data( $fp, $parm, $buffer, $len, \%image, $offset, $must_buffer );
785
660
if ( $verbose && $parm->{depth} == 8 ) {
786
661
for ( split( //, $buffer ) ) {
692
my ( $parm, $fp, $fname, $first_frame ) = @_;
694
if ( $Sane::STATUS != SANE_STATUS_GOOD ) {
695
print STDERR "$prog_name: sane_start: $Sane::STATUS\n"
696
if ( $Sane::STATUS != SANE_STATUS_NO_DOCS );
700
$parm = $device->get_parameters;
701
if ( $Sane::STATUS != SANE_STATUS_GOOD ) {
702
print STDERR "$prog_name: sane_get_parameters: $Sane::STATUS\n";
706
unless ( open $fp, '>', $fname ) ## no critic (RequireBriefOpen)
708
print STDERR "Error opening output `$fname': $@\n";
709
$Sane::_status = ## no critic (ProhibitPackageVars ProtectPrivateVars)
710
SANE_STATUS_IO_ERROR;
716
if ( sane_isbasicframe( $parm->{format} ) ) {
717
if ( $parm->{lines} >= 0 ) {
718
printf STDERR "$prog_name: scanning image of size %dx%d pixels at "
720
$parm->{pixels_per_line}, $parm->{lines},
721
8 * $parm->{bytes_per_line} / $parm->{pixels_per_line};
724
printf STDERR "$prog_name: scanning image %d pixels wide and "
725
. "variable height at %d bits/pixel\n",
726
$parm->{pixels_per_line},
727
8 * $parm->{bytes_per_line} / $parm->{pixels_per_line};
731
printf STDERR "$prog_name: receiving %s frame "
735
. "depth=%d\n",, sane_strframe( $parm->{format} ),
736
$parm->{bytes_per_line},
737
$parm->{pixels_per_line},
743
printf STDERR "$prog_name: acquiring %s frame\n",
744
sane_strframe( $parm->{format} );
749
sub initialise_scan { ## no critic (ProhibitExcessComplexity)
750
my ( $parm, $first_frame, $fp ) = @_;
751
my ( $must_buffer, $offset );
753
if ($parm->{format} == SANE_FRAME_RED
754
or $parm->{format} == SANE_FRAME_GREEN
755
or $parm->{format} == SANE_FRAME_BLUE )
757
die # FIXME: compare message with SANE source, and give them patch if necessary
758
"Error: frame format $parm->{format}, but image depth=$parm->{depth} (expected 8)\n"
759
unless ( $parm->{depth} == 8 );
761
$offset = $parm->{format} - SANE_FRAME_RED;
763
elsif ( $parm->{format} == SANE_FRAME_RGB ) {
764
die # FIXME: compare message with SANE source, and give them patch if necessary
765
"Error: frame format $parm->{format}, but image depth=$parm->{depth} (expected 8)\n"
766
unless ( $parm->{depth} == 8 );
768
if ($parm->{format} == SANE_FRAME_RGB
769
or $parm->{format} == SANE_FRAME_GRAY )
771
die # FIXME: compare message with SANE source, and give them patch if necessary
772
"Error: frame format $parm->{format}, but image depth=$parm->{depth} (expected 1 or 8)\n"
773
unless ( ( $parm->{depth} == 1 ) || ( $parm->{depth} == 8 ) );
775
# if we're writing raw, we skip the header and never
776
# have to buffer a single frame format.
777
if ( $raw == SANE_FALSE ) {
778
if ( $parm->{lines} < 0 ) {
783
write_pnm_header_to_file( $fp, $parm->{format}, $parm->{pixels_per_line},
784
$parm->{lines}, $parm->{depth} );
788
elsif ( $parm->{format} == $SANE_FRAME_TEXT
789
or $parm->{format} == $SANE_FRAME_JPEG
790
or $parm->{format} == $SANE_FRAME_G31D
791
or $parm->{format} == $SANE_FRAME_G32D
792
or $parm->{format} == $SANE_FRAME_G42D )
794
if ( !$parm->{last_frame} ) {
795
$Sane::_status = ## no critic (ProhibitPackageVars ProtectPrivateVars)
797
printf STDERR "$prog_name: bad %s frame: must be last_frame\n",
798
sane_strframe( $parm->{format} );
803
# write them out without a header; don't buffer
806
# Default action for unknown frametypes; write them out
807
# without a header; issue a warning in verbose mode.
808
# Since we're not writing a header, there's no need to
810
printf STDERR "$prog_name: unknown frame format $parm->{format}\n"
812
if ( !$parm->{last_frame} ) {
813
$Sane::_status = ## no critic (ProhibitPackageVars ProtectPrivateVars)
815
printf STDERR "$prog_name: bad %s frame: must be last_frame\n",
816
sane_strframe( $parm->{format} );
822
die # FIXME: compare message with SANE source, and give them patch if necessary
823
"Error: frame format $parm->{format}, but expected SANE_FRAME_RED, SANE_FRAME_GREEN, or SANE_FRAME_BLUE\n"
824
if ( $parm->{format} < SANE_FRAME_RED
825
or $parm->{format} > SANE_FRAME_BLUE );
826
$offset = $parm->{format} - SANE_FRAME_RED;
828
return $must_buffer, $offset;
831
sub buffer_data { ## no critic (ProhibitManyArgs)
832
my ( $fp, $parm, $buffer, $len, $image, $offset, $must_buffer ) = @_;
835
# We're either scanning a multi-frame image or the
836
# scanner doesn't know what the eventual image height
837
# will be (common for hand-held scanners). In either
838
# case, we need to buffer all data before we can write
840
if ($parm->{format} == SANE_FRAME_RED
841
or $parm->{format} == SANE_FRAME_GREEN
842
or $parm->{format} == SANE_FRAME_BLUE )
844
for ( my $i = 0 ; $i < $len ; ++$i ) {
845
$image->{data}[ $offset + 3 * $i ] = substr( $buffer, $i, 1 );
849
elsif ( $parm->{format} == SANE_FRAME_RGB
850
or $parm->{format} == SANE_FRAME_GRAY )
852
for ( my $i = 0 ; $i < $len ; ++$i ) {
853
$image->{data}[ $offset + $i ] = substr( $buffer, $i, 1 );
859
# optional frametypes are never buffered
860
printf STDERR "$prog_name: ERROR: trying to buffer %s frametype\n",
861
sane_strframe( $parm->{format} );
871
my ( $fp, $image, $parm ) = @_;
872
if ( $parm->{lines} > 0 ) {
873
$image->{height} = $parm->{lines};
876
$image->{height} = @{ $image->{data} } / $parm->{pixels_per_line};
877
$image->{height} /= 3
878
if ( $parm->{format} == SANE_FRAME_RED
879
or $parm->{format} == SANE_FRAME_GREEN
880
or $parm->{format} == SANE_FRAME_BLUE );
882
if ( $raw == SANE_FALSE ) {
884
# if we're writing raw, we skip the header
885
write_pnm_header_to_file( $fp, $parm->{format}, $parm->{pixels_per_line},
886
$image->{height}, $parm->{depth} );
888
for ( @{ $image->{data} } ) { print $fp $_; }
833
my ( $start, $end, $no_overwrite, $raw, $outfmt, $script ) = @_;
893
my ( $start, $end, $outfmt, $script ) = @_;
835
$Sane::_status = SANE_STATUS_GOOD;
895
$Sane::_status = ## no critic (ProhibitPackageVars ProtectPrivateVars)
836
897
my $scannedPages = 0;
838
899
while ( $end < 0 || $start <= $end ) {
944
sub process_arguments {
946
# re-enable error printing and arg permutation
947
Getopt::Long::Configure('no_pass_through');
949
# There seems to be a bug in Getopt::Long 2.37 where l is treated as L whilst
950
# l is not in @args. Therefore the workaround is to rename l to m for the first
951
# scan and back to l for the second.
953
$_ = '-l' if ( $_ eq '-m' );
954
$_ = '-t' if ( $_ eq '-u' );
956
my @ARGV_old = @ARGV;
957
exit 1 if ( !GetOptions(@args) );
959
# As it isn't possible to get the argument order from Getopt::Long 2.37, do
965
my $i = index( $ch, '=' );
966
$ch = substr( $ch, 0, $i ) if ( $i > -1 );
974
if ( defined $options{$ch} ) {
977
$window_val_user[0] = 1;
978
( $window_val[0] ) = parse_vector( $window_option[0], $options{x} );
981
$window_val_user[1] = 1;
982
( $window_val[1] ) = parse_vector( $window_option[1], $options{y} );
985
process_backend_option( $device, $window[2], $options{l} );
988
process_backend_option( $device, $window[3], $options{t} );
991
process_backend_option( $device, $option_number{$ch}, $options{$ch} );
997
for ( my $index = 0 ; $index < 2 ; ++$index ) {
998
if ( $window[$index] and defined( $window_val[$index] ) ) {
999
my $val = $window_val[$index] - 1;
1000
if ( $window[ $index + 2 ] ) {
1001
my $pos = $device->get_option( $window[ $index + 2 ] );
1002
$val = $pos + $window_val[$index] if ( defined $pos );
1004
set_option( $device, $window[$index], $val );
1011
printf "\nOptions specific to device `%s':\n", $devname;
1013
for ( my $i = 0 ; $i < $num_dev_options ; ++$i ) {
1014
my $short_name = '';
1017
for ( my $j = 0 ; $j < 4 ; ++$j ) {
1018
if ( $i == $window[$j] ) {
1019
$short_name = substr( "xylt", $j, 1 );
1020
$opt = $window_option[$j] if ( $j < 2 );
1023
$opt = $device->get_option_descriptor($i) if ( !$opt );
1025
printf " %s:\n", $opt->{title} if ( $opt->{type} == SANE_TYPE_GROUP );
1027
next if ( !( $opt->{cap} & SANE_CAP_SOFT_SELECT ) );
1029
print_option( $device, $i, $short_name );
1031
print "\n" if ($num_dev_options);
1035
sub list_device_names {
1037
"Type ``$prog_name --help -d DEVICE'' to get list of all options for DEVICE.\n\nList of available devices:";
1038
my @device_list = Sane->get_devices;
1039
if ( $Sane::STATUS == SANE_STATUS_GOOD ) {
1042
foreach (@device_list) {
1043
if ( $column + length( $_->{name} ) + 1 >= 80 ) {
1047
if ( $column > 4 ) {
1052
$column += length( $_->{name} );
880
1059
# There seems to be a bug in Getopt::Long 2.37 where l is treated as L whilst
881
1060
# l is not in @args. Therefore the workaround is to rename l to m for the first
882
1061
# scan and back to l for the second.
964
1148
if ( defined($device) ) {
965
1149
fetch_options($device);
967
# re-enable error printing and arg permutation
968
Getopt::Long::Configure('no_pass_through');
970
# There seems to be a bug in Getopt::Long 2.37 where l is treated as L whilst
971
# l is not in @args. Therefore the workaround is to rename l to m for the first
972
# scan and back to l for the second.
974
$_ = '-l' if ( $_ eq '-m' );
975
$_ = '-t' if ( $_ eq '-u' );
977
my @ARGV_old = @ARGV;
978
exit 1 if ( !GetOptions(@args) );
980
# As it isn't possible to get the argument order from Getopt::Long 2.37, do
986
my $i = index( $ch, '=' );
987
$ch = substr( $ch, 0, $i ) if ( $i > -1 );
995
if ( defined $options{$ch} ) {
997
$window_val_user[0] = 1;
998
( $window_val[0] ) = parse_vector( $window_option[0], $options{x} );
1000
elsif ( $ch eq 'y' ) {
1001
$window_val_user[1] = 1;
1002
( $window_val[1] ) = parse_vector( $window_option[1], $options{y} );
1004
elsif ( $ch eq 'l' ) { # tl-x
1005
process_backend_option( $device, $window[2], $options{l} );
1007
elsif ( $ch eq 't' ) { # tl-y
1008
process_backend_option( $device, $window[3], $options{t} );
1011
process_backend_option( $device, $option_number{$ch}, $options{$ch} );
1016
for ( my $index = 0 ; $index < 2 ; ++$index ) {
1017
if ( $window[$index] and defined( $window_val[$index] ) ) {
1018
my $val = $window_val[$index] - 1;
1019
if ( $window[ $index + 2 ] ) {
1020
my $pos = $device->get_option( $window[ $index + 2 ] );
1021
$val = $pos + $window_val[$index] if ( defined $pos );
1023
set_option( $device, $window[$index], $val );
1150
process_arguments();
1027
printf "\nOptions specific to device `%s':\n", $devname;
1029
for ( my $i = 0 ; $i < $num_dev_options ; ++$i ) {
1030
my $short_name = '';
1033
for ( my $j = 0 ; $j < 4 ; ++$j ) {
1034
if ( $i == $window[$j] ) {
1035
$short_name = substr( "xylt", $j, 1 );
1036
$opt = $window_option[$j] if ( $j < 2 );
1039
$opt = $device->get_option_descriptor($i) if ( !$opt );
1041
printf " %s:\n", $opt->{title} if ( $opt->{type} == SANE_TYPE_GROUP );
1043
next if ( !( $opt->{cap} & SANE_CAP_SOFT_SELECT ) );
1045
print_option( $device, $i, $short_name );
1047
print "\n" if ($num_dev_options);
1053
"Type ``$prog_name --help -d DEVICE'' to get list of all options for DEVICE.\n\nList of available devices:";
1054
my @device_list = Sane->get_devices;
1055
if ( $Sane::STATUS == SANE_STATUS_GOOD ) {
1058
foreach (@device_list) {
1059
if ( $column + length( $_->{name} ) + 1 >= 80 ) {
1063
if ( $column > 4 ) {
1068
$column += length( $_->{name} );
1158
list_device_names();