]> git.ipfire.org Git - thirdparty/cups-filters.git/commitdiff
libcupsfilters: Undo previous commit of stderr message removal
authorTill Kamppeter <till.kamppeter@gmail.com>
Mon, 31 Jan 2022 16:39:15 +0000 (13:39 -0300)
committerTill Kamppeter <till.kamppeter@gmail.com>
Mon, 31 Jan 2022 16:39:15 +0000 (13:39 -0300)
We do not need to remove the stderr messages from cupsFindAttr(), the
function is only used by printer drivers not by filter functions. It
will be moved into a separate library.

cupsfilters/attr.c

index ab82dd28b72e03e9f8624d62d5a28b55493bff63..81ca9bc629bc3d274a129de84bd3b77554b81d03 100644 (file)
@@ -63,33 +63,42 @@ cupsFindAttr(ppd_file_t *ppd,               /* I - PPD file */
   */
 
   snprintf(spec, specsize, "%s.%s.%s", colormodel, media, resolution);
+  fprintf(stderr, "DEBUG2: Looking for \"*%s %s\"...\n", name, spec);
   if ((attr = ppdFindAttr(ppd, name, spec)) != NULL && attr->value != NULL)
     return (attr);
 
   snprintf(spec, specsize, "%s.%s", colormodel, resolution);
+  fprintf(stderr, "DEBUG2: Looking for \"*%s %s\"...\n", name, spec);
   if ((attr = ppdFindAttr(ppd, name, spec)) != NULL && attr->value != NULL)
     return (attr);
 
   snprintf(spec, specsize, "%s", colormodel);
+  fprintf(stderr, "DEBUG2: Looking for \"*%s %s\"...\n", name, spec);
   if ((attr = ppdFindAttr(ppd, name, spec)) != NULL && attr->value != NULL)
     return (attr);
 
   snprintf(spec, specsize, "%s.%s", media, resolution);
+  fprintf(stderr, "DEBUG2: Looking for \"*%s %s\"...\n", name, spec);
   if ((attr = ppdFindAttr(ppd, name, spec)) != NULL && attr->value != NULL)
     return (attr);
 
   snprintf(spec, specsize, "%s", media);
+  fprintf(stderr, "DEBUG2: Looking for \"*%s %s\"...\n", name, spec);
   if ((attr = ppdFindAttr(ppd, name, spec)) != NULL && attr->value != NULL)
     return (attr);
 
   snprintf(spec, specsize, "%s", resolution);
+  fprintf(stderr, "DEBUG2: Looking for \"*%s %s\"...\n", name, spec);
   if ((attr = ppdFindAttr(ppd, name, spec)) != NULL && attr->value != NULL)
     return (attr);
 
   spec[0] = '\0';
+  fprintf(stderr, "DEBUG2: Looking for \"*%s\"...\n", name);
   if ((attr = ppdFindAttr(ppd, name, spec)) != NULL && attr->value != NULL)
     return (attr);
 
+  fprintf(stderr, "DEBUG2: No instance of \"*%s\" found...\n", name);
+
   return (NULL);
 }