]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Add PPD test.
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 31 Jul 2013 18:06:15 +0000 (18:06 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 31 Jul 2013 18:06:15 +0000 (18:06 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@11205 a1ca3aef-8c08-0410-bb20-df032aa958be

cups/testcups.c
doc/help/man-cupsaddsmb.html

index 00a22965ac3ede77122745fe7905783941538d8a..b4b79569c087beac930f1a4f464052888d299c12 100644 (file)
@@ -171,10 +171,27 @@ main(int  argc,                           /* I - Number of command-line arguments */
       else
        puts("No password entered.");
     }
+    else if (!strcmp(argv[1], "ppd") && argc == 3)
+    {
+     /*
+      * ./testcups ppd printer
+      */
+
+      http_status_t    http_status;    /* Status */
+      char             buffer[1024];   /* PPD filename */
+      time_t           modtime = 0;    /* Last modified */
+
+      if ((http_status = cupsGetPPD3(CUPS_HTTP_DEFAULT, argv[2], &modtime,
+                                     buffer, sizeof(buffer))) != HTTP_STATUS_OK)
+        printf("Unable to get PPD: %d (%s)\n", (int)http_status,
+               cupsLastErrorString());
+      else
+        puts(buffer);
+    }
     else if (!strcmp(argv[1], "print") && argc == 5)
     {
      /*
-      * ./testcups printer file interval
+      * ./testcups print printer file interval
       */
 
       int              interval,       /* Interval between writes */
@@ -246,6 +263,10 @@ main(int  argc,                            /* I - Number of command-line arguments */
       puts("");
       puts("    ./testcups password");
       puts("");
+      puts("Get the PPD file:");
+      puts("");
+      puts("    ./testcups ppd printer");
+      puts("");
       puts("Print a file (interval controls delay between buffers in seconds):");
       puts("");
       puts("    ./testcups print printer file interval");
index 0bb0ddcd9a8ae2f1a56e0dc61e2fabe621d27b9e..cc4e46e6c945360c4eb301504fe0de460eb7a3cf 100644 (file)
@@ -162,8 +162,6 @@ Getting the full set of Windows driver files should be easier.
 <h2 class="title"><a name="SEE_ALSO">See Also</a></h2>
 <i>smbd(8)</i>, <i>smb.conf(5)</i>,
 <a href='http://localhost:631/help'>http://localhost:631/help</a>
-<br>
-<a href='http://www.cups.org/windows/'>http://www.cups.org/windows/</a>
 
 <h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
 Copyright 2007-2013 by Apple Inc.