Mailinglist Archive: opensuse-commit (1059 mails)
| < Previous | Next > |
commit foomatic-filters
- From: root@xxxxxxxxxxxxxxx (h_root)
- Date: Thu, 17 Jan 2008 22:55:04 +0100
- Message-id: <20080117215504.7B34C678335@xxxxxxxxxxxxxxx>
Hello community,
here is the log from the commit of package foomatic-filters
checked in at Thu Jan 17 22:55:04 CET 2008.
--------
--- foomatic-filters/foomatic-filters.changes 2007-08-02 14:01:43.000000000
+0200
+++ /mounts/work_src_done/STABLE/foomatic-filters/foomatic-filters.changes
2008-01-16 15:25:29.823290000 +0100
@@ -1,0 +2,11 @@
+Wed Jan 16 15:24:20 CET 2008 - kssingvo@xxxxxxx
+
+- update to latest bzr version:
+ * Allow the parameters of the \"*Foomatic...\" lines which formerly
+ had to be given without quotes also to be given with double quotes.
+ * Assorted fixes of bugs found during LSB test suite development
+ * Fixed wrong handling of CUPS duplex option \"sides\", and bug when
+ having more than one option with page overrides.
+ * Let Ghostscript always use buffered input.
+
+-------------------------------------------------------------------
Old:
----
foomatic-filters-bzr-20070731.tar.bz2
New:
----
foomatic-filters-bzr-20080116.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ foomatic-filters.spec ++++++
--- /var/tmp/diff_new_pack.S31828/_old 2008-01-17 22:51:46.000000000 +0100
+++ /var/tmp/diff_new_pack.S31828/_new 2008-01-17 22:51:46.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package foomatic-filters (Version 3.0.2)
#
-# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@@ -12,17 +12,17 @@
Name: foomatic-filters
BuildRequires: a2ps
-%define cvsdate bzr-20070731
+%define cvsdate bzr-20080116
License: GPL v2 or later
Group: Hardware/Printing
Requires: perl, a2ps
-Autoreqprov: on
+AutoReqProv: on
Version: 3.0.2
-Release: 104
+Release: 165
Source0: %{name}-%{cvsdate}.tar.bz2
# Source0: %{name}-%{version}.tar.bz2
Patch0: %{name}-3.0.1-exec.patch
-URL: http://www.linuxprinting.org/
+Url: http://www.linuxprinting.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: Filter Scripts Used by Printer Spoolers
#PreReq: %insserv_prereq %fillup_prereq
@@ -86,7 +86,15 @@
%doc COPYING ChangeLog README TODO USAGE
%changelog
-* Thu Aug 02 2007 - kssingvo@xxxxxxx
+* Wed Jan 16 2008 kssingvo@xxxxxxx
+- update to latest bzr version:
+ * Allow the parameters of the \"*Foomatic...\" lines which formerly
+ had to be given without quotes also to be given with double quotes.
+ * Assorted fixes of bugs found during LSB test suite development
+ * Fixed wrong handling of CUPS duplex option \"sides\", and bug when
+ having more than one option with page overrides.
+ * Let Ghostscript always use buffered input.
+* Thu Aug 02 2007 kssingvo@xxxxxxx
- update to latest bzr version:
* Added support for suppressing page accounting on a per-driver basis.
* Performance improvement
@@ -99,13 +107,13 @@
data of GhostScript is read line-wise
* Replaced "linuxprinting.org" by "openprinting.org" or
"OpenPrinting".
-* Wed Oct 18 2006 - kssingvo@xxxxxxx
+* Wed Oct 18 2006 kssingvo@xxxxxxx
- update to new upstream version: contains "fix of bashism"
-* Mon Oct 09 2006 - jsmeix@xxxxxxx
+* Mon Oct 09 2006 jsmeix@xxxxxxx
- fixed cyclic 'foomatic-rip -> foomatic-rip' link to the
correct link: 'foomatic-rip -> ../../../bin/foomatic-rip'
(bugzilla#210924).
-* Wed Sep 20 2006 - kssingvo@xxxxxxx
+* Wed Sep 20 2006 kssingvo@xxxxxxx
- updated to latest bzr (kind of cvs) version:
- foomatic-gswrapper.in: Support for built-in redirection of standard
output of PostScript programs ("-sstdout=%%stderr") in newer
@@ -168,41 +176,41 @@
one is supplied (ex: "@PJL HOLD=STORE"). Thanks to Jociel Cavalcante
Andrade (jcainfo at inf dot ufes dot br) for reporting the bug and
testing the fix.
-* Tue May 23 2006 - kssingvo@xxxxxxx
+* Tue May 23 2006 kssingvo@xxxxxxx
- fixed remote command execution vulnerability SWAMP#4432 (bugzilla#59233)
-* Wed Jan 25 2006 - mls@xxxxxxx
+* Wed Jan 25 2006 mls@xxxxxxx
- converted neededforbuild to BuildRequires
-* Fri Jan 13 2006 - meissner@xxxxxxx
+* Fri Jan 13 2006 meissner@xxxxxxx
- use -fstack-protector.
-* Wed Dec 21 2005 - aj@xxxxxxx
+* Wed Dec 21 2005 aj@xxxxxxx
- Remove unpackaged symlinks on lib64 as well.
-* Wed Dec 21 2005 - ro@xxxxxxx
+* Wed Dec 21 2005 ro@xxxxxxx
- remove unpackaged symlinks
-* Tue Feb 22 2005 - kssingvo@xxxxxxx
+* Tue Feb 22 2005 kssingvo@xxxxxxx
- upgrade to 3.0.2, which contains the below security fix only
-* Thu Sep 23 2004 - kssingvo@xxxxxxx
+* Thu Sep 23 2004 kssingvo@xxxxxxx
- forget to add cupsomatic as foomatic-rip link (backward compatible)
-* Tue Sep 14 2004 - kssingvo@xxxxxxx
+* Tue Sep 14 2004 kssingvo@xxxxxxx
- upgrade to CVS version to keep in sync with cups-drivers package
- author told me that foomatic-rip is 100%% compatible with cupsomatic
made soft-link
-* Mon Aug 30 2004 - kssingvo@xxxxxxx
+* Mon Aug 30 2004 kssingvo@xxxxxxx
- fixes for security problem in foomatic-rip, CAN-2004-0801
(bugzilla#44233)
-* Mon Mar 01 2004 - kssingvo@xxxxxxx
+* Mon Mar 01 2004 kssingvo@xxxxxxx
- upgrade to version 3.0.1
-* Sun Jan 11 2004 - adrian@xxxxxxx
+* Sun Jan 11 2004 adrian@xxxxxxx
- build as user
-* Mon Aug 25 2003 - kssingvo@xxxxxxx
+* Mon Aug 25 2003 kssingvo@xxxxxxx
- updated to 2003-08-21 version (fix for PS code insertion)
-* Mon Jul 28 2003 - kssingvo@xxxxxxx
+* Mon Jul 28 2003 kssingvo@xxxxxxx
- fixed problem in version name (removed %%cvsdate) - thx meissner
-* Tue Jul 15 2003 - meissner@xxxxxxx
+* Tue Jul 15 2003 meissner@xxxxxxx
- lib64 fixes.
-* Fri Jul 04 2003 - kssingvo@xxxxxxx
+* Fri Jul 04 2003 kssingvo@xxxxxxx
- It's coolo's fault: cannot add cups related link to cups package. :(
it's now in this package (ugly and hopefully temporary solution)
-* Fri Jul 04 2003 - ro@xxxxxxx
+* Fri Jul 04 2003 ro@xxxxxxx
- added directory to filelist /etc/foomatic
-* Fri Jul 04 2003 - kssingvo@xxxxxxx
+* Fri Jul 04 2003 kssingvo@xxxxxxx
- initial version
++++++ foomatic-filters-bzr-20070731.tar.bz2 ->
foomatic-filters-bzr-20080116.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/foomatic-filters-bzr-20070731/ChangeLog
new/foomatic-filters-bzr-20080116/ChangeLog
--- old/foomatic-filters-bzr-20070731/ChangeLog 2007-07-31 11:57:52.000000000
+0200
+++ new/foomatic-filters-bzr-20080116/ChangeLog 2008-01-10 16:21:48.000000000
+0100
@@ -1,3 +1,63 @@
+2007-12-04 Till Kamppeter <till.kamppeter@xxxxxxxxx>
+
+ * foomatic-gswrapper.in: Let Ghostscript always use buffered
+ input. This works around a Ghostscript bug which prevents
+ printing encrypted PDF files with Adobe Reader 8.1.1 and
+ Ghostscript built as shared library (Ghostscript bug #689577,
+ Ubuntu bug #172264).
+
+2007-11-30 Till Kamppeter <till.kamppeter@xxxxxxxxx>
+
+ * foomatic-rip.in: More bug fixes:
+ o If the CUPS-style duples option
+ "-o sides={one|two}-sided[-{long|short}-edge]" was supplied,
+ the "Duplex" option could be set to "0", "LongEdge", or
+ "ShortEdge", which do not exist in the "Duplex" options in
+ PPD files (Thanks to Ricoh Japan for reporting this bug).
+ o Now all of "LongEdge", "DuplexNoTumble", or "ShortEdge",
+ "DuplexTumble", are converted to each other if supplied as
+ value to an enumerated choice option (usually "Duplex") and
+ this value is not in the list of choices.
+ o Removed the unused variable "$rangeend" from the
+ parsepageranges() function.
+ o Reset the best score for finding the narrowest page range
+ before treating each option, not only before the first
+ option. Now jobs with page overrides on more than one
+ option are executed correctly.
+
+2007-11-23 Till Kamppeter <till.kamppeter@xxxxxxxxx>
+
+ * foomatic-rip.in: Several fixes for bugs found while developing
+ the foomatic-rip test suite for the LSB 3.2:
+ o If an option had the default value "0" (enumerated choice,
+ numerical, string) in the PPD file, the first choice from
+ the list was set as default and not "0".
+ o When assigning a non-integer number to an integer option,
+ the "%%BeginFeature: ..." line of the option inserted into
+ the PostScript data stream still contained the non-integer
+ value. Only the value in the code piece was converted to
+ integer.
+ o If a non-integer "*FoomaticRIPDefault..." was given for an
+ integer option it was not converted to integer.
+ o Boolean options had "0" and "1" as values in the
+ "%%BeginFeature: ..." lines and not "False" and "True".
+ o PPD-supplied JCL/PJL options did not get merged with
+ driver-generated JCL/PJL options when there were spaces
+ between the JCL command and the "=" (ex: "@PJL SET TRAY = 1").
+ o Now all of "0", "No", "Off", "False" or "1", "Yes", "On",
+ "True" are converted to each other if supplied as value to
+ an enumerated choice option and this value is not in the
+ list of choices.
+
+2007-10-11 Till Kamppeter <till.kamppeter@xxxxxxxxx>
+
+ * foomatic-rip.in: Allow the parameters of the "*Foomatic..."
+ lines which formerly had to be given without quotes also to be
+ given with double quotes. This is to support generation and
+ manipulation of Foomatic PPDs with the CUPS DDK. The PPD
+ generator of the CUPS DDK ("ppdc") can create these lines only
+ with quoted parameters (See http://www.cups.org/str.php?L2551).
+
2007-07-18 Till Kamppeter <till.kamppeter@xxxxxxxxx>
* foomatic-rip.in: Added support for suppressing page accounting
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/foomatic-filters-bzr-20070731/foomatic-gswrapper.in
new/foomatic-filters-bzr-20080116/foomatic-gswrapper.in
--- old/foomatic-filters-bzr-20070731/foomatic-gswrapper.in 2006-08-30
19:31:17.000000000 +0200
+++ new/foomatic-filters-bzr-20080116/foomatic-gswrapper.in 2008-01-10
16:21:48.000000000 +0100
@@ -17,7 +17,7 @@
# Read config file if present
%conf = readConfFile("$configpath/filter.conf");
-# Set GhostScript path
+# Set Ghostscript path
my $gspath = "gs";
$gspath = $conf{gspath} if defined(%conf) and defined $conf{gspath};
my $execpath = "@EXECPATH@";
@@ -25,7 +25,7 @@
$execpath = $conf{execpath} if defined(%conf) and defined $conf{execpath};
$ENV{'PATH'} = $execpath;
-# Check whether we have a GhostScript version with redirection of the
+# Check whether we have a Ghostscript version with redirection of the
# standard output of the PostScript programs via '-sstdout=%stderr'
my $gswithstdoutredirection = 0;
if (`$gspath -dQUIET -dPARANOIDSAFER -dNOPAUSE -dBATCH -dNOMEDIAATTRS
-sDEVICE=pswrite -sstdout=%stderr -sOutputFile=/dev/null -c '(hello\n) print
flush' 2>&1` =~ /hello/) {
@@ -34,7 +34,7 @@
grep (m!\-sOutputFile=\-!
&& do {
- # If GhostScript does not support redirecting the standard output
+ # If Ghostscript does not support redirecting the standard output
# of the PostScript program to standard error with
# '-sstdout=%stderr', sen the job output data to fd 3; errors
# will be on 2(stderr) and job ps program interpreter output on
@@ -44,13 +44,14 @@
# quoted properly below...
}, @ARGV);
-if (!$gswithstdoutredirection) {
- grep (((m!^\-$!) || (m!^\-_$!))
- && do {
- # Get the input from fd 0.
- $_ = "/dev/fd/0";
- }, @ARGV);
-}
+grep (((m!^\-$!) || (m!^\-_$!) || (m!^/dev/fd/0$!))
+ && do {
+ # Use always buffered input. This works around a Ghostscript
+ # bug which prevents printing encrypted PDF files with Adobe
+ # Reader 8.1.1 and Ghostscript built as shared library
+ # (Ghostscript bug #689577, Ubuntu bug #172264)
+ $_ = "-_";
+ }, @ARGV);
# Turn *off* -q (quiet!); now that stderr is useful! :)
my @myargs = grep (! m!^\-q$!, @ARGV);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/foomatic-filters-bzr-20070731/foomatic-rip.in
new/foomatic-filters-bzr-20080116/foomatic-rip.in
--- old/foomatic-filters-bzr-20070731/foomatic-rip.in 2007-07-31
11:57:52.000000000 +0200
+++ new/foomatic-filters-bzr-20080116/foomatic-rip.in 2008-01-10
16:21:48.000000000 +0100
@@ -1132,7 +1132,7 @@
$line =~ m!^([^\"]*)\"!;
$cmd .= $1;
$model = unhtmlify($cmd);
- } elsif (m!^\*FoomaticIDs:\s*(\S+)\s+(\S+)\s*$!) {
+ } elsif (m!^\*FoomaticIDs:\s*\"?\s*(\S+?)\s+(\S+?)\s*\"?\s*$!) {
# "*FoomaticIDs: <printer ID> <driver ID>"
my $id = $1;
my $driver = $2;
@@ -1181,7 +1181,7 @@
$line =~ m!^([^\"]*)\"!;
$cmd .= $1;
$dat->{'cmd'} = unhtmlify($cmd);
- } elsif (m!^\*FoomaticNoPageAccounting:\s*(\S+)\s*$!) {
+ } elsif (m!^\*FoomaticNoPageAccounting:\s*\"?\s*(\S+?)\s*\"?\s*$!) {
# "*FoomaticRIPNoPageAccounting: <boolean value>"
my $value = $1;
# Apply the value
@@ -1288,8 +1288,8 @@
# Unmark the current argument to do not mis-interpret any keywords
# as choices
$currentargument = "";
- } elsif ((m!^\*FoomaticRIPOption ([^/:\s]+):\s*(\S+)\s+(\S+)\s+(\S)\s*$!)
||
- (m!^\*FoomaticRIPOption
([^/:\s]+):\s*(\S+)\s+(\S+)\s+(\S)\s+(\S+)\s*$!)){
+ } elsif ((m!^\*FoomaticRIPOption
([^/:\s]+):\s*\"?\s*(\S+?)\s+(\S+)\s+(\S)\s*\"?\s*$!) ||
+ (m!^\*FoomaticRIPOption
([^/:\s]+):\s*\"?\s*(\S+?)\s+(\S+)\s+(\S)\s+(\S+?)\s*\"?\s*$!)){
# "*FoomaticRIPOption <option>: <type> <style> <spot> [<order>]"
# <order> only used for 1-choice enum options
my $argname = $1;
@@ -1341,7 +1341,7 @@
$line =~ m!^([^\"]*)\"!;
$proto .= $1;
$dat->{'args_byname'}{$argname}{'proto'} = unhtmlify($proto);
- } elsif (m!^\*FoomaticRIPOptionRange\s+([^/:\s]+):\s*(\S+)\s+(\S+)\s*$!) {
+ } elsif
(m!^\*FoomaticRIPOptionRange\s+([^/:\s]+):\s*\"?\s*(\S+?)\s+(\S+?)\s*\"?\s*$!) {
# "*FoomaticRIPOptionRange <option>: <min> <max>"
# Used for numerical options only
my $argname = $1;
@@ -1352,7 +1352,7 @@
# Store the values
$dat->{'args_byname'}{$argname}{'min'} = $min;
$dat->{'args_byname'}{$argname}{'max'} = $max;
- } elsif (m!^\*FoomaticRIPOptionMaxLength\s+([^/:\s]+):\s*(\S+)\s*$!) {
+ } elsif
(m!^\*FoomaticRIPOptionMaxLength\s+([^/:\s]+):\s*\"?\s*(\S+?)\s*\"?\s*$!) {
# "*FoomaticRIPOptionMaxLength <option>: <length>"
# Used for string options only
my $argname = $1;
@@ -1432,7 +1432,7 @@
checkarg ($dat, $argname);
# Store the value
$dat->{'args_byname'}{$argname}{'default'} = $default;
- } elsif (m!^\*FoomaticRIPDefault([^/:\s]+):\s*([^/:\s]+)\s*$!) {
+ } elsif
(m!^\*FoomaticRIPDefault([^/:\s]+):\s*\"?\s*([^/:\s]+?)\s*\"?\s*$!) {
# "*FoomaticRIPDefault<option>: <value>"
# Used for numerical options only
my $argname = $1;
@@ -1474,7 +1474,7 @@
checksetting ($dat, $currentargument, $setting);
# Make sure that this argument has a default setting, even if
# none is defined in this PPD file
- if (!$dat->{'args_byname'}{$currentargument}{'default'}) {
+ if (!defined ($dat->{'args_byname'}{$currentargument}{'default'})) {
$dat->{'args_byname'}{$currentargument}{'default'} = $setting;
}
$dat->{'args_byname'}{$currentargument}{'vals_byname'}{$setting}{'comment'} =
$translation;
@@ -1526,7 +1526,7 @@
checksetting ($dat, $argname, $setting);
# Make sure that this argument has a default setting, even if
# none is defined in this PPD file
- if (!$dat->{'args_byname'}{$argname}{'default'}) {
+ if (!defined ($dat->{'args_byname'}{$argname}{'default'})) {
$dat->{'args_byname'}{$argname}{'default'} = $setting;
}
}
@@ -1663,6 +1663,9 @@
if ($arg->{'fdefault'} > $arg->{'max'}) {
$arg->{'fdefault'} = $arg->{'max'};
}
+ if ($arg->{'type'} eq 'int') {
+ $arg->{'fdefault'} = POSIX::floor($arg->{'fdefault'});
+ }
my $mindiff = abs($arg->{'max'} - $arg->{'min'});
my $closestvalue;
for my $val (@{$arg->{'vals'}}) {
@@ -1947,9 +1950,10 @@
# Handle the standard duplex option, mostly
if ($avalue =~ m!^two-sided!i) {
if (defined($dat->{'args_byname'}{'Duplex'})) {
- # We set "Duplex" to '1' here, the real argument setting
- # will be done later
- $dat->{'args_byname'}{'Duplex'}{$optionset} = '1';
+ # Default to long-edge binding here, for the case that
+ # there is no binding setting
+ $dat->{'args_byname'}{'Duplex'}{$optionset} =
+ 'DuplexNoTumble';
# Check the binding: "long edge" or "short edge"
if ($avalue =~ m!long-edge!i) {
if (defined($dat->{'args_byname'}{'Binding'})) {
@@ -1957,7 +1961,7 @@
$dat->{'args_byname'}{'Binding'}{'vals_byname'}{'LongEdge'}{'value'};
} else {
$dat->{'args_byname'}{'Duplex'}{$optionset} =
- 'LongEdge';
+ 'DuplexNoTumble';
}
} elsif ($avalue =~ m!short-edge!i) {
if (defined($dat->{'args_byname'}{'Binding'})) {
@@ -1965,15 +1969,13 @@
$dat->{'args_byname'}{'Binding'}{'vals_byname'}{'ShortEdge'}{'value'};
} else {
$dat->{'args_byname'}{'Duplex'}{$optionset} =
- 'ShortEdge';
+ 'DuplexTumble';
}
}
}
} elsif ($avalue =~ m!^one-sided!i) {
if (defined($dat->{'args_byname'}{'Duplex'})) {
- # We set "Duplex" to '0' here, the real argument setting
- # will be done later
- $dat->{'args_byname'}{'Duplex'}{$optionset} = '0';
+ $dat->{'args_byname'}{'Duplex'}{$optionset} = 'None';
}
}
@@ -2911,14 +2913,15 @@
# Insert DSC comment
my $dest = ((($inheader) && ($isdscjob)) ?
\@psheader : \@psfifo);
- push(@{$dest},
- "%%BeginFeature: " .
- "*$option $arg->{$optionset}\n");
my $val;
if ($arg->{'style'} eq 'G') {
# PostScript option, insert the code
if ($arg->{'type'} eq 'bool') {
# Boolean option
+ push(@{$dest},
+ "%%BeginFeature: *$option " .
+ ($arg->{$optionset} == 1 ?
+ "True" : "False") . "\n");
if (defined($arg->{$optionset}) &&
$arg->{$optionset} == 1) {
push(@{$dest}, $arg->{'proto'} .
@@ -2935,6 +2938,9 @@
$arg->{'vals_byname'}{$arg->{$optionset}}))) {
# Enumerated choice of string or enum
# option
+ push(@{$dest},
+ "%%BeginFeature: " .
+ "*$option $arg->{$optionset}\n");
push(@{$dest}, $val->{'driverval'} .
"\n");
} elsif ((($arg->{'type'} eq 'string') ||
($arg->{'type'} eq
@@ -2942,6 +2948,9 @@
($arg->{$optionset} eq 'None')) {
# 'None' is mapped to the empty string
# in string options
+ push(@{$dest},
+ "%%BeginFeature: " .
+ "*$option $arg->{$optionset}\n");
my $driverval = $arg->{'proto'};
$driverval =~ s/\%s//g;
push(@{$dest}, $driverval . "\n");
@@ -2949,6 +2958,9 @@
# Setting for numerical or string
# option which is not under the
# enumerated choices
+ push(@{$dest},
+ "%%BeginFeature: " .
+ "*$option $arg->{$optionset}\n");
my $sprintfproto = $arg->{'proto'};
$sprintfproto =~ s/\%(?!s)/\%\%/g;
push(@{$dest},
@@ -3827,6 +3839,7 @@
# value
$line =~ /^([^=]+)/;
my $cmd = $1;
+ $cmd =~ s/^\s*(.*?)\s*$/$1/;
my $cmdfound = 0;
for (@jclheader) {
# If the command is there, replace it
@@ -5178,7 +5191,11 @@
($arg->{'type'} eq 'float')) {
if (($value <= $arg->{'max'}) &&
($value >= $arg->{'min'})) {
+ if ($arg->{'type'} eq 'int') {
+ return POSIX::floor($value);
+ } else {
return $value;
+ }
} elsif ($forcevalue) {
my $name = $arg->{'name'};
my $newvalue;
@@ -5524,8 +5541,6 @@
my $currentnumber = 0;
my $rangestart = 0;
-####### Question: is rangeend ever used?
- my $rangeend = 0;
my $currentkeyword = '';
my $invalidrange = 0;
my $totalscore = 0;
@@ -5599,8 +5614,7 @@
}
} elsif ($c =~ /[a-z_]/i) {
# Letter or underscore
- if (($rangestart > 0) || ($rangeend > 0) ||
- ($currentnumber > 0)) {
+ if (($rangestart > 0) || ($currentnumber > 0)) {
# Keyword not allowed after a page number or a
# page range
$invalidrange = 1;
@@ -5649,10 +5663,10 @@
# number of the page
my ($dat, $optionset, $page) = @_;
- my $bestscore = 10000000;
my $value;
for my $arg (@{$dat->{'args'}}) {
$value = '';
+ my $bestscore = 10000000;
for my $key (keys %{$arg}) {
next if $key !~ /^pages:(.*)$/;
my $pageranges = $1;
@@ -5816,8 +5830,8 @@
# Custom paper size
$val = valbyname($arg,"Custom");
$found = 1;
- } elsif ($userval eq '0') {
- foreach (qw(No Off False None)) {
+ } elsif ($userval =~ /^(0|No|Off|False)$/i) {
+ foreach (qw(0 No Off False None)) {
if ($val=valbyname($arg,$_)) {
$userval = $_;
$arg->{$optionset} = $userval;
@@ -5825,8 +5839,8 @@
last;
}
}
- } elsif ($userval eq '1') {
- foreach (qw(Yes On True)) {
+ } elsif ($userval =~ /^(1|Yes|On|True)$/i) {
+ foreach (qw(1 Yes On True)) {
if ($val=valbyname($arg,$_)) {
$userval = $_;
$arg->{$optionset} = $userval;
@@ -5834,7 +5848,7 @@
last;
}
}
- } elsif ($userval eq 'LongEdge') {
+ } elsif ($userval =~ /^(LongEdge|DuplexNoTumble)$/i) {
# Handle different names for the choices of the
# "Duplex" option
foreach (qw(LongEdge DuplexNoTumble)) {
@@ -5845,7 +5859,7 @@
last;
}
}
- } elsif ($userval eq 'ShortEdge') {
+ } elsif ($userval =~ /^(ShortEdge|DuplexTumble)$/i) {
foreach (qw(ShortEdge DuplexTumble)) {
if ($val=valbyname($arg,$_)) {
$userval = $_;
@@ -5939,7 +5953,12 @@
# Place this Postscript command onto the prepend queue
# for the appropriate section.
if ($cmdvar) {
- my $open = "[{\n%%BeginFeature: *$name $userval\n";
+ my $open = "[{\n%%BeginFeature: *$name ";
+ if ($type eq 'bool') {
+ $open .= ($userval == 1 ? "True" : "False") . "\n";
+ } else {
+ $open .= "$userval\n";
+ }
my $close = "\n%%EndFeature\n} stopped cleartomark\n";
if ($section eq "Prolog") {
push (@prologprepend, "$open$cmdvar$close");
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx
| < Previous | Next > |