From: msweet Date: Fri, 16 May 2008 03:15:15 +0000 (+0000) Subject: Merge changes from CUPS 1.4svn-r7582. X-Git-Tag: release-1.6.3~169 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=01ce6322ca3809ac0260c8ef28abbc8255f6e34f;p=thirdparty%2Fcups.git Merge changes from CUPS 1.4svn-r7582. git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@768 a1ca3aef-8c08-0410-bb20-df032aa958be --- diff --git a/CHANGES.txt b/CHANGES.txt index 64b2990935..575442955d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,8 +1,10 @@ -CHANGES.txt - 2008-05-14 +CHANGES.txt - 2008-05-15 ------------------------ CHANGES IN CUPS V1.4b1 + - Added a PageLogFormat directive to the cupsd.conf file to + control the format of lines in the page_log file. - Filters can now send PPD: messages to stderr to set PPD keywords like DefaultPageSize while a job is printing. - Added a mdns backend for discovery and printing to printers diff --git a/conf/cupsd.conf.in b/conf/cupsd.conf.in index 55b7c5ca8b..3561a805e5 100644 --- a/conf/cupsd.conf.in +++ b/conf/cupsd.conf.in @@ -22,6 +22,7 @@ Listen localhost:@DEFAULT_IPP_PORT@ Browsing On BrowseOrder allow,deny BrowseAllow all +BrowseLocalProtocols # Default authentication type, when authentication is required... DefaultAuthType Basic diff --git a/config-scripts/cups-common.m4 b/config-scripts/cups-common.m4 index c643663b02..6e81ea5260 100644 --- a/config-scripts/cups-common.m4 +++ b/config-scripts/cups-common.m4 @@ -261,8 +261,13 @@ case $uname in dnl Check for Authorization Services support AC_CHECK_HEADER(Security/Authorization.h, [ AC_DEFINE(HAVE_AUTHORIZATION_H) - CUPS_DEFAULT_PRINTADMIN_AUTH="@AUTHKEY(system.print.admin) @admin @lpadmin" - CUPS_SYSTEM_AUTHKEY="SystemGroupAuthKey system.preferences"]) + if grep -q system.print.operator /etc/authorization; then + CUPS_DEFAULT_PRINTADMIN_AUTH="@AUTHKEY(system.print.admin) @admin @lpadmin" + CUPS_SYSTEM_AUTHKEY="SystemGroupAuthKey system.preferences" + else + CUPS_DEFAULT_PRINTADMIN_AUTH="@AUTHKEY(system.print.operator) @admin @lpadmin" + CUPS_SYSTEM_AUTHKEY="SystemGroupAuthKey system.print.admin" + fi]) AC_CHECK_HEADER(Security/SecBasePriv.h,AC_DEFINE(HAVE_SECBASEPRIV_H)) dnl Check for sandbox/Seatbelt support diff --git a/cups/adminutil.c b/cups/adminutil.c index 70fdce4256..e3adf54b44 100644 --- a/cups/adminutil.c +++ b/cups/adminutil.c @@ -79,7 +79,7 @@ static void write_option(cups_file_t *dstfp, int order, char * /* O - PPD file or NULL */ cupsAdminCreateWindowsPPD( - http_t *http, /* I - Connection to server */ + http_t *http, /* I - Connection to server or @code CUPS_HTTP_DEFAULT@ */ const char *dest, /* I - Printer or class */ char *buffer, /* I - Filename buffer */ int bufsize) /* I - Size of filename buffer */ @@ -121,6 +121,9 @@ cupsAdminCreateWindowsPPD( if (buffer) *buffer = '\0'; + if (!http) + http = _cupsConnect(); + if (!http || !dest || !buffer || bufsize < 2) return (NULL); @@ -855,7 +858,7 @@ cupsAdminExportSamba( int /* O - 1 on success, 0 on failure */ cupsAdminGetServerSettings( - http_t *http, /* I - Connection to server */ + http_t *http, /* I - Connection to server or @code CUPS_HTTP_DEFAULT@ */ int *num_settings, /* O - Number of settings */ cups_option_t **settings) /* O - Settings */ { @@ -874,7 +877,7 @@ cupsAdminGetServerSettings( int /* O - 1 on success, 0 on failure */ _cupsAdminGetServerSettings( - http_t *http, /* I - Connection to server */ + http_t *http, /* I - Connection to server or @code CUPS_HTTP_DEFAULT@ */ int *num_settings, /* O - Number of settings */ cups_option_t **settings) /* O - Settings */ { @@ -893,6 +896,9 @@ _cupsAdminGetServerSettings( * Range check input... */ + if (!http) + http = _cupsConnect(); + if (!http || !num_settings || !settings) { _cupsSetError(IPP_INTERNAL_ERROR, NULL); @@ -1144,7 +1150,7 @@ _cupsAdminGetServerSettings( int /* O - 1 on success, 0 on failure */ cupsAdminSetServerSettings( - http_t *http, /* I - Connection to server */ + http_t *http, /* I - Connection to server or @code CUPS_HTTP_DEFAULT@ */ int num_settings, /* I - Number of settings */ cups_option_t *settings) /* I - Settings */ { @@ -1160,7 +1166,7 @@ cupsAdminSetServerSettings( int /* O - 1 on success, 0 on failure */ _cupsAdminSetServerSettings( - http_t *http, /* I - Connection to server */ + http_t *http, /* I - Connection to server or @code CUPS_HTTP_DEFAULT@ */ int num_settings, /* I - Number of settings */ cups_option_t *settings) /* I - Settings */ { @@ -1213,6 +1219,9 @@ _cupsAdminSetServerSettings( * Range check input... */ + if (!http) + http = _cupsConnect(); + if (!http || !num_settings || !settings) { _cupsSetError(IPP_INTERNAL_ERROR, NULL); diff --git a/cups/localize.c b/cups/localize.c index 3136d4b7e6..6e28bb8d5b 100644 --- a/cups/localize.c +++ b/cups/localize.c @@ -277,9 +277,6 @@ ppdLocalizeIPPReason( * Decode text: URI and add to the buffer... */ - if (bufptr > buffer) - *bufptr++ = ' '; /* Add leading whitespace */ - valptr += 5; while (*valptr && !isspace(*valptr & 255) && bufptr < bufend) diff --git a/cups/test.ppd b/cups/test.ppd index 35682234a7..1b58a52312 100644 --- a/cups/test.ppd +++ b/cups/test.ppd @@ -144,19 +144,19 @@ help:anchor='foo'%20bookID=Vendor%20Help /help/foo/bar.html" *End -*fr.cupsIPPReason foo/La Foo Reason: "text:La%20Long +*fr.cupsIPPReason foo/La Foo Reason: "text:La%20Long%20 text:Foo%20Reason http://foo/fr/bar.html help:anchor='foo'%20bookID=Vendor%20Help /help/fr/foo/bar.html" *End -*zh_TW.cupsIPPReason foo/Number 1 Foo Reason: "text:Number%201 +*zh_TW.cupsIPPReason foo/Number 1 Foo Reason: "text:Number%201%20 text:Foo%20Reason http://foo/zh_TW/bar.html help:anchor='foo'%20bookID=Vendor%20Help /help/zh_TW/foo/bar.html" *End -*zh.cupsIPPReason foo/Number 2 Foo Reason: "text:Number%202 +*zh.cupsIPPReason foo/Number 2 Foo Reason: "text:Number%202%20 text:Foo%20Reason http://foo/zh/bar.html help:anchor='foo'%20bookID=Vendor%20Help diff --git a/doc/help/ref-cupsd-conf.html.in b/doc/help/ref-cupsd-conf.html.in index 07ba7ad517..46ad1027ba 100644 --- a/doc/help/ref-cupsd-conf.html.in +++ b/doc/help/ref-cupsd-conf.html.in @@ -2134,6 +2134,48 @@ default page log file is @CUPS_LOGDIR@/page_log.

