Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support bare staple and bind finishings values #1094

Merged
merged 1 commit into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ Changes in CUPS v2.5b1 (TBA)
- Fixed memory leak when unloading a job (Issue #813)
- Fixed memory leak when creating color profiles (Issue #814)
- Fixed punch finisher support for IPP Everywhere printers (Issue #821)
- Fixed staple and bind finisher support for IPP Everywhere printers
(Issue #1073)
- Fixed crash in `scan_ps()` if incoming argument is NULL (Issue #831)
- Fixed setting job state reasons for successful jobs (Issue #832)
- Fixed infinite loop in IPP backend if hostname is IP address with Kerberos
Expand Down
6 changes: 3 additions & 3 deletions cups/ppd-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -4550,7 +4550,7 @@ _ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
value = ippGetInteger(attr, i);
keyword = ippEnumString("finishings", value);

if (!strncmp(keyword, "staple-", 7) || !strncmp(keyword, "bind-", 5) || !strncmp(keyword, "edge-stitch-", 12) || !strcmp(keyword, "saddle-stitch"))
if (!strncmp(keyword, "staple-", 7) || !strncmp(keyword, "bind-", 5) || !strncmp(keyword, "edge-stitch-", 12) || !strcmp(keyword, "saddle-stitch") || !strcmp(keyword, "staple") || !strcmp(keyword, "bind"))
break;
}

Expand Down Expand Up @@ -4597,7 +4597,7 @@ _ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
value = ippGetInteger(attr, i);
keyword = ippEnumString("finishings", value);

if (strncmp(keyword, "staple-", 7) && strncmp(keyword, "bind-", 5) && strncmp(keyword, "edge-stitch-", 12) && strcmp(keyword, "saddle-stitch"))
if (strncmp(keyword, "staple-", 7) && strncmp(keyword, "bind-", 5) && strncmp(keyword, "edge-stitch-", 12) && strcmp(keyword, "saddle-stitch") && strcmp(keyword, "staple") && strcmp(keyword, "bind"))
continue;

if (cupsArrayFind(names, (char *)keyword))
Expand Down Expand Up @@ -4988,7 +4988,7 @@ _ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
option = "FoldType";
else if (!strncmp(keyword, "punch-", 6))
option = "PunchMedia";
else if (!strncmp(keyword, "bind-", 5) || !strncmp(keyword, "edge-stitch-", 12) || !strcmp(keyword, "saddle-stitch") || !strncmp(keyword, "staple-", 7))
else if (!strncmp(keyword, "bind-", 5) || !strncmp(keyword, "edge-stitch-", 12) || !strcmp(keyword, "saddle-stitch") || !strncmp(keyword, "staple-", 7) || !strcmp(keyword, "staple") || !strcmp(keyword, "bind"))
option = "StapleLocation";

if (option && keyword)
Expand Down
Loading