]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Merge changes from CUPS 1.4svn-r7617.
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 28 May 2008 23:38:36 +0000 (23:38 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 28 May 2008 23:38:36 +0000 (23:38 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@793 a1ca3aef-8c08-0410-bb20-df032aa958be

23 files changed:
cgi-bin/help-index.c
cgi-bin/help-index.h
cups/api-array.shtml
cups/api-filter.header
cups/api-filter.shtml
cups/api-ppd.header
cups/api-ppd.shtml
cups/array.c
cups/backchannel.c
cups/cups.h
cups/sidechannel.h
doc/help/api-array.html
doc/help/api-filter.html
doc/help/api-httpipp.html
doc/help/api-ppd.html
doc/help/api-raster.html
doc/help/cgi.html
doc/help/options.html
filter/raster.c
filter/rastertolabel.c
scheduler/main.c
templates/header.tmpl.in
templates/help-header.tmpl

index 64f1380acd9db8f1ff564ebef43cf86e72a50555..f1d96832fd40996846fd377b030a12ae8ff669fe 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * "$Id: help-index.c 6649 2007-07-11 21:46:42Z mike $"
  *
- *   On-line help index routines for the Common UNIX Printing System (CUPS).
+ *   Online help index routines for the Common UNIX Printing System (CUPS).
  *
  *   Copyright 2007-2008 by Apple Inc.
  *   Copyright 1997-2007 by Easy Software Products.
index bbee9ca13559cc23f96aac9755c0021cfce9e10e..d92abbea25c177ac4ca82478c35d8218c2d594cd 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * "$Id: help-index.h 6649 2007-07-11 21:46:42Z mike $"
  *
- *   On-line help index definitions for the Common UNIX Printing System (CUPS).
+ *   Online help index definitions for the Common UNIX Printing System (CUPS).
  *
  *   Copyright 2007 by Apple Inc.
  *   Copyright 1997-2007 by Easy Software Products.
index 92c540b098f915c9a834354daec60e57042457ce..ae2787fec3c7635909ff84a6b92eef71f9cf2c9f 100644 (file)
@@ -73,7 +73,7 @@ void *user_data;
 </pre>
 
 <p>The hash function (type
-<a href="#cups_ahash_func_t"><code>cups_ahash_func_t</code></a>) returns a
+<a href="#cups_ahash_func_t"><code>cups_ahash_func_t</code></a>) should return a
 number from 0 to (hash_size-1) that (hopefully) uniquely identifies the
 element and is called whenever you look up an element in the array with
 <a href='#cupsArrayFind'><code>cupsArrayFind</code></a>. The hash size is
@@ -86,7 +86,7 @@ only limited by available memory, but generally should not be larger than
 The first function adds an element to the array, adding the new element
 after any elements that have the same order, while the second inserts the
 element before others with the same order. For unsorted arrays,
-<a href='#cupsArrayAdd'><code>cupsArrayAdd</code></a> appends the elemnt to
+<a href='#cupsArrayAdd'><code>cupsArrayAdd</code></a> appends the element to
 the end of the array while
 <a href='#cupsArrayInsert'><code>cupsArrayInsert</code></a> inserts the
 element at the beginning of the array. For example, the following code
@@ -139,11 +139,11 @@ future lookups will start where the last one left off:</p>
 
 <dl>
        <dt><a href='#cupsArrayFind'><code>cupsArrayFind</code></a></dt>
-       <dd>Returns the first matching element .</dd>
+       <dd>Returns the first matching element.</dd>
        <dt><a href='#cupsArrayFirst'><code>cupsArrayFirst</code></a></dt>
        <dd>Returns the first element in the array.</dd>
        <dt><a href='#cupsArrayIndex'><code>cupsArrayIndex</code></a></dt>
-       <dd>Returns the Nth element in the array.</dd>
+       <dd>Returns the Nth element in the array, starting at 0.</dd>
        <dt><a href='#cupsArrayLast'><code>cupsArrayLast</code></a></dt>
        <dd>Returns the last element in the array.</dd>
        <dt><a href='#cupsArrayNext'><code>cupsArrayNext</code></a></dt>
index 4b41c439b1a4e29aae086bdd0e205ce97f18e62a..368364ae85deaba9242b66ec8581b4207f23f330 100644 (file)
@@ -20,8 +20,7 @@
 <tr>
        <th>Headers</th>
        <th>cups/backend.h<br>
-       cups/sidechannel.h<br>
-       cups/snmp.h</th>
+       cups/sidechannel.h</th>
 </tr>
 </thead>
 <tbody>
@@ -34,7 +33,8 @@
        <td>Programming: <a href='api-overview.html' target='_top'>Introduction to CUPS Programming</a><br>
        Programming: <a href='api-cups.html' target='_top'>CUPS API</a><br>
        Programming: <a href='api-ppd.html' target='_top'>PPD API</a><br>
-       Programming: <a href='api-raster.html' target='_top'>Raster API</a></td>
+       Programming: <a href='api-raster.html' target='_top'>Raster API</a><br>
+       Specifications: <a href='spec-design' target='_top'>CUPS Design Description</a></td>
 </tr>
 </tbody>
 </table></div>
index d4583b13c641d4764f3707c0d814374012a80123..2be3b2bf6529466c1f30dd89a677e3468a9e03f2 100644 (file)
 
 <h2 class='title'><a name="OVERVIEW">Overview</a></h2>
 
-<p>Filters, printer drivers, port monitors, and backends use a common interface
-for processing print jobs and communicating status information to the scheduler.
-Each filter is run with a standard set of command-line arguments:<p>
+<p>Filters (which include printer drivers and port monitors) and backends
+are used to convert job files to a printable format and send that data to the
+printer itself. All of these programs use a common interface for processing
+print jobs and communicating status information to the scheduler. Each is run
+with a standard set of command-line arguments:<p>
 
 <dl class="code">
 
@@ -38,7 +40,7 @@ Each filter is run with a standard set of command-line arguments:<p>
        <dd>The options that were provided when the job was submitted</dd>
 
        <dt>argv[6]</dt>
-       <dd>The file to print (first filter only)</dd>
+       <dd>The file to print (first program only)</dd>
 </dl>
 
 <p>The scheduler runs one or more of these programs to print any given job. The
@@ -101,7 +103,8 @@ or 1 when they encounter an error. Backends can return any of the
 
 <h3><a name="ENVIRONMENT">Environment Variables</a></h3>
 
-<p>The following environment variables are defined by the printing system:</p>
+<p>The following environment variables are defined by the printing system
+when running print filters and backends:</p>
 
 <dl class="code">
 
@@ -122,10 +125,11 @@ or 1 when they encounter an error. Backends can return any of the
        application/postscript).</dd>
 
        <dt>CUPS_CACHEDIR</dt>
-       <dd>The directory where cache files can be stored.</dd>
+       <dd>The directory where cache files can be stored. Cache files can be
+       used to retain information between jobs or files in a job.</dd>
 
        <dt>CUPS_DATADIR</dt>
-       <dd>The directory where data files can be found.</dd>
+       <dd>The directory where (read-only) CUPS data files can be found.</dd>
 
        <dt>CUPS_SERVERROOT</dt>
        <dd>The root directory of the server.</dd>
@@ -145,19 +149,23 @@ or 1 when they encounter an error. Backends can return any of the
        file for this printer.</dd>
 
        <dt>PRINTER</dt>
-       <dd>The name of the printer.</dd>
+       <dd>The queue name of the class or printer.</dd>
 
        <dt>RIP_CACHE</dt>
        <dd>The recommended amount of memory to use for Raster Image
        Processors (RIPs).</dd>
 
+       <dt>TMPDIR</dt>
+       <dd>The directory where temporary files should be created.</dd>
+
 </dl>
 
 <h3><a name="MESSAGES">Communicating with the Scheduler</a></h3>
 
-<p>Filters and backends communicate wih the scheduler by writing messages
-to the standard error file. For example, the following code sets the current
-printer state message to "Printing page 5":</p>
+<p>Filters and backends communicate with the scheduler by writing messages
+to the standard error file. The scheduler reads messages from all filters in
+a job and processes the message based on its prefix. For example, the following
+code sets the current printer state message to "Printing page 5":</p>
 
 <pre class="example">
 int page = 5;
@@ -179,7 +187,8 @@ prefix strings:</p>
        to set the <code>marker-colors</code>, <code>marker-levels</code>,
        <code>marker-names</code>, <code>marker-types</code>,
        <code>printer-alert</code>, and <code>printer-alert-description</code>
-       printer attributes.</dd>
+       printer attributes. Standard <code>marker-types</code> values are
+       listed in <a href='#TABLE1'>Table 1</a>.</dd>
 
        <dt>CRIT: message</dt>
        <dd>Sets the printer-state-message attribute and adds the specified
@@ -201,7 +210,8 @@ prefix strings:</p>
 
        <dt>ERROR: message</dt>
        <dd>Sets the printer-state-message attribute and adds the specified
-       message to the current error log file using the "error" log level.</dd>
+       message to the current error log file using the "error" log level.
+       Use "ERROR:" messages for non-persistent processing errors.</dd>
 
        <dt>INFO: message</dt>
        <dd>Sets the printer-state-message attribute. If the current log level
@@ -227,8 +237,10 @@ prefix strings:</p>
        <dt>STATE: + printer-state-reason [printer-state-reason ...]</dt>
        <dt>STATE: - printer-state-reason [printer-state-reason ...]</dt>
        <dd>Sets, adds, or removes printer-state-reason keywords to the
-       current queue. Typically this is used to indicate media, ink, and
-       toner conditions on a printer.</dd>
+       current queue. Typically this is used to indicate persistent media,
+       ink, toner, and configuration conditions or errors on a printer.
+       <a href='#TABLE2'>Table 2</a> lists the standard state keywords -
+       use vendor-prefixed ("com.acme.foo") keywords for custom states.</dd>
 
        <dt>WARNING: message</dt>
        <dd>Sets the printer-state-message attribute and adds the specified
@@ -240,6 +252,141 @@ prefix strings:</p>
 <p>Messages without one of these prefixes are treated as if they began with
 the "DEBUG:" prefix string.</p>
 
+
+<div class='table'><table width='80%' summary='Table 1: Standard marker-types Values'>
+<caption>Table 1: <a name='TABLE1'>Standard marker-types Values</a></caption>
+<thead>
+<tr>
+       <th>marker-type</th>
+       <th>Description</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+       <td>developer</td>
+       <td>Developer unit</td>
+</tr>
+<tr>
+       <td>fuser</td>
+       <td>Fuser unit</td>
+</tr>
+<tr>
+       <td>fuserCleaningPad</td>
+       <td>Fuser cleaning pad</td>
+</tr>
+<tr>
+       <td>fuserOil</td>
+       <td>Fuser oil</td>
+</tr>
+<tr>
+       <td>ink</td>
+       <td>Ink supply</td>
+</tr>
+<tr>
+       <td>opc</td>
+       <td>Photo conductor</td>
+</tr>
+<tr>
+       <td>solidWax</td>
+       <td>Wax supply</td>
+</tr>
+<tr>
+       <td>staples</td>
+       <td>Staple supply</td>
+</tr>
+<tr>
+       <td>toner</td>
+       <td>Toner supply</td>
+</tr>
+<tr>
+       <td>transferUnit</td>
+       <td>Transfer unit</td>
+</tr>
+<tr>
+       <td>wasteInk</td>
+       <td>Waste ink tank</td>
+</tr>
+<tr>
+       <td>wasteToner</td>
+       <td>Waste toner tank</td>
+</tr>
+<tr>
+       <td>wasteWax</td>
+       <td>Waste wax tank</td>
+</tr>
+</tbody>
+</table></div>
+
+<br>
+
+<div class='table'><table width='80%' summary='Table 2: Standard State Keywords'>
+<caption>Table 2: <a name='TABLE2'>Standard State Keywords</a></caption>
+<thead>
+<tr>
+       <th>Keyword</th>
+       <th>Description</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+       <td>connecting-to-device</td>
+       <td>Connecting to printer but not printing yet</td>
+</tr>
+<tr>
+       <td>cover-open</td>
+       <td>A cover is open on the printer</td>
+</tr>
+<tr>
+       <td>input-tray-missing</td>
+       <td>An input tray is missing from the printer</td>
+</tr>
+<tr>
+       <td>marker-supply-empty</td>
+       <td>Out of ink</td>
+</tr>
+<tr>
+       <td>marker-supply-low</td>
+       <td>Low on ink</td>
+</tr>
+<tr>
+       <td>marker-waste-almost-full</td>
+       <td>Waste tank almost full</td>
+</tr>
+<tr>
+       <td>marker-waste-full</td>
+       <td>Waste tank full</td>
+</tr>
+<tr>
+       <td>media-empty</td>
+       <td>Out of media</td>
+</tr>
+<tr>
+       <td>media-jam</td>
+       <td>Media is jammed in the printer</td>
+</tr>
+<tr>
+       <td>media-low</td>
+       <td>Low on media</td>
+</tr>
+<tr>
+       <td>paused</td>
+       <td>Stop the printer</td>
+</tr>
+<tr>
+       <td>timed-out</td>
+       <td>Unable to connect to printer</td>
+</tr>
+<tr>
+       <td>toner-empty</td>
+       <td>Out of toner</td>
+</tr>
+<tr>
+       <td>toner-low</td>
+       <td>Low on toner</td>
+</tr>
+</tbody>
+</table></div>
+
 <h3><a name="COMMUNICATING_BACKEND">Communicating with the Backend</a></h3>
 
 <p>Filters can communicate with the backend via the
@@ -261,7 +408,11 @@ ssize_t bytes;
 bytes = cupsBackChannelRead(buffer, sizeof(buffer), 0.0);
 </pre>
 
-The
+<p>Filters can also use <code>select()</code> or <code>poll()</code> on the
+back-channel file descriptor (3 or <code>CUPS_BC_FD</code>) to read data only
+when it is available.</p>
+
+<p>The
 <a href="#cupsSideChannelDoRequest"><code>cupsSideChannelDoRequest</code></a>
 function allows you to get out-of-band status information and do synchronization
 with the device. For example, the following code gets the current IEEE-1284
@@ -274,7 +425,8 @@ char data[2049];
 int datalen;
 <a href="#cups_sc_status_t">cups_sc_status_t</a> status;
 
-/* Tell cupsSideChannelDoRequest() how big our buffer is, less 1 byte for nul-termination... */
+/* Tell cupsSideChannelDoRequest() how big our buffer is, less 1 byte for
+   nul-termination... */
 datalen = sizeof(data) - 1;
 
 /* Get the IEEE-1284 device ID, waiting for up to 1 second */
@@ -301,6 +453,9 @@ recommend writing back-channel data using a timeout of 1.0 seconds:</p>
 char buffer[8192];
 ssize_t bytes;
 
+/* Obtain data from printer/device */
+...
+
 /* Use a timeout of 1.0 seconds to give filters a chance to read */
 cupsBackChannelWrite(buffer, bytes, 1.0);
 </pre>
index dfcb26a4c6dfc87c7ed4194973af80b254504758..60f6ff0d23a483931b274629ae07348ae7436f76 100644 (file)
@@ -30,7 +30,7 @@
        <th>See Also</th>
        <td>Programming: <a href='api-overview.html' target='_top'>Introduction to CUPS Programming</a><br>
        Programming: <a href='api-cups.html' target='_top'>CUPS API</a><br>
-       Reference: <a href='spec-ppd.html' target='_top'>CUPS PPD Specification</a></td>
+       Specifications: <a href='spec-ppd.html' target='_top'>CUPS PPD Extensions</a></td>
 </tr>
 </tbody>
 </table></div>
index c1c2402d3b7eace7eb984d5844bcbe825f2bc169..c411c68443dcb84d65df395d70d2634becf071b8 100644 (file)
@@ -3,7 +3,7 @@
 
   PPD API introduction for the Common UNIX Printing System (CUPS).
 
-  Copyright 2007 by Apple Inc.
+  Copyright 2007-2008 by Apple Inc.
   Copyright 1997-2006 by Easy Software Products, all rights reserved.
 
   These coded instructions, statements, and computer programs are the
 
 <p>The CUPS PPD API provides read-only access the data in PostScript Printer
 Description ("PPD") files which are used for all printers with a driver. With
-it you can display printer options to users, mark option choices and check for
-conflicting choices, and output marked choices in PostScript output. The
-<a href="#ppd_file_t"><code>ppd_file_t</code></a> structure contains all of
-the information in a PPD file.</p>
+it you can obtain the data necessary to display printer options to users, mark
+option choices and check for conflicting choices, and output marked choices in
+PostScript output. The <a href="#ppd_file_t"><code>ppd_file_t</code></a>
+structure contains all of the information in a PPD file.</p>
+
+<blockquote><b>Note:</b>
+
+<p>The CUPS PPD API uses the terms "option" and "choice" instead of the Adobe
+terms "MainKeyword" and "OptionKeyword" to refer to specific printer options and
+features. CUPS also treats option ("MainKeyword") and choice ("OptionKeyword")
+values as case-insensitive strings, so option "InputSlot" and choice "Upper"
+are equivalent to "inputslot" and "upper", respectively.</p>
+</blockquote>
 
 <h3><a name="LOADING">Loading a PPD File</a></h3>
 
@@ -48,6 +57,9 @@ by the structure:</p>
 <a href="#ppdClose">ppdClose</a>(ppd);
 </pre>
 
+<p>Once closed, pointers to the <a href="#ppd_file_t"><code>ppd_file_t</code></a>
+structure and any data in it will no longer be valid.</p>
+
 <h3><a name="OPTIONS_AND_GROUPS">Options and Groups</a></h3>
 
 <p>PPD files support multiple options, which are stored in arrays of
@@ -61,7 +73,7 @@ then it is put in an automatically-generated "General" group. Groups can also
 have sub-groups, however CUPS currently ignores sub-groups because of past
 abuses of this functionality.</p>
 