information to the system log instead of a plain file.

+

PageLogFormat

+ +

Examples

+ +
+PageLogFormat %p %j %u %T %P %C %{job-billing} %{job-originating-host-name} %{job-name} %{media} %{sides}
+PageLogFormat PAGE %p %j %u %P %C %{job-billing} %{job-originating-host-name}
+
+ +

Description

+ +

The PageLogFormat directive sets the format of lines +that are logged to the page log file. Sequences beginning with percent (%) +characters are replaced with the corresponding information, while all other +characters are copied literally. The following percent sequences are +recognized:

+ + + +

The default is "%p %j %u %T %P %C %{job-billing} %{job-originating-host-name} %{job-name} %{media} %{sides}".

+ +

CUPS 1.2PassEnv

Examples

diff --git a/doc/help/ref-page_log.html b/doc/help/ref-page_log.html index f57180f7e1..fa2bd1dc16 100644 --- a/doc/help/ref-page_log.html +++ b/doc/help/ref-page_log.html @@ -6,20 +6,23 @@

The page_log file lists each page that is sent to a -printer. Each line contains the following information:

+printer. By default, each line contains the following information:

-printer user job-id date-time page-number num-copies job-billing
+printer user job-id date-time page-number num-copies job-billing job-originating-host-name job-name media sides

-DeskJet root 2 [20/May/1999:19:21:05 +0000] 1 1 acme-123
+DeskJet root 2 [20/May/1999:19:21:05 +0000] 1 1 acme-123 localhost myjob letter one-sided
-DeskJet root 2 [20/May/1999:19:21:05 +0000] 2 1 acme-123
+DeskJet root 2 [20/May/1999:19:21:05 +0000] 2 1 acme-123 localhost myjob letter one-sided

+

The PageLogFormat +directive can be used to change this information.

+

The printer field contains the name of the printer that printed the page. If you send a job to a printer class, this field will contain the name of the printer that was assigned the @@ -49,5 +52,23 @@ printers that cannot produce copies on their own, the Create-Job or Print-Job requests or "-" if none was provided. +

The job-originating-host-name field contains the hostname or IP +address of the client that printed the job.

+ +

The job-name field contains a copy of the +job-name attribute provided with the IPP +Create-Job or Print-Job requests or "-" +if none was provided. + +

The media field contains a copy of the +media attribute provided with the IPP +Create-Job or Print-Job requests or "-" +if none was provided. + +

The sides field contains a copy of the +sides attribute provided with the IPP +Create-Job or Print-Job requests or "-" +if none was provided. + diff --git a/doc/help/spec-command.html b/doc/help/spec-command.html index 8847203d27..7abb3adea4 100644 --- a/doc/help/spec-command.html +++ b/doc/help/spec-command.html @@ -13,6 +13,7 @@ CUPS command file format specification for the Common UNIX Printing System (CUPS). + Copyright 2007-2008 by Apple Inc. Copyright 1997-2006 by Easy Software Products. These coded instructions, statements, and computer programs are the @@ -47,6 +48,23 @@ can determine if a printer supports printing of CUPS command files by checking the printer-type attribute for the CUPS_PRINTER_COMMANDS capability bit.

+

In addition, the PPD file for a printer can contain a +cupsCommands keyword that provides a list of supported +commands separated by spaces, for example:

+ +
+*cupsCommand: "AutoConfigure Clean PrintSelfTestPage ReportLevels"
+
+ +

If no cupsCommands keyword is provided, the command filter +must support AutoConfigure, +Clean, +PrintSelfTestPage, +and ReportLevels. The scheduler also +provides the printer-commands attribute containing the list of +supported commands.

+ +

File Syntax

CUPS command files are ASCII text files. The first line of a @@ -63,25 +81,57 @@ Comments begin with the # character, e.g.:

# This is a comment -

The printer commands are described below. Printer commands are -case-insensitive, so "PRINTSELFTESTPAGE", "printselftestpage", -and "PrintSelfTestPage" are equivalent. Commands that accept -arguments have their arguments on the same line separated by -whitespace.

+

Commands are any sequence of letters, numbers, and punctuation characters +optionally followed by parameters separated by whitespace, e.g.:

+ +
+Clean all
+PrintSelfTestPage
+
+ +

Command names are case-insensitive, so "PRINTSELFTESTPAGE", +"printselftestpage", and "PrintSelfTestPage" are equivalent. Vendor-specific +commands should use a domain name prefix, e.g.:

+ +
+com.vendor.foo
+com.vendor.bar param param2 ... paramN
+
+ + +

Standard Commands

-

Commands

+

The following are the standard commands supported by the format. The only +required command is +PrintSelfTestPage.

-

Clean

-

Clean colorname

+

AutoConfigure

-

Does a standard print head cleaning. If a printer does not -support cleaning of individual colors or cartridges, then all -print heads are cleaned. Command filters MUST support the "all" -colorname. Other standard color names include "black", "color", -"photo", "cyan", "magenta", "yellow", "light-cyan", -"light-magenta", "light-black", "light-gray", and -"dark-gray".

