From 6fefeecb6abbb1f7dfe07ade1a0abef06dac5d32 Mon Sep 17 00:00:00 2001 From: Didier Raboud Date: Sun, 23 May 2010 00:04:56 +0200 Subject: Imported Upstream version 3.0.2-20080211 --- foomatic-rip.in | 1156 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 619 insertions(+), 537 deletions(-) (limited to 'foomatic-rip.in') diff --git a/foomatic-rip.in b/foomatic-rip.in index a681753..18b06a0 100644 --- a/foomatic-rip.in +++ b/foomatic-rip.in @@ -26,12 +26,12 @@ my $ripversion='$Revision$'; # spoolers run the print filters as a special user, as "lp", not as # "root" or as the user who sent the job). -# See http://www.linuxprinting.org/cups-doc.html -# http://www.linuxprinting.org/lpd-doc.html -# http://www.linuxprinting.org/ppr-doc.html -# http://www.linuxprinting.org/pdq-doc.html -# http://www.linuxprinting.org/direct-doc.html -# http://www.linuxprinting.org/ppd-doc.html +# See http://www.openprinting.org/cups-doc.html +# http://www.openprinting.org/lpd-doc.html +# http://www.openprinting.org/ppr-doc.html +# http://www.openprinting.org/pdq-doc.html +# http://www.openprinting.org/direct-doc.html +# http://www.openprinting.org/ppd-doc.html # ========================================================================== # @@ -114,8 +114,8 @@ my $logfile = "/tmp/foomatic-rip"; # # foomatic-rip spooler-independent PS->Printer filter (RIP) of Foomatic # -# Copyright 2002 - 2004 Grant Taylor -# & Till Kamppeter +# Copyright 2002 - 2007 Grant Taylor +# & Till Kamppeter # & Helge Blischke # # This program is free software; you can redistribute it and/or modify it @@ -1132,7 +1132,7 @@ while() { $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: " my $id = $1; my $driver = $2; @@ -1181,6 +1181,17 @@ while() { $line =~ m!^([^\"]*)\"!; $cmd .= $1; $dat->{'cmd'} = unhtmlify($cmd); + } elsif (m!^\*FoomaticNoPageAccounting:\s*\"?\s*(\S+?)\s*\"?\s*$!) { + # "*FoomaticRIPNoPageAccounting: " + my $value = $1; + # Apply the value + if ($value =~ /^True$/i) { + # Driver is not compatible with page accounting according to the + # Foomatic database, so turn it off for this driver + $ps_accounting = 0; + $accounting_prolog = ''; + print $logh "CUPS page accounting disabled by driver.\n"; + } } elsif (m!^\*cupsFilter:\s*\"(.*)$!) { # "*cupsFilter: " my $line = $1; @@ -1277,8 +1288,8 @@ while() { # 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