diff options
author | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2014-06-11 19:03:59 +0000 |
---|---|---|
committer | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2014-06-11 19:03:59 +0000 |
commit | bf1bc4c6d3387819bbb125ac8cd007bada572a62 (patch) | |
tree | 62ab4c33a6f7735488aed5d5627b767da2782321 /scheduler/log.c | |
parent | 25d0c3feab2396ae88bb46368556840cb18abf28 (diff) | |
download | cups-bf1bc4c6d3387819bbb125ac8cd007bada572a62.tar.gz |
More man page updates.
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@11920 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'scheduler/log.c')
-rw-r--r-- | scheduler/log.c | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/scheduler/log.c b/scheduler/log.c index d28fa0fdb..aac4b2e2f 100644 --- a/scheduler/log.c +++ b/scheduler/log.c @@ -727,8 +727,27 @@ cupsdLogPage(cupsd_job_t *job, /* I - Job being printed */ format = nameend; - if ((attr = ippFindAttribute(job->attrs, name, - IPP_TAG_ZERO)) != NULL) + attr = ippFindAttribute(job->attrs, name, IPP_TAG_ZERO); + if (!attr && !strcmp(name, "job-billing")) + { + /* + * Handle alias "job-account-id" (which was standardized after + * "job-billing" was defined for CUPS... + */ + + attr = ippFindAttribute(job->attrs, "job-account-id", IPP_TAG_ZERO); + } + else if (!attr && !strcmp(name, "media")) + { + /* + * Handle alias "media-col" which uses dimensions instead of + * names... + */ + + attr = ippFindAttribute(job->attrs, "media-col/media-size", IPP_TAG_BEGIN_COLLECTION); + } + + if (attr) { /* * Add the attribute value... @@ -769,6 +788,22 @@ cupsdLogPage(cupsd_job_t *job, /* I - Job being printed */ bufptr += strlen(bufptr); break; + case IPP_TAG_BEGIN_COLLECTION : + if (!strcmp(attr->name, "media-size")) + { + ipp_attribute_t *x_dimension = ippFindAttribute(ippGetCollection(attr, 0), "x-dimension", IPP_TAG_INTEGER); + ipp_attribute_t *y_dimension = ippFindAttribute(ippGetCollection(attr, 0), "y-dimension", IPP_TAG_INTEGER); + /* Media dimensions */ + + if (x_dimension && y_dimension) + { + pwg_media_t *pwg = pwgMediaForSize(ippGetInteger(x_dimension, 0), ippGetInteger(y_dimension, 0)); + /* PWG media name */ + strlcpy(bufptr, pwg->pwg, sizeof(buffer) - (size_t)(bufptr - buffer)); + break; + } + } + default : strlcpy(bufptr, "???", sizeof(buffer) - (size_t)(bufptr - buffer)); bufptr += strlen(bufptr); |