summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDidier Raboud <didier@raboud.com>2010-05-22 22:10:33 +0200
committerDidier Raboud <didier@raboud.com>2010-05-22 22:10:33 +0200
commit5179b006a9068d532cda357bab917ecd22ba3fdc (patch)
tree46500d8825ef4179305e1e85c7bd6b3a68197b65
parentbfdd0872f73e6c4621f2ea9f3cbdb097eef5658d (diff)
parent36c9ad50d5284ab11c55375c60902da12df61726 (diff)
Merge branch 'upstream'
-rw-r--r--CVS/Entries4
-rwxr-xr-xChangeLog16
-rwxr-xr-xfoomatic-rip.in23
3 files changed, 38 insertions, 5 deletions
diff --git a/CVS/Entries b/CVS/Entries
index 1beaae2..6e856c0 100644
--- a/CVS/Entries
+++ b/CVS/Entries
@@ -1,5 +1,5 @@
/COPYING/3.1/Mon Feb 3 16:35:19 2003//Tfoomatic-3_0-branch
-/ChangeLog/3.62.2.19/Mon Dec 20 21:37:00 2004//Tfoomatic-3_0-branch
+/ChangeLog/3.62.2.21/Thu May 19 13:42:46 2005//Tfoomatic-3_0-branch
/Makefile.in/3.4.2.5/Sat Jan 24 02:16:19 2004//Tfoomatic-3_0-branch
/README/3.9.2.6/Tue Sep 14 20:16:43 2004//Tfoomatic-3_0-branch
/STANDARD_installation/1.1.4.3/Thu Jan 22 02:47:21 2004//Tfoomatic-3_0-branch
@@ -11,7 +11,7 @@
/foomatic-gswrapper.1.in/3.0.2.2/Thu Jan 22 03:42:35 2004//Tfoomatic-3_0-branch
/foomatic-gswrapper.in/3.4.2.3/Sat Dec 4 17:53:32 2004//Tfoomatic-3_0-branch
/foomatic-rip.1.in/3.6.2.2/Thu Jan 22 03:42:35 2004//Tfoomatic-3_0-branch
-/foomatic-rip.in/3.43.2.9/Mon Dec 20 21:37:00 2004//Tfoomatic-3_0-branch
+/foomatic-rip.in/3.43.2.11/Thu May 19 13:42:46 2005//Tfoomatic-3_0-branch
/install-sh/3.0/Fri Oct 11 01:20:44 2002//Tfoomatic-3_0-branch
/makeMan.in/3.3.2.2/Thu Jan 22 03:42:35 2004//Tfoomatic-3_0-branch
/make_configure/3.0.2.2/Thu Jan 22 02:47:21 2004//Tfoomatic-3_0-branch
diff --git a/ChangeLog b/ChangeLog
index 00f6544..09c84cd 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2005-05-19 Till Kamppeter <till.kamppeter@gmx.net>
+
+ * foomatic-rip.in: Make EPSF files not be an exception when
+ checking whether the input file is DSC-conforming. They can also
+ be DSC-conforming (thanks to Kevin ODonovan, kevin dot odonovan
+ at nist dot gov, for his report); Let the "FontPath" defined in
+ /etc/cups/cupsd.conf being used when CUPS is the spooler
+ (thanks to Peter Kekesi, kekpeti at freemail dot hu, for his
+ report).
+
+2005-05-11 Till Kamppeter <till.kamppeter@gmx.net>
+
+ * foomatic-rip.in: Added comment before the line to automatically
+ quote unquoted slashes in the allowed characters list or allowed
+ regexp.
+
2004-12-20 Till Kamppeter <till.kamppeter@gmx.net>
* foomatic-rip.in: Fixed bug of foomatic-rip replacing a JCL
diff --git a/foomatic-rip.in b/foomatic-rip.in
index 177b372..5b0415b 100755
--- a/foomatic-rip.in
+++ b/foomatic-rip.in
@@ -5,7 +5,7 @@ use strict;
use POSIX;
use Cwd;
-my $ripversion='$Revision: 3.43.2.9 $';
+my $ripversion='$Revision: 3.43.2.11 $';
#'# Fix emacs syntax highlighting
# foomatic-rip is a spooler-independent filter script which takes
@@ -664,6 +664,18 @@ if ($spooler eq 'ppr') {
my( $cups_jobid, $cups_user, $cups_jobtitle, $cups_copies, $cups_options,
$cups_filename );
if ($spooler eq 'cups') {
+
+ # Use CUPS font path ("FontPath" in /etc/cups/cupsd.conf)
+ if ($ENV{'CUPS_FONTPATH'}) {
+ $ENV{'GS_LIB'} = $ENV{'CUPS_FONTPATH'} .
+ ($ENV{'GS_LIB'} ? ":$ENV{'GS_LIB'}" : "");
+ } else {
+ if ($ENV{'CUPS_DATADIR'}) {
+ $ENV{'GS_LIB'} = "$ENV{'CUPS_DATADIR'}/fonts" .
+ ($ENV{'GS_LIB'} ? ":$ENV{'GS_LIB'}" : "");
+ }
+ }
+
# Get all command line parameters
$cups_jobid = removeshellescapes($rargs[0]);
$cups_user = removeshellescapes($rargs[1]);
@@ -1661,6 +1673,8 @@ if (($debug) || ($spooler ne 'cups')) {
}
print $logh "Job title: $jobtitle\n";
print $logh "File(s) to be printed: ${added_lf}@filelist${added_lf}\n";
+print $logh "GhostScript extra search path ('GS_LIB'): $ENV{'GS_LIB'}\n"
+ if $ENV{'GS_LIB'};
@@ -2417,8 +2431,7 @@ for $file (@filelist) {
}
} else {
# Do we have a DSC-conforming document?
- if (($line =~ m/^.?%!PS-Adobe-/) &&
- ($line !~ m/EPSF/)) {
+ if ($line =~ m/^.?%!PS-Adobe-/) {
# Do not stop parsing the document
if (!$dontparse) {
$maxlines = 0;
@@ -5073,6 +5086,8 @@ sub stringvalid {
# Allowed characters
if ($arg->{'allowedchars'}) {
my $chars = $arg->{'allowedchars'};
+ # Quote the slashes (if a slash is preceeded by an even number of
+ # backslashes, it is not already quoted)
$chars =~ s/(?<!\\)((\\\\)*)\//$2\\\//g;
return 0 if $value !~ /^[$chars]*$/;
}
@@ -5080,6 +5095,8 @@ sub stringvalid {
# Regular expression
if ($arg->{'allowedregexp'}) {
my $regexp = $arg->{'allowedregexp'};
+ # Quote the slashes (if a slash is preceeded by an even number of
+ # backslashes, it is not already quoted)
$regexp =~ s/(?<!\\)((\\\\)*)\//$2\\\//g;
return 0 if $value !~ /$regexp/;
}