]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Sync up documentation and other changes from libcups.
authorMichael R Sweet <msweet@msweet.org>
Tue, 21 Oct 2025 20:38:24 +0000 (16:38 -0400)
committerMichael R Sweet <msweet@msweet.org>
Tue, 21 Oct 2025 20:38:24 +0000 (16:38 -0400)
cups/http-addr.c
cups/http-support.c
cups/ipp-support.c
cups/ipp.c

index 3953f25be1e2fb9cf289e8e20a2c88d727981e22..3862be7ffe24423c203f044fc5cbe475302cdaa8 100644 (file)
@@ -80,6 +80,30 @@ httpAddrEqual(const http_addr_t *addr1,      // I - First address
 }
 
 
+//
+// 'httpAddrIsAny()' - Check for the "any" address.
+//
+// @since CUPS 2.5@
+//
+
+bool                                   // O - `true` if "any" address, `false` otherwise
+httpAddrIsAny(const http_addr_t *addr) // I - Address to check
+{
+  if (!addr)
+    return (false);
+
+#ifdef AF_INET6
+  if (addr->addr.sa_family == AF_INET6 && IN6_IS_ADDR_UNSPECIFIED(&(addr->ipv6.sin6_addr)))
+    return (true);
+#endif // AF_INET6
+
+  if (addr->addr.sa_family == AF_INET && ntohl(addr->ipv4.sin_addr.s_addr) == 0x00000000)
+    return (true);
+
+  return (false);
+}
+
+
 //
 // 'httpAddrIsEqual()' - Compare two addresses.
 //
@@ -114,30 +138,6 @@ httpAddrIsEqual(
 }
 
 
-//
-// 'httpAddrIsAny()' - Check for the "any" address.
-//
-// @since CUPS 2.5@
-//
-
-bool                                   // O - `true` if "any" address, `false` otherwise
-httpAddrIsAny(const http_addr_t *addr) // I - Address to check
-{
-  if (!addr)
-    return (false);
-
-#ifdef AF_INET6
-  if (addr->addr.sa_family == AF_INET6 && IN6_IS_ADDR_UNSPECIFIED(&(addr->ipv6.sin6_addr)))
-    return (true);
-#endif // AF_INET6
-
-  if (addr->addr.sa_family == AF_INET && ntohl(addr->ipv4.sin_addr.s_addr) == 0x00000000)
-    return (true);
-
-  return (false);
-}
-
-
 //
 // 'httpAddrLength()' - Return the length of the address in bytes.
 //
