diff options
author | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2008-07-15 01:21:40 +0000 |
---|---|---|
committer | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2008-07-15 01:21:40 +0000 |
commit | 1f0275e3cc0bc5fbe11e3bffd54581aa05c9c764 (patch) | |
tree | fac6166e65e5ecf207f69d77e00529a7337d91ac /systemv/cupstestppd.c | |
parent | 4509bb49335b3edfdb1b03d83d6cd05890968b59 (diff) | |
download | cups-1f0275e3cc0bc5fbe11e3bffd54581aa05c9c764.tar.gz |
Merge changes from CUPS 1.4svn-r7715.
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@859 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'systemv/cupstestppd.c')
-rw-r--r-- | systemv/cupstestppd.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/systemv/cupstestppd.c b/systemv/cupstestppd.c index b3b3ff0ce..b23175649 100644 --- a/systemv/cupstestppd.c +++ b/systemv/cupstestppd.c @@ -1628,12 +1628,12 @@ check_basics(const char *filename) /* I - PPD file to check */ if (eol == EOL_NONE) eol = EOL_CRLF; - else + else if (eol != EOL_CRLF) mixed = 1; } else if (eol == EOL_NONE) eol = EOL_CR; - else + else if (eol != EOL_CR) mixed = 1; } @@ -1831,11 +1831,12 @@ check_filters(ppd_file_t *ppd, /* I - PPD file */ int verbose, /* I - Verbosity level */ int warn) /* I - Warnings only? */ { + int i; /* Looping var */ ppd_attr_t *attr; /* PPD attribute */ const char *ptr; /* Pointer into string */ char super[16], /* Super-type for filter */ type[256], /* Type for filter */ - program[256], /* Program/filter name */ + program[1024], /* Program/filter name */ pathprog[1024]; /* Complete path to program/filter */ int cost; /* Cost of filter */ const char *prefix; /* WARN/FAIL prefix */ @@ -1843,13 +1844,10 @@ check_filters(ppd_file_t *ppd, /* I - PPD file */ prefix = warn ? " WARN " : "**FAIL**"; - for (attr = ppdFindAttr(ppd, "cupsFilter", NULL); - attr; - attr = ppdFindNextAttr(ppd, "cupsFilter", NULL)) + for (i = 0; i < ppd->num_filters; i ++) { - if (!attr->value || - sscanf(attr->value, "%15[^/]/%255s%d%255s", super, type, &cost, - program) != 4) + if (sscanf(ppd->filters[i], "%15[^/]/%255s%d%*[ \t]%1023[^\n]", super, type, + &cost, program) != 4) { if (!warn && !errors && !verbose) _cupsLangPuts(stdout, _(" FAIL\n")); @@ -1857,7 +1855,7 @@ check_filters(ppd_file_t *ppd, /* I - PPD file */ if (verbose >= 0) _cupsLangPrintf(stdout, _(" %s Bad cupsFilter value \"%s\"!\n"), - prefix, attr->value ? attr->value : ""); + prefix, ppd->filters[i]); if (!warn) errors ++; @@ -1899,8 +1897,8 @@ check_filters(ppd_file_t *ppd, /* I - PPD file */ attr = ppdFindNextAttr(ppd, "cupsPreFilter", NULL)) { if (!attr->value || - sscanf(attr->value, "%15[^/]/%255s%d%255s", super, type, &cost, - program) != 4) + sscanf(attr->value, "%15[^/]/%255s%d%*[ \t]%1023[^\n]", super, type, + &cost, program) != 4) { if (!warn && !errors && !verbose) _cupsLangPuts(stdout, _(" FAIL\n")); |