/*
- * "$Id: cupstestppd.c,v 1.7 2003/02/14 20:01:26 mike Exp $"
+ * "$Id: cupstestppd.c,v 1.8 2003/02/14 21:08:29 mike Exp $"
*
* PPD test program for the Common UNIX Printing System (CUPS).
*
int verbose; /* Want verbose output? */
int status; /* Exit status */
int errors; /* Number of conformance errors */
+ int ppdversion; /* PPD spec version in PPD file */
ppd_status_t error; /* Status of ppdOpen*() */
int line; /* Line number for error */
ppd_file_t *ppd; /* PPD file record */
if (verbose > 0)
puts("\n CONFORMANCE TESTS:");
- errors = 0;
+ errors = 0;
+ ppdversion = 43;
+
+ if ((ptr = ppdFindAttr(ppd, "FormatVersion", NULL)) != NULL)
+ {
+ ppdversion = (int)(10 * atof(ptr) + 0.5);
+
+ if (ppdversion < 43 && verbose > 0)
+ printf(" WARN Obsolete PPD version %s!\n", ptr);
+ }
if (ppdFindAttr(ppd, "DefaultImageableArea", NULL) != NULL)
{
if (verbose > 0)
puts(" PASS Manufacturer");
}
+ else if (ppdversion < 43)
+ {
+ if (verbose > 0)
+ puts(" WARN REQUIRED Manufacturer");
+ }
else
{
errors ++;
else if (verbose > 0)
puts(" PASS ShortNickName");
}
+ else if (ppdversion < 43)
+ {
+ if (verbose > 0)
+ puts(" WARN REQUIRED ShortNickName");
+ }
else
{
errors ++;
/*
- * End of "$Id: cupstestppd.c,v 1.7 2003/02/14 20:01:26 mike Exp $".
+ * End of "$Id: cupstestppd.c,v 1.8 2003/02/14 21:08:29 mike Exp $".
*/