]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - scheduler/cups-driverd.c
Load cups into easysw/current.
[thirdparty/cups.git] / scheduler / cups-driverd.c
index 8cebb09e8e4489151b7a2a1b73b537de154cd681..39892bc71f0a42c0fb9664a791385e6519e290be 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: cups-driverd.c 177 2006-06-21 00:20:03Z jlovell $"
+ * "$Id: cups-driverd.c 6211 2007-01-23 15:44:34Z mike $"
  *
  *   PPD/driver support for the Common UNIX Printing System (CUPS).
  *
@@ -147,6 +147,7 @@ add_ppd(const char *name,           /* I - PPD name */
        size_t     size)                /* I - File size */
 {
   ppd_info_t   *ppd;                   /* PPD */
+  char         *recommended;           /* Foomatic driver string */
 
 
  /*
@@ -197,6 +198,14 @@ add_ppd(const char *name,          /* I - PPD name */
           sizeof(ppd->record.make_and_model));
   strlcpy(ppd->record.device_id, device_id, sizeof(ppd->record.device_id));
 
+ /*
+  * Strip confusing (and often wrong) "recommended" suffix added by
+  * Foomatic drivers...
+  */
+
+  if ((recommended = strstr(ppd->record.make_and_model, " (recommended)")) != NULL)
+    *recommended = '\0';
+
  /*
   * Return the new PPD pointer...
   */
@@ -1113,5 +1122,5 @@ load_drivers(void)
 
 
 /*
- * End of "$Id: cups-driverd.c 177 2006-06-21 00:20:03Z jlovell $".
+ * End of "$Id: cups-driverd.c 6211 2007-01-23 15:44:34Z mike $".
  */