]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Also test custom page size code for CUPS raster drivers.
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Tue, 4 Sep 2007 22:37:17 +0000 (22:37 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Tue, 4 Sep 2007 22:37:17 +0000 (22:37 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@6912 7a7537e8-13f0-0310-91df-b6672ffda945

CHANGES-1.3.txt
systemv/cupstestppd.c

index b5592da63632f0a87bc78ef9890367c2deab310e..15f6356b317a2cb4678d828bded70f9e677ffc74 100644 (file)
@@ -5,6 +5,8 @@ CHANGES-1.3.txt
 CHANGES IN CUPS V1.3.1
 
        - Documentation updates.
+       - The cupstestppd utility now tests the custom page size code
+         for CUPS raster drivers.
        - cupsLangDefault() did not attempt to return a language that
          was supported by the calling application.
        - If a remote printer stopped while a job was being sent, the
index 46378d0208251ceb9e9a3e47ad2992ab0d7745d7..60b295b676d67881b1ed4c7cea6c493153ceeb5e 100644 (file)
@@ -2393,8 +2393,30 @@ test_raster(ppd_file_t *ppd,             /* I - PPD file */
 
     return (0);
   }
-  else
+
+ /*
+  * Try a test of custom page size code, if available...
+  */
+
+  if (!ppdPageSize(ppd, "Custom.612x792"))
     return (1);
+
+  ppdMarkOption(ppd, "PageSize", "Custom.612x792");
+
+  if (cupsRasterInterpretPPD(&header, ppd, 0, NULL, 0))
+  {
+    if (!verbose)
+      _cupsLangPuts(stdout, _(" FAIL\n"));
+
+    if (verbose >= 0)
+      _cupsLangPrintf(stdout,
+                     _("      **FAIL**  Default option code cannot be "
+                       "interpreted: %s\n"), cupsRasterErrorString());
+
+    return (0);
+  }
+
+  return (1);
 }