]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Merge pull request #4822 from zdohnal/lpinfo-username
authorMichael R Sweet <michaelrsweet@gmail.com>
Thu, 26 May 2016 11:20:29 +0000 (07:20 -0400)
committerMichael R Sweet <michaelrsweet@gmail.com>
Thu, 26 May 2016 11:20:29 +0000 (07:20 -0400)
Update lpinfo.man - removed -U username

88 files changed:
CHANGES-2.1.txt
CHANGES.txt
Makefile
berkeley/lpq.c
berkeley/lpr.c
berkeley/lprm.c
cgi-bin/classes.c
cgi-bin/ipp-var.c
cgi-bin/printers.c
config-scripts/cups-common.m4
config.h.in
configure
cups/Makefile
cups/api-admin.header [new file with mode: 0644]
cups/api-admin.shtml [new file with mode: 0644]
cups/api-filter.header
cups/api-filter.shtml
cups/api-httpipp.header
cups/api-overview.header
cups/cups-private.h
cups/globals.c
cups/http-addrlist.c
cups/tls-darwin.c
cups/tls-gnutls.c
cups/usersys.c
doc/Makefile
doc/help/api-admin.html [new file with mode: 0644]
doc/help/api-array.html
doc/help/api-cups.html
doc/help/api-filedir.html
doc/help/api-filter.html
doc/help/api-httpipp.html
doc/help/api-overview.html
doc/help/api-ppd.html
doc/help/api-raster.html
doc/help/man-client.conf.html
doc/help/man-lp.html
doc/help/man-lpr.html
doc/help/postscript-driver.html
doc/help/ppd-compiler.html
doc/help/raster-driver.html
doc/help/spec-ppd.html
filter/Makefile
man/client.conf.man.in
scheduler/auth.c
scheduler/ipp.c
scheduler/job.c
scheduler/log.c
scheduler/printers.c
systemv/cancel.c
systemv/cupsaccept.c
systemv/lp.c
systemv/lpadmin.c
systemv/lpinfo.c
systemv/lpmove.c
systemv/lpoptions.c
systemv/lpstat.c
templates/classes.tmpl
templates/de/classes.tmpl
templates/de/jobs.tmpl
templates/de/pager.tmpl
templates/de/printers.tmpl
templates/es/classes.tmpl
templates/es/jobs.tmpl
templates/es/pager.tmpl
templates/es/printers.tmpl
templates/ja/classes.tmpl
templates/ja/jobs.tmpl
templates/ja/pager.tmpl
templates/ja/printers.tmpl
templates/jobs.tmpl
templates/pager.tmpl
templates/printers.tmpl
templates/pt_BR/classes.tmpl
templates/pt_BR/jobs.tmpl
templates/pt_BR/pager.tmpl
templates/pt_BR/printers.tmpl
templates/ru/classes.tmpl
templates/ru/jobs.tmpl
templates/ru/pager.tmpl
templates/ru/printers.tmpl
test/run-stp-tests.sh
vcnet/README.txt
vcnet/config.h
vcnet/cups.sln
vcnet/sw-ippeveselfcert10.vdproj [deleted file]
xcode/CUPS.xcodeproj/project.pbxproj
xcode/config.h

index 7da5150ff38b541eba94e964ee57a5084aa389e9..58ef329cab653736062f40ac92534ed5e829949d 100644 (file)
@@ -3,6 +3,9 @@ CHANGES-2.1.txt
 
 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)
index 2f8b105e9314a44e053bbdee8833fc2e23cfa394..3fe44e5f637d9f5a7e916fcc0edbe9a557be549b 100644 (file)
@@ -1,8 +1,19 @@
-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>)
@@ -28,5 +39,5 @@ CHANGES IN CUPS V2.2b1
        - 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)
index 1bc05d4f634d4aa4900c701588bb43d2328f0aa5..1698bd44a1b7da3dd505cb94f8898b7486bd8a39 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -271,12 +271,6 @@ apihelp:
                (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/)...
