Mercurial > illumos > illumos-gate
changeset 6728:3cc8342ae981
6698648 127127/127128-11 break lp -P (fix cstyle)
6698649 127127/127128-11 break lp -H hold (fix cstyle)
6698650 127127/127128-11 break lp -q (fix cstyle)
author | jacobs |
---|---|
date | Tue, 27 May 2008 16:11:18 -0700 |
parents | 421897262896 |
children | 929835ba29c5 |
files | usr/src/cmd/lp/lib/papi/lpsched-jobs.c usr/src/cmd/print/bsd-sysv-commands/in.lpd.c |
diffstat | 2 files changed, 10 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/cmd/lp/lib/papi/lpsched-jobs.c Tue May 27 15:36:10 2008 -0700 +++ b/usr/src/cmd/lp/lib/papi/lpsched-jobs.c Tue May 27 16:11:18 2008 -0700 @@ -105,15 +105,15 @@ papiAttributeListGetLPString(attributes, "form", &r->form); /* set the page range */ - memset(tmp, NULL, sizeof (tmp)); - tmp[0] = papiAttributeListFind(attributes, "page-ranges"); - if (tmp[0] != NULL) { - char buf[BUFSIZ]; + memset(tmp, NULL, sizeof (tmp)); + tmp[0] = papiAttributeListFind(attributes, "page-ranges"); + if (tmp[0] != NULL) { + char buf[BUFSIZ]; - papiAttributeListToString(tmp, " ", buf, sizeof (buf)); - if ((s = strchr(buf, '=')) != NULL) + papiAttributeListToString(tmp, " ", buf, sizeof (buf)); + if ((s = strchr(buf, '=')) != NULL) r->pages = (char *)strdup(++s); - } + } /* * set the document format, converting to old format names as @@ -411,7 +411,8 @@ /* priority (map 0-39 to 1-100) */ papiAttributeListAddInteger(&j->attributes, PAPI_ATTR_REPLACE, - "job-priority", (int)(100 - (r->priority * 2.5))); + "job-priority", + (int)(100 - (r->priority * 2.5))); /* pages */ papiAttributeListAddLPString(&j->attributes, PAPI_ATTR_REPLACE,
--- a/usr/src/cmd/print/bsd-sysv-commands/in.lpd.c Tue May 27 15:36:10 2008 -0700 +++ b/usr/src/cmd/print/bsd-sysv-commands/in.lpd.c Tue May 27 16:11:18 2008 -0700 @@ -326,7 +326,7 @@ snprintf(buf, sizeof (buf), "page-ranges=%s", ++entry); - papiAttributeListFromString(&list, + papiAttributeListFromString(&list, PAPI_ATTR_EXCL, buf); } break;