-<p>Options are selected by marking them using one of three functions. The
+<p>Option choices are selected by marking them using one of three functions. The
 first is <a href="#ppdMarkDefaults"><code>ppdMarkDefaults</code></a> which
 selects all of the default options in the PPD file:</p>
 
@@ -75,14 +87,14 @@ selects all of the default options in the PPD file:</p>
 
 <p>The second is <a href="#ppdMarkOption"><code>ppdMarkOption</code></a>
 which selects a single option choice in the PPD file. For example, the following
-code selects the manual feed media source:</p>
+code selects the upper paper tray:</p>
 
 <pre class="example">
 #include &lt;cups/ppd.h&gt;
 
 <a href="#ppd_file_t">ppd_file_t</a> *ppd;
 
-<a href="#ppdMarkOption">ppdMarkOption</a>(ppd, "InputSlot", "ManualFeed");
+<a href="#ppdMarkOption">ppdMarkOption</a>(ppd, "InputSlot", "Upper");
 </pre>
 
 <p>The last function is
@@ -103,6 +115,7 @@ int num_options = cupsParseOptions(argv[5], 0, &amp;options);
 
 <a href="#ppdMarkDefaults">ppdMarkDefaults</a>(ppd);
 <a href="#cupsMarkOptions">cupsMarkOptions</a>(ppd, num_options, options);
+cupsFreeOptions(num_options, options);
 </pre>
 
 <h3><a name="CONSTRAINTS">Constraints</a></h3>
@@ -112,7 +125,8 @@ constraints, between different options. Constraints are stored in an array of
 <a href="#ppd_const_t"><code>ppd_const_t</code></a> structures which specify
 the options and choices that conflict with each other. The
 <a href="#ppdConflicts"><code>ppdConflicts</code></a> function tells you
-how many of the selected options are incompatible.</p>
+how many of the selected options are incompatible. Since constraints are
+normally specified in pairs, the returned value is typically an even number.</p>
 
 <h3><a name="PAGE_SIZES">Page Sizes</a></h3>
 
@@ -164,13 +178,17 @@ in points. Custom page size names can also be specified in inches
 <a href="#ppd_size_t">ppd_size_t</a> *size = <a href="#ppdPageSize">ppdPageSize</a>(ppd, "Custom.12.7x34.5cm");
 </pre>
 
+<p>If the PPD does not support variable page sizes, the
+<a href="#ppdPageSize"><code>ppdPageSize</code></a> function will return
+<code>NULL</code>.</p>
+
 <h3><a name="ATTRIBUTES">Attributes</a></h3>
 
 <p>Every PPD file is composed of one or more attributes. Most of these
 attributes are used to define groups, options, choices, and page sizes,
-however several informations attributes are available which you may need
-to access in your program or filter. Attributes normally look like one of
-the following examples in a PPD file:</p>
+however several informational attributes may be present which you can access
+in your program or filter. Attributes normally look like one of the following
+examples in a PPD file:</p>
 
 <pre class="example">
 *name: "value"
index 9d9790bd5c9eb2adba3f6c1d882e7bcd7b00cf1a..19f97819de79442b643e22bbae68fdfc8862b9a6 100644 (file)
@@ -99,8 +99,8 @@ static int    cups_array_find(cups_array_t *a, void *e, int prev, int *rdiff);
  * 'cupsArrayAdd()' - Add an element to the array.
  *
  * When adding an element to a sorted array, non-unique elements are
- * appended at the end of the run.  For unsorted arrays, the element
- * is inserted at the end of the array.
+ * appended at the end of the run of identical elements.  For unsorted arrays,
+ * the element is appended to the end of the array.
  *
  * @since CUPS 1.2@
  */
