From: Michael R Sweet Date: Wed, 17 Apr 2024 00:08:57 +0000 (-0400) Subject: Fix support for simple punch finisher (Issue #821) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2bc9a48b9792e3c233a57ccc53ace615f3b58954;p=thirdparty%2Fcups.git Fix support for simple punch finisher (Issue #821) --- diff --git a/CHANGES.md b/CHANGES.md index 13226c3f1e..28df48d74b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -61,6 +61,7 @@ Changes in CUPS v2.5b1 (TBA) - Fixed printing to stderr if we can't open cups-files.conf (Issue #777) - 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 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 diff --git a/cups/ppd-cache.c b/cups/ppd-cache.c index 93ea0034cc..29ba78fa0c 100644 --- a/cups/ppd-cache.c +++ b/cups/ppd-cache.c @@ -4516,11 +4516,11 @@ _ppdCreateFromIPP(char *buffer, /* I - Filename buffer */ cupsArrayAdd(fin_options, "*StapleLocation"); - cupsFilePrintf(fp, "*OpenUI *StapleLocation/%s: PickOne\n", _cupsLangString(base_lang, "finishing.4")); + cupsFilePrintf(fp, "*OpenUI *StapleLocation/%s: PickOne\n", _cupsLangString(base_lang, "finishings.4")); cupsFilePuts(fp, "*OrderDependency: 10 AnySetup *StapleLocation\n"); ppd_put_strings(fp, langs, "Translation", "StapleLocation", "finishings.4"); cupsFilePuts(fp, "*DefaultStapleLocation: None\n"); - cupsFilePrintf(fp, "*StapleLocation None/%s: \"\"\n", _cupsLangString(base_lang, "finishing.3")); + cupsFilePrintf(fp, "*StapleLocation None/%s: \"\"\n", _cupsLangString(base_lang, "finishings.3")); ppd_put_strings(fp, langs, "StapleLocation", "None", "finishings.3"); for (; i < count; i ++) @@ -4644,7 +4644,7 @@ _ppdCreateFromIPP(char *buffer, /* I - Filename buffer */ value = ippGetInteger(attr, i); keyword = ippEnumString("finishings", value); - if (!strncmp(keyword, "cups-punch-", 11) || !strncmp(keyword, "punch-", 6)) + if (!strcmp(keyword, "punch") || !strncmp(keyword, "cups-punch-", 11) || !strncmp(keyword, "punch-", 6)) break; } @@ -4690,7 +4690,7 @@ _ppdCreateFromIPP(char *buffer, /* I - Filename buffer */ if (!strncmp(keyword, "cups-punch-", 11)) keyword += 5; - else if (strncmp(keyword, "punch-", 6)) + else if (strcmp(keyword, "punch") && strncmp(keyword, "punch-", 6)) continue; if (cupsArrayFind(names, (char *)keyword))