diff options
author | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2009-05-13 22:29:41 +0000 |
---|---|---|
committer | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2009-05-13 22:29:41 +0000 |
commit | 178cb7369d104b95acb92929f36956a38765c84c (patch) | |
tree | 4563f57a75df1c4145d25d3ebecf1d3152022362 | |
parent | f11a948a02771f78f50b530880a0269d4b4f58eb (diff) | |
download | cups-178cb7369d104b95acb92929f36956a38765c84c.tar.gz |
Merge changes from CUPS 1.4svn-r8628.
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@1495 a1ca3aef-8c08-0410-bb20-df032aa958be
132 files changed, 1635 insertions, 821 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index dcf311820..dc4ea588c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -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 @@ -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 \ diff --git a/backend/usb-darwin.c b/backend/usb-darwin.c index 8d3fe4f81..9dcd2c6ee 100644 --- a/backend/usb-darwin.c +++ b/backend/usb-darwin.c @@ -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; } diff --git a/cgi-bin/admin.c b/cgi-bin/admin.c index 9c3e67a8a..f0812c81a 100644 --- a/cgi-bin/admin.c +++ b/cgi-bin/admin.c @@ -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 index 000000000..e3355a6b9 --- /dev/null +++ b/cgi-bin/api-cgi.header @@ -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 index 000000000..cf0413a5e --- /dev/null +++ b/cgi-bin/api-cgi.shtml @@ -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> diff --git a/cgi-bin/makedocset.c b/cgi-bin/makedocset.c index 807c1f60f..501b1f499 100644 --- a/cgi-bin/makedocset.c +++ b/cgi-bin/makedocset.c @@ -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"); diff --git a/config-scripts/cups-common.m4 b/config-scripts/cups-common.m4 index 7ab5f0ebf..9ad554d32 100644 --- a/config-scripts/cups-common.m4 +++ b/config-scripts/cups-common.m4 @@ -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)) diff --git a/config.h.in b/config.h.in index b17968927..da096f59c 100644 --- a/config.h.in +++ b/config.h.in @@ -607,6 +607,13 @@ /* + * Do we have vproc_transaction_begin/end? + */ + +#undef HAVE_VPROC_TRANSACTION_BEGIN + + +/* * Do we have libusb? */ diff --git a/cups/api-array.header b/cups/api-array.header index 825b40754..0f929c8e4 100644 --- a/cups/api-array.header +++ b/cups/api-array.header @@ -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> diff --git a/cups/api-cups.header b/cups/api-cups.header index cc4dd408b..30b34785c 100644 --- a/cups/api-cups.header +++ b/cups/api-cups.header @@ -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> diff --git a/cups/api-filedir.header b/cups/api-filedir.header index 2a46a6771..437e079b5 100644 --- a/cups/api-filedir.header +++ b/cups/api-filedir.header @@ -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> diff --git a/cups/api-filter.header b/cups/api-filter.header index 8f12ebcfa..ebcd368e2 100644 --- a/cups/api-filter.header +++ b/cups/api-filter.header @@ -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> diff --git a/cups/api-filter.shtml b/cups/api-filter.shtml index 7d2b46973..49bf24be3 100644 --- a/cups/api-filter.shtml +++ b/cups/api-filter.shtml @@ -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 diff --git a/cups/api-httpipp.header b/cups/api-httpipp.header index df069fb59..af0874024 100644 --- a/cups/api-httpipp.header +++ b/cups/api-httpipp.header @@ -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> diff --git a/cups/api-overview.header b/cups/api-overview.header index 23cdd4fee..892ed1c7e 100644 --- a/cups/api-overview.header +++ b/cups/api-overview.header @@ -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> diff --git a/cups/api-ppd.header b/cups/api-ppd.header index 5c74e16d1..8763d9996 100644 --- a/cups/api-ppd.header +++ b/cups/api-ppd.header @@ -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> diff --git a/cups/backend.c b/cups/backend.c index fa7d05645..2df7b697d 100644 --- a/cups/backend.c +++ b/cups/backend.c @@ -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 diff --git a/cups/conflicts.c b/cups/conflicts.c index d6de5a39b..11cbb5acd 100644 --- a/cups/conflicts.c +++ b/cups/conflicts.c @@ -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 */ diff --git a/cups/cups.h b/cups/cups.h index a4f92e877..6502d95a5 100644 --- a/cups/cups.h +++ b/cups/cups.h @@ -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 ****/ { diff --git a/cups/dest.c b/cups/dest.c index f65e3152d..4aedcb216 100644 --- a/cups/dest.c +++ b/cups/dest.c @@ -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@ */ diff --git a/cups/emit.c b/cups/emit.c index 82c07f66e..bfae5d6f3 100644 --- a/cups/emit.c +++ b/cups/emit.c @@ -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... diff --git a/cups/file.c b/cups/file.c index 4b9d65e79..68e854de3 100644 --- a/cups/file.c +++ b/cups/file.c @@ -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 */ diff --git a/cups/getdevices.c b/cups/getdevices.c index 81f885912..6c9dbc843 100644 --- a/cups/getdevices.c +++ b/cups/getdevices.c @@ -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. */ diff --git a/cups/http.c b/cups/http.c index a717f80c0..ddb2f3a83 100644 --- a/cups/http.c +++ b/cups/http.c @@ -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) { diff --git a/cups/ipp-support.c b/cups/ipp-support.c index c8c239c0f..82200ae7d 100644 --- a/cups/ipp-support.c +++ b/cups/ipp-support.c @@ -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 */ diff --git a/cups/ipp.h b/cups/ipp.h index 6d182bd47..42c5ced26 100644 --- a/cups/ipp.h +++ b/cups/ipp.h @@ -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 */ diff --git a/cups/localize.c b/cups/localize.c index 8520e9310..94a3ffc7a 100644 --- a/cups/localize.c +++ b/cups/localize.c @@ -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 */ diff --git a/cups/page.c b/cups/page.c index 8616c25e0..04c6357dc 100644 --- a/cups/page.c +++ b/cups/page.c @@ -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 */ diff --git a/cups/ppd.h b/cups/ppd.h index 1a5f34db1..6f3940eac 100644 --- a/cups/ppd.h +++ b/cups/ppd.h @@ -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; diff --git a/cups/request.c b/cups/request.c index 615ef22a2..2d1107676 100644 --- a/cups/request.c +++ b/cups/request.c @@ -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 */ diff --git a/cups/sidechannel.c b/cups/sidechannel.c index 41db25e67..92aeb9d9b 100644 --- a/cups/sidechannel.c +++ b/cups/sidechannel.c @@ -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 */ diff --git a/cups/sidechannel.h b/cups/sidechannel.h index f69259ebe..8242247cb 100644 --- a/cups/sidechannel.h +++ b/cups/sidechannel.h @@ -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 ****/ diff --git a/cups/usersys.c b/cups/usersys.c index be69e2652..48d932703 100644 --- a/cups/usersys.c +++ b/cups/usersys.c @@ -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 diff --git a/cups/util.c b/cups/util.c index b3a51af1b..fb815ceed 100644 --- a/cups/util.c +++ b/cups/util.c @@ -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 */ diff --git a/doc/Makefile b/doc/Makefile index f86f11070..78d48756b 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -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 \ diff --git a/doc/cups-printable.css b/doc/cups-printable.css index a65dd8355..cc11262fd 100644 --- a/doc/cups-printable.css +++ b/doc/cups-printable.css @@ -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; } diff --git a/doc/cups.css b/doc/cups.css index a12db9ca8..5b78171af 100644 --- a/doc/cups.css +++ b/doc/cups.css @@ -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; } diff --git a/doc/help/accounting.html b/doc/help/accounting.html index 5860fe223..fe995956f 100644 --- a/doc/help/accounting.html +++ b/doc/help/accounting.html @@ -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 diff --git a/doc/help/api-array.html b/doc/help/api-array.html index 95b308006..3ee3a12b4 100644 --- a/doc/help/api-array.html +++ b/doc/help/api-array.html @@ -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> diff --git a/doc/help/api-cgi.html b/doc/help/api-cgi.html index 756294840..0951f4d7a 100644 --- a/doc/help/api-cgi.html +++ b/doc/help/api-cgi.html @@ -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 "required" 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 "required" variables.</p> diff --git a/doc/help/api-cups.html b/doc/help/api-cups.html index dcfa36fa1..c633e8d02 100644 --- a/doc/help/api-cups.html +++ b/doc/help/api-cups.html @@ -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"> CUPS 1.4 </span><a name="cupsCancelJob2">cupsCancelJob2</a></h3> +<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </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"> CUPS 1.4 </span><a name="cupsCreateJob">cupsCreateJob</a></h3> +<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </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"> CUPS 1.4 </span><a name="cupsFinishDocument">cupsFinishDocument</a></h3> +<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </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"> CUPS 1.4 </span><a name="cupsGetNamedDest">cupsGetNamedDest</a></h3> +<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </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"> CUPS 1.4 </span><a name="cupsGetPPD3">cupsGetPPD3</a></h3> +<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </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"> CUPS 1.4 </span><a name="cupsGetPassword2">cupsGetPassword2</a></h3> +<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </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"> CUPS 1.4 </span><a name="cupsSetPasswordCB2">cupsSetPasswordCB2</a></h3> +<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </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"> CUPS 1.4 </span><a name="cupsStartDocument">cupsStartDocument</a></h3> +<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </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"> CUPS 1.4 </span><a name="cups_device_cb_t">cups_device_cb_t</a></h3> +<h3 class="typedef"><span class="info"> CUPS 1.4/Mac OS X 10.6 </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"> CUPS 1.4 </span><a name="cups_password_cb2_t">cups_password_cb2_t</a></h3> +<h3 class="typedef"><span class="info"> CUPS 1.4/Mac OS X 10.6 </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"> CUPS 1.4 </span></dt> +<dt>CUPS_PRINTER_MFP <span class="info"> CUPS 1.4/Mac OS X 10.6 </span></dt> <dd class="description">Printer with scanning capabilities </dd> <dt>CUPS_PRINTER_NOT_SHARED <span class="info"> CUPS 1.2/Mac OS X 10.5 </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"> CUPS 1.4 </span></dt> +<dt>CUPS_PRINTER_SCANNER <span class="info"> CUPS 1.4/Mac OS X 10.6 </span></dt> <dd class="description">Scanner-only device </dd> <dt>CUPS_PRINTER_SMALL </dt> <dd class="description">Can do Letter/Legal/A4</dd> diff --git a/doc/help/api-driver.html b/doc/help/api-driver.html index 7278a8038..7f73c547c 100644 --- a/doc/help/api-driver.html +++ b/doc/help/api-driver.html @@ -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> diff --git a/doc/help/api-filedir.html b/doc/help/api-filedir.html index a91c7d273..a3e625db9 100644 --- a/doc/help/api-filedir.html +++ b/doc/help/api-filedir.html @@ -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"> CUPS 1.4 </span><a name="cupsFilePutConf">cupsFilePutConf</a></h3> +<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </span><a name="cupsFilePutConf">cupsFilePutConf</a></h3> <p class="description">Write a configuration line.</p> <p class="code"> ssize_t cupsFilePutConf (<br> diff --git a/doc/help/api-filter.html b/doc/help/api-filter.html index 29347b08a..e7686298e 100644 --- a/doc/help/api-filter.html +++ b/doc/help/api-filter.html @@ -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"> CUPS 1.4 </span><a name="cupsBackendReport">cupsBackendReport</a></h3> +<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </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 "data" parameter. cupsSideChannelDoRequest() will update the value to contain the number of data bytes in the buffer. </p> -<h3 class="function"><span class="info"> CUPS 1.4 </span><a name="cupsSideChannelSNMPGet">cupsSideChannelSNMPGet</a></h3> +<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </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"> CUPS 1.4 </span><a name="cupsSideChannelSNMPWalk">cupsSideChannelSNMPWalk</a></h3> +<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </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"> CUPS 1.4 </span></dt> +<dt>CUPS_SC_CMD_SNMP_GET <span class="info"> CUPS 1.4/Mac OS X 10.6 </span></dt> <dd class="description">Query an SNMP OID </dd> -<dt>CUPS_SC_CMD_SNMP_GET_NEXT <span class="info"> CUPS 1.4 </span></dt> +<dt>CUPS_SC_CMD_SNMP_GET_NEXT <span class="info"> CUPS 1.4/Mac OS X 10.6 </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> diff --git a/doc/help/api-httpipp.html b/doc/help/api-httpipp.html index 444fe5870..9b3096b59 100644 --- a/doc/help/api-httpipp.html +++ b/doc/help/api-httpipp.html @@ -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"> CUPS 1.4 </span><a name="cupsGetDevices">cupsGetDevices</a></h3> +<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </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"> CUPS 1.4 </span><a name="cupsGetResponse">cupsGetResponse</a></h3> +<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </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"> CUPS 1.4 </span><a name="cupsReadResponseData">cupsReadResponseData</a></h3> +<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </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"> CUPS 1.4 </span><a name="cupsSendRequest">cupsSendRequest</a></h3> +<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </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"> CUPS 1.4 </span><a name="cupsWriteRequestData">cupsWriteRequestData</a></h3> +<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </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"> CUPS 1.4 </span><a name="ippTagString">ippTagString</a></h3> +<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </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"> CUPS 1.4 </span><a name="ippTagValue">ippTagValue</a></h3> +<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </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"> CUPS 1.4 </span></dt> +<dt>CUPS_GET_DOCUMENT <span class="info"> CUPS 1.4/Mac OS X 10.6 </span></dt> <dd class="description">Get a document file </dd> <dt>CUPS_GET_PPD <span class="info"> CUPS 1.3/Mac OS X 10.5 </span></dt> <dd class="description">Get a PPD file </dd> diff --git a/doc/help/api-mime.html b/doc/help/api-mime.html index 7d759781f..476916f57 100644 --- a/doc/help/api-mime.html +++ b/doc/help/api-mime.html @@ -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> diff --git a/doc/help/api-overview.html b/doc/help/api-overview.html index b6e07808c..8db93b456 100644 --- a/doc/help/api-overview.html +++ b/doc/help/api-overview.html @@ -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> diff --git a/doc/help/api-ppd.html b/doc/help/api-ppd.html index 56cd2abd0..db8433006 100644 --- a/doc/help/api-ppd.html +++ b/doc/help/api-ppd.html @@ -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"> CUPS 1.4 </span><a name="cupsGetConflicts">cupsGetConflicts</a></h3> +<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </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 "finishings", "media", "mirror", "multiple-document-handling", "output-bin", "printer-resolution", and "sides" attributes to their corresponding PPD options and choices.</p> -<h3 class="function"><span class="info"> CUPS 1.4 </span><a name="cupsResolveConflicts">cupsResolveConflicts</a></h3> +<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </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"> CUPS 1.4 </span><a name="ppdInstallableConflict">ppdInstallableConflict</a></h3> +<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </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"> CUPS 1.4 </span><a name="ppdLocalizeMarkerName">ppdLocalizeMarkerName</a></h3> +<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </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"> CUPS 1.4 </span><a name="ppdPageSizeLimits">ppdPageSizeLimits</a></h3> +<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </span><a name="ppdPageSizeLimits">ppdPageSizeLimits</a></h3> <p class="description">Return the custom page size limits.</p> <p class="code"> int ppdPageSizeLimits (<br> diff --git a/doc/help/api-ppdc.html b/doc/help/api-ppdc.html index 335626929..941e7033a 100644 --- a/doc/help/api-ppdc.html +++ b/doc/help/api-ppdc.html @@ -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> diff --git a/doc/help/api-raster.html b/doc/help/api-raster.html index 67d3920de..93c816b88 100644 --- a/doc/help/api-raster.html +++ b/doc/help/api-raster.html @@ -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> diff --git a/doc/help/cgi.html b/doc/help/cgi.html index b96084e00..c50a2a501 100644 --- a/doc/help/cgi.html +++ b/doc/help/cgi.html @@ -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 diff --git a/doc/help/glossary.html b/doc/help/glossary.html index dea7a73cc..c6898dc7d 100644 --- a/doc/help/glossary.html +++ b/doc/help/glossary.html @@ -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> diff --git a/doc/help/kerberos.html b/doc/help/kerberos.html index d30758118..dbac3f14f 100644 --- a/doc/help/kerberos.html +++ b/doc/help/kerberos.html @@ -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 diff --git a/doc/help/license.html b/doc/help/license.html index 53cfb5d01..a86babdd5 100644 --- a/doc/help/license.html +++ b/doc/help/license.html @@ -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> diff --git a/doc/help/network.html b/doc/help/network.html index 58c078411..6b2381088 100644 --- a/doc/help/network.html +++ b/doc/help/network.html @@ -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> diff --git a/doc/help/options.html b/doc/help/options.html index f32e1b9dd..e3b5820be 100644 --- a/doc/help/options.html +++ b/doc/help/options.html @@ -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 diff --git a/doc/help/overview.html b/doc/help/overview.html index 946fadb3d..59a2ac067 100644 --- a/doc/help/overview.html +++ b/doc/help/overview.html @@ -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 diff --git a/doc/help/policies.html b/doc/help/policies.html index 37ab489ef..485a85705 100644 --- a/doc/help/policies.html +++ b/doc/help/policies.html @@ -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 diff --git a/doc/help/postscript-driver.html b/doc/help/postscript-driver.html index adc182816..c6ec8b2e1 100644 --- a/doc/help/postscript-driver.html +++ b/doc/help/postscript-driver.html @@ -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> diff --git a/doc/help/ppd-compiler.html b/doc/help/ppd-compiler.html index 3c29567d8..6c5ddd23b 100644 --- a/doc/help/ppd-compiler.html +++ b/doc/help/ppd-compiler.html @@ -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> diff --git a/doc/help/raster-driver.html b/doc/help/raster-driver.html index 94aab64c4..9d0c89e4e 100644 --- a/doc/help/raster-driver.html +++ b/doc/help/raster-driver.html @@ -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> diff --git a/doc/help/ref-access_log.html b/doc/help/ref-access_log.html index 5ed47821b..015ea17bd 100644 --- a/doc/help/ref-access_log.html +++ b/doc/help/ref-access_log.html @@ -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 diff --git a/doc/help/ref-classes-conf.html b/doc/help/ref-classes-conf.html index 7b1e6cacd..9224c5a60 100644 --- a/doc/help/ref-classes-conf.html +++ b/doc/help/ref-classes-conf.html @@ -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 diff --git a/doc/help/ref-client-conf.html b/doc/help/ref-client-conf.html index 90207ba72..0229b0040 100644 --- a/doc/help/ref-client-conf.html +++ b/doc/help/ref-client-conf.html @@ -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 diff --git a/doc/help/ref-cupsd-conf.html.in b/doc/help/ref-cupsd-conf.html.in index 64029b94c..b22d3a304 100644 --- a/doc/help/ref-cupsd-conf.html.in +++ b/doc/help/ref-cupsd-conf.html.in @@ -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> diff --git a/doc/help/ref-error_log.html b/doc/help/ref-error_log.html index e40987f19..010927802 100644 --- a/doc/help/ref-error_log.html +++ b/doc/help/ref-error_log.html @@ -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> diff --git a/doc/help/ref-mailto-conf.html b/doc/help/ref-mailto-conf.html index 031700df9..16e8b409a 100644 --- a/doc/help/ref-mailto-conf.html +++ b/doc/help/ref-mailto-conf.html @@ -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 diff --git a/doc/help/ref-page_log.html b/doc/help/ref-page_log.html index fa2bd1dc1..a0ec7a0e2 100644 --- a/doc/help/ref-page_log.html +++ b/doc/help/ref-page_log.html @@ -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> diff --git a/doc/help/ref-ppdcfile.html b/doc/help/ref-ppdcfile.html index 4549586b6..a4fa56c9d 100644 --- a/doc/help/ref-ppdcfile.html +++ b/doc/help/ref-ppdcfile.html @@ -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 diff --git a/doc/help/ref-printers-conf.html b/doc/help/ref-printers-conf.html index e3fb07840..3539f8cfe 100644 --- a/doc/help/ref-printers-conf.html +++ b/doc/help/ref-printers-conf.html @@ -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 diff --git a/doc/help/ref-snmp-conf.html b/doc/help/ref-snmp-conf.html index 71e18d6d6..be7f11c6a 100644 --- a/doc/help/ref-snmp-conf.html +++ b/doc/help/ref-snmp-conf.html @@ -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 diff --git a/doc/help/ref-subscriptions-conf.html b/doc/help/ref-subscriptions-conf.html index 20c31e187..d4f4defc3 100644 --- a/doc/help/ref-subscriptions-conf.html +++ b/doc/help/ref-subscriptions-conf.html @@ -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 diff --git a/doc/help/security.html b/doc/help/security.html index c5956ef06..38fb42cc0 100644 --- a/doc/help/security.html +++ b/doc/help/security.html @@ -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> diff --git a/doc/help/sharing.html b/doc/help/sharing.html index 29bb757ad..00ccb6fe8 100644 --- a/doc/help/sharing.html +++ b/doc/help/sharing.html @@ -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> diff --git a/doc/help/spec-banner.html b/doc/help/spec-banner.html index 1c16700be..9cdc5af82 100644 --- a/doc/help/spec-banner.html +++ b/doc/help/spec-banner.html @@ -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 diff --git a/doc/help/spec-browsing.html b/doc/help/spec-browsing.html index 12d3087f2..62f1f19b6 100644 --- a/doc/help/spec-browsing.html +++ b/doc/help/spec-browsing.html @@ -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 diff --git a/doc/help/spec-cmp.html b/doc/help/spec-cmp.html index 415c194cf..23e229407 100644 --- a/doc/help/spec-cmp.html +++ b/doc/help/spec-cmp.html @@ -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> diff --git a/doc/help/spec-command.html b/doc/help/spec-command.html index ff58d1db3..63170e005 100644 --- a/doc/help/spec-command.html +++ b/doc/help/spec-command.html @@ -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 diff --git a/doc/help/spec-design.html b/doc/help/spec-design.html index 928d6a1e7..a9472c4f9 100644 --- a/doc/help/spec-design.html +++ b/doc/help/spec-design.html @@ -3,191 +3,86 @@ <!-- 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> diff --git a/doc/help/spec-ipp.html b/doc/help/spec-ipp.html index 39839068b..525e49d5f 100644 --- a/doc/help/spec-ipp.html +++ b/doc/help/spec-ipp.html @@ -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 diff --git a/doc/help/spec-pdf.html b/doc/help/spec-pdf.html index bb7164472..407f47887 100644 --- a/doc/help/spec-pdf.html +++ b/doc/help/spec-pdf.html @@ -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 diff --git a/doc/help/spec-postscript.html b/doc/help/spec-postscript.html index 461e225f8..b13a1894e 100644 --- a/doc/help/spec-postscript.html +++ b/doc/help/spec-postscript.html @@ -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 diff --git a/doc/help/spec-ppd.html b/doc/help/spec-ppd.html index fe4b0cfd8..6753cd48e 100644 --- a/doc/help/spec-ppd.html +++ b/doc/help/spec-ppd.html @@ -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> diff --git a/doc/help/spec-raster.html b/doc/help/spec-raster.html index 79a93a4c5..de5b7b50e 100644 --- a/doc/help/spec-raster.html +++ b/doc/help/spec-raster.html @@ -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> diff --git a/doc/help/spec-stp.html b/doc/help/spec-stp.html index fd46937f8..fd04da647 100644 --- a/doc/help/spec-stp.html +++ b/doc/help/spec-stp.html @@ -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> diff --git a/doc/help/standard.html.in b/doc/help/standard.html.in index 9005c6281..f957fe249 100644 --- a/doc/help/standard.html.in +++ b/doc/help/standard.html.in @@ -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> diff --git a/doc/help/translation.html b/doc/help/translation.html index abc4bbb65..8fa6efe23 100644 --- a/doc/help/translation.html +++ b/doc/help/translation.html @@ -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 diff --git a/doc/help/whatsnew.html b/doc/help/whatsnew.html index 56d13e4e6..dfbc62a6f 100644 --- a/doc/help/whatsnew.html +++ b/doc/help/whatsnew.html @@ -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> @@ -101,6 +104,8 @@ <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> @@ -140,7 +145,7 @@ <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> @@ -165,7 +170,7 @@ <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> @@ -178,7 +183,7 @@ <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> diff --git a/driver/api-driver.header b/driver/api-driver.header index e69de29bb..0f3937bc1 100644 --- a/driver/api-driver.header +++ b/driver/api-driver.header @@ -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> diff --git a/driver/api-driver.shtml b/driver/api-driver.shtml index e69de29bb..0e8bcff27 100644 --- a/driver/api-driver.shtml +++ b/driver/api-driver.shtml @@ -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> diff --git a/filter/api-raster.header b/filter/api-raster.header index 8b54f004f..8e26fbf3e 100644 --- a/filter/api-raster.header +++ b/filter/api-raster.header @@ -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> diff --git a/filter/postscript-driver.header b/filter/postscript-driver.header index 5eb2dd15b..1f717ba09 100644 --- a/filter/postscript-driver.header +++ b/filter/postscript-driver.header @@ -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> diff --git a/filter/postscript-driver.shtml b/filter/postscript-driver.shtml index 4729d5e25..a21086d92 100644 --- a/filter/postscript-driver.shtml +++ b/filter/postscript-driver.shtml @@ -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> diff --git a/filter/ppd-compiler.header b/filter/ppd-compiler.header index b975c92cc..6afe1b4f0 100644 --- a/filter/ppd-compiler.header +++ b/filter/ppd-compiler.header @@ -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> diff --git a/filter/raster-driver.header b/filter/raster-driver.header index a90c2e328..5ba1fb614 100644 --- a/filter/raster-driver.header +++ b/filter/raster-driver.header @@ -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> diff --git a/filter/raster-driver.shtml b/filter/raster-driver.shtml index 824ef3779..3a260f008 100644 --- a/filter/raster-driver.shtml +++ b/filter/raster-driver.shtml @@ -157,14 +157,38 @@ <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> diff --git a/filter/rastertoepson.c b/filter/rastertoepson.c index 5a54687d2..141cd2b22 100644 --- a/filter/rastertoepson.c +++ b/filter/rastertoepson.c @@ -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; diff --git a/init/org.cups.cupsd.plist b/init/org.cups.cupsd.plist index 74bcce6c3..2b9a7df9d 100644 --- a/init/org.cups.cupsd.plist +++ b/init/org.cups.cupsd.plist @@ -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> diff --git a/locale/cups_zh.po b/locale/cups_zh.po index de7a5b814..7a78b197b 100644 --- a/locale/cups_zh.po +++ b/locale/cups_zh.po @@ -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 "打印自:" diff --git a/man/Makefile b/man/Makefile index d1a4e8c1c..b12c39a65 100644 --- a/man/Makefile +++ b/man/Makefile @@ -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) \ diff --git a/man/backend.man b/man/backend.man index 7c828af14..e62f94e22 100644 --- a/man/backend.man +++ b/man/backend.man @@ -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 index 8d4209abf..000000000 --- a/man/commandtoescpx.man +++ /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 index 9288ad210..000000000 --- a/man/commandtopclx.man +++ /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 $". -.\" diff --git a/man/cupsd.conf.man.in b/man/cupsd.conf.man.in index a2153b9a6..430df4c87 100644 --- a/man/cupsd.conf.man.in +++ b/man/cupsd.conf.man.in @@ -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. diff --git a/man/filter.man b/man/filter.man index 4d8bec9dd..a66e05562 100644 --- a/man/filter.man +++ b/man/filter.man @@ -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 diff --git a/man/mantohtml.c b/man/mantohtml.c index ff9c67501..dd672d507 100644 --- a/man/mantohtml.c +++ b/man/mantohtml.c @@ -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 index 042ce66be..000000000 --- a/man/rastertoescpx.man +++ /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 index aa9ee567e..000000000 --- a/man/rastertopclx.man +++ /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 $". -.\" diff --git a/packaging/cups.list.in b/packaging/cups.list.in index 0fa0917fe..5c441247f 100644 --- a/packaging/cups.list.in +++ b/packaging/cups.list.in @@ -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 - diff --git a/packaging/cups.spec.in b/packaging/cups.spec.in index 09ab796f3..002393bd2 100644 --- a/packaging/cups.spec.in +++ b/packaging/cups.spec.in @@ -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 index 000000000..418686560 --- /dev/null +++ b/ppdc/api-ppdc.header @@ -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 index 000000000..e305dcb9d --- /dev/null +++ b/ppdc/api-ppdc.shtml @@ -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 index 000000000..8d5db2ad6 --- /dev/null +++ b/scheduler/api-mime.header @@ -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 index 000000000..7d3125fad --- /dev/null +++ b/scheduler/api-mime.shtml @@ -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> diff --git a/scheduler/conf.c b/scheduler/conf.c index efc3a6b84..0e915b4f7 100644 --- a/scheduler/conf.c +++ b/scheduler/conf.c @@ -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; diff --git a/scheduler/conf.h b/scheduler/conf.h index 582a152c2..c30f97a5e 100644 --- a/scheduler/conf.h +++ b/scheduler/conf.h @@ -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); diff --git a/scheduler/cups-driverd.cxx b/scheduler/cups-driverd.cxx index a7498b5d2..7383145cc 100644 --- a/scheduler/cups-driverd.cxx +++ b/scheduler/cups-driverd.cxx @@ -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, @@ -661,6 +664,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) { /* diff --git a/scheduler/dirsvc.c b/scheduler/dirsvc.c index 11be5585e..29ff94743 100644 --- a/scheduler/dirsvc.c +++ b/scheduler/dirsvc.c @@ -102,6 +102,8 @@ */ 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, diff --git a/scheduler/job.c b/scheduler/job.c index 19e0af1aa..7f3fa355f 100644 --- a/scheduler/job.c +++ b/scheduler/job.c @@ -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); @@ -2478,6 +2488,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? */ diff --git a/scheduler/job.h b/scheduler/job.h index 5d47056f8..16dd09ff7 100644 --- a/scheduler/job.h +++ b/scheduler/job.h @@ -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... diff --git a/scheduler/log.c b/scheduler/log.c index a6ac179aa..15fcf972f 100644 --- a/scheduler/log.c +++ b/scheduler/log.c @@ -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!")); diff --git a/scheduler/printers.c b/scheduler/printers.c index ba1be9b03..c5008eec8 100644 --- a/scheduler/printers.c +++ b/scheduler/printers.c @@ -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); } /* diff --git a/scheduler/sysman.c b/scheduler/sysman.c index 74f1a0342..212f0fdd3 100644 --- a/scheduler/sysman.c +++ b/scheduler/sysman.c @@ -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]); } } diff --git a/standards/Makefile b/standards/Makefile index 9ae30e27b..53b2c1f98 100644 --- a/standards/Makefile +++ b/standards/Makefile @@ -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) # diff --git a/standards/rfctohtml.c b/standards/rfctohtml.c index 716b7d428..fc4daa2b3 100644 --- a/standards/rfctohtml.c +++ b/standards/rfctohtml.c @@ -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; diff --git a/templates/de/help-printable.tmpl b/templates/de/help-printable.tmpl index 08fff9ecd..2463c1630 100644 --- a/templates/de/help-printable.tmpl +++ b/templates/de/help-printable.tmpl @@ -7,5 +7,3 @@ <LINK REL="SHORTCUT ICON" HREF="/images/cups-icon.png" TYPE="image/png"> </HEAD> <BODY> - -<H1>{HELPTITLE}</H1> diff --git a/templates/es/help-printable.tmpl b/templates/es/help-printable.tmpl index 08fff9ecd..2463c1630 100644 --- a/templates/es/help-printable.tmpl +++ b/templates/es/help-printable.tmpl @@ -7,5 +7,3 @@ <LINK REL="SHORTCUT ICON" HREF="/images/cups-icon.png" TYPE="image/png"> </HEAD> <BODY> - -<H1>{HELPTITLE}</H1> diff --git a/templates/help-printable.tmpl b/templates/help-printable.tmpl index 08fff9ecd..2463c1630 100644 --- a/templates/help-printable.tmpl +++ b/templates/help-printable.tmpl @@ -7,5 +7,3 @@ <LINK REL="SHORTCUT ICON" HREF="/images/cups-icon.png" TYPE="image/png"> </HEAD> <BODY> - -<H1>{HELPTITLE}</H1> diff --git a/templates/ja/help-printable.tmpl b/templates/ja/help-printable.tmpl index 08fff9ecd..2463c1630 100644 --- a/templates/ja/help-printable.tmpl +++ b/templates/ja/help-printable.tmpl @@ -7,5 +7,3 @@ <LINK REL="SHORTCUT ICON" HREF="/images/cups-icon.png" TYPE="image/png"> </HEAD> <BODY> - -<H1>{HELPTITLE}</H1> diff --git a/templates/pl/help-printable.tmpl b/templates/pl/help-printable.tmpl index 08fff9ecd..2463c1630 100644 --- a/templates/pl/help-printable.tmpl +++ b/templates/pl/help-printable.tmpl @@ -7,5 +7,3 @@ <LINK REL="SHORTCUT ICON" HREF="/images/cups-icon.png" TYPE="image/png"> </HEAD> <BODY> - -<H1>{HELPTITLE}</H1> diff --git a/templates/ru/help-printable.tmpl b/templates/ru/help-printable.tmpl index 08fff9ecd..2463c1630 100644 --- a/templates/ru/help-printable.tmpl +++ b/templates/ru/help-printable.tmpl @@ -7,5 +7,3 @@ <LINK REL="SHORTCUT ICON" HREF="/images/cups-icon.png" TYPE="image/png"> </HEAD> <BODY> - -<H1>{HELPTITLE}</H1> |