From ab577dee1ee0160047f246c8d3c32dd40d12aa95 Mon Sep 17 00:00:00 2001 From: Till Kamppeter Date: Sat, 1 Feb 2003 22:02:13 +0000 Subject: - Improved generation of printer list entries from manufacturer-supplied PostScript PPDs. --- perl-install/printer/main.pm | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'perl-install') diff --git a/perl-install/printer/main.pm b/perl-install/printer/main.pm index c919287bd..2ee75ba04 100644 --- a/perl-install/printer/main.pm +++ b/perl-install/printer/main.pm @@ -1361,7 +1361,7 @@ sub clean_manufacturer_name { $make =~ s/^SEIKO[\s\-]*EPSON/EPSON/i; $make =~ s/^KYOCERA[\s\-]*MITA/KYOCERA/i; $make =~ s/^CITOH/C.ITOH/i; - $make =~ s/^OKI(|[\s\-]*DATA)/OKIDATA/i; + $make =~ s/^OKI(|[\s\-]*DATA)\s*$/OKIDATA/i; $make =~ s/^(SILENTWRITER2?|COLORMATE)/NEC/i; $make =~ s/^(XPRINT|MAJESTIX)/XEROX/i; $make =~ s/^QMS-PS/QMS/i; @@ -1400,11 +1400,15 @@ sub ppd_entry_str { /^\s*(Generic\s*PostScript\s*Printer)\s*,?\s*(.*)$/i) || ($descr =~ /^\s*(PostScript\s*Printer)\s*,?\s*(.*)$/i) || - ($descr =~ /^([^,]+[^,\s])\s*(\(v?\d\d\d\d\.\d\d\d\).*)$/i) || - ($descr =~ /^([^,]+[^,\s])\s+(PS.*)$/i) || - ($descr =~ /^([^,]+[^,\s])\s*(PostScript.*)$/i) || - ($descr =~ /^([^,]+[^,\s])\s*(v\d+\.\d+.*)$/i) || - ($descr =~ /^([^,]+),\s*(.+)$/)) { + ($descr =~ /^([^,]+[^,\s])\s*,?\s*(Foomatic.*)$/i) || + ($descr =~ /^([^,]+[^,\s])\s*,?\s*(GhostScript.*)$/i) || + ($descr =~ /^([^,]+[^,\s])\s*,?\s*(CUPS.*)$/i) || + ($descr =~ + /^([^,]+[^,\s])\s*,?\s*(\(v?\d\d\d\d\.\d\d\d\).*)$/i) || + ($descr =~ /^([^,]+[^,\s])\s*,?\s*(v\d+\.\d+.*)$/i) || + ($descr =~ /^([^,]+[^,\s])\s*,?\s*(PostScript.*)$/i) || + ($descr =~ /^([^,]+[^,\s])\s*,?\s+(PS.*)$/i) || + ($descr =~ /^([^,]+)\s*,?\s*(.+)$/)) { $model = $1; $driver = $2; $model =~ s/[\-\s,]+$//; @@ -1443,6 +1447,11 @@ sub ppd_entry_str { if ($mf eq "EPSON") { $model =~ s/Stylus CX\-/Stylus CX/; } + # Remove the "Oki" from the beginning of the model names of Okidata + # printers + if ($mf eq "OKIDATA") { + $model =~ s/Oki\s+//i; + } # Try again to remove manufacturer's name from the beginning of the # model name, this with the cleaned manufacturer name $model =~ s/^$mf[\s\-]+//i -- cgit v1.2.1