]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Merge changes from CUPS 1.4svn-r7607.
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 21 May 2008 01:15:17 +0000 (01:15 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 21 May 2008 01:15:17 +0000 (01:15 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@784 a1ca3aef-8c08-0410-bb20-df032aa958be

31 files changed:
CHANGES.txt
configure.in
cups/mark.c
doc/Makefile
doc/help/ref-ppdcfile.html [new file with mode: 0644]
driver/Makefile
man/Makefile
man/cupsctl.man
man/cupstestdsc.man
man/drv.man.in [new file with mode: 0644]
man/ppdc.man
man/ppdcfile.man
man/ppdhtml.man
man/ppdi.man
man/ppdmerge.man
man/ppdpo.man
man/rastertoescpx.man
man/rastertopclx.man
man/subscriptions.conf.man
ppdc/Dependencies
ppdc/Makefile
ppdc/libcupsppdc.exp
ppdc/ppdc-attr.cxx
ppdc/ppdc-driver.cxx
ppdc/ppdc-source.cxx
ppdc/ppdc.cxx
ppdc/ppdc.h
ppdc/ppdpo.cxx
scheduler/dirsvc.c
scheduler/ipp.c
systemv/cupstestppd.c

index 99155aed702f82b21ea62264c5e46a642f9b32a4..4f447198b297df610e55bfadff2a14b4a45dc2b0 100644 (file)
@@ -1,8 +1,20 @@
-CHANGES.txt - 2008-05-19
+CHANGES.txt - 2008-05-20
 ------------------------
 
 CHANGES IN CUPS V1.4b1
 
+       - The PPD compiler now supports localizable attributes
+         (STR #2738)
+       - The ppdpo utility now includes cupsIPPReasons values in
+         the message catalogs it generates (STR #2754)
+       - The PPD compiler now supports conditional directives
+         (STR #2636)
+       - The ppdc utility now supports a "-t" option to test PPD
+         files (STR #2739)
+       - The ppdc utility now supports a "-m" option to use the
+         ModelName value as the output filename.
+       - The ppdc utility now supports a FileName directive to
+         set an alternate output filename (STR #2740)
        - The side-channel API now supports SNMP queries for the
          standard network backends.
        - Added a PageLogFormat directive to the cupsd.conf file to
index ec142509d528cf77f3da253b6aa79aada4017d40..769c53cb989e6ae4b38516f2ce24f8e974b60f3c 100644 (file)
@@ -68,7 +68,7 @@ AC_OUTPUT(Makedefs packaging/cups.list init/cups.sh init/cups-lpd cups-config
          init/org.cups.cups-lpd.plist
          man/client.conf.man man/cups-deviced.man man/cups-driverd.man
          man/cups-lpd.man man/cupsaddsmb.man man/cupsd.man
-         man/cupsd.conf.man man/lpoptions.man
+         man/cupsd.conf.man man/drv.man man/lpoptions.man
          templates/header.tmpl
          $LANGFILES)
 
index c0fdc911d62181669919aa391ac611e43559826d..7b018e6094c06299b105cfd1720c895af0c5246b 100644 (file)
@@ -507,11 +507,14 @@ ppdFindChoice(ppd_option_t *o,            /* I - Pointer to option */
   ppd_choice_t *c;                     /* Current choice */
 
 
-  if (o == NULL || choice == NULL)
+  if (!o || !choice)
     return (NULL);
 
+  if (choice[0] == '{' || !strncasecmp(choice, "Custom.", 7))
+    choice = "Custom";
+
   for (i = o->num_choices, c = o->choices; i > 0; i --, c ++)
-    if (strcasecmp(c->choice, choice) == 0)
+    if (!strcasecmp(c->choice, choice))
       return (c);
 
   return (NULL);
index 5b032def25a12f9a59fa03789ce54abb7571e031..e87eb5c34087584aad75b96b34a16481694b5435 100644 (file)
@@ -73,6 +73,7 @@ HELPFILES     =       \
                        help/man-cupsenable.html \
                        help/man-cupstestdsc.html \
                        help/man-cupstestppd.html \
+                       help/man-drv.html \
                        help/man-filter.html \
                        help/man-lp.html \
                        help/man-lpadmin.html \
@@ -99,6 +100,7 @@ HELPFILES    =       \
                        help/ref-error_log.html \
                        help/ref-mailto-conf.html \
                        help/ref-page_log.html \
+                       help/ref-ppdcfile.html \
                        help/ref-printers-conf.html \
                        help/ref-snmp-conf.html \
                        help/ref-subscriptions-conf.html \
diff --git a/doc/help/ref-ppdcfile.html b/doc/help/ref-ppdcfile.html
new file mode 100644 (file)
index 0000000..b25a3b6
--- /dev/null
@@ -0,0 +1,2402 @@
+<HTML>
+<!-- SECTION: References -->
+<HEAD>
+       <TITLE>PPD Compiler Driver Information File Reference</TITLE>
+</HEAD>
+<BODY>
+
+<p>The CUPS PPD compiler reads meta files that contain descriptions
+of one or more PPD files to be generated by
+<a href="man-ppdc.html">ppdc(1)</a> or the corresponding driver interface
+program <a href="man-drv.html">drv(1)</a>. The source file format is plain
+ASCII text that can be edited using your favorite text editor.</p>
+
+<p>Directives may be placed anywhere on a line and are followed by
+zero or more values.</p>
+
+<p>Comments are supported using the C (/* ... */) and C++ (// ...) comment
+mechanisms.</p>
+
+<p>Directives that accept expressions look for sequences of the form:</p>
+
+<dl>
+
+       <dt>NAME</dt>
+       <dd>Evaluates to 1 if NAME is defined, otherwise 0.</dd>
+
+       <dt>number</dt>
+
+       <dd>Evaluates to the specified integer; the number can be preceded by
+       a leading sign (+/-) followed by a decimal number (1234), octal number
+       (01234), or hexidecimal number (0x1234) using the same rules as C and
+       C++.</dd>
+
+       <dt>(NAME NAME ... number number ...)</dt>
+       <dd>Evaluates to the bitwise OR of each named #define constant or
+       number.</dd>
+
+       <dt>(NAME == OTHERNAME)</dt>
+       <dt>(NAME == number)</dt>
+       <dd>Evaluates to 1 if NAME is equal to the other named constant or
+       number, otherwise 0.</dd>
+
+       <dt>(NAME != OTHERNAME)</dt>
+       <dt>(NAME != number)</dt>
+       <dd>Evaluates to 1 if NAME is not equal to the other named constant or
+       number, otherwise 0.</dd>
+
+       <dt>(NAME &lt; OTHERNAME)</dt>
+       <dt>(NAME &lt; number)</dt>
+       <dd>Evaluates to 1 if NAME is less than to the other named constant or
+       number, otherwise 0.</dd>
+
+       <dt>(NAME &lt;= OTHERNAME)</dt>
+       <dt>(NAME &lt;= number)</dt>
+       <dd>Evaluates to 1 if NAME is less than or equal to the other named
+       constant or number, otherwise 0.</dd>
+
+       <dt>(NAME &gt; OTHERNAME)</dt>
+       <dt>(NAME &gt; number)</dt>
+       <dd>Evaluates to 1 if NAME is greater than to the other named constant
+       or number, otherwise 0.</dd>
+
+       <dt>(NAME &gt;= OTHERNAME)</dt>
+       <dt>(NAME &gt;= number)</dt>
+       <dd>Evaluates to 1 if NAME is greater than or equal to the other named
+       constant or number, otherwise 0.</dd>
+
+</dl>
+
+<p>Printer driver information can be grouped and shared using
+curley braces ({ ... }); PPD files are written when a close
+brace or end-of-file is seen and a <a href="#PCFileName">PCFileName</a>
+directive has been defined.</p>
+
+
+<h2 class="title"><a name='_define'>#define</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+#define <i>name expression</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+#define FOO 100
+#define BAR "Bar, Inc."
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>#define</code> directive assigns a value to a name
+which can be later referenced using <code>$name</code>. The name is
+case-insensitive and can be any sequence of letters, numbers,
+and the underscore. The value can be any valid expression.</p>
+
+<h3>See Also</h3>
+
+<p><a href='#_include'><code>#include</code></a></p>
+
+
+<h2 class="title"><a name='_elif'>#elif</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+#elif <i>expression</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+#if HAVE_FOO
+...
+#elif (HAVE_BAR &gt;= 999)
+...
+#else
+...
+#endif 
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>#elif</code> directive allows portions of a driver information file
+to be used conditionally. <code>#elif</code> directives must appear after a
+corresponding <a href="#_if"><code>#if</code></a> directive.</p>
+
+<h3>See Also</h3>
+
+<p><a href='#_else'><code>#else</code></a>,
+<a href='#_endif'><code>#endif</code></a>,
+<a href='#_if'><code>#if</code></a></p>
+
+
+<h2 class="title"><a name='_else'>#else</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+#else
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+#if HAVE_FOO
+...
+#elif (HAVE_BAR &gt;= 999)
+...
+#else
+...
+#endif 
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>#else</code> directive allows portions of a driver information file
+to be used conditionally when the corresponding
+<a href="#_if"><code>#if</code></a> and <a href="#_elif"><code>#elif</code></a>
+expressions are non-zero.</p>
+
+<h3>See Also</h3>
+
+<p><a href='#_elif'><code>#elif</code></a>,
+<a href='#_endif'><code>#endif</code></a>,
+<a href='#_if'><code>#if</code></a></p>
+
+
+<h2 class="title"><a name='_endif'>#endif</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+#endif
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+#if HAVE_FOO
+...
+#elif (HAVE_BAR &gt;= 999)
+...
+#else
+...
+#endif 
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>#endif</code> directive ends a conditional block of a driver
+information file. It must appear after all of the
+<a href="#_if"><code>#if</code></a>, <a href="#_elif"><code>#elif</code></a>,
+and <a href="#_else"><code>#else</code></a> directives for the current
+conditional block.</p>
+
+<h3>See Also</h3>
+
+<p><a href='#_elif'><code>#elif</code></a>,
+<a href='#_else'><code>#else</code></a>,
+<a href='#_if'><code>#if</code></a></p>
+
+
+<h2 class="title"><a name='_font'>#font</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+#font <i>name encoding "version" charset status</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+#font Courier Standard "(1.05)" Standard ROM
+#font Symbol Special "(001.005)" Special ROM
+#font Barcode-Foo Special "(1.0)" Special Disk
+#font Unicode-Foo Expert "(2.0)" Adobe-Identity ROM
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>#font</code> directive defines a "base font" for all
+printer drivers. The name is the PostScript font name.</p>
+
+<p>The encoding is the default encoding of the font, usually
+<code>Standard</code>, <code>Expert</code>, or <code>Special</code>, as
+defined in the Adobe PPD file specification.</p>
+
+<p>The version is the PostScript string definition that
+corresponds to the font version number.</p>
+
+<p>The charset defines the available characters in the font,
+usually <code>Standard</code> or <code>Special</code>, as defined in the
+Adobe PPD file specification.</p>
+
+<p>The status is the installation status of the font and must be
+either the word <code>ROM</code> or <code>Disk</code>.
+
+<p>Base fonts differ from fonts defined using the <a
+href='#Font'><code>Font</code></a> directive in that they are not
+automatically associated with all drivers - you must use the
+special <code>Font *</code> directive to include them in a
+driver.</p>
+
+<p>Currently the <code>#font</code> directive is used mainly for
+defining the standard raster fonts in the
+<code>&lt;font.defs&gt;</code> include file.</p>
+
+<h3>See Also</h3>
+
+<p><a href='#_include'><code>#include</code></a>,
+<a href='#Font'><code>Font</code></a></p>
+
+
+<h2 class="title"><a name='_if'>#if</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+#if <i>name or expression</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+#if HAVE_FOO
+...
+#elif (HAVE_BAR &gt;= 999)
+...
+#else
+...
+#endif 
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>#if</code> directive allows portions of a driver information file
+to be used conditionally. When followed by a name, the data that follows is
+used only when the name is defined, otherwise the data is ignored.
+<code>#if</code> directives can be nested up to 100 times.</p>
+
+<h3>See Also</h3>
+
+<p><a href='#_elif'><code>#elif</code></a>,
+<a href='#_else'><code>#else</code></a>,
+<a href='#_endif'><code>#endif</code></a></p>
+
+
+<h2 class="title"><a name='_include'>#include</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+#include &lt;<i>filename</i>&gt;
+#include "<i>filename</i>"
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+#include &lt;font.defs&gt;
+#include "myfile.h"
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>#include</code> directive reads the named driver
+information file. If the filename is included inside angle
+brackets (<code>&lt;filename&gt;</code>), then the PPD compiler will
+look for the file in all of the include directories it knows
+about. Otherwise, the file is opened in the current directory
+relative to the current driver information file, and if that
+fails then it looks in the include directories for the file.</p>
+
+<p>The <code>#include</code> directive can be nested to as many
+files as are allowed by the host operating system, typically at
+least 100 files.</p>
+
+<h3>See Also</h3>
+
+<p><a href='#_define'><code>#define</code></a>,
+<a href='#_font'><code>#font</code></a>,
+<a href='#_media'><code>#media</code></a></p>
+
+
+<h2 class="title"><a name='_media'>#media</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+#media <i>name width length</i>
+#media <i>"name/text" width length</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+#media "Letter/Letter - 8.5x11in" 8.5in 11in
+#media "A4/A4 - 210x297mm" 210mm 297mm
+#media "w936h1368/Super B/A3 - 13x19in" 936 1368
+#media Photo 4in 6in
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>#media</code> directive defines a named media size for
+inclusion in a driver. The name with optional user text defines
+the name for the media size and is used with the <a
+href='#MediaSize'><code>MediaSize</code></a> directive to associate
+the media size with the driver. The name may only contain
+letters, numbers, and the underscore and may not exceed 40
+characters in length. The user text, if supplied, may not exceed
+80 characters in length.</p>
+
+<p>The width and length define the dimensions of the media. Each
+number is optionally followed by one of the following unit
+suffixes:</p>
+
+<ul>
+
+       <li><code>cm</code> - centimeters</li>
+
+       <li><code>ft</code> - feet</li>
+
+       <li><code>in</code> - inches</li>
+
+       <li><code>m</code> - meters</li>
+
+       <li><code>mm</code> - millimeters</li>
+
+       <li><code>pt</code> - points (72 points = 1 inch)</li>
+
+</ul>
+
+<p>Points are assumed if no units are specified. 
+
+<h3>See Also</h3>
+
+<p><a href='#_include'><code>#include</code></a>,
+<a href='#CustomMedia'><code>CustomMedia</code></a>,
+<a href='#MediaSize'><code>MediaSize</code></a></p>
+
+
+<h2 class="title"><a name='_po'>#po</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+#po <i>locale filename</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+#po es "es.po"
+#po fr_CA "mydriver-fr_CA.po"
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>#po</code> directive defines a message catalog to use for the
+given POSIX language abbreviation. Multiple <code>#po</code> directives can be
+specified to list multiple catalogs. The filename can be an absolute path or
+relative to the driver information file. GNU gettext and Mac OS X .strings
+files are supported.</p>
+
+
+<h2 class="title"><a name='Attribute'>Attribute</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+Attribute <i>name "" value</i>
+Attribute <i>name keyword value</i>
+Attribute <i>name "keyword/text" value</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+Attribute cupsInkChannels "" 1
+Attribute cupsAllDither 600dpi "1.0"
+Attribute fooProfile "Photo/Photographic Profile" "photopro.icc"
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>Attribute</code> directive creates a PPD attribute. The
+name is any combination of letters, numbers, and the underscore
+and can be up to 40 characters in length.</p>
+
+<p>The selector can be the empty string (<code>""</code>), a keyword
+consisting of up to 40 letters, numbers, and the underscore, or
+a string composed of a keyword and user text of up to 80
+characters.</p>
+
+<p>The value is any string or number; the string may contain
+multiple lines, however no one line may exceed 255
+characters.</p>
+
+<h3>See Also</h3>
+
+<p><a href="#LocAttribute"><code>LocAttribute</code></a></p>
+
+
+<h2 class="title"><a name='Choice'>Choice</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+Choice <i>name "code"</i>
+Choice <i>"name/text" "code"</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+Choice None "&lt;&lt;/MediaType (None)&gt;&gt;setpagedevice"
+Choice "False/No" "&lt;&lt;/cupsCompression 0&gt;&gt;setpagedevice"
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>Choice</code> directive adds a single choice to the
+current option. The name is any combination of letters, numbers,
+and the underscore and can be up to 40 characters in length.</p>
+
+<p>If provided, the text can be any string up to 80 characters
+in length. If no text is provided, the name is used.</p>
+
+<p>The code is any string and may contain multiple lines,
+however no one line may exceed 255 characters.</p>
+
+<h3>See Also</h3>
+
+<p><a href='#ColorModel'><code>ColorModel</code></a>,
+<a href='#Cutter'><code>Cutter</code></a>,
+<a href='#Darkness'><code>Darkness</code></a>,
+<a href='#Duplex'><code>Duplex</code></a>,
+<a href='#Finishing'><code>Finishing</code></a>,
+<a href='#Group'><code>Group</code></a>,
+<a href='#InputSlot'><code>InputSlot</code></a>,
+<a href='#Installable'><code>Installable</code></a>,
+<a href='#MediaType'><code>MediaType</code></a>,
+<a href='#Option'><code>Option</code></a>,
+<a href='#Resolution'><code>Resolution</code></a>,
+<a href='#UIConstraints'><code>UIConstraints</code></a></p>
+
+
+<h2 class="title"><a name='ColorDevice'>ColorDevice</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+ColorDevice <i>boolean-value</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+ColorDevice no
+ColorDevice yes
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>ColorDevice</code> directive tells the application if
+the printer supports color. It is typically used in conjunction
+with the <a href='#ColorModel'><code>ColorModel</code></a> directive
+to provide color printing support.</p>
+
+<h3>See Also</h3>
+
+<p><a href='#ColorModel'><code>ColorModel</code></a></p>
+
+
+<h2 class="title"><span class="info">Deprecated</span><a name='ColorModel'>ColorModel</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+ColorModel <i>name colorspace colororder compression</i>
+ColorModel <i>"name/text" colorspace colororder compression</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+ColorModel Gray/Grayscale w chunky 0
+ColorModel RGB/Color rgb chunky 0
+ColorModel CMYK cmyk chunky 0
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>ColorModel</code> directive is a convenience directive
+which creates a ColorModel option and choice for the current
+printer driver. The name is any combination of letters, numbers,
+and the underscore and can be up to 40 characters in length.</p>
+
+<p>If provided, the text can be any string up to 80 characters
+in length. If no text is provided, the name is used.</p>
+
+<p>The colorspace argument is one of the standard colorspace
+keywords defined later in this appendix in the section titled,
+"<a href='#REF_COLOR_SPACE'>Colorspace Keywords</a>".</p>
+
+<P>The colororder argument is one of the standard color order
+keywords defined later in this appendix in the section titled,
+"<a href='#REF_COLOR_ORDER'>Color Order Keywords</a>".</p>
+
+<p>The compression argument is any number and is assigned to the
+<code>cupsCompression</code> attribute in the PostScript page device
+dictionary.</p>
+
+<h3>See Also</h3>
+
+<p><a href='#Choice'><code>Choice</code></a>,
+<a href='#ColorDevice'><code>ColorDevice</code></a>,
+<a href='#Cutter'><code>Cutter</code></a>,
+<a href='#Darkness'><code>Darkness</code></a>,
+<a href='#Duplex'><code>Duplex</code></a>,
+<a href='#Finishing'><code>Finishing</code></a>,
+<a href='#Group'><code>Group</code></a>,
+<a href='#InputSlot'><code>InputSlot</code></a>,
+<a href='#Installable'><code>Installable</code></a>,
+<a href='#MediaType'><code>MediaType</code></a>,
+<a href='#Option'><code>Option</code></a>,
+<a href='#Resolution'><code>Resolution</code></a>,
+<a href='#UIConstraints'><code>UIConstraints</code></a></p>
+
+
+<h2 class="title"><span class="info">Deprecated</span><a name='ColorProfile'>ColorProfile</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+ColorProfile <i>resolution/mediatype gamma density matrix</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+ColorProfile -/- 1.7 1.0
+     1.0    0.0    0.0
+     0.0    1.0    0.0
+     0.0    0.0    1.0
+
+ColorProfile 360dpi/- 1.6 1.0
+     1.0   -0.05  -0.3
+    -0.35   1.0   -0.15
+    -0.095 -0.238  0.95
+
+ColorProfile 720dpi/Special 1.5 1.0
+     1.0    0.0   -0.38
+    -0.4    1.0    0.0
+     0.0   -0.38   0.9
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>ColorProfile</code> directive defines a CMY
+transform-based color profile. The resolution and mediatype
+arguments specify the <code>Resolution</code> and <code>MediaType</code>
+choices which use the profile; the hyphen (<code>-</code>) is used to
+specify that any resolution or mediatype can be used with the
+profile.</p>
+
+<p>The gamma argument specifies the gamma correction to apply to
+the color values (P = p<sup>g</sup>) and is a real number
+greater than 0. Values larger than 1 cause a general lightening
+of the print while values smaller than 1 cause a general
+darkening of the print. A value of 1 disables gamma
+correction.</p>
+
+<p>The density argument specifies the linear density correction
+to apply to the color values (P = d * p<sup>g</sup>) and is a
+real number greater than 0 and less than or equal to 1. A value
+1 of disables density correction while lower values produce
+proportionately lighter output.</p>
+
+<p>The matrix argument specifies a 3x3 linear transformation
+matrix in row-major order. The matrix is applied only to the CMY
+component of a RGB to CMYK transformation and is not used when
+printing in grayscale or CMYK mode unless the printer only
+supports printing with 3 colors.</p>
+
+<h3>See Also</h3>
+
+<p><a href='#SimpleColorProfile'><code>SimpleColorProfile</code></a></p>
+
+
+<h2 class="title"><a name='Copyright'>Copyright</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+Copyright <i>"text"</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+Copyright "Copyright 2008 by Foo Enterprises"
+
+Copyright
+"This software is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License as
+published by the Free Software Foundation; either version 2 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+MA 02111 USA"
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>Copyright</code> directive adds text comments to the
+top of a PPD file, typically for use in copyright notices. The
+text argument can contain multiple lines of text, but no line
+may exceed 255 characters.</p>
+
+
+<h2 class="title"><a name='CustomMedia'>CustomMedia</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+CustomMedia <i>name width length left bottom right top
+    "size-code" "region-code"</i>
+
+CustomMedia <i>"name/text" width length left bottom right top
+    "size-code" "region-code"</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+CustomMedia Letter 8.5in 11in 0.25in 0.46in 0.25in 0.04in
+    "&lt;&lt;/PageSize[612 792]/ImagingBBox null/ManualFeed false&gt;&gt;
+     setpagedevice"
+    "&lt;&lt;/PageSize[612 792]/ImagingBBox null/ManualFeed true&gt;&gt;
+     setpagedevice"
+
+CustomMedia "A4/A4 - 210x297mm" 210mm 297mm 12 12 12 12
+    "&lt;&lt;/PageSize[595 842]/ImagingBBox null&gt;&gt;setpagedevice"
+    "&lt;&lt;/PageSize[595 842]/ImagingBBox null&gt;&gt;setpagedevice"
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>CustomMedia</code> directive adds a custom media size to
+the driver. The name is any combination of letters, numbers,
+and the underscore and can be up to 40 characters in length.</p>
+
+<p>If provided, the text can be any string up to 80 characters
+in length. If no text is provided, the name is used.</p>
+
+<p>The width and length arguments specify the dimensions of the
+media as defined for the <a href="#_media"><code>#media</code></a>
+directive.</p>
+
+<p>The left, bottom, right, and top arguments specify the
+printable margins of the media.</p>
+
+<p>The size-code and region-code arguments specify the
+PostScript commands to run for the <code>PageSize</code> and
+<code>PageRegion</code> options, respectively. The commands can
+contain multiple lines, however no line may be more than 255
+characters in length.</p>
+
+<h3>See Also</h3>
+
+<p><a href='#_media'><code>#media</code></a>,
+<a href='#MediaSize'><code>MediaSize</code></a></p>
+
+
+<h2 class="title"><a name='Cutter'>Cutter</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+Cutter <i>boolean-value</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+Cutter yes
+Cutter no
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>Cutter</code> directive specifies whether the printer
+has a built-in media cutter. When a cutter is present, the
+printer's PPD file will contain a <code>CutMedia</code> option that
+allows the user to control whether the media is cut at the end
+of the job.</p>
+
+<h3>See Also</h3>
+
+<p><a href='#Choice'><code>Choice</code></a>,
+<a href='#ColorModel'><code>ColorModel</code></a>,
+<a href='#Darkness'><code>Darkness</code></a>,
+<a href='#Duplex'><code>Duplex</code></a>,
+<a href='#Finishing'><code>Finishing</code></a>,
+<a href='#Group'><code>Group</code></a>,
+<a href='#InputSlot'><code>InputSlot</code></a>,
+<a href='#Installable'><code>Installable</code></a>,
+<a href='#MediaType'><code>MediaType</code></a>,
+<a href='#Option'><code>Option</code></a>,
+<a href='#Resolution'><code>Resolution</code></a>,
+<a href='#UIConstraints'><code>UIConstraints</code></a></p>
+
+
+<h2 class="title"><span class="info">Deprecated</span><a name='Darkness'>Darkness</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+Darkness <i>temperature name</i>
+Darkness <i>temperature "name/text"</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+Darkness 0 Light
+Darkness 2 "Normal/Standard"
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>Darkness</code> directive defines a choice for the
+<code>cupsDarkness</code> option which sets the
+<code>cupsCompression</code> attribute in the PostScript page device
+dictionary. It is used with the CUPS <VAR>rastertolabel</VAR>
+sample driver to control the print head temperature and
+therefore the darkness of the print.</p>
+
+<p>The temperature argument specifies a temperature value for
+the Dymo driver from 0 (lowest) to 3 (highest), with 2
+representing the normal setting.</p>
+
+<p>The name is any combination of letters, numbers, and the
+underscore and can be up to 40 characters in length.</p>
+
+<p>If provided, the text can be any string up to 80 characters
+in length. If no text is provided, the name is used.</p>
+
+<h3>See Also</h3>
+
+<p><a href='#Choice'><code>Choice</code></a>,
+<a href='#ColorModel'><code>ColorModel</code></a>,
+<a href='#Cutter'><code>Cutter</code></a>,
+<a href='#Duplex'><code>Duplex</code></a>,
+<a href='#Finishing'><code>Finishing</code></a>,
+<a href='#Group'><code>Group</code></a>,
+<a href='#InputSlot'><code>InputSlot</code></a>,
+<a href='#Installable'><code>Installable</code></a>,
+<a href='#MediaType'><code>MediaType</code></a>,
+<a href='#Option'><code>Option</code></a>,
+<a href='#Resolution'><code>Resolution</code></a>,
+<a href='#UIConstraints'><code>UIConstraints</code></a></p>
+
+
+<h2 class="title"><a name='DriverType'>DriverType</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+DriverType <i>type</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+DriverType custom
+DriverType escp
+DriverType pcl
+DriverType ps
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>DriverType</code> directive tells the PPD compiler
+which DDK filters to include in the PPD file. The following
+types are supported:</p>
+
+<ul>
+
+       <li><code>custom</code> - Use only those filters that are
+       defined in the driver information file</li>
+
+       <li><code>epson</code> - Use the CUPS sample Epson driver filter
+       <var>rastertoepson</var></li>
+
+       <li><code>escp</code> - Use the ESC/P DDK driver filters
+       <var>commandtoescpx</var> and
+       <var>rastertoescpx</var></li>
+
+       <li><code>hp</code> - Use the CUPS sample HP driver filter
+       <var>rastertohp</var></li>
+
+       <li><code>label</code> - Use the CUPS sample label driver filter <var>rastertolabel</var></li>
+
+       <li><code>pcl</code> - Use the HP-PCL DDK driver filters
+       <var>commandtopclx</var> and
+       <var>rastertopclx</var></li>
+
+       <li><code>ps</code> - Use no filters; this driver is for a
+       standard PostScript device</li>
+
+</ul>
+
+<h3>See Also</h3>
+
+<p><a href='#Filter'><code>Filter</code></a>,
+<a href='#ModelNumber'><code>ModelNumber</code></a></p>
+
+
+<h2 class="title"><a name='Duplex'>Duplex</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+Duplex <i>type</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+Duplex none
+Duplex normal
+Duplex flip
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>Duplex</code> directive determines whether double-sided printing
+is supported in the current driver. The type argument specifies the type
+of duplexing that is supported:</p>
+
+<ul>
+
+       <li><code>none</code> - double-sided printing is not
+       supported</li>
+
+       <li><code>normal</code> - double-sided printing is
+       supported</li>
+
+       <li><code>flip</code> - double-sided printing is supported,
+       but the back side image needs to be flipped vertically
+       (used primarily with inkjet printers)</li>
+
+</ul>
+
+<h3>See Also</h3>
+
+<p><a href='#Choice'><code>Choice</code></a>,
+<a href='#ColorModel'><code>ColorModel</code></a>,
+<a href='#Cutter'><code>Cutter</code></a>,
+<a href='#Darkness'><code>Darkness</code></a>,
+<a href='#Finishing'><code>Finishing</code></a>,
+<a href='#Group'><code>Group</code></a>,
+<a href='#InputSlot'><code>InputSlot</code></a>,
+<a href='#Installable'><code>Installable</code></a>,
+<a href='#MediaType'><code>MediaType</code></a>,
+<a href='#Option'><code>Option</code></a>,
+<a href='#Resolution'><code>Resolution</code></a>,
+<a href='#UIConstraints'><code>UIConstraints</code></a></p>
+
+
+<h2 class="title"><a name='FileName'>FileName</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+FileName <i>"filename"</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+FileName "Acme Laser Printer 2000"
+FileName "Acme Ink Waster 1000"
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>FileName</code> attribute specifies the "long" name of the
+PPD file for the current driver.</p>
+
+<h3>See Also</h3>
+
+<p><a href='#Manufacturer'><code>Manufacturer</code></a>,
+<a href='#ModelName'><code>ModelName</code></a>,
+<a href="#PCFileName"><code>PCFileName</code></a>,
+<a href='#Version'><code>Version</code></a></p>
+
+
+<h2 class="title"><a name='Filter'>Filter</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+Filter <i>mime-type cost program</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+Filter application/vnd.cups-raster 50 rastertofoo
+Filter application/vnd.hp-HPGL 25 /usr/foo/filter/hpgltofoo
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>Filter</code> directive adds a filter for the current
+driver. The mime-type argument is a valid MIME media type name
+as defined in a CUPS <var>mime.types</var> file.</p>
+
+<p>The cost argument specifies the relative cost of the filter.
+In general, use a number representing the average percentage of
+CPU time that is used when printing the specified MIME media
+type.</p>
+
+<p>The program argument specifies the program to run; if the
+program is not an absolute filename, then CUPS will look for the
+program in the CUPS filter directory.</p>
+
+<h3>See Also</h3>
+
+<p><a href='#DriverType'><code>DriverType</code></a></p>
+
+
+<h2 class="title"><span class="info">Deprecated</span><a name='Finishing'>Finishing</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+Finishing <i>name</i>
+Finishing <i>"name/text"</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+Finishing None
+Finishing "Glossy/Photo Overcoat"
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>Finishing</code> directive adds a choice to the
+<code>cupsFinishing</code> option. The name is any combination of
+letters, numbers, and the underscore and can be up to 40
+characters in length. The name is stored in the
+<code>OutputType</code> attribute in the PostScript page device
+dictionary.</p>
+
+<p>If provided, the text can be any string up to 80 characters
+in length. If no text is provided, the name is used.</p>
+
+<h3>See Also</h3>
+
+<p><a href='#Choice'><code>Choice</code></a>,
+<a href='#ColorModel'><code>ColorModel</code></a>,
+<a href='#Cutter'><code>Cutter</code></a>,
+<a href='#Darkness'><code>Darkness</code></a>,
+<a href='#Duplex'><code>Duplex</code></a>,
+<a href='#Group'><code>Group</code></a>,
+<a href='#InputSlot'><code>InputSlot</code></a>,
+<a href='#Installable'><code>Installable</code></a>,
+<a href='#MediaType'><code>MediaType</code></a>,
+<a href='#Option'><code>Option</code></a>,
+<a href='#Resolution'><code>Resolution</code></a>,
+<a href='#UIConstraints'><code>UIConstraints</code></a></p>
+
+
+<h2 class="title"><a name='Font'>Font</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+Font <i>name encoding "version" charset status</i>
+Font *
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+Font *
+Font Courier Standard "(1.05)" Standard ROM
+Font Symbol Special "(001.005)" Special ROM
+Font Barcode-Foo Special "(1.0)" Special Disk
+Font Unicode-Foo Expert "(2.0)" Adobe-Identity ROM
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>Font</code> directive defines a "device font" for the
+current printer driver. The name is the PostScript font
+name.</p>
+
+<p>The encoding is the default encoding of the font, usually
+<code>Standard</code>, <code>Expert</code>, or <code>Special</code>, as
+defined in the Adobe PPD file specification.</p>
+
+<p>The version is the PostScript string definition that
+corresponds to the font version number.</p>
+
+<p>The charset defines the available characters in the font,
+usually <code>Standard</code> or <code>Special</code>, as defined in the
+Adobe PPD file specification.</p>
+
+<p>The status is the installation status of the font and must be
+either the word <code>ROM</code> or <code>Disk</code>.</p>
+
+<p>Device fonts differ from fonts defined using the <a
+href='#_font'><code>#font</code></a> directive in that they are 
+automatically associated with the current driver. Fonts defined
+using <code>#font</code> may be imported into the current driver
+using the <code>Font *</code> form of this directive.</p>
+
+<h3>See Also</h3>
+
+<p><a href='#_font'><code>#font</code></a></p>
+
+
+<h2 class="title"><a name='Group'>Group</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+Group <i>name</i>
+Group <i>"name/text"</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+Group General
+Group "InstallableOptions/Options Installed"
+Group "Special/Vendor Options"
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>Group</code> directive specifies the group for new
+<code>Option</code> directives. The name is any combination of
+letters, numbers, and the underscore and can be up to 40
+characters in length. The names <code>General</code> and
+<code>InstallableOptions</code> are predefined for the standard
+Adobe UI keywords and for installable options, respectively.</p>
+
+<p>If provided, the text can be any string up to 40 characters
+in length. If no text is provided, the name is used.</p>
+
+<center><table width='80%' border='1' bgcolor='#cccccc' cellpadding='5' cellspacing='0'>
+<tr>
+       <td align='justify'><b>Note:</b>
+
+       <p>Because of certain API binary compatibility issues,
+       CUPS limits the length of PPD group translation strings
+       (text) to 40 characters, while the PPD specification
+       allows for up to 80 characters.</p>
+
+       </td>
+</tr>
+</table></center>
+
+<h3>See Also</h3>
+
+<p><a href='#Choice'><code>Choice</code></a>,
+<a href='#ColorModel'><code>ColorModel</code></a>,
+<a href='#Cutter'><code>Cutter</code></a>,
+<a href='#Darkness'><code>Darkness</code></a>,
+<a href='#Duplex'><code>Duplex</code></a>,
+<a href='#Finishing'><code>Finishing</code></a>,
+<a href='#InputSlot'><code>InputSlot</code></a>,
+<a href='#Installable'><code>Installable</code></a>,
+<a href='#MediaType'><code>MediaType</code></a>,
+<a href='#Option'><code>Option</code></a>,
+<a href='#Resolution'><code>Resolution</code></a>,
+<a href='#UIConstraints'><code>UIConstraints</code></a></p>
+
+
+<h2 class="title"><a name='HWMargins'>HWMargins</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+HWMargins <i>left bottom right top</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+HWMargins 18 36 18 36
+HWMargins 0.25in 0.5in 0.25in 0.5in
+HWMargins 0.6cm 1.2cm 0.6cm 1.2cm
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>HWMargins</code> directive specifies the current
+margins for <a href='#MediaSize'><code>MediaSize</code></a> that
+follow. The left, bottom, right, and top margin values specify
+the printable margins.</p>
+
+<h3>See Also</h3>
+
+<p><a href='#MediaSize'><code>MediaSize</code></a></p>
+
+
+<h2 class="title"><a name='InputSlot'>InputSlot</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+InputSlot <i>position name</i>
+InputSlot <i>position "name/text"</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+InputSlot 0 Auto
+InputSlot 1 "Upper/Tray 1"
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>InputSlot</code> directive adds a new choice to the
+<code>InputSlot</code> option. The position argument is a number
+from 0 to 2<sup>32</sup>-1 specifying the value that is placed
+in the <code>MediaPosition</code> attribute in the PostScript page
+device dictionary.</p>
+
+<p>The name is any combination of letters, numbers, and the
+underscore and can be up to 40 characters in length.</p>
+
+<p>If provided, the text can be any string up to 80 characters
+in length. If no text is provided, the name is used.</p>
+
+<h3>See Also</h3>
+
+<p><a href='#Choice'><code>Choice</code></a>,
+<a href='#ColorModel'><code>ColorModel</code></a>,
+<a href='#Cutter'><code>Cutter</code></a>,
+<a href='#Darkness'><code>Darkness</code></a>,
+<a href='#Duplex'><code>Duplex</code></a>,
+<a href='#Finishing'><code>Finishing</code></a>,
+<a href='#Group'><code>Group</code></a>,
+<a href='#Installable'><code>Installable</code></a>,
+<a href='#MediaType'><code>MediaType</code></a>,
+<a href='#Option'><code>Option</code></a>,
+<a href='#Resolution'><code>Resolution</code></a>,
+<a href='#UIConstraints'><code>UIConstraints</code></a></p>
+
+
+<h2 class="title"><a name='Installable'>Installable</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+Installable <i>name</i>
+Installable <i>"name/text"</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+Installable EnvTray
+Installable "Option1/Duplexer Installed"
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>Installable</code> directive adds a new boolean option
+to the <code>InstallableOptions</code> group with a default value of
+<code>False</code>. The name is any combination of letters, numbers,
+and the underscore and can be up to 40 characters in length.</p>
+
+<p>If provided, the text can be any string up to 80 characters
+in length. If no text is provided, the name is used.</p>
+
+
+<h2 class="title"><a name='LocAttribute'>LocAttribute</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+LocAttribute <i>name "keyword/text" value</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+LocAttribute fooProfile "Photo/Photographic Profile" "photopro.icc"
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>LocAttribute</code> directive creates a localized PPD
+attribute. The name is any combination of letters, numbers, and the
+underscore and can be up to 40 characters in length.</p>
+
+<p>The selector can be the empty string (<code>""</code>), a keyword
+consisting of up to 40 letters, numbers, and the underscore, or
+a string composed of a keyword and user text of up to 80
+characters.</p>
+
+<p>The value is any string or number; the string may contain
+multiple lines, however no one line may exceed 255
+characters.</p>
+
+<h3>See Also</h3>
+
+<p><a href="#Attribute"><code>Attribute</code></a></p>
+
+
+<h2 class="title"><a name='ManualCopies'>ManualCopies</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+ManualCopies <i>boolean-value</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+ManualCopies no
+ManualCopies yes
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>ManualCopies</code> directive specifies whether copies
+need to be produced by the RIP filters. The default is
+<code>no</code>.</p>
+
+<h3>See Also</h3>
+
+<p><a href='#Choice'><code>Choice</code></a>,
+<a href='#ColorModel'><code>ColorModel</code></a>,
+<a href='#Cutter'><code>Cutter</code></a>,
+<a href='#Darkness'><code>Darkness</code></a>,
+<a href='#Duplex'><code>Duplex</code></a>,
+<a href='#Finishing'><code>Finishing</code></a>,
+<a href='#Group'><code>Group</code></a>,
+<a href='#InputSlot'><code>InputSlot</code></a>,
+<a href='#MediaType'><code>MediaType</code></a>,
+<a href='#Option'><code>Option</code></a>,
+<a href='#Resolution'><code>Resolution</code></a>,
+<a href='#UIConstraints'><code>UIConstraints</code></a></p>
+
+
+<h2 class="title"><a name='Manufacturer'>Manufacturer</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+Manufacturer <i>"name"</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+Manufacturer "Foo"
+Manufacturer "HP"
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>Manufacturer</code> directive specifies the
+manufacturer name for the current driver. The name argument must
+conform to the manufacturer name requirements in the Adobe PPD
+file specification.</p>
+
+<h3>See Also</h3>
+
+<p><a href="#FileName"><code>FileName</code></a>,
+<a href='#ModelName'><code>ModelName</code></a>,
+<a href='#PCFileName'><code>PCFileName</code></a>,
+<a href='#Version'><code>Version</code></a></p>
+
+
+<h2 class="title"><a name='MaxSize'>MaxSize</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+MaxSize <i>width length</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+MaxSize 36in 100ft
+MaxSize 300cm 30m
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>MaxSize</code> directive specifies the maximum width
+and length that is supported for custom page sizes.</p>
+
+<h3>See Also</h3>
+
+<p><a href='#MinSize'><code>MinSize</code></a>,
+<a href='#VariablePaperSize'><code>VariablePaperSize</code></a></p>
+
+
+<h2 class="title"><a name='MediaSize'>MediaSize</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+MediaSize <i>name</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+MediaSize Letter
+MediaSize A4
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>MediaSize</code> directive adds the named size to the
+current printer driver using the current margins defined with
+the <a href="#HWMargins"><code>HWMargins</code></a> directive. The
+name argument must match a media size defined using the <a
+href="#_media"><code>#media</code></a> directive.</p>
+
+<h3>See Also</h3>
+
+<p><a href='#_media'><code>#media</code></a>,
+<a href='#HWMargins'><code>HWMargins</code></a></p>
+
+
+<h2 class="title"><a name='MediaType'>MediaType</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+MediaType <i>type name</i>
+MediaType <i>type "name/text"</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+MediaType 0 Auto
+MediaType 1 "Plain/Plain Paper"
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>MediaType</code> directive adds a new choice to the
+<code>MediaType</code> option. The type argument is a number
+from 0 to 2<sup>32</sup>-1 specifying the value that is placed
+in the <code>cupsMediaType</code> attribute in the PostScript page
+device dictionary.</p>
+
+<p>The name is any combination of letters, numbers, and the
+underscore and can be up to 40 characters in length. The name is
+placed in the <code>MediaType</code> attribute in the PostScript
+page device dictionary.</p>
+
+<p>If provided, the text can be any string up to 80 characters
+in length. If no text is provided, the name is used.</p>
+
+<h3>See Also</h3>
+
+<p><a href='#Choice'><code>Choice</code></a>,
+<a href='#ColorModel'><code>ColorModel</code></a>,
+<a href='#Cutter'><code>Cutter</code></a>,
+<a href='#Darkness'><code>Darkness</code></a>,
+<a href='#Duplex'><code>Duplex</code></a>,
+<a href='#Finishing'><code>Finishing</code></a>,
+<a href='#Group'><code>Group</code></a>,
+<a href='#InputSlot'><code>InputSlot</code></a>,
+<a href='#Installable'><code>Installable</code></a>,
+<a href='#Option'><code>Option</code></a>,
+<a href='#Resolution'><code>Resolution</code></a>,
+<a href='#UIConstraints'><code>UIConstraints</code></a></p>
+
+
+<h2 class="title"><a name='MinSize'>MinSize</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+MinSize <i>width length</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+MinSize 4in 8in
+MinSize 10cm 20cm
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>MinSize</code> directive specifies the minimum width
+and length that is supported for custom page sizes.</p>
+
+<h3>See Also</h3>
+
+<p><a href='#MaxSize'><code>MaxSize</code></a>,
+<a href='#VariablePaperSize'><code>VariablePaperSize</code></a></p>
+
+
+<h2 class="title"><a name='ModelName'>ModelName</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+ModelName <i>"name"</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+ModelName "Foo Laser Printer 2000"
+ModelName "Colorific 123"
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>ModelName</code> directive sets the printer name for
+the <code>ModelName</code>, <code>NickName</code>, and
+<code>ShortNickName</code> attributes for the printer driver. The
+name is any string of letters, numbers, spaces, and the
+characters ".", "/", "-", and "+" and should not begin with the
+manufacturer name since the PPD compiler will add this
+automatically for you. The maximum length of the name string is
+31 characters to conform to the Adobe limits on the length of
+<code>ShortNickName</code>.</p>
+
+<h3>See Also</h3>
+
+<p><a href="#FileName"><code>FileName</code></a>,
+<a href='#Manufacturer'><code>Manufacturer</code></a>,
+<a href='#PCFileName'><code>PCFileName</code></a>,
+<a href='#Version'><code>Version</code></a></p>
+
+
+<h2 class="title"><a name='ModelNumber'>ModelNumber</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+ModelNumber <i>expression</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+ModelNumber 123
+ModelNumber ($PCL_PAPER_SIZE $PCL_PJL)
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>ModelNumber</code> directive sets the
+<code>cupsModelNumber</code> attribute for the printer driver, which
+is often used by the printer driver filter to tailor its output
+for the current device. The number is any integer or bitwise OR
+of integers and constants that is appropriate for the printer
+driver filters.<p>
+
+<p>A complete list of printer driver model number constants is
+available later in this appendix in the section titled, "<a
+href='#REF_MODEL_NUMBER'>Printer Driver ModelNumber
+Constants</a>".</p>
+
+<h3>See Also</h3>
+
+<p><a href='#DriverType'><code>DriverType</code></a>,
+<a href='#Filter'><code>Filter</code></a></p>
+
+
+<h2 class="title"><a name='Option'>Option</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+Option <i>name type section order</i>
+Option <i>"name/text" type section order</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+Option Punch Boolean AnySetup 10
+Option "fooFinish/Finishing Option" PickOne DocumentSetup 10 
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>Option</code> directive creates a new option in the
+current group, by default the <code>General</code> group. The name
+is any combination of letters, numbers, and the underscore and
+can be up to 40 characters in length.</p>
+
+<p>If provided, the text can be any string up to 80 characters
+in length. If no text is provided, the name is used.</p>
+
+<p>The type argument is one of the following keywords:</p>
+
+<ul>
+
+       <li><code>Boolean</code> - a true/false option</li>
+
+       <li><code>PickOne</code> - allows the user to pick one
+       choice from a list</li>
+
+       <li><code>PickMany</code> - allows the user to pick zero or
+       more choices from a list</li>
+
+</ul>
+
+<p>The section argument is one of the following keywords:</p>
+
+<ul>
+
+       <li><code>AnySetup</code> - The option can be placed in
+       either the DocumentSetup or PageSetup sections of the
+       PostScript document</li>
+
+       <li><code>DocumentSetup</code> - The option must be placed
+       in the DocumentSetup section of the PostScript document;
+       this does not allow the option to be overridden on
+       individual pages</li>
+
+       <li><code>ExitServer</code> - The option must be placed in a
+       separate initialization job prior to the document (not
+       used for raster printer drivers)</li>
+
+       <li><code>JCLSetup</code> - The option contains job control
+       language commands and must be sent prior to the document
+       using the <code>JCLBegin</code> and
+       <code>JCLToPSInterpreter</code> attributes (not used for
+       raster printer drivers)</li>
+
+       <li><code>PageSetup</code> - The option must be placed at the
+       beginning of each page in the PostScript document</li>
+
+       <li><code>Prolog</code> - The option must be placed in the
+       prolog section of the PostScript document; this is
+       typically used to add special comments for high-end
+       typesetters, but can also be used to add CUPS PostScript
+       job ticket comments.</li>
+
+</ul>
+
+<p>The order argument is a real number greater than or equal to
+0.0 and is used to sort the printer commands from many options
+before sending them to the printer or RIP filter.</p>
+
+<h3>See Also</h3>
+
+<p><a href='#Choice'><code>Choice</code></a>,
+<a href='#ColorModel'><code>ColorModel</code></a>,
+<a href='#Cutter'><code>Cutter</code></a>,
+<a href='#Darkness'><code>Darkness</code></a>,
+<a href='#Duplex'><code>Duplex</code></a>,
+<a href='#Finishing'><code>Finishing</code></a>,
+<a href='#Group'><code>Group</code></a>,
+<a href='#InputSlot'><code>InputSlot</code></a>,
+<a href='#Installable'><code>Installable</code></a>,
+<a href='#MediaType'><code>MediaType</code></a>,
+<a href='#Resolution'><code>Resolution</code></a>,
+<a href='#UIConstraints'><code>UIConstraints</code></a></p>
+
+
+<h2 class="title"><a name='PCFileName'>PCFileName</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+PCFileName <i>"filename.ppd"</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+PCFileName "foljt2k1.ppd"
+PCFileName "deskjet.ppd"
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>PCFileName</code> attribute specifies the name of the
+PPD file for the current driver. The filename argument must
+conform to the Adobe PPD file specification and can be no more
+than 8 filename characters plus the extension ".ppd".</p>
+
+<h3>See Also</h3>
+
+<p><a href="#FileName"><code>FileName</code></a>,
+<a href='#Manufacturer'><code>Manufacturer</code></a>,
+<a href='#ModelName'><code>ModelName</code></a>,
+<a href='#Version'><code>Version</code></a></p>
+
+
+<h2 class="title"><span class="info">Deprecated</span><a name='Resolution'>Resolution</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+Resolution <i>colorspace bits-per-color row-count row-feed row-step name</i>
+Resolution <i>colorspace bits-per-color row-count row-feed row-step "name/text"</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+Resolution - 8 0 0 0 300dpi
+Resolution k 8 0 0 0 "600x300dpi/600 DPI Grayscale"
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>Resolution</code> directive creates a new
+<code>Resolution</code> option choice which sets the
+<code>HWResolution</code>, <code>cupsBitsPerColor</code>,
+<code>cupsRowCount</code>, <code>cupsRowFeed</code>,
+<code>cupsRowStep</code>, and optionally the <code>cupsColorSpace</code>
+page device dictionary attributes. The colorspace argument
+specifies a colorspace to use for the specified resolution and
+can be the hyphen (<code>-</code>) character to make no change to
+the selected color model or any keyword listed in the section
+titled, "<a href='#REF_COLOR_SPACE'>Colorspace Keywords</a>", to
+force the named colorspace.</p>
+
+<p>The bits-per-color argument specifies the number of bits per
+color to generate when RIP'ing a job. The values 1, 2, 4, and 8
+are currently supported by CUPS.</p>
+
+<p>The row-count, row-feed, and row-step argument specify the
+driver-dependent values for the <code>cupsRowCount</code>,
+<code>cupsRowFeed</code>, and <code>cupsRowStep</code> attributes,
+respectively. Most drivers leave these attributes set to 0, but
+any number from 0 to 2<sup>32</sup>-1 is allowed.</p>
+
+<p>The name argument must conform to the resolution naming
+conventions in the Adobe PPD file specification, either
+<code>HHHdpi</code> for symmetric resolutions or <code>HHHxVVVdpi</code>
+for asymmetric resolutions. The <code>HHH</code> and <code>VVV</code> in
+the examples represent the horizontal and vertical resolutions
+which must be positive integer values.</p>
+
+<p>If provided, the text can be any string up to 80 characters
+in length. If no text is provided, the name is used.</p>
+
+<h3>See Also</h3>
+
+<p><a href='#Choice'><code>Choice</code></a>,
+<a href='#ColorModel'><code>ColorModel</code></a>,
+<a href='#Cutter'><code>Cutter</code></a>,
+<a href='#Darkness'><code>Darkness</code></a>,
+<a href='#Duplex'><code>Duplex</code></a>,
+<a href='#Finishing'><code>Finishing</code></a>,
+<a href='#Group'><code>Group</code></a>,
+<a href='#InputSlot'><code>InputSlot</code></a>,
+<a href='#Installable'><code>Installable</code></a>,
+<a href='#MediaType'><code>MediaType</code></a>,
+<a href='#Option'><code>Option</code></a>,
+<a href='#UIConstraints'><code>UIConstraints</code></a></p>
+
+
+<h2 class="title"><span class="info">Deprecated</span><a name='SimpleColorProfile'>SimpleColorProfile</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+SimpleColorProfile <i>resolution/mediatype density
+    yellow-density red-density gamma
+    red-adjust green-adjust blue-adjust</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+SimpleColorProfile -/- 100 100 200 1.0 0 0 0
+
+SimpleColorProfile 360dpi/- 100 95 150 1.2 5 10 15
+
+SimpleColorProfile 720dpi/Glossy 100 90 120 1.5 -5 5 10
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>SimpleColorProfile</code> directive creates a
+matrix-based <a href="#ColorProfile"><code>ColorProfile</code></a>
+using values chosen with the <code>cupsprofile(1)</code> utility. 
+The resolution and mediatype arguments specify the
+<code>Resolution</code> and <code>MediaType</code> choices which use the
+profile; the hyphen (<code>-</code>) is used to specify that any
+resolution or mediatype can be used with the profile.</p>
+
+<p>The density argument specifies the linear density correction
+to apply to the color values (P = d * 0.01 * p<sup>g</sup>) and
+is an integer greater than 0 and less than or equal to 100. A
+value 100 of disables density correction while lower values
+produce proportionately lighter output. The density value
+adjusts all color channels equally in all color modes.</p>
+
+<p>The yellow-density argument specifies the density of the
+yellow channel when printing in grayscale or RGB mode and is an
+integer greater than 0 and less then or equal to 100. A value of
+100 disables yellow density correction while lower values
+produce proportionately lighter output.</p>
+
+<P>The red-density argument specifies the two-color density
+limit (e.g. C + M, C + Y, M + Y) when printing in grayscale or
+RGB mode and is an integer greater than 0 and less then or equal
+to 200. A value of 200 disables two-color density correction
+while lower values produce proportionately lighter output.</p>
+
+<p>The gamma argument specifies the gamma correction to apply to
+the color values (P = p<sup>g</sup>) and is a real number
+greater than 0. Values larger than 1 cause a general lightening
+of the print while values smaller than 1 cause a general
+darkening of the print. A value of 1 disables gamma
+correction.</p>
+
+<p>The red-adjust, green-adjust, blue-adjust arguments specify
+the percentage of color to add or remove. Positive red-adjust
+values add magenta and negative values add yellow. Positive
+green-adjust values add cyan and negative values add yellow.
+Positive blue-adjust values add cyan and negative values add
+magenta. Values of 0 disable color adjustments.</p>
+
+<h3>See Also</h3>
+
+<p><a href='#ColorProfile'><code>ColorProfile</code></a></p>
+
+
+<h2 class="title"><a name='Throughput'>Throughput</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+Throughput <i>pages-per-minute</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+Throughput 1
+Throughput 10
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>Througput</code> directive sets the <code>Troughput</code>
+attribute for the current printer driver. The pages-per-minute
+argument is a positive integer representing the peak number of
+pages per minute that the printer is capable of producing. Use a
+value of 1 for printers that produce less than 1 page per
+minute.</p>
+
+
+<h2 class="title"><a name='UIConstraints'>UIConstraints</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+UIConstraints <i>"*Option1 *Option2"</i>
+UIConstraints <i>"*Option1 Choice1 *Option2"</i>
+UIConstraints <i>"*Option1 *Option2 Choice2"</i>
+UIConstraints <i>"*Option1 Choice1 *Option2 Choice2"</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+UIConstraints "*Finishing *MediaType"
+UIConstraints "*Option1 False *Duplex"
+UIConstraints "*Duplex *MediaType Transparency"
+UIConstraints "*Resolution 600dpi *ColorModel RGB"
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>UIConstraints</code> directive adds a constraint
+between two options. Constraints inform the application when a
+user has chosen incompatible options. Each option name is
+preceded by the asterisk (<code>*</code>). If no choice is given for
+an option, then all choices <i>except</i> <code>False</code> and
+<code>None</code> will conflict with the other option and choice(s).
+Since the PPD compiler automatically adds reciprocal constraints
+(option A conflicts with option B, so therefore option B
+conflicts with option A), you need only specify the constraint
+once.</p>
+
+<h3>See Also</h3>
+
+<p><a href='#Choice'><code>Choice</code></a>,
+<a href='#ColorModel'><code>ColorModel</code></a>,
+<a href='#Cutter'><code>Cutter</code></a>,
+<a href='#Darkness'><code>Darkness</code></a>,
+<a href='#Duplex'><code>Duplex</code></a>,
+<a href='#Finishing'><code>Finishing</code></a>,
+<a href='#Group'><code>Group</code></a>,
+<a href='#InputSlot'><code>InputSlot</code></a>,
+<a href='#Installable'><code>Installable</code></a>,
+<a href='#MediaType'><code>MediaType</code></a>,
+<a href='#Option'><code>Option</code></a>,
+<a href='#Resolution'><code>Resolution</code></a></p>
+
+
+<h2 class="title"><a name='VariablePaperSize'>VariablePaperSize</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+VariablePaperSize <i>boolean-value</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+VariablePaperSize yes
+VariablePaperSize no
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>VariablePaperSize</code> directive specifies whether
+the current printer supports variable (custom) page sizes. When
+<code>yes</code> is specified, the PPD compiler will include the
+standard PPD attributes required to support custom page
+sizes.</p>
+
+<h3>See Also</h3>
+
+<p><a href='#MaxSize'><code>MaxSize</code></a>,
+<a href='#MinSize'><code>MinSize</code></a></p>
+
+
+<h2 class="title"><a name='Version'>Version</a></h2>
+
+<h3>Syntax</h3>
+
+<pre>
+Version <i>number</i>
+</pre>
+
+<h3>Examples</h3>
+
+<pre>
+Version 1.0
+Version 3.7
+</pre>
+
+<h3>Description</h3>
+
+<p>The <code>Version</code> directive sets the <code>FileVersion</code>
+attribute in the PPD file and is also used for the
+<code>NickName</code> attribute. The number argument is a positive
+real number.</p>
+
+<h3>See Also</h3>
+
+<p><a href='#Manufacturer'><code>Manufacturer</code></a>,
+<a href='#ModelName'><code>ModelName</code></a>,
+<a href='#PCFileName'><code>PCFileName</code></a></p>
+
+
+<h2 class="title"><a name='REF_INCLUDE'>Standard Include Files</h2>
+
+<p><a href='#TABLEB-1'>Table B-1</a> shows the standard include
+files which are provided with the DDK.</p>
+
+<center><table border='1' cellpadding='5' cellspacing='0' width='80%'>
+<caption align='bottom'><a name='TABLEB-1'><i>Table B-1,
+Standard Include Files</i></a></caption>
+<tr bgcolor='#cccccc'>
+       <th>Include File</th>
+       <th>Description</th>
+</tr>
+<tr>
+       <td valign='top'><code>&lt;font.defs&gt;</code></td>
+       <td align='justify' valign='top'>Defines all of the
+       standard fonts which are included with ESP Ghostscript
+       and the Apple PDF RIP.</td>
+</tr>
+<tr>
+       <td valign='top'><code>&lt;epson.h&gt;</code></td>
+       <td align='justify' valign='top'>Defines all of the
+       CUPS ESC/P sample driver constants.</td>
+</tr>
+<tr>
+       <td valign='top'><code>&lt;escp.h&gt;</code></td>
+       <td align='justify' valign='top'>Defines all of the
+       DDK ESC/P driver constants.</td>
+</tr>
+<tr>
+       <td valign='top'><code>&lt;hp.h&gt;</code></td>
+       <td align='justify' valign='top'>Defines all of the
+       CUPS HP-PCL sample driver constants.</td>
+</tr>
+<tr>
+       <td valign='top'><code>&lt;label.h&gt;</code></td>
+       <td align='justify' valign='top'>Defines all of the
+       CUPS label sample driver constants.</td>
+</tr>
+<tr>
+       <td valign='top'><code>&lt;media.defs&gt;</code></td>
+       <td align='justify' valign='top'>Defines all of the
+       standard media sizes listed in Appendix B of the Adobe
+       PostScript Printer Description File Format
+       Specification.</td>
+</tr>
+<tr>
+       <td valign='top'><code>&lt;pcl.h&gt;</code></td>
+       <td align='justify' valign='top'>Defines all of the
+       DDK HP-PCL driver constants.</td>
+</tr>
+<tr>
+       <td valign='top'><code>&lt;raster.defs&gt;</code></td>
+       <td align='justify' valign='top'>Defines all of the CUPS
+       raster format constants.</td>
+</tr>
+</table></center>
+
+<h2 class="title"><a name='REF_MODEL_NUMBER'>Printer Driver ModelNumber Constants</a></h2>
+
+<p>The CUPS DDK and sample drivers use the
+<code>cupsModelNumber</code> attribute in the PPD file to tailor
+their output to the printer. The following sections describe the
+constants for each driver.</p>
+
+<h3><a name='REF_MODEL_EPSON'>The CUPS ESC/P Sample Driver (epson)</a></h3>
+
+<p>The <code>epson</code> driver supports Epson and Okidata
+dot-matrix, Epson Stylus Color, and Epson Stylus Photo printers.
+<a href='#TABLEB-2'>Table B-2</a> lists the constants for the <a
+href='#ModelNumber'><code>ModelNumber</code></a> directive.
+<code>ModelNumber</code> values should be inserted by referencing
+only one of these constants.</p>
+
+<!-- NEED 20 -->
+<center><table border='1' cellpadding='5' cellspacing='0' width='80%'>
+<caption align='bottom'><a name='TABLEB-2'><i>Table B-2, <code>epson</code> driver
+constants</i></a></caption>
+<tr bgcolor='#cccccc'>
+       <th>Constant</th>
+       <th>Description</th>
+</tr>
+<tr>
+       <td valign='top'><code>EPSON_9PIN</code></td>
+       <td align='justify' valign='top'>Epson and Okidata 9-pin
+       dot-matrix printers</td>
+</tr>
+<tr>
+       <td valign='top'><code>EPSON_24PIN</code></td>
+       <td align='justify' valign='top'>Epson and Okidata 24-pin
+       dot-matrix printers</td>
+</tr>
+<tr>
+       <td valign='top'><code>EPSON_COLOR</code></td>
+       <td align='justify' valign='top'>Older Epson Stylus Color
+       printers that use the <code>ESC .</code> graphics command</td>
+</tr>
+<tr>
+       <td valign='top'><code>EPSON_PHOTO</code></td>
+       <td align='justify' valign='top'>Older Epson Stylus Photo
+       printers that use the <code>ESC .</code> graphics command</td>
+</tr>
+<tr>
+       <td valign='top'><code>EPSON_ICOLOR</code></td>
+       <td align='justify' valign='top'>Newer Epson Stylus Color
+       printers that use the <code>ESC i</code> graphics command</td>
+</tr>
+<tr>
+       <td valign='top'><code>EPSON_IPHOTO</code></td>
+       <td align='justify' valign='top'>Newer Epson Stylus Photo
+       printers that use the <code>ESC i</code> graphics command</td>
+</tr>
+</table></center>
+
+<h3><a name='REF_MODEL_HP'>The CUPS HP-PCL Sample Driver (hp)</a></h3>
+
+<p>The <code>hp</code> driver supports HP LaserJet and DeskJet
+printers. <a href='#TABLEB-3'>Table B-3</a> lists the constants
+for the <a href='#ModelNumber'><code>ModelNumber</code></a>
+directive. <code>ModelNumber</code> values should be inserted by
+referencing only one of these constants.</p>
+
+<center><table border='1' cellpadding='5' cellspacing='0' width='80%'>
+<caption align='bottom'><a name='TABLEB-3'><i>Table B-3, <code>hp</code> driver
+constants</i></a></caption>
+<tr bgcolor='#cccccc'>
+       <th>Constant</th>
+       <th>Description</th>
+</tr>
+<tr>
+       <td valign='top'><code>HP_LASERJET</code></td>
+       <td align='justify' valign='top'>HP LaserJet printers supporting
+       PCL 3, 4, or 5</td>
+</tr>
+<tr>
+       <td valign='top'><code>HP_DESKJET</code></td>
+       <td align='justify' valign='top'>HP DeskJet printers
+       supporting PCL 3 and using the simple color graphics
+       command (<code>ESC * r # U</code>)</td>
+</tr>
+<tr>
+       <td valign='top'><code>HP_DESKJET2</code></td>
+       <td align='justify' valign='top'>HP DeskJet printers
+       supporting PCL3GUI and using the configure raster graphics
+       command (<code>ESC * g # W</code>)</td>
+</tr>
+</table></center>
+
+<h3><a name='REF_MODEL_LABEL'>The CUPS Label Sample Driver (label)</a></h3>
+
+<p>The <code>label</code> driver supports the Dymo Labelwriter, Zebra CPCL, Zebra EPL, and Zebra ZPL, and Intellitech PCL label printers. <a href='#TABLEB-4'>Table B-4</a>
+lists the constants for the <a
+href='#ModelNumber'><code>ModelNumber</code></a> directive.
+<code>ModelNumber</code> values should be inserted by referencing
+only one of these constants.</p>
+
+<center><table border='1' cellpadding='5' cellspacing='0' width='80%'>
+<caption align='bottom'><a name='TABLEB-4'><i>Table B-4, <code>label</code> driver
+constants</i></a></caption>
+<tr bgcolor='#cccccc'>
+       <th>Constant</th>
+       <th>Description</th>
+</tr>
+<tr>
+       <td valign='top'><code>DYMO_3x0</code></td>
+       <td align='justify' valign='top'>Format output for the
+       Dymo Labelwriter 300, 330, or 330 Turbo.</td>
+</tr>
+<tr>
+       <td valign='top'><code>INTELLITECH_PCL</code></td>
+       <td align='justify' valign='top'>Format output for the Intellitech PCL printers.</td>
+</tr>
+<tr>
+       <td valign='top'><code>ZEBRA_CPCL</code></td>
+       <td align='justify' valign='top'>Format output for the Zebra CPCL printers.</td>
+</tr>
+<tr>
+       <td valign='top'><code>ZEBRA_EPL_LINE</code></td>
+       <td align='justify' valign='top'>Format output for the Zebra EPL line mode (EPL 1) printers.</td>
+</tr>
+<tr>
+       <td valign='top'><code>ZEBRA_EPL_PAGE</code></td>
+       <td align='justify' valign='top'>Format output for the Zebra EPL page mode (EPL 2) printers.</td>
+</tr>
+<tr>
+       <td valign='top'><code>ZEBRA_ZPL</code></td>
+       <td align='justify' valign='top'>Format output for the Zebra ZPL printers.</td>
+</tr>
+</table></center>
+
+<h3><a name='REF_MODEL_ESCP'>The DDK ESC/P Driver (escp)</a></h3>
+
+<p>The <code>escp</code> driver supports all Epson inkjet printers.
+<a href='#TABLEB-6'>Table B-6</a> lists the constants for the <a
+href='#ModelNumber'><code>ModelNumber</code></a> directive.
+<code>ModelNumber</code> values should be specified as the bitwise
+OR of one or more of these constants.</p>
+
+<center><table border='1' cellpadding='5' cellspacing='0' width='80%'>
+<caption align='bottom'><a name='TABLEB-6'><i>Table B-6, <code>escp</code> driver
+constants</i></a></caption>
+<tr bgcolor='#cccccc'>
+       <th>Constant</th>
+       <th>Description</th>
+</tr>
+<tr>
+       <td valign='top'><code>ESCP_MICROWEAVE</code></td>
+       <td align='justify' valign='top'>Use microweave command?</td>
+</tr>
+<tr>
+       <td valign='top'><code>ESCP_STAGGER</code></td>
+       <td align='justify' valign='top'>Are color jets staggered?</td>
+</tr>
+<tr>
+       <td valign='top'><code>ESCP_ESCK</code></td>
+       <td align='justify' valign='top'>Use print mode command?</td>
+</tr>
+<tr>
+       <td valign='top'><code>ESCP_EXT_UNITS</code></td>
+       <td align='justify' valign='top'>Use extended unit commands?</td>
+</tr>
+<tr>
+       <td valign='top'><code>ESCP_EXT_MARGINS</code></td>
+       <td align='justify' valign='top'>Use extended margin command?</td>
+</tr>
+<tr>
+       <td valign='top'><code>ESCP_USB</code></td>
+       <td align='justify' valign='top'>Send USB packet mode escape</td>
+</tr>
+<tr>
+       <td valign='top'><code>ESCP_PAGE_SIZE</code></td>
+       <td align='justify' valign='top'>Use page size command</td>
+</tr>
+<tr>
+       <td valign='top'><code>ESCP_RASTER_ESCI</code></td>
+       <td align='justify' valign='top'>Use <code>ESC i</code> graphics command</td>
+</tr>
+<tr>
+       <td valign='top'><code>ESCP_REMOTE</code></td>
+       <td align='justify' valign='top'>Use remote mode commands</td>
+</tr>
+<tr>
+       <td valign='top'><code>ESCP_REMOTE_AC</code></td>
+       <td align='justify' valign='top'>Use auto-cutter command</td>
+</tr>
+<tr>
+       <td valign='top'><code>ESCP_REMOTE_CO</code></td>
+       <td align='justify' valign='top'>Use cutter-operation command</td>
+</tr>
+<tr>
+       <td valign='top'><code>ESCP_REMOTE_EX</code></td>
+       <td align='justify' valign='top'>Use media-position command</td>
+</tr>
+<tr>
+       <td valign='top'><code>ESCP_REMOTE_MS</code></td>
+       <td align='justify' valign='top'>Use media-size command</td>
+</tr>
+<tr>
+       <td valign='top'><code>ESCP_REMOTE_MT</code></td>
+       <td align='justify' valign='top'>Use media-type command</td>
+</tr>
+<tr>
+       <td valign='top'><code>ESCP_REMOTE_PC</code></td>
+       <td align='justify' valign='top'>Use paper-check command</td>
+</tr>
+<tr>
+       <td valign='top'><code>ESCP_REMOTE_PH</code></td>
+       <td align='justify' valign='top'>Use paper-thickness command</td>
+</tr>
+<tr>
+       <td valign='top'><code>ESCP_REMOTE_PP</code></td>
+       <td align='justify' valign='top'>Use paper-path command</td>
+</tr>
+<tr>
+       <td valign='top'><code>ESCP_REMOTE_SN0</code></td>
+       <td align='justify' valign='top'>Use feed-sequence-0 command</td>
+</tr>
+<tr>
+       <td valign='top'><code>ESCP_REMOTE_SN1</code></td>
+       <td align='justify' valign='top'>Use platten-gap command</td>
+</tr>
+<tr>
+       <td valign='top'><code>ESCP_REMOTE_SN2</code></td>
+       <td align='justify' valign='top'>Use feed-sequence-2 command</td>
+</tr>
+<tr>
+       <td valign='top'><code>ESCP_REMOTE_SN6</code></td>
+       <td align='justify' valign='top'>Use eject-delay command</td>
+</tr>
+<tr>
+       <td valign='top'><code>ESCP_REMOTE_FP</code></td>
+       <td align='justify' valign='top'>Use print-position command</td>
+</tr>
+</table></center>
+
+<h3><a name='REF_MODEL_PCL'>The DDK HP-PCL Driver (pcl)</a></h3>
+
+<p>The <code>pcl</code> driver supports all HP LaserJet, DeskJet,
+and DesignJet printers. <a href='#TABLEB-5'>Table B-5</a> lists
+the constants for the <a
+href='#ModelNumber'><code>ModelNumber</code></a> directive.
+<code>ModelNumber</code> values should be specified as the bitwise
+OR of one or more of these constants.</p>
+
+<center><table border='1' cellpadding='5' cellspacing='0' width='80%'>
+<caption align='bottom'><a name='TABLEB-5'><i>Table B-5, <code>pcl</code> driver
+constants</i></a></caption>
+<tr bgcolor='#cccccc'>
+       <th>Constant</th>
+       <th>Description</th>
+</tr>
+<tr>
+       <td valign='top'><code>PCL_PAPER_SIZE</code></td>
+       <td align='justify' valign='top'>Use paper size command (<code>ESC &amp; l # A</code>)</td>
+</tr>
+<tr>
+       <td valign='top'><code>PCL_INKJET</code></td>
+       <td align='justify' valign='top'>Use inkjet commands</td>
+</tr>
+<tr>
+       <td valign='top'><code>PCL_RASTER_END_COLOR</code></td>
+       <td align='justify' valign='top'>Use new end-raster command (<code>ESC * r C</code>)</td>
+</tr>
+<tr>
+       <td valign='top'><code>PCL_RASTER_CID</code></td>
+       <td align='justify' valign='top'>Use configure-image-data command (<code>ESC * v # W</code>)</td>
+</tr>
+<tr>
+       <td valign='top'><code>PCL_RASTER_CRD</code></td>
+       <td align='justify' valign='top'>Use configure-raster-data command (<code>ESC * g # W</code>)</td>
+</tr>
+<tr>
+       <td valign='top'><code>PCL_RASTER_SIMPLE</code></td>
+       <td align='justify' valign='top'>Use simple-raster-color command (<code>ESC * r # U</code>)</td>
+</tr>
+<tr>
+       <td valign='top'><code>PCL_RASTER_RGB24</code></td>
+       <td align='justify' valign='top'>Use 24-bit RGB mode</td>
+</tr>
+<tr>
+       <td valign='top'><code>PCL_PJL</code></td>
+       <td align='justify' valign='top'>Use PJL commands</td>
+</tr>
+<tr>
+       <td valign='top'><code>PCL_PJL_PAPERWIDTH</code></td>
+       <td align='justify' valign='top'>Use PJL PAPERWIDTH/LENGTH commands</td>
+</tr>
+<tr>
+       <td valign='top'><code>PCL_PJL_HPGL2</code></td>
+       <td align='justify' valign='top'>Use PJL ENTER HPGL2 command</td>
+</tr>
+<tr>
+       <td valign='top'><code>PCL_PJL_PCL3GUI</code></td>
+       <td align='justify' valign='top'>Use PJL ENTER PCL3GUI command</td>
+</tr>
+<tr>
+       <td valign='top'><code>PCL_PJL_RESOLUTION</code></td>
+       <td align='justify' valign='top'>Use PJL SET RESOLUTION command</td>
+</tr>
+</table></center>
+
+<H2><A NAME="REF_COLOR">Color Keywords</A></H2>
+
+<p>The PPD compiler defines two types of color keywords:
+colorspace and color order. The following sections list the
+supported keywords for each type.</p>
+
+<H3><A NAME="REF_COLOR_SPACE">Colorspace Keywords</A></H3>
+
+<P>The following colorspace keywords are recognized:</P>
+
+<UL>
+
+       <LI><TT>cielab</TT> - CIE Lab <A HREF="#REF_COLOR_APPLE2">**</A></LI>
+
+       <LI><TT>ciexyz</TT> - CIE XYZ <A HREF="#REF_COLOR_APPLE2">**</A></LI>
+
+       <LI><TT>cmy</TT> - Cyan, magenta, yellow</LI>
+
+       <LI><TT>cmyk</TT> - Cyan, magenta, yellow, black</LI>
+
+       <LI><TT>gmck</TT> - Gold, magenta, yellow, black <A HREF="#REF_COLOR_APPLE2">**</A></LI>
+
+       <LI><TT>gmcs</TT> - Gold, magenta, yellow, silver <A HREF="#REF_COLOR_APPLE2">**</A></LI>
+
+       <LI><TT>gold</TT> - Gold foil <A HREF="#REF_COLOR_APPLE2">**</A></LI>
+
+       <LI><TT>icc1</TT> - ICC-based, 1 color <A HREF="#REF_COLOR_APPLE2">**</A></LI>
+
+       <LI><TT>icc2</TT> - ICC-based, 2 colors <A HREF="#REF_COLOR_APPLE2">**</A></LI>
+
+       <LI><TT>icc3</TT> - ICC-based, 3 colors <A HREF="#REF_COLOR_APPLE2">**</A></LI>
+
+       <LI><TT>icc4</TT> - ICC-based, 4 colors <A HREF="#REF_COLOR_APPLE2">**</A></LI>
+
+       <LI><TT>icc5</TT> - ICC-based, 5 colors <A HREF="#REF_COLOR_APPLE2">**</A></LI>
+
+       <LI><TT>icc6</TT> - ICC-based, 6 colors <A HREF="#REF_COLOR_APPLE2">**</A></LI>
+
+       <LI><TT>icc7</TT> - ICC-based, 7 colors <A HREF="#REF_COLOR_APPLE2">**</A></LI>
+
+       <LI><TT>icc8</TT> - ICC-based, 8 colors <A HREF="#REF_COLOR_APPLE2">**</A></LI>
+
+       <LI><TT>icc9</TT> - ICC-based, 9 colors <A HREF="#REF_COLOR_APPLE2">**</A></LI>
+
+       <LI><TT>icca</TT> - ICC-based, 10 colors <A HREF="#REF_COLOR_APPLE2">**</A></LI>
+
+       <LI><TT>iccb</TT> - ICC-based, 11 colors <A HREF="#REF_COLOR_APPLE2">**</A></LI>
+
+       <LI><TT>iccc</TT> - ICC-based, 12 colors <A HREF="#REF_COLOR_APPLE2">**</A></LI>
+
+       <LI><TT>iccd</TT> - ICC-based, 13 colors <A HREF="#REF_COLOR_APPLE2">**</A></LI>
+
+       <LI><TT>icce</TT> - ICC-based, 14 colors <A HREF="#REF_COLOR_APPLE2">**</A></LI>
+
+       <LI><TT>iccf</TT> - ICC-based, 15 colors <A HREF="#REF_COLOR_APPLE2">**</A></LI>
+
+       <LI><TT>k</TT> - Black</LI>
+
+       <LI><TT>kcmy</TT> - Black, cyan, magenta, yellow <A HREF="#REF_COLOR_APPLE">*</A></LI>
+
+       <LI><TT>kcmycm</TT> - Black, cyan, magenta, yellow, light-cyan, light-magenta <A HREF="#REF_COLOR_APPLE">*</A></LI>
+
+       <LI><TT>rgb</TT> - Red, green, blue</LI>
+
+       <LI><TT>rgba</TT> - Red, green, blue, alpha</LI>
+
+       <LI><TT>rgbw</TT> - Red, green, blue, luminance <A HREF="#REF_COLOR_APPLE">*</A></LI>
+
+       <LI><TT>silver</TT> - Silver foil <A HREF="#REF_COLOR_APPLE2">**</A></LI>
+
+       <LI><TT>w</TT> - Luminance</LI>
+
+       <LI><TT>white</TT> - White ink (as black) <A HREF="#REF_COLOR_APPLE2">**</A></LI>
+
+       <LI><TT>ymc</TT> - Yellow, magenta, cyan <A HREF="#REF_COLOR_APPLE">*</A></LI>
+
+       <LI><TT>ymck</TT> - Yellow, magenta, cyan, black <A HREF="#REF_COLOR_APPLE">*</A>
+
+       <BR>&nbsp;
+
+       <BR><A NAME="REF_COLOR_APPLE">*</A> = This colorspace is not supported on Mac OS X prior to 10.4.
+       <BR><A NAME="REF_COLOR_APPLE2">**</A> = This colorspace is not supported on Mac OS X.</LI>
+
+</UL>
+
+<H3><A NAME="REF_COLOR_ORDER">Color Order Keywords</A></H3>
+
+<P>The following color order keywords are recognized:</P>
+
+<UL>
+
+       <LI><TT>chunked</TT> or <TT>chunky</TT> - Color values
+       are passed together on a line as RGB RGB RGB RGB</LI>
+
+       <LI><TT>banded</TT> - Color values are passed separately
+       on a line as RRRR GGGG BBBB <A
+       HREF="#REF_COLOR_APPLE2">*</A></LI>
+
+       <LI><TT>planar</TT> - Color values are passed separately
+       on a page as RRRR RRRR RRRR ... GGGG GGGG GGGG ... BBBB
+       BBBB BBBB <A HREF="#REF_COLOR_APPLE2">*</A>
+
+       <BR>&nbsp;
+
+       <BR><A NAME="REF_COLOR_APPLE2">*</A> = This color order
+       is not supported by the current Apple RIP filters and
+       should not be used when developing printer drivers for
+       MacOS X 10.2 or 10.3.</LI>
+
+</UL>
+
+</BODY>
+</HTML>
index accaacc13548e8753fe3109cc8f60d777e0065ce..81d58ff251efe3391284ffa753173abb930c70e6 100644 (file)
@@ -87,7 +87,7 @@ clean:
        $(RM) $(OBJS) core
        $(RM) *.bck core.*
        $(RM) $(TARGETS)
-       $(RM) -r images
+       $(RM) -r test
        $(RM) libcupsdriver.so libcupsdriver.sl libcupsdriver.dylib
        $(RM) -r 32bit 64bit
 
@@ -276,17 +276,25 @@ rastertopclx:             rastertopclx.o pcl-common.o $(LIBCUPSDRIVER) \
                $(LINKCUPSIMAGE) $(LIBS)
 
 
+#
+# test, make a common test subdirectory for the other test programs.
+#
+
+test:
+       if test ! -d test; then \
+               rm -rf test; \
+               mkdir test; \
+       fi
+
+
 #
 # testcmyk, test cmyk separation functions.
 #
 
-testcmyk:              testcmyk.o libcupsdriver.a ../cups/libcups.a
+testcmyk:              test testcmyk.o libcupsdriver.a ../cups/libcups.a
        echo Linking $@...
        $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testcmyk.o libcupsdriver.a \
                ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
-       if test ! -d test; then \
-               mkdir test; \
-       fi
        echo Running CMYK API tests...
        ./testcmyk > test/testcmyk.log
 
@@ -295,13 +303,10 @@ testcmyk:         testcmyk.o libcupsdriver.a ../cups/libcups.a
 # testdither, test dithering functions.
 #
 
-testdither:            testdither.o libcupsdriver.a ../cups/libcups.a
+testdither:            test testdither.o libcupsdriver.a ../cups/libcups.a
        echo Linking $@...
        $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testdither.o libcupsdriver.a \
                ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
-       if test ! -d test; then \
-               mkdir test; \
-       fi
        echo Running dither API tests...
        ./testdither > test/0-255.pgm 2>test/0-255.log
        ./testdither 0 127 255 > test/0-127-255.pgm 2>test/0-127-255.log
@@ -317,13 +322,10 @@ testdither:               testdither.o libcupsdriver.a ../cups/libcups.a
 # testrgb, test RGB separation functions.
 #
 
-testrgb:               testrgb.o libcupsdriver.a ../cups/libcups.a
+testrgb:               test testrgb.o libcupsdriver.a ../cups/libcups.a
        echo Linking $@...
        $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testrgb.o libcupsdriver.a \
                ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
-       if test ! -d test; then \
-               mkdir test; \
-       fi
        echo Running RGB API tests...
        ./testrgb > test/testrgb.log 2>&1 || echo "RGB tests failed!"
 
index c65314403d3ecd8b16ba8d06365ccea1cd9d460c..72477b7cd05aa4755c54497cc8d3e1aa057117ae 100644 (file)
@@ -49,6 +49,7 @@ MAN5  =       classes.conf.$(MAN5EXT) \
 MAN7   =       backend.$(MAN7EXT) \
                commandtoescpx.$(MAN7EXT) \
                commandtopclx.$(MAN7EXT) \
+               drv.$(MAN7EXT) \
                filter.$(MAN7EXT) \
                rastertoescpx.$(MAN7EXT) \
                rastertopclx.$(MAN7EXT)
index f9a3d8c283f1329ad02f4304b0f92a748aeb61bf..f88fee99cb6b7d770c6f735168d2b14170b496ff 100644 (file)
@@ -1,5 +1,5 @@
 .\"
-.\" "$Id: cupsctl.man 5969 2006-09-19 20:09:24Z mike $"
+.\" "$Id$"
 .\"
 .\"   cupsctl man page for the Common UNIX Printing System (CUPS).
 .\"
@@ -101,5 +101,5 @@ http://localhost:631/help
 .SH COPYRIGHT
 Copyright 2007 by Apple Inc.
 .\"
-.\" End of "$Id: cupsctl.man 5969 2006-09-19 20:09:24Z mike $".
+.\" End of "$Id$".
 .\"
index ed723b9ec932b0bdbb2c3eacdd55a97dc3c13715..fb9d245fd09397a36562c4dc0d152e95b835f320 100644 (file)
@@ -1,5 +1,5 @@
 .\"
-.\" "$Id: cupstestdsc.man 5099 2006-02-13 02:46:10Z mike $"
+.\" "$Id$"
 .\"
 .\"   cupstestdsc man page for the Common UNIX Printing System (CUPS).
 .\"
diff --git a/man/drv.man.in b/man/drv.man.in
new file mode 100644 (file)
index 0000000..6e553ad
--- /dev/null
@@ -0,0 +1,40 @@
+.\"
+.\" "$Id$"
+.\"
+.\"   drv man page for the Common UNIX Printing System.
+.\"
+.\"   Copyright 2008 by Apple Inc.
+.\"
+.\"   These coded instructions, statements, and computer programs are the
+.\"   property of Apple Inc. and are protected by Federal copyright
+.\"   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+.\"   which should have been included with this file.  If this file is
+.\"   file is missing or damaged, see the license at "http://www.cups.org/".
+.\"
+.TH ppdc 1 "Common UNIX Printing System" "20 May 2008" "Apple Inc."
+.SH NAME
+drv \- cups driver interface for ppd compiler files
+.SH SYNOPSIS
+.B drv list
+.br
+.B drv cat
+.I drv:///filename.drv/pcfilename
+.SH DESCRIPTION
+\fIdrv\fR lists and compiles PPDC source files installed in the
+@CUPS_DATADIR@/drv and (on Mac OS X) /Library/Printers/PPDs.drv
+directories on behalf of the scheduler, \fIcupsd(8)\fR.
+.PP
+The first form of the command lists all of the PPD files that can be produced
+by the driver information files in the two directories.
+.PP
+The second form of the command compiles the requested PPD and sends it to the
+standard output.
+.SH SEE ALSO
+ppdc(1), ppdhtml(1), ppdi(1), ppdmerge(1), ppdpo(1), ppdcfile(5)
+.br
+http://localhost:631/help
+.SH COPYRIGHT
+Copyright 2008 by Apple Inc.
+.\"
+.\" End of "$Id$".
+.\"
index ecf6181d761628d4d0177754fa24b13d108d7365..f352cfd6ab7434aca94a3f0fcc780aae2b6b0832 100644 (file)
@@ -1,9 +1,9 @@
 .\"
-.\" "$Id: ppdc.man 343 2007-07-13 19:52:48Z mike $"
+.\" "$Id$"
 .\"
-.\"   ppdc man page for the CUPS Driver Development Kit.
+.\"   ppdc man page for the Common UNIX Printing System.
 .\"
-.\"   Copyright 2007 by Apple Inc.
+.\"   Copyright 2007-2008 by Apple Inc.
 .\"   Copyright 1997-2007 by Easy Software Products.
 .\"
 .\"   These coded instructions, statements, and computer programs are the
@@ -12,7 +12,7 @@
 .\"   which should have been included with this file.  If this file is
 .\"   file is missing or damaged, see the license at "http://www.cups.org/".
 .\"
-.TH ppdc 1 "CUPS Driver Development Kit" "14 February 2007" "Apple Inc."
+.TH ppdc 1 "Common UNIX Printing System" "20 May 2008" "Apple Inc."
 .SH NAME
 ppdc \- cups ppd compiler
 .SH SYNOPSIS
@@ -27,7 +27,7 @@ ppdc \- cups ppd compiler
 .I output-directory
 ] [ -l
 .I language(s)
-] [ -v ] [ -z ] [ --cr ] [ --crlf ] [ --lf ]
+] [-m] [-t] [ -v ] [ -z ] [ --cr ] [ --crlf ] [ --lf ]
 .I source-file
 .SH DESCRIPTION
 \fIppdc\fR compiles PPDC source files into one or more PPD
@@ -54,6 +54,12 @@ localizing the PPD file(s). The default language is "en"
 files with German, UK English, Spanish (Spain, Mexico, and US),
 French (France and Canada), and Italian languages in each file.
 .PP
+The \fI-m\fR option specifies that the output filename should be
+based on the ModelName value instead of FileName or PCFilenName.
+.PP
+The \fI-t\fR option specifies that PPD files should be tested instead
+of generated.
+.PP
 The \fI-v\fR option provides more verbose output, basically a
 running status of which files are being loaded or written.
 .PP
@@ -64,10 +70,11 @@ The \fI--cr\fR, \fI--crlf\fR, and \fI--lf\fR options specify the
 line ending to use - carriage return, carriage return and line feed,
 or line feed. The default is to use the line feed character alone.
 .SH SEE ALSO
-cupsprofile(1), ppdhtml(1), ppdi(1), ppdmerge(1), ppdpo(1), ppdcfile(5),
-CUPS Driver Developer Kit Manual
+ppdhtml(1), ppdi(1), ppdmerge(1), ppdpo(1), ppdcfile(5)
+.br
+http://localhost:631/help
 .SH COPYRIGHT
-Copyright 2007 by Apple Inc.
+Copyright 2007-2008 by Apple Inc.
 .\"
-.\" End of "$Id: ppdc.man 343 2007-07-13 19:52:48Z mike $".
+.\" End of "$Id$".
 .\"
index f2b052f3b5d829a767b5a69c363a384a4051edae..d032cb670c7fa74465d165bc7e2bfe8d3341e773 100644 (file)
@@ -1,9 +1,9 @@
 .\"
-.\" "$Id: ppdcfile.man 343 2007-07-13 19:52:48Z mike $"
+.\" "$Id$"
 .\"
-.\"   ppdcfile man page for the CUPS Driver Development Kit.
+.\"   ppdcfile man page for the Common UNIX Printing System.
 .\"
-.\"   Copyright 2007 by Apple Inc.
+.\"   Copyright 2007-2008 by Apple Inc.
 .\"   Copyright 1997-2007 by Easy Software Products.
 .\"
 .\"   These coded instructions, statements, and computer programs are the
 .\"   which should have been included with this file.  If this file is
 .\"   file is missing or damaged, see the license at "http://www.cups.org/".
 .\"
-.TH ppdcfile 5 "CUPS Driver Development Kit" "14 February 2007" "Apple Inc."
+.TH ppdcfile 5 "Common UNIX Printing System" "20 May 2008" "Apple Inc."
 .SH NAME
 ppdcfile \- cups ppd compiler source file format
 .SH DESCRIPTION
 The CUPS PPD compiler reads meta files that contain descriptions
 of one or more PPD files to be generated by \fIppdc\fR. This man
 page provides a quick reference to the supported keywords and
-should be used in conjuction with the CUPS Driver Development Kit
+should be used in conjuction with the Common UNIX Printing System
 Developers Manual.
 .PP
 The source file format is plain ASCII text that can be edited
@@ -37,8 +37,16 @@ directives and the values they accept:
 .TP 5
 \fB#define\fR name value
 .TP 5
+\fB#elif\fR {name | value}
+.TP 5
+\fB#else\fR
+.TP 5
+\fB#endif\fR
+.TP 5
 \fB#font\fR name encoding "version" charset status
 .TP 5
+\fB#if\fR {name | value}
+.TP 5
 \fB#include\fR <filename>
 .TP 5
 \fB#include\fR "filename"
@@ -107,6 +115,8 @@ directives and the values they accept:
 .TP 5
 \fBInstallable\fR "name/text"
 .TP 5
+\fBLocAttribute\fR name "keyword/text" value
+.TP 5
 \fBManualCopies\fR boolean-value
 .TP 5
 \fBManufacturer\fR "name"
@@ -151,12 +161,11 @@ directives and the values they accept:
 .TP 5
 \fBVersion\fR number
 .SH SEE ALSO
-cupsprofile(1), ppdc(1), ppdhtml(1), ppdi(1), ppdmerge(1), ppdpo(1),
-CUPS Driver Developer Kit Manual,
+ppdc(1), ppdhtml(1), ppdi(1), ppdmerge(1), ppdpo(1)
 .br
-http://localhost:631/help/ref-ppdc.html
+http://localhost:631/help
 .SH COPYRIGHT
-Copyright 2007 by Apple Inc.
+Copyright 2007-2008 by Apple Inc.
 .\"
-.\" End of "$Id: ppdcfile.man 343 2007-07-13 19:52:48Z mike $".
+.\" End of "$Id$".
 .\"
index 3bdcd1a45f1f56fb8745812fa158ece68603eec0..2d20f07cb8a558711386649202a0725866da4cf2 100644 (file)
@@ -1,9 +1,9 @@
 .\"
-.\" "$Id: ppdhtml.man 343 2007-07-13 19:52:48Z mike $"
+.\" "$Id$"
 .\"
-.\"   ppdhtml man page for the CUPS Driver Development Kit.
+.\"   ppdhtml man page for the Common UNIX Printing System.
 .\"
-.\"   Copyright 2007 by Apple Inc.
+.\"   Copyright 2007-2008 by Apple Inc.
 .\"   Copyright 1997-2007 by Easy Software Products.
 .\"
 .\"   These coded instructions, statements, and computer programs are the
@@ -12,7 +12,7 @@
 .\"   which should have been included with this file.  If this file is
 .\"   file is missing or damaged, see the license at "http://www.cups.org/".
 .\"
-.TH ppdhtml 1 "CUPS Driver Development Kit" "14 February 2007" "Apple Inc."
+.TH ppdhtml 1 "Common UNIX Printing System" "20 May 2008" "Apple Inc."
 .SH NAME
 ppdhtml \- cups html summary generator
 .SH SYNOPSIS
@@ -30,9 +30,11 @@ The \fI-I\fR option specifies an alternate include directory;
 multiple \fI-I\fR options can be supplied to add additional
 directories.
 .SH SEE ALSO
-cupsprofile(1), ppdc(1), ppdcfile(5), ppdi(1), ppdmerge(1), ppdpo(1), CUPS Driver Developer Kit Manual.
+ppdc(1), ppdcfile(5), ppdi(1), ppdmerge(1), ppdpo(1)
+.br
+http://localhost:631/help
 .SH COPYRIGHT
-Copyright 2007 by Apple Inc.
+Copyright 2007-2008 by Apple Inc.
 .\"
-.\" End of "$Id: ppdhtml.man 343 2007-07-13 19:52:48Z mike $".
+.\" End of "$Id$".
 .\"
index 39b4cc5c775c95a1de5dbe2d441275df2d057541..526b9437c3f0728934ae0eff733548521c8df6d9 100644 (file)
@@ -1,9 +1,9 @@
 .\"
-.\" "$Id: ppdi.man 343 2007-07-13 19:52:48Z mike $"
+.\" "$Id$"
 .\"
-.\"   ppdi man page for the CUPS Driver Development Kit.
+.\"   ppdi man page for the Common UNIX Printing System.
 .\"
-.\"   Copyright 2007 by Apple Inc.
+.\"   Copyright 2007-2008 by Apple Inc.
 .\"   Copyright 1997-2007 by Easy Software Products.
 .\"
 .\"   These coded instructions, statements, and computer programs are the
@@ -12,7 +12,7 @@
 .\"   which should have been included with this file.  If this file is
 .\"   file is missing or damaged, see the license at "http://www.cups.org/".
 .\"
-.TH ppdi 1 "CUPS Driver Development Kit" "14 February 2007" "Apple Inc."
+.TH ppdi 1 "Common UNIX Printing System" "20 May 2008" "Apple Inc."
 .SH NAME
 ppdi \- import ppd files
 .SH SYNOPSIS
@@ -36,9 +36,11 @@ file does not exist, a new source file is created. Otherwise the existing
 file is merged with the new PPD file(s) on the command-line. If no source
 file is specified, the filename "ppdi.drv" is used.
 .SH SEE ALSO
-cupsprofile(1), ppdc(1), ppdhtml(1), ppdmerge(1), ppdpo(1), ppdcfile(5), CUPS Driver Developer Kit Manual.
+ppdc(1), ppdhtml(1), ppdmerge(1), ppdpo(1), ppdcfile(5)
+.br
+http://localhost:631/help
 .SH COPYRIGHT
-Copyright 2007 by Apple Inc.
+Copyright 2007-2008 by Apple Inc.
 .\"
-.\" End of "$Id: ppdi.man 343 2007-07-13 19:52:48Z mike $".
+.\" End of "$Id$".
 .\"
index 12473b83319181803d89653d0d7ec085cd73d5e1..132c40ebc054625e1fc0108af1de99b447feca07 100644 (file)
@@ -1,9 +1,9 @@
 .\"
 .\" "$Id$"
 .\"
-.\"   ppdmerge man page for the CUPS Driver Development Kit.
+.\"   ppdmerge man page for the Common UNIX Printing System.
 .\"
-.\"   Copyright 2007 by Apple Inc.
+.\"   Copyright 2007-2008 by Apple Inc.
 .\"   Copyright 1997-2007 by Easy Software Products.
 .\"
 .\"   These coded instructions, statements, and computer programs are the
@@ -12,7 +12,7 @@
 .\"   which should have been included with this file.  If this file is
 .\"   file is missing or damaged, see the license at "http://www.cups.org/".
 .\"
-.TH ppdmerge 1 "CUPS Driver Development Kit" "14 February 2007" "Apple Inc."
+.TH ppdmerge 1 "Common UNIX Printing System" "20 May 2008" "Apple Inc."
 .SH NAME
 ppdmerge \- merge ppd files
 .SH SYNOPSIS
@@ -37,11 +37,11 @@ already exists, the new
 same device. Merging of different device PPDs will yield unpredictable
 results.
 .SH SEE ALSO
-cupsprofile(1), ppdc(1), ppdhtml(1), ppdi(1), ppdpo(1), ppdcfile(5),
+cupsprofile(1), ppdc(1), ppdhtml(1), ppdi(1), ppdpo(1), ppdcfile(5)
 .br
-CUPS Driver Developer Kit Manual.
+http://localhost:631/help
 .SH COPYRIGHT
-Copyright 2007 by Apple Inc.
+Copyright 2007-2008 by Apple Inc.
 .\"
 .\" End of "$Id$".
 .\"
index dc84e846b6553c68b67f23016827f6a03e78a320..4f3f4867f28efd29e5491c3c7f26c2eaa5fd6b39 100644 (file)
@@ -1,7 +1,7 @@
 .\"
-.\" "$Id: ppdpo.man 343 2007-07-13 19:52:48Z mike $"
+.\" "$Id$"
 .\"
-.\"   ppdpo man page for the CUPS Driver Development Kit.
+.\"   ppdpo man page for the Common UNIX Printing System.
 .\"
 .\"   Copyright 2007-2008 by Apple Inc.
 .\"   Copyright 1997-2007 by Easy Software Products.
@@ -12,7 +12,7 @@
 .\"   which should have been included with this file.  If this file is
 .\"   file is missing or damaged, see the license at "http://www.cups.org/".
 .\"
-.TH ppdpo 1 "Common UNIX Printing System" "27 March 2008" "Apple Inc."
+.TH ppdpo 1 "Common UNIX Printing System" "20 May 2008" "Apple Inc."
 .SH NAME
 ppdpo \- ppd message catalog generator
 .SH SYNOPSIS
@@ -36,10 +36,11 @@ The \fI-o\fR option specifies the output file. The supported extensions are
 ".po" or ".po.gz" for GNU gettext format message catalogs and ".strings" for
 Mac OS X strings files.
 .SH SEE ALSO
-ppdc(1), ppdhtml(1), ppdi(1), ppdmerge(1), ppdcfile(5),
+ppdc(1), ppdhtml(1), ppdi(1), ppdmerge(1), ppdcfile(5)
+.br
 http://localhost:631/help
 .SH COPYRIGHT
 Copyright 2007-2008 by Apple Inc.
 .\"
-.\" End of "$Id: ppdpo.man 343 2007-07-13 19:52:48Z mike $".
+.\" End of "$Id$".
 .\"
index 683edeaaf474f6e7e0f68bc46723d475336f976b..0cd04f703d3b85e9f92b80571904045fe8ab7ed5 100644 (file)
@@ -1,9 +1,9 @@
 .\"
 .\" "$Id$"
 .\"
-.\"   rastertoescpx man page for the CUPS Driver Development Kit.
+.\"   rastertoescpx man page for the Common UNIX Printing System.
 .\"
-.\"   Copyright 2007 by Apple Inc.
+.\"   Copyright 2007-2008 by Apple Inc.
 .\"   Copyright 1997-2007 by Easy Software Products.
 .\"
 .\"   These coded instructions, statements, and computer programs are the
@@ -12,7 +12,7 @@
 .\"   which should have been included with this file.  If this file is
 .\"   file is missing or damaged, see the license at "http://www.cups.org/".
 .\"
-.TH rastertoescpx 1 "CUPS Driver Development Kit" "14 February 2007" "Apple Inc."
+.TH rastertoescpx 1 "Common UNIX Printing System" "20 May 2008" "Apple Inc."
 .SH NAME
 rastertoescpx \- enhanced esc/p raster driver for cups
 .SH SYNOPSIS
@@ -25,9 +25,11 @@ jobid user title copies options [
 ESC/P2. It is used to support printing to a variety of EPSON and
 EPSON-compatible printers and plotters.
 .SH SEE ALSO
-cupsprofile(1), ppdc(1), ppdhtml(1), ppdi(1), ppdmerge(1), ppdpo(1), ppdcfile(5), CUPS Driver Developer Kit Manual.
+ppdc(1), ppdhtml(1), ppdi(1), ppdmerge(1), ppdpo(1), ppdcfile(5)
+.br
+http://localhost:631/help
 .SH COPYRIGHT
-Copyright 2007 by Apple Inc.
+Copyright 2007-2008 by Apple Inc.
 .\"
 .\" End of "$Id$".
 .\"
index dec7add2edd15d445474aa8ca044d552bcc66895..2f53f0b6a0131f53d3c53a5d1dcfa6a195f81d7d 100644 (file)
@@ -1,9 +1,9 @@
 .\"
 .\" "$Id$"
 .\"
-.\"   rastertopclx man page for the CUPS Driver Development Kit.
+.\"   rastertopclx man page for the Common UNIX Printing System.
 .\"
-.\"   Copyright 2007 by Apple Inc.
+.\"   Copyright 2007-2008 by Apple Inc.
 .\"   Copyright 1997-2007 by Easy Software Products.
 .\"
 .\"   These coded instructions, statements, and computer programs are the
@@ -12,7 +12,7 @@
 .\"   which should have been included with this file.  If this file is
 .\"   file is missing or damaged, see the license at "http://www.cups.org/".
 .\"
-.TH rastertopclx 1 "CUPS Driver Development Kit" "14 February 2007" "Apple Inc."
+.TH rastertopclx 1 "Common UNIX Printing System" "20 May 2008" "Apple Inc."
 .SH NAME
 rastertopclx \- enhanced pcl raster driver for cups
 .SH SYNOPSIS
@@ -21,13 +21,15 @@ jobid user title copies options [
 .I filename.ras
 ]
 .SH DESCRIPTION
-\fIrastertopclx\fR converts a CUPS raster stream to HP-PCL. It is
+\fIrastertopclx\fR converts a CUPS raster stream to HP-PCL and HP-RTL. It is
 used to support printing to a variety of HP and HP-compatible
 printers and plotters.
 .SH SEE ALSO
-cupsprofile(1), ppdc(1), ppdhtml(1), ppdi(1), ppdmerge(1), ppdpo(1), ppdcfile(5), CUPS Driver Developer Kit Manual.
+ppdc(1), ppdhtml(1), ppdi(1), ppdmerge(1), ppdpo(1), ppdcfile(5)
+.br
+http://localhost:631/help
 .SH COPYRIGHT
-Copyright 2007 by Apple Inc.
+Copyright 2007-2008 by Apple Inc.
 .\"
 .\" End of "$Id$".
 .\"
index 93cae9dbbb33f422267d208d70e947a8ada8856e..a760a47b74c8665215c5f385637defd5a316c1a8 100644 (file)
@@ -1,5 +1,5 @@
 .\"
-.\" "$Id: subscriptions.conf.man 5099 2006-02-13 02:46:10Z mike $"
+.\" "$Id$"
 .\"
 .\"   subscriptions.conf man page for the Common UNIX Printing System (CUPS).
 .\"
@@ -85,5 +85,5 @@ http://localhost:631/help
 .SH COPYRIGHT
 Copyright 2007 by Apple Inc.
 .\"
-.\" End of "$Id: subscriptions.conf.man 5099 2006-02-13 02:46:10Z mike $".
+.\" End of "$Id$".
 .\"
index c18234b41b4a5b9bb11414480d5b47022ce0298e..b5f4d4bacf36afcb5d3b7893fa91130548b03af8 100644 (file)
@@ -1,3 +1,68 @@
 # DO NOT DELETE
-# DO NOT DELETE
-# DO NOT DELETE
+
+ppdc-array.o: ppdc.h ../cups/string.h ../config.h ../cups/file.h
+ppdc-array.o: ../cups/versioning.h
+ppdc-attr.o: ppdc.h ../cups/string.h ../config.h ../cups/file.h
+ppdc-attr.o: ../cups/versioning.h
+ppdc-catalog.o: ppdc.h ../cups/string.h ../config.h ../cups/file.h
+ppdc-catalog.o: ../cups/versioning.h ../cups/globals.h ../cups/string.h
+ppdc-catalog.o: ../cups/http-private.h ../cups/http.h ../cups/md5.h
+ppdc-catalog.o: ../cups/ipp-private.h ../cups/ipp.h ../cups/cups.h
+ppdc-catalog.o: ../cups/ppd.h ../cups/array.h ../cups/file.h
+ppdc-catalog.o: ../cups/language.h ../cups/i18n.h ../cups/transcode.h
+ppdc-choice.o: ppdc.h ../cups/string.h ../config.h ../cups/file.h
+ppdc-choice.o: ../cups/versioning.h
+ppdc-constraint.o: ppdc.h ../cups/string.h ../config.h ../cups/file.h
+ppdc-constraint.o: ../cups/versioning.h
+ppdc-driver.o: ppdc.h ../cups/string.h ../config.h ../cups/file.h
+ppdc-driver.o: ../cups/versioning.h ../cups/cups.h ../cups/ipp.h
+ppdc-driver.o: ../cups/http.h ../cups/string.h ../cups/ppd.h ../cups/array.h
+ppdc-driver.o: ../cups/file.h ../cups/language.h
+ppdc-file.o: ppdc.h ../cups/string.h ../config.h ../cups/file.h
+ppdc-file.o: ../cups/versioning.h
+ppdc-filter.o: ppdc.h ../cups/string.h ../config.h ../cups/file.h
+ppdc-filter.o: ../cups/versioning.h
+ppdc-font.o: ppdc.h ../cups/string.h ../config.h ../cups/file.h
+ppdc-font.o: ../cups/versioning.h
+ppdc-group.o: ppdc.h ../cups/string.h ../config.h ../cups/file.h
+ppdc-group.o: ../cups/versioning.h
+ppdc-import.o: ppdc.h ../cups/string.h ../config.h ../cups/file.h
+ppdc-import.o: ../cups/versioning.h ../cups/ppd.h ../cups/array.h
+ppdc-import.o: ../cups/file.h
+ppdc-mediasize.o: ppdc.h ../cups/string.h ../config.h ../cups/file.h
+ppdc-mediasize.o: ../cups/versioning.h
+ppdc-message.o: ppdc.h ../cups/string.h ../config.h ../cups/file.h
+ppdc-message.o: ../cups/versioning.h
+ppdc-option.o: ppdc.h ../cups/string.h ../config.h ../cups/file.h
+ppdc-option.o: ../cups/versioning.h
+ppdc-profile.o: ppdc.h ../cups/string.h ../config.h ../cups/file.h
+ppdc-profile.o: ../cups/versioning.h
+ppdc-shared.o: ppdc.h ../cups/string.h ../config.h ../cups/file.h
+ppdc-shared.o: ../cups/versioning.h
+ppdc-source.o: ppdc.h ../cups/string.h ../config.h ../cups/file.h
+ppdc-source.o: ../cups/versioning.h ../cups/globals.h ../cups/string.h
+ppdc-source.o: ../cups/http-private.h ../cups/http.h ../cups/md5.h
+ppdc-source.o: ../cups/ipp-private.h ../cups/ipp.h ../cups/cups.h
+ppdc-source.o: ../cups/ppd.h ../cups/array.h ../cups/file.h
+ppdc-source.o: ../cups/language.h ../cups/i18n.h ../cups/transcode.h
+ppdc-source.o: ../cups/raster.h ../cups/cups.h ../data/epson.h ../data/escp.h
+ppdc-source.o: ../data/hp.h ../data/label.h ../data/pcl.h
+ppdc-string.o: ppdc.h ../cups/string.h ../config.h ../cups/file.h
+ppdc-string.o: ../cups/versioning.h
+ppdc-variable.o: ppdc.h ../cups/string.h ../config.h ../cups/file.h
+ppdc-variable.o: ../cups/versioning.h
+drv.o: ppdc.h ../cups/string.h ../config.h ../cups/file.h
+drv.o: ../cups/versioning.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+drv.o: ../cups/string.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+drv.o: ../cups/language.h ../cups/dir.h
+ppdc.o: ppdc.h ../cups/string.h ../config.h ../cups/file.h
+ppdc.o: ../cups/versioning.h
+ppdhtml.o: ppdc.h ../cups/string.h ../config.h ../cups/file.h
+ppdhtml.o: ../cups/versioning.h
+ppdi.o: ppdc.h ../cups/string.h ../config.h ../cups/file.h
+ppdi.o: ../cups/versioning.h
+ppdmerge.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/versioning.h
+ppdmerge.o: ../cups/string.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+ppdmerge.o: ../cups/language.h ../cups/array.h ../cups/string.h ../config.h
+ppdpo.o: ppdc.h ../cups/string.h ../config.h ../cups/file.h
+ppdpo.o: ../cups/versioning.h
index aed8208ddc2a7a37ac9de818f9f7999cdeb78d8e..bc3c052680dee6edb58ca881c4f1384d92fd0504 100644 (file)
@@ -44,12 +44,8 @@ LIBOBJS =    \
                ppdc-source.o \
                ppdc-string.o \
                ppdc-variable.o
-LIB32OBJS      = $(LIBOBJS:.o=.32.o)
-LIB64OBJS      = $(LIBOBJS:.o=.64.o)
 OBJS =         \
                $(LIBOBJS) \
-               $(LIB32OBJS) \
-               $(LIB64OBJS) \
                drv.o \
                ppdc.o \
                ppdhtml.o \
@@ -58,8 +54,6 @@ OBJS =                \
                ppdpo.o
 LIBTARGETS =   \
                $(LIBCUPSPPDC) \
-               $(LIB32CUPSPPDC) \
-               $(LIB64CUPSPPDC) \
                libcupsppdc.a \
                ppdc-static
 TARGETS        =       \
@@ -97,7 +91,6 @@ clean:
        $(RM) -r ppd
        $(RM) test.drv
        $(RM) libcupsppdc.so libcupsppdc.sl libcupsppdc.dylib
-       $(RM) -r 32bit 64bit
 
 
 #
@@ -105,13 +98,7 @@ clean:
 #
 
 depend:
-       touch Dependencies.tmp
-       makedepend -Y -I.. -fDependencies.tmp $(OBJS:.o=.c) >/dev/null 2>&1
-       $(RM) Dependencies
-       cp Dependencies.tmp Dependencies
-       sed -E -e '1,$$s/^([^.]+)\.o:/\1\.32.o: \1\.c /' Dependencies.tmp >>Dependencies
-       sed -E -e '1,$$s/^([^.]+)\.o:/\1\.64.o: \1\.c /' Dependencies.tmp >>Dependencies
-       $(RM) Dependencies.tmp
+       makedepend -Y -I.. -fDependencies $(OBJS:.o=.cxx) >/dev/null 2>&1
 
 
 #
@@ -191,18 +178,6 @@ installstatic:
        $(INSTALL_LIB) libcupsppdc.a $(LIBDIR)
        $(RANLIB) $(LIBDIR)/libcupsppdc.a
 
-install32bit:
-       echo Installing libraries in $(LIB32DIR)...
-       $(INSTALL_DIR) -m 755 $(LIB32DIR)
-       $(INSTALL_LIB) 32bit/libcupsppdc.so.1 $(LIB32DIR)/libcupsppdc.so.1
-       $(LN) libcupsppdc.so.1 $(LIB32DIR)/libcupsppdc.so
-
-install64bit:
-       echo Installing libraries in $(LIB64DIR)...
-       $(INSTALL_DIR) -m 755 $(LIB64DIR)
-       $(INSTALL_LIB) 64bit/libcupsppdc.so.1 $(LIB64DIR)/libcupsppdc.so.1
-       $(LN) libcupsppdc.so.1 $(LIB64DIR)/libcupsppdc.so
-
 
 #
 # Uninstall...
@@ -233,16 +208,6 @@ uninstall:
        $(RM) $(INCLUDEDIR)/cups/ppdc.h
        -$(RMDIR) $(INCLUDEDIR)/cups
 
-uninstall32bit:
-       $(RM) $(LIB32DIR)/libcupsppdc.so
-       $(RM) $(LIB32DIR)/libcupsppdc.so.1
-       -$(RMDIR) $(LIB32DIR)
-
-uninstall64bit:
-       $(RM) $(LIB64DIR)/libcupsppdc.so
-       $(RM) $(LIB64DIR)/libcupsppdc.so.1
-       -$(RMDIR) $(LIB64DIR)
-
 
 #
 # Automatic API help files...
@@ -338,41 +303,16 @@ libcupsppdc.so.1 libcupsppdc.sl.1:        $(LIBOBJS)
        $(LN) $@ `basename $@ .1`
 
 
-#
-# 32bit/libcupsppdc.so.1
-#
-
-32bit/libcupsppdc.so.1:        $(LIB32OBJS)
-       echo Linking 32-bit $@...
-       -mkdir 32bit
-       $(DSOXX) $(ARCH32FLAGS) $(DSO32FLAGS) -o $@ $(LIB32OBJS) $(LIBS)
-       $(RM) 32bit/libcupsppdc.so
-       $(LN) libcupsppdc.so.1 32bit/libcupsppdc.so
-
-
-#
-# 64bit/libcupsppdc.so.1
-#
-
-64bit/libcupsppdc.so.1:        $(LIB64OBJS)
-       echo Linking 64-bit $@...
-       -mkdir 64bit
-       $(DSOXX) $(ARCH64FLAGS) $(DSO64FLAGS) -o $@ $(LIB64OBJS) $(LIBS)
-       $(RM) 64bit/libcupsppdc.so
-       $(LN) libcupsppdc.so.1 64bit/libcupsppdc.so
-
-
 #
 # libcupsppdc.1.dylib
 #
 
-libcupsppdc.1.dylib:   $(LIBOBJS) libcupsppdc.exp
+libcupsppdc.1.dylib:   $(LIBOBJS)
        echo Linking $@...
        $(DSOXX) $(ARCHFLAGS) $(DSOFLAGS) -o $@ \
                -install_name $(libdir)/$@ \
                -current_version 1.0.0 \
                -compatibility_version 1.0.0 \
-               -exported_symbols_list libcupsppdc.exp \
                $(LIBOBJS) $(LIBS)
        $(RM) libcupsppdc.dylib
        $(LN) $@ libcupsppdc.dylib
index 999f7d8e4d5e622df2342450d01b43f915f54a70..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,158 +0,0 @@
-__ZN10ppdcChoiceC1EPKcS1_S1_
-__ZN10ppdcChoiceC2EPKcS1_S1_
-__ZN10ppdcChoiceD0Ev
-__ZN10ppdcChoiceD1Ev
-__ZN10ppdcChoiceD2Ev
-__ZN10ppdcDriver10find_groupEPKc
-__ZN10ppdcDriver11find_optionEPKc
-__ZN10ppdcDriver11set_versionEPKc
-__ZN10ppdcDriver14set_model_nameEPKc
-__ZN10ppdcDriver14write_ppd_fileEP12_cups_file_sP11ppdcCatalogP9ppdcArrayP10ppdcSource14ppdcLineEnding
-__ZN10ppdcDriver16set_default_fontEP8ppdcFont
-__ZN10ppdcDriver16set_default_sizeEP13ppdcMediaSize
-__ZN10ppdcDriver16set_manufacturerEPKc
-__ZN10ppdcDriver16set_pc_file_nameEPKc
-__ZN10ppdcDriver20set_custom_size_codeEPKc
-__ZN10ppdcDriver9find_attrEPKcS1_
-__ZN10ppdcDriverC1EPS_
-__ZN10ppdcDriverC2EPS_
-__ZN10ppdcDriverD0Ev
-__ZN10ppdcDriverD1Ev
-__ZN10ppdcDriverD2Ev
-__ZN10ppdcFilterC1EPKcS1_i
-__ZN10ppdcFilterC2EPKcS1_i
-__ZN10ppdcFilterD0Ev
-__ZN10ppdcFilterD1Ev
-__ZN10ppdcFilterD2Ev
-__ZN10ppdcOption11find_choiceEPKc
-__ZN10ppdcOption13set_defchoiceEP10ppdcChoice
-__ZN10ppdcOptionC1E11ppdcOptTypePKcS2_14ppdcOptSectionf
-__ZN10ppdcOptionC1EPS_
-__ZN10ppdcOptionC2E11ppdcOptTypePKcS2_14ppdcOptSectionf
-__ZN10ppdcOptionC2EPS_
-__ZN10ppdcOptionD0Ev
-__ZN10ppdcOptionD1Ev
-__ZN10ppdcOptionD2Ev
-__ZN10ppdcShared3getEv
-__ZN10ppdcShared7releaseEv
-__ZN10ppdcSharedC1Ev
-__ZN10ppdcSharedC2Ev
-__ZN10ppdcSharedD0Ev
-__ZN10ppdcSharedD1Ev
-__ZN10ppdcSharedD2Ev
-__ZN10ppdcSource10get_choiceEP8ppdcFile
-__ZN10ppdcSource10get_duplexEP8ppdcFileP10ppdcDriver
-__ZN10ppdcSource10get_filterEP8ppdcFile
-__ZN10ppdcSource10get_optionEP8ppdcFileP10ppdcDriverP9ppdcGroup
-__ZN10ppdcSource10import_ppdEPKc
-__ZN10ppdcSource10write_fileEPKc
-__ZN10ppdcSource11add_includeEPKc
-__ZN10ppdcSource11find_driverEPKc
-__ZN10ppdcSource11get_booleanEP8ppdcFile
-__ZN10ppdcSource11get_genericEP8ppdcFilePKcS3_S3_
-__ZN10ppdcSource11get_integerEP8ppdcFile
-__ZN10ppdcSource11get_integerEPKc
-__ZN10ppdcSource12find_includeEPKcS1_Pci
-__ZN10ppdcSource12get_variableEP8ppdcFile
-__ZN10ppdcSource12set_variableEPKcS1_
-__ZN10ppdcSource13find_variableEPKc
-__ZN10ppdcSource14get_constraintEP8ppdcFile
-__ZN10ppdcSource14get_resolutionEP8ppdcFile
-__ZN10ppdcSource15get_color_modelEP8ppdcFile
-__ZN10ppdcSource15get_color_orderEPKc
-__ZN10ppdcSource15get_color_spaceEPKc
-__ZN10ppdcSource15get_custom_sizeEP8ppdcFile
-__ZN10ppdcSource15get_installableEP8ppdcFile
-__ZN10ppdcSource15get_measurementEP8ppdcFile
-__ZN10ppdcSource17get_color_profileEP8ppdcFile
-__ZN10ppdcSource18get_simple_profileEP8ppdcFile
-__ZN10ppdcSource6get_poEP8ppdcFile
-__ZN10ppdcSource6quotefEP12_cups_file_sPKcz
-__ZN10ppdcSource7find_poEPKc
-__ZN10ppdcSource8get_attrEP8ppdcFile
-__ZN10ppdcSource8get_fontEP8ppdcFile
-__ZN10ppdcSource8get_sizeEP8ppdcFile
-__ZN10ppdcSource9find_sizeEPKc
-__ZN10ppdcSource9get_floatEP8ppdcFile
-__ZN10ppdcSource9get_groupEP8ppdcFileP10ppdcDriver
-__ZN10ppdcSource9get_tokenEP8ppdcFilePci
-__ZN10ppdcSource9read_fileEPKc
-__ZN10ppdcSource9scan_fileEP8ppdcFileP10ppdcDriverb
-__ZN10ppdcSourceC1EPKc
-__ZN10ppdcSourceC2EPKc
-__ZN10ppdcSourceD0Ev
-__ZN10ppdcSourceD1Ev
-__ZN10ppdcSourceD2Ev
-__ZN10ppdcStringC1EPKc
-__ZN10ppdcStringC2EPKc
-__ZN10ppdcStringD0Ev
-__ZN10ppdcStringD1Ev
-__ZN10ppdcStringD2Ev
-__ZN11ppdcCatalog11add_messageEPKc
-__ZN11ppdcCatalog12find_messageEPKc
-__ZN11ppdcCatalog13load_messagesEPKc
-__ZN11ppdcCatalog13save_messagesEPKc
-__ZN11ppdcCatalogC1EPKcS1_
-__ZN11ppdcCatalogC2EPKcS1_
-__ZN11ppdcCatalogD0Ev
-__ZN11ppdcCatalogD1Ev
-__ZN11ppdcCatalogD2Ev
-__ZN11ppdcMessageC1EPKcS1_
-__ZN11ppdcMessageC2EPKcS1_
-__ZN11ppdcMessageD0Ev
-__ZN11ppdcMessageD1Ev
-__ZN11ppdcMessageD2Ev
-__ZN11ppdcProfileC1EPKcS1_ffPKf
-__ZN11ppdcProfileC2EPKcS1_ffPKf
-__ZN11ppdcProfileD0Ev
-__ZN11ppdcProfileD1Ev
-__ZN11ppdcProfileD2Ev
-__ZN12ppdcVariable9set_valueEPKc
-__ZN12ppdcVariableC1EPKcS1_
-__ZN12ppdcVariableC2EPKcS1_
-__ZN12ppdcVariableD0Ev
-__ZN12ppdcVariableD1Ev
-__ZN12ppdcVariableD2Ev
-__ZN13ppdcMediaSizeC1EPKcS1_ffffffS1_S1_
-__ZN13ppdcMediaSizeC2EPKcS1_ffffffS1_S1_
-__ZN13ppdcMediaSizeD0Ev
-__ZN13ppdcMediaSizeD1Ev
-__ZN13ppdcMediaSizeD2Ev
-__ZN14ppdcConstraintC1EPKcS1_S1_S1_
-__ZN14ppdcConstraintC2EPKcS1_S1_S1_
-__ZN14ppdcConstraintD0Ev
-__ZN14ppdcConstraintD1Ev
-__ZN14ppdcConstraintD2Ev
-__ZN8ppdcAttrC1EPKcS1_S1_S1_
-__ZN8ppdcAttrC2EPKcS1_S1_S1_
-__ZN8ppdcAttrD0Ev
-__ZN8ppdcAttrD1Ev
-__ZN8ppdcAttrD2Ev
-__ZN8ppdcFile3getEv
-__ZN8ppdcFile4peekEv
-__ZN8ppdcFileC1EPKc
-__ZN8ppdcFileC2EPKc
-__ZN8ppdcFileD1Ev
-__ZN8ppdcFileD2Ev
-__ZN8ppdcFontC1EPKcS1_S1_S1_14ppdcFontStatus
-__ZN8ppdcFontC2EPKcS1_S1_S1_14ppdcFontStatus
-__ZN8ppdcFontD0Ev
-__ZN8ppdcFontD1Ev
-__ZN8ppdcFontD2Ev
-__ZN9ppdcArray3addEP10ppdcShared
-__ZN9ppdcArray4nextEv
-__ZN9ppdcArray5firstEv
-__ZN9ppdcArray6removeEP10ppdcShared
-__ZN9ppdcArrayC1EPS_
-__ZN9ppdcArrayC2EPS_
-__ZN9ppdcArrayD0Ev
-__ZN9ppdcArrayD1Ev
-__ZN9ppdcArrayD2Ev
-__ZN9ppdcGroup11find_optionEPKc
-__ZN9ppdcGroupC1EPKcS1_
-__ZN9ppdcGroupC1EPS_
-__ZN9ppdcGroupC2EPKcS1_
-__ZN9ppdcGroupC2EPS_
-__ZN9ppdcGroupD0Ev
-__ZN9ppdcGroupD1Ev
-__ZN9ppdcGroupD2Ev
index 094e3870654c964f172fe9458bedc349bcad40b4..e532531d6cf72dda0b351fe050938354384803bb 100644 (file)
 ppdcAttr::ppdcAttr(const char *n,      // I - Name
                    const char *s,      // I - Spec string
                   const char *t,       // I - Human-readable text
-                  const char *v)       // I - Value
+                  const char *v,       // I - Value
+                  bool       loc)      // I - Localize this attribute?
   : ppdcShared()
 {
-  name     = new ppdcString(n);
-  selector = new ppdcString(s);
-  text     = new ppdcString(t);
-  value    = new ppdcString(v);
+  name        = new ppdcString(n);
+  selector    = new ppdcString(s);
+  text        = new ppdcString(t);
+  value       = new ppdcString(v);
+  localizable = loc;
 }
 
 
index d59b275a1d4a6ef92c148a91af31743ba4e7a184..a369ed686843dc056d334fd1237b80d640f32d31 100644 (file)
@@ -3,7 +3,7 @@
 //
 //   PPD file compiler definitions for the CUPS PPD Compiler.
 //
-//   Copyright 2007 by Apple Inc.
+//   Copyright 2007-2008 by Apple Inc.
 //   Copyright 2002-2006 by Easy Software Products.
 //
 //   These coded instructions, statements, and computer programs are the
@@ -20,6 +20,7 @@
 //   ppdcDriver::find_group()       - Find a group.
 //   ppdcDriver::find_option()      - Find an option.
 //   ppdcDriver::set_default_size() - Set the default size name.
+//   ppdcDriver::set_file_name()    - Set the full filename.
 //   ppdcDriver::set_manufacturer() - Set the manufacturer name.
 //   ppdcDriver::set_model_name()   - Set the model name.
 //   ppdcDriver::set_pc_file_name() - Set the PC filename.
@@ -62,6 +63,7 @@ ppdcDriver::ppdcDriver(ppdcDriver *d) // I - Printer driver template
     copyright           = new ppdcArray(d->copyright);
     manufacturer        = d->manufacturer;
     model_name          = 0;
+    file_name           = 0;
     pc_file_name        = 0;
     type                = d->type;
     version             = d->version;
@@ -101,6 +103,7 @@ ppdcDriver::ppdcDriver(ppdcDriver *d)       // I - Printer driver template
     copyright           = new ppdcArray();
     manufacturer        = 0;
     model_name          = 0;
+    file_name           = 0;
     pc_file_name        = 0;
     version             = 0;
     type                = PPDC_DRIVER_CUSTOM;
@@ -143,6 +146,8 @@ ppdcDriver::~ppdcDriver()
     manufacturer->release();
   if (model_name)
     model_name->release();
+  if (file_name)
+    file_name->release();
   if (pc_file_name)
     pc_file_name->release();
   if (version)
@@ -228,8 +233,8 @@ ppdcDriver::find_option(const char *n)      // I - Option name
 //
 
 void
-ppdcDriver::set_custom_size_code(const char *c)
-                                       // I - CustomPageSize code
+ppdcDriver::set_custom_size_code(
+    const char *c)                     // I - CustomPageSize code
 {
   if (custom_size_code)
     custom_size_code->release();
@@ -243,8 +248,8 @@ ppdcDriver::set_custom_size_code(const char *c)
 //
 
 void
-ppdcDriver::set_default_font(ppdcFont *f)
-                                       // I - Font
+ppdcDriver::set_default_font(
+    ppdcFont *f)                       // I - Font
 {
   if (default_font)
     default_font->release();
@@ -264,8 +269,8 @@ ppdcDriver::set_default_font(ppdcFont *f)
 //
 
 void
-ppdcDriver::set_default_size(ppdcMediaSize *m)
-                                       // I - Media size
+ppdcDriver::set_default_size(
+    ppdcMediaSize *m)                  // I - Media size
 {
   if (default_size)
     default_size->release();
@@ -280,13 +285,27 @@ ppdcDriver::set_default_size(ppdcMediaSize *m)
 }
 
 
+//
+// 'ppdcDriver::set_file_name()' - Set the full filename.
+//
+
+void
+ppdcDriver::set_file_name(const char *f)// I - Filename
+{
+  if (file_name)
+    file_name->release();
+
+  file_name = new ppdcString(f);
+}
+
+
 //
 // 'ppdcDriver::set_manufacturer()' - Set the manufacturer name.
 //
 
 void
-ppdcDriver::set_manufacturer(const char *m)
-                                       // I - Model name
+ppdcDriver::set_manufacturer(
+    const char *m)                     // I - Model name
 {
   if (manufacturer)
     manufacturer->release();
@@ -300,8 +319,8 @@ ppdcDriver::set_manufacturer(const char *m)
 //
 
 void
-ppdcDriver::set_model_name(const char *m)
-                                       // I - Model name
+ppdcDriver::set_model_name(
+    const char *m)                     // I - Model name
 {
   if (model_name)
     model_name->release();
@@ -315,8 +334,8 @@ ppdcDriver::set_model_name(const char *m)
 //
 
 void
-ppdcDriver::set_pc_file_name(const char *f)
-                                       // I - Filename
+ppdcDriver::set_pc_file_name(
+    const char *f)                     // I - Filename
 {
   if (pc_file_name)
     pc_file_name->release();
@@ -418,11 +437,7 @@ ppdcDriver::write_ppd_file(
        cupsFilePrintf(fp, "*Product: \"%s\"%s", a->value->value, lf);
   }
   else
-  {
-    cupsFilePrintf(fp, "*Product: \"(ESP Ghostscript)\"%s", lf);
-    cupsFilePrintf(fp, "*Product: \"(GPL Ghostscript)\"%s", lf);
-    cupsFilePrintf(fp, "*Product: \"(GNU Ghostscript)\"%s", lf);
-  }
+    cupsFilePrintf(fp, "*Product: \"(%s)\"%s", model_name->value, lf);
 
   cupsFilePrintf(fp, "*Manufacturer: \"%s\"%s",
                 catalog->find_message(manufacturer->value), lf);
@@ -476,12 +491,7 @@ ppdcDriver::write_ppd_file(
        cupsFilePrintf(fp, "*PSVersion: \"%s\"%s", a->value->value, lf);
   }
   else
-  {
-    cupsFilePrintf(fp, "*PSVersion: \"(3010.000) 705\"%s", lf);
-    cupsFilePrintf(fp, "*PSVersion: \"(3010.000) 707\"%s", lf);
-    cupsFilePrintf(fp, "*PSVersion: \"(3010.000) 815\"%s", lf);
-    cupsFilePrintf(fp, "*PSVersion: \"(3010.000) 853\"%s", lf);
-  }
+    cupsFilePrintf(fp, "*PSVersion: \"(3010.000) 0\"%s", lf);
 
   if ((a = find_attr("LanguageLevel", NULL)) != NULL)
     cupsFilePrintf(fp, "*LanguageLevel: \"%s\"%s", a->value->value, lf);
@@ -1152,10 +1162,12 @@ ppdcDriver::write_ppd_file(
            strncmp(a->name->value, "ParamCustom", 11))
          continue;
 
-        if (strcmp(a->name->value, "APCustomColorMatchingName") &&
+        if (!a->localizable &&
+           strcmp(a->name->value, "APCustomColorMatchingName") &&
            strcmp(a->name->value, "APPrinterPreset") &&
            strcmp(a->name->value, "cupsICCProfile") &&
            strcmp(a->name->value, "cupsIPPReason") &&
+           strcmp(a->name->value, "cupsMarkerName") &&
            strncmp(a->name->value, "Custom", 6) &&
            strncmp(a->name->value, "ParamCustom", 11))
           continue;
@@ -1164,7 +1176,8 @@ ppdcDriver::write_ppd_file(
                       a->name->value, a->selector->value,
                       locatalog->find_message(a->text && a->text->value ?
                                               a->text->value : a->name->value),
-                      !strcmp(a->name->value, "cupsIPPReason") ?
+                      ((a->localizable && a->value->value[0]) ||
+                       !strcmp(a->name->value, "cupsIPPReason")) ?
                           locatalog->find_message(a->value->value) : "",
                       lf);
       }
index e397f0abbddec26f72d4853a7146d116502dd401..ac64a1a30ecbc956e9adea321656465b26046add 100644 (file)
@@ -93,12 +93,15 @@ const char  *ppdcSource::driver_types[] =
 
 ppdcSource::ppdcSource(const char *f)  // I - File to read
 {
-  filename   = new ppdcString(f);
-  base_fonts = new ppdcArray();
-  drivers    = new ppdcArray();
-  po_files   = new ppdcArray();
-  sizes      = new ppdcArray();
-  vars       = new ppdcArray();
+  filename      = new ppdcString(f);
+  base_fonts    = new ppdcArray();
+  drivers       = new ppdcArray();
+  po_files      = new ppdcArray();
+  sizes         = new ppdcArray();
+  vars          = new ppdcArray();
+  cond_state    = PPDC_COND_NORMAL;
+  cond_current  = cond_stack;
+  cond_stack[0] = PPDC_COND_NORMAL;
 
   if (f)
     read_file(f);
@@ -295,7 +298,8 @@ ppdcSource::find_variable(const char *n)// I - Variable name
 //
 
 ppdcAttr *                             // O - Attribute
-ppdcSource::get_attr(ppdcFile *fp)     // I - File to read
+ppdcSource::get_attr(ppdcFile *fp,     // I - File to read
+                     bool     loc)     // I - Localize this attribute?
 {
   char name[1024],                     // Name string
        selector[1024],                 // Selector string
@@ -308,15 +312,16 @@ ppdcSource::get_attr(ppdcFile *fp)        // I - File to read
   // Attribute name selector value
   if (!get_token(fp, name, sizeof(name)))
   {
-    fprintf(stderr, "ppdc: Expected name after Attribute on line %d of %s!\n",
-            fp->line, fp->filename);
+    fprintf(stderr, "ppdc: Expected name after %sAttribute on line %d of %s!\n",
+            loc ? "Loc" : "", fp->line, fp->filename);
     return (0);
   }
 
   if (!get_token(fp, selector, sizeof(selector)))
   {
-    fprintf(stderr, "ppdc: Expected selector after Attribute on line %d of %s!\n",
-            fp->line, fp->filename);
+    fprintf(stderr,
+            "ppdc: Expected selector after %sAttribute on line %d of %s!\n",
+            loc ? "Loc" : "", fp->line, fp->filename);
     return (0);
   }
 
@@ -325,14 +330,15 @@ ppdcSource::get_attr(ppdcFile *fp)        // I - File to read
 
   if (!get_token(fp, value, sizeof(value)))
   {
-    fprintf(stderr, "ppdc: Expected value after Attribute on line %d of %s!\n",
-            fp->line, fp->filename);
+    fprintf(stderr,
+            "ppdc: Expected value after %sAttribute on line %d of %s!\n",
+            loc ? "Loc" : "", fp->line, fp->filename);
     return (0);
   }
 
 //  printf("name=\"%s\", selector=\"%s\", value=\"%s\"\n", name, selector, value);
 
-  return (new ppdcAttr(name, selector, text, value));
+  return (new ppdcAttr(name, selector, text, value, loc));
 }
 
 
@@ -778,6 +784,9 @@ ppdcSource::get_duplex(ppdcFile   *fp,      // I - File to read from
     return;
   }
 
+  if (cond_state)
+    return;
+
   if (!strcasecmp(temp, "none") || !strcasecmp(temp, "false") ||
       !strcasecmp(temp, "no") || !strcasecmp(temp, "off"))
   {
@@ -1130,7 +1139,6 @@ ppdcSource::get_group(ppdcFile   *fp,     // I - File to read
   {
     // Nope, add a new one...
     g = new ppdcGroup(name, text);
-    d->add_group(g);
   }
 
   return (g);
@@ -1180,19 +1188,31 @@ ppdcSource::get_installable(ppdcFile *fp)
 // 'ppdcSource::get_integer()' - Get an integer value from a string.
 //
 
+#define PPDC_XX        -1                      // Bad
+#define PPDC_EQ        0                       // ==
+#define PPDC_NE        1                       // !=
+#define PPDC_LT        2                       // <
+#define PPDC_LE        3                       // <=
+#define PPDC_GT        4                       // >
+#define PPDC_GE        5                       // >=
+
 int                                    // O - Integer value
 ppdcSource::get_integer(const char *v) // I - Value string
 {
-  long val;                            // Value
-  long temp;                           // Temporary value
-  char *newv;                          // New value string pointer
+  long         val;                    // Value
+  long         temp,                   // Temporary value
+               temp2;                  // Second temporary value
+  char         *newv,                  // New value string pointer
+               ch;                     // Temporary character
+  ppdcVariable *var;                   // #define variable
+  int          compop;                 // Comparison operator
 
 
   // Parse the value string...
   if (!v)
     return (-1);
 
-  if (isdigit(*v) || *v == '-' || *v == '+')
+  if (isdigit(*v & 255) || *v == '-' || *v == '+')
   {
     // Return a simple integer value
     val = strtol(v, (char **)&v, 0);
@@ -1203,29 +1223,187 @@ ppdcSource::get_integer(const char *v) // I - Value string
   }
   else if (*v == '(')
   {
-    // Return the bitwise OR of each integer in parenthesis...
+    // Evaluate and expression in any of the following formats:
+    //
+    // (number number ... number)   Bitwise OR of all numbers
+    // (NAME == value)              1 if equal, 0 otherwise
+    // (NAME != value)              1 if not equal, 0 otherwise
+    // (NAME < value)               1 if less than, 0 otherwise
+    // (NAME <= value)              1 if less than or equal, 0 otherwise
+    // (NAME > value)               1 if greater than, 0 otherwise
+    // (NAME >= value)              1 if greater than or equal, 0 otherwise
+
     v ++;
     val = 0;
 
     while (*v && *v != ')')
     {
-      temp = strtol(v, &newv, 0);
+      // Skip leading whitespace...
+      while (*v && isspace(*v & 255));
+        v ++;
+
+      if (!*v || *v == ')')
+        break;
+
+      if (isdigit(*v & 255) || *v == '-' || *v == '+')
+      {
+        // Bitwise OR a number...
+       temp = strtol(v, &newv, 0);
+
+       if (!*newv || newv == v || !(isspace(*newv) || *newv == ')') ||
+           temp == LONG_MIN)
+         return (-1);
+      }
+      else
+      {
+        // NAME logicop value
+       for (newv = (char *)v + 1;
+            *newv && (isalnum(*newv & 255) || *newv == '_');
+            newv ++);
+
+        ch    = *newv;
+       *newv = '\0';
+
+        if ((var = find_variable(v)) != NULL)
+       {
+         if (!var->value || !var->value->value || !var->value->value[0])
+           temp = 0;
+         else if (isdigit(var->value->value[0] & 255) ||
+                  var->value->value[0] == '-' ||
+                  var->value->value[0] == '+')
+            temp = strtol(var->value->value, NULL, 0);
+         else
+           temp = 1;
+       }
+       else
+         temp = 0;
+
+        *newv = ch;
+       while (isspace(*newv & 255))
+         newv ++;
+
+        if (strncmp(newv, "==", 2))
+       {
+         compop = PPDC_EQ;
+         newv += 2;
+       }
+        else if (strncmp(newv, "!=", 2))
+        {
+         compop = PPDC_NE;
+         newv += 2;
+       }
+        else if (strncmp(newv, "<=", 2))
+        {
+         compop = PPDC_LE;
+         newv += 2;
+       }
+       else if (*newv == '<')
+        {
+         compop = PPDC_LT;
+         newv ++;
+       }
+        else if (strncmp(newv, ">=", 2))
+        {
+         compop = PPDC_GE;
+         newv += 2;
+       }
+       else if (*newv == '>')
+       {
+         compop = PPDC_GT;
+         newv ++;
+       }
+       else
+         compop = PPDC_XX;
+
+        if (compop != PPDC_XX)
+       {
+         while (isspace(*newv & 255))
+           newv ++;
+
+          if (*newv == ')' || !*newv)
+           return (-1);
+
+         if (isdigit(*v & 255) || *v == '-' || *v == '+')
+         {
+           // Get the second number...
+           temp2 = strtol(newv, &newv, 0);
+           if (!*newv || newv == v || !(isspace(*newv) || *newv == ')') ||
+               temp == LONG_MIN)
+             return (-1);
+          }
+         else
+         {
+           // Lookup the second name...
+           for (v = newv, newv ++;
+                *newv && (isalnum(*newv & 255) || *newv == '_');
+                newv ++);
 
-      if (!*newv || newv == v || !(isspace(*newv) || *newv == ')') ||
-          temp == LONG_MIN)
-        return (-1);
+           ch    = *newv;
+           *newv = '\0';
+
+           if ((var = find_variable(v)) != NULL)
+           {
+             if (!var->value || !var->value->value || !var->value->value[0])
+               temp2 = 0;
+             else if (isdigit(var->value->value[0] & 255) ||
+                      var->value->value[0] == '-' ||
+                      var->value->value[0] == '+')
+               temp2 = strtol(var->value->value, NULL, 0);
+             else
+               temp2 = 1;
+           }
+           else
+             temp2 = 0;
+
+           *newv = ch;
+          }
+
+         // Do the comparison...
+         switch (compop)
+         {
+           case PPDC_EQ :
+               temp = temp == temp2;
+               break;
+           case PPDC_NE :
+               temp = temp != temp2;
+               break;
+           case PPDC_LT :
+               temp = temp < temp2;
+               break;
+           case PPDC_LE :
+               temp = temp <= temp2;
+               break;
+           case PPDC_GT :
+               temp = temp > temp2;
+               break;
+           case PPDC_GE :
+               temp = temp >= temp2;
+               break;
+         }
+       }
+      }
 
       val |= temp;
       v   = newv;
     }
 
-    if (*v == ')')
+    if (*v == ')' && !v[1])
       return ((int)val);
     else
       return (-1);
   }
+  else if ((var = find_variable(v)) != NULL)
+  {
+    // NAME by itself returns 1 if the #define variable is not blank and
+    // not "0"...
+    return (var->value->value && var->value->value[0] &&
+            strcmp(var->value->value, "0"));
+  }
   else
+  {
+    // Anything else is an error...
     return (-1);
+  }
 }
 
 
@@ -1374,13 +1552,13 @@ ppdcSource::get_option(ppdcFile   *fp,  // I - File to read
   {
     // Nope, add a new one...
     o = new ppdcOption(ot, name, text, section, order);
-    g->add_option(o);
   }
   else if (o->type != ot)
   {
 //    printf("o=%p, o->type=%d, o->name=%s, ot=%d, name=%s\n",
 //           o, o->type, o->name->value, ot, name);
-    fprintf(stderr, "ppdc: Option already defined with a different type on line %d of %s!\n",
+    fprintf(stderr,
+            "ppdc: Option redefined with a different type on line %d of %s!\n",
             fp->line, fp->filename);
     return (NULL);
   }
@@ -2111,6 +2289,9 @@ ppdcSource::read_file(const char *f)      // I - File to read
   ppdcFile *fp = new ppdcFile(f);
   scan_file(fp);
   delete fp;
+
+  if (cond_current != cond_stack)
+    fprintf(stderr, "ppdc: Missing #endif at end of \"%s\"!\n", f);
 }
 
 
@@ -2155,6 +2336,7 @@ ppdcSource::scan_file(ppdcFile   *fp,     // I - File to read
   // Loop until EOF or }
   o = 0;
   g = general;
+
   while (get_token(fp, temp, sizeof(temp)))
   {
     if (temp[0] == '*')
@@ -2183,6 +2365,113 @@ ppdcSource::scan_file(ppdcFile   *fp,   // I - File to read
       // Open a new child...
       scan_file(fp, d);
     }
+    else if (!strcasecmp(temp, "#if"))
+    {
+      if ((cond_current - cond_stack) >= 100)
+      {
+        fprintf(stderr, "ppdc: Too many nested #if's on line %d of %s!\n",
+               fp->line, fp->filename);
+       break;
+      }
+
+      cond_current ++;
+      if (get_integer(fp))
+        *cond_current = PPDC_COND_SATISFIED;
+      else
+      {
+        *cond_current = PPDC_COND_SKIP;
+       cond_state    |= PPDC_COND_SKIP;
+      }
+    }
+    else if (!strcasecmp(temp, "#elif"))
+    {
+      if (cond_current == cond_stack)
+      {
+        fprintf(stderr, "ppdc: Missing #if on line %d of %s!\n", fp->line,
+               fp->filename);
+        break;
+      }
+
+      if (*cond_current & PPDC_COND_SATISFIED)
+      {
+        get_integer(fp);
+       *cond_current |= PPDC_COND_SKIP;
+      }
+      else if (get_integer(fp))
+      {
+        *cond_current |= PPDC_COND_SATISFIED;
+       *cond_current &= ~PPDC_COND_SKIP;
+      }
+      else
+        *cond_current |= PPDC_COND_SKIP;
+
+      // Update the current state
+      int *cond_temp = cond_current;   // Temporary stack pointer
+
+      cond_state = PPDC_COND_NORMAL;
+      while (cond_temp > cond_stack)
+        if (*cond_temp & PPDC_COND_SKIP)
+       {
+         cond_state = PPDC_COND_SKIP;
+         break;
+       }
+       else
+         cond_temp --;
+    }
+    else if (!strcasecmp(temp, "#else"))
+    {
+      if (cond_current == cond_stack)
+      {
+        fprintf(stderr, "ppdc: Missing #if on line %d of %s!\n", fp->line,
+               fp->filename);
+        break;
+      }
+
+      if (*cond_current & PPDC_COND_SATISFIED)
+       *cond_current |= PPDC_COND_SKIP;
+      else
+      {
+        *cond_current |= PPDC_COND_SATISFIED;
+       *cond_current &= ~PPDC_COND_SKIP;
+      }
+
+      // Update the current state
+      int *cond_temp = cond_current;   // Temporary stack pointer
+
+      cond_state = PPDC_COND_NORMAL;
+      while (cond_temp > cond_stack)
+        if (*cond_temp & PPDC_COND_SKIP)
+       {
+         cond_state = PPDC_COND_SKIP;
+         break;
+       }
+       else
+         cond_temp --;
+    }
+    else if (!strcasecmp(temp, "#endif"))
+    {
+      if (cond_current == cond_stack)
+      {
+        fprintf(stderr, "ppdc: Missing #if on line %d of %s!\n", fp->line,
+               fp->filename);
+        break;
+      }
+
+      cond_current --;
+
+      // Update the current state
+      int *cond_temp = cond_current;   // Temporary stack pointer
+
+      cond_state = PPDC_COND_NORMAL;
+      while (cond_temp > cond_stack)
+        if (*cond_temp & PPDC_COND_SKIP)
+       {
+         cond_state = PPDC_COND_SKIP;
+         break;
+       }
+       else
+         cond_temp --;
+    }
     else if (!strcasecmp(temp, "#define"))
     {
       // Get the variable...
@@ -2196,6 +2485,8 @@ ppdcSource::scan_file(ppdcFile   *fp,     // I - File to read
                inctemp[1024],          // Initial filename
                incname[1024];          // Include filename
       ppdcFile *incfile;               // Include file
+      int      *old_current = cond_current;
+                                       // Previous current stack
 
 
       // Get the include name...
@@ -2206,13 +2497,16 @@ ppdcSource::scan_file(ppdcFile   *fp,   // I - File to read
         break;
       }
 
+      if (cond_state)
+        continue;
+
       // Figure out the current directory...
       strlcpy(basedir, fp->filename, sizeof(basedir));
 
       if ((baseptr = strrchr(basedir, '/')) != NULL)
-        *baseptr = '\0';
+       *baseptr = '\0';
       else
-        strcpy(basedir, ".");
+       strcpy(basedir, ".");
 
       // Find the include file...
       if (find_include(inctemp, basedir, incname, sizeof(incname)))
@@ -2221,13 +2515,16 @@ ppdcSource::scan_file(ppdcFile   *fp,   // I - File to read
        incfile = new ppdcFile(incname);
        scan_file(incfile, d, true);
        delete incfile;
+
+       if (cond_current != old_current)
+         fprintf(stderr, "ppdc: Missing #endif at end of \"%s\"!\n", incname);
       }
       else
       {
-        // Can't find it!
+       // Can't find it!
        fprintf(stderr,
-               "ppdc: Unable to find include file \"%s\" on line %d of %s!\n",
-               inctemp, fp->line, fp->filename);
+               "ppdc: Unable to find include file \"%s\" on line %d of %s!\n",
+               inctemp, fp->line, fp->filename);
        break;
       }
     }
@@ -2239,7 +2536,12 @@ ppdcSource::scan_file(ppdcFile   *fp,    // I - File to read
       // Get a media size...
       m = get_size(fp);
       if (m)
-        sizes->add(m);
+      {
+        if (cond_state)
+         m->release();
+       else
+          sizes->add(m);
+      }
     }
     else if (!strcasecmp(temp, "#po"))
     {
@@ -2249,21 +2551,43 @@ ppdcSource::scan_file(ppdcFile   *fp,   // I - File to read
       // Get a message catalog...
       cat = get_po(fp);
       if (cat)
-        po_files->add(cat);
+      {
+        if (cond_state)
+         cat->release();
+       else
+         po_files->add(cat);
+      }
     }
-    else if (!strcasecmp(temp, "Attribute"))
+    else if (!strcasecmp(temp, "Attribute") ||
+             !strcasecmp(temp, "LocAttribute"))
     {
       ppdcAttr *a;                     // Attribute
 
 
       // Get an attribute...
-      a = get_attr(fp);
+      a = get_attr(fp, !strcasecmp(temp, "LocAttribute"));
       if (a)
-        d->add_attr(a);
+      {
+        if (cond_state)
+         a->release();
+       else
+          d->add_attr(a);
+      }
     }
     else if (!strcasecmp(temp, "Choice"))
     {
       // Get a choice...
+      c = get_choice(fp);
+      if (!c)
+        break;
+
+      if (cond_state)
+      {
+        c->release();
+        continue;
+      }
+
+      // Add it to the current option...
       if (!o)
       {
         fprintf(stderr, "ppdc: Choice found on line %d of %s with no Option!\n",
@@ -2271,11 +2595,6 @@ ppdcSource::scan_file(ppdcFile   *fp,    // I - File to read
         break;
       }
 
-      c = get_choice(fp);
-      if (!c)
-        break;
-
-      // Add it to the current option...
       o->add_choice(c);
 
       if (isdefault)
@@ -2284,7 +2603,10 @@ ppdcSource::scan_file(ppdcFile   *fp,    // I - File to read
     else if (!strcasecmp(temp, "ColorDevice"))
     {
       // ColorDevice boolean
-      d->color_device = get_boolean(fp);
+      if (cond_state)
+        get_boolean(fp);
+      else
+        d->color_device = get_boolean(fp);
     }
     else if (!strcasecmp(temp, "ColorModel"))
     {
@@ -2293,6 +2615,12 @@ ppdcSource::scan_file(ppdcFile   *fp,    // I - File to read
       if (!c)
         continue;
 
+      if (cond_state)
+      {
+        c->release();
+        continue;
+      }
+
       // Add the choice to the ColorModel option...
       if ((o = d->find_option("ColorModel")) == NULL)
       {
@@ -2318,7 +2646,12 @@ ppdcSource::scan_file(ppdcFile   *fp,    // I - File to read
       p = get_color_profile(fp);
 
       if (p)
-        d->profiles->add(p);
+      {
+        if (cond_state)
+         p->release();
+       else
+          d->profiles->add(p);
+      }
     }
     else if (!strcasecmp(temp, "Copyright"))
     {
@@ -2337,6 +2670,9 @@ ppdcSource::scan_file(ppdcFile   *fp,     // I - File to read
        break;
       }
 
+      if (cond_state)
+        continue;
+
       // Break it up into individual lines...
       for (copyptr = copytemp; copyptr; copyptr = copyend)
       {
@@ -2353,6 +2689,13 @@ ppdcSource::scan_file(ppdcFile   *fp,    // I - File to read
 
       // Get a custom media size...
       m = get_custom_size(fp);
+
+      if (cond_state)
+      {
+        m->release();
+        continue;
+      }
+
       if (m)
         d->sizes->add(m);
 
@@ -2366,7 +2709,7 @@ ppdcSource::scan_file(ppdcFile   *fp,     // I - File to read
 
 
       have_cutter = get_boolean(fp);
-      if (have_cutter <= 0)
+      if (have_cutter <= 0 || cond_state)
         continue;
 
       if ((o = d->find_option("CutMedia")) == NULL)
@@ -2393,6 +2736,12 @@ ppdcSource::scan_file(ppdcFile   *fp,    // I - File to read
       if (!c)
         continue;
 
+      if (cond_state)
+      {
+        c->release();
+        continue;
+      }
+
       // Add the choice to the cupsDarkness option...
       if ((o = d->find_option("cupsDarkness")) == NULL)
       {
@@ -2422,6 +2771,9 @@ ppdcSource::scan_file(ppdcFile   *fp,     // I - File to read
         continue;
       }
 
+      if (cond_state)
+        continue;
+
       for (i = 0; i < (int)(sizeof(driver_types) / sizeof(driver_types[0])); i ++)
         if (!strcasecmp(temp, driver_types[i]))
          break;
@@ -2444,7 +2796,12 @@ ppdcSource::scan_file(ppdcFile   *fp,    // I - File to read
       // Get the filter value...
       f = get_filter(fp);
       if (f)
-        d->filters->add(f);
+      {
+        if (cond_state)
+         f->release();
+       else
+          d->filters->add(f);
+      }
     }
     else if (!strcasecmp(temp, "Finishing"))
     {
@@ -2453,6 +2810,12 @@ ppdcSource::scan_file(ppdcFile   *fp,    // I - File to read
       if (!c)
         continue;
 
+      if (cond_state)
+      {
+        c->release();
+        continue;
+      }
+
       // Add the choice to the cupsFinishing option...
       if ((o = d->find_option("cupsFinishing")) == NULL)
       {
@@ -2479,21 +2842,40 @@ ppdcSource::scan_file(ppdcFile   *fp,   // I - File to read
       f = get_font(fp);
       if (f)
       {
-       if (!strcasecmp(temp, "#font"))
-         base_fonts->add(f);
-        else
-         d->add_font(f);
+        if (cond_state)
+         f->release();
+       else
+       {
+         if (!strcasecmp(temp, "#font"))
+           base_fonts->add(f);
+         else
+           d->add_font(f);
 
-        if (isdefault)
-          d->set_default_font(f);
+         if (isdefault)
+           d->set_default_font(f);
+       }
       }
     }
     else if (!strcasecmp(temp, "Group"))
     {
       // Get a group...
-      g = get_group(fp, d);
-      if (!g)
+      ppdcGroup *tempg = get_group(fp, d);
+
+      if (!tempg)
         break;
+
+      if (cond_state)
+      {
+        if (!d->find_group(tempg->name->value))
+          tempg->release();
+      }
+      else
+      {
+       if (!d->find_group(tempg->name->value))
+         d->add_group(tempg);
+
+        g = tempg;
+      }
     }
     else if (!strcasecmp(temp, "HWMargins"))
     {
@@ -2510,6 +2892,12 @@ ppdcSource::scan_file(ppdcFile   *fp,    // I - File to read
       if (!c)
         continue;
 
+      if (cond_state)
+      {
+        c->release();
+        continue;
+      }
+
       // Add the choice to the InputSlot option...
       if ((o = d->find_option("InputSlot")) == NULL)
       {
@@ -2535,14 +2923,21 @@ ppdcSource::scan_file(ppdcFile   *fp,   // I - File to read
       // Add it as needed...
       if (o)
       {
-        install->add_option(o);
+        if (cond_state)
+         o->release();
+       else
+          install->add_option(o);
+
         o = NULL;
       }
     }
     else if (!strcasecmp(temp, "ManualCopies"))
     {
       // ManualCopies boolean
-      d->manual_copies = get_boolean(fp);
+      if (cond_state)
+        get_boolean(fp);
+      else
+        d->manual_copies = get_boolean(fp);
     }
     else if (!strcasecmp(temp, "Manufacturer"))
     {
@@ -2557,13 +2952,22 @@ ppdcSource::scan_file(ppdcFile   *fp,   // I - File to read
        break;
       }
 
-      d->set_manufacturer(name);
+      if (!cond_state)
+        d->set_manufacturer(name);
     }
     else if (!strcasecmp(temp, "MaxSize"))
     {
       // MaxSize width length
-      d->max_width  = get_measurement(fp);
-      d->max_length = get_measurement(fp);
+      if (cond_state)
+      {
+        get_measurement(fp);
+       get_measurement(fp);
+      }
+      else
+      {
+       d->max_width  = get_measurement(fp);
+       d->max_length = get_measurement(fp);
+      }
     }
     else if (!strcasecmp(temp, "MediaSize"))
     {
@@ -2575,11 +2979,15 @@ ppdcSource::scan_file(ppdcFile   *fp,   // I - File to read
 
       if (get_token(fp, name, sizeof(name)) == NULL)
       {
-        fprintf(stderr, "ppdc: Expected name after MediaSize on line %d of %s!\n",
+        fprintf(stderr,
+               "ppdc: Expected name after MediaSize on line %d of %s!\n",
                fp->line, fp->filename);
        break;
       }
 
+      if (cond_state)
+        continue;
+
       m = find_size(name);
 
       if (!m)
@@ -2606,6 +3014,12 @@ ppdcSource::scan_file(ppdcFile   *fp,    // I - File to read
       if (!c)
         continue;
 
+      if (cond_state)
+      {
+        c->release();
+        continue;
+      }
+
       // Add the choice to the MediaType option...
       if ((o = d->find_option("MediaType")) == NULL)
       {
@@ -2626,8 +3040,16 @@ ppdcSource::scan_file(ppdcFile   *fp,    // I - File to read
     else if (!strcasecmp(temp, "MinSize"))
     {
       // MinSize width length
-      d->min_width  = get_measurement(fp);
-      d->min_length = get_measurement(fp);
+      if (cond_state)
+      {
+        get_measurement(fp);
+       get_measurement(fp);
+      }
+      else
+      {
+       d->min_width  = get_measurement(fp);
+       d->min_length = get_measurement(fp);
+      }
     }
     else if (!strcasecmp(temp, "ModelName"))
     {
@@ -2642,34 +3064,71 @@ ppdcSource::scan_file(ppdcFile   *fp,   // I - File to read
        break;
       }
 
-      d->set_model_name(name);
+      if (!cond_state)
+        d->set_model_name(name);
     }
     else if (!strcasecmp(temp, "ModelNumber"))
     {
       // ModelNumber number
-      d->model_number = get_integer(fp);
+      if (cond_state)
+        get_integer(fp);
+      else
+        d->model_number = get_integer(fp);
     }
     else if (!strcasecmp(temp, "Option"))
     {
       // Get an option...
-      o = get_option(fp, d, g);
-      if (!o)
+      ppdcOption *tempo = get_option(fp, d, g);
+
+      if (!tempo)
         break;
+
+      if (cond_state)
+      {
+        if (!g->find_option(tempo->name->value))
+         tempo->release();
+      }
+      else
+      {
+        if (!g->find_option(tempo->name->value))
+         g->add_option(tempo);
+
+        o = tempo;
+      }
+    }
+    else if (!strcasecmp(temp, "FileName"))
+    {
+      // FileName name
+      char     name[256];              // Filename string
+
+
+      if (!get_token(fp, name, sizeof(name)))
+      {
+        fprintf(stderr,
+               "ppdc: Expected name after FileName on line %d of %s!\n",
+               fp->line, fp->filename);
+       break;
+      }
+
+      if (!cond_state)
+        d->set_file_name(name);
     }
     else if (!strcasecmp(temp, "PCFileName"))
     {
       // PCFileName name
-      char     name[256];              // Model name string
+      char     name[256];              // PC filename string
 
 
       if (!get_token(fp, name, sizeof(name)))
       {
-        fprintf(stderr, "ppdc: Expected name after PCFileName on line %d of %s!\n",
+        fprintf(stderr,
+               "ppdc: Expected name after PCFileName on line %d of %s!\n",
                fp->line, fp->filename);
        break;
       }
 
-      d->set_pc_file_name(name);
+      if (!cond_state)
+        d->set_pc_file_name(name);
     }
     else if (!strcasecmp(temp, "Resolution"))
     {
@@ -2678,11 +3137,18 @@ ppdcSource::scan_file(ppdcFile   *fp,   // I - File to read
       if (!c)
         continue;
 
+      if (cond_state)
+      {
+        c->release();
+        continue;
+      }
+
       // Add the choice to the Resolution option...
       if ((o = d->find_option("Resolution")) == NULL)
       {
        // Create the Resolution option...
-       o = new ppdcOption(PPDC_PICKONE, "Resolution", NULL, PPDC_SECTION_ANY, 10.0f);
+       o = new ppdcOption(PPDC_PICKONE, "Resolution", NULL, PPDC_SECTION_ANY,
+                          10.0f);
        g = general;
        g->add_option(o);
       }
@@ -2703,12 +3169,20 @@ ppdcSource::scan_file(ppdcFile   *fp,   // I - File to read
       p = get_simple_profile(fp);
 
       if (p)
-        d->profiles->add(p);
+      {
+        if (cond_state)
+         p->release();
+       else
+          d->profiles->add(p);
+      }
     }
     else if (!strcasecmp(temp, "Throughput"))
     {
       // Throughput number
-      d->throughput = get_integer(fp);
+      if (cond_state)
+        get_integer(fp);
+      else
+        d->throughput = get_integer(fp);
     }
     else if (!strcasecmp(temp, "UIConstraints"))
     {
@@ -2718,12 +3192,20 @@ ppdcSource::scan_file(ppdcFile   *fp,   // I - File to read
       con = get_constraint(fp);
 
       if (con)
-        d->constraints->add(con);
+      {
+        if (cond_state)
+         con->release();
+       else
+         d->constraints->add(con);
+      }
     }
     else if (!strcasecmp(temp, "VariablePaperSize"))
     {
       // VariablePaperSize boolean
-      d->variable_paper_size = get_boolean(fp);
+      if (cond_state)
+        get_boolean(fp);
+      else
+       d->variable_paper_size = get_boolean(fp);
     }
     else if (!strcasecmp(temp, "Version"))
     {
@@ -2733,12 +3215,14 @@ ppdcSource::scan_file(ppdcFile   *fp,   // I - File to read
 
       if (!get_token(fp, name, sizeof(name)))
       {
-        fprintf(stderr, "ppdc: Expected string after Version on line %d of %s!\n",
+        fprintf(stderr,
+               "ppdc: Expected string after Version on line %d of %s!\n",
                fp->line, fp->filename);
        break;
       }
 
-      d->set_version(name);
+      if (!cond_state)
+        d->set_version(name);
     }
     else
     {
@@ -2871,6 +3355,8 @@ ppdcSource::write_file(const char *f)     // I - File to write
       quotef(fp, "  Manufacturer \"%s\"\n", d->manufacturer->value);
     if (d->model_name->value)
       quotef(fp, "  ModelName \"%s\"\n", d->model_name->value);
+    if (d->file_name->value)
+      quotef(fp, "  FileName \"%s\"\n", d->file_name->value);
     if (d->pc_file_name->value)
       quotef(fp, "  PCFileName \"%s\"\n", d->pc_file_name->value);
     if (d->version->value)
index 02852cabfaea463f9552bae9ae8499c90b6ee19b..c4d6be1e01fa810bc4a0156a774dd34aeb92b41c 100644 (file)
@@ -23,6 +23,7 @@
 //
 
 #include "ppdc.h"
+#include <unistd.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 
@@ -50,23 +51,28 @@ main(int  argc,                             // I - Number of command-line arguments
   cups_file_t          *fp;            // PPD file
   char                 *opt,           // Current option
                        *value,         // Value in option
+                       *outname,       // Output filename
                        pcfilename[1024],
                                        // Lowercase pcfilename
                        filename[1024]; // PPD filename
-  int                  verbose;        // Verbosity
-  ppdcArray            *locales;       // List of locales
-  int                  comp;           // Compress
+  int                  comp,           // Compress
+                       do_test,        // Test PPD files
+                       use_model_name, // Use ModelName for filename
+                       verbose;        // Verbosity
   ppdcLineEnding       le;             // Line ending to use
+  ppdcArray            *locales;       // List of locales
 
 
   // Scan the command-line...
-  catalog = NULL;
-  outdir  = "ppd";
-  src     = new ppdcSource();
-  verbose = 0;
-  locales = NULL;
-  comp    = 0;
-  le      = PPDC_LFONLY;
+  catalog        = NULL;
+  comp           = 0;
+  do_test        = 0;
+  le             = PPDC_LFONLY;
+  locales        = NULL;
+  outdir         = "ppd";
+  src            = new ppdcSource();
+  use_model_name = 0;
+  verbose        = 0;
 
   for (i = 1; i < argc; i ++)
     if (argv[i][0] == '-')
@@ -74,6 +80,32 @@ main(int  argc,                              // I - Number of command-line arguments
       for (opt = argv[i] + 1; *opt; opt ++)
         switch (*opt)
        {
+          case 'D' :                   // Define variable
+             i ++;
+             if (i >= argc)
+               usage();
+
+              if ((value = strchr(argv[i], '=')) != NULL)
+             {
+               *value++ = '\0';
+
+               src->set_variable(argv[i], value);
+             }
+             else
+               src->set_variable(argv[i], "1");
+              break;
+
+          case 'I' :                   // Include directory...
+             i ++;
+             if (i >= argc)
+               usage();
+
+              if (verbose > 1)
+               printf("ppdc: Adding include directory \"%s\"...\n", argv[i]);
+
+             ppdcSource::add_include(argv[i]);
+             break;
+
          case 'c' :                    // Message catalog...
              i ++;
               if (i >= argc)
@@ -154,30 +186,12 @@ main(int  argc,                           // I - Number of command-line arguments
              }
              break;
 
-          case 'D' :                   // Define variable
-             i ++;
-             if (i >= argc)
-               usage();
-
-              if ((value = strchr(argv[i], '=')) != NULL)
-             {
-               *value++ = '\0';
-
-               src->set_variable(argv[i], value);
-             }
-             else
-               src->set_variable(argv[i], "1");
-              break;
-
-          case 'I' :                   // Include directory...
-             i ++;
-             if (i >= argc)
-               usage();
-
-              if (verbose > 1)
-               printf("ppdc: Adding include directory \"%s\"...\n", argv[i]);
+          case 'm' :                   // Use ModelName for filename
+             use_model_name = 1;
+             break;
 
-             ppdcSource::add_include(argv[i]);
+          case 't' :                   // Test PPDs instead of generating them
+             do_test = 1;
              break;
 
           case 'v' :                   // Be verbose...
@@ -241,39 +255,92 @@ main(int  argc,                           // I - Number of command-line arguments
          d;
         d = (ppdcDriver *)src->drivers->next())
     {
-      // Write the PPD file for this driver...
-      if (strstr(d->pc_file_name->value, ".PPD"))
+      if (do_test)
       {
-       // Convert PCFileName to lowercase...
-       for (j = 0;
-            d->pc_file_name->value[j] && j < (int)(sizeof(pcfilename) - 1);
-            j ++)
-         pcfilename[j] = tolower(d->pc_file_name->value[j]);
+        // Test the PPD file for this driver...
+       int     pid,                    // Process ID
+               fds[2];                 // Pipe file descriptors
+
+
+        if (pipe(fds))
+       {
+         fprintf(stderr, "ppdc: Unable to create output pipes: %s\n",
+                 strerror(errno));
+         return (1);
+       }
+
+       if ((pid = fork()) == 0)
+       {
+         // Child process comes here...
+         close(0);
+         dup(fds[0]);
+
+         close(fds[0]);
+         close(fds[1]);
+
+         execlp("cupstestppd", "cupstestppd", "-", (char *)0);
+
+         fprintf(stderr, "ppdc: Unable to execute cupstestppd: %s\n",
+                 strerror(errno));
+         return (errno);
+       }
+       else if (pid < 0)
+       {
+         fprintf(stderr, "ppdc: Unable to execute cupstestppd: %s\n",
+                 strerror(errno));
+         return (errno);
+       }
 
-       pcfilename[j] = '\0';
+       close(fds[0]);
+       fp = cupsFileOpenFd(fds[1], "w");
       }
       else
       {
-       // Leave PCFileName as-is...
-       strlcpy(pcfilename, d->pc_file_name->value, sizeof(pcfilename));
-      }
+       // Write the PPD file for this driver...
+       if (use_model_name)
+         outname = d->model_name->value;
+       else if (d->file_name)
+         outname = d->file_name->value;
+       else
+         outname = d->pc_file_name->value;
+
+       if (strstr(outname, ".PPD"))
+       {
+         // Convert PCFileName to lowercase...
+         for (j = 0;
+              outname[j] && j < (int)(sizeof(pcfilename) - 1);
+              j ++)
+           pcfilename[j] = tolower(outname[j] & 255);
 
-      // Open the PPD file for writing...
-      if (comp)
-       snprintf(filename, sizeof(filename), "%s/%s.gz", outdir, pcfilename);
-      else
-       snprintf(filename, sizeof(filename), "%s/%s", outdir, pcfilename);
+         pcfilename[j] = '\0';
+       }
+       else
+       {
+         // Leave PCFileName as-is...
+         strlcpy(pcfilename, outname, sizeof(pcfilename));
+       }
 
-      fp = cupsFileOpen(filename, comp ? "w9" : "w");
-      if (!fp)
-      {
-       fprintf(stderr, "ppdc: Unable to create PPD file \"%s\" - %s.\n",
-               filename, strerror(errno));
-       return (1);
+       // Open the PPD file for writing...
+       if (comp)
+         snprintf(filename, sizeof(filename), "%s/%s.gz", outdir, pcfilename);
+       else
+         snprintf(filename, sizeof(filename), "%s/%s", outdir, pcfilename);
+
+       fp = cupsFileOpen(filename, comp ? "w9" : "w");
+       if (!fp)
+       {
+         fprintf(stderr, "ppdc: Unable to create PPD file \"%s\" - %s.\n",
+                 filename, strerror(errno));
+         return (1);
+       }
+
+       if (verbose)
+         printf("ppdc: Writing %s...\n", filename);
       }
 
-      if (verbose)
-       printf("ppdc: Writing %s...\n", filename);
+     /*
+      * Write the PPD file...
+      */
 
       if (d->write_ppd_file(fp, catalog, locales, src, le))
       {
@@ -313,6 +380,8 @@ usage(void)
   puts("  -c catalog.po        Load the specified message catalog.");
   puts("  -d output-dir        Specify the output directory.");
   puts("  -l lang[,lang,...]   Specify the output language(s) (locale).");
+  puts("  -m                   Use the ModelName value as the filename.");
+  puts("  -t                   Test PPDs instead of generating them.");
   puts("  -v                   Be verbose (more v's for more verbosity).");
   puts("  -z                   Compress PPD files using GNU zip.");
   puts("  --cr                 End lines with CR (Mac OS 9).");
index ab67a36c33ffd7e3a3fe8383cce6550d1f131a6a..40bb9f5b062bcabd6154e0232abd968fe12ab9d9 100644 (file)
@@ -3,7 +3,7 @@
 //
 //   Definitions for the CUPS PPD Compiler.
 //
-//   Copyright 2007 by Apple Inc.
+//   Copyright 2007-2008 by Apple Inc.
 //   Copyright 2002-2007 by Easy Software Products.
 //
 //   These coded instructions, statements, and computer programs are the
@@ -73,6 +73,13 @@ enum ppdcLineEnding                  //// Line endings
   PPDC_CRLF                            // CR + LF
 };
 
+enum ppdcCondFlags                     //// Condition flags
+{
+  PPDC_COND_NORMAL = 0,                        // Normal state
+  PPDC_COND_SKIP = 1,                  // Skip state
+  PPDC_COND_SATISFIED = 2              // At least one condition satisfied
+};
+
 
 //
 // Printer description data...
@@ -173,8 +180,10 @@ class ppdcAttr                             //// Attribute
                *selector,              // Selector string
                *text,                  // Text string
                *value;                 // Value string
+  bool         localizable;            // Should this attribute be localized?
 
-  ppdcAttr(const char *n, const char *s, const char *t, const char *v);
+  ppdcAttr(const char *n, const char *s, const char *t, const char *v,
+           bool loc = false);
   ~ppdcAttr();
 };
 
@@ -323,6 +332,7 @@ class ppdcDriver                    //// Printer Driver Data
   ppdcArray    *copyright;             // Copyright strings
   ppdcString   *manufacturer,          // Manufacturer
                *model_name,            // Name of printer model
+               *file_name,             // Output filename for PPD
                *pc_file_name,          // 8 character PC filename for PPD
                *version;               // Version number
   int          model_number,           // Model number for driver
@@ -370,6 +380,7 @@ class ppdcDriver                    //// Printer Driver Data
   void         set_custom_size_code(const char *c);
   void         set_default_font(ppdcFont *f);
   void         set_default_size(ppdcMediaSize *m);
+  void         set_file_name(const char *f);
   void         set_manufacturer(const char *m);
   void         set_model_name(const char *m);
   void         set_pc_file_name(const char *f);
@@ -423,6 +434,10 @@ class ppdcSource                   //// Source File
                *po_files,              // Message catalogs
                *sizes,                 // Predefined media sizes
                *vars;                  // Defined variables
+  int          cond_state,             // Cummulative conditional state
+               *cond_current,          // Current #if state
+               cond_stack[101];        // #if state stack
+
 
   ppdcSource(const char *f = 0);
   ~ppdcSource();
@@ -434,7 +449,7 @@ class ppdcSource                    //// Source File
   ppdcCatalog  *find_po(const char *l);
   ppdcMediaSize        *find_size(const char *s);
   ppdcVariable *find_variable(const char *n);
-  ppdcAttr     *get_attr(ppdcFile *fp);
+  ppdcAttr     *get_attr(ppdcFile *fp, bool loc = false);
   int          get_boolean(ppdcFile *fp);
   ppdcChoice   *get_choice(ppdcFile *fp);
   ppdcChoice   *get_color_model(ppdcFile *fp);
index 0ee273eb968042bcdcc8bed1b8c6d899d1aa9ae1..cbd2270142144aac8a8d76a49d36ea479109e065 100644 (file)
@@ -3,7 +3,7 @@
 //
 //   PPD file message catalog program for the CUPS PPD Compiler.
 //
-//   Copyright 2007 by Apple Inc.
+//   Copyright 2007-2008 by Apple Inc.
 //   Copyright 2002-2005 by Easy Software Products.
 //
 //   These coded instructions, statements, and computer programs are the
@@ -198,13 +198,21 @@ add_ui_strings(ppdcDriver  *d,            // I - Driver data
        a;
        a = (ppdcAttr *)d->attrs->next())
     if (a->text->value && a->text->value[0] &&
-        (!strncmp(a->name->value, "Custom", 6) ||
+        (a->localizable ||
+        !strncmp(a->name->value, "Custom", 6) ||
          !strncmp(a->name->value, "ParamCustom", 11) ||
          !strcmp(a->name->value, "APCustomColorMatchingName") ||
          !strcmp(a->name->value, "APPrinterPreset") ||
          !strcmp(a->name->value, "cupsICCProfile") ||
-         !strcmp(a->name->value, "cupsIPPReason")))
+         !strcmp(a->name->value, "cupsIPPReason") ||
+         !strcmp(a->name->value, "cupsMarkerName")))
+    {
       catalog->add_message(a->text->value);
+
+      if ((a->localizable && a->value->value[0]) ||
+          !strcmp(a->name->value, "cupsIPPReason"))
+        catalog->add_message(a->value->value);
+    }
     else if (!strncmp(a->name->value, "Custom", 6) ||
              !strncmp(a->name->value, "ParamCustom", 11))
       catalog->add_message(a->name->value);
index ea54dbfba632ad3b295ec5ed551f35d9638d23dc..9b7b285c48c63b4141b776f8d17254370b8cab11 100644 (file)
@@ -224,7 +224,7 @@ cupsdDeregisterPrinter(
 #endif /* HAVE_LIBSLP */
 
 #ifdef HAVE_DNSSD
-  if (removeit && (BrowseLocalProtocols & BROWSE_DNSSD) && DNSSDPort)
+  if (removeit && (BrowseLocalProtocols & BROWSE_DNSSD) && DNSSDRef)
     dnssdDeregisterPrinter(p);
 #endif /* HAVE_DNSSD */
 }
@@ -636,7 +636,7 @@ cupsdRegisterPrinter(cupsd_printer_t *p)/* I - Printer */
 #endif /* HAVE_LIBSLP */
 
 #ifdef HAVE_DNSSD
-  if ((BrowseLocalProtocols & BROWSE_DNSSD) && DNSSDPort)
+  if ((BrowseLocalProtocols & BROWSE_DNSSD) && DNSSDRef)
     dnssdRegisterPrinter(p);
 #endif /* HAVE_DNSSD */
 }
@@ -1407,6 +1407,8 @@ cupsdStopBrowsing(void)
 
     cupsArrayDelete(DNSSDPrinters);
     DNSSDPrinters = NULL;
+
+    DNSSDPort = 0;
   }
 #endif /* HAVE_DNSSD */
 
index 2a223570edb813c1926ad44a62234d8b06f39f7d..32e4dc2ad4b79f13677e92224a1cb9e4ac918244 100644 (file)
@@ -10793,7 +10793,7 @@ user_allowed(cupsd_printer_t *p,        /* I - Printer or class */
 
   for (i = 0; i < p->num_users; i ++)
   {
-    if (p->users[i][0] == '@')
+    if (p->users[i][0] == '@' || p->users[i][0] == '#')
     {
      /*
       * Check group membership...
index ac4e67de52fd3c935c92a66d4177917f175093fe..3e9b874165332f202efbe5498807011cdf4a8633 100644 (file)
@@ -250,10 +250,10 @@ main(int  argc,                           /* I - Number of command-line args */
         * Read from stdin...
        */
 
-        if (verbose >= 0)
-          printf("(stdin):");
-
         ppd = ppdOpen(stdin);
+
+        if (verbose >= 0)
+          printf("%s:", (ppd && ppd->pcfilename) ? ppd->pcfilename : "(stdin)");
       }
       else
       {