From 54e5ec55c2968c8e2a7133cd817314588526b6ac Mon Sep 17 00:00:00 2001 From: mike Date: Thu, 20 Feb 2003 14:20:15 +0000 Subject: [PATCH] Mirror 1.1.x change. git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.2@3394 7a7537e8-13f0-0310-91df-b6672ffda945 --- systemv/cupstestppd.c | 60 +++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 31 deletions(-) diff --git a/systemv/cupstestppd.c b/systemv/cupstestppd.c index 26e60c6677..30c50a49ac 100644 --- a/systemv/cupstestppd.c +++ b/systemv/cupstestppd.c @@ -1,5 +1,5 @@ /* - * "$Id: cupstestppd.c,v 1.1.2.15 2003/02/20 14:12:03 mike Exp $" + * "$Id: cupstestppd.c,v 1.1.2.16 2003/02/20 14:20:15 mike Exp $" * * PPD test program for the Common UNIX Printing System (CUPS). * @@ -336,35 +336,6 @@ main(int argc, /* I - Number of command-line arguments */ 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) @@ -718,6 +689,33 @@ main(int argc, /* I - Number of command-line arguments */ 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) @@ -869,5 +867,5 @@ usage(void) /* - * End of "$Id: cupstestppd.c,v 1.1.2.15 2003/02/20 14:12:03 mike Exp $". + * End of "$Id: cupstestppd.c,v 1.1.2.16 2003/02/20 14:20:15 mike Exp $". */ -- 2.47.3