@@ -228,10 +228,10 @@ httpAddrListen(http_addr_t *addr, // I - Address to bind to
     // Remove any existing domain socket file...
     if ((status = unlink(addr->un.sun_path)) < 0)
     {
-      DEBUG_printf("1httpAddrListen: Unable to unlink \"%s\": %s", addr->un.sun_path, strerror(errno));
-
       if (errno == ENOENT)
        status = 0;
+      else
+       DEBUG_printf("1httpAddrListen: Unable to unlink \"%s\": %s", addr->un.sun_path, strerror(errno));
     }
 
     if (!status)
@@ -242,9 +242,7 @@ httpAddrListen(http_addr_t *addr,   // I - Address to bind to
 
       // Bind the domain socket...
       if ((status = bind(fd, (struct sockaddr *)addr, (socklen_t)httpAddrLength(addr))) < 0)
-      {
        DEBUG_printf("1httpAddrListen: Unable to bind domain socket \"%s\": %s", addr->un.sun_path, strerror(errno));
-      }
 
       // Restore the umask...
       umask(mask);
@@ -255,11 +253,13 @@ httpAddrListen(http_addr_t *addr, // I - Address to bind to
   {
     httpAddrSetPort(addr, port);
 
-    status = bind(fd, (struct sockaddr *)addr, (socklen_t)httpAddrLength(addr));
+    if ((status = bind(fd, (struct sockaddr *)addr, (socklen_t)httpAddrLength(addr))) < 0)
+      DEBUG_printf("1httpAddrListen: Unable to bind network socket: %s", strerror(errno));
   }
 
   if (status)
   {
+    DEBUG_printf("1httpAddrListen: Unable to listen on socket: %s", strerror(errno));
     _cupsSetError(IPP_STATUS_ERROR_INTERNAL, strerror(errno), 0);
 
     close(fd);
@@ -818,7 +818,7 @@ httpGetHostname(http_t *http,               // I - HTTP connection or NULL
 
 const char *                           // O - Resolved hostname or `NULL`
 httpResolveHostname(http_t *http,      // I - HTTP connection
-                    char   *buffer,    // I - Hostname buffer
+                    char   *buffer,    // I - Hostname buffer or `NULL` to use HTTP buffer
                     size_t bufsize)    // I - Size of buffer
 {
   if (!http)
index 0a195b310c36b014dd277b450e4e9f01781c4fa0..331aaa3216785246264a6d8d8aa93d3556236295 100644 (file)
@@ -204,8 +204,8 @@ httpAssembleURI(
        }
        else
        {
-          goto assemble_overflow;
-        }
+         goto assemble_overflow;
+       }
       }
       else
       {
@@ -406,7 +406,7 @@ httpAssembleUUID(const char *server,        // I - Server name
   //
   // Start with the MD5 sum of the server, port, object name and
   // number, and some random data on the end.
-  snprintf(data, sizeof(data), "%s:%d:%s:%d:%04x:%04x", server, port, name ? name : server, number, (unsigned)CUPS_RAND() & 0xffff, (unsigned)CUPS_RAND() & 0xffff);
+  snprintf(data, sizeof(data), "%s:%d:%s:%d:%04x:%04x", server, port, name ? name : server, number, (unsigned)cupsGetRand() & 0xffff, (unsigned)cupsGetRand() & 0xffff);
 
   cupsHashData("md5", (unsigned char *)data, strlen(data), md5sum, sizeof(md5sum));
 
@@ -625,7 +625,7 @@ httpEncode64_2(char       *out,             // I - String to write to
 // 'httpEncode64_3()' - Base64-encode a string.
 //
 // This function encodes a Base64 string as defined by RFC 4648.  The "url"
-// parameter controls whether the original Base64 ("url" = `false`) or the
+// argument controls whether the original Base64 ("url" = `false`) or the
 // Base64url ("url" = `true`) alphabet is used.
 //
 // @since CUPS 2.5@
@@ -1195,7 +1195,7 @@ _httpSetDigestAuthString(
     DEBUG_puts("3_httpSetDigestAuthString: Follow RFC 2617/7616...");
 
     for (i = 0; i < 64; i ++)
-      cnonce[i] = "0123456789ABCDEF"[CUPS_RAND() & 15];
+      cnonce[i] = "0123456789ABCDEF"[cupsGetRand() & 15];
     cnonce[64] = '\0';
 
     if (!_cups_strcasecmp(http->qop, "auth"))
@@ -1429,8 +1429,8 @@ httpStatus(http_status_t status)  // I - HTTP status code
 //
 // 'httpStatusString()' - Return a short string describing a HTTP status code.
 //
-// The returned string is localized to the current POSIX locale and is based
-// on the status strings defined in RFC 7231.
+// This function returns a short (localized) string describing a HTTP status
+// code.  The strings are taken from the IANA HTTP Status Code registry.
 //
 // @since CUPS 2.5@
 //
@@ -1450,6 +1450,9 @@ httpStatusString(http_status_t status)    // I - HTTP status code
 //
 // 'httpURIStatusString()' - Return a string describing a URI status code.
 //
+// This function returns a short (localized) string describing a URI status
+// value.
+//
 // @since CUPS 2.0/OS 10.10@
 //
 
@@ -1573,13 +1576,13 @@ _httpEncodeURI(char       *dst,         // I - Destination buffer
 //
 // This function resolves a DNS-SD URI of the form
 // "scheme://service-instance-name._protocol._tcp.domain/...".  The "options"
-// parameter specifies a bitfield of resolution options including:
+// argument specifies a bitfield of resolution options including:
 //
 // - `HTTP_RESOLVE_DEFAULT`: Use default options
 // - `HTTP_RESOLVE_FQDN`: Resolve the fully-qualified domain name instead of an IP address
 // - `HTTP_RESOLVE_FAXOUT`: Resolve the FaxOut service instead of Print (IPP/IPPS)
 //
-// The "cb" parameter specifies a callback that allows resolution to be
+// The "cb" argument specifies a callback that allows resolution to be
 // terminated.  The callback is provided the "cb_data" value and returns a
 // `bool` value that is `true` to continue and `false` to stop.  If no callback
 // is specified ("cb" is `NULL`), then this function will block up to 90 seconds
index 0f873a459a743d642b688d57e6c231297a950d8d..dec65e98c21c5025701eb7420e207359989f675c 100644 (file)
 // Local globals...
 //
 
-static const char * const ipp_states[] =
-               {
-                 "IPP_STATE_ERROR",
-                 "IPP_STATE_IDLE",
-                 "IPP_STATE_HEADER",
-                 "IPP_STATE_ATTRIBUTE",
-                 "IPP_STATE_DATA"
-               };
-static const char * const ipp_status_oks[] =   // "OK" status codes
-               {                               // (name) = abandoned standard value
-                 "successful-ok",
-                 "successful-ok-ignored-or-substituted-attributes",
-                 "successful-ok-conflicting-attributes",
-                 "successful-ok-ignored-subscriptions",
-                 "(successful-ok-ignored-notifications)",
-                 "successful-ok-too-many-events",
-                 "(successful-ok-but-cancel-subscription)",
-                 "successful-ok-events-complete"
-               },
-               * const ipp_status_400s[] =     // Client errors
-               {                               // (name) = abandoned standard value
-                 "client-error-bad-request",
-                 "client-error-forbidden",
-                 "client-error-not-authenticated",
-                 "client-error-not-authorized",
-                 "client-error-not-possible",
-                 "client-error-timeout",
-                 "client-error-not-found",
-                 "client-error-gone",
-                 "client-error-request-entity-too-large",
-                 "client-error-request-value-too-long",
-                 "client-error-document-format-not-supported",
-                 "client-error-attributes-or-values-not-supported",
-                 "client-error-uri-scheme-not-supported",
-                 "client-error-charset-not-supported",
-                 "client-error-conflicting-attributes",
-                 "client-error-compression-not-supported",
-                 "client-error-compression-error",
-                 "client-error-document-format-error",
-                 "client-error-document-access-error",
-                 "client-error-attributes-not-settable",
-                 "client-error-ignored-all-subscriptions",
-                 "client-error-too-many-subscriptions",
-                 "(client-error-ignored-all-notifications)",
-                 "(client-error-client-print-support-file-not-found)",
-                 "client-error-document-password-error",
-                 "client-error-document-permission-error",
-                 "client-error-document-security-error",
-                 "client-error-document-unprintable-error",
-                 "client-error-account-info-needed",
-                 "client-error-account-closed",
-                 "client-error-account-limit-reached",
-                 "client-error-account-authorization-failed",
-                 "client-error-not-fetchable"
-               },
-               * const ipp_status_480s[] =     // Vendor client errors
-               {
-                 // 0x0480 - 0x048F
-                 "0x0480",
-                 "0x0481",
-                 "0x0482",
-                 "0x0483",
-                 "0x0484",
-                 "0x0485",
-                 "0x0486",
-                 "0x0487",
-                 "0x0488",
-                 "0x0489",
-                 "0x048A",
-                 "0x048B",
-                 "0x048C",
-                 "0x048D",
-                 "0x048E",
-                 "0x048F",
-                 // 0x0490 - 0x049F
-                 "0x0490",
-                 "0x0491",
-                 "0x0492",
-                 "0x0493",
-                 "0x0494",
-                 "0x0495",
-                 "0x0496",
-                 "0x0497",
-                 "0x0498",
-                 "0x0499",
-                 "0x049A",
-                 "0x049B",
-                 "cups-error-account-info-needed",
-                 "cups-error-account-closed",
-                 "cups-error-account-limit-reached",
-                 "cups-error-account-authorization-failed"
-               },
-               * const ipp_status_500s[] =             // Server errors
-               {
-                 "server-error-internal-error",
-                 "server-error-operation-not-supported",
-                 "server-error-service-unavailable",
-                 "server-error-version-not-supported",
-                 "server-error-device-error",
-                 "server-error-temporary-error",
-                 "server-error-not-accepting-jobs",
-                 "server-error-busy",
-                 "server-error-job-canceled",
-                 "server-error-multiple-document-jobs-not-supported",
-                 "server-error-printer-is-deactivated",
-                 "server-error-too-many-jobs",
-                 "server-error-too-many-documents"
-               },
-               * const ipp_status_1000s[] =            // CUPS internal
-               {
-                 "cups-authentication-canceled",
-                 "cups-pki-error",
-                 "cups-upgrade-required",
-                 "cups-oauth"
-               };
+static const char * const ipp_states[] =// ipp_state_t strings
+{
+  "IPP_STATE_ERROR",
+  "IPP_STATE_IDLE",
+  "IPP_STATE_HEADER",
+  "IPP_STATE_ATTRIBUTE",
+  "IPP_STATE_DATA"
+};
+static const char * const ipp_status_oks[] =
+{                                      // "OK" status codes; (name) = abandoned
+  "successful-ok",
+  "successful-ok-ignored-or-substituted-attributes",
+  "successful-ok-conflicting-attributes",
+  "successful-ok-ignored-subscriptions",
+  "(successful-ok-ignored-notifications)",
+  "successful-ok-too-many-events",
+  "(successful-ok-but-cancel-subscription)",
+  "successful-ok-events-complete"
+};
+static const char * const ipp_status_400s[] =
+{                                      // Client errors; (name) = abandoned
+  "client-error-bad-request",
+  "client-error-forbidden",
+  "client-error-not-authenticated",
+  "client-error-not-authorized",
+  "client-error-not-possible",
+  "client-error-timeout",
+  "client-error-not-found",
+  "client-error-gone",
+  "client-error-request-entity-too-large",
+  "client-error-request-value-too-long",
+  "client-error-document-format-not-supported",
+  "client-error-attributes-or-values-not-supported",
+  "client-error-uri-scheme-not-supported",
+  "client-error-charset-not-supported",
+  "client-error-conflicting-attributes",
+  "client-error-compression-not-supported",
+  "client-error-compression-error",
+  "client-error-document-format-error",
+  "client-error-document-access-error",
+  "client-error-attributes-not-settable",
+  "client-error-ignored-all-subscriptions",
+  "client-error-too-many-subscriptions",
+  "(client-error-ignored-all-notifications)",
+  "(client-error-client-print-support-file-not-found)",
+  "client-error-document-password-error",
+  "client-error-document-permission-error",
+  "client-error-document-security-error",
+  "client-error-document-unprintable-error",
+  "client-error-account-info-needed",
+  "client-error-account-closed",
+  "client-error-account-limit-reached",
+  "client-error-account-authorization-failed",
+  "client-error-not-fetchable"
+};
+static const char * const ipp_status_500s[] =
+{                                      // Server errors
+  "server-error-internal-error",
+  "server-error-operation-not-supported",
+  "server-error-service-unavailable",
+  "server-error-version-not-supported",
+  "server-error-device-error",
+  "server-error-temporary-error",
+  "server-error-not-accepting-jobs",
+  "server-error-busy",
+  "server-error-job-canceled",
+  "server-error-multiple-document-jobs-not-supported",
+  "server-error-printer-is-deactivated",
+  "server-error-too-many-jobs",
+  "server-error-too-many-documents"
+};
+static const char * const ipp_status_1000s[] =
+{                                      // CUPS internal errors
+  "cups-authentication-canceled",
+  "cups-pki-error",
+  "cups-upgrade-required",
+  "cups-oauth"
+};
 static const char * const ipp_std_ops[] =
-               {
-                 // 0x0000 - 0x000f
-                 "0x0000",
-                 "0x0001",
-                 "Print-Job",                  // RFC 8011
-                 "Print-URI",                  // RFC 8011
-                 "Validate-Job",               // RFC 8011
-                 "Create-Job",                 // RFC 8011
-                 "Send-Document",              // RFC 8011
-                 "Send-URI",                   // RFC 8011
-                 "Cancel-Job",                 // RFC 8011
-                 "Get-Job-Attributes",         // RFC 8011
-                 "Get-Jobs",                   // RFC 8011
-                 "Get-Printer-Attributes",     // RFC 8011
-                 "Hold-Job",                   // RFC 8011
-                 "Release-Job",                // RFC 8011
-                 "Restart-Job",                // RFC 8011
-                 "0x000f",
-
-                 // 0x0010 - 0x001f
-                 "Pause-Printer",              // RFC 8011
-                 "Resume-Printer",             // RFC 8011
-                 "Purge-Jobs",                 // RFC 8011
-                 "Set-Printer-Attributes",     // RFC 3380
-                 "Set-Job-Attributes",         // RFC 3380
-                 "Get-Printer-Supported-Values",// RFC 3380
-                 "Create-Printer-Subscriptions",// RFC 3995
-                 "Create-Job-Subscriptions",   // RFC 3995
-                 "Get-Subscription-Attributes",// RFC 3995
-                 "Get-Subscriptions",          // RFC 3995
-                 "Renew-Subscription",         // RFC 3995
-                 "Cancel-Subscription",        // RFC 3995
-                 "Get-Notifications",          // RFC 3996
-                 "(Send-Notifications)",
-                 "Get-Resource-Attributes",    // IPP System
-                 "(Get-Resource-Data)",
-
-                 // 0x0020 - 0x002f
-                 "Get-Resources",              // IPP System
-                 "(Get-Printer-Support-Files)",
-                 "Enable-Printer",             // RFC 3998
-                 "Disable-Printer",            // RFC 3998
-                 "Pause-Printer-After-Current-Job",// RFC 3998
-                 "Hold-New-Jobs",              // RFC 3998
-                 "Release-Held-New-Jobs",      // RFC 3998
-                 "Deactivate-Printer",         // RFC 3998
-                 "Activate-Printer",           // RFC 3998
-                 "Restart-Printer",            // RFC 3998
-                 "Shutdown-Printer",           // RFC 3998
-                 "Startup-Printer",            // RFC 3998
-                 "Reprocess-Job",              // RFC 3998
-                 "Cancel-Current-Job",         // RFC 3998
-                 "Suspend-Current-Job",        // RFC 3998
-                 "Resume-Job",                 // RFC 3998
-
-                 // 0x0030 - 0x003f
-                 "Promote-Job",                // RFC 3998
-                 "Schedule-Job-After",         // RFC 3998
-                 "0x0032",
-                 "Cancel-Document",            // IPP DocObject
-                 "Get-Document-Attributes",    // IPP DocObject
-                 "Get-Documents",              // IPP DocObject
-                 "Delete-Document",            // IPP DocObject
-                 "Set-Document-Attributes",    // IPP DocObject
-                 "Cancel-Jobs",                // IPP JPS2
-                 "Cancel-My-Jobs",             // IPP JPS2
-                 "Resubmit-Job",               // IPP JPS2
-                 "Close-Job",                  // IPP JPS2
-                 "Identify-Printer",           // IPP JPS3
-                 "Validate-Document",          // IPP JPS3
-                 "Add-Document-Images",        // IPP Scan
-                 "Acknowledge-Document",       // IPP INFRA
-
-                 // 0x0040 - 0x004f
-                 "Acknowledge-Identify-Printer",// IPP INFRA
-                 "Acknowledge-Job",            // IPP INFRA
-                 "Fetch-Document",             // IPP INFRA
-                 "Fetch-Job",                  // IPP INFRA
-                 "Get-Output-Device-Attributes",// IPP INFRA
-                 "Update-Active-Jobs",         // IPP INFRA
-                 "Deregister-Output-Device",   // IPP INFRA
-                 "Update-Document-Status",     // IPP INFRA
-                 "Update-Job-Status",          // IPP INFRA
-                 "Update-Output-Device-Attributes",// IPP INFRA
-                 "Get-Next-Document-Data",     // IPP Scan
-                  "Allocate-Printer-Resources",        // IPP System
-                  "Create-Printer",            // IPP System
-                  "Deallocate-Printer-Resources",// IPP System
-                  "Delete-Printer",            // IPP System
-                  "Get-Printers",              // IPP System
-
-                  // 0x0050 - 0x005f
-                  "Shutdown-One-Printer",      // IPP System
-                  "Startup-One-Printer",       // IPP System
-                  "Cancel-Resource",           // IPP System
-                  "Create-Resource",           // IPP System
-                  "Install-Resource",          // IPP System
-                  "Send-Resource-Data",                // IPP System
-                  "Set-Resource-Attributes",   // IPP System
-                  "Create-Resource-Subscriptions",// IPP System
-                  "Create-System-Subscriptions",// IPP System
-                  "Disable-All-Printers",      // IPP System
-                  "Enable-All-Printers",       // IPP System
-                  "Get-System-Attributes",     // IPP System
-                  "Get-System-Supported-Values",// IPP System
-                  "Pause-All-Printers",                // IPP System
-                  "Pause-All-Printers-After-Current-Job",// IPP System
-                  "Register-Output-Device",    // IPP System
-
-                  // 0x0060 - 0x0064
-                  "Restart-System",            // IPP System
-                  "Resume-All-Printers",       // IPP System
-                  "Set-System-Attributes",     // IPP System
-                  "Shutdown-All-Printers",     // IPP System
-                  "Startup-All-Printers"       // IPP System
-               },
-               * const ipp_cups_ops[] =
-               {
-                 "CUPS-Get-Default",
-                 "CUPS-Get-Printers",
-                 "CUPS-Add-Modify-Printer",
-                 "CUPS-Delete-Printer",
-                 "CUPS-Get-Classes",
-                 "CUPS-Add-Modify-Class",
-                 "CUPS-Delete-Class",
-                 "CUPS-Accept-Jobs",
-                 "CUPS-Reject-Jobs",
-                 "CUPS-Set-Default",
-                 "CUPS-Get-Devices",
-                 "CUPS-Get-PPDs",
-                 "CUPS-Move-Job",
-                 "CUPS-Authenticate-Job",
-                 "CUPS-Get-PPD"
-               },
-               * const ipp_cups_ops2[] =
-               {
-                 "CUPS-Get-Document",
-                 "CUPS-Create-Local-Printer"
-               },
-               * const ipp_tag_names[] =
-               {                       // Value/group tag names
-                 "zero",               // 0x00
-                 "operation-attributes-tag",
-                                       // 0x01
-                 "job-attributes-tag", // 0x02
-                 "end-of-attributes-tag",
-                                       // 0x03
-                 "printer-attributes-tag",
-                                       // 0x04
-                 "unsupported-attributes-tag",
-                                       // 0x05
-                 "subscription-attributes-tag",
-                                       // 0x06 - RFC 3995
-                 "event-notification-attributes-tag",
-                                       // 0x07 - RFC 3995
-                 "resource-attributes-tag",
-                                       // 0x08 - IPP System
-                 "document-attributes-tag",
-                                       // 0x09 - IPP DocObject
-                 "system-attributes-tag",
-                                       // 0x0a - IPP System
-                 "0x0b",               // 0x0b
-                 "0x0c",               // 0x0c
-                 "0x0d",               // 0x0d
-                 "0x0e",               // 0x0e
-                 "0x0f",               // 0x0f
-                 "unsupported",        // 0x10
-                 "default",            // 0x11
-                 "unknown",            // 0x12
-                 "no-value",           // 0x13
-                 "0x14",               // 0x14
-                 "not-settable",       // 0x15 - RFC 3380
-                 "delete-attribute",   // 0x16 - RFC 3380
-                 "admin-define",       // 0x17 - RFC 3380
-                 "0x18",               // 0x18
-                 "0x19",               // 0x19
-                 "0x1a",               // 0x1a
-                 "0x1b",               // 0x1b
-                 "0x1c",               // 0x1c
-                 "0x1d",               // 0x1d
-                 "0x1e",               // 0x1e
-                 "0x1f",               // 0x1f
-                 "0x20",               // 0x20
-                 "integer",            // 0x21
-                 "boolean",            // 0x22
-                 "enum",               // 0x23
-                 "0x24",               // 0x24
-                 "0x25",               // 0x25
-                 "0x26",               // 0x26
-                 "0x27",               // 0x27
-                 "0x28",               // 0x28
-                 "0x29",               // 0x29
-                 "0x2a",               // 0x2a
-                 "0x2b",               // 0x2b
-                 "0x2c",               // 0x2c
-                 "0x2d",               // 0x2d
-                 "0x2e",               // 0x2e
-                 "0x2f",               // 0x2f
-                 "octetString",        // 0x30
-                 "dateTime",           // 0x31
-                 "resolution",         // 0x32
-                 "rangeOfInteger",     // 0x33
-                 "collection",         // 0x34
-                 "textWithLanguage",   // 0x35
-                 "nameWithLanguage",   // 0x36
-                 "endCollection",      // 0x37
-                 "0x38",               // 0x38
-                 "0x39",               // 0x39
-                 "0x3a",               // 0x3a
-                 "0x3b",               // 0x3b
-                 "0x3c",               // 0x3c
-                 "0x3d",               // 0x3d
-                 "0x3e",               // 0x3e
-                 "0x3f",               // 0x3f
-                 "0x40",               // 0x40
-                 "textWithoutLanguage",// 0x41
-                 "nameWithoutLanguage",// 0x42
-                 "0x43",               // 0x43
-                 "keyword",            // 0x44
-                 "uri",                // 0x45
-                 "uriScheme",          // 0x46
-                 "charset",            // 0x47
-                 "naturalLanguage",    // 0x48
-                 "mimeMediaType",      // 0x49
-                 "memberAttrName"      // 0x4a
-               };
+{
+  // 0x0000 - 0x000f
+  "0x0000",
+  "0x0001",
+  "Print-Job",                         // RFC 8011
+  "Print-URI",                         // RFC 8011
+  "Validate-Job",                      // RFC 8011
+  "Create-Job",                                // RFC 8011
+  "Send-Document",                     // RFC 8011
+  "Send-URI",                          // RFC 8011
+  "Cancel-Job",                                // RFC 8011
+  "Get-Job-Attributes",                        // RFC 8011
+  "Get-Jobs",                          // RFC 8011
+  "Get-Printer-Attributes",            // RFC 8011
+  "Hold-Job",                          // RFC 8011
+  "Release-Job",                       // RFC 8011
+  "Restart-Job",                       // RFC 8011
+  "0x000f",
+
+  // 0x0010 - 0x001f
+  "Pause-Printer",                     // RFC 8011
+  "Resume-Printer",                    // RFC 8011
+  "Purge-Jobs",                                // RFC 8011
+  "Set-Printer-Attributes",            // RFC 3380
+  "Set-Job-Attributes",                        // RFC 3380
+  "Get-Printer-Supported-Values",      // RFC 3380
+  "Create-Printer-Subscriptions",      // RFC 3995
+  "Create-Job-Subscriptions",          // RFC 3995
+  "Get-Subscription-Attributes",       // RFC 3995
+  "Get-Subscriptions",                 // RFC 3995
+  "Renew-Subscription",                        // RFC 3995
+  "Cancel-Subscription",               // RFC 3995
+  "Get-Notifications",                 // RFC 3996
+  "(Send-Notifications)",
+  "Get-Resource-Attributes",           // IPP System
+  "(Get-Resource-Data)",
+
+  // 0x0020 - 0x002f
+  "Get-Resources",                     // IPP System
+  "(Get-Printer-Support-Files)",
+  "Enable-Printer",                    // RFC 3998
+  "Disable-Printer",                   // RFC 3998
+  "Pause-Printer-After-Current-Job",   // RFC 3998
+  "Hold-New-Jobs",                     // RFC 3998
+  "Release-Held-New-Jobs",             // RFC 3998
+  "Deactivate-Printer",                        // RFC 3998
+  "Activate-Printer",                  // RFC 3998
+  "Restart-Printer",                   // RFC 3998
+  "Shutdown-Printer",                  // RFC 3998
+  "Startup-Printer",                   // RFC 3998
+  "Reprocess-Job",                     // RFC 3998
+  "Cancel-Current-Job",                        // RFC 3998
+  "Suspend-Current-Job",               // RFC 3998
+  "Resume-Job",                                // RFC 3998
+
+  // 0x0030 - 0x003f
+  "Promote-Job",                       // RFC 3998
+  "Schedule-Job-After",                        // RFC 3998
+  "0x0032",
+  "Cancel-Document",                   // IPP DocObject
+  "Get-Document-Attributes",           // IPP DocObject
+  "Get-Documents",                     // IPP DocObject
+  "Delete-Document",                   // IPP DocObject
+  "Set-Document-Attributes",           // IPP DocObject
+  "Cancel-Jobs",                       // IPP JobExt
+  "Cancel-My-Jobs",                    // IPP JobExt
+  "Resubmit-Job",                      // IPP JobExt
+  "Close-Job",                         // IPP JobExt
+  "Identify-Printer",                  // IPP NODRIVER
+  "Validate-Document",                 // IPP NODRIVER
+  "Add-Document-Images",               // IPP Scan
+  "Acknowledge-Document",              // IPP INFRA
+
+  // 0x0040 - 0x004f
+  "Acknowledge-Identify-Printer",      // IPP INFRA
+  "Acknowledge-Job",                   // IPP INFRA
+  "Fetch-Document",                    // IPP INFRA
+  "Fetch-Job",                         // IPP INFRA
+  "Get-Output-Device-Attributes",      // IPP INFRA
+  "Update-Active-Jobs",                        // IPP INFRA
+  "Deregister-Output-Device",          // IPP INFRA
+  "Update-Document-Status",            // IPP INFRA
+  "Update-Job-Status",                 // IPP INFRA
+  "Update-Output-Device-Attributes",   // IPP INFRA
+  "Get-Next-Document-Data",            // IPP Scan
+  "Allocate-Printer-Resources",                // IPP System
+  "Create-Printer",                    // IPP System
+  "Deallocate-Printer-Resources",      // IPP System
+  "Delete-Printer",                    // IPP System
+  "Get-Printers",                      // IPP System
+
+  // 0x0050 - 0x005f
+  "Shutdown-One-Printer",              // IPP System
+  "Startup-One-Printer",               // IPP System
+  "Cancel-Resource",                   // IPP System
+  "Create-Resource",                   // IPP System
+  "Install-Resource",                  // IPP System
+  "Send-Resource-Data",                        // IPP System
+  "Set-Resource-Attributes",           // IPP System
+  "Create-Resource-Subscriptions",     // IPP System
+  "Create-System-Subscriptions",       // IPP System
+  "Disable-All-Printers",              // IPP System
+  "Enable-All-Printers",               // IPP System
+  "Get-System-Attributes",             // IPP System
+  "Get-System-Supported-Values",       // IPP System
+  "Pause-All-Printers",                        // IPP System
+  "Pause-All-Printers-After-Current-Job",
+                                       // IPP System
+  "Register-Output-Device",            // IPP System
+
+  // 0x0060 - 0x006a
+  "Restart-System",                    // IPP System
+  "Resume-All-Printers",               // IPP System
+  "Set-System-Attributes",             // IPP System
+  "Shutdown-All-Printers",             // IPP System
+  "Startup-All-Printers",              // IPP System
+  "Get-Printer-Resources",             // IPP System
+  "Get-User-Printer-Attributes",       // IPP EPX
+  "Restart-One-Printer",               // IPP System
+  "Acknowledge-Encrypted-Job-Attributes",
+                                       // IPP TRUSTNOONE
+  "Fetch-Encrypted-Job-Attributes",    // IPP TRUSTNOONE
+  "Get-Encrypted-Job-Attributes"       // IPP TRUSTNOONE
+};
+static const char * const ipp_cups_ops[] =
+{
+  "CUPS-Get-Default",
+  "CUPS-Get-Printers",
+  "CUPS-Add-Modify-Printer",
+  "CUPS-Delete-Printer",
+  "CUPS-Get-Classes",
+  "CUPS-Add-Modify-Class",
+  "CUPS-Delete-Class",
+  "CUPS-Accept-Jobs",
+  "CUPS-Reject-Jobs",
+  "CUPS-Set-Default",
+  "CUPS-Get-Devices",
+  "CUPS-Get-PPDs",
+  "CUPS-Move-Job",
+  "CUPS-Authenticate-Job",
+  "CUPS-Get-PPD"
+};
+static const char * const ipp_cups_ops2[] =
+{
+  "CUPS-Get-Document",
+  "CUPS-Create-Local-Printer"
+};
+static const char * const ipp_tag_names[] =
+{                                      // Value/group tag names
+  "zero",                              // 0x00
+  "operation-attributes-tag",          // 0x01
+  "job-attributes-tag",                        // 0x02
+  "end-of-attributes-tag",             // 0x03
+  "printer-attributes-tag",            // 0x04
+  "unsupported-attributes-tag",                // 0x05
+  "subscription-attributes-tag",       // 0x06 - RFC 3995
+  "event-notification-attributes-tag", // 0x07 - RFC 3995
+  "resource-attributes-tag",           // 0x08 - IPP System
+  "document-attributes-tag",           // 0x09 - IPP DocObject
+  "system-attributes-tag",             // 0x0a - IPP System
+  "0x0b",                              // 0x0b
+  "0x0c",                              // 0x0c
+  "0x0d",                              // 0x0d
+  "0x0e",                              // 0x0e
+  "0x0f",                              // 0x0f
+  "unsupported",                       // 0x10
+  "default",                           // 0x11
+  "unknown",                           // 0x12
+  "no-value",                          // 0x13
+  "0x14",                              // 0x14
+  "not-settable",                      // 0x15 - RFC 3380
+  "delete-attribute",                  // 0x16 - RFC 3380
+  "admin-define",                      // 0x17 - RFC 3380
+  "0x18",                              // 0x18
+  "0x19",                              // 0x19
+  "0x1a",                              // 0x1a
+  "0x1b",                              // 0x1b
+  "0x1c",                              // 0x1c
+  "0x1d",                              // 0x1d
+  "0x1e",                              // 0x1e
+  "0x1f",                              // 0x1f
+  "0x20",                              // 0x20
+  "integer",                           // 0x21
+  "boolean",                           // 0x22
+  "enum",                              // 0x23
+  "0x24",                              // 0x24
+  "0x25",                              // 0x25
+  "0x26",                              // 0x26
+  "0x27",                              // 0x27
+  "0x28",                              // 0x28
+  "0x29",                              // 0x29
+  "0x2a",                              // 0x2a
+  "0x2b",                              // 0x2b
+  "0x2c",                              // 0x2c
+  "0x2d",                              // 0x2d
+  "0x2e",                              // 0x2e
+  "0x2f",                              // 0x2f
+  "octetString",                       // 0x30
+  "dateTime",                          // 0x31
+  "resolution",                                // 0x32
+  "rangeOfInteger",                    // 0x33
+  "collection",                                // 0x34
+  "textWithLanguage",                  // 0x35
+  "nameWithLanguage",                  // 0x36
+  "endCollection",                     // 0x37
+  "0x38",                              // 0x38
+  "0x39",                              // 0x39
+  "0x3a",                              // 0x3a
+  "0x3b",                              // 0x3b
+  "0x3c",                              // 0x3c
+  "0x3d",                              // 0x3d
+  "0x3e",                              // 0x3e
+  "0x3f",                              // 0x3f
+  "0x40",                              // 0x40
+  "textWithoutLanguage",               // 0x41
+  "nameWithoutLanguage",               // 0x42
+  "0x43",                              // 0x43
+  "keyword",                           // 0x44
+  "uri",                               // 0x45
+  "uriScheme",                         // 0x46
+  "charset",                           // 0x47
+  "naturalLanguage",                   // 0x48
+  "mimeMediaType",                     // 0x49
+  "memberAttrName"                     // 0x4a
+};
 static const char * const ipp_document_states[] =
-               {                       // document-state-enums
-                 "pending",
-                 "4",
-                 "processing",
-                 "processing-stopped", // IPP INFRA
-                 "canceled",
-                 "aborted",
-                 "completed"
-               },
-               * const ipp_finishings[] =
-               {                       // finishings enums
-                 "none",
-                 "staple",
-                 "punch",
-                 "cover",
-                 "bind",
-                 "saddle-stitch",
-                 "edge-stitch",
-                 "fold",
-                 "trim",
-                 "bale",
-                 "booklet-maker",
-                 "jog-offset",
-                 "coat",               // IPP Finishings 2.0
-                 "laminate",           // IPP Finishings 2.0
-                 "17",
-                 "18",
-                 "19",
-                 "staple-top-left",
-                 "staple-bottom-left",
-                 "staple-top-right",
-                 "staple-bottom-right",
-                 "edge-stitch-left",
-                 "edge-stitch-top",
-                 "edge-stitch-right",
-                 "edge-stitch-bottom",
-                 "staple-dual-left",
-                 "staple-dual-top",
-                 "staple-dual-right",
-                 "staple-dual-bottom",
-                 "staple-triple-left", // IPP Finishings 2.0
-                 "staple-triple-top",  // IPP Finishings 2.0
-                 "staple-triple-right",// IPP Finishings 2.0
-                 "staple-triple-bottom",// IPP Finishings 2.0
-                 "36",
-                 "37",
-                 "38",
-                 "39",
-                 "40",
-                 "41",
-                 "42",
-                 "43",
-                 "44",
-                 "45",
-                 "46",
-                 "47",
-                 "48",
-                 "49",
-                 "bind-left",
-                 "bind-top",
-                 "bind-right",
-                 "bind-bottom",
-                 "54",
-                 "55",
-                 "56",
-                 "57",
-                 "58",
-                 "59",
-                 "trim-after-pages",
-                 "trim-after-documents",
-                 "trim-after-copies",
-                 "trim-after-job",
-                 "64",
-                 "65",
-                 "66",
-                 "67",
-                 "68",
-                 "69",
-                 "punch-top-left",     // IPP Finishings 2.0
-                 "punch-bottom-left",  // IPP Finishings 2.0
-                 "punch-top-right",    // IPP Finishings 2.0
-                 "punch-bottom-right", // IPP Finishings 2.0
-                 "punch-dual-left",    // IPP Finishings 2.0
-                 "punch-dual-top",     // IPP Finishings 2.0
-                 "punch-dual-right",   // IPP Finishings 2.0
-                 "punch-dual-bottom",  // IPP Finishings 2.0
-                 "punch-triple-left",  // IPP Finishings 2.0
-                 "punch-triple-top",   // IPP Finishings 2.0
-                 "punch-triple-right", // IPP Finishings 2.0
-                 "punch-triple-bottom",// IPP Finishings 2.0
-                 "punch-quad-left",    // IPP Finishings 2.0
-                 "punch-quad-top",     // IPP Finishings 2.0
-                 "punch-quad-right",   // IPP Finishings 2.0
-                 "punch-quad-bottom",  // IPP Finishings 2.0
-                 "punch-multiple-left",// IPP Finishings 2.1/Canon
-                 "punch-multiple-top", // IPP Finishings 2.1/Canon
-                 "punch-multiple-right",// IPP Finishings 2.1/Canon
-                 "punch-multiple-bottom",// IPP Finishings 2.1/Canon
-                 "fold-accordion",     // IPP Finishings 2.0
-                 "fold-double-gate",   // IPP Finishings 2.0
-                 "fold-gate",          // IPP Finishings 2.0
-                 "fold-half",          // IPP Finishings 2.0
-                 "fold-half-z",        // IPP Finishings 2.0
-                 "fold-left-gate",     // IPP Finishings 2.0
-                 "fold-letter",        // IPP Finishings 2.0
-                 "fold-parallel",      // IPP Finishings 2.0
-                 "fold-poster",        // IPP Finishings 2.0
-                 "fold-right-gate",    // IPP Finishings 2.0
-                 "fold-z",             // IPP Finishings 2.0
-                  "fold-engineering-z" // IPP Finishings 2.1
-               },
-               * const ipp_finishings_vendor[] =
-               {
-                 // 0x40000000 to 0x4000000F
-                 "0x40000000",
-                 "0x40000001",
-                 "0x40000002",
-                 "0x40000003",
-                 "0x40000004",
-                 "0x40000005",
-                 "0x40000006",
-                 "0x40000007",
-                 "0x40000008",
-                 "0x40000009",
-                 "0x4000000A",
-                 "0x4000000B",
-                 "0x4000000C",
-                 "0x4000000D",
-                 "0x4000000E",
-                 "0x4000000F",
-                 // 0x40000010 to 0x4000001F
-                 "0x40000010",
-                 "0x40000011",
-                 "0x40000012",
-                 "0x40000013",
-                 "0x40000014",
-                 "0x40000015",
-                 "0x40000016",
-                 "0x40000017",
-                 "0x40000018",
-                 "0x40000019",
-                 "0x4000001A",
-                 "0x4000001B",
-                 "0x4000001C",
-                 "0x4000001D",
-                 "0x4000001E",
-                 "0x4000001F",
-                 // 0x40000020 to 0x4000002F
-                 "0x40000020",
-                 "0x40000021",
-                 "0x40000022",
-                 "0x40000023",
-                 "0x40000024",
-                 "0x40000025",
-                 "0x40000026",
-                 "0x40000027",
-                 "0x40000028",
-                 "0x40000029",
-                 "0x4000002A",
-                 "0x4000002B",
-                 "0x4000002C",
-                 "0x4000002D",
-                 "0x4000002E",
-                 "0x4000002F",
-                 // 0x40000030 to 0x4000003F
-                 "0x40000030",
-                 "0x40000031",
-                 "0x40000032",
-                 "0x40000033",
-                 "0x40000034",
-                 "0x40000035",
-                 "0x40000036",
-                 "0x40000037",
-                 "0x40000038",
-                 "0x40000039",
-                 "0x4000003A",
-                 "0x4000003B",
-                 "0x4000003C",
-                 "0x4000003D",
-                 "0x4000003E",
-                 "0x4000003F",
-                 // 0x40000040 - 0x4000004F
-                 "0x40000040",
-                 "0x40000041",
-                 "0x40000042",
-                 "0x40000043",
-                 "0x40000044",
-                 "0x40000045",
-                 "cups-punch-top-left",
-                 "cups-punch-bottom-left",
-                 "cups-punch-top-right",
-                 "cups-punch-bottom-right",
-                 "cups-punch-dual-left",
-                 "cups-punch-dual-top",
-                 "cups-punch-dual-right",
-                 "cups-punch-dual-bottom",
-                 "cups-punch-triple-left",
-                 "cups-punch-triple-top",
-                 // 0x40000050 - 0x4000005F
-                 "cups-punch-triple-right",
-                 "cups-punch-triple-bottom",
-                 "cups-punch-quad-left",
-                 "cups-punch-quad-top",
-                 "cups-punch-quad-right",
-                 "cups-punch-quad-bottom",
-                 "0x40000056",
-                 "0x40000057",
-                 "0x40000058",
-                 "0x40000059",
-                 "cups-fold-accordion",
-                 "cups-fold-double-gate",
-                 "cups-fold-gate",
-                 "cups-fold-half",
-                 "cups-fold-half-z",
-                 "cups-fold-left-gate",
-                 // 0x40000060 - 0x40000064
-                 "cups-fold-letter",
-                 "cups-fold-parallel",
-                 "cups-fold-poster",
-                 "cups-fold-right-gate",
-                 "cups-fold-z"
-               },
-               * const ipp_job_collation_types[] =
-               {                       // job-collation-type enums
-                 "uncollated-sheets",
-                 "collated-documents",
-                 "uncollated-documents"
-               },
-               * const ipp_job_states[] =
-               {                       // job-state enums
-                 "pending",
-                 "pending-held",
-                 "processing",
-                 "processing-stopped",
-                 "canceled",
-                 "aborted",
-                 "completed"
-               },
-               * const ipp_orientation_requesteds[] =
-               {                       // orientation-requested enums
-                 "portrait",
-                 "landscape",
-                 "reverse-landscape",
-                 "reverse-portrait",
-                 "none"
-               },
-               * const ipp_print_qualities[] =
-               {                       // print-quality enums
-                 "draft",
-                 "normal",
-                 "high"
-               },
-               * const ipp_printer_states[] =
-               {                       // printer-state enums
-                 "idle",
-                 "processing",
-                 "stopped"
-               },
-               * const ipp_resource_states[] =
-               {                       // resource-state enums
-                 "pending",
-                 "available",
-                 "installed",
-                 "canceled",
-                 "aborted"
-               },
-               * const ipp_system_states[] =
-               {                       // system-state enums
-                 "idle",
-                 "processing",
-                 "stopped"
-               };
+{                                      // document-state-enums
+  "pending",
+  "4",
+  "processing",
+  "processing-stopped",                        // IPP INFRA
+  "canceled",
+  "aborted",
+  "completed"
+};
+static const char * const ipp_finishings[] =
+{                                      // finishings enums
+  "none",
+  "staple",
+  "punch",
+  "cover",
+  "bind",
+  "saddle-stitch",
+  "edge-stitch",
+  "fold",
+  "trim",
+  "bale",
+  "booklet-maker",
+  "jog-offset",
+  "coat",                              // IPP FIN
+  "laminate",                          // IPP FIN
+  "17",
+  "18",
+  "19",
+  "staple-top-left",                   // IPP FIN
+  "staple-bottom-left",                        // IPP FIN
+  "staple-top-right",                  // IPP FIN
+  "staple-bottom-right",               // IPP FIN
+  "edge-stitch-left",                  // IPP FIN
+  "edge-stitch-top",                   // IPP FIN
+  "edge-stitch-right",                 // IPP FIN
+  "edge-stitch-bottom",                        // IPP FIN
+  "staple-dual-left",                  // IPP FIN
+  "staple-dual-top",                   // IPP FIN
+  "staple-dual-right",                 // IPP FIN
+  "staple-dual-bottom",                        // IPP FIN
+  "staple-triple-left",                        // IPP FIN
+  "staple-triple-top",                 // IPP FIN
+  "staple-triple-right",               // IPP FIN
+  "staple-triple-bottom",              // IPP FIN
+  "36",
+  "37",
+  "38",
+  "39",
+  "40",
+  "41",
+  "42",
+  "43",
+  "44",
+  "45",
+  "46",
+  "47",
+  "48",
+  "49",
+  "bind-left",                         // IPP FIN
+  "bind-top",                          // IPP FIN
+  "bind-right",                                // IPP FIN
+  "bind-bottom",                       // IPP FIN
+  "54",
+  "55",
+  "56",
+  "57",
+  "58",
+  "59",
+  "trim-after-pages",                  // IPP FIN
+  "trim-after-documents",              // IPP FIN
+  "trim-after-copies",                 // IPP FIN
+  "trim-after-job",                    // IPP FIN
+  "64",
+  "65",
+  "66",
+  "67",
+  "68",
+  "69",
+  "punch-top-left",                    // IPP FIN
+  "punch-bottom-left",                 // IPP FIN
+  "punch-top-right",                   // IPP FIN
+  "punch-bottom-right",                        // IPP FIN
+  "punch-dual-left",                   // IPP FIN
+  "punch-dual-top",                    // IPP FIN
+  "punch-dual-right",                  // IPP FIN
+  "punch-dual-bottom",                 // IPP FIN
+  "punch-triple-left",                 // IPP FIN
+  "punch-triple-top",                  // IPP FIN
+  "punch-triple-right",                        // IPP FIN
+  "punch-triple-bottom",               // IPP FIN
+  "punch-quad-left",                   // IPP FIN
+  "punch-quad-top",                    // IPP FIN
+  "punch-quad-right",                  // IPP FIN
+  "punch-quad-bottom",                 // IPP FIN
+  "punch-multiple-left",               // IPP FIN
+  "punch-multiple-top",                        // IPP FIN
+  "punch-multiple-right",              // IPP FIN
+  "punch-multiple-bottom",             // IPP FIN
+  "fold-accordion",                    // IPP FIN
+  "fold-double-gate",                  // IPP FIN
+  "fold-gate",                         // IPP FIN
+  "fold-half",                         // IPP FIN
+  "fold-half-z",                       // IPP FIN
+  "fold-left-gate",                    // IPP FIN
+  "fold-letter",                       // IPP FIN
+  "fold-parallel",                     // IPP FIN
+  "fold-poster",                       // IPP FIN
+  "fold-right-gate",                   // IPP FIN
+  "fold-z",                            // IPP FIN
+  "fold-engineering-z"                 // IPP FIN
+};
+static const char * const ipp_finishings_vendor[] =
+{
+  // 0x40000000 to 0x4000000F
+  "0x40000000",
+  "0x40000001",
+  "0x40000002",
+  "0x40000003",
+  "0x40000004",
+  "0x40000005",
+  "0x40000006",
+  "0x40000007",
+  "0x40000008",
+  "0x40000009",
+  "0x4000000A",
+  "0x4000000B",
+  "0x4000000C",
+  "0x4000000D",
+  "0x4000000E",
+  "0x4000000F",
+  // 0x40000010 to 0x4000001F
+  "0x40000010",
+  "0x40000011",
+  "0x40000012",
+  "0x40000013",
+  "0x40000014",
+  "0x40000015",
+  "0x40000016",
+  "0x40000017",
+  "0x40000018",
+  "0x40000019",
+  "0x4000001A",
+  "0x4000001B",
+  "0x4000001C",
+  "0x4000001D",
+  "0x4000001E",
+  "0x4000001F",
+  // 0x40000020 to 0x4000002F
+  "0x40000020",
+  "0x40000021",
+  "0x40000022",
+  "0x40000023",
+  "0x40000024",
+  "0x40000025",
+  "0x40000026",
+  "0x40000027",
+  "0x40000028",
+  "0x40000029",
+  "0x4000002A",
+  "0x4000002B",
+  "0x4000002C",
+  "0x4000002D",
+  "0x4000002E",
+  "0x4000002F",
+  // 0x40000030 to 0x4000003F
+  "0x40000030",
+  "0x40000031",
+  "0x40000032",
+  "0x40000033",
+  "0x40000034",
+  "0x40000035",
+  "0x40000036",
+  "0x40000037",
+  "0x40000038",
+  "0x40000039",
+  "0x4000003A",
+  "0x4000003B",
+  "0x4000003C",
+  "0x4000003D",
+  "0x4000003E",
+  "0x4000003F",
+  // 0x40000040 - 0x4000004F
+  "0x40000040",
+  "0x40000041",
+  "0x40000042",
+  "0x40000043",
+  "0x40000044",
+  "0x40000045",
+  "cups-punch-top-left",               // AirPrint
+  "cups-punch-bottom-left",            // AirPrint
+  "cups-punch-top-right",              // AirPrint
+  "cups-punch-bottom-right",           // AirPrint
+  "cups-punch-dual-left",              // AirPrint
+  "cups-punch-dual-top",               // AirPrint
+  "cups-punch-dual-right",             // AirPrint
+  "cups-punch-dual-bottom",            // AirPrint
+  "cups-punch-triple-left",            // AirPrint
+  "cups-punch-triple-top",             // AirPrint
+  // 0x40000050 - 0x4000005F
+  "cups-punch-triple-right",           // AirPrint
+  "cups-punch-triple-bottom",          // AirPrint
+  "cups-punch-quad-left",              // AirPrint
+  "cups-punch-quad-top",               // AirPrint
+  "cups-punch-quad-right",             // AirPrint
+  "cups-punch-quad-bottom",            // AirPrint
+  "0x40000056",
+  "0x40000057",
+  "0x40000058",
+  "0x40000059",
+  "cups-fold-accordion",               // AirPrint
+  "cups-fold-double-gate",             // AirPrint
+  "cups-fold-gate",                    // AirPrint
+  "cups-fold-half",                    // AirPrint
+  "cups-fold-half-z",                  // AirPrint
+  "cups-fold-left-gate",               // AirPrint
+  // 0x40000060 - 0x40000064
+  "cups-fold-letter",                  // AirPrint
+  "cups-fold-parallel",                        // AirPrint
+  "cups-fold-poster",                  // AirPrint
+  "cups-fold-right-gate",              // AirPrint
+  "cups-fold-z"                                // AirPrint
+};
+static const char * const ipp_job_states[] =
+{                                      // job-state enums
+  "pending",
+  "pending-held",
+  "processing",
+  "processing-stopped",
+  "canceled",
+  "aborted",
+  "completed"
+};
+static const char * const ipp_orientation_requesteds[] =
+{                                      // orientation-requested enums
+  "portrait",
+  "landscape",
+  "reverse-landscape",
+  "reverse-portrait",
+  "none"
+};
+static const char * const ipp_print_qualities[] =
+{                                      // print-quality enums
+  "draft",
+  "normal",
+  "high"
+};
+static const char * const ipp_printer_states[] =
+{                                      // printer-state enums
+  "idle",
+  "processing",
+  "stopped"
+};
+static const char * const ipp_resource_states[] =
+{                                      // resource-state enums
+  "pending",
+  "available",
+  "installed",
+  "canceled",
+  "aborted"
+};
+static const char * const ipp_system_states[] =
+{                                      // system-state enums
+  "idle",
+  "processing",
+  "stopped"
+};
 
 
 //
@@ -643,17 +599,18 @@ static size_t     ipp_col_string(ipp_t *col, char *buffer, size_t bufsize);
 //
 // 'ippAttributeString()' - Convert the attribute's value to a string.
 //
-// Returns the number of bytes that would be written, not including the
-// trailing nul. The buffer pointer can be NULL to get the required length,
-// just like (v)snprintf.
+// This function converts an attribute's values into a string and returns the
+// number of bytes that would be written, not including the trailing `nul`.  The
+// buffer pointer can be NULL to get the required length, just like
+// `(v)snprintf`.
 //
 // @since CUPS 1.6@
 //
 
-size_t                                 // O - Number of bytes less nul
+size_t                                 // O - Number of bytes less `nul`
 ippAttributeString(
     ipp_attribute_t *attr,             // I - Attribute
-    char            *buffer,           // I - String buffer or NULL
+    char            *buffer,           // I - String buffer or `NULL`
     size_t          bufsize)           // I - Size of string buffer
 {
   int          i;                      // Looping var
@@ -665,6 +622,7 @@ ippAttributeString(
   _ipp_value_t *val;                   // Current value
 
 
+  // Range check input...
   if (!attr || !attr->name)
   {
     if (buffer)
@@ -673,12 +631,14 @@ ippAttributeString(
     return (0);
   }
 
+  // Setup buffer pointers...
   bufptr = buffer;
   if (buffer)
     bufend = buffer + bufsize - 1;
   else
     bufend = NULL;
 
+  // Loop through the values...
   for (i = attr->num_values, val = attr->values; i > 0; i --, val ++)
   {
     if (val > attr->values)
@@ -852,6 +812,7 @@ ippAttributeString(
     }
   }
 
+  // Nul-terminate and return...
   if (buffer && bufptr < bufend)
     *bufptr = '\0';
   else if (bufend)
@@ -870,23 +831,23 @@ ippAttributeString(
 // registered values are supported in addition to the CUPS IPP extension
 // attributes.
 //
-// The @code request@ parameter specifies the request message that was read from
+// The "request" argument specifies the request message that was read from
 // the client.
 //
-// @code NULL@ is returned if all attributes should be returned.  Otherwise, the
-// result is a sorted array of attribute names, where @code cupsArrayFind(array,
-// "attribute-name")@ will return a non-NULL pointer.  The array must be freed
-// using the @code cupsArrayDelete@ function.
+// `NULL` is returned if all attributes should be returned.  Otherwise, the
+// result is a sorted array of attribute names, where
+// `cupsArrayFind(array, "attribute-name")` will return a non-`NULL` pointer.
+// The array must be freed using @link cupsArrayDelete@.
 //
 // @since CUPS 1.7@
 //
 
-cups_array_t *                         // O - CUPS array or @code NULL@ if all
+cups_array_t *                         // O - CUPS array or `NULL` if all
 ippCreateRequestedArray(ipp_t *request)        // I - IPP request
 {
-  int                  i, j,           // Looping vars
-                       count,          // Number of values
-                       added;          // Was name added?
+  size_t               i, j,           // Looping vars
+                       count;          // Number of values
+  bool                 added;          // Was name added?
   ipp_op_t             op;             // IPP operation code
   ipp_attribute_t      *requested;     // requested-attributes attribute
   cups_array_t         *ra;            // Requested attributes array
@@ -905,12 +866,9 @@ ippCreateRequestedArray(ipp_t *request)    // I - IPP request
     "detailed-status-messages",
     "document-access-errors",
     "document-charset",
-    "document-digital-signature",
     "document-format",
-    "document-format-details",
-    "document-format-detected",
-    "document-format-version",
-    "document-format-version-detected",
+    "document-format-details",         // IPP JobExt
+    "document-format-detected",                // IPP JobExt
     "document-job-id",
     "document-job-uri",
     "document-message",
@@ -923,8 +881,8 @@ ippCreateRequestedArray(ipp_t *request)     // I - IPP request
     "document-state-message",
     "document-state-reasons",
     "document-uri",
-    "document-uuid",                   // IPP JPS3
-    "errors-count",
+    "document-uuid",                   // IPP NODRIVER
+    "errors-count",                    // IPP JobExt
     "finishings-actual",
     "finishings-col-actual",
     "force-front-side-actual",
@@ -966,7 +924,7 @@ ippCreateRequestedArray(ipp_t *request)     // I - IPP request
     "print-accuracy-actual",           // IPP 3D
     "print-base-actual",               // IPP 3D
     "print-color-mode-actual",
-    "print-content-optimize-actual",
+    "print-content-optimize-actual",   // IPP JobExt
     "print-objects-actual",            // IPP 3D
     "print-quality-actual",
     "print-rendering-intent-actual",
@@ -980,6 +938,7 @@ ippCreateRequestedArray(ipp_t *request)     // I - IPP request
     "time-at-completed",
     "time-at-creation",
     "time-at-processing",
+    "warnings-count",                  // IPP JobExt
     "x-image-position-actual",
     "x-image-shift-actual",
     "x-side1-image-shift-actual",
@@ -991,56 +950,63 @@ ippCreateRequestedArray(ipp_t *request)   // I - IPP request
   };
   static const char * const document_template[] =
   {                                    // document-template group
+    "baling-type-supported",           // IPP FIN
+    "baling-when-supported",           // IPP FIN
+    "binding-reference-edge-supported",        // IPP FIN
+    "binding-type-supported",          // IPP FIN
     "chamber-humidity",                        // IPP 3D
     "chamber-humidity-default",                // IPP 3D
     "chamber-humidity-supported",      // IPP 3D
     "chamber-temperature",             // IPP 3D
     "chamber-temperature-default",     // IPP 3D
     "chamber-temperature-supported",   // IPP 3D
+    "coating-sides-supported",         // IPP FIN
+    "coating-type-supported",          // IPP FIN
     "copies",
     "copies-default",
     "copies-supported",
-    "cover-back",
-    "cover-back-default",
-    "cover-back-supported",
-    "cover-front",
-    "cover-front-default",
-    "cover-front-supported",
+    "cover-back",                      // IPP PPX
+    "cover-back-default",              // IPP PPX
+    "cover-back-supported",            // IPP PPX
+    "cover-front",                     // IPP PPX
+    "cover-front-default",             // IPP PPX
+    "cover-front-supported",           // IPP PPX
+    "covering-name-supported",         // IPP FIN
     "feed-orientation",
     "feed-orientation-default",
     "feed-orientation-supported",
+    "finishing-template-supported",    // IPP FIN
     "finishings",
-    "finishings-col",
-    "finishings-col-database",
-    "finishings-col-default",
-    "finishings-col-ready",
-    "finishings-col-supported",
+    "finishings-col",                  // IPP FIN
+    "finishings-col-database",         // IPP FIN
+    "finishings-col-default",          // IPP FIN
+    "finishings-col-ready",            // IPP FIN
+    "finishings-col-supported",                // IPP FIN
     "finishings-default",
     "finishings-ready",
     "finishings-supported",
-    "font-name-requested",
-    "font-name-requested-default",
-    "font-name-requested-supported",
-    "font-size-requested",
-    "font-size-requested-default",
-    "font-size-requested-supported",
-    "force-front-side",
-    "force-front-side-default",
-    "force-front-side-supported",
-    "imposition-template",
-    "imposition-template-default",
-    "imposition-template-supported",
-    "insert-after-page-number-supported",
-    "insert-count-supported",
-    "insert-sheet",
-    "insert-sheet-default",
-    "insert-sheet-supported",
+    "folding-direction-supported",     // IPP FIN
+    "folding-offset-supported",                // IPP FIN
+    "folding-reference-edge-supported",        // IPP FIN
+    "force-front-side",                        // IPP PPX
+    "force-front-side-default",                // IPP PPX
+    "force-front-side-supported",      // IPP PPX
+    "imposition-template",             // IPP PPX
+    "imposition-template-default",     // IPP PPX
+    "imposition-template-supported",   // IPP PPX
+    "insert-count-supported",          // IPP PPX
+    "insert-sheet",                    // IPP PPX
+    "insert-sheet-default",            // IPP PPX
+    "insert-sheet-supported",          // IPP PPX
+    "laminating-sides-supported",      // IPP FIN
+    "laminating-type-supported",       // IPP FIN
     "material-amount-units-supported", // IPP 3D
     "material-diameter-supported",     // IPP 3D
     "material-purpose-supported",      // IPP 3D
     "material-rate-supported",         // IPP 3D
     "material-rate-units-supported",   // IPP 3D
-    "material-shell-thickness-supported",// IPP 3D
+    "material-shell-thickness-supported",
+                                       // IPP 3D
     "material-temperature-supported",  // IPP 3D
     "material-type-supported",         // IPP 3D
     "materials-col",                   // IPP 3D
@@ -1049,142 +1015,150 @@ ippCreateRequestedArray(ipp_t *request)       // I - IPP request
     "materials-col-ready",             // IPP 3D
     "materials-col-supported",         // IPP 3D
     "max-materials-col-supported",     // IPP 3D
-    "max-stitching-locations-supported",
+    "max-page-ranges-supported",
+    "max-stitching-locations-supported",// IPP FIN
     "media",
-    "media-back-coating-supported",
-    "media-bottom-margin-supported",
-    "media-col",
-    "media-col-default",
-    "media-col-ready",
-    "media-col-supported",
-    "media-color-supported",
+    "media-back-coating-supported",    // IPP JobExt
+    "media-bottom-margin-supported",   // IPP JobExt
+    "media-col",                       // IPP JobExt
+    "media-col-default",               // IPP JobExt
+    "media-col-ready",                 // IPP JobExt
+    "media-col-supported",             // IPP JobExt
+    "media-color-supported",           // IPP JobExt
     "media-default",
-    "media-front-coating-supported",
-    "media-grain-supported",
-    "media-hole-count-supported",
-    "media-info-supported",
-    "media-input-tray-check",
-    "media-input-tray-check-default",
-    "media-input-tray-check-supported",
-    "media-key-supported",
-    "media-left-margin-supported",
-    "media-order-count-supported",
-    "media-pre-printed-supported",
+    "media-front-coating-supported",   // IPP JobExt
+    "media-grain-supported",           // IPP JobExt
+    "media-hole-count-supported",      // IPP JobExt
+    "media-info-supported",            // IPP JobExt
+    "media-input-tray-check",          // IPP PPX
+    "media-input-tray-check-default",  // IPP PPX
+    "media-input-tray-check-supported",        // IPP PPX
+    "media-key-supported",             // IPP JobExt
+    "media-left-margin-supported",     // IPP JobExt
+    "media-order-count-supported",     // IPP JobExt
+    "media-overprint",                 // IPP NODRIVER
+    "media-overprint-distance-supported",
+                                       // IPP NODRIVER
+    "media-overprint-method-supported",        // IPP NODRIVER
+    "media-overprint-supported",       // IPP NODRIVER
+    "media-pre-printed-supported",     // IPP JobExt
     "media-ready",
-    "media-recycled-supported",
-    "media-right-margin-supported",
-    "media-size-supported",
-    "media-source-supported",
+    "media-recycled-supported",                // IPP JobExt
+    "media-right-margin-supported",    // IPP JobExt
+    "media-size-supported",            // IPP JobExt
+    "media-source-supported",          // IPP JobExt
     "media-supported",
-    "media-thickness-supported",
-    "media-top-margin-supported",
-    "media-type-supported",
-    "media-weight-metric-supported",
+    "media-thickness-supported",       // IPP JobExt
+    "media-top-margin-supported",      // IPP JobExt
+    "media-type-supported",            // IPP JobExt
+    "media-weight-metric-supported",   // IPP JobExt
     "multiple-document-handling",
     "multiple-document-handling-default",
     "multiple-document-handling-supported",
     "multiple-object-handling",                // IPP 3D
     "multiple-object-handling-default",        // IPP 3D
-    "multiple-object-handling-supported",// IPP 3D
+    "multiple-object-handling-supported",
+                                       // IPP 3D
     "number-up",
     "number-up-default",
     "number-up-supported",
     "orientation-requested",
     "orientation-requested-default",
     "orientation-requested-supported",
+    "output-device",                   // IPP JobExt
+    "output-device-supported",         // IPP JobExt
     "output-mode",                     // CUPS extension
     "output-mode-default",             // CUPS extension
     "output-mode-supported",           // CUPS extension
     "overrides",
     "overrides-supported",
-    "page-delivery",
-    "page-delivery-default",
-    "page-delivery-supported",
-    "page-order-received",
-    "page-order-received-default",
-    "page-order-received-supported",
+    "page-delivery",                   // IPP PPX
+    "page-delivery-default",           // IPP PPX
+    "page-delivery-supported",         // IPP PPX
     "page-ranges",
     "page-ranges-supported",
-    "pages-per-subset",
-    "pages-per-subset-supported",
-    "pdl-init-file",
-    "pdl-init-file-default",
-    "pdl-init-file-entry-supported",
-    "pdl-init-file-location-supported",
-    "pdl-init-file-name-subdirectory-supported",
-    "pdl-init-file-name-supported",
-    "pdl-init-file-supported",
     "platform-temperature",            // IPP 3D
     "platform-temperature-default",    // IPP 3D
     "platform-temperature-supported",  // IPP 3D
-    "presentation-direction-number-up",
+    "preferred-attributes-supported",  // IPP NODRIVER
+    "presentation-direction-number-up",        // IPP PPX
     "presentation-direction-number-up-default",
+                                       // IPP PPX
     "presentation-direction-number-up-supported",
+                                       // IPP PPX
     "print-accuracy",                  // IPP 3D
     "print-accuracy-default",          // IPP 3D
     "print-accuracy-supported",                // IPP 3D
     "print-base",                      // IPP 3D
     "print-base-default",              // IPP 3D
     "print-base-supported",            // IPP 3D
-    "print-color-mode",
-    "print-color-mode-default",
-    "print-color-mode-supported",
-    "print-content-optimize",
-    "print-content-optimize-default",
-    "print-content-optimize-supported",
+    "print-color-mode",                        // IPP NODRIVER
+    "print-color-mode-default",                // IPP NODRIVER
+    "print-color-mode-supported",      // IPP NODRIVER
+    "print-content-optimize",          // IPP JobExt
+    "print-content-optimize-default",  // IPP JobExt
+    "print-content-optimize-supported",        // IPP JobExt
     "print-objects",                   // IPP 3D
     "print-objects-default",           // IPP 3D
     "print-objects-supported",         // IPP 3D
+    "print-processing-attributes-supported",
+                                       // IPP NODRIVER
     "print-quality",
     "print-quality-default",
     "print-quality-supported",
-    "print-rendering-intent",
-    "print-rendering-intent-default",
-    "print-rendering-intent-supported",
-    "print-scaling",                   // IPP Paid Printing
-    "print-scaling-default",           // IPP Paid Printing
-    "print-scaling-supported",         // IPP Paid Printing
+    "print-rendering-intent",          // IPP NODRIVER
+    "print-rendering-intent-default",  // IPP NODRIVER
+    "print-rendering-intent-supported",        // IPP NODRIVER
+    "print-scaling",                   // IPP NODRIVER
+    "print-scaling-default",           // IPP NODRIVER
+    "print-scaling-supported",         // IPP NODRIVER
     "print-supports",                  // IPP 3D
     "print-supports-default",          // IPP 3D
     "print-supports-supported",                // IPP 3D
     "printer-resolution",
     "printer-resolution-default",
     "printer-resolution-supported",
-    "separator-sheets",
-    "separator-sheets-default",
-    "separator-sheets-supported",
-    "sheet-collate",
-    "sheet-collate-default",
-    "sheet-collate-supported",
+    "punching-hole-diameter-configured",// IPP FIN
+    "punching-locations-supported",    // IPP FIN
+    "punching-offset-supported",       // IPP FIN
+    "punching-reference-edge-supported",// IPP FIN
+    "separator-sheets",                        // IPP PPX
+    "separator-sheets-default",                // IPP PPX
+    "separator-sheets-supported",      // IPP PPX
+    "separator-sheets-type-supported", // IPP PPX
     "sides",
     "sides-default",
     "sides-supported",
-    "stitching-locations-supported",
-    "stitching-offset-supported",
-    "x-image-position",
-    "x-image-position-default",
-    "x-image-position-supported",
-    "x-image-shift",
-    "x-image-shift-default",
-    "x-image-shift-supported",
-    "x-side1-image-shift",
-    "x-side1-image-shift-default",
-    "x-side1-image-shift-supported",
-    "x-side2-image-shift",
-    "x-side2-image-shift-default",
-    "x-side2-image-shift-supported",
-    "y-image-position",
-    "y-image-position-default",
-    "y-image-position-supported",
-    "y-image-shift",
-    "y-image-shift-default",
-    "y-image-shift-supported",
-    "y-side1-image-shift",
-    "y-side1-image-shift-default",
-    "y-side1-image-shift-supported",
-    "y-side2-image-shift",
-    "y-side2-image-shift-default",
-    "y-side2-image-shift-supported"
+    "stitching-angle-supported",       // IPP FIN
+    "stitching-locations-supported",   // IPP FIN
+    "stitching-method-supported",      // IPP FIN
+    "stitching-offset-supported",      // IPP FIN
+    "stitching-reference-edge-supported",
+                                       // IPP FIN
+    "x-image-position",                        // IPP PPX
+    "x-image-position-default",                // IPP PPX
+    "x-image-position-supported",      // IPP PPX
+    "x-image-shift",                   // IPP PPX
+    "x-image-shift-default",           // IPP PPX
+    "x-image-shift-supported",         // IPP PPX
+    "x-side1-image-shift",             // IPP PPX
+    "x-side1-image-shift-default",     // IPP PPX
+    "x-side1-image-shift-supported",   // IPP PPX
+    "x-side2-image-shift",             // IPP PPX
+    "x-side2-image-shift-default",     // IPP PPX
+    "x-side2-image-shift-supported",   // IPP PPX
+    "y-image-position",                        // IPP PPX
+    "y-image-position-default",                // IPP PPX
+    "y-image-position-supported",      // IPP PPX
+    "y-image-shift",                   // IPP PPX
+    "y-image-shift-default",           // IPP PPX
+    "y-image-shift-supported",         // IPP PPX
+    "y-side1-image-shift",             // IPP PPX
+    "y-side1-image-shift-default",     // IPP PPX
+    "y-side1-image-shift-supported",   // IPP PPX
+    "y-side2-image-shift",             // IPP PPX
+    "y-side2-image-shift-default",     // IPP PPX
+    "y-side2-image-shift-supported"    // IPP PPX
   };
   static const char * const job_description[] =
   {                                    // job-description group
@@ -1196,8 +1170,10 @@ ippCreateRequestedArray(ipp_t *request)  // I - IPP request
     "cover-front-actual",
     "current-page-order",
     "date-time-at-completed",
+    "date-time-at-completed-estimated",        // IPP PPX
     "date-time-at-creation",
     "date-time-at-processing",
+    "date-time-at-processing-estimated",// IPP PPX
     "destination-statuses",
     "document-charset-supplied",
     "document-digital-signature-supplied",
@@ -1220,16 +1196,9 @@ ippCreateRequestedArray(ipp_t *request)  // I - IPP request
     "job-accounting-user-id-actual",
     "job-attribute-fidelity",
     "job-charge-info",                 // CUPS extension
-    "job-collation-type",
-    "job-collation-type-actual",
-    "job-copies-actual",
-    "job-cover-back-actual",
-    "job-cover-front-actual",
     "job-detailed-status-message",
     "job-document-access-errors",
     "job-error-sheet-actual",
-    "job-finishings-actual",
-    "job-finishings-col-actual",
     "job-hold-until-actual",
     "job-id",
     "job-impressions",
@@ -1249,7 +1218,7 @@ ippCreateRequestedArray(ipp_t *request)   // I - IPP request
     "job-name",
     "job-originating-host-name",       // CUPS extension
     "job-originating-user-name",
-    "job-originating-user-uri",                // IPP JPS3
+    "job-originating-user-uri",                // IPP NODRIVER
     "job-pages",
     "job-pages-col",
     "job-pages-completed",
@@ -1268,8 +1237,9 @@ ippCreateRequestedArray(ipp_t *request)   // I - IPP request
     "job-state",
     "job-state-message",
     "job-state-reasons",
+    "job-storage",                     // IPP EPX
     "job-uri",
-    "job-uuid",                                // IPP JPS3
+    "job-uuid",                                // IPP NODRIVER
     "materials-col-actual",            // IPP 3D
     "media-actual",
     "media-col-actual",
@@ -1291,6 +1261,8 @@ ippCreateRequestedArray(ipp_t *request)   // I - IPP request
     "page-delivery-actual",
     "page-order-received-actual",
     "page-ranges-actual",
+    "parent-job-id",                   // IPP EPX
+    "parent-job-uuid",                 // IPP EPX
     "platform-temperature-actual",     // IPP 3D
     "presentation-direction-number-up-actual",
     "print-accuracy-actual",           // IPP 3D
@@ -1309,9 +1281,11 @@ ippCreateRequestedArray(ipp_t *request)  // I - IPP request
     "sheet-completed-document-number",
     "sides-actual",
     "time-at-completed",
+    "time-at-completed-estimated",     // IPP PPX
     "time-at-creation",
     "time-at-processing",
-    "warnings-count",
+    "time-at-processing-estimated",    // IPP PPX
+    "warnings-count",                  // IPP JobExt
     "x-image-position-actual",
     "x-image-shift-actual",
     "x-side1-image-shift-actual",
@@ -1324,26 +1298,33 @@ ippCreateRequestedArray(ipp_t *request) // I - IPP request
   static const char * const job_template[] =
   {                                    // job-template group
     "accuracy-units-supported",                // IPP 3D
+    "baling-type-supported",           // IPP FIN
+    "baling-when-supported",           // IPP FIN
+    "binding-reference-edge-supported",        // IPP FIN
+    "binding-type-supported",          // IPP FIN
     "chamber-humidity",                        // IPP 3D
     "chamber-humidity-default",                // IPP 3D
     "chamber-humidity-supported",      // IPP 3D
     "chamber-temperature",             // IPP 3D
     "chamber-temperature-default",     // IPP 3D
     "chamber-temperature-supported",   // IPP 3D
+    "coating-sides-supported",         // IPP FIN
+    "coating-type-supported",          // IPP FIN
     "confirmation-sheet-print",                // IPP FaxOut
     "confirmation-sheet-print-default",
     "copies",
     "copies-default",
     "copies-supported",
-    "cover-back",
-    "cover-back-default",
-    "cover-back-supported",
-    "cover-front",
-    "cover-front-default",
-    "cover-front-supported",
+    "cover-back",                      // IPP PPX
+    "cover-back-default",              // IPP PPX
+    "cover-back-supported",            // IPP PPX
+    "cover-front",                     // IPP PPX
+    "cover-front-default",             // IPP PPX
+    "cover-front-supported",           // IPP PPX
     "cover-sheet-info",                        // IPP FaxOut
-    "cover-sheet-info-default",
-    "cover-sheet-info-supported",
+    "cover-sheet-info-default",                // IPP FaxOut
+    "cover-sheet-info-supported",      // IPP FaxOut
+    "covering-name-supported",         // IPP FIN
     "destination-uri-schemes-supported",// IPP FaxOut
     "destination-uris",                        // IPP FaxOut
     "destination-uris-supported",
@@ -1351,101 +1332,107 @@ ippCreateRequestedArray(ipp_t *request)       // I - IPP request
     "feed-orientation-default",
     "feed-orientation-supported",
     "finishings",
-    "finishings-col",
-    "finishings-col-database",
-    "finishings-col-default",
-    "finishings-col-ready",
-    "finishings-col-supported",
+    "finishings-col",                  // IPP FIN
+    "finishings-col-database",         // IPP FIN
+    "finishings-col-default",          // IPP FIN
+    "finishings-col-ready",            // IPP FIN
+    "finishings-col-supported",                // IPP FIN
     "finishings-default",
     "finishings-ready",
     "finishings-supported",
-    "font-name-requested",
-    "font-name-requested-default",
-    "font-name-requested-supported",
-    "font-size-requested",
-    "font-size-requested-default",
-    "font-size-requested-supported",
-    "force-front-side",
-    "force-front-side-default",
-    "force-front-side-supported",
-    "imposition-template",
-    "imposition-template-default",
-    "imposition-template-supported",
-    "insert-after-page-number-supported",
-    "insert-count-supported",
-    "insert-sheet",
-    "insert-sheet-default",
-    "insert-sheet-supported",
-    "job-account-id",
-    "job-account-id-default",
-    "job-account-id-supported",
-    "job-accounting-sheets",
-    "job-accounting-sheets-default",
-    "job-accounting-sheets-supported",
-    "job-accounting-user-id",
-    "job-accounting-user-id-default",
-    "job-accounting-user-id-supported",
-    "job-copies",
-    "job-copies-default",
-    "job-copies-supported",
-    "job-cover-back",
-    "job-cover-back-default",
-    "job-cover-back-supported",
-    "job-cover-front",
-    "job-cover-front-default",
-    "job-cover-front-supported",
-    "job-delay-output-until",
-    "job-delay-output-until-default",
-    "job-delay-output-until-supported",
-    "job-delay-output-until-time",
+    "folding-direction-supported",     // IPP FIN
+    "folding-offset-supported",                // IPP FIN
+    "folding-reference-edge-supported",        // IPP FIN
+    "force-front-side",                        // IPP PPX
+    "force-front-side-default",                // IPP PPX
+    "force-front-side-supported",      // IPP PPX
+    "imposition-template",             // IPP PPX
+    "imposition-template-default",     // IPP PPX
+    "imposition-template-supported",   // IPP PPX
+    "insert-count-supported",          // IPP PPX
+    "insert-sheet",                    // IPP PPX
+    "insert-sheet-default",            // IPP PPX
+    "insert-sheet-supported",          // IPP PPX
+    "job-account-id",                  // IPP JobExt
+    "job-account-id-default",          // IPP JobExt
+    "job-account-id-supported",                // IPP JobExt
+    "job-accounting-output-bin-supported",
+                                       // IPP PPX
+    "job-accounting-sheets",           // IPP PPX
+    "job-accounting-sheets-default",   // IPP PPX
+    "job-accounting-sheets-supported", // IPP PPX
+    "job-accounting-sheets-type-supported",
+                                       // IPP PPX
+    "job-accounting-user-id",          // IPP JobExt
+    "job-accounting-user-id-default",  // IPP JobExt
+    "job-accounting-user-id-supported",        // IPP JobExt
+    "job-cancel-after",                        // IPP EPX
+    "job-cancel-after-default",                // IPP EPX
+    "job-cancel-after-supported",      // IPP EPX
+    "job-complete-before",             // IPP PPX
+    "job-complete-before-supported",   // IPP PPX
+    "job-complete-before-time",                // IPP PPX
+    "job-complete-before-time-supported",
+                                       // IPP PPX
+    "job-delay-output-until",          // IPP JobExt
+    "job-delay-output-until-default",  // IPP JobExt
+    "job-delay-output-until-supported",        // IPP JobExt
+    "job-delay-output-until-time",     // IPP JobExt
     "job-delay-output-until-time-default",
+                                       // IPP JobExt
     "job-delay-output-until-time-supported",
-    "job-error-action",
-    "job-error-action-default",
-    "job-error-action-supported",
-    "job-error-sheet",
-    "job-error-sheet-default",
-    "job-error-sheet-supported",
-    "job-finishings",
-    "job-finishings-col",
-    "job-finishings-col-default",
-    "job-finishings-col-supported",
-    "job-finishings-default",
-    "job-finishings-supported",
+                                       // IPP JobExt
+    "job-error-action",                        // IPP NODRIVER
+    "job-error-action-default",                // IPP NODRIVER
+    "job-error-action-supported",      // IPP NODRIVER
+    "job-error-sheet",                 // IPP PPX
+    "job-error-sheet-default",         // IPP PPX
+    "job-error-sheet-supported",       // IPP PPX
+    "job-error-sheet-type-supported",  // IPP PPX
+    "job-error-sheet-when-supported",  // IPP PPX
     "job-hold-until",
     "job-hold-until-default",
     "job-hold-until-supported",
-    "job-hold-until-time",
-    "job-hold-until-time-default",
-    "job-hold-until-time-supported",
-    "job-message-to-operator",
-    "job-message-to-operator-default",
-    "job-message-to-operator-supported",
-    "job-phone-number",
-    "job-phone-number-default",
-    "job-phone-number-supported",
+    "job-hold-until-time",             // IPP JobExt
+    "job-hold-until-time-default",     // IPP JobExt
+    "job-hold-until-time-supported",   // IPP JobExt
+    "job-message-to-operator",         // IPP PPX
+    "job-message-to-operator-supported",// IPP PPX
+    "job-phone-number",                        // IPP PPX
+    "job-phone-number-default",                // IPP PPX
+    "job-phone-number-supported",      // IPP PPX
     "job-priority",
     "job-priority-default",
     "job-priority-supported",
-    "job-recipient-name",
-    "job-recipient-name-default",
-    "job-recipient-name-supported",
-    "job-save-disposition",
-    "job-save-disposition-default",
-    "job-save-disposition-supported",
+    "job-recipient-name",              // IPP PPX
+    "job-recipient-name-supported",    // IPP PPX
+    "job-retain-until",                        // IPP JobExt
+    "job-retain-until-default",                // IPP JobExt
+    "job-retain-until-interval",       // IPP JobExt
+    "job-retain-until=interval-default",// IPP JobExt
+    "job-retain-until-interval-supported",
+                                       // IPP JobExt
+    "job-retain-until-supported",      // IPP JobExt
+    "job-retain-until-time",           // IPP JobExt
+    "job-retain-until-time-supported", // IPP JobExt
+    "job-sheet-message",               // IPP PPX
+    "job-sheet-message-supported",     // IPP PPX
     "job-sheets",
-    "job-sheets-col",
-    "job-sheets-col-default",
-    "job-sheets-col-supported",
+    "job-sheets-col",                  // IPP JobExt
+    "job-sheets-col-default",          // IPP JobExt
+    "job-sheets-col-supported",                // IPP JobExt
     "job-sheets-default",
     "job-sheets-supported",
-    "logo-uri-schemes-supported",
+    "laminating-sides-supported",      // IPP FIN
+    "laminating-type-supported",       // IPP FIN
+    "logo-uri-schemes-supported",      // IPP FaxOut
     "material-amount-units-supported", // IPP 3D
     "material-diameter-supported",     // IPP 3D
     "material-purpose-supported",      // IPP 3D
     "material-rate-supported",         // IPP 3D
     "material-rate-units-supported",   // IPP 3D
-    "material-shell-thickness-supported",// IPP 3D
+    "material-shell-thickness-supported",
+                                       // IPP 3D
     "material-temperature-supported",  // IPP 3D
     "material-type-supported",         // IPP 3D
     "materials-col",                   // IPP 3D
@@ -1454,44 +1441,50 @@ ippCreateRequestedArray(ipp_t *request) // I - IPP request
     "materials-col-ready",             // IPP 3D
     "materials-col-supported",         // IPP 3D
     "max-materials-col-supported",     // IPP 3D
-    "max-save-info-supported",
-    "max-stitching-locations-supported",
+    "max-page-ranges-supported",
+    "max-stitching-locations-supported",// IPP FIN
     "media",
-    "media-back-coating-supported",
-    "media-bottom-margin-supported",
-    "media-col",
-    "media-col-default",
-    "media-col-ready",
-    "media-col-supported",
-    "media-color-supported",
+    "media-back-coating-supported",    // IPP JobExt
+    "media-bottom-margin-supported",   // IPP JobExt
+    "media-col",                       // IPP JobExt
+    "media-col-default",               // IPP JobExt
+    "media-col-ready",                 // IPP JobExt
+    "media-col-supported",             // IPP JobExt
+    "media-color-supported",           // IPP JobExt
     "media-default",
-    "media-front-coating-supported",
-    "media-grain-supported",
-    "media-hole-count-supported",
-    "media-info-supported",
-    "media-input-tray-check",
-    "media-input-tray-check-default",
-    "media-input-tray-check-supported",
-    "media-key-supported",
-    "media-left-margin-supported",
-    "media-order-count-supported",
-    "media-pre-printed-supported",
+    "media-front-coating-supported",   // IPP JobExt
+    "media-grain-supported",           // IPP JobExt
+    "media-hole-count-supported",      // IPP JobExt
+    "media-info-supported",            // IPP JobExt
+    "media-input-tray-check",          // IPP PPX
+    "media-input-tray-check-default",  // IPP PPX
+    "media-input-tray-check-supported",        // IPP PPX
+    "media-key-supported",             // IPP JobExt
+    "media-left-margin-supported",     // IPP JobExt
+    "media-order-count-supported",     // IPP JobExt
+    "media-overprint",                 // IPP NODRIVER
+    "media-overprint-distance-supported",
+                                       // IPP NODRIVER
+    "media-overprint-method-supported",        // IPP NODRIVER
+    "media-overprint-supported",       // IPP NODRIVER
+    "media-pre-printed-supported",     // IPP JobExt
     "media-ready",
-    "media-recycled-supported",
-    "media-right-margin-supported",
-    "media-size-supported",
-    "media-source-supported",
+    "media-recycled-supported",                // IPP JobExt
+    "media-right-margin-supported",    // IPP JobExt
+    "media-size-supported",            // IPP JobExt
+    "media-source-supported",          // IPP JobExt
     "media-supported",
-    "media-thickness-supported",
-    "media-top-margin-supported",
-    "media-type-supported",
-    "media-weight-metric-supported",
+    "media-thickness-supported",       // IPP JobExt
+    "media-top-margin-supported",      // IPP JobExt
+    "media-type-supported",            // IPP JobExt
+    "media-weight-metric-supported",   // IPP JobExt
     "multiple-document-handling",
     "multiple-document-handling-default",
     "multiple-document-handling-supported",
     "multiple-object-handling",                // IPP 3D
     "multiple-object-handling-default",        // IPP 3D
-    "multiple-object-handling-supported",// IPP 3D
+    "multiple-object-handling-supported",
+                                       // IPP 3D
     "number-of-retries",               // IPP FaxOut
     "number-of-retries-default",
     "number-of-retries-supported",
@@ -1504,118 +1497,111 @@ ippCreateRequestedArray(ipp_t *request)       // I - IPP request
     "output-bin",
     "output-bin-default",
     "output-bin-supported",
-    "output-device",
-    "output-device-supported",
-    "output-device-uuid-supported",    // IPP INFRA
+    "output-device",                   // IPP JobExt
+    "output-device-supported",         // IPP JobExt
     "output-mode",                     // CUPS extension
     "output-mode-default",             // CUPS extension
     "output-mode-supported",           // CUPS extension
     "overrides",
     "overrides-supported",
-    "page-delivery",
-    "page-delivery-default",
-    "page-delivery-supported",
-    "page-order-received",
-    "page-order-received-default",
-    "page-order-received-supported",
+    "page-delivery",                   // IPP PPX
+    "page-delivery-default",           // IPP PPX
+    "page-delivery-supported",         // IPP PPX
     "page-ranges",
     "page-ranges-supported",
-    "pages-per-subset",
-    "pages-per-subset-supported",
-    "pdl-init-file",
-    "pdl-init-file-default",
-    "pdl-init-file-entry-supported",
-    "pdl-init-file-location-supported",
-    "pdl-init-file-name-subdirectory-supported",
-    "pdl-init-file-name-supported",
-    "pdl-init-file-supported",
     "platform-temperature",            // IPP 3D
     "platform-temperature-default",    // IPP 3D
     "platform-temperature-supported",  // IPP 3D
-    "presentation-direction-number-up",
+    "preferred-attributes-supported",  // IPP NODRIVER
+    "presentation-direction-number-up",        // IPP PPX
     "presentation-direction-number-up-default",
+                                       // IPP PPX
     "presentation-direction-number-up-supported",
+                                       // IPP PPX
     "print-accuracy",                  // IPP 3D
     "print-accuracy-default",          // IPP 3D
     "print-accuracy-supported",                // IPP 3D
     "print-base",                      // IPP 3D
     "print-base-default",              // IPP 3D
     "print-base-supported",            // IPP 3D
-    "print-color-mode",
-    "print-color-mode-default",
-    "print-color-mode-supported",
-    "print-content-optimize",
-    "print-content-optimize-default",
-    "print-content-optimize-supported",
+    "print-color-mode",                        // IPP NODRIVER
+    "print-color-mode-default",                // IPP NODRIVER
+    "print-color-mode-supported",      // IPP NODRIVER
+    "print-content-optimize",          // IPP JobExt
+    "print-content-optimize-default",  // IPP JobExt
+    "print-content-optimize-supported",        // IPP JobExt
     "print-objects",                   // IPP 3D
     "print-objects-default",           // IPP 3D
     "print-objects-supported",         // IPP 3D
+    "print-processing-attributes-supported",
+                                       // IPP NODRIVER
     "print-quality",
     "print-quality-default",
     "print-quality-supported",
-    "print-rendering-intent",
-    "print-rendering-intent-default",
-    "print-rendering-intent-supported",
-    "print-scaling",                   // IPP Paid Printing
-    "print-scaling-default",           // IPP Paid Printing
-    "print-scaling-supported",         // IPP Paid Printing
+    "print-rendering-intent",          // IPP NODRIVER
+    "print-rendering-intent-default",  // IPP NODRIVER
+    "print-rendering-intent-supported",        // IPP NODRIVER
+    "print-scaling",                   // IPP NODRIVER
+    "print-scaling-default",           // IPP NODRIVER
+    "print-scaling-supported",         // IPP NODRIVER
     "print-supports",                  // IPP 3D
     "print-supports-default",          // IPP 3D
     "print-supports-supported",                // IPP 3D
     "printer-resolution",
     "printer-resolution-default",
     "printer-resolution-supported",
-    "proof-print",
-    "proof-print-default",
-    "proof-print-supported",
+    "proof-copies",                    // IPP EPX
+    "proof-copies-supported",          // IPP EPX
+    "proof-print",                     // IPP EPX
+    "proof-print-default",             // IPP EPX
+    "proof-print-supported"            // IPP EPX
+    "punching-hole-diameter-configured",// IPP FIN
+    "punching-locations-supported",    // IPP FIN
+    "punching-offset-supported",       // IPP FIN
+    "punching-reference-edge-supported",// IPP FIN
     "retry-interval",                  // IPP FaxOut
     "retry-interval-default",
     "retry-interval-supported",
     "retry-timeout",                   // IPP FaxOut
     "retry-timeout-default",
     "retry-timeout-supported",
-    "save-disposition-supported",
-    "save-document-format-default",
-    "save-document-format-supported",
-    "save-location-default",
-    "save-location-supported",
-    "save-name-subdirectory-supported",
-    "save-name-supported",
-    "separator-sheets",
-    "separator-sheets-default",
-    "separator-sheets-supported",
-    "sheet-collate",
-    "sheet-collate-default",
-    "sheet-collate-supported",
+    "separator-sheets",                        // IPP PPX
+    "separator-sheets-default",                // IPP PPX
+    "separator-sheets-supported",      // IPP PPX
+    "separator-sheets-type-supported", // IPP PPX
     "sides",
     "sides-default",
     "sides-supported",
-    "stitching-locations-supported",
-    "stitching-offset-supported",
-    "x-image-position",
-    "x-image-position-default",
-    "x-image-position-supported",
-    "x-image-shift",
-    "x-image-shift-default",
-    "x-image-shift-supported",
-    "x-side1-image-shift",
-    "x-side1-image-shift-default",
-    "x-side1-image-shift-supported",
-    "x-side2-image-shift",
-    "x-side2-image-shift-default",
-    "x-side2-image-shift-supported",
-    "y-image-position",
-    "y-image-position-default",
-    "y-image-position-supported",
-    "y-image-shift",
-    "y-image-shift-default",
-    "y-image-shift-supported",
-    "y-side1-image-shift",
-    "y-side1-image-shift-default",
-    "y-side1-image-shift-supported",
-    "y-side2-image-shift",
-    "y-side2-image-shift-default",
-    "y-side2-image-shift-supported"
+    "stitching-angle-supported",       // IPP FIN
+    "stitching-locations-supported",   // IPP FIN
+    "stitching-method-supported",      // IPP FIN
+    "stitching-offset-supported",      // IPP FIN
+    "stitching-reference-edge-supported",
+                                       // IPP FIN
+    "x-image-position",                        // IPP PPX
+    "x-image-position-default",                // IPP PPX
+    "x-image-position-supported",      // IPP PPX
+    "x-image-shift",                   // IPP PPX
+    "x-image-shift-default",           // IPP PPX
+    "x-image-shift-supported",         // IPP PPX
+    "x-side1-image-shift",             // IPP PPX
+    "x-side1-image-shift-default",     // IPP PPX
+    "x-side1-image-shift-supported",   // IPP PPX
+    "x-side2-image-shift",             // IPP PPX
+    "x-side2-image-shift-default",     // IPP PPX
+    "x-side2-image-shift-supported",   // IPP PPX
+    "y-image-position",                        // IPP PPX
+    "y-image-position-default",                // IPP PPX
+    "y-image-position-supported",      // IPP PPX
+    "y-image-shift",                   // IPP PPX
+    "y-image-shift-default",           // IPP PPX
+    "y-image-shift-supported",         // IPP PPX
+    "y-side1-image-shift",             // IPP PPX
+    "y-side1-image-shift-default",     // IPP PPX
+    "y-side1-image-shift-supported",   // IPP PPX
+    "y-side2-image-shift",             // IPP PPX
+    "y-side2-image-shift-default",     // IPP PPX
+    "y-side2-image-shift-supported"    // IPP PPX
   };
   static const char * const printer_description[] =
   {                                    // printer-description group
@@ -1629,57 +1615,67 @@ ippCreateRequestedArray(ipp_t *request) // I - IPP request
     "device-service-count",
     "device-uri",                      // CUPS extension
     "device-uuid",
-    "document-charset-default",
-    "document-charset-supported",
+    "document-charset-default",                // IPP JobExt
+    "document-charset-supported",      // IPP JobExt
     "document-creation-attributes-supported",
-    "document-digital-signature-default",
-    "document-digital-signature-supported",
     "document-format-default",
-    "document-format-details-default",
-    "document-format-details-supported",
+    "document-format-details-supported",// IPP JobExt
     "document-format-preferred",       // AirPrint extension
     "document-format-supported",
     "document-format-varying-attributes",
-    "document-format-version-default",
-    "document-format-version-supported",
-    "document-natural-language-default",
+    "document-natural-language-default",// IPP JobExt
     "document-natural-language-supported",
-    "document-password-supported",
+                                       // IPP JobExt
+    "document-password-supported",     // IPP NODRIVER
     "document-privacy-attributes",     // IPP Privacy Attributes
     "document-privacy-scope",          // IPP Privacy Attributes
     "generated-natural-language-supported",
-    "identify-actions-default",
-    "identify-actions-supported",
-    "input-source-supported",
-    "ipp-features-supported",
+    "identify-actions-default",                // IPP NODRIVER
+    "identify-actions-supported",      // IPP NODRIVER
+    "input-source-supported",          // IPP FaxOut
+    "ipp-features-supported",          // IPP NODRIVER
     "ipp-versions-supported",
-    "ippget-event-life",
+    "ippget-event-life",               // RFC 3995
     "job-authorization-uri-supported", // CUPS extension
-    "job-constraints-supported",
-    "job-creation-attributes-supported",
-    "job-finishings-col-ready",
-    "job-finishings-ready",
-    "job-ids-supported",
+    "job-constraints-supported",       // IPP NODRIVER
+    "job-creation-attributes-supported",// IPP JobExt
+    "job-history-attributes-configured",// IPP JobExt
+    "job-history-attributes-supported",        // IPP JobExt
+    "job-ids-supported",               // IPP JobExt
     "job-impressions-supported",
     "job-k-limit",                     // CUPS extension
     "job-k-octets-supported",
+    "job-mandatory-attributes-supported",
+                                       // IPP JobExt
     "job-media-sheets-supported",
     "job-page-limit",                  // CUPS extension
-    "job-password-encryption-supported",
-    "job-password-supported",
-    "job-presets-supported",           // IPP Driver Replacement Extensions
+    "job-pages-per-set-supported",     // IPP FIN
+    "job-password-encryption-supported",// IPP EPX
+    "job-password-length-supported",   // IPP EPX
+    "job-password-repertoire-configured",
+                                       // IPP EPX
+    "job-password-repertoire-supported",// IPP EPX
+    "job-password-supported",          // IPP EPX
+    "job-presets-supported",           // IPP NODRIVER
     "job-privacy-attributes",          // IPP Privacy Attributes
     "job-privacy-scope",               // IPP Privacy Attributes
     "job-quota-period",                        // CUPS extension
-    "job-resolvers-supported",         // IPP Driver Replacement Extensions
-    "job-settable-attributes-supported",
-    "job-spooling-supported",
-    "job-triggers-supported",          // IPP Driver Replacement Extensions
-    "jpeg-k-octets-supported",         // CUPS extension
-    "jpeg-x-dimension-supported",      // CUPS extension
-    "jpeg-y-dimension-supported",      // CUPS extension
+    "job-release-action-default",      // IPP EPX
+    "job-release-action-supported",    // IPP EPX
+    "job-resolvers-supported",         // IPP NODRIVER
+    "job-settable-attributes-supported",// RFC 3380
+    "job-spooling-supported",          // IPP JobExt
+    "job-storage-access-supported",    // IPP EPX
+    "job-storage-disposition-supported",// IPP EPX
+    "job-storage-group-supported",     // IPP EPX
+    "job-storage-supported",           // IPP EPX
+    "job-triggers-supported",          // IPP NODRIVER
+    "jpeg-features-supported",         // IPP NODRIVER
+    "jpeg-k-octets-supported",         // IPP NODRIVER
+    "jpeg-x-dimension-supported",      // IPP NODRIVER
+    "jpeg-y-dimension-supported",      // IPP NODRIVER
     "landscape-orientation-requested-preferred",
-                                       // CUPS extension
+                                       // AirPrint extension
     "marker-change-time",              // CUPS extension
     "marker-colors",                   // CUPS extension
     "marker-high-levels",              // CUPS extension
@@ -1691,12 +1687,15 @@ ippCreateRequestedArray(ipp_t *request) // I - IPP request
     "member-names",                    // CUPS extension
     "member-uris",                     // CUPS extension
     "mopria-certified",                        // Mopria extension
-    "multiple-destination-uris-supported",// IPP FaxOut
+    "multiple-destination-uris-supported",
+                                       // IPP FaxOut
     "multiple-document-jobs-supported",
     "multiple-operation-time-out",
     "multiple-operation-time-out-action",
+                                       // IPP NODRIVER
     "natural-language-configured",
     "operations-supported",
+    "output-device-uuid-supported",    // IPP INFRA
     "pages-per-minute",
     "pages-per-minute-color",
     "pdf-k-octets-supported",          // CUPS extension
@@ -1704,6 +1703,7 @@ ippCreateRequestedArray(ipp_t *request)   // I - IPP request
     "pdf-versions-supported",          // CUPS extension
     "pdl-override-supported",
     "platform-shape",                  // IPP 3D
+    "pkcs7-document-format-supported", // IPP TRUSTNOONE
     "port-monitor",                    // CUPS extension
     "port-monitor-supported",          // CUPS extension
     "preferred-attributes-supported",
@@ -1718,7 +1718,7 @@ ippCreateRequestedArray(ipp_t *request)   // I - IPP request
     "printer-config-changes",          // IPP System
     "printer-contact-col",             // IPP System
     "printer-current-time",
-    "printer-detailed-status-messages",
+    "printer-detailed-status-messages",        // IPP EPX
     "printer-device-id",
     "printer-dns-sd-name",             // CUPS extension
     "printer-driver-installer",
@@ -1726,6 +1726,11 @@ ippCreateRequestedArray(ipp_t *request)  // I - IPP request
     "printer-fax-modem-info",          // IPP FaxOut
     "printer-fax-modem-name",          // IPP FaxOut
     "printer-fax-modem-number",                // IPP FaxOut
+    "printer-finisher",                        // IPP FIN
+    "printer-finisher-description",    // IPP FIN
+    "printer-finisher-supplies",       // IPP FIN
+    "printer-finisher-supplies-description",
+                                       // IPP FIN
     "printer-firmware-name",           // PWG 5110.1
     "printer-firmware-patches",                // PWG 5110.1
     "printer-firmware-string-version", // PWG 5110.1
@@ -1736,7 +1741,7 @@ ippCreateRequestedArray(ipp_t *request)   // I - IPP request
     "printer-icons",
     "printer-id",                      // IPP System
     "printer-info",
-    "printer-input-tray",              // IPP JPS3
+    "printer-input-tray",              // IPP NODRIVER
     "printer-is-accepting-jobs",
     "printer-is-shared",               // CUPS extension
     "printer-is-temporary",            // CUPS extension
@@ -1750,20 +1755,28 @@ ippCreateRequestedArray(ipp_t *request) // I - IPP request
     "printer-more-info",
     "printer-more-info-manufacturer",
     "printer-name",
-    "printer-native-formats",
     "printer-organization",
     "printer-organizational-unit",
-    "printer-output-tray",             // IPP JPS3
+    "printer-output-tray",             // IPP NODRIVER
+    "printer-pkcs7-public-key",                // IPP TRUSTNOONE
+    "printer-pkcs7-repertoire-configured",
+                                       // IPP TRUSTNOONE
+    "printer-pkcs7-repertoire-supported",
+                                       // IPP TRUSTNOONE
     "printer-service-type",            // IPP System
     "printer-settable-attributes-supported",
+                                       // RFC 3380
+    "printer-service-contact-col",     // IPP EPX
     "printer-state",
     "printer-state-change-date-time",
     "printer-state-change-time",
     "printer-state-message",
     "printer-state-reasons",
+    "printer-storage",                 // IPP EPX
+    "printer-storage-description",     // IPP EPX
     "printer-strings-languages-supported",
-                                       // IPP JPS3
-    "printer-strings-uri",             // IPP JPS3
+                                       // IPP NODRIVER
+    "printer-strings-uri",             // IPP NODRIVER
     "printer-supply",
     "printer-supply-description",
     "printer-supply-info-uri",
@@ -1774,9 +1787,13 @@ ippCreateRequestedArray(ipp_t *request)  // I - IPP request
     "printer-wifi-ssid",               // AirPrint extension
     "printer-wifi-state",              // AirPrint extension
     "printer-xri-supported",
+    "proof-copies-supported",          // IPP EPX
+    "proof-print-copies-supported",    // IPP EPX
     "pwg-raster-document-resolution-supported",
-    "pwg-raster-document-sheet-back",
+                                       // PWG Raster
+    "pwg-raster-document-sheet-back",  // PWG Raster
     "pwg-raster-document-type-supported",
+                                       // PWG Raster
     "queued-job-count",
     "reference-uri-schemes-supported",
     "repertoire-supported",
@@ -1792,11 +1809,14 @@ ippCreateRequestedArray(ipp_t *request) // I - IPP request
     "subordinate-printers-supported",
     "subscription-privacy-attributes", // IPP Privacy Attributes
     "subscription-privacy-scope",      // IPP Privacy Attributes
-    "urf-supported",                   // CUPS extension
+    "trimming-offset-supported",       // IPP FIN
+    "trimming-reference-edge-supported",// IPP FIN
+    "trimming-type-supported",         // IPP FIN
+    "trimming-when-supported",         // IPP FIN
+    "urf-supported",                   // AirPrint
     "uri-authentication-supported",
     "uri-security-supported",
-    "user-defined-value-supported",
-    "which-jobs-supported",
+    "which-jobs-supported",            // IPP JobExt
     "xri-authentication-supported",
     "xri-security-supported",
     "xri-uri-scheme-supported"
@@ -1848,7 +1868,7 @@ ippCreateRequestedArray(ipp_t *request)   // I - IPP request
     "notify-subscriber-user-name",
     "notify-subscriber-user-uri",
     "notify-subscription-id",
-    "notify-subscription-uuid"         // IPP JPS3
+    "notify-subscription-uuid"         // IPP NODRIVER
   };
   static const char * const subscription_template[] =
   {                                    // subscription-template group
@@ -1874,15 +1894,28 @@ ippCreateRequestedArray(ipp_t *request) // I - IPP request
   {                                    // system-description group - IPP System
     "charset-configured",
     "charset-supported",
+    "document-format-supported",
     "generated-natural-language-supported",
     "ipp-features-supported",
     "ipp-versions-supported",
+    "ippget-event-life",
+    "multiple-document-printers-supported",
     "natural-language-configured",
+    "notify-attributes-supported",
+    "notify-events-default",
+    "notify-events-supported",
+    "notify-lease-duration-default",
+    "notify-lease-duration-supported",
+    "notify-max-events-supported",
+    "notify-pull-method-supported",
     "operations-supported",
     "power-calendar-policy-col",
     "power-event-policy-col",
     "power-timeout-policy-col",
     "printer-creation-attributes-supported",
+    "printer-service-type-supported",
+    "resource-format-supported",
+    "resource-type-supported",
     "resource-settable-attributes-supported",
     "smi2699-auth-group-supported",    // PWG ippserver extension
     "smi2699-device-command-supported",        // PWG ippserver extension
@@ -1892,7 +1925,6 @@ ippCreateRequestedArray(ipp_t *request)   // I - IPP request
     "system-contact-col",
     "system-current-time",
     "system-default-printer-id",
-    "system-device-id",
     "system-geo-location",
     "system-info",
     "system-location",
@@ -1900,6 +1932,7 @@ ippCreateRequestedArray(ipp_t *request)   // I - IPP request
     "system-make-and-model",
     "system-message-from-operator",
     "system-name",
+    "system-owner-col",
     "system-settable-attributes-supported",
     "system-strings-languages-supported",
     "system-strings-uri",
@@ -1917,155 +1950,175 @@ ippCreateRequestedArray(ipp_t *request)       // I - IPP request
     "system-config-changes",
     "system-configured-printers",
     "system-configured-resources",
+    "system-firmware-name",
+    "system-firmware-patches",
+    "system-firmware-string-version",
+    "system-firmware-version",
+    "system-impressions-completed",
+    "system-impressions-completed-col",
+    "system-media-sheets-completed",
+    "system-media-sheets-completed-col",
+    "system-pages-completed",
+    "system-pages-completed-col",
+    "system-resident-application-name",
+    "system-resident-application-patches",
+    "system-resident-application-string-version",
+    "system-resident-application-version",
     "system-serial-number",
     "system-state",
     "system-state-change-date-time",
     "system-state-change-time",
     "system-state-message",
     "system-state-reasons",
+    "system-time-source-configured",
     "system-up-time",
-    "system-uuid"
+    "system-user-application-name",
+    "system-user-application-patches",
+    "system-user-application-string-version",
+    "system-user-application-version",
+    "system-uuid",
+    "xri-authentication-supported",
+    "xri-security-supported",
+    "xri-uri-scheme-supported"
   };
 
 
- /*
-  * Get the requested-attributes attribute...
-  */
-
+  // Get the requested-attributes attribute...
   op = ippGetOperation(request);
 
   if ((requested = ippFindAttribute(request, "requested-attributes", IPP_TAG_KEYWORD)) == NULL)
   {
-   /*
-    * The Get-Jobs operation defaults to "job-id" and "job-uri", all others
-    * default to "all"...
-    */
-
+    // The Get-Jobs operation defaults to "job-id" and "job-uri", and
+    // Get-Documents defaults to "document-number", while all others default to
+    // "all"...
     if (op == IPP_OP_GET_JOBS)
     {
-      ra = cupsArrayNew((cups_array_func_t)_cupsArrayStrcmp, NULL);
+      ra = cupsArrayNew(_cupsArrayStrcmp, NULL);
       cupsArrayAdd(ra, "job-id");
       cupsArrayAdd(ra, "job-uri");
 
       return (ra);
     }
+    else if (op == IPP_OP_GET_DOCUMENTS)
+    {
+      ra = cupsArrayNew(_cupsArrayStrcmp, NULL);
+      cupsArrayAdd(ra, "document-number");
+
+      return (ra);
+    }
     else
+    {
       return (NULL);
+    }
   }
 
- /*
-  * If the attribute contains a single "all" keyword, return NULL...
-  */
-
+  // If the attribute contains a single "all" keyword, return NULL...
   count = ippGetCount(requested);
   if (count == 1 && !strcmp(ippGetString(requested, 0, NULL), "all"))
     return (NULL);
 
- /*
-  * Create an array using "strcmp" as the comparison function...
-  */
-
-  ra = cupsArrayNew((cups_array_func_t)_cupsArrayStrcmp, NULL);
+  // Create an array using "strcmp" as the comparison function...
+  ra = cupsArrayNew(_cupsArrayStrcmp, NULL);
 
   for (i = 0; i < count; i ++)
   {
-    added = 0;
+    added = false;
     value = ippGetString(requested, i, NULL);
 
     if (!strcmp(value, "document-description") || (!strcmp(value, "all") && (op == IPP_OP_GET_JOB_ATTRIBUTES || op == IPP_OP_GET_JOBS || op == IPP_OP_GET_DOCUMENT_ATTRIBUTES || op == IPP_OP_GET_DOCUMENTS)))
     {
-      for (j = 0; j < (int)(sizeof(document_description) / sizeof(document_description[0])); j ++)
+      for (j = 0; j < (sizeof(document_description) / sizeof(document_description[0])); j ++)
         cupsArrayAdd(ra, (void *)document_description[j]);
 
-      added = 1;
+      added = true;
     }
 
     if (!strcmp(value, "document-template") || !strcmp(value, "all"))
     {
-      for (j = 0; j < (int)(sizeof(document_template) / sizeof(document_template[0])); j ++)
+      for (j = 0; j < (sizeof(document_template) / sizeof(document_template[0])); j ++)
         cupsArrayAdd(ra, (void *)document_template[j]);
 
-      added = 1;
+      added = true;
     }
 
     if (!strcmp(value, "job-description") || (!strcmp(value, "all") && (op == IPP_OP_GET_JOB_ATTRIBUTES || op == IPP_OP_GET_JOBS)))
     {
-      for (j = 0; j < (int)(sizeof(job_description) / sizeof(job_description[0])); j ++)
+      for (j = 0; j < (sizeof(job_description) / sizeof(job_description[0])); j ++)
         cupsArrayAdd(ra, (void *)job_description[j]);
 
-      added = 1;
+      added = true;
     }
 
     if (!strcmp(value, "job-template") || (!strcmp(value, "all") && (op == IPP_OP_GET_JOB_ATTRIBUTES || op == IPP_OP_GET_JOBS || op == IPP_OP_GET_PRINTER_ATTRIBUTES || op == IPP_OP_GET_OUTPUT_DEVICE_ATTRIBUTES)))
     {
-      for (j = 0; j < (int)(sizeof(job_template) / sizeof(job_template[0])); j ++)
+      for (j = 0; j < (sizeof(job_template) / sizeof(job_template[0])); j ++)
         cupsArrayAdd(ra, (void *)job_template[j]);
 
-      added = 1;
+      added = true;
     }
 
     if (!strcmp(value, "printer-description") || (!strcmp(value, "all") && (op == IPP_OP_GET_PRINTER_ATTRIBUTES || op == IPP_OP_GET_OUTPUT_DEVICE_ATTRIBUTES || op == IPP_OP_GET_PRINTERS || op == IPP_OP_CUPS_GET_DEFAULT || op == IPP_OP_CUPS_GET_PRINTERS || op == IPP_OP_CUPS_GET_CLASSES)))
     {
-      for (j = 0; j < (int)(sizeof(printer_description) / sizeof(printer_description[0])); j ++)
+      for (j = 0; j < (sizeof(printer_description) / sizeof(printer_description[0])); j ++)
         cupsArrayAdd(ra, (void *)printer_description[j]);
 
-      added = 1;
+      added = true;
     }
 
     if (!strcmp(value, "resource-description") || (!strcmp(value, "all") && (op == IPP_OP_GET_RESOURCE_ATTRIBUTES || op == IPP_OP_GET_RESOURCES)))
     {
-      for (j = 0; j < (int)(sizeof(resource_description) / sizeof(resource_description[0])); j ++)
+      for (j = 0; j < (sizeof(resource_description) / sizeof(resource_description[0])); j ++)
         cupsArrayAdd(ra, (void *)resource_description[j]);
 
-      added = 1;
+      added = true;
     }
 
     if (!strcmp(value, "resource-status") || (!strcmp(value, "all") && (op == IPP_OP_GET_RESOURCE_ATTRIBUTES || op == IPP_OP_GET_RESOURCES)))
     {
-      for (j = 0; j < (int)(sizeof(resource_status) / sizeof(resource_status[0])); j ++)
+      for (j = 0; j < (sizeof(resource_status) / sizeof(resource_status[0])); j ++)
         cupsArrayAdd(ra, (void *)resource_status[j]);
 
-      added = 1;
+      added = true;
     }
 
     if (!strcmp(value, "resource-template") || (!strcmp(value, "all") && (op == IPP_OP_GET_RESOURCE_ATTRIBUTES || op == IPP_OP_GET_RESOURCES || op == IPP_OP_GET_SYSTEM_ATTRIBUTES)))
     {
-      for (j = 0; j < (int)(sizeof(resource_template) / sizeof(resource_template[0])); j ++)
+      for (j = 0; j < (sizeof(resource_template) / sizeof(resource_template[0])); j ++)
         cupsArrayAdd(ra, (void *)resource_template[j]);
 
-      added = 1;
+      added = true;
     }
 
     if (!strcmp(value, "subscription-description") || (!strcmp(value, "all") && (op == IPP_OP_GET_SUBSCRIPTION_ATTRIBUTES || op == IPP_OP_GET_SUBSCRIPTIONS)))
     {
-      for (j = 0; j < (int)(sizeof(subscription_description) / sizeof(subscription_description[0])); j ++)
+      for (j = 0; j < (sizeof(subscription_description) / sizeof(subscription_description[0])); j ++)
         cupsArrayAdd(ra, (void *)subscription_description[j]);
 
-      added = 1;
+      added = true;
     }
 
     if (!strcmp(value, "subscription-template") || (!strcmp(value, "all") && (op == IPP_OP_GET_SUBSCRIPTION_ATTRIBUTES || op == IPP_OP_GET_SUBSCRIPTIONS)))
     {
-      for (j = 0; j < (int)(sizeof(subscription_template) / sizeof(subscription_template[0])); j ++)
+      for (j = 0; j < (sizeof(subscription_template) / sizeof(subscription_template[0])); j ++)
         cupsArrayAdd(ra, (void *)subscription_template[j]);
 
-      added = 1;
+      added = true;
     }
 
     if (!strcmp(value, "system-description") || (!strcmp(value, "all") && op == IPP_OP_GET_SYSTEM_ATTRIBUTES))
     {
-      for (j = 0; j < (int)(sizeof(system_description) / sizeof(system_description[0])); j ++)
+      for (j = 0; j < (sizeof(system_description) / sizeof(system_description[0])); j ++)
         cupsArrayAdd(ra, (void *)system_description[j]);
 
-      added = 1;
+      added = true;
     }
 
     if (!strcmp(value, "system-status") || (!strcmp(value, "all") && op == IPP_OP_GET_SYSTEM_ATTRIBUTES))
     {
-      for (j = 0; j < (int)(sizeof(system_status) / sizeof(system_status[0])); j ++)
+      for (j = 0; j < (sizeof(system_status) / sizeof(system_status[0])); j ++)
         cupsArrayAdd(ra, (void *)system_status[j]);
 
-      added = 1;
+      added = true;
     }
 
     if (!added)
@@ -2087,10 +2140,7 @@ ippEnumString(const char *attrname,      // I - Attribute name
   _cups_globals_t *cg = _cupsGlobals();        // Pointer to library globals
 
 
- /*
-  * Check for standard enum values...
-  */
-
+  // Check for standard enum values...
   if (!strcmp(attrname, "document-state") && enumvalue >= 3 && enumvalue < (3 + (int)(sizeof(ipp_document_states) / sizeof(ipp_document_states[0]))))
     return (ipp_document_states[enumvalue - 3]);
   else if (!strcmp(attrname, "finishings") || !strcmp(attrname, "finishings-actual") || !strcmp(attrname, "finishings-default") || !strcmp(attrname, "finishings-ready") || !strcmp(attrname, "finishings-supported") || !strcmp(attrname, "job-finishings") || !strcmp(attrname, "job-finishings-default") || !strcmp(attrname, "job-finishings-supported"))
@@ -2100,8 +2150,6 @@ ippEnumString(const char *attrname,       // I - Attribute name
     else if (enumvalue >= 0x40000000 && enumvalue < (0x40000000 + (int)(sizeof(ipp_finishings_vendor) / sizeof(ipp_finishings_vendor[0]))))
       return (ipp_finishings_vendor[enumvalue - 0x40000000]);
   }
-  else if ((!strcmp(attrname, "job-collation-type") || !strcmp(attrname, "job-collation-type-actual")) && enumvalue >= 3 && enumvalue < (3 + (int)(sizeof(ipp_job_collation_types) / sizeof(ipp_job_collation_types[0]))))
-    return (ipp_job_collation_types[enumvalue - 3]);
   else if (!strcmp(attrname, "job-state") && enumvalue >= IPP_JSTATE_PENDING && enumvalue <= IPP_JSTATE_COMPLETED)
     return (ipp_job_states[enumvalue - IPP_JSTATE_PENDING]);
   else if (!strcmp(attrname, "operations-supported"))
@@ -2117,10 +2165,7 @@ ippEnumString(const char *attrname,      // I - Attribute name
   else if (!strcmp(attrname, "system-state") && enumvalue >= IPP_SSTATE_IDLE && enumvalue <= IPP_SSTATE_STOPPED)
     return (ipp_system_states[enumvalue - IPP_SSTATE_IDLE]);
 
- /*
-  * Not a standard enum value, just return the decimal equivalent...
-  */
-
+  // Not a standard enum value, just return the decimal equivalent...
   snprintf(cg->ipp_unknown, sizeof(cg->ipp_unknown), "%d", enumvalue);
   return (cg->ipp_unknown);
 }
@@ -2130,29 +2175,23 @@ ippEnumString(const char *attrname,     // I - Attribute name
 // 'ippEnumValue()' - Return the value associated with a given enum string.
 //
 
-int                                    // O - Enum value or -1 if unknown
+int                                    // O - Enum value or `-1` if unknown
 ippEnumValue(const char *attrname,     // I - Attribute name
              const char *enumstring)   // I - Enum string
 {
-  int          i,                      // Looping var
+  size_t       i,                      // Looping var
                num_strings;            // Number of strings to compare
   const char * const *strings;         // Strings to compare
 
 
- /*
-  * If the string is just a number, return it...
-  */
-
+  // If the string is just a number, return it...
   if (isdigit(*enumstring & 255))
     return ((int)strtol(enumstring, NULL, 0));
 
- /*
-  * Otherwise look up the string...
-  */
-
+  // Otherwise look up the string...
   if (!strcmp(attrname, "document-state"))
   {
-    num_strings = (int)(sizeof(ipp_document_states) / sizeof(ipp_document_states[0]));
+    num_strings = sizeof(ipp_document_states) / sizeof(ipp_document_states[0]);
     strings     = ipp_document_states;
   }
   else if (!strcmp(attrname, "finishings") ||
@@ -2161,37 +2200,30 @@ ippEnumValue(const char *attrname,      // I - Attribute name
           !strcmp(attrname, "finishings-ready") ||
           !strcmp(attrname, "finishings-supported"))
   {
-    for (i = 0;
-         i < (int)(sizeof(ipp_finishings_vendor) /
-                   sizeof(ipp_finishings_vendor[0]));
-         i ++)
+    for (i = 0; i < (sizeof(ipp_finishings_vendor) / sizeof(ipp_finishings_vendor[0])); i ++)
+    {
       if (!strcmp(enumstring, ipp_finishings_vendor[i]))
        return (i + 0x40000000);
+    }
 
-    num_strings = (int)(sizeof(ipp_finishings) / sizeof(ipp_finishings[0]));
+    num_strings = sizeof(ipp_finishings) / sizeof(ipp_finishings[0]);
     strings     = ipp_finishings;
   }
-  else if (!strcmp(attrname, "job-collation-type") ||
-           !strcmp(attrname, "job-collation-type-actual"))
-  {
-    num_strings = (int)(sizeof(ipp_job_collation_types) /
-                        sizeof(ipp_job_collation_types[0]));
-    strings     = ipp_job_collation_types;
-  }
   else if (!strcmp(attrname, "job-state"))
   {
-    num_strings = (int)(sizeof(ipp_job_states) / sizeof(ipp_job_states[0]));
+    num_strings = sizeof(ipp_job_states) / sizeof(ipp_job_states[0]);
     strings     = ipp_job_states;
   }
   else if (!strcmp(attrname, "operations-supported"))
+  {
     return (ippOpValue(enumstring));
+  }
   else if (!strcmp(attrname, "orientation-requested") ||
            !strcmp(attrname, "orientation-requested-actual") ||
            !strcmp(attrname, "orientation-requested-default") ||
            !strcmp(attrname, "orientation-requested-supported"))
   {
-    num_strings = (int)(sizeof(ipp_orientation_requesteds) /
-                        sizeof(ipp_orientation_requesteds[0]));
+    num_strings = sizeof(ipp_orientation_requesteds) / sizeof(ipp_orientation_requesteds[0]);
     strings     = ipp_orientation_requesteds;
   }
   else if (!strcmp(attrname, "print-quality") ||
@@ -2199,30 +2231,34 @@ ippEnumValue(const char *attrname,      // I - Attribute name
            !strcmp(attrname, "print-quality-default") ||
            !strcmp(attrname, "print-quality-supported"))
   {
-    num_strings = (int)(sizeof(ipp_print_qualities) / sizeof(ipp_print_qualities[0]));
+    num_strings = sizeof(ipp_print_qualities) / sizeof(ipp_print_qualities[0]);
     strings     = ipp_print_qualities;
   }
   else if (!strcmp(attrname, "printer-state"))
   {
-    num_strings = (int)(sizeof(ipp_printer_states) / sizeof(ipp_printer_states[0]));
+    num_strings = sizeof(ipp_printer_states) / sizeof(ipp_printer_states[0]);
     strings     = ipp_printer_states;
   }
   else if (!strcmp(attrname, "resource-state"))
   {
-    num_strings = (int)(sizeof(ipp_resource_states) / sizeof(ipp_resource_states[0]));
+    num_strings = sizeof(ipp_resource_states) / sizeof(ipp_resource_states[0]);
     strings     = ipp_resource_states;
   }
   else if (!strcmp(attrname, "system-state"))
   {
-    num_strings = (int)(sizeof(ipp_system_states) / sizeof(ipp_system_states[0]));
+    num_strings = sizeof(ipp_system_states) / sizeof(ipp_system_states[0]);
     strings     = ipp_system_states;
   }
   else
+  {
     return (-1);
+  }
 
   for (i = 0; i < num_strings; i ++)
+  {
     if (!strcmp(enumstring, strings[i]))
       return (i + 3);
+  }
 
   return (-1);
 }
@@ -2238,33 +2274,21 @@ ippErrorString(ipp_status_t error)      // I - Error status
   _cups_globals_t *cg = _cupsGlobals();        // Pointer to library globals
 
 
- /*
-  * See if the error code is a known value...
-  */
-
+  // See if the error code is a known value...
   if (error >= IPP_STATUS_OK && error <= IPP_STATUS_OK_EVENTS_COMPLETE)
     return (ipp_status_oks[error]);
   else if (error == IPP_STATUS_REDIRECTION_OTHER_SITE)
     return ("redirection-other-site");
   else if (error == IPP_STATUS_CUPS_SEE_OTHER)
     return ("cups-see-other");
-  else if (error >= IPP_STATUS_ERROR_BAD_REQUEST &&
-           error <= IPP_STATUS_ERROR_ACCOUNT_AUTHORIZATION_FAILED)
+  else if (error >= IPP_STATUS_ERROR_BAD_REQUEST && error <= IPP_STATUS_ERROR_ACCOUNT_AUTHORIZATION_FAILED)
     return (ipp_status_400s[error - IPP_STATUS_ERROR_BAD_REQUEST]);
-  else if (error >= 0x480 &&
-           error <= IPP_STATUS_ERROR_CUPS_ACCOUNT_AUTHORIZATION_FAILED)
-    return (ipp_status_480s[error - 0x0480]);
-  else if (error >= IPP_STATUS_ERROR_INTERNAL &&
-           error <= IPP_STATUS_ERROR_TOO_MANY_DOCUMENTS)
+  else if (error >= IPP_STATUS_ERROR_INTERNAL && error <= IPP_STATUS_ERROR_TOO_MANY_DOCUMENTS)
     return (ipp_status_500s[error - IPP_STATUS_ERROR_INTERNAL]);
-  else if (error >= IPP_STATUS_ERROR_CUPS_AUTHENTICATION_CANCELED &&
-           error <= IPP_STATUS_ERROR_CUPS_OAUTH)
+  else if (error >= IPP_STATUS_ERROR_CUPS_AUTHENTICATION_CANCELED && error <= IPP_STATUS_ERROR_CUPS_OAUTH)
     return (ipp_status_1000s[error - IPP_STATUS_ERROR_CUPS_AUTHENTICATION_CANCELED]);
 
- /*
-  * No, build an "0xxxxx" error string...
-  */
-
+  // No, build an "0xxxxx" error string...
   snprintf(cg->ipp_unknown, sizeof(cg->ipp_unknown), "0x%04x", error);
 
   return (cg->ipp_unknown);
@@ -2284,8 +2308,10 @@ ippErrorValue(const char *name)          // I - Name
 
 
   for (i = 0; i < (sizeof(ipp_status_oks) / sizeof(ipp_status_oks[0])); i ++)
+  {
     if (!_cups_strcasecmp(name, ipp_status_oks[i]))
       return ((ipp_status_t)i);
+  }
 
   if (!_cups_strcasecmp(name, "redirection-other-site"))
     return (IPP_STATUS_REDIRECTION_OTHER_SITE);
@@ -2294,20 +2320,22 @@ ippErrorValue(const char *name)         // I - Name
     return (IPP_STATUS_CUPS_SEE_OTHER);
 
   for (i = 0; i < (sizeof(ipp_status_400s) / sizeof(ipp_status_400s[0])); i ++)
+  {
     if (!_cups_strcasecmp(name, ipp_status_400s[i]))
       return ((ipp_status_t)(i + 0x400));
-
-  for (i = 0; i < (sizeof(ipp_status_480s) / sizeof(ipp_status_480s[0])); i ++)
-    if (!_cups_strcasecmp(name, ipp_status_480s[i]))
-      return ((ipp_status_t)(i + 0x480));
+  }
 
   for (i = 0; i < (sizeof(ipp_status_500s) / sizeof(ipp_status_500s[0])); i ++)
+  {
     if (!_cups_strcasecmp(name, ipp_status_500s[i]))
       return ((ipp_status_t)(i + 0x500));
+  }
 
   for (i = 0; i < (sizeof(ipp_status_1000s) / sizeof(ipp_status_1000s[0])); i ++)
+  {
     if (!_cups_strcasecmp(name, ipp_status_1000s[i]))
       return ((ipp_status_t)(i + 0x1000));
+  }
 
   return ((ipp_status_t)-1);
 }
@@ -2348,10 +2376,7 @@ ippOpString(ipp_op_t op)         // I - Operation ID
   _cups_globals_t *cg = _cupsGlobals();        // Pointer to library globals
 
 
- /*
-  * See if the operation ID is a known value...
-  */
-
+  // See if the operation ID is a known value...
   if (op >= IPP_OP_PRINT_JOB && op < (ipp_op_t)(sizeof(ipp_std_ops) / sizeof(ipp_std_ops[0])))
     return (ipp_std_ops[op]);
   else if (op == IPP_OP_PRIVATE)
@@ -2361,10 +2386,7 @@ ippOpString(ipp_op_t op)         // I - Operation ID
   else if (op >= IPP_OP_CUPS_GET_DOCUMENT && op <= IPP_OP_CUPS_CREATE_LOCAL_PRINTER)
     return (ipp_cups_ops2[op - IPP_OP_CUPS_GET_DOCUMENT]);
 
- /*
-  * No, build an "0xxxxx" operation string...
-  */
-
+  // No, build an "0xxxxx" operation string...
   snprintf(cg->ipp_unknown, sizeof(cg->ipp_unknown), "0x%04x", op);
 
   return (cg->ipp_unknown);
@@ -2387,19 +2409,25 @@ ippOpValue(const char *name)            // I - Textual name
     return ((ipp_op_t)strtol(name + 2, NULL, 16));
 
   for (i = 0; i < (sizeof(ipp_std_ops) / sizeof(ipp_std_ops[0])); i ++)
+  {
     if (!_cups_strcasecmp(name, ipp_std_ops[i]))
       return ((ipp_op_t)i);
+  }
 
   if (!_cups_strcasecmp(name, "windows-ext"))
     return (IPP_OP_PRIVATE);
 
   for (i = 0; i < (sizeof(ipp_cups_ops) / sizeof(ipp_cups_ops[0])); i ++)
+  {
     if (!_cups_strcasecmp(name, ipp_cups_ops[i]))
       return ((ipp_op_t)(i + 0x4001));
+  }
 
   for (i = 0; i < (sizeof(ipp_cups_ops2) / sizeof(ipp_cups_ops2[0])); i ++)
+  {
     if (!_cups_strcasecmp(name, ipp_cups_ops2[i]))
       return ((ipp_op_t)(i + 0x4027));
+  }
 
   if (!_cups_strcasecmp(name, "Create-Job-Subscription"))
     return (IPP_OP_CREATE_JOB_SUBSCRIPTIONS);
@@ -2494,8 +2522,10 @@ ippTagValue(const char *name)            // I - Tag name
 
 
   for (i = 0; i < (sizeof(ipp_tag_names) / sizeof(ipp_tag_names[0])); i ++)
+  {
     if (!_cups_strcasecmp(name, ipp_tag_names[i]))
       return ((ipp_tag_t)i);
+  }
 
   if (!_cups_strcasecmp(name, "operation"))
     return (IPP_TAG_OPERATION);
index 2633e4d4f6314bd748ed71a98769d1aaacd063dc..844f273b4a565c44c6974a9d6530f7808f5a90d8 100644 (file)
@@ -20,7 +20,7 @@
 // Local functions...
 //
 
-static ipp_attribute_t *ipp_add_attr(ipp_t *ipp, const char *name, ipp_tag_t  group_tag, ipp_tag_t value_tag, int num_values);
+static ipp_attribute_t *ipp_add_attr(ipp_t *ipp, const char *name, ipp_tag_t group_tag, ipp_tag_t value_tag, int num_values);
 static void            ipp_free_values(ipp_attribute_t *attr, int element, int count);
 static char            *ipp_get_code(const char *locale, char *buffer, size_t bufsize) _CUPS_NONNULL(1,2);
 static char            *ipp_lang_code(const char *locale, char *buffer, size_t bufsize) _CUPS_NONNULL(1,2);
@@ -84,10 +84,10 @@ _cupsBufferRelease(char *b)         // I - Buffer to release
 //
 // 'ippAddBoolean()' - Add a boolean attribute to an IPP message.
 //
-// The "ipp" parameter refers to an IPP message previously created using
+// The "ipp" argument refers to an IPP message previously created using
 // the @link ippNew@, @link ippNewRequest@, or  @link ippNewResponse@ functions.
 //
-// The "group" parameter specifies the IPP attribute group tag: none
+// The "group" argument specifies the IPP attribute group tag: none
 // (`IPP_TAG_ZERO`, for member attributes), document (`IPP_TAG_DOCUMENT`),
 // event notification (`IPP_TAG_EVENT_NOTIFICATION`), operation
 // (`IPP_TAG_OPERATION`), printer (`IPP_TAG_PRINTER`), subscription
@@ -122,10 +122,10 @@ ippAddBoolean(ipp_t      *ipp,            // I - IPP message
 //
 // 'ippAddBooleans()' - Add an array of boolean values.
 //
-// The "ipp" parameter refers to an IPP message previously created using
+// The "ipp" argument refers to an IPP message previously created using
 // the @link ippNew@, @link ippNewRequest@, or  @link ippNewResponse@ functions.
 //
-// The "group" parameter specifies the IPP attribute group tag: none
+// The "group" argument specifies the IPP attribute group tag: none
 // (`IPP_TAG_ZERO`, for member attributes), document (`IPP_TAG_DOCUMENT`),
 // event notification (`IPP_TAG_EVENT_NOTIFICATION`), operation
 // (`IPP_TAG_OPERATION`), printer (`IPP_TAG_PRINTER`), subscription
@@ -167,15 +167,21 @@ ippAddBooleans(ipp_t      *ipp,           // I - IPP message
 //
 // 'ippAddCollection()' - Add a collection value.
 //
-// The "ipp" parameter refers to an IPP message previously created using
+// The "ipp" argument refers to an IPP message previously created using
 // the @link ippNew@, @link ippNewRequest@, or  @link ippNewResponse@ functions.
 //
-// The "group" parameter specifies the IPP attribute group tag: none
+// The "group" argument specifies the IPP attribute group tag: none
 // (`IPP_TAG_ZERO`, for member attributes), document (`IPP_TAG_DOCUMENT`),
 // event notification (`IPP_TAG_EVENT_NOTIFICATION`), operation
 // (`IPP_TAG_OPERATION`), printer (`IPP_TAG_PRINTER`), subscription
 // (`IPP_TAG_SUBSCRIPTION`), or unsupported (`IPP_TAG_UNSUPPORTED_GROUP`).
 //
+// The "name" argument specifies the name of the attribute, while the "value"
+// argument provides an IPP message containing the collection member attributes.
+//
+// > **Note:** You must call the @link ippDelete@ function on the "value"
+// > argument to make sure the memory used by the value is released.
+//
 // @since CUPS 1.1.19@
 //
 
@@ -210,15 +216,22 @@ ippAddCollection(ipp_t      *ipp, // I - IPP message
 //
 // 'ippAddCollections()' - Add an array of collection values.
 //
-// The "ipp" parameter refers to an IPP message previously created using
+// The "ipp" argument refers to an IPP message previously created using
 // the @link ippNew@, @link ippNewRequest@, or  @link ippNewResponse@ functions.
 //
-// The "group" parameter specifies the IPP attribute group tag: none
+// The "group" argument specifies the IPP attribute group tag: none
 // (`IPP_TAG_ZERO`, for member attributes), document (`IPP_TAG_DOCUMENT`),
 // event notification (`IPP_TAG_EVENT_NOTIFICATION`), operation
 // (`IPP_TAG_OPERATION`), printer (`IPP_TAG_PRINTER`), subscription
 // (`IPP_TAG_SUBSCRIPTION`), or unsupported (`IPP_TAG_UNSUPPORTED_GROUP`).
 //
+// The "name" argument specifies the name of the attribute, while the
+// "num_values" and "values" arguments provide IPP messages containing the
+// collection member attributes for each value.
+//
+// > **Note:** You must call the @link ippDelete@ function on each of the
+// > "values" arguments to make sure the memory used by the value is released.
+//
 // @since CUPS 1.1.19@
 //
 
@@ -264,10 +277,10 @@ ippAddCollections(
 // This function adds a 1setOf text attribute to an IPP message corresponding to
 // the specified credentials string.
 //
-// The "ipp" parameter refers to an IPP message previously created using
+// The "ipp" argument refers to an IPP message previously created using
 // the @link ippNew@, @link ippNewRequest@, or  @link ippNewResponse@ functions.
 //
-// The "group" parameter specifies the IPP attribute group tag: none
+// The "group" argument specifies the IPP attribute group tag: none
 // (`IPP_TAG_ZERO`, for member attributes), document (`IPP_TAG_DOCUMENT`),
 // event notification (`IPP_TAG_EVENT_NOTIFICATION`), operation
 // (`IPP_TAG_OPERATION`), printer (`IPP_TAG_PRINTER`), subscription
@@ -355,10 +368,10 @@ ippAddCredentialsString(
 //
 // 'ippAddDate()' - Add a dateTime attribute to an IPP message.
 //
-// The "ipp" parameter refers to an IPP message previously created using
+// The "ipp" argument refers to an IPP message previously created using
 // the @link ippNew@, @link ippNewRequest@, or  @link ippNewResponse@ functions.
 //
-// The "group" parameter specifies the IPP attribute group tag: none
+// The "group" argument specifies the IPP attribute group tag: none
 // (`IPP_TAG_ZERO`, for member attributes), document (`IPP_TAG_DOCUMENT`),
 // event notification (`IPP_TAG_EVENT_NOTIFICATION`), operation
 // (`IPP_TAG_OPERATION`), printer (`IPP_TAG_PRINTER`), subscription
@@ -395,10 +408,10 @@ ippAddDate(ipp_t             *ipp,        // I - IPP message
 //
 // This function adds an integer or enum attribute to an IPP message.
 //
-// The "ipp" parameter refers to an IPP message previously created using
+// The "ipp" argument refers to an IPP message previously created using
 // the @link ippNew@, @link ippNewRequest@, or  @link ippNewResponse@ functions.
 //
-// The "group" parameter specifies the IPP attribute group tag: none
+// The "group" argument specifies the IPP attribute group tag: none
 // (`IPP_TAG_ZERO`, for member attributes), document (`IPP_TAG_DOCUMENT`),
 // event notification (`IPP_TAG_EVENT_NOTIFICATION`), operation
 // (`IPP_TAG_OPERATION`), printer (`IPP_TAG_PRINTER`), subscription
@@ -443,10 +456,10 @@ ippAddInteger(ipp_t      *ipp,            // I - IPP message
 //
 // 'ippAddIntegers()' - Add an array of integer values.
 //
-// The "ipp" parameter refers to an IPP message previously created using
+// The "ipp" argument refers to an IPP message previously created using
 // the @link ippNew@, @link ippNewRequest@, or  @link ippNewResponse@ functions.
 //
-// The "group" parameter specifies the IPP attribute group tag: none
+// The "group" argument specifies the IPP attribute group tag: none
 // (`IPP_TAG_ZERO`, for member attributes), document (`IPP_TAG_DOCUMENT`),
 // event notification (`IPP_TAG_EVENT_NOTIFICATION`), operation
 // (`IPP_TAG_OPERATION`), printer (`IPP_TAG_PRINTER`), subscription
@@ -494,10 +507,10 @@ ippAddIntegers(ipp_t      *ipp,           // I - IPP message
 //
 // 'ippAddOctetString()' - Add an octetString value to an IPP message.
 //
-// The "ipp" parameter refers to an IPP message previously created using
+// The "ipp" argument refers to an IPP message previously created using
 // the @link ippNew@, @link ippNewRequest@, or  @link ippNewResponse@ functions.
 //
-// The "group" parameter specifies the IPP attribute group tag: none
+// The "group" argument specifies the IPP attribute group tag: none
 // (`IPP_TAG_ZERO`, for member attributes), document (`IPP_TAG_DOCUMENT`),
 // event notification (`IPP_TAG_EVENT_NOTIFICATION`), operation
 // (`IPP_TAG_OPERATION`), printer (`IPP_TAG_PRINTER`), subscription
@@ -545,10 +558,10 @@ ippAddOctetString(ipp_t      *ipp,        // I - IPP message
 //
 // 'ippAddOutOfBand()' - Add an out-of-band value to an IPP message.
 //
-// The "ipp" parameter refers to an IPP message previously created using
+// The "ipp" argument refers to an IPP message previously created using
 // the @link ippNew@, @link ippNewRequest@, or  @link ippNewResponse@ functions.
 //
-// The "group" parameter specifies the IPP attribute group tag: none
+// The "group" argument specifies the IPP attribute group tag: none
 // (`IPP_TAG_ZERO`, for member attributes), document (`IPP_TAG_DOCUMENT`),
 // event notification (`IPP_TAG_EVENT_NOTIFICATION`), operation
 // (`IPP_TAG_OPERATION`), printer (`IPP_TAG_PRINTER`), subscription
@@ -585,16 +598,16 @@ ippAddOutOfBand(ipp_t      *ipp,  // I - IPP message
 //
 // 'ippAddRange()' - Add a range of values to an IPP message.
 //
-// The "ipp" parameter refers to an IPP message previously created using
+// The "ipp" argument refers to an IPP message previously created using
 // the @link ippNew@, @link ippNewRequest@, or  @link ippNewResponse@ functions.
 //
-// The "group" parameter specifies the IPP attribute group tag: none
+// The "group" argument specifies the IPP attribute group tag: none
 // (`IPP_TAG_ZERO`, for member attributes), document (`IPP_TAG_DOCUMENT`),
 // event notification (`IPP_TAG_EVENT_NOTIFICATION`), operation
 // (`IPP_TAG_OPERATION`), printer (`IPP_TAG_PRINTER`), subscription
 // (`IPP_TAG_SUBSCRIPTION`), or unsupported (`IPP_TAG_UNSUPPORTED_GROUP`).
 //
-// The "lower" parameter must be less than or equal to the "upper" parameter.
+// The "lower" argument must be less than or equal to the "upper" argument.
 //
 
 ipp_attribute_t *                      // O - New attribute
@@ -627,10 +640,10 @@ ippAddRange(ipp_t      *ipp,              // I - IPP message
 //
 // 'ippAddRanges()' - Add ranges of values to an IPP message.
 //
-// The "ipp" parameter refers to an IPP message previously created using
+// The "ipp" argument refers to an IPP message previously created using
 // the @link ippNew@, @link ippNewRequest@, or  @link ippNewResponse@ functions.
 //
-// The "group" parameter specifies the IPP attribute group tag: none
+// The "group" argument specifies the IPP attribute group tag: none
 // (`IPP_TAG_ZERO`, for member attributes), document (`IPP_TAG_DOCUMENT`),
 // event notification (`IPP_TAG_EVENT_NOTIFICATION`), operation
 // (`IPP_TAG_OPERATION`), printer (`IPP_TAG_PRINTER`), subscription
@@ -676,10 +689,10 @@ ippAddRanges(ipp_t      *ipp,             // I - IPP message
 //
 // 'ippAddResolution()' - Add a resolution value to an IPP message.
 //
-// The "ipp" parameter refers to an IPP message previously created using
+// The "ipp" argument refers to an IPP message previously created using
 // the @link ippNew@, @link ippNewRequest@, or  @link ippNewResponse@ functions.
 //
-// The "group" parameter specifies the IPP attribute group tag: none
+// The "group" argument specifies the IPP attribute group tag: none
 // (`IPP_TAG_ZERO`, for member attributes), document (`IPP_TAG_DOCUMENT`),
 // event notification (`IPP_TAG_EVENT_NOTIFICATION`), operation
 // (`IPP_TAG_OPERATION`), printer (`IPP_TAG_PRINTER`), subscription
@@ -718,10 +731,10 @@ ippAddResolution(ipp_t      *ipp, // I - IPP message
 //
 // 'ippAddResolutions()' - Add resolution values to an IPP message.
 //
-// The "ipp" parameter refers to an IPP message previously created using
+// The "ipp" argument refers to an IPP message previously created using
 // the @link ippNew@, @link ippNewRequest@, or  @link ippNewResponse@ functions.
 //
-// The "group" parameter specifies the IPP attribute group tag: none
+// The "group" argument specifies the IPP attribute group tag: none
 // (`IPP_TAG_ZERO`, for member attributes), document (`IPP_TAG_DOCUMENT`),
 // event notification (`IPP_TAG_EVENT_NOTIFICATION`), operation
 // (`IPP_TAG_OPERATION`), printer (`IPP_TAG_PRINTER`), subscription
@@ -769,7 +782,7 @@ ippAddResolutions(ipp_t      *ipp,  // I - IPP message
 //
 // 'ippAddSeparator()' - Add a group separator to an IPP message.
 //
-// The "ipp" parameter refers to an IPP message previously created using
+// The "ipp" argument refers to an IPP message previously created using
 // the @link ippNew@, @link ippNewRequest@, or  @link ippNewResponse@ functions.
 //
 
@@ -790,10 +803,10 @@ ippAddSeparator(ipp_t *ipp)               // I - IPP message
 //
 // 'ippAddString()' - Add a language-encoded string to an IPP message.
 //
-// The "ipp" parameter refers to an IPP message previously created using
+// The "ipp" argument refers to an IPP message previously created using
 // the @link ippNew@, @link ippNewRequest@, or  @link ippNewResponse@ functions.
 //
-// The "group" parameter specifies the IPP attribute group tag: none
+// The "group" argument specifies the IPP attribute group tag: none
 // (`IPP_TAG_ZERO`, for member attributes), document (`IPP_TAG_DOCUMENT`),
 // event notification (`IPP_TAG_EVENT_NOTIFICATION`), operation
 // (`IPP_TAG_OPERATION`), printer (`IPP_TAG_PRINTER`), subscription
@@ -806,7 +819,7 @@ ippAddSeparator(ipp_t *ipp)         // I - IPP message
 // (`IPP_TAG_TEXTLANG`), uri (`IPP_TAG_URI`), and uriScheme
 // (`IPP_TAG_URISCHEME`).
 //
-// The "language" parameter must be non-`NULL` for nameWithLanguage and
+// The "language" argument must be non-`NULL` for nameWithLanguage and
 // textWithLanguage string values and must be `NULL` for all other string values.
 //
 
@@ -885,10 +898,10 @@ ippAddString(ipp_t      *ipp,             // I - IPP message
 //
 // 'ippAddStringf()' - Add a formatted string to an IPP message.
 //
-// The "ipp" parameter refers to an IPP message previously created using
+// The "ipp" argument refers to an IPP message previously created using
 // the @link ippNew@, @link ippNewRequest@, or  @link ippNewResponse@ functions.
 //
-// The "group" parameter specifies the IPP attribute group tag: none
+// The "group" argument specifies the IPP attribute group tag: none
 // (`IPP_TAG_ZERO`, for member attributes), document
 // (`IPP_TAG_DOCUMENT`), event notification
 // (`IPP_TAG_EVENT_NOTIFICATION`), operation (`IPP_TAG_OPERATION`),
@@ -902,11 +915,11 @@ ippAddString(ipp_t      *ipp,             // I - IPP message
 // (`IPP_TAG_TEXTLANG`), uri (`IPP_TAG_URI`), and uriScheme
 // (`IPP_TAG_URISCHEME`).
 //
-// The "language" parameter must be non-`NULL` for nameWithLanguage
+// The "language" argument must be non-`NULL` for nameWithLanguage
 // and textWithLanguage string values and must be `NULL` for all other
 // string values.
 //
-// The "format" parameter uses formatting characters compatible with the
+// The "format" argument uses formatting characters compatible with the
 // printf family of standard functions.  Additional arguments follow it as
 // needed.  The formatted string is truncated as needed to the maximum length of
 // the corresponding value type.
@@ -938,10 +951,10 @@ ippAddStringf(ipp_t      *ipp,            // I - IPP message
 //
 // 'ippAddStringfv()' - Add a formatted string to an IPP message.
 //
-// The "ipp" parameter refers to an IPP message previously created using
+// The "ipp" argument refers to an IPP message previously created using
 // the @link ippNew@, @link ippNewRequest@, or  @link ippNewResponse@ functions.
 //
-// The "group" parameter specifies the IPP attribute group tag: none
+// The "group" argument specifies the IPP attribute group tag: none
 // (`IPP_TAG_ZERO`, for member attributes), document
 // (`IPP_TAG_DOCUMENT`), event notification
 // (`IPP_TAG_EVENT_NOTIFICATION`), operation (`IPP_TAG_OPERATION`),
@@ -955,11 +968,11 @@ ippAddStringf(ipp_t      *ipp,            // I - IPP message
 // (`IPP_TAG_TEXTLANG`), uri (`IPP_TAG_URI`), and uriScheme
 // (`IPP_TAG_URISCHEME`).
 //
-// The "language" parameter must be non-`NULL` for nameWithLanguage
+// The "language" argument must be non-`NULL` for nameWithLanguage
 // and textWithLanguage string values and must be `NULL` for all other
 // string values.
 //
-// The "format" parameter uses formatting characters compatible with the
+// The "format" argument uses formatting characters compatible with the
 // printf family of standard functions.  Additional arguments are passed in the
 // stdarg pointer "ap".  The formatted string is truncated as needed to the
 // maximum length of the corresponding value type.
@@ -1077,10 +1090,10 @@ ippAddStringfv(ipp_t      *ipp,         // I - IPP message
 //
 // 'ippAddStrings()' - Add language-encoded strings to an IPP message.
 //
-// The "ipp" parameter refers to an IPP message previously created using
+// The "ipp" argument refers to an IPP message previously created using
 // the @link ippNew@, @link ippNewRequest@, or  @link ippNewResponse@ functions.
 //
-// The "group" parameter specifies the IPP attribute group tag: none
+// The "group" argument specifies the IPP attribute group tag: none
 // (`IPP_TAG_ZERO`, for member attributes), document (`IPP_TAG_DOCUMENT`),
 // event notification (`IPP_TAG_EVENT_NOTIFICATION`), operation
 // (`IPP_TAG_OPERATION`), printer (`IPP_TAG_PRINTER`), subscription
@@ -1093,7 +1106,7 @@ ippAddStringfv(ipp_t      *ipp,           // I - IPP message
 // (`IPP_TAG_TEXTLANG`), uri (`IPP_TAG_URI`), and uriScheme
 // (`IPP_TAG_URISCHEME`).
 //
-// The "language" parameter must be non-`NULL` for nameWithLanguage and
+// The "language" argument must be non-`NULL` for nameWithLanguage and
 // textWithLanguage string values and must be `NULL` for all other string values.
 //
 
@@ -1201,9 +1214,9 @@ ippAddStrings(
 // 'ippContainsInteger()' - Determine whether an attribute contains the
 //                          specified value or is within the list of ranges.
 //
-// Returns non-zero when the attribute contains either a matching integer or
-// enum value, or the value falls within one of the rangeOfInteger values for
-// the attribute.
+// This function returns non-zero when the attribute contains either a matching
+// integer or enum value, or the value falls within one of the rangeOfInteger
+// values for the attribute.
 //
 // @since CUPS 1.7@
 //
@@ -1252,8 +1265,9 @@ ippContainsInteger(
 // 'ippContainsString()' - Determine whether an attribute contains the
 //                         specified string value.
 //
-// Returns non-zero when the attribute contains a matching charset, keyword,
-// naturalLanguage, mimeMediaType, name, text, uri, or uriScheme value.
+// This function returns non-zero when the attribute contains a matching
+// charset, keyword, naturalLanguage, mimeMediaType, name, text, uri, or
+// uriScheme value.
 //
 // @since CUPS 1.7@
 //
@@ -1296,6 +1310,7 @@ ippContainsString(
            return (1);
          }
         }
+        break;
 
     case IPP_TAG_MIMETYPE :
     case IPP_TAG_NAME :
@@ -1312,6 +1327,7 @@ ippContainsString(
            return (1);
          }
         }
+        break;
 
     default :
         break;
@@ -1326,10 +1342,10 @@ ippContainsString(
 //
 // 'ippCopyAttribute()' - Copy an attribute.
 //
-// The specified attribute, @code attr@, is copied to the destination IPP message.
-// When "quickcopy" is non-zero, a "shallow" reference copy of the attribute is
-// created - this should only be done as long as the original source IPP message will
-// not be freed for the life of the destination.
+// This function copies an attribute to another IPP message.  When "quickcopy"
+// is non-zero, a shallow reference copy of the attribute is created - this
+// should only be done as long as the original source IPP message will not be
+// freed for the life of the destination.
 //
 // @since CUPS 1.6@
 //
@@ -1338,7 +1354,7 @@ ipp_attribute_t *                 // O - New attribute
 ippCopyAttribute(
     ipp_t           *dst,              // I - Destination IPP message
     ipp_attribute_t *srcattr,          // I - Attribute to copy
-    int             quickcopy)         // I - 1 for a referenced copy, 0 for normal
+    int             quickcopy)         // I - `1` for a referenced copy, `0` for a new copy
 {
   int                  i;              // Looping var
   ipp_tag_t            srctag,         // Source value tag
@@ -1502,32 +1518,33 @@ ippCopyAttribute(
 //
 // 'ippCopyAttributes()' - Copy attributes from one IPP message to another.
 //
-// Zero or more attributes are copied from the source IPP message "src" to the
-// destination IPP message "dst". When "quickcopy" is non-zero, a "shallow"
-// reference copy of the attribute is created - this should only be done as long
-// as the original source IPP message will not be freed for the life of the
+// This function copies zero or more attributes from the source to the
+// destination IPP message.  When "quickcopy" is non-zero, a shallow reference
+// copy of the attribute is created - this should only be done as long as the
+// original source IPP message will not be freed for the life of the
 // destination.
 //
-// The "cb" and "context" parameters provide a generic way to "filter" the
-// attributes that are copied - the function must return 1 to copy the attribute or
-// 0 to skip it. The function may also choose to do a partial copy of the source attribute
-// itself.
+// The "cb" and "cb_data" arguments provide a generic way to "filter" the
+// attributes that are copied - the function must return `1` to copy the
+// attribute or `0` to skip it.  The function may also choose to do a
+// partial copy of the source attribute itself and return `0` to tell this
+// function to skip it.
 //
 // @since CUPS 1.6@
 //
 
-int                                    // O - 1 on success, 0 on error
+int                                    // O - `1` on success, `0` on error
 ippCopyAttributes(
     ipp_t         *dst,                        // I - Destination IPP message
     ipp_t         *src,                        // I - Source IPP message
-    int           quickcopy,           // I - 1 for a referenced copy, 0 for normal
+    int           quickcopy,           // I - `1` for a referenced copy, `0` for normal
     ipp_copy_cb_t cb,                  // I - Copy callback or `NULL` for none
-    void          *context)            // I - Context pointer
+    void          *cb_data)            // I - Callback data pointer
 {
   ipp_attribute_t      *srcattr;       // Source attribute
 
 
-  DEBUG_printf("ippCopyAttributes(dst=%p, src=%p, quickcopy=%d, cb=%p, context=%p)", (void *)dst, (void *)src, quickcopy, (void *)cb, context);
+  DEBUG_printf("ippCopyAttributes(dst=%p, src=%p, quickcopy=%d, cb=%p, cb_data=%p)", (void *)dst, (void *)src, quickcopy, (void *)cb, cb_data);
 
   // Range check input...
   if (!dst || !src)
@@ -1536,9 +1553,11 @@ ippCopyAttributes(
   // Loop through source attributes and copy as needed...
   for (srcattr = src->attrs; srcattr; srcattr = srcattr->next)
   {
-    if (!cb || (*cb)(context, dst, srcattr))
+    if (!cb || (*cb)(cb_data, dst, srcattr))
+    {
       if (!ippCopyAttribute(dst, srcattr, quickcopy))
         return (0);
+    }
   }
 
   return (1);
@@ -1776,10 +1795,10 @@ ippDeleteAttribute(
 // 'ippDeleteValues()' - Delete values in an attribute.
 //
 // This function deletes one or more values in an attribute.  The "element"
-// parameter specifies the first value to delete, starting at 0. It must be
+// argument specifies the first value to delete, starting at `0`. It must be
 // less than the number of values returned by @link ippGetCount@.
 //
-// The "attr" parameter may be modified as a result of setting the value,
+// The "attr" argument may be modified as a result of setting the value,
 // which will set the variable to `NULL`.
 //
 // Deleting all values in an attribute deletes the attribute.
@@ -1787,11 +1806,11 @@ ippDeleteAttribute(
 // @since CUPS 1.6@
 //
 
-int                                    // O  - 1 on success, 0 on failure
+int                                    // O  - `1` on success, `0` on failure
 ippDeleteValues(
     ipp_t           *ipp,              // I  - IPP message
     ipp_attribute_t **attr,            // IO - Attribute
-    int             element,           // I  - Index of first value to delete (0-based)
+    int             element,           // I  - Index of first value to delete (`0`-based)
     int             count)             // I  - Number of values to delete
 {
   // Range check input...
@@ -1814,7 +1833,7 @@ ippDeleteValues(
 
 
 //
-// 'ippFindAttribute()' - Find a named attribute in a request.
+// 'ippFindAttribute()' - Find a named attribute in an IPP message.
 //
 // This function finds the first occurrence of a named attribute in an IPP
 // message.  The attribute name can contain a hierarchical list of attribute and
@@ -1843,7 +1862,7 @@ ippFindAttribute(ipp_t      *ipp, // I - IPP message
 
 
 //
-// 'ippFindNextAttribute()' - Find the next named attribute in a request.
+// 'ippFindNextAttribute()' - Find the next named attribute in an IPP message.
 //
 // This function finds the next named attribute in an IPP message.  The
 // attribute name can contain a hierarchical list of attribute and member names
@@ -1979,15 +1998,15 @@ ippFirstAttribute(ipp_t *ipp)           // I - IPP message
 //
 // 'ippGetBoolean()' - Get a boolean value for an attribute.
 //
-// The "element" parameter specifies which value to get from 0 to
-// @code ippGetCount(attr)@ - 1.
+// The "element" argument specifies which value to get from `0` to
+// `ippGetCount(attr) - 1`.
 //
 // @since CUPS 1.6@
 //
 
-int                                    // O - Boolean value or 0 on error
+int                                    // O - Boolean value or `0` on error
 ippGetBoolean(ipp_attribute_t *attr,   // I - IPP attribute
-              int             element) // I - Value number (0-based)
+              int             element) // I - Value number (`0`-based)
 {
   // Range check input...
   if (!attr || attr->value_tag != IPP_TAG_BOOLEAN || element < 0 || element >= attr->num_values)
@@ -2001,8 +2020,8 @@ ippGetBoolean(ipp_attribute_t *attr,      // I - IPP attribute
 //
 // 'ippGetCollection()' - Get a collection value for an attribute.
 //
-// The "element" parameter specifies which value to get from 0 to
-// @code ippGetCount(attr)@ - 1.
+// The "element" argument specifies which value to get from `0` to
+// `ippGetCount(attr) - 1`.
 //
 // @since CUPS 1.6@
 //
@@ -2010,7 +2029,7 @@ ippGetBoolean(ipp_attribute_t *attr,      // I - IPP attribute
 ipp_t *                                        // O - Collection value or `NULL` on error
 ippGetCollection(
     ipp_attribute_t *attr,             // I - IPP attribute
-    int             element)           // I - Value number (0-based)
+    int             element)           // I - Value number (`0`-based)
 {
   // Range check input...
   if (!attr || attr->value_tag != IPP_TAG_BEGIN_COLLECTION || element < 0 || element >= attr->num_values)
@@ -2042,15 +2061,15 @@ ippGetCount(ipp_attribute_t *attr)      // I - IPP attribute
 //
 // 'ippGetDate()' - Get a dateTime value for an attribute.
 //
-// The "element" parameter specifies which value to get from 0 to
-// @code ippGetCount(attr)@ - 1.
+// The "element" argument specifies which value to get from `0` to
+// `ippGetCount(attr) - 1`.
 //
 // @since CUPS 1.6@
 //
 
 const ipp_uchar_t *                    // O - dateTime value or `NULL`
 ippGetDate(ipp_attribute_t *attr,      // I - IPP attribute
-           int             element)    // I - Value number (0-based)
+           int             element)    // I - Value number (`0`-based)
 {
   // Range check input...
   if (!attr || attr->value_tag != IPP_TAG_DATE || element < 0 || element >= attr->num_values)
@@ -2107,15 +2126,15 @@ ippGetGroupTag(ipp_attribute_t *attr)   // I - IPP attribute
 //
 // 'ippGetInteger()' - Get the integer/enum value for an attribute.
 //
-// The "element" parameter specifies which value to get from 0 to
-// @code ippGetCount(attr)@ - 1.
+// The "element" argument specifies which value to get from `0` to
+// `ippGetCount(attr) - 1`.
 //
 // @since CUPS 1.6@
 //
 
 int                                    // O - Value or 0 on error
 ippGetInteger(ipp_attribute_t *attr,   // I - IPP attribute
-              int             element) // I - Value number (0-based)
+              int             element) // I - Value number (`0`-based)
 {
   // Range check input...
   if (!attr || (attr->value_tag != IPP_TAG_INTEGER && attr->value_tag != IPP_TAG_ENUM) || element < 0 || element >= attr->num_values)
@@ -2179,8 +2198,8 @@ ippGetNextAttribute(ipp_t *ipp)           // I - IPP message
 //
 // 'ippGetOctetString()' - Get an octetString value from an IPP attribute.
 //
-// The "element" parameter specifies which value to get from 0 to
-// @code ippGetCount(attr)@ - 1.
+// The "element" argument specifies which value to get from `0` to
+// `ippGetCount(attr) - 1`.
 //
 // @since CUPS 1.7@
 //
@@ -2188,7 +2207,7 @@ ippGetNextAttribute(ipp_t *ipp)           // I - IPP message
 void *                                 // O - Pointer to octetString data
 ippGetOctetString(
     ipp_attribute_t *attr,             // I - IPP attribute
-    int             element,           // I - Value number (0-based)
+    int             element,           // I - Value number (`0`-based)
     int             *datalen)          // O - Length of octetString data
 {
   // Range check input...
@@ -2229,15 +2248,15 @@ ippGetOperation(ipp_t *ipp)             // I - IPP request message
 //
 // 'ippGetRange()' - Get a rangeOfInteger value from an attribute.
 //
-// The "element" parameter specifies which value to get from 0 to
-// @code ippGetCount(attr)@ - 1.
+// The "element" argument specifies which value to get from `0` to
+// `ippGetCount(attr) - 1`.
 //
 // @since CUPS 1.6@
 //
 
 int                                    // O - Lower value of range or 0
 ippGetRange(ipp_attribute_t *attr,     // I - IPP attribute
-           int             element,    // I - Value number (0-based)
+           int             element,    // I - Value number (`0`-based)
            int             *uppervalue)// O - Upper value of range
 {
   // Range check input...
@@ -2278,8 +2297,8 @@ ippGetRequestId(ipp_t *ipp)               // I - IPP message
 //
 // 'ippGetResolution()' - Get a resolution value for an attribute.
 //
-// The "element" parameter specifies which value to get from 0 to
-// @code ippGetCount(attr)@ - 1.
+// The "element" argument specifies which value to get from `0` to
+// `ippGetCount(attr) - 1`.
 //
 // @since CUPS 1.6@
 //
@@ -2287,7 +2306,7 @@ ippGetRequestId(ipp_t *ipp)               // I - IPP message
 int                                    // O - Horizontal/cross feed resolution or 0
 ippGetResolution(
     ipp_attribute_t *attr,             // I - IPP attribute
-    int             element,           // I - Value number (0-based)
+    int             element,           // I - Value number (`0`-based)
     int             *yres,             // O - Vertical/feed resolution
     ipp_res_t       *units)            // O - Units for resolution
 {
@@ -2353,15 +2372,15 @@ ippGetStatusCode(ipp_t *ipp)            // I - IPP response or event message
 //
 // 'ippGetString()' - Get the string and optionally the language code for an attribute.
 //
-// The "element" parameter specifies which value to get from 0 to
-// @code ippGetCount(attr)@ - 1.
+// The "element" argument specifies which value to get from `0` to
+// `ippGetCount(attr) - 1`.
 //
 // @since CUPS 1.6@
 //
 
 const char *
 ippGetString(ipp_attribute_t *attr,    // I - IPP attribute
-             int             element,  // I - Value number (0-based)
+             int             element,  // I - Value number (`0`-based)
             const char      **language)// O - Language code (`NULL` for don't care)
 {
   ipp_tag_t    tag;                    // Value tag
@@ -2701,21 +2720,21 @@ ippSave(ipp_t *ipp)                     // I - IPP message
 //
 // 'ippSetBoolean()' - Set a boolean value in an attribute.
 //
-// The "ipp" parameter refers to an IPP message previously created using
+// The "ipp" argument refers to an IPP message previously created using
 // the @link ippNew@, @link ippNewRequest@, or  @link ippNewResponse@ functions.
 //
-// The "attr" parameter may be modified as a result of setting the value.
+// The "attr" argument may be modified as a result of setting the value.
 //
-// The "element" parameter specifies which value to set from 0 to
-// @code ippGetCount(attr)@.
+// The "element" argument specifies which value to set from `0` to
+// `ippGetCount(attr)`.
 //
 // @since CUPS 1.6@
 //
 
-int                                    // O  - 1 on success, 0 on failure
+int                                    // O  - `1` on success, `0` on failure
 ippSetBoolean(ipp_t           *ipp,    // I  - IPP message
               ipp_attribute_t **attr,  // IO - IPP attribute
-              int             element, // I  - Value number (0-based)
+              int             element, // I  - Value number (`0`-based)
               int             boolvalue)// I  - Boolean value
 {
   _ipp_value_t *value;                 // Current value
@@ -2736,22 +2755,22 @@ ippSetBoolean(ipp_t           *ipp,     // I  - IPP message
 //
 // 'ippSetCollection()' - Set a collection value in an attribute.
 //
-// The "ipp" parameter refers to an IPP message previously created using
+// The "ipp" argument refers to an IPP message previously created using
 // the @link ippNew@, @link ippNewRequest@, or  @link ippNewResponse@ functions.
 //
-// The "attr" parameter may be modified as a result of setting the value.
+// The "attr" argument may be modified as a result of setting the value.
 //
-// The "element" parameter specifies which value to set from 0 to
-// @code ippGetCount(attr)@.
+// The "element" argument specifies which value to set from `0` to
+// `ippGetCount(attr)`.
 //
 // @since CUPS 1.6@
 //
 
-int                                    // O  - 1 on success, 0 on failure
+int                                    // O  - `1` on success, `0` on failure
 ippSetCollection(
     ipp_t           *ipp,              // I  - IPP message
     ipp_attribute_t **attr,            // IO - IPP attribute
-    int             element,           // I  - Value number (0-based)
+    int             element,           // I  - Value number (`0`-based)
     ipp_t           *colvalue)         // I  - Collection value
 {
   _ipp_value_t *value;                 // Current value
@@ -2778,21 +2797,21 @@ ippSetCollection(
 //
 // 'ippSetDate()' - Set a dateTime value in an attribute.
 //
-// The "ipp" parameter refers to an IPP message previously created using
+// The "ipp" argument refers to an IPP message previously created using
 // the @link ippNew@, @link ippNewRequest@, or  @link ippNewResponse@ functions.
 //
-// The "attr" parameter may be modified as a result of setting the value.
+// The "attr" argument may be modified as a result of setting the value.
 //
-// The "element" parameter specifies which value to set from 0 to
-// @code ippGetCount(attr)@.
+// The "element" argument specifies which value to set from `0` to
+// `ippGetCount(attr)`.
 //
 // @since CUPS 1.6@
 //
 
-int                                    // O  - 1 on success, 0 on failure
+int                                    // O  - `1` on success, `0` on failure
 ippSetDate(ipp_t             *ipp,     // I  - IPP message
            ipp_attribute_t   **attr,   // IO - IPP attribute
-           int               element,  // I  - Value number (0-based)
+           int               element,  // I  - Value number (`0`-based)
            const ipp_uchar_t *datevalue)// I  - dateTime value
 {
   _ipp_value_t *value;                 // Current value
@@ -2816,12 +2835,12 @@ ippSetDate(ipp_t             *ipp,      // I  - IPP message
 //
 // 'ippSetGroupTag()' - Set the group tag of an attribute.
 //
-// The "ipp" parameter refers to an IPP message previously created using
+// The "ipp" argument refers to an IPP message previously created using
 // the @link ippNew@, @link ippNewRequest@, or  @link ippNewResponse@ functions.
 //
-// The "attr" parameter may be modified as a result of setting the value.
+// The "attr" argument may be modified as a result of setting the value.
 //
-// The "group" parameter specifies the IPP attribute group tag: none
+// The "group" argument specifies the IPP attribute group tag: none
 // (`IPP_TAG_ZERO`, for member attributes), document (`IPP_TAG_DOCUMENT`),
 // event notification (`IPP_TAG_EVENT_NOTIFICATION`), operation
 // (`IPP_TAG_OPERATION`), printer (`IPP_TAG_PRINTER`), subscription
@@ -2830,7 +2849,7 @@ ippSetDate(ipp_t             *ipp,        // I  - IPP message
 // @since CUPS 1.6@
 //
 
-int                                    // O  - 1 on success, 0 on failure
+int                                    // O  - `1` on success, `0` on failure
 ippSetGroupTag(
     ipp_t           *ipp,              // I  - IPP message
     ipp_attribute_t **attr,            // IO - Attribute
@@ -2850,21 +2869,21 @@ ippSetGroupTag(
 //
 // 'ippSetInteger()' - Set an integer or enum value in an attribute.
 //
-// The "ipp" parameter refers to an IPP message previously created using
+// The "ipp" argument refers to an IPP message previously created using
 // the @link ippNew@, @link ippNewRequest@, or  @link ippNewResponse@ functions.
 //
-// The "attr" parameter may be modified as a result of setting the value.
+// The "attr" argument may be modified as a result of setting the value.
 //
-// The "element" parameter specifies which value to set from 0 to
-// @code ippGetCount(attr)@.
+// The "element" argument specifies which value to set from `0` to
+// `ippGetCount(attr)`.
 //
 // @since CUPS 1.6@
 //
 
-int                                    // O  - 1 on success, 0 on failure
+int                                    // O  - `1` on success, `0` on failure
 ippSetInteger(ipp_t           *ipp,    // I  - IPP message
               ipp_attribute_t **attr,  // IO - IPP attribute
-              int             element, // I  - Value number (0-based)
+              int             element, // I  - Value number (`0`-based)
               int             intvalue)        // I  - Integer/enum value
 {
   _ipp_value_t *value;                 // Current value
@@ -2890,15 +2909,15 @@ ippSetInteger(ipp_t           *ipp,     // I  - IPP message
 //
 // 'ippSetName()' - Set the name of an attribute.
 //
-// The "ipp" parameter refers to an IPP message previously created using
+// The "ipp" argument refers to an IPP message previously created using
 // the @link ippNew@, @link ippNewRequest@, or  @link ippNewResponse@ functions.
 //
-// The "attr" parameter may be modified as a result of setting the value.
+// The "attr" argument may be modified as a result of setting the value.
 //
 // @since CUPS 1.6@
 //
 
-int                                    // O  - 1 on success, 0 on failure
+int                                    // O  - `1` on success, `0` on failure
 ippSetName(ipp_t           *ipp,       // I  - IPP message
           ipp_attribute_t **attr,      // IO - IPP attribute
           const char      *name)       // I  - Attribute name
@@ -2926,22 +2945,22 @@ ippSetName(ipp_t           *ipp,        // I  - IPP message
 //
 // 'ippSetOctetString()' - Set an octetString value in an IPP attribute.
 //
-// The "ipp" parameter refers to an IPP message previously created using
+// The "ipp" argument refers to an IPP message previously created using
 // the @link ippNew@, @link ippNewRequest@, or  @link ippNewResponse@ functions.
 //
-// The "attr" parameter may be modified as a result of setting the value.
+// The "attr" argument may be modified as a result of setting the value.
 //
-// The "element" parameter specifies which value to set from 0 to
-// @code ippGetCount(attr)@.
+// The "element" argument specifies which value to set from `0` to
+// `ippGetCount(attr)`.
 //
 // @since CUPS 1.7@
 //
 
-int                                    // O  - 1 on success, 0 on failure
+int                                    // O  - `1` on success, `0` on failure
 ippSetOctetString(
     ipp_t           *ipp,              // I  - IPP message
     ipp_attribute_t **attr,            // IO - IPP attribute
-    int             element,           // I  - Value number (0-based)
+    int             element,           // I  - Value number (`0`-based)
     const void      *data,             // I  - Pointer to octetString data
     int             datalen)           // I  - Length of octetString data
 {
@@ -3001,13 +3020,13 @@ ippSetOctetString(
 //
 // 'ippSetOperation()' - Set the operation ID in an IPP request message.
 //
-// The "ipp" parameter refers to an IPP message previously created using
+// The "ipp" argument refers to an IPP message previously created using
 // the @link ippNew@, @link ippNewRequest@, or  @link ippNewResponse@ functions.
 //
 // @since CUPS 1.6@
 //
 
-int                                    // O - 1 on success, 0 on failure
+int                                    // O - `1` on success, `0` on failure
 ippSetOperation(ipp_t    *ipp,         // I - IPP request message
                 ipp_op_t op)           // I - Operation ID
 {
@@ -3025,21 +3044,21 @@ ippSetOperation(ipp_t    *ipp,          // I - IPP request message
 //
 // 'ippSetRange()' - Set a rangeOfInteger value in an attribute.
 //
-// The "ipp" parameter refers to an IPP message previously created using
+// The "ipp" argument refers to an IPP message previously created using
 // the @link ippNew@, @link ippNewRequest@, or  @link ippNewResponse@ functions.
 //
-// The "attr" parameter may be modified as a result of setting the value.
+// The "attr" argument may be modified as a result of setting the value.
 //
-// The "element" parameter specifies which value to set from 0 to
-// @code ippGetCount(attr)@.
+// The "element" argument specifies which value to set from `0` to
+// `ippGetCount(attr)`.
 //
 // @since CUPS 1.6@
 //
 
-int                                    // O  - 1 on success, 0 on failure
+int                                    // O  - `1` on success, `0` on failure
 ippSetRange(ipp_t           *ipp,      // I  - IPP message
             ipp_attribute_t **attr,    // IO - IPP attribute
-            int             element,   // I  - Value number (0-based)
+            int             element,   // I  - Value number (`0`-based)
            int             lowervalue, // I  - Lower bound for range
            int             uppervalue) // I  - Upper bound for range
 {
@@ -3065,15 +3084,15 @@ ippSetRange(ipp_t           *ipp,       // I  - IPP message
 //
 // 'ippSetRequestId()' - Set the request ID in an IPP message.
 //
-// The "ipp" parameter refers to an IPP message previously created using
+// The "ipp" argument refers to an IPP message previously created using
 // the @link ippNew@, @link ippNewRequest@, or  @link ippNewResponse@ functions.
 //
-// The @code request_id@ parameter must be greater than 0.
+// The "request_id" argument must be greater than 0.
 //
 // @since CUPS 1.6@
 //
 
-int                                    // O - 1 on success, 0 on failure
+int                                    // O - `1` on success, `0` on failure
 ippSetRequestId(ipp_t *ipp,            // I - IPP message
                 int   request_id)      // I - Request ID
 {
@@ -3093,22 +3112,22 @@ ippSetRequestId(ipp_t *ipp,             // I - IPP message
 //
 // 'ippSetResolution()' - Set a resolution value in an attribute.
 //
-// The "ipp" parameter refers to an IPP message previously created using
+// The "ipp" argument refers to an IPP message previously created using
 // the @link ippNew@, @link ippNewRequest@, or  @link ippNewResponse@ functions.
 //
-// The "attr" parameter may be modified as a result of setting the value.
+// The "attr" argument may be modified as a result of setting the value.
 //
-// The "element" parameter specifies which value to set from 0 to
-// @code ippGetCount(attr)@.
+// The "element" argument specifies which value to set from `0` to
+// `ippGetCount(attr)`.
 //
 // @since CUPS 1.6@
 //
 
-int                                    // O  - 1 on success, 0 on failure
+int                                    // O  - `1` on success, `0` on failure
 ippSetResolution(
     ipp_t           *ipp,              // I  - IPP message
     ipp_attribute_t **attr,            // IO - IPP attribute
-    int             element,           // I  - Value number (0-based)
+    int             element,           // I  - Value number (`0`-based)
     ipp_res_t       unitsvalue,                // I  - Resolution units
     int             xresvalue,         // I  - Horizontal/cross feed resolution
     int             yresvalue)         // I  - Vertical/feed resolution
@@ -3139,7 +3158,7 @@ ippSetResolution(
 // @since CUPS 1.6@
 //
 
-int                                    // O - 1 on success, 0 on failure
+int                                    // O - `1` on success, `0` on failure
 ippSetState(ipp_t       *ipp,          // I - IPP message
             ipp_state_t state)         // I - IPP state value
 {
@@ -3158,13 +3177,13 @@ ippSetState(ipp_t       *ipp,           // I - IPP message
 //
 // 'ippSetStatusCode()' - Set the status code in an IPP response or event message.
 //
-// The "ipp" parameter refers to an IPP message previously created using
+// The "ipp" argument refers to an IPP message previously created using
 // the @link ippNew@, @link ippNewRequest@, or  @link ippNewResponse@ functions.
 //
 // @since CUPS 1.6@
 //
 
-int                                    // O - 1 on success, 0 on failure
+int                                    // O - `1` on success, `0` on failure
 ippSetStatusCode(ipp_t        *ipp,    // I - IPP response or event message
                  ipp_status_t status)  // I - Status code
 {
@@ -3182,21 +3201,21 @@ ippSetStatusCode(ipp_t        *ipp,     // I - IPP response or event message
 //
 // 'ippSetString()' - Set a string value in an attribute.
 //
-// The "ipp" parameter refers to an IPP message previously created using
+// The "ipp" argument refers to an IPP message previously created using
 // the @link ippNew@, @link ippNewRequest@, or  @link ippNewResponse@ functions.
 //
-// The "attr" parameter may be modified as a result of setting the value.
+// The "attr" argument may be modified as a result of setting the value.
 //
-// The "element" parameter specifies which value to set from 0 to
-// @code ippGetCount(attr)@.
+// The "element" argument specifies which value to set from `0` to
+// `ippGetCount(attr)`.
 //
 // @since CUPS 1.6@
 //
 
-int                                    // O  - 1 on success, 0 on failure
+int                                    // O  - `1` on success, `0` on failure
 ippSetString(ipp_t           *ipp,     // I  - IPP message
              ipp_attribute_t **attr,   // IO - IPP attribute
-             int             element,  // I  - Value number (0-based)
+             int             element,  // I  - Value number (`0`-based)
             const char      *strvalue) // I  - String value
 {
   char         *temp;                  // Temporary string
@@ -3246,15 +3265,15 @@ ippSetString(ipp_t           *ipp,      // I  - IPP message
 //
 // 'ippSetStringf()' - Set a formatted string value of an attribute.
 //
-// The "ipp" parameter refers to an IPP message previously created using
+// The "ipp" argument refers to an IPP message previously created using
 // the @link ippNew@, @link ippNewRequest@, or  @link ippNewResponse@ functions.
 //
-// The "attr" parameter may be modified as a result of setting the value.
+// The "attr" argument may be modified as a result of setting the value.
 //
-// The "element" parameter specifies which value to set from 0 to
-// @code ippGetCount(attr)@.
+// The "element" argument specifies which value to set from `0` to
+// `ippGetCount(attr)`.
 //
-// The "format" parameter uses formatting characters compatible with the
+// The "format" argument uses formatting characters compatible with the
 // printf family of standard functions.  Additional arguments follow it as
 // needed.  The formatted string is truncated as needed to the maximum length of
 // the corresponding value type.
@@ -3262,10 +3281,10 @@ ippSetString(ipp_t           *ipp,      // I  - IPP message
 // @since CUPS 1.7@
 //
 
-int                                    // O  - 1 on success, 0 on failure
+int                                    // O  - `1` on success, `0` on failure
 ippSetStringf(ipp_t           *ipp,    // I  - IPP message
               ipp_attribute_t **attr,  // IO - IPP attribute
-              int             element, // I  - Value number (0-based)
+              int             element, // I  - Value number (`0`-based)
              const char      *format,  // I  - Printf-style format string
              ...)                      // I  - Additional arguments as needed
 {
@@ -3284,15 +3303,15 @@ ippSetStringf(ipp_t           *ipp,     // I  - IPP message
 //
 // 'ippSetStringf()' - Set a formatted string value of an attribute.
 //
-// The "ipp" parameter refers to an IPP message previously created using
+// The "ipp" argument refers to an IPP message previously created using
 // the @link ippNew@, @link ippNewRequest@, or  @link ippNewResponse@ functions.
 //
-// The "attr" parameter may be modified as a result of setting the value.
+// The "attr" argument may be modified as a result of setting the value.
 //
-// The "element" parameter specifies which value to set from 0 to
-// @code ippGetCount(attr)@.
+// The "element" argument specifies which value to set from `0` to
+// `ippGetCount(attr)`.
 //
-// The "format" parameter uses formatting characters compatible with the
+// The "format" argument uses formatting characters compatible with the
 // printf family of standard functions.  Additional arguments follow it as
 // needed.  The formatted string is truncated as needed to the maximum length of
 // the corresponding value type.
@@ -3300,10 +3319,10 @@ ippSetStringf(ipp_t           *ipp,     // I  - IPP message
 // @since CUPS 1.7@
 //
 
-int                                    // O  - 1 on success, 0 on failure
+int                                    // O  - `1` on success, `0` on failure
 ippSetStringfv(ipp_t           *ipp,   // I  - IPP message
                ipp_attribute_t **attr, // IO - IPP attribute
-               int             element,        // I  - Value number (0-based)
+               int             element,        // I  - Value number (`0`-based)
               const char      *format, // I  - Printf-style format string
               va_list         ap)      // I  - Pointer to additional arguments
 {
@@ -3413,10 +3432,10 @@ ippSetStringfv(ipp_t           *ipp,    // I  - IPP message
 //
 // 'ippSetValueTag()' - Set the value tag of an attribute.
 //
-// The "ipp" parameter refers to an IPP message previously created using
+// The "ipp" argument refers to an IPP message previously created using
 // the @link ippNew@, @link ippNewRequest@, or  @link ippNewResponse@ functions.
 //
-// The "attr" parameter may be modified as a result of setting the value.
+// The "attr" argument may be modified as a result of setting the value.
 //
 // Integer (`IPP_TAG_INTEGER`) values can be promoted to rangeOfInteger
 // (`IPP_TAG_RANGE`) values, the various string tags can be promoted to name
@@ -3426,14 +3445,14 @@ ippSetStringfv(ipp_t           *ipp,    // I  - IPP message
 // out-of-band value tags such as no-value (`IPP_TAG_NOVALUE`). All other
 // changes will be rejected.
 //
-// Promoting a string attribute to nameWithLanguage or textWithLanguage adds the language
-// code in the "attributes-natural-language" attribute or, if not present, the language
-// code for the current locale.
+// Promoting a string attribute to nameWithLanguage or textWithLanguage adds the
+// language code in the "attributes-natural-language" attribute or, if not
+// present, the language code for the current locale.
 //
 // @since CUPS 1.6@
 //
 
-int                                    // O  - 1 on success, 0 on failure
+int                                    // O  - `1` on success, `0` on failure
 ippSetValueTag(
     ipp_t          *ipp,               // I  - IPP message
     ipp_attribute_t **attr,            // IO - IPP attribute
@@ -3553,7 +3572,7 @@ ippSetValueTag(
 //
 // 'ippSetVersion()' - Set the version number in an IPP message.
 //
-// The "ipp" parameter refers to an IPP message previously created using
+// The "ipp" argument refers to an IPP message previously created using
 // the @link ippNew@, @link ippNewRequest@, or  @link ippNewResponse@ functions.
 //
 // The valid version numbers are currently 1.0, 1.1, 2.0, 2.1, and 2.2.
@@ -3561,7 +3580,7 @@ ippSetValueTag(
 // @since CUPS 1.6@
 //
 
-int                                    // O - 1 on success, 0 on failure
+int                                    // O - `1` on success, `0` on failure
 ippSetVersion(ipp_t *ipp,              // I - IPP message
               int   major,             // I - Major version number (major.minor)
               int   minor)             // I - Minor version number (major.minor)
@@ -3627,13 +3646,13 @@ ippTimeToDate(time_t t)                 // I - Time in seconds
 // 'ippValidateAttribute()' - Validate the contents of an attribute.
 //
 // This function validates the contents of an attribute based on the name and
-// value tag.  1 is returned if the attribute is valid, 0 otherwise.  On
+// value tag.  `1` is returned if the attribute is valid, `0` otherwise.  On
 // failure, @link cupsGetErrorString@ is set to a human-readable message.
 //
 // @since CUPS 1.7@
 //
 
-int                                    // O - 1 if valid, 0 otherwise
+int                                    // O - `1` if valid, `0` otherwise
 ippValidateAttribute(
     ipp_attribute_t *attr)             // I - Attribute
 {
@@ -3674,7 +3693,7 @@ ippValidateAttribute(
     return (0);
   }
 
-  switch (attr->value_tag)
+  switch (attr->value_tag & IPP_TAG_CUPS_MASK)
   {
     case IPP_TAG_INTEGER :
         break;
@@ -4086,7 +4105,7 @@ ippValidateAttribute(
                         "[-a-zA-Z0-9!#$&.+^_]{1,127}"          // type-name
                         "/"
                         "[-a-zA-Z0-9!#$&.+^_]{1,127}"          // subtype-name
-                        "(;[-a-zA-Z0-9!#$&.+^_]{1,127}="       // parameter=
+                        "(;[-a-zA-Z0-9!#$&.+^_]{1,127}="       // argument=
                         "([-a-zA-Z0-9!#$&.+^_]{1,127}|\"[^\"]*\"))*"
                                                                // value
                         "$",
@@ -4137,7 +4156,7 @@ ippValidateAttribute(
 // @since CUPS 1.7@
 //
 
-int                                    // O - 1 if valid, 0 otherwise
+int                                    // O - `1` if valid, `0` otherwise
 ippValidateAttributes(ipp_t *ipp)      // I - IPP message
 {
   ipp_attribute_t      *attr;          // Current attribute
@@ -4302,7 +4321,7 @@ ippWriteIO(void        *dst,              // I - Destination
 
          DEBUG_printf("1ippWriteIO: %s (%s%s)", attr->name, attr->num_values > 1 ? "1setOf " : "", ippTagString(attr->value_tag));
 
-          // Write the attribute tag and name.
+         // Write the attribute tag and name.
          //
          // The attribute name length does not include the trailing nul
          // character in the source string.
@@ -4310,7 +4329,7 @@ ippWriteIO(void        *dst,              // I - Destination
          // Collection values (parent != NULL) are written differently...
           if (parent == NULL)
          {
-            // Get the length of the attribute name, and make sure it won't overflow the buffer...
+           // Get the length of the attribute name, and make sure it won't overflow the buffer...
             if ((n = (int)strlen(attr->name)) > (IPP_BUF_SIZE - 8))
            {
              DEBUG_printf("1ippWriteIO: Attribute name too long (%d)", n);
@@ -4318,7 +4337,7 @@ ippWriteIO(void        *dst,              // I - Destination
              return (IPP_STATE_ERROR);
            }
 
-            // Write the value tag, name length, and name string...
+           // Write the value tag, name length, and name string...
            DEBUG_printf("2ippWriteIO: writing value tag=%x(%s)", attr->value_tag, ippTagString(attr->value_tag));
            DEBUG_printf("2ippWriteIO: writing name=%d,\"%s\"", n, attr->name);
 
@@ -4330,7 +4349,7 @@ ippWriteIO(void        *dst,              // I - Destination
           }
          else
          {
-            // Get the length of the attribute name, and make sure it won't overflow the buffer...
+           // Get the length of the attribute name, and make sure it won't overflow the buffer...
             if ((n = (int)strlen(attr->name)) > (IPP_BUF_SIZE - 12))
            {
              DEBUG_printf("1ippWriteIO: Attribute name too long (%d)", n);
@@ -4338,7 +4357,7 @@ ippWriteIO(void        *dst,              // I - Destination
              return (IPP_STATE_ERROR);
            }
 
-            // Write the member name tag, name length, name string, value tag,
+           // Write the member name tag, name length, name string, value tag,
            // and empty name for the collection member attribute...
             DEBUG_printf("2ippWriteIO: writing value tag=%x(memberName)", IPP_TAG_MEMBERNAME);
             DEBUG_printf("2ippWriteIO: writing name=%d,\"%s\"", n, attr->name);
@@ -4370,7 +4389,7 @@ ippWriteIO(void        *dst,              // I - Destination
             *bufptr++ = 0;
          }
 
-          // Now write the attribute value(s)...
+         // Now write the attribute value(s)...
          switch (attr->value_tag & ~IPP_TAG_CUPS_CONST)
          {
            case IPP_TAG_UNSUPPORTED_VALUE :
@@ -4444,7 +4463,7 @@ ippWriteIO(void        *dst,              // I - Destination
                    *bufptr++ = 0;
                  }
 
-                  // Boolean values are 1-byte; 0 = false, 1 = true.
+                 // Boolean values are 1-byte; 0 = false, 1 = true.
                  //
                  // Put the 2-byte length and 1-byte value into the buffer...
                  *bufptr++ = 0;
@@ -4553,7 +4572,7 @@ ippWriteIO(void        *dst,              // I - Destination
                    *bufptr++ = 0;
                  }
 
-                  // Date values consist of a 2-byte length and an
+                 // Date values consist of a 2-byte length and an
                  // 11-byte date/time structure defined by RFC 1903.
                  //
                  // Put the 2-byte length and 11-byte date/time
@@ -4588,7 +4607,7 @@ ippWriteIO(void        *dst,              // I - Destination
                    *bufptr++ = 0;
                  }
 
-                  // Resolution values consist of a 2-byte length,
+                 // Resolution values consist of a 2-byte length,
                  // 4-byte horizontal resolution value, 4-byte vertical
                  // resolution value, and a 1-byte units value.
                  //
@@ -4631,7 +4650,7 @@ ippWriteIO(void        *dst,              // I - Destination
                    *bufptr++ = 0;
                  }
 
-                  // Range values consist of a 2-byte length,
+                 // Range values consist of a 2-byte length,
                  // 4-byte lower value, and 4-byte upper value.
                  //
                  // Put the 2-byte length and range value data
@@ -4673,7 +4692,7 @@ ippWriteIO(void        *dst,              // I - Destination
                    *bufptr++ = 0;
                  }
 
-                  // textWithLanguage and nameWithLanguage values consist
+                 // textWithLanguage and nameWithLanguage values consist
                  // of a 2-byte length for both strings and their
                  // individual lengths, a 2-byte length for the
                  // character string, the character string without the
@@ -4707,11 +4726,11 @@ ippWriteIO(void        *dst,            // I - Destination
                    bufptr = buffer;
                  }
 
-                  // Length of entire value
+                 // Length of entire value
                  *bufptr++ = (ipp_uchar_t)(n >> 8);
                  *bufptr++ = (ipp_uchar_t)n;
 
-                  // Length of language
+                 // Length of language
                  if (value->string.language != NULL)
                    n = (int)strlen(value->string.language);
                  else
@@ -4720,14 +4739,14 @@ ippWriteIO(void        *dst,            // I - Destination
                  *bufptr++ = (ipp_uchar_t)(n >> 8);
                  *bufptr++ = (ipp_uchar_t)n;
 
-                  // Language
+                 // Language
                  if (n > 0)
                  {
                    memcpy(bufptr, value->string.language, (size_t)n);
                    bufptr += n;
                  }
 
-                  // Length of text
+                 // Length of text
                   if (value->string.text != NULL)
                    n = (int)strlen(value->string.text);
                  else
@@ -4736,7 +4755,7 @@ ippWriteIO(void        *dst,              // I - Destination
                  *bufptr++ = (ipp_uchar_t)(n >> 8);
                  *bufptr++ = (ipp_uchar_t)n;
 
-                  // Text
+                 // Text
                  if (n > 0)
                  {
                    memcpy(bufptr, value->string.text, (size_t)n);
@@ -4772,7 +4791,7 @@ ippWriteIO(void        *dst,              // I - Destination
                    *bufptr++ = 0;
                  }
 
-                  // Write a data length of 0 and flush the buffer...
+                 // Write a data length of 0 and flush the buffer...
                  *bufptr++ = 0;
                  *bufptr++ = 0;
 
@@ -4785,7 +4804,7 @@ ippWriteIO(void        *dst,              // I - Destination
 
                  bufptr = buffer;
 
-                  // Then write the collection attribute...
+                 // Then write the collection attribute...
                   value->collection->state = IPP_STATE_IDLE;
 
                  if (ippWriteIO(dst, cb, 1, ipp, value->collection) == IPP_STATE_ERROR)
@@ -4820,7 +4839,7 @@ ippWriteIO(void        *dst,              // I - Destination
                    *bufptr++ = 0;
                  }
 
-                  // An unknown value might some new value that a
+                 // An unknown value might some new value that a
                  // vendor has come up with. It consists of a
                  // 2-byte length and the bytes in the unknown
                  // value buffer.
@@ -4845,11 +4864,11 @@ ippWriteIO(void        *dst,            // I - Destination
                    bufptr = buffer;
                  }
 
-                  // Length of unknown value
+                 // Length of unknown value
                  *bufptr++ = (ipp_uchar_t)(n >> 8);
                  *bufptr++ = (ipp_uchar_t)n;
 
-                  // Value
+                 // Value
                  if (n > 0)
                  {
                    memcpy(bufptr, value->unknown.data, (size_t)n);
@@ -4859,7 +4878,7 @@ ippWriteIO(void        *dst,              // I - Destination
                break;
          }
 
-          // Write the data out...
+         // Write the data out...
          if (bufptr > buffer)
          {
            if ((*cb)(dst, buffer, (size_t)(bufptr - buffer)) < 0)
@@ -4872,14 +4891,16 @@ ippWriteIO(void        *dst,            // I - Destination
            DEBUG_printf("2ippWriteIO: wrote %d bytes", (int)(bufptr - buffer));
          }
 
-         // If blocking is disabled and we aren't at the end of the attribute list, stop here...
+         // If blocking is disabled and we aren't at the end of the attribute
+         // list, stop here...
           if (!blocking && ipp->current)
            break;
        }
 
        if (ipp->current == NULL)
        {
-          // Done with all of the attributes; add the end-of-attributes tag or end-collection attribute...
+         // Done with all of the attributes; add the end-of-attributes tag or
+          // end-collection attribute...
           if (parent == NULL)
          {
             buffer[0] = IPP_TAG_END;
@@ -4946,8 +4967,7 @@ ipp_add_attr(ipp_t      *ipp,             // I - IPP message
   else
     alloc_values = (num_values + IPP_MAX_VALUES - 1) & ~(IPP_MAX_VALUES - 1);
 
-  attr = calloc(1, sizeof(ipp_attribute_t) +
-                (size_t)(alloc_values - 1) * sizeof(_ipp_value_t));
+  attr = calloc(1, sizeof(ipp_attribute_t) + (size_t)(alloc_values - 1) * sizeof(_ipp_value_t));
 
   if (attr)
   {
@@ -5313,7 +5333,7 @@ ipp_read_http(http_t      *http,  // I - Client connection
       // Wait up to 10 seconds for more data on non-blocking sockets...
       if (!httpWait(http, 10000))
       {
-        // Signal no data...
+       // Signal no data...
        bytes = -1;
        break;
       }
@@ -5323,7 +5343,7 @@ ipp_read_http(http_t      *http,  // I - Client connection
       // Wait up to timeout seconds for more data on blocking sockets...
       if (!httpWait(http, (int)(1000 * http->timeout_value)))
       {
-        // Signal no data...
+       // Signal no data...
        bytes = -1;
        break;
       }
@@ -5888,7 +5908,7 @@ ipp_read_io(void        *src,             // I - Data source
             case IPP_TAG_MEMBERNAME :
                // The value the name of the member in the collection, which
                // we need to carry over...
-                if (n == 0)
+               if (n == 0)
                {
                  _cupsSetError(IPP_STATUS_ERROR_INTERNAL, _("IPP memberName value is empty."), 1);
                  DEBUG_puts("1ipp_read_io: Empty member name value.");
@@ -6008,7 +6028,7 @@ ipp_set_error(ipp_status_t status,        // I - Status code
 static _ipp_value_t *                  // O  - IPP value element or NULL on error
 ipp_set_value(ipp_t           *ipp,    // IO - IPP message
               ipp_attribute_t **attr,  // IO - IPP attribute
-              int             element) // I  - Value number (0-based)
+              int             element) // I  - Value number (`0`-based)
 {
   ipp_attribute_t      *temp,          // New attribute pointer
                        *current,       // Current attribute in list
@@ -6022,7 +6042,7 @@ ipp_set_value(ipp_t           *ipp,       // IO - IPP message
   if (temp->num_values <= 1)
     alloc_values = 1;
   else
-    alloc_values = (temp->num_values + IPP_MAX_VALUES - 1) & ~(IPP_MAX_VALUES - 1);
+    alloc_values = (temp->num_values + IPP_MAX_VALUES - 1) & (size_t)~(IPP_MAX_VALUES - 1);
 
   if (element < alloc_values)
   {
@@ -6032,7 +6052,8 @@ ipp_set_value(ipp_t           *ipp,       // IO - IPP message
     return (temp->values + element);
   }
 
-  // Otherwise re-allocate the attribute - we allocate in groups of IPP_MAX_VALUE values when num_values > 1.
+  // Otherwise re-allocate the attribute - we allocate in groups of
+  // IPP_MAX_VALUE values when num_values > 1.
   if (alloc_values < IPP_MAX_VALUES)
     alloc_values = IPP_MAX_VALUES;
   else
@@ -6043,7 +6064,7 @@ ipp_set_value(ipp_t           *ipp,       // IO - IPP message
   // Reallocate memory...
   if ((temp = realloc(temp, sizeof(ipp_attribute_t) + (size_t)(alloc_values - 1) * sizeof(_ipp_value_t))) == NULL)
   {
-    _cupsSetError(IPP_STATUS_ERROR_INTERNAL, _("Unable to reallocate IPP attribute value."), 1);
+    _cupsSetError(IPP_STATUS_ERROR_INTERNAL, strerror(errno), 0);
     DEBUG_puts("4ipp_set_value: Unable to resize attribute.");
     return (NULL);
   }
@@ -6072,7 +6093,7 @@ ipp_set_value(ipp_t           *ipp,       // IO - IPP message
 
       if (!current)
       {
-        // This is a serious error!
+       // This is a serious error!
        *attr = temp;
        _cupsSetError(IPP_STATUS_ERROR_INTERNAL, _("IPP attribute is not a member of the message."), 1);
        DEBUG_puts("4ipp_set_value: Unable to find attribute in message.");