+

AutoConfigure

+ +

The AutoConfigure command updates the printer's PPD file +and driver state information to reflect the current configuration of the +printer. There are no arguments for this command.

+ +

Example:

+ +
+#CUPS-COMMAND
+AutoConfigure
+
+ + +

Clean

+ +

Clean colorname

+ +

The Clean command performs a standard print head cleaning. The +"colorname" parameter specifies which color or head to clean. If a printer does +not support cleaning of individual colors or cartridges, then all colors are +cleaned. Command filters MUST support the "all" colorname. Other standard color +names include "black", "color", "photo", "cyan", "magenta", "yellow", +"light-cyan", "light-magenta", "light-black", "light-gray", and "dark-gray".

Example:

@@ -90,12 +140,30 @@ colorname. Other standard color names include "black", "color", Clean all -

PrintSelfTestPage

+ +

PrintAlignmentPage

+ +

PrintAlignmentPage pass

+ +

The PrintAlignmentPage command prints a head alignment page on +the printer. The "pass" parameter provides a pass number from 1 to N. The number +of passes is device-dependent.

+ +

Example:

+ +
+#CUPS-COMMAND
+PrintAlignmentPage 1
+
+ + +

PrintSelfTestPage

PrintSelfTestPage

-

Print a self-test page on the printer. Typically this page -shows if all jets on a print head are functioning properly.

+

The PrintSelfTestPage command prints a self-test page on the +printer. Typically this page shows whether all jets on a print head are +functioning and that the print feed mechanisms are working properly.

Example:

@@ -104,5 +172,38 @@ shows if all jets on a print head are functioning properly.

PrintSelfTestPage + +

ReportLevels

+ +

ReportLevels

+ +

The ReportLevels command queries the supply levels on a printer +and reports "marker-colors", "marker-levels", "marker-names", and +"marker-types" attributes using "ATTR:" messages sent to the scheduler.

+ +

Example:

+ +
+#CUPS-COMMAND
+ReportLevels
+
+ + +

SetAlignment

+ +

SetAlignment pass value ... valueN

+ +

The SetAlignment command sets print head alignment values. The +"pass" parameter is a number from 1 to N. All parameters are +device-dependent.

+ +

Example:

+ +
+#CUPS-COMMAND
+SetAlignment 1 14
+
+ + diff --git a/doc/help/spec-ipp.html b/doc/help/spec-ipp.html index e5d0f37623..344ba67af9 100644 --- a/doc/help/spec-ipp.html +++ b/doc/help/spec-ipp.html @@ -2574,6 +2574,12 @@ to this printer. The default port monitor is "none".

The port-monitor-supported attribute specifies the available port monitors. +

printer-commands (1setOf Type3 keyword)CUPS 1.4

+ +

The printer-commands attribute specifies the commands that are supported +by the CUPS command file filter. The keyword "none" indicates that no commands +are supported.

+

printer-dns-sd-name (name(MAX) | noValue)CUPS 1.4

The printer-dns-sd-name attribute specifies the registered DNS-SD service diff --git a/doc/help/spec-ppd.html b/doc/help/spec-ppd.html index dc73164e05..435393a9ff 100644 --- a/doc/help/spec-ppd.html +++ b/doc/help/spec-ppd.html @@ -164,7 +164,7 @@ and resources permit.

-

cupsColorProfile

+

DeprecatedcupsColorProfile

*cupsColorProfile Resolution/MediaType: "density gamma m00 m01 m02 m10 m11 m12 m20 m21 m22"

@@ -208,6 +208,7 @@ function is applied after the CMY transformation:

*cupsColorProfile -/-: "0.9 2.0 1.0 0.0 -0.2 -0.4 1.0 0.0 -0.2 0.0 1.0" +

Mac OS X 10.3/CUPS 1.2cupsICCProfile

*cupsICCProfile @@ -1048,6 +1049,22 @@ will be ignored.

Also see the related APDuplexRequiresFlippedMargin attribute.

+

CUPS 1.4cupsCommands

+ +

*cupsCommands: "name name2 ... nameN"

+ +

This string attribute specifies the commands that are supported by the +CUPS command file filter for this device. The command names are separated +by whitespace.

+ +

Example:

+ +
+*% Specify the list of commands we support 
+*cupsCommands: "AutoConfigure Clean PrintSelfTestPage ReportLevels com.vendor.foo"
+
+ +

CUPS 1.3cupsEvenDuplex

*cupsEvenDuplex: boolean

