summaryrefslogtreecommitdiffstats
path: root/perl-install/printer/printerdrake.pm
diff options
context:
space:
mode:
authorTill Kamppeter <tkamppeter@mandriva.com>2003-08-22 20:23:01 +0000
committerTill Kamppeter <tkamppeter@mandriva.com>2003-08-22 20:23:01 +0000
commit80f25b9dafc6fb4c53294b7cca25ef8150d531ec (patch)
tree0ffe8d8b7d57e9f1884ed949b7c648aa026028f3 /perl-install/printer/printerdrake.pm
parent445ed2cb538df49e619f4fa63d6372de973e0757 (diff)
downloaddrakx-80f25b9dafc6fb4c53294b7cca25ef8150d531ec.tar
drakx-80f25b9dafc6fb4c53294b7cca25ef8150d531ec.tar.gz
drakx-80f25b9dafc6fb4c53294b7cca25ef8150d531ec.tar.bz2
drakx-80f25b9dafc6fb4c53294b7cca25ef8150d531ec.tar.xz
drakx-80f25b9dafc6fb4c53294b7cca25ef8150d531ec.zip
Support for the new "ptal://..." (two slashes) URIs of the new HPOJ.
Diffstat (limited to 'perl-install/printer/printerdrake.pm')
-rw-r--r--perl-install/printer/printerdrake.pm18
1 files changed, 9 insertions, 9 deletions
diff --git a/perl-install/printer/printerdrake.pm b/perl-install/printer/printerdrake.pm
index f0c73eaf1..4a68cfbac 100644
--- a/perl-install/printer/printerdrake.pm
+++ b/perl-install/printer/printerdrake.pm
@@ -1476,13 +1476,13 @@ sub setup_socket {
my ($uri, $remotehost, $remoteport);
my $queue = $printer->{OLD_QUEUE};
if ($printer->{configured}{$queue} &&
- $printer->{currentqueue}{connect} =~ m!^(socket:|ptal:/hpjd:)!) {
+ $printer->{currentqueue}{connect} =~ m!^(socket:|ptal://?hpjd:)!) {
$uri = $printer->{currentqueue}{connect};
if ($uri =~ m!^ptal:!) {
- if ($uri =~ m!^ptal:/hpjd:([^/:]+):([0-9]+)/?\s*$!) {
+ if ($uri =~ m!^ptal://?hpjd:([^/:]+):([0-9]+)/?\s*$!) {
my $ptalport = $2 - 9100;
($remotehost, $remoteport) = ($1, $ptalport);
- } elsif ($uri =~ m!^ptal:/hpjd:([^/:]+)\s*$!) {
+ } elsif ($uri =~ m!^ptal://?hpjd:([^/:]+)\s*$!) {
($remotehost, $remoteport) = ($1, 9100);
}
} else {
@@ -1528,7 +1528,7 @@ sub setup_socket {
$menuentries->{$a} cmp $menuentries->{$b};
} keys(%$menuentries);
if ($printer->{configured}{$queue} &&
- $printer->{currentqueue}{connect} =~ m!^(socket:|ptal:/hpjd:)! &&
+ $printer->{currentqueue}{connect} =~ m!^(socket:|ptal://?hpjd:)! &&
$menuchoice eq "") {
my $menustr;
if ($printer->{currentqueue}{make}) {
@@ -1852,7 +1852,7 @@ sub setup_common {
if (!$printer->{noninteractive}) {
my $text = "";
# Inform user about how to scan with his MF device
- $text = scanner_help($makemodel, "ptal:/$ptaldevice");
+ $text = scanner_help($makemodel, "ptal://$ptaldevice");
if ($text) {
undef $w;
$in->ask_warn
@@ -1861,7 +1861,7 @@ sub setup_common {
}
# Inform user about how to access photo cards with his
# MF device
- $text = photocard_help($makemodel, "ptal:/$ptaldevice");
+ $text = photocard_help($makemodel, "ptal://$ptaldevice");
if ($text) {
undef $w;
$in->ask_warn(N("Photo memory card access on your HP multi-function device"),
@@ -1869,7 +1869,7 @@ sub setup_common {
}
}
# make the DeviceURI from $ptaldevice.
- $printer->{currentqueue}{connect} = "ptal:/" . $ptaldevice;
+ $printer->{currentqueue}{connect} = "ptal://" . $ptaldevice;
} else {
# make the DeviceURI from $device.
$printer->{currentqueue}{connect} = $device;
@@ -3006,7 +3006,7 @@ N("To know about the options available for the current printer read either the l
sub scanner_help {
my ($makemodel, $deviceuri) = @_;
- if ($deviceuri =~ m!^ptal:/(.*)$!) {
+ if ($deviceuri =~ m!^ptal://?(.*?)$!) {
my $ptaldevice = $1;
if ($makemodel !~ /HP\s+PhotoSmart/i &&
$makemodel !~ /HP\s+LaserJet\s+2200/i) {
@@ -3024,7 +3024,7 @@ Do not use \"scannerdrake\" for this device!",
sub photocard_help {
my ($makemodel, $deviceuri) = @_;
- if ($deviceuri =~ m!^ptal:/(.*)$!) {
+ if ($deviceuri =~ m!^ptal://?(.*?)$!) {
my $ptaldevice = $1;
if (($makemodel =~ /HP\s+PhotoSmart/i ||
$makemodel =~ /HP\s+PSC\s*9[05]0/i ||