summaryrefslogtreecommitdiffstats
path: root/perl-install/printer.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2000-04-10 14:06:56 +0000
committerFrancois Pons <fpons@mandriva.com>2000-04-10 14:06:56 +0000
commitf8ce98a9ff2c26b6b7e613e4c994382c509aa630 (patch)
tree78bdb38600e4b063e772b534a94515201c6ce701 /perl-install/printer.pm
parenta4e04610e2ce4e8f97805ba06bd4a02a6dac49f5 (diff)
downloaddrakx-backup-do-not-use-f8ce98a9ff2c26b6b7e613e4c994382c509aa630.tar
drakx-backup-do-not-use-f8ce98a9ff2c26b6b7e613e4c994382c509aa630.tar.gz
drakx-backup-do-not-use-f8ce98a9ff2c26b6b7e613e4c994382c509aa630.tar.bz2
drakx-backup-do-not-use-f8ce98a9ff2c26b6b7e613e4c994382c509aa630.tar.xz
drakx-backup-do-not-use-f8ce98a9ff2c26b6b7e613e4c994382c509aa630.zip
*** empty log message ***
Diffstat (limited to 'perl-install/printer.pm')
-rw-r--r--perl-install/printer.pm23
1 files changed, 12 insertions, 11 deletions
diff --git a/perl-install/printer.pm b/perl-install/printer.pm
index f7e847b9f..66db36844 100644
--- a/perl-install/printer.pm
+++ b/perl-install/printer.pm
@@ -28,7 +28,7 @@ use strict;
=cut
#-#####################################################################################
-use vars qw(%thedb %thedb_gsdriver %printer_type %printer_type_inv $printer_type_default @papersize_type %fields $spooldir @entries_db_short @entry_db_description %descr_to_db %db_to_descr);
+use vars qw(%thedb %thedb_gsdriver %printer_type %printer_type_inv $printer_type_default @papersize_type %fields $spooldir @entries_db_short @entry_db_description %descr_to_help %descr_to_db %db_to_descr);
#-#####################################################################################
=head2 Imports
@@ -355,16 +355,16 @@ sub read_printer_db(;$) {
SWITCH: {
/GSDriver:\s*(\w*)/ and do { $entry->{GSDRIVER} = $1; last SWITCH };
/Description:\s*{(.*)}/ and do { $entry->{DESCR} = $1; last SWITCH };
- /About:\s*{(.*)}/ and do { $entry->{ABOUT} = $1; last SWITCH };
- /About:\s*{(.*)/
- and do
- {
- my $string = "$1\n";
- while (<DBPATH>) {
- /(.*)}/ and do { $entry->{ABOUT} = $string; last SWITCH };
- $string .= $_;
- }
- };
+ /About:\s*{\s*(.*?)\s*}/ and do { $entry->{ABOUT} = $1; last SWITCH };
+ /About:\s*{\s*(.*?)\s*\\\s*$/
+ and do {
+ my $string = $1;
+ while (<DBPATH>) {
+ $string =~ /\S$/ and $string .= ' ';
+ /^\s*(.*?)\s*\\\s*$/ and $string .= $1;
+ /^\s*(.*?)\s*}\s*$/ and do { $entry->{ABOUT} = $string . $1; last SWITCH };
+ }
+ };
/Resolution:\s*{(.*)}\s*{(.*)}\s*{(.*)}/
and do { push @{$entry->{RESOLUTION} ||= []}, { XDPI => $1, YDPI => $2, DESCR => $3 }; last SWITCH };
/BitsPerPixel:\s*{(.*)}\s*{(.*)}/
@@ -382,6 +382,7 @@ sub read_printer_db(;$) {
@entries_db_short = sort keys %printer::thedb;
%descr_to_db = map { $printer::thedb{$_}{DESCR}, $_ } @entries_db_short;
+ %descr_to_help = map { $printer::thedb{$_}{DESCR}, $printer::thedb{$_}{ABOUT} } @entries_db_short;
@entry_db_description = keys %descr_to_db;
%db_to_descr = reverse %descr_to_db;
}