@@ -1613,6 +1630,8 @@ the device.

  • Added cupsMarkerName attribute.
  • +
  • Added cupsCommands attribute.
  • + diff --git a/doc/help/whatsnew.html b/doc/help/whatsnew.html index d490f706af..7a6ed2745d 100644 --- a/doc/help/whatsnew.html +++ b/doc/help/whatsnew.html @@ -1,127 +1,212 @@ - What's New in CUPS 1.3 + What's New in CUPS 1.4 -

    CUPS 1.3 adds over 30 changes and new features to CUPS 1.2.x. -This page provides a high-level outline of these changes. If you -have never used CUPS before, read the "Overview of CUPS" document instead.

    +

    CUPS 1.4 adds over ?? 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 "Overview of CUPS" document instead.

    -

    Changes in CUPS 1.3

    +

    Commands

    -
    +
      -
      Networking
      -
        +
      1. lppasswd; the lppasswd program is no longer installed setuid by default.
      2. -
      3. Kerberos; CUPS now supports Kerberos authentication
      4. +
      5. cupsfilter; the cupsfilter program now supports filtering of already-queued print job files.
      6. -
      7. Mac OS X Authorization Services; CUPS now supports the Authorization Services framework, providing role-based access control in addition to the tradition UNIX model
      8. +
      9. ;
      10. -
      11. Peer Credentials; CUPS now supports authentication using peer credentials provided over UNiX domain sockets
      12. +
      13. ;
      14. -
      15. SNMP Support; SNMP lookups are no longer performed by default, and IPP is no longer used for discovered printers
      16. +
      17. ;
      18. -
      19. LPD Support; The LPD backend now supports a faster streaming mode that does not require a temporary file
      20. +
      -
    +

    Web Interface

    -
    Browsing
    -
      +
        -
      1. CUPS Browsing; The default configuration now shows shared printers from any address (not just @LOCAL)
      2. +
      3. Look-n-feel; the web interface has been given a new look with a new CUPS logo.
      4. -
      5. DNS-SD (Bonjour/Zeroconf) Support; CUPS - now supports printer sharing via DNS service discovery
      6. +
      7. Security; the web interface has been updated to require authentication for printing of test pages and RSS subscription operations.
      8. -
      9. LDAP w/SSL; CUPS now supports encrypted LDAP sessions
      10. +
      11. Printer sharing; the "share printer" and "unshare printer" buttons are now only shown when printer sharing is enabled in the scheduler.
      12. -
    +
  • Printer configuration; improvements have been made to the add and modify printer pages.
  • +
  • ;
  • -
    Web Interface
    -
      +
    1. ;
    2. -
    3. Internet Printer Sharing; You can now share printers over the Internet via the basic server settings
    4. +
    5. ;
    6. -
    7. Improved On-Line Help; Searching the on-line help now shows results for all text, not just headings and links
    8. +
    9. ;
    10. -
    11. Printer Setup; The available printer list is now only show when requested and the Add This Printer button now allows you to change the default name, location, and description
    12. +
    -
  • Printer Configuration; Raw printers and classes can now be configured using the Set Printer Options button
  • -
    +

    Networking

    +
      -
      IPP Support
      -
        +
      1. Bonjour (DNS-SD) printing support; a new mdns backend provides Bonjour-based printer discovery and the ipp, lpd, and socket backends now support Bonjour address resolution.
      2. -
      3. Job Printer Attributes; CUPS now provides job-printer-state-message and job-printer-state-reasons attributes containing copies of the corresponding printer attributes to provide important history information with each job
      4. +
      5. Bonjour (DNS-SD) perforance tuning; the scheduler now only uses a single file descriptor for printer sharing. It previously used one per printer.
      6. -
      7. PPD Operations and Attributes; The new CUPS_GET_PPD operation allows you to retrieve PPD files from the scheduler; also, CUPS_GET_PPDS now reports more information and supports more value filters
      8. +
      9. Bonjour (DNS-SD) web interface registry; when remote access is enabled, the scheduler registers the web interface for easier access
      10. -
      11. Printer Defaults; The document-forma-default, notify-events-default, and notify-lease-duration-default attributes can be set for each printer and class
      12. +
      13. SNMP-based monitoring; the ipp, lpd, and socket backends now report supply levels and printer status using SNMP queries.
      14. -
      15. PWG Printer Alert Support; CUPS now supports the printer-alert and printer-alert-description attributes
      16. +
      17. SNMP port monitor MIB; the ipp, lpd, snmp, and socket now support the PWG port monitor MIB
      18. -
      19. Server-Side Options; Server-side default options can now be retrieved using the "printer-defaults" group keyword
      20. +
      21. ;
      22. -
      +
    1. ;
    2. +
    -
    Scheduler
    -
      -
    1. Client Support; The scheduler now uses poll(), epoll(), or /dev/kqueue on platforms that provide them to support large numbers of clients
    2. +

      IPP Support

      -
    3. "Default" Authentication; You can now specify an AuthType of Default in locations and policies, which maps to the DefaultAuthType value
    4. +
        -
      1. Larger Numbers of Clients; The scheduler now uses poll(), epoll(), or /dev/kqueue instead of select() when possible
      2. +
      3. CUPS-Get-Document operation; the scheduler now supports a "get document" operation to download files from a print job.
      4. -
      5. New cupsctl Command; The new cupsctl command allows you to perform basic server configuration from the command-line
      6. +
      7. ;
      8. -
    +
  • ;
  • +
  • ;
  • -
    Printer Drivers
    -
      +
    1. ;
    2. -
    3. cupstestppd Improvements; The test utility now provides more extensive tests and options
    4. +
    5. ;
    6. -
    7. Label Printer Driver; Added support for the Intellibar label printers
    8. +
    -
  • Localized Printer Drivers; The CUPS sample drivers are now localized in several languages
  • -
  • PJL Support; New cupsPJLCharset attribute controls character set for PJL strings
  • +

    Scheduler

    -
  • Pre-Filter Support; Drivers can now register format-specific filters to pre-screen print jobs
  • +
      -
    1. Side-Channel API; This new API provides out-of-band control of devices
    2. +
    3. Performance tuning; the scheduler now coalesces configuration and state file changes to reduce the amount of disk activity.
    4. -
    +
  • Configuration files; the default cupsd.conf file now provides an "authenticated" policy for easy authenticated sharing of printers.
  • +
  • Seatbelt support; the scheduler now runs child processes using restrictive policies on Mac OS X for improved security and job isolation.
  • -
    CUPS API
    -
      +
    1. PAM support; the scheduler now sets more PAM attributes to better support third-party authentication schemes.
    2. -
    3. Administration API; New cupsAdminGetServerSettings() and cupsAdminSetServerSettings() functions
    4. +
    5. Test option; the scheduler now supports a test mode via the "-t" option.
    6. -
    7. Array API; New cupsArrayGetIndex(), cupsArrayGetInsert(), and cupsArrayNew2() functions
    8. +
    9. Page logging; the scheduler now supports a PageLogFormat directive to control the format of the page_log file.
    10. -
    11. Destination API; New cupsRemoveDest() and cupsSetDefaultDest() functions
    12. +
    13. ;
    14. -
    15. HTTP API; The http_t structure is now completely private
    16. +
    17. ;
    18. -
    19. PPD API; New ppdLocalizeIPPReason()function and greatly improved ppdConflicts() performance
    20. +
    21. ;
    22. -
    +
  • ;
  • +
  • ;
  • + + + + +

    Printer Drivers

    + +
      + +
    1. Dynamic PPD support; drivers can now set PPD keywords + dynamically using PPD: messages.
    2. + +
    3. Generic PostScript command filter; a new CUPS command file filter for PostScript printers provides auto-configuration, self-test page, and status and supply level reporting functions.
    4. + +
    5. PJL support; the cupsPJLDisplay PPD attribute controls the PJL commands used to display the current user and job on the printer.
    6. + +
    7. Driver development kit; the CUPS DDK is now a standard part of CUPS
    8. + +
    9. PPD compiler improvements; the PPD compiler now supports Mac OS X .strings files for localization and ...
    10. + +
    11. Generic PostScript and PCL drivers; new generic PostScript and PCL drivers provide improved support for laser printers.
    12. + +
    13. ;
    14. + +
    15. ;
    16. + +
    17. ;
    18. + +
    19. ;
    20. + +
    21. ;
    22. + +
    23. ;
    24. + +
    25. ;
    26. + +
    27. ;
    28. + +
    29. ;
    30. + +
    31. ;
    32. + +
    33. ;
    34. + +
    35. ;
    36. + +
    + + +

    Print Filters

    + +
      + +
    1. Image filters; the standard image filters now support image files larger than 2GB.
    2. + +
    3. Device discovery; the cups-deviced helper now runs backends in parallel for faster discovery and streams the results of discovery as the backends provide them.
    4. + +
    5. PDF filter; the pdftops filter has been replaced with a wrapper program that runs the Xpdf, poppler, or Ghostscript PDF to PostScript utilities.
    6. + +
    7. ;
    8. + +
    9. ;
    10. + +
    11. ;
    12. + +
    13. ;
    14. + +
    + + +

    CUPS API

    + +
      + +
    1. Streaming API; a new streaming request API provides asynchronous job creation and request submission.
    2. + +
    3. Device discovery; the new cupsGetDevices function streams discovered devices to an application-provided callback function.
    4. + +
    5. PPD support; two new functions are provided, cupsGetPPD3 and ppdLocalizeMarkerName, to update the local copy of a printers's PPD file and get a localized marker (supply) name, respectively.
    6. + +
    7. ;
    8. + +
    9. ;
    10. + +
    11. ;
    12. + +
    13. ;
    14. + +
    15. ;
    16. + +
    17. ;
    18. + +
    19. ;
    20. + +
    -
    diff --git a/man/Makefile b/man/Makefile index ee93d94cc8..c65314403d 100644 --- a/man/Makefile +++ b/man/Makefile @@ -218,7 +218,7 @@ html: $(MAN1) $(MAN5) $(MAN7) $(MAN8) mantohtml done mantohtml: mantohtml.o - $(CC) $(LDFLAGS) -o $@ mantohtml.o + $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ mantohtml.o # diff --git a/man/cupsd.conf.man.in b/man/cupsd.conf.man.in index 68ce70c472..19d747fb17 100644 --- a/man/cupsd.conf.man.in +++ b/man/cupsd.conf.man.in @@ -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 cupsd.conf 5 "Common UNIX Printing System" "2 January 2008" "Apple Inc." +.TH cupsd.conf 5 "Common UNIX Printing System" "15 May 2008" "Apple Inc." .SH NAME cupsd.conf \- server configuration file for cups .SH DESCRIPTION @@ -453,6 +453,10 @@ PageLog syslog .br Specifies the page log filename. .TP 5 +PageLogFormat format string +.br +Specifies the format of page log lines. +.TP 5 PassEnv variable [... variable] .br Passes the specified environment variable(s) to child processes. diff --git a/scheduler/client.c b/scheduler/client.c index 8a37842c78..136b1f4fc8 100644 --- a/scheduler/client.c +++ b/scheduler/client.c @@ -2797,7 +2797,8 @@ cupsdWriteClient(cupsd_client_t *con) /* I - Client connection */ return; } - httpFlushWrite(HTTP(con)); + if (con->http.data_encoding == HTTP_ENCODE_CHUNKED) + httpFlushWrite(HTTP(con)); con->bytes += bytes; diff --git a/scheduler/conf.c b/scheduler/conf.c index de4d98adc5..29e43f7859 100644 --- a/scheduler/conf.c +++ b/scheduler/conf.c @@ -146,6 +146,7 @@ static const cupsd_var_t variables[] = { "MaxSubscriptionsPerPrinter",&MaxSubscriptionsPerPrinter, CUPSD_VARTYPE_INTEGER }, { "MaxSubscriptionsPerUser", &MaxSubscriptionsPerUser, CUPSD_VARTYPE_INTEGER }, { "PageLog", &PageLog, CUPSD_VARTYPE_STRING }, + { "PageLogFormat", &PageLogFormat, CUPSD_VARTYPE_STRING }, { "PreserveJobFiles", &JobFiles, CUPSD_VARTYPE_BOOLEAN }, { "PreserveJobHistory", &JobHistory, CUPSD_VARTYPE_BOOLEAN }, { "Printcap", &Printcap, CUPSD_VARTYPE_STRING }, @@ -413,6 +414,9 @@ cupsdReadConfiguration(void) cupsdSetString(&AccessLog, CUPS_LOGDIR "/access_log"); cupsdSetString(&ErrorLog, CUPS_LOGDIR "/error_log"); cupsdSetString(&PageLog, CUPS_LOGDIR "/page_log"); + cupsdSetString(&PageLogFormat, + "%p %j %u %T %P %C %{job-billing} " + "%{job-originating-host-name} %{job-name} %{media} %{sides}"); cupsdSetString(&Printcap, CUPS_DEFAULT_PRINTCAP); cupsdSetString(&PrintcapGUI, "/usr/bin/glpoptions"); cupsdSetString(&FontPath, CUPS_FONTPATH); diff --git a/scheduler/conf.h b/scheduler/conf.h index 30f87f64cc..2a91e5ceb8 100644 --- a/scheduler/conf.h +++ b/scheduler/conf.h @@ -175,6 +175,8 @@ VAR cups_file_t *AccessFile VALUE(NULL), /* Error log file */ *PageFile VALUE(NULL); /* Page log file */ +VAR char *PageLogFormat VALUE(NULL); + /* Page log format */ VAR mime_t *MimeDatabase VALUE(NULL); /* MIME type database */ VAR int NumMimeTypes VALUE(0); diff --git a/scheduler/ipp.c b/scheduler/ipp.c index 23f55f5628..2a223570ed 100644 --- a/scheduler/ipp.c +++ b/scheduler/ipp.c @@ -3032,14 +3032,19 @@ apple_register_profiles( selector[PPD_MAX_NAME]; /* Profile selection string */ ppd_file_t *ppd; /* PPD file */ - ppd_attr_t *attr, /* cupsICCProfile attributes */ - *profileid_attr;/* cupsProfileID attribute */ + ppd_attr_t *attr, /* Profile attributes */ + *profileid_attr,/* cupsProfileID attribute */ + *q1_attr, /* ColorModel (or other) qualifier */ + *q2_attr, /* MediaType (or other) qualifier */ + *q3_attr; /* Resolution (or other) qualifier */ + char q_keyword[PPD_MAX_NAME]; + /* Qualifier keyword */ + const char *q1_choice, /* ColorModel (or other) choice */ + *q2_choice, /* MediaType (or other) choice */ + *q3_choice; /* Resolution (or other) choice */ const char *profile_key; /* Profile keyword */ ppd_option_t *cm_option; /* Color model option */ - ppd_choice_t *cm_choice, /* Color model choice */ - *q1_choice, /* ColorModel (or other) qualifier */ - *q2_choice, /* MediaType (or other) qualifier */ - *q3_choice; /* Resolution (or other) qualifier */ + ppd_choice_t *cm_choice; /* Color model choice */ int num_profiles; /* Number of profiles */ CMError error; /* Last error */ unsigned device_id, /* Printer device ID */ @@ -3073,8 +3078,6 @@ apple_register_profiles( if ((ppd = ppdOpenFile(ppdfile)) == NULL) return; - ppdMarkDefaults(ppd); - /* * See if we have any profiles... */ @@ -3109,27 +3112,67 @@ apple_register_profiles( if (num_profiles > 0) { - /* - * Figure out the default profile selectors... - */ + if (profile_key[0] == 'A') + { + /* + * For Tioga PPDs, get the default profile using the DefaultAPTiogaProfile + * attribute... + */ - if ((attr = ppdFindAttr(ppd, "cupsICCQualifier1", NULL)) != NULL && - attr->value && attr->value[0]) - q1_choice = ppdFindMarkedChoice(ppd, attr->value); - else - q1_choice = ppdFindMarkedChoice(ppd, "ColorModel"); + if ((attr = ppdFindAttr(ppd, "DefaultAPTiogaProfile", NULL)) != NULL && + attr->value) + default_profile_id = atoi(attr->value); - if ((attr = ppdFindAttr(ppd, "cupsICCQualifier2", NULL)) != NULL && - attr->value && attr->value[0]) - q2_choice = ppdFindMarkedChoice(ppd, attr->value); + q1_choice = q2_choice = q3_choice = NULL; + } else - q2_choice = ppdFindMarkedChoice(ppd, "MediaType"); + { + /* + * For CUPS PPDs, figure out the default profile selector values... + */ - if ((attr = ppdFindAttr(ppd, "cupsICCQualifier3", NULL)) != NULL && - attr->value && attr->value[0]) - q3_choice = ppdFindMarkedChoice(ppd, attr->value); - else - q3_choice = ppdFindMarkedChoice(ppd, "Resolution"); + if ((attr = ppdFindAttr(ppd, "cupsICCQualifier1", NULL)) != NULL && + attr->value && attr->value[0]) + { + snprintf(q_keyword, sizeof(q_keyword), "Default%s", attr->value); + q1_attr = ppdFindAttr(ppd, q_keyword, NULL); + } + else if ((q1_attr = ppdFindAttr(ppd, "DefaultColorModel", NULL)) == NULL) + q1_attr = ppdFindAttr(ppd, "DefaultColorSpace", NULL); + + if (q1_attr && q1_attr->value && q1_attr->value[0]) + q1_choice = q1_attr->value; + else + q1_choice = ""; + + if ((attr = ppdFindAttr(ppd, "cupsICCQualifier2", NULL)) != NULL && + attr->value && attr->value[0]) + { + snprintf(q_keyword, sizeof(q_keyword), "Default%s", attr->value); + q2_attr = ppdFindAttr(ppd, q_keyword, NULL); + } + else + q2_attr = ppdFindAttr(ppd, "DefaultMediaType", NULL); + + if (q2_attr && q2_attr->value && q2_attr->value[0]) + q2_choice = q2_attr->value; + else + q2_choice = NULL; + + if ((attr = ppdFindAttr(ppd, "cupsICCQualifier3", NULL)) != NULL && + attr->value && attr->value[0]) + { + snprintf(q_keyword, sizeof(q_keyword), "Default%s", attr->value); + q3_attr = ppdFindAttr(ppd, q_keyword, NULL); + } + else + q3_attr = ppdFindAttr(ppd, "DefaultResolution", NULL); + + if (q3_attr && q3_attr->value && q3_attr->value[0]) + q3_choice = q3_attr->value; + else + q3_choice = NULL; + } /* * Build the array of profiles... @@ -3193,22 +3236,22 @@ apple_register_profiles( * See if this is the default profile... */ - if (!default_profile_id && q1_choice) + if (!default_profile_id) { if (q2_choice) { if (q3_choice) { snprintf(selector, sizeof(selector), "%s.%s.%s", - q1_choice->choice, q2_choice->choice, q3_choice->choice); + q1_choice, q2_choice, q3_choice); if (!strcmp(selector, attr->spec)) default_profile_id = profile_id; } if (!default_profile_id) { - snprintf(selector, sizeof(selector), "%s.%s.", q1_choice->choice, - q2_choice->choice); + snprintf(selector, sizeof(selector), "%s.%s.", q1_choice, + q2_choice); if (!strcmp(selector, attr->spec)) default_profile_id = profile_id; } @@ -3216,15 +3259,15 @@ apple_register_profiles( if (!default_profile_id && q3_choice) { - snprintf(selector, sizeof(selector), "%s..%s", q1_choice->choice, - q3_choice->choice); + snprintf(selector, sizeof(selector), "%s..%s", q1_choice, + q3_choice); if (!strcmp(selector, attr->spec)) default_profile_id = profile_id; } if (!default_profile_id) { - snprintf(selector, sizeof(selector), "%s..", q1_choice->choice); + snprintf(selector, sizeof(selector), "%s..", q1_choice); if (!strcmp(selector, attr->spec)) default_profile_id = profile_id; } @@ -5760,8 +5803,10 @@ create_requested_array(ipp_t *request) /* I - IPP request */ cupsArrayAdd(ra, "pdl-override-supported"); cupsArrayAdd(ra, "printer-alert"); cupsArrayAdd(ra, "printer-alert-description"); + cupsArrayAdd(ra, "printer-commands"); cupsArrayAdd(ra, "printer-current-time"); cupsArrayAdd(ra, "printer-driver-installer"); + cupsArrayAdd(ra, "printer-dns-sd-name"); cupsArrayAdd(ra, "printer-info"); cupsArrayAdd(ra, "printer-is-accepting-jobs"); cupsArrayAdd(ra, "printer-location"); @@ -5773,6 +5818,7 @@ create_requested_array(ipp_t *request) /* I - IPP request */ cupsArrayAdd(ra, "printer-state"); cupsArrayAdd(ra, "printer-state-message"); cupsArrayAdd(ra, "printer-state-reasons"); + cupsArrayAdd(ra, "printer-type"); cupsArrayAdd(ra, "printer-up-time"); cupsArrayAdd(ra, "printer-uri-supported"); cupsArrayAdd(ra, "queued-job-count"); @@ -7823,7 +7869,7 @@ hold_job(cupsd_client_t *con, /* I - Client connection */ cupsdHoldJob(job); - cupsdAddEvent(CUPSD_EVENT_JOB_STATE, job->printer, job, + cupsdAddEvent(CUPSD_EVENT_JOB_STATE, cupsdFindDest(job->dest), job, "Job held by user."); if ((newattr = ippFindAttribute(con->request, "job-hold-until", @@ -7860,7 +7906,7 @@ hold_job(cupsd_client_t *con, /* I - Client connection */ cupsdSetJobHoldUntil(job, attr->values[0].string.text); - cupsdAddEvent(CUPSD_EVENT_JOB_CONFIG_CHANGED, job->printer, job, + cupsdAddEvent(CUPSD_EVENT_JOB_CONFIG_CHANGED, cupsdFindDest(job->dest), job, "Job job-hold-until value changed by user."); } @@ -8836,7 +8882,7 @@ release_job(cupsd_client_t *con, /* I - Client connection */ attr->value_tag = IPP_TAG_KEYWORD; attr->values[0].string.text = _cupsStrAlloc("no-hold"); - cupsdAddEvent(CUPSD_EVENT_JOB_CONFIG_CHANGED, job->printer, job, + cupsdAddEvent(CUPSD_EVENT_JOB_CONFIG_CHANGED, cupsdFindDest(job->dest), job, "Job job-hold-until value changed by user."); } @@ -8846,7 +8892,7 @@ release_job(cupsd_client_t *con, /* I - Client connection */ cupsdReleaseJob(job); - cupsdAddEvent(CUPSD_EVENT_JOB_STATE, job->printer, job, + cupsdAddEvent(CUPSD_EVENT_JOB_STATE, cupsdFindDest(job->dest), job, "Job released by user."); cupsdLogMessage(CUPSD_LOG_INFO, "[Job %d] Released by \"%s\".", jobid, @@ -10208,16 +10254,17 @@ set_job_attrs(cupsd_client_t *con, /* I - Client connection */ */ if (event & CUPSD_EVENT_PRINTER_QUEUE_ORDER_CHANGED) - cupsdAddEvent(CUPSD_EVENT_PRINTER_QUEUE_ORDER_CHANGED, job->printer, job, + cupsdAddEvent(CUPSD_EVENT_PRINTER_QUEUE_ORDER_CHANGED, + cupsdFindDest(job->dest), job, "Job priority changed by user."); if (event & CUPSD_EVENT_JOB_STATE) - cupsdAddEvent(CUPSD_EVENT_JOB_STATE, job->printer, job, + cupsdAddEvent(CUPSD_EVENT_JOB_STATE, cupsdFindDest(job->dest), job, job->state_value == IPP_JOB_HELD ? "Job held by user." : "Job restarted by user."); if (event & CUPSD_EVENT_JOB_CONFIG_CHANGED) - cupsdAddEvent(CUPSD_EVENT_JOB_CONFIG_CHANGED, job->printer, job, + cupsdAddEvent(CUPSD_EVENT_JOB_CONFIG_CHANGED, cupsdFindDest(job->dest), job, "Job options changed by user."); /* diff --git a/scheduler/job.c b/scheduler/job.c index 5795a881e5..85427be64b 100644 --- a/scheduler/job.c +++ b/scheduler/job.c @@ -3836,7 +3836,9 @@ update_job(cupsd_job_t *job) /* I - Job to check */ strlcpy(job->printer->state_message, message, sizeof(job->printer->state_message)); cupsdAddPrinterHistory(job->printer); - event |= CUPSD_EVENT_PRINTER_STATE; + + if (loglevel < CUPSD_LOG_INFO) + event |= CUPSD_EVENT_PRINTER_STATE; update_job_attrs(job); } diff --git a/scheduler/log.c b/scheduler/log.c index 698f5eb709..4a21b0856b 100644 --- a/scheduler/log.c +++ b/scheduler/log.c @@ -338,14 +338,160 @@ int /* O - 1 on success, 0 on error */ cupsdLogPage(cupsd_job_t *job, /* I - Job being printed */ const char *page) /* I - Page being printed */ { - ipp_attribute_t *billing, /* job-billing attribute */ - *hostname; /* job-originating-host-name attribute */ + int i; /* Looping var */ + char buffer[2048], /* Buffer for page log */ + *bufptr, /* Pointer into buffer */ + name[256]; /* Attribute name */ + const char *format, /* Pointer into PageLogFormat */ + *nameend; /* End of attribute name */ + ipp_attribute_t *attr; /* Current attribute */ + int number; /* Page number */ + char copies[256]; /* Number of copies */ - billing = ippFindAttribute(job->attrs, "job-billing", IPP_TAG_ZERO); - hostname = ippFindAttribute(job->attrs, "job-originating-host-name", - IPP_TAG_ZERO); + /* + * Format the line going into the page log... + */ + + if (!PageLogFormat) + return (1); + + number = 1; + strcpy(copies, "1"); + sscanf(page, "%d%255s", &number, copies); + + for (format = PageLogFormat, bufptr = buffer; *format; format ++) + { + if (*format == '%') + { + format ++; + + switch (*format) + { + case '%' : /* Literal % */ + if (bufptr < (buffer + sizeof(buffer) - 1)) + *bufptr++ = '%'; + break; + + case 'p' : /* Printer name */ + strlcpy(bufptr, job->printer->name, + sizeof(buffer) - (bufptr - buffer)); + bufptr += strlen(bufptr); + break; + + case 'j' : /* Job ID */ + snprintf(bufptr, sizeof(buffer) - (bufptr - buffer), "%d", job->id); + bufptr += strlen(bufptr); + break; + + case 'u' : /* Username */ + strlcpy(bufptr, job->username ? job->username : "-", + sizeof(buffer) - (bufptr - buffer)); + bufptr += strlen(bufptr); + break; + + case 'T' : /* Date and time */ + strlcpy(bufptr, cupsdGetDateTime(time(NULL)), + sizeof(buffer) - (bufptr - buffer)); + bufptr += strlen(bufptr); + break; + + case 'P' : /* Page number */ + snprintf(bufptr, sizeof(buffer) - (bufptr - buffer), "%d", number); + bufptr += strlen(bufptr); + break; + + case 'C' : /* Number of copies */ + strlcpy(bufptr, copies, sizeof(buffer) - (bufptr - buffer)); + bufptr += strlen(bufptr); + break; + + case '{' : /* {attribute} */ + if ((nameend = strchr(format, '}')) != NULL && + (nameend - format - 2) < (sizeof(name) - 1)) + { + /* + * Pull the name from inside the brackets... + */ + + memcpy(name, format + 1, nameend - format - 2); + name[nameend - format - 2] = '\0'; + + if ((attr = ippFindAttribute(job->attrs, name, + IPP_TAG_ZERO)) != NULL) + { + /* + * Add the attribute value... + */ + + format = nameend; + + for (i = 0; + i < attr->num_values && + bufptr < (buffer + sizeof(buffer) - 1); + i ++) + { + if (i) + *bufptr++ = ','; + + switch (attr->value_tag) + { + case IPP_TAG_INTEGER : + case IPP_TAG_ENUM : + snprintf(bufptr, sizeof(buffer) - (bufptr - buffer), + "%d", attr->values[i].integer); + bufptr += strlen(bufptr); + break; + + case IPP_TAG_BOOLEAN : + snprintf(bufptr, sizeof(buffer) - (bufptr - buffer), + "%d", attr->values[i].boolean); + bufptr += strlen(bufptr); + break; + + case IPP_TAG_TEXTLANG : + case IPP_TAG_NAMELANG : + case IPP_TAG_TEXT : + case IPP_TAG_NAME : + case IPP_TAG_KEYWORD : + case IPP_TAG_URI : + case IPP_TAG_URISCHEME : + case IPP_TAG_CHARSET : + case IPP_TAG_LANGUAGE : + case IPP_TAG_MIMETYPE : + strlcpy(bufptr, attr->values[i].string.text, + sizeof(buffer) - (bufptr - buffer)); + bufptr += strlen(bufptr); + break; + + default : + strlcpy(bufptr, "???", + sizeof(buffer) - (bufptr - buffer)); + bufptr += strlen(bufptr); + break; + } + } + } + else if (bufptr < (buffer + sizeof(buffer) - 1)) + *bufptr++ = '-'; + break; + } + + default : + if (bufptr < (buffer + sizeof(buffer) - 2)) + { + *bufptr++ = '%'; + *bufptr++ = *format; + } + break; + } + } + else if (bufptr < (buffer + sizeof(buffer) - 1)) + *bufptr++ = *format; + } + *bufptr = '\0'; + #ifdef HAVE_VSYSLOG /* * See if we are logging pages via syslog... @@ -353,10 +499,7 @@ cupsdLogPage(cupsd_job_t *job, /* I - Job being printed */ if (!strcmp(PageLog, "syslog")) { - syslog(LOG_INFO, "PAGE %s %s %d %s %s %s", job->printer->name, - job->username ? job->username : "-", - job->id, page, billing ? billing->values[0].string.text : "-", - hostname->values[0].string.text); + syslog(LOG_INFO, "%s", buffer); return (1); } @@ -376,11 +519,7 @@ cupsdLogPage(cupsd_job_t *job, /* I - Job being printed */ * billing hostname */ - cupsFilePrintf(PageFile, "%s %s %d %s %s %s %s\n", job->printer->name, - job->username ? job->username : "-", - job->id, cupsdGetDateTime(time(NULL)), page, - billing ? billing->values[0].string.text : "-", - hostname->values[0].string.text); + cupsFilePrintf(PageFile, "%s\n", buffer); cupsFileFlush(PageFile); return (1); diff --git a/scheduler/printers.c b/scheduler/printers.c index 640f02ac28..ce03647b48 100644 --- a/scheduler/printers.c +++ b/scheduler/printers.c @@ -1816,6 +1816,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */ { /* No authentication */ "none" }; + static const char * const standard_commands[] = + { /* Standard CUPS commands */ + "AutoConfigure", + "Clean", + "PrintSelfTestPage", + "ReportLevels" + }; DEBUG_printf(("cupsdSetPrinterAttrs: entering name = %s, type = %x\n", p->name, @@ -2308,6 +2315,88 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */ p->type |= CUPS_PRINTER_COMMANDS; } + if (p->type & CUPS_PRINTER_COMMANDS) + { + char *commands, /* Copy of commands */ + *start, /* Start of name */ + *end; /* End of name */ + int count; /* Number of commands */ + + + if ((ppdattr = ppdFindAttr(ppd, "cupsCommands", NULL)) != NULL && + ppdattr->value && ppdattr->value[0]) + { + for (count = 0, start = ppdattr->value; *start; count ++) + { + while (isspace(*start & 255)) + start ++; + + if (!*start) + break; + + while (*start && !isspace(*start & 255)) + start ++; + } + } + else + count = 0; + + if (count > 0) + { + /* + * Make a copy of the commands string and count how many ... + */ + + attr = ippAddStrings(p->attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, + "printer-commands", count, NULL, NULL); + + commands = strdup(ppdattr->value); + + for (count = 0, start = commands; *start; count ++) + { + while (isspace(*start & 255)) + start ++; + + if (!*start) + break; + + end = start; + while (*end && !isspace(*end & 255)) + end ++; + + if (*end) + *end++ = '\0'; + + attr->values[count].string.text = _cupsStrAlloc(start); + + start = end; + } + + free(commands); + } + else + { + /* + * Add the standard list of commands... + */ + + ippAddStrings(p->attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, + "printer-commands", + (int)(sizeof(standard_commands) / + sizeof(standard_commands[0])), NULL, + standard_commands); + } + } + else + { + /* + * No commands supported... + */ + + ippAddString(p->attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, + "printer-commands", NULL, "none"); + } + /* * Show current and available port monitors for this printer... */ diff --git a/templates/help-header.tmpl b/templates/help-header.tmpl index 68833c0ad1..cb9fe68bac 100644 --- a/templates/help-header.tmpl +++ b/templates/help-header.tmpl @@ -37,11 +37,11 @@ above or click on any of the documentation links to display on-line help information.

    If you are new to CUPS, read the "Overview of CUPS" page. Veteran users -should read the "What's New in CUPS -1.3" page.

    +href="/help/overview.html">Overview of CUPS" page. Veteran users +should read the "What's New in CUPS +1.4" page.

    -

    The CUPS Home Page also +

    The CUPS home page also provides many resources including user discussion forums, answers to frequently-asked questions, and a form for submitting bug reports and feature requests.

    }