CHANGES IN CUPS V2.1.4
+ - Fixed printing of multiple files to raw queues (Issue #4782)
+ - The scheduler did not implement the Hold-New-Jobs opertion correctly
+ (Issue #4767)
- The ipptool program truncated values at 8k (Issue #4786)
- The ipptool program did not correctly report uriScheme values in plist
output (Issue #4785)
-CHANGES.txt - 2.2b1 - 2016-05-02
+CHANGES.txt - 2.2b1 - 2016-05-25
--------------------------------
CHANGES IN CUPS V2.2b1
+ - All CUPS commands now support POSIX options (Issue #4813)
+ - Improved performance of web interface with large numbers of jobs
+ (Issue #3819)
+ - Encrypted printing can now be limited to only trusted printers and
+ servers (<rdar://problem/25711658>)
+ - The scheduler now advertises PWG Raster attributes for IPP Everywhere
+ clients (Issue #4428)
+ - The scheduler now logs informational messages for jobs at LogLevel
+ "info" (Issue #4815)
+ - The scheduler now uses the getgrouplist function when available
+ (Issue #4611)
- The IPP backend no longer enables compression by default except for
certain raster formats that generally benefit from it
(<rdar://problem/25166952>)
- Added a new cupsHashData API and support for hashed job passwords
(<rdar://problem/20221502>)
- Localization fixes (<rdar://problem/25292403>,
- <rdar://problem/25461517>, Issue #4796)
- - Documentation changes (Issue #4781)
+ <rdar://problem/25461517>, Issue #4041, Issue #4796)
+ - Documentation changes (Issue #4624, Issue #4781)
(cd $$dir; $(MAKE) $(MFLAGS) apihelp) || exit 1;\
done
-framedhelp:
- for dir in cups filter; do\
- echo Generating framed API help in $$dir... ;\
- (cd $$dir; $(MAKE) $(MFLAGS) framedhelp) || exit 1;\
- done
-
#
# Create an Xcode docset using Mini-XML's mxmldoc (http://www.msweet.org/)...
/*
* "lpq" command for CUPS.
*
- * Copyright 2007-2014 by Apple Inc.
+ * Copyright 2007-2016 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
{
int i; /* Looping var */
http_t *http; /* Connection to server */
- const char *dest, /* Desired printer */
+ const char *opt, /* Option pointer */
+ *dest, /* Desired printer */
*user, /* Desired user */
*val; /* Environment variable name */
char *instance; /* Printer instance */
all = 0;
for (i = 1; i < argc; i ++)
+ {
if (argv[i][0] == '+')
+ {
interval = atoi(argv[i] + 1);
+ }
else if (argv[i][0] == '-')
{
- switch (argv[i][1])
+ for (opt = argv[i] + 1; *opt; opt ++)
{
- case 'E' : /* Encrypt */
+ switch (*opt)
+ {
+ case 'E' : /* Encrypt */
#ifdef HAVE_SSL
- cupsSetEncryption(HTTP_ENCRYPT_REQUIRED);
+ cupsSetEncryption(HTTP_ENCRYPT_REQUIRED);
- if (http)
- httpEncryption(http, HTTP_ENCRYPT_REQUIRED);
+ if (http)
+ httpEncryption(http, HTTP_ENCRYPT_REQUIRED);
#else
- _cupsLangPrintf(stderr, _("%s: Sorry, no encryption support."),
- argv[0]);
+ _cupsLangPrintf(stderr, _("%s: Sorry, no encryption support."), argv[0]);
#endif /* HAVE_SSL */
- break;
-
- case 'U' : /* Username */
- if (argv[i][2] != '\0')
- cupsSetUser(argv[i] + 2);
- else
- {
- i ++;
- if (i >= argc)
+ break;
+
+ case 'U' : /* Username */
+ if (opt[1] != '\0')
{
- _cupsLangPrintf(stderr,
- _("%s: Error - expected username after "
- "\"-U\" option."), argv[0]);
- return (1);
+ cupsSetUser(opt + 1);
+ opt += strlen(opt) - 1;
}
+ else
+ {
+ i ++;
+ if (i >= argc)
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - expected username after \"-U\" option."), argv[0]);
+ return (1);
+ }
- cupsSetUser(argv[i]);
- }
- break;
-
- case 'P' : /* Printer */
- if (argv[i][2])
- dest = argv[i] + 2;
- else
- {
- i ++;
+ cupsSetUser(argv[i]);
+ }
+ break;
- if (i >= argc)
+ case 'P' : /* Printer */
+ if (opt[1] != '\0')
{
- httpClose(http);
+ dest = opt + 1;
+ opt += strlen(opt) - 1;
+ }
+ else
+ {
+ i ++;
+
+ if (i >= argc)
+ {
+ httpClose(http);
+
+ usage();
+ }
- usage();
+ dest = argv[i];
}
- dest = argv[i];
- }
-
- if ((instance = strchr(dest, '/')) != NULL)
- *instance++ = '\0';
-
- http = connect_server(argv[0], http);
-
- if ((named_dest = cupsGetNamedDest(http, dest, instance)) == NULL)
- {
- if (cupsLastError() == IPP_STATUS_ERROR_BAD_REQUEST ||
- cupsLastError() == IPP_STATUS_ERROR_VERSION_NOT_SUPPORTED)
- _cupsLangPrintf(stderr,
- _("%s: Error - add '/version=1.1' to server "
- "name."), argv[0]);
- else if (instance)
- _cupsLangPrintf(stderr,
- _("%s: Error - unknown destination \"%s/%s\"."),
- argv[0], dest, instance);
- else
- _cupsLangPrintf(stderr, _("%s: Unknown destination \"%s\"."),
- argv[0], dest);
-
- return (1);
- }
-
- cupsFreeDests(1, named_dest);
- break;
-
- case 'a' : /* All printers */
- all = 1;
- break;
-
- case 'h' : /* Connect to host */
- if (http)
- {
- httpClose(http);
- http = NULL;
- }
+ if ((instance = strchr(dest, '/')) != NULL)
+ *instance++ = '\0';
- if (argv[i][2] != '\0')
- cupsSetServer(argv[i] + 2);
- else
- {
- i ++;
+ http = connect_server(argv[0], http);
- if (i >= argc)
+ if ((named_dest = cupsGetNamedDest(http, dest, instance)) == NULL)
{
- _cupsLangPrintf(stderr,
- _("%s: Error - expected hostname after "
- "\"-h\" option."), argv[0]);
+ if (cupsLastError() == IPP_STATUS_ERROR_BAD_REQUEST ||
+ cupsLastError() == IPP_STATUS_ERROR_VERSION_NOT_SUPPORTED)
+ _cupsLangPrintf(stderr, _("%s: Error - add '/version=1.1' to server name."), argv[0]);
+ else if (instance)
+ _cupsLangPrintf(stderr, _("%s: Error - unknown destination \"%s/%s\"."), argv[0], dest, instance);
+ else
+ _cupsLangPrintf(stderr, _("%s: Unknown destination \"%s\"."), argv[0], dest);
+
return (1);
- }
+ }
+
+ cupsFreeDests(1, named_dest);
+ break;
+
+ case 'a' : /* All printers */
+ all = 1;
+ break;
+
+ case 'h' : /* Connect to host */
+ if (http)
+ {
+ httpClose(http);
+ http = NULL;
+ }
+
+ if (opt[1] != '\0')
+ {
+ cupsSetServer(opt + 1);
+ opt += strlen(opt) - 1;
+ }
else
- cupsSetServer(argv[i]);
- }
- break;
+ {
+ i ++;
- case 'l' : /* Long status */
- longstatus = 1;
- break;
+ if (i >= argc)
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - expected hostname after \"-h\" option."), argv[0]);
+ return (1);
+ }
+ else
+ cupsSetServer(argv[i]);
+ }
+ break;
- default :
- httpClose(http);
+ case 'l' : /* Long status */
+ longstatus = 1;
+ break;
- usage();
+ default :
+ httpClose(http);
+
+ usage();
+ }
}
}
else if (isdigit(argv[i][0] & 255))
+ {
id = atoi(argv[i]);
+ }
else
+ {
user = argv[i];
+ }
+ }
http = connect_server(argv[0], http);
/*
* "lpr" command for CUPS.
*
- * Copyright 2007-2014 by Apple Inc.
+ * Copyright 2007-2016 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
int job_id; /* Job ID */
char ch; /* Option character */
char *printer, /* Destination printer or class */
- *instance; /* Instance */
+ *instance, /* Instance */
+ *opt; /* Option pointer */
const char *title, /* Job title */
*val; /* Environment variable name */
int num_copies; /* Number of copies per file */
title = NULL;
for (i = 1; i < argc; i ++)
+ {
if (argv[i][0] == '-')
{
- switch (ch = argv[i][1])
+ for (opt = argv[i] + 1; *opt; opt ++)
{
- case 'E' : /* Encrypt */
+ switch (ch = *opt)
+ {
+ case 'E' : /* Encrypt */
#ifdef HAVE_SSL
- cupsSetEncryption(HTTP_ENCRYPT_REQUIRED);
+ cupsSetEncryption(HTTP_ENCRYPT_REQUIRED);
#else
- _cupsLangPrintf(stderr, _("%s: Sorry, no encryption support."),
- argv[0]);
+ _cupsLangPrintf(stderr, _("%s: Sorry, no encryption support."), argv[0]);
#endif /* HAVE_SSL */
- break;
-
- case 'U' : /* Username */
- if (argv[i][2] != '\0')
- cupsSetUser(argv[i] + 2);
- else
- {
- i ++;
- if (i >= argc)
+ break;
+
+ case 'U' : /* Username */
+ if (opt[1] != '\0')
{
- _cupsLangPrintf(stderr,
- _("%s: Error - expected username after "
- "\"-U\" option."), argv[0]);
- return (1);
+ cupsSetUser(opt + 1);
+ opt += strlen(opt) - 1;
}
+ else
+ {
+ i ++;
+ if (i >= argc)
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - expected username after \"-U\" option."), argv[0]);
+ return (1);
+ }
+
+ cupsSetUser(argv[i]);
+ }
+ break;
- cupsSetUser(argv[i]);
- }
- break;
-
- case 'H' : /* Connect to host */
- if (argv[i][2] != '\0')
- cupsSetServer(argv[i] + 2);
- else
- {
- i ++;
+ case 'H' : /* Connect to host */
+ if (opt[1] != '\0')
+ {
+ cupsSetServer(opt + 1);
+ opt += strlen(opt) - 1;
+ }
+ else
+ {
+ i ++;
+
+ if (i >= argc)
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - expected hostname after \"-H\" option."), argv[0]);
+ return (1);
+ }
+ else
+ cupsSetServer(argv[i]);
+ }
+ break;
+
+ case '1' : /* TROFF font set 1 */
+ case '2' : /* TROFF font set 2 */
+ case '3' : /* TROFF font set 3 */
+ case '4' : /* TROFF font set 4 */
+ case 'i' : /* indent */
+ case 'w' : /* width */
+ if (opt[1] != '\0')
+ {
+ opt += strlen(opt) - 1;
+ }
+ else
+ {
+ i ++;
+
+ if (i >= argc)
+ {
+ _cupsLangPrintf(stderr,
+ _("%s: Error - expected value after \"-%c\" "
+ "option."), argv[0], ch);
+ return (1);
+ }
+ }
- if (i >= argc)
+ case 'c' : /* CIFPLOT */
+ case 'd' : /* DVI */
+ case 'f' : /* FORTRAN */
+ case 'g' : /* plot */
+ case 'n' : /* Ditroff */
+ case 't' : /* Troff */
+ case 'v' : /* Raster image */
+ _cupsLangPrintf(stderr, _("%s: Warning - \"%c\" format modifier not supported - output may not be correct."), argv[0], ch);
+ break;
+
+ case 'o' : /* Option */
+ if (opt[1] != '\0')
{
- _cupsLangPrintf(stderr,
- _("%s: Error - expected hostname after "
- "\"-H\" option."), argv[0]);
- return (1);
- }
+ num_options = cupsParseOptions(opt + 1, num_options, &options);
+ opt += strlen(opt) - 1;
+ }
else
- cupsSetServer(argv[i]);
- }
- break;
-
- case '1' : /* TROFF font set 1 */
- case '2' : /* TROFF font set 2 */
- case '3' : /* TROFF font set 3 */
- case '4' : /* TROFF font set 4 */
- case 'i' : /* indent */
- case 'w' : /* width */
- if (argv[i][2] == '\0')
- {
- i ++;
-
- if (i >= argc)
{
- _cupsLangPrintf(stderr,
- _("%s: Error - expected value after \"-%c\" "
- "option."), argv[0], ch);
- return (1);
+ i ++;
+ if (i >= argc)
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - expected option=value after \"-o\" option."), argv[0]);
+ return (1);
+ }
+
+ num_options = cupsParseOptions(argv[i], num_options, &options);
}
- }
-
- case 'c' : /* CIFPLOT */
- case 'd' : /* DVI */
- case 'f' : /* FORTRAN */
- case 'g' : /* plot */
- case 'n' : /* Ditroff */
- case 't' : /* Troff */
- case 'v' : /* Raster image */
- _cupsLangPrintf(stderr,
- _("%s: Warning - \"%c\" format modifier not "
- "supported - output may not be correct."),
- argv[0], ch);
- break;
-
- case 'o' : /* Option */
- if (argv[i][2] != '\0')
- num_options = cupsParseOptions(argv[i] + 2, num_options, &options);
- else
- {
- i ++;
- if (i >= argc)
+ break;
+
+ case 'l' : /* Literal/raw */
+ num_options = cupsAddOption("raw", "true", num_options, &options);
+ break;
+
+ case 'p' : /* Prettyprint */
+ num_options = cupsAddOption("prettyprint", "true", num_options, &options);
+ break;
+
+ case 'h' : /* Suppress burst page */
+ num_options = cupsAddOption("job-sheets", "none", num_options, &options);
+ break;
+
+ case 's' : /* Don't use symlinks */
+ break;
+
+ case 'm' : /* Mail on completion */
{
- _cupsLangPrintf(stderr,
- _("%s: Error - expected option=value after "
- "\"-o\" option."), argv[0]);
- return (1);
+ char email[1024]; /* EMail address */
+
+ snprintf(email, sizeof(email), "mailto:%s@%s", cupsUser(), httpGetHostname(NULL, buffer, sizeof(buffer)));
+ num_options = cupsAddOption("notify-recipient-uri", email, num_options, &options);
+ }
+ break;
+
+ case 'q' : /* Queue file but don't print */
+ num_options = cupsAddOption("job-hold-until", "indefinite", num_options, &options);
+ break;
+
+ case 'r' : /* Remove file after printing */
+ deletefile = 1;
+ break;
+
+ case 'P' : /* Destination printer or class */
+ if (opt[1] != '\0')
+ {
+ printer = opt + 1;
+ opt += strlen(opt) - 1;
+ }
+ else
+ {
+ i ++;
+ if (i >= argc)
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - expected destination after \"-P\" option."), argv[0]);
+ return (1);
+ }
+
+ printer = argv[i];
}
- num_options = cupsParseOptions(argv[i], num_options, &options);
- }
- break;
-
- case 'l' : /* Literal/raw */
- num_options = cupsAddOption("raw", "true", num_options, &options);
- break;
-
- case 'p' : /* Prettyprint */
- num_options = cupsAddOption("prettyprint", "true", num_options,
- &options);
- break;
-
- case 'h' : /* Suppress burst page */
- num_options = cupsAddOption("job-sheets", "none", num_options,
- &options);
- break;
-
- case 's' : /* Don't use symlinks */
- break;
-
- case 'm' : /* Mail on completion */
- {
- char email[1024]; /* EMail address */
-
-
- snprintf(email, sizeof(email), "mailto:%s@%s", cupsUser(),
- httpGetHostname(NULL, buffer, sizeof(buffer)));
- num_options = cupsAddOption("notify-recipient-uri", email,
- num_options, &options);
- }
- break;
-
- case 'q' : /* Queue file but don't print */
- num_options = cupsAddOption("job-hold-until", "indefinite",
- num_options, &options);
- break;
-
- case 'r' : /* Remove file after printing */
- deletefile = 1;
- break;
-
- case 'P' : /* Destination printer or class */
- if (argv[i][2] != '\0')
- printer = argv[i] + 2;
- else
- {
- i ++;
- if (i >= argc)
+ if ((instance = strrchr(printer, '/')) != NULL)
+ *instance++ = '\0';
+
+ if ((dest = cupsGetNamedDest(NULL, printer, instance)) != NULL)
+ {
+ for (j = 0; j < dest->num_options; j ++)
+ if (cupsGetOption(dest->options[j].name, num_options,
+ options) == NULL)
+ num_options = cupsAddOption(dest->options[j].name,
+ dest->options[j].value,
+ num_options, &options);
+ }
+ else if (cupsLastError() == IPP_STATUS_ERROR_BAD_REQUEST ||
+ cupsLastError() == IPP_STATUS_ERROR_VERSION_NOT_SUPPORTED)
{
- _cupsLangPrintf(stderr,
- _("%s: Error - expected destination after "
- "\"-P\" option."), argv[0]);
+ _cupsLangPrintf(stderr, _("%s: Error - add '/version=1.1' to server name."), argv[0]);
return (1);
}
+ break;
- printer = argv[i];
- }
-
- if ((instance = strrchr(printer, '/')) != NULL)
- *instance++ = '\0';
-
- if ((dest = cupsGetNamedDest(NULL, printer, instance)) != NULL)
- {
- for (j = 0; j < dest->num_options; j ++)
- if (cupsGetOption(dest->options[j].name, num_options,
- options) == NULL)
- num_options = cupsAddOption(dest->options[j].name,
- dest->options[j].value,
- num_options, &options);
- }
- else if (cupsLastError() == IPP_STATUS_ERROR_BAD_REQUEST ||
- cupsLastError() == IPP_STATUS_ERROR_VERSION_NOT_SUPPORTED)
- {
- _cupsLangPrintf(stderr,
- _("%s: Error - add '/version=1.1' to server "
- "name."), argv[0]);
- return (1);
- }
- break;
-
- case '#' : /* Number of copies */
- if (argv[i][2] != '\0')
- num_copies = atoi(argv[i] + 2);
- else
- {
- i ++;
- if (i >= argc)
+ case '#' : /* Number of copies */
+ if (opt[1] != '\0')
{
- _cupsLangPrintf(stderr,
- _("%s: Error - expected copies after "
- "\"-#\" option."), argv[0]);
- return (1);
+ num_copies = atoi(opt + 1);
+ opt += strlen(opt) - 1;
+ }
+ else
+ {
+ i ++;
+ if (i >= argc)
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - expected copies after \"-#\" option."), argv[0]);
+ return (1);
+ }
+
+ num_copies = atoi(argv[i]);
}
- num_copies = atoi(argv[i]);
- }
-
- sprintf(buffer, "%d", num_copies);
- num_options = cupsAddOption("copies", buffer, num_options, &options);
- break;
-
- case 'C' : /* Class */
- case 'J' : /* Job name */
- case 'T' : /* Title */
- if (argv[i][2] != '\0')
- title = argv[i] + 2;
- else
- {
- i ++;
- if (i >= argc)
+ if (num_copies < 1)
{
- _cupsLangPrintf(stderr,
- _("%s: Error - expected name after \"-%c\" "
- "option."), argv[0], ch);
+ _cupsLangPrintf(stderr, _("%s: Error - copies must be 1 or more."), argv[0]);
return (1);
}
- title = argv[i];
- }
- break;
+ sprintf(buffer, "%d", num_copies);
+ num_options = cupsAddOption("copies", buffer, num_options, &options);
+ break;
+
+ case 'C' : /* Class */
+ case 'J' : /* Job name */
+ case 'T' : /* Title */
+ if (opt[1] != '\0')
+ {
+ title = opt + 1;
+ opt += strlen(opt) - 1;
+ }
+ else
+ {
+ i ++;
+ if (i >= argc)
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - expected name after \"-%c\" option."), argv[0], ch);
+ return (1);
+ }
+
+ title = argv[i];
+ }
+ break;
- default :
- _cupsLangPrintf(stderr,
- _("%s: Error - unknown option \"%c\"."), argv[0],
- argv[i][1]);
- return (1);
+ default :
+ _cupsLangPrintf(stderr, _("%s: Error - unknown option \"%c\"."), argv[0], *opt);
+ return (1);
+ }
}
}
else if (num_files < 1000)
}
}
else
- _cupsLangPrintf(stderr,
- _("%s: Error - too many files - \"%s\"."), argv[0],
- argv[i]);
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - too many files - \"%s\"."), argv[0], argv[i]);
+ }
+ }
+
/*
* See if we have any files to print; if not, print from stdin...
*/
/*
* "lprm" command for CUPS.
*
- * Copyright 2007-2010 by Apple Inc.
+ * Copyright 2007-2016 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
int i; /* Looping var */
int job_id; /* Job ID */
const char *name; /* Destination printer */
- char *instance; /* Pointer to instance name */
+ char *instance, /* Pointer to instance name */
+ *opt; /* Option pointer */
cups_dest_t *dest, /* Destination */
*defdest; /* Default destination */
int did_cancel; /* Did we cancel something? */
*/
for (i = 1; i < argc; i ++)
+ {
if (argv[i][0] == '-' && argv[i][1] != '\0')
- switch (argv[i][1])
+ {
+ for (opt = argv[i] + 1; *opt; opt ++)
{
- case 'E' : /* Encrypt */
+ switch (*opt)
+ {
+ case 'E' : /* Encrypt */
#ifdef HAVE_SSL
- cupsSetEncryption(HTTP_ENCRYPT_REQUIRED);
+ cupsSetEncryption(HTTP_ENCRYPT_REQUIRED);
#else
- _cupsLangPrintf(stderr,
- _("%s: Sorry, no encryption support."), argv[0]);
+ _cupsLangPrintf(stderr, _("%s: Sorry, no encryption support."), argv[0]);
#endif /* HAVE_SSL */
- break;
-
- case 'P' : /* Cancel jobs on a printer */
- if (argv[i][2])
- name = argv[i] + 2;
- else
- {
- i ++;
- name = argv[i];
- }
-
- if ((instance = strchr(name, '/')) != NULL)
- *instance = '\0';
-
- if ((dest = cupsGetNamedDest(CUPS_HTTP_DEFAULT, name,
- NULL)) == NULL)
- {
- _cupsLangPrintf(stderr,
- _("%s: Error - unknown destination \"%s\"."),
- argv[0], name);
- goto error;
- }
-
- cupsFreeDests(1, dest);
- break;
-
- case 'U' : /* Username */
- if (argv[i][2] != '\0')
- cupsSetUser(argv[i] + 2);
- else
- {
- i ++;
- if (i >= argc)
+ break;
+
+ case 'P' : /* Cancel jobs on a printer */
+ if (opt[1] != '\0')
{
- _cupsLangPrintf(stderr,
- _("%s: Error - expected username after "
- "\"-U\" option."), argv[0]);
- goto error;
+ name = opt + 1;
+ opt += strlen(opt) - 1;
+ }
+ else
+ {
+ i ++;
+ name = argv[i];
}
- cupsSetUser(argv[i]);
- }
- break;
-
- case 'h' : /* Connect to host */
- if (argv[i][2] != '\0')
- cupsSetServer(argv[i] + 2);
- else
- {
- i ++;
+ if ((instance = strchr(name, '/')) != NULL)
+ *instance = '\0';
- if (i >= argc)
+ if ((dest = cupsGetNamedDest(CUPS_HTTP_DEFAULT, name, NULL)) == NULL)
{
- _cupsLangPrintf(stderr,
- _("%s: Error - expected hostname after "
- "\"-h\" option."), argv[0]);
+ _cupsLangPrintf(stderr, _("%s: Error - unknown destination \"%s\"."), argv[0], name);
goto error;
- }
+ }
+
+ cupsFreeDests(1, dest);
+ break;
+
+ case 'U' : /* Username */
+ if (opt[1] != '\0')
+ {
+ cupsSetUser(opt + 1);
+ opt += strlen(opt) - 1;
+ }
+ else
+ {
+ i ++;
+ if (i >= argc)
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - expected username after \"-U\" option."), argv[0]);
+ goto error;
+ }
+
+ cupsSetUser(argv[i]);
+ }
+ break;
+
+ case 'h' : /* Connect to host */
+ if (opt[1] != '\0')
+ {
+ cupsSetServer(opt + 1);
+ opt += strlen(opt) - 1;
+ }
else
- cupsSetServer(argv[i]);
- }
+ {
+ i ++;
+
+ if (i >= argc)
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - expected hostname after \"-h\" option."), argv[0]);
+ goto error;
+ }
+ else
+ cupsSetServer(argv[i]);
+ }
- if (defdest)
- cupsFreeDests(1, defdest);
+ if (defdest)
+ cupsFreeDests(1, defdest);
- defdest = cupsGetNamedDest(CUPS_HTTP_DEFAULT, NULL, NULL);
- name = defdest ? defdest->name : NULL;
- break;
+ defdest = cupsGetNamedDest(CUPS_HTTP_DEFAULT, NULL, NULL);
+ name = defdest ? defdest->name : NULL;
+ break;
- default :
- _cupsLangPrintf(stderr, _("%s: Error - unknown option \"%c\"."),
- argv[0], argv[i][1]);
- goto error;
+ default :
+ _cupsLangPrintf(stderr, _("%s: Error - unknown option \"%c\"."), argv[0], *opt);
+ goto error;
+ }
}
+ }
else
{
/*
did_cancel = 1;
}
+ }
/*
* If nothing has been canceled yet, cancel the current job on the specified
/*
* Class status CGI for CUPS.
*
- * Copyright 2007-2014 by Apple Inc.
+ * Copyright 2007-2016 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
*response; /* IPP response */
cups_array_t *classes; /* Array of class objects */
ipp_attribute_t *pclass; /* Class object */
- int ascending, /* Order of classes (0 = descending) */
- first, /* First class to show */
+ int first, /* First class to show */
count; /* Number of classes */
const char *var; /* Form variable */
void *search; /* Search data */
sprintf(val, "%d", count);
cgiSetVariable("TOTAL", val);
- if ((var = cgiGetVariable("ORDER")) != NULL && *var)
- ascending = !_cups_strcasecmp(var, "asc");
- else
- ascending = 1;
-
- if (ascending)
- {
- for (i = 0, pclass = (ipp_attribute_t *)cupsArrayIndex(classes, first);
- i < CUPS_PAGE_MAX && pclass;
- i ++, pclass = (ipp_attribute_t *)cupsArrayNext(classes))
- cgiSetIPPObjectVars(pclass, NULL, i);
- }
- else
- {
- for (i = 0, pclass = (ipp_attribute_t *)cupsArrayIndex(classes, count - first - 1);
- i < CUPS_PAGE_MAX && pclass;
- i ++, pclass = (ipp_attribute_t *)cupsArrayPrev(classes))
- cgiSetIPPObjectVars(pclass, NULL, i);
- }
+ for (i = 0, pclass = (ipp_attribute_t *)cupsArrayIndex(classes, first);
+ i < CUPS_PAGE_MAX && pclass;
+ i ++, pclass = (ipp_attribute_t *)cupsArrayNext(classes))
+ cgiSetIPPObjectVars(pclass, NULL, i);
/*
* Save navigation URLs...
cgiSetVariable("NEXT", val);
}
+ if (count > CUPS_PAGE_MAX)
+ {
+ snprintf(val, sizeof(val), "%d", CUPS_PAGE_MAX * (count / CUPS_PAGE_MAX));
+ cgiSetVariable("LAST", val);
+ }
+
/*
* Then show everything...
*/
/*
* CGI <-> IPP variable routines for CUPS.
*
- * Copyright 2007-2015 by Apple Inc.
+ * Copyright 2007-2016 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
*response; /* IPP response */
cups_array_t *jobs; /* Array of job objects */
ipp_attribute_t *job; /* Job object */
- int ascending, /* Order of jobs (0 = descending) */
- first, /* First job to show */
+ int first, /* First job to show */
count; /* Number of jobs */
const char *var, /* Form variable */
*query, /* Query string */
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "which-jobs",
NULL, which_jobs);
+ if ((var = cgiGetVariable("FIRST")) != NULL)
+ {
+ if ((first = atoi(var)) < 0)
+ first = 0;
+ }
+ else
+ first = 0;
+
+ if (first > 0)
+ ippAddInteger(request, IPP_TAG_OPERATION, IPP_TAG_INTEGER, "first-index", first + 1);
+
cgiGetAttributes(request, "jobs.tmpl");
/*
}
jobs = cgiGetIPPObjects(response, search);
- count = cupsArrayCount(jobs);
+ count = cupsArrayCount(jobs) + first;
if (search)
cgiFreeSearch(search);
* Figure out which jobs to display...
*/
- if ((var = cgiGetVariable("FIRST")) != NULL)
- first = atoi(var);
- else
- first = 0;
-
- if (first >= count)
- first = count - CUPS_PAGE_MAX;
-
- first = (first / CUPS_PAGE_MAX) * CUPS_PAGE_MAX;
-
- if (first < 0)
- first = 0;
-
- if ((var = cgiGetVariable("ORDER")) != NULL && *var)
- ascending = !_cups_strcasecmp(var, "asc");
- else
- ascending = !which_jobs || !*which_jobs ||
- !_cups_strcasecmp(which_jobs, "not-completed");
-
section = cgiGetVariable("SECTION");
cgiClearVariables();
if (query)
cgiSetVariable("QUERY", query);
- cgiSetVariable("ORDER", ascending ? "asc" : "dec");
-
cgiSetVariable("SECTION", section);
sprintf(val, "%d", count);
if (which_jobs)
cgiSetVariable("WHICH_JOBS", which_jobs);
- if (ascending)
- {
- for (i = 0, job = (ipp_attribute_t *)cupsArrayIndex(jobs, first);
- i < CUPS_PAGE_MAX && job;
- i ++, job = (ipp_attribute_t *)cupsArrayNext(jobs))
- cgiSetIPPObjectVars(job, NULL, i);
- }
- else
- {
- for (i = 0, job = (ipp_attribute_t *)cupsArrayIndex(jobs, count - first - 1);
- i < CUPS_PAGE_MAX && job;
- i ++, job = (ipp_attribute_t *)cupsArrayPrev(jobs))
- cgiSetIPPObjectVars(job, NULL, i);
- }
+ for (i = 0, job = (ipp_attribute_t *)cupsArrayFirst(jobs);
+ i < CUPS_PAGE_MAX && job;
+ i ++, job = (ipp_attribute_t *)cupsArrayNext(jobs))
+ cgiSetIPPObjectVars(job, NULL, i);
/*
* Save navigation URLs...
cgiSetVariable("NEXT", val);
}
+ if (count > CUPS_PAGE_MAX)
+ {
+ snprintf(val, sizeof(val), "%d", CUPS_PAGE_MAX * (count / CUPS_PAGE_MAX));
+ cgiSetVariable("LAST", val);
+ }
+
/*
* Then show everything...
*/
/*
* Printer status CGI for CUPS.
*
- * Copyright 2007-2014 by Apple Inc.
+ * Copyright 2007-2016 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
*response; /* IPP response */
cups_array_t *printers; /* Array of printer objects */
ipp_attribute_t *printer; /* Printer object */
- int ascending, /* Order of printers (0 = descending) */
- first, /* First printer to show */
+ int first, /* First printer to show */
count; /* Number of printers */
const char *var; /* Form variable */
void *search; /* Search data */
sprintf(val, "%d", count);
cgiSetVariable("TOTAL", val);
- if ((var = cgiGetVariable("ORDER")) != NULL && *var)
- ascending = !_cups_strcasecmp(var, "asc");
- else
- ascending = 1;
-
- if (ascending)
- {
- for (i = 0, printer = (ipp_attribute_t *)cupsArrayIndex(printers, first);
- i < CUPS_PAGE_MAX && printer;
- i ++, printer = (ipp_attribute_t *)cupsArrayNext(printers))
- cgiSetIPPObjectVars(printer, NULL, i);
- }
- else
- {
- for (i = 0, printer = (ipp_attribute_t *)cupsArrayIndex(printers, count - first - 1);
- i < CUPS_PAGE_MAX && printer;
- i ++, printer = (ipp_attribute_t *)cupsArrayPrev(printers))
- cgiSetIPPObjectVars(printer, NULL, i);
- }
+ for (i = 0, printer = (ipp_attribute_t *)cupsArrayIndex(printers, first);
+ i < CUPS_PAGE_MAX && printer;
+ i ++, printer = (ipp_attribute_t *)cupsArrayNext(printers))
+ cgiSetIPPObjectVars(printer, NULL, i);
/*
* Save navigation URLs...
cgiSetVariable("NEXT", val);
}
+ if (count > CUPS_PAGE_MAX)
+ {
+ snprintf(val, sizeof(val), "%d", CUPS_PAGE_MAX * (count / CUPS_PAGE_MAX));
+ cgiSetVariable("LAST", val);
+ }
+
/*
* Then show everything...
*/
dnl Check for posix_spawn
AC_CHECK_FUNCS(posix_spawn)
+dnl Check for getgrouplist
+AC_CHECK_FUNCS(getgrouplist)
+
dnl See if the tm structure has the tm_gmtoff member...
AC_MSG_CHECKING(for tm_gmtoff member in tm structure)
AC_TRY_COMPILE([#include <time.h>],[struct tm t;
#undef HAVE_SCDYNAMICSTORECOPYCOMPUTERNAME
+/*
+ * Do we have the getgrouplist() function?
+ */
+
+#undef HAVE_GETGROUPLIST
+
+
/*
* Do we have OS X 10.4's mbr_XXX functions?
*/
done
+for ac_func in getgrouplist
+do :
+ ac_fn_c_check_func "$LINENO" "getgrouplist" "ac_cv_func_getgrouplist"
+if test "x$ac_cv_func_getgrouplist" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_GETGROUPLIST 1
+_ACEOF
+
+fi
+done
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tm_gmtoff member in tm structure" >&5
$as_echo_n "checking for tm_gmtoff member in tm structure... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#
# API library Makefile for CUPS.
#
-# Copyright 2007-2015 by Apple Inc.
+# Copyright 2007-2016 by Apple Inc.
# Copyright 1997-2006 by Easy Software Products, all rights reserved.
#
# These coded instructions, statements, and computer programs are the
--css ../doc/cups-printable.css \
--header api-overview.header --intro api-overview.shtml \
>../doc/help/api-overview.html
+ mxmldoc --section "Programming" --title "Administration APIs" \
+ --css ../doc/cups-printable.css \
+ --header api-admin.header --intro api-admin.shtml \
+ api-admin.xml \
+ adminutil.c adminutil.h getdevices.c >../doc/help/api-admin.html
+ mxmldoc --tokens help/api-admin.html api-admin.xml >../doc/help/api-admin.tokens
+ $(RM) api-admin.xml
mxmldoc --section "Programming" --title "Array API" \
--css ../doc/cups-printable.css \
--header api-array.header --intro api-array.shtml \
mxmldoc --tokens help/api-filter.html api-filter.xml >../doc/help/api-filter.tokens
$(RM) api-filter.xml
-framedhelp:
- echo Generating CUPS API help files...
- mxmldoc --framed api-overview \
- --section "Programming" \
- --title "Introduction to CUPS Programming" \
- --css ../doc/cups-printable.css \
- --header api-overview.header --intro api-overview.shtml
- mxmldoc --framed api-array \
- --section "Programming" --title "Array API" \
- --css ../doc/cups-printable.css \
- --header api-array.header --intro api-array.shtml \
- array.h array.c
- mxmldoc --framed api-cups \
- --section "Programming" --title "CUPS API" \
- --css ../doc/cups-printable.css \
- --header api-cups.header --intro api-cups.shtml \
- cups.h adminutil.c dest*.c language.c notify.c \
- options.c tempfile.c usersys.c \
- util.c
- mxmldoc --framed api-filedir \
- --section "Programming" --title "File and Directory APIs" \
- --css ../doc/cups-printable.css \
- --header api-filedir.header --intro api-filedir.shtml \
- file.h file.c dir.h dir.c
- mxmldoc --framed api-ppd \
- --section "Programming" --title "PPD API (DEPRECATED)" \
- --css ../doc/cups-printable.css \
- --header api-ppd.header --intro api-ppd.shtml \
- ppd.h attr.c conflicts.c custom.c emit.c localize.c mark.c \
- page.c ppd.c
- mxmldoc --framed api-httpipp \
- --section "Programming" --title "HTTP and IPP APIs" \
- --css ../doc/cups-printable.css \
- --header api-httpipp.header --intro api-httpipp.shtml \
- http.h ipp.h auth.c getdevices.c getputfile.c encode.c \
- http.c http-addr.c http-support.c ipp.c ipp-support.c \
- md5passwd.c request.c
- mxmldoc --framed api-filter \
- --section "Programming" \
- --title "Filter and Backend Programming" \
- --css ../doc/cups-printable.css \
- --header api-filter.header --intro api-filter.shtml \
- backchannel.c backend.h backend.c sidechannel.c sidechannel.h
-
#
# Lines of code computation...
--- /dev/null
+<!--
+ Administrative API header for CUPS.
+
+ Copyright 2016 by Apple Inc.
+
+ These coded instructions, statements, and computer programs are the
+ property of Apple Inc. and are protected by Federal copyright
+ law. Distribution and use rights are outlined in the file "LICENSE.txt"
+ which should have been included with this file. If this file is
+ file is missing or damaged, see the license at "http://www.cups.org/".
+-->
+
+<h1 class='title'>Administrative APIs</h1>
+
+<div class='summary'><table summary='General Information'>
+<thead>
+<tr>
+ <th>Header</th>
+ <th>cups/adminutil.h</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+ <th>Library</th>
+ <td>-lcups</td>
+</tr>
+<tr>
+ <th>See Also</th>
+ <td>Programming: <a href='api-overview.html' target='_top'>Introduction to CUPS Programming</a><br>
+ Programming: <a href='api-cups.html' target='_top'>CUPS API</a><br>
+ Programming: <a href='api-httpipp.html' target='_top'>HTTP and IPP APIs</a></td>
+</tr>
+</tbody>
+</table></div>
--- /dev/null
+<!--
+ Administrative API documentation for CUPS.
+
+ Copyright 2016 by Apple Inc.
+
+ These coded instructions, statements, and computer programs are the
+ property of Apple Inc. and are protected by Federal copyright
+ law. Distribution and use rights are outlined in the file "LICENSE.txt"
+ which should have been included with this file. If this file is
+ file is missing or damaged, see the license at "http://www.cups.org/".
+-->
+
+<h2 class="title"><a name="OVERVIEW">Overview</a></h2>
+
+<p>The administrative APIs provide convenience functions to perform certain administrative functions with the CUPS scheduler.</p>
+
+<blockquote><b>Note:<b>
+ <p>Administrative functions normally require administrative privileges to execute and must not be used in ordinary user applications!</p>
+</blockquote>
+
+<h3><a name="SETTINGS">Scheduler Settings</a></h3>
+
+<p>The <a href="#cupsAdminGetServerSettings"><code>cupsAdminGetServerSettings</code></a> and <a href="#cupsAdminSetServerSettings"><code>cupsAdminSetServerSettings</code></a> functions allow you to get and set simple directives and their values, respectively, in the <var>cupsd.conf</var> file for the CUPS scheduler. Settings are stored in CUPS option arrays which provide a simple list of string name/value pairs. While any simple <var>cupsd.conf</var> directive name can be specified, the following convenience names are also defined to control common complex directives:</p>
+
+<ul>
+ <li><code>CUPS_SERVER_DEBUG_LOGGING</code></li>: For <code>cupsAdminGetServerSettings</code>, a value of "1" means that the <code>LogLevel</code> directive is set to <code>debug</code> or <code>debug2</code> while a value of "0" means it is set to any other value. For <code>cupsAdminSetServerSettings</code> a value of "1" sets the <code>LogLeveL</code> to <code>debug</code> while a value of "0" sets it to <code>warn</code>.</li>
+ <li><code>CUPS_SERVER_REMOTE_ADMIN</code></li>: A value of "1" specifies that administrative requests are accepted from remote addresses while "0" specifies that requests are only accepted from local addresses (loopback interface and domain sockets).</li>
+ <li><code>CUPS_SERVER_REMOTE_ANY</code></li>: A value of "1" specifies that requests are accepts from any address while "0" specifies that requests are only accepted from the local subnet (when sharing is enabled) or local addresses (loopback interface and domain sockets).</li>
+ <li><code>CUPS_SERVER_SHARE_PRINTERS</code></li>: A value of "1" specifies that printer sharing is enabled for selected printers and remote requests are accepted while a value of "0" specifies that printer sharing is disables and remote requests are not accepted.</li>
+ <li><code>CUPS_SERVER_USER_CANCEL_ANY</code></li>: A value of "1" specifies that the default security policy allows any user to cancel any print job, regardless of the owner. A value of "0" specifies that only administrative users can cancel other user's jobs.</li>
+</ul>
+
+<blockquote><b>Note:</b>
+ <p>Changing settings will restart the CUPS scheduler.</p>
+ <p>When printer sharing or the web interface are enabled, the scheduler's launch-on-demand functionality is effectively disabled. This can affect power usage, system performance, and the security profile of a system.</p>
+</blockquote>
+
+<p>The recommended way to make changes to the <var>cupsd.conf</var> is to first call <a href="#cupsAdminGetServerSettings"><code>cupsAdminGetServerSettings</code></a>, make any changes to the returned option array, and then call <a href="#cupsAdminSetServerSettings"><code>cupsAdminSetServerSettings</code></a> to save those settings. For example, to enable the web interface:</p>
+
+<pre class="example">
+#include <cups/cups.h>
+#include <cups/adminutil.h>
+
+void
+enable_web_interface(void)
+{
+ int num_settings = 0; /* Number of settings */
+ cups_option_t *settings = NULL; /* Settings */
+
+
+ if (!<a href="#cupsAdminGetServerSettings">cupsAdminGetServerSettings</a>(CUPS_HTTP_DEFAULT, &num_settings, &settings))
+ {
+ fprintf(stderr, "ERROR: Unable to get server settings: %s\n", cupsLastErrorString());
+ return;
+ }
+
+ num_settings = <a href="api-cups.html#cupsAddOption">cupsAddOption</a>("WebInterface", "Yes", num_settings, &settings);
+
+ if (!<a href="#cupsAdminSetServerSettings">cupsAdminSetServerSettings</a>(CUPS_HTTP_DEFAULT, num_settings, settings))
+ {
+ fprintf(stderr, "ERROR: Unable to set server settings: %s\n", cupsLastErrorString());
+ }
+
+ <a href="api-cups.html#cupsFreeOptions">cupsFreeOptions</a>(num_settings, settings);
+}
+</pre>
+
+<h3><a name="DEVICES">Devices</a></h3>
+
+<p>Printers can be discovered through the CUPS scheduler using the <a href="#cupsGetDevices"><code>cupsGetDevices</code></a> API. Typically this API is used to locate printers to add the the system. Each device that is found will cause a supplied callback function to be executed. For example, to list the available printer devices that can be found within 30 seconds:</p>
+
+<pre class="example">
+#include <cups/cups.h>
+#include <cups/adminutil.h>
+
+
+void
+get_devices_cb(
+ const char *device_class, /* I - Class */
+ const char *device_id, /* I - 1284 device ID */
+ const char *device_info, /* I - Description */
+ const char *device_make_and_model, /* I - Make and model */
+ const char *device_uri, /* I - Device URI */
+ const char *device_location, /* I - Location */
+ void *user_data) /* I - User data */
+{
+ puts(device_uri);
+}
+
+
+void
+show_devices(void)
+{
+ <a href="#cupsGetDevices">cupsGetDevices</a>(CUPS_HTTP_DEFAULT, 30, NULL, NULL, get_devices_cb, NULL);
+}
+</pre>
<!--
Filter and backend programming header for CUPS.
- Copyright 2008-2014 by Apple Inc.
+ Copyright 2008-2016 by Apple Inc.
These coded instructions, statements, and computer programs are the
property of Apple Inc. and are protected by Federal copyright
<tr>
<th>Headers</th>
<th>cups/backend.h<br>
+ cups/ppd.h<br>
cups/sidechannel.h</th>
</tr>
</thead>
<!--
Filter and backend programming introduction for CUPS.
- Copyright 2007-2014 by Apple Inc.
+ Copyright 2007-2016 by Apple Inc.
Copyright 1997-2006 by Easy Software Products, all rights reserved.
These coded instructions, statements, and computer programs are the
<dd>Sets or clears printer-state-reason keywords for the current queue.
Typically this is used to indicate persistent media, ink, toner, and
configuration conditions or errors on a printer.
- <a href='#TABLE2'>Table 2</a> lists the standard state keywords -
+ <a href='#TABLE2'>Table 2</a> lists some of the standard "printer-state-reasons" keywords from the <a href="http://www.iana.org/assignments/ipp-registrations/ipp-registrations.xhtml#ipp-registrations-4">IANA IPP Registry</a> -
use vendor-prefixed ("com.example.foo") keywords for custom states. See
<a href="#MANAGING_STATE">Managing Printer State in a Filter</a> for more
information.
<!--
HTTP and IPP API header for CUPS.
- Copyright 2007-2011 by Apple Inc.
+ Copyright 2007-2016 by Apple Inc.
Copyright 1997-2006 by Easy Software Products, all rights reserved.
These coded instructions, statements, and computer programs are the
<div class='summary'><table summary='General Information'>
<thead>
<tr>
- <th>Header</th>
- <th>cups/cups.h</th>
+ <th>Headers</th>
+ <th>cups/cups.h<br>
+ cups/http.h<br>
+ cups/ipp.h</th>
</tr>
</thead>
<tbody>
<!--
Introduction to CUPS programming header for CUPS.
- Copyright 2008-2011 by Apple Inc.
+ Copyright 2008-2016 by Apple Inc.
These coded instructions, statements, and computer programs are the
property of Apple Inc. and are protected by Federal copyright
<tr>
<th>Headers</th>
<th>cups/cups.h<br>
+ cups/adminutil.h<br>
cups/array.h<br>
- cups/backend.h<br>
cups/dir.h<br>
cups/file.h<br>
+ cups/http.h<br>
+ cups/ipp.h<br>
+ cups/language.h<br>
cups/ppd.h<br>
- cups/raster.h<br>
- cups/sidechannel.h</th>
+ cups/pwg.h<br>
+ cups/raster.h</th>
</tr>
</thead>
<tbody>
<tr>
<th>Libraries</th>
- <td>-lcups<br>
- -lcupsimage</td>
+ <td>-lcups</td>
</tr>
<tr>
<th>See Also</th>
Programming: <a href='postscript-driver.html' target='_top'>Developing PostScript Printer Drivers</a><br>
Programming: <a href='api-filter.html' target='_top'>Filter and Backend Programming</a><br>
Programming: <a href='ppd-compiler.html' target='_top'>Introduction to the PPD Compiler</a><br>
+ Programming: <a href='api-admin.html' target='_top'>Administrative APIs</a><br>
Programming: <a href='api-array.html' target='_top'>Array API</a><br>
Programming: <a href='api-cups.html' target='_top'>CUPS API</a><br>
Programming: <a href='api-filedir.html' target='_top'>File and Directory APIs</a><br>
Programming: <a href='api-httpipp.html' target='_top'>HTTP and IPP APIs</a><br>
- Programming: <a href='api-ppd.html' target='_top'>PPD API</a><br>
+ Programming: <a href='api-ppd.html' target='_top'>PPD API (DEPRECATED)</a><br>
Programming: <a href='api-raster.html' target='_top'>Raster API</a><br>
References: <a href='ref-ppdcfile.html' target='_top'>PPD Compiler Driver Information File Reference</a><br>
Specifications: <a href='spec-ppd.html' target='_top'>CUPS PPD Extensions</a></td>
void *server_cert_data;
/* Server certificate user data */
int server_version, /* Server IPP version */
+ trust_first, /* Trust on first use? */
any_root, /* Allow any (e.g., self-signed) root */
expired_certs, /* Allow expired certs */
validate_certs; /* Validate certificates */
memset(cg, 0, sizeof(_cups_globals_t));
cg->encryption = (http_encryption_t)-1;
cg->password_cb = (cups_password_cb2_t)_cupsGetPassword;
+ cg->trust_first = -1;
cg->any_root = -1;
cg->expired_certs = -1;
cg->validate_certs = -1;
{
/*
* Don't abort yet, as this could just be an issue with the local
- * system not being configured with IPv4/IPv6/domain socket enabled...
+ * system not being configured with IPv4/IPv6/domain socket enabled.
+ *
+ * Just skip this address...
*/
+ addrlist = addrlist->next;
continue;
}
{
DEBUG_printf(("1httpAddrConnect2: Unable to connect to %s:%d: %s", httpAddrString(&(addrlist->addr), temp, sizeof(temp)), httpAddrPort(&(addrlist->addr)), strerror(errno)));
httpAddrClose(NULL, fds[nfds]);
+ addrlist = addrlist->next;
continue;
}
* credentials and allow if the new ones have a later expiration...
*/
- if (httpCredentialsGetExpiration(credentials) <= httpCredentialsGetExpiration(tcreds) ||
- !httpCredentialsAreValidForName(credentials, common_name))
+ if (!cg->trust_first)
+ {
+ /*
+ * Do not trust certificates on first use...
+ */
+
+ trust = HTTP_TRUST_INVALID;
+ }
+ else if (httpCredentialsGetExpiration(credentials) <= httpCredentialsGetExpiration(tcreds) || !httpCredentialsAreValidForName(credentials, common_name))
{
/*
* Either the new credentials are not newly issued, or the common name
trust = HTTP_TRUST_EXPIRED;
else if (!cg->any_root && cupsArrayCount(credentials) == 1)
trust = HTTP_TRUST_INVALID;
+ else if (!cg->trust_first)
+ trust = HTTP_TRUST_INVALID;
CFRelease(secCert);
/*
* TLS support code for CUPS using GNU TLS.
*
- * Copyright 2007-2015 by Apple Inc.
+ * Copyright 2007-2016 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
/* Auto-create self-signed certs? */
static char *tls_common_name = NULL;
/* Default common name */
+static gnutls_x509_crl_t tls_crl = NULL;/* Certificate revocation list */
static char *tls_keypath = NULL;
/* Server cert keychain path */
static _cups_mutex_t tls_mutex = _CUPS_MUTEX_INITIALIZER;
static gnutls_x509_crt_t http_gnutls_create_credential(http_credential_t *credential);
static const char *http_gnutls_default_path(char *buffer, size_t bufsize);
+static void http_gnutls_load_crl(void);
static const char *http_gnutls_make_path(char *buffer, size_t bufsize, const char *dirname, const char *filename, const char *ext);
static ssize_t http_gnutls_read(gnutls_transport_ptr_t ptr, void *data, size_t length);
static ssize_t http_gnutls_write(gnutls_transport_ptr_t ptr, const void *data, size_t length);
if (cert)
{
result = gnutls_x509_crt_check_hostname(cert, common_name) != 0;
+
+ if (result)
+ {
+ int i, /* Looping var */
+ count; /* Number of revoked certificates */
+ unsigned char cserial[1024], /* Certificate serial number */
+ rserial[1024]; /* Revoked serial number */
+ size_t cserial_size, /* Size of cert serial number */
+ rserial_size; /* Size of revoked serial number */
+
+ _cupsMutexLock(&tls_mutex);
+
+ count = gnutls_x509_crl_get_crt_count(tls_crl);
+
+ if (count > 0)
+ {
+ cserial_size = sizeof(cserial);
+ gnutls_x509_crt_get_serial(cert, cserial, &cserial_size);
+
+ for (i = 0; i < count; i ++)
+ {
+ rserial_size = sizeof(rserial);
+ if (!gnutls_x509_crl_get_crt_serial(tls_crl, i, rserial, &rserial_size, NULL) && cserial_size == rserial_size && !memcmp(cserial, rserial, rserial_size))
+ {
+ result = 0;
+ break;
+ }
+ }
+ }
+
+ _cupsMutexUnlock(&tls_mutex);
+ }
+
gnutls_x509_crt_deinit(cert);
}
return (HTTP_TRUST_UNKNOWN);
if (cg->any_root < 0)
+ {
_cupsSetDefaults();
+ http_gnutls_load_crl();
+ }
/*
* Look this common name up in the default keychains...
* credentials and allow if the new ones have a later expiration...
*/
- if (httpCredentialsGetExpiration(credentials) <= httpCredentialsGetExpiration(tcreds) ||
- !httpCredentialsAreValidForName(credentials, common_name))
+ if (!cg->trust_first)
+ {
+ /*
+ * Do not trust certificates on first use...
+ */
+
+ trust = HTTP_TRUST_INVALID;
+ }
+ else if (httpCredentialsGetExpiration(credentials) <= httpCredentialsGetExpiration(tcreds) || !httpCredentialsAreValidForName(credentials, common_name))
{
/*
* Either the new credentials are not newly issued, or the common name
}
+/*
+ * 'http_gnutls_load_crl()' - Load the certificate revocation list, if any.
+ */
+
+static void
+http_gnutls_load_crl(void)
+{
+ _cupsMutexLock(&tls_mutex);
+
+ if (!gnutls_x509_crl_init(&tls_crl))
+ {
+ cups_file_t *fp; /* CRL file */
+ char filename[1024], /* site.crl */
+ line[256]; /* Base64-encoded line */
+ unsigned char *data = NULL; /* Buffer for cert data */
+ size_t alloc_data = 0, /* Bytes allocated */
+ num_data = 0; /* Bytes used */
+ int decoded; /* Bytes decoded */
+ gnutls_datum_t datum; /* Data record */
+
+
+ http_gnutls_make_path(filename, sizeof(filename), CUPS_SERVERROOT, "site", "crl");
+
+ if ((fp = cupsFileOpen(filename, "r")) != NULL)
+ {
+ while (cupsFileGets(fp, line, sizeof(line)))
+ {
+ if (!strcmp(line, "-----BEGIN X509 CRL-----"))
+ {
+ if (num_data)
+ {
+ /*
+ * Missing END X509 CRL...
+ */
+
+ break;
+ }
+ }
+ else if (!strcmp(line, "-----END X509 CRL-----"))
+ {
+ if (!num_data)
+ {
+ /*
+ * Missing data...
+ */
+
+ break;
+ }
+
+ datum.data = data;
+ datum.size = num_data;
+
+ gnutls_x509_crl_import(tls_crl, &datum, GNUTLS_X509_FMT_PEM);
+
+ num_data = 0;
+ }
+ else
+ {
+ if (alloc_data == 0)
+ {
+ data = malloc(2048);
+ alloc_data = 2048;
+
+ if (!data)
+ break;
+ }
+ else if ((num_data + strlen(line)) >= alloc_data)
+ {
+ unsigned char *tdata = realloc(data, alloc_data + 1024);
+ /* Expanded buffer */
+
+ if (!tdata)
+ break;
+
+ data = tdata;
+ alloc_data += 1024;
+ }
+
+ decoded = alloc_data - num_data;
+ httpDecode64_2((char *)data + num_data, &decoded, line);
+ num_data += (size_t)decoded;
+ }
+ }
+
+ cupsFileClose(fp);
+
+ if (data)
+ free(data);
+ }
+ }
+
+ _cupsMutexUnlock(&tls_mutex);
+}
+
+
/*
* 'http_gnutls_make_path()' - Format a filename for a certificate or key file.
*/
* Local constants...
*/
+#ifdef __APPLE__
+# define kCUPSPrintingPrefs CFSTR("org.cups.PrintingPrefs")
+# define kAllowAnyRootKey CFSTR("AllowAnyRoot")
+# define kAllowExpiredCertsKey CFSTR("AllowExpiredCerts")
+# define kEncryptionKey CFSTR("Encryption")
+# define kGSSServiceNameKey CFSTR("GSSServiceName")
+# define kSSLOptionsKey CFSTR("SSLOptions")
+# define kTrustOnFirstUseKey CFSTR("TrustOnFirstUse")
+# define kValidateCertsKey CFSTR("ValidateCerts")
+#endif /* __APPLE__ */
+
#define _CUPS_PASSCHAR '*' /* Character that is echoed for password */
#ifdef HAVE_SSL
int ssl_options; /* SSLOptions values */
#endif /* HAVE_SSL */
- int any_root, /* Allow any (e.g., self-signed) root */
+ int trust_first, /* Trust on first use? */
+ any_root, /* Allow any (e.g., self-signed) root */
expired_certs, /* Allow expired certs */
validate_certs; /* Validate certificates */
http_encryption_t encryption; /* Encryption setting */
* Local functions...
*/
+#ifdef __APPLE__
+static int cups_apple_get_boolean(CFStringRef key, int *value);
+static int cups_apple_get_string(CFStringRef key, char *value, size_t valsize);
+#endif /* __APPLE__ */
+static int cups_boolean_value(const char *value);
static void cups_finalize_client_conf(_cups_client_conf_t *cc);
static void cups_init_client_conf(_cups_client_conf_t *cc);
static void cups_read_client_conf(cups_file_t *fp, _cups_client_conf_t *cc);
strlcpy(cg->gss_service_name, cc.gss_service_name, sizeof(cg->gss_service_name));
#endif /* HAVE_GSSAPI */
+ if (cg->trust_first < 0)
+ cg->trust_first = cc.trust_first;
+
if (cg->any_root < 0)
cg->any_root = cc.any_root;
}
+#ifdef __APPLE__
+/*
+ * 'cups_apple_get_boolean()' - Get a boolean setting from the CUPS preferences.
+ */
+
+static int /* O - 1 if set, 0 otherwise */
+cups_apple_get_boolean(
+ CFStringRef key, /* I - Key (name) */
+ int *value) /* O - Boolean value */
+{
+ Boolean bval, /* Preference value */
+ bval_set; /* Value is set? */
+
+
+ bval = CFPreferencesGetAppBooleanValue(key, kCUPSPrintingPrefs, &bval_set);
+
+ if (bval_set)
+ *value = (int)bval;
+
+ return ((int)bval_set);
+}
+
+
+/*
+ * 'cups_apple_get_string()' - Get a string setting from the CUPS preferences.
+ */
+
+static int /* O - 1 if set, 0 otherwise */
+cups_apple_get_string(
+ CFStringRef key, /* I - Key (name) */
+ char *value, /* O - String value */
+ size_t valsize) /* I - Size of value buffer */
+{
+ CFStringRef sval; /* String value */
+
+
+ if ((sval = CFPreferencesCopyAppValue(key, kCUPSPrintingPrefs)) != NULL)
+ {
+ Boolean result = CFStringGetCString(sval, value, (CFIndex)valsize, kCFStringEncodingUTF8);
+
+ CFRelease(sval);
+
+ if (result)
+ return (1);
+ }
+
+ return (0);
+}
+#endif /* __APPLE__ */
+
+
/*
* 'cups_boolean_value()' - Convert a string to a boolean value.
*/
const char *value; /* Environment variable */
+ if ((value = getenv("CUPS_TRUSTFIRST")) != NULL)
+ cc->trust_first = cups_boolean_value(value);
+
if ((value = getenv("CUPS_ANYROOT")) != NULL)
cc->any_root = cups_boolean_value(value);
* Then apply defaults for those values that haven't been set...
*/
+ if (cc->trust_first < 0)
+ cc->trust_first = 1;
+
if (cc->any_root < 0)
cc->any_root = 1;
cc->encryption = HTTP_ENCRYPTION_IF_REQUESTED;
if (cc->expired_certs < 0)
- cc->expired_certs = 1;
+ cc->expired_certs = 0;
#ifdef HAVE_GSSAPI
if (!cc->gss_service_name[0])
memset(cc, 0, sizeof(_cups_client_conf_t));
cc->encryption = (http_encryption_t)-1;
+ cc->trust_first = -1;
cc->any_root = -1;
cc->expired_certs = -1;
cc->validate_certs = -1;
+
+ /*
+ * Load settings from the org.cups.PrintingPrefs plist (which trump
+ * everything...)
+ */
+
+#ifdef __APPLE__
+ char sval[1024]; /* String value */
+ int bval; /* Boolean value */
+
+ if (cups_apple_get_boolean(kAllowAnyRootKey, &bval))
+ cc->any_root = bval;
+
+ if (cups_apple_get_boolean(kAllowExpiredCertsKey, &bval))
+ cc->expired_certs = bval;
+
+ if (cups_apple_get_string(kEncryptionKey, sval, sizeof(sval)))
+ cups_set_encryption(cc, sval);
+
+ if (cups_apple_get_string(kSSLOptionsKey, sval, sizeof(sval)))
+ cups_set_ssl_options(cc, sval);
+
+ if (cups_apple_get_boolean(kTrustOnFirstUseKey, &bval))
+ cc->trust_first = bval;
+
+ if (cups_apple_get_boolean(kValidateCertsKey, &bval))
+ cc->validate_certs = bval;
+#endif /* __APPLE__ */
}
#endif /* !__APPLE__ */
else if (!_cups_strcasecmp(line, "User") && value)
cups_set_user(cc, value);
+ else if (!_cups_strcasecmp(line, "TrustOnFirstUse") && value)
+ cc->trust_first = cups_boolean_value(value);
else if (!_cups_strcasecmp(line, "AllowAnyRoot") && value)
cc->any_root = cups_boolean_value(value);
else if (!_cups_strcasecmp(line, "AllowExpiredCerts") &&
images/smiley.jpg
HELPFILES = \
help/accounting.html \
+ help/api-admin.html \
help/api-array.html \
help/api-cups.html \
help/api-filedir.html \
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<!-- SECTION: Programming -->
+<head>
+ <title>Administration APIs </title>
+ <meta name="keywords" content="Programming">
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <meta name="creator" content="Mini-XML v2.8">
+<style type="text/css"><!--
+BODY {
+ font-family: lucida grande, geneva, helvetica, arial, sans-serif;
+}
+
+H1, H2, H3, H4, H5, H6, P, TD, TH {
+ font-family: lucida grande, geneva, helvetica, arial, sans-serif;
+}
+
+KBD {
+ font-family: monaco, courier, monospace;
+ font-weight: bold;
+}
+
+PRE {
+ font-family: monaco, courier, monospace;
+}
+
+PRE.command {
+ border: dotted thin #7f7f7f;
+ margin-left: 36pt;
+ padding: 10px;
+}
+
+P.compact {
+ margin: 0;
+}
+
+P.example {
+ font-style: italic;
+ margin-left: 36pt;
+}
+
+DL.man DD {
+ margin-left: 5em;
+}
+
+DL.man DT {
+ margin-left: 0;
+}
+
+PRE.man {
+ margin: 0;
+}
+
+PRE.example {
+ background: #eeeeee;
+ border: dotted thin #999999;
+ margin-left: 36pt;
+ padding: 10pt;
+}
+
+PRE.command EM, PRE.example EM {
+ font-family: lucida grande, geneva, helvetica, arial, sans-serif;
+}
+
+P.command {
+ font-family: monaco, courier, monospace;
+ margin-left: 36pt;
+}
+
+P.formula {
+ font-style: italic;
+ margin-left: 36pt;
+}
+
+BLOCKQUOTE {
+ background: #eeeeee;
+ border: solid thin #999999;
+ padding: 10pt;
+}
+
+A IMG {
+ border: none;
+}
+
+A:link:hover IMG {
+ background: #f0f0f0;
+ border-radius: 10px;
+ -moz-border-radius: 10px;
+}
+
+A:link, A:visited {
+ font-weight: inherit;
+ text-decoration: none;
+}
+
+A:link:hover, A:visited:hover, A:active {
+ text-decoration: underline;
+}
+
+SUB, SUP {
+ font-size: 50%;
+}
+
+TR.data, TD.data, TR.data TD {
+ margin-top: 10pt;
+ padding: 5pt;
+ border-bottom: solid 1pt #999999;
+}
+
+TR.data TH {
+ border-bottom: solid 1pt #999999;
+ padding-top: 10pt;
+ padding-left: 5pt;
+ text-align: left;
+}
+
+DIV.table TABLE {
+ border: solid thin #999999;
+ border-collapse: collapse;
+ border-spacing: 0;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+DIV.table CAPTION {
+ caption-side: top;
+ font-size: 120%;
+ font-style: italic;
+ font-weight: bold;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+DIV.table TABLE TD {
+ border: solid thin #cccccc;
+ padding-top: 5pt;
+}
+
+DIV.table TABLE TH {
+ background: #cccccc;
+ border: none;
+ border-bottom: solid thin #999999;
+}
+
+DIV.figure TABLE {
+ margin-left: auto;
+ margin-right: auto;
+}
+
+DIV.figure CAPTION {
+ caption-side: bottom;
+ font-size: 120%;
+ font-style: italic;
+ font-weight: bold;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+TH.label {
+ text-align: right;
+ vertical-align: top;
+}
+
+TH.sublabel {
+ text-align: right;
+ font-weight: normal;
+}
+
+HR {
+ border: solid thin;
+}
+
+SPAN.info {
+ background: black;
+ border: thin solid black;
+ color: white;
+ font-size: 80%;
+ font-style: italic;
+ font-weight: bold;
+ white-space: nowrap;
+}
+
+H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
+ float: right;
+ font-size: 100%;
+}
+
+H1.title {
+}
+
+H2.title, H3.title {
+ border-bottom: solid 2pt #000000;
+}
+
+DIV.indent, TABLE.indent {
+ margin-top: 2em;
+ margin-left: auto;
+ margin-right: auto;
+ width: 90%;
+}
+
+TABLE.indent {
+ border-collapse: collapse;
+}
+
+TABLE.indent TD, TABLE.indent TH {
+ padding: 0;
+}
+
+TABLE.list {
+ border-collapse: collapse;
+ margin-left: auto;
+ margin-right: auto;
+ width: 90%;
+}
+
+TABLE.list TH {
+ background: white;
+ border-bottom: solid thin #cccccc;
+ color: #444444;
+ padding-top: 10pt;
+ padding-left: 5pt;
+ text-align: left;
+ vertical-align: bottom;
+ white-space: nowrap;
+}
+
+TABLE.list TH A {
+ color: #4444cc;
+}
+
+TABLE.list TD {
+ border-bottom: solid thin #eeeeee;
+ padding-top: 5pt;
+ padding-left: 5pt;
+}
+
+TABLE.list TR:nth-child(even) {
+ background: #f8f8f8;
+}
+
+TABLE.list TR:nth-child(odd) {
+ background: #f4f4f4;
+}
+
+DT {
+ margin-left: 36pt;
+ margin-top: 12pt;
+}
+
+DD {
+ margin-left: 54pt;
+}
+
+DL.category DT {
+ font-weight: bold;
+}
+
+P.summary {
+ margin-left: 36pt;
+ font-family: monaco, courier, monospace;
+}
+
+DIV.summary TABLE {
+ border: solid thin #999999;
+ border-collapse: collapse;
+ border-spacing: 0;
+ margin: 10px;
+}
+
+DIV.summary TABLE TD, DIV.summary TABLE TH {
+ border: solid thin #999999;
+ padding: 5px;
+ text-align: left;
+ vertical-align: top;
+}
+
+DIV.summary TABLE THEAD TH {
+ background: #eeeeee;
+}
+
+/* API documentation styles... */
+div.body h1 {
+ margin: 0;
+}
+div.body h2 {
+ margin-top: 1.5em;
+}
+div.body h3, div.body h4, div.body h5 {
+ margin-bottom: 0.5em;
+ margin-top: 1.5em;
+}
+.class, .enumeration, .function, .struct, .typedef, .union {
+ border-bottom: solid thin #999999;
+ margin-bottom: 0;
+ margin-top: 2em;
+}
+.description {
+ margin-top: 0.5em;
+}
+code, p.code, pre, ul.code li {
+ font-family: monaco, courier, monospace;
+ font-size: 90%;
+}
+ul.code, ul.contents, ul.subcontents {
+ list-style-type: none;
+ margin: 0;
+ padding-left: 0;
+}
+ul.code li {
+ margin: 0;
+}
+ul.contents > li {
+ margin-top: 1em;
+}
+ul.contents li ul.code, ul.contents li ul.subcontents {
+ padding-left: 2em;
+}
+div.body dl {
+ margin-left: 0;
+ margin-top: 0;
+}
+div.body dt {
+ font-style: italic;
+ margin-left: 0;
+ margin-top: 0;
+}
+div.body dd {
+ margin-bottom: 0.5em;
+}
+
+/* This is just for the HTML files generated with the framedhelp target */
+div.contents {
+ background: #e8e8e8;
+ border: solid thin black;
+ padding: 10px;
+}
+div.contents h1 {
+ font-size: 110%;
+}
+div.contents h2 {
+ font-size: 100%;
+}
+div.contents ul.contents {
+ font-size: 80%;
+}
+div.contents ul.subcontents li {
+ margin-left: 1em;
+ text-indent: -1em;
+}
+--></style>
+</head>
+<body>
+<div class='body'>
+<!--
+ Administrative API header for CUPS.
+
+ Copyright 2016 by Apple Inc.
+
+ These coded instructions, statements, and computer programs are the
+ property of Apple Inc. and are protected by Federal copyright
+ law. Distribution and use rights are outlined in the file "LICENSE.txt"
+ which should have been included with this file. If this file is
+ file is missing or damaged, see the license at "http://www.cups.org/".
+-->
+
+<h1 class='title'>Administrative APIs</h1>
+
+<div class='summary'><table summary='General Information'>
+<thead>
+<tr>
+ <th>Header</th>
+ <th>cups/adminutil.h</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+ <th>Library</th>
+ <td>-lcups</td>
+</tr>
+<tr>
+ <th>See Also</th>
+ <td>Programming: <a href='api-overview.html' target='_top'>Introduction to CUPS Programming</a><br>
+ Programming: <a href='api-cups.html' target='_top'>CUPS API</a><br>
+ Programming: <a href='api-httpipp.html' target='_top'>HTTP and IPP APIs</a></td>
+</tr>
+</tbody>
+</table></div>
+<h2 class="title">Contents</h2>
+<ul class="contents">
+<li><a href="#OVERVIEW">Overview</a><ul class="subcontents">
+ <li><a href="#SETTINGS">Scheduler Settings</a></li>
+ <li><a href="#DEVICES">Devices</a></li>
+</ul></li>
+<li><a href="#FUNCTIONS">Functions</a><ul class="code">
+ <li><a href="#cupsAdminCreateWindowsPPD" title="Create the Windows PPD file for a printer.">cupsAdminCreateWindowsPPD</a></li>
+ <li><a href="#cupsAdminExportSamba" title="Export a printer to Samba.">cupsAdminExportSamba</a></li>
+ <li><a href="#cupsAdminGetServerSettings" title="Get settings from the server.">cupsAdminGetServerSettings</a></li>
+ <li><a href="#cupsAdminSetServerSettings" title="Set settings on the server.">cupsAdminSetServerSettings</a></li>
+ <li><a href="#cupsGetDevices" title="Get available printer devices.">cupsGetDevices</a></li>
+</ul></li>
+<li><a href="#TYPES">Data Types</a><ul class="code">
+ <li><a href="#cups_device_cb_t" title="Device callback
+">cups_device_cb_t</a></li>
+</ul></li>
+</ul>
+<!--
+ Administrative API documentation for CUPS.
+
+ Copyright 2016 by Apple Inc.
+
+ These coded instructions, statements, and computer programs are the
+ property of Apple Inc. and are protected by Federal copyright
+ law. Distribution and use rights are outlined in the file "LICENSE.txt"
+ which should have been included with this file. If this file is
+ file is missing or damaged, see the license at "http://www.cups.org/".
+-->
+
+<h2 class="title"><a name="OVERVIEW">Overview</a></h2>
+
+<p>The administrative APIs provide convenience functions to perform certain administrative functions with the CUPS scheduler.</p>
+
+<blockquote><b>Note:<b>
+ <p>Administrative functions normally require administrative privileges to execute and must not be used in ordinary user applications!</p>
+</blockquote>
+
+<h3><a name="SETTINGS">Scheduler Settings</a></h3>
+
+<p>The <a href="#cupsAdminGetServerSettings"><code>cupsAdminGetServerSettings</code></a> and <a href="#cupsAdminSetServerSettings"><code>cupsAdminSetServerSettings</code></a> functions allow you to get and set simple directives and their values, respectively, in the <var>cupsd.conf</var> file for the CUPS scheduler. Settings are stored in CUPS option arrays which provide a simple list of string name/value pairs. While any simple <var>cupsd.conf</var> directive name can be specified, the following convenience names are also defined to control common complex directives:</p>
+
+<ul>
+ <li><code>CUPS_SERVER_DEBUG_LOGGING</code></li>: For <code>cupsAdminGetServerSettings</code>, a value of "1" means that the <code>LogLevel</code> directive is set to <code>debug</code> or <code>debug2</code> while a value of "0" means it is set to any other value. For <code>cupsAdminSetServerSettings</code> a value of "1" sets the <code>LogLeveL</code> to <code>debug</code> while a value of "0" sets it to <code>warn</code>.</li>
+ <li><code>CUPS_SERVER_REMOTE_ADMIN</code></li>: A value of "1" specifies that administrative requests are accepted from remote addresses while "0" specifies that requests are only accepted from local addresses (loopback interface and domain sockets).</li>
+ <li><code>CUPS_SERVER_REMOTE_ANY</code></li>: A value of "1" specifies that requests are accepts from any address while "0" specifies that requests are only accepted from the local subnet (when sharing is enabled) or local addresses (loopback interface and domain sockets).</li>
+ <li><code>CUPS_SERVER_SHARE_PRINTERS</code></li>: A value of "1" specifies that printer sharing is enabled for selected printers and remote requests are accepted while a value of "0" specifies that printer sharing is disables and remote requests are not accepted.</li>
+ <li><code>CUPS_SERVER_USER_CANCEL_ANY</code></li>: A value of "1" specifies that the default security policy allows any user to cancel any print job, regardless of the owner. A value of "0" specifies that only administrative users can cancel other user's jobs.</li>
+</ul>
+
+<blockquote><b>Note:</b>
+ <p>Changing settings will restart the CUPS scheduler.</p>
+ <p>When printer sharing or the web interface are enabled, the scheduler's launch-on-demand functionality is effectively disabled. This can affect power usage, system performance, and the security profile of a system.</p>
+</blockquote>
+
+<p>The recommended way to make changes to the <var>cupsd.conf</var> is to first call <a href="#cupsAdminGetServerSettings"><code>cupsAdminGetServerSettings</code></a>, make any changes to the returned option array, and then call <a href="#cupsAdminSetServerSettings"><code>cupsAdminSetServerSettings</code></a> to save those settings. For example, to enable the web interface:</p>
+
+<pre class="example">
+#include <cups/cups.h>
+#include <cups/adminutil.h>
+
+void
+enable_web_interface(void)
+{
+ int num_settings = 0; /* Number of settings */
+ cups_option_t *settings = NULL; /* Settings */
+
+
+ if (!<a href="#cupsAdminGetServerSettings">cupsAdminGetServerSettings</a>(CUPS_HTTP_DEFAULT, &num_settings, &settings))
+ {
+ fprintf(stderr, "ERROR: Unable to get server settings: %s\n", cupsLastErrorString());
+ return;
+ }
+
+ num_settings = <a href="api-cups.html#cupsAddOption">cupsAddOption</a>("WebInterface", "Yes", num_settings, &settings);
+
+ if (!<a href="#cupsAdminSetServerSettings">cupsAdminSetServerSettings</a>(CUPS_HTTP_DEFAULT, num_settings, settings))
+ {
+ fprintf(stderr, "ERROR: Unable to set server settings: %s\n", cupsLastErrorString());
+ }
+
+ <a href="api-cups.html#cupsFreeOptions">cupsFreeOptions</a>(num_settings, settings);
+}
+</pre>
+
+<h3><a name="DEVICES">Devices</a></h3>
+
+<p>Printers can be discovered through the CUPS scheduler using the <a href="#cupsGetDevices"><code>cupsGetDevices</code></a> API. Typically this API is used to locate printers to add the the system. Each device that is found will cause a supplied callback function to be executed. For example, to list the available printer devices that can be found within 30 seconds:</p>
+
+<pre class="example">
+#include <cups/cups.h>
+#include <cups/adminutil.h>
+
+
+void
+get_devices_cb(
+ const char *device_class, /* I - Class */
+ const char *device_id, /* I - 1284 device ID */
+ const char *device_info, /* I - Description */
+ const char *device_make_and_model, /* I - Make and model */
+ const char *device_uri, /* I - Device URI */
+ const char *device_location, /* I - Location */
+ void *user_data) /* I - User data */
+{
+ puts(device_uri);
+}
+
+
+void
+show_devices(void)
+{
+ <a href="#cupsGetDevices">cupsGetDevices</a>(CUPS_HTTP_DEFAULT, 30, NULL, NULL, get_devices_cb, NULL);
+}
+</pre>
+<h2 class="title"><a name="FUNCTIONS">Functions</a></h2>
+<h3 class="function"><span class="info"> DEPRECATED </span><a name="cupsAdminCreateWindowsPPD">cupsAdminCreateWindowsPPD</a></h3>
+<p class="description">Create the Windows PPD file for a printer.</p>
+<p class="code">
+char *cupsAdminCreateWindowsPPD (<br>
+ http_t *http,<br>
+ const char *dest,<br>
+ char *buffer,<br>
+ int bufsize<br>
+);</p>
+<h4 class="parameters">Parameters</h4>
+<dl>
+<dt>http</dt>
+<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
+<dt>dest</dt>
+<dd class="description">Printer or class</dd>
+<dt>buffer</dt>
+<dd class="description">Filename buffer</dd>
+<dt>bufsize</dt>
+<dd class="description">Size of filename buffer</dd>
+</dl>
+<h4 class="returnvalue">Return Value</h4>
+<p class="description">PPD file or NULL</p>
+<h3 class="function"><span class="info"> DEPRECATED </span><a name="cupsAdminExportSamba">cupsAdminExportSamba</a></h3>
+<p class="description">Export a printer to Samba.</p>
+<p class="code">
+int cupsAdminExportSamba (<br>
+ const char *dest,<br>
+ const char *ppd,<br>
+ const char *samba_server,<br>
+ const char *samba_user,<br>
+ const char *samba_password,<br>
+ FILE *logfile<br>
+);</p>
+<h4 class="parameters">Parameters</h4>
+<dl>
+<dt>dest</dt>
+<dd class="description">Destination to export</dd>
+<dt>ppd</dt>
+<dd class="description">PPD file</dd>
+<dt>samba_server</dt>
+<dd class="description">Samba server</dd>
+<dt>samba_user</dt>
+<dd class="description">Samba username</dd>
+<dt>samba_password</dt>
+<dd class="description">Samba password</dd>
+<dt>logfile</dt>
+<dd class="description">Log file, if any</dd>
+</dl>
+<h4 class="returnvalue">Return Value</h4>
+<p class="description">1 on success, 0 on failure</p>
+<h3 class="function"><span class="info"> CUPS 1.3/OS X 10.5 </span><a name="cupsAdminGetServerSettings">cupsAdminGetServerSettings</a></h3>
+<p class="description">Get settings from the server.</p>
+<p class="code">
+int cupsAdminGetServerSettings (<br>
+ http_t *http,<br>
+ int *num_settings,<br>
+ cups_option_t **settings<br>
+);</p>
+<h4 class="parameters">Parameters</h4>
+<dl>
+<dt>http</dt>
+<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
+<dt>num_settings</dt>
+<dd class="description">Number of settings</dd>
+<dt>settings</dt>
+<dd class="description">Settings</dd>
+</dl>
+<h4 class="returnvalue">Return Value</h4>
+<p class="description">1 on success, 0 on failure</p>
+<h4 class="discussion">Discussion</h4>
+<p class="discussion">The returned settings should be freed with cupsFreeOptions() when
+you are done with them.
+
+</p>
+<h3 class="function"><span class="info"> CUPS 1.3/OS X 10.5 </span><a name="cupsAdminSetServerSettings">cupsAdminSetServerSettings</a></h3>
+<p class="description">Set settings on the server.</p>
+<p class="code">
+int cupsAdminSetServerSettings (<br>
+ http_t *http,<br>
+ int num_settings,<br>
+ cups_option_t *settings<br>
+);</p>
+<h4 class="parameters">Parameters</h4>
+<dl>
+<dt>http</dt>
+<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
+<dt>num_settings</dt>
+<dd class="description">Number of settings</dd>
+<dt>settings</dt>
+<dd class="description">Settings</dd>
+</dl>
+<h4 class="returnvalue">Return Value</h4>
+<p class="description">1 on success, 0 on failure</p>
+<h3 class="function"><span class="info"> CUPS 1.4/OS X 10.6 </span><a name="cupsGetDevices">cupsGetDevices</a></h3>
+<p class="description">Get available printer devices.</p>
+<p class="code">
+ipp_status_t cupsGetDevices (<br>
+ http_t *http,<br>
+ int timeout,<br>
+ const char *include_schemes,<br>
+ const char *exclude_schemes,<br>
+ <a href="#cups_device_cb_t">cups_device_cb_t</a> callback,<br>
+ void *user_data<br>
+);</p>
+<h4 class="parameters">Parameters</h4>
+<dl>
+<dt>http</dt>
+<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
+<dt>timeout</dt>
+<dd class="description">Timeout in seconds or <code>CUPS_TIMEOUT_DEFAULT</code></dd>
+<dt>include_schemes</dt>
+<dd class="description">Comma-separated URI schemes to include or <code>CUPS_INCLUDE_ALL</code></dd>
+<dt>exclude_schemes</dt>
+<dd class="description">Comma-separated URI schemes to exclude or <code>CUPS_EXCLUDE_NONE</code></dd>
+<dt>callback</dt>
+<dd class="description">Callback function</dd>
+<dt>user_data</dt>
+<dd class="description">User data pointer</dd>
+</dl>
+<h4 class="returnvalue">Return Value</h4>
+<p class="description">Request status - <code>IPP_OK</code> on success.</p>
+<h4 class="discussion">Discussion</h4>
+<p class="discussion">This function sends a CUPS-Get-Devices request and streams the discovered
+devices to the specified callback function. The "timeout" parameter controls
+how long the request lasts, while the "include_schemes" and "exclude_schemes"
+parameters provide comma-delimited lists of backends to include or omit from
+the request respectively.
+
+</p>
+<h2 class="title"><a name="TYPES">Data Types</a></h2>
+<h3 class="typedef"><span class="info"> CUPS 1.4/OS X 10.6 </span><a name="cups_device_cb_t">cups_device_cb_t</a></h3>
+<p class="description">Device callback
+</p>
+<p class="code">
+typedef void (*cups_device_cb_t)(const char *device_class, const char *device_id, const char *device_info, const char *device_make_and_model, const char *device_uri, const char *device_location, void *user_data);
+</p>
+</div>
+</body>
+</html>
<title>Array API </title>
<meta name="keywords" content="Programming">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <meta name="creator" content="Mini-XML v2.7">
+ <meta name="creator" content="Mini-XML v2.8">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
<title>CUPS API </title>
<meta name="keywords" content="Programming">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <meta name="creator" content="Mini-XML v2.7">
+ <meta name="creator" content="Mini-XML v2.8">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
<li><a href="#cups_dest_cb_t" title="Destination enumeration callback
">cups_dest_cb_t</a></li>
<li><a href="#cups_dest_t" title="Destination">cups_dest_t</a></li>
- <li><a href="#cups_device_cb_t" title="Device callback
-">cups_device_cb_t</a></li>
<li><a href="#cups_dinfo_t" title="Destination capability and status
information ">cups_dinfo_t</a></li>
<li><a href="#cups_job_t" title="Job">cups_job_t</a></li>
<p class="code">
typedef struct <a href="#cups_dest_s">cups_dest_s</a> cups_dest_t;
</p>
-<h3 class="typedef"><span class="info"> CUPS 1.4/OS X 10.6 </span><a name="cups_device_cb_t">cups_device_cb_t</a></h3>
-<p class="description">Device callback
-</p>
-<p class="code">
-typedef void (*cups_device_cb_t)(const char *device_class, const char *device_id, const char *device_info, const char *device_make_and_model, const char *device_uri, const char *device_location, void *user_data);
-</p>
<h3 class="typedef"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="cups_dinfo_t">cups_dinfo_t</a></h3>
<p class="description">Destination capability and status
information </p>
<title>File and Directory APIs </title>
<meta name="keywords" content="Programming">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <meta name="creator" content="Mini-XML v2.7">
+ <meta name="creator" content="Mini-XML v2.8">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
<title>Filter and Backend Programming </title>
<meta name="keywords" content="Programming">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <meta name="creator" content="Mini-XML v2.7">
+ <meta name="creator" content="Mini-XML v2.8">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
<!--
Filter and backend programming header for CUPS.
- Copyright 2008-2014 by Apple Inc.
+ Copyright 2008-2016 by Apple Inc.
These coded instructions, statements, and computer programs are the
property of Apple Inc. and are protected by Federal copyright
<tr>
<th>Headers</th>
<th>cups/backend.h<br>
+ cups/ppd.h<br>
cups/sidechannel.h</th>
</tr>
</thead>
<!--
Filter and backend programming introduction for CUPS.
- Copyright 2007-2014 by Apple Inc.
+ Copyright 2007-2016 by Apple Inc.
Copyright 1997-2006 by Easy Software Products, all rights reserved.
These coded instructions, statements, and computer programs are the
<dd>Sets or clears printer-state-reason keywords for the current queue.
Typically this is used to indicate persistent media, ink, toner, and
configuration conditions or errors on a printer.
- <a href='#TABLE2'>Table 2</a> lists the standard state keywords -
+ <a href='#TABLE2'>Table 2</a> lists some of the standard "printer-state-reasons" keywords from the <a href="http://www.iana.org/assignments/ipp-registrations/ipp-registrations.xhtml#ipp-registrations-4">IANA IPP Registry</a> -
use vendor-prefixed ("com.example.foo") keywords for custom states. See
<a href="#MANAGING_STATE">Managing Printer State in a Filter</a> for more
information.
<title>HTTP and IPP APIs </title>
<meta name="keywords" content="Programming">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <meta name="creator" content="Mini-XML v2.7">
+ <meta name="creator" content="Mini-XML v2.8">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
<!--
HTTP and IPP API header for CUPS.
- Copyright 2007-2011 by Apple Inc.
+ Copyright 2007-2016 by Apple Inc.
Copyright 1997-2006 by Easy Software Products, all rights reserved.
These coded instructions, statements, and computer programs are the
<div class='summary'><table summary='General Information'>
<thead>
<tr>
- <th>Header</th>
- <th>cups/cups.h</th>
+ <th>Headers</th>
+ <th>cups/cups.h<br>
+ cups/http.h<br>
+ cups/ipp.h</th>
</tr>
</thead>
<tbody>
<title>Introduction to CUPS Programming </title>
<meta name="keywords" content="Programming">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <meta name="creator" content="Mini-XML v2.7">
+ <meta name="creator" content="Mini-XML v2.8">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
<!--
Introduction to CUPS programming header for CUPS.
- Copyright 2008-2011 by Apple Inc.
+ Copyright 2008-2016 by Apple Inc.
These coded instructions, statements, and computer programs are the
property of Apple Inc. and are protected by Federal copyright
<tr>
<th>Headers</th>
<th>cups/cups.h<br>
+ cups/adminutil.h<br>
cups/array.h<br>
- cups/backend.h<br>
cups/dir.h<br>
cups/file.h<br>
+ cups/http.h<br>
+ cups/ipp.h<br>
+ cups/language.h<br>
cups/ppd.h<br>
- cups/raster.h<br>
- cups/sidechannel.h</th>
+ cups/pwg.h<br>
+ cups/raster.h</th>
</tr>
</thead>
<tbody>
<tr>
<th>Libraries</th>
- <td>-lcups<br>
- -lcupsimage</td>
+ <td>-lcups</td>
</tr>
<tr>
<th>See Also</th>
Programming: <a href='postscript-driver.html' target='_top'>Developing PostScript Printer Drivers</a><br>
Programming: <a href='api-filter.html' target='_top'>Filter and Backend Programming</a><br>
Programming: <a href='ppd-compiler.html' target='_top'>Introduction to the PPD Compiler</a><br>
+ Programming: <a href='api-admin.html' target='_top'>Administrative APIs</a><br>
Programming: <a href='api-array.html' target='_top'>Array API</a><br>
Programming: <a href='api-cups.html' target='_top'>CUPS API</a><br>
Programming: <a href='api-filedir.html' target='_top'>File and Directory APIs</a><br>
Programming: <a href='api-httpipp.html' target='_top'>HTTP and IPP APIs</a><br>
- Programming: <a href='api-ppd.html' target='_top'>PPD API</a><br>
+ Programming: <a href='api-ppd.html' target='_top'>PPD API (DEPRECATED)</a><br>
Programming: <a href='api-raster.html' target='_top'>Raster API</a><br>
References: <a href='ref-ppdcfile.html' target='_top'>PPD Compiler Driver Information File Reference</a><br>
Specifications: <a href='spec-ppd.html' target='_top'>CUPS PPD Extensions</a></td>
<title>PPD API (DEPRECATED) </title>
<meta name="keywords" content="Programming">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <meta name="creator" content="Mini-XML v2.7">
+ <meta name="creator" content="Mini-XML v2.8">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
<title>Raster API </title>
<meta name="keywords" content="Programming">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <meta name="creator" content="Mini-XML v2.7">
+ <meta name="creator" content="Mini-XML v2.8">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
<body>
<h1 class="title">client.conf(5)</h1>
<h2 class="title"><a name="NAME">Name</a></h2>
-client.conf - client configuration file for cups (deprecated)
+client.conf - client configuration file for cups
<h2 class="title"><a name="DESCRIPTION">Description</a></h2>
The <b>client.conf</b> file configures the CUPS client and is normally located in the <i>/etc/cups</i> and/or <i>~/.cups</i> directories.
Each line in the file can be a configuration directive, a blank line, or a comment. Comment lines start with the # character.
<p><b>Note:</b> Starting with OS X 10.7, this file is only used by command-line and X11 applications plus the IPP backend.
The <b>ServerName</b> directive is not supported on OS X at all.
+Starting with OS X 10.TODO, all applications can access these settings in the <i>/Library/Preferences/org.cups.PrintingPrefs.plist</i> file instead.
+See the NOTES section below for more information.
<h3><a name="DIRECTIVES">Directives</a></h3>
The following directives are understood by the client. Consult the online help for detailed descriptions:
<dl class="man">
<dt><b>AllowExpiredCerts Yes</b>
<dd style="margin-left: 5.0em"><dt><b>AllowExpiredCerts No</b>
<dd style="margin-left: 5.0em">Specifies whether to allow TLS with expired certificates.
-The default is "Yes".
+The default is "No".
<dt><b>Encryption IfRequested</b>
<dd style="margin-left: 5.0em"><dt><b>Encryption Never</b>
<dd style="margin-left: 5.0em"><dt><b>Encryption Required</b>
The <i>AllowRC4</i> option enables the 128-bit RC4 cipher suites, which are required for some older clients that do not implement newer ones.
The <i>AllowSSL3</i> option enables SSL v3.0, which is required for some older clients that do not support TLS v1.0.
The <i>DenyTLS1.0</i> option disables TLS v1.0 support - this sets the minimum protocol version to TLS v1.1.
+<dt><b>TrustOnFirstUse Yes</b>
+<dd style="margin-left: 5.0em"><dt><b>TrustOnFirstUse No</b>
+<dd style="margin-left: 5.0em">Specifies whether to trust new TLS certificates by default.
+The default is "Yes".
<dt><b>User </b><i>name</i>
<dd style="margin-left: 5.0em">Specifies the default user name to use for requests.
<dt><b>ValidateCerts Yes</b>
The default is "No".
</dl>
<h2 class="title"><a name="NOTES">Notes</a></h2>
-The <b>client.conf</b> file is deprecated and will no longer be supported in a future version of CUPS.
+The <b>client.conf</b> file is deprecated on OS X and will no longer be supported in a future version of CUPS.
+Configuration settings can instead be viewed or changed using the
+<b>defaults</b>(1)
+command:
+<pre class="man">
+defaults write /Library/Preferences/org.cups.PrintingPrefs.plist Encryption Required
+defaults write /Library/Preferences/org.cups.PrintingPrefs.plist TrustOnFirstUse -bool NO
+
+defaults read /Library/Preferences/org.cups.PrintingPrefs.plist Encryption
+</pre>
+On Linux and other systems using GNU TLS, the <i>/etc/cups/ssl/site.crl</i> file, if present, provides a list of revoked X.509 certificates and is used when validating certificates.
<h2 class="title"><a name="SEE_ALSO">See Also</a></h2>
<a href="man-cups.html?TOPIC=Man+Pages"><b>cups</b>(1),</a>
+<b>default</b>(1),
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2015 by Apple Inc.
+Copyright © 2007-2016 by Apple Inc.
</body>
</html>
<dd style="margin-left: 5.0em">Sets the number of copies to print.
<dt><b>-o "</b><i>name</i><b>=</b><i>value </i>[ ... <i>name</i><b>=</b><i>value </i>]<b>"</b>
<dd style="margin-left: 5.0em">Sets one or more job options.
+See "COMMON JOB OPTIONS" below.
<dt><b>-q </b><i>priority</i>
<dd style="margin-left: 5.0em">Sets the job priority from 1 (lowest) to 100 (highest).
The default priority is 50.
<a href="man-lpoptions.html?TOPIC=Man+Pages"><b>lpoptions</b>(1)</a>
command, the following generic options are available:
<dl class="man">
+<dt><b>-o collate=true</b>
+<dd style="margin-left: 5.0em">Prints collated copies.
+<dt><b>-o fit-to-page</b>
+<dd style="margin-left: 5.0em">Scales the print file to fit on the page.
+<dt><b>-o job-hold-until=</b><i>when</i>
+<dd style="margin-left: 5.0em">Holds the job until the specified local time.
+"when" can be "indefinite" to hold the until released, "day-time" to print the job between 6am and 6pm local time, "night" to print the job between 6pm and 6am local time, "second-shift" to print the job between 4pm and 12am local time, "third-shift" to print the job between 12am and 8am local time, or "weekend" to print the job on Saturday or Sunday.
+<dt><b>-o job-hold-until=</b><i>hh:mm</i>
+<dd style="margin-left: 5.0em">Holds the job until the specified time in hours and minutes UTC.
+<dt><b>-o job-priority=</b><i>priority</i>
+<dd style="margin-left: 5.0em">Set the priority to a value from 1 (lowest) to 100 (highest), which influences when a job is scheduled for printing.
+The default priority is typically 50.
+<dt><b>-o job-sheets=</b><i>name</i>
+<dd style="margin-left: 5.0em">Prints a cover page (banner) with the document.
+The "name" can be "classified", "confidential", "secret", "standard", "topsecret", or "unclassified".
+<dt><b>-o job-sheets=</b><i>start-name,end-name</i>
+<dd style="margin-left: 5.0em">Prints cover pages (banners) with the document.
<dt><b>-o media=</b><i>size</i>
<dd style="margin-left: 5.0em">Sets the page size to <i>size</i>. Most printers support at least the size names "a4", "letter", and "legal".
+<dt><b>-o mirror</b>
+<dd style="margin-left: 5.0em">Mirrors each page.
+<dt><b>-o number-up=</b>{<i>2|4|6|9|16</i>}
+<dd style="margin-left: 5.0em">Prints 2, 4, 6, 9, or 16 document (input) pages on each output page.
+<dt><b>-o number-up-layout=</b><i>layout</i>
+<dd style="margin-left: 5.0em">Specifies the layout of pages with the "number-up" option.
+The "layout" string can be "btlr", "btrl", "lrbt", "lrtb", "rlbt", "rltb", "tblr", or "tbrl" - the first two letters determine the column order while the second two letters determine the row order.
+"bt" is bottom-to-top, "lr" is left-to-right, "rl" is right-to-left, and "tb" is top-to-bottom.
<dt><b>-o orientation-requested=4</b>
-<dd style="margin-left: 5.0em">Prints the job in landscape (rotated 90 degrees).
+<dd style="margin-left: 5.0em">Prints the job in landscape (rotated 90 degrees counter-clockwise).
+<dt><b>-o orientation-requested=5</b>
+<dd style="margin-left: 5.0em">Prints the job in landscape (rotated 90 degrees clockwise).
+<dt><b>-o orientation-requested=6</b>
+<dd style="margin-left: 5.0em">Prints the job in reverse portrait (rotated 180 degrees).
+<dt><b>-o outputorder=reverse</b>
+<dd style="margin-left: 5.0em">Prints pages in reverse order.
+<dt><b>-o page-border=</b><i>border</i>
+<dd style="margin-left: 5.0em">Prints a border around each document page.
+"border" is "double", "double-thick", "single", or "single-thick".
+<dt><b>-o page-ranges=</b><i>page-list</i>
+<dd style="margin-left: 5.0em">Specifies which pages to print in the document.
+The list can contain a list of numbers and ranges (#-#) separated by commas, e.g., "1,3-5,16".
+The page numbers refer to the output pages and not the document's original pages - options like "number-up" can affect the numbering of the pages.
<dt><b>-o sides=one-sided</b>
<dd style="margin-left: 5.0em">Prints on one side of the paper.
<dt><b>-o sides=two-sided-long-edge</b>
<dd style="margin-left: 5.0em">Prints on both sides of the paper for portrait output.
<dt><b>-o sides=two-sided-short-edge</b>
<dd style="margin-left: 5.0em">Prints on both sides of the paper for landscape output.
-<dt><b>-o fit-to-page</b>
-<dd style="margin-left: 5.0em">Scales the print file to fit on the page.
-<dt><b>-o number-up=</b>{<i>2|4|6|9|16</i>}
-<dd style="margin-left: 5.0em">Prints 2, 4, 6, 9, or 16 document (input) pages on each output page.
</dl>
<h2 class="title"><a name="CONFORMING_TO">Conforming To</a></h2>
Unlike the System V printing system, CUPS allows printer names to contain any printable character except SPACE, TAB, "/", or "#".
<a href="man-lpstat.html?TOPIC=Man+Pages"><b>lpstat</b>(1),</a>
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2015 by Apple Inc.
+Copyright © 2007-2016 by Apple Inc.
</body>
</html>
<dd style="margin-left: 5.0em">Send an email on job completion.
<dt><b>-o </b><i>option</i>[<b>=</b><i>value</i>]
<dd style="margin-left: 5.0em">Sets a job option.
+See "COMMON JOB OPTIONS" below.
<dt><b>-p</b>
<dd style="margin-left: 5.0em">Specifies that the print file should be formatted with a shaded header with the date, time, job name, and page number.
This option is equivalent to <i>-o prettyprint</i> and is only useful when printing text files.
<dt><b>-r</b>
<dd style="margin-left: 5.0em">Specifies that the named print files should be deleted after submitting them.
</dl>
+<h3><a name="COMMON_JOB_OPTIONS">Common Job Options</a></h3>
+Aside from the printer-specific options reported by the
+<a href="man-lpoptions.html?TOPIC=Man+Pages"><b>lpoptions</b>(1)</a>
+command, the following generic options are available:
+<dl class="man">
+<dt><b>-o collate=true</b>
+<dd style="margin-left: 5.0em">Prints collated copies.
+<dt><b>-o fit-to-page</b>
+<dd style="margin-left: 5.0em">Scales the print file to fit on the page.
+<dt><b>-o job-hold-until=</b><i>when</i>
+<dd style="margin-left: 5.0em">Holds the job until the specified local time.
+"when" can be "indefinite" to hold the until released, "day-time" to print the job between 6am and 6pm local time, "night" to print the job between 6pm and 6am local time, "second-shift" to print the job between 4pm and 12am local time, "third-shift" to print the job between 12am and 8am local time, or "weekend" to print the job on Saturday or Sunday.
+<dt><b>-o job-hold-until=</b><i>hh:mm</i>
+<dd style="margin-left: 5.0em">Holds the job until the specified time in hours and minutes UTC.
+<dt><b>-o job-priority=</b><i>priority</i>
+<dd style="margin-left: 5.0em">Set the priority to a value from 1 (lowest) to 100 (highest), which influences when a job is scheduled for printing.
+The default priority is typically 50.
+<dt><b>-o job-sheets=</b><i>name</i>
+<dd style="margin-left: 5.0em">Prints a cover page (banner) with the document.
+The "name" can be "classified", "confidential", "secret", "standard", "topsecret", or "unclassified".
+<dt><b>-o job-sheets=</b><i>start-name,end-name</i>
+<dd style="margin-left: 5.0em">Prints cover pages (banners) with the document.
+<dt><b>-o media=</b><i>size</i>
+<dd style="margin-left: 5.0em">Sets the page size to <i>size</i>. Most printers support at least the size names "a4", "letter", and "legal".
+<dt><b>-o mirror</b>
+<dd style="margin-left: 5.0em">Mirrors each page.
+<dt><b>-o number-up=</b>{<i>2|4|6|9|16</i>}
+<dd style="margin-left: 5.0em">Prints 2, 4, 6, 9, or 16 document (input) pages on each output page.
+<dt><b>-o number-up-layout=</b><i>layout</i>
+<dd style="margin-left: 5.0em">Specifies the layout of pages with the "number-up" option.
+The "layout" string can be "btlr", "btrl", "lrbt", "lrtb", "rlbt", "rltb", "tblr", or "tbrl" - the first two letters determine the column order while the second two letters determine the row order.
+"bt" is bottom-to-top, "lr" is left-to-right, "rl" is right-to-left, and "tb" is top-to-bottom.
+<dt><b>-o orientation-requested=4</b>
+<dd style="margin-left: 5.0em">Prints the job in landscape (rotated 90 degrees counter-clockwise).
+<dt><b>-o orientation-requested=5</b>
+<dd style="margin-left: 5.0em">Prints the job in landscape (rotated 90 degrees clockwise).
+<dt><b>-o orientation-requested=6</b>
+<dd style="margin-left: 5.0em">Prints the job in reverse portrait (rotated 180 degrees).
+<dt><b>-o outputorder=reverse</b>
+<dd style="margin-left: 5.0em">Prints pages in reverse order.
+<dt><b>-o page-border=</b><i>border</i>
+<dd style="margin-left: 5.0em">Prints a border around each document page.
+"border" is "double", "double-thick", "single", or "single-thick".
+<dt><b>-o page-ranges=</b><i>page-list</i>
+<dd style="margin-left: 5.0em">Specifies which pages to print in the document.
+The list can contain a list of numbers and ranges (#-#) separated by commas, e.g., "1,3-5,16".
+The page numbers refer to the output pages and not the document's original pages - options like "number-up" can affect the numbering of the pages.
+<dt><b>-o sides=one-sided</b>
+<dd style="margin-left: 5.0em">Prints on one side of the paper.
+<dt><b>-o sides=two-sided-long-edge</b>
+<dd style="margin-left: 5.0em">Prints on both sides of the paper for portrait output.
+<dt><b>-o sides=two-sided-short-edge</b>
+<dd style="margin-left: 5.0em">Prints on both sides of the paper for landscape output.
+</dl>
<h2 class="title"><a name="NOTES">Notes</a></h2>
The <i>-c</i>, <i>-d</i>, <i>-f</i>, <i>-g</i>, <i>-i</i>, <i>-n</i>, <i>-t</i>, <i>-v</i>, and <i>-w</i> options are not supported by CUPS and produce a warning message if used.
<h2 class="title"><a name="EXAMPLES">Examples</a></h2>
<a href="man-lpstat.html?TOPIC=Man+Pages"><b>lpstat</b>(1),</a>
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2015 by Apple Inc.
+Copyright © 2007-2016 by Apple Inc.
</body>
</html>
<title>Developing PostScript Printer Drivers </title>
<meta name="keywords" content="Programming">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <meta name="creator" content="Mini-XML v2.7">
+ <meta name="creator" content="Mini-XML v2.8">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
<title>Introduction to the PPD Compiler </title>
<meta name="keywords" content="Programming">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <meta name="creator" content="Mini-XML v2.7">
+ <meta name="creator" content="Mini-XML v2.8">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
<title>Developing Raster Printer Drivers </title>
<meta name="keywords" content="Programming">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <meta name="creator" content="Mini-XML v2.7">
+ <meta name="creator" content="Mini-XML v2.8">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
<title>CUPS PPD Extensions </title>
<meta name="keywords" content="Specifications">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <meta name="creator" content="Mini-XML v2.7">
+ <meta name="creator" content="Mini-XML v2.8">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
--intro spec-ppd.shtml \
>../doc/help/spec-ppd.html
-framedhelp:
- echo Generating CUPS API help files...
- mxmldoc --section "Programming" --title "Raster API" \
- --framed ../cups/api-raster \
- --css ../doc/cups-printable.css \
- --header api-raster.header --intro api-raster.shtml \
- ../cups/raster.h interpret.c raster.c
- mxmldoc --section "Programming" \
- --title "Developing PostScript Printer Drivers" \
- --framed ../cups/postscript-driver \
- --css ../doc/cups-printable.css \
- --header postscript-driver.header \
- --intro postscript-driver.shtml
- mxmldoc --section "Programming" \
- --title "Introduction to the PPD Compiler" \
- --framed ../cups/ppd-compiler \
- --css ../doc/cups-printable.css \
- --header ppd-compiler.header \
- --intro ppd-compiler.shtml
- mxmldoc --section "Programming" \
- --title "Developing Raster Printer Drivers" \
- --framed ../cups/raster-driver \
- --css ../doc/cups-printable.css \
- --header raster-driver.header \
- --intro raster-driver.shtml
- mxmldoc --section "Specifications" \
- --title "CUPS PPD Extensions" \
- --framed ../cups/spec-ppd \
- --css ../doc/cups-printable.css \
- --header spec-ppd.header \
- --intro spec-ppd.shtml \
-
#
# commandtops
.\"
.\" client.conf man page for CUPS.
.\"
-.\" Copyright 2007-2015 by Apple Inc.
+.\" Copyright 2007-2016 by Apple Inc.
.\" Copyright 2006 by Easy Software Products.
.\"
.\" These coded instructions, statements, and computer programs are the
.\" which should have been included with this file. If this file is
.\" file is missing or damaged, see the license at "http://www.cups.org/".
.\"
-.TH client.conf 5 "CUPS" "19 May 2015" "Apple Inc."
+.TH client.conf 5 "CUPS" "18 May 2016" "Apple Inc."
.SH NAME
-client.conf \- client configuration file for cups (deprecated)
+client.conf \- client configuration file for cups
.SH DESCRIPTION
The \fBclient.conf\fR file configures the CUPS client and is normally located in the \fI/etc/cups\fR and/or \fI~/.cups\fR directories.
Each line in the file can be a configuration directive, a blank line, or a comment. Comment lines start with the # character.
.LP
\fBNote:\fR Starting with OS X 10.7, this file is only used by command-line and X11 applications plus the IPP backend.
The \fBServerName\fR directive is not supported on OS X at all.
+Starting with OS X 10.TODO, all applications can access these settings in the \fI/Library/Preferences/org.cups.PrintingPrefs.plist\fR file instead.
+See the NOTES section below for more information.
.SS DIRECTIVES
The following directives are understood by the client. Consult the online help for detailed descriptions:
.TP 5
.TP 5
\fBAllowExpiredCerts No\fR
Specifies whether to allow TLS with expired certificates.
-The default is "Yes".
+The default is "No".
.TP 5
\fBEncryption IfRequested\fR
.TP 5
The \fIAllowSSL3\fR option enables SSL v3.0, which is required for some older clients that do not support TLS v1.0.
The \fIDenyTLS1.0\fR option disables TLS v1.0 support - this sets the minimum protocol version to TLS v1.1.
.TP 5
+\fBTrustOnFirstUse Yes\fR
+.TP 5
+\fBTrustOnFirstUse No\fR
+Specifies whether to trust new TLS certificates by default.
+The default is "Yes".
+.TP 5
\fBUser \fIname\fR
Specifies the default user name to use for requests.
.TP 5
Specifies whether to only allow TLS with certificates whose common name matches the hostname.
The default is "No".
.SH NOTES
-The \fBclient.conf\fR file is deprecated and will no longer be supported in a future version of CUPS.
+The \fBclient.conf\fR file is deprecated on OS X and will no longer be supported in a future version of CUPS.
+Configuration settings can instead be viewed or changed using the
+.BR defaults (1)
+command:
+.nf
+defaults write /Library/Preferences/org.cups.PrintingPrefs.plist Encryption Required
+defaults write /Library/Preferences/org.cups.PrintingPrefs.plist TrustOnFirstUse -bool NO
+
+defaults read /Library/Preferences/org.cups.PrintingPrefs.plist Encryption
+.fi
+On Linux and other systems using GNU TLS, the \fI/etc/cups/ssl/site.crl\fR file, if present, provides a list of revoked X.509 certificates and is used when validating certificates.
.SH SEE ALSO
.BR cups (1),
+.BR default (1),
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2015 by Apple Inc.
+Copyright \[co] 2007-2016 by Apple Inc.
/*
* Authorization routines for the CUPS scheduler.
*
- * Copyright 2007-2015 by Apple Inc.
+ * Copyright 2007-2016 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* This file contains Kerberos support code, copyright 2006 by
* Group exists, check it...
*/
+#ifdef HAVE_GETGROUPLIST
+ if (user)
+ {
+ int ngroups, /* Number of groups */
+ groups[2048]; /* Groups that user belongs to */
+
+ ngroups = (int)(sizeof(groups) / sizeof(groups[0]));
+ getgrouplist(username, (int)user->pw_gid, groups, &ngroups);
+
+ for (i = 0; i < ngroups; i ++)
+ if ((int)group->gr_gid == groups[i])
+ return (1);
+ }
+#endif /* HAVE_GETGROUPLIST */
+
for (i = 0; group->gr_mem[i]; i ++)
if (!_cups_strcasecmp(username, group->gr_mem[i]))
return (1);
attr = ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_KEYWORD,
"job-hold-until", NULL, val);
}
- if (attr && strcmp(attr->values[0].string.text, "no-hold"))
+
+ if (printer->holding_new_jobs)
+ {
+ /*
+ * Hold all new jobs on this printer...
+ */
+
+ if (attr && strcmp(attr->values[0].string.text, "no-hold"))
+ cupsdSetJobHoldUntil(job, ippGetString(attr, 0, NULL), 0);
+ else
+ cupsdSetJobHoldUntil(job, "indefinite", 0);
+
+ job->state->values[0].integer = IPP_JOB_HELD;
+ job->state_value = IPP_JOB_HELD;
+
+ ippSetString(job->attrs, &job->reasons, 0, "job-held-on-create");
+ }
+ else if (attr && strcmp(attr->values[0].string.text, "no-hold"))
{
/*
* Hold job until specified time...
ipp_jstate_t job_state; /* job-state value */
int first_job_id = 1, /* First job ID */
first_index = 1, /* First index */
- current_index = 0; /* Current index */
- int limit = 0; /* Maximum number of jobs to return */
- int count; /* Number of jobs that match */
- int need_load_job = 0; /* Do we need to load the job? */
+ limit = 0, /* Maximum number of jobs to return */
+ count, /* Number of jobs that match */
+ need_load_job = 0; /* Do we need to load the job? */
const char *job_attr; /* Job attribute requested */
ipp_attribute_t *job_ids; /* job-ids attribute */
cupsd_job_t *job; /* Current job pointer */
}
else
{
- for (count = 0, job = (cupsd_job_t *)cupsArrayFirst(list);
- (limit <= 0 || count < limit) && job;
- job = (cupsd_job_t *)cupsArrayNext(list))
+ if (first_index > 1)
+ job = (cupsd_job_t *)cupsArrayIndex(list, first_index - 1);
+ else
+ job = (cupsd_job_t *)cupsArrayFirst(list);
+
+ for (count = 0; (limit <= 0 || count < limit) && job; job = (cupsd_job_t *)cupsArrayNext(list))
{
/*
* Filter out jobs that don't match...
if (job->id < first_job_id)
continue;
- current_index ++;
- if (current_index < first_index)
- continue;
-
if (need_load_job && !job->attrs)
{
cupsdLoadJob(job);
"Printer \"%s\" now printing pending/new jobs (\"%s\").",
printer->name, get_username(con));
+ cupsdCheckJobs();
+
/*
* Everything was ok, so return OK status...
*/
*pclass; /* Printer class destination */
ipp_attribute_t *attr; /* Job attribute */
time_t curtime; /* Current time */
+ const char *reasons; /* job-state-reasons value */
curtime = time(NULL);
((FilterLevel + job->pending_cost) < FilterLimit || FilterLevel == 0))
cupsdContinueJob(job);
+ /*
+ * Skip jobs that where held-on-create
+ */
+
+ reasons = ippGetString(job->reasons, 0, NULL);
+ if (reasons && !strcmp(reasons, "job-held-on-create"))
+ {
+ /*
+ * Check whether the printer is still holding new jobs...
+ */
+
+ printer = cupsdFindDest(job->dest);
+
+ if (printer->holding_new_jobs)
+ continue;
+
+ ippSetString(job->attrs, &job->reasons, 0, "none");
+ }
+
/*
* Start pending jobs if the destination is available...
*/
"Job aborted because the destination printer/class "
"has gone away.");
}
- else if (printer && !printer->holding_new_jobs)
+ else if (printer)
{
/*
* See if the printer is available or remote and not printing a job;
if (pclass)
{
/*
- * Add/update a job-actual-printer-uri attribute for this job
+ * Add/update a job-printer-uri-actual attribute for this job
* so that we know which printer actually printed the job...
*/
- if ((attr = ippFindAttribute(job->attrs, "job-actual-printer-uri",
- IPP_TAG_URI)) != NULL)
+ if ((attr = ippFindAttribute(job->attrs, "job-printer-uri-actual", IPP_TAG_URI)) != NULL)
ippSetString(job->attrs, &attr, 0, printer->uri);
else
- ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_URI,
- "job-actual-printer-uri", NULL, printer->uri);
+ ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_URI, "job-printer-uri-actual", NULL, printer->uri);
job->dirty = 1;
cupsdMarkDirty(CUPSD_DIRTY_JOBS);
* Add decompression/raw filter as needed...
*/
- if (job->compressions[job->current_file] &&
- (!job->printer->remote || job->num_files == 1))
+ if ((job->compressions[job->current_file] && (!job->printer->remote || job->num_files == 1)) ||
+ (!job->printer->remote && job->printer->raw && job->num_files > 1))
{
/*
* Add gziptoany filter to the front of the list...
ptr = message;
if (*ptr)
- cupsdLogJob(job, loglevel, "%s", ptr);
+ cupsdLogJob(job, loglevel == CUPSD_LOG_INFO ? CUPSD_LOG_DEBUG : loglevel, "%s", ptr);
if (loglevel < CUPSD_LOG_DEBUG &&
strcmp(job->printer->state_message, ptr))
/*
* Log file routines for the CUPS scheduler.
*
- * Copyright 2007-2015 by Apple Inc.
+ * Copyright 2007-2016 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
if (TestConfigFile || !ErrorLog)
return (1);
- if ((level > LogLevel ||
- (level == CUPSD_LOG_INFO && LogLevel < CUPSD_LOG_DEBUG)) &&
- LogDebugHistory <= 0)
+ if (level > LogLevel && LogDebugHistory <= 0)
return (1);
#ifdef HAVE_ASL_H
if (status > 0)
{
- if (job &&
- (level > LogLevel ||
- (level == CUPSD_LOG_INFO && LogLevel < CUPSD_LOG_DEBUG)) &&
- LogDebugHistory > 0)
+ if (job && level > LogLevel && LogDebugHistory > 0)
{
/*
* Add message to the job history...
return (1);
}
- else if (level <= LogLevel &&
- (level != CUPSD_LOG_INFO || LogLevel >= CUPSD_LOG_DEBUG))
+ else if (level <= LogLevel)
return (cupsdWriteErrorLog(level, log_line));
else
return (1);
margins[16]; /* media-*-margin-supported values */
const char *filter, /* Current filter */
*mandatory; /* Current mandatory attribute */
+ static const char * const pwg_raster_document_types[] =
+ {
+ "black_1",
+ "sgray_8",
+ "srgb_8"
+ };
static const char * const sides[3] = /* sides-supported values */
{
"one-sided",
"print-color-mode-supported", 2, NULL, color_modes);
ippAddString(p->ppd_attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD,
"print-color-mode-default", NULL, "color");
+ ippAddStrings(p->ppd_attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, "pwg-raster-document-type-supported", 3, NULL, pwg_raster_document_types);
}
else
{
"print-color-mode-supported", NULL, "monochrome");
ippAddString(p->ppd_attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD,
"print-color-mode-default", NULL, "monochrome");
+ ippAddStrings(p->ppd_attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, "pwg-raster-document-type-supported", 2, NULL, pwg_raster_document_types);
}
/*
* Report all supported resolutions...
*/
- attr = ippAddResolutions(p->ppd_attrs, IPP_TAG_PRINTER,
- "printer-resolution-supported",
- resolution->num_choices, IPP_RES_PER_INCH,
- NULL, NULL);
+ attr = ippAddResolutions(p->ppd_attrs, IPP_TAG_PRINTER, "printer-resolution-supported", resolution->num_choices, IPP_RES_PER_INCH, NULL, NULL);
for (i = 0, choice = resolution->choices;
i < resolution->num_choices;
attr->values[i].resolution.units = IPP_RES_PER_INCH;
if (choice->marked)
- ippAddResolution(p->ppd_attrs, IPP_TAG_PRINTER,
- "printer-resolution-default", IPP_RES_PER_INCH,
- xdpi, ydpi);
+ ippAddResolution(p->ppd_attrs, IPP_TAG_PRINTER, "printer-resolution-default", IPP_RES_PER_INCH, xdpi, ydpi);
+
+ if (i == 0)
+ ippAddResolution(p->ppd_attrs, IPP_TAG_PRINTER, "pwg-raster-document-resolution-supported", IPP_RES_PER_INCH, xdpi, ydpi);
}
}
else if ((ppd_attr = ppdFindAttr(ppd, "DefaultResolution", NULL)) != NULL &&
ippAddResolution(p->ppd_attrs, IPP_TAG_PRINTER,
"printer-resolution-supported", IPP_RES_PER_INCH,
xdpi, ydpi);
+ ippAddResolution(p->ppd_attrs, IPP_TAG_PRINTER, "pwg-raster-document-resolution-supported", IPP_RES_PER_INCH, xdpi, ydpi);
}
else
{
ippAddResolution(p->ppd_attrs, IPP_TAG_PRINTER,
"printer-resolution-supported", IPP_RES_PER_INCH,
300, 300);
+ ippAddResolution(p->ppd_attrs, IPP_TAG_PRINTER, "pwg-raster-document-resolution-supported", IPP_RES_PER_INCH, 300, 300);
}
/*
{
p->type |= CUPS_PRINTER_DUPLEX;
+ ippAddString(p->ppd_attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, "pwg-raster-document-sheet-back", NULL, "normal");
+
ippAddStrings(p->ppd_attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD,
"sides-supported", 3, NULL, sides);
/*
* "cancel" command for CUPS.
*
- * Copyright 2007-2013 by Apple Inc.
+ * Copyright 2007-2016 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
int job_id; /* Job ID */
int num_dests; /* Number of destinations */
cups_dest_t *dests; /* Destinations */
- char *dest, /* Destination printer */
+ char *opt, /* Option pointer */
+ *dest, /* Destination printer */
*job, /* Job ID pointer */
*user; /* Cancel jobs for a user */
int purge; /* Purge or cancel jobs? */
*/
for (i = 1; i < argc; i ++)
+ {
if (argv[i][0] == '-' && argv[i][1])
{
- switch (argv[i][1])
+ for (opt = argv[i] + 1; *opt; opt ++)
{
- case 'E' : /* Encrypt */
+ switch (*opt)
+ {
+ case 'E' : /* Encrypt */
#ifdef HAVE_SSL
- cupsSetEncryption(HTTP_ENCRYPT_REQUIRED);
+ cupsSetEncryption(HTTP_ENCRYPT_REQUIRED);
- if (http)
- httpEncryption(http, HTTP_ENCRYPT_REQUIRED);
+ if (http)
+ httpEncryption(http, HTTP_ENCRYPT_REQUIRED);
#else
- _cupsLangPrintf(stderr,
- _("%s: Sorry, no encryption support."), argv[0]);
+ _cupsLangPrintf(stderr, _("%s: Sorry, no encryption support."), argv[0]);
#endif /* HAVE_SSL */
- break;
-
- case 'U' : /* Username */
- if (argv[i][2] != '\0')
- cupsSetUser(argv[i] + 2);
- else
- {
- i ++;
- if (i >= argc)
+ break;
+
+ case 'U' : /* Username */
+ if (opt[1] != '\0')
+ {
+ cupsSetUser(opt + 1);
+ opt += strlen(opt) - 1;
+ }
+ else
{
- _cupsLangPrintf(stderr,
- _("%s: Error - expected username after "
- "\"-U\" option."), argv[0]);
- return (1);
+ i ++;
+ if (i >= argc)
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - expected username after \"-U\" option."), argv[0]);
+ return (1);
+ }
+
+ cupsSetUser(argv[i]);
}
+ break;
- cupsSetUser(argv[i]);
- }
- break;
+ case 'a' : /* Cancel all jobs */
+ op = purge ? IPP_PURGE_JOBS : IPP_CANCEL_JOBS;
+ break;
- case 'a' : /* Cancel all jobs */
- op = purge ? IPP_PURGE_JOBS : IPP_CANCEL_JOBS;
- break;
+ case 'h' : /* Connect to host */
+ if (http != NULL)
+ {
+ httpClose(http);
+ http = NULL;
+ }
- case 'h' : /* Connect to host */
- if (http != NULL)
- {
- httpClose(http);
- http = NULL;
- }
+ if (opt[1] != '\0')
+ {
+ cupsSetServer(opt + 1);
+ opt += strlen(opt) - 1;
+ }
+ else
+ {
+ i ++;
+
+ if (i >= argc)
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - expected hostname after \"-h\" option."), argv[0]);
+ return (1);
+ }
+ else
+ cupsSetServer(argv[i]);
+ }
+ break;
- if (argv[i][2] != '\0')
- cupsSetServer(argv[i] + 2);
- else
- {
- i ++;
+ case 'u' : /* Username */
+ op = IPP_CANCEL_MY_JOBS;
- if (i >= argc)
+ if (opt[1] != '\0')
{
- _cupsLangPrintf(stderr,
- _("%s: Error - expected hostname after "
- "\"-h\" option."), argv[0]);
- return (1);
- }
+ user = opt + 1;
+ opt += strlen(opt) - 1;
+ }
else
- cupsSetServer(argv[i]);
- }
- break;
+ {
+ i ++;
+
+ if (i >= argc)
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - expected username after \"-u\" option."), argv[0]);
+ return (1);
+ }
+ else
+ user = argv[i];
+ }
+ break;
- case 'u' : /* Username */
- op = IPP_CANCEL_MY_JOBS;
+ case 'x' : /* Purge job(s) */
+ purge = 1;
- if (argv[i][2] != '\0')
- user = argv[i] + 2;
- else
- {
- i ++;
+ if (op == IPP_CANCEL_JOBS)
+ op = IPP_PURGE_JOBS;
+ break;
- if (i >= argc)
- {
- _cupsLangPrintf(stderr,
- _("%s: Error - expected username after "
- "\"-u\" option."), argv[0]);
- return (1);
- }
- else
- user = argv[i];
- }
- break;
-
- case 'x' : /* Purge job(s) */
- purge = 1;
-
- if (op == IPP_CANCEL_JOBS)
- op = IPP_PURGE_JOBS;
- break;
-
- default :
- _cupsLangPrintf(stderr,
- _("%s: Error - unknown option \"%c\"."),
- argv[0], argv[i][1]);
- return (1);
+ default :
+ _cupsLangPrintf(stderr, _("%s: Error - unknown option \"%c\"."), argv[0], *opt);
+ return (1);
+ }
}
}
else
ippDelete(response);
}
+ }
if (num_dests == 0 && op != IPP_CANCEL_JOB)
{
* "cupsaccept", "cupsdisable", "cupsenable", and "cupsreject" commands for
* CUPS.
*
- * Copyright 2007-2010 by Apple Inc.
+ * Copyright 2007-2016 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
{
int i; /* Looping var */
char *command, /* Command to do */
+ *opt, /* Option pointer */
uri[1024], /* Printer URI */
*reason; /* Reason for reject/disable */
ipp_t *request; /* IPP request */
*/
for (i = 1; i < argc; i ++)
- if (argv[i][0] == '-')
+ {
+ if (!strcmp(argv[i], "--hold"))
+ op = IPP_HOLD_NEW_JOBS;
+ else if (!strcmp(argv[i], "--release"))
+ op = IPP_RELEASE_HELD_NEW_JOBS;
+ else if (argv[i][0] == '-')
{
- switch (argv[i][1])
+ for (opt = argv[i] + 1; *opt; opt ++)
{
- case 'E' : /* Encrypt */
-#ifdef HAVE_SSL
- cupsSetEncryption(HTTP_ENCRYPT_REQUIRED);
-#else
- _cupsLangPrintf(stderr,
- _("%s: Sorry, no encryption support."), command);
-#endif /* HAVE_SSL */
- break;
-
- case 'U' : /* Username */
- if (argv[i][2] != '\0')
- cupsSetUser(argv[i] + 2);
- else
- {
- i ++;
- if (i >= argc)
+ switch (*opt)
+ {
+ case 'E' : /* Encrypt */
+ #ifdef HAVE_SSL
+ cupsSetEncryption(HTTP_ENCRYPT_REQUIRED);
+ #else
+ _cupsLangPrintf(stderr, _("%s: Sorry, no encryption support."), command);
+ #endif /* HAVE_SSL */
+ break;
+
+ case 'U' : /* Username */
+ if (opt[1] != '\0')
{
- _cupsLangPrintf(stderr,
- _("%s: Error - expected username after "
- "\"-U\" option."), command);
- return (1);
+ cupsSetUser(opt + 1);
+ opt += strlen(opt) - 1;
}
-
- cupsSetUser(argv[i]);
- }
- break;
-
- case 'c' : /* Cancel jobs */
- cancel = 1;
- break;
-
- case 'h' : /* Connect to host */
- if (argv[i][2] != '\0')
- cupsSetServer(argv[i] + 2);
- else
- {
- i ++;
- if (i >= argc)
+ else
+ {
+ i ++;
+ if (i >= argc)
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - expected username after \"-U\" option."), command);
+ return (1);
+ }
+
+ cupsSetUser(argv[i]);
+ }
+ break;
+
+ case 'c' : /* Cancel jobs */
+ cancel = 1;
+ break;
+
+ case 'h' : /* Connect to host */
+ if (opt[1] != '\0')
+ {
+ cupsSetServer(opt + 1);
+ opt += strlen(opt) - 1;
+ }
+ else
{
- _cupsLangPrintf(stderr,
- _("%s: Error - expected hostname after "
- "\"-h\" option."), command);
- return (1);
+ i ++;
+ if (i >= argc)
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - expected hostname after \"-h\" option."), command);
+ return (1);
+ }
+
+ cupsSetServer(argv[i]);
}
+ break;
- cupsSetServer(argv[i]);
- }
- break;
-
- case 'r' : /* Reason for cancellation */
- if (argv[i][2] != '\0')
- reason = argv[i] + 2;
- else
- {
- i ++;
- if (i >= argc)
+ case 'r' : /* Reason for cancellation */
+ if (opt[1] != '\0')
+ {
+ reason = opt + 1;
+ opt += strlen(opt) - 1;
+ }
+ else
{
- _cupsLangPrintf(stderr,
- _("%s: Error - expected reason text after "
- "\"-r\" option."), command);
- return (1);
+ i ++;
+ if (i >= argc)
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - expected reason text after \"-r\" option."), command);
+ return (1);
+ }
+
+ reason = argv[i];
}
+ break;
- reason = argv[i];
- }
- break;
-
- case '-' :
- if (!strcmp(argv[i], "--hold"))
- op = IPP_HOLD_NEW_JOBS;
- else if (!strcmp(argv[i], "--release"))
- op = IPP_RELEASE_HELD_NEW_JOBS;
- else
- {
- _cupsLangPrintf(stderr, _("%s: Error - unknown option \"%s\"."),
- command, argv[i]);
+ default :
+ _cupsLangPrintf(stderr, _("%s: Error - unknown option \"%c\"."), command, *opt);
return (1);
- }
- break;
-
- default :
- _cupsLangPrintf(stderr, _("%s: Error - unknown option \"%c\"."),
- command, argv[i][1]);
- return (1);
+ }
}
}
else
}
}
}
+ }
return (0);
}
/*
* "lp" command for CUPS.
*
- * Copyright 2007-2014 by Apple Inc.
+ * Copyright 2007-2016 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
int job_id; /* Job ID */
char *printer, /* Printer name */
*instance, /* Instance name */
+ *opt, /* Option pointer */
*val, /* Option value */
*title; /* Job title */
int priority; /* Job priority (1-100) */
end_options = 0;
for (i = 1; i < argc; i ++)
+ {
if (argv[i][0] == '-' && argv[i][1] && !end_options)
- switch (argv[i][1])
+ {
+ for (opt = argv[i] + 1; *opt; opt ++)
{
- case 'E' : /* Encrypt */
+ switch (*opt)
+ {
+ case 'E' : /* Encrypt */
#ifdef HAVE_SSL
- cupsSetEncryption(HTTP_ENCRYPT_REQUIRED);
+ cupsSetEncryption(HTTP_ENCRYPT_REQUIRED);
#else
- _cupsLangPrintf(stderr, _("%s: Sorry, no encryption support."),
- argv[0]);
+ _cupsLangPrintf(stderr, _("%s: Sorry, no encryption support."), argv[0]);
#endif /* HAVE_SSL */
- break;
+ break;
- case 'U' : /* Username */
- if (argv[i][2] != '\0')
- cupsSetUser(argv[i] + 2);
- else
- {
- i ++;
- if (i >= argc)
+ case 'U' : /* Username */
+ if (opt[1] != '\0')
+ {
+ cupsSetUser(opt + 1);
+ opt += strlen(opt) - 1;
+ }
+ else
{
- _cupsLangPrintf(stderr,
- _("%s: Error - expected username after \"-U\" "
- "option."), argv[0]);
- return (1);
+ i ++;
+ if (i >= argc)
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - expected username after \"-U\" option."), argv[0]);
+ return (1);
+ }
+
+ cupsSetUser(argv[i]);
}
+ break;
- cupsSetUser(argv[i]);
- }
- break;
+ case 'c' : /* Copy to spool dir (always enabled) */
+ break;
- case 'c' : /* Copy to spool dir (always enabled) */
- break;
+ case 'd' : /* Destination printer or class */
+ if (opt[1] != '\0')
+ {
+ printer = opt + 1;
+ opt += strlen(opt) - 1;
+ }
+ else
+ {
+ i ++;
- case 'd' : /* Destination printer or class */
- if (argv[i][2] != '\0')
- printer = argv[i] + 2;
- else
- {
- i ++;
+ if (i >= argc)
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - expected destination after \"-d\" option."), argv[0]);
+ return (1);
+ }
- if (i >= argc)
- {
- _cupsLangPrintf(stderr,
- _("%s: Error - expected destination after "
- "\"-d\" option."), argv[0]);
- return (1);
- }
-
- printer = argv[i];
- }
-
- if ((instance = strrchr(printer, '/')) != NULL)
- *instance++ = '\0';
-
- if ((dest = cupsGetNamedDest(CUPS_HTTP_DEFAULT, printer,
- instance)) != NULL)
- {
- for (j = 0; j < dest->num_options; j ++)
- if (cupsGetOption(dest->options[j].name, num_options,
- options) == NULL)
- num_options = cupsAddOption(dest->options[j].name,
- dest->options[j].value,
- num_options, &options);
- }
- else if (cupsLastError() == IPP_STATUS_ERROR_BAD_REQUEST ||
- cupsLastError() == IPP_STATUS_ERROR_VERSION_NOT_SUPPORTED)
- {
- _cupsLangPrintf(stderr,
- _("%s: Error - add '/version=1.1' to server "
- "name."), argv[0]);
- return (1);
- }
- break;
+ printer = argv[i];
+ }
- case 'f' : /* Form */
- if (!argv[i][2])
- {
- i ++;
+ if ((instance = strrchr(printer, '/')) != NULL)
+ *instance++ = '\0';
- if (i >= argc)
+ if ((dest = cupsGetNamedDest(CUPS_HTTP_DEFAULT, printer,
+ instance)) != NULL)
+ {
+ for (j = 0; j < dest->num_options; j ++)
+ if (cupsGetOption(dest->options[j].name, num_options,
+ options) == NULL)
+ num_options = cupsAddOption(dest->options[j].name,
+ dest->options[j].value,
+ num_options, &options);
+ }
+ else if (cupsLastError() == IPP_STATUS_ERROR_BAD_REQUEST ||
+ cupsLastError() == IPP_STATUS_ERROR_VERSION_NOT_SUPPORTED)
{
- _cupsLangPrintf(stderr,
- _("%s: Error - expected form after \"-f\" "
- "option."),
- argv[0]);
+ _cupsLangPrintf(stderr,
+ _("%s: Error - add '/version=1.1' to server "
+ "name."), argv[0]);
return (1);
- }
- }
+ }
+ break;
- _cupsLangPrintf(stderr, _("%s: Warning - form option ignored."),
- argv[0]);
- break;
+ case 'f' : /* Form */
+ if (opt[1] != '\0')
+ {
+ opt += strlen(opt) - 1;
+ }
+ else
+ {
+ i ++;
- case 'h' : /* Destination host */
- if (argv[i][2] != '\0')
- cupsSetServer(argv[i] + 2);
- else
- {
- i ++;
+ if (i >= argc)
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - expected form after \"-f\" option."), argv[0]);
+ return (1);
+ }
+ }
- if (i >= argc)
+ _cupsLangPrintf(stderr, _("%s: Warning - form option ignored."), argv[0]);
+ break;
+
+ case 'h' : /* Destination host */
+ if (opt[1] != '\0')
{
- _cupsLangPrintf(stderr,
- _("%s: Error - expected hostname after "
- "\"-h\" option."), argv[0]);
- return (1);
- }
+ cupsSetServer(opt + 1);
+ opt += strlen(opt) - 1;
+ }
+ else
+ {
+ i ++;
- cupsSetServer(argv[i]);
- }
- break;
+ if (i >= argc)
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - expected hostname after \"-h\" option."), argv[0]);
+ return (1);
+ }
- case 'i' : /* Change job */
- if (argv[i][2])
- val = argv[i] + 2;
- else
- {
- i ++;
+ cupsSetServer(argv[i]);
+ }
+ break;
- if (i >= argc)
+ case 'i' : /* Change job */
+ if (opt[1] != '\0')
{
- _cupsLangPrintf(stderr,
- _("%s: Expected job ID after \"-i\" option."),
- argv[0]);
- return (1);
- }
+ val = opt + 1;
+ opt += strlen(opt) - 1;
+ }
+ else
+ {
+ i ++;
- val = argv[i];
- }
+ if (i >= argc)
+ {
+ _cupsLangPrintf(stderr, _("%s: Expected job ID after \"-i\" option."), argv[0]);
+ return (1);
+ }
- if (num_files > 0)
- {
- _cupsLangPrintf(stderr,
- _("%s: Error - cannot print files and alter "
- "jobs simultaneously."), argv[0]);
- return (1);
- }
+ val = argv[i];
+ }
+
+ if (num_files > 0)
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - cannot print files and alter jobs simultaneously."), argv[0]);
+ return (1);
+ }
- if (strrchr(val, '-') != NULL)
- job_id = atoi(strrchr(val, '-') + 1);
- else
- job_id = atoi(val);
+ if (strrchr(val, '-') != NULL)
+ job_id = atoi(strrchr(val, '-') + 1);
+ else
+ job_id = atoi(val);
- if (job_id < 0)
- {
- _cupsLangPrintf(stderr, _("%s: Error - bad job ID."), argv[0]);
+ if (job_id < 0)
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - bad job ID."), argv[0]);
+ break;
+ }
break;
- }
- break;
- case 'm' : /* Send email when job is done */
+ case 'm' : /* Send email when job is done */
#ifdef __sun
- case 'p' : /* Notify on completion */
+ case 'p' : /* Notify on completion */
#endif /* __sun */
- case 'w' : /* Write to console or email */
- {
- char email[1024]; /* EMail address */
-
+ case 'w' : /* Write to console or email */
+ {
+ char email[1024]; /* EMail address */
- snprintf(email, sizeof(email), "mailto:%s@%s", cupsUser(),
- httpGetHostname(NULL, buffer, sizeof(buffer)));
- num_options = cupsAddOption("notify-recipient-uri", email,
- num_options, &options);
- }
- silent = 1;
- break;
+ snprintf(email, sizeof(email), "mailto:%s@%s", cupsUser(), httpGetHostname(NULL, buffer, sizeof(buffer)));
+ num_options = cupsAddOption("notify-recipient-uri", email, num_options, &options);
+ }
- case 'n' : /* Number of copies */
- if (argv[i][2] != '\0')
- num_copies = atoi(argv[i] + 2);
- else
- {
- i ++;
+ silent = 1;
+ break;
- if (i >= argc)
+ case 'n' : /* Number of copies */
+ if (opt[1] != '\0')
{
- _cupsLangPrintf(stderr,
- _("%s: Error - expected copies after "
- "\"-n\" option."), argv[0]);
- return (1);
- }
-
- num_copies = atoi(argv[i]);
- }
+ num_copies = atoi(opt + 1);
+ opt += strlen(opt) - 1;
+ }
+ else
+ {
+ i ++;
- sprintf(buffer, "%d", num_copies);
- num_options = cupsAddOption("copies", buffer, num_options,
- &options);
- break;
+ if (i >= argc)
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - expected copies after \"-n\" option."), argv[0]);
+ return (1);
+ }
- case 'o' : /* Option */
- if (argv[i][2] != '\0')
- num_options = cupsParseOptions(argv[i] + 2, num_options,
- &options);
- else
- {
- i ++;
+ num_copies = atoi(argv[i]);
+ }
- if (i >= argc)
+ if (num_copies < 1)
{
- _cupsLangPrintf(stderr,
- _("%s: Error - expected option=value after "
- "\"-o\" option."), argv[0]);
+ _cupsLangPrintf(stderr, _("%s: Error - copies must be 1 or more."), argv[0]);
return (1);
- }
+ }
+
+ sprintf(buffer, "%d", num_copies);
+ num_options = cupsAddOption("copies", buffer, num_options,
+ &options);
+ break;
- num_options = cupsParseOptions(argv[i], num_options, &options);
- }
- break;
+ case 'o' : /* Option */
+ if (opt[1] != '\0')
+ {
+ num_options = cupsParseOptions(opt + 1, num_options, &options);
+ opt += strlen(opt) - 1;
+ }
+ else
+ {
+ i ++;
+
+ if (i >= argc)
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - expected option=value after \"-o\" option."), argv[0]);
+ return (1);
+ }
+
+ num_options = cupsParseOptions(argv[i], num_options, &options);
+ }
+ break;
#ifndef __sun
- case 'p' : /* Queue priority */
+ case 'p' : /* Queue priority */
#endif /* !__sun */
- case 'q' : /* Queue priority */
- if (argv[i][2] != '\0')
- priority = atoi(argv[i] + 2);
- else
- {
- if ((i + 1) >= argc)
- {
- _cupsLangPrintf(stderr,
- _("%s: Error - expected priority after "
- "\"-%c\" option."), argv[0], argv[i][1]);
- return (1);
- }
-
- i ++;
-
- priority = atoi(argv[i]);
- }
-
- /*
- * For 100% Solaris compatibility, need to add:
- *
- * priority = 99 * (39 - priority) / 39 + 1;
- *
- * However, to keep CUPS lp the same across all platforms
- * we will break compatibility this far...
- */
-
- if (priority < 1 || priority > 100)
- {
- _cupsLangPrintf(stderr,
- _("%s: Error - priority must be between 1 and "
- "100."), argv[0]);
- return (1);
- }
+ case 'q' : /* Queue priority */
+ if (opt[1] != '\0')
+ {
+ priority = atoi(opt + 1);
+ opt += strlen(opt) - 1;
+ }
+ else
+ {
+ if ((i + 1) >= argc)
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - expected priority after \"-%c\" option."), argv[0], *opt);
+ return (1);
+ }
- sprintf(buffer, "%d", priority);
- num_options = cupsAddOption("job-priority", buffer, num_options,
- &options);
- break;
+ i ++;
- case 's' : /* Silent */
- silent = 1;
- break;
+ priority = atoi(argv[i]);
+ }
- case 't' : /* Title */
- if (argv[i][2] != '\0')
- title = argv[i] + 2;
- else
- {
- i ++;
+ /*
+ * For 100% Solaris compatibility, need to add:
+ *
+ * priority = 99 * (39 - priority) / 39 + 1;
+ *
+ * However, to keep CUPS lp the same across all platforms
+ * we will break compatibility this far...
+ */
- if (i >= argc)
+ if (priority < 1 || priority > 100)
{
- _cupsLangPrintf(stderr,
- _("%s: Error - expected title after "
- "\"-t\" option."), argv[0]);
+ _cupsLangPrintf(stderr, _("%s: Error - priority must be between 1 and 100."), argv[0]);
return (1);
- }
+ }
- title = argv[i];
- }
- break;
+ sprintf(buffer, "%d", priority);
+ num_options = cupsAddOption("job-priority", buffer, num_options,
+ &options);
+ break;
- case 'y' : /* mode-list */
- if (!argv[i][2])
- {
- i ++;
+ case 's' : /* Silent */
+ silent = 1;
+ break;
- if (i >= argc)
+ case 't' : /* Title */
+ if (opt[1] != '\0')
{
- _cupsLangPrintf(stderr,
- _("%s: Error - expected mode list after "
- "\"-y\" option."), argv[0]);
- return (1);
- }
- }
+ title = opt + 1;
+ opt += strlen(opt) - 1;
+ }
+ else
+ {
+ i ++;
- _cupsLangPrintf(stderr,
- _("%s: Warning - mode option ignored."), argv[0]);
- break;
+ if (i >= argc)
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - expected title after \"-t\" option."), argv[0]);
+ return (1);
+ }
- case 'H' : /* Hold job */
- if (argv[i][2])
- val = argv[i] + 2;
- else
- {
- i ++;
+ title = argv[i];
+ }
+ break;
- if (i >= argc)
+ case 'y' : /* mode-list */
+ if (opt[1] != '\0')
{
- _cupsLangPrintf(stderr,
- _("%s: Error - expected hold name after "
- "\"-H\" option."), argv[0]);
- return (1);
- }
-
- val = argv[i];
- }
-
- if (!strcmp(val, "hold"))
- num_options = cupsAddOption("job-hold-until", "indefinite",
- num_options, &options);
- else if (!strcmp(val, "resume") ||
- !strcmp(val, "release"))
- num_options = cupsAddOption("job-hold-until", "no-hold",
- num_options, &options);
- else if (!strcmp(val, "immediate"))
- {
- num_options = cupsAddOption("job-hold-until", "no-hold",
- num_options, &options);
- num_options = cupsAddOption("job-priority", "100",
- num_options, &options);
- }
- else if (!strcmp(val, "restart"))
- {
- if (job_id < 1)
- {
- _cupsLangPrintf(stderr,
- _("%s: Need job ID (\"-i jobid\") before "
- "\"-H restart\"."), argv[0]);
- return (1);
+ opt += strlen(opt) - 1;
}
+ else
+ {
+ i ++;
- if (restart_job(argv[0], job_id))
- return (1);
- }
- else
- num_options = cupsAddOption("job-hold-until", val,
- num_options, &options);
- break;
+ if (i >= argc)
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - expected mode list after \"-y\" option."), argv[0]);
+ return (1);
+ }
+ }
- case 'P' : /* Page list */
- if (argv[i][2])
- val = argv[i] + 2;
- else
- {
- i ++;
+ _cupsLangPrintf(stderr, _("%s: Warning - mode option ignored."), argv[0]);
+ break;
- if (i >= argc)
+ case 'H' : /* Hold job */
+ if (opt[1] != '\0')
{
- _cupsLangPrintf(stderr,
- _("%s: Error - expected page list after "
- "\"-P\" option."), argv[0]);
- return (1);
- }
+ val = opt + 1;
+ opt += strlen(opt) - 1;
+ }
+ else
+ {
+ i ++;
- val = argv[i];
- }
+ if (i >= argc)
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - expected hold name after \"-H\" option."), argv[0]);
+ return (1);
+ }
- num_options = cupsAddOption("page-ranges", val, num_options,
- &options);
- break;
+ val = argv[i];
+ }
- case 'S' : /* character set */
- if (!argv[i][2])
- {
- i ++;
+ if (!strcmp(val, "hold"))
+ num_options = cupsAddOption("job-hold-until", "indefinite", num_options, &options);
+ else if (!strcmp(val, "resume") || !strcmp(val, "release"))
+ num_options = cupsAddOption("job-hold-until", "no-hold", num_options, &options);
+ else if (!strcmp(val, "immediate"))
+ {
+ num_options = cupsAddOption("job-hold-until", "no-hold", num_options, &options);
+ num_options = cupsAddOption("job-priority", "100", num_options, &options);
+ }
+ else if (!strcmp(val, "restart"))
+ {
+ if (job_id < 1)
+ {
+ _cupsLangPrintf(stderr, _("%s: Need job ID (\"-i jobid\") before \"-H restart\"."), argv[0]);
+ return (1);
+ }
+
+ if (restart_job(argv[0], job_id))
+ return (1);
+ }
+ else
+ num_options = cupsAddOption("job-hold-until", val, num_options, &options);
+ break;
- if (i >= argc)
+ case 'P' : /* Page list */
+ if (opt[1] != '\0')
{
- _cupsLangPrintf(stderr,
- _("%s: Error - expected character set after "
- "\"-S\" option."), argv[0]);
- return (1);
- }
- }
+ val = opt + 1;
+ opt += strlen(opt) - 1;
+ }
+ else
+ {
+ i ++;
- _cupsLangPrintf(stderr,
- _("%s: Warning - character set option ignored."),
- argv[0]);
- break;
+ if (i >= argc)
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - expected page list after \"-P\" option."), argv[0]);
+ return (1);
+ }
+
+ val = argv[i];
+ }
- case 'T' : /* Content-Type */
- if (!argv[i][2])
- {
- i ++;
+ num_options = cupsAddOption("page-ranges", val, num_options, &options);
+ break;
- if (i >= argc)
+ case 'S' : /* character set */
+ if (opt[1] != '\0')
+ {
+ opt += strlen(opt) - 1;
+ }
+ else
+ {
+ i ++;
+
+ if (i >= argc)
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - expected character set after \"-S\" option."), argv[0]);
+ return (1);
+ }
+ }
+
+ _cupsLangPrintf(stderr, _("%s: Warning - character set option ignored."), argv[0]);
+ break;
+
+ case 'T' : /* Content-Type */
+ if (opt[1] != '\0')
+ {
+ opt += strlen(opt) - 1;
+ }
+ else
{
- _cupsLangPrintf(stderr,
- _("%s: Error - expected content type after "
- "\"-T\" option."), argv[0]);
+ i ++;
+
+ if (i >= argc)
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - expected content type after \"-T\" option."), argv[0]);
+ return (1);
+ }
+ }
+
+ _cupsLangPrintf(stderr, _("%s: Warning - content type option ignored."), argv[0]);
+ break;
+
+ case '-' : /* Stop processing options */
+ if (opt[1] != '\0')
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - unknown option \"%s\"."), argv[0], argv[i]);
return (1);
- }
- }
-
- _cupsLangPrintf(stderr,
- _("%s: Warning - content type option ignored."),
- argv[0]);
- break;
-
- case '-' : /* Stop processing options */
- if (argv[i][2])
- {
- _cupsLangPrintf(stderr, _("%s: Error - unknown option \"%s\"."),
- argv[0], argv[i]);
- return (1);
- }
+ }
- end_options = 1;
- break;
+ end_options = 1;
+ break;
- default :
- _cupsLangPrintf(stderr, _("%s: Error - unknown option \"%c\"."),
- argv[0], argv[i][1]);
- return (1);
+ default :
+ _cupsLangPrintf(stderr, _("%s: Error - unknown option \"%c\"."), argv[0], *opt);
+ return (1);
+ }
}
+ }
else if (!strcmp(argv[i], "-"))
{
if (num_files || job_id)
if (access(argv[i], R_OK) != 0)
{
- _cupsLangPrintf(stderr, _("%s: Error - unable to access \"%s\" - %s"),
- argv[0], argv[i], strerror(errno));
+ _cupsLangPrintf(stderr, _("%s: Error - unable to access \"%s\" - %s"), argv[0], argv[i], strerror(errno));
return (1);
}
}
}
else
- _cupsLangPrintf(stderr, _("%s: Error - too many files - \"%s\"."),
- argv[0], argv[i]);
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - too many files - \"%s\"."), argv[0], argv[i]);
+ }
+ }
/*
* See if we are altering an existing job...
/*
* "lpadmin" command for CUPS.
*
- * Copyright 2007-2015 by Apple Inc.
+ * Copyright 2007-2016 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
http_t *http; /* Connection to server */
char *printer, /* Destination printer */
*pclass, /* Printer class name */
+ *opt, /* Option pointer */
*val; /* Pointer to allow/deny value */
int num_options; /* Number of options */
cups_option_t *options; /* Options */
file = NULL;
for (i = 1; i < argc; i ++)
+ {
if (argv[i][0] == '-')
- switch (argv[i][1])
+ {
+ for (opt = argv[i] + 1; *opt; opt ++)
{
- case 'c' : /* Add printer to class */
- if (!http)
- {
- http = httpConnect2(cupsServer(), ippPort(), NULL, AF_UNSPEC, cupsEncryption(), 1, 30000, NULL);
+ switch (*opt)
+ {
+ case 'c' : /* Add printer to class */
+ if (!http)
+ {
+ http = httpConnect2(cupsServer(), ippPort(), NULL, AF_UNSPEC, cupsEncryption(), 1, 30000, NULL);
+
+ if (http == NULL)
+ {
+ _cupsLangPrintf(stderr, _("lpadmin: Unable to connect to server: %s"), strerror(errno));
+ return (1);
+ }
+ }
- if (http == NULL)
+ if (printer == NULL)
{
- _cupsLangPrintf(stderr,
- _("lpadmin: Unable to connect to server: %s"),
- strerror(errno));
+ _cupsLangPuts(stderr,
+ _("lpadmin: Unable to add a printer to the class:\n"
+ " You must specify a printer name first."));
return (1);
}
- }
-
- if (printer == NULL)
- {
- _cupsLangPuts(stderr,
- _("lpadmin: Unable to add a printer to the class:\n"
- " You must specify a printer name "
- "first."));
- return (1);
- }
- if (argv[i][2])
- pclass = argv[i] + 2;
- else
- {
- i ++;
+ if (opt[1] != '\0')
+ {
+ pclass = opt + 1;
+ opt += strlen(opt) - 1;
+ }
+ else
+ {
+ i ++;
- if (i >= argc)
+ if (i >= argc)
+ {
+ _cupsLangPuts(stderr, _("lpadmin: Expected class name after \"-c\" option."));
+ return (1);
+ }
+
+ pclass = argv[i];
+ }
+
+ if (!validate_name(pclass))
{
_cupsLangPuts(stderr,
- _("lpadmin: Expected class name after \"-c\" "
- "option."));
+ _("lpadmin: Class name can only contain printable "
+ "characters."));
return (1);
}
- pclass = argv[i];
- }
-
- if (!validate_name(pclass))
- {
- _cupsLangPuts(stderr,
- _("lpadmin: Class name can only contain printable "
- "characters."));
- return (1);
- }
+ if (add_printer_to_class(http, printer, pclass))
+ return (1);
+ break;
- if (add_printer_to_class(http, printer, pclass))
- return (1);
- break;
+ case 'd' : /* Set as default destination */
+ if (!http)
+ {
+ http = httpConnect2(cupsServer(), ippPort(), NULL, AF_UNSPEC, cupsEncryption(), 1, 30000, NULL);
- case 'd' : /* Set as default destination */
- if (!http)
- {
- http = httpConnect2(cupsServer(), ippPort(), NULL, AF_UNSPEC, cupsEncryption(), 1, 30000, NULL);
+ if (http == NULL)
+ {
+ _cupsLangPrintf(stderr, _("lpadmin: Unable to connect to server: %s"), strerror(errno));
+ return (1);
+ }
+ }
- if (http == NULL)
+ if (opt[1] != '\0')
{
- _cupsLangPrintf(stderr,
- _("lpadmin: Unable to connect to server: %s"),
- strerror(errno));
- return (1);
+ printer = opt + 1;
+ opt += strlen(opt) - 1;
}
- }
+ else
+ {
+ i ++;
- if (argv[i][2])
- printer = argv[i] + 2;
- else
- {
- i ++;
+ if (i >= argc)
+ {
+ _cupsLangPuts(stderr, _("lpadmin: Expected printer name after \"-d\" option."));
+ return (1);
+ }
- if (i >= argc)
+ printer = argv[i];
+ }
+
+ if (!validate_name(printer))
{
- _cupsLangPuts(stderr,
- _("lpadmin: Expected printer name after \"-d\" "
- "option."));
+ _cupsLangPuts(stderr, _("lpadmin: Printer name can only contain printable characters."));
return (1);
}
- printer = argv[i];
- }
-
- if (!validate_name(printer))
- {
- _cupsLangPuts(stderr,
- _("lpadmin: Printer name can only contain "
- "printable characters."));
- return (1);
- }
-
- if (default_printer(http, printer))
- return (1);
+ if (default_printer(http, printer))
+ return (1);
- i = argc;
- break;
+ i = argc;
+ break;
- case 'h' : /* Connect to host */
- if (http)
- {
- httpClose(http);
- http = NULL;
- }
-
- if (argv[i][2] != '\0')
- cupsSetServer(argv[i] + 2);
- else
- {
- i ++;
+ case 'h' : /* Connect to host */
+ if (http)
+ {
+ httpClose(http);
+ http = NULL;
+ }
- if (i >= argc)
+ if (opt[1] != '\0')
{
- _cupsLangPuts(stderr,
- _("lpadmin: Expected hostname after \"-h\" "
- "option."));
- return (1);
- }
+ cupsSetServer(opt + 1);
+ opt += strlen(opt) - 1;
+ }
+ else
+ {
+ i ++;
- cupsSetServer(argv[i]);
- }
- break;
+ if (i >= argc)
+ {
+ _cupsLangPuts(stderr, _("lpadmin: Expected hostname after \"-h\" option."));
+ return (1);
+ }
- case 'P' : /* Use the specified PPD file */
- case 'i' : /* Use the specified PPD file */
- if (argv[i][2])
- file = argv[i] + 2;
- else
- {
- i ++;
+ cupsSetServer(argv[i]);
+ }
+ break;
- if (i >= argc)
+ case 'P' : /* Use the specified PPD file */
+ case 'i' : /* Use the specified PPD file */
+ if (opt[1] != '\0')
{
- _cupsLangPrintf(stderr, _("lpadmin: Expected PPD after \"-%c\" option."), argv[i - 1][1]);
- return (1);
+ file = opt + 1;
+ opt += strlen(opt) - 1;
}
+ else
+ {
+ i ++;
- file = argv[i];
- }
- break;
+ if (i >= argc)
+ {
+ _cupsLangPrintf(stderr, _("lpadmin: Expected PPD after \"-%c\" option."), argv[i - 1][1]);
+ return (1);
+ }
- case 'E' : /* Enable the printer */
- if (printer == NULL)
- {
+ file = argv[i];
+ }
+ break;
+
+ case 'E' : /* Enable the printer/enable encryption */
+ if (printer == NULL)
+ {
#ifdef HAVE_SSL
- cupsSetEncryption(HTTP_ENCRYPTION_REQUIRED);
+ cupsSetEncryption(HTTP_ENCRYPTION_REQUIRED);
- if (http)
- httpEncryption(http, HTTP_ENCRYPTION_REQUIRED);
+ if (http)
+ httpEncryption(http, HTTP_ENCRYPTION_REQUIRED);
#else
- _cupsLangPrintf(stderr, _("%s: Sorry, no encryption support."),
- argv[0]);
+ _cupsLangPrintf(stderr, _("%s: Sorry, no encryption support."), argv[0]);
#endif /* HAVE_SSL */
- break;
- }
-
- if (!http)
- {
- http = httpConnect2(cupsServer(), ippPort(), NULL, AF_UNSPEC, cupsEncryption(), 1, 30000, NULL);
+ break;
+ }
- if (http == NULL)
+ if (!http)
{
- _cupsLangPrintf(stderr,
- _("lpadmin: Unable to connect to server: %s"),
- strerror(errno));
- return (1);
+ http = httpConnect2(cupsServer(), ippPort(), NULL, AF_UNSPEC, cupsEncryption(), 1, 30000, NULL);
+
+ if (http == NULL)
+ {
+ _cupsLangPrintf(stderr,
+ _("lpadmin: Unable to connect to server: %s"),
+ strerror(errno));
+ return (1);
+ }
}
- }
- if (enable_printer(http, printer))
- return (1);
- break;
-
- case 'm' : /* Use the specified standard script/PPD file */
- if (argv[i][2])
- num_options = cupsAddOption("ppd-name", argv[i] + 2, num_options,
- &options);
- else
- {
- i ++;
+ if (enable_printer(http, printer))
+ return (1);
+ break;
- if (i >= argc)
+ case 'm' : /* Use the specified standard script/PPD file */
+ if (opt[1] != '\0')
{
- _cupsLangPuts(stderr,
- _("lpadmin: Expected model after \"-m\" "
- "option."));
- return (1);
+ num_options = cupsAddOption("ppd-name", opt + 1, num_options, &options);
+ opt += strlen(opt) - 1;
}
+ else
+ {
+ i ++;
- num_options = cupsAddOption("ppd-name", argv[i], num_options,
- &options);
- }
- break;
+ if (i >= argc)
+ {
+ _cupsLangPuts(stderr, _("lpadmin: Expected model after \"-m\" option."));
+ return (1);
+ }
- case 'o' : /* Set option */
- if (argv[i][2])
- num_options = cupsParseOptions(argv[i] + 2, num_options, &options);
- else
- {
- i ++;
+ num_options = cupsAddOption("ppd-name", argv[i], num_options, &options);
+ }
+ break;
- if (i >= argc)
+ case 'o' : /* Set option */
+ if (opt[1] != '\0')
{
- _cupsLangPuts(stderr,
- _("lpadmin: Expected name=value after \"-o\" "
- "option."));
- return (1);
+ num_options = cupsParseOptions(opt + 1, num_options, &options);
+ opt += strlen(opt) - 1;
}
+ else
+ {
+ i ++;
- num_options = cupsParseOptions(argv[i], num_options, &options);
- }
- break;
+ if (i >= argc)
+ {
+ _cupsLangPuts(stderr, _("lpadmin: Expected name=value after \"-o\" option."));
+ return (1);
+ }
- case 'p' : /* Add/modify a printer */
- if (argv[i][2])
- printer = argv[i] + 2;
- else
- {
- i ++;
+ num_options = cupsParseOptions(argv[i], num_options, &options);
+ }
+ break;
- if (i >= argc)
+ case 'p' : /* Add/modify a printer */
+ if (opt[1] != '\0')
{
- _cupsLangPuts(stderr,
- _("lpadmin: Expected printer after \"-p\" "
- "option."));
- return (1);
+ printer = opt + 1;
+ opt += strlen(opt) - 1;
}
+ else
+ {
+ i ++;
- printer = argv[i];
- }
-
- if (!validate_name(printer))
- {
- _cupsLangPuts(stderr,
- _("lpadmin: Printer name can only contain "
- "printable characters."));
- return (1);
- }
- break;
+ if (i >= argc)
+ {
+ _cupsLangPuts(stderr, _("lpadmin: Expected printer after \"-p\" option."));
+ return (1);
+ }
- case 'r' : /* Remove printer from class */
- if (!http)
- {
- http = httpConnect2(cupsServer(), ippPort(), NULL, AF_UNSPEC, cupsEncryption(), 1, 30000, NULL);
+ printer = argv[i];
+ }
- if (http == NULL)
+ if (!validate_name(printer))
{
- _cupsLangPrintf(stderr,
- _("lpadmin: Unable to connect to server: %s"),
- strerror(errno));
+ _cupsLangPuts(stderr, _("lpadmin: Printer name can only contain printable characters."));
return (1);
}
- }
-
- if (printer == NULL)
- {
- _cupsLangPuts(stderr,
- _("lpadmin: Unable to remove a printer from the "
- "class:\n"
- " You must specify a printer name "
- "first."));
- return (1);
- }
+ break;
- if (argv[i][2])
- pclass = argv[i] + 2;
- else
- {
- i ++;
+ case 'r' : /* Remove printer from class */
+ if (!http)
+ {
+ http = httpConnect2(cupsServer(), ippPort(), NULL, AF_UNSPEC, cupsEncryption(), 1, 30000, NULL);
+
+ if (http == NULL)
+ {
+ _cupsLangPrintf(stderr,
+ _("lpadmin: Unable to connect to server: %s"),
+ strerror(errno));
+ return (1);
+ }
+ }
- if (i >= argc)
+ if (printer == NULL)
{
_cupsLangPuts(stderr,
- _("lpadmin: Expected class after \"-r\" "
- "option."));
+ _("lpadmin: Unable to remove a printer from the class:\n"
+ " You must specify a printer name first."));
return (1);
}
- pclass = argv[i];
- }
-
- if (!validate_name(pclass))
- {
- _cupsLangPuts(stderr,
- _("lpadmin: Class name can only contain printable "
- "characters."));
- return (1);
- }
+ if (opt[1] != '\0')
+ {
+ pclass = opt + 1;
+ opt += strlen(opt) - 1;
+ }
+ else
+ {
+ i ++;
- if (delete_printer_from_class(http, printer, pclass))
- return (1);
- break;
+ if (i >= argc)
+ {
+ _cupsLangPuts(stderr, _("lpadmin: Expected class after \"-r\" option."));
+ return (1);
+ }
- case 'R' : /* Remove option */
- if (!http)
- {
- http = httpConnect2(cupsServer(), ippPort(), NULL, AF_UNSPEC, cupsEncryption(), 1, 30000, NULL);
+ pclass = argv[i];
+ }
- if (http == NULL)
+ if (!validate_name(pclass))
{
- _cupsLangPrintf(stderr,
- _("lpadmin: Unable to connect to server: %s"),
- strerror(errno));
+ _cupsLangPuts(stderr, _("lpadmin: Class name can only contain printable characters."));
return (1);
}
- }
-
- if (printer == NULL)
- {
- _cupsLangPuts(stderr,
- _("lpadmin: Unable to delete option:\n"
- " You must specify a printer name "
- "first."));
- return (1);
- }
- if (argv[i][2])
- val = argv[i] + 2;
- else
- {
- i ++;
+ if (delete_printer_from_class(http, printer, pclass))
+ return (1);
+ break;
- if (i >= argc)
+ case 'R' : /* Remove option */
+ if (!http)
+ {
+ http = httpConnect2(cupsServer(), ippPort(), NULL, AF_UNSPEC, cupsEncryption(), 1, 30000, NULL);
+
+ if (http == NULL)
+ {
+ _cupsLangPrintf(stderr, _("lpadmin: Unable to connect to server: %s"), strerror(errno));
+ return (1);
+ }
+ }
+
+ if (printer == NULL)
{
_cupsLangPuts(stderr,
- _("lpadmin: Expected name after \"-R\" "
- "option."));
+ _("lpadmin: Unable to delete option:\n"
+ " You must specify a printer name first."));
return (1);
}
- val = argv[i];
- }
-
- if (delete_printer_option(http, printer, val))
- return (1);
- break;
-
- case 'U' : /* Username */
- if (argv[i][2] != '\0')
- cupsSetUser(argv[i] + 2);
- else
- {
- i ++;
- if (i >= argc)
+ if (opt[1] != '\0')
{
- _cupsLangPrintf(stderr,
- _("%s: Error - expected username after "
- "\"-U\" option."), argv[0]);
- return (1);
+ val = opt + 1;
+ opt += strlen(opt) - 1;
}
+ else
+ {
+ i ++;
- cupsSetUser(argv[i]);
- }
- break;
-
- case 'u' : /* Allow/deny users */
- if (argv[i][2])
- val = argv[i] + 2;
- else
- {
- i ++;
+ if (i >= argc)
+ {
+ _cupsLangPuts(stderr, _("lpadmin: Expected name after \"-R\" option."));
+ return (1);
+ }
- if (i >= argc)
- {
- _cupsLangPuts(stderr,
- _("lpadmin: Expected allow/deny:userlist after "
- "\"-u\" option."));
- return (1);
+ val = argv[i];
}
- val = argv[i];
- }
-
- if (!_cups_strncasecmp(val, "allow:", 6))
- num_options = cupsAddOption("requesting-user-name-allowed",
- val + 6, num_options, &options);
- else if (!_cups_strncasecmp(val, "deny:", 5))
- num_options = cupsAddOption("requesting-user-name-denied",
- val + 5, num_options, &options);
- else
- {
- _cupsLangPrintf(stderr,
- _("lpadmin: Unknown allow/deny option \"%s\"."),
- val);
- return (1);
- }
- break;
+ if (delete_printer_option(http, printer, val))
+ return (1);
+ break;
- case 'v' : /* Set the device-uri attribute */
- if (argv[i][2])
- num_options = cupsAddOption("device-uri", argv[i] + 2,
- num_options, &options);
- else
- {
- i ++;
+ case 'U' : /* Username */
+ if (opt[1] != '\0')
+ {
+ cupsSetUser(opt + 1);
+ opt += strlen(opt) - 1;
+ }
+ else
+ {
+ i ++;
+ if (i >= argc)
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - expected username after \"-U\" option."), argv[0]);
+ return (1);
+ }
+
+ cupsSetUser(argv[i]);
+ }
+ break;
- if (i >= argc)
+ case 'u' : /* Allow/deny users */
+ if (opt[1] != '\0')
{
- _cupsLangPuts(stderr,
- _("lpadmin: Expected device URI after \"-v\" "
- "option."));
- return (1);
+ val = opt + 1;
+ opt += strlen(opt) - 1;
}
+ else
+ {
+ i ++;
- num_options = cupsAddOption("device-uri", argv[i],
- num_options, &options);
- }
- break;
+ if (i >= argc)
+ {
+ _cupsLangPuts(stderr, _("lpadmin: Expected allow/deny:userlist after \"-u\" option."));
+ return (1);
+ }
- case 'x' : /* Delete a printer */
- if (!http)
- {
- http = httpConnect2(cupsServer(), ippPort(), NULL, AF_UNSPEC, cupsEncryption(), 1, 30000, NULL);
+ val = argv[i];
+ }
- if (http == NULL)
+ if (!_cups_strncasecmp(val, "allow:", 6))
+ num_options = cupsAddOption("requesting-user-name-allowed", val + 6, num_options, &options);
+ else if (!_cups_strncasecmp(val, "deny:", 5))
+ num_options = cupsAddOption("requesting-user-name-denied", val + 5, num_options, &options);
+ else
{
- _cupsLangPrintf(stderr,
- _("lpadmin: Unable to connect to server: %s"),
- strerror(errno));
+ _cupsLangPrintf(stderr, _("lpadmin: Unknown allow/deny option \"%s\"."), val);
return (1);
}
- }
-
- if (argv[i][2])
- printer = argv[i] + 2;
- else
- {
- i ++;
+ break;
- if (i >= argc)
+ case 'v' : /* Set the device-uri attribute */
+ if (opt[1] != '\0')
{
- _cupsLangPuts(stderr,
- _("lpadmin: Expected printer or class after "
- "\"-x\" option."));
- return (1);
+ num_options = cupsAddOption("device-uri", opt + 1, num_options, &options);
+ opt += strlen(opt) - 1;
}
+ else
+ {
+ i ++;
- printer = argv[i];
- }
+ if (i >= argc)
+ {
+ _cupsLangPuts(stderr, _("lpadmin: Expected device URI after \"-v\" option."));
+ return (1);
+ }
- if (!validate_name(printer))
- {
- _cupsLangPuts(stderr,
- _("lpadmin: Printer name can only contain "
- "printable characters."));
- return (1);
- }
+ num_options = cupsAddOption("device-uri", argv[i], num_options, &options);
+ }
+ break;
- if (delete_printer(http, printer))
- return (1);
+ case 'x' : /* Delete a printer */
+ if (!http)
+ {
+ http = httpConnect2(cupsServer(), ippPort(), NULL, AF_UNSPEC, cupsEncryption(), 1, 30000, NULL);
+
+ if (http == NULL)
+ {
+ _cupsLangPrintf(stderr,
+ _("lpadmin: Unable to connect to server: %s"),
+ strerror(errno));
+ return (1);
+ }
+ }
- i = argc;
- break;
+ if (opt[1] != '\0')
+ {
+ printer = opt + 1;
+ opt += strlen(opt) - 1;
+ }
+ else
+ {
+ i ++;
- case 'D' : /* Set the printer-info attribute */
- if (argv[i][2])
- num_options = cupsAddOption("printer-info", argv[i] + 2,
- num_options, &options);
- else
- {
- i ++;
+ if (i >= argc)
+ {
+ _cupsLangPuts(stderr, _("lpadmin: Expected printer or class after \"-x\" option."));
+ return (1);
+ }
- if (i >= argc)
+ printer = argv[i];
+ }
+
+ if (!validate_name(printer))
{
- _cupsLangPuts(stderr,
- _("lpadmin: Expected description after "
- "\"-D\" option."));
+ _cupsLangPuts(stderr, _("lpadmin: Printer name can only contain printable characters."));
return (1);
}
- num_options = cupsAddOption("printer-info", argv[i],
- num_options, &options);
- }
- break;
+ if (delete_printer(http, printer))
+ return (1);
- case 'I' : /* Set the supported file types (ignored) */
- i ++;
+ i = argc;
+ break;
- if (i >= argc)
- {
- _cupsLangPuts(stderr,
- _("lpadmin: Expected file type(s) after \"-I\" "
- "option."));
- return (1);
- }
+ case 'D' : /* Set the printer-info attribute */
+ if (opt[1] != '\0')
+ {
+ num_options = cupsAddOption("printer-info", opt + 1, num_options, &options);
+ opt += strlen(opt) - 1;
+ }
+ else
+ {
+ i ++;
- _cupsLangPuts(stderr,
- _("lpadmin: Warning - content type list ignored."));
- break;
+ if (i >= argc)
+ {
+ _cupsLangPuts(stderr, _("lpadmin: Expected description after \"-D\" option."));
+ return (1);
+ }
- case 'L' : /* Set the printer-location attribute */
- if (argv[i][2])
- num_options = cupsAddOption("printer-location", argv[i] + 2,
- num_options, &options);
- else
- {
+ num_options = cupsAddOption("printer-info", argv[i], num_options, &options);
+ }
+ break;
+
+ case 'I' : /* Set the supported file types (ignored) */
i ++;
if (i >= argc)
{
- _cupsLangPuts(stderr,
- _("lpadmin: Expected location after \"-L\" "
- "option."));
+ _cupsLangPuts(stderr, _("lpadmin: Expected file type(s) after \"-I\" option."));
return (1);
}
- num_options = cupsAddOption("printer-location", argv[i],
- num_options, &options);
- }
- break;
+ _cupsLangPuts(stderr, _("lpadmin: Warning - content type list ignored."));
+ break;
- default :
- _cupsLangPrintf(stderr,
- _("lpadmin: Unknown option \"%c\"."), argv[i][1]);
- return (1);
+ case 'L' : /* Set the printer-location attribute */
+ if (opt[1] != '\0')
+ {
+ num_options = cupsAddOption("printer-location", opt + 1, num_options, &options);
+ opt += strlen(opt) - 1;
+ }
+ else
+ {
+ i ++;
+
+ if (i >= argc)
+ {
+ _cupsLangPuts(stderr, _("lpadmin: Expected location after \"-L\" option."));
+ return (1);
+ }
+
+ num_options = cupsAddOption("printer-location", argv[i], num_options, &options);
+ }
+ break;
+
+ default :
+ _cupsLangPrintf(stderr, _("lpadmin: Unknown option \"%c\"."), *opt);
+ return (1);
+ }
}
+ }
else
{
- _cupsLangPrintf(stderr, _("lpadmin: Unknown argument \"%s\"."),
- argv[i]);
+ _cupsLangPrintf(stderr, _("lpadmin: Unknown argument \"%s\"."), argv[i]);
return (1);
}
+ }
/*
* Set options as needed...
/*
* "lpinfo" command for CUPS.
*
- * Copyright 2007-2010 by Apple Inc.
+ * Copyright 2007-2016 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
{
int i; /* Looping var */
int long_status; /* Long listing? */
- const char *device_id, /* 1284 device ID */
+ const char *opt, /* Option pointer */
+ *device_id, /* 1284 device ID */
*language, /* Language */
*make_model, /* Make and model */
*product, /* Product */
timeout = CUPS_TIMEOUT_DEFAULT;
for (i = 1; i < argc; i ++)
- if (argv[i][0] == '-')
- switch (argv[i][1])
+ {
+ if (!strcmp(argv[i], "--device-id"))
+ {
+ i ++;
+
+ if (i < argc)
+ device_id = argv[i];
+ else
+ {
+ _cupsLangPuts(stderr, _("lpinfo: Expected 1284 device ID string after \"--device-id\"."));
+ return (1);
+ }
+ }
+ else if (!strncmp(argv[i], "--device-id=", 12) && argv[i][12])
+ {
+ device_id = argv[i] + 12;
+ }
+ else if (!strcmp(argv[i], "--exclude-schemes"))
+ {
+ i ++;
+
+ if (i < argc)
+ exclude_schemes = argv[i];
+ else
{
- case 'E' : /* Encrypt */
+ _cupsLangPuts(stderr, _("lpinfo: Expected scheme list after \"--exclude-schemes\"."));
+ return (1);
+ }
+ }
+ else if (!strncmp(argv[i], "--exclude-schemes=", 18) && argv[i][18])
+ {
+ exclude_schemes = argv[i] + 18;
+ }
+ else if (!strcmp(argv[i], "--include-schemes"))
+ {
+ i ++;
+
+ if (i < argc)
+ include_schemes = argv[i];
+ else
+ {
+ _cupsLangPuts(stderr, _("lpinfo: Expected scheme list after \"--include-schemes\"."));
+ return (1);
+ }
+ }
+ else if (!strncmp(argv[i], "--include-schemes=", 18) && argv[i][18])
+ {
+ include_schemes = argv[i] + 18;
+ }
+ else if (!strcmp(argv[i], "--language"))
+ {
+ i ++;
+ if (i < argc)
+ language = argv[i];
+ else
+ {
+ _cupsLangPuts(stderr, _("lpinfo: Expected language after \"--language\"."));
+ return (1);
+ }
+ }
+ else if (!strncmp(argv[i], "--language=", 11) && argv[i][11])
+ {
+ language = argv[i] + 11;
+ }
+ else if (!strcmp(argv[i], "--make-and-model"))
+ {
+ i ++;
+ if (i < argc)
+ make_model= argv[i];
+ else
+ {
+ _cupsLangPuts(stderr, _("lpinfo: Expected make and model after \"--make-and-model\"."));
+ return (1);
+ }
+ }
+ else if (!strncmp(argv[i], "--make-and-model=", 17) && argv[i][17])
+ {
+ make_model = argv[i] + 17;
+ }
+ else if (!strcmp(argv[i], "--product"))
+ {
+ i ++;
+ if (i < argc)
+ product = argv[i];
+ else
+ {
+ _cupsLangPuts(stderr, _("lpinfo: Expected product string after \"--product\"."));
+ return (1);
+ }
+ }
+ else if (!strncmp(argv[i], "--product=", 10) && argv[i][10])
+ {
+ product = argv[i] + 10;
+ }
+ else if (!strcmp(argv[i], "--timeout"))
+ {
+ i ++;
+ if (i < argc)
+ timeout = atoi(argv[i]);
+ else
+ {
+ _cupsLangPuts(stderr, _("lpinfo: Expected timeout after \"--timeout\"."));
+ return (1);
+ }
+ }
+ else if (!strncmp(argv[i], "--timeout=", 10) && argv[i][10])
+ {
+ timeout = atoi(argv[i] + 10);
+ }
+ else if (argv[i][0] == '-')
+ {
+ for (opt = argv[i] + 1; *opt; opt ++)
+ {
+ switch (*opt)
+ {
+ case 'E' : /* Encrypt */
#ifdef HAVE_SSL
- cupsSetEncryption(HTTP_ENCRYPT_REQUIRED);
+ cupsSetEncryption(HTTP_ENCRYPT_REQUIRED);
#else
- _cupsLangPrintf(stderr,
- _("%s: Sorry, no encryption support."),
- argv[0]);
+ _cupsLangPrintf(stderr, _("%s: Sorry, no encryption support."), argv[0]);
#endif /* HAVE_SSL */
- break;
-
- case 'h' : /* Connect to host */
- if (argv[i][2] != '\0')
- cupsSetServer(argv[i] + 2);
- else
- {
- i ++;
-
- if (i >= argc)
- {
- _cupsLangPuts(stderr,
- _("Error: need hostname after \"-h\" option."));
- return (1);
- }
-
- cupsSetServer(argv[i]);
- }
- break;
+ break;
- case 'l' : /* Show long listing */
- long_status = 1;
- break;
-
- case 'm' : /* Show models */
- if (show_models(long_status, device_id, language, make_model,
- product, include_schemes, exclude_schemes))
- return (1);
- break;
-
- case 'v' : /* Show available devices */
- if (show_devices(long_status, timeout, include_schemes,
- exclude_schemes))
- return (1);
- break;
-
- case '-' : /* --something */
- if (!strcmp(argv[i], "--device-id"))
- {
- i ++;
-
- if (i < argc)
- device_id = argv[i];
- else
- {
- _cupsLangPuts(stderr,
- _("lpinfo: Expected 1284 device ID string "
- "after \"--device-id\"."));
- return (1);
- }
- }
- else if (!strncmp(argv[i], "--device-id=", 12) && argv[i][12])
- {
- device_id = argv[i] + 12;
- }
- else if (!strcmp(argv[i], "--exclude-schemes"))
- {
- i ++;
-
- if (i < argc)
- exclude_schemes = argv[i];
- else
- {
- _cupsLangPuts(stderr,
- _("lpinfo: Expected scheme list after "
- "\"--exclude-schemes\"."));
- return (1);
- }
- }
- else if (!strncmp(argv[i], "--exclude-schemes=", 18) && argv[i][18])
- {
- exclude_schemes = argv[i] + 18;
- }
- else if (!strcmp(argv[i], "--include-schemes"))
- {
- i ++;
-
- if (i < argc)
- include_schemes = argv[i];
- else
- {
- _cupsLangPuts(stderr,
- _("lpinfo: Expected scheme list after "
- "\"--include-schemes\"."));
- return (1);
- }
- }
- else if (!strncmp(argv[i], "--include-schemes=", 18) && argv[i][18])
- {
- include_schemes = argv[i] + 18;
- }
- else if (!strcmp(argv[i], "--language"))
- {
- i ++;
- if (i < argc)
- language = argv[i];
- else
+ case 'h' : /* Connect to host */
+ if (opt[1] != '\0')
{
- _cupsLangPuts(stderr,
- _("lpinfo: Expected language after "
- "\"--language\"."));
- return (1);
+ cupsSetServer(opt + 1);
+ opt += strlen(opt) - 1;
}
- }
- else if (!strncmp(argv[i], "--language=", 11) && argv[i][11])
- {
- language = argv[i] + 11;
- }
- else if (!strcmp(argv[i], "--make-and-model"))
- {
- i ++;
- if (i < argc)
- make_model= argv[i];
else
{
- _cupsLangPuts(stderr,
- _("lpinfo: Expected make and model after "
- "\"--make-and-model\"."));
- return (1);
+ i ++;
+
+ if (i >= argc)
+ {
+ _cupsLangPuts(stderr, _("Error: need hostname after \"-h\" option."));
+ return (1);
+ }
+
+ cupsSetServer(argv[i]);
}
- }
- else if (!strncmp(argv[i], "--make-and-model=", 17) && argv[i][17])
- {
- make_model = argv[i] + 17;
- }
- else if (!strcmp(argv[i], "--product"))
- {
- i ++;
- if (i < argc)
- product = argv[i];
- else
- {
- _cupsLangPuts(stderr,
- _("lpinfo: Expected product string after "
- "\"--product\"."));
+ break;
+
+ case 'l' : /* Show long listing */
+ long_status = 1;
+ break;
+
+ case 'm' : /* Show models */
+ if (show_models(long_status, device_id, language, make_model, product, include_schemes, exclude_schemes))
return (1);
- }
- }
- else if (!strncmp(argv[i], "--product=", 10) && argv[i][10])
- {
- product = argv[i] + 10;
- }
- else if (!strcmp(argv[i], "--timeout"))
- {
- i ++;
- if (i < argc)
- timeout = atoi(argv[i]);
- else
- {
- _cupsLangPuts(stderr,
- _("lpinfo: Expected timeout after "
- "\"--timeout\"."));
+ break;
+
+ case 'v' : /* Show available devices */
+ if (show_devices(long_status, timeout, include_schemes, exclude_schemes))
return (1);
- }
- }
- else if (!strncmp(argv[i], "--timeout=", 10) && argv[i][10])
- {
- timeout = atoi(argv[i] + 10);
- }
- else
- {
- _cupsLangPrintf(stderr, _("lpinfo: Unknown option \"%s\"."),
- argv[i]);
- return (1);
- }
- break;
+ break;
- default :
- _cupsLangPrintf(stderr, _("lpinfo: Unknown option \"%c\"."),
- argv[i][1]);
- return (1);
+ default :
+ _cupsLangPrintf(stderr, _("%s: Unknown option \"%c\"."), argv[0], *opt);
+ return (1);
+ }
}
+ }
else
{
- _cupsLangPrintf(stderr, _("lpinfo: Unknown argument \"%s\"."),
- argv[i]);
+ _cupsLangPrintf(stderr, _("%s: Unknown argument \"%s\"."), argv[0], argv[i]);
return (1);
}
+ }
return (0);
}
/*
* "lpmove" command for CUPS.
*
- * Copyright 2007-2010 by Apple Inc.
+ * Copyright 2007-2016 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
{
int i; /* Looping var */
http_t *http; /* Connection to server */
- const char *job; /* Job name */
+ const char *opt, /* Option pointer */
+ *job; /* Job name */
int jobid; /* Job ID */
int num_dests; /* Number of destinations */
cups_dest_t *dests; /* Destinations */
src = NULL;
for (i = 1; i < argc; i ++)
+ {
if (argv[i][0] == '-')
- switch (argv[i][1])
+ {
+ for (opt = argv[i] + 1; *opt; opt ++)
{
- case 'E' : /* Encrypt */
+ switch (*opt)
+ {
+ case 'E' : /* Encrypt */
#ifdef HAVE_SSL
- cupsSetEncryption(HTTP_ENCRYPT_REQUIRED);
+ cupsSetEncryption(HTTP_ENCRYPT_REQUIRED);
#else
- _cupsLangPrintf(stderr,
- _("%s: Sorry, no encryption support."),
- argv[0]);
+ _cupsLangPrintf(stderr, _("%s: Sorry, no encryption support."), argv[0]);
#endif /* HAVE_SSL */
- break;
-
- case 'h' : /* Connect to host */
- if (argv[i][2] != '\0')
- cupsSetServer(argv[i] + 2);
- else
- {
- i ++;
+ break;
- if (i >= argc)
+ case 'h' : /* Connect to host */
+ if (opt[1] != '\0')
{
- _cupsLangPuts(stderr,
- _("Error: need hostname after \"-h\" option."));
- return (1);
- }
-
- cupsSetServer(argv[i]);
- }
- break;
-
- default :
- _cupsLangPrintf(stderr, _("lpmove: Unknown option \"%c\"."),
- argv[i][1]);
- return (1);
+ cupsSetServer(opt + 1);
+ opt += strlen(opt) - 1;
+ }
+ else
+ {
+ i ++;
+
+ if (i >= argc)
+ {
+ _cupsLangPuts(stderr, _("Error: need hostname after \"-h\" option."));
+ return (1);
+ }
+
+ cupsSetServer(argv[i]);
+ }
+ break;
+
+ default :
+ _cupsLangPrintf(stderr, _("%s: Unknown option \"%c\"."), argv[0], *opt);
+ return (1);
+ }
}
+ }
else if (!jobid && !src)
{
if (num_dests == 0)
_cupsLangPrintf(stderr, _("lpmove: Unknown argument \"%s\"."), argv[i]);
return (1);
}
+ }
if ((!jobid && !src) || !dest)
{
/*
* Printer option program for CUPS.
*
- * Copyright 2007-2015 by Apple Inc.
+ * Copyright 2007-2016 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
int num_dests; /* Number of destinations */
cups_dest_t *dests; /* Destinations */
cups_dest_t *dest; /* Current destination */
- char *printer, /* Printer name */
+ char *opt, /* Option pointer */
+ *printer, /* Printer name */
*instance, /* Instance name */
*option; /* Current option */
changes = 0;
for (i = 1; i < argc; i ++)
+ {
if (argv[i][0] == '-')
{
- switch (argv[i][1])
+ for (opt = argv[i] + 1; *opt; opt ++)
{
- case 'd' : /* -d printer */
- if (argv[i][2])
- printer = argv[i] + 2;
- else
- {
- i ++;
- if (i >= argc)
- usage();
-
- printer = argv[i];
- }
-
- if ((instance = strrchr(printer, '/')) != NULL)
- *instance++ = '\0';
-
- if (num_dests == 0)
- num_dests = cupsGetDests(&dests);
-
- if (num_dests == 0 || !dests ||
- (dest = cupsGetDest(printer, instance, num_dests,
- dests)) == NULL)
- {
- _cupsLangPuts(stderr, _("lpoptions: Unknown printer or class."));
- return (1);
- }
+ switch (*opt)
+ {
+ case 'd' : /* -d printer */
+ if (opt[1] != '\0')
+ {
+ printer = opt + 1;
+ opt += strlen(opt) - 1;
+ }
+ else
+ {
+ i ++;
+ if (i >= argc)
+ usage();
- /*
- * Set the default destination...
- */
+ printer = argv[i];
+ }
- for (j = 0; j < num_dests; j ++)
- dests[j].is_default = 0;
+ if ((instance = strrchr(printer, '/')) != NULL)
+ *instance++ = '\0';
- dest->is_default = 1;
+ if (num_dests == 0)
+ num_dests = cupsGetDests(&dests);
- cupsSetDests(num_dests, dests);
+ if (num_dests == 0 || !dests || (dest = cupsGetDest(printer, instance, num_dests, dests)) == NULL)
+ {
+ _cupsLangPuts(stderr, _("lpoptions: Unknown printer or class."));
+ return (1);
+ }
- for (j = 0; j < dest->num_options; j ++)
- if (cupsGetOption(dest->options[j].name, num_options,
- options) == NULL)
- num_options = cupsAddOption(dest->options[j].name,
- dest->options[j].value,
- num_options, &options);
- break;
+ /*
+ * Set the default destination...
+ */
- case 'h' : /* -h server */
- if (argv[i][2])
- cupsSetServer(argv[i] + 2);
- else
- {
- i ++;
- if (i >= argc)
- usage();
+ for (j = 0; j < num_dests; j ++)
+ dests[j].is_default = 0;
- cupsSetServer(argv[i]);
- }
- break;
+ dest->is_default = 1;
- case 'E' : /* Encrypt connection */
- cupsSetEncryption(HTTP_ENCRYPT_REQUIRED);
- break;
+ cupsSetDests(num_dests, dests);
- case 'l' : /* -l (list options) */
- if (dest == NULL)
- {
- if (num_dests == 0)
- num_dests = cupsGetDests(&dests);
+ for (j = 0; j < dest->num_options; j ++)
+ if (cupsGetOption(dest->options[j].name, num_options,
+ options) == NULL)
+ num_options = cupsAddOption(dest->options[j].name,
+ dest->options[j].value,
+ num_options, &options);
+ break;
- if ((dest = cupsGetDest(NULL, NULL, num_dests, dests)) == NULL)
- dest = dests;
- }
+ case 'h' : /* -h server */
+ if (opt[1] != '\0')
+ {
+ cupsSetServer(opt + 1);
+ opt += strlen(opt) - 1;
+ }
+ else
+ {
+ i ++;
+ if (i >= argc)
+ usage();
- if (dest == NULL)
- _cupsLangPuts(stderr, _("lpoptions: No printers."));
- else
- list_options(dest);
+ cupsSetServer(argv[i]);
+ }
+ break;
- changes = -1;
- break;
+ case 'E' : /* Encrypt connection */
+ cupsSetEncryption(HTTP_ENCRYPT_REQUIRED);
+ break;
- case 'o' : /* -o option[=value] */
- if (dest == NULL)
- {
- if (num_dests == 0)
- num_dests = cupsGetDests(&dests);
+ case 'l' : /* -l (list options) */
+ if (dest == NULL)
+ {
+ if (num_dests == 0)
+ num_dests = cupsGetDests(&dests);
- if ((dest = cupsGetDest(NULL, NULL, num_dests, dests)) == NULL)
- dest = dests;
+ if ((dest = cupsGetDest(NULL, NULL, num_dests, dests)) == NULL)
+ dest = dests;
+ }
if (dest == NULL)
- {
_cupsLangPuts(stderr, _("lpoptions: No printers."));
- return (1);
- }
-
- for (j = 0; j < dest->num_options; j ++)
- if (cupsGetOption(dest->options[j].name, num_options, options) == NULL)
- num_options = cupsAddOption(dest->options[j].name,
- dest->options[j].value,
- num_options, &options);
- }
-
- if (argv[i][2])
- num_options = cupsParseOptions(argv[i] + 2, num_options, &options);
- else
- {
- i ++;
- if (i >= argc)
- usage();
-
- num_options = cupsParseOptions(argv[i], num_options, &options);
- }
-
- changes = 1;
- break;
+ else
+ list_options(dest);
- case 'p' : /* -p printer */
- if (argv[i][2])
- printer = argv[i] + 2;
- else
- {
- i ++;
- if (i >= argc)
- usage();
+ changes = -1;
+ break;
- printer = argv[i];
- }
+ case 'o' : /* -o option[=value] */
+ if (dest == NULL)
+ {
+ if (num_dests == 0)
+ num_dests = cupsGetDests(&dests);
+
+ if ((dest = cupsGetDest(NULL, NULL, num_dests, dests)) == NULL)
+ dest = dests;
+
+ if (dest == NULL)
+ {
+ _cupsLangPuts(stderr, _("lpoptions: No printers."));
+ return (1);
+ }
+
+ for (j = 0; j < dest->num_options; j ++)
+ if (cupsGetOption(dest->options[j].name, num_options, options) == NULL)
+ num_options = cupsAddOption(dest->options[j].name,
+ dest->options[j].value,
+ num_options, &options);
+ }
- if ((instance = strrchr(printer, '/')) != NULL)
- *instance++ = '\0';
+ if (opt[1] != '\0')
+ {
+ num_options = cupsParseOptions(opt + 1, num_options, &options);
+ opt += strlen(opt) - 1;
+ }
+ else
+ {
+ i ++;
+ if (i >= argc)
+ usage();
- if (num_dests == 0)
- num_dests = cupsGetDests(&dests);
+ num_options = cupsParseOptions(argv[i], num_options, &options);
+ }
- if ((dest = cupsGetDest(printer, instance, num_dests, dests)) == NULL)
- {
- num_dests = cupsAddDest(printer, instance, num_dests, &dests);
- dest = cupsGetDest(printer, instance, num_dests, dests);
+ changes = 1;
+ break;
- if (dest == NULL)
+ case 'p' : /* -p printer */
+ if (opt[1] != '\0')
{
- _cupsLangPrintf(stderr,
- _("lpoptions: Unable to add printer or "
- "instance: %s"),
- strerror(errno));
- return (1);
+ printer = opt + 1;
+ opt += strlen(opt) - 1;
}
- }
+ else
+ {
+ i ++;
+ if (i >= argc)
+ usage();
- for (j = 0; j < dest->num_options; j ++)
- if (cupsGetOption(dest->options[j].name, num_options, options) == NULL)
- num_options = cupsAddOption(dest->options[j].name,
- dest->options[j].value,
- num_options, &options);
- break;
+ printer = argv[i];
+ }
+
+ if ((instance = strrchr(printer, '/')) != NULL)
+ *instance++ = '\0';
- case 'r' : /* -r option (remove) */
- if (dest == NULL)
- {
if (num_dests == 0)
num_dests = cupsGetDests(&dests);
- if ((dest = cupsGetDest(NULL, NULL, num_dests, dests)) == NULL)
- dest = dests;
-
- if (dest == NULL)
- {
- _cupsLangPuts(stderr, _("lpoptions: No printers."));
- return (1);
- }
+ if ((dest = cupsGetDest(printer, instance, num_dests, dests)) == NULL)
+ {
+ num_dests = cupsAddDest(printer, instance, num_dests, &dests);
+ dest = cupsGetDest(printer, instance, num_dests, dests);
+
+ if (dest == NULL)
+ {
+ _cupsLangPrintf(stderr, _("lpoptions: Unable to add printer or instance: %s"), strerror(errno));
+ return (1);
+ }
+ }
for (j = 0; j < dest->num_options; j ++)
- if (cupsGetOption(dest->options[j].name, num_options,
- options) == NULL)
+ if (cupsGetOption(dest->options[j].name, num_options, options) == NULL)
num_options = cupsAddOption(dest->options[j].name,
- dest->options[j].value,
- num_options, &options);
- }
+ dest->options[j].value,
+ num_options, &options);
+ break;
- if (argv[i][2])
- option = argv[i] + 2;
- else
- {
- i ++;
- if (i >= argc)
- usage();
-
- option = argv[i];
- }
-
- for (j = 0; j < num_options; j ++)
- if (!_cups_strcasecmp(options[j].name, option))
+ case 'r' : /* -r option (remove) */
+ if (dest == NULL)
{
- /*
- * Remove this option...
- */
-
- num_options --;
-
- if (j < num_options)
- memmove(options + j, options + j + 1, sizeof(cups_option_t) * (size_t)(num_options - j));
- break;
- }
-
- changes = 1;
- break;
-
- case 'x' : /* -x printer */
- if (argv[i][2])
- printer = argv[i] + 2;
- else
- {
- i ++;
- if (i >= argc)
- usage();
-
- printer = argv[i];
- }
+ if (num_dests == 0)
+ num_dests = cupsGetDests(&dests);
+
+ if ((dest = cupsGetDest(NULL, NULL, num_dests, dests)) == NULL)
+ dest = dests;
+
+ if (dest == NULL)
+ {
+ _cupsLangPuts(stderr, _("lpoptions: No printers."));
+ return (1);
+ }
+
+ for (j = 0; j < dest->num_options; j ++)
+ if (cupsGetOption(dest->options[j].name, num_options,
+ options) == NULL)
+ num_options = cupsAddOption(dest->options[j].name,
+ dest->options[j].value,
+ num_options, &options);
+ }
- if ((instance = strrchr(printer, '/')) != NULL)
- *instance++ = '\0';
+ if (opt[1] != '\0')
+ {
+ option = opt + 1;
+ opt += strlen(opt) - 1;
+ }
+ else
+ {
+ i ++;
+ if (i >= argc)
+ usage();
- if (num_dests == 0)
- num_dests = cupsGetDests(&dests);
+ option = argv[i];
+ }
- if ((dest = cupsGetDest(printer, instance, num_dests,
- dests)) != NULL)
- {
- cupsFreeOptions(dest->num_options, dest->options);
+ num_options = cupsRemoveOption(option, num_options, &options);
- /*
- * If we are "deleting" the default printer, then just set the
- * number of options to 0; if it is also the system default
- * then cupsSetDests() will remove it for us...
- */
+ changes = 1;
+ break;
- if (dest->is_default)
+ case 'x' : /* -x printer */
+ if (opt[1] != '\0')
{
- dest->num_options = 0;
- dest->options = NULL;
+ printer = opt + 1;
+ opt += strlen(opt) - 1;
}
else
{
- num_dests --;
+ i ++;
+ if (i >= argc)
+ usage();
- j = dest - dests;
- if (j < num_dests)
- memmove(dest, dest + 1, (size_t)(num_dests - j) * sizeof(cups_dest_t));
+ printer = argv[i];
}
- }
- cupsSetDests(num_dests, dests);
- dest = NULL;
- changes = -1;
- break;
+ if ((instance = strrchr(printer, '/')) != NULL)
+ *instance++ = '\0';
+
+ if (num_dests == 0)
+ num_dests = cupsGetDests(&dests);
+
+ num_dests = cupsRemoveDest(printer, instance, num_dests, &dests);
- default :
- usage();
+ cupsSetDests(num_dests, dests);
+ dest = NULL;
+ changes = -1;
+ break;
+
+ default :
+ usage();
+ }
}
}
else
+ {
usage();
+ }
+ }
if (num_dests == 0)
num_dests = cupsGetDests(&dests);
/*
* "lpstat" command for CUPS.
*
- * Copyright 2007-2014 by Apple Inc.
+ * Copyright 2007-2016 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
{
int i, /* Looping var */
status; /* Exit status */
+ char *opt; /* Option pointer */
int num_dests; /* Number of user destinations */
cups_dest_t *dests; /* User destinations */
int long_status; /* Long status report? */
op = 0;
for (i = 1; i < argc; i ++)
+ {
if (argv[i][0] == '-')
- switch (argv[i][1])
+ {
+ for (opt = argv[i] + 1; *opt; opt ++)
{
- case 'D' : /* Show description */
- long_status = 1;
- break;
+ switch (argv[i][1])
+ {
+ case 'D' : /* Show description */
+ long_status = 1;
+ break;
- case 'E' : /* Encrypt */
+ case 'E' : /* Encrypt */
#ifdef HAVE_SSL
- cupsSetEncryption(HTTP_ENCRYPT_REQUIRED);
+ cupsSetEncryption(HTTP_ENCRYPT_REQUIRED);
#else
- _cupsLangPrintf(stderr,
- _("%s: Sorry, no encryption support."),
- argv[0]);
+ _cupsLangPrintf(stderr,
+ _("%s: Sorry, no encryption support."),
+ argv[0]);
#endif /* HAVE_SSL */
- break;
+ break;
- case 'H' : /* Show server and port */
- if (cupsServer()[0] == '/')
- _cupsLangPuts(stdout, cupsServer());
- else
- _cupsLangPrintf(stdout, "%s:%d", cupsServer(), ippPort());
- op = 'H';
- break;
-
- case 'P' : /* Show paper types */
- op = 'P';
- break;
-
- case 'R' : /* Show ranking */
- ranking = 1;
- break;
-
- case 'S' : /* Show charsets */
- op = 'S';
- if (!argv[i][2])
- i ++;
- break;
-
- case 'U' : /* Username */
- if (argv[i][2])
- cupsSetUser(argv[i] + 2);
- else
- {
- i ++;
- if (i >= argc)
+ case 'H' : /* Show server and port */
+ if (cupsServer()[0] == '/')
+ _cupsLangPuts(stdout, cupsServer());
+ else
+ _cupsLangPrintf(stdout, "%s:%d", cupsServer(), ippPort());
+ op = 'H';
+ break;
+
+ case 'P' : /* Show paper types */
+ op = 'P';
+ break;
+
+ case 'R' : /* Show ranking */
+ ranking = 1;
+ break;
+
+ case 'S' : /* Show charsets */
+ op = 'S';
+ if (!argv[i][2])
+ i ++;
+ break;
+
+ case 'U' : /* Username */
+ if (opt[1] != '\0')
{
- _cupsLangPrintf(stderr,
- _("%s: Error - expected username after "
- "\"-U\" option."),
- argv[0]);
- return (1);
+ cupsSetUser(opt + 1);
+ opt += strlen(opt) - 1;
}
+ else
+ {
+ i ++;
+ if (i >= argc)
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - expected username after \"-U\" option."), argv[0]);
+ return (1);
+ }
- cupsSetUser(argv[i]);
- }
- break;
+ cupsSetUser(argv[i]);
+ }
+ break;
- case 'W' : /* Show which jobs? */
- if (argv[i][2])
- which = argv[i] + 2;
- else
- {
- i ++;
+ case 'W' : /* Show which jobs? */
+ if (opt[1] != '\0')
+ {
+ which = opt + 1;
+ opt += strlen(opt) - 1;
+ }
+ else
+ {
+ i ++;
- if (i >= argc)
+ if (i >= argc)
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - need \"completed\", \"not-completed\", or \"all\" after \"-W\" option."), argv[0]);
+ return (1);
+ }
+
+ which = argv[i];
+ }
+
+ if (strcmp(which, "completed") && strcmp(which, "not-completed") && strcmp(which, "all"))
{
- _cupsLangPrintf(stderr,
- _("%s: Error - need \"completed\", "
- "\"not-completed\", or \"all\" after "
- "\"-W\" option."),
- argv[0]);
+ _cupsLangPrintf(stderr, _("%s: Error - need \"completed\", \"not-completed\", or \"all\" after \"-W\" option."), argv[0]);
return (1);
- }
+ }
+ break;
- which = argv[i];
- }
+ case 'a' : /* Show acceptance status */
+ op = 'a';
- if (strcmp(which, "completed") && strcmp(which, "not-completed") &&
- strcmp(which, "all"))
- {
- _cupsLangPrintf(stderr,
- _("%s: Error - need \"completed\", "
- "\"not-completed\", or \"all\" after "
- "\"-W\" option."),
- argv[0]);
- return (1);
- }
- break;
+ if (opt[1] != '\0')
+ {
+ check_dest(argv[0], opt + 1, &num_dests, &dests);
- case 'a' : /* Show acceptance status */
- op = 'a';
+ status |= show_accepting(opt + 1, num_dests, dests);
+ opt += strlen(opt) - 1;
+ }
+ else if ((i + 1) < argc && argv[i + 1][0] != '-')
+ {
+ i ++;
- if (argv[i][2])
- {
- check_dest(argv[0], argv[i] + 2, &num_dests, &dests);
+ check_dest(argv[0], argv[i], &num_dests, &dests);
- status |= show_accepting(argv[i] + 2, num_dests, dests);
- }
- else if ((i + 1) < argc && argv[i + 1][0] != '-')
- {
- i ++;
+ status |= show_accepting(argv[i], num_dests, dests);
+ }
+ else
+ {
+ if (num_dests <= 1)
+ {
+ cupsFreeDests(num_dests, dests);
+ num_dests = cupsGetDests(&dests);
+
+ if (num_dests == 0 && (cupsLastError() == IPP_STATUS_ERROR_BAD_REQUEST || cupsLastError() == IPP_STATUS_ERROR_VERSION_NOT_SUPPORTED))
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - add '/version=1.1' to server name."), argv[0]);
+ return (1);
+ }
+ }
+
+ status |= show_accepting(NULL, num_dests, dests);
+ }
+ break;
- check_dest(argv[0], argv[i], &num_dests, &dests);
+ case 'c' : /* Show classes and members */
+ op = 'c';
- status |= show_accepting(argv[i], num_dests, dests);
- }
- else
- {
- if (num_dests <= 1)
+ if (opt[1] != '\0')
{
- cupsFreeDests(num_dests, dests);
- num_dests = cupsGetDests(&dests);
+ check_dest(argv[0], opt + 1, &num_dests, &dests);
+
+ status |= show_classes(opt + 1);
+ opt += strlen(opt) - 1;
+ }
+ else if ((i + 1) < argc && argv[i + 1][0] != '-')
+ {
+ i ++;
+
+ check_dest(argv[0], argv[i], &num_dests, &dests);
+
+ status |= show_classes(argv[i]);
+ }
+ else
+ status |= show_classes(NULL);
+ break;
+
+ case 'd' : /* Show default destination */
+ op = 'd';
+
+ if (num_dests != 1 || !dests[0].is_default)
+ {
+ cupsFreeDests(num_dests, dests);
+
+ dests = cupsGetNamedDest(CUPS_HTTP_DEFAULT, NULL, NULL);
+ num_dests = dests ? 1 : 0;
if (num_dests == 0 &&
(cupsLastError() == IPP_STATUS_ERROR_BAD_REQUEST ||
cupsLastError() == IPP_STATUS_ERROR_VERSION_NOT_SUPPORTED))
{
- _cupsLangPrintf(stderr,
- _("%s: Error - add '/version=1.1' to server "
- "name."), argv[0]);
+ _cupsLangPrintf(stderr, _("%s: Error - add '/version=1.1' to server name."), argv[0]);
return (1);
}
}
- status |= show_accepting(NULL, num_dests, dests);
- }
- break;
-
- case 'c' : /* Show classes and members */
- op = 'c';
-
- if (argv[i][2])
- {
- check_dest(argv[0], argv[i] + 2, &num_dests, &dests);
+ show_default(dests);
+ break;
- status |= show_classes(argv[i] + 2);
- }
- else if ((i + 1) < argc && argv[i + 1][0] != '-')
- {
- i ++;
+ case 'f' : /* Show forms */
+ op = 'f';
+ if (opt[1] != '\0')
+ {
+ opt += strlen(opt) - 1;
+ }
+ else
+ {
+ i ++;
+ if (i >= argc)
+ return (1);
+ }
+ break;
- check_dest(argv[0], argv[i], &num_dests, &dests);
+ case 'h' : /* Connect to host */
+ if (opt[1] != '\0')
+ {
+ cupsSetServer(opt + 1);
+ opt += strlen(opt) - 1;
+ }
+ else
+ {
+ i ++;
- status |= show_classes(argv[i]);
- }
- else
- status |= show_classes(NULL);
- break;
+ if (i >= argc)
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - expected hostname after \"-h\" option."), argv[0]);
+ return (1);
+ }
- case 'd' : /* Show default destination */
- op = 'd';
+ cupsSetServer(argv[i]);
+ }
+ break;
- if (num_dests != 1 || !dests[0].is_default)
- {
- cupsFreeDests(num_dests, dests);
+ case 'l' : /* Long status or long job status */
+ long_status = 2;
+ break;
- dests = cupsGetNamedDest(CUPS_HTTP_DEFAULT, NULL, NULL);
- num_dests = dests ? 1 : 0;
+ case 'o' : /* Show jobs by destination */
+ op = 'o';
- if (num_dests == 0 &&
- (cupsLastError() == IPP_STATUS_ERROR_BAD_REQUEST ||
- cupsLastError() == IPP_STATUS_ERROR_VERSION_NOT_SUPPORTED))
+ if (opt[1])
{
- _cupsLangPrintf(stderr,
- _("%s: Error - add '/version=1.1' to server "
- "name."), argv[0]);
- return (1);
+ check_dest(argv[0], opt + 1, &num_dests, &dests);
+
+ status |= show_jobs(opt + 1, NULL, long_status, ranking, which);
+ opt += strlen(opt) - 1;
}
- }
+ else if ((i + 1) < argc && argv[i + 1][0] != '-')
+ {
+ i ++;
- show_default(dests);
- break;
+ check_dest(argv[0], argv[i], &num_dests, &dests);
- case 'f' : /* Show forms */
- op = 'f';
- if (!argv[i][2])
- i ++;
- break;
+ status |= show_jobs(argv[i], NULL, long_status, ranking, which);
+ }
+ else
+ status |= show_jobs(NULL, NULL, long_status, ranking, which);
+ break;
- case 'h' : /* Connect to host */
- if (argv[i][2])
- cupsSetServer(argv[i] + 2);
- else
- {
- i ++;
+ case 'p' : /* Show printers */
+ op = 'p';
- if (i >= argc)
+ if (opt[1] != '\0')
{
- _cupsLangPrintf(stderr,
- _("%s: Error - expected hostname after "
- "\"-h\" option."),
- argv[0]);
- return (1);
- }
+ check_dest(argv[0], opt + 1, &num_dests, &dests);
- cupsSetServer(argv[i]);
- }
- break;
+ status |= show_printers(opt + 1, num_dests, dests,
+ long_status);
+ opt += strlen(opt) - 1;
+ }
+ else if ((i + 1) < argc && argv[i + 1][0] != '-')
+ {
+ i ++;
- case 'l' : /* Long status or long job status */
- long_status = 2;
- break;
+ check_dest(argv[0], argv[i], &num_dests, &dests);
- case 'o' : /* Show jobs by destination */
- op = 'o';
+ status |= show_printers(argv[i], num_dests, dests, long_status);
+ }
+ else
+ {
+ if (num_dests <= 1)
+ {
+ cupsFreeDests(num_dests, dests);
+ num_dests = cupsGetDests(&dests);
+
+ if (num_dests == 0 &&
+ (cupsLastError() == IPP_STATUS_ERROR_BAD_REQUEST ||
+ cupsLastError() == IPP_STATUS_ERROR_VERSION_NOT_SUPPORTED))
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - add '/version=1.1' to server name."), argv[0]);
+ return (1);
+ }
+ }
- if (argv[i][2])
- {
- check_dest(argv[0], argv[i] + 2, &num_dests, &dests);
+ status |= show_printers(NULL, num_dests, dests, long_status);
+ }
+ break;
- status |= show_jobs(argv[i] + 2, NULL, long_status, ranking,
- which);
- }
- else if ((i + 1) < argc && argv[i + 1][0] != '-')
- {
- i ++;
+ case 'r' : /* Show scheduler status */
+ op = 'r';
- check_dest(argv[0], argv[i], &num_dests, &dests);
+ show_scheduler();
+ break;
- status |= show_jobs(argv[i], NULL, long_status, ranking, which);
- }
- else
- status |= show_jobs(NULL, NULL, long_status, ranking, which);
- break;
+ case 's' : /* Show summary */
+ op = 's';
- case 'p' : /* Show printers */
- op = 'p';
+ if (num_dests <= 1)
+ {
+ cupsFreeDests(num_dests, dests);
+ num_dests = cupsGetDests(&dests);
- if (argv[i][2])
- {
- check_dest(argv[0], argv[i] + 2, &num_dests, &dests);
+ if (num_dests == 0 &&
+ (cupsLastError() == IPP_STATUS_ERROR_BAD_REQUEST ||
+ cupsLastError() == IPP_STATUS_ERROR_VERSION_NOT_SUPPORTED))
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - add '/version=1.1' to server name."), argv[0]);
+ return (1);
+ }
+ }
- status |= show_printers(argv[i] + 2, num_dests, dests,
- long_status);
- }
- else if ((i + 1) < argc && argv[i + 1][0] != '-')
- {
- i ++;
+ show_default(cupsGetDest(NULL, NULL, num_dests, dests));
+ status |= show_classes(NULL);
+ status |= show_devices(NULL, num_dests, dests);
+ break;
- check_dest(argv[0], argv[i], &num_dests, &dests);
+ case 't' : /* Show all info */
+ op = 't';
- status |= show_printers(argv[i], num_dests, dests, long_status);
- }
- else
- {
- if (num_dests <= 1)
+ if (num_dests <= 1)
{
- cupsFreeDests(num_dests, dests);
+ cupsFreeDests(num_dests, dests);
num_dests = cupsGetDests(&dests);
if (num_dests == 0 &&
(cupsLastError() == IPP_STATUS_ERROR_BAD_REQUEST ||
cupsLastError() == IPP_STATUS_ERROR_VERSION_NOT_SUPPORTED))
{
- _cupsLangPrintf(stderr,
- _("%s: Error - add '/version=1.1' to server "
- "name."), argv[0]);
+ _cupsLangPrintf(stderr, _("%s: Error - add '/version=1.1' to server name."), argv[0]);
return (1);
}
}
+ show_scheduler();
+ show_default(cupsGetDest(NULL, NULL, num_dests, dests));
+ status |= show_classes(NULL);
+ status |= show_devices(NULL, num_dests, dests);
+ status |= show_accepting(NULL, num_dests, dests);
status |= show_printers(NULL, num_dests, dests, long_status);
- }
- break;
-
- case 'r' : /* Show scheduler status */
- op = 'r';
-
- show_scheduler();
- break;
-
- case 's' : /* Show summary */
- op = 's';
+ status |= show_jobs(NULL, NULL, long_status, ranking, which);
+ break;
- if (num_dests <= 1)
- {
- cupsFreeDests(num_dests, dests);
- num_dests = cupsGetDests(&dests);
+ case 'u' : /* Show jobs by user */
+ op = 'u';
- if (num_dests == 0 &&
- (cupsLastError() == IPP_STATUS_ERROR_BAD_REQUEST ||
- cupsLastError() == IPP_STATUS_ERROR_VERSION_NOT_SUPPORTED))
+ if (opt[1] != '\0')
{
- _cupsLangPrintf(stderr,
- _("%s: Error - add '/version=1.1' to server "
- "name."), argv[0]);
- return (1);
+ status |= show_jobs(NULL, opt + 1, long_status, ranking, which);
+ opt += strlen(opt) - 1;
}
- }
-
- show_default(cupsGetDest(NULL, NULL, num_dests, dests));
- status |= show_classes(NULL);
- status |= show_devices(NULL, num_dests, dests);
- break;
-
- case 't' : /* Show all info */
- op = 't';
-
- if (num_dests <= 1)
- {
- cupsFreeDests(num_dests, dests);
- num_dests = cupsGetDests(&dests);
-
- if (num_dests == 0 &&
- (cupsLastError() == IPP_STATUS_ERROR_BAD_REQUEST ||
- cupsLastError() == IPP_STATUS_ERROR_VERSION_NOT_SUPPORTED))
+ else if ((i + 1) < argc && argv[i + 1][0] != '-')
{
- _cupsLangPrintf(stderr,
- _("%s: Error - add '/version=1.1' to server "
- "name."), argv[0]);
- return (1);
+ i ++;
+ status |= show_jobs(NULL, argv[i], long_status, ranking, which);
}
- }
-
- show_scheduler();
- show_default(cupsGetDest(NULL, NULL, num_dests, dests));
- status |= show_classes(NULL);
- status |= show_devices(NULL, num_dests, dests);
- status |= show_accepting(NULL, num_dests, dests);
- status |= show_printers(NULL, num_dests, dests, long_status);
- status |= show_jobs(NULL, NULL, long_status, ranking, which);
- break;
-
- case 'u' : /* Show jobs by user */
- op = 'u';
-
- if (argv[i][2])
- status |= show_jobs(NULL, argv[i] + 2, long_status, ranking,
- which);
- else if ((i + 1) < argc && argv[i + 1][0] != '-')
- {
- i ++;
- status |= show_jobs(NULL, argv[i], long_status, ranking, which);
- }
- else
- status |= show_jobs(NULL, NULL, long_status, ranking, which);
- break;
+ else
+ status |= show_jobs(NULL, NULL, long_status, ranking, which);
+ break;
- case 'v' : /* Show printer devices */
- op = 'v';
+ case 'v' : /* Show printer devices */
+ op = 'v';
- if (argv[i][2])
- {
- check_dest(argv[0], argv[i] + 2, &num_dests, &dests);
+ if (opt[1] != '\0')
+ {
+ check_dest(argv[0], opt + 1, &num_dests, &dests);
- status |= show_devices(argv[i] + 2, num_dests, dests);
- }
- else if ((i + 1) < argc && argv[i + 1][0] != '-')
- {
- i ++;
+ status |= show_devices(opt + 1, num_dests, dests);
+ opt += strlen(opt) - 1;
+ }
+ else if ((i + 1) < argc && argv[i + 1][0] != '-')
+ {
+ i ++;
- check_dest(argv[0], argv[i], &num_dests, &dests);
+ check_dest(argv[0], argv[i], &num_dests, &dests);
- status |= show_devices(argv[i], num_dests, dests);
- }
- else
- {
- if (num_dests <= 1)
+ status |= show_devices(argv[i], num_dests, dests);
+ }
+ else
{
- cupsFreeDests(num_dests, dests);
- num_dests = cupsGetDests(&dests);
-
- if (num_dests == 0 &&
- (cupsLastError() == IPP_STATUS_ERROR_BAD_REQUEST ||
- cupsLastError() == IPP_STATUS_ERROR_VERSION_NOT_SUPPORTED))
+ if (num_dests <= 1)
{
- _cupsLangPrintf(stderr,
- _("%s: Error - add '/version=1.1' to server "
- "name."), argv[0]);
- return (1);
+ cupsFreeDests(num_dests, dests);
+ num_dests = cupsGetDests(&dests);
+
+ if (num_dests == 0 &&
+ (cupsLastError() == IPP_STATUS_ERROR_BAD_REQUEST ||
+ cupsLastError() == IPP_STATUS_ERROR_VERSION_NOT_SUPPORTED))
+ {
+ _cupsLangPrintf(stderr, _("%s: Error - add '/version=1.1' to server name."), argv[0]);
+ return (1);
+ }
}
- }
- status |= show_devices(NULL, num_dests, dests);
- }
- break;
+ status |= show_devices(NULL, num_dests, dests);
+ }
+ break;
- default :
- _cupsLangPrintf(stderr,
- _("%s: Error - unknown option \"%c\"."),
- argv[0], argv[i][1]);
- return (1);
+ default :
+ _cupsLangPrintf(stderr, _("%s: Error - unknown option \"%c\"."), argv[0], argv[i][1]);
+ return (1);
+ }
}
+ }
else
{
status |= show_jobs(argv[i], NULL, long_status, ranking, which);
op = 'o';
}
+ }
if (!op)
status |= show_jobs(NULL, cupsUser(), long_status, ranking, which);
{#printer_name=0?:
<TABLE CLASS="list" SUMMARY="Class List">
<THEAD>
-<TR><TH><A HREF="{THISURL}?QUERY={?QUERY}&WHICH_JOBS={?WHICH_JOBS}&FIRST={FIRST}&ORDER={ORDER=dec?asc:dec}">{ORDER=dec?<SMALL>▲</SMALL> Queue Name <SMALL>▲</SMALL>:<SMALL>▼</SMALL> Queue Name <SMALL>▼</SMALL>}</A></TH><TH>Description</TH><TH>Location</TH><TH>Members</TH><TH>Status</TH></TR>
+<TR><TH>Queue Name</TH><TH>Description</TH><TH>Location</TH><TH>Members</TH><TH>Status</TH></TR>
</THEAD>
<TBODY>
{[printer_name]
{#printer_name=0?:
<TABLE CLASS="list" SUMMARY="Class List">
<THEAD>
-<TR><TH><A HREF="{THISURL}?QUERY={?QUERY}&WHICH_JOBS={?WHICH_JOBS}&FIRST={FIRST}&ORDER={ORDER=dec?asc:dec}">{ORDER=dec?<SMALL>▲</SMALL> Wartweschlange <SMALL>▲</SMALL>:<SMALL>▼</SMALL> Warteschlange <SMALL>▼</SMALL>}</A></TH><TH>Beschreibung</TH><TH>Ort</TH><TH>Mitglieder</TH><TH>Status</TH></TR>
+<TR><TH>Wartweschlange</TH><TH>Beschreibung</TH><TH>Ort</TH><TH>Mitglieder</TH><TH>Status</TH></TR>
</THEAD>
<TBODY>
{[printer_name]
{#job_id=0?:
<TABLE CLASS="list" SUMMARY="Auftragsliste">
<THEAD>
-<TR><TH><A HREF="{THISURL}?QUERY={?QUERY}&WHICH_JOBS={?WHICH_JOBS}&FIRST={FIRST}&ORDER={ORDER=dec?asc:dec}">{ORDER=dec?<SMALL>▲</SMALL> ID <SMALL>▲</SMALL>:<SMALL>▼</SMALL> ID <SMALL>▼</SMALL>}</A></TH><TH>Name</TH><TH>Benutzer</TH><TH>Grösse</TH><TH>Seiten</TH><TH>Status</TH><TH>Steuerung</TH></TR>
+<TR><TH>ID</TH><TH>Name</TH><TH>Benutzer</TH><TH>Grösse</TH><TH>Seiten</TH><TH>Status</TH><TH>Steuerung</TH></TR>
</THEAD>
<TBODY>
{[job_id]
<TD>{?job_originating_user_name=?Einbehalten:{job_originating_user_name}} </TD>
<TD>{job_k_octets}k </TD>
<TD>{job_media_sheets_completed=0?Unbekannt:{?job_media_sheets_completed}} </TD>
-<TD>{job_state=3?unerledigt seit<BR>{time_at_creation}:{job_state=4?angehalten seit<BR>{time_at_creation}:
-{job_state=5?verarbeitet seit<BR>{time_at_processing}:{job_state=6?gestoppt:
-{job_state=7?gelöscht am<BR>{time_at_completed}:{job_state=8?abgebrochen:beendet am<BR>{time_at_completed}}}}}}} {job_printer_state_message?<BR>
+<TD>{job_state=3?unerledigt seit<BR>{?time_at_creation=?Unknown:{time_at_creation}}:{job_state=4?angehalten seit<BR>{?time_at_creation=?Unknown:{time_at_creation}}:
+{job_state=5?verarbeitet seit<BR>{?time_at_processing=?Unknown:{time_at_processing}}:{job_state=6?gestoppt:
+{job_state=7?gelöscht am<BR>{?time_at_completed=?Unknown:{time_at_completed}}:{job_state=8?abgebrochen:beendet am<BR>{?time_at_completed=?Unknown:{time_at_completed}}}}}}}} {job_printer_state_message?<BR>
<EM>"{job_printer_state_message}"</EM>:}</TD>
<TD>
{job_preserved>0?{job_state>5?
<TABLE CLASS="inset" SUMMARY="Seitenverwaltung">
<TR>
- <TD WIDTH="50%">{PREV?<FORM ACTION="{THISURL}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="QUERY" VALUE="{?QUERY}"><INPUT TYPE="HIDDEN" NAME="ORDER" VALUE="{?ORDER}"><INPUT TYPE="HIDDEN" NAME="WHICH_JOBS" VALUE="{?WHICH_JOBS}"><INPUT TYPE="HIDDEN" NAME="FIRST" VALUE="{PREV}"><INPUT TYPE="SUBMIT" VALUE="◀ Vorherige anzeigen"></FORM>: }</TD>
- <TD WIDTH="50%" ALIGN="RIGHT">{NEXT?<FORM ACTION="{THISURL}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="QUERY" VALUE="{?QUERY}"><INPUT TYPE="HIDDEN" NAME="ORDER" VALUE="{?ORDER}"><INPUT TYPE="HIDDEN" NAME="WHICH_JOBS" VALUE="{?WHICH_JOBS}"><INPUT TYPE="HIDDEN" NAME="FIRST" VALUE="{NEXT}"><INPUT TYPE="SUBMIT" VALUE="Nächste anzeigen ▶"></FORM>: }</TD>
+ <TD WIDTH="50%">{PREV?{PREV>0?<FORM ACTION="{THISURL}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="QUERY" VALUE="{?QUERY}"><INPUT TYPE="HIDDEN" NAME="WHICH_JOBS" VALUE="{?WHICH_JOBS}"><INPUT TYPE="HIDDEN" NAME="FIRST" VALUE="0"><INPUT TYPE="SUBMIT" VALUE="◀◀ Show First"></FORM> :}<FORM ACTION="{THISURL}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="QUERY" VALUE="{?QUERY}"><INPUT TYPE="HIDDEN" NAME="WHICH_JOBS" VALUE="{?WHICH_JOBS}"><INPUT TYPE="HIDDEN" NAME="FIRST" VALUE="{PREV}"><INPUT TYPE="SUBMIT" VALUE="◀ Vorherige anzeigen"></FORM>: }</TD>
+ <TD WIDTH="50%" ALIGN="RIGHT">{NEXT?<FORM ACTION="{THISURL}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="QUERY" VALUE="{?QUERY}"><INPUT TYPE="HIDDEN" NAME="WHICH_JOBS" VALUE="{?WHICH_JOBS}"><INPUT TYPE="HIDDEN" NAME="FIRST" VALUE="{NEXT}"><INPUT TYPE="SUBMIT" VALUE="Nächste anzeigen ▶"></FORM>: }
+ {LAST?<FORM ACTION="{THISURL}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="QUERY" VALUE="{?QUERY}"><INPUT TYPE="HIDDEN" NAME="WHICH_JOBS" VALUE="{?WHICH_JOBS}"><INPUT TYPE="HIDDEN" NAME="FIRST" VALUE="{LAST}"><INPUT TYPE="SUBMIT" VALUE="Show Last ▶▶"></FORM>:}</TD>
</TR>
</TABLE>
{#printer_name=0?:
<TABLE CLASS="list" SUMMARY="Druckerliste">
<THEAD>
-<TR><TH><A HREF="{THISURL}?QUERY={?QUERY}&WHICH_JOBS={?WHICH_JOBS}&FIRST={FIRST}&ORDER={ORDER=dec?asc:dec}">{ORDER=dec?<SMALL>▲</SMALL> Queue Name <SMALL>▲</SMALL>:<SMALL>▼</SMALL> Queue Name <SMALL>▼</SMALL>}</A></TH><TH>Beschreibung</TH><TH>Ort</TH><TH>Marke und Modell</TH><TH>Status</TH></TR>
+<TR><TH>Queue Name</TH><TH>Beschreibung</TH><TH>Ort</TH><TH>Marke und Modell</TH><TH>Status</TH></TR>
</THEAD>
<TBODY>
{[printer_name]
{#printer_name=0?:
<TABLE CLASS="list" SUMMARY="Lista de clases">
<THEAD>
-<TR><TH><A HREF="{THISURL}?QUERY={?QUERY}&WHICH_JOBS={?WHICH_JOBS}&FIRST={FIRST}&ORDER={ORDER=dec?asc:dec}">{ORDER=dec?<SMALL>▲</SMALL> Nombre de la cola <SMALL>▲</SMALL>:<SMALL>▼</SMALL> Nombre de la cola <SMALL>▼</SMALL>}</A></TH><TH>Descripción</TH><TH>Ubicación</TH><TH>Miembros</TH><TH>Estado</TH></TR>
+<TR><TH>Nombre de la cola</TH><TH>Descripción</TH><TH>Ubicación</TH><TH>Miembros</TH><TH>Estado</TH></TR>
</THEAD>
<TBODY>
{[printer_name]
{#job_id=0?:
<TABLE CLASS="list" SUMMARY="Lista de trabajos">
<THEAD>
-<TR><TH><A HREF="{THISURL}?QUERY={?QUERY}&WHICH_JOBS={?WHICH_JOBS}&FIRST={FIRST}&ORDER={ORDER=dec?asc:dec}">{ORDER=dec?<SMALL>▲</SMALL> ID <SMALL>▲</SMALL>:<SMALL>▼</SMALL> ID <SMALL>▼</SMALL>}</A></TH><TH>Nombre</TH><TH>Usuario</TH><TH>Tamaño</TH><TH>Páginas</TH><TH>Estado</TH><TH>Control</TH></TR>
+<TR><TH>ID</TH><TH>Nombre</TH><TH>Usuario</TH><TH>Tamaño</TH><TH>Páginas</TH><TH>Estado</TH><TH>Control</TH></TR>
</THEAD>
<TBODY>
{[job_id]
<TD>{job_originating_user_name} </TD>
<TD>{job_k_octets}k </TD>
<TD>{job_media_sheets_completed=0?Desconocido:{?job_media_sheets_completed}} </TD>
-<TD>{job_state=3?pendiente desde<BR>{time_at_creation}:{job_state=4?retenido desde<BR>{time_at_creation}:
-{job_state=5?en proceso desde<BR>{time_at_processing}:{job_state=6?parado:
-{job_state=7?cancelado el<BR>{time_at_completed}:{job_state=8?interrumpido:completado el<BR>{time_at_completed}}}}}}} {job_printer_state_message?<BR>
+<TD>{job_state=3?pendiente desde<BR>{?time_at_creation=?Unknown:{time_at_creation}}:{job_state=4?retenido desde<BR>{?time_at_creation=?Unknown:{time_at_creation}}:
+{job_state=5?en proceso desde<BR>{?time_at_processing=?Unknown:{time_at_processing}}:{job_state=6?parado:
+{job_state=7?cancelado el<BR>{?time_at_completed=?Unknown:{time_at_completed}}:{job_state=8?interrumpido:completado el<BR>{?time_at_completed=?Unknown:{time_at_completed}}}}}}}} {job_printer_state_message?<BR>
<EM>"{job_printer_state_message}"</EM>:}</TD>
<TD>
{job_preserved>0?{job_state>5?
<TABLE CLASS="inset" SUMMARY="Barra de paginación">
<TR>
- <TD WIDTH="50%">{PREV?<FORM ACTION="{THISURL}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="QUERY" VALUE="{?QUERY}"><INPUT TYPE="HIDDEN" NAME="ORDER" VALUE="{?ORDER}"><INPUT TYPE="HIDDEN" NAME="WHICH_JOBS" VALUE="{?WHICH_JOBS}"><INPUT TYPE="HIDDEN" NAME="FIRST" VALUE="{PREV}"><INPUT TYPE="SUBMIT" VALUE="◀ Mostrar anteriores"></FORM>: }</TD>
- <TD WIDTH="50%" ALIGN="RIGHT">{NEXT?<FORM ACTION="{THISURL}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="QUERY" VALUE="{?QUERY}"><INPUT TYPE="HIDDEN" NAME="ORDER" VALUE="{?ORDER}"><INPUT TYPE="HIDDEN" NAME="WHICH_JOBS" VALUE="{?WHICH_JOBS}"><INPUT TYPE="HIDDEN" NAME="FIRST" VALUE="{NEXT}"><INPUT TYPE="SUBMIT" VALUE="Mostrar siguientes ▶"></FORM>: }</TD>
+ <TD WIDTH="50%">{PREV?{PREV>0?<FORM ACTION="{THISURL}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="QUERY" VALUE="{?QUERY}"><INPUT TYPE="HIDDEN" NAME="WHICH_JOBS" VALUE="{?WHICH_JOBS}"><INPUT TYPE="HIDDEN" NAME="FIRST" VALUE="0"><INPUT TYPE="SUBMIT" VALUE="◀◀ Show First"></FORM> :}<FORM ACTION="{THISURL}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="QUERY" VALUE="{?QUERY}"><INPUT TYPE="HIDDEN" NAME="WHICH_JOBS" VALUE="{?WHICH_JOBS}"><INPUT TYPE="HIDDEN" NAME="FIRST" VALUE="{PREV}"><INPUT TYPE="SUBMIT" VALUE="◀ Mostrar anteriores"></FORM>: }</TD>
+ <TD WIDTH="50%" ALIGN="RIGHT">{NEXT?<FORM ACTION="{THISURL}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="QUERY" VALUE="{?QUERY}"><INPUT TYPE="HIDDEN" NAME="WHICH_JOBS" VALUE="{?WHICH_JOBS}"><INPUT TYPE="HIDDEN" NAME="FIRST" VALUE="{NEXT}"><INPUT TYPE="SUBMIT" VALUE="Mostrar siguientes ▶"></FORM>: }
+ {LAST?<FORM ACTION="{THISURL}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="QUERY" VALUE="{?QUERY}"><INPUT TYPE="HIDDEN" NAME="WHICH_JOBS" VALUE="{?WHICH_JOBS}"><INPUT TYPE="HIDDEN" NAME="FIRST" VALUE="{LAST}"><INPUT TYPE="SUBMIT" VALUE="Show Last ▶▶"></FORM>:}</TD>
</TR>
</TABLE>
{#printer_name=0?:
<TABLE CLASS="list" SUMMARY="Lista de impresoras">
<THEAD>
-<TR><TH><A HREF="{THISURL}?QUERY={?QUERY}&WHICH_JOBS={?WHICH_JOBS}&FIRST={FIRST}&ORDER={ORDER=dec?asc:dec}">{ORDER=dec?<SMALL>▲</SMALL> Nombre de la cola <SMALL>▲</SMALL>:<SMALL>▼</SMALL> Nombre de la cola <SMALL>▼</SMALL>}</A></TH><TH>Descripción</TH><TH>Ubicación</TH><TH>Marca y modelo</TH><TH>Estado</TH></TR>
+<TR><TH>Nombre de la cola</TH><TH>Descripción</TH><TH>Ubicación</TH><TH>Marca y modelo</TH><TH>Estado</TH></TR>
</THEAD>
<TBODY>
{[printer_name]
{#printer_name=0?:
<TABLE CLASS="list" SUMMARY="クラスの一覧">
<THEAD>
-<TR><TH><A HREF="{THISURL}?QUERY={?QUERY}&WHICH_JOBS={?WHICH_JOBS}&FIRST={FIRST}&ORDER={ORDER=dec?asc:dec}">{ORDER=dec?<SMALL>▲</SMALL> キュー名 <SMALL>▲</SMALL>:<SMALL>▼</SMALL> キュー名 <SMALL>▼</SMALL>}</A></TH><TH>説明</TH><TH>場所</TH><TH>メンバー</TH><TH>状態</TH></TR>
+<TR><TH>キュー名</TH><TH>説明</TH><TH>場所</TH><TH>メンバー</TH><TH>状態</TH></TR>
</THEAD>
<TBODY>
{[printer_name]
{#job_id=0?:
<TABLE CLASS="list" SUMMARY="ジョブの一覧">
<THEAD>
-<TR><TH><A HREF="{THISURL}?QUERY={?QUERY}&WHICH_JOBS={?WHICH_JOBS}&FIRST={FIRST}&ORDER={ORDER=dec?asc:dec}">{ORDER=dec?<SMALL>▲</SMALL> ID <SMALL>▲</SMALL>:<SMALL>▼</SMALL> ID <SMALL>▼</SMALL>}</A></TH><TH>名前</TH><TH>ユーザー</TH><TH>サイズ</TH><TH>ページ</TH><TH>状態</TH><TH>制御</TH></TR>
+<TR><TH>ID</TH><TH>名前</TH><TH>ユーザー</TH><TH>サイズ</TH><TH>ページ</TH><TH>状態</TH><TH>制御</TH></TR>
</THEAD>
<TBODY>
{[job_id]
<TD>{?job_originating_user_name=?隠匿:{job_originating_user_name}} </TD>
<TD>{job_k_octets}k </TD>
<TD>{job_media_sheets_completed=0?不明:{?job_media_sheets_completed}} </TD>
-<TD>{job_state=3?{time_at_creation}<BR>から保留中:{job_state=4?{time_at_creation}<BR>から保留中:
-{job_state=5?{time_at_processing}<BR>から処理中:{job_state=6?に停止:
-{job_state=7?{time_at_completed}<BR>にキャンセル:{job_state=8?に中断:{time_at_completed}<BR>に完了}}}}}} {job_printer_state_message?<BR>
+<TD>{job_state=3?{?time_at_creation=?Unknown:{time_at_creation}}<BR>から保留中:{job_state=4?{?time_at_creation=?Unknown:{time_at_creation}}<BR>から保留中:
+{job_state=5?{?time_at_processing=?Unknown:{time_at_processing}}<BR>から処理中:{job_state=6?に停止:
+{job_state=7?{?time_at_completed=?Unknown:{time_at_completed}}<BR>にキャンセル:{job_state=8?に中断:{?time_at_completed=?Unknown:{time_at_completed}}<BR>に完了}}}}}} {job_printer_state_message?<BR>
<EM>"{job_printer_state_message}"</EM>:}</TD>
<TD>
{job_preserved>0?{job_state>5?
<TABLE CLASS="inset" SUMMARY="Paging Bar">
<TR>
- <TD WIDTH="50%">{PREV?<FORM ACTION="{THISURL}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="QUERY" VALUE="{?QUERY}"><INPUT TYPE="HIDDEN" NAME="ORDER" VALUE="{?ORDER}"><INPUT TYPE="HIDDEN" NAME="WHICH_JOBS" VALUE="{?WHICH_JOBS}"><INPUT TYPE="HIDDEN" NAME="FIRST" VALUE="{PREV}"><INPUT TYPE="SUBMIT" VALUE="◀ 前を表示"></FORM>: }</TD>
- <TD WIDTH="50%" ALIGN="RIGHT">{NEXT?<FORM ACTION="{THISURL}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="QUERY" VALUE="{?QUERY}"><INPUT TYPE="HIDDEN" NAME="ORDER" VALUE="{?ORDER}"><INPUT TYPE="HIDDEN" NAME="WHICH_JOBS" VALUE="{?WHICH_JOBS}"><INPUT TYPE="HIDDEN" NAME="FIRST" VALUE="{NEXT}"><INPUT TYPE="SUBMIT" VALUE="次を表示 ▶"></FORM>: }</TD>
+ <TD WIDTH="50%">{PREV?{PREV>0?<FORM ACTION="{THISURL}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="QUERY" VALUE="{?QUERY}"><INPUT TYPE="HIDDEN" NAME="WHICH_JOBS" VALUE="{?WHICH_JOBS}"><INPUT TYPE="HIDDEN" NAME="FIRST" VALUE="0"><INPUT TYPE="SUBMIT" VALUE="◀◀ Show First"></FORM> :}<FORM ACTION="{THISURL}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="QUERY" VALUE="{?QUERY}"><INPUT TYPE="HIDDEN" NAME="WHICH_JOBS" VALUE="{?WHICH_JOBS}"><INPUT TYPE="HIDDEN" NAME="FIRST" VALUE="{PREV}"><INPUT TYPE="SUBMIT" VALUE="◀ 前を表示"></FORM>: }</TD>
+ <TD WIDTH="50%" ALIGN="RIGHT">{NEXT?<FORM ACTION="{THISURL}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="QUERY" VALUE="{?QUERY}"><INPUT TYPE="HIDDEN" NAME="WHICH_JOBS" VALUE="{?WHICH_JOBS}"><INPUT TYPE="HIDDEN" NAME="FIRST" VALUE="{NEXT}"><INPUT TYPE="SUBMIT" VALUE="次を表示 ▶"></FORM>: }
+ {LAST?<FORM ACTION="{THISURL}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="QUERY" VALUE="{?QUERY}"><INPUT TYPE="HIDDEN" NAME="WHICH_JOBS" VALUE="{?WHICH_JOBS}"><INPUT TYPE="HIDDEN" NAME="FIRST" VALUE="{LAST}"><INPUT TYPE="SUBMIT" VALUE="Show Last ▶▶"></FORM>:}</TD>
</TR>
</TABLE>
{#printer_name=0?:
<TABLE CLASS="list" SUMMARY="プリンターの一覧">
<THEAD>
-<TR><TH><A HREF="{THISURL}?QUERY={?QUERY}&WHICH_JOBS={?WHICH_JOBS}&FIRST={FIRST}&ORDER={ORDER=dec?asc:dec}">{ORDER=dec?<SMALL>▲</SMALL> キュー名 <SMALL>▲</SMALL>:<SMALL>▼</SMALL> キュー名 <SMALL>▼</SMALL>}</A></TH><TH>説明</TH><TH>場所</TH><TH>メーカーとモデル</TH><TH>状態</TH></TR>
+<TR><TH>キュー名</TH><TH>説明</TH><TH>場所</TH><TH>メーカーとモデル</TH><TH>状態</TH></TR>
</THEAD>
<TBODY>
{[printer_name]
{#job_id=0?:
<TABLE CLASS="list" SUMMARY="Job List">
<THEAD>
-<TR><TH><A HREF="{THISURL}?QUERY={?QUERY}&WHICH_JOBS={?WHICH_JOBS}&FIRST={FIRST}&ORDER={ORDER=dec?asc:dec}">{ORDER=dec?<SMALL>▲</SMALL> ID <SMALL>▲</SMALL>:<SMALL>▼</SMALL> ID <SMALL>▼</SMALL>}</A></TH><TH>Name</TH><TH>User</TH><TH>Size</TH><TH>Pages</TH><TH>State</TH><TH>Control</TH></TR>
+<TR><TH>ID</TH><TH>Name</TH><TH>User</TH><TH>Size</TH><TH>Pages</TH><TH>State</TH><TH>Control</TH></TR>
</THEAD>
<TBODY>
{[job_id]
<TD>{?job_originating_user_name=?Withheld:{job_originating_user_name}} </TD>
<TD>{job_k_octets}k </TD>
<TD>{job_media_sheets_completed=0?Unknown:{?job_media_sheets_completed}} </TD>
-<TD>{job_state=3?pending since<BR>{time_at_creation}:{job_state=4?held since<BR>{time_at_creation}:
-{job_state=5?processing since<BR>{time_at_processing}:{job_state=6?stopped:
-{job_state=7?canceled at<BR>{time_at_completed}:{job_state=8?aborted:completed at<BR>{time_at_completed}}}}}}} {job_printer_state_message?<BR>
+<TD>{job_state=3?pending since<BR>{?time_at_creation=?Unknown:{time_at_creation}}:{job_state=4?held since<BR>{?time_at_creation=?Unknown:{time_at_creation}}:
+{job_state=5?processing since<BR>{?time_at_processing=?Unknown:{time_at_processing}}:{job_state=6?stopped:
+{job_state=7?canceled at<BR>{?time_at_completed=?Unknown:{time_at_completed}}:{job_state=8?aborted:completed at<BR>{?time_at_completed=?Unknown:{time_at_completed}}}}}}}} {job_printer_state_message?<BR>
<EM>"{job_printer_state_message}"</EM>:}</TD>
<TD>
{job_preserved>0?{job_state>5?
<TABLE CLASS="inset" SUMMARY="Paging Bar">
<TR>
- <TD WIDTH="50%">{PREV?<FORM ACTION="{THISURL}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="QUERY" VALUE="{?QUERY}"><INPUT TYPE="HIDDEN" NAME="ORDER" VALUE="{?ORDER}"><INPUT TYPE="HIDDEN" NAME="WHICH_JOBS" VALUE="{?WHICH_JOBS}"><INPUT TYPE="HIDDEN" NAME="FIRST" VALUE="{PREV}"><INPUT TYPE="SUBMIT" VALUE="◀ Show Previous"></FORM>: }</TD>
- <TD WIDTH="50%" ALIGN="RIGHT">{NEXT?<FORM ACTION="{THISURL}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="QUERY" VALUE="{?QUERY}"><INPUT TYPE="HIDDEN" NAME="ORDER" VALUE="{?ORDER}"><INPUT TYPE="HIDDEN" NAME="WHICH_JOBS" VALUE="{?WHICH_JOBS}"><INPUT TYPE="HIDDEN" NAME="FIRST" VALUE="{NEXT}"><INPUT TYPE="SUBMIT" VALUE="Show Next ▶"></FORM>: }</TD>
+ <TD WIDTH="50%">{PREV?{PREV>0?<FORM ACTION="{THISURL}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="QUERY" VALUE="{?QUERY}"><INPUT TYPE="HIDDEN" NAME="WHICH_JOBS" VALUE="{?WHICH_JOBS}"><INPUT TYPE="HIDDEN" NAME="FIRST" VALUE="0"><INPUT TYPE="SUBMIT" VALUE="◀◀ Show First"></FORM> :}<FORM ACTION="{THISURL}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="QUERY" VALUE="{?QUERY}"><INPUT TYPE="HIDDEN" NAME="WHICH_JOBS" VALUE="{?WHICH_JOBS}"><INPUT TYPE="HIDDEN" NAME="FIRST" VALUE="{PREV}"><INPUT TYPE="SUBMIT" VALUE="◀ Show Previous"></FORM>: }</TD>
+ <TD WIDTH="50%" ALIGN="RIGHT">{NEXT?<FORM ACTION="{THISURL}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="QUERY" VALUE="{?QUERY}"><INPUT TYPE="HIDDEN" NAME="ORDER" VALUE="{?ORDER}"><INPUT TYPE="HIDDEN" NAME="WHICH_JOBS" VALUE="{?WHICH_JOBS}"><INPUT TYPE="HIDDEN" NAME="FIRST" VALUE="{NEXT}"><INPUT TYPE="SUBMIT" VALUE="Show Next ▶"></FORM>: }
+ {LAST?<FORM ACTION="{THISURL}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="QUERY" VALUE="{?QUERY}"><INPUT TYPE="HIDDEN" NAME="WHICH_JOBS" VALUE="{?WHICH_JOBS}"><INPUT TYPE="HIDDEN" NAME="FIRST" VALUE="{LAST}"><INPUT TYPE="SUBMIT" VALUE="Show Last ▶▶"></FORM>:}</TD>
</TR>
</TABLE>
{#printer_name=0?:
<TABLE CLASS="list" SUMMARY="Printer List">
<THEAD>
-<TR><TH><A HREF="{THISURL}?QUERY={?QUERY}&WHICH_JOBS={?WHICH_JOBS}&FIRST={FIRST}&ORDER={ORDER=dec?asc:dec}">{ORDER=dec?<SMALL>▲</SMALL> Queue Name <SMALL>▲</SMALL>:<SMALL>▼</SMALL> Queue Name <SMALL>▼</SMALL>}</A></TH><TH>Description</TH><TH>Location</TH><TH>Make and Model</TH><TH>Status</TH></TR>
+<TR><TH>Queue Name</TH><TH>Description</TH><TH>Location</TH><TH>Make and Model</TH><TH>Status</TH></TR>
</THEAD>
<TBODY>
{[printer_name]
{#printer_name=0?:
<TABLE CLASS="list" SUMMARY="Class List">
<THEAD>
-<TR><TH><A HREF="{THISURL}?QUERY={?QUERY}&WHICH_JOBS={?WHICH_JOBS}&FIRST={FIRST}&ORDER={ORDER=dec?asc:dec}">{ORDER=dec?<SMALL>▲</SMALL> Nome da fila <SMALL>▲</SMALL>:<SMALL>▼</SMALL> Nome da fila <SMALL>▼</SMALL>}</A></TH><TH>Descrição</TH><TH>Localização</TH><TH>Membros</TH><TH>Estado</TH></TR>
+<TR><TH>Nome da fila</TH><TH>Descrição</TH><TH>Localização</TH><TH>Membros</TH><TH>Estado</TH></TR>
</THEAD>
<TBODY>
{[printer_name]
{#job_id=0?:
<TABLE CLASS="list" SUMMARY="Job List">
<THEAD>
-<TR><TH><A HREF="{THISURL}?QUERY={?QUERY}&WHICH_JOBS={?WHICH_JOBS}&FIRST={FIRST}&ORDER={ORDER=dec?asc:dec}">{ORDER=dec?<SMALL>▲</SMALL> ID <SMALL>▲</SMALL>:<SMALL>▼</SMALL> ID <SMALL>▼</SMALL>}</A></TH><TH>Nome</TH><TH>Usuário</TH><TH>Tamanho</TH><TH>Páginas</TH><TH>Estado</TH><TH>Controle</TH></TR>
+<TR><TH>ID</TH><TH>Nome</TH><TH>Usuário</TH><TH>Tamanho</TH><TH>Páginas</TH><TH>Estado</TH><TH>Controle</TH></TR>
</THEAD>
<TBODY>
{[job_id]
<TD>{?job_originating_user_name=?Retido:{job_originating_user_name}} </TD>
<TD>{job_k_octets}k </TD>
<TD>{job_media_sheets_completed=0?Desconhecido:{?job_media_sheets_completed}} </TD>
-<TD>{job_state=3?Pendente desde<BR>{time_at_creation}:{job_state=4?Retido desde<BR>{time_at_creation}:
-{job_state=5?Processando desde<BR>{time_at_processing}:{job_state=6?parado:
-{job_state=7?Cancelado em<BR>{time_at_completed}:{job_state=8?Abortado:Concluído em<BR>{time_at_completed}}}}}}} {job_printer_state_message?<BR>
+<TD>{job_state=3?Pendente desde<BR>{?time_at_creation=?Unknown:{time_at_creation}}:{job_state=4?Retido desde<BR>{?time_at_creation=?Unknown:{time_at_creation}}:
+{job_state=5?Processando desde<BR>{?time_at_processing=?Unknown:{time_at_processing}}:{job_state=6?parado:
+{job_state=7?Cancelado em<BR>{?time_at_completed=?Unknown:{time_at_completed}}:{job_state=8?Abortado:Concluído em<BR>{?time_at_completed=?Unknown:{time_at_completed}}}}}}}} {job_printer_state_message?<BR>
<EM>"{job_printer_state_message}"</EM>:}</TD>
<TD>
{job_preserved>0?{job_state>5?
<TABLE CLASS="inset" SUMMARY="Barra de paginação">
<TR>
- <TD WIDTH="50%">{PREV?<FORM ACTION="{THISURL}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="QUERY" VALUE="{?QUERY}"><INPUT TYPE="HIDDEN" NAME="ORDER" VALUE="{?ORDER}"><INPUT TYPE="HIDDEN" NAME="WHICH_JOBS" VALUE="{?WHICH_JOBS}"><INPUT TYPE="HIDDEN" NAME="FIRST" VALUE="{PREV}"><INPUT TYPE="SUBMIT" VALUE="◀ Mostrar anterior"></FORM>: }</TD>
- <TD WIDTH="50%" ALIGN="RIGHT">{NEXT?<FORM ACTION="{THISURL}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="QUERY" VALUE="{?QUERY}"><INPUT TYPE="HIDDEN" NAME="ORDER" VALUE="{?ORDER}"><INPUT TYPE="HIDDEN" NAME="WHICH_JOBS" VALUE="{?WHICH_JOBS}"><INPUT TYPE="HIDDEN" NAME="FIRST" VALUE="{NEXT}"><INPUT TYPE="SUBMIT" VALUE="Mostrar próximo ▶"></FORM>: }</TD>
+ <TD WIDTH="50%">{PREV?{PREV>0?<FORM ACTION="{THISURL}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="QUERY" VALUE="{?QUERY}"><INPUT TYPE="HIDDEN" NAME="WHICH_JOBS" VALUE="{?WHICH_JOBS}"><INPUT TYPE="HIDDEN" NAME="FIRST" VALUE="0"><INPUT TYPE="SUBMIT" VALUE="◀◀ Show First"></FORM> :}<FORM ACTION="{THISURL}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="QUERY" VALUE="{?QUERY}"><INPUT TYPE="HIDDEN" NAME="WHICH_JOBS" VALUE="{?WHICH_JOBS}"><INPUT TYPE="HIDDEN" NAME="FIRST" VALUE="{PREV}"><INPUT TYPE="SUBMIT" VALUE="◀ Mostrar anterior"></FORM>: }</TD>
+ <TD WIDTH="50%" ALIGN="RIGHT">{NEXT?<FORM ACTION="{THISURL}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="QUERY" VALUE="{?QUERY}"><INPUT TYPE="HIDDEN" NAME="WHICH_JOBS" VALUE="{?WHICH_JOBS}"><INPUT TYPE="HIDDEN" NAME="FIRST" VALUE="{NEXT}"><INPUT TYPE="SUBMIT" VALUE="Mostrar próximo ▶"></FORM>: }
+ {LAST?<FORM ACTION="{THISURL}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="QUERY" VALUE="{?QUERY}"><INPUT TYPE="HIDDEN" NAME="WHICH_JOBS" VALUE="{?WHICH_JOBS}"><INPUT TYPE="HIDDEN" NAME="FIRST" VALUE="{LAST}"><INPUT TYPE="SUBMIT" VALUE="Show Last ▶▶"></FORM>:}</TD>
</TR>
</TABLE>
{#printer_name=0?:
<TABLE CLASS="list" SUMMARY="Lista de impressoras">
<THEAD>
-<TR><TH><A HREF="{THISURL}?QUERY={?QUERY}&WHICH_JOBS={?WHICH_JOBS}&FIRST={FIRST}&ORDER={ORDER=dec?asc:dec}">{ORDER=dec?<SMALL>▲</SMALL> Nome da fila <SMALL>▲</SMALL>:<SMALL>▼</SMALL> Nome da fila <SMALL>▼</SMALL>}</A></TH><TH>Descrição</TH><TH>Localização</TH><TH>Marca e modelo</TH><TH>Estado</TH></TR>
+<TR><TH>Nome da fila</TH><TH>Descrição</TH><TH>Localização</TH><TH>Marca e modelo</TH><TH>Estado</TH></TR>
</THEAD>
<TBODY>
{[printer_name]
{#printer_name=0?:
<TABLE CLASS="list" SUMMARY="Список групп">
<THEAD>
-<TR><TH><A HREF="{THISURL}?QUERY={?QUERY}&WHICH_JOBS={?WHICH_JOBS}&FIRST={FIRST}&ORDER={ORDER=dec?asc:dec}">{ORDER=dec?<SMALL>▲</SMALL> Наименование <SMALL>▲</SMALL>:<SMALL>▼</SMALL> Наименование <SMALL>▼</SMALL>}</A></TH><TH>Описание</TH><TH>Расположение</TH><TH>Состав</TH><TH>Статус</TH></TR>
+<TR><TH>Наименование</TH><TH>Описание</TH><TH>Расположение</TH><TH>Состав</TH><TH>Статус</TH></TR>
</THEAD>
<TBODY>
{[printer_name]
{#job_id=0?:
<TABLE CLASS="list" SUMMARY="Задания">
<THEAD>
-<TR><TH><A HREF="{THISURL}?QUERY={?QUERY}&WHICH_JOBS={?WHICH_JOBS}&FIRST={FIRST}&ORDER={ORDER=dec?asc:dec}">{ORDER=dec?<SMALL>▲</SMALL> Номер <SMALL>▲</SMALL>:<SMALL>▼</SMALL> ID <SMALL>▼</SMALL>}</A></TH><TH>Название</TH><TH>Пользователь</TH><TH>Размер</TH><TH>Страниц</TH><TH>Статус</TH><TH>Управление</TH></TR>
+<TR><TH>Номер</TH><TH>Название</TH><TH>Пользователь</TH><TH>Размер</TH><TH>Страниц</TH><TH>Статус</TH><TH>Управление</TH></TR>
</THEAD>
<TBODY>
{[job_id]
<TD>{?job_originating_user_name=?Приостановлено пользователем:{job_originating_user_name}} </TD>
<TD>{job_k_octets}k </TD>
<TD>{job_media_sheets_completed=0?Неизвестно:{?job_media_sheets_completed}} </TD>
-<TD>{job_state=3?В очереди<BR>{time_at_creation}:{job_state=4?Приостановлено с<BR>{time_at_creation}:
-{job_state=5?Создано<BR>{time_at_processing}:{job_state=6?Остановлено:
-{job_state=7?Отменено<BR>{time_at_completed}:{job_state=8?Прервано:Завершено<BR>{time_at_completed}}}}}}} {job_printer_state_message?<BR>
+<TD>{job_state=3?В очереди<BR>{?time_at_creation=?Unknown:{time_at_creation}}:{job_state=4?Приостановлено с<BR>{?time_at_creation=?Unknown:{time_at_creation}}:
+{job_state=5?Создано<BR>{?time_at_processing=?Unknown:{time_at_processing}}:{job_state=6?Остановлено:
+{job_state=7?Отменено<BR>{?time_at_completed=?Unknown:{time_at_completed}}:{job_state=8?Прервано:Завершено<BR>{?time_at_completed=?Unknown:{time_at_completed}}}}}}}} {job_printer_state_message?<BR>
<EM>"{job_printer_state_message}"</EM>:}</TD>
<TD>
{job_preserved>0?{job_state>5?
<TABLE CLASS="inset" SUMMARY="Просмотр по страницам">
<TR>
- <TD WIDTH="50%">{PREV?<FORM ACTION="{THISURL}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="QUERY" VALUE="{?QUERY}"><INPUT TYPE="HIDDEN" NAME="ORDER" VALUE="{?ORDER}"><INPUT TYPE="HIDDEN" NAME="WHICH_JOBS" VALUE="{?WHICH_JOBS}"><INPUT TYPE="HIDDEN" NAME="FIRST" VALUE="{PREV}"><INPUT TYPE="SUBMIT" VALUE="◀ Предыдущая"></FORM>: }</TD>
- <TD WIDTH="50%" ALIGN="RIGHT">{NEXT?<FORM ACTION="{THISURL}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="QUERY" VALUE="{?QUERY}"><INPUT TYPE="HIDDEN" NAME="ORDER" VALUE="{?ORDER}"><INPUT TYPE="HIDDEN" NAME="WHICH_JOBS" VALUE="{?WHICH_JOBS}"><INPUT TYPE="HIDDEN" NAME="FIRST" VALUE="{NEXT}"><INPUT TYPE="SUBMIT" VALUE="Следующая ▶"></FORM>: }</TD>
+ <TD WIDTH="50%">{PREV?{PREV>0?<FORM ACTION="{THISURL}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="QUERY" VALUE="{?QUERY}"><INPUT TYPE="HIDDEN" NAME="WHICH_JOBS" VALUE="{?WHICH_JOBS}"><INPUT TYPE="HIDDEN" NAME="FIRST" VALUE="0"><INPUT TYPE="SUBMIT" VALUE="◀◀ Show First"></FORM> :}<FORM ACTION="{THISURL}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="QUERY" VALUE="{?QUERY}"><INPUT TYPE="HIDDEN" NAME="WHICH_JOBS" VALUE="{?WHICH_JOBS}"><INPUT TYPE="HIDDEN" NAME="FIRST" VALUE="{PREV}"><INPUT TYPE="SUBMIT" VALUE="◀ Предыдущая"></FORM>: }</TD>
+ <TD WIDTH="50%" ALIGN="RIGHT">{NEXT?<FORM ACTION="{THISURL}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="QUERY" VALUE="{?QUERY}"><INPUT TYPE="HIDDEN" NAME="WHICH_JOBS" VALUE="{?WHICH_JOBS}"><INPUT TYPE="HIDDEN" NAME="FIRST" VALUE="{NEXT}"><INPUT TYPE="SUBMIT" VALUE="Следующая ▶"></FORM>: }
+ {LAST?<FORM ACTION="{THISURL}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="QUERY" VALUE="{?QUERY}"><INPUT TYPE="HIDDEN" NAME="WHICH_JOBS" VALUE="{?WHICH_JOBS}"><INPUT TYPE="HIDDEN" NAME="FIRST" VALUE="{LAST}"><INPUT TYPE="SUBMIT" VALUE="Show Last ▶▶"></FORM>:}</TD>
</TR>
</TABLE>
{#printer_name=0?:
<TABLE CLASS="list" SUMMARY="Список принтеров">
<THEAD>
-<TR><TH><A HREF="{THISURL}?QUERY={?QUERY}&WHICH_JOBS={?WHICH_JOBS}&FIRST={FIRST}&ORDER={ORDER=dec?asc:dec}">{ORDER=dec?<SMALL>▲</SMALL> Наименование <SMALL>▲</SMALL>:<SMALL>▼</SMALL> Наименование <SMALL>▼</SMALL>}</A></TH><TH>Описание</TH><TH>Расположение</TH><TH>Драйвер</TH><TH>Статус</TH></TR>
+<TR><TH>Наименование</TH><TH>Описание</TH><TH>Расположение</TH><TH>Драйвер</TH><TH>Статус</TH></TR>
</THEAD>
<TBODY>
{[printer_name]
# Perform the complete set of IPP compliance tests specified in the
# CUPS Software Test Plan.
#
-# Copyright 2007-2015 by Apple Inc.
+# Copyright 2007-2016 by Apple Inc.
# Copyright 1997-2007 by Easy Software Products, all rights reserved.
#
# These coded instructions, statements, and computer programs are the
Browsing Off
Listen localhost:$port
Listen $BASE/sock
+PassEnv DYLD_LIBRARY_PATH
+PassEnv LD_LIBRARY_PATH
+PassEnv LD_PRELOAD
PassEnv LOCALEDIR
-PassEnv DYLD_INSERT_LIBRARIES
+PassEnv SHLIB_PATH
MaxSubscriptions 3
MaxLogSize 0
AccessLogLevel actions
echo ""
if test `uname` = Darwin -a "x$VALGRIND" = x; then
- DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib MallocStackLogging=1 ../scheduler/cupsd -c $BASE/cupsd.conf -f >$BASE/log/debug_log 2>&1 &
+ DYLD_INSERT_LIBRARIES="/usr/lib/libgmalloc.dylib" MallocStackLogging=1 ../scheduler/cupsd -c $BASE/cupsd.conf -f >$BASE/log/debug_log 2>&1 &
else
$VALGRIND ../scheduler/cupsd -c $BASE/cupsd.conf -f >$BASE/log/debug_log 2>&1 &
fi
-README - CUPS v1.7b1 - 2013-04-18
----------------------------------
+README - CUPS on Windows - 2016-05-13
+-------------------------------------
-INTRODUCTION
-
- This package includes the cupstestppd and ipptool utilities, CUPS API
- libraries libcups2.dll and libcupsimage2.dll, and the import libraries and
- headers needed to develop Windows applications that use the CUPS API to
- communicate with CUPS and other IPP services.
-
- See the file "IPPTOOL.txt" for instructions on using the ipptool utility.
-
-
-LEGAL STUFF
-
- CUPS is Copyright 2007-2013 by Apple Inc. CUPS and the CUPS logo are
- trademarks of Apple Inc.
-
- The MD5 Digest code is Copyright 1999 Aladdin Enterprises.
-
- This software is based in part on the work of the Independent JPEG Group.
-
- CUPS is provided under the terms of version 2 of the GNU General Public
- License and GNU Library General Public License. This program is distributed
- in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See the "doc/help/license.html" or "LICENSE.txt" files for more information.
+This directory contains Visual Studio project and solution files for building
+the CUPS library and cupstestppd, ippfind, ippserver, and ipptool utilities on
+Windows.
/* #undef HAVE_SCDYNAMICSTORECOPYCOMPUTERNAME */
+/*
+ * Do we have the getgrouplist() function?
+ */
+
+#undef HAVE_GETGROUPLIST
+
+
/*
* Do we have OS X 10.4's mbr_XXX functions?
*/
{CB4AA6F2-3E84-45BE-B505-95CD375E8BE3} = {CB4AA6F2-3E84-45BE-B505-95CD375E8BE3}\r
EndProjectSection\r
EndProject\r
-Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "sw-ippeveselfcert10", "sw-ippeveselfcert10.vdproj", "{7F6DD7F5-7DCC-4C7A-8647-E253E4E00A37}"\r
-EndProject\r
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ippserver", "ippserver.vcproj", "{82A03BC7-0746-4B85-8908-3C7A3FAA58A9}"\r
ProjectSection(ProjectDependencies) = postProject\r
{CB4AA6F2-3E84-45BE-B505-95CD375E8BE3} = {CB4AA6F2-3E84-45BE-B505-95CD375E8BE3}\r
+++ /dev/null
-"DeployProject"\r
-{\r
-"VSVersion" = "3:800"\r
-"ProjectType" = "8:{978C614F-708E-4E1A-B201-565925725DBA}"\r
-"IsWebType" = "8:FALSE"\r
-"ProjectName" = "8:sw-ippeveselfcert10"\r
-"LanguageId" = "3:1033"\r
-"CodePage" = "3:1252"\r
-"UILanguageId" = "3:1033"\r
-"SccProjectName" = "8:"\r
-"SccLocalPath" = "8:"\r
-"SccAuxPath" = "8:"\r
-"SccProvider" = "8:"\r
- "Hierarchy"\r
- {\r
- "Entry"\r
- {\r
- "MsmKey" = "8:_156E3B06B7D14775B28242360FB7D1A0"\r
- "OwnerKey" = "8:_UNDEFINED"\r
- "MsmSig" = "8:_UNDEFINED"\r
- }\r
- "Entry"\r
- {\r
- "MsmKey" = "8:_1A1324305D78463BBFC62269C56DCF0B"\r
- "OwnerKey" = "8:_UNDEFINED"\r
- "MsmSig" = "8:_UNDEFINED"\r
- }\r
- "Entry"\r
- {\r
- "MsmKey" = "8:_1BCBABF5693841AE92515645BB7765F4"\r
- "OwnerKey" = "8:_UNDEFINED"\r
- "MsmSig" = "8:_UNDEFINED"\r
- }\r
- "Entry"\r
- {\r
- "MsmKey" = "8:_1DBDCFABB8DF28E5F75E41EDAE4BF6BE"\r
- "OwnerKey" = "8:_EA282F32A10B4ED1A81AA6133B997C6A"\r
- "MsmSig" = "8:_UNDEFINED"\r
- }\r
- "Entry"\r
- {\r
- "MsmKey" = "8:_27AB74FFFBC7436B9EBC6AE23968CFCC"\r
- "OwnerKey" = "8:_UNDEFINED"\r
- "MsmSig" = "8:_UNDEFINED"\r
- }\r
- "Entry"\r
- {\r
- "MsmKey" = "8:_299D5816FF7142F3B2791685551AD1DC"\r
- "OwnerKey" = "8:_A1CB27EFF4094C39B58D0BE5A272DF1A"\r
- "MsmSig" = "8:_UNDEFINED"\r
- }\r
- "Entry"\r
- {\r
- "MsmKey" = "8:_43D276E6E3054544A6A9828BE66519CD"\r
- "OwnerKey" = "8:_UNDEFINED"\r
- "MsmSig" = "8:_UNDEFINED"\r
- }\r
- "Entry"\r
- {\r
- "MsmKey" = "8:_466C1CF41795452A8B76425F8D05D8B8"\r
- "OwnerKey" = "8:_UNDEFINED"\r
- "MsmSig" = "8:_UNDEFINED"\r
- }\r
- "Entry"\r
- {\r
- "MsmKey" = "8:_58DC0E72F0944BEFB927AED718CD1660"\r
- "OwnerKey" = "8:_UNDEFINED"\r
- "MsmSig" = "8:_UNDEFINED"\r
- }\r
- "Entry"\r
- {\r
- "MsmKey" = "8:_592FC984DBFD494D9FB7DFFEA35AD7A5"\r
- "OwnerKey" = "8:_UNDEFINED"\r
- "MsmSig" = "8:_UNDEFINED"\r
- }\r
- "Entry"\r
- {\r
- "MsmKey" = "8:_842C04D73EBC4F5DBC2FD58D5B98D5D1"\r
- "OwnerKey" = "8:_UNDEFINED"\r
- "MsmSig" = "8:_UNDEFINED"\r
- }\r
- "Entry"\r
- {\r
- "MsmKey" = "8:_965005559A264140806149D54E2243BB"\r
- "OwnerKey" = "8:_UNDEFINED"\r
- "MsmSig" = "8:_UNDEFINED"\r
- }\r
- "Entry"\r
- {\r
- "MsmKey" = "8:_9967519E7058965D4C7DEF47EB39CC50"\r
- "OwnerKey" = "8:_EA282F32A10B4ED1A81AA6133B997C6A"\r
- "MsmSig" = "8:_UNDEFINED"\r
- }\r
- "Entry"\r
- {\r
- "MsmKey" = "8:_9CB71023ADF84278A4A5EBC398F6C9F3"\r
- "OwnerKey" = "8:_UNDEFINED"\r
- "MsmSig" = "8:_UNDEFINED"\r
- }\r
- "Entry"\r
- {\r
- "MsmKey" = "8:_9FBF78D7B89EEA843380D5F10E1954D7"\r
- "OwnerKey" = "8:_EA282F32A10B4ED1A81AA6133B997C6A"\r
- "MsmSig" = "8:_UNDEFINED"\r
- }\r
- "Entry"\r
- {\r
- "MsmKey" = "8:_A1CB27EFF4094C39B58D0BE5A272DF1A"\r
- "OwnerKey" = "8:_EA282F32A10B4ED1A81AA6133B997C6A"\r
- "MsmSig" = "8:_UNDEFINED"\r
- }\r
- "Entry"\r
- {\r
- "MsmKey" = "8:_A1CB27EFF4094C39B58D0BE5A272DF1A"\r
- "OwnerKey" = "8:_58DC0E72F0944BEFB927AED718CD1660"\r
- "MsmSig" = "8:_UNDEFINED"\r
- }\r
- "Entry"\r
- {\r
- "MsmKey" = "8:_A1CB27EFF4094C39B58D0BE5A272DF1A"\r
- "OwnerKey" = "8:_466C1CF41795452A8B76425F8D05D8B8"\r
- "MsmSig" = "8:_UNDEFINED"\r
- }\r
- "Entry"\r
- {\r
- "MsmKey" = "8:_A1CB27EFF4094C39B58D0BE5A272DF1A"\r
- "OwnerKey" = "8:_E97571D3FBE048DABDC59B37762D800F"\r
- "MsmSig" = "8:_UNDEFINED"\r
- }\r
- "Entry"\r
- {\r
- "MsmKey" = "8:_A1CB27EFF4094C39B58D0BE5A272DF1A"\r
- "OwnerKey" = "8:_D02EB13951314EFD9C539150EF8E53B8"\r
- "MsmSig" = "8:_UNDEFINED"\r
- }\r
- "Entry"\r
- {\r
- "MsmKey" = "8:_A9EA3BF89F284AB4853F0682CE277275"\r
- "OwnerKey" = "8:_UNDEFINED"\r
- "MsmSig" = "8:_UNDEFINED"\r
- }\r
- "Entry"\r
- {\r
- "MsmKey" = "8:_B7D835B019744E61A7CC37B57B38694E"\r
- "OwnerKey" = "8:_UNDEFINED"\r
- "MsmSig" = "8:_UNDEFINED"\r
- }\r
- "Entry"\r
- {\r
- "MsmKey" = "8:_BD5B70C103EF41D9A30CF249D2B93CEB"\r
- "OwnerKey" = "8:_UNDEFINED"\r
- "MsmSig" = "8:_UNDEFINED"\r
- }\r
- "Entry"\r
- {\r
- "MsmKey" = "8:_C430646D6E7C4CBDA84F951AE95EB76F"\r
- "OwnerKey" = "8:_UNDEFINED"\r
- "MsmSig" = "8:_UNDEFINED"\r
- }\r
- "Entry"\r
- {\r
- "MsmKey" = "8:_D02EB13951314EFD9C539150EF8E53B8"\r
- "OwnerKey" = "8:_UNDEFINED"\r
- "MsmSig" = "8:_UNDEFINED"\r
- }\r
- "Entry"\r
- {\r
- "MsmKey" = "8:_D219587BACAC4D5FB4C8010900A781AD"\r
- "OwnerKey" = "8:_UNDEFINED"\r
- "MsmSig" = "8:_UNDEFINED"\r
- }\r
- "Entry"\r
- {\r
- "MsmKey" = "8:_D5CD9D9AB1644688A1D54B1589BDF724"\r
- "OwnerKey" = "8:_UNDEFINED"\r
- "MsmSig" = "8:_UNDEFINED"\r
- }\r
- "Entry"\r
- {\r
- "MsmKey" = "8:_E3C6C5A7FDD94965B68960844461D5EA"\r
- "OwnerKey" = "8:_UNDEFINED"\r
- "MsmSig" = "8:_UNDEFINED"\r
- }\r
- "Entry"\r
- {\r
- "MsmKey" = "8:_E5E464C7DD97439B929E1EA1844F1FF0"\r
- "OwnerKey" = "8:_UNDEFINED"\r
- "MsmSig" = "8:_UNDEFINED"\r
- }\r
- "Entry"\r
- {\r
- "MsmKey" = "8:_E97571D3FBE048DABDC59B37762D800F"\r
- "OwnerKey" = "8:_UNDEFINED"\r
- "MsmSig" = "8:_UNDEFINED"\r
- }\r
- "Entry"\r
- {\r
- "MsmKey" = "8:_EA282F32A10B4ED1A81AA6133B997C6A"\r
- "OwnerKey" = "8:_UNDEFINED"\r
- "MsmSig" = "8:_UNDEFINED"\r
- }\r
- "Entry"\r
- {\r
- "MsmKey" = "8:_F22F5380A6E14A43A15A452C7C6F6C07"\r
- "OwnerKey" = "8:_UNDEFINED"\r
- "MsmSig" = "8:_UNDEFINED"\r
- }\r
- }\r
- "Configurations"\r
- {\r
- "Debug"\r
- {\r
- "DisplayName" = "8:Debug"\r
- "IsDebugOnly" = "11:TRUE"\r
- "IsReleaseOnly" = "11:FALSE"\r
- "OutputFilename" = "8:sw-ippeveselfcert10-windows.msi"\r
- "PackageFilesAs" = "3:2"\r
- "PackageFileSize" = "3:-2147483648"\r
- "CabType" = "3:1"\r
- "Compression" = "3:3"\r
- "SignOutput" = "11:FALSE"\r
- "CertificateFile" = "8:"\r
- "PrivateKeyFile" = "8:"\r
- "TimeStampServer" = "8:"\r
- "InstallerBootstrapper" = "3:2"\r
- "BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}"\r
- {\r
- "Enabled" = "11:TRUE"\r
- "PromptEnabled" = "11:TRUE"\r
- "PrerequisitesLocation" = "2:1"\r
- "Url" = "8:"\r
- "ComponentsUrl" = "8:"\r
- "Items"\r
- {\r
- "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.Net.Framework.3.5.SP1"\r
- {\r
- "Name" = "8:.NET Framework 3.5 SP1"\r
- "ProductCode" = "8:Microsoft.Net.Framework.3.5.SP1"\r
- }\r
- "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.Windows.Installer.3.1"\r
- {\r
- "Name" = "8:Windows Installer 3.1"\r
- "ProductCode" = "8:Microsoft.Windows.Installer.3.1"\r
- }\r
- }\r
- }\r
- }\r
- "Release"\r
- {\r
- "DisplayName" = "8:Release"\r
- "IsDebugOnly" = "11:FALSE"\r
- "IsReleaseOnly" = "11:TRUE"\r
- "OutputFilename" = "8:ipptool-windows.msi"\r
- "PackageFilesAs" = "3:2"\r
- "PackageFileSize" = "3:-2147483648"\r
- "CabType" = "3:1"\r
- "Compression" = "3:3"\r
- "SignOutput" = "11:FALSE"\r
- "CertificateFile" = "8:"\r
- "PrivateKeyFile" = "8:"\r
- "TimeStampServer" = "8:"\r
- "InstallerBootstrapper" = "3:2"\r
- "BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}"\r
- {\r
- "Enabled" = "11:TRUE"\r
- "PromptEnabled" = "11:TRUE"\r
- "PrerequisitesLocation" = "2:1"\r
- "Url" = "8:"\r
- "ComponentsUrl" = "8:"\r
- "Items"\r
- {\r
- "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.Net.Framework.3.5.SP1"\r
- {\r
- "Name" = "8:.NET Framework 3.5 SP1"\r
- "ProductCode" = "8:Microsoft.Net.Framework.3.5.SP1"\r
- }\r
- "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.Windows.Installer.3.1"\r
- {\r
- "Name" = "8:Windows Installer 3.1"\r
- "ProductCode" = "8:Microsoft.Windows.Installer.3.1"\r
- }\r
- }\r
- }\r
- }\r
- }\r
- "Deployable"\r
- {\r
- "CustomAction"\r
- {\r
- }\r
- "DefaultFeature"\r
- {\r
- "Name" = "8:DefaultFeature"\r
- "Title" = "8:"\r
- "Description" = "8:"\r
- }\r
- "ExternalPersistence"\r
- {\r
- "LaunchCondition"\r
- {\r
- }\r
- }\r
- "File"\r
- {\r
- "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_156E3B06B7D14775B28242360FB7D1A0"\r
- {\r
- "SourcePath" = "8:..\\everywhere\\document-tests.bat"\r
- "TargetName" = "8:document-tests.bat"\r
- "Tag" = "8:"\r
- "Folder" = "8:_FFAEDEA1D38D4088A03FDD6F17E2CA5D"\r
- "Condition" = "8:"\r
- "Transitive" = "11:FALSE"\r
- "Vital" = "11:TRUE"\r
- "ReadOnly" = "11:FALSE"\r
- "Hidden" = "11:FALSE"\r
- "System" = "11:FALSE"\r
- "Permanent" = "11:FALSE"\r
- "SharedLegacy" = "11:FALSE"\r
- "PackageAs" = "3:1"\r
- "Register" = "3:1"\r
- "Exclude" = "11:FALSE"\r
- "IsDependency" = "11:FALSE"\r
- "IsolateTo" = "8:"\r
- }\r
- "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_1A1324305D78463BBFC62269C56DCF0B"\r
- {\r
- "SourcePath" = "8:..\\doc\\help\\man-ipptoolfile.html"\r
- "TargetName" = "8:man-ipptoolfile.html"\r
- "Tag" = "8:"\r
- "Folder" = "8:_26743E387598422398CF503F7478F9E1"\r
- "Condition" = "8:"\r
- "Transitive" = "11:FALSE"\r
- "Vital" = "11:TRUE"\r
- "ReadOnly" = "11:FALSE"\r
- "Hidden" = "11:FALSE"\r
- "System" = "11:FALSE"\r
- "Permanent" = "11:FALSE"\r
- "SharedLegacy" = "11:FALSE"\r
- "PackageAs" = "3:1"\r
- "Register" = "3:1"\r
- "Exclude" = "11:FALSE"\r
- "IsDependency" = "11:FALSE"\r
- "IsolateTo" = "8:"\r
- }\r
- "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_1BCBABF5693841AE92515645BB7765F4"\r
- {\r
- "SourcePath" = "8:..\\everywhere\\man-ippserver.html"\r
- "TargetName" = "8:man-ippserver.html"\r
- "Tag" = "8:"\r
- "Folder" = "8:_26743E387598422398CF503F7478F9E1"\r
- "Condition" = "8:"\r
- "Transitive" = "11:FALSE"\r
- "Vital" = "11:TRUE"\r
- "ReadOnly" = "11:FALSE"\r
- "Hidden" = "11:FALSE"\r
- "System" = "11:FALSE"\r
- "Permanent" = "11:FALSE"\r
- "SharedLegacy" = "11:FALSE"\r
- "PackageAs" = "3:1"\r
- "Register" = "3:1"\r
- "Exclude" = "11:FALSE"\r
- "IsDependency" = "11:FALSE"\r
- "IsolateTo" = "8:"\r
- }\r
- "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_1DBDCFABB8DF28E5F75E41EDAE4BF6BE"\r
- {\r
- "SourcePath" = "8:zlibwapi.dll"\r
- "TargetName" = "8:zlibwapi.dll"\r
- "Tag" = "8:"\r
- "Folder" = "8:_FFAEDEA1D38D4088A03FDD6F17E2CA5D"\r
- "Condition" = "8:"\r
- "Transitive" = "11:FALSE"\r
- "Vital" = "11:TRUE"\r
- "ReadOnly" = "11:FALSE"\r
- "Hidden" = "11:FALSE"\r
- "System" = "11:FALSE"\r
- "Permanent" = "11:FALSE"\r
- "SharedLegacy" = "11:FALSE"\r
- "PackageAs" = "3:1"\r
- "Register" = "3:1"\r
- "Exclude" = "11:FALSE"\r
- "IsDependency" = "11:TRUE"\r
- "IsolateTo" = "8:"\r
- }\r
- "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_27AB74FFFBC7436B9EBC6AE23968CFCC"\r
- {\r
- "SourcePath" = "8:..\\everywhere\\README.txt"\r
- "TargetName" = "8:README.txt"\r
- "Tag" = "8:"\r
- "Folder" = "8:_FFAEDEA1D38D4088A03FDD6F17E2CA5D"\r
- "Condition" = "8:"\r
- "Transitive" = "11:FALSE"\r
- "Vital" = "11:TRUE"\r
- "ReadOnly" = "11:FALSE"\r
- "Hidden" = "11:FALSE"\r
- "System" = "11:FALSE"\r
- "Permanent" = "11:FALSE"\r
- "SharedLegacy" = "11:FALSE"\r
- "PackageAs" = "3:1"\r
- "Register" = "3:1"\r
- "Exclude" = "11:FALSE"\r
- "IsDependency" = "11:FALSE"\r
- "IsolateTo" = "8:"\r
- }\r
- "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_43D276E6E3054544A6A9828BE66519CD"\r
- {\r
- "SourcePath" = "8:..\\test\\printer.png"\r
- "TargetName" = "8:printer.png"\r
- "Tag" = "8:"\r
- "Folder" = "8:_FFAEDEA1D38D4088A03FDD6F17E2CA5D"\r
- "Condition" = "8:"\r
- "Transitive" = "11:FALSE"\r
- "Vital" = "11:TRUE"\r
- "ReadOnly" = "11:FALSE"\r
- "Hidden" = "11:FALSE"\r
- "System" = "11:FALSE"\r
- "Permanent" = "11:FALSE"\r
- "SharedLegacy" = "11:FALSE"\r
- "PackageAs" = "3:1"\r
- "Register" = "3:1"\r
- "Exclude" = "11:FALSE"\r
- "IsDependency" = "11:FALSE"\r
- "IsolateTo" = "8:"\r
- }\r
- "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_592FC984DBFD494D9FB7DFFEA35AD7A5"\r
- {\r
- "SourcePath" = "8:..\\doc\\help\\man-ippfind.html"\r
- "TargetName" = "8:man-ippfind.html"\r
- "Tag" = "8:"\r
- "Folder" = "8:_26743E387598422398CF503F7478F9E1"\r
- "Condition" = "8:"\r
- "Transitive" = "11:FALSE"\r
- "Vital" = "11:TRUE"\r
- "ReadOnly" = "11:FALSE"\r
- "Hidden" = "11:FALSE"\r
- "System" = "11:FALSE"\r
- "Permanent" = "11:FALSE"\r
- "SharedLegacy" = "11:FALSE"\r
- "PackageAs" = "3:1"\r
- "Register" = "3:1"\r
- "Exclude" = "11:FALSE"\r
- "IsDependency" = "11:FALSE"\r
- "IsolateTo" = "8:"\r
- }\r
- "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_842C04D73EBC4F5DBC2FD58D5B98D5D1"\r
- {\r
- "SourcePath" = "8:..\\test\\document-a4.pdf"\r
- "TargetName" = "8:document-a4.pdf"\r
- "Tag" = "8:"\r
- "Folder" = "8:_EB00D0298C7E441EBD0257AC04FB3560"\r
- "Condition" = "8:"\r
- "Transitive" = "11:FALSE"\r
- "Vital" = "11:TRUE"\r
- "ReadOnly" = "11:FALSE"\r
- "Hidden" = "11:FALSE"\r
- "System" = "11:FALSE"\r
- "Permanent" = "11:FALSE"\r
- "SharedLegacy" = "11:FALSE"\r
- "PackageAs" = "3:1"\r
- "Register" = "3:1"\r
- "Exclude" = "11:FALSE"\r
- "IsDependency" = "11:FALSE"\r
- "IsolateTo" = "8:"\r
- }\r
- "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_965005559A264140806149D54E2243BB"\r
- {\r
- "SourcePath" = "8:..\\everywhere\\bonjour-access-tests.test"\r
- "TargetName" = "8:bonjour-access-tests.test"\r
- "Tag" = "8:"\r
- "Folder" = "8:_EB00D0298C7E441EBD0257AC04FB3560"\r
- "Condition" = "8:"\r
- "Transitive" = "11:FALSE"\r
- "Vital" = "11:TRUE"\r
- "ReadOnly" = "11:FALSE"\r
- "Hidden" = "11:FALSE"\r
- "System" = "11:FALSE"\r
- "Permanent" = "11:FALSE"\r
- "SharedLegacy" = "11:FALSE"\r
- "PackageAs" = "3:1"\r
- "Register" = "3:1"\r
- "Exclude" = "11:FALSE"\r
- "IsDependency" = "11:FALSE"\r
- "IsolateTo" = "8:"\r
- }\r
- "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_9967519E7058965D4C7DEF47EB39CC50"\r
- {\r
- "SourcePath" = "8:CRYPT32.dll"\r
- "TargetName" = "8:CRYPT32.dll"\r
- "Tag" = "8:"\r
- "Folder" = "8:_FFAEDEA1D38D4088A03FDD6F17E2CA5D"\r
- "Condition" = "8:"\r
- "Transitive" = "11:FALSE"\r
- "Vital" = "11:TRUE"\r
- "ReadOnly" = "11:FALSE"\r
- "Hidden" = "11:FALSE"\r
- "System" = "11:FALSE"\r
- "Permanent" = "11:FALSE"\r
- "SharedLegacy" = "11:FALSE"\r
- "PackageAs" = "3:1"\r
- "Register" = "3:1"\r
- "Exclude" = "11:FALSE"\r
- "IsDependency" = "11:TRUE"\r
- "IsolateTo" = "8:"\r
- }\r
- "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_9CB71023ADF84278A4A5EBC398F6C9F3"\r
- {\r
- "SourcePath" = "8:..\\everywhere\\bonjour-tests.bat"\r
- "TargetName" = "8:bonjour-tests.bat"\r
- "Tag" = "8:"\r
- "Folder" = "8:_FFAEDEA1D38D4088A03FDD6F17E2CA5D"\r
- "Condition" = "8:"\r
- "Transitive" = "11:FALSE"\r
- "Vital" = "11:TRUE"\r
- "ReadOnly" = "11:FALSE"\r
- "Hidden" = "11:FALSE"\r
- "System" = "11:FALSE"\r
- "Permanent" = "11:FALSE"\r
- "SharedLegacy" = "11:FALSE"\r
- "PackageAs" = "3:1"\r
- "Register" = "3:1"\r
- "Exclude" = "11:FALSE"\r
- "IsDependency" = "11:FALSE"\r
- "IsolateTo" = "8:"\r
- }\r
- "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_9FBF78D7B89EEA843380D5F10E1954D7"\r
- {\r
- "SourcePath" = "8:Secur32.dll"\r
- "TargetName" = "8:Secur32.dll"\r
- "Tag" = "8:"\r
- "Folder" = "8:_FFAEDEA1D38D4088A03FDD6F17E2CA5D"\r
- "Condition" = "8:"\r
- "Transitive" = "11:FALSE"\r
- "Vital" = "11:TRUE"\r
- "ReadOnly" = "11:FALSE"\r
- "Hidden" = "11:FALSE"\r
- "System" = "11:FALSE"\r
- "Permanent" = "11:FALSE"\r
- "SharedLegacy" = "11:FALSE"\r
- "PackageAs" = "3:1"\r
- "Register" = "3:1"\r
- "Exclude" = "11:FALSE"\r
- "IsDependency" = "11:TRUE"\r
- "IsolateTo" = "8:"\r
- }\r
- "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_A9EA3BF89F284AB4853F0682CE277275"\r
- {\r
- "SourcePath" = "8:..\\everywhere\\bonjour-value-tests.test"\r
- "TargetName" = "8:bonjour-value-tests.test"\r
- "Tag" = "8:"\r
- "Folder" = "8:_EB00D0298C7E441EBD0257AC04FB3560"\r
- "Condition" = "8:"\r
- "Transitive" = "11:FALSE"\r
- "Vital" = "11:TRUE"\r
- "ReadOnly" = "11:FALSE"\r
- "Hidden" = "11:FALSE"\r
- "System" = "11:FALSE"\r
- "Permanent" = "11:FALSE"\r
- "SharedLegacy" = "11:FALSE"\r
- "PackageAs" = "3:1"\r
- "Register" = "3:1"\r
- "Exclude" = "11:FALSE"\r
- "IsDependency" = "11:FALSE"\r
- "IsolateTo" = "8:"\r
- }\r
- "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_B7D835B019744E61A7CC37B57B38694E"\r
- {\r
- "SourcePath" = "8:..\\everywhere\\document-tests.test"\r
- "TargetName" = "8:document-tests.test"\r
- "Tag" = "8:"\r
- "Folder" = "8:_EB00D0298C7E441EBD0257AC04FB3560"\r
- "Condition" = "8:"\r
- "Transitive" = "11:FALSE"\r
- "Vital" = "11:TRUE"\r
- "ReadOnly" = "11:FALSE"\r
- "Hidden" = "11:FALSE"\r
- "System" = "11:FALSE"\r
- "Permanent" = "11:FALSE"\r
- "SharedLegacy" = "11:FALSE"\r
- "PackageAs" = "3:1"\r
- "Register" = "3:1"\r
- "Exclude" = "11:FALSE"\r
- "IsDependency" = "11:FALSE"\r
- "IsolateTo" = "8:"\r
- }\r
- "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_BD5B70C103EF41D9A30CF249D2B93CEB"\r
- {\r
- "SourcePath" = "8:setdebug.bat"\r
- "TargetName" = "8:setdebug.bat"\r
- "Tag" = "8:"\r
- "Folder" = "8:_FFAEDEA1D38D4088A03FDD6F17E2CA5D"\r
- "Condition" = "8:"\r
- "Transitive" = "11:FALSE"\r
- "Vital" = "11:TRUE"\r
- "ReadOnly" = "11:FALSE"\r
- "Hidden" = "11:FALSE"\r
- "System" = "11:FALSE"\r
- "Permanent" = "11:FALSE"\r
- "SharedLegacy" = "11:FALSE"\r
- "PackageAs" = "3:1"\r
- "Register" = "3:1"\r
- "Exclude" = "11:FALSE"\r
- "IsDependency" = "11:FALSE"\r
- "IsolateTo" = "8:"\r
- }\r
- "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_C430646D6E7C4CBDA84F951AE95EB76F"\r
- {\r
- "SourcePath" = "8:..\\test\\color.jpg"\r
- "TargetName" = "8:color.jpg"\r
- "Tag" = "8:"\r
- "Folder" = "8:_EB00D0298C7E441EBD0257AC04FB3560"\r
- "Condition" = "8:"\r
- "Transitive" = "11:FALSE"\r
- "Vital" = "11:TRUE"\r
- "ReadOnly" = "11:FALSE"\r
- "Hidden" = "11:FALSE"\r
- "System" = "11:FALSE"\r
- "Permanent" = "11:FALSE"\r
- "SharedLegacy" = "11:FALSE"\r
- "PackageAs" = "3:1"\r
- "Register" = "3:1"\r
- "Exclude" = "11:FALSE"\r
- "IsDependency" = "11:FALSE"\r
- "IsolateTo" = "8:"\r
- }\r
- "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_D219587BACAC4D5FB4C8010900A781AD"\r
- {\r
- "SourcePath" = "8:..\\everywhere\\ipp-tests.test"\r
- "TargetName" = "8:ipp-tests.test"\r
- "Tag" = "8:"\r
- "Folder" = "8:_EB00D0298C7E441EBD0257AC04FB3560"\r
- "Condition" = "8:"\r
- "Transitive" = "11:FALSE"\r
- "Vital" = "11:TRUE"\r
- "ReadOnly" = "11:FALSE"\r
- "Hidden" = "11:FALSE"\r
- "System" = "11:FALSE"\r
- "Permanent" = "11:FALSE"\r
- "SharedLegacy" = "11:FALSE"\r
- "PackageAs" = "3:1"\r
- "Register" = "3:1"\r
- "Exclude" = "11:FALSE"\r
- "IsDependency" = "11:FALSE"\r
- "IsolateTo" = "8:"\r
- }\r
- "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_D5CD9D9AB1644688A1D54B1589BDF724"\r
- {\r
- "SourcePath" = "8:..\\doc\\help\\man-ipptool.html"\r
- "TargetName" = "8:man-ipptool.html"\r
- "Tag" = "8:"\r
- "Folder" = "8:_26743E387598422398CF503F7478F9E1"\r
- "Condition" = "8:"\r
- "Transitive" = "11:FALSE"\r
- "Vital" = "11:TRUE"\r
- "ReadOnly" = "11:FALSE"\r
- "Hidden" = "11:FALSE"\r
- "System" = "11:FALSE"\r
- "Permanent" = "11:FALSE"\r
- "SharedLegacy" = "11:FALSE"\r
- "PackageAs" = "3:1"\r
- "Register" = "3:1"\r
- "Exclude" = "11:FALSE"\r
- "IsDependency" = "11:FALSE"\r
- "IsolateTo" = "8:"\r
- }\r
- "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_E3C6C5A7FDD94965B68960844461D5EA"\r
- {\r
- "SourcePath" = "8:..\\LICENSE.txt"\r
- "TargetName" = "8:LICENSE.txt"\r
- "Tag" = "8:"\r
- "Folder" = "8:_FFAEDEA1D38D4088A03FDD6F17E2CA5D"\r
- "Condition" = "8:"\r
- "Transitive" = "11:FALSE"\r
- "Vital" = "11:TRUE"\r
- "ReadOnly" = "11:FALSE"\r
- "Hidden" = "11:FALSE"\r
- "System" = "11:FALSE"\r
- "Permanent" = "11:FALSE"\r
- "SharedLegacy" = "11:FALSE"\r
- "PackageAs" = "3:1"\r
- "Register" = "3:1"\r
- "Exclude" = "11:FALSE"\r
- "IsDependency" = "11:FALSE"\r
- "IsolateTo" = "8:"\r
- }\r
- "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_E5E464C7DD97439B929E1EA1844F1FF0"\r
- {\r
- "SourcePath" = "8:..\\everywhere\\ipp-tests.bat"\r
- "TargetName" = "8:ipp-tests.bat"\r
- "Tag" = "8:"\r
- "Folder" = "8:_FFAEDEA1D38D4088A03FDD6F17E2CA5D"\r
- "Condition" = "8:"\r
- "Transitive" = "11:FALSE"\r
- "Vital" = "11:TRUE"\r
- "ReadOnly" = "11:FALSE"\r
- "Hidden" = "11:FALSE"\r
- "System" = "11:FALSE"\r
- "Permanent" = "11:FALSE"\r
- "SharedLegacy" = "11:FALSE"\r
- "PackageAs" = "3:1"\r
- "Register" = "3:1"\r
- "Exclude" = "11:FALSE"\r
- "IsDependency" = "11:FALSE"\r
- "IsolateTo" = "8:"\r
- }\r
- "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_F22F5380A6E14A43A15A452C7C6F6C07"\r
- {\r
- "SourcePath" = "8:..\\test\\document-letter.pdf"\r
- "TargetName" = "8:document-letter.pdf"\r
- "Tag" = "8:"\r
- "Folder" = "8:_EB00D0298C7E441EBD0257AC04FB3560"\r
- "Condition" = "8:"\r
- "Transitive" = "11:FALSE"\r
- "Vital" = "11:TRUE"\r
- "ReadOnly" = "11:FALSE"\r
- "Hidden" = "11:FALSE"\r
- "System" = "11:FALSE"\r
- "Permanent" = "11:FALSE"\r
- "SharedLegacy" = "11:FALSE"\r
- "PackageAs" = "3:1"\r
- "Register" = "3:1"\r
- "Exclude" = "11:FALSE"\r
- "IsDependency" = "11:FALSE"\r
- "IsolateTo" = "8:"\r
- }\r
- }\r
- "FileType"\r
- {\r
- }\r
- "Folder"\r
- {\r
- "{1525181F-901A-416C-8A58-119130FE478E}:_BEC0EAE20C954C78B294B83E6696156E"\r
- {\r
- "Name" = "8:#1919"\r
- "AlwaysCreate" = "11:FALSE"\r
- "Condition" = "8:"\r
- "Transitive" = "11:FALSE"\r
- "Property" = "8:ProgramMenuFolder"\r
- "Folders"\r
- {\r
- "{9EF0B969-E518-4E46-987F-47570745A589}:_E379D4EDBAD0460BB876711E9062ADB4"\r
- {\r
- "Name" = "8:IPP Everywhere Printer Self-Certification Tools"\r
- "AlwaysCreate" = "11:FALSE"\r
- "Condition" = "8:"\r
- "Transitive" = "11:FALSE"\r
- "Property" = "8:_D115D2F4F12143B09D5FDA447A6A7D04"\r
- "Folders"\r
- {\r
- }\r
- }\r
- }\r
- }\r
- "{1525181F-901A-416C-8A58-119130FE478E}:_D02CDADE99F344CF92CA1A8D0278861F"\r
- {\r
- "Name" = "8:#1916"\r
- "AlwaysCreate" = "11:FALSE"\r
- "Condition" = "8:"\r
- "Transitive" = "11:FALSE"\r
- "Property" = "8:DesktopFolder"\r
- "Folders"\r
- {\r
- }\r
- }\r
- "{3C67513D-01DD-4637-8A68-80971EB9504F}:_FFAEDEA1D38D4088A03FDD6F17E2CA5D"\r
- {\r
- "DefaultLocation" = "8:[ProgramFilesFolder]\\sw-ippeveselfcert10"\r
- "Name" = "8:#1925"\r
- "AlwaysCreate" = "11:FALSE"\r
- "Condition" = "8:"\r
- "Transitive" = "11:FALSE"\r
- "Property" = "8:TARGETDIR"\r
- "Folders"\r
- {\r
- "{9EF0B969-E518-4E46-987F-47570745A589}:_26743E387598422398CF503F7478F9E1"\r
- {\r
- "Name" = "8:doc"\r
- "AlwaysCreate" = "11:FALSE"\r
- "Condition" = "8:"\r
- "Transitive" = "11:FALSE"\r
- "Property" = "8:_5CD53B90FF754768B11ECBEB671A1749"\r
- "Folders"\r
- {\r
- }\r
- }\r
- "{9EF0B969-E518-4E46-987F-47570745A589}:_EB00D0298C7E441EBD0257AC04FB3560"\r
- {\r
- "Name" = "8:ipptool"\r
- "AlwaysCreate" = "11:FALSE"\r
- "Condition" = "8:"\r
- "Transitive" = "11:FALSE"\r
- "Property" = "8:_6F223FB51798428A9F2D64A5A7F2B49C"\r
- "Folders"\r
- {\r
- }\r
- }\r
- }\r
- }\r
- }\r
- "LaunchCondition"\r
- {\r
- }\r
- "Locator"\r
- {\r
- }\r
- "MsiBootstrapper"\r
- {\r
- "LangId" = "3:1033"\r
- "RequiresElevation" = "11:FALSE"\r
- }\r
- "Product"\r
- {\r
- "Name" = "8:Microsoft Visual Studio"\r
- "ProductName" = "8:IPP Everywhere Printer Self-Certification Tools"\r
- "ProductCode" = "8:{C08E3AC5-4FBF-40DD-BD19-9BE69A609DAF}"\r
- "PackageCode" = "8:{25FF31C9-52A0-4838-8F1D-02FB5D5296F4}"\r
- "UpgradeCode" = "8:{BAB6EBBB-515D-4155-9FEF-D98DA76814CA}"\r
- "RestartWWWService" = "11:FALSE"\r
- "RemovePreviousVersions" = "11:TRUE"\r
- "DetectNewerInstalledVersion" = "11:TRUE"\r
- "InstallAllUsers" = "11:TRUE"\r
- "ProductVersion" = "8:14.08.2600"\r
- "Manufacturer" = "8:Apple Inc."\r
- "ARPHELPTELEPHONE" = "8:"\r
- "ARPHELPLINK" = "8:http://www.cups.org/str.php"\r
- "Title" = "8:sw-ippeveselfcert10"\r
- "Subject" = "8:"\r
- "ARPCONTACT" = "8:Apple Inc."\r
- "Keywords" = "8:IPP, Internet Printing Protocol"\r
- "ARPCOMMENTS" = "8:IPP Everywhere Printer Self-Certification Tools"\r
- "ARPURLINFOABOUT" = "8:http://www.cups.org/"\r
- "ARPPRODUCTICON" = "8:"\r
- "ARPIconIndex" = "3:0"\r
- "SearchPath" = "8:"\r
- "UseSystemSearchPath" = "11:TRUE"\r
- "TargetPlatform" = "3:0"\r
- "PreBuildEvent" = "8:"\r
- "PostBuildEvent" = "8:"\r
- "RunPostBuildEvent" = "3:0"\r
- }\r
- "Registry"\r
- {\r
- "HKLM"\r
- {\r
- "Keys"\r
- {\r
- "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_BC4E66686BCA4F9A8B24B6CF2728DACD"\r
- {\r
- "Name" = "8:Software"\r
- "Condition" = "8:"\r
- "AlwaysCreate" = "11:FALSE"\r
- "DeleteAtUninstall" = "11:FALSE"\r
- "Transitive" = "11:FALSE"\r
- "Keys"\r
- {\r
- "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_F9AB9B310C7545D993D690F529048AA2"\r
- {\r
- "Name" = "8:cups.org"\r
- "Condition" = "8:"\r
- "AlwaysCreate" = "11:FALSE"\r
- "DeleteAtUninstall" = "11:FALSE"\r
- "Transitive" = "11:FALSE"\r
- "Keys"\r
- {\r
- }\r
- "Values"\r
- {\r
- "{ADCFDA98-8FDD-45E4-90BC-E3D20B029870}:_4E5BAC705A1D44E78C90C6D2A4A7BE20"\r
- {\r
- "Name" = "8:installdir"\r
- "Condition" = "8:"\r
- "Transitive" = "11:FALSE"\r
- "ValueTypes" = "3:2"\r
- "Value" = "8:[TARGETDIR]"\r
- }\r
- }\r
- }\r
- }\r
- "Values"\r
- {\r
- }\r
- }\r
- }\r
- }\r
- "HKCU"\r
- {\r
- "Keys"\r
- {\r
- "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_A4C9879F42874B6B92960A55F2D98922"\r
- {\r
- "Name" = "8:Software"\r
- "Condition" = "8:"\r
- "AlwaysCreate" = "11:FALSE"\r
- "DeleteAtUninstall" = "11:FALSE"\r
- "Transitive" = "11:FALSE"\r
- "Keys"\r
- {\r
- "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_1ACB03C307FB4B85BB27C9913FB58B09"\r
- {\r
- "Name" = "8:[Manufacturer]"\r
- "Condition" = "8:"\r
- "AlwaysCreate" = "11:FALSE"\r
- "DeleteAtUninstall" = "11:FALSE"\r
- "Transitive" = "11:FALSE"\r
- "Keys"\r
- {\r
- }\r
- "Values"\r
- {\r
- }\r
- }\r
- }\r
- "Values"\r
- {\r
- }\r
- }\r
- }\r
- }\r
- "HKCR"\r
- {\r
- "Keys"\r
- {\r
- }\r
- }\r
- "HKU"\r
- {\r
- "Keys"\r
- {\r
- }\r
- }\r
- "HKPU"\r
- {\r
- "Keys"\r
- {\r
- }\r
- }\r
- }\r
- "Sequences"\r
- {\r
- }\r
- "Shortcut"\r
- {\r
- "{970C0BB2-C7D0-45D7-ABFA-7EC378858BC0}:_57BCED85BA5944009F56A11D5A9FBBEE"\r
- {\r
- "Name" = "8:ippfind Documentation"\r
- "Arguments" = "8:"\r
- "Description" = "8:"\r
- "ShowCmd" = "3:1"\r
- "IconIndex" = "3:0"\r
- "Transitive" = "11:FALSE"\r
- "Target" = "8:_592FC984DBFD494D9FB7DFFEA35AD7A5"\r
- "Folder" = "8:_E379D4EDBAD0460BB876711E9062ADB4"\r
- "WorkingFolder" = "8:_26743E387598422398CF503F7478F9E1"\r
- "Icon" = "8:"\r
- "Feature" = "8:"\r
- }\r
- "{970C0BB2-C7D0-45D7-ABFA-7EC378858BC0}:_63715171338D40FFBC5B47A1418B4814"\r
- {\r
- "Name" = "8:README"\r
- "Arguments" = "8:"\r
- "Description" = "8:"\r
- "ShowCmd" = "3:1"\r
- "IconIndex" = "3:0"\r
- "Transitive" = "11:FALSE"\r
- "Target" = "8:_27AB74FFFBC7436B9EBC6AE23968CFCC"\r
- "Folder" = "8:_E379D4EDBAD0460BB876711E9062ADB4"\r
- "WorkingFolder" = "8:_FFAEDEA1D38D4088A03FDD6F17E2CA5D"\r
- "Icon" = "8:"\r
- "Feature" = "8:"\r
- }\r
- "{970C0BB2-C7D0-45D7-ABFA-7EC378858BC0}:_70CF74DB997A408DBBFD48AB10F92321"\r
- {\r
- "Name" = "8:ipptool Documentation"\r
- "Arguments" = "8:"\r
- "Description" = "8:"\r
- "ShowCmd" = "3:1"\r
- "IconIndex" = "3:0"\r
- "Transitive" = "11:FALSE"\r
- "Target" = "8:_D5CD9D9AB1644688A1D54B1589BDF724"\r
- "Folder" = "8:_E379D4EDBAD0460BB876711E9062ADB4"\r
- "WorkingFolder" = "8:_FFAEDEA1D38D4088A03FDD6F17E2CA5D"\r
- "Icon" = "8:"\r
- "Feature" = "8:"\r
- }\r
- "{970C0BB2-C7D0-45D7-ABFA-7EC378858BC0}:_962004B0D5CA479A91EFA7F7BF7814C8"\r
- {\r
- "Name" = "8:ippserver Documentation"\r
- "Arguments" = "8:"\r
- "Description" = "8:"\r
- "ShowCmd" = "3:1"\r
- "IconIndex" = "3:0"\r
- "Transitive" = "11:FALSE"\r
- "Target" = "8:_1BCBABF5693841AE92515645BB7765F4"\r
- "Folder" = "8:_E379D4EDBAD0460BB876711E9062ADB4"\r
- "WorkingFolder" = "8:_26743E387598422398CF503F7478F9E1"\r
- "Icon" = "8:"\r
- "Feature" = "8:"\r
- }\r
- "{970C0BB2-C7D0-45D7-ABFA-7EC378858BC0}:_BD2A7DF74D844FF5919EE8340EE36ECD"\r
- {\r
- "Name" = "8:Test File Documentation"\r
- "Arguments" = "8:"\r
- "Description" = "8:"\r
- "ShowCmd" = "3:1"\r
- "IconIndex" = "3:0"\r
- "Transitive" = "11:FALSE"\r
- "Target" = "8:_1A1324305D78463BBFC62269C56DCF0B"\r
- "Folder" = "8:_E379D4EDBAD0460BB876711E9062ADB4"\r
- "WorkingFolder" = "8:_FFAEDEA1D38D4088A03FDD6F17E2CA5D"\r
- "Icon" = "8:"\r
- "Feature" = "8:"\r
- }\r
- }\r
- "UserInterface"\r
- {\r
- "{2479F3F5-0309-486D-8047-8187E2CE5BA0}:_045DF90B1FF941A9BA7A742CFC0A6C00"\r
- {\r
- "UseDynamicProperties" = "11:FALSE"\r
- "IsDependency" = "11:FALSE"\r
- "SourcePath" = "8:<VsdDialogDir>\\VsdUserInterface.wim"\r
- }\r
- "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_345BD86390E841A98B74ED3E07945F8C"\r
- {\r
- "Name" = "8:#1900"\r
- "Sequence" = "3:2"\r
- "Attributes" = "3:1"\r
- "Dialogs"\r
- {\r
- "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_067C143A8731427180B1568AF8C07375"\r
- {\r
- "Sequence" = "3:200"\r
- "DisplayName" = "8:Installation Folder"\r
- "UseDynamicProperties" = "11:TRUE"\r
- "IsDependency" = "11:FALSE"\r
- "SourcePath" = "8:<VsdDialogDir>\\VsdAdminFolderDlg.wid"\r
- "Properties"\r
- {\r
- "BannerBitmap"\r
- {\r
- "Name" = "8:BannerBitmap"\r
- "DisplayName" = "8:#1001"\r
- "Description" = "8:#1101"\r
- "Type" = "3:8"\r
- "ContextData" = "8:Bitmap"\r
- "Attributes" = "3:4"\r
- "Setting" = "3:1"\r
- "UsePlugInResources" = "11:TRUE"\r
- }\r
- }\r
- }\r
- "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_A2F2CC6EB9D7453599E7598D4D0629A5"\r
- {\r
- "Sequence" = "3:300"\r
- "DisplayName" = "8:Confirm Installation"\r
- "UseDynamicProperties" = "11:TRUE"\r
- "IsDependency" = "11:FALSE"\r
- "SourcePath" = "8:<VsdDialogDir>\\VsdAdminConfirmDlg.wid"\r
- "Properties"\r
- {\r
- "BannerBitmap"\r
- {\r
- "Name" = "8:BannerBitmap"\r
- "DisplayName" = "8:#1001"\r
- "Description" = "8:#1101"\r
- "Type" = "3:8"\r
- "ContextData" = "8:Bitmap"\r
- "Attributes" = "3:4"\r
- "Setting" = "3:1"\r
- "UsePlugInResources" = "11:TRUE"\r
- }\r
- }\r
- }\r
- "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_C2B41369B7334F419318792EBA031412"\r
- {\r
- "Sequence" = "3:100"\r
- "DisplayName" = "8:Welcome"\r
- "UseDynamicProperties" = "11:TRUE"\r
- "IsDependency" = "11:FALSE"\r
- "SourcePath" = "8:<VsdDialogDir>\\VsdAdminWelcomeDlg.wid"\r
- "Properties"\r
- {\r
- "BannerBitmap"\r
- {\r
- "Name" = "8:BannerBitmap"\r
- "DisplayName" = "8:#1001"\r
- "Description" = "8:#1101"\r
- "Type" = "3:8"\r
- "ContextData" = "8:Bitmap"\r
- "Attributes" = "3:4"\r
- "Setting" = "3:1"\r
- "UsePlugInResources" = "11:TRUE"\r
- }\r
- "CopyrightWarning"\r
- {\r
- "Name" = "8:CopyrightWarning"\r
- "DisplayName" = "8:#1002"\r
- "Description" = "8:#1102"\r
- "Type" = "3:3"\r
- "ContextData" = "8:"\r
- "Attributes" = "3:0"\r
- "Setting" = "3:2"\r
- "Value" = "8:This computer program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License version 2."\r
- "DefaultValue" = "8:#1202"\r
- "UsePlugInResources" = "11:TRUE"\r
- }\r
- "Welcome"\r
- {\r
- "Name" = "8:Welcome"\r
- "DisplayName" = "8:#1003"\r
- "Description" = "8:#1103"\r
- "Type" = "3:3"\r
- "ContextData" = "8:"\r
- "Attributes" = "3:0"\r
- "Setting" = "3:1"\r
- "Value" = "8:#1203"\r
- "DefaultValue" = "8:#1203"\r
- "UsePlugInResources" = "11:TRUE"\r
- }\r
- }\r
- }\r
- }\r
- }\r
- "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_6B654A06090344BA9AA443E0D0296737"\r
- {\r
- "Name" = "8:#1902"\r
- "Sequence" = "3:1"\r
- "Attributes" = "3:3"\r
- "Dialogs"\r
- {\r
- "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_FB4E7BBC3DA242309FFB58F9A6194A93"\r
- {\r
- "Sequence" = "3:100"\r
- "DisplayName" = "8:Finished"\r
- "UseDynamicProperties" = "11:TRUE"\r
- "IsDependency" = "11:FALSE"\r
- "SourcePath" = "8:<VsdDialogDir>\\VsdFinishedDlg.wid"\r
- "Properties"\r
- {\r
- "BannerBitmap"\r
- {\r
- "Name" = "8:BannerBitmap"\r
- "DisplayName" = "8:#1001"\r
- "Description" = "8:#1101"\r
- "Type" = "3:8"\r
- "ContextData" = "8:Bitmap"\r
- "Attributes" = "3:4"\r
- "Setting" = "3:1"\r
- "UsePlugInResources" = "11:TRUE"\r
- }\r
- "UpdateText"\r
- {\r
- "Name" = "8:UpdateText"\r
- "DisplayName" = "8:#1058"\r
- "Description" = "8:#1158"\r
- "Type" = "3:15"\r
- "ContextData" = "8:"\r
- "Attributes" = "3:0"\r
- "Setting" = "3:1"\r
- "Value" = "8:#1258"\r
- "DefaultValue" = "8:#1258"\r
- "UsePlugInResources" = "11:TRUE"\r
- }\r
- }\r
- }\r
- }\r
- }\r
- "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_712819C7C4F042ABB708949BD4426628"\r
- {\r
- "Name" = "8:#1900"\r
- "Sequence" = "3:1"\r
- "Attributes" = "3:1"\r
- "Dialogs"\r
- {\r
- "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_2F49D4FACB954AF2B786D2AD9206D053"\r
- {\r
- "Sequence" = "3:100"\r
- "DisplayName" = "8:Welcome"\r
- "UseDynamicProperties" = "11:TRUE"\r
- "IsDependency" = "11:FALSE"\r
- "SourcePath" = "8:<VsdDialogDir>\\VsdWelcomeDlg.wid"\r
- "Properties"\r
- {\r
- "BannerBitmap"\r
- {\r
- "Name" = "8:BannerBitmap"\r
- "DisplayName" = "8:#1001"\r
- "Description" = "8:#1101"\r
- "Type" = "3:8"\r
- "ContextData" = "8:Bitmap"\r
- "Attributes" = "3:4"\r
- "Setting" = "3:1"\r
- "UsePlugInResources" = "11:TRUE"\r
- }\r
- "CopyrightWarning"\r
- {\r
- "Name" = "8:CopyrightWarning"\r
- "DisplayName" = "8:#1002"\r
- "Description" = "8:#1102"\r
- "Type" = "3:3"\r
- "ContextData" = "8:"\r
- "Attributes" = "3:0"\r
- "Setting" = "3:2"\r
- "Value" = "8:This computer program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License version 2."\r
- "DefaultValue" = "8:#1202"\r
- "UsePlugInResources" = "11:TRUE"\r
- }\r
- "Welcome"\r
- {\r
- "Name" = "8:Welcome"\r
- "DisplayName" = "8:#1003"\r
- "Description" = "8:#1103"\r
- "Type" = "3:3"\r
- "ContextData" = "8:"\r
- "Attributes" = "3:0"\r
- "Setting" = "3:1"\r
- "Value" = "8:#1203"\r
- "DefaultValue" = "8:#1203"\r
- "UsePlugInResources" = "11:TRUE"\r
- }\r
- }\r
- }\r
- "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_770E25BC453A464EA8CD51381FDDDD9F"\r
- {\r
- "Sequence" = "3:300"\r
- "DisplayName" = "8:Confirm Installation"\r
- "UseDynamicProperties" = "11:TRUE"\r
- "IsDependency" = "11:FALSE"\r
- "SourcePath" = "8:<VsdDialogDir>\\VsdConfirmDlg.wid"\r
- "Properties"\r
- {\r
- "BannerBitmap"\r
- {\r
- "Name" = "8:BannerBitmap"\r
- "DisplayName" = "8:#1001"\r
- "Description" = "8:#1101"\r
- "Type" = "3:8"\r
- "ContextData" = "8:Bitmap"\r
- "Attributes" = "3:4"\r
- "Setting" = "3:1"\r
- "UsePlugInResources" = "11:TRUE"\r
- }\r
- }\r
- }\r
- "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_9534A64B629F4F868D6D7A384C76DCB2"\r
- {\r
- "Sequence" = "3:200"\r
- "DisplayName" = "8:Installation Folder"\r
- "UseDynamicProperties" = "11:TRUE"\r
- "IsDependency" = "11:FALSE"\r
- "SourcePath" = "8:<VsdDialogDir>\\VsdFolderDlg.wid"\r
- "Properties"\r
- {\r
- "BannerBitmap"\r
- {\r
- "Name" = "8:BannerBitmap"\r
- "DisplayName" = "8:#1001"\r
- "Description" = "8:#1101"\r
- "Type" = "3:8"\r
- "ContextData" = "8:Bitmap"\r
- "Attributes" = "3:4"\r
- "Setting" = "3:1"\r
- "UsePlugInResources" = "11:TRUE"\r
- }\r
- "InstallAllUsersVisible"\r
- {\r
- "Name" = "8:InstallAllUsersVisible"\r
- "DisplayName" = "8:#1059"\r
- "Description" = "8:#1159"\r
- "Type" = "3:5"\r
- "ContextData" = "8:1;True=1;False=0"\r
- "Attributes" = "3:0"\r
- "Setting" = "3:0"\r
- "Value" = "3:1"\r
- "DefaultValue" = "3:1"\r
- "UsePlugInResources" = "11:TRUE"\r
- }\r
- }\r
- }\r
- }\r
- }\r
- "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_770CCEFF81BD46A182A6E816A41A0E81"\r
- {\r
- "Name" = "8:#1901"\r
- "Sequence" = "3:2"\r
- "Attributes" = "3:2"\r
- "Dialogs"\r
- {\r
- "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_75E0C1FD245D493DA0D7E3E0BC0C365F"\r
- {\r
- "Sequence" = "3:100"\r
- "DisplayName" = "8:Progress"\r
- "UseDynamicProperties" = "11:TRUE"\r
- "IsDependency" = "11:FALSE"\r
- "SourcePath" = "8:<VsdDialogDir>\\VsdAdminProgressDlg.wid"\r
- "Properties"\r
- {\r
- "BannerBitmap"\r
- {\r
- "Name" = "8:BannerBitmap"\r
- "DisplayName" = "8:#1001"\r
- "Description" = "8:#1101"\r
- "Type" = "3:8"\r
- "ContextData" = "8:Bitmap"\r
- "Attributes" = "3:4"\r
- "Setting" = "3:1"\r
- "UsePlugInResources" = "11:TRUE"\r
- }\r
- "ShowProgress"\r
- {\r
- "Name" = "8:ShowProgress"\r
- "DisplayName" = "8:#1009"\r
- "Description" = "8:#1109"\r
- "Type" = "3:5"\r
- "ContextData" = "8:1;True=1;False=0"\r
- "Attributes" = "3:0"\r
- "Setting" = "3:0"\r
- "Value" = "3:1"\r
- "DefaultValue" = "3:1"\r
- "UsePlugInResources" = "11:TRUE"\r
- }\r
- }\r
- }\r
- }\r
- }\r
- "{2479F3F5-0309-486D-8047-8187E2CE5BA0}:_933B15E9A383418F8ADF3B13F68458F3"\r
- {\r
- "UseDynamicProperties" = "11:FALSE"\r
- "IsDependency" = "11:FALSE"\r
- "SourcePath" = "8:<VsdDialogDir>\\VsdBasicDialogs.wim"\r
- }\r
- "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_E310DA8CED734E00950A3C5D630CE987"\r
- {\r
- "Name" = "8:#1902"\r
- "Sequence" = "3:2"\r
- "Attributes" = "3:3"\r
- "Dialogs"\r
- {\r
- "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_CB172E69F9C74901BE1040336CFD4F72"\r
- {\r
- "Sequence" = "3:100"\r
- "DisplayName" = "8:Finished"\r
- "UseDynamicProperties" = "11:TRUE"\r
- "IsDependency" = "11:FALSE"\r
- "SourcePath" = "8:<VsdDialogDir>\\VsdAdminFinishedDlg.wid"\r
- "Properties"\r
- {\r
- "BannerBitmap"\r
- {\r
- "Name" = "8:BannerBitmap"\r
- "DisplayName" = "8:#1001"\r
- "Description" = "8:#1101"\r
- "Type" = "3:8"\r
- "ContextData" = "8:Bitmap"\r
- "Attributes" = "3:4"\r
- "Setting" = "3:1"\r
- "UsePlugInResources" = "11:TRUE"\r
- }\r
- }\r
- }\r
- }\r
- }\r
- "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_F44F9BE9B54940848289669635E4A5A2"\r
- {\r
- "Name" = "8:#1901"\r
- "Sequence" = "3:1"\r
- "Attributes" = "3:2"\r
- "Dialogs"\r
- {\r
- "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_14751F327A634B989283C8F28CFB6DFC"\r
- {\r
- "Sequence" = "3:100"\r
- "DisplayName" = "8:Progress"\r
- "UseDynamicProperties" = "11:TRUE"\r
- "IsDependency" = "11:FALSE"\r
- "SourcePath" = "8:<VsdDialogDir>\\VsdProgressDlg.wid"\r
- "Properties"\r
- {\r
- "BannerBitmap"\r
- {\r
- "Name" = "8:BannerBitmap"\r
- "DisplayName" = "8:#1001"\r
- "Description" = "8:#1101"\r
- "Type" = "3:8"\r
- "ContextData" = "8:Bitmap"\r
- "Attributes" = "3:4"\r
- "Setting" = "3:1"\r
- "UsePlugInResources" = "11:TRUE"\r
- }\r
- "ShowProgress"\r
- {\r
- "Name" = "8:ShowProgress"\r
- "DisplayName" = "8:#1009"\r
- "Description" = "8:#1109"\r
- "Type" = "3:5"\r
- "ContextData" = "8:1;True=1;False=0"\r
- "Attributes" = "3:0"\r
- "Setting" = "3:0"\r
- "Value" = "3:1"\r
- "DefaultValue" = "3:1"\r
- "UsePlugInResources" = "11:TRUE"\r
- }\r
- }\r
- }\r
- }\r
- }\r
- }\r
- "MergeModule"\r
- {\r
- "{CEE29DC0-9FBA-4B99-8D47-5BC643D9B626}:_299D5816FF7142F3B2791685551AD1DC"\r
- {\r
- "UseDynamicProperties" = "11:TRUE"\r
- "IsDependency" = "11:TRUE"\r
- "SourcePath" = "8:microsoft_vc90_debugcrt_x86.msm"\r
- "Properties"\r
- {\r
- }\r
- "LanguageId" = "3:0"\r
- "Exclude" = "11:FALSE"\r
- "Folder" = "8:"\r
- "Feature" = "8:"\r
- "IsolateTo" = "8:"\r
- }\r
- "{CEE29DC0-9FBA-4B99-8D47-5BC643D9B626}:_A1CB27EFF4094C39B58D0BE5A272DF1A"\r
- {\r
- "UseDynamicProperties" = "11:TRUE"\r
- "IsDependency" = "11:TRUE"\r
- "SourcePath" = "8:policy_9_0_Microsoft_VC90_DebugCRT_x86.msm"\r
- "Properties"\r
- {\r
- }\r
- "LanguageId" = "3:0"\r
- "Exclude" = "11:FALSE"\r
- "Folder" = "8:"\r
- "Feature" = "8:"\r
- "IsolateTo" = "8:"\r
- }\r
- }\r
- "ProjectOutput"\r
- {\r
- "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_466C1CF41795452A8B76425F8D05D8B8"\r
- {\r
- "SourcePath" = "8:Win32\\Debug\\ippserver.exe"\r
- "TargetName" = "8:"\r
- "Tag" = "8:"\r
- "Folder" = "8:_FFAEDEA1D38D4088A03FDD6F17E2CA5D"\r
- "Condition" = "8:"\r
- "Transitive" = "11:FALSE"\r
- "Vital" = "11:TRUE"\r
- "ReadOnly" = "11:FALSE"\r
- "Hidden" = "11:FALSE"\r
- "System" = "11:FALSE"\r
- "Permanent" = "11:FALSE"\r
- "SharedLegacy" = "11:FALSE"\r
- "PackageAs" = "3:1"\r
- "Register" = "3:1"\r
- "Exclude" = "11:FALSE"\r
- "IsDependency" = "11:FALSE"\r
- "IsolateTo" = "8:"\r
- "ProjectOutputGroupRegister" = "3:1"\r
- "OutputConfiguration" = "8:"\r
- "OutputGroupCanonicalName" = "8:Built"\r
- "OutputProjectGuid" = "8:{82A03BC7-0746-4B85-8908-3C7A3FAA58A9}"\r
- "ShowKeyOutput" = "11:TRUE"\r
- "ExcludeFilters"\r
- {\r
- }\r
- }\r
- "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_58DC0E72F0944BEFB927AED718CD1660"\r
- {\r
- "SourcePath" = "8:Win32\\Debug\\ippfind.exe"\r
- "TargetName" = "8:"\r
- "Tag" = "8:"\r
- "Folder" = "8:_FFAEDEA1D38D4088A03FDD6F17E2CA5D"\r
- "Condition" = "8:"\r
- "Transitive" = "11:FALSE"\r
- "Vital" = "11:TRUE"\r
- "ReadOnly" = "11:FALSE"\r
- "Hidden" = "11:FALSE"\r
- "System" = "11:FALSE"\r
- "Permanent" = "11:FALSE"\r
- "SharedLegacy" = "11:FALSE"\r
- "PackageAs" = "3:1"\r
- "Register" = "3:1"\r
- "Exclude" = "11:FALSE"\r
- "IsDependency" = "11:FALSE"\r
- "IsolateTo" = "8:"\r
- "ProjectOutputGroupRegister" = "3:1"\r
- "OutputConfiguration" = "8:"\r
- "OutputGroupCanonicalName" = "8:Built"\r
- "OutputProjectGuid" = "8:{B484DA0C-62C8-4C32-83B6-CCEB58968B85}"\r
- "ShowKeyOutput" = "11:TRUE"\r
- "ExcludeFilters"\r
- {\r
- }\r
- }\r
- "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_D02EB13951314EFD9C539150EF8E53B8"\r
- {\r
- "SourcePath" = "8:Win32\\Debug\\regex.dll"\r
- "TargetName" = "8:"\r
- "Tag" = "8:"\r
- "Folder" = "8:_FFAEDEA1D38D4088A03FDD6F17E2CA5D"\r
- "Condition" = "8:"\r
- "Transitive" = "11:FALSE"\r
- "Vital" = "11:TRUE"\r
- "ReadOnly" = "11:FALSE"\r
- "Hidden" = "11:FALSE"\r
- "System" = "11:FALSE"\r
- "Permanent" = "11:FALSE"\r
- "SharedLegacy" = "11:FALSE"\r
- "PackageAs" = "3:1"\r
- "Register" = "3:1"\r
- "Exclude" = "11:FALSE"\r
- "IsDependency" = "11:FALSE"\r
- "IsolateTo" = "8:"\r
- "ProjectOutputGroupRegister" = "3:1"\r
- "OutputConfiguration" = "8:"\r
- "OutputGroupCanonicalName" = "8:Built"\r
- "OutputProjectGuid" = "8:{18950A1B-D37A-40C7-B2DF-C12986C0526E}"\r
- "ShowKeyOutput" = "11:TRUE"\r
- "ExcludeFilters"\r
- {\r
- }\r
- }\r
- "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_E97571D3FBE048DABDC59B37762D800F"\r
- {\r
- "SourcePath" = "8:Win32\\Debug\\ipptool.exe"\r
- "TargetName" = "8:"\r
- "Tag" = "8:"\r
- "Folder" = "8:_FFAEDEA1D38D4088A03FDD6F17E2CA5D"\r
- "Condition" = "8:"\r
- "Transitive" = "11:FALSE"\r
- "Vital" = "11:TRUE"\r
- "ReadOnly" = "11:FALSE"\r
- "Hidden" = "11:FALSE"\r
- "System" = "11:FALSE"\r
- "Permanent" = "11:FALSE"\r
- "SharedLegacy" = "11:FALSE"\r
- "PackageAs" = "3:1"\r
- "Register" = "3:1"\r
- "Exclude" = "11:FALSE"\r
- "IsDependency" = "11:FALSE"\r
- "IsolateTo" = "8:"\r
- "ProjectOutputGroupRegister" = "3:1"\r
- "OutputConfiguration" = "8:"\r
- "OutputGroupCanonicalName" = "8:Built"\r
- "OutputProjectGuid" = "8:{B246D91E-61F2-4433-BFD2-6C2A96FBD4D4}"\r
- "ShowKeyOutput" = "11:TRUE"\r
- "ExcludeFilters"\r
- {\r
- }\r
- }\r
- "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_EA282F32A10B4ED1A81AA6133B997C6A"\r
- {\r
- "SourcePath" = "8:Win32\\Debug\\libcups2.dll"\r
- "TargetName" = "8:"\r
- "Tag" = "8:"\r
- "Folder" = "8:_FFAEDEA1D38D4088A03FDD6F17E2CA5D"\r
- "Condition" = "8:"\r
- "Transitive" = "11:FALSE"\r
- "Vital" = "11:TRUE"\r
- "ReadOnly" = "11:FALSE"\r
- "Hidden" = "11:FALSE"\r
- "System" = "11:FALSE"\r
- "Permanent" = "11:FALSE"\r
- "SharedLegacy" = "11:FALSE"\r
- "PackageAs" = "3:1"\r
- "Register" = "3:1"\r
- "Exclude" = "11:FALSE"\r
- "IsDependency" = "11:FALSE"\r
- "IsolateTo" = "8:"\r
- "ProjectOutputGroupRegister" = "3:1"\r
- "OutputConfiguration" = "8:"\r
- "OutputGroupCanonicalName" = "8:Built"\r
- "OutputProjectGuid" = "8:{CB4AA6F2-3E84-45BE-B505-95CD375E8BE3}"\r
- "ShowKeyOutput" = "11:TRUE"\r
- "ExcludeFilters"\r
- {\r
- }\r
- }\r
- }\r
- }\r
-}\r
72220F02133305BB00FCA411 /* string.c */,
72220F03133305BB00FCA411 /* tempfile.c */,
72220F05133305BB00FCA411 /* thread.c */,
+ 727AD5B619100A58009F6862 /* tls.c */,
270B267D17F5C06700C8A3A9 /* tls-darwin.c */,
270B267E17F5C06700C8A3A9 /* tls-gnutls.c */,
270B268117F5C5D600C8A3A9 /* tls-sspi.c */,
- 727AD5B619100A58009F6862 /* tls.c */,
72220F06133305BB00FCA411 /* transcode.c */,
72220F08133305BB00FCA411 /* usersys.c */,
72220F09133305BB00FCA411 /* util.c */,
#endif /* !TARGET_OS_IOS */
+/*
+ * Do we have the getgrouplist() function?
+ */
+
+#define HAVE_GETGROUPLIST 1
+
+
/*
* Do we have OS X 10.4's mbr_XXX functions?
*/