]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Merge changes from CUPS 1.4svn-r8628.
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 13 May 2009 22:29:41 +0000 (22:29 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 13 May 2009 22:29:41 +0000 (22:29 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@1495 a1ca3aef-8c08-0410-bb20-df032aa958be

132 files changed:
CHANGES.txt
Makefile
backend/usb-darwin.c
cgi-bin/admin.c
cgi-bin/api-cgi.header [new file with mode: 0644]
cgi-bin/api-cgi.shtml [new file with mode: 0644]
cgi-bin/makedocset.c
config-scripts/cups-common.m4
config.h.in
cups/api-array.header
cups/api-cups.header
cups/api-filedir.header
cups/api-filter.header
cups/api-filter.shtml
cups/api-httpipp.header
cups/api-overview.header
cups/api-ppd.header
cups/backend.c
cups/conflicts.c
cups/cups.h
cups/dest.c
cups/emit.c
cups/file.c
cups/getdevices.c
cups/http.c
cups/ipp-support.c
cups/ipp.h
cups/localize.c
cups/page.c
cups/ppd.h
cups/request.c
cups/sidechannel.c
cups/sidechannel.h
cups/usersys.c
cups/util.c
doc/Makefile
doc/cups-printable.css
doc/cups.css
doc/help/accounting.html
doc/help/api-array.html
doc/help/api-cgi.html
doc/help/api-cups.html
doc/help/api-driver.html
doc/help/api-filedir.html
doc/help/api-filter.html
doc/help/api-httpipp.html
doc/help/api-mime.html
doc/help/api-overview.html
doc/help/api-ppd.html
doc/help/api-ppdc.html
doc/help/api-raster.html
doc/help/cgi.html
doc/help/glossary.html
doc/help/kerberos.html
doc/help/license.html
doc/help/network.html
doc/help/options.html
doc/help/overview.html
doc/help/policies.html
doc/help/postscript-driver.html
doc/help/ppd-compiler.html
doc/help/raster-driver.html
doc/help/ref-access_log.html
doc/help/ref-classes-conf.html
doc/help/ref-client-conf.html
doc/help/ref-cupsd-conf.html.in
doc/help/ref-error_log.html
doc/help/ref-mailto-conf.html
doc/help/ref-page_log.html
doc/help/ref-ppdcfile.html
doc/help/ref-printers-conf.html
doc/help/ref-snmp-conf.html
doc/help/ref-subscriptions-conf.html
doc/help/security.html
doc/help/sharing.html
doc/help/spec-banner.html
doc/help/spec-browsing.html
doc/help/spec-cmp.html
doc/help/spec-command.html
doc/help/spec-design.html
doc/help/spec-ipp.html
doc/help/spec-pdf.html
doc/help/spec-postscript.html
doc/help/spec-ppd.html
doc/help/spec-raster.html
doc/help/spec-stp.html
doc/help/standard.html.in
doc/help/translation.html
doc/help/whatsnew.html
driver/api-driver.header
driver/api-driver.shtml
filter/api-raster.header
filter/postscript-driver.header
filter/postscript-driver.shtml
filter/ppd-compiler.header
filter/raster-driver.header
filter/raster-driver.shtml
filter/rastertoepson.c
init/org.cups.cupsd.plist
locale/cups_zh.po
man/Makefile
man/backend.man
man/commandtoescpx.man [deleted file]
man/commandtopclx.man [deleted file]
man/cupsd.conf.man.in
man/filter.man
man/mantohtml.c
man/rastertoescpx.man [deleted file]
man/rastertopclx.man [deleted file]
packaging/cups.list.in
packaging/cups.spec.in
ppdc/api-ppdc.header [new file with mode: 0644]
ppdc/api-ppdc.shtml [new file with mode: 0644]
scheduler/api-mime.header [new file with mode: 0644]
scheduler/api-mime.shtml [new file with mode: 0644]
scheduler/conf.c
scheduler/conf.h
scheduler/cups-driverd.cxx
scheduler/dirsvc.c
scheduler/job.c
scheduler/job.h
scheduler/log.c
scheduler/printers.c
scheduler/sysman.c
standards/Makefile
standards/rfctohtml.c
templates/de/help-printable.tmpl
templates/es/help-printable.tmpl
templates/help-printable.tmpl
templates/ja/help-printable.tmpl
templates/pl/help-printable.tmpl
templates/ru/help-printable.tmpl

index dcf311820208a0b848987521211736af610cf1b4..dc4ea588cd976ec6107e9a0c3dd6122296c193ed 100644 (file)
@@ -1,13 +1,19 @@
-CHANGES.txt - 2009-05-08
+CHANGES.txt - 2009-05-13
 ------------------------
 
 CHANGES IN CUPS V1.4b3
 
-       - Documentation fixes (STR #3044, STR #3057)
+       - Documentation fixes (STR #3044, STR #3057, STR #3153)
        - Added complete localizations for German, Japanese, Polish, and
          Russian and partial localizations for Chinese, Danish, Finnish,
          French, Italian, Korean, Norwegian, Portuguese, and Swedish
          (STR #3096, STR #3098, STR #3109, STR #3111, STR #3141)
+       - The cups-driverd program did not detect symlink loops (STR #3185)
+       - The EPSON 24-pin series driver should now feed the correct amount
+         (STR #2624)
+       - The scheduler now automatically logs the last N debug messages for
+         failed print jobs.
+       - You can now modify a raw print queue (STR #3133)
         - Fixed a number of ppdi issues and added a unit test to validate that
          ppdc + ppdi can generate and import the same data (STR #3152)
        - Moving jobs in the web interface now shows an error if you only have
index 5a1f8b4a0e62720e9b6372145958f08c62505b9d..0fedbbdb4c0e1cd6f3750c62367ea97bae45f9d1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -316,17 +316,30 @@ uninstall:
                fi \
                $(RMDIR) $(BUILDROOT)$(INITDDIR); \
        fi
+       if test "x$(SMFMANIFESTDIR)" != x; then \
+               echo Uninstalling SMF manifest in $(SMFMANIFESTDIR)...;\
+               $(RM) $(BUILDROOT)$(SMFMANIFESTDIR)/cups.xml; \
+       fi
        if test "x$(DBUSDIR)" != x; then \
                echo Uninstalling cups.conf in $(DBUSDIR)...;\
                $(RM) $(BUILDROOT)$(DBUSDIR)/cups.conf; \
                $(RMDIR) $(BUILDROOT)$(DBUSDIR); \
        fi
-       $(RM) $(BUILDROOT)/etc/xinetd.d/cups-lpd
-       $(RM) $(BUILDROOT)/usr/share/applications/cups.desktop
-       $(RM) $(BUILDROOT)/usr/share/icons/hicolor/16x16/apps/cups.png
-       $(RM) $(BUILDROOT)/usr/share/icons/hicolor/32x32/apps/cups.png
-       $(RM) $(BUILDROOT)/usr/share/icons/hicolor/64x64/apps/cups.png
-       $(RM) $(BUILDROOT)/usr/share/icons/hicolor/128x128/apps/cups.png
+       if test "x$(XINETD)" != x; then \
+               echo Uninstalling xinetd configuration file for cups-lpd...; \
+               $(RM) $(BUILDROOT)$(XINETD)/cups-lpd; \
+       fi
+       if test "x$(MENUDIR)" != x; then \
+               echo Uninstalling desktop menu...; \
+               $(RM) $(BUILDROOT)$(MENUDIR)/cups.desktop; \
+       fi
+       if test "x$(ICONDIR)" != x; then \
+               echo Uninstalling desktop icons...; \
+               $(RM) $(BUILDROOT)$(ICONDIR)/hicolor/16x16/apps/cups.png; \
+               $(RM) $(BUILDROOT)$(ICONDIR)/hicolor/32x32/apps/cups.png; \
+               $(RM) $(BUILDROOT)$(ICONDIR)/hicolor/64x64/apps/cups.png; \
+               $(RM) $(BUILDROOT)$(ICONDIR)/hicolor/128x128/apps/cups.png; \
+       fi
 
 
 #
@@ -344,7 +357,7 @@ check:      all unittests
 
 
 #
-# Create an Xcode docset...
+# Create HTML documentation...
 #
 
 apihelp:
@@ -359,11 +372,17 @@ framedhelp:
                (cd $$dir; $(MAKE) $(MFLAGS) framedhelp) || exit 1;\
        done
 
+
+#
+# Create an Xcode docset...
+#
+
 docset:        apihelp
        echo Generating docset directory tree...
        $(RM) -r org.cups.docset
        mkdir -p org.cups.docset/Contents/Resources/Documentation/help
        mkdir -p org.cups.docset/Contents/Resources/Documentation/images
+       cd man; $(MAKE) $(MFLAGS) html
        cd doc; $(MAKE) $(MFLAGS) docset
        cd cgi-bin; $(MAKE) $(MFLAGS) makedocset
        cgi-bin/makedocset org.cups.docset \
index 8d3fe4f817e50d30d7a770db23a3f19682e3ada9..9dcd2c6eec814c0c2cb24f66b7ee0d33148c73f0 100644 (file)
@@ -318,6 +318,8 @@ print_device(const char *uri,               /* I - Device URI */
 {
   char           serial[1024];         /* Serial number buffer */
   OSStatus       status;               /* Function results */
+  IOReturn       iostatus,             /* Current IO status */
+                 prev_iostatus = 0;    /* Previous IO status */
   pthread_t      read_thread_id,       /* Read thread */
                  sidechannel_thread_id;/* Side-channel thread */
   int            have_sidechannel = 0; /* Was the side-channel thread started? */
@@ -646,28 +648,48 @@ print_device(const char *uri,             /* I - Device URI */
       {
        bytes = g.print_bytes;
 
-       status = (*g.classdriver)->WritePipe(g.classdriver, (UInt8*)print_ptr, &bytes, 0);
+       iostatus = (*g.classdriver)->WritePipe(g.classdriver, (UInt8*)print_ptr, &bytes, 0);
 
        /*
        * Ignore timeout errors, but retain the number of bytes written to
        * avoid sending duplicate data (<rdar://problem/6254911>)...
        */
 
-       if (status == kIOUSBTransactionTimeout)
-         status = 0;
+       if (iostatus == kIOUSBTransactionTimeout)
+         iostatus = 0;
 
-       if (status || bytes < 0)
+       /*
+        * Ignore stall errors, since we clear any stalls in the class driver...
+       */
+
+       if (iostatus == kIOUSBPipeStalled)
+         iostatus = 0;
+
+       /*
+       * Ignore the first "aborted" status we get, since we might have
+       * received a signal (<rdar://problem/6860126>)...
+       */
+
+       if (iostatus == kIOReturnAborted && prev_iostatus != kIOReturnAborted)
+       {
+         prev_iostatus = iostatus;
+         iostatus      = 0;
+       }
+       else
+         prev_iostatus = iostatus;
+
+       if (iostatus || bytes < 0)
        {
         /*
          * Write error - bail if we don't see an error we can retry...
          */
 
-         OSStatus err = (*g.classdriver)->Abort(g.classdriver);
+         IOReturn err = (*g.classdriver)->Abort(g.classdriver);
          _cupsLangPuts(stderr, _("ERROR: Unable to send print data!\n"));
-         fprintf(stderr, "DEBUG: USB class driver WritePipe returned %ld\n",
-                 (long)status);
-         fprintf(stderr, "DEBUG: USB class driver Abort returned %ld\n",
-                 (long)err);
+         fprintf(stderr, "DEBUG: USB class driver WritePipe returned %x\n",
+                 iostatus);
+         fprintf(stderr, "DEBUG: USB class driver Abort returned %x\n",
+                 err);
          status = job_canceled ? CUPS_BACKEND_FAILED : CUPS_BACKEND_STOP;
          break;
        }
index 9c3e67a8aabd78ab86a0f6c7de84ad8e4e5336a3..f0812c81ae55f2e67138a172457dae77aecb3465 100644 (file)
@@ -1084,6 +1084,8 @@ do_am_printer(http_t *http,               /* I - HTTP connection */
 
       if (get_status != HTTP_OK)
       {
+        httpFlush(http);
+
         fprintf(stderr, "ERROR: Unable to get PPD file %s: %d - %s\n",
                uri, get_status, httpStatus(get_status));
       }
diff --git a/cgi-bin/api-cgi.header b/cgi-bin/api-cgi.header
new file mode 100644 (file)
index 0000000..e3355a6
--- /dev/null
@@ -0,0 +1,34 @@
+<!--
+  "$Id: api-array.header 8087 2008-10-27 21:37:05Z mike $"
+
+  CGI API header for CUPS.
+
+  Copyright 2009 by Apple Inc.
+
+  These coded instructions, statements, and computer programs are the
+  property of Apple Inc. and are protected by Federal copyright
+  law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+  which should have been included with this file.  If this file is
+  file is missing or damaged, see the license at "http://www.cups.org/".
+-->
+
+<h1 class='title'>CGI API</h1>
+
+<div class='summary'><table summary='General Information'>
+<thead>
+<tr>
+       <th>Header</th>
+       <th>cups/cgi.h</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+       <th>Library</th>
+       <td>-lcupscgi</td>
+</tr>
+<tr>
+       <th>See Also</th>
+       <td>Programming: <a href='api-overview.html' target='_top'>Introduction to CUPS Programming</a></td>
+</tr>
+</tbody>
+</table></div>
diff --git a/cgi-bin/api-cgi.shtml b/cgi-bin/api-cgi.shtml
new file mode 100644 (file)
index 0000000..cf0413a
--- /dev/null
@@ -0,0 +1,17 @@
+<!--
+  "$Id: api-array.shtml 7616 2008-05-28 00:34:13Z mike $"
+
+  CGI API introduction for CUPS.
+
+  Copyright 2009 by Apple Inc.
+
+  These coded instructions, statements, and computer programs are the
+  property of Apple Inc. and are protected by Federal copyright
+  law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+  which should have been included with this file.  If this file is
+  file is missing or damaged, see the license at "http://www.cups.org/".
+-->
+
+<h2 class='title'><a name='OVERVIEW'>Overview</a></h2>
+
+<p>The CGI API provides Common Gateway Interface functions for CUPS.</p>
index 807c1f60f7373d9a811eecc7425664a3f6182d92..501b1f4996cfd8154a5dbf8941b760593cb595a4 100644 (file)
@@ -317,10 +317,10 @@ write_index(const char   *path,           /* I - File to write */
                   "<head>\n"
                   "<title>CUPS Documentation</title>\n"
                   "<link rel='stylesheet' type='text/css' "
-                  "src='cups-printable.css'>\n"
+                  "href='cups-printable.css'>\n"
                   "</head>\n"
                   "<body>\n"
-                  "<h1>CUPS Documentation</h1>\n"
+                  "<h1 class='title'>CUPS Documentation</h1>\n"
                   "<table width='100%' summary=''>\n"
                   "<tr>\n");
 
index 7ab5f0ebffe2b0d4a4469b04e3b84fd31b26edbd..9ad554d3280b167ab615d72e835e810a5fc096fc 100644 (file)
@@ -307,6 +307,9 @@ case $uname in
                AC_CHECK_HEADER(membershipPriv.h,AC_DEFINE(HAVE_MEMBERSHIPPRIV_H))
                AC_CHECK_FUNCS(mbr_uid_to_uuid)
 
+                dnl Check for the vproc_transaction_begin/end stuff...
+               AC_CHECK_FUNCS(vproc_transaction_begin)
+
                dnl Need <dlfcn.h> header...
                AC_CHECK_HEADER(dlfcn.h,AC_DEFINE(HAVE_DLFCN_H))
 
index b17968927f298b1d68b1e9dfa27e1c5014f4e5c1..da096f59cc6418e4b9efe8e967b16274a4d22441 100644 (file)
 #undef HAVE_LRAND48
 
 
+/*
+ * Do we have vproc_transaction_begin/end?
+ */
+
+#undef HAVE_VPROC_TRANSACTION_BEGIN
+
+
 /*
  * Do we have libusb?
  */
index 825b407543ab11cd6764b57c4b26f41f99399352..0f929c8e4deadf1438345073acf67ac6c1ed25f4 100644 (file)
@@ -3,7 +3,7 @@
 
   Array API header for the Common UNIX Printing System (CUPS).
 
-  Copyright 2008 by Apple Inc.
+  Copyright 2008-2009 by Apple Inc.
 
   These coded instructions, statements, and computer programs are the
   property of Apple Inc. and are protected by Federal copyright
@@ -12,6 +12,8 @@
   file is missing or damaged, see the license at "http://www.cups.org/".
 -->
 
+<h1 class='title'>Array API</h1>
+
 <div class='summary'><table summary='General Information'>
 <thead>
 <tr>
index cc4dd408b88d4b288e1ebaa518b071d82d83ed97..30b34785c08d3624f93dd7470c0d9c27a88bf6a6 100644 (file)
@@ -3,7 +3,7 @@
 
   CUPS API header for the Common UNIX Printing System (CUPS).
 
-  Copyright 2008 by Apple Inc.
+  Copyright 2008-2009 by Apple Inc.
 
   These coded instructions, statements, and computer programs are the
   property of Apple Inc. and are protected by Federal copyright
@@ -12,6 +12,8 @@
   file is missing or damaged, see the license at "http://www.cups.org/".
 -->
 
+<h1 class='title'>CUPS API</h1>
+
 <div class='summary'><table summary='General Information'>
 <thead>
 <tr>
index 2a46a6771320f6c3ab13b9c28204ef6ebdf3fe6c..437e079b594da453efb849840cc2cef1af2ff3d6 100644 (file)
@@ -3,7 +3,7 @@
 
   File and Directory API header for the Common UNIX Printing System (CUPS).
 
-  Copyright 2008 by Apple Inc.
+  Copyright 2008-2009 by Apple Inc.
 
   These coded instructions, statements, and computer programs are the
   property of Apple Inc. and are protected by Federal copyright
@@ -12,6 +12,8 @@
   file is missing or damaged, see the license at "http://www.cups.org/".
 -->
 
+<h1 class='title'>File and Directory APIs</h1>
+
 <div class='summary'><table summary='General Information'>
 <thead>
 <tr>
index 8f12ebcfade3f28daed89cd864ea19f423863a45..ebcd368e2135da5720faf9775f7a183759f57c3b 100644 (file)
@@ -4,7 +4,7 @@
   Filter and backend programming header for the Common UNIX Printing System
   (CUPS).
 
-  Copyright 2008 by Apple Inc.
+  Copyright 2008-2009 by Apple Inc.
 
   These coded instructions, statements, and computer programs are the
   property of Apple Inc. and are protected by Federal copyright
@@ -13,6 +13,8 @@
   file is missing or damaged, see the license at "http://www.cups.org/".
 -->
 
+<h1 class='title'>Filter and Backend Programming</h1>
+
 <div class='summary'><table summary='General Information'>
 <thead>
 <tr>
index 7d2b469738e8e443296fbdc36d9ee942199fb38a..49bf24be3657c7398f83f095cc2c2b9efa4f9dd1 100644 (file)
@@ -4,7 +4,7 @@
   Filter and backend programming introduction for the Common UNIX Printing
   System (CUPS).
 
-  Copyright 2007-2008 by Apple Inc.
+  Copyright 2007-2009 by Apple Inc.
   Copyright 1997-2006 by Easy Software Products, all rights reserved.
 
   These coded instructions, statements, and computer programs are the
@@ -49,6 +49,12 @@ the remaining filters read from the standard input and write to the standard
 output. The backend is the last filter in the chain and writes to the
 device.</p>
 
+<p>Filters are always run as a non-privileged user, typically "lp", with no
+connection to the user's desktop. Backends are run either as a non-privileged
+user or as root if the file permissions do not allow user or group execution.
+The <a href="#PERMISSIONS">file permissions</a> section talks about this in
+more detail.</p>
+
 <h3><a name="SECURITY">Security Considerations</a></h3>
 
 <p>It is always important to use security programming practices. Filters and
@@ -61,7 +67,7 @@ specify an arbitrary file path to a separator page, template, or other file
 used by the filter since that can lead to an unauthorized disclosure of
 information. <em>Always</em> treat input as suspect and validate it!</p>
 
-<p>If you are developing a backend that runs as root, make sure to check for
+<p>If you are developing a backend that runs as root , make sure to check for
 potential buffer overflows, integer under/overflow conditions, and file
 accesses since these can lead to privilege escalations. When writing files,
 always validate the file path and <em>never</em> allow a user to determine
@@ -75,10 +81,23 @@ user may not be the same as the local user and/or there may not be a local home
 directory to write to.</p>
 
 <p>In addition, some operating systems provide additional security mechanisms
-that further limit file system access, even for backends running as root.  On
+that further limit file system access, even for backends running as root. On
 Mac OS X, for example, no backend may write to a user's home directory.</p>
 </blockquote>
 
+<h3><a name="PERMISSIONS">File Permissions</a></h3>
+
+<p>For security reasons, CUPS will only run filters and backends that are owned
+by root and do not have world write permissions. The recommended permissions for
+filters and backends are 0555 - read and execute but no write. Backends that
+must run as root should use permissions of 0500 - read and execute by root, no
+access for other users. Write permissions can be enabled for the root user
+only.</p>
+
+<p>To avoid a warning message, the directory containing your filter(s) must also
+be owned by root and have world write disabled - permissions of 0755 or 0555 are
+strongly encouraged.</p>
+
 <h3><a name="TEMPFILES">Temporary Files</a></h3>
 
 <p>Temporary files should be created in the directory specified by the
index df069fb5907ce81ad84def982571940623bec38c..af08740242054fa7e36d41b4e4664d8ba63a7b3d 100644 (file)
@@ -3,7 +3,7 @@
 
   HTTP and IPP API header for the Common UNIX Printing System (CUPS).
 
-  Copyright 2007-2008 by Apple Inc.
+  Copyright 2007-2009 by Apple Inc.
   Copyright 1997-2006 by Easy Software Products, all rights reserved.
 
   These coded instructions, statements, and computer programs are the
@@ -13,6 +13,8 @@
   file is missing or damaged, see the license at "http://www.cups.org/".
 -->
 
+<h1 class='title'>HTTP and IPP APIs</h1>
+
 <div class='summary'><table summary='General Information'>
 <thead>
 <tr>
index 23cdd4fee5baaa5ea26742c895ec3fce8ddc8c05..892ed1c7e7d430b7671cbf9254b26ea1105d07ed 100644 (file)
@@ -4,7 +4,7 @@
   Introduction to CUPS programming header for the Common UNIX Printing System
   (CUPS).
 
-  Copyright 2008 by Apple Inc.
+  Copyright 2008-2009 by Apple Inc.
 
   These coded instructions, statements, and computer programs are the
   property of Apple Inc. and are protected by Federal copyright
@@ -13,6 +13,8 @@
   file is missing or damaged, see the license at "http://www.cups.org/".
 -->
 
+<h1 class='title'>Introduction to CUPS Programming</h1>
+
 <div class='summary'><table summary='General Information'>
 <thead>
 <tr>
index 5c74e16d1c182a344d3970a6277d76af29d7f888..8763d99962beeeb4ade647fce99ce44af0396126 100644 (file)
@@ -3,7 +3,7 @@
 
   PPD API header for the Common UNIX Printing System (CUPS).
 
-  Copyright 2008 by Apple Inc.
+  Copyright 2008-2009 by Apple Inc.
 
   These coded instructions, statements, and computer programs are the
   property of Apple Inc. and are protected by Federal copyright
@@ -12,6 +12,8 @@
   file is missing or damaged, see the license at "http://www.cups.org/".
 -->
 
+<h1 class='title'>PPD API</h1>
+
 <div class='summary'><table summary='General Information'>
 <thead>
 <tr>
index fa7d056458e074b5ad10e7a8fcd406d40828922d..2df7b697dff4f260b3bdb1246740dcc8b8997aaf 100644 (file)
@@ -3,7 +3,7 @@
  *
  *   Backend functions for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 2007-2008 by Apple Inc.
+ *   Copyright 2007-2009 by Apple Inc.
  *   Copyright 2006 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
@@ -75,7 +75,7 @@ cupsBackendDeviceURI(char **argv)     /* I - Command-line arguments */
  * It handles quoting of special characters in the device-make-and-model,
  * device-info, device-id, and device-location strings.
  *
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
  */
 
 void
index d6de5a39b520de3ba2a51735117d10661d9d8981..11cbb5acde927c67ab65656bf53dc55cd71fe550 100644 (file)
@@ -80,7 +80,7 @@ static cups_array_t   *ppd_test_constraints(ppd_file_t *ppd,
  * the conflicting options.  The returned option array must be freed using
  * @link cupsFreeOptions@.
  *
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
  */
 
 int                                    /* O - Number of conflicting options */
@@ -170,7 +170,7 @@ cupsGetConflicts(
  * choice for the conflicting option, then iterating over all possible choices
  * until a non-conflicting option choice is found.
  *
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
  */
 
 int                                    /* O  - 1 on success, 0 on failure */
@@ -617,7 +617,7 @@ ppdConflicts(ppd_file_t *ppd)               /* I - PPD to check */
  * This function tests whether a particular option choice is available based
  * on constraints against options in the "InstallableOptions" group.
  *
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
  */
 
 int                                    /* O - 1 if conflicting, 0 if not conflicting */
index a4f92e8772447abfc0de5df477042a64f0c54791..6502d95a5f936b815e7c84e1c9b856ef9a1f2159 100644 (file)
@@ -117,8 +117,8 @@ enum cups_ptype_e                   /**** Printer type/capability bit constants ****/
   CUPS_PRINTER_AUTHENTICATED = 0x400000,/* Printer requires authentication @since CUPS 1.2/Mac OS X 10.5@ */
   CUPS_PRINTER_COMMANDS = 0x800000,    /* Printer supports maintenance commands @since CUPS 1.2/Mac OS X 10.5@ */
   CUPS_PRINTER_DISCOVERED = 0x1000000, /* Printer was automatically discovered and added @since CUPS 1.3/Mac OS X 10.5@ */
-  CUPS_PRINTER_SCANNER = 0x2000000,    /* Scanner-only device @since CUPS 1.4@ */
-  CUPS_PRINTER_MFP = 0x4000000,                /* Printer with scanning capabilities @since CUPS 1.4@ */
+  CUPS_PRINTER_SCANNER = 0x2000000,    /* Scanner-only device @since CUPS 1.4/Mac OS X 10.6@ */
+  CUPS_PRINTER_MFP = 0x4000000,                /* Printer with scanning capabilities @since CUPS 1.4/Mac OS X 10.6@ */
   CUPS_PRINTER_OPTIONS = 0x6fffc       /* ~(CLASS | REMOTE | IMPLICIT | DEFAULT | FAX | REJECTING | DELETE | NOT_SHARED | AUTHENTICATED | COMMANDS | DISCOVERED) @private@ */
 };
 
@@ -129,14 +129,14 @@ typedef const char *(*cups_password_cb2_t)(const char *prompt, http_t *http,
                                           const char *method,
                                           const char *resource,
                                           void *user_data);
-                                       /**** New password callback @since CUPS 1.4@ ****/
+                                       /**** New password callback @since CUPS 1.4/Mac OS X 10.6@ ****/
 
 typedef void (*cups_device_cb_t)(const char *device_class,
                                  const char *device_id, const char *device_info,
                                  const char *device_make_and_model,
                                  const char *device_uri,
                                 const char *device_location, void *user_data);
-                                       /**** Device callback @since CUPS 1.4@ ****/
+                                       /**** Device callback @since CUPS 1.4/Mac OS X 10.6@ ****/
 
 typedef struct cups_option_s           /**** Printer Options ****/
 {
index f65e3152d1ba38f4864cf5b630a470939a92292b..4aedcb216bc7cc3528e02841d7d21f3ed4532fab 100644 (file)
@@ -478,7 +478,7 @@ cupsGetDests2(http_t      *http,    /* I - Connection to server or @code CUPS_HTTP_
  * The returned destination must be freed using @link cupsFreeDests@ with a
  * "num_dests" value of 1.
  *
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
  */
 
 cups_dest_t *                          /* O - Destination or @code NULL@ */
index 82c07f66e2078605a5028b29251ef99aa474e77d..bfae5d6f3d7f934af290fd71a9961ee76ec4c48b 100644 (file)
@@ -1156,7 +1156,8 @@ ppd_handle_media(ppd_file_t *ppd) /* I - PPD file */
   if (!strcasecmp(size->name, "Custom") ||
       (!manual_feed && !input_slot) ||
       (manual_feed && !strcasecmp(manual_feed->choice, "False") &&
-       (!input_slot || (input_slot->code && !input_slot->code[0]))))
+       (!input_slot || (input_slot->code && !input_slot->code[0]))) ||
+      (!rpr && ppd->num_filters > 0))
   {
    /*
     * Use PageSize code...
@@ -1164,8 +1165,7 @@ ppd_handle_media(ppd_file_t *ppd) /* I - PPD file */
 
     ppdMarkOption(ppd, "PageSize", size->name);
   }
-  else if ((rpr && rpr->value && !strcasecmp(rpr->value, "True")) ||
-           (!rpr && ppd->num_filters > 0))
+  else if (rpr && rpr->value && !strcasecmp(rpr->value, "True"))
   {
    /*
     * Use PageRegion code...
index 4b9d65e79ffc03976558ac8233c3c7f6e26cc1cb..68e854de399912afb6608c9f86f2d3a3941428e8 100644 (file)
@@ -1196,7 +1196,7 @@ cupsFilePutChar(cups_file_t *fp,  /* I - CUPS file */
  *
  * This function handles any comment escaping of the value.
  *
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
  */
 
 ssize_t                                        /* O - Number of bytes written or -1 on error */
index 81f885912d40b4a373ae4064df46e68d54edce87..6c9dbc84330d727ac352fb8239460c90f89c4c62 100644 (file)
@@ -35,7 +35,7 @@
  * parameters provide comma-delimited lists of backends to include or omit from
  * the request respectively.
  *
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
  */
 
 ipp_status_t                           /* O - Request status - @code IPP_OK@ on success. */
index a717f80c0ad6e10a0248ec852d17ddfb681540d9..ddb2f3a83b3baf9eddae46c1ca1de14852e6d38a 100644 (file)
@@ -1893,7 +1893,9 @@ httpSetField(http_t       *http,  /* I - Connection to server */
     * need to bracket IPv6 numeric addresses.
     */
 
-    if (strchr(value, ':'))
+    char *ptr = strchr(value, ':');
+
+    if (value[0] != '[' && ptr && strchr(ptr + 1, ':'))
     {
      /*
       * Bracket IPv6 numeric addresses...
@@ -1911,8 +1913,7 @@ httpSetField(http_t       *http,  /* I - Connection to server */
       * Check for a trailing dot on the hostname...
       */
 
-      char *ptr = http->fields[HTTP_FIELD_HOST];
-                                       /* Pointer into Host: field */
+      ptr = http->fields[HTTP_FIELD_HOST];
 
       if (*ptr)
       {
index c8c239c0f957c73f0a01ba0a3d67ad82676e5a27..82200ae7d29660dee27333ac2ab4a62ee2c48198 100644 (file)
@@ -423,7 +423,7 @@ ippSetPort(int p)                   /* I - Port number to use */
  *
  * The returned names are defined in RFC 2911 and 3382.
  *
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
  */
 
 const char *                           /* O - Tag name */
@@ -443,7 +443,7 @@ ippTagString(ipp_tag_t tag)         /* I - Tag value */
  *
  * The tag names are defined in RFC 2911 and 3382.
  *
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
  */
 
 ipp_tag_t                              /* O - Tag value */
index 6d182bd4745a9cd3d6485d422b9c783fb06c5cf1..42c5ced2652e1b692e78f39296ba3adf58779df1 100644 (file)
@@ -4,7 +4,7 @@
  *   Internet Printing Protocol definitions for the Common UNIX Printing
  *   System (CUPS).
  *
- *   Copyright 2007-2008 by Apple Inc.
+ *   Copyright 2007-2009 by Apple Inc.
  *   Copyright 1997-2006 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
@@ -248,7 +248,7 @@ typedef enum ipp_op_e                       /**** IPP operations... ****/
   CUPS_MOVE_JOB,                       /* Move a job to a different printer */
   CUPS_AUTHENTICATE_JOB,               /* Authenticate a job @since CUPS 1.2/Mac OS X 10.5@ */
   CUPS_GET_PPD,                                /* Get a PPD file @since CUPS 1.3/Mac OS X 10.5@ */
-  CUPS_GET_DOCUMENT = 0x4027           /* Get a document file @since CUPS 1.4@ */
+  CUPS_GET_DOCUMENT = 0x4027           /* Get a document file @since CUPS 1.4/Mac OS X 10.6@ */
 } ipp_op_t;
 
 /* Old names for the operations */
index 8520e931037a65914c514c8f496a7d66aae0ac06..94a3ffc7a0f2b7ceb10a34ba3acba329d7f9cf7f 100644 (file)
@@ -308,9 +308,7 @@ ppdLocalizeIPPReason(
         message = _("Media tray needs to be filled.");
       else if (!strncmp(reason, "media-jam", 9))
         message = _("Media jam!");
-      else if (!strncmp(reason, "moving-to-paused", 16) ||
-              !strncmp(reason, "offline", 7) ||
-              !strncmp(reason, "paused", 6) ||
+      else if (!strncmp(reason, "offline", 7) ||
               !strncmp(reason, "shutdown", 8))
         message = _("Printer offline.");
       else if (!strncmp(reason, "toner-low", 9))
@@ -503,7 +501,7 @@ ppdLocalizeIPPReason(
  * text from the attribute value. If no localized text for the requested
  * name can be found, @code NULL@ is returned.
  *
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
  */
 
 const char *                           /* O - Value or @code NULL@ if not found */
index 8616c25e09b188640d41943be0e64738d6a47cfb..04c6357dc04a0cc360e8add7624898b7293026d2 100644 (file)
@@ -196,7 +196,7 @@ ppdPageSize(ppd_file_t *ppd,                /* I - PPD file record */
  * If the specified PPD file does not support custom page sizes, both
  * "minimum" and "maximum" are filled with zeroes.
  *
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
  */
 
 int                                    /* O - 1 if custom sizes are supported, 0 otherwise */
index 1a5f34db1a474bfe2f8354c942b1fff2e95f2adb..6f3940eacbdd007f39cf23b3c5faf4c3c71167c8 100644 (file)
@@ -330,7 +330,7 @@ typedef struct ppd_file_s           /**** PPD File ****/
   cups_array_t *marked;                /* Marked choices @since CUPS 1.3/Mac OS X 10.5@ @private@ */
 
   /**** New in CUPS 1.4 ****/
-  cups_array_t *cups_uiconstraints;    /* cupsUIConstraints @since CUPS 1.4@ @private@ */
+  cups_array_t *cups_uiconstraints;    /* cupsUIConstraints @since CUPS 1.4/Mac OS X 10.6@ @private@ */
 } ppd_file_t;
 
 
index 615ef22a214b5eadf75f4c610759097eddd4a360..2d1107676b7c885df9d40aa2cbb29cc31d6ff23d 100644 (file)
@@ -335,7 +335,7 @@ cupsDoRequest(http_t     *http,             /* I - Connection to server or @code CUPS_HTTP_
  * cupsSendDocument() or cupsSendRequest(). For requests that return
  * additional data, use httpRead() after getting a successful response.
  *
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
  */
 
 ipp_t *                                        /* O - Response or @code NULL@ on HTTP error */
@@ -483,7 +483,7 @@ cupsGetResponse(http_t     *http,   /* I - Connection to server or @code CUPS_HTTP
  * This function is used after cupsGetResponse() to read the PPD or document
  * files for CUPS_GET_PPD and CUPS_GET_DOCUMENT requests, respectively.
  *
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
  */
 
 ssize_t                                        /* O - Bytes read, 0 on EOF, -1 on error */
@@ -530,7 +530,7 @@ cupsReadResponseData(
  * Unlike cupsDoFileRequest(), cupsDoIORequest(), and cupsDoRequest(), the
  * request is not freed.
  *
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
  */
 
 http_status_t                          /* O - Initial HTTP status */
@@ -746,7 +746,7 @@ cupsSendRequest(http_t     *http,   /* I - Connection to server or @code CUPS_HTTP
  * This function is used after @link cupsSendRequest@ to provide a PPD and
  * after @link cupsStartDocument@ to provide a document file.
  *
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
  */
 
 http_status_t                          /* O - @code HTTP_CONTINUE@ if OK or HTTP status on error */
index 41db25e67de9b6698435d08b204ca2db3096cb15..92aeb9d9bdeab5d9bffb6340b40cc8b358c63914 100644 (file)
@@ -266,7 +266,7 @@ cupsSideChannelRead(
  * support SNMP queries.  @code CUPS_SC_STATUS_NO_RESPONSE@ is returned when
  * the printer does not respond to the SNMP query.
  *
- * @since CUPS 1.4@ 
+ * @since CUPS 1.4/Mac OS X 10.6
  */
 
 cups_sc_status_t                       /* O  - Query status */
@@ -358,7 +358,7 @@ cupsSideChannelSNMPGet(
  * support SNMP queries.  @code CUPS_SC_STATUS_NO_RESPONSE@ is returned when
  * the printer does not respond to the first SNMP query.
  *
- * @since CUPS 1.4@ 
+ * @since CUPS 1.4/Mac OS X 10.6
  */
 
 cups_sc_status_t                       /* O - Status of first query of @code CUPS_SC_STATUS_OK@ on success */
index f69259ebe1cf891ed14450ffb7fb67dbb5c427b0..8242247cbb252a30da9a6fc5a44eca689a3de223 100644 (file)
@@ -60,8 +60,8 @@ enum cups_sc_command_e                        /**** Request command codes ****/
   CUPS_SC_CMD_GET_BIDI = 3,            /* Return bidirectional capabilities */
   CUPS_SC_CMD_GET_DEVICE_ID = 4,       /* Return the IEEE-1284 device ID */
   CUPS_SC_CMD_GET_STATE = 5,           /* Return the device state */
-  CUPS_SC_CMD_SNMP_GET = 6,            /* Query an SNMP OID @since CUPS 1.4@ */
-  CUPS_SC_CMD_SNMP_GET_NEXT = 7                /* Query the next SNMP OID @since CUPS 1.4@ */
+  CUPS_SC_CMD_SNMP_GET = 6,            /* Query an SNMP OID @since CUPS 1.4/Mac OS X 10.6@ */
+  CUPS_SC_CMD_SNMP_GET_NEXT = 7                /* Query the next SNMP OID @since CUPS 1.4/Mac OS X 10.6@ */
 };
 typedef enum cups_sc_command_e cups_sc_command_t;
                                        /**** Request command codes ****/
index be69e265286ebbc630c103811c812642d40b22ec..48d932703f7e559d6649b0a58da5e587bc2d002f 100644 (file)
@@ -102,7 +102,7 @@ cupsGetPassword(const char *prompt) /* I - Prompt string */
  * Uses the current password callback function. Returns @code NULL@ if the
  * user does not provide a password.
  *
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
  */
 
 const char *                           /* O - Password */
@@ -184,7 +184,7 @@ cupsSetPasswordCB(cups_password_cb_t cb)/* I - Callback function */
  *
  * Pass @code NULL@ to restore the default (console) password callback.
  *
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
  */
 
 void
index b3a51af1b9744136d1603ca1923ba9855a3d285f..fb815ceed613e6c25403c98be25490ec2dd0a15d 100644 (file)
@@ -112,7 +112,7 @@ cupsCancelJob(const char *name,             /* I - Name of printer or class */
  * Use the @link cupsLastError@ and @link cupsLastErrorString@ functions to get
  * the cause of any failure.
  *
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
  */
 
 ipp_status_t                           /* O - IPP status */
@@ -200,7 +200,7 @@ cupsCancelJob2(http_t     *http,    /* I - Connection to server or @code CUPS_HTTP_
  * print, use the @link cupsPrintFile2@ or @link cupsPrintFiles2@ function
  * instead.
  *
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
  */
 
 int                                    /* O - Job ID or 0 on error */
@@ -280,7 +280,7 @@ cupsCreateJob(
  *
  * The document must have been started using @link cupsStartDocument@.
  *
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
  */
 
 ipp_status_t                           /* O - Status of document submission */
@@ -882,7 +882,7 @@ cupsGetPPD2(http_t     *http,               /* I - Connection to server or @code CUPS_HTTP_DE
  * For classes, @code cupsGetPPD3@ returns the PPD file for the first printer
  * in the class.
  *
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
  */
 
 http_status_t                          /* O  - HTTP status */
@@ -1543,7 +1543,7 @@ cupsPrintFiles2(
  * @code CUPS_FORMAT_TEXT@ are provided for the "format" argument, although
  * any supported MIME type string can be supplied.
  *
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
  */
 
 http_status_t                          /* O - HTTP status of request */
index f86f110707578f5599a28cb09d91f843f9c857a5..78d48756b9f2d1c41d3e225eeccec963ea157ece 100644 (file)
@@ -84,6 +84,7 @@ HELPFILES     =       \
                        help/man-lpstat.html \
                        help/man-mime.convs.html \
                        help/man-mime.types.html \
+                       help/man-notifier.html \
                        help/man-ppdc.html \
                        help/man-ppdhtml.html \
                        help/man-ppdi.html \
index a65dd8355e3c60e3dd40c1dffa562755484e6274..cc11262fde403f4e599c95d9857f65879792768d 100644 (file)
@@ -32,7 +32,7 @@ PRE.example {
   background: #eeeeee;
   border: dotted thin #999999;
   margin-left: 36pt;
-  padding: 10px;
+  padding: 10pt;
 }
 
 PRE.command EM, PRE.example EM {
@@ -50,7 +50,7 @@ P.formula {
 }
 
 BLOCKQUOTE {
-  background: #cccccc;
+  background: #eeeeee;
   border: solid thin #999999;
   padding: 10pt;
 }
@@ -162,6 +162,9 @@ H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
   font-size: 100%;
 }
 
+H1.title {
+}
+
 H2.title, H3.title {
   border-bottom: solid 2pt #000000;
 }
index a12db9ca82b9f78fe1ec9d77b6fb60bdfc358598..5b78171af8b7eea397af6f2c63b6a6d02017f102 100644 (file)
@@ -238,6 +238,10 @@ H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
   color: white;
 }
 
+H1.title {
+  display: none;
+}
+
 H2.title, H3.title {
   border-bottom: solid 1pt #999999;
 }
index 5860fe223da5c22b403396b44b56732eadfee87c..fe995956f361788febfdff99111886532086b035 100644 (file)
@@ -2,9 +2,12 @@
 <!-- SECTION: Getting Started -->
 <HEAD>
        <TITLE>Printer Accounting Basics</TITLE>
+       <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
 </HEAD>
 <BODY>
 
+<H1 CLASS="title">Printer Accounting Basics</H1>
+
 <P>CUPS supports a variety of printer accounting schemes. Aside from the
 built-in <A HREF="#QUOTAS">quota</A> and <A HREF="#PAGELOG">page logging</A>
 support, there are several third-party solutions that can be found on
index 95b308006b34b31de7100c730a70734334c809e3..3ee3a12b4199db8fef5e53aaf65fe48775e64ef1 100644 (file)
@@ -40,7 +40,7 @@ PRE.example {
   background: #eeeeee;
   border: dotted thin #999999;
   margin-left: 36pt;
-  padding: 10px;
+  padding: 10pt;
 }
 
 PRE.command EM, PRE.example EM {
@@ -58,7 +58,7 @@ P.formula {
 }
 
 BLOCKQUOTE {
-  background: #cccccc;
+  background: #eeeeee;
   border: solid thin #999999;
   padding: 10pt;
 }
@@ -170,6 +170,9 @@ H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
   font-size: 100%;
 }
 
+H1.title {
+}
+
 H2.title, H3.title {
   border-bottom: solid 2pt #000000;
 }
@@ -335,11 +338,11 @@ div.contents ul.subcontents li {
 <body>
 <div class='body'>
 <!--
-  "$Id: api-array.header 8087 2008-10-27 21:37:05Z mike $"
+  "$Id: api-array.header 8627 2009-05-13 21:39:17Z mike $"
 
   Array API header for the Common UNIX Printing System (CUPS).
 
-  Copyright 2008 by Apple Inc.
+  Copyright 2008-2009 by Apple Inc.
 
   These coded instructions, statements, and computer programs are the
   property of Apple Inc. and are protected by Federal copyright
@@ -348,6 +351,8 @@ div.contents ul.subcontents li {
   file is missing or damaged, see the license at "http://www.cups.org/".
 -->
 
+<h1 class='title'>Array API</h1>
+
 <div class='summary'><table summary='General Information'>
 <thead>
 <tr>
index 756294840447f727a68fb3407dad6c7dabd34f56..0951f4d7a5407c55d8df3455cc0902f3f1c4755c 100644 (file)
@@ -40,7 +40,7 @@ PRE.example {
   background: #eeeeee;
   border: dotted thin #999999;
   margin-left: 36pt;
-  padding: 10px;
+  padding: 10pt;
 }
 
 PRE.command EM, PRE.example EM {
@@ -58,7 +58,7 @@ P.formula {
 }
 
 BLOCKQUOTE {
-  background: #cccccc;
+  background: #eeeeee;
   border: solid thin #999999;
   padding: 10pt;
 }
@@ -170,6 +170,9 @@ H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
   font-size: 100%;
 }
 
+H1.title {
+}
+
 H2.title, H3.title {
   border-bottom: solid 2pt #000000;
 }
@@ -334,8 +337,44 @@ div.contents ul.subcontents li {
 </head>
 <body>
 <div class='body'>
+<!--
+  "$Id: api-array.header 8087 2008-10-27 21:37:05Z mike $"
+
+  CGI API header for CUPS.
+
+  Copyright 2009 by Apple Inc.
+
+  These coded instructions, statements, and computer programs are the
+  property of Apple Inc. and are protected by Federal copyright
+  law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+  which should have been included with this file.  If this file is
+  file is missing or damaged, see the license at "http://www.cups.org/".
+-->
+
+<h1 class='title'>CGI API</h1>
+
+<div class='summary'><table summary='General Information'>
+<thead>
+<tr>
+       <th>Header</th>
+       <th>cups/cgi.h</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+       <th>Library</th>
+       <td>-lcupscgi</td>
+</tr>
+<tr>
+       <th>See Also</th>
+       <td>Programming: <a href='api-overview.html' target='_top'>Introduction to CUPS Programming</a></td>
+</tr>
+</tbody>
+</table></div>
 <h2 class="title">Contents</h2>
 <ul class="contents">
+<ul class="subcontents">
+<li><a href="#OVERVIEW">Overview</a></li>
 <li><a href="#FUNCTIONS">Functions</a><ul class="code">
 <li><a href="#cgiCheckVariables" title="Check for the presence of &quot;required&quot; variables.">cgiCheckVariables</a></li>
 <li><a href="#cgiCompileSearch" title="Compile a search string.">cgiCompileSearch</a></li>
@@ -391,6 +430,23 @@ by the template file.">cgiGetAttributes</a></li>
        <li><a href="#help_node_s" title="Help node structure...">help_node_s</a></li>
        <li><a href="#help_word_s" title="Help word structure...">help_word_s</a></li>
 </ul></li>
+<!--
+  "$Id: api-array.shtml 7616 2008-05-28 00:34:13Z mike $"
+
+  CGI API introduction for CUPS.
+
+  Copyright 2009 by Apple Inc.
+
+  These coded instructions, statements, and computer programs are the
+  property of Apple Inc. and are protected by Federal copyright
+  law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+  which should have been included with this file.  If this file is
+  file is missing or damaged, see the license at "http://www.cups.org/".
+-->
+
+<h2 class='title'><a name='OVERVIEW'>Overview</a></h2>
+
+<p>The CGI API provides Common Gateway Interface functions for CUPS.</p>
 <h2 class="title"><a name="FUNCTIONS">Functions</a></h2>
 <h3 class="function"><a name="cgiCheckVariables">cgiCheckVariables</a></h3>
 <p class="description">Check for the presence of &quot;required&quot; variables.</p>
index dcfa36fa1709b41ebfd4e59b6e989882c50da77f..c633e8d0221c167b9612b1f93affc93e47a30e5f 100644 (file)
@@ -40,7 +40,7 @@ PRE.example {
   background: #eeeeee;
   border: dotted thin #999999;
   margin-left: 36pt;
-  padding: 10px;
+  padding: 10pt;
 }
 
 PRE.command EM, PRE.example EM {
@@ -58,7 +58,7 @@ P.formula {
 }
 
 BLOCKQUOTE {
-  background: #cccccc;
+  background: #eeeeee;
   border: solid thin #999999;
   padding: 10pt;
 }
@@ -170,6 +170,9 @@ H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
   font-size: 100%;
 }
 
+H1.title {
+}
+
 H2.title, H3.title {
   border-bottom: solid 2pt #000000;
 }
@@ -335,11 +338,11 @@ div.contents ul.subcontents li {
 <body>
 <div class='body'>
 <!--
-  "$Id: api-cups.header 8087 2008-10-27 21:37:05Z mike $"
+  "$Id: api-cups.header 8627 2009-05-13 21:39:17Z mike $"
 
   CUPS API header for the Common UNIX Printing System (CUPS).
 
-  Copyright 2008 by Apple Inc.
+  Copyright 2008-2009 by Apple Inc.
 
   These coded instructions, statements, and computer programs are the
   property of Apple Inc. and are protected by Federal copyright
@@ -348,6 +351,8 @@ div.contents ul.subcontents li {
   file is missing or damaged, see the license at "http://www.cups.org/".
 -->
 
+<h1 class='title'>CUPS API</h1>
+
 <div class='summary'><table summary='General Information'>
 <thead>
 <tr>
@@ -1085,7 +1090,7 @@ to cancel the current job on the named destination.<br>
 <br>
 Use the <a href="#cupsLastError"><code>cupsLastError</code></a> and <a href="#cupsLastErrorString"><code>cupsLastErrorString</code></a> functions to get
 the cause of any failure.</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.4&nbsp;</span><a name="cupsCancelJob2">cupsCancelJob2</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.4/Mac OS X 10.6&nbsp;</span><a name="cupsCancelJob2">cupsCancelJob2</a></h3>
 <p class="description">Cancel or purge a print job.</p>
 <p class="code">
 ipp_status_t cupsCancelJob2 (<br>
@@ -1118,7 +1123,7 @@ Use the <a href="#cupsLastError"><code>cupsLastError</code></a> and <a href="#cu
 the cause of any failure.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.4&nbsp;</span><a name="cupsCreateJob">cupsCreateJob</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.4/Mac OS X 10.6&nbsp;</span><a name="cupsCreateJob">cupsCreateJob</a></h3>
 <p class="description">Create an empty job for streaming.</p>
 <p class="code">
 int cupsCreateJob (<br>
@@ -1162,7 +1167,7 @@ http_encryption_t cupsEncryption (void);</p>
 environment variable, then the ~/.cups/client.conf file, and finally the
 /etc/cups/client.conf file. If not set, the default is
 <code>HTTP_ENCRYPT_IF_REQUESTED</code>.</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.4&nbsp;</span><a name="cupsFinishDocument">cupsFinishDocument</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.4/Mac OS X 10.6&nbsp;</span><a name="cupsFinishDocument">cupsFinishDocument</a></h3>
 <p class="description">Finish sending a document.</p>
 <p class="code">
 ipp_status_t cupsFinishDocument (<br>
@@ -1413,7 +1418,7 @@ pending, processing, or held and <code>CUPS_WHICHJOBS_COMPLETED</code> returns
 jobs that are stopped, canceled, aborted, or completed.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.4&nbsp;</span><a name="cupsGetNamedDest">cupsGetNamedDest</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.4/Mac OS X 10.6&nbsp;</span><a name="cupsGetNamedDest">cupsGetNamedDest</a></h3>
 <p class="description">Get options for the named destination.</p>
 <p class="code">
 <a href="#cups_dest_t">cups_dest_t</a> *cupsGetNamedDest (<br>
@@ -1511,7 +1516,7 @@ The returned filename is stored in a static buffer and is overwritten with
 each call to <a href="#cupsGetPPD"><code>cupsGetPPD</code></a> or <code>cupsGetPPD2</code>.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.4&nbsp;</span><a name="cupsGetPPD3">cupsGetPPD3</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.4/Mac OS X 10.6&nbsp;</span><a name="cupsGetPPD3">cupsGetPPD3</a></h3>
 <p class="description">Get the PPD file for a printer on the specified
 server if it has changed.</p>
 <p class="code">
@@ -1570,7 +1575,7 @@ const char *cupsGetPassword (<br>
 <h4 class="discussion">Discussion</h4>
 <p class="discussion">Uses the current password callback function. Returns <code>NULL</code> if the
 user does not provide a password.</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.4&nbsp;</span><a name="cupsGetPassword2">cupsGetPassword2</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.4/Mac OS X 10.6&nbsp;</span><a name="cupsGetPassword2">cupsGetPassword2</a></h3>
 <p class="description">Get a password from the user using the advanced
 callback.</p>
 <p class="code">
@@ -2026,7 +2031,7 @@ void cupsSetPasswordCB (<br>
 </dl>
 <h4 class="discussion">Discussion</h4>
 <p class="discussion">Pass <code>NULL</code> to restore the default (console) password callback.</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.4&nbsp;</span><a name="cupsSetPasswordCB2">cupsSetPasswordCB2</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.4/Mac OS X 10.6&nbsp;</span><a name="cupsSetPasswordCB2">cupsSetPasswordCB2</a></h3>
 <p class="description">Set the advanced password callback for CUPS.</p>
 <p class="code">
 void cupsSetPasswordCB2 (<br>
@@ -2072,7 +2077,7 @@ void cupsSetUser (<br>
 </dl>
 <h4 class="discussion">Discussion</h4>
 <p class="discussion">Pass <code>NULL</code> to restore the default user name.</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.4&nbsp;</span><a name="cupsStartDocument">cupsStartDocument</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.4/Mac OS X 10.6&nbsp;</span><a name="cupsStartDocument">cupsStartDocument</a></h3>
 <p class="description">Add a document to a job created with cupsCreateJob().</p>
 <p class="code">
 http_status_t cupsStartDocument (<br>
@@ -2184,7 +2189,7 @@ const char *cupsUser (void);</p>
 <p class="code">
 typedef struct <a href="#cups_dest_s">cups_dest_s</a> cups_dest_t;
 </p>
-<h3 class="typedef"><span class="info">&nbsp;CUPS 1.4&nbsp;</span><a name="cups_device_cb_t">cups_device_cb_t</a></h3>
+<h3 class="typedef"><span class="info">&nbsp;CUPS 1.4/Mac OS X 10.6&nbsp;</span><a name="cups_device_cb_t">cups_device_cb_t</a></h3>
 <p class="description">Device callback </p>
 <p class="code">
 typedef void (*cups_device_cb_t)(const char *device_class, const char *device_id, const char *device_info, const char *device_make_and_model, const char *device_uri, const char *device_location, void *user_data);
@@ -2199,7 +2204,7 @@ typedef struct <a href="#cups_job_s">cups_job_s</a> cups_job_t;
 <p class="code">
 typedef struct <a href="#cups_option_s">cups_option_s</a> cups_option_t;
 </p>
-<h3 class="typedef"><span class="info">&nbsp;CUPS 1.4&nbsp;</span><a name="cups_password_cb2_t">cups_password_cb2_t</a></h3>
+<h3 class="typedef"><span class="info">&nbsp;CUPS 1.4/Mac OS X 10.6&nbsp;</span><a name="cups_password_cb2_t">cups_password_cb2_t</a></h3>
 <p class="description">New password callback </p>
 <p class="code">
 typedef const char *(*cups_password_cb2_t)(const char *prompt, http_t *http, const char *method, const char *resource, void *user_data);
@@ -2328,7 +2333,7 @@ typedef unsigned cups_ptype_t;
 <dd class="description">Local printer or class</dd>
 <dt>CUPS_PRINTER_MEDIUM </dt>
 <dd class="description">Can do Tabloid/B/C/A3/A2</dd>
-<dt>CUPS_PRINTER_MFP <span class="info">&nbsp;CUPS 1.4&nbsp;</span></dt>
+<dt>CUPS_PRINTER_MFP <span class="info">&nbsp;CUPS 1.4/Mac OS X 10.6&nbsp;</span></dt>
 <dd class="description">Printer with scanning capabilities </dd>
 <dt>CUPS_PRINTER_NOT_SHARED <span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span></dt>
 <dd class="description">Printer is not shared </dd>
@@ -2338,7 +2343,7 @@ typedef unsigned cups_ptype_t;
 <dd class="description">Printer is rejecting jobs</dd>
 <dt>CUPS_PRINTER_REMOTE </dt>
 <dd class="description">Remote printer or class</dd>
-<dt>CUPS_PRINTER_SCANNER <span class="info">&nbsp;CUPS 1.4&nbsp;</span></dt>
+<dt>CUPS_PRINTER_SCANNER <span class="info">&nbsp;CUPS 1.4/Mac OS X 10.6&nbsp;</span></dt>
 <dd class="description">Scanner-only device </dd>
 <dt>CUPS_PRINTER_SMALL </dt>
 <dd class="description">Can do Letter/Legal/A4</dd>
index 7278a803830470e4b305d9a20f11708f9e0a3958..7f73c547c16855ace19b0aea1c6d8bbaad0b98ff 100644 (file)
@@ -40,7 +40,7 @@ PRE.example {
   background: #eeeeee;
   border: dotted thin #999999;
   margin-left: 36pt;
-  padding: 10px;
+  padding: 10pt;
 }
 
 PRE.command EM, PRE.example EM {
@@ -58,7 +58,7 @@ P.formula {
 }
 
 BLOCKQUOTE {
-  background: #cccccc;
+  background: #eeeeee;
   border: solid thin #999999;
   padding: 10pt;
 }
@@ -170,6 +170,9 @@ H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
   font-size: 100%;
 }
 
+H1.title {
+}
+
 H2.title, H3.title {
   border-bottom: solid 2pt #000000;
 }
@@ -334,8 +337,44 @@ div.contents ul.subcontents li {
 </head>
 <body>
 <div class='body'>
+<!--
+  "$Id: api-array.header 8087 2008-10-27 21:37:05Z mike $"
+
+  Driver API header for CUPS.
+
+  Copyright 2009 by Apple Inc.
+
+  These coded instructions, statements, and computer programs are the
+  property of Apple Inc. and are protected by Federal copyright
+  law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+  which should have been included with this file.  If this file is
+  file is missing or damaged, see the license at "http://www.cups.org/".
+-->
+
+<h1 class='title'>Driver API</h1>
+
+<div class='summary'><table summary='General Information'>
+<thead>
+<tr>
+       <th>Header</th>
+       <th>cups/driver.h</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+       <th>Library</th>
+       <td>-lcupsdriver</td>
+</tr>
+<tr>
+       <th>See Also</th>
+       <td>Programming: <a href='api-overview.html' target='_top'>Introduction to CUPS Programming</a></td>
+</tr>
+</tbody>
+</table></div>
 <h2 class="title">Contents</h2>
 <ul class="contents">
+<ul class="subcontents">
+<li><a href="#OVERVIEW">Overview</a></li>
 <li><a href="#FUNCTIONS">Functions</a><ul class="code">
 <li><a href="#cupsCMYKDelete" title="Delete a color separation.">cupsCMYKDelete</a></li>
 <li><a href="#cupsCMYKDoBlack" title="Do a black separation...">cupsCMYKDoBlack</a></li>
@@ -387,6 +426,24 @@ media, and resolution.">cupsFindAttr</a></li>
        <li><a href="#cups_scmy_lut[256]" title="sRGB gamma lookup table (inverted)">cups_scmy_lut[256]</a></li>
        <li><a href="#cups_srgb_lut[256]" title="sRGB gamma lookup table">cups_srgb_lut[256]</a></li>
 </ul></li>
+<!--
+  "$Id: api-array.shtml 7616 2008-05-28 00:34:13Z mike $"
+
+  Driver API introduction for CUPS.
+
+  Copyright 2009 by Apple Inc.
+
+  These coded instructions, statements, and computer programs are the
+  property of Apple Inc. and are protected by Federal copyright
+  law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+  which should have been included with this file.  If this file is
+  file is missing or damaged, see the license at "http://www.cups.org/".
+-->
+
+<h2 class='title'><a name='OVERVIEW'>Overview</a></h2>
+
+<p>The driver API provides common dithering, color conversion, and utility
+functions for CUPS drivers.</p>
 <h2 class="title"><a name="FUNCTIONS">Functions</a></h2>
 <h3 class="function"><a name="cupsCMYKDelete">cupsCMYKDelete</a></h3>
 <p class="description">Delete a color separation.</p>
index a91c7d27370db4a61d012fd97f461b49adbe8a10..a3e625db91757bea3bb12eb671e2193365db1a7e 100644 (file)
@@ -40,7 +40,7 @@ PRE.example {
   background: #eeeeee;
   border: dotted thin #999999;
   margin-left: 36pt;
-  padding: 10px;
+  padding: 10pt;
 }
 
 PRE.command EM, PRE.example EM {
@@ -58,7 +58,7 @@ P.formula {
 }
 
 BLOCKQUOTE {
-  background: #cccccc;
+  background: #eeeeee;
   border: solid thin #999999;
   padding: 10pt;
 }
@@ -170,6 +170,9 @@ H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
   font-size: 100%;
 }
 
+H1.title {
+}
+
 H2.title, H3.title {
   border-bottom: solid 2pt #000000;
 }
@@ -335,11 +338,11 @@ div.contents ul.subcontents li {
 <body>
 <div class='body'>
 <!--
-  "$Id: api-filedir.header 8087 2008-10-27 21:37:05Z mike $"
+  "$Id: api-filedir.header 8627 2009-05-13 21:39:17Z mike $"
 
   File and Directory API header for the Common UNIX Printing System (CUPS).
 
-  Copyright 2008 by Apple Inc.
+  Copyright 2008-2009 by Apple Inc.
 
   These coded instructions, statements, and computer programs are the
   property of Apple Inc. and are protected by Federal copyright
@@ -348,6 +351,8 @@ div.contents ul.subcontents li {
   file is missing or damaged, see the license at "http://www.cups.org/".
 -->
 
+<h1 class='title'>File and Directory APIs</h1>
+
 <div class='summary'><table summary='General Information'>
 <thead>
 <tr>
@@ -797,7 +802,7 @@ int cupsFilePutChar (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">0 on success, -1 on error</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.4&nbsp;</span><a name="cupsFilePutConf">cupsFilePutConf</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.4/Mac OS X 10.6&nbsp;</span><a name="cupsFilePutConf">cupsFilePutConf</a></h3>
 <p class="description">Write a configuration line.</p>
 <p class="code">
 ssize_t cupsFilePutConf (<br>
index 29347b08ac21cc5a374c01d1d95a6be7fe4520d5..e7686298e355ed9b8e32fb5556a2311f7171f1e5 100644 (file)
@@ -40,7 +40,7 @@ PRE.example {
   background: #eeeeee;
   border: dotted thin #999999;
   margin-left: 36pt;
-  padding: 10px;
+  padding: 10pt;
 }
 
 PRE.command EM, PRE.example EM {
@@ -58,7 +58,7 @@ P.formula {
 }
 
 BLOCKQUOTE {
-  background: #cccccc;
+  background: #eeeeee;
   border: solid thin #999999;
   padding: 10pt;
 }
@@ -170,6 +170,9 @@ H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
   font-size: 100%;
 }
 
+H1.title {
+}
+
 H2.title, H3.title {
   border-bottom: solid 2pt #000000;
 }
@@ -335,12 +338,12 @@ div.contents ul.subcontents li {
 <body>
 <div class='body'>
 <!--
-  "$Id: api-filter.header 8087 2008-10-27 21:37:05Z mike $"
+  "$Id: api-filter.header 8627 2009-05-13 21:39:17Z mike $"
 
   Filter and backend programming header for the Common UNIX Printing System
   (CUPS).
 
-  Copyright 2008 by Apple Inc.
+  Copyright 2008-2009 by Apple Inc.
 
   These coded instructions, statements, and computer programs are the
   property of Apple Inc. and are protected by Federal copyright
@@ -349,6 +352,8 @@ div.contents ul.subcontents li {
   file is missing or damaged, see the license at "http://www.cups.org/".
 -->
 
+<h1 class='title'>Filter and Backend Programming</h1>
+
 <div class='summary'><table summary='General Information'>
 <thead>
 <tr>
@@ -377,6 +382,7 @@ div.contents ul.subcontents li {
 <ul class="subcontents">
 <li><a href="#OVERVIEW">Overview</a><ul class="subcontents">
 <li><a href="#SECURITY">Security Considerations</a></li>
+<li><a href="#PERMISSIONS">File Permissions</a></li>
 <li><a href="#TEMPFILES">Temporary Files</a></li>
 <li><a href="#COPIES">Copy Generation</a></li>
 <li><a href="#EXITCODES">Exit Codes</a></li>
@@ -418,7 +424,7 @@ div.contents ul.subcontents li {
   Filter and backend programming introduction for the Common UNIX Printing
   System (CUPS).
 
-  Copyright 2007-2008 by Apple Inc.
+  Copyright 2007-2009 by Apple Inc.
   Copyright 1997-2006 by Easy Software Products, all rights reserved.
 
   These coded instructions, statements, and computer programs are the
@@ -463,6 +469,12 @@ the remaining filters read from the standard input and write to the standard
 output. The backend is the last filter in the chain and writes to the
 device.</p>
 
+<p>Filters are always run as a non-privileged user, typically "lp", with no
+connection to the user's desktop. Backends are run either as a non-privileged
+user or as root if the file permissions do not allow user or group execution.
+The <a href="#PERMISSIONS">file permissions</a> section talks about this in
+more detail.</p>
+
 <h3><a name="SECURITY">Security Considerations</a></h3>
 
 <p>It is always important to use security programming practices. Filters and
@@ -475,7 +487,7 @@ specify an arbitrary file path to a separator page, template, or other file
 used by the filter since that can lead to an unauthorized disclosure of
 information. <em>Always</em> treat input as suspect and validate it!</p>
 
-<p>If you are developing a backend that runs as root, make sure to check for
+<p>If you are developing a backend that runs as root , make sure to check for
 potential buffer overflows, integer under/overflow conditions, and file
 accesses since these can lead to privilege escalations. When writing files,
 always validate the file path and <em>never</em> allow a user to determine
@@ -489,10 +501,23 @@ user may not be the same as the local user and/or there may not be a local home
 directory to write to.</p>
 
 <p>In addition, some operating systems provide additional security mechanisms
-that further limit file system access, even for backends running as root.  On
+that further limit file system access, even for backends running as root. On
 Mac OS X, for example, no backend may write to a user's home directory.</p>
 </blockquote>
 
+<h3><a name="PERMISSIONS">File Permissions</a></h3>
+
+<p>For security reasons, CUPS will only run filters and backends that are owned
+by root and do not have world write permissions. The recommended permissions for
+filters and backends are 0555 - read and execute but no write. Backends that
+must run as root should use permissions of 0500 - read and execute by root, no
+access for other users. Write permissions can be enabled for the root user
+only.</p>
+
+<p>To avoid a warning message, the directory containing your filter(s) must also
+be owned by root and have world write disabled - permissions of 0755 or 0555 are
+strongly encouraged.</p>
+
 <h3><a name="TEMPFILES">Temporary Files</a></h3>
 
 <p>Temporary files should be created in the directory specified by the
@@ -1042,7 +1067,7 @@ variable or the device URI passed in argv[0], whichever is found
 first.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.4&nbsp;</span><a name="cupsBackendReport">cupsBackendReport</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.4/Mac OS X 10.6&nbsp;</span><a name="cupsBackendReport">cupsBackendReport</a></h3>
 <p class="description">Write a device line from a backend.</p>
 <p class="code">
 void cupsBackendReport (<br>
@@ -1144,7 +1169,7 @@ pointed to by the &quot;data&quot; parameter.  cupsSideChannelDoRequest() will
 update the value to contain the number of data bytes in the buffer.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.4&nbsp;</span><a name="cupsSideChannelSNMPGet">cupsSideChannelSNMPGet</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.4/Mac OS X 10.6&nbsp;</span><a name="cupsSideChannelSNMPGet">cupsSideChannelSNMPGet</a></h3>
 <p class="description">Query a SNMP OID's value.</p>
 <p class="code">
 <a href="#cups_sc_status_t">cups_sc_status_t</a> cupsSideChannelSNMPGet (<br>
@@ -1185,7 +1210,7 @@ support SNMP queries.  <code>CUPS_SC_STATUS_NO_RESPONSE</code> is returned when
 the printer does not respond to the SNMP query.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.4&nbsp;</span><a name="cupsSideChannelSNMPWalk">cupsSideChannelSNMPWalk</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.4/Mac OS X 10.6&nbsp;</span><a name="cupsSideChannelSNMPWalk">cupsSideChannelSNMPWalk</a></h3>
 <p class="description">Query multiple SNMP OID values.</p>
 <p class="code">
 <a href="#cups_sc_status_t">cups_sc_status_t</a> cupsSideChannelSNMPWalk (<br>
@@ -1331,9 +1356,9 @@ typedef void (*cups_sc_walk_func_t)(const char *oid, const char *data, int datal
 <dd class="description">Return the IEEE-1284 device ID</dd>
 <dt>CUPS_SC_CMD_GET_STATE </dt>
 <dd class="description">Return the device state</dd>
-<dt>CUPS_SC_CMD_SNMP_GET <span class="info">&nbsp;CUPS 1.4&nbsp;</span></dt>
+<dt>CUPS_SC_CMD_SNMP_GET <span class="info">&nbsp;CUPS 1.4/Mac OS X 10.6&nbsp;</span></dt>
 <dd class="description">Query an SNMP OID </dd>
-<dt>CUPS_SC_CMD_SNMP_GET_NEXT <span class="info">&nbsp;CUPS 1.4&nbsp;</span></dt>
+<dt>CUPS_SC_CMD_SNMP_GET_NEXT <span class="info">&nbsp;CUPS 1.4/Mac OS X 10.6&nbsp;</span></dt>
 <dd class="description">Query the next SNMP OID </dd>
 <dt>CUPS_SC_CMD_SOFT_RESET </dt>
 <dd class="description">Do a soft reset</dd>
index 444fe58702aaacfb60929307427ad10a05974e62..9b3096b59ee31ed5ac01675d5e3fce9a2375ffd8 100644 (file)
@@ -40,7 +40,7 @@ PRE.example {
   background: #eeeeee;
   border: dotted thin #999999;
   margin-left: 36pt;
-  padding: 10px;
+  padding: 10pt;
 }
 
 PRE.command EM, PRE.example EM {
@@ -58,7 +58,7 @@ P.formula {
 }
 
 BLOCKQUOTE {
-  background: #cccccc;
+  background: #eeeeee;
   border: solid thin #999999;
   padding: 10pt;
 }
@@ -170,6 +170,9 @@ H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
   font-size: 100%;
 }
 
+H1.title {
+}
+
 H2.title, H3.title {
   border-bottom: solid 2pt #000000;
 }
@@ -335,11 +338,11 @@ div.contents ul.subcontents li {
 <body>
 <div class='body'>
 <!--
-  "$Id: api-httpipp.header 8087 2008-10-27 21:37:05Z mike $"
+  "$Id: api-httpipp.header 8627 2009-05-13 21:39:17Z mike $"
 
   HTTP and IPP API header for the Common UNIX Printing System (CUPS).
 
-  Copyright 2007-2008 by Apple Inc.
+  Copyright 2007-2009 by Apple Inc.
   Copyright 1997-2006 by Easy Software Products, all rights reserved.
 
   These coded instructions, statements, and computer programs are the
@@ -349,6 +352,8 @@ div.contents ul.subcontents li {
   file is missing or damaged, see the license at "http://www.cups.org/".
 -->
 
+<h1 class='title'>HTTP and IPP APIs</h1>
+
 <div class='summary'><table summary='General Information'>
 <thead>
 <tr>
@@ -1063,7 +1068,7 @@ function multiple times for each group, or use cupsEncodeOptions()
 to add the standard groups.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.4&nbsp;</span><a name="cupsGetDevices">cupsGetDevices</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.4/Mac OS X 10.6&nbsp;</span><a name="cupsGetDevices">cupsGetDevices</a></h3>
 <p class="description">Get available printer devices.</p>
 <p class="code">
 ipp_status_t cupsGetDevices (<br>
@@ -1145,7 +1150,7 @@ the request respectively.
 <p class="discussion">This function returns <code>HTTP_OK</code> when the file is successfully retrieved.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.4&nbsp;</span><a name="cupsGetResponse">cupsGetResponse</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.4/Mac OS X 10.6&nbsp;</span><a name="cupsGetResponse">cupsGetResponse</a></h3>
 <p class="description">Get a response to an IPP request.</p>
 <p class="code">
 <a href="#ipp_t">ipp_t</a> *cupsGetResponse (<br>
@@ -1215,7 +1220,7 @@ successfully.
 successfully.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.4&nbsp;</span><a name="cupsReadResponseData">cupsReadResponseData</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.4/Mac OS X 10.6&nbsp;</span><a name="cupsReadResponseData">cupsReadResponseData</a></h3>
 <p class="description">Read additional data after the IPP response.</p>
 <p class="code">
 ssize_t cupsReadResponseData (<br>
@@ -1239,7 +1244,7 @@ ssize_t cupsReadResponseData (<br>
 files for CUPS_GET_PPD and CUPS_GET_DOCUMENT requests, respectively.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.4&nbsp;</span><a name="cupsSendRequest">cupsSendRequest</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.4/Mac OS X 10.6&nbsp;</span><a name="cupsSendRequest">cupsSendRequest</a></h3>
 <p class="description">Send an IPP request.</p>
 <p class="code">
 <a href="#http_status_t">http_status_t</a> cupsSendRequest (<br>
@@ -1271,7 +1276,7 @@ Unlike cupsDoFileRequest(), cupsDoIORequest(), and cupsDoRequest(), the
 request is not freed.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.4&nbsp;</span><a name="cupsWriteRequestData">cupsWriteRequestData</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.4/Mac OS X 10.6&nbsp;</span><a name="cupsWriteRequestData">cupsWriteRequestData</a></h3>
 <p class="description">Write additional data after an IPP request.</p>
 <p class="code">
 <a href="#http_status_t">http_status_t</a> cupsWriteRequestData (<br>
@@ -3136,7 +3141,7 @@ void ippSetPort (<br>
 <dt>p</dt>
 <dd class="description">Port number to use</dd>
 </dl>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.4&nbsp;</span><a name="ippTagString">ippTagString</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.4/Mac OS X 10.6&nbsp;</span><a name="ippTagString">ippTagString</a></h3>
 <p class="description">Return the tag name corresponding to a tag value.</p>
 <p class="code">
 const char *ippTagString (<br>
@@ -3153,7 +3158,7 @@ const char *ippTagString (<br>
 <p class="discussion">The returned names are defined in RFC 2911 and 3382.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.4&nbsp;</span><a name="ippTagValue">ippTagValue</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.4/Mac OS X 10.6&nbsp;</span><a name="ippTagValue">ippTagValue</a></h3>
 <p class="description">Return the tag value corresponding to a tag name.</p>
 <p class="code">
 <a href="#ipp_tag_t">ipp_tag_t</a> ippTagValue (<br>
@@ -3882,7 +3887,7 @@ are server-oriented...</p>
 <dd class="description">Get the default printer</dd>
 <dt>CUPS_GET_DEVICES </dt>
 <dd class="description">Get a list of supported devices</dd>
-<dt>CUPS_GET_DOCUMENT <span class="info">&nbsp;CUPS 1.4&nbsp;</span></dt>
+<dt>CUPS_GET_DOCUMENT <span class="info">&nbsp;CUPS 1.4/Mac OS X 10.6&nbsp;</span></dt>
 <dd class="description">Get a document file </dd>
 <dt>CUPS_GET_PPD <span class="info">&nbsp;CUPS 1.3/Mac OS X 10.5&nbsp;</span></dt>
 <dd class="description">Get a PPD file </dd>
index 7d759781f5fae7ca8b4a05307454066ea809ce3b..476916f573a0b6d7d57259eed6af4e06d05cf438 100644 (file)
@@ -40,7 +40,7 @@ PRE.example {
   background: #eeeeee;
   border: dotted thin #999999;
   margin-left: 36pt;
-  padding: 10px;
+  padding: 10pt;
 }
 
 PRE.command EM, PRE.example EM {
@@ -58,7 +58,7 @@ P.formula {
 }
 
 BLOCKQUOTE {
-  background: #cccccc;
+  background: #eeeeee;
   border: solid thin #999999;
   padding: 10pt;
 }
@@ -170,6 +170,9 @@ H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
   font-size: 100%;
 }
 
+H1.title {
+}
+
 H2.title, H3.title {
   border-bottom: solid 2pt #000000;
 }
@@ -334,8 +337,44 @@ div.contents ul.subcontents li {
 </head>
 <body>
 <div class='body'>
+<!--
+  "$Id: api-array.header 8087 2008-10-27 21:37:05Z mike $"
+
+  MIME API header for CUPS.
+
+  Copyright 2009 by Apple Inc.
+
+  These coded instructions, statements, and computer programs are the
+  property of Apple Inc. and are protected by Federal copyright
+  law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+  which should have been included with this file.  If this file is
+  file is missing or damaged, see the license at "http://www.cups.org/".
+-->
+
+<h1 class='title'>MIME API</h1>
+
+<div class='summary'><table summary='General Information'>
+<thead>
+<tr>
+       <th>Header</th>
+       <th>cups/mime.h</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+       <th>Library</th>
+       <td>-lcupsmime</td>
+</tr>
+<tr>
+       <th>See Also</th>
+       <td>Programming: <a href='api-overview.html' target='_top'>Introduction to CUPS Programming</a></td>
+</tr>
+</tbody>
+</table></div>
 <h2 class="title">Contents</h2>
 <ul class="contents">
+<ul class="subcontents">
+<li><a href="#OVERVIEW">Overview</a></li>
 <li><a href="#FUNCTIONS">Functions</a><ul class="code">
 <li><a href="#mimeAddFilter" title="Add a filter to the current MIME database.">mimeAddFilter</a></li>
 <li><a href="#mimeAddType" title="Add a MIME type to a database.">mimeAddType</a></li>
@@ -364,6 +403,23 @@ div.contents ul.subcontents li {
        <li><a href="#mime_t" title="MIME Database">mime_t</a></li>
        <li><a href="#mime_type_t" title="MIME Type Data">mime_type_t</a></li>
 </ul></li>
+<!--
+  "$Id: api-array.shtml 7616 2008-05-28 00:34:13Z mike $"
+
+  MIME API introduction for CUPS.
+
+  Copyright 2009 by Apple Inc.
+
+  These coded instructions, statements, and computer programs are the
+  property of Apple Inc. and are protected by Federal copyright
+  law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+  which should have been included with this file.  If this file is
+  file is missing or damaged, see the license at "http://www.cups.org/".
+-->
+
+<h2 class='title'><a name='OVERVIEW'>Overview</a></h2>
+
+<p>The MIME API provides file typing and conversion services for CUPS.</p>
 <h2 class="title"><a name="FUNCTIONS">Functions</a></h2>
 <h3 class="function"><a name="mimeAddFilter">mimeAddFilter</a></h3>
 <p class="description">Add a filter to the current MIME database.</p>
index b6e07808c7e53fa6f7243e839e1ee77d9d0dbb0c..8db93b456ca6b90c740c2c4e20bb7b0cf8c5d7d1 100644 (file)
@@ -40,7 +40,7 @@ PRE.example {
   background: #eeeeee;
   border: dotted thin #999999;
   margin-left: 36pt;
-  padding: 10px;
+  padding: 10pt;
 }
 
 PRE.command EM, PRE.example EM {
@@ -58,7 +58,7 @@ P.formula {
 }
 
 BLOCKQUOTE {
-  background: #cccccc;
+  background: #eeeeee;
   border: solid thin #999999;
   padding: 10pt;
 }
@@ -170,6 +170,9 @@ H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
   font-size: 100%;
 }
 
+H1.title {
+}
+
 H2.title, H3.title {
   border-bottom: solid 2pt #000000;
 }
@@ -340,7 +343,7 @@ div.contents ul.subcontents li {
   Introduction to CUPS programming header for the Common UNIX Printing System
   (CUPS).
 
-  Copyright 2008 by Apple Inc.
+  Copyright 2008-2009 by Apple Inc.
 
   These coded instructions, statements, and computer programs are the
   property of Apple Inc. and are protected by Federal copyright
@@ -349,6 +352,8 @@ div.contents ul.subcontents li {
   file is missing or damaged, see the license at "http://www.cups.org/".
 -->
 
+<h1 class='title'>Introduction to CUPS Programming</h1>
+
 <div class='summary'><table summary='General Information'>
 <thead>
 <tr>
index 56cd2abd0e177eb4d5185e3b01ebeac41688513c..db843300643acbd46ca2220cc3a4aeccd6a1c2a6 100644 (file)
@@ -40,7 +40,7 @@ PRE.example {
   background: #eeeeee;
   border: dotted thin #999999;
   margin-left: 36pt;
-  padding: 10px;
+  padding: 10pt;
 }
 
 PRE.command EM, PRE.example EM {
@@ -58,7 +58,7 @@ P.formula {
 }
 
 BLOCKQUOTE {
-  background: #cccccc;
+  background: #eeeeee;
   border: solid thin #999999;
   padding: 10pt;
 }
@@ -170,6 +170,9 @@ H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
   font-size: 100%;
 }
 
+H1.title {
+}
+
 H2.title, H3.title {
   border-bottom: solid 2pt #000000;
 }
@@ -335,11 +338,11 @@ div.contents ul.subcontents li {
 <body>
 <div class='body'>
 <!--
-  "$Id: api-ppd.header 8087 2008-10-27 21:37:05Z mike $"
+  "$Id: api-ppd.header 8627 2009-05-13 21:39:17Z mike $"
 
   PPD API header for the Common UNIX Printing System (CUPS).
 
-  Copyright 2008 by Apple Inc.
+  Copyright 2008-2009 by Apple Inc.
 
   These coded instructions, statements, and computer programs are the
   property of Apple Inc. and are protected by Federal copyright
@@ -348,6 +351,8 @@ div.contents ul.subcontents li {
   file is missing or damaged, see the license at "http://www.cups.org/".
 -->
 
+<h1 class='title'>PPD API</h1>
+
 <div class='summary'><table summary='General Information'>
 <thead>
 <tr>
@@ -694,7 +699,7 @@ for (attr = <a href="#ppdFindAttr">ppdFindAttr</a>(ppd, "Product", NULL);
   puts(attr->value);
 </pre>
 <h2 class="title"><a name="FUNCTIONS">Functions</a></h2>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.4&nbsp;</span><a name="cupsGetConflicts">cupsGetConflicts</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.4/Mac OS X 10.6&nbsp;</span><a name="cupsGetConflicts">cupsGetConflicts</a></h3>
 <p class="description">Get a list of conflicting options in a marked PPD.</p>
 <p class="code">
 int cupsGetConflicts (<br>
@@ -750,7 +755,7 @@ int cupsMarkOptions (<br>
 <p class="discussion">This function maps the IPP &quot;finishings&quot;, &quot;media&quot;, &quot;mirror&quot;,
 &quot;multiple-document-handling&quot;, &quot;output-bin&quot;, &quot;printer-resolution&quot;, and
 &quot;sides&quot; attributes to their corresponding PPD options and choices.</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.4&nbsp;</span><a name="cupsResolveConflicts">cupsResolveConflicts</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.4/Mac OS X 10.6&nbsp;</span><a name="cupsResolveConflicts">cupsResolveConflicts</a></h3>
 <p class="description">Resolve conflicts in a marked PPD.</p>
 <p class="code">
 int cupsResolveConflicts (<br>
@@ -1187,7 +1192,7 @@ const char *ppdErrorString (<br>
 <p class="discussion">Options are returned from all groups in ascending alphanumeric order.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.4&nbsp;</span><a name="ppdInstallableConflict">ppdInstallableConflict</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.4/Mac OS X 10.6&nbsp;</span><a name="ppdInstallableConflict">ppdInstallableConflict</a></h3>
 <p class="description">Test whether an option choice conflicts with
 an installable option.</p>
 <p class="code">
@@ -1321,7 +1326,7 @@ string or attribute value. Otherwise the corresponding URI is returned.<br>
 If no value of the requested scheme can be found, NULL is returned.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.4&nbsp;</span><a name="ppdLocalizeMarkerName">ppdLocalizeMarkerName</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.4/Mac OS X 10.6&nbsp;</span><a name="ppdLocalizeMarkerName">ppdLocalizeMarkerName</a></h3>
 <p class="description">Get the localized version of a marker-names
 attribute value.</p>
 <p class="code">
@@ -1489,7 +1494,7 @@ float ppdPageLength (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Size record for page or NULL</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.4&nbsp;</span><a name="ppdPageSizeLimits">ppdPageSizeLimits</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.4/Mac OS X 10.6&nbsp;</span><a name="ppdPageSizeLimits">ppdPageSizeLimits</a></h3>
 <p class="description">Return the custom page size limits.</p>
 <p class="code">
 int ppdPageSizeLimits (<br>
index 335626929eef193ba5647562b20e86460a39622d..941e7033a21f7f20bbb17c6154681ac61ae0c3f7 100644 (file)
@@ -40,7 +40,7 @@ PRE.example {
   background: #eeeeee;
   border: dotted thin #999999;
   margin-left: 36pt;
-  padding: 10px;
+  padding: 10pt;
 }
 
 PRE.command EM, PRE.example EM {
@@ -58,7 +58,7 @@ P.formula {
 }
 
 BLOCKQUOTE {
-  background: #cccccc;
+  background: #eeeeee;
   border: solid thin #999999;
   padding: 10pt;
 }
@@ -170,6 +170,9 @@ H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
   font-size: 100%;
 }
 
+H1.title {
+}
+
 H2.title, H3.title {
   border-bottom: solid 2pt #000000;
 }
@@ -334,8 +337,44 @@ div.contents ul.subcontents li {
 </head>
 <body>
 <div class='body'>
+<!--
+  "$Id: api-array.header 8087 2008-10-27 21:37:05Z mike $"
+
+  PPD Compiler API header for CUPS.
+
+  Copyright 2009 by Apple Inc.
+
+  These coded instructions, statements, and computer programs are the
+  property of Apple Inc. and are protected by Federal copyright
+  law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+  which should have been included with this file.  If this file is
+  file is missing or damaged, see the license at "http://www.cups.org/".
+-->
+
+<h1 class='title'>PPD Compiler API</h1>
+
+<div class='summary'><table summary='General Information'>
+<thead>
+<tr>
+       <th>Header</th>
+       <th>cups/ppdc.h</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+       <th>Library</th>
+       <td>-lcupsppdc</td>
+</tr>
+<tr>
+       <th>See Also</th>
+       <td>Programming: <a href='api-overview.html' target='_top'>Introduction to CUPS Programming</a></td>
+</tr>
+</tbody>
+</table></div>
 <h2 class="title">Contents</h2>
 <ul class="contents">
+<ul class="subcontents">
+<li><a href="#OVERVIEW">Overview</a></li>
 <li><a href="#CLASSES">Classes</a><ul class="code">
 <li><a href="#ppdcArray" title="// Shared Array">ppdcArray</a></li>
 <li><a href="#ppdcAttr" title="// Attribute">ppdcAttr</a></li>
@@ -371,6 +410,24 @@ div.contents ul.subcontents li {
        <li><a href="#ppdcOptSection" title="// Option section">ppdcOptSection</a></li>
        <li><a href="#ppdcOptType" title="// Option type">ppdcOptType</a></li>
 </ul></li>
+<!--
+  "$Id: api-array.shtml 7616 2008-05-28 00:34:13Z mike $"
+
+  PPD Compiler API introduction for CUPS.
+
+  Copyright 2009 by Apple Inc.
+
+  These coded instructions, statements, and computer programs are the
+  property of Apple Inc. and are protected by Federal copyright
+  law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+  which should have been included with this file.  If this file is
+  file is missing or damaged, see the license at "http://www.cups.org/".
+-->
+
+<h2 class='title'><a name='OVERVIEW'>Overview</a></h2>
+
+<p>The PPD Compiler API provides access to CUPS driver information files and
+methods for generating and importing PPD files.</p>
 <h2 class="title"><a name="CLASSES">Classes</a></h2>
 <h3 class="class"><a name="ppdcArray">ppdcArray</a></h3>
 <p class="description">// Shared Array</p>
index 67d3920dedf94e6fadeb2d7af6a6f99b2e5418de..93c816b8805aba708ead167fd07be2336e8831ab 100644 (file)
@@ -40,7 +40,7 @@ PRE.example {
   background: #eeeeee;
   border: dotted thin #999999;
   margin-left: 36pt;
-  padding: 10px;
+  padding: 10pt;
 }
 
 PRE.command EM, PRE.example EM {
@@ -58,7 +58,7 @@ P.formula {
 }
 
 BLOCKQUOTE {
-  background: #cccccc;
+  background: #eeeeee;
   border: solid thin #999999;
   padding: 10pt;
 }
@@ -170,6 +170,9 @@ H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
   font-size: 100%;
 }
 
+H1.title {
+}
+
 H2.title, H3.title {
   border-bottom: solid 2pt #000000;
 }
@@ -339,7 +342,7 @@ div.contents ul.subcontents li {
 
   Raster API header for the Common UNIX Printing System (CUPS).
 
-  Copyright 2008 by Apple Inc.
+  Copyright 2008-2009 by Apple Inc.
 
   These coded instructions, statements, and computer programs are the
   property of Apple Inc. and are protected by Federal copyright
@@ -348,6 +351,8 @@ div.contents ul.subcontents li {
   file is missing or damaged, see the license at "http://www.cups.org/".
 -->
 
+<h1 class='title'>Raster API</h1>
+
 <div class='summary'><table summary='General Information'>
 <thead>
 <tr>
index b96084e001b01f0912a88ef80a1d1d41cb1845cb..c50a2a5014c395423249f966b1eb9dcb3cbc4d46 100644 (file)
@@ -2,9 +2,12 @@
 <!-- SECTION: Getting Started -->
 <HEAD>
        <TITLE>Using CGI Programs</TITLE>
+       <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
 </HEAD>
 <BODY>
 
+<H1 CLASS="title">Using CGI Programs</H1>
+
 <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
index dea7a73cc1cb3b9e3bfc66bbe3251b5473a704aa..c6898dc7df58e66cd6fc83f9460532d9005a1eaf 100644 (file)
@@ -2,9 +2,12 @@
 <!-- SECTION: Getting Started -->
 <HEAD>
        <TITLE>Glossary</TITLE>
+       <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
 </HEAD>
 <BODY>
 
+<H1 CLASS="title">Glossary</H1>
+
 <H2><A NAME="A">A</A></H2>
 
 <DL>
index d3075811842869413415a36bc54399fc2a9a9e5c..dbac3f14f8233ec34d0eeda5aaa707023f6bc468 100644 (file)
@@ -2,9 +2,12 @@
 <!-- SECTION: Getting Started -->
 <HEAD>
        <TITLE>Using Kerberos Authentication</TITLE>
+       <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
 </HEAD>
 <BODY>
 
+<H1 CLASS="title">Using Kerberos Authentication</H1>
+
 <P>CUPS allows you to use a Key Distribution Center (KDC) for authentication
 on your local CUPS server and when printing to a remote authenticated queue.
 This document describes how to configure CUPS to use Kerberos authentication
index 53cfb5d01414ba1de884f0c07a833a8170eff6ae..a86babdd563437cd2d0bc4e647c8eec313a564cf 100644 (file)
@@ -2,9 +2,12 @@
 <!-- SECTION: Getting Started -->
 <HEAD>
        <TITLE>Software License Agreement</TITLE>
+       <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
 </HEAD>
 <BODY>
 
+<H1 CLASS="title">Software License Agreement</H1>
+
 <P ALIGN="CENTER">Copyright 2007-2009 by Apple Inc.<BR>
 1 Infinite Loop<BR>
 Cupertino, CA 95014 USA<BR>
index 58c0784113f8f0f8bd5b903012aa40c197fe0331..6b23810884f3b369c4b53a620dddb57903330c58 100644 (file)
@@ -2,9 +2,12 @@
 <!-- SECTION: Getting Started -->
 <HEAD>
        <TITLE>Using Network Printers</TITLE>
+       <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
 </HEAD>
 <BODY>
 
+<H1 CLASS="title">Using Network Printers</H1>
+
 <P>This help document describes how to discover, configure, and use TCP/IP network printers with CUPS.</P>
 
 <H2 CLASS="title"><A NAME="ADDRESS">Getting the IP Address</A></H2>
index f32e1b9dd42b70347cb8e4180c442cef0dd5e09e..e3b5820beb5e5f28070313b55ca3e93ce9288346 100644 (file)
@@ -2,9 +2,12 @@
 <!-- SECTION: Getting Started -->
 <HEAD>
        <TITLE>Command-Line Printing and Options</TITLE>
+       <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
 </HEAD>
 <BODY>
 
+<H1 CLASS="title">Command-Line Printing and Options</H1>
+
 <P>CUPS provides both the System V (<A
 HREF="man-lp.html">lp(1)</A>) and Berkeley (<A
 HREF="man-lpr.html">lpr(1)</A>) printing commands for printing
index 946fadb3d8e8bae10349904d37679b6b7f691ec8..59a2ac0677d0e2b865fc01e273e957b6a75b60a8 100644 (file)
@@ -2,9 +2,12 @@
 <!-- SECTION: Getting Started -->
 <HEAD>
        <TITLE>Overview of CUPS</TITLE>
+       <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
 </HEAD>
 <BODY>
 
+<H1 CLASS="title">Overview of CUPS</H1>
+
 <P>CUPS is the software you use to print from applications like the web browser
 you are using to read this page. It converts the <em>page descriptions</em>
 produced by your application (put a paragraph here, draw a line there, and so
@@ -44,8 +47,9 @@ different ways.</P>
 
 <H2 CLASS="title"><A NAME="BEGIN">Where Do I Begin?</A></H2>
 
-<P>Click on the <A HREF="/admin">Administration</A> tab at the top of this page.
-Click on the <VAR>Add Printer</VAR> button and follow the prompts.</P>
+<P>Click on the <A HREF="http://localhost:631/admin">Administration</A> tab at
+the top of this page. Click on the <VAR>Add Printer</VAR> button and follow the
+prompts.</P>
 
 <BLOCKQUOTE>When you are asked for a username and password, enter your login
 username and password or the "root" username and password. On MacOS X, the login
@@ -56,7 +60,7 @@ lowercase.</BLOCKQUOTE>
 options (paper size, output mode, etc.) for the printer. Make any changes as
 needed and then click on the <VAR>Set Default Options</VAR> button to save
 them. Some printers also support auto-configuration - click on the <VAR>Query
-Printer for Default Options</VAR> button to update the options automaticaly.</P>
+Printer for Default Options</VAR> button to update the options automatically.</P>
 
 <P>Once you have added the printer, you can print to it from any application.
 You can also choose <VAR>Print Test Page</VAR> from the maintenance menu to print
index 37ab489ef612606a19f0089abe2f05ebdc846a07..485a8570524698d38132d7fc02eaca2dd2c8732c 100644 (file)
@@ -2,9 +2,12 @@
 <!-- SECTION: Getting Started -->
 <HEAD>
        <TITLE>Managing Operation Policies</TITLE>
+       <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
 </HEAD>
 <BODY>
 
+<H1 CLASS="title">Managing Operation Policies</H1>
+
 <P>Operation policies are the rules used for each IPP operation
 in CUPS. These rules include things like "user must provide a
 password", "user must be in the system group", "allow only from
index adc1828160959e6af4abdd232b61554ad221b5de..c6ec8b2e10032f314379486fc7949209536034bd 100644 (file)
@@ -40,7 +40,7 @@ PRE.example {
   background: #eeeeee;
   border: dotted thin #999999;
   margin-left: 36pt;
-  padding: 10px;
+  padding: 10pt;
 }
 
 PRE.command EM, PRE.example EM {
@@ -58,7 +58,7 @@ P.formula {
 }
 
 BLOCKQUOTE {
-  background: #cccccc;
+  background: #eeeeee;
   border: solid thin #999999;
   padding: 10pt;
 }
@@ -170,6 +170,9 @@ H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
   font-size: 100%;
 }
 
+H1.title {
+}
+
 H2.title, H3.title {
   border-bottom: solid 2pt #000000;
 }
@@ -334,7 +337,9 @@ div.contents ul.subcontents li {
 </head>
 <body>
 <div class='body'>
-<p>This document describes how to develop printer drivers for PostScript printers. Topics include: <a href='#BASICS'>printer driver basics</a>, <a href='#CREATE'>creating new PPD files</a>, <a href='#IMPORT'>importing existing PPD files</a>, <a href='#FILTERS'>using custom filters</a>, <a href='#COLOR'>implementing color management</a>, <a href='#MACOSX'>adding Mac OS X features</a>, and <a href='#DEPLOY'>deploying your driver</a>.</p>
+<h1 class='title'>Developing PostScript Printer Drivers</h1>
+
+<p>This document describes how to develop printer drivers for PostScript printers. Topics include: <a href='#BASICS'>printer driver basics</a>, <a href='#CREATE'>creating new PPD files</a>, <a href='#IMPORT'>importing existing PPD files</a>, <a href='#FILTERS'>using custom filters</a>, <a href='#COLOR'>implementing color management</a>, and <a href='#MACOSX'>adding Mac OS X features</a>.</p>
 
 <div class='summary'><table summary='General Information'>
 <tbody>
@@ -359,7 +364,6 @@ div.contents ul.subcontents li {
 <li><a href="#FILTERS">Using Custom Filters</a></li>
 <li><a href="#COLOR">Implementing Color Management</a></li>
 <li><a href="#MACOSX">Adding Mac OS X Features</a></li>
-<li><a href="#DEPLOY">Deploying Your Driver</a></li>
 <h2 class='title'><a name='BASICS'>Printer Driver Basics</a></h2>
 
 <p>A CUPS PostScript printer driver consists of a PostScript Printer Description (PPD) file that describes the features and capabilities of the device, zero or more <em>filter</em> programs that prepare print data for the device, and zero or more support files for color management, online help, and so forth. The PPD file includes references to all of the filters and support files used by the driver.</p>
@@ -610,17 +614,32 @@ information file.</P>
 
 <h2 class='title'><a name='COLOR'>Implementing Color Management</a></h2>
 
-<p>Talk about ICC color profiles and sRGB as two best options.</p>
+<p>CUPS uses ICC color profiles to provide more accurate color reproduction. The <a href='spec-ppd.html#cupsICCProfile'><tt>cupsICCProfile</tt></a> attribute defines the color profiles that are available for a given printer, for example:</p>
 
+<pre class='example'>
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> cupsICCProfile "ColorModel.MediaType.Resolution/Description" /path/to/ICC/profile
+</pre>
 
-<h2 class='title'><a name='MACOSX'>Adding Mac OS X Features</a></h2>
+<p>where "ColorModel.MediaType.Resolution" defines a selector based on the corresponding option selections. A simple driver might only define profiles for the color models that are supported, for example a printer supporting Gray and RGB might use:</p>
+
+<pre class='example'>
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> cupsICCProfile "Gray../Grayscale Profile" /path/to/ICC/gray-profile
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> cupsICCProfile "RGB../Full Color Profile" /path/to/ICC/rgb-profile
+</pre>
 
-<p>Talk about help books, icons, and PDEs.</p>
+<p>The options used for profile selection can be customized using the <tt>cupsICCQualifier2</tt> and <tt>cupsICCQualifier3</tt> attributes.</p>
 
 
-<h2 class='title'><a name='DEPLOY'>Deploying Your Driver</a></h2>
+<h2 class='title'><a name='MACOSX'>Adding Mac OS X Features</a></h2>
+
+<p>Mac OS X printer drivers can provide <a href='spec-ppd.html#MACOSX'>additional attributes</a> to specify additional option panes in the print dialog, an image of the printer, a help book, and option presets for the driver software:</p>
 
-<p>Talk about install locations, etc.</p>
+<pre class='example'>
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APDialogExtension "" /Library/Printers/Vendor/filename.plugin
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APHelpBook "" /Library/Printers/Vendor/filename.bundle
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APPrinterIconPath "" /Library/Printers/Vendor/filename.icns
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APPrinterPreset "name/text" "*option choice ..."
+</pre>
 </div>
 </body>
 </html>
index 3c29567d84d982815575122c5585a78064588d75..6c5ddd23b09cf4da61aa7b200a374f4003f8114c 100644 (file)
@@ -40,7 +40,7 @@ PRE.example {
   background: #eeeeee;
   border: dotted thin #999999;
   margin-left: 36pt;
-  padding: 10px;
+  padding: 10pt;
 }
 
 PRE.command EM, PRE.example EM {
@@ -58,7 +58,7 @@ P.formula {
 }
 
 BLOCKQUOTE {
-  background: #cccccc;
+  background: #eeeeee;
   border: solid thin #999999;
   padding: 10pt;
 }
@@ -170,6 +170,9 @@ H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
   font-size: 100%;
 }
 
+H1.title {
+}
+
 H2.title, H3.title {
   border-bottom: solid 2pt #000000;
 }
@@ -334,6 +337,8 @@ div.contents ul.subcontents li {
 </head>
 <body>
 <div class='body'>
+<h1 class='title'>Introduction to the PPD Compiler</h1>
+
 <P>This document describes how to use the CUPS PostScript Printer Description
 (PPD) file compiler. The PPD compiler generates PPD files from simple text files
 that describe the features and capabilities of one or more printers.</P>
index 94aab64c4665bf992426edc5d9092083a48ef379..9d0c89e4e27af6feec9e2fc0ef4c652c7fc248c7 100644 (file)
@@ -40,7 +40,7 @@ PRE.example {
   background: #eeeeee;
   border: dotted thin #999999;
   margin-left: 36pt;
-  padding: 10px;
+  padding: 10pt;
 }
 
 PRE.command EM, PRE.example EM {
@@ -58,7 +58,7 @@ P.formula {
 }
 
 BLOCKQUOTE {
-  background: #cccccc;
+  background: #eeeeee;
   border: solid thin #999999;
   padding: 10pt;
 }
@@ -170,6 +170,9 @@ H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
   font-size: 100%;
 }
 
+H1.title {
+}
+
 H2.title, H3.title {
   border-bottom: solid 2pt #000000;
 }
@@ -334,7 +337,9 @@ div.contents ul.subcontents li {
 </head>
 <body>
 <div class='body'>
-<p>This document describes how to develop printer drivers for raster printers. Topics include: <a href='#BASICS'>printer driver basics</a>, <a href='#CREATE'>creating new PPD files</a>, <a href='#FILTERS'>using filters</a>, <a href='#COLOR'>implementing color management</a>, <a href='#MACOSX'>adding Mac OS X features</a>, and <a href='#DEPLOY'>deploying your driver</a>.</p>
+<h1 class='title'>Developing Raster Printer Drivers</h1>
+
+<p>This document describes how to develop printer drivers for raster printers. Topics include: <a href='#BASICS'>printer driver basics</a>, <a href='#CREATE'>creating new PPD files</a>, <a href='#FILTERS'>using filters</a>, <a href='#COLOR'>implementing color management</a>, and <a href='#MACOSX'>adding Mac OS X features</a>.</p>
 
 <div class='summary'><table summary='General Information'>
 <tbody>
@@ -357,7 +362,6 @@ div.contents ul.subcontents li {
 <li><a href="#FILTERS">Using Filters</a></li>
 <li><a href="#COLOR">Implementing Color Management</a></li>
 <li><a href="#MACOSX">Adding Mac OS X Features</a></li>
-<li><a href="#DEPLOY">Deploying Your Driver</a></li>
 <h2 class='title'><a name='BASICS'>Printer Driver Basics</a></h2>
 
 <p>A CUPS raster printer driver consists of a PostScript Printer Description (PPD) file that describes the features and capabilities of the device, one or more <em>filter</em> programs that prepare print data for the device, and zero or more support files for color management, online help, and so forth. The PPD file includes references to all of the filters and support files used by the driver.</p>
@@ -517,17 +521,41 @@ div.contents ul.subcontents li {
 
 <h2 class='title'><a name='COLOR'>Implementing Color Management</a></h2>
 
-<p>Talk about ICC color profiles and sRGB as two best options.</p>
+<p>CUPS uses ICC color profiles to provide more accurate color reproduction. The <a href='spec-ppd.html#cupsICCProfile'><tt>cupsICCProfile</tt></a> attribute defines the color profiles that are available for a given printer, for example:</p>
 
+<pre class='example'>
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> cupsICCProfile "ColorModel.MediaType.Resolution/Description" /path/to/ICC/profile
+</pre>
 
-<h2 class='title'><a name='MACOSX'>Adding Mac OS X Features</a></h2>
+<p>where "ColorModel.MediaType.Resolution" defines a selector based on the corresponding option selections. A simple driver might only define profiles for the color models that are supported, for example a printer supporting Gray and RGB might use:</p>
+
+<pre class='example'>
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> cupsICCProfile "Gray../Grayscale Profile" /path/to/ICC/gray-profile
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> cupsICCProfile "RGB../Full Color Profile" /path/to/ICC/rgb-profile
+</pre>
+
+<p>The options used for profile selection can be customized using the <tt>cupsICCQualifier2</tt> and <tt>cupsICCQualifier3</tt> attributes.</p>
 
-<p>Talk about help books, icons, and PDEs.</p>
+<h3><span class='info'>Since Mac OS X 10.5</span>Custom Color Matching Support</h3>
 
+<p>Mac OS X printer drivers that are based on an existing standard RGB colorspace can tell the system to use the corresponding colorspace instead of an arbitrary ICC color profile when doing color management. The <a href='#APCustom'><tt>APSupportsCustomColorMatching</tt></a> and <tt>APDefaultCustomColorMatchingProfile</tt> attributes can be used to enable this mode:</p>
+
+<pre class='example'>
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APSupportsCustomColorMatching "" true
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APDefaultCustomColorMatchingProfile "" sRGB
+</pre>
 
-<h2 class='title'><a name='DEPLOY'>Deploying Your Driver</a></h2>
 
-<p>Talk about install locations, etc.</p>
+<h2 class='title'><a name='MACOSX'>Adding Mac OS X Features</a></h2>
+
+<p>Mac OS X printer drivers can provide <a href='spec-ppd.html#MACOSX'>additional attributes</a> to specify additional option panes in the print dialog, an image of the printer, a help book, and option presets for the driver software:</p>
+
+<pre class='example'>
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APDialogExtension "" /Library/Printers/Vendor/filename.plugin
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APHelpBook "" /Library/Printers/Vendor/filename.bundle
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APPrinterIconPath "" /Library/Printers/Vendor/filename.icns
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APPrinterPreset "name/text" "*option choice ..."
+</pre>
 </div>
 </body>
 </html>
index 5ed47821be3c51844b7e7a163af31c2faf480536..015ea17bdb14391b143ca6984d9133b0160ff0db 100644 (file)
@@ -2,9 +2,12 @@
 <!-- SECTION: References -->
 <HEAD>
        <TITLE>access_log</TITLE>
+       <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
 </HEAD>
 <BODY>
 
+<H1 CLASS="title">access_log</H1>
+
 <P>The <VAR>access_log</VAR> file lists each HTTP resource that
 is accessed by a web browser or client. Each line is in an
 extended version of the so-called "Common Log Format" used by
index 7b1e6cacd846ef4881705082aab5d0d696264fad..9224c5a60f33b6ec89338fd39cbcf5b814e6d3f4 100644 (file)
@@ -2,9 +2,12 @@
 <!-- SECTION: References -->
 <HEAD>
        <TITLE>classes.conf</TITLE>
+       <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
 </HEAD>
 <BODY>
 
+<H1 CLASS="title">classes.conf</H1>
+
 <P>The CUPS scheduler (cupsd) uses the
 <VAR>/etc/cups/classes.conf</VAR> file to store the list of
 available classes. This file contains only locally defined
index 90207ba72f915b4a2f92549d0042c8c48d9cdc04..0229b004004d7b397ce5c8401a033d834fdfd853 100644 (file)
@@ -2,9 +2,12 @@
 <!-- SECTION: References -->
 <HEAD>
        <TITLE>client.conf</TITLE>
+       <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
 </HEAD>
 <BODY>
 
+<H1 CLASS="title">client.conf</H1>
+
 <P>The <VAR>/etc/cups/client.conf</VAR> and
 <VAR>~/.cups/client.conf</VAR> files contain up to two directives
 that determine how the client behaves. Each directive is listed
index 64029b94cb984329cea896b7adf8948f0a88a7db..b22d3a304f529ac6392638a513147f26e11373b4 100644 (file)
@@ -2,9 +2,11 @@
 <!-- SECTION: References -->
 <HEAD>
        <TITLE>cupsd.conf</TITLE>
+       <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
 </HEAD>
 <BODY>
 
+<H1 CLASS="title">cupsd.conf</H1>
 
 <P>The <VAR>/etc/cups/cupsd.conf</VAR> file contains
 configuration <I>directives</I> that control how the server
@@ -1964,6 +1966,24 @@ Directives inside <CODE>/printers</CODE> will override ones from
 </TABLE></DIV>
 
 
+<H2 CLASS="title"><A NAME="LogDebugHistory">LogDebugHistory</A></H2>
+
+<H3>Examples</H3>
+
+<PRE CLASS="command">
+LogDebugHistory 0
+LogDebugHistory 200
+</PRE>
+
+<H3>Description</H3>
+
+<P>When <A HREF="#LogLevel"><CODE>LogLevel</CODE></A> is not set to
+<CODE>debug</CODE> or <CODE>debug2</CODE>, the <CODE>LogDebugHistory</CODE>
+directive specifies the number of debugging messages that are logged when an
+error occurs during printing. The default is 200 messages. A value of 0
+disables debugging history entirely and is not recommended.</P>
+
+
 <H2 CLASS="title"><SPAN CLASS="info">CUPS 1.1.15</SPAN><A NAME="LogFilePerm">LogFilePerm</A></H2>
 
 <H3>Examples</H3>
@@ -2712,6 +2732,37 @@ administrator email address is <CODE>root@server</CODE>, where
 HREF="#ServerName"><CODE>ServerName</CODE></A>.</P>
 
 
+<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.3.10</SPAN><A NAME="ServerAlias">ServerAlias</A></H2>
+
+<H3>Examples</H3>
+
+<PRE CLASS="command">
+ServerAlias althost
+ServerAlias althost.foo.com
+ServerAlias althost.bar.com
+ServerAlias *
+</PRE>
+
+<H3>Description</H3>
+
+<P>The <CODE>ServerAlias</CODE> directive specifies alternate names that the
+server is known by. By default it contains a list of all aliases associated
+with the <A HREF="#ServerName"><CODE>ServerName</CODE></A>. The special name
+"*" can be used to allow any hostname when accessing CUPS via an external
+network interfaces.</P>
+
+<BLOCKQUOTE><B>Note</B>
+
+<P>The <CODE>ServerAlias</CODE> directive is used for HTTP Host header
+validation when clients connect to the scheduler from external interfaces.
+Using the special name "*" can expose your system to known browser-based
+DNS rebinding attacks, even when accessing sites through a firewall. If the
+auto-discovery of alternate names does not work, we recommend listing each
+alternate name with a ServerAlias directive instead of using "*".</P>
+
+</BLOCKQUOTE>
+
+
 <H2 CLASS="title"><A NAME="ServerBin">ServerBin</A></H2>
 
 <H3>Examples</H3>
index e40987f197eb46782bf5e57d8337dce4257c0afe..010927802253fa4746b7cda5191f14dd51386066 100644 (file)
@@ -2,9 +2,12 @@
 <!-- SECTION: References -->
 <HEAD>
        <TITLE>error_log</TITLE>
+       <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
 </HEAD>
 <BODY>
 
+<H1 CLASS="title">error_log</H1>
+
 <P>The <VAR>error_log</VAR> file lists messages from the
 scheduler - errors, warnings, etc. The <A
 HREF="ref-cupsd-conf.html#LogLevel"><CODE>LogLevel</CODE></A>
index 031700df9c39bc4c4ae2dd6e0025331034b4ee32..16e8b409a3245a760e15238718798e2499039711 100644 (file)
@@ -2,9 +2,12 @@
 <!-- SECTION: References -->
 <HEAD>
        <TITLE>mailto.conf</TITLE>
+       <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
 </HEAD>
 <BODY>
 
+<H1 CLASS="title">mailto.conf</H1>
+
 <P>The <VAR>/etc/cups/mailto.conf</VAR> file contains several
 directives that defines the local mail server and email
 notification preferences for CUPS. Each directive is listed on a
index fa2bd1dc16e6325f8b255da0a47cffc52d5dd23e..a0ec7a0e2ec4f429d2ac5fbe11ccbc6a917c2196 100644 (file)
@@ -2,9 +2,12 @@
 <!-- SECTION: References -->
 <HEAD>
        <TITLE>page_log</TITLE>
+       <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
 </HEAD>
 <BODY>
 
+<H1 CLASS="title">page_log</H1>
+
 <P>The <VAR>page_log</VAR> file lists each page that is sent to a
 printer. By default, each line contains the following information:</P>
 
index 4549586b6fbaa7852be62bcac89d04bda2d0183c..a4fa56c9deece9d380ea2825a40812c73f7f2058 100644 (file)
@@ -2,9 +2,12 @@
 <!-- SECTION: References -->
 <HEAD>
        <TITLE>PPD Compiler Driver Information File Reference</TITLE>
+       <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
 </HEAD>
 <BODY>
 
+<H1 CLASS="title">PPD Compiler Driver Information File Reference</H1>
+
 <p>The CUPS PPD compiler reads meta files that contain descriptions
 of one or more PPD files to be generated by
 <a href="man-ppdc.html">ppdc(1)</a> or the corresponding driver interface
index e3fb078404ddc2b231a72acc565020ac4591d444..3539f8cfe48b66411d72d6cf4cce7d8ebbf4e1b9 100644 (file)
@@ -2,9 +2,12 @@
 <!-- SECTION: References -->
 <HEAD>
        <TITLE>printers.conf</TITLE>
+       <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
 </HEAD>
 <BODY>
 
+<H1 CLASS="title">printers.conf</H1>
+
 <P>The CUPS scheduler (cupsd) uses the
 <VAR>/etc/cups/printers.conf</VAR> file to store the list of
 available printers. This file contains only locally defined
index 71e18d6d6685a3ab1857d4665e3d7dc2e369ec87..be7f11c6a8d0f73e5f854ceaffa7918cccef448f 100644 (file)
@@ -2,9 +2,12 @@
 <!-- SECTION: References -->
 <HEAD>
        <TITLE>snmp.conf</TITLE>
+       <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
 </HEAD>
 <BODY>
 
+<H1 CLASS="title">snmp.conf</H1>
+
 <P>The <VAR>/etc/cups/snmp.conf</VAR> file contains several
 directives that determine how the SNMP printer discovery backend
 behaves. Each directive is listed on a line by itself followed
index 20c31e187b046d2442363b18bf066bb01b879a69..d4f4defc339af8060a0fdc41419646f9268f094d 100644 (file)
@@ -2,9 +2,12 @@
 <!-- SECTION: References -->
 <HEAD>
        <TITLE>subscriptions.conf</TITLE>
+       <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
 </HEAD>
 <BODY>
 
+<H1 CLASS="title">subscriptions.conf</H1>
+
 <P>The CUPS scheduler (cupsd) uses the
 <VAR>/etc/cups/subscriptions.conf</VAR> file  to store the list
 of active subscriptions. Each directive is listed on a line by
index c5956ef06d63e283daac8dc05f442ab8ae3dd8d1..38fb42cc089fdc27eaf287048976bc90cac1d646 100644 (file)
@@ -2,9 +2,12 @@
 <!-- SECTION: Getting Started -->
 <HEAD>
        <TITLE>Server Security</TITLE>
+       <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
 </HEAD>
 <BODY>
 
+<H1 CLASS="title">Server Security</H1>
+
 <P>In the default "standalone" configuration, there are few
 potential security risks - the CUPS server does not accept remote
 connections, and only accepts shared printer information from the
@@ -18,7 +21,7 @@ server.</P>
 
 <P>When you enable remote administration, the server will use
 Basic authentication for adminstration tasks. The current CUPS
-server supports Basic, Digest, and local certificate
+server supports Basic, Digest, Kerberos, and local certificate
 authentication:</P>
 
 <OL>
index 29bb757adac7860fcd8b15b1350b10cc6c059031..00ccb6fe879ca4bd8a88e559095c3fcc8611e95e 100644 (file)
@@ -2,8 +2,11 @@
 <!-- SECTION: Getting Started -->
 <head>
        <title>Printer Sharing</title>
-</head>
-<body>
+       <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
+</HEAD>
+<BODY>
+
+<H1 CLASS="title">Printer Sharing</H1>
 
 <p>This document discusses several ways to configure printer sharing.</p>
 
index 1c16700bea13a0213548053389b432251ebfd5f9..9cdc5af820a97e2ae85792fb174eeee539bb7d7b 100644 (file)
@@ -4,7 +4,7 @@
 <head>
        <title>CUPS Banner File Format</title>
        <meta name='keywords' content='job-sheets'>
-       <link rel='stylesheet' type='text/css' href='../cups.css'>
+       <link rel='stylesheet' type='text/css' href='../cups-printable.css'>
 </head>
 <body>
 <!--
@@ -12,7 +12,7 @@
 
   Banner file format specification for the Common UNIX Printing System (CUPS).
 
-  Copyright 2008 by Apple Inc.
+  Copyright 2008-2009 by Apple Inc.
 
   These coded instructions, statements, and computer programs are the
   property of Apple Inc. and are protected by Federal copyright
@@ -21,6 +21,8 @@
   file is missing or damaged, see the license at "http://www.cups.org/".
 -->
 
+<H1 CLASS="title">CUPS Banner File Format</H1>
+
 <h2 class='title'><a name='INTRODUCTION'>Introduction</a></h2>
 
 <p>This specification describes the CUPS banner file format
index 12d3087f2cc906e5daf45ef91bcd78e7e90b0c10..62f1f19b6423f10bf5d054ae296a589c57eae16c 100644 (file)
@@ -4,6 +4,7 @@
 <head>
        <title>CUPS Browse Protocol</title>
        <meta name='keywords' content='Programming'>
+       <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
 </head>
 <body>
 <!--
@@ -21,6 +22,8 @@
   file is missing or damaged, see the license at "http://www.cups.org/".
 -->
 
+<H1 CLASS="title">CUPS Browse Protocol</H1>
+
 <h2><a name='INTRO'>Introduction</a></h2>
 
 <p>This specification describes the CUPS browsing protocol which is used for
index 415c194cf3cc8072ee71fc6faf1d10f17092eac2..23e22940722b04addebcbb0d532876f50061e13b 100644 (file)
@@ -3,14 +3,13 @@
 <!-- SECTION: Specifications -->
 <HEAD>
        <TITLE>CUPS Developer Guide</TITLE>
+       <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
 </HEAD>
 <BODY>
 
-<P>This developer guide documents the guidelines and processes we
-use when developing and maintaining the Common UNIX Printing
-System ("CUPS") and related software. Our goal is to provide
-reliable and efficient software and documentation that addresses
-the needs of our users.</P>
+<H1 CLASS="title">CUPS Developer Guide</H1>
+
+<P>This developer guide documents the guidelines and processes we use when developing and maintaining CUPS and related software. Our goal is to provide reliable and efficient software and documentation that addresses the needs of our users.</P>
 
 <H2 CLASS="title"><A NAME="COMMUNICATION">Communication</A></H2>
 
index ff58d1db382f77db7acb6711b40faf2bcee7e2e4..63170e005c978b34a57a6d7d21cabbc7e0adbd4a 100644 (file)
@@ -4,7 +4,7 @@
 <head>
        <title>CUPS Command File Format</title>
        <meta name='keywords' content='Programming, CUPS Command File Format'>
-       <link rel='stylesheet' type='text/css' href='../cups.css'>
+       <link rel='stylesheet' type='text/css' href='../cups-printable.css'>
 </head>
 <body>
 <!--
@@ -13,7 +13,7 @@
   CUPS command file format specification for the Common UNIX Printing
   System (CUPS).
 
-  Copyright 2007-2008 by Apple Inc.
+  Copyright 2007-2009 by Apple Inc.
   Copyright 1997-2006 by Easy Software Products.
 
   These coded instructions, statements, and computer programs are the
@@ -23,6 +23,8 @@
   file is missing or damaged, see the license at "http://www.cups.org/".
 -->
 
+<H1 CLASS="title">CUPS Command File Format</H1>
+
 <h2 class='title'><a name='INTRODUCTION'>Introduction</a></h2>
 
 <p>This specification describes the CUPS command file format
index 928d6a1e7397c87a01ccaad24c102f76001429cd..a9472c4f9ae040b0d3a89befeb9adf4ea3a573c9 100644 (file)
 <!-- SECTION: Specifications -->
 <HEAD>
        <TITLE>CUPS Design Description</TITLE>
+       <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
 </HEAD>
 <BODY>
 
-<P><EM>This document is still being updated for CUPS 1.4...</EM></P>
+<H1 CLASS="title">CUPS Design Description</H1>
 
-<P>This design description documents the overall organization of CUPS. The
-purpose is not to provide a line-by-line description of the CUPS source code,
-but rather to describe the overall architecture and location of key pieces so
-that developers can more easily understand the underlying operation of CUPS.</P>
+<P>This design description documents the overall organization of CUPS. The purpose is not to provide a line-by-line description of the CUPS source code, but rather to describe the overall architecture and location of key pieces so that developers can more easily understand the underlying operation of CUPS.</P>
 
 <H2 CLASS="title"><A NAME="INTRO">Introduction</A></H2>
 
-<P>Like most printing systems, CUPS is designed around a central
-print scheduling process that dispatches print jobs, processes
-administrative commands, provides printer status information to
-local and remote programs, and informs users as needed. <A
-HREF="#FIGURE1">Figure 1</A> shows the basic organization of
-CUPS.</P>
+<P>Like most printing systems, CUPS is designed around a central print scheduling process that dispatches print jobs, processes administrative commands, provides printer status information to local and remote programs, and informs users as needed. <A HREF="#FIGURE1">Figure 1</A> shows the basic organization of CUPS.</P>
 
 <H3>Scheduler</H3>
 
-<P>The scheduler is a HTTP/1.1 and IPP/1.1 server application
-manages HTTP and IPP requests, printers, classes, jobs,
-subscriptions, and notifications on the system. HTTP is used for
-normal web browser services as well as IPP operation messages
-passed via HTTP POST requests with the
-<CODE>application/ipp</CODE> content type. The scheduler uses a
-series of helper Common Gateway Interface ("CGI") applications to
-provide dynamic web interfaces, and can be configured to run
-additional, site-specific programs or scripts for the web
-interface.</P>
-
-<P>The scheduler is designed as a traditional monolithic,
-single-threaded server process which runs external processes to
-do longer-term operations such as printing, notification,
-device/driver enumeration, and remote printer monitoring. While
-this design does limit the maximum number of simultaneous clients
-that can be supported on a typical system, it also keep resource
-utilization to a minimum and greatly simplifies the scheduler's
-logic.</P>
+<P>The scheduler is a HTTP/1.1 and IPP/2.1 server application that manages HTTP and IPP requests, printers, classes, jobs, subscriptions, and notifications on the system. HTTP is used for normal web browser services as well as IPP operation messages passed via HTTP POST requests with the <CODE>application/ipp</CODE> content type. The scheduler uses a series of helper applications based on the Common Gateway Interface ("CGI") to provide dynamic web interfaces and can be configured to run additional site-specific programs or scripts for the web interface.</P>
+
+<P>The scheduler is designed as a traditional single-threaded server process which runs external processes to do longer-term operations such as printing, notification, device/driver enumeration, and remote printer monitoring. External processes are normally run as a non-privileged account ("lp") and, on some platforms, with additional restrictions that limit what the processes are allowed to do.</P>
+
+<P>The maximum number of simultaneous clients and print jobs that can be supported is primarily limited by the available server memory, file descriptors, and CPU - the scheduler itself imposes no hard limits.</P>
 
 <DIV CLASS="figure"><TABLE SUMMARY="CUPS Block Diagram">
 <CAPTION>Figure 1: <A NAME="FIGURE1">CUPS Block Diagram</A></CAPTION>
 <TR><TD ALIGN="CENTER"><IMG SRC="../images/cups-block-diagram.gif"
-WIDTH="768" HEIGHT="768" ALT="CUPS Block Diagram"/></TD></TR>
+WIDTH="768" HEIGHT="768" ALT="CUPS Block Diagram"></TD></TR>
 </TABLE></DIV>
 
+<H4>Config Files</H4>
+
+<P>The scheduler uses several configuration files to store the server settings (<A HREF="ref-cupsd-conf.html">cupsd.conf</A>), available classes (<A HREF="ref-classes-conf.html">classes.conf</A>), available printers (<A HREF="ref-printers-conf.html">printers.conf</A>), current notification subscriptions (<A HREF="ref-subscriptions-conf.html">subscriptions.conf</A>), and supported file types and filters (<A HREF="man-mime.types.html">mime.types</A>, <A HREF="man-mime.convs.html">mime.convs</A>). In addition, PostScript Printer Description ("PPD") files or interface scripts are associated with each printer, and the scheduler has cache files for remote printers, PPD files, and current jobs to optimize the scheduler's startup speed and availability.</P>
+
 <H4>Job Files</H4>
 
-<P>The scheduler stores job files in a <EM>spool directory</EM>,
-typically <VAR>/var/spool/cups</VAR>. Two types of files will be
-found in the spool directory: <EM>control files</EM> starting
-with the letter "c" ("c00001", "c99999", "c100000", etc.) and
-<EM>data files</EM> starting with the letter "d" ("d00001-001",
-"d99999-001", "d100000-001", etc.) Control files are IPP messages
-based on the original IPP Print-Job or Create-Job messages, while
-data files are the original print files that were submitted for
-printing. There is one control file for every job known to the
-system and 0 or more data files for each job. Data files are
-normally removed after a job has successfully printed, however
-this behavior can be configured.</P>
+<P>The scheduler stores job files in a <EM>spool directory</EM>, typically <VAR>/var/spool/cups</VAR>. Two types of files will be found in the spool directory: <EM>control files</EM> starting with the letter "c" ("c00001", "c99999", "c100000", etc.) and <EM>data files</EM> starting with the letter "d" ("d00001-001", "d99999-001", "d100000-001", etc.) Control files are IPP messages based on the original IPP Print-Job or Create-Job messages, while data files are the original print files that were submitted for printing. There is one control file for every job known to the system and 0 or more data files for each job.
 
-<H4>Log Files</H4>
+<p>Control files are normally cleaned out after the 500th job is submitted, while data files are removed immediately after a job has successfully printed. Both behaviors can be configured.</P>
 
-<P>The scheduler keeps three kinds of log files which are
-normally stored in the <VAR>/var/log/cups</VAR> directory. The <A
-HREF="ref-access_log.html">access_log</A> file lists every HTTP
-and IPP request that is processed by the scheduler. The <A
-HREF="ref-error_log.html">error_log</A> file contains messages
-from the scheduler and its helper applications that can be used
-to track down problems. The <A
-HREF="ref-page_log.html">page_log</A> file lists every page that
-is printed, allowing for simple print accounting.</P>
-
-<P>Log files are rotated automatically by the scheduler when they
-reach the configured size limit, by default 1MB. If the limit is
-set to 0 then no rotation is performed in the scheduler - this
-mode is often used by Linux distributions so they can use the
-<B>logrotated(8)</B> program to rotate them instead.</P>
+<H4>Log Files</H4>
 
-<H4>Config Files</H4>
+<P>The scheduler keeps three kinds of log files which are normally stored in the <VAR>/var/log/cups</VAR> directory. The <A HREF="ref-access_log.html">access_log</A> file lists every HTTP and IPP request that is processed by the scheduler. The <A HREF="ref-error_log.html">error_log</A> file contains messages from the scheduler and its helper applications that can be used
+to track down problems. The <A HREF="ref-page_log.html">page_log</A> file lists every page that is printed, allowing for simple print accounting.</P>
 
-<P>The scheduler uses several configuration files to store the
-server settings (<A HREF="ref-cupsd-conf.html">cupsd.conf</A>),
-available classes (<A
-HREF="ref-classes-conf.html">classes.conf</A>), available
-printers (<A HREF="ref-printers-conf.html">printers.conf</A>),
-current notification subscriptions (<A
-HREF="ref-subscriptions-conf.html">subscriptions.conf</A>), and
-supported file types and filters (<A
-HREF="man-mime.types.html">mime.types</A>, <A
-HREF="man-mime.convs.html">mime.convs</A>). In addition,
-PostScript Printer Description ("PPD") files or interface scripts
-are associated with each printer, and the scheduler has cache
-files for remote printers, PPD files, and current jobs to
-optimize the scheduler's startup speed and availability.</P>
+<P>Log files are rotated automatically by the scheduler when they reach the configured size limit, by default 1MB. If the limit is set to 0 then no rotation is performed in the scheduler - this mode is often used by Linux distributions so they can use the <B>logrotated(8)</B> program to rotate them instead.</P>
 
 <H3>Berkeley Commands</H3>
 
-<P>CUPS provides the Berkeley <A HREF="man-lpc.html">lpc(8)</A>,
-<A HREF="man-lpq.html">lpq(1)</A>, <A
-HREF="man-lpr.html">lpr(1)</A>, and <A
-HREF="man-lprm.html">lprm(1)</A> commands. In general, they
-function identically to the original Berkeley commands with the
-following exceptions:</P>
+<P>CUPS provides the Berkeley <A HREF="man-lpc.html">lpc(8)</A>, <A HREF="man-lpq.html">lpq(1)</A>, <A HREF="man-lpr.html">lpr(1)</A>, and <A HREF="man-lprm.html">lprm(1)</A> commands. In general, they function identically to the original Berkeley commands with the following exceptions:</P>
 
 <OL>
 
-       <LI>The <B>lpc</B> command currently only supports the
-       "status" sub-command.</LI>
+       <LI>The <B>lpc</B> command currently only supports the "status" sub-command.</LI>
 
-       <LI>The <B>lpr</B> command does not support the format
-       modifier options "1" (TROFF font set 1), "2" (TROFF font
-       set 2), "3" (TROFF font set 3), "4" (TROFF font set 4),
-       "c" (CIFPLOT), "d" (DVI), "f" (FORTRAN), "g" (GNU plot),
-       "i" (indentation), "n" (Ditroff), "r" (Sun raster), "t"
-       (Troff), or "w" (width), as they do not map to the IPP
-       MIME media type based document formats.</LI>
+       <LI>The <B>lpr</B> command does not support the format modifier options "1" (TROFF font set 1), "2" (TROFF font set 2), "3" (TROFF font set 3), "4" (TROFF font set 4), "c" (CIFPLOT), "d" (DVI), "f" (FORTRAN), "g" (GNU plot), "i" (indentation), "n" (Ditroff), "r" (Sun raster), "t" (Troff), or "w" (width), as they do not map to the IPP MIME media type based document formats.</LI>
 
 </OL>
 
 <H3>System V Commands</H3>
 
-<P>CUPS provides the System V <A
-HREF="man-accept.html">accept(8)</A>, <A
-HREF="man-cancel.html">cancel(1)</A>, <A
-HREF="man-lp.html">lp(1)</A>, <A
-HREF="man-lpadmin.html">lpadmin(8)</A>, <A
-HREF="man-lpmove.html">lpmove(8)</A>, <A
-HREF="man-lpstat.html">lpstat(1)</A>, and <A
-HREF="man-accept.html">reject(8)</A> commands. In general, they
-function identically to the original System V commands with the
-following exceptions:</P>
+<P>CUPS provides the System V <A HREF="man-cancel.html">cancel(1)</A>, <A HREF="man-lp.html">lp(1)</A>, <A HREF="man-lpadmin.html">lpadmin(8)</A>, <A HREF="man-lpmove.html">lpmove(8)</A>, and <A HREF="man-lpstat.html">lpstat(1)</A> commands. In general, they function identically to the original System V commands with the following exceptions:</P>
 
 <OL>
 
-       <LI>All commands may ask for a password; the System V
-       print spooler requires root access to perform
-       administration tasks, while CUPS allows for more flexible
-       configurations.</LI>
+       <LI>All commands may ask for a password; the System V print spooler requires root access to perform administration tasks, while CUPS allows for more flexible configurations.</LI>
 
-       <LI>The <B>lpadmin</B> command does not implement the
-       Solaris "-A" (alert), "-F" (fault recovery), "-M" (mount
-       form/wheel), "-P" (paper list), "-S" (print wheels), "-T"
-       (type list), "-U" (dialer info), "-W" (wait), "-f" (form
-       name), "-l" (content-type list), "-s" (remote printer),
-       or "-t" (number of trays) options.</LI>
+       <LI>The <B>lpadmin</B> command does not implement the Solaris "-A" (alert), "-F" (fault recovery), "-M" (mount  form/wheel), "-P" (paper list), "-S" (print wheels), "-T" (type list), "-U" (dialer info), "-W" (wait), "-f" (form name), "-l" (content-type list), "-s" (remote printer), or "-t" (number of trays) options.</LI>
 
 </OL>
 
 <H3>CUPS Commands</H3>
 
-<P>CUPS provides the <A
-HREF="man-cupsaddsmb.html">cupsaddsmb(8)</A>, <A
-HREF="man-cupsenable.html">cupsdisable(8)</A>, <A
-HREF="man-cupsenable.html">cupsenable(8)</A>, <A
-HREF="man-cupstestppd.html">cupstestppd(1)</A>, <A
-HREF="man-lpinfo.html">lpinfo(8)</A>, and <A
-HREF="man-lppasswd.html">lppasswd(1)</A> commands. The
-<B>cupsdisable</B> and <B>cupsenable</B> commands correspond to
-the System V <B>disable</B> and <B>enable</B> commands but have
-been renamed to avoid conflicts with the <B>bash(1)</B> internal
-commands of the same name.</P>
+<P>CUPS provides the <A HREF="man-cupsaccept.html">cupsaccept(8)</A>, <A HREF="man-cupsaddsmb.html">cupsaddsmb(8)</A>, <A HREF="man-cupsenable.html">cupsdisable(8)</A>, <A HREF="man-cupsenable.html">cupsenable(8)</A>, <A HREF="man-cupsaccept.html">cupsreject(8)</A>, <A HREF="man-cupstestppd.html">cupstestppd(1)</A>, <A HREF="man-lpinfo.html">lpinfo(8)</A>, and <A HREF="man-lppasswd.html">lppasswd(1)</A> commands. The <B>cupsaccept</B>, <B>cupsdisable</B>, <B>cupsenable</B>, and <B>cupsreject</B> commands correspond to the System V <B>accept</B>, <B>disable</B>, <B>enable</B>, and <B>reject</B> commands but have been renamed to avoid confusion and conflicts with the <B>bash(1)</B> internal <B>enable</B> command of the same name.</P>
 
 <H3>LPD Support</H3>
 
-<P>LPD client support is provided via the <A
-HREF="man-cups-lpd.html">cups-lpd(8)</A> program. Incoming LPD
-requests are accepted on TCP port 515 by the local
-<B>inetd(8)</B>, <B>launchd(8)</B>, or <B>xinetd(8)</B> process
-and forwarded to the <B>cups-lpd</B> program for conversion to
-the corresponding IPP request(s).</P>
-
-<P>The <B>cups-lpd</B> program conforms, for the most part, to
-RFC 1179: Line Printer Daemon Protocol, but does not enforce the
-privileged source port restriction specified in that document. In
-addition, the banner page and output format options are usually
-overridden via command-line options to the <B>cups-lpd</B>
-program when it is invoked by the corresponding super-daemon
-program.</P>
+<P>LPD client support is provided via the <A HREF="man-cups-lpd.html">cups-lpd(8)</A> program. Incoming LPD requests are accepted on TCP port 515 by the local <B>inetd(8)</B>, <B>launchd(8)</B>, or <B>xinetd(8)</B> process and forwarded to the <B>cups-lpd</B> program for conversion to the corresponding IPP request(s).</P>
+
+<P>The <B>cups-lpd</B> program conforms, for the most part, to RFC 1179: Line Printer Daemon Protocol, but does not enforce the privileged source port restriction specified in that document. In addition, the banner page and output format options are usually overridden via command-line options to the <B>cups-lpd</B> program when it is invoked by the corresponding super-daemon program.</P>
 
 <H3>Web Interface</H3>
 
-<P>The web interface is supported by five CGI programs. Table 1
-describes the purpose of each of the programs.</P>
+<P>The web interface is supported by five CGI programs. <A HREF="#TABLE1">Table 1</A> describes the purpose of each of the programs.</P>
 
 <DIV CLASS="table"><TABLE SUMMARY="CGI Programs">
 <CAPTION>Table 1: <A NAME="TABLE1">CGI Programs</A></CAPTION>
@@ -212,7 +107,7 @@ describes the purpose of each of the programs.</P>
 <TR>
        <TD>help.cgi</TD>
        <TD>/help</TD>
-       <TD>Provides access to on-line help documents</TD>
+       <TD>Provides access to online help documents</TD>
 </TR>
 <TR>
        <TD>jobs.cgi</TD>
@@ -229,166 +124,61 @@ describes the purpose of each of the programs.</P>
 
 <H3>Notifiers</H3>
 
-<P>Notifiers provide the means for sending event notifications
-from the scheduler. Notifiers are executed with the recipient
-information on the command-line and the event data on the
-standard input.</P>
+<P>Notifiers (<A HREF="man-notifier.html">notifier(7)</A>) provide the means for sending asynchronous event notifications from the scheduler. Notifiers are executed with the recipient information on the command-line and the event data on the standard input. For example:</P>
+
+<PRE CLASS="command">
+CUPS_SERVERBIN/notifier/foo recipient user-data
+</PRE>
 
-<P>The <B>mailto</B> notifier is the only notifier included with
-CUPS 1.2 and handles email notifications for the scheduler.
-Additional notifiers can be added as needed without additional
-configuration.</P>
+<P>CUPS includes two notifiers: <B>mailto</B> to provide SMTP-based email notifications and <B>rss</B> to provide Really Simple Syndication ("RSS") notifications from the scheduler. Additional notifiers can be installed in the <VAR>notifier</VAR> directory as needed to support other methods.</P>
 
 <H3>Filters</H3>
 
-<P>Filters convert job files into a printable format. Multiple
-filters are run, as needed, to convert from the job file format
-to the printable format. A filter program reads from the standard
-input or from a file if a filename is supplied. All filters must
-support a common set of options including printer name, job ID,
-username, job title, number of copies, and job options. All
-output is sent to the standard output.</P>
+<P>Filters (<A HREF="man-filter.html">filter(7)</A>) convert job files into a printable format. Multiple filters are run, as needed, to convert from the job file format to the printable format. A filter program reads from the standard input or from a file if a filename is supplied. All filters must support a common set of options including printer name, job ID, username, job title, number of copies, and job options. All output is sent to the standard output.</P>
 
-<P>CUPS provides filters for printing text, PostScript, PDF,
-HP-GL/2, and many types of image files. CUPS also provides
-printer driver filters for HP-PCL, ESC/P, and several types of
-label printers. Additional filters can be added through the use
-of mime.convs and PPD files.</P>
+<P>CUPS provides filters for printing text, PostScript, PDF, HP-GL/2, and many types of image files. CUPS also provides printer driver filters for HP-PCL, ESC/P, and several types of label printers. Additional filters can be registered with CUPS via mime.convs and PPD files.</P>
 
 <H3>Port Monitors</H3>
 
-<P>Port monitors handle the device- and channel-specific data
-formatting for a printer. Port monitors use the same interface as
-filters.</P>
+<P>Port monitors handle the device- and channel-specific data formatting for a printer. Port monitors use the same interface as filters.</P>
 
-<P>CUPS includes two port monitors: the <B>bcp</B> port monitor
-which supports the PostScript Binary Communications Protocol
-("BCP") and the <b>tbcp</b> port monitor which supports the
-PostScript Tagged Binary Communications Protocol ("TBCP").
-Additional port monitors can be added through PPD files.</P>
+<P>CUPS includes two port monitors: the <B>bcp</B> port monitor which supports the PostScript Binary Communications Protocol ("BCP") and the <b>tbcp</b> port monitor which supports the PostScript Tagged Binary Communications Protocol ("TBCP"). Additional port monitors can be registered in PPD files.</P>
 
 <H3>Backends</H3>
 
-<P>Backends send print data to the printer and enumerate
-available printers/devices as needed. Backends use the same
-interface as filters.</P>
+<P>Backends (<A HREF="man-backend.html">backend(7)</A>) send print data to the printer and enumerate available printers/devices as needed. Backends use the same interface as filters.</P>
 
-<P>CUPS includes backends for parallel, serial, SCSI, USB, LPD,
-IPP, and AppSocket (JetDirect) connections. Additional backends
-can be added as needed without additional configuration.</P>
-
-<H2 CLASS="title"><A NAME="PROGRAMMING">Programming Interfaces</A></H2>
+<P>CUPS includes backends for AppSocket (JetDirect), IPP, LPD, parallel, SCSI, serial, and USB connections. Additional backends can be added as needed without additional configuration.</P>
 
-<P>CUPS makes use of two general-purpose libraries to provide its
-printing services. The CUPS library provides the general
-communications and management infrastructure while the CUPS
-imaging library provides the image file and raster data
-support.</P>
-
-<H3>CUPS Libary</H3>
-
-<P>The CUPS library contains CUPS-specific convenience functions
-for queuing print jobs, getting printer information, accessing
-resources via HTTP and IPP, and manipulating PPD files. Unlike
-the rest of CUPS, the CUPS API is provided under the terms of the
-GNU LGPL so it may be used by non-GPL applications.</P>
-
-<H3>CUPS Imaging Library</H3>
-
-<P>The CUPS imaging library provides functions for managing large
-images, doing colorspace conversion and color management, scaling
-images for printing, and managing raster page streams. It is used
-by the CUPS image file filters, the PostScript RIP, and all
-raster printers drivers.</P>
-
-<!--<H2 CLASS="title">Network Printing</H2>
-
-<P>Traditionally, network printing has been one of the hardest
-things to get working under UNIX. One reason is because each
-vendor added their own extensions to the LPD protocol (the
-previous standard for network printing), making cross-platform
-printing difficult if not impossible.</P>
-
-<P>Another reason is that you have to administer every network
-printer on every client machine. In some cases you can "clone'
-the printer configuration from a "master' client to each of the
-others, but even that can be time-consuming and error-prone.
-Something better is needed.</P>
-
-<P>CUPS provides "printer browsing", which allows clients to
-automatically see and use printers from any server on a LAN.
-This means that you only need to configure the server and the
-clients will automatically see the printers and classes on
-it.</P>
-
-<P>In addition, CUPS can automatically merge multiple identical
-network printers into "implicit classes". This allows clients to
-send jobs to the implicit class and have them print on the first
-available printer or server. In addition, failsafe and
-load-balancing functions are enabled simply by defining the same
-printer on multiple servers!</P>
 
-<H3>Scheduler</H3>
-
-<P>The scheduler is a HTTP/1.1 server application that handles
-HTTP requests. Besides handling printer requests via IPP POST
-requests, the scheduler also acts as a full-featured web server
-for documentation, status monitoring, and administration.</P>
+<H2 CLASS="title"><A NAME="PROGRAMMING">Programming Interfaces</A></H2>
 
-<P>The scheduler also manages a list of available printers on
-the LAN and dispatches print jobs as needed using the
-appropriate filters and backends.</P>
+<P>CUPS makes use of several general-purpose libraries to provide its printing services. Unlike the rest of CUPS, the libraries are provided under the terms of the GNU LGPL so they may be used by non-GPL applications.</P>
 
-<H3>Configuration Files</H3>
+<H3>CUPS Library (libcups)</H3>
 
-<P>The configuration files consist of:</P>
+<P>The CUPS library contains all of the core HTTP and IPP communications code as well as convenience functions for queuing print jobs, getting printer information, accessing resources via HTTP and IPP, and manipulating PPD files. The scheduler and all commands, filters, and backends use this library.</P>
 
-<ul>
+<H3>CUPS CGI Library (libcupscgi)</H3>
 
-       <LI>The HTTP server configuration file.</LI>
+<P>The CUPS CGI library provides all of the web interface support functions. It is used by the CGI programs to provide the CUPS web interface.</P>
 
-       <LI>Printer and class definition files.</LI>
+<H3>CUPS Driver Library (libcupsdriver)</H3>
 
-       <LI>MIME type and conversion rule files.</LI>
+<P>The CUPS driver library provides access to the dithering, color conversion, and helper functions used by the CUPS sample printer drivers.</P>
 
-       <LI>PostScript Printer Description (PPD) files.</LI>
+<H3>CUPS Imaging Library (libcupsimage)</H3>
 
-</ul>
+<P>The CUPS imaging library provides functions for managing large images, doing colorspace conversion and color management, scaling images for printing, and managing raster page streams. It is used by the CUPS image file filters, the PostScript RIP, and all raster printers drivers.</P>
 
-<P>The HTTP server configuration file is purposely similar to
-the Apache server configuration file and defines all of the
-access control properties for the server.</P>
+<H3>CUPS MIME Library (libcupsmime)</H3>
 
-<P>The printer and class definition files list the available
-printer queues and classes. Printer classes are collections of
-printers. Jobs sent to a class are forwarded to the first
-available printer in the class, round-robin fashion.</P>
+<P>The CUPS MIME library provides file typing and conversion functions and is used by the scheduler and <A HREF="man-cupsfilter.html">cupsfilter(8)</A> command to auto-type and convert print files to a printable format.</P>
 
-<P>The MIME type files list the supported MIME types
-(text/plain, application/postscript, etc.) and "magic' rules for
-automatically detecting the format of a file.  These are used by
-the HTTP server to determine the <tt>Content-Type</tt> field for
-<tt>GET</tt> and <tt>HEAD</tt> requests and by the IPP request
-handler to determine the file type when a <tt>Print-Job</tt> or
-<tt>Send-File</tt> request is received with a
-<tt>document-format</tt> of
-<tt>application/octet-stream</tt>.</P>
+<H3>CUPS PPD Compiler Library (libcupsppdc)</H3>
 
-<P>The MIME conversion rule files list the available filters.
-The filters are used when a job is dispatched so that an
-application can send a convenient file format to the printing
-system which then converts the document into a printable format
-as needed. Each filter has a relative cost associated with it,
-and the filtering algorithm chooses the set of filters that will
-convert the file to the needed format with the lowest total
-"cost".</P>
+<P>The CUPS PPD compiler library provides access to driver information files and is used by the PPD compiler tools as well as the <A HREF="man-cups-driverd.html">cups-driverd(8)</A> helper program to generate PPD files and message catalogs for localization.</P>
 
-<P>The PPD files describe the capabilities of all printers, not
-just PostScript printers. There is one PPD file for each
-printer. PPD files for non-PostScript printers define additional
-filters through <tt>cupsFilter</tt> attributes to support
-printer drivers.</P>
--->
 
 </BODY>
 </HTML>
index 39839068b6a25fa7bf8ddc5c9e17f8529ee724e5..525e49d5f91c741326e7f95ffe0aec140d119fa9 100644 (file)
@@ -4,6 +4,7 @@
 <head>
        <title>CUPS Implementation of IPP</title>
        <meta name='keywords' content='Programming, Internet Printing Protocol'>
+       <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
 </head>
 <body>
 <!--
@@ -21,6 +22,8 @@
   file is missing or damaged, see the license at "http://www.cups.org/".
 -->
 
+<H1 CLASS="title">CUPS Implementation of IPP</H1>
+
 <h2 class='title'><a name='INTRODUCTION'>Introduction</a></h2>
 
 <p>CUPS implements IPP/1.1 and the operations and attributes
index bb7164472432b641bc3e38b473ddd90698e4b89f..407f47887f990734898612de497c3646f217cee4 100644 (file)
@@ -3,10 +3,12 @@
 <!-- SECTION: Specifications -->
 <HEAD>
        <TITLE>CUPS PDF Format</TITLE>
-       <LINK REL="STYLESHEET" TYPE="test/css" HREF="../cups.css">
+       <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
 </HEAD>
 <BODY>
 
+<H1 CLASS="title">CUPS PDF Format</H1>
+
 <P>CUPS PDF files (application/vnd.cups-pdf) are device-dependent
 PDF/A files that contain a job ticket information. These files
 are typically produced by the CUPS <CODE>pdftopdf</CODE> filter
index 461e225f8feecbc0c3f6c90242302557d08d391b..b13a1894e2d85f23a0a55413038bb24bad5c2e41 100644 (file)
@@ -4,7 +4,7 @@
 <head>
        <title>Generating PostScript for CUPS</title>
        <meta name='keywords' content='Programming, PostScript, Document Structuring Conventions'>
-       <link rel='stylesheet' type='text/css' href='../cups.css'>
+       <link rel='stylesheet' type='text/css' href='../cups-printable.css'>
 </head>
 <body>
 <!--
@@ -22,6 +22,8 @@
   file is missing or damaged, see the license at "http://www.cups.org/".
 -->
 
+<H1 CLASS="title">Generating PostScript for CUPS</H1>
+
 <h2 class='title'><a name='INTRODUCTION'>Introduction</a></h2>
 
 <p>This document describes how to generate PostScript output for
index fe4b0cfd8834da5b9c8dec59ef4859b976721a4d..6753cd48edea717a8f8f215be84dbd1cff942783 100644 (file)
@@ -22,6 +22,8 @@
   file is missing or damaged, see the license at "http://www.cups.org/".
 -->
 
+<H1 CLASS="title">CUPS PPD Extensions</H1>
+
 <h2 class='title'><a name='INTRODUCTION'>Introduction</a></h2>
 
 <p>This specification describes the attributes and extensions
@@ -297,9 +299,9 @@ equivalent.</p>
 <p class='summary'>*APCustomColorMatchingProfile: name</p>
 
 <p>This attribute defines a supported RGB color profile that can be used
-when doing custom color matching. Currently only <tt>sRGB</tt> and
-<tt>AdobeRGB</tt> are supported. If not specified, RGB data will use the
-Generic RGB colorspace.</p>
+when doing custom color matching. Currently only <tt>sRGB</tt>,
+<tt>AdobeRGB</tt>, and <tt>GenericRGB</tt> are supported. If not specified, RGB
+data will use the GenericRGB colorspace.</p>
 
 <blockquote><b>Note:</b>
 
@@ -326,8 +328,8 @@ Add the named profile to the print settings using the key
 <p class='summary'>*APDefaultCustomColorMatchingProfile: name</p>
 
 <p>This attribute defines the default RGB color profile that will be used
-when doing custom color matching. Currently only <tt>sRGB</tt> and
-<tt>AdobeRGB</tt> are supported.</p>
+when doing custom color matching. Currently only <tt>sRGB</tt>,
+<tt>AdobeRGB</tt>, and <tt>GenericRGB</tt> are supported.</p>
 
 <p>Examples:</p>
 
@@ -343,7 +345,7 @@ when doing custom color matching. Currently only <tt>sRGB</tt> and
 
 <p>This attribute specifies that the driver provides its own custom color
 matching. When <tt>true</tt>, the default hand-off colorspace will be
-Generic Gray, Generic RGB, or Generic CMYK depending on the number of
+GenericGray, GenericRGB, or GenericCMYK depending on the number of
 components the driver requests. The <a
 href='#APDefaultCustomColorMatchingProfile'><tt>APDefaultCustomColorMatchingProfile</tt></a>
 attribute can be used to override the default 3-component (RGB) colorspace.</p>
index 79a93a4c5bf0d5fd9d8b884d917941916f89623b..de5b7b50ea234cc83ffe8b8b3d3959aacbff2fef 100644 (file)
@@ -3,10 +3,12 @@
 <!-- SECTION: Specifications -->
 <HEAD>
        <TITLE>CUPS Raster Format</TITLE>
-       <LINK REL="STYLESHEET" TYPE="test/css" HREF="../cups.css">
+       <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
 </HEAD>
 <BODY>
 
+<H1 CLASS="title">CUPS Raster Format</H1>
+
 <P>CUPS raster files are device-dependent raster image files that
 contain a PostScript page device dictionary and device-dependent
 raster imagery for each page in the document. These files are
@@ -15,7 +17,7 @@ RIPs to device-dependent filters that convert the raster data to
 a printable format.</P>
 
 <P>CUPS 1.0 and 1.1 used a version 1 raster format. CUPS 1.2
-introduces version 2 (compressed) and version 3 (uncompressed)
+introduced version 2 (compressed) and version 3 (uncompressed)
 formats that are a superset of the version 1 format. Applications
 using the CUPS Imaging API (the cupsRaster* functions) can read
 all formats without code changes.</P>
index fd46937f8f8038414a6dd5a78c0b46b9c17adb43..fd04da6472979a9ec564e2544289a476680df77f 100644 (file)
@@ -3,12 +3,14 @@
 <!-- SECTION: Specifications -->
 <HEAD>
        <TITLE>CUPS Software Test Plan</TITLE>
+       <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
 </HEAD>
 <BODY>
 
+<H1 CLASS="title">CUPS Software Test Plan</H1>
+
 <P>This software test plan provides detailed tests that are used
-to evaluate the stability and compliance of the Common UNIX
-Printing System ("CUPS") Version 1.2.</P>
+to evaluate the stability and compliance of CUPS.</P>
 
 
 <H2 CLASS="title"><A NAME="PROCEDURE">Test Procedure</A></H2>
index 9005c62816b3a17694db1dc17ad79119eaa93392..f957fe249cb077d1c0ee682cdacbda9116fe67e8 100644 (file)
@@ -2,9 +2,12 @@
 <!-- SECTION: Getting Started -->
 <HEAD>
        <TITLE>Standard Configuration</TITLE>
+       <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
 </HEAD>
 <BODY>
 
+<H1 CLASS="title">Standard Configuration</H1>
+
 <P>This document describes the standard configuration for this CUPS
 server.</P>
 
@@ -14,7 +17,7 @@ server.</P>
      if you make any changes to the standard CUPS distribution that are
      not automatically updated by the configure script. -->
 <P>This file reflects the standard CUPS configuration as distributed
-by Easy Software Products, the creator of CUPS.</P>
+by Apple Inc, the developer of CUPS.</P>
 
 </BLOCKQUOTE>
 
index abc4bbb655bc3b90b6674a0158b4d1a103a18f8e..8fa6efe23959ce65a7d6aa0be6ade596c07b11f5 100644 (file)
@@ -2,14 +2,18 @@
 <!-- SECTION: Getting Started -->
 <HEAD>
        <TITLE>Translating and Customizing CUPS</TITLE>
+       <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
 </HEAD>
 <BODY>
 
+<H1 CLASS="title">Translating and Customizing CUPS</H1>
+
 <P>Thanks to its extensive use of templates, images, and message
 catalogs, CUPS can be easily translated (or customized!) to suit
 your needs. This help file will guide you through the CUPS
 localization files so you can get the most out of it.</P>
 
+
 <H2 CLASS="title"><A NAME="INTRO">Getting Started</A></H2>
 
 <P>Start by downloading the CUPS source code from <A
index 56d13e4e69067ac8323a3560b7872d75c0a46fa2..dfbc62a6f14ac865d4cd85a681cb7085c8f962a2 100644 (file)
@@ -2,10 +2,13 @@
 <!-- SECTION: Getting Started -->
 <HEAD>
        <TITLE>What's New in CUPS 1.4</TITLE>
+       <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
 </HEAD>
 <BODY>
 
-<P>CUPS 1.4 adds over 65 changes and new features to CUPS 1.3.x. This page provides a high-level outline of these changes. If you have never used CUPS before, read the <A HREF="overview.html">"Overview of CUPS"</A> document instead.</P>
+<H1 CLASS="title">What's New in CUPS 1.4</H1>
+
+<P>CUPS 1.4 adds over 67 changes and new features to CUPS 1.3.x. This page provides a high-level outline of these changes. If you have never used CUPS before, read the <A HREF="overview.html">"Overview of CUPS"</A> document instead.</P>
 
 <H2 CLASS="title"><A NAME="COMMANDS">Commands</A></H2>
 
 
        <LI><EM>Default LogLevel;</EM> the default LogLevel is now "warn" instead of "info".</LI>
 
+       <LI><EM>Automatic debug logging;</EM> the scheduler now records up to the last N (default 200) debug messages for failed print jobs.</LI>
+
        <LI><EM>Default paper size;</EM> the scheduler now supports a DefaultPaperSize directive to override the default paper size defined by the locale or libpaper configuration.</LI>
 
        <LI><EM>Encryption support;</EM> the scheduler now supports a SSLOptions directive to optionally support Windows clients in "FIPS" mode. It also now loads both the server and CA certificates (if present) from the ServerCertificate file.</LI>
 
 <H2 CLASS="title"><A NAME="DRIVERS">Printer Drivers</A></H2>
 
-<OL START="49">
+<OL START="50">
 
        <LI><EM>Device discovery;</EM> the cups-deviced helper now runs backends in parallel for faster discovery and streams the results of discovery as the backends provide them.</LI>
 
 
 <H2 CLASS="title"><A NAME="FILTERS">Print Filters</A></H2>
 
-<OL START="58">
+<OL START="59">
 
        <LI><EM>Banner filter;</EM> the bundled banner ("job-sheets") pages are now generated using a new banner filter provides easier customization and better support for UTF-8 text.</LI>
 
 
 <H2 CLASS="title"><A NAME="CUPSAPI">CUPS API</A></H2>
 
-<OL START="61">
+<OL START="62">
 
        <LI><EM>Backend API;</EM> a new cupsBackendReport function is provided to report a device from a backend and handles any needed quoting of the make-and-model, info, device-id, and location strings.</LI>
 
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0f3937bc1d68ebc73ba9bc495c0b9de99bf9db3a 100644 (file)
@@ -0,0 +1,34 @@
+<!--
+  "$Id: api-array.header 8087 2008-10-27 21:37:05Z mike $"
+
+  Driver API header for CUPS.
+
+  Copyright 2009 by Apple Inc.
+
+  These coded instructions, statements, and computer programs are the
+  property of Apple Inc. and are protected by Federal copyright
+  law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+  which should have been included with this file.  If this file is
+  file is missing or damaged, see the license at "http://www.cups.org/".
+-->
+
+<h1 class='title'>Driver API</h1>
+
+<div class='summary'><table summary='General Information'>
+<thead>
+<tr>
+       <th>Header</th>
+       <th>cups/driver.h</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+       <th>Library</th>
+       <td>-lcupsdriver</td>
+</tr>
+<tr>
+       <th>See Also</th>
+       <td>Programming: <a href='api-overview.html' target='_top'>Introduction to CUPS Programming</a></td>
+</tr>
+</tbody>
+</table></div>
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0e8bcff27b26933b0a696153f10d6c392fa9524b 100644 (file)
@@ -0,0 +1,18 @@
+<!--
+  "$Id: api-array.shtml 7616 2008-05-28 00:34:13Z mike $"
+
+  Driver API introduction for CUPS.
+
+  Copyright 2009 by Apple Inc.
+
+  These coded instructions, statements, and computer programs are the
+  property of Apple Inc. and are protected by Federal copyright
+  law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+  which should have been included with this file.  If this file is
+  file is missing or damaged, see the license at "http://www.cups.org/".
+-->
+
+<h2 class='title'><a name='OVERVIEW'>Overview</a></h2>
+
+<p>The driver API provides common dithering, color conversion, and utility
+functions for CUPS drivers.</p>
index 8b54f004fb67153b2fc11a27d7da177ea8276645..8e26fbf3e0c07472f4d3814fffc3e173cc8bfd92 100644 (file)
@@ -3,7 +3,7 @@
 
   Raster API header for the Common UNIX Printing System (CUPS).
 
-  Copyright 2008 by Apple Inc.
+  Copyright 2008-2009 by Apple Inc.
 
   These coded instructions, statements, and computer programs are the
   property of Apple Inc. and are protected by Federal copyright
@@ -12,6 +12,8 @@
   file is missing or damaged, see the license at "http://www.cups.org/".
 -->
 
+<h1 class='title'>Raster API</h1>
+
 <div class='summary'><table summary='General Information'>
 <thead>
 <tr>
index 5eb2dd15b005252251e0e0fc36bb58e7bb63b451..1f717ba098477fb849bc619c87c3139a938bd020 100644 (file)
@@ -1,4 +1,6 @@
-<p>This document describes how to develop printer drivers for PostScript printers. Topics include: <a href='#BASICS'>printer driver basics</a>, <a href='#CREATE'>creating new PPD files</a>, <a href='#IMPORT'>importing existing PPD files</a>, <a href='#FILTERS'>using custom filters</a>, <a href='#COLOR'>implementing color management</a>, <a href='#MACOSX'>adding Mac OS X features</a>, and <a href='#DEPLOY'>deploying your driver</a>.</p>
+<h1 class='title'>Developing PostScript Printer Drivers</h1>
+
+<p>This document describes how to develop printer drivers for PostScript printers. Topics include: <a href='#BASICS'>printer driver basics</a>, <a href='#CREATE'>creating new PPD files</a>, <a href='#IMPORT'>importing existing PPD files</a>, <a href='#FILTERS'>using custom filters</a>, <a href='#COLOR'>implementing color management</a>, and <a href='#MACOSX'>adding Mac OS X features</a>.</p>
 
 <div class='summary'><table summary='General Information'>
 <tbody>
index 4729d5e258bd364c0bac618b9f03318c83465086..a21086d92a18091d2860b587bfa546085e7958d1 100644 (file)
@@ -248,14 +248,29 @@ information file.</P>
 
 <h2 class='title'><a name='COLOR'>Implementing Color Management</a></h2>
 
-<p>Talk about ICC color profiles and sRGB as two best options.</p>
+<p>CUPS uses ICC color profiles to provide more accurate color reproduction. The <a href='spec-ppd.html#cupsICCProfile'><tt>cupsICCProfile</tt></a> attribute defines the color profiles that are available for a given printer, for example:</p>
 
+<pre class='example'>
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> cupsICCProfile "ColorModel.MediaType.Resolution/Description" /path/to/ICC/profile
+</pre>
 
-<h2 class='title'><a name='MACOSX'>Adding Mac OS X Features</a></h2>
+<p>where "ColorModel.MediaType.Resolution" defines a selector based on the corresponding option selections. A simple driver might only define profiles for the color models that are supported, for example a printer supporting Gray and RGB might use:</p>
+
+<pre class='example'>
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> cupsICCProfile "Gray../Grayscale Profile" /path/to/ICC/gray-profile
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> cupsICCProfile "RGB../Full Color Profile" /path/to/ICC/rgb-profile
+</pre>
+
+<p>The options used for profile selection can be customized using the <tt>cupsICCQualifier2</tt> and <tt>cupsICCQualifier3</tt> attributes.</p>
 
-<p>Talk about help books, icons, and PDEs.</p>
 
+<h2 class='title'><a name='MACOSX'>Adding Mac OS X Features</a></h2>
 
-<h2 class='title'><a name='DEPLOY'>Deploying Your Driver</a></h2>
+<p>Mac OS X printer drivers can provide <a href='spec-ppd.html#MACOSX'>additional attributes</a> to specify additional option panes in the print dialog, an image of the printer, a help book, and option presets for the driver software:</p>
 
-<p>Talk about install locations, etc.</p>
+<pre class='example'>
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APDialogExtension "" /Library/Printers/Vendor/filename.plugin
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APHelpBook "" /Library/Printers/Vendor/filename.bundle
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APPrinterIconPath "" /Library/Printers/Vendor/filename.icns
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APPrinterPreset "name/text" "*option choice ..."
+</pre>
index b975c92ccff71ab407bdb9dd8ac3c92ac3cbeb82..6afe1b4f04a3be984f02d27578ef2d9aef702ab2 100644 (file)
@@ -1,3 +1,5 @@
+<h1 class='title'>Introduction to the PPD Compiler</h1>
+
 <P>This document describes how to use the CUPS PostScript Printer Description
 (PPD) file compiler. The PPD compiler generates PPD files from simple text files
 that describe the features and capabilities of one or more printers.</P>
index a90c2e328ca69dcd4dbbff12c30f16557b6bed25..5ba1fb6149607758904525c0df922ae75b709660 100644 (file)
@@ -1,4 +1,6 @@
-<p>This document describes how to develop printer drivers for raster printers. Topics include: <a href='#BASICS'>printer driver basics</a>, <a href='#CREATE'>creating new PPD files</a>, <a href='#FILTERS'>using filters</a>, <a href='#COLOR'>implementing color management</a>, <a href='#MACOSX'>adding Mac OS X features</a>, and <a href='#DEPLOY'>deploying your driver</a>.</p>
+<h1 class='title'>Developing Raster Printer Drivers</h1>
+
+<p>This document describes how to develop printer drivers for raster printers. Topics include: <a href='#BASICS'>printer driver basics</a>, <a href='#CREATE'>creating new PPD files</a>, <a href='#FILTERS'>using filters</a>, <a href='#COLOR'>implementing color management</a>, and <a href='#MACOSX'>adding Mac OS X features</a>.</p>
 
 <div class='summary'><table summary='General Information'>
 <tbody>
index 824ef37793238117b610d067e7f7aaa8430080b1..3a260f008583edd2f547b659933fa9d75705c04c 100644 (file)
 
 <h2 class='title'><a name='COLOR'>Implementing Color Management</a></h2>
 
-<p>Talk about ICC color profiles and sRGB as two best options.</p>
+<p>CUPS uses ICC color profiles to provide more accurate color reproduction. The <a href='spec-ppd.html#cupsICCProfile'><tt>cupsICCProfile</tt></a> attribute defines the color profiles that are available for a given printer, for example:</p>
 
+<pre class='example'>
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> cupsICCProfile "ColorModel.MediaType.Resolution/Description" /path/to/ICC/profile
+</pre>
 
-<h2 class='title'><a name='MACOSX'>Adding Mac OS X Features</a></h2>
+<p>where "ColorModel.MediaType.Resolution" defines a selector based on the corresponding option selections. A simple driver might only define profiles for the color models that are supported, for example a printer supporting Gray and RGB might use:</p>
+
+<pre class='example'>
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> cupsICCProfile "Gray../Grayscale Profile" /path/to/ICC/gray-profile
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> cupsICCProfile "RGB../Full Color Profile" /path/to/ICC/rgb-profile
+</pre>
 
-<p>Talk about help books, icons, and PDEs.</p>
+<p>The options used for profile selection can be customized using the <tt>cupsICCQualifier2</tt> and <tt>cupsICCQualifier3</tt> attributes.</p>
 
+<h3><span class='info'>Since Mac OS X 10.5</span>Custom Color Matching Support</h3>
 
-<h2 class='title'><a name='DEPLOY'>Deploying Your Driver</a></h2>
+<p>Mac OS X printer drivers that are based on an existing standard RGB colorspace can tell the system to use the corresponding colorspace instead of an arbitrary ICC color profile when doing color management. The <a href='#APCustom'><tt>APSupportsCustomColorMatching</tt></a> and <tt>APDefaultCustomColorMatchingProfile</tt> attributes can be used to enable this mode:</p>
 
-<p>Talk about install locations, etc.</p>
+<pre class='example'>
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APSupportsCustomColorMatching "" true
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APDefaultCustomColorMatchingProfile "" sRGB
+</pre>
+
+
+<h2 class='title'><a name='MACOSX'>Adding Mac OS X Features</a></h2>
+
+<p>Mac OS X printer drivers can provide <a href='spec-ppd.html#MACOSX'>additional attributes</a> to specify additional option panes in the print dialog, an image of the printer, a help book, and option presets for the driver software:</p>
+
+<pre class='example'>
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APDialogExtension "" /Library/Printers/Vendor/filename.plugin
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APHelpBook "" /Library/Printers/Vendor/filename.bundle
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APPrinterIconPath "" /Library/Printers/Vendor/filename.icns
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APPrinterPreset "name/text" "*option choice ..."
+</pre>
index 5a54687d235ff96f89afac8b765f96f56432bea9..141cd2b22c7ca5dee8f3d0c89d0afaf2420dc652 100644 (file)
@@ -4,7 +4,7 @@
  *   EPSON ESC/P and ESC/P2 filter for the Common UNIX Printing System
  *   (CUPS).
  *
- *   Copyright 2007-2008 by Apple Inc.
+ *   Copyright 2007-2009 by Apple Inc.
  *   Copyright 1993-2007 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
@@ -105,7 +105,7 @@ void        OutputRows(const cups_page_header2_t *header, int row);
 void
 Setup(void)
 {
-  const char   *device_uri;    /* The device for the printer... */
+  const char   *device_uri;            /* The device for the printer... */
 
 
  /*
@@ -124,11 +124,12 @@ Setup(void)
  */
 
 void
-StartPage(const ppd_file_t         *ppd,       /* I - PPD file */
-          const cups_page_header2_t *header)   /* I - Page header */
+StartPage(
+    const ppd_file_t         *ppd,     /* I - PPD file */
+    const cups_page_header2_t *header) /* I - Page header */
 {
-  int  n, t;                                   /* Numbers */
-  int  plane;                                  /* Looping var */
+  int  n, t;                           /* Numbers */
+  int  plane;                          /* Looping var */
 
 
  /*
@@ -144,8 +145,6 @@ StartPage(const ppd_file_t         *ppd,    /* I - PPD file */
   * See which type of printer we are using...
   */
 
-  EjectPage = header->Margins[0] || header->Margins[1];
-    
   switch (Model)
   {
     case EPSON_9PIN :
@@ -165,8 +164,8 @@ StartPage(const ppd_file_t         *ppd,    /* I - PPD file */
 
        printf("\033l%c\033Q%c", 0,     /* Side margins */
                       (int)(10.0 * header->PageSize[0] / 72.0 + 0.5));
-       printf("\033C%c%c", 0,          /* Page length */
-                      (int)(header->PageSize[1] / 72.0 + 0.5));
+       printf("\033\062\033C%c",       /* Page length in 1/6th inches */
+                     (int)(header->PageSize[1] / 12.0 + 0.5));
        printf("\033N%c", 0);           /* Bottom margin */
         printf("\033O");               /* No perforation skip */
 
@@ -321,7 +320,8 @@ StartPage(const ppd_file_t         *ppd,    /* I - PPD file */
  */
 
 void
-EndPage(const cups_page_header2_t *header)     /* I - Page header */
+EndPage(
+    const cups_page_header2_t *header) /* I - Page header */
 {
   if (DotBytes && header)
   {
@@ -350,8 +350,7 @@ EndPage(const cups_page_header2_t *header)  /* I - Page header */
   * Eject the current page...
   */
 
-  if (EjectPage)
-    putchar(12);               /* Form feed */
+  putchar(12);                         /* Form feed */
   fflush(stdout);
 
  /*
@@ -609,7 +608,8 @@ CompressData(const unsigned char *line,     /* I - Data to compress */
  */
 
 void
-OutputLine(const cups_page_header2_t *header)  /* I - Page header */
+OutputLine(
+    const cups_page_header2_t *header) /* I - Page header */
 {
   if (header->cupsRowCount)
   {
@@ -777,14 +777,15 @@ OutputLine(const cups_page_header2_t *header)     /* I - Page header */
  */
 
 void
-OutputRows(const cups_page_header2_t *header,  /* I - Page image header */
-           int                      row)       /* I - Row number (0 or 1) */
+OutputRows(
+    const cups_page_header2_t *header, /* I - Page image header */
+    int                      row)      /* I - Row number (0 or 1) */
 {
-  unsigned     i, n;                           /* Looping vars */
-  int          dot_count,                      /* Number of bytes to print */
-                dot_min;                       /* Minimum number of bytes */
-  unsigned char *dot_ptr,                      /* Pointer to print data */
-               *ptr;                           /* Current data */
+  unsigned     i, n;                   /* Looping vars */
+  int          dot_count,              /* Number of bytes to print */
+                dot_min;               /* Minimum number of bytes */
+  unsigned char *dot_ptr,              /* Pointer to print data */
+               *ptr;                   /* Current data */
 
 
   dot_min = DotBytes * DotColumns;
index 74bcce6c3b57d1d6d30f7f045c4498d15cac1a0b..2b9a7df9d55866cf7f8e593cb4a12138b65de619 100644 (file)
@@ -4,6 +4,10 @@
 <dict>
        <key>Label</key>
        <string>org.cups.cupsd</string>
+       <key>EnableTransactions</key>
+       <true/>
+       <key>ExitTimeOut</key>
+       <integer>60</integer>
        <key>KeepAlive</key>
        <dict>
                <key>PathState</key>
index de7a5b8149a8228ac417a3902bbb65ba6ce11629..7a78b197b4fb27da78543198e84158dc7ecd745c 100644 (file)
@@ -2116,7 +2116,7 @@ msgid "Billing Information: "
 msgstr "帐单信息:"
 
 msgid "Bond Paper"
-msgstr "证券纸"
+msgstr "半透明纸"
 
 msgid "C0 Envelope"
 msgstr "C0 信封"
@@ -3715,7 +3715,7 @@ msgid "Print and Tear"
 msgstr "打印和撕纸"
 
 msgid "Printed For: "
-msgstr "打印用于:"
+msgstr "打印:"
 
 msgid "Printed From: "
 msgstr "打印自:"
index d1a4e8c1cb6269848da1685d43a62d1398c97e0e..b12c39a659ac37bbdae0963e7fd3e6718321489e 100644 (file)
@@ -47,12 +47,9 @@ MAN5 =       classes.conf.$(MAN5EXT) \
                printers.conf.$(MAN5EXT) \
                subscriptions.conf.$(MAN5EXT)
 MAN7   =       backend.$(MAN7EXT) \
-               commandtoescpx.$(MAN7EXT) \
-               commandtopclx.$(MAN7EXT) \
                drv.$(MAN7EXT) \
                filter.$(MAN7EXT) \
-               rastertoescpx.$(MAN7EXT) \
-               rastertopclx.$(MAN7EXT)
+               notifier.$(MAN7EXT)
 MAN8   =       cupsaccept.$(MAN8EXT) \
                cupsaddsmb.$(MAN8EXT) \
                cupsctl.$(MAN8EXT) \
index 7c828af1465b7d980dd9d07003e15fec515345c1..e62f94e22ff6863188bed8acf98037c06dd4a743 100644 (file)
@@ -12,7 +12,7 @@
 .\"   which should have been included with this file.  If this file is
 .\"   file is missing or damaged, see the license at "http://www.cups.org/".
 .\"
-.TH backend 7 "CUPS" "28 July 2008" "Apple Inc."
+.TH backend 7 "CUPS" "12 May 2009" "Apple Inc."
 
 .SH NAME
 backend \- cups backend transmission interfaces
@@ -36,13 +36,11 @@ standard input to a temporary file as required by the physical
 interface.
 
 .LP
-The command name (argv[0]) is set to the device URI of the
-destination printer. Starting with CUPS 1.1.22, any
-authentication information in argv[0] is removed, so
-backend developers are urged to use the DEVICE_URI environment
-variable whenever authentication information is required. The
-CUPS API includes a \fIcupsBackendDeviceURI\fR function for
-retrieving the correct device URI.
+The command name (argv[0]) is set to the device URI of the destination printer.
+Starting with CUPS 1.1.22, any authentication information in argv[0] is removed,
+so backend developers are urged to use the DEVICE_URI environment variable
+whenever authentication information is required. The CUPS API includes a
+\fIcupsBackendDeviceURI\fR function for retrieving the correct device URI.
 
 .LP
 Back-channel data from the device should be relayed to the job
@@ -174,7 +172,7 @@ this by canceling the job.
 All other exit code values are reserved.
 
 .SH SEE ALSO
-\fIcupsd(8)\fR, \fIcupsd.conf(5)\fR, \fIfilter(7)\fR
+\fIcupsd(8)\fR, \fIcupsd.conf(5)\fR, \fIfilter(7)\fR,
 .br
 http://localhost:631/help
 
diff --git a/man/commandtoescpx.man b/man/commandtoescpx.man
deleted file mode 100644 (file)
index 8d4209a..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-.\"
-.\" "$Id: commandtoescpx.man 7600 2008-05-20 21:06:23Z mike $"
-.\"
-.\"   commandtoescpx man page for the CUPS Driver Development Kit.
-.\"
-.\"   Copyright 2007-2009 by Apple Inc.
-.\"   Copyright 1997-2007 by Easy Software Products.
-.\"
-.\"   These coded instructions, statements, and computer programs are the
-.\"   property of Apple Inc. and are protected by Federal copyright
-.\"   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
-.\"   which should have been included with this file.  If this file is
-.\"   file is missing or damaged, see the license at "http://www.cups.org/".
-.\"
-.TH commandtoescpx 1 "CUPS" "9 March 2009" "Apple Inc."
-.SH NAME
-commandtoescpx \- enhanced esc/p command filter for cups
-.SH SYNOPSIS
-.B commandtoescpx
-jobid user title copies options [
-.I filename.ras
-]
-.SH DESCRIPTION
-\fIcommandtoescpx\fR converts a CUPS command file to ESC/P or
-ESC/P2. It is used to support printing to a variety of EPSON and
-EPSON-compatible printers and plotters.
-.SH SEE ALSO
-ppdc(1), ppdhtml(1), ppdi(1), ppdmerge(1), ppdpo(1), ppdcfile(5), CUPS Driver Developer Kit Manual.
-.SH COPYRIGHT
-Copyright 2007-2009 by Apple Inc.
-.\"
-.\" End of "$Id: commandtoescpx.man 7600 2008-05-20 21:06:23Z mike $".
-.\"
diff --git a/man/commandtopclx.man b/man/commandtopclx.man
deleted file mode 100644 (file)
index 9288ad2..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-.\"
-.\" "$Id: commandtopclx.man 7600 2008-05-20 21:06:23Z mike $"
-.\"
-.\"   commandtopclx man page for the CUPS Driver Development Kit.
-.\"
-.\"   Copyright 2007-2009 by Apple Inc.
-.\"   Copyright 1997-2007 by Easy Software Products.
-.\"
-.\"   These coded instructions, statements, and computer programs are the
-.\"   property of Apple Inc. and are protected by Federal copyright
-.\"   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
-.\"   which should have been included with this file.  If this file is
-.\"   file is missing or damaged, see the license at "http://www.cups.org/".
-.\"
-.TH commandtopclx 1 "CUPS" "9 March 2009" "Apple Inc."
-.SH NAME
-commandtopclx \- enhanced pcl command filter for cups
-.SH SYNOPSIS
-.B commandtopclx
-jobid user title copies options [
-.I filename.ras
-]
-.SH DESCRIPTION
-\fIcommandtopclx\fR converts a CUPS command file to HP-PCL. It is
-used to support printing to a variety of HP and HP-compatible
-printers and plotters.
-.SH SEE ALSO
-ppdc(1), ppdhtml(1), ppdi(1), ppdmerge(1), ppdpo(1), ppdcfile(5), CUPS Driver Developer Kit Manual.
-.SH COPYRIGHT
-Copyright 2007-2009 by Apple Inc.
-.\"
-.\" End of "$Id: commandtopclx.man 7600 2008-05-20 21:06:23Z mike $".
-.\"
index a2153b9a67dd244ef04ced17a3cf481e332c0c88..430df4c8783425c9273584d30bb72b0f9ed2d4c7 100644 (file)
@@ -442,6 +442,11 @@ Listens to the specified address and port or domain socket path.
 .br
 Specifies access control for the named location.
 .TP 5
+LogDebugHistory #-messages
+.br
+Specifies the number of debugging messages that are logged when an error
+occurs in a print job.
+.TP 5
 LogFilePerm mode
 .br
 Specifies the permissions for all log files that the scheduler writes.
index 4d8bec9dd4d960e972b835939969430078af7148..a66e055620d4319f5188fb6bc4d3f9ec919bbc8d 100644 (file)
@@ -12,7 +12,7 @@
 .\"   which should have been included with this file.  If this file is
 .\"   file is missing or damaged, see the license at "http://www.cups.org/".
 .\"
-.TH filter 7 "CUPS" "18 September 2008" "Apple Inc."
+.TH filter 7 "CUPS" "13 May 2009" "Apple Inc."
 .SH NAME
 filter \- cups file conversion filter interface
 .SH SYNOPSIS
@@ -31,7 +31,24 @@ or from the standard input, copying the standard input to a temporary
 file as required by the file format. All output \fBmust\fR be sent to the
 standard output.
 .LP
-The command name (argv[0]) is set to the name of the destination printer.
+The command name (argv[0]) is set to the name of the destination printer but is
+also available in the PRINTER environment variable.
+
+.SH OPTIONS
+Options passed on the command-line typically do not include the default choices
+the printer's PPD file. In addition, some options may be specified in multiple
+ways - "landscape" is a synonym for "orientation-requested=4", "media" is a
+synonym for "PageSize", "PageRegion", "InputSlot", and "MediaType", and "sides"
+is a synonym for the various "Duplex" options. Non-raster filters \fBmust\fR
+support both explicit and implicit specification of PPD options - use the
+ppdMarkDefaults and cupsMarkOptions functions in the CUPS library to use the
+correct mapping, and ppdFindMarkedChoice to get the user-selected choice.
+.LP
+Raster filters should use option choices set through the raster page header, as
+those reflect the options in effect for a given page. Options specified on the
+command-line determine the default values for the entire job, which can be
+overridden on a per-page basis.
+
 .SH LOG MESSAGES
 Messages sent to stderr are generally logged to
 printer-state-message attribute and the current \fIErrorLog\fR.
@@ -229,7 +246,7 @@ scripts, it will only work with the System V interface script as the
 only filter.  Typically the interface script will be provided via the
 \fIlpadmin(8)\fR command using the \fI-i\fR option.
 .SH SEE ALSO
-\fIbackend(1)\fR, \fIcupsd(8)\fR,
+\fIbackend(7)\fR, \fIcupsd(8)\fR,
 .br
 http://localhost:631/help
 .SH COPYRIGHT
index ff9c67501656374ed7788f2e6fcca3468a4b17ee..dd672d5077a0141649c9450c889f6ee062eaace3 100644 (file)
@@ -109,12 +109,8 @@ main(int  argc,                            /* I - Number of command-line args */
         "<html>\n"
        "<!-- SECTION: Man Pages -->\n"
        "<head>\n"
-       "\t<style type='text/css'><!--\n"
-       "\th1, h2, h3, p { font-family: sans-serif; text-align: justify; }\n"
-       "\ttt, pre a:link, pre a:visited, tt a:link, tt a:visited { font-weight: bold; color: #7f0000; }\n"
-       "\tpre { font-weight: bold; color: #7f0000; margin-left: 2em; }\n"
-       "\th1.title, h2.title, h3.title { border-bottom: solid 2px #000000; }\n"
-       "\t--></style>\n", outfile);
+       "\t<link rel=\"stylesheet\" type=\"text/css\" "
+       "href=\"../cups-printable.css\">\n", outfile);
 
   blist   = 0;
   font    = 0;
@@ -153,8 +149,9 @@ main(int  argc,                             /* I - Number of command-line args */
                "\t<title>%s(%d)</title>\n"
                "</head>\n"
                "<body>\n"
+               "<h1 class=\"title\">%s(%d)</h1>\n"
                "%s",
-               name, section, start_fonts[font]);
+               name, section, name, section, start_fonts[font]);
       }
       else if (section < 0)
         continue;
@@ -188,9 +185,9 @@ main(int  argc,                             /* I - Number of command-line args */
         line[strlen(line) - 1] = '\0'; /* Strip LF */
 
         if (line[2] == 'H')
-         fputs("<h2><a name='", outfile);
+         fputs("<h2 class=\"title\"><a name=\"", outfile);
        else
-         fputs("<h3><a name='", outfile);
+         fputs("<h3><a name=\"", outfile);
 
         for (lineptr = line + 4; *lineptr; lineptr ++)
          if (*lineptr == '\"')
@@ -200,7 +197,7 @@ main(int  argc,                             /* I - Number of command-line args */
          else
            putc_entity(*lineptr, outfile);
 
-       fputs("'>", outfile);
+       fputs("\">", outfile);
 
         for (lineptr = line + 4; *lineptr; lineptr ++)
          if (*lineptr == '\"')
diff --git a/man/rastertoescpx.man b/man/rastertoescpx.man
deleted file mode 100644 (file)
index 042ce66..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-.\"
-.\" "$Id: rastertoescpx.man 7600 2008-05-20 21:06:23Z mike $"
-.\"
-.\"   rastertoescpx man page for the Common UNIX Printing System.
-.\"
-.\"   Copyright 2007-2009 by Apple Inc.
-.\"   Copyright 1997-2007 by Easy Software Products.
-.\"
-.\"   These coded instructions, statements, and computer programs are the
-.\"   property of Apple Inc. and are protected by Federal copyright
-.\"   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
-.\"   which should have been included with this file.  If this file is
-.\"   file is missing or damaged, see the license at "http://www.cups.org/".
-.\"
-.TH rastertoescpx 1 "CUPS" "20 May 2008" "Apple Inc."
-.SH NAME
-rastertoescpx \- enhanced esc/p raster driver for cups
-.SH SYNOPSIS
-.B rastertoescpx
-jobid user title copies options [
-.I filename.ras
-]
-.SH DESCRIPTION
-\fIrastertoescpx\fR converts a CUPS raster stream to ESC/P or
-ESC/P2. It is used to support printing to a variety of EPSON and
-EPSON-compatible printers and plotters.
-.SH SEE ALSO
-ppdc(1), ppdhtml(1), ppdi(1), ppdmerge(1), ppdpo(1), ppdcfile(5)
-.br
-http://localhost:631/help
-.SH COPYRIGHT
-Copyright 2007-2009 by Apple Inc.
-.\"
-.\" End of "$Id: rastertoescpx.man 7600 2008-05-20 21:06:23Z mike $".
-.\"
diff --git a/man/rastertopclx.man b/man/rastertopclx.man
deleted file mode 100644 (file)
index aa9ee56..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-.\"
-.\" "$Id: rastertopclx.man 7600 2008-05-20 21:06:23Z mike $"
-.\"
-.\"   rastertopclx man page for the Common UNIX Printing System.
-.\"
-.\"   Copyright 2007-2009 by Apple Inc.
-.\"   Copyright 1997-2007 by Easy Software Products.
-.\"
-.\"   These coded instructions, statements, and computer programs are the
-.\"   property of Apple Inc. and are protected by Federal copyright
-.\"   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
-.\"   which should have been included with this file.  If this file is
-.\"   file is missing or damaged, see the license at "http://www.cups.org/".
-.\"
-.TH rastertopclx 1 "CUPS" "20 May 2008" "Apple Inc."
-.SH NAME
-rastertopclx \- enhanced pcl raster driver for cups
-.SH SYNOPSIS
-.B rastertopclx
-jobid user title copies options [
-.I filename.ras
-]
-.SH DESCRIPTION
-\fIrastertopclx\fR converts a CUPS raster stream to HP-PCL and HP-RTL. It is
-used to support printing to a variety of HP and HP-compatible
-printers and plotters.
-.SH SEE ALSO
-ppdc(1), ppdhtml(1), ppdi(1), ppdmerge(1), ppdpo(1), ppdcfile(5)
-.br
-http://localhost:631/help
-.SH COPYRIGHT
-Copyright 2007-2009 by Apple Inc.
-.\"
-.\" End of "$Id: rastertopclx.man 7600 2008-05-20 21:06:23Z mike $".
-.\"
index 0fa0917fe0ce33ec75249b8920a46c4ca6c17b36..5c441247f7652cb7ae95fca8357c6a6fc7c3cb30 100644 (file)
@@ -700,13 +700,7 @@ f 0644 root sys $MANDIR/man5/mime.convs.$MAN5EXT man/mime.convs.$MAN5EXT
 f 0644 root sys $MANDIR/man5/mime.types.$MAN5EXT man/mime.types.$MAN5EXT
 f 0644 root sys $MANDIR/man5/printers.conf.$MAN5EXT man/printers.conf.$MAN5EXT
 
-f 0644 root sys $MANDIR/man7/backend.$MAN7EXT man/backend.$MAN7EXT
-f 0644 root sys $MANDIR/man7/commandtoescpx.$MAN7EXT man/commandtoescpx.$MAN7EXT
-f 0644 root sys $MANDIR/man7/commandtopclx.$MAN7EXT man/commandtopclx.$MAN7EXT
 f 0644 root sys $MANDIR/man7/drv.$MAN7EXT man/drv.$MAN7EXT
-f 0644 root sys $MANDIR/man7/filter.$MAN7EXT man/filter.$MAN7EXT
-f 0644 root sys $MANDIR/man7/rastertoescpx.$MAN7EXT man/rastertoescpx.$MAN7EXT
-f 0644 root sys $MANDIR/man7/rastertopclx.$MAN7EXT man/rastertopclx.$MAN7EXT
 
 l 0644 root sys $AMANDIR/man$MAN8DIR/accept.$MAN8EXT cupsaccept.$MAN8EXT
 f 0644 root sys $AMANDIR/man$MAN8DIR/cupsaccept.$MAN8EXT man/cupsaccept.$MAN8EXT
@@ -730,6 +724,9 @@ l 0644 root sys $AMANDIR/man$MAN8DIR/reject.$MAN8EXT cupsaccept.$MAN8EXT
 f 0644 root sys $MANDIR/man1/cups-config.$MAN1EXT man/cups-config.$MAN1EXT
 f 0644 root sys $MANDIR/man1/ man/ppd*.$MAN1EXT
 f 0644 root sys $MANDIR/man5/ppdcfile.$MAN5EXT man/ppdcfile.$MAN5EXT
+f 0644 root sys $MANDIR/man7/backend.$MAN7EXT man/backend.$MAN7EXT
+f 0644 root sys $MANDIR/man7/filter.$MAN7EXT man/filter.$MAN7EXT
+f 0644 root sys $MANDIR/man7/notifier.$MAN7EXT man/notifier.$MAN7EXT
 
 %subpackage lpd
 d 0755 root sys $AMANDIR/man$MAN8DIR -
index 09ab796f38d2e759e0c5c5584447e92f4d3f5f3a..002393bd2d1dfdb2a6b8f67064ca5f86696fe522 100644 (file)
@@ -280,9 +280,7 @@ rm -rf $RPM_BUILD_ROOT
 /usr/share/man/man5/*.conf.5.gz
 /usr/share/man/man5/mime.*.5.gz
 %dir /usr/share/man/man7
-/usr/share/man/man7/commandto*
 /usr/share/man/man7/drv*
-/usr/share/man/man7/rasterto*
 %dir /usr/share/man/man8
 /usr/share/man/man8/accept.8.gz
 /usr/share/man/man8/cupsaddsmb.8.gz
@@ -325,6 +323,7 @@ rm -rf $RPM_BUILD_ROOT
 /usr/share/man/man5/ppdcfile.5.gz
 /usr/share/man/man7/backend.7.gz
 /usr/share/man/man7/filter.7.gz
+/usr/share/man/man7/notifier.7.gz
 
 /usr/bin/cups-config
 /usr/bin/ppd*
diff --git a/ppdc/api-ppdc.header b/ppdc/api-ppdc.header
new file mode 100644 (file)
index 0000000..4186865
--- /dev/null
@@ -0,0 +1,34 @@
+<!--
+  "$Id: api-array.header 8087 2008-10-27 21:37:05Z mike $"
+
+  PPD Compiler API header for CUPS.
+
+  Copyright 2009 by Apple Inc.
+
+  These coded instructions, statements, and computer programs are the
+  property of Apple Inc. and are protected by Federal copyright
+  law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+  which should have been included with this file.  If this file is
+  file is missing or damaged, see the license at "http://www.cups.org/".
+-->
+
+<h1 class='title'>PPD Compiler API</h1>
+
+<div class='summary'><table summary='General Information'>
+<thead>
+<tr>
+       <th>Header</th>
+       <th>cups/ppdc.h</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+       <th>Library</th>
+       <td>-lcupsppdc</td>
+</tr>
+<tr>
+       <th>See Also</th>
+       <td>Programming: <a href='api-overview.html' target='_top'>Introduction to CUPS Programming</a></td>
+</tr>
+</tbody>
+</table></div>
diff --git a/ppdc/api-ppdc.shtml b/ppdc/api-ppdc.shtml
new file mode 100644 (file)
index 0000000..e305dcb
--- /dev/null
@@ -0,0 +1,18 @@
+<!--
+  "$Id: api-array.shtml 7616 2008-05-28 00:34:13Z mike $"
+
+  PPD Compiler API introduction for CUPS.
+
+  Copyright 2009 by Apple Inc.
+
+  These coded instructions, statements, and computer programs are the
+  property of Apple Inc. and are protected by Federal copyright
+  law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+  which should have been included with this file.  If this file is
+  file is missing or damaged, see the license at "http://www.cups.org/".
+-->
+
+<h2 class='title'><a name='OVERVIEW'>Overview</a></h2>
+
+<p>The PPD Compiler API provides access to CUPS driver information files and
+methods for generating and importing PPD files.</p>
diff --git a/scheduler/api-mime.header b/scheduler/api-mime.header
new file mode 100644 (file)
index 0000000..8d5db2a
--- /dev/null
@@ -0,0 +1,34 @@
+<!--
+  "$Id: api-array.header 8087 2008-10-27 21:37:05Z mike $"
+
+  MIME API header for CUPS.
+
+  Copyright 2009 by Apple Inc.
+
+  These coded instructions, statements, and computer programs are the
+  property of Apple Inc. and are protected by Federal copyright
+  law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+  which should have been included with this file.  If this file is
+  file is missing or damaged, see the license at "http://www.cups.org/".
+-->
+
+<h1 class='title'>MIME API</h1>
+
+<div class='summary'><table summary='General Information'>
+<thead>
+<tr>
+       <th>Header</th>
+       <th>cups/mime.h</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+       <th>Library</th>
+       <td>-lcupsmime</td>
+</tr>
+<tr>
+       <th>See Also</th>
+       <td>Programming: <a href='api-overview.html' target='_top'>Introduction to CUPS Programming</a></td>
+</tr>
+</tbody>
+</table></div>
diff --git a/scheduler/api-mime.shtml b/scheduler/api-mime.shtml
new file mode 100644 (file)
index 0000000..7d3125f
--- /dev/null
@@ -0,0 +1,17 @@
+<!--
+  "$Id: api-array.shtml 7616 2008-05-28 00:34:13Z mike $"
+
+  MIME API introduction for CUPS.
+
+  Copyright 2009 by Apple Inc.
+
+  These coded instructions, statements, and computer programs are the
+  property of Apple Inc. and are protected by Federal copyright
+  law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+  which should have been included with this file.  If this file is
+  file is missing or damaged, see the license at "http://www.cups.org/".
+-->
+
+<h2 class='title'><a name='OVERVIEW'>Overview</a></h2>
+
+<p>The MIME API provides file typing and conversion services for CUPS.</p>
index efc3a6b8440f1f8d6009d839b556deb8ea3aa3c7..0e915b4f74f3bbf98eb347f2737c10adb5373900 100644 (file)
@@ -132,6 +132,7 @@ static const cupsd_var_t    variables[] =
 #endif /* HAVE_LAUNCHD */
   { "LimitRequestBody",                &MaxRequestSize,        CUPSD_VARTYPE_INTEGER },
   { "ListenBackLog",           &ListenBackLog,         CUPSD_VARTYPE_INTEGER },
+  { "LogDebugHistory",         &LogDebugHistory,       CUPSD_VARTYPE_INTEGER },
   { "LogFilePerm",             &LogFilePerm,           CUPSD_VARTYPE_INTEGER },
   { "LPDConfigFile",           &LPDConfigFile,         CUPSD_VARTYPE_STRING },
   { "MaxActiveJobs",           &MaxActiveJobs,         CUPSD_VARTYPE_INTEGER },
@@ -619,6 +620,7 @@ cupsdReadConfiguration(void)
   KeepAlive                = TRUE;
   KeepAliveTimeout         = DEFAULT_KEEPALIVE;
   ListenBackLog            = SOMAXCONN;
+  LogDebugHistory          = 200;
   LogFilePerm              = CUPS_DEFAULT_LOG_FILE_PERM;
   LogLevel                 = CUPSD_LOG_WARN;
   LogTimeFormat            = CUPSD_TIME_STANDARD;
index 582a152c2d62d35a8fe978a07789a8eafd985266..c30f97a5eac2ce785a82f771fec2f5443a5f1259 100644 (file)
@@ -168,6 +168,8 @@ VAR int                     ClassifyOverride        VALUE(0),
                                        /* Allow overrides? */
                        ConfigFilePerm          VALUE(0640),
                                        /* Permissions for config files */
+                       LogDebugHistory         VALUE(200),
+                                       /* Amount of automatic debug history */
                        FatalErrors             VALUE(CUPSD_FATAL_CONFIG),
                                        /* Which errors are fatal? */
                        LogFilePerm             VALUE(0644);
index a7498b5d2e6671f0f1b68d89dbf1d4a60e1ee5a4..7383145cc04f7e7e34d2ecf55abb66b903163115 100644 (file)
@@ -23,6 +23,7 @@
  *   cat_drv()         - Generate a PPD from a driver info file.
  *   cat_ppd()         - Copy a PPD file to stdout.
  *   copy_static()     - Copy a static PPD file to stdout.
+ *   compare_inodes()  - Compare two inodes.
  *   compare_matches() - Compare PPD match scores for sorting.
  *   compare_names()   - Compare PPD filenames for sorting.
  *   compare_ppds()    - Compare PPD file make and model names for sorting.
@@ -114,7 +115,8 @@ typedef struct                              /**** In-memory record ****/
  * Globals...
  */
 
-cups_array_t   *PPDsByName = NULL,     /* PPD files sorted by filename and name */
+cups_array_t   *Inodes = NULL,         /* Inodes of directories we've visited */
+               *PPDsByName = NULL,     /* PPD files sorted by filename and name */
                *PPDsByMakeModel = NULL;/* PPD files sorted by make and model */
 int            ChangedPPD;             /* Did we change the PPD database? */
 
@@ -133,6 +135,7 @@ static ppd_info_t   *add_ppd(const char *filename, const char *name,
 static int             cat_drv(const char *name, int request_id);
 static int             cat_ppd(const char *name, int request_id);
 static int             cat_static(const char *name, int request_id);
+static int             compare_inodes(struct stat *a, struct stat *b);
 static int             compare_matches(const ppd_info_t *p0,
                                        const ppd_info_t *p1);
 static int             compare_names(const ppd_info_t *p0,
@@ -660,6 +663,21 @@ cat_static(const char *name,               /* I - PPD name */
 }
 
 
+/*
+ * 'compare_inodes()' - Compare two inodes.
+ */
+
+static int                             /* O - Result of comparison */
+compare_inodes(struct stat *a,         /* I - First inode */
+               struct stat *b)         /* I - Second inode */
+{
+  if (a->st_dev != b->st_dev)
+    return (a->st_dev - b->st_dev);
+  else
+    return (a->st_ino - b->st_ino);
+}
+
+
 /*
  * 'compare_matches()' - Compare PPD match scores for sorting.
  */
@@ -839,6 +857,8 @@ list_ppds(int        request_id,    /* I - Request ID */
   if ((cups_datadir = getenv("CUPS_DATADIR")) == NULL)
     cups_datadir = CUPS_DATADIR;
 
+  Inodes = cupsArrayNew((cups_array_func_t)compare_inodes, NULL);
+
   snprintf(model, sizeof(model), "%s/model", cups_datadir);
   load_ppds(model, "", 1);
 
@@ -1323,6 +1343,8 @@ load_ppds(const char *d,          /* I - Actual directory */
           const char *p,               /* I - Virtual path in name */
          int        descend)           /* I - Descend into directories? */
 {
+  struct stat  dinfo,                  /* Directory information */
+               *dinfoptr;              /* Pointer to match */
   int          i;                      /* Looping var */
   cups_file_t  *fp;                    /* Pointer to file */
   cups_dir_t   *dir;                   /* Directory pointer */
@@ -1382,7 +1404,32 @@ load_ppds(const char *d,         /* I - Actual directory */
   };
 
 
-  fprintf(stderr, "DEBUG: [cups-driverd] Loading \"%s\"...\n", d);
+ /*
+  * See if we've loaded this directory before...
+  */
+
+  if (stat(d, &dinfo))
+  {
+    if (errno != ENOENT)
+      fprintf(stderr, "ERROR: [cups-driverd] Unable to stat \"%s\": %s\n", d,
+             strerror(errno));
+
+    return (0);
+  }
+  else if (cupsArrayFind(Inodes, &dinfo))
+  {
+    fprintf(stderr, "ERROR: [cups-driverd] Skipping \"%s\": loop detected!\n",
+            d);
+    return (0);
+  }
+
+ /*
+  * Nope, add it to the Inodes array and continue...
+  */
+
+  dinfoptr = (struct stat *)malloc(sizeof(struct stat));
+  memcpy(dinfoptr, &dinfo, sizeof(struct stat));
+  cupsArrayAdd(Inodes, dinfoptr);
 
   if ((dir = cupsDirOpen(d)) == NULL)
   {
@@ -1394,6 +1441,8 @@ load_ppds(const char *d,          /* I - Actual directory */
     return (0);
   }
 
+  fprintf(stderr, "DEBUG: [cups-driverd] Loading \"%s\"...\n", d);
+
   while ((dent = cupsDirRead(dir)) != NULL)
   {
    /*
index 11be5585e506a4d120b8db0620c319c23281f175..29ff94743340c685a57883dff6abb66e3ea2771f 100644 (file)
  */
 
 static char    *dequote(char *d, const char *s, int dlen);
+static char    *get_auth_info_required(cupsd_printer_t *p, char *buffer,
+                                       size_t bufsize);
 #ifdef __APPLE__
 static int     get_hostconfig(const char *name);
 #endif /* __APPLE__ */
@@ -2304,13 +2306,12 @@ dnssdBuildTxtRecord(
     cupsd_printer_t *p,                        /* I - Printer information */
     int             for_lpd)           /* I - 1 = LPD, 0 = IPP */
 {
-  int          i, j;                   /* Looping vars */
+  int          i;                      /* Looping var */
   char         type_str[32],           /* Type to string buffer */
                state_str[32],          /* State to string buffer */
                rp_str[1024],           /* Queue name string buffer */
                air_str[1024],          /* auth-info-required string buffer */
                *keyvalue[32][2];       /* Table of key/value pairs */
-  ipp_attribute_t *air_attr;           /* auth-info-required attribute */
 
 
  /*
@@ -2420,26 +2421,8 @@ dnssdBuildTxtRecord(
   keyvalue[i  ][0] = "pdl";
   keyvalue[i++][1] = p->pdl ? p->pdl : "application/postscript";
 
-  if ((air_attr = ippFindAttribute(p->attrs, "auth-info-required",
-                                   IPP_TAG_KEYWORD)) != NULL &&
-      strcmp(air_attr->values[0].string.text, "none"))
+  if (get_auth_info_required(p, air_str, sizeof(air_str)))
   {
-    char       *air = air_str;         /* Pointer into string */
-
-
-    for (j = 0; j < air_attr->num_values; j ++)
-    {
-      if (air >= (air_str + sizeof(air_str) - 2))
-        break;
-
-      if (j)
-        *air++ = ',';
-
-      strlcpy(air, air_attr->values[j].string.text,
-              sizeof(air_str) - (air - air_str));
-      air += strlen(air);
-    }
-
     keyvalue[i  ][0] = "air";
     keyvalue[i++][1] = air_str;
   }
@@ -2927,6 +2910,85 @@ dnssdUpdate(void)
 #endif /* HAVE_DNSSD */
 
 
+/*
+ * 'get_auth_info_required()' - Get the auth-info-required value to advertise.
+ */
+
+static char *                          /* O - String or NULL if none */
+get_auth_info_required(
+    cupsd_printer_t *p,                        /* I - Printer */
+    char            *buffer,           /* I - Value buffer */
+    size_t          bufsize)           /* I - Size of value buffer */
+{
+  cupsd_location_t *auth;              /* Pointer to authentication element */
+  char         resource[1024];         /* Printer/class resource path */
+
+
+ /*
+  * If auth-info-required is set for this printer, return that...
+  */
+
+  if (p->num_auth_info_required > 0 && strcmp(p->auth_info_required[0], "none"))
+  {
+    int                i;                      /* Looping var */
+    char       *bufptr;                /* Pointer into buffer */
+
+    for (i = 0, bufptr = buffer; i < p->num_auth_info_required; i ++)
+    {
+      if (bufptr >= (buffer + bufsize - 2))
+       break;
+
+      if (i)
+       *bufptr++ = ',';
+
+      strlcpy(bufptr, p->auth_info_required[i], bufsize - (bufptr - buffer));
+      bufptr += strlen(bufptr);
+    }
+
+    return (buffer);
+  }
+
+ /*
+  * Figure out the authentication data requirements to advertise...
+  */
+
+  if (p->type & CUPS_PRINTER_CLASS)
+    snprintf(resource, sizeof(resource), "/classes/%s", p->name);
+  else
+    snprintf(resource, sizeof(resource), "/printers/%s", p->name);
+
+  if ((auth = cupsdFindBest(resource, HTTP_POST)) == NULL ||
+      auth->type == CUPSD_AUTH_NONE)
+    auth = cupsdFindPolicyOp(p->op_policy_ptr, IPP_PRINT_JOB);
+
+  if (auth)
+  {
+    int        auth_type;                      /* Authentication type */
+
+    if ((auth_type = auth->type) == CUPSD_AUTH_DEFAULT)
+      auth_type = DefaultAuthType;
+
+    switch (auth_type)
+    {
+      case CUPSD_AUTH_NONE :
+          return (NULL);
+
+      case CUPSD_AUTH_NEGOTIATE :
+         strlcpy(buffer, "negotiate", bufsize);
+         break;
+
+      default :
+         strlcpy(buffer, "username,password", bufsize);
+         break;
+    }
+
+    return (buffer);
+  }
+
+  return (NULL);
+}
+
+
 #ifdef __APPLE__
 /*
  * 'get_hostconfig()' - Get an /etc/hostconfig service setting.
@@ -3687,8 +3749,9 @@ send_cups_browse(cupsd_printer_t *p)      /* I - Printer to send */
                        uri[1024],      /* Printer URI */
                        location[1024], /* printer-location */
                        info[1024],     /* printer-info */
-                       make_model[1024];
+                       make_model[1024],
                                        /* printer-make-and-model */
+                       air[1024];      /* auth-info-required */
   cupsd_netif_t                *iface;         /* Network interface */
 
 
@@ -3726,6 +3789,11 @@ send_cups_browse(cupsd_printer_t *p)     /* I - Printer to send */
   else
     strlcpy(make_model, "Local System V Printer", sizeof(make_model));
 
+  if (get_auth_info_required(p, packet, sizeof(packet)))
+    snprintf(air, sizeof(air), " auth-info-required=%s", packet);
+  else
+    air[0] = '\0';
+
  /*
   * Send a packet to each browse address...
   */
@@ -3762,9 +3830,9 @@ send_cups_browse(cupsd_printer_t *p)      /* I - Printer to send */
                           (p->type & CUPS_PRINTER_CLASS) ? "/classes/%s" :
                                                            "/printers/%s",
                           p->name);
-         snprintf(packet, sizeof(packet), "%x %x %s \"%s\" \"%s\" \"%s\" %s\n",
+         snprintf(packet, sizeof(packet), "%x %x %s \"%s\" \"%s\" \"%s\" %s%s\n",
                   type, p->state, uri, location, info, make_model,
-                  p->browse_attrs ? p->browse_attrs : "");
+                  p->browse_attrs ? p->browse_attrs : "", air);
 
          bytes = strlen(packet);
 
@@ -3803,9 +3871,10 @@ send_cups_browse(cupsd_printer_t *p)     /* I - Printer to send */
                           (p->type & CUPS_PRINTER_CLASS) ? "/classes/%s" :
                                                            "/printers/%s",
                           p->name);
-         snprintf(packet, sizeof(packet), "%x %x %s \"%s\" \"%s\" \"%s\" %s\n",
+         snprintf(packet, sizeof(packet),
+                  "%x %x %s \"%s\" \"%s\" \"%s\" %s%s\n",
                   type, p->state, uri, location, info, make_model,
-                  p->browse_attrs ? p->browse_attrs : "");
+                  p->browse_attrs ? p->browse_attrs : "", air);
 
          bytes = strlen(packet);
 
@@ -3828,9 +3897,9 @@ send_cups_browse(cupsd_printer_t *p)      /* I - Printer to send */
       * the default server name...
       */
 
-      snprintf(packet, sizeof(packet), "%x %x %s \"%s\" \"%s\" \"%s\" %s\n",
+      snprintf(packet, sizeof(packet), "%x %x %s \"%s\" \"%s\" \"%s\" %s%s\n",
                       type, p->state, p->uri, location, info, make_model,
-              p->browse_attrs ? p->browse_attrs : "");
+              p->browse_attrs ? p->browse_attrs : "", air);
 
       bytes = strlen(packet);
       cupsdLogMessage(CUPSD_LOG_DEBUG2,
index 19e0af1aa043bcb524b2a083c70a251a70bde5b1..7f3fa355fe21bbe15b84edc5ffcdfa3ea106a6ca 100644 (file)
@@ -45,6 +45,8 @@
  *   compare_active_jobs()      - Compare the job IDs and priorities of two
  *                                jobs.
  *   compare_jobs()             - Compare the job IDs of two jobs.
+ *   dump_job_history()         - Dump any debug messages for a job.
+ *   free_job_history()         - Free any log history.
  *   finalize_job()             - Cleanup after job filter processes and support
  *                                data.
  *   get_options()              - Get a string containing the job options.
@@ -165,7 +167,9 @@ static mime_filter_t        gziptoany_filter =
 
 static int     compare_active_jobs(void *first, void *second, void *data);
 static int     compare_jobs(void *first, void *second, void *data);
+static void    dump_job_history(cupsd_job_t *job);
 static void    finalize_job(cupsd_job_t *job);
+static void    free_job_history(cupsd_job_t *job);
 static char    *get_options(cupsd_job_t *job, int banner_page, char *copies,
                             size_t copies_size, char *title,
                             size_t title_size);
@@ -1206,6 +1210,9 @@ cupsdContinueJob(cupsd_job_t *job)        /* I - Job */
   cupsdSetPrinterState(job->printer, IPP_PRINTER_IDLE, 0);
   update_job_attrs(job, 0);
 
+  if (job->history)
+    free_job_history(job);
+
   cupsArrayRemove(PrintingJobs, job);
 
  /*
@@ -1269,6 +1276,9 @@ cupsdDeleteJob(cupsd_job_t       *job,    /* I - Job */
     job->num_files = 0;
   }
 
+  if (job->history)
+    free_job_history(job);
+
   unload_job(job);
 
   cupsArrayRemove(Jobs, job);
@@ -2477,6 +2487,140 @@ compare_jobs(void *first,               /* I - First job */
 }
 
 
+/*
+ * 'dump_job_history()' - Dump any debug messages for a job.
+ */
+
+static void
+dump_job_history(cupsd_job_t *job)     /* I - Job */
+{
+  int                  i,              /* Looping var */
+                       oldsize;        /* Current MaxLogSize */
+  struct tm            *date;          /* Date/time value */
+  cupsd_joblog_t       *message;       /* Current message */
+  char                 temp[2048],     /* Log message */
+                       *ptr,           /* Pointer into log message */
+                       start[256],     /* Start time */
+                       end[256];       /* End time */
+  cupsd_printer_t      *printer;       /* Printer for job */
+
+
+ /*
+  * See if we have anything to dump...
+  */
+
+  if (!job->history)
+    return;
+
+ /*
+  * Disable log rotation temporarily...
+  */
+
+  oldsize    = MaxLogSize;
+  MaxLogSize = 0;
+
+ /*
+  * Copy the debug messages to the log...
+  */
+
+  message = (cupsd_joblog_t *)cupsArrayFirst(job->history);
+  date = localtime(&(message->time));
+  strftime(start, sizeof(start), "%X", date);
+
+  message = (cupsd_joblog_t *)cupsArrayLast(job->history);
+  date = localtime(&(message->time));
+  strftime(end, sizeof(end), "%X", date);
+
+  snprintf(temp, sizeof(temp),
+           "[Job %d] The following messages were recorded from %s to %s",
+           job->id, start, end);
+  cupsdWriteErrorLog(CUPSD_LOG_DEBUG, temp);
+
+  for (message = (cupsd_joblog_t *)cupsArrayFirst(job->history);
+       message;
+       message = (cupsd_joblog_t *)cupsArrayNext(job->history))
+    cupsdWriteErrorLog(CUPSD_LOG_DEBUG, message->message);
+
+  snprintf(temp, sizeof(temp), "[Job %d] End of messages", job->id);
+  cupsdWriteErrorLog(CUPSD_LOG_DEBUG, temp);
+
+ /*
+  * Log the printer state values...
+  */
+
+  if ((printer = job->printer) == NULL)
+    printer = cupsdFindDest(job->dest);
+
+  if (printer)
+  {
+    snprintf(temp, sizeof(temp), "[Job %d] printer-state=%d(%s)", job->id,
+             printer->state,
+            printer->state == IPP_PRINTER_IDLE ? "idle" :
+                printer->state == IPP_PRINTER_PROCESSING ? "processing" :
+                "stopped");
+    cupsdWriteErrorLog(CUPSD_LOG_DEBUG, temp);
+
+    snprintf(temp, sizeof(temp), "[Job %d] printer-state-message=\"%s\"",
+             job->id, printer->state_message);
+    cupsdWriteErrorLog(CUPSD_LOG_DEBUG, temp);
+
+    snprintf(temp, sizeof(temp), "[Job %d] printer-state-reasons=", job->id);
+    ptr = temp + strlen(temp);
+    if (printer->num_reasons == 0)
+      strlcpy(ptr, "none", sizeof(temp) - (ptr - temp));
+    else
+    {
+      for (i = 0;
+           i < printer->num_reasons && ptr < (temp + sizeof(temp) - 2);
+           i ++)
+      {
+        if (i)
+         *ptr++ = ',';
+
+       strlcpy(ptr, printer->reasons[i], sizeof(temp) - (ptr - temp));
+       ptr += strlen(ptr);
+      }
+    }
+    cupsdWriteErrorLog(CUPSD_LOG_DEBUG, temp);
+  }
+
+ /*
+  * Restore log file rotation...
+  */
+
+  MaxLogSize = oldsize;
+
+ /*
+  * Free all messages...
+  */
+
+  free_job_history(job);
+}
+
+
+/*
+ * 'free_job_history()' - Free any log history.
+ */
+
+static void
+free_job_history(cupsd_job_t *job)     /* I - Job */
+{
+  char *message;                       /* Current message */
+
+
+  if (!job->history)
+    return;
+
+  for (message = (char *)cupsArrayFirst(job->history);
+       message;
+       message = (char *)cupsArrayNext(job->history))
+    free(message);
+
+  cupsArrayDelete(job->history);
+  job->history = NULL;
+}
+
+
 /*
  * 'finalize_job()' - Cleanup after job filter processes and support data.
  */
@@ -2772,6 +2916,14 @@ finalize_job(cupsd_job_t *job)           /* I - Job */
                        printer_state == IPP_PRINTER_STOPPED);
   update_job_attrs(job, 0);
 
+  if (job->history)
+  {
+    if (job->status)
+      dump_job_history(job);
+    else
+      free_job_history(job);
+  }
+
   cupsArrayRemove(PrintingJobs, job);
 
  /*
@@ -3767,7 +3919,8 @@ update_job(cupsd_job_t *job)              /* I - Job to check */
 {
   int          i;                      /* Looping var */
   int          copies;                 /* Number of copies printed */
-  char         message[1024],          /* Message text */
+  char         message[CUPSD_SB_BUFFER_SIZE],
+                                       /* Message text */
                *ptr;                   /* Pointer update... */
   int          loglevel,               /* Log level for message */
                event = 0;              /* Events? */
index 5d47056f84745c9b22ef5daad55ff4a68cfda138..16dd09ff7cfc587fe25f852bdc01c47ae9dab516 100644 (file)
@@ -29,7 +29,7 @@ typedef enum cupsd_jobaction_e                /**** Actions for state changes ****/
  * Job request structure...
  */
 
-struct cupsd_job_s
+struct cupsd_job_s                     /**** Job request ****/
 {
   int                  id,             /* Job ID */
                        priority,       /* Job priority */
@@ -77,6 +77,7 @@ struct cupsd_job_s
                        *auth_password; /* AUTH_PASSWORD environment variable,
                                         * if any */
   void                 *profile;       /* Security profile */
+  cups_array_t         *history;       /* Debug log history */
   int                  progress;       /* Printing progress */
 #ifdef HAVE_GSSAPI
   krb5_ccache          ccache;         /* Kerberos credential cache */
@@ -84,6 +85,12 @@ struct cupsd_job_s
 #endif /* HAVE_GSSAPI */
 };
 
+typedef struct cupsd_joblog_s          /**** Job log message ****/
+{
+  time_t               time;           /* Time of message */
+  char                 message[1];     /* Message string */
+} cupsd_joblog_t;
+
 
 /*
  * Globals...
index a6ac179aa680389490429fd16ebe4035612754f7..15fcf972f9284880af6cca9450260ee3a9989803 100644 (file)
@@ -203,8 +203,9 @@ cupsdLogJob(cupsd_job_t *job,               /* I - Job */
   if (TestConfigFile || !ErrorLog)
     return (1);
 
-  if (level > LogLevel ||
-      (level == CUPSD_LOG_INFO && LogLevel < CUPSD_LOG_DEBUG))
+  if ((level > LogLevel ||
+       (level == CUPSD_LOG_INFO && LogLevel < CUPSD_LOG_DEBUG)) &&
+      LogDebugHistory <= 0)
     return (1);
 
  /*
@@ -220,9 +221,55 @@ cupsdLogJob(cupsd_job_t *job,              /* I - Job */
     va_end(ap);
   }
   while (status == 0);
-
+  
   if (status > 0)
-    return (cupsdWriteErrorLog(level, log_line));
+  {
+    if ((level > LogLevel ||
+         (level == CUPSD_LOG_INFO && LogLevel < CUPSD_LOG_DEBUG)) &&
+       LogDebugHistory > 0)
+    {
+     /*
+      * Add message to the job history...
+      */
+
+      cupsd_joblog_t *temp;            /* Copy of log message */
+
+
+      if ((temp = malloc(sizeof(cupsd_joblog_t) + strlen(log_line))) != NULL)
+      {
+        temp->time = time(NULL);
+       strcpy(temp->message, log_line);
+      }
+
+      if (!job->history)
+       job->history = cupsArrayNew(NULL, NULL);
+
+      if (job->history && temp)
+      {
+       cupsArrayAdd(job->history, temp);
+
+       if (cupsArrayCount(job->history) > LogDebugHistory)
+       {
+        /*
+         * Remove excess messages...
+         */
+
+         temp = cupsArrayFirst(job->history);
+         cupsArrayRemove(job->history, temp);
+         free(temp);
+       }
+      }
+      else if (temp)
+       free(temp);
+
+      return (1);
+    }
+    else if (level <= LogLevel &&
+             (level != CUPSD_LOG_INFO || LogLevel >= CUPSD_LOG_DEBUG))
+      return (cupsdWriteErrorLog(level, log_line));
+    else
+      return (1);
+  }
   else
     return (cupsdWriteErrorLog(CUPSD_LOG_ERROR,
                                "Unable to allocate memory for log line!"));
index ba1be9b03f72cd10ff6f924ae4a93c22dcb3cfa4..c5008eec81cf455a4f621657c77488fd89b03d26 100644 (file)
@@ -2137,21 +2137,15 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
   ipp_attribute_t *attr;               /* Attribute data */
   cups_option_t        *option;                /* Current printer option */
   char         *filter;                /* Current filter */
+  static const char * const air_none[] =
+               {                       /* No authentication */
+                 "none"
+               };
   static const char * const air_userpass[] =
                {                       /* Basic/Digest authentication */
                  "username",
                  "password"
                };
-#ifdef HAVE_GSSAPI
-  static const char * const air_negotiate[] =
-               {                       /* Kerberos authentication */
-                 "negotiate"
-               };
-#endif /* HAVE_GSSAPI */
-  static const char * const air_none[] =
-               {                       /* No authentication */
-                 "none"
-               };
 
 
   DEBUG_printf(("cupsdSetPrinterAttrs: entering name = %s, type = %x\n", p->name,
@@ -2182,65 +2176,50 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
   {
     num_air = p->num_auth_info_required;
     air     = p->auth_info_required;
-
-    if (!strcmp(air[0], "username"))
-      auth_supported = "basic";
-    else
-      auth_supported = "negotiate";
   }
-  else if (!(p->type & CUPS_PRINTER_DISCOVERED))
+  else if ((p->type & CUPS_PRINTER_AUTHENTICATED) &&
+           (p->type & CUPS_PRINTER_DISCOVERED))
   {
-    if (p->type & CUPS_PRINTER_CLASS)
-      snprintf(resource, sizeof(resource), "/classes/%s", p->name);
-    else
-      snprintf(resource, sizeof(resource), "/printers/%s", p->name);
+    num_air = 2;
+    air     = air_userpass;
+  }
 
-    if ((auth = cupsdFindBest(resource, HTTP_POST)) == NULL ||
-        auth->type == CUPSD_AUTH_NONE)
-      auth = cupsdFindPolicyOp(p->op_policy_ptr, IPP_PRINT_JOB);
+  if (p->type & CUPS_PRINTER_CLASS)
+    snprintf(resource, sizeof(resource), "/classes/%s", p->name);
+  else
+    snprintf(resource, sizeof(resource), "/printers/%s", p->name);
 
-    if (auth)
-    {
-      int      auth_type;              /* Authentication type */
+  if ((auth = cupsdFindBest(resource, HTTP_POST)) == NULL ||
+      auth->type == CUPSD_AUTH_NONE)
+    auth = cupsdFindPolicyOp(p->op_policy_ptr, IPP_PRINT_JOB);
 
+  if (auth)
+  {
+    int        auth_type;              /* Authentication type */
 
-      if ((auth_type = auth->type) == CUPSD_AUTH_DEFAULT)
-        auth_type = DefaultAuthType;
 
-      if (auth_type == CUPSD_AUTH_BASIC || auth_type == CUPSD_AUTH_BASICDIGEST)
-      {
-       auth_supported = "basic";
-       num_air        = 2;
-       air            = air_userpass;
-      }
-      else if (auth_type == CUPSD_AUTH_DIGEST)
-      {
-       auth_supported = "digest";
-       num_air        = 2;
-       air            = air_userpass;
-      }
+    if ((auth_type = auth->type) == CUPSD_AUTH_DEFAULT)
+      auth_type = DefaultAuthType;
+
+    if (auth_type == CUPSD_AUTH_BASIC || auth_type == CUPSD_AUTH_BASICDIGEST)
+      auth_supported = "basic";
+    else if (auth_type == CUPSD_AUTH_DIGEST)
+      auth_supported = "digest";
 #ifdef HAVE_GSSAPI
-      else if (auth_type == CUPSD_AUTH_NEGOTIATE)
-      {
-       auth_supported = "negotiate";
-       num_air        = 1;
-       air            = air_negotiate;
-      }
+    else if (auth_type == CUPSD_AUTH_NEGOTIATE)
+      auth_supported = "negotiate";
 #endif /* HAVE_GSSAPI */
 
+    if (!(p->type & CUPS_PRINTER_DISCOVERED))
+    {
       if (auth_type != CUPSD_AUTH_NONE)
-        p->type |= CUPS_PRINTER_AUTHENTICATED;
+       p->type |= CUPS_PRINTER_AUTHENTICATED;
       else
-        p->type &= ~CUPS_PRINTER_AUTHENTICATED;
+       p->type &= ~CUPS_PRINTER_AUTHENTICATED;
     }
-    else
-      p->type &= ~CUPS_PRINTER_AUTHENTICATED;
-  }
-  else if (p->type & CUPS_PRINTER_AUTHENTICATED)
-  {
-    num_air = 2;
-    air     = air_userpass;
   }
+  else if (!(p->type & CUPS_PRINTER_DISCOVERED))
+    p->type &= ~CUPS_PRINTER_AUTHENTICATED;
 
  /*
   * Create the required IPP attributes for a printer...
@@ -2550,14 +2529,6 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
     if (BrowseLocalOptions)
       length += 12 + strlen(BrowseLocalOptions);
 
-    if (p->num_auth_info_required > 0)
-    {
-      length += 18;                    /* auth-info-required */
-
-      for (i = 0; i < p->num_auth_info_required; i ++)
-        length += strlen(p->auth_info_required[i]) + 1;
-    }
-
    /*
     * Allocate the new string...
     */
@@ -2603,21 +2574,6 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
          }
        }
       }
-
-      if (p->num_auth_info_required > 0)
-      {
-        strcpy(attrptr, "auth-info-required");
-       attrptr += 18;
-
-       for (i = 0; i < p->num_auth_info_required; i ++)
-       {
-         *attrptr++ = i ? ',' : '=';
-         strcpy(attrptr, p->auth_info_required[i]);
-         attrptr += strlen(attrptr);
-       }
-      }
-      else
-       *attrptr = '\0';
     }
   }
 
@@ -2750,11 +2706,12 @@ cupsdSetPrinterReasons(
            cupsdSetPrinterState(p, IPP_PRINTER_IDLE, 1);
 
           if (strcmp(reason, "connecting-to-device"))
+         {
            cupsdMarkDirty(CUPSD_DIRTY_PRINTERS);
 
-         if (PrintcapFormat == PRINTCAP_PLIST)
-           cupsdMarkDirty(CUPSD_DIRTY_PRINTCAP);
-
+           if (PrintcapFormat == PRINTCAP_PLIST)
+             cupsdMarkDirty(CUPSD_DIRTY_PRINTCAP);
+          }
          break;
        }
     }
@@ -2786,10 +2743,12 @@ cupsdSetPrinterReasons(
          cupsdSetPrinterState(p, IPP_PRINTER_STOPPED, 1);
 
        if (strcmp(reason, "connecting-to-device"))
+       {
          cupsdMarkDirty(CUPSD_DIRTY_PRINTERS);
 
-       if (PrintcapFormat == PRINTCAP_PLIST)
-         cupsdMarkDirty(CUPSD_DIRTY_PRINTCAP);
+         if (PrintcapFormat == PRINTCAP_PLIST)
+           cupsdMarkDirty(CUPSD_DIRTY_PRINTCAP);
+       }
       }
     }
   }
@@ -4171,7 +4130,7 @@ load_ppd(cupsd_printer_t *p)              /* I - Printer */
       }
 
       ippAddString(p->ppd_attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD,
-                  "output-bin-default", NULL, output_bin->defchoice);
+                  "output-bin-default", NULL, output_bin->defchoice);
     }
 
    /*
index 74f1a034279aed658b905daaf4081b02592e2788..212f0fdd3e61325007054a32c41fc3413699af99 100644 (file)
@@ -37,6 +37,9 @@
  */
 
 #include "cupsd.h"
+#ifdef HAVE_VPROC_TRANSACTION_BEGIN
+#  include <vproc.h>
+#endif /* HAVE_VPROC_TRANSACTION_BEGIN */
 
 
 /*
@@ -138,6 +141,9 @@ cupsdSetBusyState(void)
     "Active clients and printing jobs",
     "Active clients, printing jobs, and dirty files"
   };
+#ifdef HAVE_VPROC_TRANSACTION_BEGIN
+  static vproc_transaction_t vtran = 0;        /* Current busy transaction */
+#endif /* HAVE_VPROC_TRANSACTION_BEGIN */
 
 
   newbusy = (DirtyCleanTime ? 1 : 0) |
@@ -148,6 +154,16 @@ cupsdSetBusyState(void)
   {
     busy = newbusy;
 
+#ifdef HAVE_VPROC_TRANSACTION_BEGIN
+    if (busy && !vtran)
+      vtran = vproc_transaction_begin(NULL);
+    else if (!busy && vtran)
+    {
+      vproc_transaction_end(NULL, vtran);
+      vtran = 0;
+    }
+#endif /* HAVE_VPROC_TRANSACTION_BEGIN */
+
     cupsdLogMessage(CUPSD_LOG_DEBUG, "cupsdSetBusyState: %s", busy_text[busy]);
   }
 }
index 9ae30e27b132f4d45593d1373f4ce22f9b3e5e39..53b2c1f981017fa3e8a208a964cfda4248bdf883 100644 (file)
@@ -21,7 +21,10 @@ include ../Makedefs
 #
 
 RFCS   =       \
+               rfc1155.txt \
+               rfc1157.txt \
                rfc1179.txt \
+               rfc1213.txt \
                rfc1321.txt \
                rfc2222.txt \
                rfc2246.txt \
@@ -30,10 +33,12 @@ RFCS        =       \
                rfc2567.txt \
                rfc2568.txt \
                rfc2569.txt \
+               rfc2578.txt \
                rfc2595.txt \
                rfc2616.txt \
                rfc2617.txt \
                rfc2712.txt \
+               rfc2790.txt \
                rfc2817.txt \
                rfc2818.txt \
                rfc2821.txt \
@@ -49,11 +54,15 @@ RFCS        =       \
                rfc3391.txt \
                rfc3510.txt \
                rfc3712.txt \
+               rfc3805.txt \
+               rfc3875.txt \
                rfc3986.txt \
                rfc3995.txt \
                rfc3996.txt \
                rfc3997.txt \
-               rfc3998.txt
+               rfc3998.txt \
+               rfc4122.txt \
+               rfc4234.txt
 
 .SUFFIXES:     .html .txt
 .txt.html:     rfctohtml
@@ -146,7 +155,7 @@ uninstall:
 
 rfctohtml:     rfctohtml.o ../cups/libcups.a
        $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ rfctohtml.o ../cups/libcups.a \
-               $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
+               $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
 
 
 #
index 716b7d428d7a0dd1eb9a585e548fd1945598c978..fc4daa2b370cc129d227da98b684b132ab7ad3c9 100644 (file)
@@ -48,6 +48,8 @@ main(int  argc,                               /* I - Number of command-line args */
                *outfile;               /* Output file */
   char         line[1024],             /* Line from file */
                *lineptr,               /* Pointer into line */
+               title[2048],            /* Title string */
+               *titleptr,              /* Pointer into title */
                name[1024],             /* Heading anchor name */
                *nameptr;               /* Pointer into anchor name */
   int          rfc,                    /* RFC # */
@@ -105,12 +107,8 @@ main(int  argc,                            /* I - Number of command-line args */
               "<html>\n"
               "<!-- SECTION: Specifications -->\n"
               "<head>\n"
-              "\t<style type='text/css'><!--\n"
-              "\th1, h2, h3 { font-family: sans-serif; }\n"
-              "\tp, pre { font-family: monospace; }\n"
-              "\th2.title, h3.title, h3.title { border-bottom: solid "
-              "2px #000000; }\n"
-              "\t--></style>\n");
+              "\t<link rel=\"stylesheet\" type=\"text/css\" "
+              "href=\"../cups-printable.css\">\n");
 
  /*
   * Skip the initial header stuff (working group ID, RFC #, authors, and
@@ -152,7 +150,8 @@ main(int  argc,                             /* I - Number of command-line args */
 
   for (lineptr = line; isspace(*lineptr & 255); lineptr ++);
 
-  cupsFilePrintf(outfile, "<title>RFC %d: %s", rfc, lineptr);
+  snprintf(title, sizeof(title), "RFC %d: %s", rfc, lineptr);
+  titleptr = title + strlen(title);
 
   while (cupsFileGets(infile, line, sizeof(line)))
   {
@@ -163,13 +162,16 @@ main(int  argc,                           /* I - Number of command-line args */
     else
     {
       for (lineptr = line; isspace(*lineptr & 255); lineptr ++);
-      cupsFilePrintf(outfile, " %s", lineptr);
+
+      snprintf(titleptr, sizeof(title) - (titleptr - title), " %s", lineptr);
+      titleptr += strlen(titleptr);
     }
   }
 
-  cupsFilePuts(outfile, "</title>\n"
-                       "</head>\n"
-                       "<body>\n");
+  cupsFilePrintf(outfile, "\t<title>%s</title>\n"
+                         "</head>\n"
+                         "<body>\n"
+                         "<h1 class='title'>%s</h1>\n", title, title);
 
  /*
   * Read the rest of the file...
@@ -198,7 +200,7 @@ main(int  argc,                             /* I - Number of command-line args */
       if (inheading)
       {
        if (inheading < 0)
-         cupsFilePuts(outfile, "</h1>\n");
+         cupsFilePuts(outfile, "</h2>\n");
        else
          cupsFilePrintf(outfile, "</a></h%d>\n", inheading);
 
@@ -212,7 +214,7 @@ main(int  argc,                             /* I - Number of command-line args */
       if (inheading)
       {
        if (inheading < 0)
-         cupsFilePuts(outfile, "</h1>\n");
+         cupsFilePuts(outfile, "</h2>\n");
        else
          cupsFilePrintf(outfile, "</a></h%d>\n", inheading);
 
@@ -449,7 +451,12 @@ put_line(cups_file_t *fp,          /* I - File */
   {
     "MAY",
     "MUST",
+    "NEED",
     "NOT",
+    "OPTIONAL",
+    "OPTIONALLY",
+    "RECOMMENDED",
+    "REQUIRED",
     "SHALL",
     "SHOULD"
   };
@@ -469,7 +476,8 @@ put_line(cups_file_t *fp,           /* I - File */
       for (i = 0; i < (int)(sizeof(keywords) / sizeof(sizeof(keywords[0]))); i ++)
       {
         len = strlen(keywords[i]);
-       if (!strncmp(s, keywords[i], len) && (isspace(s[len] & 255) || !*s))
+       if (!strncmp(s, keywords[i], len) &&
+           (isspace(s[len] & 255) || ispunct(s[len] & 255) || !*s))
        {
          cupsFilePrintf(fp, "<b>%s</b>", keywords[i]);
          s += len;
index 08fff9ecdd2e8f5abc731753418b8ef03902d5d8..2463c1630c53e19504402c56d0d0dcf640f35619 100644 (file)
@@ -7,5 +7,3 @@
        <LINK REL="SHORTCUT ICON" HREF="/images/cups-icon.png" TYPE="image/png">
 </HEAD>
 <BODY>
-
-<H1>{HELPTITLE}</H1>
index 08fff9ecdd2e8f5abc731753418b8ef03902d5d8..2463c1630c53e19504402c56d0d0dcf640f35619 100644 (file)
@@ -7,5 +7,3 @@
        <LINK REL="SHORTCUT ICON" HREF="/images/cups-icon.png" TYPE="image/png">
 </HEAD>
 <BODY>
-
-<H1>{HELPTITLE}</H1>
index 08fff9ecdd2e8f5abc731753418b8ef03902d5d8..2463c1630c53e19504402c56d0d0dcf640f35619 100644 (file)
@@ -7,5 +7,3 @@
        <LINK REL="SHORTCUT ICON" HREF="/images/cups-icon.png" TYPE="image/png">
 </HEAD>
 <BODY>
-
-<H1>{HELPTITLE}</H1>
index 08fff9ecdd2e8f5abc731753418b8ef03902d5d8..2463c1630c53e19504402c56d0d0dcf640f35619 100644 (file)
@@ -7,5 +7,3 @@
        <LINK REL="SHORTCUT ICON" HREF="/images/cups-icon.png" TYPE="image/png">
 </HEAD>
 <BODY>
-
-<H1>{HELPTITLE}</H1>
index 08fff9ecdd2e8f5abc731753418b8ef03902d5d8..2463c1630c53e19504402c56d0d0dcf640f35619 100644 (file)
@@ -7,5 +7,3 @@
        <LINK REL="SHORTCUT ICON" HREF="/images/cups-icon.png" TYPE="image/png">
 </HEAD>
 <BODY>
-
-<H1>{HELPTITLE}</H1>
index 08fff9ecdd2e8f5abc731753418b8ef03902d5d8..2463c1630c53e19504402c56d0d0dcf640f35619 100644 (file)
@@ -7,5 +7,3 @@
        <LINK REL="SHORTCUT ICON" HREF="/images/cups-icon.png" TYPE="image/png">
 </HEAD>
 <BODY>
-
-<H1>{HELPTITLE}</H1>