]> git.ipfire.org Git - thirdparty/cups-filters.git/commitdiff
libcupsfilters: In ieee1284NormalizeMakeAndModel() do not remove extra after ()
authorTill Kamppeter <till.kamppeter@gmail.com>
Thu, 13 Jan 2022 17:39:09 +0000 (14:39 -0300)
committerTill Kamppeter <till.kamppeter@gmail.com>
Thu, 13 Jan 2022 17:39:09 +0000 (14:39 -0300)
If a PPD's NickName has extra info in parentheses after the model name
we have thrown away any further text after the parentheses. As
PPD-retro-fitting Printer Applications add the PPD's language (for
example "(en)") to the end of the NickName and then call
ieee1284NormalizeMakeAndModel() to generate the unique driver name,
this language info extension gets thrown away and the unique driver
name identical for all language versions of the same printer's PPD,
making the entries clobbering each other leaving only the first in the
alphabet, which is often German ("de") and rarely English.

Now we do not remove any part of the input string's extra info to
remedy this problem.

cupsfilters/ieee1284.c

index 4b39d99ded19a6978a5899d7b9487463085cdf4d..c8553bec6b8fb33d8068da43d3c021abe8e7e8a4 100644 (file)
@@ -1197,11 +1197,6 @@ ieee1284NormalizeMakeAndModel(
            extraptr --;
        else
        {
-         /* If extra info starts with parenthese and a closing parenthese is
-            also present, take only what is in the parentheses */
-         if (*extraptr == '(' &&
-             (bufptr = strchr(extraptr, ')')) != NULL)
-           *bufptr = '\0';
          /* Let extra info start at first alphanumeric character */
          while(!isalnum(*extraptr) && *extraptr != '\0')
            extraptr ++;