@@ -132,6 +132,10 @@ cupsArrayAdd(cups_array_t *a,              /* I - Array */
 /*
  * 'cupsArrayClear()' - Clear the array.
  *
+ * This function is equivalent to removing all elements in the array.
+ * The caller is responsible for freeing the memory used by the
+ * elements themselves.
+ *
  * @since CUPS 1.2@
  */
 
@@ -185,6 +189,9 @@ cupsArrayCount(cups_array_t *a)             /* I - Array */
 /*
  * 'cupsArrayCurrent()' - Return the current element in the array.
  *
+ * The current element is undefined until you call @link cupsArrayFind@,
+ * @link cupsArrayFirst@, or @link cupsArrayIndex@, or @link cupsArrayLast@.
+ *
  * @since CUPS 1.2@
  */
 
@@ -212,6 +219,9 @@ cupsArrayCurrent(cups_array_t *a)   /* I - Array */
 /*
  * 'cupsArrayDelete()' - Free all memory used by the array.
  *
+ * The caller is responsible for freeing the memory used by the
+ * elements themselves.
+ *
  * @since CUPS 1.2@
  */
 
@@ -407,7 +417,7 @@ cupsArrayFind(cups_array_t *a,              /* I - Array */
  * @since CUPS 1.2@
  */
 
-void *                                 /* O - First element or @code NULL@ */
+void *                                 /* O - First element or @code NULL@ if the array is empty */
 cupsArrayFirst(cups_array_t *a)                /* I - Array */
 {
  /*
@@ -430,10 +440,13 @@ cupsArrayFirst(cups_array_t *a)           /* I - Array */
 /*
  * 'cupsArrayGetIndex()' - Get the index of the current element.
  *
+ * The current element is undefined until you call @link cupsArrayFind@,
+ * @link cupsArrayFirst@, or @link cupsArrayIndex@, or @link cupsArrayLast@.
+ *
  * @since CUPS 1.3@
  */
 
-int                                    /* O - Index of the current element */
+int                                    /* O - Index of the current element, starting at 0 */
 cupsArrayGetIndex(cups_array_t *a)     /* I - Array */
 {
   if (!a)
@@ -449,7 +462,7 @@ cupsArrayGetIndex(cups_array_t *a)  /* I - Array */
  * @since CUPS 1.3@
  */
 
-int                                    /* O - Index of the last inserted element */
+int                                    /* O - Index of the last inserted element, starting at 0 */
 cupsArrayGetInsert(cups_array_t *a)    /* I - Array */
 {
   if (!a)
@@ -482,8 +495,8 @@ cupsArrayIndex(cups_array_t *a,             /* I - Array */
  * 'cupsArrayInsert()' - Insert an element in the array.
  *
  * When inserting an element in a sorted array, non-unique elements are
- * inserted at the beginning of the run.  For unsorted arrays, the element
- * is inserted at the beginning of the array.
+ * inserted at the beginning of the run of identical elements.  For unsorted
+ * arrays, the element is inserted at the beginning of the array.
  *
  * @since CUPS 1.2@
  */
@@ -518,7 +531,7 @@ cupsArrayInsert(cups_array_t *a,    /* I - Array */
  * @since CUPS 1.2@
  */
 
-void *                                 /* O - Last element or @code NULL@ */
+void *                                 /* O - Last element or @code NULL@ if the array is empty */
 cupsArrayLast(cups_array_t *a)         /* I - Array */
 {
  /*
@@ -541,12 +554,17 @@ cupsArrayLast(cups_array_t *a)            /* I - Array */
 /*
  * 'cupsArrayNew()' - Create a new array.
  *
+ * The comparison function ("f") is used to create a sorted array. The function
+ * receives pointers to two elements and the user data pointer ("d") - the user
+ * data pointer argument can safely be omitted when not required so functions
+ * like @code strcmp@ can be used for sorted string arrays.
+ *
  * @since CUPS 1.2@
  */
 
 cups_array_t *                         /* O - Array */
-cupsArrayNew(cups_array_func_t f,      /* I - Comparison function */
-             void              *d)     /* I - User data */
+cupsArrayNew(cups_array_func_t f,      /* I - Comparison function or @code NULL@ for an unsorted array */
+             void              *d)     /* I - User data pointer or @code NULL@ */
 {
   return (cupsArrayNew2(f, d, 0, 0));
 }
@@ -555,14 +573,22 @@ cupsArrayNew(cups_array_func_t f, /* I - Comparison function */
 /*
  * 'cupsArrayNew2()' - Create a new array with hash.
  *
+ * The comparison function ("f") is used to create a sorted array. The function
+ * receives pointers to two elements and the user data pointer ("d") - the user
+ * data pointer argument can safely be omitted when not required so functions
+ * like @code strcmp@ can be used for sorted string arrays.
+ *
+ * The hash function ("h") is used to implement cached lookups with the
+ * specified hash size ("hsize").
+ *
  * @since CUPS 1.3@
  */
 
 cups_array_t *                         /* O - Array */
-cupsArrayNew2(cups_array_func_t  f,    /* I - Comparison function */
-              void               *d,   /* I - User data */
-              cups_ahash_func_t  h,    /* I - Hash function*/
-             int                hsize) /* I - Hash size */
+cupsArrayNew2(cups_array_func_t  f,    /* I - Comparison function or @code NULL@ for an unsorted array */
+              void               *d,   /* I - User data or @code NULL@ */
+              cups_ahash_func_t  h,    /* I - Hash function or @code NULL@ for unhashed lookups */
+             int                hsize) /* I - Hash size (>= 0) */
 {
   cups_array_t *a;                     /* Array  */
 
@@ -604,6 +630,12 @@ cupsArrayNew2(cups_array_func_t  f,        /* I - Comparison function */
 /*
  * 'cupsArrayNext()' - Get the next element in the array.
  *
+ * This function is equivalent to "cupsArrayIndex(a, cupsArrayGetIndex(a) + 1)".
+ *
+ * The next element is undefined until you call @link cupsArrayFind@,
+ * @link cupsArrayFirst@, or @link cupsArrayIndex@, or @link cupsArrayLast@
+ * to set the current element.
+ *
  * @since CUPS 1.2@
  */
 
@@ -631,6 +663,12 @@ cupsArrayNext(cups_array_t *a)             /* I - Array */
 /*
  * 'cupsArrayPrev()' - Get the previous element in the array.
  *
+ * This function is equivalent to "cupsArrayIndex(a, cupsArrayGetIndex(a) - 1)".
+ *
+ * The previous element is undefined until you call @link cupsArrayFind@,
+ * @link cupsArrayFirst@, or @link cupsArrayIndex@, or @link cupsArrayLast@
+ * to set the current element.
+ *
  * @since CUPS 1.2@
  */
 
@@ -658,6 +696,12 @@ cupsArrayPrev(cups_array_t *a)             /* I - Array */
 /*
  * 'cupsArrayRemove()' - Remove an element from the array.
  *
+ * If more than one element matches "e", only the first matching element is
+ * removed.
+ *
+ * The caller is responsible for freeing the memory used by the
+ * removed element.
+ *
  * @since CUPS 1.2@
  */
 
@@ -718,7 +762,7 @@ cupsArrayRemove(cups_array_t *a,    /* I - Array */
 
 
 /*
- * 'cupsArrayRestore()' - Reset the current element to the last cupsArraySave.
+ * 'cupsArrayRestore()' - Reset the current element to the last @link cupsArraySave@.
  *
  * @since CUPS 1.2@
  */
@@ -743,7 +787,11 @@ cupsArrayRestore(cups_array_t *a)  /* I - Array */
 
 
 /*
- * 'cupsArraySave()' - Mark the current element for a later cupsArrayRestore.
+ * 'cupsArraySave()' - Mark the current element for a later @link cupsArrayRestore@.
+ *
+ * The current element is undefined until you call @link cupsArrayFind@,
+ * @link cupsArrayFirst@, or @link cupsArrayIndex@, or @link cupsArrayLast@
+ * to set the current element.
  *
  * The save/restore stack is guaranteed to be at least 32 elements deep.
  *
index 9b702172f34c1caebae45f61892d2352a9931848..4eb1947ed8825690292e2cc5bb9ab7c736487b6f 100644 (file)
@@ -3,7 +3,7 @@
  *
  *   Backchannel functions for the Common UNIX Printing System (CUPS).
  *
- *   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
@@ -46,18 +46,17 @@ static void cups_setup(fd_set *set, struct timeval *tval,
 /*
  * 'cupsBackChannelRead()' - Read data from the backchannel.
  *
- * Reads up to "bytes" bytes from the backchannel. The "timeout"
- * parameter controls how many seconds to wait for the data - use
- * 0.0 to return immediately if there is no data, -1.0 to wait
- * for data indefinitely.
+ * Reads up to "bytes" bytes from the backchannel/backend. The "timeout"
+ * parameter controls how many seconds to wait for the data - use 0.0 to
+ * return immediately if there is no data, -1.0 to wait for data indefinitely.
  *
  * @since CUPS 1.2@
  */
 
 ssize_t                                        /* O - Bytes read or -1 on error */
-cupsBackChannelRead(char   *buffer,    /* I - Buffer to read */
+cupsBackChannelRead(char   *buffer,    /* I - Buffer to read into */
                     size_t bytes,      /* I - Bytes to read */
-                   double timeout)     /* I - Timeout in seconds */
+                   double timeout)     /* I - Timeout in seconds, typically 0.0 to poll */
 {
   fd_set       input;                  /* Input set */
   struct timeval tval;                 /* Timeout value */
@@ -97,7 +96,7 @@ cupsBackChannelRead(char   *buffer,   /* I - Buffer to read */
 /*
  * 'cupsBackChannelWrite()' - Write data to the backchannel.
  *
- * Writes "bytes" bytes to the backchannel. The "timeout" parameter
+ * Writes "bytes" bytes to the backchannel/filter. The "timeout" parameter
  * controls how many seconds to wait for the data to be written - use
  * 0.0 to return immediately if the data cannot be written, -1.0 to wait
  * indefinitely.
@@ -109,7 +108,7 @@ ssize_t                                     /* O - Bytes written or -1 on error */
 cupsBackChannelWrite(
     const char *buffer,                        /* I - Buffer to write */
     size_t     bytes,                  /* I - Bytes to write */
-    double     timeout)                        /* I - Timeout in seconds */
+    double     timeout)                        /* I - Timeout in seconds, typically 1.0 */
 {
   fd_set       output;                 /* Output set */
   struct timeval tval;                 /* Timeout value */
index 4321a459e7dbbd039be5bf82a3e5e266153cae67..6ef70f6474595078b51fd24d22b00c95a5514045 100644 (file)
@@ -64,6 +64,7 @@ extern "C" {
 #  define CUPS_VERSION_MINOR   4
 #  define CUPS_VERSION_PATCH   -1
 
+#  define CUPS_BC_FD           3       /* Back-channel file descriptor for select/poll */
 #  define CUPS_DATE_ANY                (time_t)-1
 #  define CUPS_EXCLUDE_NONE    (const char *)0
 #  define CUPS_FORMAT_AUTO     "application/octet-stream"
index 741dca9469015c20cfa0e638376a0184f0b06e5f..3a8692c1c0ed1b01aa570d3dc728613a6f38267e 100644 (file)
@@ -45,7 +45,7 @@ extern "C" {
  * Enumerations...
  */
 
-enum cups_sc_bidi_e                    /**** Bidirectional capabilities ****/
+enum cups_sc_bidi_e                    /**** Bidirectional capability values ****/
 {
   CUPS_SC_BIDI_NOT_SUPPORTED = 0,      /* Bidirectional I/O is not supported */
   CUPS_SC_BIDI_SUPPORTED = 1           /* Bidirectional I/O is supported */
@@ -68,8 +68,8 @@ typedef enum cups_sc_command_e cups_sc_command_t;
 
 enum cups_sc_state_e                   /**** Printer state bits ****/
 {
-  CUPS_SC_STATE_OFFLINE = 0,           /* Device is off-line */
-  CUPS_SC_STATE_ONLINE = 1,            /* Device is on-line */
+  CUPS_SC_STATE_OFFLINE = 0,           /* Device is offline */
+  CUPS_SC_STATE_ONLINE = 1,            /* Device is online */
   CUPS_SC_STATE_BUSY = 2,              /* Device is busy */
   CUPS_SC_STATE_ERROR = 4,             /* Other error condition */
   CUPS_SC_STATE_MEDIA_LOW = 16,                /* Paper low condition */
index e29419d39f0372a40d17fbeae6d97631227239c8..f08a706a7f8a126cdfd7f72b4d0c36b0033ae7c8 100644 (file)
@@ -312,8 +312,8 @@ div.contents ul.subcontents li {
 <li><a href="#cupsArrayNext" title="Get the next element in the array.">cupsArrayNext</a></li>
 <li><a href="#cupsArrayPrev" title="Get the previous element in the array.">cupsArrayPrev</a></li>
 <li><a href="#cupsArrayRemove" title="Remove an element from the array.">cupsArrayRemove</a></li>
-<li><a href="#cupsArrayRestore" title="Reset the current element to the last cupsArraySave.">cupsArrayRestore</a></li>
-<li><a href="#cupsArraySave" title="Mark the current element for a later cupsArrayRestore.">cupsArraySave</a></li>
+<li><a href="#cupsArrayRestore" title="Reset the current element to the last <a href="#cupsArraySave"><code>cupsArraySave</code></a>.">cupsArrayRestore</a></li>
+<li><a href="#cupsArraySave" title="Mark the current element for a later <a href="#cupsArrayRestore"><code>cupsArrayRestore</code></a>.">cupsArraySave</a></li>
 <li><a href="#cupsArrayUserData" title="Return the user data for an array.">cupsArrayUserData</a></li>
 </ul>
 <li><a href="#TYPES">Data Types</a><ul class="code">
@@ -397,7 +397,7 @@ void *user_data;
 </pre>
 
 <p>The hash function (type
-<a href="#cups_ahash_func_t"><code>cups_ahash_func_t</code></a>) returns a
+<a href="#cups_ahash_func_t"><code>cups_ahash_func_t</code></a>) should return a
 number from 0 to (hash_size-1) that (hopefully) uniquely identifies the
 element and is called whenever you look up an element in the array with
 <a href='#cupsArrayFind'><code>cupsArrayFind</code></a>. The hash size is
@@ -410,7 +410,7 @@ only limited by available memory, but generally should not be larger than
 The first function adds an element to the array, adding the new element
 after any elements that have the same order, while the second inserts the
 element before others with the same order. For unsorted arrays,
-<a href='#cupsArrayAdd'><code>cupsArrayAdd</code></a> appends the elemnt to
+<a href='#cupsArrayAdd'><code>cupsArrayAdd</code></a> appends the element to
 the end of the array while
 <a href='#cupsArrayInsert'><code>cupsArrayInsert</code></a> inserts the
 element at the beginning of the array. For example, the following code
@@ -463,11 +463,11 @@ future lookups will start where the last one left off:</p>
 
 <dl>
        <dt><a href='#cupsArrayFind'><code>cupsArrayFind</code></a></dt>
-       <dd>Returns the first matching element .</dd>
+       <dd>Returns the first matching element.</dd>
        <dt><a href='#cupsArrayFirst'><code>cupsArrayFirst</code></a></dt>
        <dd>Returns the first element in the array.</dd>
        <dt><a href='#cupsArrayIndex'><code>cupsArrayIndex</code></a></dt>
-       <dd>Returns the Nth element in the array.</dd>
+       <dd>Returns the Nth element in the array, starting at 0.</dd>
        <dt><a href='#cupsArrayLast'><code>cupsArrayLast</code></a></dt>
        <dd>Returns the last element in the array.</dd>
        <dt><a href='#cupsArrayNext'><code>cupsArrayNext</code></a></dt>
@@ -518,8 +518,8 @@ int cupsArrayAdd (<br>
 <p class="description">1 on success, 0 on failure</p>
 <h4 class="discussion">Discussion</h4>
 <p class="discussion">When adding an element to a sorted array, non-unique elements are
-appended at the end of the run.  For unsorted arrays, the element
-is inserted at the end of the array.
+appended at the end of the run of identical elements.  For unsorted arrays,
+the element is appended to the end of the array.
 
 </p>
 <h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsArrayClear">cupsArrayClear</a></h3>
@@ -533,6 +533,12 @@ void cupsArrayClear (<br>
 <dt>a</dt>
 <dd class="description">Array</dd>
 </dl>
+<h4 class="discussion">Discussion</h4>
+<p class="discussion">This function is equivalent to removing all elements in the array.
+The caller is responsible for freeing the memory used by the
+elements themselves.
+
+</p>
 <h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsArrayCount">cupsArrayCount</a></h3>
 <p class="description">Get the number of elements in the array.</p>
 <p class="code">
@@ -559,6 +565,11 @@ void *cupsArrayCurrent (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Element</p>
+<h4 class="discussion">Discussion</h4>
+<p class="discussion">The current element is undefined until you call <a href="#cupsArrayFind"><code>cupsArrayFind</code></a>,
+<a href="#cupsArrayFirst"><code>cupsArrayFirst</code></a>, or <a href="#cupsArrayIndex"><code>cupsArrayIndex</code></a>, or <a href="#cupsArrayLast"><code>cupsArrayLast</code></a>.
+
+</p>
 <h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsArrayDelete">cupsArrayDelete</a></h3>
 <p class="description">Free all memory used by the array.</p>
 <p class="code">
@@ -570,6 +581,11 @@ void cupsArrayDelete (<br>
 <dt>a</dt>
 <dd class="description">Array</dd>
 </dl>
+<h4 class="discussion">Discussion</h4>
+<p class="discussion">The caller is responsible for freeing the memory used by the
+elements themselves.
+
+</p>
 <h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsArrayDup">cupsArrayDup</a></h3>
 <p class="description">Duplicate the array.</p>
 <p class="code">
@@ -611,7 +627,7 @@ void *cupsArrayFirst (<br>
 <dd class="description">Array</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
-<p class="description">First element or <code>NULL</code></p>
+<p class="description">First element or <code>NULL</code> if the array is empty</p>
 <h3 class="function"><span class="info">&nbsp;CUPS 1.3&nbsp;</span><a name="cupsArrayGetIndex">cupsArrayGetIndex</a></h3>
 <p class="description">Get the index of the current element.</p>
 <p class="code">
@@ -624,7 +640,12 @@ int cupsArrayGetIndex (<br>
 <dd class="description">Array</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
-<p class="description">Index of the current element</p>
+<p class="description">Index of the current element, starting at 0</p>
+<h4 class="discussion">Discussion</h4>
+<p class="discussion">The current element is undefined until you call <a href="#cupsArrayFind"><code>cupsArrayFind</code></a>,
+<a href="#cupsArrayFirst"><code>cupsArrayFirst</code></a>, or <a href="#cupsArrayIndex"><code>cupsArrayIndex</code></a>, or <a href="#cupsArrayLast"><code>cupsArrayLast</code></a>.
+
+</p>
 <h3 class="function"><span class="info">&nbsp;CUPS 1.3&nbsp;</span><a name="cupsArrayGetInsert">cupsArrayGetInsert</a></h3>
 <p class="description">Get the index of the last inserted element.</p>
 <p class="code">
@@ -637,7 +658,7 @@ int cupsArrayGetInsert (<br>
 <dd class="description">Array</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
-<p class="description">Index of the last inserted element</p>
+<p class="description">Index of the last inserted element, starting at 0</p>
 <h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsArrayIndex">cupsArrayIndex</a></h3>
 <p class="description">Get the N-th element in the array.</p>
 <p class="code">
@@ -672,8 +693,8 @@ int cupsArrayInsert (<br>
 <p class="description">0 on failure, 1 on success</p>
 <h4 class="discussion">Discussion</h4>
 <p class="discussion">When inserting an element in a sorted array, non-unique elements are
-inserted at the beginning of the run.  For unsorted arrays, the element
-is inserted at the beginning of the array.
+inserted at the beginning of the run of identical elements.  For unsorted
+arrays, the element is inserted at the beginning of the array.
 
 </p>
 <h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsArrayLast">cupsArrayLast</a></h3>
@@ -688,7 +709,7 @@ void *cupsArrayLast (<br>
 <dd class="description">Array</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
-<p class="description">Last element or <code>NULL</code></p>
+<p class="description">Last element or <code>NULL</code> if the array is empty</p>
 <h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsArrayNew">cupsArrayNew</a></h3>
 <p class="description">Create a new array.</p>
 <p class="code">
@@ -699,12 +720,19 @@ void *cupsArrayLast (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>f</dt>
-<dd class="description">Comparison function</dd>
+<dd class="description">Comparison function or <code>NULL</code> for an unsorted array</dd>
 <dt>d</dt>
-<dd class="description">User data</dd>
+<dd class="description">User data pointer or <code>NULL</code></dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Array</p>
+<h4 class="discussion">Discussion</h4>
+<p class="discussion">The comparison function (&quot;f&quot;) is used to create a sorted array. The function
+receives pointers to two elements and the user data pointer (&quot;d&quot;) - the user
+data pointer argument can safely be omitted when not required so functions
+like <code>strcmp</code> can be used for sorted string arrays.
+
+</p>
 <h3 class="function"><span class="info">&nbsp;CUPS 1.3&nbsp;</span><a name="cupsArrayNew2">cupsArrayNew2</a></h3>
 <p class="description">Create a new array with hash.</p>
 <p class="code">
@@ -717,16 +745,26 @@ void *cupsArrayLast (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>f</dt>
-<dd class="description">Comparison function</dd>
+<dd class="description">Comparison function or <code>NULL</code> for an unsorted array</dd>
 <dt>d</dt>
-<dd class="description">User data</dd>
+<dd class="description">User data or <code>NULL</code></dd>
 <dt>h</dt>
-<dd class="description">Hash function</dd>
+<dd class="description">Hash function or <code>NULL</code> for unhashed lookups</dd>
 <dt>hsize</dt>
-<dd class="description">Hash size</dd>
+<dd class="description">Hash size (&gt;= 0)</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Array</p>
+<h4 class="discussion">Discussion</h4>
+<p class="discussion">The comparison function (&quot;f&quot;) is used to create a sorted array. The function
+receives pointers to two elements and the user data pointer (&quot;d&quot;) - the user
+data pointer argument can safely be omitted when not required so functions
+like <code>strcmp</code> can be used for sorted string arrays.<br>
+<br>
+The hash function (&quot;h&quot;) is used to implement cached lookups with the
+specified hash size (&quot;hsize&quot;).
+
+</p>
 <h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsArrayNext">cupsArrayNext</a></h3>
 <p class="description">Get the next element in the array.</p>
 <p class="code">
@@ -740,6 +778,14 @@ void *cupsArrayNext (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Next element or <code>NULL</code></p>
+<h4 class="discussion">Discussion</h4>
+<p class="discussion">This function is equivalent to &quot;cupsArrayIndex(a, cupsArrayGetIndex(a) + 1)&quot;.<br>
+<br>
+The next element is undefined until you call <a href="#cupsArrayFind"><code>cupsArrayFind</code></a>,
+<a href="#cupsArrayFirst"><code>cupsArrayFirst</code></a>, or <a href="#cupsArrayIndex"><code>cupsArrayIndex</code></a>, or <a href="#cupsArrayLast"><code>cupsArrayLast</code></a>
+to set the current element.
+
+</p>
 <h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsArrayPrev">cupsArrayPrev</a></h3>
 <p class="description">Get the previous element in the array.</p>
 <p class="code">
@@ -753,6 +799,14 @@ void *cupsArrayPrev (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Previous element or <code>NULL</code></p>
+<h4 class="discussion">Discussion</h4>
+<p class="discussion">This function is equivalent to &quot;cupsArrayIndex(a, cupsArrayGetIndex(a) - 1)&quot;.<br>
+<br>
+The previous element is undefined until you call <a href="#cupsArrayFind"><code>cupsArrayFind</code></a>,
+<a href="#cupsArrayFirst"><code>cupsArrayFirst</code></a>, or <a href="#cupsArrayIndex"><code>cupsArrayIndex</code></a>, or <a href="#cupsArrayLast"><code>cupsArrayLast</code></a>
+to set the current element.
+
+</p>
 <h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsArrayRemove">cupsArrayRemove</a></h3>
 <p class="description">Remove an element from the array.</p>
 <p class="code">
@@ -769,8 +823,16 @@ int cupsArrayRemove (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">1 on success, 0 on failure</p>
+<h4 class="discussion">Discussion</h4>
+<p class="discussion">If more than one element matches &quot;e&quot;, only the first matching element is
+removed.<br>
+<br>
+The caller is responsible for freeing the memory used by the
+removed element.
+
+</p>
 <h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsArrayRestore">cupsArrayRestore</a></h3>
-<p class="description">Reset the current element to the last cupsArraySave.</p>
+<p class="description">Reset the current element to the last <a href="#cupsArraySave"><code>cupsArraySave</code></a>.</p>
 <p class="code">
 void *cupsArrayRestore (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_array_t">cups_array_t</a> *a<br>
@@ -783,7 +845,7 @@ void *cupsArrayRestore (<br>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">New current element</p>
 <h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsArraySave">cupsArraySave</a></h3>
-<p class="description">Mark the current element for a later cupsArrayRestore.</p>
+<p class="description">Mark the current element for a later <a href="#cupsArrayRestore"><code>cupsArrayRestore</code></a>.</p>
 <p class="code">
 int cupsArraySave (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_array_t">cups_array_t</a> *a<br>
@@ -796,7 +858,11 @@ int cupsArraySave (<br>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">1 on success, 0 on failure</p>
 <h4 class="discussion">Discussion</h4>
-<p class="discussion">The save/restore stack is guaranteed to be at least 32 elements deep.
+<p class="discussion">The current element is undefined until you call <a href="#cupsArrayFind"><code>cupsArrayFind</code></a>,
+<a href="#cupsArrayFirst"><code>cupsArrayFirst</code></a>, or <a href="#cupsArrayIndex"><code>cupsArrayIndex</code></a>, or <a href="#cupsArrayLast"><code>cupsArrayLast</code></a>
+to set the current element.<br>
+<br>
+The save/restore stack is guaranteed to be at least 32 elements deep.
 
 </p>
 <h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsArrayUserData">cupsArrayUserData</a></h3>
index 279d180140712e8d00f7f63371f33522cd430edb..b645ec353c7c89d4a676bd0a3453f24bc2027df2 100644 (file)
@@ -253,7 +253,7 @@ div.contents ul.subcontents li {
 <body>
 <div class='body'>
 <!--
-  "$Id: api-filter.header 7285 2008-02-01 23:57:39Z mike $"
+  "$Id: api-filter.header 7615 2008-05-25 07:17:07Z mike $"
 
   Filter and backend programming header for the Common UNIX Printing System
   (CUPS).
@@ -274,8 +274,7 @@ div.contents ul.subcontents li {
 <tr>
        <th>Headers</th>
        <th>cups/backend.h<br>
-       cups/sidechannel.h<br>
-       cups/snmp.h</th>
+       cups/sidechannel.h</th>
 </tr>
 </thead>
 <tbody>
@@ -288,7 +287,8 @@ div.contents ul.subcontents li {
        <td>Programming: <a href='api-overview.html' target='_top'>Introduction to CUPS Programming</a><br>
        Programming: <a href='api-cups.html' target='_top'>CUPS API</a><br>
        Programming: <a href='api-ppd.html' target='_top'>PPD API</a><br>
-       Programming: <a href='api-raster.html' target='_top'>Raster API</a></td>
+       Programming: <a href='api-raster.html' target='_top'>Raster API</a><br>
+       Specifications: <a href='spec-design' target='_top'>CUPS Design Description</a></td>
 </tr>
 </tbody>
 </table></div>
@@ -326,14 +326,14 @@ div.contents ul.subcontents li {
 </ul></li>
 <li><a href="#ENUMERATIONS">Constants</a><ul class="code">
        <li><a href="#cups_backend_e" title="Backend exit codes">cups_backend_e</a></li>
-       <li><a href="#cups_sc_bidi_e" title="Bidirectional capabilities">cups_sc_bidi_e</a></li>
+       <li><a href="#cups_sc_bidi_e" title="Bidirectional capability values">cups_sc_bidi_e</a></li>
        <li><a href="#cups_sc_command_e" title="Request command codes">cups_sc_command_e</a></li>
        <li><a href="#cups_sc_state_e" title="Printer state bits">cups_sc_state_e</a></li>
        <li><a href="#cups_sc_status_e" title="Response status codes">cups_sc_status_e</a></li>
 </ul></li>
 </ul>
 <!--
-  "$Id: api-filter.shtml 7502 2008-04-28 21:30:12Z mike $"
+  "$Id: api-filter.shtml 7594 2008-05-19 23:16:03Z mike $"
 
   Filter and backend programming introduction for the Common UNIX Printing
   System (CUPS).
@@ -350,9 +350,11 @@ div.contents ul.subcontents li {
 
 <h2 class='title'><a name="OVERVIEW">Overview</a></h2>
 
-<p>Filters, printer drivers, port monitors, and backends use a common interface
-for processing print jobs and communicating status information to the scheduler.
-Each filter is run with a standard set of command-line arguments:<p>
+<p>Filters (which include printer drivers and port monitors) and backends
+are used to convert job files to a printable format and send that data to the
+printer itself. All of these programs use a common interface for processing
+print jobs and communicating status information to the scheduler. Each is run
+with a standard set of command-line arguments:<p>
 
 <dl class="code">
 
@@ -372,7 +374,7 @@ Each filter is run with a standard set of command-line arguments:<p>
        <dd>The options that were provided when the job was submitted</dd>
 
        <dt>argv[6]</dt>
-       <dd>The file to print (first filter only)</dd>
+       <dd>The file to print (first program only)</dd>
 </dl>
 
 <p>The scheduler runs one or more of these programs to print any given job. The
@@ -435,7 +437,8 @@ or 1 when they encounter an error. Backends can return any of the
 
 <h3><a name="ENVIRONMENT">Environment Variables</a></h3>
 
-<p>The following environment variables are defined by the printing system:</p>
+<p>The following environment variables are defined by the printing system
+when running print filters and backends:</p>
 
 <dl class="code">
 
@@ -456,10 +459,11 @@ or 1 when they encounter an error. Backends can return any of the
        application/postscript).</dd>
 
        <dt>CUPS_CACHEDIR</dt>
-       <dd>The directory where cache files can be stored.</dd>
+       <dd>The directory where cache files can be stored. Cache files can be
+       used to retain information between jobs or files in a job.</dd>
 
        <dt>CUPS_DATADIR</dt>
-       <dd>The directory where data files can be found.</dd>
+       <dd>The directory where (read-only) CUPS data files can be found.</dd>
 
        <dt>CUPS_SERVERROOT</dt>
        <dd>The root directory of the server.</dd>
@@ -479,19 +483,23 @@ or 1 when they encounter an error. Backends can return any of the
        file for this printer.</dd>
 
        <dt>PRINTER</dt>
-       <dd>The name of the printer.</dd>
+       <dd>The queue name of the class or printer.</dd>
 
        <dt>RIP_CACHE</dt>
        <dd>The recommended amount of memory to use for Raster Image
        Processors (RIPs).</dd>
 
+       <dt>TMPDIR</dt>
+       <dd>The directory where temporary files should be created.</dd>
+
 </dl>
 
 <h3><a name="MESSAGES">Communicating with the Scheduler</a></h3>
 
-<p>Filters and backends communicate wih the scheduler by writing messages
-to the standard error file. For example, the following code sets the current
-printer state message to "Printing page 5":</p>
+<p>Filters and backends communicate with the scheduler by writing messages
+to the standard error file. The scheduler reads messages from all filters in
+a job and processes the message based on its prefix. For example, the following
+code sets the current printer state message to "Printing page 5":</p>
 
 <pre class="example">
 int page = 5;
@@ -513,7 +521,8 @@ prefix strings:</p>
        to set the <code>marker-colors</code>, <code>marker-levels</code>,
        <code>marker-names</code>, <code>marker-types</code>,
        <code>printer-alert</code>, and <code>printer-alert-description</code>
-       printer attributes.</dd>
+       printer attributes. Standard <code>marker-types</code> values are
+       listed in <a href='#TABLE1'>Table 1</a>.</dd>
 
        <dt>CRIT: message</dt>
        <dd>Sets the printer-state-message attribute and adds the specified
@@ -535,7 +544,8 @@ prefix strings:</p>
 
        <dt>ERROR: message</dt>
        <dd>Sets the printer-state-message attribute and adds the specified
-       message to the current error log file using the "error" log level.</dd>
+       message to the current error log file using the "error" log level.
+       Use "ERROR:" messages for non-persistent processing errors.</dd>
 
        <dt>INFO: message</dt>
        <dd>Sets the printer-state-message attribute. If the current log level
@@ -561,8 +571,10 @@ prefix strings:</p>
        <dt>STATE: + printer-state-reason [printer-state-reason ...]</dt>
        <dt>STATE: - printer-state-reason [printer-state-reason ...]</dt>
        <dd>Sets, adds, or removes printer-state-reason keywords to the
-       current queue. Typically this is used to indicate media, ink, and
-       toner conditions on a printer.</dd>
+       current queue. Typically this is used to indicate persistent media,
+       ink, toner, and configuration conditions or errors on a printer.
+       <a href='#TABLE2'>Table 2</a> lists the standard state keywords -
+       use vendor-prefixed ("com.acme.foo") keywords for custom states.</dd>
 
        <dt>WARNING: message</dt>
        <dd>Sets the printer-state-message attribute and adds the specified
@@ -574,6 +586,141 @@ prefix strings:</p>
 <p>Messages without one of these prefixes are treated as if they began with
 the "DEBUG:" prefix string.</p>
 
+
+<div class='table'><table width='80%' summary='Table 1: Standard marker-types Values'>
+<caption>Table 1: <a name='TABLE1'>Standard marker-types Values</a></caption>
+<thead>
+<tr>
+       <th>marker-type</th>
+       <th>Description</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+       <td>developer</td>
+       <td>Developer unit</td>
+</tr>
+<tr>
+       <td>fuser</td>
+       <td>Fuser unit</td>
+</tr>
+<tr>
+       <td>fuserCleaningPad</td>
+       <td>Fuser cleaning pad</td>
+</tr>
+<tr>
+       <td>fuserOil</td>
+       <td>Fuser oil</td>
+</tr>
+<tr>
+       <td>ink</td>
+       <td>Ink supply</td>
+</tr>
+<tr>
+       <td>opc</td>
+       <td>Photo conductor</td>
+</tr>
+<tr>
+       <td>solidWax</td>
+       <td>Wax supply</td>
+</tr>
+<tr>
+       <td>staples</td>
+       <td>Staple supply</td>
+</tr>
+<tr>
+       <td>toner</td>
+       <td>Toner supply</td>
+</tr>
+<tr>
+       <td>transferUnit</td>
+       <td>Transfer unit</td>
+</tr>
+<tr>
+       <td>wasteInk</td>
+       <td>Waste ink tank</td>
+</tr>
+<tr>
+       <td>wasteToner</td>
+       <td>Waste toner tank</td>
+</tr>
+<tr>
+       <td>wasteWax</td>
+       <td>Waste wax tank</td>
+</tr>
+</tbody>
+</table></div>
+
+<br>
+
+<div class='table'><table width='80%' summary='Table 2: Standard State Keywords'>
+<caption>Table 2: <a name='TABLE2'>Standard State Keywords</a></caption>
+<thead>
+<tr>
+       <th>Keyword</th>
+       <th>Description</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+       <td>connecting-to-device</td>
+       <td>Connecting to printer but not printing yet</td>
+</tr>
+<tr>
+       <td>cover-open</td>
+       <td>A cover is open on the printer</td>
+</tr>
+<tr>
+       <td>input-tray-missing</td>
+       <td>An input tray is missing from the printer</td>
+</tr>
+<tr>
+       <td>marker-supply-empty</td>
+       <td>Out of ink</td>
+</tr>
+<tr>
+       <td>marker-supply-low</td>
+       <td>Low on ink</td>
+</tr>
+<tr>
+       <td>marker-waste-almost-full</td>
+       <td>Waste tank almost full</td>
+</tr>
+<tr>
+       <td>marker-waste-full</td>
+       <td>Waste tank full</td>
+</tr>
+<tr>
+       <td>media-empty</td>
+       <td>Out of media</td>
+</tr>
+<tr>
+       <td>media-jam</td>
+       <td>Media is jammed in the printer</td>
+</tr>
+<tr>
+       <td>media-low</td>
+       <td>Low on media</td>
+</tr>
+<tr>
+       <td>paused</td>
+       <td>Stop the printer</td>
+</tr>
+<tr>
+       <td>timed-out</td>
+       <td>Unable to connect to printer</td>
+</tr>
+<tr>
+       <td>toner-empty</td>
+       <td>Out of toner</td>
+</tr>
+<tr>
+       <td>toner-low</td>
+       <td>Low on toner</td>
+</tr>
+</tbody>
+</table></div>
+
 <h3><a name="COMMUNICATING_BACKEND">Communicating with the Backend</a></h3>
 
 <p>Filters can communicate with the backend via the
@@ -595,7 +742,11 @@ ssize_t bytes;
 bytes = cupsBackChannelRead(buffer, sizeof(buffer), 0.0);
 </pre>
 
-The
+<p>Filters can also use <code>select()</code> or <code>poll()</code> on the
+back-channel file descriptor (3 or <code>CUPS_BC_FD</code>) to read data only
+when it is available.</p>
+
+<p>The
 <a href="#cupsSideChannelDoRequest"><code>cupsSideChannelDoRequest</code></a>
 function allows you to get out-of-band status information and do synchronization
 with the device. For example, the following code gets the current IEEE-1284
@@ -608,7 +759,8 @@ char data[2049];
 int datalen;
 <a href="#cups_sc_status_t">cups_sc_status_t</a> status;
 
-/* Tell cupsSideChannelDoRequest() how big our buffer is, less 1 byte for nul-termination... */
+/* Tell cupsSideChannelDoRequest() how big our buffer is, less 1 byte for
+   nul-termination... */
 datalen = sizeof(data) - 1;
 
 /* Get the IEEE-1284 device ID, waiting for up to 1 second */
@@ -635,6 +787,9 @@ recommend writing back-channel data using a timeout of 1.0 seconds:</p>
 char buffer[8192];
 ssize_t bytes;
 
+/* Obtain data from printer/device */
+...
+
 /* Use a timeout of 1.0 seconds to give filters a chance to read */
 cupsBackChannelWrite(buffer, bytes, 1.0);
 </pre>
@@ -742,19 +897,18 @@ ssize_t cupsBackChannelRead (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>buffer</dt>
-<dd class="description">Buffer to read</dd>
+<dd class="description">Buffer to read into</dd>
 <dt>bytes</dt>
 <dd class="description">Bytes to read</dd>
 <dt>timeout</dt>
-<dd class="description">Timeout in seconds</dd>
+<dd class="description">Timeout in seconds, typically 0.0 to poll</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Bytes read or -1 on error</p>
 <h4 class="discussion">Discussion</h4>
-<p class="discussion">Reads up to &quot;bytes&quot; bytes from the backchannel. The &quot;timeout&quot;
-parameter controls how many seconds to wait for the data - use
-0.0 to return immediately if there is no data, -1.0 to wait
-for data indefinitely.
+<p class="discussion">Reads up to &quot;bytes&quot; bytes from the backchannel/backend. The &quot;timeout&quot;
+parameter controls how many seconds to wait for the data - use 0.0 to
+return immediately if there is no data, -1.0 to wait for data indefinitely.
 
 </p>
 <h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsBackChannelWrite">cupsBackChannelWrite</a></h3>
@@ -772,12 +926,12 @@ ssize_t cupsBackChannelWrite (<br>
 <dt>bytes</dt>
 <dd class="description">Bytes to write</dd>
 <dt>timeout</dt>
-<dd class="description">Timeout in seconds</dd>
+<dd class="description">Timeout in seconds, typically 1.0</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Bytes written or -1 on error</p>
 <h4 class="discussion">Discussion</h4>
-<p class="discussion">Writes &quot;bytes&quot; bytes to the backchannel. The &quot;timeout&quot; parameter
+<p class="discussion">Writes &quot;bytes&quot; bytes to the backchannel/filter. The &quot;timeout&quot; parameter
 controls how many seconds to wait for the data to be written - use
 0.0 to return immediately if the data cannot be written, -1.0 to wait
 indefinitely.
@@ -1038,7 +1192,7 @@ typedef void (*cups_sc_walk_func_t)(const char *oid, const char *data, int datal
 <dd class="description">Job failed, stop queue</dd>
 </dl>
 <h3 class="enumeration"><a name="cups_sc_bidi_e">cups_sc_bidi_e</a></h3>
-<p class="description">Bidirectional capabilities</p>
+<p class="description">Bidirectional capability values</p>
 <h4 class="constants">Constants</h4>
 <dl>
 <dt>CUPS_SC_BIDI_NOT_SUPPORTED </dt>
@@ -1082,9 +1236,9 @@ typedef void (*cups_sc_walk_func_t)(const char *oid, const char *data, int datal
 <dt>CUPS_SC_STATE_MEDIA_LOW </dt>
 <dd class="description">Paper low condition</dd>
 <dt>CUPS_SC_STATE_OFFLINE </dt>
-<dd class="description">Device is off-line</dd>
+<dd class="description">Device is offline</dd>
 <dt>CUPS_SC_STATE_ONLINE </dt>
-<dd class="description">Device is on-line</dd>
+<dd class="description">Device is online</dd>
 </dl>
 <h3 class="enumeration"><a name="cups_sc_status_e">cups_sc_status_e</a></h3>
 <p class="description">Response status codes</p>
index 0455237028e12ec183596387cda8ed471936e68f..f2e4fa21161895589ba608217ebafdfb1faba77b 100644 (file)
@@ -436,12 +436,30 @@ with a hostname. ">http_addrlist_t</a></li>
        <li><a href="#http_auth_t" title="HTTP authentication types">http_auth_t</a></li>
        <li><a href="#http_encoding_t" title="HTTP transfer encoding values">http_encoding_t</a></li>
        <li><a href="#http_encryption_t" title="HTTP encryption values">http_encryption_t</a></li>
+       <li><a href="#http_field_t" title="HTTP field names">http_field_t</a></li>
+       <li><a href="#http_keepalive_t" title="Types and structures...">http_keepalive_t</a></li>
+       <li><a href="#http_status_t" title="HTTP status codes">http_status_t</a></li>
        <li><a href="#http_t" title="HTTP connection type">http_t</a></li>
+       <li><a href="#http_uri_coding_t" title="HTTP version numbers">http_uri_coding_t</a></li>
+       <li><a href="#http_uri_status_t" title="URI en/decode flags">http_uri_status_t</a></li>
+       <li><a href="#http_version_t" title="Socket address union, which
+makes using IPv6 and other
+address types easier and
+more portable. ">http_version_t</a></li>
        <li><a href="#ipp_attribute_t" title="Attribute">ipp_attribute_t</a></li>
+       <li><a href="#ipp_finish_t" title="Orientation...">ipp_finish_t</a></li>
        <li><a href="#ipp_iocb_t" title="IPP IO Callback Function ">ipp_iocb_t</a></li>
+       <li><a href="#ipp_jstate_t" title="Printer States....">ipp_jstate_t</a></li>
+       <li><a href="#ipp_op_t" title="Old names for the operations">ipp_op_t</a></li>
+       <li><a href="#ipp_orient_t" title="Qualities...">ipp_orient_t</a></li>
+       <li><a href="#ipp_pstate_t" title="IPP states...">ipp_pstate_t</a></li>
+       <li><a href="#ipp_quality_t" title="Job States....">ipp_quality_t</a></li>
        <li><a href="#ipp_request_t" title="Request Header">ipp_request_t</a></li>
+       <li><a href="#ipp_res_t" title="Types and structures...">ipp_res_t</a></li>
+       <li><a href="#ipp_state_t" title="IPP operations...">ipp_state_t</a></li>
        <li><a href="#ipp_t" title="Attribute Value">ipp_t</a></li>
        <li><a href="#ipp_uchar_t" title="IPP status codes...">ipp_uchar_t</a></li>
+       <li><a href="#ipp_tag_t" title="Format tags for attributes...">ipp_tag_t</a></li>
        <li><a href="#ipp_value_t" title="New in CUPS 1.1.19">ipp_value_t</a></li>
 </ul></li>
 <li><a href="#STRUCTURES">Structures</a><ul class="code">
@@ -941,7 +959,7 @@ void cupsEncodeOptions2 (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;int num_options,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;cups_option_t *options,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group_tag<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> group_tag<br>
 );</p>
 <h4 class="parameters">Parameters</h4>
 <dl>
@@ -995,7 +1013,7 @@ a comma-delimited list of backends to omit from the request.
 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.20&nbsp;</span><a name="cupsGetFd">cupsGetFd</a></h3>
 <p class="description">Get a file from the server.</p>
 <p class="code">
-http_status_t cupsGetFd (<br>
+<a href="#http_status_t">http_status_t</a> cupsGetFd (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const char *resource,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;int fd<br>
@@ -1018,7 +1036,7 @@ http_status_t cupsGetFd (<br>
 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.20&nbsp;</span><a name="cupsGetFile">cupsGetFile</a></h3>
 <p class="description">Get a file from the server.</p>
 <p class="code">
-http_status_t cupsGetFile (<br>
+<a href="#http_status_t">http_status_t</a> cupsGetFile (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const char *resource,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const char *filename<br>
@@ -1063,7 +1081,7 @@ additional data, use httpRead() after getting a successful response.
 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.20&nbsp;</span><a name="cupsPutFd">cupsPutFd</a></h3>
 <p class="description">Put a file on the server.</p>
 <p class="code">
-http_status_t cupsPutFd (<br>
+<a href="#http_status_t">http_status_t</a> cupsPutFd (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const char *resource,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;int fd<br>
@@ -1087,7 +1105,7 @@ successfully.
 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.20&nbsp;</span><a name="cupsPutFile">cupsPutFile</a></h3>
 <p class="description">Put a file on the server.</p>
 <p class="code">
-http_status_t cupsPutFile (<br>
+<a href="#http_status_t">http_status_t</a> cupsPutFile (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const char *resource,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const char *filename<br>
@@ -1135,7 +1153,7 @@ files for CUPS_GET_PPD and CUPS_GET_DOCUMENT requests, respectively.
 <h3 class="function"><span class="info">&nbsp;CUPS 1.4&nbsp;</span><a name="cupsSendRequest">cupsSendRequest</a></h3>
 <p class="description">Send an IPP request.</p>
 <p class="code">
-http_status_t cupsSendRequest (<br>
+<a href="#http_status_t">http_status_t</a> cupsSendRequest (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *request,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const char *resource,<br>
@@ -1167,7 +1185,7 @@ request is not freed.
 <h3 class="function"><span class="info">&nbsp;CUPS 1.4&nbsp;</span><a name="cupsWriteRequestData">cupsWriteRequestData</a></h3>
 <p class="description">Write additional data after an IPP request.</p>
 <p class="code">
-http_status_t cupsWriteRequestData (<br>
+<a href="#http_status_t">http_status_t</a> cupsWriteRequestData (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const char *buffer,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;size_t length<br>
@@ -1285,8 +1303,8 @@ char *httpAddrString (<br>
 <p class="description">Assemble a uniform resource identifier from its
 components.</p>
 <p class="code">
-http_uri_status_t httpAssembleURI (<br>
-&nbsp;&nbsp;&nbsp;&nbsp;http_uri_coding_t encoding,<br>
+<a href="#http_uri_status_t">http_uri_status_t</a> httpAssembleURI (<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_uri_coding_t">http_uri_coding_t</a> encoding,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;char *uri,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;int urilen,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const char *scheme,<br>
@@ -1327,8 +1345,8 @@ URI string.
 <p class="description">Assemble a uniform resource identifier from its
 components with a formatted resource.</p>
 <p class="code">
-http_uri_status_t httpAssembleURIf (<br>
-&nbsp;&nbsp;&nbsp;&nbsp;http_uri_coding_t encoding,<br>
+<a href="#http_uri_status_t">http_uri_status_t</a> httpAssembleURIf (<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_uri_coding_t">http_uri_coding_t</a> encoding,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;char *uri,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;int urilen,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const char *scheme,<br>
@@ -1741,7 +1759,7 @@ int httpGetFd (<br>
 <p class="code">
 const char *httpGetField (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;http_field_t field<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_field_t">http_field_t</a> field<br>
 );</p>
 <h4 class="parameters">Parameters</h4>
 <dl>
@@ -1833,7 +1851,7 @@ content larger than 2^31 - 1.
 <h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="httpGetStatus">httpGetStatus</a></h3>
 <p class="description">Get the status of the last HTTP request.</p>
 <p class="code">
-http_status_t httpGetStatus (<br>
+<a href="#http_status_t">http_status_t</a> httpGetStatus (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
 );</p>
 <h4 class="parameters">Parameters</h4>
@@ -1848,7 +1866,7 @@ http_status_t httpGetStatus (<br>
 <p class="code">
 char *httpGetSubField (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;http_field_t field,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_field_t">http_field_t</a> field,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;char *value<br>
 );</p>
@@ -1870,7 +1888,7 @@ char *httpGetSubField (<br>
 <p class="code">
 char *httpGetSubField2 (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;http_field_t field,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_field_t">http_field_t</a> field,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;char *value,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;int valuelen<br>
@@ -2175,8 +2193,8 @@ void httpSeparate2 (<br>
 <p class="description">Separate a Universal Resource Identifier into its
 components.</p>
 <p class="code">
-http_uri_status_t httpSeparateURI (<br>
-&nbsp;&nbsp;&nbsp;&nbsp;http_uri_coding_t decoding,<br>
+<a href="#http_uri_status_t">http_uri_status_t</a> httpSeparateURI (<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_uri_coding_t">http_uri_coding_t</a> decoding,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const char *uri,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;char *scheme,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;int schemelen,<br>
@@ -2258,7 +2276,7 @@ void httpSetCookie (<br>
 <p class="code">
 void httpSetExpect (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;http_status_t expect<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_status_t">http_status_t</a> expect<br>
 );</p>
 <h4 class="parameters">Parameters</h4>
 <dl>
@@ -2276,7 +2294,7 @@ void httpSetExpect (<br>
 <p class="code">
 void httpSetField (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;http_field_t field,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_field_t">http_field_t</a> field,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const char *value<br>
 );</p>
 <h4 class="parameters">Parameters</h4>
@@ -2306,7 +2324,7 @@ void httpSetLength (<br>
 <p class="description">Return a short string describing a HTTP status code.</p>
 <p class="code">
 const char *httpStatus (<br>
-&nbsp;&nbsp;&nbsp;&nbsp;http_status_t status<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_status_t">http_status_t</a> status<br>
 );</p>
 <h4 class="parameters">Parameters</h4>
 <dl>
@@ -2334,7 +2352,7 @@ int httpTrace (<br>
 <h3 class="function"><a name="httpUpdate">httpUpdate</a></h3>
 <p class="description">Update the current HTTP state for incoming data.</p>
 <p class="code">
-http_status_t httpUpdate (<br>
+<a href="#http_status_t">http_status_t</a> httpUpdate (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
 );</p>
 <h4 class="parameters">Parameters</h4>
@@ -2408,7 +2426,7 @@ ssize_t httpWrite2 (<br>
 <p class="code">
 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddBoolean (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> group,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;char value<br>
 );</p>
@@ -2430,7 +2448,7 @@ ssize_t httpWrite2 (<br>
 <p class="code">
 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddBooleans (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> group,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;int num_values,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const char *values<br>
@@ -2455,7 +2473,7 @@ ssize_t httpWrite2 (<br>
 <p class="code">
 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddCollection (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> group,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *value<br>
 );</p>
@@ -2477,7 +2495,7 @@ ssize_t httpWrite2 (<br>
 <p class="code">
 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddCollections (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> group,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;int num_values,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const <a href="#ipp_t">ipp_t</a> **values<br>
@@ -2502,7 +2520,7 @@ ssize_t httpWrite2 (<br>
 <p class="code">
 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddDate (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> group,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const <a href="#ipp_uchar_t">ipp_uchar_t</a> *value<br>
 );</p>
@@ -2524,8 +2542,8 @@ ssize_t httpWrite2 (<br>
 <p class="code">
 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddInteger (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t type,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> group,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> type,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;int value<br>
 );</p>
@@ -2549,8 +2567,8 @@ ssize_t httpWrite2 (<br>
 <p class="code">
 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddIntegers (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t type,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> group,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> type,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;int num_values,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const int *values<br>
@@ -2577,7 +2595,7 @@ ssize_t httpWrite2 (<br>
 <p class="code">
 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddOctetString (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> group,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const void *data,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;int datalen<br>
@@ -2602,7 +2620,7 @@ ssize_t httpWrite2 (<br>
 <p class="code">
 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddRange (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> group,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;int lower,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;int upper<br>
@@ -2627,7 +2645,7 @@ ssize_t httpWrite2 (<br>
 <p class="code">
 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddRanges (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> group,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;int num_values,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const int *lower,<br>
@@ -2655,9 +2673,9 @@ ssize_t httpWrite2 (<br>
 <p class="code">
 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddResolution (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> group,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;ipp_res_t units,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_res_t">ipp_res_t</a> units,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;int xres,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;int yres<br>
 );</p>
@@ -2683,10 +2701,10 @@ ssize_t httpWrite2 (<br>
 <p class="code">
 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddResolutions (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> group,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;int num_values,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;ipp_res_t units,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_res_t">ipp_res_t</a> units,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const int *xres,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const int *yres<br>
 );</p>
@@ -2727,8 +2745,8 @@ ssize_t httpWrite2 (<br>
 <p class="code">
 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddString (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t type,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> group,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> type,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const char *charset,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const char *value<br>
@@ -2755,8 +2773,8 @@ ssize_t httpWrite2 (<br>
 <p class="code">
 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddStrings (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t type,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> group,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> type,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;int num_values,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const char *charset,<br>
@@ -2852,7 +2870,7 @@ ipp_status_t ippErrorValue (<br>
 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippFindAttribute (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t type<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> type<br>
 );</p>
 <h4 class="parameters">Parameters</h4>
 <dl>
@@ -2871,7 +2889,7 @@ ipp_status_t ippErrorValue (<br>
 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippFindNextAttribute (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t type<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> type<br>
 );</p>
 <h4 class="parameters">Parameters</h4>
 <dl>
@@ -2907,7 +2925,7 @@ size_t ippLength (<br>
 <p class="description">Allocate a new IPP request message.</p>
 <p class="code">
 <a href="#ipp_t">ipp_t</a> *ippNewRequest (<br>
-&nbsp;&nbsp;&nbsp;&nbsp;ipp_op_t op<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_op_t">ipp_op_t</a> op<br>
 );</p>
 <h4 class="parameters">Parameters</h4>
 <dl>
@@ -2926,7 +2944,7 @@ attributes-natural-language value is derived from the current locale.
 <p class="description">Return a name for the given operation id.</p>
 <p class="code">
 const char *ippOpString (<br>
-&nbsp;&nbsp;&nbsp;&nbsp;ipp_op_t op<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_op_t">ipp_op_t</a> op<br>
 );</p>
 <h4 class="parameters">Parameters</h4>
 <dl>
@@ -2938,7 +2956,7 @@ const char *ippOpString (<br>
 <h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ippOpValue">ippOpValue</a></h3>
 <p class="description">Return an operation id for the given name.</p>
 <p class="code">
-ipp_op_t ippOpValue (<br>
+<a href="#ipp_op_t">ipp_op_t</a> ippOpValue (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const char *name<br>
 );</p>
 <h4 class="parameters">Parameters</h4>
@@ -2957,7 +2975,7 @@ int ippPort (void);</p>
 <h3 class="function"><a name="ippRead">ippRead</a></h3>
 <p class="description">Read data for an IPP message from a HTTP connection.</p>
 <p class="code">
-ipp_state_t ippRead (<br>
+<a href="#ipp_state_t">ipp_state_t</a> ippRead (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
 );</p>
@@ -2973,7 +2991,7 @@ ipp_state_t ippRead (<br>
 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.19&nbsp;</span><a name="ippReadFile">ippReadFile</a></h3>
 <p class="description">Read data for an IPP message from a file.</p>
 <p class="code">
-ipp_state_t ippReadFile (<br>
+<a href="#ipp_state_t">ipp_state_t</a> ippReadFile (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;int fd,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
 );</p>
@@ -2989,7 +3007,7 @@ ipp_state_t ippReadFile (<br>
 <h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ippReadIO">ippReadIO</a></h3>
 <p class="description">Read data for an IPP message.</p>
 <p class="code">
-ipp_state_t ippReadIO (<br>
+<a href="#ipp_state_t">ipp_state_t</a> ippReadIO (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;void *src,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_iocb_t">ipp_iocb_t</a> cb,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;int blocking,<br>
@@ -3038,7 +3056,7 @@ const <a href="#ipp_uchar_t">ipp_uchar_t</a> *ippTimeToDate (<br>
 <h3 class="function"><a name="ippWrite">ippWrite</a></h3>
 <p class="description">Write data for an IPP message to a HTTP connection.</p>
 <p class="code">
-ipp_state_t ippWrite (<br>
+<a href="#ipp_state_t">ipp_state_t</a> ippWrite (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
 );</p>
@@ -3054,7 +3072,7 @@ ipp_state_t ippWrite (<br>
 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.19&nbsp;</span><a name="ippWriteFile">ippWriteFile</a></h3>
 <p class="description">Write data for an IPP message to a file.</p>
 <p class="code">
-ipp_state_t ippWriteFile (<br>
+<a href="#ipp_state_t">ipp_state_t</a> ippWriteFile (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;int fd,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
 );</p>
@@ -3070,7 +3088,7 @@ ipp_state_t ippWriteFile (<br>
 <h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ippWriteIO">ippWriteIO</a></h3>
 <p class="description">Write data for an IPP message.</p>
 <p class="code">
-ipp_state_t ippWriteIO (<br>
+<a href="#ipp_state_t">ipp_state_t</a> ippWriteIO (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;void *dst,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_iocb_t">ipp_iocb_t</a> cb,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;int blocking,<br>
@@ -3116,26 +3134,99 @@ typedef enum <a href="#http_encoding_e">http_encoding_e</a> http_encoding_t;
 <p class="code">
 typedef enum <a href="#http_encryption_e">http_encryption_e</a> http_encryption_t;
 </p>
+<h3 class="typedef"><a name="http_field_t">http_field_t</a></h3>
+<p class="description">HTTP field names</p>
+<p class="code">
+typedef enum <a href="#http_field_e">http_field_e</a> http_field_t;
+</p>
+<h3 class="typedef"><a name="http_keepalive_t">http_keepalive_t</a></h3>
+<p class="description">Types and structures...</p>
+<p class="code">
+typedef enum <a href="#http_keepalive_e">http_keepalive_e</a> http_keepalive_t;
+</p>
+<h3 class="typedef"><a name="http_status_t">http_status_t</a></h3>
+<p class="description">HTTP status codes</p>
+<p class="code">
+typedef enum <a href="#http_status_e">http_status_e</a> http_status_t;
+</p>
 <h3 class="typedef"><a name="http_t">http_t</a></h3>
 <p class="description">HTTP connection type</p>
 <p class="code">
 typedef struct _http_s http_t;
 </p>
+<h3 class="typedef"><a name="http_uri_coding_t">http_uri_coding_t</a></h3>
+<p class="description">HTTP version numbers</p>
+<p class="code">
+typedef enum <a href="#http_uri_coding_e">http_uri_coding_e</a> http_uri_coding_t;
+</p>
+<h3 class="typedef"><a name="http_uri_status_t">http_uri_status_t</a></h3>
+<p class="description">URI en/decode flags</p>
+<p class="code">
+typedef enum <a href="#http_uri_status_e">http_uri_status_e</a> http_uri_status_t;
+</p>
+<h3 class="typedef"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="http_version_t">http_version_t</a></h3>
+<p class="description">Socket address union, which
+makes using IPv6 and other
+address types easier and
+more portable. </p>
+<p class="code">
+typedef enum <a href="#http_version_e">http_version_e</a> http_version_t;
+</p>
 <h3 class="typedef"><a name="ipp_attribute_t">ipp_attribute_t</a></h3>
 <p class="description">Attribute</p>
 <p class="code">
 typedef struct <a href="#ipp_attribute_s">ipp_attribute_s</a> ipp_attribute_t;
 </p>
+<h3 class="typedef"><a name="ipp_finish_t">ipp_finish_t</a></h3>
+<p class="description">Orientation...</p>
+<p class="code">
+typedef enum <a href="#ipp_finish_e">ipp_finish_e</a> ipp_finish_t;
+</p>
 <h3 class="typedef"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ipp_iocb_t">ipp_iocb_t</a></h3>
 <p class="description">IPP IO Callback Function </p>
 <p class="code">
 typedef ssize_t (*ipp_iocb_t)(void *, <a href="#ipp_uchar_t">ipp_uchar_t</a> *, size_t);
 </p>
+<h3 class="typedef"><a name="ipp_jstate_t">ipp_jstate_t</a></h3>
+<p class="description">Printer States....</p>
+<p class="code">
+typedef enum <a href="#ipp_jstate_e">ipp_jstate_e</a> ipp_jstate_t;
+</p>
+<h3 class="typedef"><a name="ipp_op_t">ipp_op_t</a></h3>
+<p class="description">Old names for the operations</p>
+<p class="code">
+typedef enum <a href="#ipp_op_e">ipp_op_e</a> ipp_op_t;
+</p>
+<h3 class="typedef"><a name="ipp_orient_t">ipp_orient_t</a></h3>
+<p class="description">Qualities...</p>
+<p class="code">
+typedef enum <a href="#ipp_orient_e">ipp_orient_e</a> ipp_orient_t;
+</p>
+<h3 class="typedef"><a name="ipp_pstate_t">ipp_pstate_t</a></h3>
+<p class="description">IPP states...</p>
+<p class="code">
+typedef enum <a href="#ipp_pstate_e">ipp_pstate_e</a> ipp_pstate_t;
+</p>
+<h3 class="typedef"><a name="ipp_quality_t">ipp_quality_t</a></h3>
+<p class="description">Job States....</p>
+<p class="code">
+typedef enum <a href="#ipp_quality_e">ipp_quality_e</a> ipp_quality_t;
+</p>
 <h3 class="typedef"><a name="ipp_request_t">ipp_request_t</a></h3>
 <p class="description">Request Header</p>
 <p class="code">
 typedef union <a href="#ipp_request_u">ipp_request_u</a> ipp_request_t;
 </p>
+<h3 class="typedef"><a name="ipp_res_t">ipp_res_t</a></h3>
+<p class="description">Types and structures...</p>
+<p class="code">
+typedef enum <a href="#ipp_res_e">ipp_res_e</a> ipp_res_t;
+</p>
+<h3 class="typedef"><a name="ipp_state_t">ipp_state_t</a></h3>
+<p class="description">IPP operations...</p>
+<p class="code">
+typedef enum <a href="#ipp_state_e">ipp_state_e</a> ipp_state_t;
+</p>
 <h3 class="typedef"><a name="ipp_t">ipp_t</a></h3>
 <p class="description">Attribute Value</p>
 <p class="code">
@@ -3146,6 +3237,11 @@ typedef struct <a href="#ipp_s">ipp_s</a> ipp_t;
 <p class="code">
 typedef typedef unsigned char ipp_uchar_t;
 </p>
+<h3 class="typedef"><a name="ipp_tag_t">ipp_tag_t</a></h3>
+<p class="description">Format tags for attributes...</p>
+<p class="code">
+typedef enum <a href="#ipp_tag_e">ipp_tag_e</a> ipp_tag_t;
+</p>
 <h3 class="typedef"><a name="ipp_value_t">ipp_value_t</a></h3>
 <p class="description">New in CUPS 1.1.19</p>
 <p class="code">
@@ -3174,7 +3270,7 @@ with a hostname. </p>
 &nbsp;&nbsp;&nbsp;&nbsp;char *name;<br>
 &nbsp;&nbsp;&nbsp;&nbsp;struct <a href="#ipp_attribute_s">ipp_attribute_s</a> *next;<br>
 &nbsp;&nbsp;&nbsp;&nbsp;int num_values;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group_tag, value_tag;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> group_tag, value_tag;<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_value_t">ipp_value_t</a> values[1];<br>
 };</p>
 <h4 class="members">Members</h4>
@@ -3195,11 +3291,11 @@ with a hostname. </p>
 <p class="code">struct ipp_s {<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attrs;<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *current;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t curtag;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> curtag;<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *last;<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *prev;<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_request_t">ipp_request_t</a> request;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;ipp_state_t state;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_state_t">ipp_state_t</a> state;<br>
 };</p>
 <h4 class="members">Members</h4>
 <dl>
index c545daf03736bd1d01e3da13d05a651bff9e5053..697573e85133c6a7c07174adf9554f03a8856636 100644 (file)
@@ -284,7 +284,7 @@ div.contents ul.subcontents li {
        <th>See Also</th>
        <td>Programming: <a href='api-overview.html' target='_top'>Introduction to CUPS Programming</a><br>
        Programming: <a href='api-cups.html' target='_top'>CUPS API</a><br>
-       Reference: <a href='spec-ppd.html' target='_top'>CUPS PPD Specification</a></td>
+       Specifications: <a href='spec-ppd.html' target='_top'>CUPS PPD Extensions</a></td>
 </tr>
 </tbody>
 </table></div>
@@ -353,6 +353,7 @@ attribute value.">ppdLocalizeMarkerName</a></li>
        <li><a href="#ppd_cplimit_t" title="Custom Parameter Limit ">ppd_cplimit_t</a></li>
        <li><a href="#ppd_cptype_t" title="Custom Parameter Type ">ppd_cptype_t</a></li>
        <li><a href="#ppd_cpvalue_t" title="Custom Parameter Value ">ppd_cpvalue_t</a></li>
+       <li><a href="#ppd_cs_t" title="Colorspaces">ppd_cs_t</a></li>
        <li><a href="#ppd_emul_t" title="Emulators">ppd_emul_t</a></li>
        <li><a href="#ppd_file_t" title="PPD File">ppd_file_t</a></li>
        <li><a href="#ppd_group_t" title="Groups">ppd_group_t</a></li>
@@ -360,6 +361,7 @@ attribute value.">ppdLocalizeMarkerName</a></li>
        <li><a href="#ppd_profile_t" title="sRGB Color Profiles">ppd_profile_t</a></li>
        <li><a href="#ppd_section_t" title="Order dependency sections">ppd_section_t</a></li>
        <li><a href="#ppd_size_t" title="Page Sizes">ppd_size_t</a></li>
+       <li><a href="#ppd_status_t" title="Types and structures...">ppd_status_t</a></li>
        <li><a href="#ppd_ui_t" title="UI Types">ppd_ui_t</a></li>
 </ul></li>
 <li><a href="#STRUCTURES">Structures</a><ul class="code">
@@ -393,7 +395,7 @@ attribute value.">ppdLocalizeMarkerName</a></li>
 
   PPD API introduction for the Common UNIX Printing System (CUPS).
 
-  Copyright 2007 by Apple Inc.
+  Copyright 2007-2008 by Apple Inc.
   Copyright 1997-2006 by Easy Software Products, all rights reserved.
 
   These coded instructions, statements, and computer programs are the
@@ -407,10 +409,19 @@ attribute value.">ppdLocalizeMarkerName</a></li>
 
 <p>The CUPS PPD API provides read-only access the data in PostScript Printer
 Description ("PPD") files which are used for all printers with a driver. With
-it you can display printer options to users, mark option choices and check for
-conflicting choices, and output marked choices in PostScript output. The
-<a href="#ppd_file_t"><code>ppd_file_t</code></a> structure contains all of
-the information in a PPD file.</p>
+it you can obtain the data necessary to display printer options to users, mark
+option choices and check for conflicting choices, and output marked choices in
+PostScript output. The <a href="#ppd_file_t"><code>ppd_file_t</code></a>
+structure contains all of the information in a PPD file.</p>
+
+<blockquote><b>Note:</b>
+
+<p>The CUPS PPD API uses the terms "option" and "choice" instead of the Adobe
+terms "MainKeyword" and "OptionKeyword" to refer to specific printer options and
+features. CUPS also treats option ("MainKeyword") and choice ("OptionKeyword")
+values as case-insensitive strings, so option "InputSlot" and choice "Upper"
+are equivalent to "inputslot" and "upper", respectively.</p>
+</blockquote>
 
 <h3><a name="LOADING">Loading a PPD File</a></h3>
 
@@ -438,6 +449,9 @@ by the structure:</p>
 <a href="#ppdClose">ppdClose</a>(ppd);
 </pre>
 
+<p>Once closed, pointers to the <a href="#ppd_file_t"><code>ppd_file_t</code></a>
+structure and any data in it will no longer be valid.</p>
+
 <h3><a name="OPTIONS_AND_GROUPS">Options and Groups</a></h3>
 
 <p>PPD files support multiple options, which are stored in arrays of
@@ -451,7 +465,7 @@ then it is put in an automatically-generated "General" group. Groups can also
 have sub-groups, however CUPS currently ignores sub-groups because of past
 abuses of this functionality.</p>
 
-<p>Options are selected by marking them using one of three functions. The
+<p>Option choices are selected by marking them using one of three functions. The
 first is <a href="#ppdMarkDefaults"><code>ppdMarkDefaults</code></a> which
 selects all of the default options in the PPD file:</p>
 
@@ -465,14 +479,14 @@ selects all of the default options in the PPD file:</p>
 
 <p>The second is <a href="#ppdMarkOption"><code>ppdMarkOption</code></a>
 which selects a single option choice in the PPD file. For example, the following
-code selects the manual feed media source:</p>
+code selects the upper paper tray:</p>
 
 <pre class="example">
 #include &lt;cups/ppd.h&gt;
 
 <a href="#ppd_file_t">ppd_file_t</a> *ppd;
 
-<a href="#ppdMarkOption">ppdMarkOption</a>(ppd, "InputSlot", "ManualFeed");
+<a href="#ppdMarkOption">ppdMarkOption</a>(ppd, "InputSlot", "Upper");
 </pre>
 
 <p>The last function is
@@ -493,6 +507,7 @@ int num_options = cupsParseOptions(argv[5], 0, &amp;options);
 
 <a href="#ppdMarkDefaults">ppdMarkDefaults</a>(ppd);
 <a href="#cupsMarkOptions">cupsMarkOptions</a>(ppd, num_options, options);
+cupsFreeOptions(num_options, options);
 </pre>
 
 <h3><a name="CONSTRAINTS">Constraints</a></h3>
@@ -502,7 +517,8 @@ constraints, between different options. Constraints are stored in an array of
 <a href="#ppd_const_t"><code>ppd_const_t</code></a> structures which specify
 the options and choices that conflict with each other. The
 <a href="#ppdConflicts"><code>ppdConflicts</code></a> function tells you
-how many of the selected options are incompatible.</p>
+how many of the selected options are incompatible. Since constraints are
+normally specified in pairs, the returned value is typically an even number.</p>
 
 <h3><a name="PAGE_SIZES">Page Sizes</a></h3>
 
@@ -554,13 +570,17 @@ in points. Custom page size names can also be specified in inches
 <a href="#ppd_size_t">ppd_size_t</a> *size = <a href="#ppdPageSize">ppdPageSize</a>(ppd, "Custom.12.7x34.5cm");
 </pre>
 
+<p>If the PPD does not support variable page sizes, the
+<a href="#ppdPageSize"><code>ppdPageSize</code></a> function will return
+<code>NULL</code>.</p>
+
 <h3><a name="ATTRIBUTES">Attributes</a></h3>
 
 <p>Every PPD file is composed of one or more attributes. Most of these
 attributes are used to define groups, options, choices, and page sizes,
-however several informations attributes are available which you may need
-to access in your program or filter. Attributes normally look like one of
-the following examples in a PPD file:</p>
+however several informational attributes may be present which you can access
+in your program or filter. Attributes normally look like one of the following
+examples in a PPD file:</p>
 
 <pre class="example">
 *name: "value"
@@ -833,7 +853,7 @@ The return string is allocated on the heap and should be freed using
 <p class="description">Returns the text assocated with a status.</p>
 <p class="code">
 const char *ppdErrorString (<br>
-&nbsp;&nbsp;&nbsp;&nbsp;ppd_status_t status<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_status_t">ppd_status_t</a> status<br>
 );</p>
 <h4 class="parameters">Parameters</h4>
 <dl>
@@ -1012,7 +1032,7 @@ int ppdIsMarked (<br>
 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.19&nbsp;</span><a name="ppdLastError">ppdLastError</a></h3>
 <p class="description">Return the status from the last ppdOpen*().</p>
 <p class="code">
-ppd_status_t ppdLastError (<br>
+<a href="#ppd_status_t">ppd_status_t</a> ppdLastError (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;int *line<br>
 );</p>
 <h4 class="parameters">Parameters</h4>
@@ -1316,6 +1336,11 @@ typedef enum <a href="#ppd_cptype_e">ppd_cptype_e</a> ppd_cptype_t;
 <p class="code">
 typedef union <a href="#ppd_cpvalue_u">ppd_cpvalue_u</a> ppd_cpvalue_t;
 </p>
+<h3 class="typedef"><a name="ppd_cs_t">ppd_cs_t</a></h3>
+<p class="description">Colorspaces</p>
+<p class="code">
+typedef enum <a href="#ppd_cs_e">ppd_cs_e</a> ppd_cs_t;
+</p>
 <h3 class="typedef"><a name="ppd_emul_t">ppd_emul_t</a></h3>
 <p class="description">Emulators</p>
 <p class="code">
@@ -1351,6 +1376,11 @@ typedef enum <a href="#ppd_section_e">ppd_section_e</a> ppd_section_t;
 <p class="code">
 typedef struct <a href="#ppd_size_s">ppd_size_s</a> ppd_size_t;
 </p>
+<h3 class="typedef"><a name="ppd_status_t">ppd_status_t</a></h3>
+<p class="description">Types and structures...</p>
+<p class="code">
+typedef enum <a href="#ppd_status_e">ppd_status_e</a> ppd_status_t;
+</p>
 <h3 class="typedef"><a name="ppd_ui_t">ppd_ui_t</a></h3>
 <p class="description">UI Types</p>
 <p class="code">
@@ -1482,7 +1512,7 @@ typedef enum <a href="#ppd_ui_e">ppd_ui_e</a> ppd_ui_t;
 <p class="code">struct ppd_file_s {<br>
 &nbsp;&nbsp;&nbsp;&nbsp;int accurate_screens;<br>
 &nbsp;&nbsp;&nbsp;&nbsp;int color_device;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;ppd_cs_t colorspace;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_cs_t">ppd_cs_t</a> colorspace;<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_const_t">ppd_const_t</a> *consts;<br>
 &nbsp;&nbsp;&nbsp;&nbsp;int contone_only;<br>
 &nbsp;&nbsp;&nbsp;&nbsp;float custom_margins[4];<br>
index f2d4c3a7cb520dffcf8157beeb10267c869d5a64..da9684b01d654ff40f86157672149c597c3160bf 100644 (file)
@@ -55,13 +55,12 @@ BLOCKQUOTE {
 }
 
 A:link, A:visited {
+  font-weight: normal;
   text-decoration: none;
-  font-weight: bold;
 }
 
 A:link:hover, A:visited:hover, A:active {
   text-decoration: underline;
-  font-weight: bold;
 }
 
 SUB, SUP {
@@ -294,31 +293,46 @@ div.contents ul.subcontents li {
 <ul class="contents">
 </li>
 <li><a href="#OVERVIEW">Overview</a></li>
+<li><a href="#TASKS">Functions by Task</a><ul class="subcontents">
+<li><a href="#OPENCLOSE">Opening and Closing Raster Streams</a></li>
+<li><a href="#READING">Reading Raster Streams</a></li>
+<li><a href="#WRITING">Writing Raster Streams</a></li>
+</ul></li>
 <li><a href="#FUNCTIONS">Functions</a><ul class="code">
 <li><a href="#cupsRasterClose" title="Close a raster stream.">cupsRasterClose</a></li>
 <li><a href="#cupsRasterInterpretPPD" title="Interpret PPD commands to create a page header.">cupsRasterInterpretPPD</a></li>
 <li><a href="#cupsRasterOpen" title="Open a raster stream.">cupsRasterOpen</a></li>
 <li><a href="#cupsRasterReadHeader" title="Read a raster page header and store it in a
-V1 page header structure.">cupsRasterReadHeader</a></li>
+version 1 page header structure.">cupsRasterReadHeader</a></li>
 <li><a href="#cupsRasterReadHeader2" title="Read a raster page header and store it in a
-V2 page header structure.">cupsRasterReadHeader2</a></li>
+version 2 page header structure.">cupsRasterReadHeader2</a></li>
 <li><a href="#cupsRasterReadPixels" title="Read raster pixels.">cupsRasterReadPixels</a></li>
-<li><a href="#cupsRasterWriteHeader" title="Write a raster page header from a V1 page
+<li><a href="#cupsRasterWriteHeader" title="Write a raster page header from a version 1 page
 header structure.">cupsRasterWriteHeader</a></li>
-<li><a href="#cupsRasterWriteHeader2" title="Write a raster page header from a V2 page
-header structure.">cupsRasterWriteHeader2</a></li>
+<li><a href="#cupsRasterWriteHeader2" title="Write a raster page header from a version 2
+page header structure.">cupsRasterWriteHeader2</a></li>
 <li><a href="#cupsRasterWritePixels" title="Write raster pixels.">cupsRasterWritePixels</a></li>
 </ul>
 <li><a href="#TYPES">Data Types</a><ul class="code">
+       <li><a href="#cups_adv_t" title="AdvanceMedia attribute values">cups_adv_t</a></li>
+       <li><a href="#cups_bool_t" title="Types...">cups_bool_t</a></li>
+       <li><a href="#cups_cspace_t" title="CutMedia attribute values">cups_cspace_t</a></li>
+       <li><a href="#cups_cut_t" title="LeadingEdge attribute values">cups_cut_t</a></li>
+       <li><a href="#cups_edge_t" title="Jog attribute values">cups_edge_t</a></li>
        <li><a href="#cups_interpret_cb_t" title="cupsRasterInterpretPPD callback function">cups_interpret_cb_t</a></li>
+       <li><a href="#cups_jog_t" title="cupsRasterOpen modes">cups_jog_t</a></li>
        <li><a href="#cups_mode_t" title="cupsRasterOpen modes">cups_mode_t</a></li>
+       <li><a href="#cups_order_t" title="cupsColorOrder attribute values">cups_order_t</a></li>
+       <li><a href="#cups_orient_t" title="The page header structure contains the standard PostScript page device
+dictionary, along with some CUPS-specific parameters that are provided
+by the RIPs...">cups_orient_t</a></li>
        <li><a href="#cups_page_header2_t" title="Version 2 page header ">cups_page_header2_t</a></li>
-       <li><a href="#cups_page_header_t" title="Version 1 page header">cups_page_header_t</a></li>
+       <li><a href="#cups_page_header_t" title="Version 1 page header ">cups_page_header_t</a></li>
        <li><a href="#cups_raster_t" title="Raster stream data">cups_raster_t</a></li>
 </ul></li>
 <li><a href="#STRUCTURES">Structures</a><ul class="code">
        <li><a href="#cups_page_header2_s" title="Version 2 page header ">cups_page_header2_s</a></li>
-       <li><a href="#cups_page_header_s" title="Version 1 page header">cups_page_header_s</a></li>
+       <li><a href="#cups_page_header_s" title="Version 1 page header ">cups_page_header_s</a></li>
 </ul></li>
 <li><a href="#ENUMERATIONS">Constants</a><ul class="code">
        <li><a href="#cups_adv_e" title="AdvanceMedia attribute values">cups_adv_e</a></li>
@@ -354,6 +368,12 @@ CUPS raster streams which are used for printing to raster printers. Because the
 raster format is updated from time to time, it is important to use this API to
 avoid incompatibilities with newer versions of CUPS.</p>
 
+<p>Two kinds of CUPS filters use the CUPS raster API - raster image processor
+(RIP) filters such as <code>pstoraster</code> and <code>cgpdftoraster</code>
+(Mac OS X) that produce CUPS raster files and printer driver filters that
+convert CUPS raster files into a format usable by the printer. Printer
+driver filters are by far the most common.</p>
+
 <p>CUPS raster files (<code>application/vnd.cups-raster</code>) consists of
 a stream of raster page descriptions produced by one of the RIP filters such as
 <var>pstoraster</var>, <var>imagetoraster</var>, or
@@ -372,8 +392,21 @@ file descriptor 0:</p>
 <p>Each page of data begins with a page dictionary structure called
 <a href="#cups_page_header2_t"><code>cups_page_header2_t</code></a>. This
 structure contains the colorspace, bits per color, media size, media type,
-hardware resolution, and so forth used for the page. You read the page header
-using the
+hardware resolution, and so forth used for the page.</p>
+
+<blockquote><b>Note:</b>
+
+  <p>Do not confuse the colorspace in the page header with the PPD
+  <tt>ColorModel</tt> keyword. <tt>ColorModel</tt> refers to the general type of
+  color used for a device (Gray, RGB, CMYK, DeviceN) and is often used to
+  select a particular colorspace for the page header along with the associate
+  color profile. The page header colorspace (<tt>cupsColorSpace</tt>) describes
+  both the type and organization of the color data, for example KCMY (black
+  first) instead of CMYK and RGBA (RGB + alpha) instead of RGB.</p>
+
+</blockquote>
+
+<p>You read the page header using the
 <a href="#cupsRasterReadHeader2"><code>cupsRasterReadHeader2</code></a>
 function:</p>
 
@@ -424,7 +457,7 @@ while (<a href="#cupsRasterReadHeader2">cupsRasterReadHeader2</a>(ras, &amp;head
     if (<a href="#cupsRasterReadPixels">cupsRasterReadPixels</a>(ras, buffer, header.cupsBytesPerLine) == 0)
       break;
 
-    /* write raster data to printer */
+    /* write raster data to printer on stdout */
   }
 
   /* finish this page */
@@ -440,6 +473,39 @@ the memory used to read the raster file:</p>
 
 <a href="#cupsRasterClose">cupsRasterClose</a>(ras);
 </pre>
+
+
+<h2 class='title'><a name="TASKS">Functions by Task</a></h2>
+
+<h3><a name="OPENCLOSE">Opening and Closing Raster Streams</a></h3>
+
+<ul class="code">
+
+       <li><a href="#cupsRasterClose" title="Close a raster stream.">cupsRasterClose</a></li>
+       <li><a href="#cupsRasterOpen" title="Open a raster stream.">cupsRasterOpen</a></li>
+
+</ul>
+
+<h3><a name="READING">Reading Raster Streams</a></h3>
+
+<ul class="code">
+
+       <li><a href="#cupsRasterReadHeader" title="Read a raster page header and store it in a version 1 page header structure.">cupsRasterReadHeader</a> <span class="info">Deprecated in CUPS 1.2/Mac OS X 10.5</span></li>
+       <li><a href="#cupsRasterReadHeader2" title="Read a raster page header and store it in a version 2 page header structure.">cupsRasterReadHeader2</a></li>
+       <li><a href="#cupsRasterReadPixels" title="Read raster pixels.">cupsRasterReadPixels</a></li>
+
+</ul>
+
+<h3><a name="WRITING">Writing Raster Streams</a></h3>
+
+<ul class="code">
+
+       <li><a href="#cupsRasterInterpretPPD" title="Interpret PPD commands to create a page header.">cupsRasterInterpretPPD</a></li>
+       <li><a href="#cupsRasterWriteHeader" title="Write a raster page header from a version 1 page header structure.">cupsRasterWriteHeader</a></li>
+       <li><a href="#cupsRasterWriteHeader2" title="Write a raster page header from a version 2 page header structure.">cupsRasterWriteHeader2</a> <span class="info">Deprecated in CUPS 1.2/Mac OS X 10.5</span></li>
+       <li><a href="#cupsRasterWritePixels" title="Write raster pixels.">cupsRasterWritePixels</a></li>
+       
+</ul>
 <h2 class="title"><a name="FUNCTIONS">Functions</a></h2>
 <h3 class="function"><a name="cupsRasterClose">cupsRasterClose</a></h3>
 <p class="description">Close a raster stream.</p>
@@ -452,7 +518,10 @@ void cupsRasterClose (<br>
 <dt>r</dt>
 <dd class="description">Stream to close</dd>
 </dl>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsRasterInterpretPPD">cupsRasterInterpretPPD</a></h3>
+<h4 class="discussion">Discussion</h4>
+<p class="discussion">The file descriptor associated with the raster stream must be closed
+separately as needed.</p>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsRasterInterpretPPD">cupsRasterInterpretPPD</a></h3>
 <p class="description">Interpret PPD commands to create a page header.</p>
 <p class="code">
 int cupsRasterInterpretPPD (<br>
@@ -465,7 +534,7 @@ int cupsRasterInterpretPPD (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>h</dt>
-<dd class="description">Page header</dd>
+<dd class="description">Page header to create</dd>
 <dt>ppd</dt>
 <dd class="description">PPD file</dd>
 <dt>num_options</dt>
@@ -473,22 +542,28 @@ int cupsRasterInterpretPPD (<br>
 <dt>options</dt>
 <dd class="description">Options</dd>
 <dt>func</dt>
-<dd class="description">Optional page header callback</dd>
+<dd class="description">Optional page header callback (<code>NULL</code> for none)</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">0 on success, -1 on failure</p>
 <h4 class="discussion">Discussion</h4>
-<p class="discussion">This function does not mark the options in the PPD using the &quot;num_options&quot;
-and &quot;options&quot; arguments.  Instead, mark the options with
-<code>cupsMarkOptions</code> and <code>ppdMarkOption</code> prior to calling
-<code>cupsRasterInterpretPPD</code> - this allows you to do per-page options
-without manipulating the options array.<br>
+<p class="discussion">This function is used by raster image processing (RIP) filters like
+cgpdftoraster and imagetoraster when writing CUPS raster data for a page.
+It is not used by raster printer driver filters which only read CUPS
+raster data.<br>
+<br>
+
+<code>cupsRasterInterpretPPD</code> does not mark the options in the PPD using
+the &quot;num_options&quot; and &quot;options&quot; arguments.  Instead, mark the options with
+<code>cupsMarkOptions</code> and <code>ppdMarkOption</code> prior to calling it -
+this allows for per-page options without manipulating the options array.<br>
 <br>
 The &quot;func&quot; argument specifies an optional callback function that is
 called prior to the computation of the final raster data.  The function
 can make changes to the <a href="#cups_page_header2_t"><code>cups_page_header2_t</code></a> data as needed to use a
 supported raster format and then returns 0 on success and -1 if the
-requested attributes cannot be supported.
+requested attributes cannot be supported.<br>
+<br>
 
 <code>cupsRasterInterpretPPD</code> supports a subset of the PostScript language.
 Currently only the <code>[</code>, <code>]</code>, <code><<</code>, <code>>></code>, <code>{</code>,
@@ -509,13 +584,22 @@ are supported.
 <dt>fd</dt>
 <dd class="description">File descriptor</dd>
 <dt>mode</dt>
-<dd class="description">Mode</dd>
+<dd class="description">Mode - <code>CUPS_RASTER_READ</code>, <code>CUPS_RASTER_WRITE</code>, or <code>CUPS_RASTER_WRITE_COMPRESSED</code></dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">New stream</p>
-<h3 class="function"><a name="cupsRasterReadHeader">cupsRasterReadHeader</a></h3>
+<h4 class="discussion">Discussion</h4>
+<p class="discussion">This function associates a raster stream with the given file descriptor.
+For most printer driver filters, &quot;fd&quot; will be 0 (stdin).  For most raster
+image processor (RIP) filters that generate raster data, &quot;fd&quot; will be 1
+(stdout).<br>
+<br>
+When writing raster data, the <code>CUPS_RASTER_WRITE</code> or
+<code>CUPS_RASTER_WRITE_COMPRESS</code> mode can be used - compressed output
+is generally 25-50% smaller but adds a 100-300% execution time overhead.</p>
+<h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="cupsRasterReadHeader">cupsRasterReadHeader</a></h3>
 <p class="description">Read a raster page header and store it in a
-V1 page header structure.</p>
+version 1 page header structure.</p>
 <p class="code">
 unsigned cupsRasterReadHeader (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_raster_t">cups_raster_t</a> *r,<br>
@@ -529,10 +613,18 @@ unsigned cupsRasterReadHeader (<br>
 <dd class="description">Pointer to header data</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
-<p class="description">1 on success, 0 on fail</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsRasterReadHeader2">cupsRasterReadHeader2</a></h3>
+<p class="description">1 on success, 0 on failure/end-of-file</p>
+<h4 class="discussion">Discussion</h4>
+<p class="discussion">This function is deprecated. Use <a href="#cupsRasterReadHeader2"><code>cupsRasterReadHeader2</code></a> instead.<br>
+<br>
+Version 1 page headers were used in CUPS 1.0 and 1.1 and contain a subset
+of the version 2 page header data. This function handles reading version 2
+page headers and copying only the version 1 data into the provided buffer.
+
+</p>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsRasterReadHeader2">cupsRasterReadHeader2</a></h3>
 <p class="description">Read a raster page header and store it in a
-V2 page header structure.</p>
+version 2 page header structure.</p>
 <p class="code">
 unsigned cupsRasterReadHeader2 (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_raster_t">cups_raster_t</a> *r,<br>
@@ -546,7 +638,7 @@ unsigned cupsRasterReadHeader2 (<br>
 <dd class="description">Pointer to header data</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
-<p class="description">1 on success, 0 on fail</p>
+<p class="description">1 on success, 0 on failure/end-of-file</p>
 <h3 class="function"><a name="cupsRasterReadPixels">cupsRasterReadPixels</a></h3>
 <p class="description">Read raster pixels.</p>
 <p class="code">
@@ -566,8 +658,12 @@ unsigned cupsRasterReadPixels (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Number of bytes read</p>
-<h3 class="function"><a name="cupsRasterWriteHeader">cupsRasterWriteHeader</a></h3>
-<p class="description">Write a raster page header from a V1 page
+<h4 class="discussion">Discussion</h4>
+<p class="discussion">For best performance, filters should read one or more whole lines.
+The &quot;cupsBytesPerLine&quot; value from the page header can be used to allocate
+the line buffer and as the number of bytes to read.</p>
+<h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="cupsRasterWriteHeader">cupsRasterWriteHeader</a></h3>
+<p class="description">Write a raster page header from a version 1 page
 header structure.</p>
 <p class="code">
 unsigned cupsRasterWriteHeader (<br>
@@ -583,9 +679,13 @@ unsigned cupsRasterWriteHeader (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">1 on success, 0 on failure</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsRasterWriteHeader2">cupsRasterWriteHeader2</a></h3>
-<p class="description">Write a raster page header from a V2 page
-header structure.</p>
+<h4 class="discussion">Discussion</h4>
+<p class="discussion">This function is deprecated. Use <a href="#cupsRasterWriteHeader2"><code>cupsRasterWriteHeader2</code></a> instead.
+
+</p>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsRasterWriteHeader2">cupsRasterWriteHeader2</a></h3>
+<p class="description">Write a raster page header from a version 2
+page header structure.</p>
 <p class="code">
 unsigned cupsRasterWriteHeader2 (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_raster_t">cups_raster_t</a> *r,<br>
@@ -600,6 +700,10 @@ unsigned cupsRasterWriteHeader2 (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">1 on success, 0 on failure</p>
+<h4 class="discussion">Discussion</h4>
+<p class="discussion">The page header can be initialized using <a href="#cupsRasterInterpretPPD"><code>cupsRasterInterpretPPD</code></a>.
+
+</p>
 <h3 class="function"><a name="cupsRasterWritePixels">cupsRasterWritePixels</a></h3>
 <p class="description">Write raster pixels.</p>
 <p class="code">
@@ -619,24 +723,70 @@ unsigned cupsRasterWritePixels (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Number of bytes written</p>
+<h4 class="discussion">Discussion</h4>
+<p class="discussion">For best performance, filters should write one or more whole lines.
+The &quot;cupsBytesPerLine&quot; value from the page header can be used to allocate
+the line buffer and as the number of bytes to write.</p>
 <h2 class="title"><a name="TYPES">Data Types</a></h2>
+<h3 class="typedef"><a name="cups_adv_t">cups_adv_t</a></h3>
+<p class="description">AdvanceMedia attribute values</p>
+<p class="code">
+typedef enum <a href="#cups_adv_e">cups_adv_e</a> cups_adv_t;
+</p>
+<h3 class="typedef"><a name="cups_bool_t">cups_bool_t</a></h3>
+<p class="description">Types...</p>
+<p class="code">
+typedef enum <a href="#cups_bool_e">cups_bool_e</a> cups_bool_t;
+</p>
+<h3 class="typedef"><a name="cups_cspace_t">cups_cspace_t</a></h3>
+<p class="description">CutMedia attribute values</p>
+<p class="code">
+typedef enum <a href="#cups_cspace_e">cups_cspace_e</a> cups_cspace_t;
+</p>
+<h3 class="typedef"><a name="cups_cut_t">cups_cut_t</a></h3>
+<p class="description">LeadingEdge attribute values</p>
+<p class="code">
+typedef enum <a href="#cups_cut_e">cups_cut_e</a> cups_cut_t;
+</p>
+<h3 class="typedef"><a name="cups_edge_t">cups_edge_t</a></h3>
+<p class="description">Jog attribute values</p>
+<p class="code">
+typedef enum <a href="#cups_edge_e">cups_edge_e</a> cups_edge_t;
+</p>
 <h3 class="typedef"><a name="cups_interpret_cb_t">cups_interpret_cb_t</a></h3>
 <p class="description">cupsRasterInterpretPPD callback function</p>
 <p class="code">
 typedef int (*cups_interpret_cb_t)(<a href="#cups_page_header2_t">cups_page_header2_t</a> *header, int preferred_bits);
 </p>
+<h3 class="typedef"><a name="cups_jog_t">cups_jog_t</a></h3>
+<p class="description">cupsRasterOpen modes</p>
+<p class="code">
+typedef enum <a href="#cups_jog_e">cups_jog_e</a> cups_jog_t;
+</p>
 <h3 class="typedef"><a name="cups_mode_t">cups_mode_t</a></h3>
 <p class="description">cupsRasterOpen modes</p>
 <p class="code">
 typedef enum <a href="#cups_mode_e">cups_mode_e</a> cups_mode_t;
 </p>
-<h3 class="typedef"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cups_page_header2_t">cups_page_header2_t</a></h3>
+<h3 class="typedef"><a name="cups_order_t">cups_order_t</a></h3>
+<p class="description">cupsColorOrder attribute values</p>
+<p class="code">
+typedef enum <a href="#cups_order_e">cups_order_e</a> cups_order_t;
+</p>
+<h3 class="typedef"><a name="cups_orient_t">cups_orient_t</a></h3>
+<p class="description">The page header structure contains the standard PostScript page device
+dictionary, along with some CUPS-specific parameters that are provided
+by the RIPs...</p>
+<p class="code">
+typedef enum <a href="#cups_orient_e">cups_orient_e</a> cups_orient_t;
+</p>
+<h3 class="typedef"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cups_page_header2_t">cups_page_header2_t</a></h3>
 <p class="description">Version 2 page header </p>
 <p class="code">
 typedef struct <a href="#cups_page_header2_s">cups_page_header2_s</a> cups_page_header2_t;
 </p>
-<h3 class="typedef"><a name="cups_page_header_t">cups_page_header_t</a></h3>
-<p class="description">Version 1 page header</p>
+<h3 class="typedef"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="cups_page_header_t">cups_page_header_t</a></h3>
+<p class="description">Version 1 page header </p>
 <p class="code">
 typedef struct <a href="#cups_page_header_s">cups_page_header_s</a> cups_page_header_t;
 </p>
@@ -646,42 +796,42 @@ typedef struct <a href="#cups_page_header_s">cups_page_header_s</a> cups_page_he
 typedef struct _cups_raster_s cups_raster_t;
 </p>
 <h2 class="title"><a name="STRUCTURES">Structures</a></h2>
-<h3 class="struct"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cups_page_header2_s">cups_page_header2_s</a></h3>
+<h3 class="struct"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cups_page_header2_s">cups_page_header2_s</a></h3>
 <p class="description">Version 2 page header </p>
 <p class="code">struct cups_page_header2_s {<br>
 &nbsp;&nbsp;&nbsp;&nbsp;unsigned AdvanceDistance;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;cups_adv_t AdvanceMedia;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;cups_bool_t Collate;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;cups_cut_t CutMedia;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;cups_bool_t Duplex;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_adv_t">cups_adv_t</a> AdvanceMedia;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> Collate;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_cut_t">cups_cut_t</a> CutMedia;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> Duplex;<br>
 &nbsp;&nbsp;&nbsp;&nbsp;unsigned HWResolution[2];<br>
 &nbsp;&nbsp;&nbsp;&nbsp;unsigned ImagingBoundingBox[4];<br>
-&nbsp;&nbsp;&nbsp;&nbsp;cups_bool_t InsertSheet;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;cups_jog_t Jog;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;cups_edge_t LeadingEdge;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;cups_bool_t ManualFeed;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> InsertSheet;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_jog_t">cups_jog_t</a> Jog;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_edge_t">cups_edge_t</a> LeadingEdge;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> ManualFeed;<br>
 &nbsp;&nbsp;&nbsp;&nbsp;unsigned Margins[2];<br>
 &nbsp;&nbsp;&nbsp;&nbsp;char MediaClass[64];<br>
 &nbsp;&nbsp;&nbsp;&nbsp;char MediaColor[64];<br>
 &nbsp;&nbsp;&nbsp;&nbsp;unsigned MediaPosition;<br>
 &nbsp;&nbsp;&nbsp;&nbsp;char MediaType[64];<br>
 &nbsp;&nbsp;&nbsp;&nbsp;unsigned MediaWeight;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;cups_bool_t MirrorPrint;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;cups_bool_t NegativePrint;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> MirrorPrint;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> NegativePrint;<br>
 &nbsp;&nbsp;&nbsp;&nbsp;unsigned NumCopies;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;cups_orient_t Orientation;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;cups_bool_t OutputFaceUp;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_orient_t">cups_orient_t</a> Orientation;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> OutputFaceUp;<br>
 &nbsp;&nbsp;&nbsp;&nbsp;char OutputType[64];<br>
 &nbsp;&nbsp;&nbsp;&nbsp;unsigned PageSize[2];<br>
-&nbsp;&nbsp;&nbsp;&nbsp;cups_bool_t Separations;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;cups_bool_t TraySwitch;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;cups_bool_t Tumble;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> Separations;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> TraySwitch;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> Tumble;<br>
 &nbsp;&nbsp;&nbsp;&nbsp;unsigned cupsBitsPerColor;<br>
 &nbsp;&nbsp;&nbsp;&nbsp;unsigned cupsBitsPerPixel;<br>
 &nbsp;&nbsp;&nbsp;&nbsp;float cupsBorderlessScalingFactor;<br>
 &nbsp;&nbsp;&nbsp;&nbsp;unsigned cupsBytesPerLine;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;cups_order_t cupsColorOrder;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;cups_cspace_t cupsColorSpace;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_order_t">cups_order_t</a> cupsColorOrder;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_cspace_t">cups_cspace_t</a> cupsColorSpace;<br>
 &nbsp;&nbsp;&nbsp;&nbsp;unsigned cupsCompression;<br>
 &nbsp;&nbsp;&nbsp;&nbsp;unsigned cupsHeight;<br>
 &nbsp;&nbsp;&nbsp;&nbsp;float cupsImagingBBox[4];<br>
@@ -704,23 +854,23 @@ typedef struct _cups_raster_s cups_raster_t;
 <dt>AdvanceDistance </dt>
 <dd class="description">AdvanceDistance value in points</dd>
 <dt>AdvanceMedia </dt>
-<dd class="description">AdvanceMedia value (see above)</dd>
+<dd class="description">AdvanceMedia value (<a href="#cups_adv_t"><code>cups_adv_t</code></a>)</dd>
 <dt>Collate </dt>
 <dd class="description">Collated copies value</dd>
 <dt>CutMedia </dt>
-<dd class="description">CutMedia value (see above)</dd>
+<dd class="description">CutMedia value (<a href="#cups_cut_t"><code>cups_cut_t</code></a>)</dd>
 <dt>Duplex </dt>
 <dd class="description">Duplexed (double-sided) value</dd>
 <dt>HWResolution[2] </dt>
 <dd class="description">Resolution in dots-per-inch</dd>
 <dt>ImagingBoundingBox[4] </dt>
-<dd class="description">Pixel region that is painted (points)</dd>
+<dd class="description">Pixel region that is painted (points, left, bottom, right, top)</dd>
 <dt>InsertSheet </dt>
 <dd class="description">InsertSheet value</dd>
 <dt>Jog </dt>
-<dd class="description">Jog value (see above)</dd>
+<dd class="description">Jog value (<a href="#cups_jog_t"><code>cups_jog_t</code></a>)</dd>
 <dt>LeadingEdge </dt>
-<dd class="description">LeadingEdge value (see above)</dd>
+<dd class="description">LeadingEdge value (<a href="#cups_edge_t"><code>cups_edge_t</code></a>)</dd>
 <dt>ManualFeed </dt>
 <dd class="description">ManualFeed value</dd>
 <dt>Margins[2] </dt>
@@ -742,7 +892,7 @@ typedef struct _cups_raster_s cups_raster_t;
 <dt>NumCopies </dt>
 <dd class="description">Number of copies to produce</dd>
 <dt>Orientation </dt>
-<dd class="description">Orientation value (see above)</dd>
+<dd class="description">Orientation value (<a href="#cups_orient_t"><code>cups_orient_t</code></a>)</dd>
 <dt>OutputFaceUp </dt>
 <dd class="description">OutputFaceUp value</dd>
 <dt>OutputType[64] </dt>
@@ -759,7 +909,7 @@ typedef struct _cups_raster_s cups_raster_t;
 <dd class="description">Number of bits for each color</dd>
 <dt>cupsBitsPerPixel </dt>
 <dd class="description">Number of bits for each pixel</dd>
-<dt>cupsBorderlessScalingFactor <span class="info">&nbsp;CUPS 1.2&nbsp;</span></dt>
+<dt>cupsBorderlessScalingFactor <span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span></dt>
 <dd class="description">Scaling that was applied to page data </dd>
 <dt>cupsBytesPerLine </dt>
 <dd class="description">Number of bytes per line</dd>
@@ -771,25 +921,26 @@ typedef struct _cups_raster_s cups_raster_t;
 <dd class="description">Device compression to use</dd>
 <dt>cupsHeight </dt>
 <dd class="description">Height of page image in pixels</dd>
-<dt>cupsImagingBBox[4] <span class="info">&nbsp;CUPS 1.2&nbsp;</span></dt>
-<dd class="description">Floating point ImagingBoundingBox *
-(scaling factor not applied) </dd>
-<dt>cupsInteger[16] <span class="info">&nbsp;CUPS 1.2&nbsp;</span></dt>
+<dt>cupsImagingBBox[4] <span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span></dt>
+<dd class="description">Floating point ImagingBoundingBox
+(scaling factor not applied, left,
+bottom, right, top) </dd>
+<dt>cupsInteger[16] <span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span></dt>
 <dd class="description">User-defined integer values </dd>
-<dt>cupsMarkerType[64] <span class="info">&nbsp;CUPS 1.2&nbsp;</span></dt>
+<dt>cupsMarkerType[64] <span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span></dt>
 <dd class="description">Ink/toner type </dd>
 <dt>cupsMediaType </dt>
 <dd class="description">Media type code</dd>
-<dt>cupsNumColors <span class="info">&nbsp;CUPS 1.2&nbsp;</span></dt>
-<dd class="description">Number of colors </dd>
-<dt>cupsPageSizeName[64] <span class="info">&nbsp;CUPS 1.2&nbsp;</span></dt>
+<dt>cupsNumColors <span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span></dt>
+<dd class="description">Number of color compoents </dd>
+<dt>cupsPageSizeName[64] <span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span></dt>
 <dd class="description">PageSize name </dd>
-<dt>cupsPageSize[2] <span class="info">&nbsp;CUPS 1.2&nbsp;</span></dt>
+<dt>cupsPageSize[2] <span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span></dt>
 <dd class="description">Floating point PageSize (scaling *
 factor not applied) </dd>
-<dt>cupsReal[16] <span class="info">&nbsp;CUPS 1.2&nbsp;</span></dt>
+<dt>cupsReal[16] <span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span></dt>
 <dd class="description">User-defined floating-point values </dd>
-<dt>cupsRenderingIntent[64] <span class="info">&nbsp;CUPS 1.2&nbsp;</span></dt>
+<dt>cupsRenderingIntent[64] <span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span></dt>
 <dd class="description">Color rendering intent </dd>
 <dt>cupsRowCount </dt>
 <dd class="description">Rows per band</dd>
@@ -797,46 +948,46 @@ factor not applied) </dd>
 <dd class="description">Feed between bands</dd>
 <dt>cupsRowStep </dt>
 <dd class="description">Spacing between lines</dd>
-<dt>cupsString[16][64] <span class="info">&nbsp;CUPS 1.2&nbsp;</span></dt>
+<dt>cupsString[16][64] <span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span></dt>
 <dd class="description">User-defined string values </dd>
 <dt>cupsWidth </dt>
 <dd class="description">Width of page image in pixels</dd>
 </dl>
-<h3 class="struct"><a name="cups_page_header_s">cups_page_header_s</a></h3>
-<p class="description">Version 1 page header</p>
+<h3 class="struct"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="cups_page_header_s">cups_page_header_s</a></h3>
+<p class="description">Version 1 page header </p>
 <p class="code">struct cups_page_header_s {<br>
 &nbsp;&nbsp;&nbsp;&nbsp;unsigned AdvanceDistance;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;cups_adv_t AdvanceMedia;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;cups_bool_t Collate;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;cups_cut_t CutMedia;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;cups_bool_t Duplex;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_adv_t">cups_adv_t</a> AdvanceMedia;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> Collate;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_cut_t">cups_cut_t</a> CutMedia;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> Duplex;<br>
 &nbsp;&nbsp;&nbsp;&nbsp;unsigned HWResolution[2];<br>
 &nbsp;&nbsp;&nbsp;&nbsp;unsigned ImagingBoundingBox[4];<br>
-&nbsp;&nbsp;&nbsp;&nbsp;cups_bool_t InsertSheet;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;cups_jog_t Jog;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;cups_edge_t LeadingEdge;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;cups_bool_t ManualFeed;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> InsertSheet;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_jog_t">cups_jog_t</a> Jog;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_edge_t">cups_edge_t</a> LeadingEdge;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> ManualFeed;<br>
 &nbsp;&nbsp;&nbsp;&nbsp;unsigned Margins[2];<br>
 &nbsp;&nbsp;&nbsp;&nbsp;char MediaClass[64];<br>
 &nbsp;&nbsp;&nbsp;&nbsp;char MediaColor[64];<br>
 &nbsp;&nbsp;&nbsp;&nbsp;unsigned MediaPosition;<br>
 &nbsp;&nbsp;&nbsp;&nbsp;char MediaType[64];<br>
 &nbsp;&nbsp;&nbsp;&nbsp;unsigned MediaWeight;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;cups_bool_t MirrorPrint;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;cups_bool_t NegativePrint;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> MirrorPrint;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> NegativePrint;<br>
 &nbsp;&nbsp;&nbsp;&nbsp;unsigned NumCopies;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;cups_orient_t Orientation;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;cups_bool_t OutputFaceUp;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_orient_t">cups_orient_t</a> Orientation;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> OutputFaceUp;<br>
 &nbsp;&nbsp;&nbsp;&nbsp;char OutputType[64];<br>
 &nbsp;&nbsp;&nbsp;&nbsp;unsigned PageSize[2];<br>
-&nbsp;&nbsp;&nbsp;&nbsp;cups_bool_t Separations;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;cups_bool_t TraySwitch;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;cups_bool_t Tumble;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> Separations;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> TraySwitch;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_bool_t">cups_bool_t</a> Tumble;<br>
 &nbsp;&nbsp;&nbsp;&nbsp;unsigned cupsBitsPerColor;<br>
 &nbsp;&nbsp;&nbsp;&nbsp;unsigned cupsBitsPerPixel;<br>
 &nbsp;&nbsp;&nbsp;&nbsp;unsigned cupsBytesPerLine;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;cups_order_t cupsColorOrder;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;cups_cspace_t cupsColorSpace;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_order_t">cups_order_t</a> cupsColorOrder;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_cspace_t">cups_cspace_t</a> cupsColorSpace;<br>
 &nbsp;&nbsp;&nbsp;&nbsp;unsigned cupsCompression;<br>
 &nbsp;&nbsp;&nbsp;&nbsp;unsigned cupsHeight;<br>
 &nbsp;&nbsp;&nbsp;&nbsp;unsigned cupsMediaType;<br>
@@ -850,23 +1001,23 @@ factor not applied) </dd>
 <dt>AdvanceDistance </dt>
 <dd class="description">AdvanceDistance value in points</dd>
 <dt>AdvanceMedia </dt>
-<dd class="description">AdvanceMedia value (see above)</dd>
+<dd class="description">AdvanceMedia value (<a href="#cups_adv_t"><code>cups_adv_t</code></a>)</dd>
 <dt>Collate </dt>
 <dd class="description">Collated copies value</dd>
 <dt>CutMedia </dt>
-<dd class="description">CutMedia value (see above)</dd>
+<dd class="description">CutMedia value (<a href="#cups_cut_t"><code>cups_cut_t</code></a>)</dd>
 <dt>Duplex </dt>
 <dd class="description">Duplexed (double-sided) value</dd>
 <dt>HWResolution[2] </dt>
 <dd class="description">Resolution in dots-per-inch</dd>
 <dt>ImagingBoundingBox[4] </dt>
-<dd class="description">Pixel region that is painted (points)</dd>
+<dd class="description">Pixel region that is painted (points, left, bottom, right, top)</dd>
 <dt>InsertSheet </dt>
 <dd class="description">InsertSheet value</dd>
 <dt>Jog </dt>
-<dd class="description">Jog value (see above)</dd>
+<dd class="description">Jog value (<a href="#cups_jog_t"><code>cups_jog_t</code></a>)</dd>
 <dt>LeadingEdge </dt>
-<dd class="description">LeadingEdge value (see above)</dd>
+<dd class="description">LeadingEdge value (<a href="#cups_edge_t"><code>cups_edge_t</code></a>)</dd>
 <dt>ManualFeed </dt>
 <dd class="description">ManualFeed value</dd>
 <dt>Margins[2] </dt>
@@ -888,7 +1039,7 @@ factor not applied) </dd>
 <dt>NumCopies </dt>
 <dd class="description">Number of copies to produce</dd>
 <dt>Orientation </dt>
-<dd class="description">Orientation value (see above)</dd>
+<dd class="description">Orientation value (<a href="#cups_orient_t"><code>cups_orient_t</code></a>)</dd>
 <dt>OutputFaceUp </dt>
 <dd class="description">OutputFaceUp value</dd>
 <dt>OutputType[64] </dt>
@@ -1010,7 +1161,7 @@ light-cyan, light-magenta</dd>
 <dd class="description">Red, green, blue</dd>
 <dt>CUPS_CSPACE_RGBA </dt>
 <dd class="description">Red, green, blue, alpha</dd>
-<dt>CUPS_CSPACE_RGBW <span class="info">&nbsp;CUPS 1.2&nbsp;</span></dt>
+<dt>CUPS_CSPACE_RGBW <span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span></dt>
 <dd class="description">Red, green, blue, white </dd>
 <dt>CUPS_CSPACE_SILVER </dt>
 <dd class="description">Silver foil</dd>
index efb8efa0e799781e52a84ffb762e9d0525ca11c0..b96084e001b01f0912a88ef80a1d1d41cb1845cb 100644 (file)
@@ -5,28 +5,21 @@
 </HEAD>
 <BODY>
 
-<P>CUPS has traditionally provided a dynamic web interface
-through dedicated CGI programs that are executed when users open
-special directories on the CUPS server. Each CGI performs
-administration, class, help, job, and printer functions as
-directed by the user, but the actual programs that are run and
-functions that are available are limited to those that were
-originally designed into the scheduler.</P>
+<P>CUPS provides a dynamic web interface through dedicated CGI programs that
+are executed when users open special directories on the CUPS server. Each CGI
+performs administration, class, help, job, and printer functions as directed by
+the user, but the actual programs that are run and functions that are available
+are limited to those that were originally designed into the scheduler.</P>
 
-<P>Support is now available for CGI programs and specific
-scripting languages, currently Java, Perl, PHP, and Python.  The
-interpreters for these languages are currently configured at
-compile time.  Future versions may expand the interface to allow
-for generic support of scripting languages similar to the Apache
-"AddHandler" directive, but with external programs instead of
-modules.</P>
-
-<P>Table 1 shows the MIME media types that are reserved for the
-CGI support in CUPS. The names have been chosen to mirror those
-used by Apache:</P>
+<P>CUPS also supports CGI programs and specific scripting languages (Java, Perl,
+PHP, and Python) for pages you want to provide.  The interpreters for these
+languages are currently configured at compile time and are associated with
+MIME media types. <a href="#TABLE1">Table 1</a> shows the MIME media types that
+are reserved for each type of page and are the same as those used by the Apache
+web server.</P>
 
 <DIV CLASS="table"><TABLE SUMMARY="CGI MIME Media Types">
-<CAPTION>Table 1: CGI MIME Media Types</CAPTION>
+<CAPTION><A NAME="TABLE1">Table 1</A>: CGI MIME Media Types</CAPTION>
 <TR>
        <TH>MIME Media Type</TH>
        <TH>Description</TH>
@@ -57,7 +50,7 @@ used by Apache:</P>
 
 <P>In order to enable the corresponding type, you must create a
 new <VAR>/etc/cups/cgi.types</VAR> file which maps the filename
-extensions to the appropriate MIME type, for example:</P>
+extensions to the appropriate MIME types, for example:</P>
 
 <PRE CLASS="command">
 application/x-httpd-cgi cgi
@@ -67,9 +60,8 @@ application/x-httpd-php php
 application/x-httpd-python py
 </PRE>
 
-<P>CGI scripts/programs (application/x-httpd-cgi) also must have
-execution permissions to be treated as a CGI script or
-program.</P>
+<P>CGI scripts/programs (application/x-httpd-cgi) also must have execution
+permissions to be treated as a CGI script or program.</P>
 
 <H2><A NAME="LIMITS">Limitations</A></H2>
 
index 3f81a30bcd7e3114ec0b01b67108f58f78a1d305..8ad4ffada25605a991bc1ab44714cd54bdb9a512 100644 (file)
@@ -640,7 +640,7 @@ lp -o prettyprint filename
 lpr -o prettyprint filename
 </PRE>
 
-<H3><A NAME="WRAP">Turning Off Text Wrapping</A><H3>
+<H3><A NAME="WRAP">Turning Off Text Wrapping</A></H3>
 
 <P>The <CODE>-o nowrap</CODE> option disables wrapping of long lines:</P>
 
index 45a76213ab10141d6e74b406cb317a86ac758a6c..3805dc0f54e3bc57677afe9b7bae0d63e639f803 100644 (file)
@@ -222,10 +222,14 @@ cupsRasterOpen(int         fd,            /* I - File descriptor */
  *
  * This function is deprecated. Use @link cupsRasterReadHeader2@ instead.
  *
+ * Version 1 page headers were used in CUPS 1.0 and 1.1 and contain a subset
+ * of the version 2 page header data. This function handles reading version 2
+ * page headers and copying only the version 1 data into the provided buffer.
+ *
  * @deprecated@
  */
 
-unsigned                               /* O - 1 on success, 0 on fail */
+unsigned                               /* O - 1 on success, 0 on failure/end-of-file */
 cupsRasterReadHeader(
     cups_raster_t      *r,             /* I - Raster stream */
     cups_page_header_t *h)             /* I - Pointer to header data */
@@ -254,7 +258,7 @@ cupsRasterReadHeader(
  * @since CUPS 1.2/Mac OS X 10.5@
  */
 
-unsigned                               /* O - 1 on success, 0 on fail */
+unsigned                               /* O - 1 on success, 0 on failure/end-of-file */
 cupsRasterReadHeader2(
     cups_raster_t       *r,            /* I - Raster stream */
     cups_page_header2_t *h)            /* I - Pointer to header data */
@@ -278,6 +282,10 @@ cupsRasterReadHeader2(
 
 /*
  * 'cupsRasterReadPixels()' - Read raster pixels.
+ *
+ * For best performance, filters should read one or more whole lines.
+ * The "cupsBytesPerLine" value from the page header can be used to allocate
+ * the line buffer and as the number of bytes to read.
  */
 
 unsigned                               /* O - Number of bytes read */
@@ -551,6 +559,10 @@ cupsRasterWriteHeader2(
 
 /*
  * 'cupsRasterWritePixels()' - Write raster pixels.
+ *
+ * For best performance, filters should write one or more whole lines.
+ * The "cupsBytesPerLine" value from the page header can be used to allocate
+ * the line buffer and as the number of bytes to write.
  */
 
 unsigned                               /* O - Number of bytes written */
index 956ae88abc9ed69da2f3598ce084ba49546fd0e0..d5564e626a363febd1eeee48ec902e45c424e237 100644 (file)
@@ -54,7 +54,7 @@
  * The Zebra portion of the driver has been tested with the LP-2844,
  * LP-2844Z, QL-320, and QL-420 label printers; it may also work with
  * other models.  The driver supports EPL line mode, EPL page mode,
- * ZPL, and CPCL as defined in Zebra's on-line developer documentation.
+ * ZPL, and CPCL as defined in Zebra's online developer documentation.
  */
 
 /*
index f5d408e78ad90c76fc12d94ab17017af97bade8e..54334523b3335e7e9fd228e3b879a6ac219f9a8e 100644 (file)
@@ -1646,7 +1646,7 @@ process_children(void)
     for (job = (cupsd_job_t *)cupsArrayFirst(ActiveJobs);
         job;
         job = (cupsd_job_t *)cupsArrayNext(ActiveJobs))
-      if (job->state_value >= IPP_JOB_HELD && job->filters[0])
+      if (job->state_value >= IPP_JOB_HELD && (job->filters[0] || job->backend))
       {
        for (i = 0; job->filters[i]; i ++)
           if (job->filters[i] == pid)
index 5b87d36cc25258d334d8675956b78b6dd33a2a71..95a35bb701d78985f5e9b0f203fe74772281a54b 100644 (file)
@@ -25,6 +25,5 @@ TYPE="SEARCH" NAME="QUERY" SIZE="20" PLACEHOLDER="Search Help"
 VALUE="{SECTION=help?{?QUERY}:}" AUTOSAVE="org.cups.help" RESULTS="20"></FORM></TD>
 <TD><IMG SRC="/images/right.gif" WIDTH="4" HEIGHT="36" ALT=""></TD>
 </TR>
+<TR><TD COLSPAN="9">&nbsp;</TD></TR>
 </TABLE>
-
-<H1>{title}</H1>
index cb9fe68bac6d3f2c59db025dc57f49939a3972c4..3a70c9c51bc538c3c7fbcc1ecd247ad26cd147cf 100644 (file)
@@ -14,7 +14,7 @@ AUTOSAVE="org.cups.help" RESULTS="20">
 <DIV CLASS="sidebar"><TABLE CLASS="inset" SUMMARY="Contents">
 <TR><TD>
 
-<H3 CLASS="title">On-Line Help Documents</H3>
+<H3 CLASS="title">Online Help Documents</H3>
 
 <P CLASS="l0"><A HREF="/help/{QUERY??QUERY={QUERY}:}">All Documents</A></P>
 <HR>
@@ -32,9 +32,9 @@ AUTOSAVE="org.cups.help" RESULTS="20">
 <HR NOSHADE>:}
 {HELPTITLE?<FORM ACTION="/help/{?HELPFILE}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="PRINTABLE" VALUE="YES"><INPUT TYPE="SUBMIT" VALUE="View Printable Version"></FORM>:
 
-<P>This is the CUPS on-line help interface. Enter search words
+<P>This is the CUPS online help interface. Enter search words
 above or click on any of the documentation links to display
-on-line help information.</P>
+online help information.</P>
 
 <P>If you are new to CUPS, read the "<a
 href="/help/overview.html">Overview of CUPS</a>" page. Veteran users