]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - scheduler/mime.c
Load cups into easysw/current.
[thirdparty/cups.git] / scheduler / mime.c
index fc1f3fac750d72260e2a30db9c19bbe573fc6081..6edaa4a663742905f00545f284492f0637985834 100644 (file)
@@ -1,25 +1,16 @@
 /*
- * "$Id: mime.c 5495 2006-05-05 17:58:07Z mike $"
+ * "$Id: mime.c 6649 2007-07-11 21:46:42Z mike $"
  *
  *   MIME database file routines for the Common UNIX Printing System (CUPS).
  *
+ *   Copyright 2007 by Apple Inc.
  *   Copyright 1997-2006 by Easy Software Products, all rights reserved.
  *
  *   These coded instructions, statements, and computer programs are the
- *   property of Easy Software Products and are protected by Federal
- *   copyright law.  Distribution and use rights are outlined in the file
- *   "LICENSE.txt" which should have been included with this file.  If this
- *   file is missing or damaged please contact Easy Software Products
- *   at:
- *
- *       Attn: CUPS Licensing Information
- *       Easy Software Products
- *       44141 Airport View Drive, Suite 204
- *       Hollywood, Maryland 20636 USA
- *
- *       Voice: (301) 373-9600
- *       EMail: cups-info@cups.org
- *         WWW: http://www.cups.org
+ *   property of Apple Inc. and are protected by Federal copyright
+ *   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+ *   which should have been included with this file.  If this file is
+ *   file is missing or damaged, see the license at "http://www.cups.org/".
  *
  * Contents:
  *
@@ -51,6 +42,7 @@
 #include <stdlib.h>
 #include <ctype.h>
 
+#include <cups/debug.h>
 #include <cups/dir.h>
 #include <cups/string.h>
 #include "mime.h"
@@ -486,6 +478,8 @@ load_convs(mime_t       *mime,              /* I - MIME database */
   if ((fp = cupsFileOpen(filename, "r")) == NULL)
     return;
 
+  DEBUG_printf(("\"%s\":\n", filename));
+
  /*
   * Then read each line from the file, skipping any comments in the file...
   */
@@ -496,6 +490,8 @@ load_convs(mime_t       *mime,              /* I - MIME database */
     * Skip blank lines and lines starting with a #...
     */
 
+    DEBUG_puts(line);
+
     if (!line[0] || line[0] == '#')
       continue;
 
@@ -544,7 +540,10 @@ load_convs(mime_t       *mime,             /* I - MIME database */
       continue;
 
     if ((dsttype = mimeType(mime, super, type)) == NULL)
+    {
+      DEBUG_printf(("    Destination type %s/%s not found!\n", super, type));
       continue;
+    }
 
    /*
     * Then get the cost and filter program...
@@ -575,7 +574,10 @@ load_convs(mime_t       *mime,             /* I - MIME database */
       */
 
       if (!add_fcache(filtercache, filter, filterpath))
+      {
+        DEBUG_printf(("    Filter %s not found in %s!\n", filter, filterpath)); 
         continue;
+      }
     }
 
    /*
@@ -655,6 +657,8 @@ load_types(mime_t     *mime,                /* I - MIME database */
   if ((fp = cupsFileOpen(filename, "r")) == NULL)
     return;
 
+  DEBUG_printf(("\"%s\":\n", filename));
+
  /*
   * Then read each line from the file, skipping any comments in the file...
   */
@@ -665,6 +669,8 @@ load_types(mime_t     *mime,                /* I - MIME database */
     * Skip blank lines and lines starting with a #...
     */
 
+    DEBUG_puts(line);
+
     if (!line[0] || line[0] == '#')
       continue;
 
@@ -723,5 +729,5 @@ load_types(mime_t     *mime,                /* I - MIME database */
 
 
 /*
- * End of "$Id: mime.c 5495 2006-05-05 17:58:07Z mike $".
+ * End of "$Id: mime.c 6649 2007-07-11 21:46:42Z mike $".
  */