/*
- * "$Id: cupstestppd.c,v 1.15 2003/02/20 14:11:40 mike Exp $"
+ * "$Id: cupstestppd.c,v 1.16 2003/02/20 14:19:30 mike Exp $"
*
* PPD test program for the Common UNIX Printing System (CUPS).
*
errors ++;
}
-
- /*
- * Then verify that no other options share a common root name.
- */
-
- len = strlen(option->keyword);
-
- for (m = 0, group2 = ppd->groups;
- m < ppd->num_groups;
- m ++, group2 ++)
- for (n = 0, option2 = group2->options;
- n < group2->num_options;
- n ++, option2 ++)
- if (option != option2 &&
- len < strlen(option2->keyword) &&
- !strncmp(option->keyword, option2->keyword, len))
- {
- if (verbose >= 0)
- {
- if (!errors && !verbose)
- puts(" FAIL");
-
- printf(" **FAIL** %s shares a common prefix with %s\n",
- option->keyword, option2->keyword);
- puts(" REF: Page 15, section 3.2.");
- }
-
- errors ++;
- }
}
if (ppdFindAttr(ppd, "FileVersion", NULL) != NULL)
puts(" WARN ShortNickName required by PPD 4.3 spec.");
puts(" REF: Pages 64-65, section 5.3.");
}
+
+ /*
+ * Check for options with a common prefix, e.g. Duplex and Duplexer,
+ * which are errors according to the spec but won't cause problems
+ * with CUPS specifically...
+ */
+
+ for (j = 0, group = ppd->groups; j < ppd->num_groups; j ++, group ++)
+ for (k = 0, option = group->options; k < group->num_options; k ++, option ++)
+ {
+ len = strlen(option->keyword);
+
+ for (m = 0, group2 = ppd->groups;
+ m < ppd->num_groups;
+ m ++, group2 ++)
+ for (n = 0, option2 = group2->options;
+ n < group2->num_options;
+ n ++, option2 ++)
+ if (option != option2 &&
+ len < strlen(option2->keyword) &&
+ !strncmp(option->keyword, option2->keyword, len))
+ {
+ printf(" WARN %s shares a common prefix with %s\n",
+ option->keyword, option2->keyword);
+ puts(" REF: Page 15, section 3.2.");
+ }
+ }
}
if (verbose > 0)
/*
- * End of "$Id: cupstestppd.c,v 1.15 2003/02/20 14:11:40 mike Exp $".
+ * End of "$Id: cupstestppd.c,v 1.16 2003/02/20 14:19:30 mike Exp $".
*/