index 592a83665c0fc2c28d76c6939a846367ccbef3ac..f01168ca5b7c29b0baeb7bcd9fdfc5ccb1666561 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * "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
@@ -39,7 +39,8 @@ main(int  argc,                               /* I - Number of command-line arguments */
 {
   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 */
@@ -65,128 +66,138 @@ main(int  argc,                           /* I - Number of command-line arguments */
   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);
 
index eb58c8bd9f76180123c3eb1ce1970c3fca2658a0..418ef4b5545d91acdc3e49044700850f8367f8c5 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * "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
@@ -30,7 +30,8 @@ main(int  argc,                               /* I - Number of command-line arguments */
   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 */
@@ -54,229 +55,235 @@ main(int  argc,                           /* I - Number of command-line arguments */
   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)
@@ -305,9 +312,11 @@ main(int  argc,                            /* I - Number of command-line arguments */
       }
     }
     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...
   */
index 981b94b55386121ab3cad5988b22e8cab5173ebe..2271d48720ec584f453db3554cba09b173d37915 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * "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
@@ -29,7 +29,8 @@ main(int  argc,                       /* I - Number of command-line arguments */
   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? */
@@ -50,90 +51,96 @@ main(int  argc,                     /* I - Number of command-line arguments */
   */
 
   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
     {
      /*
@@ -176,6 +183,7 @@ main(int  argc,                     /* I - Number of command-line arguments */
 
       did_cancel = 1;
     }
+  }
 
  /*
   * If nothing has been canceled yet, cancel the current job on the specified
index 7c4ac9d25fafa44ec7b6c84a00b1317404b49232..ae76a0c9fc24bc5e5a2f1f46dbfdc6bd6944d6d0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * 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
@@ -297,8 +297,7 @@ show_all_classes(http_t     *http,  /* I - Connection to server */
                        *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 */
@@ -370,25 +369,10 @@ show_all_classes(http_t     *http,        /* I - Connection to server */
     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...
@@ -408,6 +392,12 @@ show_all_classes(http_t     *http, /* I - Connection to server */
       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...
     */
index 827c55cfb3e86e86a15aeff21ee5c9da450de2c3..877d37c28de555b94cc8183458b150acf974022d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * 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
@@ -1358,8 +1358,7 @@ cgiShowJobs(http_t     *http,             /* I - Connection to server */
                        *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 */
@@ -1395,6 +1394,17 @@ cgiShowJobs(http_t     *http,            /* I - Connection to server */
     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");
 
  /*
@@ -1417,7 +1427,7 @@ cgiShowJobs(http_t     *http,             /* I - Connection to server */
     }
 
     jobs  = cgiGetIPPObjects(response, search);
-    count = cupsArrayCount(jobs);
+    count = cupsArrayCount(jobs) + first;
 
     if (search)
       cgiFreeSearch(search);
@@ -1426,25 +1436,6 @@ cgiShowJobs(http_t     *http,            /* I - Connection to server */
     * 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();
@@ -1452,8 +1443,6 @@ cgiShowJobs(http_t     *http,             /* I - Connection to server */
     if (query)
       cgiSetVariable("QUERY", query);
 
-    cgiSetVariable("ORDER", ascending ? "asc" : "dec");
-
     cgiSetVariable("SECTION", section);
 
     sprintf(val, "%d", count);
@@ -1462,20 +1451,10 @@ cgiShowJobs(http_t     *http,           /* I - Connection to server */
     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...
@@ -1504,6 +1483,12 @@ cgiShowJobs(http_t     *http,            /* I - Connection to server */
       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...
     */
index 7d2d5d6bee3707455735d02c380c010b8c27145f..932c699954ab8d06f552f52a8b3474a8ddf395d7 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * 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
@@ -304,8 +304,7 @@ show_all_printers(http_t     *http, /* I - Connection to server */
                        *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 */
@@ -387,25 +386,10 @@ show_all_printers(http_t     *http,       /* I - Connection to server */
     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...
@@ -425,6 +409,12 @@ show_all_printers(http_t     *http,        /* I - Connection to server */
       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...
     */
index 3a912478c9477517ea5d5074ac84b93529eb33be..fbba71503a8fc451b079f7f078298c176c5e23da 100644 (file)
@@ -199,6 +199,9 @@ AC_CHECK_FUNCS(waitpid wait3)
 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;
index e242d561185169b2e802bda50a2b7e96936157da..37cfc4cd1543f6320a204664ec32885e06eee7d0 100644 (file)
 #undef HAVE_SCDYNAMICSTORECOPYCOMPUTERNAME
 
 
+/*
+ * Do we have the getgrouplist() function?
+ */
+
+#undef HAVE_GETGROUPLIST
+
 /*
  * Do we have OS X 10.4's mbr_XXX functions?
  */
index c3af70dd1c2f525b7daa71222865a2e175eb98f9..38b2e9eb962a1b539989f67d3534f6f8765d5a4b 100755 (executable)
--- a/configure
+++ b/configure
@@ -5307,6 +5307,18 @@ fi
 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
index 593113abccfa06113324b847a695760855f6d1ba..d5c5df71c7698b8e2d269070d5488df424e36941 100644 (file)
@@ -1,7 +1,7 @@
 #
 # 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
@@ -564,6 +564,13 @@ apihelp:
                --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 \
@@ -612,50 +619,6 @@ apihelp:
        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...
diff --git a/cups/api-admin.header b/cups/api-admin.header
new file mode 100644 (file)
index 0000000..a3ce3b1
--- /dev/null
@@ -0,0 +1,34 @@
+<!--
+  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>
diff --git a/cups/api-admin.shtml b/cups/api-admin.shtml
new file mode 100644 (file)
index 0000000..8928e47
--- /dev/null
@@ -0,0 +1,96 @@
+<!--
+  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 &lt;cups/cups.h&gt;
+#include &lt;cups/adminutil.h&gt;
+
+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, &amp;num_settings, &amp;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, &amp;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 &lt;cups/cups.h&gt;
+#include &lt;cups/adminutil.h&gt;
+
+
+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>
index d2cca7af2684b0274606779b58d8a204df5027cd..f08bc71b7681cbba77012bd78c67584f58dc303b 100644 (file)
@@ -1,7 +1,7 @@
 <!--
   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
@@ -17,6 +17,7 @@
 <tr>
        <th>Headers</th>
        <th>cups/backend.h<br>
+       cups/ppd.h<br>
        cups/sidechannel.h</th>
 </tr>
 </thead>
index d61b140f3815833a56f522fc47f661751b6e1bd4..ed24604087a8370f82bfacdf9202e5d0052cc010 100644 (file)
@@ -1,7 +1,7 @@
 <!--
   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
@@ -285,7 +285,7 @@ prefix strings:</p>
        <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.
index 844b67835f978eee775031e4abb65dca8010e417..cbede8f68b0122cd7f3dc21fdc74f1980181ddac 100644 (file)
@@ -1,7 +1,7 @@
 <!--
   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>
index a42c7fb22a4f39937c23e81ab14a9c497ba153da..b96cd075b8f0bc851ad4619a36e14f7e2ea44fc0 100644 (file)
@@ -1,7 +1,7 @@
 <!--
   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>
index 134aa8b039a7ea6459f55818a52808abe1512875..998aeec946f4aa019a1972e7368040b82ea2887f 100644 (file)
@@ -158,6 +158,7 @@ typedef struct _cups_globals_s              /**** CUPS global state data ****/
   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 */
index 6131a5cfbc3e6b5d86f50003db4e74b71f46484d..276bbcf5bfda592cff369164cfa2873520b702ed 100644 (file)
@@ -202,6 +202,7 @@ cups_globals_alloc(void)
   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;
index 90965457e405b4be53cfef4224efa54176911019..f74d9ed7a659d2998a3b03f2acb65ed763ea72c5 100644 (file)
@@ -132,9 +132,12 @@ httpAddrConnect2(
       {
        /*
        * 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;
       }
 
@@ -213,6 +216,7 @@ httpAddrConnect2(
       {
        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;
       }
 
index aad2db4900dbb82f0109beb56e9123aee2100aab..ab9fedc6a88f51df81e99a7b2c3e6e8d3b5e3961 100644 (file)
@@ -629,8 +629,15 @@ httpCredentialsGetTrust(
       * 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
@@ -660,6 +667,8 @@ httpCredentialsGetTrust(
     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);
 
index be81894c7abe7bb33f517a272c766b2fd2d950fd..81c6122afeaf11c54b1070c20e75491262a2e8e1 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * 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
@@ -30,6 +30,7 @@ static int            tls_auto_create = 0;
                                        /* 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;
@@ -43,6 +44,7 @@ static int            tls_options = -1;/* Options for TLS connections */
 
 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);
@@ -373,6 +375,39 @@ httpCredentialsAreValidForName(
   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);
   }
 
@@ -406,7 +441,10 @@ httpCredentialsGetTrust(
     return (HTTP_TRUST_UNKNOWN);
 
   if (cg->any_root < 0)
+  {
     _cupsSetDefaults();
+    http_gnutls_load_crl();
+  }
 
  /*
   * Look this common name up in the default keychains...
@@ -429,8 +467,15 @@ httpCredentialsGetTrust(
       * 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
@@ -822,6 +867,101 @@ http_gnutls_default_path(char   *buffer,/* I - Path buffer */
 }
 
 
+/*
+ * '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.
  */
index 5389668723b810087cc1ca4ae95f66c2f32bdaec..bf7d789ccf2e2558dc40b90fb4c54a12f4be25f9 100644 (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 */
 
 
@@ -45,7 +56,8 @@ typedef struct _cups_client_conf_s    /**** client.conf config data ****/
 #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 */
@@ -63,6 +75,11 @@ typedef struct _cups_client_conf_s   /**** client.conf config data ****/
  * 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);
@@ -923,6 +940,9 @@ _cupsSetDefaults(void)
     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;
 
@@ -938,6 +958,57 @@ _cupsSetDefaults(void)
 }
 
 
+#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.
  */
@@ -960,6 +1031,9 @@ cups_finalize_client_conf(
   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);
 
@@ -987,6 +1061,9 @@ cups_finalize_client_conf(
   * 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;
 
@@ -994,7 +1071,7 @@ cups_finalize_client_conf(
     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])
@@ -1084,9 +1161,38 @@ cups_init_client_conf(
   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__ */
 }
 
 
@@ -1123,6 +1229,8 @@ cups_read_client_conf(
 #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") &&
index cccb68a3f4d7151bfea51919857b14ceee928af9..dc5add425dbb66f3faa8dc3d29e70f393e390ef0 100644 (file)
@@ -44,6 +44,7 @@ HELPIMAGES    =       \
                        images/smiley.jpg
 HELPFILES      =       \
                        help/accounting.html \
+                       help/api-admin.html \
                        help/api-array.html \
                        help/api-cups.html \
                        help/api-filedir.html \
diff --git a/doc/help/api-admin.html b/doc/help/api-admin.html
new file mode 100644 (file)
index 0000000..b69b19d
--- /dev/null
@@ -0,0 +1,642 @@
+<!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 &lt;cups/cups.h&gt;
+#include &lt;cups/adminutil.h&gt;
+
+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, &amp;num_settings, &amp;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, &amp;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 &lt;cups/cups.h&gt;
+#include &lt;cups/adminutil.h&gt;
+
+
+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">&nbsp;DEPRECATED&nbsp;</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>
+&nbsp;&nbsp;&nbsp;&nbsp;http_t *http,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;const char *dest,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;char *buffer,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;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">&nbsp;DEPRECATED&nbsp;</span><a name="cupsAdminExportSamba">cupsAdminExportSamba</a></h3>
+<p class="description">Export a printer to Samba.</p>
+<p class="code">
+int cupsAdminExportSamba (<br>
+&nbsp;&nbsp;&nbsp;&nbsp;const char *dest,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;const char *ppd,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;const char *samba_server,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;const char *samba_user,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;const char *samba_password,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;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">&nbsp;CUPS 1.3/OS X 10.5&nbsp;</span><a name="cupsAdminGetServerSettings">cupsAdminGetServerSettings</a></h3>
+<p class="description">Get settings from the server.</p>
+<p class="code">
+int cupsAdminGetServerSettings (<br>
+&nbsp;&nbsp;&nbsp;&nbsp;http_t *http,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;int *num_settings,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;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">&nbsp;CUPS 1.3/OS X 10.5&nbsp;</span><a name="cupsAdminSetServerSettings">cupsAdminSetServerSettings</a></h3>
+<p class="description">Set settings on the server.</p>
+<p class="code">
+int cupsAdminSetServerSettings (<br>
+&nbsp;&nbsp;&nbsp;&nbsp;http_t *http,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;int num_settings,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;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">&nbsp;CUPS 1.4/OS X 10.6&nbsp;</span><a name="cupsGetDevices">cupsGetDevices</a></h3>
+<p class="description">Get available printer devices.</p>
+<p class="code">
+ipp_status_t cupsGetDevices (<br>
+&nbsp;&nbsp;&nbsp;&nbsp;http_t *http,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;int timeout,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;const char *include_schemes,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;const char *exclude_schemes,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_device_cb_t">cups_device_cb_t</a> callback,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;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 &quot;timeout&quot; parameter controls
+how long the request lasts, while the &quot;include_schemes&quot; and &quot;exclude_schemes&quot;
+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">&nbsp;CUPS 1.4/OS X 10.6&nbsp;</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>
index f1e367ce68b1fef0e11be782adc3e055d3f4ad39..1c1decb90390f1abdbab2a81f5b9b99867ef128e 100644 (file)
@@ -5,7 +5,7 @@
        <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;
index 648ad04c1f1e9fdc551f3b7114511fc424566ed3..3e685a3ce00ba30b9c30a61400b2b4dfb559db76 100644 (file)
@@ -5,7 +5,7 @@
        <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;
@@ -518,8 +518,6 @@ attributes.">pwgInitSize</a></li>
        <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>
@@ -3336,12 +3334,6 @@ typedef int (*cups_dest_cb_t)(void *user_data, unsigned flags, <a href="#cups_de
 <p class="code">
 typedef struct <a href="#cups_dest_s">cups_dest_s</a> cups_dest_t;
 </p>
-<h3 class="typedef"><span class="info">&nbsp;CUPS 1.4/OS X 10.6&nbsp;</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">&nbsp;CUPS 1.6/OS X 10.8&nbsp;</span><a name="cups_dinfo_t">cups_dinfo_t</a></h3>
 <p class="description">Destination capability and status
 information </p>
index a3d517e96598ebda3ffa3f1592a87bd89866e4f0..fcc2cdf8245feeb4707df7d7b2e49a48d225ac26 100644 (file)
@@ -5,7 +5,7 @@
        <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;
index ec59df70d56f5c50920151121d38dec91e35bc37..22ea732c23688735fa32a89475d214003ac23bc6 100644 (file)
@@ -5,7 +5,7 @@
        <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;
@@ -355,7 +355,7 @@ div.contents ul.subcontents li {
 <!--
   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
@@ -371,6 +371,7 @@ div.contents ul.subcontents li {
 <tr>
        <th>Headers</th>
        <th>cups/backend.h<br>
+       cups/ppd.h<br>
        cups/sidechannel.h</th>
 </tr>
 </thead>
@@ -439,7 +440,7 @@ div.contents ul.subcontents li {
 <!--
   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
@@ -723,7 +724,7 @@ prefix strings:</p>
        <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.
index faefc02bc3d4bf295964a07f995a0c4394fcc095..8aba40dc85451461ba106aeae7be97bbcb32b5e8 100644 (file)
@@ -5,7 +5,7 @@
        <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;
@@ -355,7 +355,7 @@ div.contents ul.subcontents li {
 <!--
   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
@@ -370,8 +370,10 @@ div.contents ul.subcontents li {
 <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>
index 685dc57786c62548066705d9a81b860124a5eb95..5960924cf3ca67ad72d839e26caa9f632025e678 100644 (file)
@@ -5,7 +5,7 @@
        <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;
@@ -355,7 +355,7 @@ div.contents ul.subcontents li {
 <!--
   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
@@ -371,20 +371,22 @@ div.contents ul.subcontents li {
 <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>
@@ -392,11 +394,12 @@ div.contents ul.subcontents li {
        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>
index 2b35702f8b457972dc03261c1df57b7f346ec3e7..ee57da5aaf7770ff04ad3e540697affc171f1557 100644 (file)
@@ -5,7 +5,7 @@
        <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;
index 19038d41ce43f3a981063774e001151f9eeffac3..7dfcf57c59eaa1663cc751028eb3349b0aff266c 100644 (file)
@@ -5,7 +5,7 @@
        <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;
index edf4470b612cfccb5ea8fab3885679905646eeea..97b618a5f63e6b64e41411d77bbd9655da524afe 100644 (file)
@@ -8,12 +8,14 @@
 <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">
@@ -24,7 +26,7 @@ The default is "Yes".
 <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>
@@ -46,6 +48,10 @@ The <i>AllowDH</i> option enables cipher suites using plain Diffie-Hellman key n
 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>
@@ -54,12 +60,23 @@ The <i>DenyTLS1.0</i> option disables TLS v1.0 support - this sets the minimum p
 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 &copy; 2007-2015 by Apple Inc.
+Copyright &copy; 2007-2016 by Apple Inc.
 
 </body>
 </html>
index 73d7c2d93767b4c75731c7f0af8c45e876c3c1a0..788e25a723f540a6abb9216ec995d290bbc673ff 100644 (file)
@@ -114,6 +114,7 @@ In CUPS, print files are always sent to the scheduler via IPP which has the same
 <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.
@@ -140,20 +141,54 @@ 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).
+<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 "#".
@@ -187,7 +222,7 @@ Print a presentation document 2-up to a printer called "foo":
 <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 &copy; 2007-2015 by Apple Inc.
+Copyright &copy; 2007-2016 by Apple Inc.
 
 </body>
 </html>
index 98fc7c638321731c224c494c1ae4e966ee19f01f..0e4801e2d9c30a48fb6a70090a1d97296c4c48a7 100644 (file)
@@ -86,6 +86,7 @@ This option is equivalent to <i>-o raw</i>.
 <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.
@@ -94,6 +95,60 @@ This option is equivalent to <i>-o prettyprint</i> and is only useful when print
 <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>
@@ -124,7 +179,7 @@ Print a presentation document 2-up to a printer called "foo":
 <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 &copy; 2007-2015 by Apple Inc.
+Copyright &copy; 2007-2016 by Apple Inc.
 
 </body>
 </html>
index 36a5e19fb462dc9b75bae01692a91fa90a1706be..065d8824a656fd199193cd1bf687bd10bdfcf7ce 100644 (file)
@@ -5,7 +5,7 @@
        <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;
index 9e601f8425d884a041ce531a6137fd4be8370269..7cfa2f7650200e1d3973c59dff2e5b5d1415f54a 100644 (file)
@@ -5,7 +5,7 @@
        <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;
index a44a16b094bdd64c33fae6fad5c95a674933dbdd..69e92144528c32b2a5bd786db681798b1dc1d3a7 100644 (file)
@@ -5,7 +5,7 @@
        <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;
index b8e3fe83cb02b6c0854912302ad048414c130b42..4f6c641ff8f80196fa5f8cfd27f85d116fd6867f 100644 (file)
@@ -5,7 +5,7 @@
        <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;
index 09fe5559a620cafdc5b5e987ca436b6e4309d128..152bc90cf7c13dabce356f4296cc4110cafda913 100644 (file)
@@ -209,38 +209,6 @@ apihelp:
                --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
index 5b1d522ccddd397362ff7ac8d7d79acd02a6deac..03fe5fa4c046adcd9432e2caa233b937196536c4 100644 (file)
@@ -1,7 +1,7 @@
 .\"
 .\" 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
@@ -32,7 +34,7 @@ The default is "Yes".
 .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
@@ -64,6 +66,12 @@ The \fIAllowRC4\fR option enables the 128-bit RC4 cipher suites, which are requi
 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
@@ -73,9 +81,20 @@ Specifies the default user name to use for requests.
 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.
index 4a0ece175b17eb70c575a2ae88a8a4a518eadf32..9ffc06a5b573876ec7d501fcb0539474873625fd 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * 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
@@ -1176,6 +1176,21 @@ cupsdCheckGroup(
     * 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);
index cc6e70eabb8ffc312da9329af43ac3eec60e7211..75e127979e0cda41d9aa0472a0cdfa6aa08dd367 100644 (file)
@@ -1694,7 +1694,24 @@ add_job(cupsd_client_t  *con,            /* I - Client connection */
     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...
@@ -6399,10 +6416,9 @@ get_jobs(cupsd_client_t  *con,           /* I - Client connection */
   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 */
@@ -6710,9 +6726,12 @@ get_jobs(cupsd_client_t  *con,           /* I - Client connection */
   }
   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...
@@ -6744,10 +6763,6 @@ get_jobs(cupsd_client_t  *con,           /* I - Client connection */
       if (job->id < first_job_id)
        continue;
 
-      current_index ++;
-      if (current_index < first_index)
-        continue;
-
       if (need_load_job && !job->attrs)
       {
         cupsdLoadJob(job);
@@ -8888,6 +8903,8 @@ release_held_new_jobs(
                     "Printer \"%s\" now printing pending/new jobs (\"%s\").",
                     printer->name, get_username(con));
 
+  cupsdCheckJobs();
+
  /*
   * Everything was ok, so return OK status...
   */
index 784490e089c934aa320a77c73cf37d2c4181e5d3..11412face92b626ee36049640211bbd706eaf08c 100644 (file)
@@ -227,6 +227,7 @@ cupsdCheckJobs(void)
                        *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);
@@ -320,6 +321,25 @@ cupsdCheckJobs(void)
        ((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...
     */
@@ -357,7 +377,7 @@ cupsdCheckJobs(void)
                         "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;
@@ -367,16 +387,14 @@ cupsdCheckJobs(void)
         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);
@@ -730,8 +748,8 @@ cupsdContinueJob(cupsd_job_t *job)  /* I - Job */
   * 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...
@@ -5165,7 +5183,7 @@ update_job(cupsd_job_t *job)              /* I - Job to check */
         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))
index 44a1b67886fe481e01f8b8f379ff9e4b96cd43b2..0a135a7a286086fc288a3a1bbf51742defe5c23d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * 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
@@ -582,9 +582,7 @@ cupsdLogJob(cupsd_job_t *job,               /* I - Job */
   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
@@ -700,10 +698,7 @@ cupsdLogJob(cupsd_job_t *job,              /* I - Job */
 
   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...
@@ -742,8 +737,7 @@ cupsdLogJob(cupsd_job_t *job,               /* I - Job */
 
       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);
index 62f846c5293e87f9cf0d972c0200295ed7babdd1..7aa7bd8f24cfc35c7096bcff3da742fc4ef54f77 100644 (file)
@@ -3809,6 +3809,12 @@ load_ppd(cupsd_printer_t *p)             /* I - Printer */
                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",
@@ -4413,6 +4419,7 @@ load_ppd(cupsd_printer_t *p)              /* I - Printer */
                     "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
     {
@@ -4420,6 +4427,7 @@ load_ppd(cupsd_printer_t *p)              /* I - Printer */
                    "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);
     }
 
    /*
@@ -4457,10 +4465,7 @@ load_ppd(cupsd_printer_t *p)             /* I - Printer */
       * 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;
@@ -4483,9 +4488,10 @@ load_ppd(cupsd_printer_t *p)             /* I - Printer */
         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 &&
@@ -4518,6 +4524,7 @@ load_ppd(cupsd_printer_t *p)              /* I - Printer */
       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
     {
@@ -4531,6 +4538,7 @@ load_ppd(cupsd_printer_t *p)              /* I - Printer */
       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);
     }
 
    /*
@@ -4550,6 +4558,8 @@ load_ppd(cupsd_printer_t *p)              /* I - Printer */
     {
       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);
 
index 7540d0ba8eecac9231377beaea6508a489027e2a..e72822abfcc68170eb85c919d90b92c2dcdc9bec 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * "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
@@ -31,7 +31,8 @@ main(int  argc,                               /* I - Number of command-line arguments */
   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? */
@@ -61,102 +62,106 @@ main(int  argc,                           /* I - Number of command-line arguments */
   */
 
   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
@@ -308,6 +313,7 @@ main(int  argc,                             /* I - Number of command-line arguments */
 
       ippDelete(response);
     }
+  }
 
   if (num_dests == 0 && op != IPP_CANCEL_JOB)
   {
index 38dff283d91f718b3c600190d76679c423f20f0d..27f379df3fddc1be0bccf71d3407ec5b18627b27 100644 (file)
@@ -2,7 +2,7 @@
  * "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
@@ -29,6 +29,7 @@ main(int  argc,                               /* I - Number of command-line arguments */
 {
   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 */
@@ -70,94 +71,90 @@ main(int  argc,                             /* I - Number of command-line arguments */
   */
 
   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
@@ -223,6 +220,7 @@ main(int  argc,                             /* I - Number of command-line arguments */
        }
       }
     }
+  }
 
   return (0);
 }
index e0f5541c3feace1874c8d8c6a068bc2c75d0e7cf..bc09b4b20613229dcd0428eaaf4d0a5aca156e05 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * "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
@@ -39,6 +39,7 @@ main(int  argc,                               /* I - Number of command-line arguments */
   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) */
@@ -84,427 +85,431 @@ main(int  argc,                           /* I - Number of command-line arguments */
   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)
@@ -525,8 +530,7 @@ main(int  argc,                             /* I - Number of command-line arguments */
 
       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);
       }
 
@@ -542,8 +546,10 @@ main(int  argc,                            /* I - Number of command-line arguments */
       }
     }
     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...
index 7775b4024d9408b894225d97e11e0a3cc8a6875d..1344b596e2082d303345c0ab001ce29fa678aecb 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * "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
@@ -54,6 +54,7 @@ main(int  argc,                       /* I - Number of command-line arguments */
   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 */
@@ -73,530 +74,518 @@ main(int  argc,                   /* I - Number of command-line arguments */
   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...
index 692cb3ab7e13dfd70a8cc4bb1d74b1beb257857c..16bdf0f992aabf31a0e21fb9879ee0cb21c040d3 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * "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
@@ -48,7 +48,8 @@ main(int  argc,                               /* I - Number of command-line arguments */
 {
   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 */
@@ -69,195 +70,175 @@ main(int  argc,                           /* I - Number of command-line arguments */
   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);
 }
index 9cba172c4a2ce46f7dc0859ce29cecccee5630ee..a3c4f01827704ca4acefdb78cf6f520d5d58dbc5 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * "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
@@ -36,7 +36,8 @@ main(int  argc,                               /* I - Number of command-line arguments */
 {
   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 */
@@ -54,43 +55,48 @@ main(int  argc,                             /* I - Number of command-line arguments */
   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)
@@ -112,6 +118,7 @@ main(int  argc,                             /* I - Number of command-line arguments */
       _cupsLangPrintf(stderr, _("lpmove: Unknown argument \"%s\"."), argv[i]);
       return (1);
     }
+  }
 
   if ((!jobid && !src) || !dest)
   {
index e2d95a9414bb5a14a0b3dbd1036031dc10556fe5..56b4f604ebaf1905076fe802d5d4fd407d572223 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * 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
@@ -43,7 +43,8 @@ main(int  argc,                               /* I - Number of command-line arguments */
   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 */
 
@@ -62,272 +63,256 @@ main(int  argc,                           /* I - Number of command-line arguments */
   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);
index c487f870867a88b919483882d1f2e48419cfb841..c13739fc8968cf70d27cdd641ae9629f56ce266f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * "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
@@ -48,6 +48,7 @@ main(int  argc,                               /* I - Number of command-line arguments */
 {
   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? */
@@ -71,395 +72,394 @@ main(int  argc,                           /* I - Number of command-line arguments */
   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);
index 51e454fb1cfe37c2ee985eca810d7d834a75530b..d19f433c6c1e1af732b21b7de13315ea352e4ea1 100644 (file)
@@ -1,7 +1,7 @@
 {#printer_name=0?:
 <TABLE CLASS="list" SUMMARY="Class List">
 <THEAD>
-<TR><TH><A HREF="{THISURL}?QUERY={?QUERY}&amp;WHICH_JOBS={?WHICH_JOBS}&amp;FIRST={FIRST}&amp;ORDER={ORDER=dec?asc:dec}">{ORDER=dec?<SMALL>&#x25b2;</SMALL> Queue Name <SMALL>&#x25b2;</SMALL>:<SMALL>&#x25bc;</SMALL> Queue Name <SMALL>&#x25bc;</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]
index c04d02bda393c044ab948c972c3dd8fd38563cbf..9b4630496bb5a3786084335141354a6a878ddaff 100644 (file)
@@ -1,7 +1,7 @@
 {#printer_name=0?:
 <TABLE CLASS="list" SUMMARY="Class List">
 <THEAD>
-<TR><TH><A HREF="{THISURL}?QUERY={?QUERY}&amp;WHICH_JOBS={?WHICH_JOBS}&amp;FIRST={FIRST}&amp;ORDER={ORDER=dec?asc:dec}">{ORDER=dec?<SMALL>&#x25b2;</SMALL> Wartweschlange <SMALL>&#x25b2;</SMALL>:<SMALL>&#x25bc;</SMALL> Warteschlange <SMALL>&#x25bc;</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]
index d24c3a194a5de40d3529fa27c0bc03307bd5d5db..7095926075bb8cfc195a9ec9925d400f525cac93 100644 (file)
@@ -1,7 +1,7 @@
 {#job_id=0?:
 <TABLE CLASS="list" SUMMARY="Auftragsliste">
 <THEAD>
-<TR><TH><A HREF="{THISURL}?QUERY={?QUERY}&amp;WHICH_JOBS={?WHICH_JOBS}&amp;FIRST={FIRST}&amp;ORDER={ORDER=dec?asc:dec}">{ORDER=dec?<SMALL>&#x25b2;</SMALL> ID <SMALL>&#x25b2;</SMALL>:<SMALL>&#x25bc;</SMALL> ID <SMALL>&#x25bc;</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]
@@ -11,9 +11,9 @@
 <TD>{?job_originating_user_name=?Einbehalten:{job_originating_user_name}}&nbsp;</TD>
 <TD>{job_k_octets}k&nbsp;</TD>
 <TD>{job_media_sheets_completed=0?Unbekannt:{?job_media_sheets_completed}}&nbsp;</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}}}}}}}&nbsp;{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}}}}}}}}&nbsp;{job_printer_state_message?<BR>
 <EM>"{job_printer_state_message}"</EM>:}</TD>
 <TD>
 {job_preserved>0?{job_state>5?
index 1164045a3ef63daa5cced87f4fa0e76ac421d029..2491b5921b13a89f044d9e5bd7a6c9c549e3902f 100644 (file)
@@ -1,6 +1,7 @@
 <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="&#x25c0; Vorherige anzeigen"></FORM>:&nbsp;}</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 &#x25b6;"></FORM>:&nbsp;}</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="&#x25c0;&#x25c0; 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="&#x25c0; Vorherige anzeigen"></FORM>:&nbsp;}</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 &#x25b6;"></FORM>:&nbsp;}
+       {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 &#x25b6;&#x25b6;"></FORM>:}</TD>
 </TR>
 </TABLE>
index 360154fec205752dbfcfc2227d6dddbfeef389e0..42be95bf55cbc447884ae7339c395d7fb9e7509e 100644 (file)
@@ -1,7 +1,7 @@
 {#printer_name=0?:
 <TABLE CLASS="list" SUMMARY="Druckerliste">
 <THEAD>
-<TR><TH><A HREF="{THISURL}?QUERY={?QUERY}&amp;WHICH_JOBS={?WHICH_JOBS}&amp;FIRST={FIRST}&amp;ORDER={ORDER=dec?asc:dec}">{ORDER=dec?<SMALL>&#x25b2;</SMALL> Queue Name <SMALL>&#x25b2;</SMALL>:<SMALL>&#x25bc;</SMALL> Queue Name <SMALL>&#x25bc;</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]
index 6fde7bf621273350ebaa0b34a5ebef93a37ffffb..30d4adbfaa942b26d159368c11b0f77dbc404e0f 100644 (file)
@@ -1,7 +1,7 @@
 {#printer_name=0?:
 <TABLE CLASS="list" SUMMARY="Lista de clases">
 <THEAD>
-<TR><TH><A HREF="{THISURL}?QUERY={?QUERY}&amp;WHICH_JOBS={?WHICH_JOBS}&amp;FIRST={FIRST}&amp;ORDER={ORDER=dec?asc:dec}">{ORDER=dec?<SMALL>&#x25b2;</SMALL> Nombre de la cola <SMALL>&#x25b2;</SMALL>:<SMALL>&#x25bc;</SMALL> Nombre de la cola <SMALL>&#x25bc;</SMALL>}</A></TH><TH>Descripci&oacute;n</TH><TH>Ubicaci&oacute;n</TH><TH>Miembros</TH><TH>Estado</TH></TR>
+<TR><TH>Nombre de la cola</TH><TH>Descripci&oacute;n</TH><TH>Ubicaci&oacute;n</TH><TH>Miembros</TH><TH>Estado</TH></TR>
 </THEAD>
 <TBODY>
 {[printer_name]
index 65fb6cbb41350c5705d1fb6fffa75f6b4793a2b1..def2939e2f53b4e850eed0d107748e1eaef613b7 100644 (file)
@@ -1,7 +1,7 @@
 {#job_id=0?:
 <TABLE CLASS="list" SUMMARY="Lista de trabajos">
 <THEAD>
-<TR><TH><A HREF="{THISURL}?QUERY={?QUERY}&amp;WHICH_JOBS={?WHICH_JOBS}&amp;FIRST={FIRST}&amp;ORDER={ORDER=dec?asc:dec}">{ORDER=dec?<SMALL>&#x25b2;</SMALL> ID <SMALL>&#x25b2;</SMALL>:<SMALL>&#x25bc;</SMALL> ID <SMALL>&#x25bc;</SMALL>}</A></TH><TH>Nombre</TH><TH>Usuario</TH><TH>Tama&ntilde;o</TH><TH>P&aacute;ginas</TH><TH>Estado</TH><TH>Control</TH></TR>
+<TR><TH>ID</TH><TH>Nombre</TH><TH>Usuario</TH><TH>Tama&ntilde;o</TH><TH>P&aacute;ginas</TH><TH>Estado</TH><TH>Control</TH></TR>
 </THEAD>
 <TBODY>
 {[job_id]
@@ -11,9 +11,9 @@
 <TD>{job_originating_user_name}&nbsp;</TD>
 <TD>{job_k_octets}k&nbsp;</TD>
 <TD>{job_media_sheets_completed=0?Desconocido:{?job_media_sheets_completed}}&nbsp;</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}}}}}}}&nbsp;{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}}}}}}}}&nbsp;{job_printer_state_message?<BR>
 <EM>"{job_printer_state_message}"</EM>:}</TD>
 <TD>
 {job_preserved>0?{job_state>5?
index 5f27c106058d0c113296477d4323d9cee012914b..2b228cbdad7a5fb8c859441b3215741bc9c6dd68 100644 (file)
@@ -1,6 +1,7 @@
 <TABLE CLASS="inset" SUMMARY="Barra de paginaci&oacute;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="&#x25c0; Mostrar anteriores"></FORM>:&nbsp;}</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 &#x25b6;"></FORM>:&nbsp;}</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="&#x25c0;&#x25c0; 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="&#x25c0; Mostrar anteriores"></FORM>:&nbsp;}</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 &#x25b6;"></FORM>:&nbsp;}
+       {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 &#x25b6;&#x25b6;"></FORM>:}</TD>
 </TR>
 </TABLE>
index 6b97fd9e6c297376b07f870bb496680d79ffd1b9..5d84b1ab78f4c0662ec33445837cf03fab69e58a 100644 (file)
@@ -1,7 +1,7 @@
 {#printer_name=0?:
 <TABLE CLASS="list" SUMMARY="Lista de impresoras">
 <THEAD>
-<TR><TH><A HREF="{THISURL}?QUERY={?QUERY}&amp;WHICH_JOBS={?WHICH_JOBS}&amp;FIRST={FIRST}&amp;ORDER={ORDER=dec?asc:dec}">{ORDER=dec?<SMALL>&#x25b2;</SMALL> Nombre de la cola <SMALL>&#x25b2;</SMALL>:<SMALL>&#x25bc;</SMALL> Nombre de la cola <SMALL>&#x25bc;</SMALL>}</A></TH><TH>Descripci&oacute;n</TH><TH>Ubicaci&oacute;n</TH><TH>Marca y modelo</TH><TH>Estado</TH></TR>
+<TR><TH>Nombre de la cola</TH><TH>Descripci&oacute;n</TH><TH>Ubicaci&oacute;n</TH><TH>Marca y modelo</TH><TH>Estado</TH></TR>
 </THEAD>
 <TBODY>
 {[printer_name]
index 823a832a9e6a55b216a482da3e09fcd4af12ab5e..64cd8c0059b0be25cca776cd7b49bf23327ec1a7 100644 (file)
@@ -1,7 +1,7 @@
 {#printer_name=0?:
 <TABLE CLASS="list" SUMMARY="クラスの一覧">
 <THEAD>
-<TR><TH><A HREF="{THISURL}?QUERY={?QUERY}&amp;WHICH_JOBS={?WHICH_JOBS}&amp;FIRST={FIRST}&amp;ORDER={ORDER=dec?asc:dec}">{ORDER=dec?<SMALL>&#x25b2;</SMALL> キュー名 <SMALL>&#x25b2;</SMALL>:<SMALL>&#x25bc;</SMALL> キュー名 <SMALL>&#x25bc;</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]
index 220c950aaf49a24c0e2f0e0c16cab7b42257779b..6904df4ee4d09ba82c916d364da9f5ec1402e8ed 100644 (file)
@@ -1,7 +1,7 @@
 {#job_id=0?:
 <TABLE CLASS="list" SUMMARY="ジョブの一覧">
 <THEAD>
-<TR><TH><A HREF="{THISURL}?QUERY={?QUERY}&amp;WHICH_JOBS={?WHICH_JOBS}&amp;FIRST={FIRST}&amp;ORDER={ORDER=dec?asc:dec}">{ORDER=dec?<SMALL>&#x25b2;</SMALL> ID <SMALL>&#x25b2;</SMALL>:<SMALL>&#x25bc;</SMALL> ID <SMALL>&#x25bc;</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]
@@ -11,9 +11,9 @@
 <TD>{?job_originating_user_name=?隠匿:{job_originating_user_name}}&nbsp;</TD>
 <TD>{job_k_octets}k&nbsp;</TD>
 <TD>{job_media_sheets_completed=0?不明:{?job_media_sheets_completed}}&nbsp;</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>に完了}}}}}}&nbsp;{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>に完了}}}}}}&nbsp;{job_printer_state_message?<BR>
 <EM>"{job_printer_state_message}"</EM>:}</TD>
 <TD>
 {job_preserved>0?{job_state>5?
index ebba3a0040c16e06c8a8413ccf645b1320e2a6cc..ff7e976415c7534ffd3db24243747dd7b996b2b7 100644 (file)
@@ -1,6 +1,7 @@
 <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="&#x25c0; 前を表示"></FORM>:&nbsp;}</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="次を表示 &#x25b6;"></FORM>:&nbsp;}</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="&#x25c0;&#x25c0; 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="&#x25c0; 前を表示"></FORM>:&nbsp;}</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="次を表示 &#x25b6;"></FORM>:&nbsp;}
+       {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 &#x25b6;&#x25b6;"></FORM>:}</TD>
 </TR>
 </TABLE>
index a8caaffd2abdd0b7d802a33d188c7e243f699ded..70bbc8158647c56fe5e45464e4b79c4b9d7abe4a 100644 (file)
@@ -1,7 +1,7 @@
 {#printer_name=0?:
 <TABLE CLASS="list" SUMMARY="プリンターの一覧">
 <THEAD>
-<TR><TH><A HREF="{THISURL}?QUERY={?QUERY}&amp;WHICH_JOBS={?WHICH_JOBS}&amp;FIRST={FIRST}&amp;ORDER={ORDER=dec?asc:dec}">{ORDER=dec?<SMALL>&#x25b2;</SMALL> キュー名 <SMALL>&#x25b2;</SMALL>:<SMALL>&#x25bc;</SMALL> キュー名 <SMALL>&#x25bc;</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]
index 541e786a6af0e159abcf74839da14a6942a6ffbd..2f62855947c3a3c018508ee4cf816b2a754f8d05 100644 (file)
@@ -1,7 +1,7 @@
 {#job_id=0?:
 <TABLE CLASS="list" SUMMARY="Job List">
 <THEAD>
-<TR><TH><A HREF="{THISURL}?QUERY={?QUERY}&amp;WHICH_JOBS={?WHICH_JOBS}&amp;FIRST={FIRST}&amp;ORDER={ORDER=dec?asc:dec}">{ORDER=dec?<SMALL>&#x25b2;</SMALL> ID <SMALL>&#x25b2;</SMALL>:<SMALL>&#x25bc;</SMALL> ID <SMALL>&#x25bc;</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]
@@ -11,9 +11,9 @@
 <TD>{?job_originating_user_name=?Withheld:{job_originating_user_name}}&nbsp;</TD>
 <TD>{job_k_octets}k&nbsp;</TD>
 <TD>{job_media_sheets_completed=0?Unknown:{?job_media_sheets_completed}}&nbsp;</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}}}}}}}&nbsp;{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}}}}}}}}&nbsp;{job_printer_state_message?<BR>
 <EM>"{job_printer_state_message}"</EM>:}</TD>
 <TD>
 {job_preserved>0?{job_state>5?
index ebd688d51bd65d64242cedbd27e947698e315047..76e01675dc819fec92109f4734b49a30a26356c3 100644 (file)
@@ -1,6 +1,7 @@
 <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="&#x25c0; Show Previous"></FORM>:&nbsp;}</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 &#x25b6;"></FORM>:&nbsp;}</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="&#x25c0;&#x25c0; 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="&#x25c0; Show Previous"></FORM>:&nbsp;}</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 &#x25b6;"></FORM>:&nbsp;}
+       {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 &#x25b6;&#x25b6;"></FORM>:}</TD>
 </TR>
 </TABLE>
index e0a3228d040915a04ef0ac2a7b10b6231c4e8c50..a80763e0c2aabbc4d2473b710bae0d272334cea1 100644 (file)
@@ -1,7 +1,7 @@
 {#printer_name=0?:
 <TABLE CLASS="list" SUMMARY="Printer List">
 <THEAD>
-<TR><TH><A HREF="{THISURL}?QUERY={?QUERY}&amp;WHICH_JOBS={?WHICH_JOBS}&amp;FIRST={FIRST}&amp;ORDER={ORDER=dec?asc:dec}">{ORDER=dec?<SMALL>&#x25b2;</SMALL> Queue Name <SMALL>&#x25b2;</SMALL>:<SMALL>&#x25bc;</SMALL> Queue Name <SMALL>&#x25bc;</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]
index ce1ff4ea87f76e7f5f38a62bd756aeaa4f380354..7240151b541b830166073586dacf312de2fb152f 100644 (file)
@@ -1,7 +1,7 @@
 {#printer_name=0?:
 <TABLE CLASS="list" SUMMARY="Class List">
 <THEAD>
-<TR><TH><A HREF="{THISURL}?QUERY={?QUERY}&amp;WHICH_JOBS={?WHICH_JOBS}&amp;FIRST={FIRST}&amp;ORDER={ORDER=dec?asc:dec}">{ORDER=dec?<SMALL>&#x25b2;</SMALL> Nome da fila <SMALL>&#x25b2;</SMALL>:<SMALL>&#x25bc;</SMALL> Nome da fila <SMALL>&#x25bc;</SMALL>}</A></TH><TH>Descri&ccedil;&atilde;o</TH><TH>Localiza&ccedil;&atilde;o</TH><TH>Membros</TH><TH>Estado</TH></TR>
+<TR><TH>Nome da fila</TH><TH>Descri&ccedil;&atilde;o</TH><TH>Localiza&ccedil;&atilde;o</TH><TH>Membros</TH><TH>Estado</TH></TR>
 </THEAD>
 <TBODY>
 {[printer_name]
index ed269803680462f0c8fc8275e361ede3a7ab870f..9f99dc766ef74ba7c07db1be14e3bd8e26a6ef32 100644 (file)
@@ -1,7 +1,7 @@
 {#job_id=0?:
 <TABLE CLASS="list" SUMMARY="Job List">
 <THEAD>
-<TR><TH><A HREF="{THISURL}?QUERY={?QUERY}&amp;WHICH_JOBS={?WHICH_JOBS}&amp;FIRST={FIRST}&amp;ORDER={ORDER=dec?asc:dec}">{ORDER=dec?<SMALL>&#x25b2;</SMALL> ID <SMALL>&#x25b2;</SMALL>:<SMALL>&#x25bc;</SMALL> ID <SMALL>&#x25bc;</SMALL>}</A></TH><TH>Nome</TH><TH>Usu&Atilde;&Acirc;¡rio</TH><TH>Tamanho</TH><TH>P&Atilde;&Acirc;¡ginas</TH><TH>Estado</TH><TH>Controle</TH></TR>
+<TR><TH>ID</TH><TH>Nome</TH><TH>Usu&Atilde;&Acirc;¡rio</TH><TH>Tamanho</TH><TH>P&Atilde;&Acirc;¡ginas</TH><TH>Estado</TH><TH>Controle</TH></TR>
 </THEAD>
 <TBODY>
 {[job_id]
@@ -11,9 +11,9 @@
 <TD>{?job_originating_user_name=?Retido:{job_originating_user_name}}&nbsp;</TD>
 <TD>{job_k_octets}k&nbsp;</TD>
 <TD>{job_media_sheets_completed=0?Desconhecido:{?job_media_sheets_completed}}&nbsp;</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&iacute;do em<BR>{time_at_completed}}}}}}}&nbsp;{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&iacute;do em<BR>{?time_at_completed=?Unknown:{time_at_completed}}}}}}}}&nbsp;{job_printer_state_message?<BR>
 <EM>"{job_printer_state_message}"</EM>:}</TD>
 <TD>
 {job_preserved>0?{job_state>5?
index a94ed45bbf7a5c469566bd2bdfcc484dd034551e..b388105cd89e43c78af63180e733319e39c20f2b 100644 (file)
@@ -1,6 +1,7 @@
 <TABLE CLASS="inset" SUMMARY="Barra de pagina&ccedil;&atilde;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="&#x25c0; Mostrar anterior"></FORM>:&nbsp;}</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&oacute;ximo &#x25b6;"></FORM>:&nbsp;}</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="&#x25c0;&#x25c0; 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="&#x25c0; Mostrar anterior"></FORM>:&nbsp;}</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&oacute;ximo &#x25b6;"></FORM>:&nbsp;}
+       {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 &#x25b6;&#x25b6;"></FORM>:}</TD>
 </TR>
 </TABLE>
index 9331ab0b88724cfa3c4b1059fa346350571c83f6..74e62a20d09613a9e92ddb945ae28125c1dfc82f 100644 (file)
@@ -1,7 +1,7 @@
 {#printer_name=0?:
 <TABLE CLASS="list" SUMMARY="Lista de impressoras">
 <THEAD>
-<TR><TH><A HREF="{THISURL}?QUERY={?QUERY}&amp;WHICH_JOBS={?WHICH_JOBS}&amp;FIRST={FIRST}&amp;ORDER={ORDER=dec?asc:dec}">{ORDER=dec?<SMALL>&#x25b2;</SMALL> Nome da fila <SMALL>&#x25b2;</SMALL>:<SMALL>&#x25bc;</SMALL> Nome da fila <SMALL>&#x25bc;</SMALL>}</A></TH><TH>Descri&ccedil;&atilde;o</TH><TH>Localiza&ccedil;&atilde;o</TH><TH>Marca e modelo</TH><TH>Estado</TH></TR>
+<TR><TH>Nome da fila</TH><TH>Descri&ccedil;&atilde;o</TH><TH>Localiza&ccedil;&atilde;o</TH><TH>Marca e modelo</TH><TH>Estado</TH></TR>
 </THEAD>
 <TBODY>
 {[printer_name]
index 9b90b761c17fe03f7f2dc25ed20f8665453cd947..a482ec7bbd532d73855f9c9f8d205f03ba1a941a 100644 (file)
@@ -1,7 +1,7 @@
 {#printer_name=0?:
 <TABLE CLASS="list" SUMMARY="Список групп">
 <THEAD>
-<TR><TH><A HREF="{THISURL}?QUERY={?QUERY}&amp;WHICH_JOBS={?WHICH_JOBS}&amp;FIRST={FIRST}&amp;ORDER={ORDER=dec?asc:dec}">{ORDER=dec?<SMALL>&#x25b2;</SMALL> Наименование <SMALL>&#x25b2;</SMALL>:<SMALL>&#x25bc;</SMALL> Наименование <SMALL>&#x25bc;</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]
index ce80fdba2b2063b4f3d6c783d87c89369ccff1e2..0359c3458055469d28e3dc59d4d3acdb10c62675 100644 (file)
@@ -1,7 +1,7 @@
 {#job_id=0?:
 <TABLE CLASS="list" SUMMARY="Задания">
 <THEAD>
-<TR><TH><A HREF="{THISURL}?QUERY={?QUERY}&amp;WHICH_JOBS={?WHICH_JOBS}&amp;FIRST={FIRST}&amp;ORDER={ORDER=dec?asc:dec}">{ORDER=dec?<SMALL>&#x25b2;</SMALL> Номер <SMALL>&#x25b2;</SMALL>:<SMALL>&#x25bc;</SMALL> ID <SMALL>&#x25bc;</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]
@@ -11,9 +11,9 @@
 <TD>{?job_originating_user_name=?Приостановлено пользователем:{job_originating_user_name}}&nbsp;</TD>
 <TD>{job_k_octets}k&nbsp;</TD>
 <TD>{job_media_sheets_completed=0?Неизвестно:{?job_media_sheets_completed}}&nbsp;</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}}}}}}}&nbsp;{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}}}}}}}}&nbsp;{job_printer_state_message?<BR>
 <EM>"{job_printer_state_message}"</EM>:}</TD>
 <TD>
 {job_preserved>0?{job_state>5?
index 0d0459b160320eb51b8a96c4dff606d22b17e93a..14eac868cf8735d56d17fef528d19c1e3384e23a 100644 (file)
@@ -1,6 +1,7 @@
 <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="&#x25c0; Предыдущая"></FORM>:&nbsp;}</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="Следующая &#x25b6;"></FORM>:&nbsp;}</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="&#x25c0;&#x25c0; 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="&#x25c0; Предыдущая"></FORM>:&nbsp;}</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="Следующая &#x25b6;"></FORM>:&nbsp;}
+       {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 &#x25b6;&#x25b6;"></FORM>:}</TD>
 </TR>
 </TABLE>
index 939835c19689924a6ed23a0886a459a58a9b8100..d71c51e18e05caec4418c5be29fb13615448e8be 100644 (file)
@@ -1,7 +1,7 @@
 {#printer_name=0?:
 <TABLE CLASS="list" SUMMARY="Список принтеров">
 <THEAD>
-<TR><TH><A HREF="{THISURL}?QUERY={?QUERY}&amp;WHICH_JOBS={?WHICH_JOBS}&amp;FIRST={FIRST}&amp;ORDER={ORDER=dec?asc:dec}">{ORDER=dec?<SMALL>&#x25b2;</SMALL> Наименование <SMALL>&#x25b2;</SMALL>:<SMALL>&#x25bc;</SMALL> Наименование <SMALL>&#x25bc;</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]
index 475894d4f7fa8e2cf902b0c5d89ee6e2a307da08..1e9b5147efa955e8b404239c5f8a52c0d7c9d9d3 100755 (executable)
@@ -3,7 +3,7 @@
 # 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
@@ -490,8 +490,11 @@ StrictConformance Yes
 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
@@ -649,7 +652,7 @@ echo "    $VALGRIND ../scheduler/cupsd -c $BASE/cupsd.conf -f >$BASE/log/debug_l
 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
index 4637da3fbe4f96f5c3b8aa1be1fc34141e5ba5cb..de1abf73100f2cfa6a416ac387792f5387d544d4 100644 (file)
@@ -1,27 +1,6 @@
-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.
index e8e73f6b13acf149398042b854dc3e8f2c4e7161..fdbfd68e45884b08034bfd6556e3cbbf878bcc35 100644 (file)
@@ -585,6 +585,13 @@ typedef unsigned long useconds_t;
 /* #undef HAVE_SCDYNAMICSTORECOPYCOMPUTERNAME */
 
 
+/*
+ * Do we have the getgrouplist() function?
+ */
+
+#undef HAVE_GETGROUPLIST
+
+
 /*
  * Do we have OS X 10.4's mbr_XXX functions?
  */
index 277d7623f9b28aa5b1049fa22ee30736c0dddb71..dfa1e247d641660e514d15796262943baaabad0f 100644 (file)
@@ -50,8 +50,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ippfind", "ippfind.vcproj",
                {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
diff --git a/vcnet/sw-ippeveselfcert10.vdproj b/vcnet/sw-ippeveselfcert10.vdproj
deleted file mode 100644 (file)
index 2895a46..0000000
+++ /dev/null
@@ -1,1581 +0,0 @@
-"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
index afeb2026ea59b45365cb9f6c53dc8978ea57c5dd..93dd19ac6fadf51976443a5d3a9ea0901439c742 100644 (file)
                                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 */,
index e16c6667cbaa50488f07e09f363528926a79b041..98aa98749a1d501e1f08a00f83ab2c52ebb9231e 100644 (file)
 #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?
  */