Skip to content

Commit

Permalink
libcupsfilters: Let the PPD generator not put any dashes into the PPD…
Browse files Browse the repository at this point in the history
… option and choice names
  • Loading branch information
tillkamppeter committed Feb 16, 2020
1 parent 99cb951 commit cc1354c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
7 changes: 7 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ NEWS - OpenPrinting CUPS Filters v1.27.0 - 2020-01-26

CHANGES IN V1.27.1

- libcupsfilters: Let the PPD generator not put any dashes
into the PPD option and choice names when translating them
from IPP attribute names, to avoid that on the
back-translation by CUPS no double-dashes are
generated. This broke paper tray selections with tray names
like "tray-1", "tray-2", ... (Issue #192, Issue #201, Debian
bug #949315).
- foomatic-rip: Fixed segfault when PRINTER environment
variable is not supplied.
- foomatic-rip: Handle zero page jobs (Issue #117, Pull
Expand Down
5 changes: 3 additions & 2 deletions cupsfilters/ppdgenerator.c
Original file line number Diff line number Diff line change
Expand Up @@ -4297,9 +4297,10 @@ pwg_ppdize_name(const char *ipp, /* I - IPP keyword */
*name = (char)toupper(*ipp++);

for (ptr = name + 1, end = name + namesize - 1; *ipp && ptr < end;) {
if (*ipp == '-' && _cups_isalpha(ipp[1])) {
if (*ipp == '-') {
ipp ++;
*ptr++ = (char)toupper(*ipp++ & 255);
if (_cups_isalpha(*ipp))
*ptr++ = (char)toupper(*ipp++ & 255);
} else
*ptr++ = *ipp++;
}
Expand Down

0 comments on commit cc1354c

Please sign in to comment.