]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Merge changes from CUPS 1.4svn-r7715.
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Thu, 3 Jul 2008 05:38:29 +0000 (05:38 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Thu, 3 Jul 2008 05:38:29 +0000 (05:38 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@834 a1ca3aef-8c08-0410-bb20-df032aa958be

26 files changed:
CHANGES.txt
cups/debug.c
cups/debug.h
cups/globals.h
cups/http.c
cups/libcups.exp
cups/libcups_s.exp
filter/commandtops.c
ppdc/Dependencies
ppdc/Makefile
ppdc/drv.cxx [deleted file]
ppdc/ppdc-catalog.cxx
ppdc/ppdc-driver.cxx
ppdc/ppdc-file.cxx
ppdc/ppdc-source.cxx
ppdc/ppdc.h
ppdc/sample.drv
ppdc/testcatalog.cxx [new file with mode: 0644]
scheduler/Dependencies
scheduler/Makefile
scheduler/cups-driverd.cxx [moved from scheduler/cups-driverd.c with 78% similarity]
scheduler/job.c
scheduler/log.c
scheduler/util.h
test/5.9-lpinfo.sh
test/run-stp-tests.sh

index 410b57e124a7270d3b1c9d12aaa512e5c4a1120c..7bc73013223789139c031288bf7dfa2c5b1acebf 100644 (file)
@@ -1,8 +1,12 @@
-CHANGES.txt - 2008-06-25
+CHANGES.txt - 2008-07-02
 ------------------------
 
 CHANGES IN CUPS V1.4b1
 
+       - The PPD compiler did not include OID query keywords in PPD
+         files (STR #2871)
+       - The cups-driverd helper program now directly supports driver
+         information files.
        - The USB backend now uses libusb when available (STR #1575)
        - Added ppdLocalizeAttr function to get the localized version
          of an attribute.
index 96594797671f3024443687b5cfe5d5ee684eabc8..cfb8bd6aa0d44d4efbe2f4bd6a3d25c48d60ab6d 100644 (file)
 #include <unistd.h>
 
 
+/*
+ * Globals...
+ */
+
+int                    _cups_debug_fd = -1;
+                                       /* Debug log file descriptor */
+
+
 #ifdef DEBUG
+/*
+ * Local globals...
+ */
+
+static int             debug_init = 0; /* Did we initialize debugging? */
+#  ifdef HAVE_PTHREAD_H
+static pthread_mutex_t debug_mutex = PTHREAD_MUTEX_INITIALIZER;
+                                       /* Mutex to control initialization */
+#  endif /* HAVE_PTHREAD_H */
+
+
 /*
  * 'debug_vsnprintf()' - Format a string into a fixed size buffer.
  */
@@ -376,30 +395,40 @@ _cups_debug_printf(const char *format,    /* I - Printf-style format string */
   char                 buffer[2048];   /* Output buffer */
   size_t               bytes;          /* Number of bytes in buffer */
   const char           *cups_debug_log;/* CUPS_DEBUG_LOG environment variable */
-  _cups_globals_t      *cg = _cupsGlobals();
-                                       /* Global data */
 
 
  /*
   * See if we need to do any logging...
   */
 
-  if (!cg->debug_init)
+  if (!debug_init)
   {
-    cg->debug_init = 1;
+   /*
+    * Get a lock on the debug initializer, then re-check in case another
+    * thread already did it...
+    */
 
-    if ((cups_debug_log = getenv("CUPS_DEBUG_LOG")) == NULL)
-      cg->debug_fd = -1;
-    else if (!strcmp(cups_debug_log, "-"))
-      cg->debug_fd = 2;
-    else
+    pthread_mutex_lock(&debug_mutex);
+
+    if (!debug_init)
     {
-      snprintf(buffer, sizeof(buffer), cups_debug_log, getpid());
-      cg->debug_fd = open(buffer, O_WRONLY | O_APPEND | O_CREAT, 0644);
+      debug_init = 1;
+
+      if ((cups_debug_log = getenv("CUPS_DEBUG_LOG")) == NULL)
+       _cups_debug_fd = -1;
+      else if (!strcmp(cups_debug_log, "-"))
+       _cups_debug_fd = 2;
+      else
+      {
+       snprintf(buffer, sizeof(buffer), cups_debug_log, getpid());
+       _cups_debug_fd = open(buffer, O_WRONLY | O_APPEND | O_CREAT, 0644);
+      }
     }
+
+    pthread_mutex_unlock(&debug_mutex);
   }
 
-  if (cg->debug_fd < 0)
+  if (_cups_debug_fd < 0)
     return;
 
  /*
@@ -428,7 +457,7 @@ _cups_debug_printf(const char *format,      /* I - Printf-style format string */
   * Write it out...
   */
 
-  write(cg->debug_fd, buffer, bytes);
+  write(_cups_debug_fd, buffer, bytes);
 }
 
 
index 8b91d936672b2026fdecfc08bc7ed10fa51c1f0d..69213dc9197b64b709ae0ddb0516782c46bd74ea 100644 (file)
@@ -42,6 +42,7 @@
  * Prototypes...
  */
 
+extern int     _cups_debug_fd;
 extern void    _cups_debug_printf(const char *format, ...)
 #ifdef __GNUC__
 __attribute__ ((__format__ (__printf__, 1, 2)))
index 1629ec35e612ba5b0d2563bd824a6c9c26d76147..d098e868e6ba88047ca0cbc975eaa77dde03ff68 100644 (file)
@@ -68,12 +68,6 @@ typedef struct _cups_globals_s               /**** CUPS global state data ****/
   char                 resolved_uri[1024];
                                        /* Buffer for cupsBackendDeviceURI */
 
-#ifdef DEBUG
-  /* debug.c */
-  int                  debug_init,     /* Did we initialize debugging? */
-                       debug_fd;       /* Debug log file descriptor */
-#endif /* DEBUG */
-
   /* file.c */
   cups_file_t          *stdio_files[3];/* stdin, stdout, stderr */
 
index 8baf29119589d30b158b4c7f47c5df397b662fcb..7a150a0b184bc0c1db783851751b7febc0b812aa 100644 (file)
@@ -2439,10 +2439,9 @@ http_debug_hex(const char *prefix,       /* I - Prefix for line */
   char line[255],                      /* Line buffer */
        *start,                         /* Start of line after prefix */
        *ptr;                           /* Pointer into line */
-  _cups_globals_t *cg = _cupsGlobals();        /* Global data */
 
 
-  if (cg->debug_init && cg->debug_fd < 0)
+  if (_cups_debug_fd < 0)
     return;
 
   DEBUG_printf(("%s: %d bytes:\n", prefix, bytes));
index 20c66feffee75b5b48eae353242381349f009532..4100b6e48f52fa940f64233313bf399ba9b3efdb 100644 (file)
@@ -1,3 +1,4 @@
+__cups_debug_fd
 __cups_debug_printf
 __cups_debug_puts
 __cups_strcpy
index 129ad39a1c61e10a595eb9b68be617d126b6c8ef..c952a35ff9e47206c1974a4811add21cedf15f6b 100644 (file)
@@ -1,3 +1,4 @@
+_cups_debug_fd
 _cupsAdminGetServerSettings
 _cupsAdminSetServerSettings
 _cupsCharmapFlush
index ecde9916ab228e318878e41c0e0f534f21c0a24a..0a0666e769ed1deb85b3b07137214e998a0dfa1d 100644 (file)
@@ -17,6 +17,8 @@
  *   main()                 - Process a CUPS command file.
  *   auto_configure()       - Automatically configure the printer using
  *                            PostScript query commands and/or SNMP lookups.
+ *   begin_ps()             - Send the standard PostScript prolog.
+ *   end_ps()               - Send the standard PostScript trailer.
  *   print_self_test_page() - Print a self-test page.
  *   report_levels()        - Report supply levels.
  */
@@ -35,6 +37,8 @@
  */
 
 static void    auto_configure(ppd_file_t *ppd, const char *user);
+static void    begin_ps(ppd_file_t *ppd, const char *user);
+static void    end_ps(ppd_file_t *ppd);
 static void    print_self_test_page(ppd_file_t *ppd, const char *user);
 static void    report_levels(ppd_file_t *ppd, const char *user);
 
@@ -155,14 +159,7 @@ auto_configure(ppd_file_t *ppd,            /* I - PPD file */
   * Put the printer in PostScript mode...
   */
 
-  if (ppd->jcl_begin)
-  {
-    fputs(ppd->jcl_begin, stdout);
-    fputs(ppd->jcl_ps, stdout);
-  }
-
-  puts("%!");
-  fflush(stdout);
+  begin_ps(ppd, user);
 
  /*
   * Then loop through every option in the PPD file and ask for the current
@@ -237,6 +234,39 @@ auto_configure(ppd_file_t *ppd,            /* I - PPD file */
   * Finish the job...
   */
 
+  end_ps(ppd);
+}
+
+
+/*
+ * 'begin_ps()' - Send the standard PostScript prolog.
+ */
+
+static void
+begin_ps(ppd_file_t *ppd,              /* I - PPD file */
+         const char *user)             /* I - Username */
+{
+  (void)user;
+
+  if (ppd->jcl_begin)
+  {
+    fputs(ppd->jcl_begin, stdout);
+    fputs(ppd->jcl_ps, stdout);
+  }
+
+  puts("%!");
+  puts("userdict dup(\\004)cvn{}put (\\004\\004)cvn{}put\n");
+  fflush(stdout);
+}
+
+
+/*
+ * 'end_ps()' - Send the standard PostScript trailer.
+ */
+
+static void
+end_ps(ppd_file_t *ppd)                        /* I - PPD file */
+{
   if (ppd->jcl_begin)
     fputs(ppd->jcl_begin, stdout);
   else
@@ -258,13 +288,7 @@ print_self_test_page(ppd_file_t *ppd,      /* I - PPD file */
   * Put the printer in PostScript mode...
   */
 
-  if (ppd->jcl_begin)
-  {
-    fputs(ppd->jcl_begin, stdout);
-    fputs(ppd->jcl_ps, stdout);
-  }
-
-  puts("%!");
+  begin_ps(ppd, user);
 
  /*
   * Send a simple file the draws a box around the imageable area and shows
@@ -287,12 +311,7 @@ print_self_test_page(ppd_file_t *ppd,      /* I - PPD file */
   * Finish the job...
   */
 
-  if (ppd->jcl_begin)
-    fputs(ppd->jcl_begin, stdout);
-  else
-    putchar(0x04);
-
-  fflush(stdout);
+  end_ps(ppd);
 }
 
 
@@ -308,30 +327,18 @@ report_levels(ppd_file_t *ppd,            /* I - PPD file */
   * Put the printer in PostScript mode...
   */
 
-  if (ppd->jcl_begin)
-  {
-    fputs(ppd->jcl_begin, stdout);
-    fputs(ppd->jcl_ps, stdout);
-  }
+  begin_ps(ppd, user);
 
  /*
-  * Send a query job that just reports the product string - network backends
-  * will gather the supply levels via SNMP.
+  * Don't bother sending any additional PostScript commands, since we just
+  * want the backend to have enough time to collect the supply info.
   */
 
-  puts("%!");
-  puts("product =");
-
  /*
   * Finish the job...
   */
 
-  if (ppd->jcl_begin)
-    fputs(ppd->jcl_begin, stdout);
-  else
-    putchar(0x04);
-
-  fflush(stdout);
+  end_ps(ppd);
 }
 
 
index b5f4d4bacf36afcb5d3b7893fa91130548b03af8..624f0b2144f244c5b425d51b088007e1822ab5e0 100644 (file)
@@ -51,10 +51,6 @@ ppdc-string.o: ppdc.h ../cups/string.h ../config.h ../cups/file.h
 ppdc-string.o: ../cups/versioning.h
 ppdc-variable.o: ppdc.h ../cups/string.h ../config.h ../cups/file.h
 ppdc-variable.o: ../cups/versioning.h
-drv.o: ppdc.h ../cups/string.h ../config.h ../cups/file.h
-drv.o: ../cups/versioning.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
-drv.o: ../cups/string.h ../cups/ppd.h ../cups/array.h ../cups/file.h
-drv.o: ../cups/language.h ../cups/dir.h
 ppdc.o: ppdc.h ../cups/string.h ../config.h ../cups/file.h
 ppdc.o: ../cups/versioning.h
 ppdhtml.o: ppdc.h ../cups/string.h ../config.h ../cups/file.h
@@ -66,3 +62,5 @@ ppdmerge.o: ../cups/string.h ../cups/ppd.h ../cups/array.h ../cups/file.h
 ppdmerge.o: ../cups/language.h ../cups/array.h ../cups/string.h ../config.h
 ppdpo.o: ppdc.h ../cups/string.h ../config.h ../cups/file.h
 ppdpo.o: ../cups/versioning.h
+testcatalog.o: ppdc.h ../cups/string.h ../config.h ../cups/file.h
+testcatalog.o: ../cups/versioning.h
index fc0fbc885eabe411023442d8d9f371f2cc20497e..34f8a61e084f794e75e10eb8f1543efdaa5ac71d 100644 (file)
@@ -46,24 +46,24 @@ LIBOBJS =   \
                ppdc-variable.o
 OBJS =         \
                $(LIBOBJS) \
-               drv.o \
                ppdc.o \
                ppdhtml.o \
                ppdi.o \
                ppdmerge.o \
-               ppdpo.o
+               ppdpo.o \
+               testcatalog.o
 LIBTARGETS =   \
                $(LIBCUPSPPDC) \
                libcupsppdc.a \
                ppdc-static
 TARGETS        =       \
                $(LIBTARGETS) \
-               drv \
                ppdc \
                ppdhtml \
                ppdi \
                ppdmerge \
-               ppdpo
+               ppdpo \
+               testcatalog
 
 
 #
@@ -115,9 +115,6 @@ install:    all install-data install-headers install-libs install-exec
 install-data:
        $(INSTALL_DIR) $(DATADIR)/drv
        $(INSTALL_DATA) sample.drv $(DATADIR)/drv
-       if test `uname` = Darwin; then \
-               $(INSTALL_DIR) /Library/Printers/PPDs.drv; \
-       fi
 
 
 #
@@ -132,8 +129,6 @@ install-exec:
        $(INSTALL_BIN) ppdi $(BINDIR)
        $(INSTALL_BIN) ppdmerge $(BINDIR)
        $(INSTALL_BIN) ppdpo $(BINDIR)
-       $(INSTALL_DIR) $(SERVERBIN)/driver
-       $(INSTALL_BIN) drv $(SERVERBIN)/driver
        if test "x$(SYMROOT)" != "x"; then \
                $(INSTALL_DIR) $(SYMROOT); \
                for file in $(TARGETS); do \
@@ -189,13 +184,8 @@ uninstall:
        $(RM) $(BINDIR)/ppdi
        $(RM) $(BINDIR)/ppdmerge
        $(RM) $(BINDIR)/ppdpo
-       $(RM) $(SERVERBIN)/driver/drv
-       $(RMDIR) $(SERVERBIN)/driver
        $(RM) $(DATADIR)/drv/sample.drv
        $(RMDIR) $(DATADIR)/drv
-       if test `uname` = Darwin; then \
-               $(RMDIR) /Library/Printers/PPDs.drv; \
-       fi
        $(RM) $(LIBDIR)/libcupsppdc.1.dylib
        $(RM) $(LIBDIR)/libcupsppdc.a
        $(RM) $(LIBDIR)/libcupsppdc.dylib
@@ -229,15 +219,6 @@ framedhelp:
                ppdc.h $(LIBOBJS:.o=.cxx)
 
 
-#
-# drv, the CUPS driver interface program to the PPD compiler.
-#
-
-drv:                   drv.o $(LIBCUPSPPDC) ../cups/$(LIBCUPS)
-       echo Linking $@...
-       $(CXX) $(LDFLAGS) -o $@ drv.o -L. -lcupsppdc $(LIBS)
-
-
 #
 # ppdc, the PPD compiler.
 #
@@ -292,6 +273,16 @@ ppdpo:                     ppdpo.o $(LIBCUPSPPDC) ../cups/$(LIBCUPS)
        $(CXX) $(LDFLAGS) -o $@ ppdpo.o -L. -lcupsppdc $(LIBS)
 
 
+#
+# testcatalog, test ppdcCatalog class.
+#
+
+testcatalog:           testcatalog.o libcupsppdc.a ../cups/libcups.a
+       echo Linking $@...
+       $(CXX) $(LDFLAGS) -o $@ testcatalog.o libcupsppdc.a \
+               ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
+
+
 #
 # libcupsppdc.so.1, libcupsppdc.sl.1
 #
diff --git a/ppdc/drv.cxx b/ppdc/drv.cxx
deleted file mode 100644 (file)
index 8c0aec6..0000000
+++ /dev/null
@@ -1,438 +0,0 @@
-//
-// "$Id$"
-//
-//   DDK driver interface main entry for the CUPS PPD Compiler.
-//
-//   Copyright 2007-2008 by Apple Inc.
-//   Copyright 2002-2006 by Easy Software Products.
-//
-//   These coded instructions, statements, and computer programs are the
-//   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:
-//
-//   main()      - Enumerate or display PPD files.
-//   cat_ppd()   - Display a PPD file.
-//   list_ppds() - List PPDs.
-//
-
-//
-// Include necessary headers...
-//
-
-#include "ppdc.h"
-#include <cups/cups.h>
-#include <cups/dir.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-
-
-//
-// Local functions...
-//
-
-static int     cat_ppd(ppdcSource *src, const char *name);
-static int     list_drvs(const char *pathname, const char *prefix);
-static int     list_ppds(ppdcSource *src, const char *name);
-
-
-//
-// 'main()' - Enumerate or display PPD files.
-//
-
-int                                    // O - Exit status
-main(int  argc,                                // I - Number of command-line arguments
-     char *argv[])                     // I - Command-line arguments
-{
-  const char   *datadir;               // CUPS_DATADIR
-  ppdcSource   *src;                   // PPD source file data
-  char         filename[1024],         // Full path to .drv file(s)
-               scheme[32],             // URI scheme ("drv")
-               userpass[256],          // User/password info (unused)
-               host[2],                // Hostname (unused)
-               resource[1024],         // Resource path (/dir/to/filename.drv)
-               *pc_file_name;          // Filename portion of URI
-  int          port,                   // Port number (unused)
-               status;                 // Exit status
-
-
-  // Determine where CUPS has installed the data files...
-  if ((datadir = getenv("CUPS_DATADIR")) == NULL)
-    datadir = CUPS_DATADIR;
-
-  // List all available PPDs or cat a single PPD...
-  if (argc == 2 && !strcmp(argv[1], "list"))
-  {
-#ifdef __APPLE__
-    if (!access("/Library/Printers/PPDs.drv", 0))
-      list_drvs("/Library/Printers/PPDs.drv", "/Library/Printers/PPDs.drv");
-#endif // __APPLE__
-
-    snprintf(filename, sizeof(filename), "%s/drv", datadir);
-    return (list_drvs(filename, "/"));
-  }
-  else if (argc == 3 && !strcmp(argv[1], "cat"))
-  {
-    httpSeparateURI(HTTP_URI_CODING_ALL, argv[2], scheme, sizeof(scheme),
-                    userpass, sizeof(userpass), host, sizeof(host), &port,
-                   resource, sizeof(resource));
-
-    if (strstr(resource, "../") ||
-        (pc_file_name = strrchr(resource, '/')) == NULL ||
-       pc_file_name == resource)
-    {
-      fprintf(stderr, "ERROR: Bad driver info URI \"%s\"!\n", argv[2]);
-      return (1);
-    }
-
-    *pc_file_name++ = '\0';
-
-#ifdef __APPLE__
-    if (!strncmp(resource, "/Library/Printers/PPDs.drv/", 27))
-      strlcpy(filename, resource, sizeof(filename));
-    else
-#endif // __APPLE__
-
-    snprintf(filename, sizeof(filename), "%s/drv%s", datadir, resource);
-
-    src = new ppdcSource(filename);
-
-    status = cat_ppd(src, pc_file_name);
-
-    delete src;
-
-    return (status);
-  }
-  
-  fprintf(stderr, "ERROR: Usage: %s cat URI\n", argv[0]);
-  fprintf(stderr, "ERROR: Usage: %s list\n", argv[0]);
-
-  return (1);
-}
-
-
-//
-// 'cat_ppd()' - Display a PPD file.
-//
-
-static int                             // O - Exit status
-cat_ppd(ppdcSource *src,               // I - Driver info file
-        const char *name)              // I - PC filename
-{
-  ppdcDriver   *d;                     // Current driver
-  cups_file_t  *out;                   // Stdout via CUPS file API 
-  
-  for (d = (ppdcDriver *)src->drivers->first();
-       d;
-       d = (ppdcDriver *)src->drivers->next())
-    if (!strcmp(name, d->pc_file_name->value))
-    {
-      out = cupsFileStdout();
-
-      d->write_ppd_file(out, NULL, NULL, src, PPDC_LFONLY);
-      cupsFileClose(out);
-      return (0);
-    }
-  
-  return (1);
-}
-
-
-//
-// 'list_drvs()' - List all drv files in the given path...
-//
-
-static int                             // O - Exit status
-list_drvs(const char *pathname,                // I - Full path to directory
-          const char *prefix)          // I - Prefix for directory
-{
-  char         *ext,                   // Extension on file
-               filename[1024],         // Full path to .drv file(s)
-               newprefix[1024];        // New prefix for directory
-  cups_dir_t   *dir;                   // Current directory
-  cups_dentry_t        *dent;                  // Current directory entry
-
-
-  if ((dir = cupsDirOpen(pathname)) == NULL)
-    return (1);
-
-  while ((dent = cupsDirRead(dir)) != NULL)
-  {
-    // Skip "dot" files...
-    if (dent->filename[0] == '.')
-      continue;
-
-    // See if this is a file or directory...
-    snprintf(filename, sizeof(filename), "%s/%s", pathname, dent->filename);
-
-    if (S_ISDIR(dent->fileinfo.st_mode))
-    {
-      // Descend into the subdirectory...
-      snprintf(newprefix, sizeof(newprefix), "%s%s/", prefix, dent->filename);
-
-      if (list_drvs(filename, newprefix))
-      {
-       cupsDirClose(dir);
-       return (1);
-      }
-    }
-    else if ((ext = strrchr(dent->filename, '.')) != NULL &&
-             (!strcmp(ext, ".drv") || !strcmp(ext, ".drv.gz")))
-    {
-      // List the PPDs in this driver info file...
-      ppdcSource *src = new ppdcSource(filename);
-                                       // Driver info file
-
-      snprintf(newprefix, sizeof(newprefix), "%s%s", prefix, dent->filename);
-      list_ppds(src, newprefix);
-      delete src;
-    }
-  }
-
-  cupsDirClose(dir);
-
-  return (0);
-}
-
-
-//
-// 'list_ppds()' - List PPDs in a driver info file.
-//
-
-static int                             // O - Exit status
-list_ppds(ppdcSource *src,             // I - Driver info file
-          const char *name)            // I - Name of driver info file
-{
-  ppdcDriver   *d;                     // Current driver
-  ppdcAttr     *attr;                  // 1284DeviceID attribute
-  char         uri[1024];              // Driver URI
-
-
-  for (d = (ppdcDriver *)src->drivers->first();
-       d;
-       d = (ppdcDriver *)src->drivers->next())
-  {
-    httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "drv", "", "", 0,
-                     "%s/%s", name, d->pc_file_name->value);
-
-    attr = d->find_attr("1284DeviceID", NULL);
-
-    printf("\"%s\" en \"%s\" \"%s\" \"%s\"\n", uri, d->manufacturer->value,
-           d->model_name->value, attr ? attr->value->value : "");
-  }
-
-  return (0);
-}
-
-
-
-
-#if 0
-
-
-
-  // Scan the command-line...
-  catalog = NULL;
-  outdir  = "ppd";
-  src     = 0;
-  verbose = 0;
-  locales = NULL;
-  comp    = PPDC_NO_COMPRESSION;
-  le      = PPDC_LFONLY;
-
-  for (i = 1; i < argc; i ++)
-    if (argv[i][0] == '-')
-    {
-      for (opt = argv[i] + 1; *opt; opt ++)
-        switch (*opt)
-       {
-         case 'c' :                    // Message catalog...
-             i ++;
-              if (i >= argc)
-                usage();
-
-              if (verbose > 1)
-               printf("ppdc: Loading messages from \"%s\"...\n", argv[i]);
-
-              if (!catalog)
-               catalog = new ppdcCatalog("en");
-
-              if (catalog->load_messages(argv[i]))
-             {
-               fprintf(stderr,
-                       "ppdc: Unable to load localization file \"%s\" - %s\n",
-                       argv[i], strerror(errno));
-                return (1);
-             }
-             break;
-
-          case 'd' :                   // Output directory...
-             i ++;
-             if (i >= argc)
-               usage();
-
-              if (verbose > 1)
-               printf("ppdc: Writing PPD files to directory \"%s\"...\n",
-                      argv[i]);
-
-             outdir = argv[i];
-             break;
-
-          case 'l' :                   // Language(s)...
-             i ++;
-             if (i >= argc)
-               usage();
-
-              if (strchr(argv[i], ','))
-             {
-               // Comma-delimited list of languages...
-               char    temp[1024],     // Copy of language list
-                       *start,         // Start of current locale name
-                       *end;           // End of current locale name
-
-
-               locales = new ppdcArray();
-
-               strlcpy(temp, argv[i], sizeof(temp));
-               for (start = temp; *start; start = end)
-               {
-                 if ((end = strchr(start, ',')) != NULL)
-                   *end++ = '\0';
-                 else
-                   end = start + strlen(start);
-
-                  if (end > start)
-                   locales->add(new ppdcString(start));
-               }
-             }
-             else
-             {
-               if (verbose > 1)
-                 printf("ppdc: Loading messages for locale \"%s\"...\n",
-                        argv[i]);
-
-               if (catalog)
-                 delete catalog;
-
-               catalog = new ppdcCatalog(argv[i]);
-
-               if (catalog->messages->count == 0)
-               {
-                 fprintf(stderr,
-                         "ppdc: Unable to find localization for \"%s\" - %s\n",
-                         argv[i], strerror(errno));
-                  return (1);
-               }
-             }
-             break;
-
-          case 'I' :                   // Include directory...
-             i ++;
-             if (i >= argc)
-               usage();
-
-              if (verbose > 1)
-               printf("ppdc: Adding include directory \"%s\"...\n", argv[i]);
-
-             ppdcSource::add_include(argv[i]);
-             break;
-
-          case 'v' :                   // Be verbose...
-             verbose ++;
-             break;
-           
-          case 'z' :                   // Compress files...
-             comp = PPDC_GZIP_COMPRESSION;
-             break;
-
-         case '-' :                    // --option
-             if (!strcmp(opt, "-lf"))
-             {
-               le  = PPDC_LFONLY;
-               opt += strlen(opt) - 1;
-               break;
-             }
-             else if (!strcmp(opt, "-cr"))
-             {
-               le  = PPDC_CRONLY;
-               opt += strlen(opt) - 1;
-               break;
-             }
-             else if (!strcmp(opt, "-crlf"))
-             {
-               le  = PPDC_CRLF;
-               opt += strlen(opt) - 1;
-               break;
-             }
-           
-         default :                     // Unknown
-             usage();
-             break;
-       }
-    }
-    else
-    {
-      // Open and load the driver info file...
-      if (verbose > 1)
-        printf("ppdc: Loading driver information file \"%s\"...\n", argv[i]);
-
-      src = new ppdcSource(argv[i]);
-
-      // Create the output directory...
-      if (mkdir(outdir, 0777))
-      {
-        if (errno != EEXIST)
-       {
-         fprintf(stderr, "ppdc: Unable to create output directory %s: %s\n",
-                 outdir, strerror(errno));
-          return (1);
-       }
-      }
-
-      // Write PPD files...
-      for (d = (ppdcDriver *)src->drivers->first();
-           d;
-          d = (ppdcDriver *)src->drivers->next())
-      {
-        // Write the PPD file for this driver...
-       for (j = 0; d->pc_file_name->value[j]; j ++)
-         pcfilename[j] = tolower(d->pc_file_name->value[j]);
-
-       pcfilename[j] = '\0';
-
-       if (comp == PPDC_GZIP_COMPRESSION)
-         snprintf(filename, sizeof(filename), "%s/%s.gz", outdir, pcfilename);
-       else
-         snprintf(filename, sizeof(filename), "%s/%s", outdir, pcfilename);
-
-       if (verbose)
-         printf("ppdc: Writing %s...\n", filename);
-
-       if (d->write_ppd_file(filename, catalog, locales, src, le, comp))
-         return (1);
-      }
-
-      // Delete the printer driver information...
-      delete src;
-    }
-
-  if (catalog)
-    delete catalog;
-
-  // If no drivers have been loaded, display the program usage message.
-  if (!src)
-    usage();
-
-  // Return with no errors.
-  return (0);
-}
-#endif // 0
-
-
-//
-// End of "$Id$".
-//
index db9528e6d09cc3fb3c28aa0bae69d4e1ac141f03..2701f7b940496cc55e1d94c2e718610fac8e781c 100644 (file)
@@ -210,13 +210,19 @@ ppdcCatalog::load_messages(
          if ((ch = get_utf16(fp, cs)) == 0)
            break;
 
-          if (ch == 'n')
+         if (ch == 'n')
            ch = '\n';
          else if (ch == 't')
            ch = '\t';
         }
+       else if (ch == '\"')
+       {
+         *ptr = '\0';
+         ptr  = NULL;
+       }
 
-        put_utf8(ch, ptr, end);
+        if (ptr)
+         put_utf8(ch, ptr, end);
       }
       else if (ch == '/')
       {
@@ -247,13 +253,8 @@ ppdcCatalog::load_messages(
       }
       else if (ch == '\"')
       {
-        // Start or finish quoted string...
-       if (ptr)
-       {
-         *ptr = '\0';
-         ptr  = NULL;
-       }
-       else if (id[0])
+        // Start quoted string...
+       if (id[0])
        {
          ptr = str;
          end = str + sizeof(str) - 1;
@@ -697,7 +698,8 @@ get_utf16(cups_file_t *fp,          // I  - File to read from
   if (cs == PPDC_CS_UTF8)
   {
     // UTF-8 character...
-    ch = cupsFileGetChar(fp);
+    if ((ch = cupsFileGetChar(fp)) < 0)
+      return (0);
 
     if ((ch & 0xe0) == 0xc0)
     {
index a369ed686843dc056d334fd1237b80d640f32d31..fa0a8a6eb5013bcd7e894707a8cb315f504a6500 100644 (file)
@@ -541,10 +541,17 @@ ppdcDriver::write_ppd_file(
           !strcmp(a->name->value, "ModelName") ||
           !strcmp(a->name->value, "NickName") ||
           !strcmp(a->name->value, "ShortNickName") ||
-         !strcmp(a->name->value, "cupsVersion") ||
-          a->name->value[0] == '?')
+         !strcmp(a->name->value, "cupsVersion"))
        continue;
 
+      if (a->name->value[0] == '?' &&
+          (find_option(a->name->value + 1) ||
+          !strcmp(a->name->value, "?ImageableArea") ||
+          !strcmp(a->name->value, "?PageRegion") ||
+          !strcmp(a->name->value, "?PageSize") ||
+          !strcmp(a->name->value, "?PaperDimension")))
+        continue;
+
       if (!a->selector->value || !a->selector->value[0])
        cupsFilePrintf(fp, "*%s", a->name->value);
       else if (!a->text->value || !a->text->value[0])
index 3af0e4975129f6f3d0b2b9332e21d7ca3f84423a..29f109ce2134b4faf2c4ac2cb4fbe43e030691eb 100644 (file)
 // 'ppdcFile::ppdcFile()' - Create (open) a file.
 //
 
-ppdcFile::ppdcFile(const char *f)              // I - File to open
+ppdcFile::ppdcFile(const char  *f,             // I - File to open
+                   cups_file_t *ffp)           // I - File pointer to use
 {
-  fp       = cupsFileOpen(f, "r");
+  if (ffp)
+  {
+    fp = ffp;
+    cupsFileRewind(fp);
+  }
+  else
+    fp = cupsFileOpen(f, "r");
+
   filename = f;
   line     = 1;
 
index ac64a1a30ecbc956e9adea321656465b26046add..92a42f11d24e3759aba7a5afd60567d167c79a1c 100644 (file)
@@ -91,7 +91,8 @@ const char    *ppdcSource::driver_types[] =
 // 'ppdcSource::ppdcSource()' - Load a driver source file.
 //
 
-ppdcSource::ppdcSource(const char *f)  // I - File to read
+ppdcSource::ppdcSource(const char  *f, // I - File to read
+                       cups_file_t *ffp)// I - File pointer to use
 {
   filename      = new ppdcString(f);
   base_fonts    = new ppdcArray();
@@ -104,7 +105,7 @@ ppdcSource::ppdcSource(const char *f)       // I - File to read
   cond_stack[0] = PPDC_COND_NORMAL;
 
   if (f)
-    read_file(f);
+    read_file(f, ffp);
 }
 
 
@@ -1616,7 +1617,8 @@ ppdcSource::get_po(ppdcFile *fp)  // I - File to read
     strcpy(basedir, ".");
 
   // Find the po file...
-  if (find_include(poname, basedir, pofilename, sizeof(pofilename)))
+  if (!pofilename[0] ||
+      find_include(poname, basedir, pofilename, sizeof(pofilename)))
   {
     // Found it, so load it...
     cat = new ppdcCatalog(locale, pofilename);
@@ -2284,9 +2286,10 @@ ppdcSource::quotef(cups_file_t *fp,      // I - File to write to
 //
 
 void
-ppdcSource::read_file(const char *f)   // I - File to read
+ppdcSource::read_file(const char  *f,  // I - File to read
+                      cups_file_t *ffp)        // I - File pointer to use
 {
-  ppdcFile *fp = new ppdcFile(f);
+  ppdcFile *fp = new ppdcFile(f, ffp);
   scan_file(fp);
   delete fp;
 
index 40bb9f5b062bcabd6154e0232abd968fe12ab9d9..1d849c1ada86a5c43e99da69efb5e016dc0a9bc1 100644 (file)
@@ -413,7 +413,7 @@ class ppdcFile                              //// File
   const char   *filename;              // Filename
   int          line;                   // Line in file
 
-  ppdcFile(const char *f);
+  ppdcFile(const char *f, cups_file_t *ffp = (cups_file_t *)0);
   ~ppdcFile();
 
   int          get();
@@ -439,7 +439,7 @@ class ppdcSource                    //// Source File
                cond_stack[101];        // #if state stack
 
 
-  ppdcSource(const char *f = 0);
+  ppdcSource(const char *f = 0, cups_file_t *ffp = (cups_file_t *)0);
   ~ppdcSource();
 
   static void  add_include(const char *d);
@@ -478,7 +478,7 @@ class ppdcSource                    //// Source File
   ppdcVariable *get_variable(ppdcFile *fp);
   int          import_ppd(const char *f);
   int          quotef(cups_file_t *fp, const char *format, ...);
-  void         read_file(const char *f);
+  void         read_file(const char *f, cups_file_t *ffp = (cups_file_t *)0);
   void         scan_file(ppdcFile *fp, ppdcDriver *td = 0, bool inc = false);
   ppdcVariable *set_variable(const char *name, const char *value);
   int          write_file(const char *f);
index 20a86e57bf6e33685ecf0cc99c243c3f0a0e26ef..d5698359e6b7202d1a828d392ae10ea6fa0c6803 100644 (file)
@@ -3,7 +3,7 @@
 //
 //   Driver info file for CUPS-supplied PPDs.
 //
-//   Copyright 2007 by Apple Inc.
+//   Copyright 2007-2008 by Apple Inc.
 //   Copyright 1993-2006 by Easy Software Products.
 //
 //   These coded instructions, statements, and computer programs are the
 #include <epson.h>
 #include <label.h>
 
+// Localizations are provided for all of the base languages supported by
+// CUPS...
+#po da ""
+#po de ""
+#po es ""
+#po et ""
+#po fi ""
+#po fr ""
+#po he ""
+#po id ""
+#po it ""
+#po ja ""
+#po ko ""
+#po nl ""
+#po no ""
+#po pl ""
+#po pt ""
+#po pt_BR ""
+#po ru ""
+#po sv ""
+#po zh ""
+#po zh_TW ""
+
 // MediaSize sizes used by label drivers...
 #media "w81h252/Address - 1 1/8 x 3 1/2\"" 81 252
 #media "w101h252/Large Address - 1 4/10 x 3 1/2\"" 101 252
 Attribute "cupsVersion" "" "1.4"
 Attribute "FileSystem" "" "False"
 Attribute "LandscapeOrientation" "" "Plus90"
-Attribute "LanguageLevel" "" "3"
-Attribute "Product" "" "(ESP Ghostscript)"
-Attribute "Product" "" "(GPL Ghostscript)"
-Attribute "PSVersion" "" "(3010.000) 81504"
-Attribute "PSVersion" "" "(3010.000) 860"
 Attribute "TTRasterizer" "" "Type42"
 
-Copyright "Copyright 2007 by Apple Inc."
+Copyright "Copyright 2007-2008 by Apple Inc."
 Copyright "Copyright 1997-2007 by Easy Software Products."
 Copyright ""
 Copyright "These coded instructions, statements, and computer programs are the"
@@ -116,7 +134,7 @@ Version "1.4"
 {
   Manufacturer "Dymo"
   ModelName "Label Printer"
-  PCFileName "DYMO.PPD"
+  PCFileName "dymo.ppd"
   DriverType label
   ModelNumber $DYMO_3x0
   Throughput 8
@@ -167,7 +185,7 @@ Version "1.4"
   // Epson 24-Pin Series
   {
     ModelName "24-Pin Series"
-    PCFileName "EPSON24.PPD"
+    PCFileName "epson24.ppd"
     ModelNumber $EPSON_24PIN
 
     Resolution k 1 8 0 0 60dpi
@@ -180,7 +198,7 @@ Version "1.4"
   // Epson 9-Pin Series
   {
     ModelName "9-Pin Series"
-    PCFileName "EPSON9.PPD"
+    PCFileName "epson9.ppd"
     ModelNumber $EPSON_9PIN
     ColorDevice No
 
@@ -192,7 +210,7 @@ Version "1.4"
   // Epson Stylus Color Series
   {
     ModelName "Stylus Color Series"
-    PCFileName "STCOLOR.PPD"
+    PCFileName "stcolor.ppd"
     ModelNumber $EPSON_COLOR
     ColorDevice Yes
 
@@ -212,7 +230,7 @@ Version "1.4"
   // Epson New Stylus Color Series
   {
     ModelName "New Stylus Color Series"
-    PCFileName "STCOLOR2.PPD"
+    PCFileName "stcolor2.ppd"
     ModelNumber $EPSON_ICOLOR
     ColorDevice Yes
 
@@ -232,7 +250,7 @@ Version "1.4"
   // Epson Stylus Color Series
   {
     ModelName "Stylus Photo Series"
-    PCFileName "STPHOTO.PPD"
+    PCFileName "stphoto.ppd"
     ModelNumber $EPSON_PHOTO
     ColorDevice Yes
 
@@ -252,7 +270,7 @@ Version "1.4"
   // Epson New Stylus Color Series
   {
     ModelName "New Stylus Photo Series"
-    PCFileName "STPHOTO2.PPD"
+    PCFileName "stphoto2.ppd"
     ModelNumber $EPSON_IPHOTO
     ColorDevice Yes
 
@@ -279,7 +297,7 @@ Version "1.4"
     DriverType hp
 
     ModelName "PCL Laser Printer"
-    PCFileName "GENERPCL.PPD"
+    PCFileName "generpcl.ppd"
     Throughput 8
     ModelNumber $HP_LASERJET
     ColorDevice No
@@ -329,7 +347,7 @@ Version "1.4"
     DriverType ps
 
     ModelName "PostScript Printer"
-    PCFileName "GENERIC.PPD"
+    PCFileName "generic.ppd"
     Throughput 8
     ColorDevice No
     Attribute PSVersion "" "(2016.0) 0"
@@ -370,7 +388,7 @@ Version "1.4"
   // HP DeskJet Series
   {
     ModelName "DeskJet Series"
-    PCFileName "DESKJET.PPD"
+    PCFileName "deskjet.ppd"
     ModelNumber $HP_DESKJET
     ManualCopies Yes
     ColorDevice Yes
@@ -423,7 +441,7 @@ Version "1.4"
   // HP LaserJet Series PCL 4/5
   {
     ModelName "LaserJet Series PCL 4/5"
-    PCFileName "LASERJET.PPD"
+    PCFileName "laserjet.ppd"
     Throughput 8
     ModelNumber $HP_LASERJET
     ColorDevice No
@@ -475,7 +493,7 @@ Version "1.4"
   Manufacturer "Intellitech"
   ModelName "IntelliBar Label Printer"
   Attribute ShortNickName "" "Intellibar Label Printer"
-  PCFileName "INTELBAR.PPD"
+  PCFileName "intelbar.ppd"
   DriverType label
   ModelNumber $INTELLITECH_PCL
   Throughput 8
@@ -600,7 +618,7 @@ Version "1.4"
   // Oki 24-Pin Series
   {
     ModelName "24-Pin Series"
-    PCFileName "OKIDAT24.PPD"
+    PCFileName "okidat24.ppd"
     ModelNumber $EPSON_24PIN
 
     Resolution k 1 8 0 0 60dpi
@@ -613,7 +631,7 @@ Version "1.4"
   // Oki 9-Pin Series
   {
     ModelName "9-Pin Series"
-    PCFileName "OKIDATA9.PPD"
+    PCFileName "okidata9.ppd"
     ModelNumber $EPSON_9PIN
     ColorDevice No
 
@@ -634,7 +652,7 @@ Version "1.4"
   // Zebra CPCL Label Printer
   {
     ModelName "CPCL Label Printer"
-    PCFileName "ZEBRACPL.PPD"
+    PCFileName "zebracpl.ppd"
     ModelNumber $ZEBRA_CPCL
 
     HWMargins 0 0 0 0
@@ -763,7 +781,7 @@ Version "1.4"
   // Zebra EPL1 Label Printer
   {
     ModelName "EPL1 Label Printer"
-    PCFileName "ZEBRAEP1.PPD"
+    PCFileName "zebraep1.ppd"
     ModelNumber $ZEBRA_EPL_LINE
 
     HWMargins 0 0 0 0
@@ -860,7 +878,7 @@ Version "1.4"
   // Zebra EPL2 Label Printer
   {
     ModelName "EPL2 Label Printer"
-    PCFileName "ZEBRAEP2.PPD"
+    PCFileName "zebraep2.ppd"
     ModelNumber $ZEBRA_EPL_PAGE
 
     HWMargins 0 0 0 0
@@ -966,7 +984,7 @@ Version "1.4"
   // Zebra ZPL Label Printer
   {
     ModelName "ZPL Label Printer"
-    PCFileName "ZEBRA.PPD"
+    PCFileName "zebra.ppd"
     ModelNumber $ZEBRA_ZPL
 
     HWMargins 0 0 0 0
diff --git a/ppdc/testcatalog.cxx b/ppdc/testcatalog.cxx
new file mode 100644 (file)
index 0000000..808738d
--- /dev/null
@@ -0,0 +1,63 @@
+//
+// "$Id$"
+//
+//   Test program for message catalog class.
+//
+//   Copyright 2008 by Apple Inc.
+//
+//   These coded instructions, statements, and computer programs are the
+//   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:
+//
+//   main() - Open a message catalog 
+//
+
+//
+// Include necessary headers...
+//
+
+#include "ppdc.h"
+
+
+//
+// 'main()' - Open a message catalog 
+//
+
+int                                    // O - Exit status
+main(int  argc,                                // I - Number of command-line arguments
+     char *argv[])                     // I - Command-line arguments
+{
+  ppdcCatalog  *catalog;               // Message catalog
+  ppdcMessage  *m;                     // Current message
+
+
+  if (argc != 2)
+  {
+    puts("Usage: testcatalog filename");
+    return (1);
+  }
+
+  // Scan the command-line...
+  catalog = new ppdcCatalog(NULL, argv[1]);
+
+  printf("%s: %d messages\n", argv[1], catalog->messages->count);
+
+  for (m = (ppdcMessage *)catalog->messages->first();
+       m;
+       m = (ppdcMessage *)catalog->messages->next())
+    printf("%s: %s\n", m->id->value, m->string->value);
+
+  delete catalog;
+
+  // Return with no errors.
+  return (0);
+}
+
+
+//
+// End of "$Id$".
+//
index e98ab6128efd653a389078edfa27b5268034800f..064c1ee8c85777a98f7d7ed611e9f7c261b9eddd 100644 (file)
@@ -209,11 +209,6 @@ cups-deviced.o: util.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
 cups-deviced.o: ../cups/versioning.h ../cups/ppd.h ../cups/array.h
 cups-deviced.o: ../cups/file.h ../cups/language.h ../cups/file.h
 cups-deviced.o: ../cups/string.h ../config.h ../cups/array.h ../cups/dir.h
-cups-driverd.o: util.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
-cups-driverd.o: ../cups/versioning.h ../cups/ppd.h ../cups/array.h
-cups-driverd.o: ../cups/file.h ../cups/language.h ../cups/file.h
-cups-driverd.o: ../cups/string.h ../config.h ../cups/dir.h
-cups-driverd.o: ../cups/transcode.h ../cups/ppd-private.h ../cups/cups.h
 cups-lpd.o: ../cups/http-private.h ../config.h ../cups/http.h
 cups-lpd.o: ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
 cups-lpd.o: ../cups/ipp.h ../cups/cups.h ../cups/ppd.h ../cups/array.h
@@ -232,8 +227,9 @@ testlpd.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
 testlpd.o: ../cups/string.h ../config.h
 testmime.o: ../cups/string.h ../config.h mime.h ../cups/array.h
 testmime.o: ../cups/versioning.h ../cups/ipp.h ../cups/file.h ../cups/dir.h
-testspeed.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/versioning.h
-testspeed.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+testspeed.o: ../cups/string.h ../config.h ../cups/cups.h ../cups/ipp.h
+testspeed.o: ../cups/http.h ../cups/versioning.h ../cups/ppd.h
+testspeed.o: ../cups/array.h ../cups/file.h ../cups/language.h
 testspeed.o: ../cups/language.h ../cups/debug.h
 testsub.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/versioning.h
 testsub.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
@@ -241,489 +237,29 @@ testsub.o: ../cups/debug.h ../cups/string.h ../config.h
 util.o: util.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
 util.o: ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h
 util.o: ../cups/language.h ../cups/file.h ../cups/string.h ../config.h
+cups-driverd.o: util.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+cups-driverd.o: ../cups/versioning.h ../cups/ppd.h ../cups/array.h
+cups-driverd.o: ../cups/file.h ../cups/language.h ../cups/file.h
+cups-driverd.o: ../cups/string.h ../config.h ../cups/dir.h
+cups-driverd.o: ../cups/transcode.h ../cups/ppd-private.h ../cups/cups.h
+cups-driverd.o: ../ppdc/ppdc.h
 # DO NOT DELETE
 
-auth.32.o: auth.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-auth.32.o: auth.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-auth.32.o: auth.c  ../cups/ipp.h ../cups/string.h ../cups/array.h ../cups/cups.h
-auth.32.o: auth.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-auth.32.o: auth.c  mime.h ../cups/ipp.h ../cups/file.h ../cups/http.h ../cups/i18n.h
-auth.32.o: auth.c  ../cups/transcode.h ../cups/debug.h sysman.h statbuf.h cert.h auth.h
-auth.32.o: auth.c  client.h policy.h printers.h classes.h job.h conf.h banners.h
-auth.32.o: auth.c  dirsvc.h network.h subscriptions.h
-banners.32.o: banners.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-banners.32.o: banners.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-banners.32.o: banners.c  ../cups/ipp.h ../cups/string.h ../cups/array.h ../cups/cups.h
-banners.32.o: banners.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-banners.32.o: banners.c  mime.h ../cups/ipp.h ../cups/file.h ../cups/http.h ../cups/i18n.h
-banners.32.o: banners.c  ../cups/transcode.h ../cups/debug.h sysman.h statbuf.h cert.h
-banners.32.o: banners.c  auth.h client.h policy.h printers.h classes.h job.h conf.h
-banners.32.o: banners.c  banners.h dirsvc.h network.h subscriptions.h ../cups/dir.h
-cert.32.o: cert.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-cert.32.o: cert.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-cert.32.o: cert.c  ../cups/ipp.h ../cups/string.h ../cups/array.h ../cups/cups.h
-cert.32.o: cert.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-cert.32.o: cert.c  mime.h ../cups/ipp.h ../cups/file.h ../cups/http.h ../cups/i18n.h
-cert.32.o: cert.c  ../cups/transcode.h ../cups/debug.h sysman.h statbuf.h cert.h auth.h
-cert.32.o: cert.c  client.h policy.h printers.h classes.h job.h conf.h banners.h
-cert.32.o: cert.c  dirsvc.h network.h subscriptions.h
-classes.32.o: classes.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-classes.32.o: classes.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-classes.32.o: classes.c  ../cups/ipp.h ../cups/string.h ../cups/array.h ../cups/cups.h
-classes.32.o: classes.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-classes.32.o: classes.c  mime.h ../cups/ipp.h ../cups/file.h ../cups/http.h ../cups/i18n.h
-classes.32.o: classes.c  ../cups/transcode.h ../cups/debug.h sysman.h statbuf.h cert.h
-classes.32.o: classes.c  auth.h client.h policy.h printers.h classes.h job.h conf.h
-classes.32.o: classes.c  banners.h dirsvc.h network.h subscriptions.h
-client.32.o: client.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-client.32.o: client.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-client.32.o: client.c  ../cups/ipp.h ../cups/string.h ../cups/array.h ../cups/cups.h
-client.32.o: client.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-client.32.o: client.c  mime.h ../cups/ipp.h ../cups/file.h ../cups/http.h ../cups/i18n.h
-client.32.o: client.c  ../cups/transcode.h ../cups/debug.h sysman.h statbuf.h cert.h
-client.32.o: client.c  auth.h client.h policy.h printers.h classes.h job.h conf.h
-client.32.o: client.c  banners.h dirsvc.h network.h subscriptions.h
-conf.32.o: conf.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-conf.32.o: conf.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-conf.32.o: conf.c  ../cups/ipp.h ../cups/string.h ../cups/array.h ../cups/cups.h
-conf.32.o: conf.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-conf.32.o: conf.c  mime.h ../cups/ipp.h ../cups/file.h ../cups/http.h ../cups/i18n.h
-conf.32.o: conf.c  ../cups/transcode.h ../cups/debug.h sysman.h statbuf.h cert.h auth.h
-conf.32.o: conf.c  client.h policy.h printers.h classes.h job.h conf.h banners.h
-conf.32.o: conf.c  dirsvc.h network.h subscriptions.h
-dirsvc.32.o: dirsvc.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-dirsvc.32.o: dirsvc.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-dirsvc.32.o: dirsvc.c  ../cups/ipp.h ../cups/string.h ../cups/array.h ../cups/cups.h
-dirsvc.32.o: dirsvc.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-dirsvc.32.o: dirsvc.c  mime.h ../cups/ipp.h ../cups/file.h ../cups/http.h ../cups/i18n.h
-dirsvc.32.o: dirsvc.c  ../cups/transcode.h ../cups/debug.h sysman.h statbuf.h cert.h
-dirsvc.32.o: dirsvc.c  auth.h client.h policy.h printers.h classes.h job.h conf.h
-dirsvc.32.o: dirsvc.c  banners.h dirsvc.h network.h subscriptions.h
-env.32.o: env.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-env.32.o: env.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h
-env.32.o: env.c  ../cups/string.h ../cups/array.h ../cups/cups.h ../cups/ppd.h
-env.32.o: env.c  ../cups/array.h ../cups/file.h ../cups/language.h mime.h ../cups/ipp.h
-env.32.o: env.c  ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/transcode.h
-env.32.o: env.c  ../cups/debug.h sysman.h statbuf.h cert.h auth.h client.h policy.h
-env.32.o: env.c  printers.h classes.h job.h conf.h banners.h dirsvc.h network.h
-env.32.o: env.c  subscriptions.h
-main.32.o: main.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-main.32.o: main.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-main.32.o: main.c  ../cups/ipp.h ../cups/string.h ../cups/array.h ../cups/cups.h
-main.32.o: main.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-main.32.o: main.c  mime.h ../cups/ipp.h ../cups/file.h ../cups/http.h ../cups/i18n.h
-main.32.o: main.c  ../cups/transcode.h ../cups/debug.h sysman.h statbuf.h cert.h auth.h
-main.32.o: main.c  client.h policy.h printers.h classes.h job.h conf.h banners.h
-main.32.o: main.c  dirsvc.h network.h subscriptions.h ../cups/dir.h
-ipp.32.o: ipp.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-ipp.32.o: ipp.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h
-ipp.32.o: ipp.c  ../cups/string.h ../cups/array.h ../cups/cups.h ../cups/ppd.h
-ipp.32.o: ipp.c  ../cups/array.h ../cups/file.h ../cups/language.h mime.h ../cups/ipp.h
-ipp.32.o: ipp.c  ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/transcode.h
-ipp.32.o: ipp.c  ../cups/debug.h sysman.h statbuf.h cert.h auth.h client.h policy.h
-ipp.32.o: ipp.c  printers.h classes.h job.h conf.h banners.h dirsvc.h network.h
-ipp.32.o: ipp.c  subscriptions.h ../cups/ppd-private.h ../cups/cups.h
-listen.32.o: listen.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-listen.32.o: listen.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-listen.32.o: listen.c  ../cups/ipp.h ../cups/string.h ../cups/array.h ../cups/cups.h
-listen.32.o: listen.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-listen.32.o: listen.c  mime.h ../cups/ipp.h ../cups/file.h ../cups/http.h ../cups/i18n.h
-listen.32.o: listen.c  ../cups/transcode.h ../cups/debug.h sysman.h statbuf.h cert.h
-listen.32.o: listen.c  auth.h client.h policy.h printers.h classes.h job.h conf.h
-listen.32.o: listen.c  banners.h dirsvc.h network.h subscriptions.h
-job.32.o: job.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-job.32.o: job.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h
-job.32.o: job.c  ../cups/string.h ../cups/array.h ../cups/cups.h ../cups/ppd.h
-job.32.o: job.c  ../cups/array.h ../cups/file.h ../cups/language.h mime.h ../cups/ipp.h
-job.32.o: job.c  ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/transcode.h
-job.32.o: job.c  ../cups/debug.h sysman.h statbuf.h cert.h auth.h client.h policy.h
-job.32.o: job.c  printers.h classes.h job.h conf.h banners.h dirsvc.h network.h
-job.32.o: job.c  subscriptions.h ../cups/backend.h ../cups/dir.h
-log.32.o: log.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-log.32.o: log.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h
-log.32.o: log.c  ../cups/string.h ../cups/array.h ../cups/cups.h ../cups/ppd.h
-log.32.o: log.c  ../cups/array.h ../cups/file.h ../cups/language.h mime.h ../cups/ipp.h
-log.32.o: log.c  ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/transcode.h
-log.32.o: log.c  ../cups/debug.h sysman.h statbuf.h cert.h auth.h client.h policy.h
-log.32.o: log.c  printers.h classes.h job.h conf.h banners.h dirsvc.h network.h
-log.32.o: log.c  subscriptions.h
-network.32.o: network.c  ../cups/http-private.h ../config.h ../cups/http.h
-network.32.o: network.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-network.32.o: network.c  ../cups/ipp.h cupsd.h ../cups/string.h ../cups/array.h
-network.32.o: network.c  ../cups/cups.h ../cups/ppd.h ../cups/array.h ../cups/file.h
-network.32.o: network.c  ../cups/language.h mime.h ../cups/ipp.h ../cups/file.h
-network.32.o: network.c  ../cups/http.h ../cups/i18n.h ../cups/transcode.h ../cups/debug.h
-network.32.o: network.c  sysman.h statbuf.h cert.h auth.h client.h policy.h printers.h
-network.32.o: network.c  classes.h job.h conf.h banners.h dirsvc.h network.h
-network.32.o: network.c  subscriptions.h
-policy.32.o: policy.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-policy.32.o: policy.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-policy.32.o: policy.c  ../cups/ipp.h ../cups/string.h ../cups/array.h ../cups/cups.h
-policy.32.o: policy.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-policy.32.o: policy.c  mime.h ../cups/ipp.h ../cups/file.h ../cups/http.h ../cups/i18n.h
-policy.32.o: policy.c  ../cups/transcode.h ../cups/debug.h sysman.h statbuf.h cert.h
-policy.32.o: policy.c  auth.h client.h policy.h printers.h classes.h job.h conf.h
-policy.32.o: policy.c  banners.h dirsvc.h network.h subscriptions.h
-printers.32.o: printers.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-printers.32.o: printers.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-printers.32.o: printers.c  ../cups/ipp.h ../cups/string.h ../cups/array.h ../cups/cups.h
-printers.32.o: printers.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-printers.32.o: printers.c  mime.h ../cups/ipp.h ../cups/file.h ../cups/http.h ../cups/i18n.h
-printers.32.o: printers.c  ../cups/transcode.h ../cups/debug.h sysman.h statbuf.h cert.h
-printers.32.o: printers.c  auth.h client.h policy.h printers.h classes.h job.h conf.h
-printers.32.o: printers.c  banners.h dirsvc.h network.h subscriptions.h ../cups/dir.h
-process.32.o: process.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-process.32.o: process.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-process.32.o: process.c  ../cups/ipp.h ../cups/string.h ../cups/array.h ../cups/cups.h
-process.32.o: process.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-process.32.o: process.c  mime.h ../cups/ipp.h ../cups/file.h ../cups/http.h ../cups/i18n.h
-process.32.o: process.c  ../cups/transcode.h ../cups/debug.h sysman.h statbuf.h cert.h
-process.32.o: process.c  auth.h client.h policy.h printers.h classes.h job.h conf.h
-process.32.o: process.c  banners.h dirsvc.h network.h subscriptions.h
-quotas.32.o: quotas.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-quotas.32.o: quotas.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-quotas.32.o: quotas.c  ../cups/ipp.h ../cups/string.h ../cups/array.h ../cups/cups.h
-quotas.32.o: quotas.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-quotas.32.o: quotas.c  mime.h ../cups/ipp.h ../cups/file.h ../cups/http.h ../cups/i18n.h
-quotas.32.o: quotas.c  ../cups/transcode.h ../cups/debug.h sysman.h statbuf.h cert.h
-quotas.32.o: quotas.c  auth.h client.h policy.h printers.h classes.h job.h conf.h
-quotas.32.o: quotas.c  banners.h dirsvc.h network.h subscriptions.h
-removefile.32.o: removefile.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-removefile.32.o: removefile.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-removefile.32.o: removefile.c  ../cups/ipp.h ../cups/string.h ../cups/array.h ../cups/cups.h
-removefile.32.o: removefile.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-removefile.32.o: removefile.c  mime.h ../cups/ipp.h ../cups/file.h ../cups/http.h
-removefile.32.o: removefile.c  ../cups/i18n.h ../cups/transcode.h ../cups/debug.h sysman.h
-removefile.32.o: removefile.c  statbuf.h cert.h auth.h client.h policy.h printers.h classes.h
-removefile.32.o: removefile.c  job.h conf.h banners.h dirsvc.h network.h subscriptions.h
-select.32.o: select.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-select.32.o: select.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-select.32.o: select.c  ../cups/ipp.h ../cups/string.h ../cups/array.h ../cups/cups.h
-select.32.o: select.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-select.32.o: select.c  mime.h ../cups/ipp.h ../cups/file.h ../cups/http.h ../cups/i18n.h
-select.32.o: select.c  ../cups/transcode.h ../cups/debug.h sysman.h statbuf.h cert.h
-select.32.o: select.c  auth.h client.h policy.h printers.h classes.h job.h conf.h
-select.32.o: select.c  banners.h dirsvc.h network.h subscriptions.h
-server.32.o: server.c  ../cups/http-private.h ../config.h ../cups/http.h
-server.32.o: server.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-server.32.o: server.c  ../cups/ipp.h cupsd.h ../cups/string.h ../cups/array.h
-server.32.o: server.c  ../cups/cups.h ../cups/ppd.h ../cups/array.h ../cups/file.h
-server.32.o: server.c  ../cups/language.h mime.h ../cups/ipp.h ../cups/file.h
-server.32.o: server.c  ../cups/http.h ../cups/i18n.h ../cups/transcode.h ../cups/debug.h
-server.32.o: server.c  sysman.h statbuf.h cert.h auth.h client.h policy.h printers.h
-server.32.o: server.c  classes.h job.h conf.h banners.h dirsvc.h network.h subscriptions.h
-statbuf.32.o: statbuf.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-statbuf.32.o: statbuf.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-statbuf.32.o: statbuf.c  ../cups/ipp.h ../cups/string.h ../cups/array.h ../cups/cups.h
-statbuf.32.o: statbuf.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-statbuf.32.o: statbuf.c  mime.h ../cups/ipp.h ../cups/file.h ../cups/http.h ../cups/i18n.h
-statbuf.32.o: statbuf.c  ../cups/transcode.h ../cups/debug.h sysman.h statbuf.h cert.h
-statbuf.32.o: statbuf.c  auth.h client.h policy.h printers.h classes.h job.h conf.h
-statbuf.32.o: statbuf.c  banners.h dirsvc.h network.h subscriptions.h
-subscriptions.32.o: subscriptions.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-subscriptions.32.o: subscriptions.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-subscriptions.32.o: subscriptions.c  ../cups/ipp.h ../cups/string.h ../cups/array.h
-subscriptions.32.o: subscriptions.c  ../cups/cups.h ../cups/ppd.h ../cups/array.h ../cups/file.h
-subscriptions.32.o: subscriptions.c  ../cups/language.h mime.h ../cups/ipp.h ../cups/file.h
-subscriptions.32.o: subscriptions.c  ../cups/http.h ../cups/i18n.h ../cups/transcode.h
-subscriptions.32.o: subscriptions.c  ../cups/debug.h sysman.h statbuf.h cert.h auth.h client.h
-subscriptions.32.o: subscriptions.c  policy.h printers.h classes.h job.h conf.h banners.h
-subscriptions.32.o: subscriptions.c  dirsvc.h network.h subscriptions.h
-sysman.32.o: sysman.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-sysman.32.o: sysman.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-sysman.32.o: sysman.c  ../cups/ipp.h ../cups/string.h ../cups/array.h ../cups/cups.h
-sysman.32.o: sysman.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-sysman.32.o: sysman.c  mime.h ../cups/ipp.h ../cups/file.h ../cups/http.h ../cups/i18n.h
-sysman.32.o: sysman.c  ../cups/transcode.h ../cups/debug.h sysman.h statbuf.h cert.h
-sysman.32.o: sysman.c  auth.h client.h policy.h printers.h classes.h job.h conf.h
-sysman.32.o: sysman.c  banners.h dirsvc.h network.h subscriptions.h
 filter.32.o: filter.c  ../cups/debug.h ../cups/string.h ../config.h mime.h ../cups/array.h
-filter.32.o: filter.c  ../cups/versioning.h ../cups/ipp.h ../cups/file.h
+filter.32.o: filter.c  ../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/file.h
 mime.32.o: mime.c  ../cups/debug.h ../cups/dir.h ../cups/versioning.h ../cups/string.h
-mime.32.o: mime.c  ../config.h mime.h ../cups/array.h ../cups/ipp.h ../cups/file.h
+mime.32.o: mime.c  ../config.h mime.h ../cups/array.h ../cups/ipp.h ../cups/http.h
+mime.32.o: mime.c  ../cups/file.h
 type.32.o: type.c  ../cups/string.h ../config.h mime.h ../cups/array.h
-type.32.o: type.c  ../cups/versioning.h ../cups/ipp.h ../cups/file.h ../cups/debug.h
-cupsfilter.32.o: cupsfilter.c  ../cups/cups.h ../cups/ipp.h ../cups/http.h
-cupsfilter.32.o: cupsfilter.c  ../cups/versioning.h ../cups/ppd.h ../cups/array.h
-cupsfilter.32.o: cupsfilter.c  ../cups/file.h ../cups/language.h ../cups/i18n.h
-cupsfilter.32.o: cupsfilter.c  ../cups/transcode.h ../cups/string.h ../config.h mime.h
-cupsfilter.32.o: cupsfilter.c  ../cups/array.h ../cups/ipp.h ../cups/file.h
-cups-deviced.32.o: cups-deviced.c  util.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
-cups-deviced.32.o: cups-deviced.c  ../cups/versioning.h ../cups/ppd.h ../cups/array.h
-cups-deviced.32.o: cups-deviced.c  ../cups/file.h ../cups/language.h ../cups/file.h
-cups-deviced.32.o: cups-deviced.c  ../cups/string.h ../config.h ../cups/array.h ../cups/dir.h
-cups-driverd.32.o: cups-driverd.c  util.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
-cups-driverd.32.o: cups-driverd.c  ../cups/versioning.h ../cups/ppd.h ../cups/array.h
-cups-driverd.32.o: cups-driverd.c  ../cups/file.h ../cups/language.h ../cups/file.h
-cups-driverd.32.o: cups-driverd.c  ../cups/string.h ../config.h ../cups/dir.h
-cups-driverd.32.o: cups-driverd.c  ../cups/transcode.h ../cups/ppd-private.h ../cups/cups.h
-cups-lpd.32.o: cups-lpd.c  ../cups/http-private.h ../config.h ../cups/http.h
-cups-lpd.32.o: cups-lpd.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-cups-lpd.32.o: cups-lpd.c  ../cups/ipp.h ../cups/cups.h ../cups/ppd.h ../cups/array.h
-cups-lpd.32.o: cups-lpd.c  ../cups/file.h ../cups/language.h ../cups/string.h
-cups-lpd.32.o: cups-lpd.c  ../cups/language.h
-cups-polld.32.o: cups-polld.c  ../cups/http-private.h ../config.h ../cups/http.h
-cups-polld.32.o: cups-polld.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-cups-polld.32.o: cups-polld.c  ../cups/ipp.h ../cups/cups.h ../cups/ppd.h ../cups/array.h
-cups-polld.32.o: cups-polld.c  ../cups/file.h ../cups/language.h ../cups/language.h
-cups-polld.32.o: cups-polld.c  ../cups/string.h
-testdirsvc.32.o: testdirsvc.c  ../cups/cups.h ../cups/ipp.h ../cups/http.h
-testdirsvc.32.o: testdirsvc.c  ../cups/versioning.h ../cups/ppd.h ../cups/array.h
-testdirsvc.32.o: testdirsvc.c  ../cups/file.h ../cups/language.h ../cups/string.h ../config.h
-testlpd.32.o: testlpd.c  ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/versioning.h
-testlpd.32.o: testlpd.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-testlpd.32.o: testlpd.c  ../cups/string.h ../config.h
-testmime.32.o: testmime.c  ../cups/string.h ../config.h mime.h ../cups/array.h
-testmime.32.o: testmime.c  ../cups/versioning.h ../cups/ipp.h ../cups/file.h ../cups/dir.h
-testspeed.32.o: testspeed.c  ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/versioning.h
-testspeed.32.o: testspeed.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-testspeed.32.o: testspeed.c  ../cups/language.h ../cups/debug.h
-testsub.32.o: testsub.c  ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/versioning.h
-testsub.32.o: testsub.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-testsub.32.o: testsub.c  ../cups/debug.h ../cups/string.h ../config.h
-util.32.o: util.c  util.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
-util.32.o: util.c  ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h
-util.32.o: util.c  ../cups/language.h ../cups/file.h ../cups/string.h ../config.h
+type.32.o: type.c  ../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/file.h
+type.32.o: type.c  ../cups/debug.h
 # DO NOT DELETE
 
-auth.64.o: auth.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-auth.64.o: auth.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-auth.64.o: auth.c  ../cups/ipp.h ../cups/string.h ../cups/array.h ../cups/cups.h
-auth.64.o: auth.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-auth.64.o: auth.c  mime.h ../cups/ipp.h ../cups/file.h ../cups/http.h ../cups/i18n.h
-auth.64.o: auth.c  ../cups/transcode.h ../cups/debug.h sysman.h statbuf.h cert.h auth.h
-auth.64.o: auth.c  client.h policy.h printers.h classes.h job.h conf.h banners.h
-auth.64.o: auth.c  dirsvc.h network.h subscriptions.h
-banners.64.o: banners.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-banners.64.o: banners.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-banners.64.o: banners.c  ../cups/ipp.h ../cups/string.h ../cups/array.h ../cups/cups.h
-banners.64.o: banners.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-banners.64.o: banners.c  mime.h ../cups/ipp.h ../cups/file.h ../cups/http.h ../cups/i18n.h
-banners.64.o: banners.c  ../cups/transcode.h ../cups/debug.h sysman.h statbuf.h cert.h
-banners.64.o: banners.c  auth.h client.h policy.h printers.h classes.h job.h conf.h
-banners.64.o: banners.c  banners.h dirsvc.h network.h subscriptions.h ../cups/dir.h
-cert.64.o: cert.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-cert.64.o: cert.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-cert.64.o: cert.c  ../cups/ipp.h ../cups/string.h ../cups/array.h ../cups/cups.h
-cert.64.o: cert.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-cert.64.o: cert.c  mime.h ../cups/ipp.h ../cups/file.h ../cups/http.h ../cups/i18n.h
-cert.64.o: cert.c  ../cups/transcode.h ../cups/debug.h sysman.h statbuf.h cert.h auth.h
-cert.64.o: cert.c  client.h policy.h printers.h classes.h job.h conf.h banners.h
-cert.64.o: cert.c  dirsvc.h network.h subscriptions.h
-classes.64.o: classes.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-classes.64.o: classes.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-classes.64.o: classes.c  ../cups/ipp.h ../cups/string.h ../cups/array.h ../cups/cups.h
-classes.64.o: classes.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-classes.64.o: classes.c  mime.h ../cups/ipp.h ../cups/file.h ../cups/http.h ../cups/i18n.h
-classes.64.o: classes.c  ../cups/transcode.h ../cups/debug.h sysman.h statbuf.h cert.h
-classes.64.o: classes.c  auth.h client.h policy.h printers.h classes.h job.h conf.h
-classes.64.o: classes.c  banners.h dirsvc.h network.h subscriptions.h
-client.64.o: client.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-client.64.o: client.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-client.64.o: client.c  ../cups/ipp.h ../cups/string.h ../cups/array.h ../cups/cups.h
-client.64.o: client.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-client.64.o: client.c  mime.h ../cups/ipp.h ../cups/file.h ../cups/http.h ../cups/i18n.h
-client.64.o: client.c  ../cups/transcode.h ../cups/debug.h sysman.h statbuf.h cert.h
-client.64.o: client.c  auth.h client.h policy.h printers.h classes.h job.h conf.h
-client.64.o: client.c  banners.h dirsvc.h network.h subscriptions.h
-conf.64.o: conf.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-conf.64.o: conf.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-conf.64.o: conf.c  ../cups/ipp.h ../cups/string.h ../cups/array.h ../cups/cups.h
-conf.64.o: conf.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-conf.64.o: conf.c  mime.h ../cups/ipp.h ../cups/file.h ../cups/http.h ../cups/i18n.h
-conf.64.o: conf.c  ../cups/transcode.h ../cups/debug.h sysman.h statbuf.h cert.h auth.h
-conf.64.o: conf.c  client.h policy.h printers.h classes.h job.h conf.h banners.h
-conf.64.o: conf.c  dirsvc.h network.h subscriptions.h
-dirsvc.64.o: dirsvc.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-dirsvc.64.o: dirsvc.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-dirsvc.64.o: dirsvc.c  ../cups/ipp.h ../cups/string.h ../cups/array.h ../cups/cups.h
-dirsvc.64.o: dirsvc.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-dirsvc.64.o: dirsvc.c  mime.h ../cups/ipp.h ../cups/file.h ../cups/http.h ../cups/i18n.h
-dirsvc.64.o: dirsvc.c  ../cups/transcode.h ../cups/debug.h sysman.h statbuf.h cert.h
-dirsvc.64.o: dirsvc.c  auth.h client.h policy.h printers.h classes.h job.h conf.h
-dirsvc.64.o: dirsvc.c  banners.h dirsvc.h network.h subscriptions.h
-env.64.o: env.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-env.64.o: env.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h
-env.64.o: env.c  ../cups/string.h ../cups/array.h ../cups/cups.h ../cups/ppd.h
-env.64.o: env.c  ../cups/array.h ../cups/file.h ../cups/language.h mime.h ../cups/ipp.h
-env.64.o: env.c  ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/transcode.h
-env.64.o: env.c  ../cups/debug.h sysman.h statbuf.h cert.h auth.h client.h policy.h
-env.64.o: env.c  printers.h classes.h job.h conf.h banners.h dirsvc.h network.h
-env.64.o: env.c  subscriptions.h
-main.64.o: main.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-main.64.o: main.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-main.64.o: main.c  ../cups/ipp.h ../cups/string.h ../cups/array.h ../cups/cups.h
-main.64.o: main.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-main.64.o: main.c  mime.h ../cups/ipp.h ../cups/file.h ../cups/http.h ../cups/i18n.h
-main.64.o: main.c  ../cups/transcode.h ../cups/debug.h sysman.h statbuf.h cert.h auth.h
-main.64.o: main.c  client.h policy.h printers.h classes.h job.h conf.h banners.h
-main.64.o: main.c  dirsvc.h network.h subscriptions.h ../cups/dir.h
-ipp.64.o: ipp.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-ipp.64.o: ipp.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h
-ipp.64.o: ipp.c  ../cups/string.h ../cups/array.h ../cups/cups.h ../cups/ppd.h
-ipp.64.o: ipp.c  ../cups/array.h ../cups/file.h ../cups/language.h mime.h ../cups/ipp.h
-ipp.64.o: ipp.c  ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/transcode.h
-ipp.64.o: ipp.c  ../cups/debug.h sysman.h statbuf.h cert.h auth.h client.h policy.h
-ipp.64.o: ipp.c  printers.h classes.h job.h conf.h banners.h dirsvc.h network.h
-ipp.64.o: ipp.c  subscriptions.h ../cups/ppd-private.h ../cups/cups.h
-listen.64.o: listen.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-listen.64.o: listen.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-listen.64.o: listen.c  ../cups/ipp.h ../cups/string.h ../cups/array.h ../cups/cups.h
-listen.64.o: listen.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-listen.64.o: listen.c  mime.h ../cups/ipp.h ../cups/file.h ../cups/http.h ../cups/i18n.h
-listen.64.o: listen.c  ../cups/transcode.h ../cups/debug.h sysman.h statbuf.h cert.h
-listen.64.o: listen.c  auth.h client.h policy.h printers.h classes.h job.h conf.h
-listen.64.o: listen.c  banners.h dirsvc.h network.h subscriptions.h
-job.64.o: job.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-job.64.o: job.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h
-job.64.o: job.c  ../cups/string.h ../cups/array.h ../cups/cups.h ../cups/ppd.h
-job.64.o: job.c  ../cups/array.h ../cups/file.h ../cups/language.h mime.h ../cups/ipp.h
-job.64.o: job.c  ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/transcode.h
-job.64.o: job.c  ../cups/debug.h sysman.h statbuf.h cert.h auth.h client.h policy.h
-job.64.o: job.c  printers.h classes.h job.h conf.h banners.h dirsvc.h network.h
-job.64.o: job.c  subscriptions.h ../cups/backend.h ../cups/dir.h
-log.64.o: log.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-log.64.o: log.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h
-log.64.o: log.c  ../cups/string.h ../cups/array.h ../cups/cups.h ../cups/ppd.h
-log.64.o: log.c  ../cups/array.h ../cups/file.h ../cups/language.h mime.h ../cups/ipp.h
-log.64.o: log.c  ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/transcode.h
-log.64.o: log.c  ../cups/debug.h sysman.h statbuf.h cert.h auth.h client.h policy.h
-log.64.o: log.c  printers.h classes.h job.h conf.h banners.h dirsvc.h network.h
-log.64.o: log.c  subscriptions.h
-network.64.o: network.c  ../cups/http-private.h ../config.h ../cups/http.h
-network.64.o: network.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-network.64.o: network.c  ../cups/ipp.h cupsd.h ../cups/string.h ../cups/array.h
-network.64.o: network.c  ../cups/cups.h ../cups/ppd.h ../cups/array.h ../cups/file.h
-network.64.o: network.c  ../cups/language.h mime.h ../cups/ipp.h ../cups/file.h
-network.64.o: network.c  ../cups/http.h ../cups/i18n.h ../cups/transcode.h ../cups/debug.h
-network.64.o: network.c  sysman.h statbuf.h cert.h auth.h client.h policy.h printers.h
-network.64.o: network.c  classes.h job.h conf.h banners.h dirsvc.h network.h
-network.64.o: network.c  subscriptions.h
-policy.64.o: policy.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-policy.64.o: policy.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-policy.64.o: policy.c  ../cups/ipp.h ../cups/string.h ../cups/array.h ../cups/cups.h
-policy.64.o: policy.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-policy.64.o: policy.c  mime.h ../cups/ipp.h ../cups/file.h ../cups/http.h ../cups/i18n.h
-policy.64.o: policy.c  ../cups/transcode.h ../cups/debug.h sysman.h statbuf.h cert.h
-policy.64.o: policy.c  auth.h client.h policy.h printers.h classes.h job.h conf.h
-policy.64.o: policy.c  banners.h dirsvc.h network.h subscriptions.h
-printers.64.o: printers.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-printers.64.o: printers.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-printers.64.o: printers.c  ../cups/ipp.h ../cups/string.h ../cups/array.h ../cups/cups.h
-printers.64.o: printers.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-printers.64.o: printers.c  mime.h ../cups/ipp.h ../cups/file.h ../cups/http.h ../cups/i18n.h
-printers.64.o: printers.c  ../cups/transcode.h ../cups/debug.h sysman.h statbuf.h cert.h
-printers.64.o: printers.c  auth.h client.h policy.h printers.h classes.h job.h conf.h
-printers.64.o: printers.c  banners.h dirsvc.h network.h subscriptions.h ../cups/dir.h
-process.64.o: process.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-process.64.o: process.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-process.64.o: process.c  ../cups/ipp.h ../cups/string.h ../cups/array.h ../cups/cups.h
-process.64.o: process.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-process.64.o: process.c  mime.h ../cups/ipp.h ../cups/file.h ../cups/http.h ../cups/i18n.h
-process.64.o: process.c  ../cups/transcode.h ../cups/debug.h sysman.h statbuf.h cert.h
-process.64.o: process.c  auth.h client.h policy.h printers.h classes.h job.h conf.h
-process.64.o: process.c  banners.h dirsvc.h network.h subscriptions.h
-quotas.64.o: quotas.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-quotas.64.o: quotas.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-quotas.64.o: quotas.c  ../cups/ipp.h ../cups/string.h ../cups/array.h ../cups/cups.h
-quotas.64.o: quotas.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-quotas.64.o: quotas.c  mime.h ../cups/ipp.h ../cups/file.h ../cups/http.h ../cups/i18n.h
-quotas.64.o: quotas.c  ../cups/transcode.h ../cups/debug.h sysman.h statbuf.h cert.h
-quotas.64.o: quotas.c  auth.h client.h policy.h printers.h classes.h job.h conf.h
-quotas.64.o: quotas.c  banners.h dirsvc.h network.h subscriptions.h
-removefile.64.o: removefile.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-removefile.64.o: removefile.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-removefile.64.o: removefile.c  ../cups/ipp.h ../cups/string.h ../cups/array.h ../cups/cups.h
-removefile.64.o: removefile.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-removefile.64.o: removefile.c  mime.h ../cups/ipp.h ../cups/file.h ../cups/http.h
-removefile.64.o: removefile.c  ../cups/i18n.h ../cups/transcode.h ../cups/debug.h sysman.h
-removefile.64.o: removefile.c  statbuf.h cert.h auth.h client.h policy.h printers.h classes.h
-removefile.64.o: removefile.c  job.h conf.h banners.h dirsvc.h network.h subscriptions.h
-select.64.o: select.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-select.64.o: select.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-select.64.o: select.c  ../cups/ipp.h ../cups/string.h ../cups/array.h ../cups/cups.h
-select.64.o: select.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-select.64.o: select.c  mime.h ../cups/ipp.h ../cups/file.h ../cups/http.h ../cups/i18n.h
-select.64.o: select.c  ../cups/transcode.h ../cups/debug.h sysman.h statbuf.h cert.h
-select.64.o: select.c  auth.h client.h policy.h printers.h classes.h job.h conf.h
-select.64.o: select.c  banners.h dirsvc.h network.h subscriptions.h
-server.64.o: server.c  ../cups/http-private.h ../config.h ../cups/http.h
-server.64.o: server.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-server.64.o: server.c  ../cups/ipp.h cupsd.h ../cups/string.h ../cups/array.h
-server.64.o: server.c  ../cups/cups.h ../cups/ppd.h ../cups/array.h ../cups/file.h
-server.64.o: server.c  ../cups/language.h mime.h ../cups/ipp.h ../cups/file.h
-server.64.o: server.c  ../cups/http.h ../cups/i18n.h ../cups/transcode.h ../cups/debug.h
-server.64.o: server.c  sysman.h statbuf.h cert.h auth.h client.h policy.h printers.h
-server.64.o: server.c  classes.h job.h conf.h banners.h dirsvc.h network.h subscriptions.h
-statbuf.64.o: statbuf.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-statbuf.64.o: statbuf.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-statbuf.64.o: statbuf.c  ../cups/ipp.h ../cups/string.h ../cups/array.h ../cups/cups.h
-statbuf.64.o: statbuf.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-statbuf.64.o: statbuf.c  mime.h ../cups/ipp.h ../cups/file.h ../cups/http.h ../cups/i18n.h
-statbuf.64.o: statbuf.c  ../cups/transcode.h ../cups/debug.h sysman.h statbuf.h cert.h
-statbuf.64.o: statbuf.c  auth.h client.h policy.h printers.h classes.h job.h conf.h
-statbuf.64.o: statbuf.c  banners.h dirsvc.h network.h subscriptions.h
-subscriptions.64.o: subscriptions.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-subscriptions.64.o: subscriptions.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-subscriptions.64.o: subscriptions.c  ../cups/ipp.h ../cups/string.h ../cups/array.h
-subscriptions.64.o: subscriptions.c  ../cups/cups.h ../cups/ppd.h ../cups/array.h ../cups/file.h
-subscriptions.64.o: subscriptions.c  ../cups/language.h mime.h ../cups/ipp.h ../cups/file.h
-subscriptions.64.o: subscriptions.c  ../cups/http.h ../cups/i18n.h ../cups/transcode.h
-subscriptions.64.o: subscriptions.c  ../cups/debug.h sysman.h statbuf.h cert.h auth.h client.h
-subscriptions.64.o: subscriptions.c  policy.h printers.h classes.h job.h conf.h banners.h
-subscriptions.64.o: subscriptions.c  dirsvc.h network.h subscriptions.h
-sysman.64.o: sysman.c  cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-sysman.64.o: sysman.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-sysman.64.o: sysman.c  ../cups/ipp.h ../cups/string.h ../cups/array.h ../cups/cups.h
-sysman.64.o: sysman.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-sysman.64.o: sysman.c  mime.h ../cups/ipp.h ../cups/file.h ../cups/http.h ../cups/i18n.h
-sysman.64.o: sysman.c  ../cups/transcode.h ../cups/debug.h sysman.h statbuf.h cert.h
-sysman.64.o: sysman.c  auth.h client.h policy.h printers.h classes.h job.h conf.h
-sysman.64.o: sysman.c  banners.h dirsvc.h network.h subscriptions.h
 filter.64.o: filter.c  ../cups/debug.h ../cups/string.h ../config.h mime.h ../cups/array.h
-filter.64.o: filter.c  ../cups/versioning.h ../cups/ipp.h ../cups/file.h
+filter.64.o: filter.c  ../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/file.h
 mime.64.o: mime.c  ../cups/debug.h ../cups/dir.h ../cups/versioning.h ../cups/string.h
-mime.64.o: mime.c  ../config.h mime.h ../cups/array.h ../cups/ipp.h ../cups/file.h
+mime.64.o: mime.c  ../config.h mime.h ../cups/array.h ../cups/ipp.h ../cups/http.h
+mime.64.o: mime.c  ../cups/file.h
 type.64.o: type.c  ../cups/string.h ../config.h mime.h ../cups/array.h
-type.64.o: type.c  ../cups/versioning.h ../cups/ipp.h ../cups/file.h ../cups/debug.h
-cupsfilter.64.o: cupsfilter.c  ../cups/cups.h ../cups/ipp.h ../cups/http.h
-cupsfilter.64.o: cupsfilter.c  ../cups/versioning.h ../cups/ppd.h ../cups/array.h
-cupsfilter.64.o: cupsfilter.c  ../cups/file.h ../cups/language.h ../cups/i18n.h
-cupsfilter.64.o: cupsfilter.c  ../cups/transcode.h ../cups/string.h ../config.h mime.h
-cupsfilter.64.o: cupsfilter.c  ../cups/array.h ../cups/ipp.h ../cups/file.h
-cups-deviced.64.o: cups-deviced.c  util.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
-cups-deviced.64.o: cups-deviced.c  ../cups/versioning.h ../cups/ppd.h ../cups/array.h
-cups-deviced.64.o: cups-deviced.c  ../cups/file.h ../cups/language.h ../cups/file.h
-cups-deviced.64.o: cups-deviced.c  ../cups/string.h ../config.h ../cups/array.h ../cups/dir.h
-cups-driverd.64.o: cups-driverd.c  util.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
-cups-driverd.64.o: cups-driverd.c  ../cups/versioning.h ../cups/ppd.h ../cups/array.h
-cups-driverd.64.o: cups-driverd.c  ../cups/file.h ../cups/language.h ../cups/file.h
-cups-driverd.64.o: cups-driverd.c  ../cups/string.h ../config.h ../cups/dir.h
-cups-driverd.64.o: cups-driverd.c  ../cups/transcode.h ../cups/ppd-private.h ../cups/cups.h
-cups-lpd.64.o: cups-lpd.c  ../cups/http-private.h ../config.h ../cups/http.h
-cups-lpd.64.o: cups-lpd.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-cups-lpd.64.o: cups-lpd.c  ../cups/ipp.h ../cups/cups.h ../cups/ppd.h ../cups/array.h
-cups-lpd.64.o: cups-lpd.c  ../cups/file.h ../cups/language.h ../cups/string.h
-cups-lpd.64.o: cups-lpd.c  ../cups/language.h
-cups-polld.64.o: cups-polld.c  ../cups/http-private.h ../config.h ../cups/http.h
-cups-polld.64.o: cups-polld.c  ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h
-cups-polld.64.o: cups-polld.c  ../cups/ipp.h ../cups/cups.h ../cups/ppd.h ../cups/array.h
-cups-polld.64.o: cups-polld.c  ../cups/file.h ../cups/language.h ../cups/language.h
-cups-polld.64.o: cups-polld.c  ../cups/string.h
-testdirsvc.64.o: testdirsvc.c  ../cups/cups.h ../cups/ipp.h ../cups/http.h
-testdirsvc.64.o: testdirsvc.c  ../cups/versioning.h ../cups/ppd.h ../cups/array.h
-testdirsvc.64.o: testdirsvc.c  ../cups/file.h ../cups/language.h ../cups/string.h ../config.h
-testlpd.64.o: testlpd.c  ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/versioning.h
-testlpd.64.o: testlpd.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-testlpd.64.o: testlpd.c  ../cups/string.h ../config.h
-testmime.64.o: testmime.c  ../cups/string.h ../config.h mime.h ../cups/array.h
-testmime.64.o: testmime.c  ../cups/versioning.h ../cups/ipp.h ../cups/file.h ../cups/dir.h
-testspeed.64.o: testspeed.c  ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/versioning.h
-testspeed.64.o: testspeed.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-testspeed.64.o: testspeed.c  ../cups/language.h ../cups/debug.h
-testsub.64.o: testsub.c  ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/versioning.h
-testsub.64.o: testsub.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-testsub.64.o: testsub.c  ../cups/debug.h ../cups/string.h ../config.h
-util.64.o: util.c  util.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
-util.64.o: util.c  ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h
-util.64.o: util.c  ../cups/language.h ../cups/file.h ../cups/string.h ../config.h
+type.64.o: type.c  ../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/file.h
+type.64.o: type.c  ../cups/debug.h
index abcd072690eb5edc36785d2a5e7ce775a933d12a..c199e697c4cde924b0f5a3e244df559ba7d7335d 100644 (file)
@@ -46,14 +46,13 @@ LIBOBJS =   \
                type.o
 LIB32OBJS      = $(LIBOBJS:.o=.32.o)
 LIB64OBJS      = $(LIBOBJS:.o=.64.o)
-OBJS   =       \
+COBJS  =       \
                $(CUPSDOBJS) \
                $(LIBOBJS) \
                $(LIB32OBJS) \
                $(LIB64OBJS) \
                cupsfilter.o \
                cups-deviced.o \
-               cups-driverd.o \
                cups-lpd.o \
                cups-polld.o \
                testdirsvc.o \
@@ -62,7 +61,11 @@ OBJS =       \
                testspeed.o \
                testsub.o \
                util.o
-
+CXXOBJS        =       \
+               cups-driverd.o
+OBJS   =       \
+               $(COBJS) \
+               $(CXXOBJS)
 LIBTARGETS =   \
                $(LIBCUPSMIME) \
                $(LIB32CUPSMIME) \
@@ -114,13 +117,17 @@ clean:
 #
 
 depend:
-       touch Dependencies.tmp
-       makedepend -Y -I.. -fDependencies.tmp $(OBJS:.o=.c) >/dev/null 2>&1
+       touch Dependencies.tmp Dependencies.tmplib
+       makedepend -Y -I.. -fDependencies.tmp $(COBJS:.o=.c) \
+               $(CXXOBJS:.o=.cxx) >/dev/null 2>&1
+       makedepend -Y -I.. -fDependencies.tmplib $(LIBOBJS:.o=.c) >/dev/null 2>&1
        $(RM) Dependencies
        cp Dependencies.tmp Dependencies
-       sed -E -e '1,$$s/^([^.]+)\.o:/\1\.32.o: \1\.c /' Dependencies.tmp >>Dependencies
-       sed -E -e '1,$$s/^([^.]+)\.o:/\1\.64.o: \1\.c /' Dependencies.tmp >>Dependencies
-       $(RM) Dependencies.tmp
+       sed -E -e '1,$$s/^([^.]+)\.o:/\1\.32.o: \1\.c /' \
+               Dependencies.tmplib >>Dependencies
+       sed -E -e '1,$$s/^([^.]+)\.o:/\1\.64.o: \1\.c /' \
+               Dependencies.tmplib >>Dependencies
+       $(RM) Dependencies.tmp Dependencies.tmplib
 
 
 #
@@ -360,9 +367,10 @@ cups-deviced:      cups-deviced.o util.o ../cups/$(LIBCUPS)
 # Make the driver daemon, "cups-driverd".
 #
 
-cups-driverd:  cups-driverd.o util.o ../cups/$(LIBCUPS)
+cups-driverd:  cups-driverd.o util.o ../cups/$(LIBCUPS) ../ppdc/$(LIBCUPSPPDC)
        echo Linking $@...
-       $(CC) $(LDFLAGS) -o cups-driverd cups-driverd.o util.o $(LIBS)
+       $(CXX) $(LDFLAGS) -o cups-driverd cups-driverd.o util.o \
+               -L../ppdc -lcupsppdc $(LIBS)
 
 
 #
similarity index 78%
rename from scheduler/cups-driverd.c
rename to scheduler/cups-driverd.cxx
index ed364c721e458a82e19c053be2da597f245ca241..962cb9362dc69f1f2abb6768638280016f15783d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: cups-driverd.c 7652 2008-06-16 17:56:27Z mike $"
+ * "$Id$"
  *
  *   PPD/driver support for the Common UNIX Printing System (CUPS).
  *
  *
  *   main()          - Scan for drivers and return an IPP response.
  *   add_ppd()       - Add a PPD file.
+ *   cat_drv()       - Generate a PPD from a driver info file.
  *   cat_ppd()       - Copy a PPD file to stdout.
+ *   copy_static()   - Copy a static PPD file to stdout.
  *   compare_names() - Compare PPD filenames for sorting.
  *   compare_ppds()  - Compare PPD file make and model names for sorting.
  *   free_array()    - Free an array of strings.
  *   list_ppds()     - List PPD files.
  *   load_ppds()     - Load PPD files recursively.
+ *   load_drv()      - Load the PPDs from a driver information file.
  *   load_drivers()  - Load driver-generated PPD files.
  */
 
@@ -37,6 +40,7 @@
 #include <cups/dir.h>
 #include <cups/transcode.h>
 #include <cups/ppd-private.h>
+#include <ppdc/ppdc.h>
 
 
 /*
@@ -113,7 +117,9 @@ static ppd_info_t   *add_ppd(const char *name, const char *language,
                                 const char *device_id, const char *product,
                                 const char *psversion, time_t mtime,
                                 size_t size, int model_number, int type);
+static int             cat_drv(const char *name, int request_id);
 static int             cat_ppd(const char *name, int request_id);
+static int             cat_static(const char *name, int request_id);
 static int             compare_names(const ppd_info_t *p0,
                                      const ppd_info_t *p1);
 static int             compare_ppds(const ppd_info_t *p0,
@@ -121,6 +127,8 @@ static int          compare_ppds(const ppd_info_t *p0,
 static void            free_array(cups_array_t *a);
 static int             list_ppds(int request_id, int limit, const char *opt);
 static int             load_drivers(void);
+static int             load_drv(const char *filename, const char *name,
+                                cups_file_t *fp, time_t mtime, off_t size);
 static int             load_ppds(const char *d, const char *p, int descend);
 
 
@@ -190,9 +198,9 @@ add_ppd(const char *name,           /* I - PPD name */
     AllocPPDs += 128;
 
     if (!PPDs)
-      ppd = malloc(sizeof(ppd_info_t) * AllocPPDs);
+      ppd = (ppd_info_t *)malloc(sizeof(ppd_info_t) * AllocPPDs);
     else
-      ppd = realloc(PPDs, sizeof(ppd_info_t) * AllocPPDs);
+      ppd = (ppd_info_t *)realloc(PPDs, sizeof(ppd_info_t) * AllocPPDs);
 
     if (ppd == NULL)
     {
@@ -248,6 +256,140 @@ add_ppd(const char *name,         /* I - PPD name */
 }
 
 
+/*
+ * 'cat_drv()' - Generate a PPD from a driver info file.
+ */
+
+static int                             /* O - Exit code */
+cat_drv(const char *name,              /* I - PPD name */
+        int        request_id)         /* I - Request ID for response? */
+{
+  const char   *datadir;               // CUPS_DATADIR env var
+  ppdcSource   *src;                   // PPD source file data
+  ppdcDriver   *d;                     // Current driver
+  cups_file_t  *out;                   // Stdout via CUPS file API 
+  char         message[2048],          // status-message
+               filename[1024],         // Full path to .drv file(s)
+               scheme[32],             // URI scheme ("drv")
+               userpass[256],          // User/password info (unused)
+               host[2],                // Hostname (unused)
+               resource[1024],         // Resource path (/dir/to/filename.drv)
+               *pc_file_name;          // Filename portion of URI
+  int          port;                   // Port number (unused)
+
+
+  // Determine where CUPS has installed the data files...
+  if ((datadir = getenv("CUPS_DATADIR")) == NULL)
+    datadir = CUPS_DATADIR;
+
+  // Pull out the 
+  if (httpSeparateURI(HTTP_URI_CODING_ALL, name, scheme, sizeof(scheme),
+                      userpass, sizeof(userpass), host, sizeof(host), &port,
+                     resource, sizeof(resource)) < HTTP_URI_OK ||
+      strstr(resource, "../") ||
+      (pc_file_name = strrchr(resource, '/')) == NULL ||
+      pc_file_name == resource)
+  {
+    fprintf(stderr, "ERROR: Bad PPD name \"%s\"!\n", name);
+
+    if (request_id)
+    {
+      snprintf(message, sizeof(message), "Bad PPD name \"%s\"!", name);
+
+      cupsdSendIPPHeader(IPP_NOT_FOUND, request_id);
+      cupsdSendIPPGroup(IPP_TAG_OPERATION);
+      cupsdSendIPPString(IPP_TAG_CHARSET, "attributes-charset", "utf-8");
+      cupsdSendIPPString(IPP_TAG_LANGUAGE, "attributes-natural-language",
+                        "en-US");
+      cupsdSendIPPString(IPP_TAG_TEXT, "status-message", message);
+      cupsdSendIPPTrailer();
+    }
+
+    return (1);
+  }
+
+  *pc_file_name++ = '\0';
+
+#ifdef __APPLE__
+  if (!strncmp(resource, "/Library/Printers/PPDs.drv/", 27))
+    strlcpy(filename, resource, sizeof(filename));
+  else
+#endif // __APPLE__
+  {
+    snprintf(filename, sizeof(filename), "%s/drv%s", datadir, resource);
+    if (access(filename, 0))
+      snprintf(filename, sizeof(filename), "%s/model%s", datadir, resource);
+  }
+
+  src = new ppdcSource(filename);
+
+  for (d = (ppdcDriver *)src->drivers->first();
+       d;
+       d = (ppdcDriver *)src->drivers->next())
+    if (!strcasecmp(pc_file_name, d->pc_file_name->value) ||
+        (d->file_name && !strcasecmp(pc_file_name, d->file_name->value)))
+      break;
+
+  if (d)
+  {
+    ppdcArray  *locales;               // Locale names
+    ppdcCatalog        *catalog;               // Message catalog in .drv file
+
+
+    fprintf(stderr, "DEBUG: %d locales defined in \"%s\"...\n",
+            src->po_files->count, filename);
+
+    locales = new ppdcArray();
+    for (catalog = (ppdcCatalog *)src->po_files->first();
+         catalog;
+        catalog = (ppdcCatalog *)src->po_files->next())
+    {
+      fprintf(stderr, "DEBUG: Adding locale \"%s\"...\n",
+              catalog->locale->value);
+      locales->add(catalog->locale);
+    }
+
+    if (request_id)
+    {
+      cupsdSendIPPHeader(IPP_OK, request_id);
+      cupsdSendIPPGroup(IPP_TAG_OPERATION);
+      cupsdSendIPPString(IPP_TAG_CHARSET, "attributes-charset", "utf-8");
+      cupsdSendIPPString(IPP_TAG_LANGUAGE, "attributes-natural-language",
+                        "en-US");
+      cupsdSendIPPTrailer();
+      fflush(stdout);
+    }
+
+    out = cupsFileStdout();
+    d->write_ppd_file(out, NULL, locales, src, PPDC_LFONLY);
+    cupsFileClose(out);
+
+    delete locales;
+  }
+  else
+  {
+    fprintf(stderr, "ERROR: PPD \"%s\" not found!\n", name);
+
+    if (request_id)
+    {
+      snprintf(message, sizeof(message), "PPD \"%s\" not found!", name);
+
+      cupsdSendIPPHeader(IPP_NOT_FOUND, request_id);
+      cupsdSendIPPGroup(IPP_TAG_OPERATION);
+      cupsdSendIPPString(IPP_TAG_CHARSET, "attributes-charset", "utf-8");
+      cupsdSendIPPString(IPP_TAG_LANGUAGE, "attributes-natural-language",
+                        "en-US");
+      cupsdSendIPPString(IPP_TAG_TEXT, "status-message", message);
+      cupsdSendIPPTrailer();
+    }
+  }
+
+  delete src;
+
+  return (!d);
+}
+
+
 /*
  * 'cat_ppd()' - Copy a PPD file to stdout.
  */
@@ -257,9 +399,9 @@ cat_ppd(const char *name,           /* I - PPD name */
         int        request_id)         /* I - Request ID for response? */
 {
   char         scheme[256],            /* Scheme from PPD name */
-               *sptr;                  /* Pointer into scheme */
-  char         line[1024];             /* Line/filename */
-  char         message[2048];          /* status-message */
+               *sptr,                  /* Pointer into scheme */
+               line[1024],             /* Line/filename */
+               message[2048];          /* status-message */
 
 
  /*
@@ -287,7 +429,11 @@ cat_ppd(const char *name,          /* I - PPD name */
   if (request_id > 0)
     puts("Content-Type: application/ipp\n");
 
-  if (scheme[0])
+  if (!scheme[0])
+    return (cat_static(name, request_id));
+  else if (!strcmp(scheme, "drv"))
+    return (cat_drv(name, request_id));
+  else
   {
    /*
     * Dynamic PPD, see if we have a driver program to support it...
@@ -357,137 +503,145 @@ cat_ppd(const char *name,               /* I - PPD name */
       return (1);
     }
   }
-  else
-  {
-   /*
-    * Static PPD, see if we have a valid path and it exists...
-    */
-
-    cups_file_t        *fp;                    /* PPD file */
-    const char *datadir;               /* CUPS_DATADIR env var */
 
+ /*
+  * Return with no errors...
+  */
 
-    if (name[0] == '/' || strstr(name, "../") || strstr(name, "/.."))
-    {
-     /*
-      * Bad name...
-      */
+  return (0);
+}
 
-      fprintf(stderr, "ERROR: [cups-driverd] Bad PPD name \"%s\"!\n", name);
 
-      if (request_id)
-      {
-       snprintf(message, sizeof(message), "Bad PPD name \"%s\"!", name);
+/*
+ * 'copy_static()' - Copy a static PPD file to stdout.
+ */
 
-       cupsdSendIPPHeader(IPP_OK, request_id);
-       cupsdSendIPPGroup(IPP_TAG_OPERATION);
-       cupsdSendIPPString(IPP_TAG_CHARSET, "attributes-charset", "utf-8");
-       cupsdSendIPPString(IPP_TAG_LANGUAGE, "attributes-natural-language",
-                          "en-US");
-        cupsdSendIPPString(IPP_TAG_TEXT, "status-message", message);
-       cupsdSendIPPTrailer();
-      }
+static int                             /* O - Exit code */
+cat_static(const char *name,           /* I - PPD name */
+           int        request_id)      /* I - Request ID for response? */
+{
+  cups_file_t  *fp;                    /* PPD file */
+  const char   *datadir;               /* CUPS_DATADIR env var */
+  char         line[1024],             /* Line/filename */
+               message[2048];          /* status-message */
 
-      return (1);
-    }
 
+  if (name[0] == '/' || strstr(name, "../") || strstr(name, "/.."))
+  {
    /*
-    * Try opening the file...
+    * Bad name...
     */
 
-#ifdef __APPLE__
-    if (!strncmp(name, "System/Library/Printers/PPDs/Contents/Resources/", 48) ||
-        !strncmp(name, "Library/Printers/PPDs/Contents/Resources/", 41))
+    fprintf(stderr, "ERROR: [cups-driverd] Bad PPD name \"%s\"!\n", name);
+
+    if (request_id)
     {
-     /*
-      * Map ppd-name to Mac OS X standard locations...
-      */
+      snprintf(message, sizeof(message), "Bad PPD name \"%s\"!", name);
 
-      snprintf(line, sizeof(line), "/%s", name);
+      cupsdSendIPPHeader(IPP_NOT_FOUND, request_id);
+      cupsdSendIPPGroup(IPP_TAG_OPERATION);
+      cupsdSendIPPString(IPP_TAG_CHARSET, "attributes-charset", "utf-8");
+      cupsdSendIPPString(IPP_TAG_LANGUAGE, "attributes-natural-language",
+                        "en-US");
+      cupsdSendIPPString(IPP_TAG_TEXT, "status-message", message);
+      cupsdSendIPPTrailer();
     }
-    else
 
-#elif defined(__linux)
-    if (!strncmp(name, "lsb/usr/", 8))
-    {
-     /*
-      * Map ppd-name to LSB standard /usr/share/ppd location...
-      */
+    return (1);
+  }
 
-      snprintf(line, sizeof(line), "/usr/share/ppd/%s", name + 8);
-    }
-    else if (!strncmp(name, "lsb/opt/", 8))
-    {
-     /*
-      * Map ppd-name to LSB standard /opt/share/ppd location...
-      */
+ /*
+  * Try opening the file...
+  */
 
-      snprintf(line, sizeof(line), "/opt/share/ppd/%s", name + 8);
-    }
-    else if (!strncmp(name, "lsb/local/", 10))
-    {
-     /*
-      * Map ppd-name to LSB standard /usr/local/share/ppd location...
-      */
+#ifdef __APPLE__
+  if (!strncmp(name, "System/Library/Printers/PPDs/Contents/Resources/", 48) ||
+      !strncmp(name, "Library/Printers/PPDs/Contents/Resources/", 41))
+  {
+   /*
+    * Map ppd-name to Mac OS X standard locations...
+    */
 
-      snprintf(line, sizeof(line), "/usr/local/share/ppd/%s", name + 10);
-    }
-    else
+    snprintf(line, sizeof(line), "/%s", name);
+  }
+  else
 
-#endif /* __APPLE__ */
-    {
-      if ((datadir = getenv("CUPS_DATADIR")) == NULL)
-       datadir = CUPS_DATADIR;
+#elif defined(__linux)
+  if (!strncmp(name, "lsb/usr/", 8))
+  {
+   /*
+    * Map ppd-name to LSB standard /usr/share/ppd location...
+    */
 
-      snprintf(line, sizeof(line), "%s/model/%s", datadir, name);
-    }
+    snprintf(line, sizeof(line), "/usr/share/ppd/%s", name + 8);
+  }
+  else if (!strncmp(name, "lsb/opt/", 8))
+  {
+   /*
+    * Map ppd-name to LSB standard /opt/share/ppd location...
+    */
 
-    if ((fp = cupsFileOpen(line, "r")) == NULL)
-    {
-      fprintf(stderr, "ERROR: [cups-driverd] Unable to open \"%s\" - %s\n",
-              line, strerror(errno));
+    snprintf(line, sizeof(line), "/opt/share/ppd/%s", name + 8);
+  }
+  else if (!strncmp(name, "lsb/local/", 10))
+  {
+   /*
+    * Map ppd-name to LSB standard /usr/local/share/ppd location...
+    */
 
-      if (request_id)
-      {
-       snprintf(message, sizeof(message), "Unable to open \"%s\" - %s",
-                line, strerror(errno));
+    snprintf(line, sizeof(line), "/usr/local/share/ppd/%s", name + 10);
+  }
+  else
 
-       cupsdSendIPPHeader(IPP_NOT_FOUND, request_id);
-       cupsdSendIPPGroup(IPP_TAG_OPERATION);
-       cupsdSendIPPString(IPP_TAG_CHARSET, "attributes-charset", "utf-8");
-       cupsdSendIPPString(IPP_TAG_LANGUAGE, "attributes-natural-language",
-                          "en-US");
-        cupsdSendIPPString(IPP_TAG_TEXT, "status-message", message);
-       cupsdSendIPPTrailer();
-      }
+#endif /* __APPLE__ */
+  {
+    if ((datadir = getenv("CUPS_DATADIR")) == NULL)
+      datadir = CUPS_DATADIR;
 
-      return (1);
-    }
+    snprintf(line, sizeof(line), "%s/model/%s", datadir, name);
+  }
+
+  if ((fp = cupsFileOpen(line, "r")) == NULL)
+  {
+    fprintf(stderr, "ERROR: [cups-driverd] Unable to open \"%s\" - %s\n",
+           line, strerror(errno));
 
     if (request_id)
     {
-      cupsdSendIPPHeader(IPP_OK, request_id);
+      snprintf(message, sizeof(message), "Unable to open \"%s\" - %s",
+              line, strerror(errno));
+
+      cupsdSendIPPHeader(IPP_NOT_FOUND, request_id);
       cupsdSendIPPGroup(IPP_TAG_OPERATION);
       cupsdSendIPPString(IPP_TAG_CHARSET, "attributes-charset", "utf-8");
       cupsdSendIPPString(IPP_TAG_LANGUAGE, "attributes-natural-language",
-                         "en-US");
+                        "en-US");
+      cupsdSendIPPString(IPP_TAG_TEXT, "status-message", message);
       cupsdSendIPPTrailer();
     }
 
-   /*
-    * Now copy the file to stdout...
-    */
-
-    while (cupsFileGets(fp, line, sizeof(line)))
-      puts(line);
+    return (1);
+  }
 
-    cupsFileClose(fp);
+  if (request_id)
+  {
+    cupsdSendIPPHeader(IPP_OK, request_id);
+    cupsdSendIPPGroup(IPP_TAG_OPERATION);
+    cupsdSendIPPString(IPP_TAG_CHARSET, "attributes-charset", "utf-8");
+    cupsdSendIPPString(IPP_TAG_LANGUAGE, "attributes-natural-language",
+                      "en-US");
+    cupsdSendIPPTrailer();
   }
 
  /*
-  * Return with no errors...
+  * Now copy the file to stdout...
   */
 
+  while (cupsFileGets(fp, line, sizeof(line)))
+    puts(line);
+
+  cupsFileClose(fp);
+
   return (0);
 }
 
@@ -631,7 +785,7 @@ list_ppds(int        request_id,    /* I - Request ID */
       * We have a ppds.dat file, so read it!
       */
 
-      if ((PPDs = malloc(sizeof(ppd_info_t) * NumPPDs)) == NULL)
+      if ((PPDs = (ppd_info_t *)malloc(sizeof(ppd_info_t) * NumPPDs)) == NULL)
        fprintf(stderr,
                "ERROR: [cups-driverd] Unable to allocate memory for %d "
                "PPD files!\n", NumPPDs);
@@ -665,6 +819,9 @@ list_ppds(int        request_id,    /* I - Request ID */
   snprintf(model, sizeof(model), "%s/model", cups_datadir);
   load_ppds(model, "", 1);
 
+  snprintf(model, sizeof(model), "%s/drv", cups_datadir);
+  load_ppds(model, "", 1);
+
 #ifdef __APPLE__
  /*
   * Load PPDs from standard Mac OS X locations...
@@ -1105,6 +1262,8 @@ load_ppds(const char *d,          /* I - Actual directory */
   };
 
 
+  fprintf(stderr, "DEBUG: [cups-driverd] Loading \"%s\"...\n", d);
+
   if ((dir = cupsDirOpen(d)) == NULL)
   {
     if (errno != ENOENT)
@@ -1159,8 +1318,8 @@ load_ppds(const char *d,          /* I - Actual directory */
     {
       strcpy(key.record.name, name);
 
-      ppd = bsearch(&key, PPDs, SortedPPDs, sizeof(ppd_info_t),
-                    (int (*)(const void *, const void *))compare_names);
+      ppd = (ppd_info_t *)bsearch(&key, PPDs, SortedPPDs, sizeof(ppd_info_t),
+                                  (cupsd_compare_func_t)compare_names);
 
       if (ppd &&
           ppd->record.size == dent->fileinfo.st_size &&
@@ -1190,11 +1349,11 @@ load_ppds(const char *d,                /* I - Actual directory */
     if (strncmp(line, "*PPD-Adobe:", 11))
     {
      /*
-      * Nope, close the file and continue...
+      * Nope, treat it as a driver information file...
       */
 
-      cupsFileClose(fp);
-
+      load_drv(filename, name, fp, dent->fileinfo.st_mtime,
+               dent->fileinfo.st_size);
       continue;
     }
 
@@ -1531,6 +1690,114 @@ load_ppds(const char *d,                /* I - Actual directory */
 }
 
 
+/*
+ * 'load_drv()' - Load the PPDs from a driver information file.
+ */
+
+static int                             /* O - 1 on success, 0 on failure */
+load_drv(const char  *filename,                /* I - Actual filename */
+         const char  *name,            /* I - Name to the rest of the world */
+         cups_file_t *fp,              /* I - File to read from */
+        time_t      mtime,             /* I - Mod time of driver info file */
+        off_t       size)              /* I - Size of driver info file */
+{
+  ppdcSource   *src;                   // Driver information file
+  ppdcDriver   *d;                     // Current driver
+  ppdcAttr     *device_id,             // 1284DeviceID attribute
+               *product,               // Current product value
+               *ps_version,            // PSVersion attribute
+               *cups_fax,              // cupsFax attribute
+               *nick_name;             // NickName attribute
+  ppdcFilter   *filter;                // Current filter
+  bool         product_found;          // Found product?
+  char         uri[1024],              // Driver URI
+               make_model[1024];       // Make and model
+  int          type;                   // Driver type
+
+
+  src = new ppdcSource(filename, fp);
+
+  if (src->drivers->count == 0)
+  {
+    fprintf(stderr,
+            "ERROR: [cups-driverd] Bad driver information file \"%s\"!\n",
+           filename);
+    delete src;
+    return (0);
+  }
+
+  for (d = (ppdcDriver *)src->drivers->first();
+       d;
+       d = (ppdcDriver *)src->drivers->next())
+  {
+    httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "drv", "", "", 0,
+                     "/%s/%s", name,
+                    d->file_name ? d->file_name->value :
+                                   d->pc_file_name->value);
+
+    device_id  = d->find_attr("1284DeviceID", NULL);
+    ps_version = d->find_attr("PSVersion", NULL);
+    nick_name  = d->find_attr("NickName", NULL);
+
+    if (nick_name)
+      strlcpy(make_model, nick_name->value->value, sizeof(make_model));
+    else if (strncasecmp(d->model_name->value, d->manufacturer->value,
+                         strlen(d->manufacturer->value)))
+      snprintf(make_model, sizeof(make_model), "%s %s, %s",
+               d->manufacturer->value, d->model_name->value,
+              d->version->value);
+    else
+      snprintf(make_model, sizeof(make_model), "%s, %s", d->model_name->value,
+               d->version->value);
+
+    if ((cups_fax = d->find_attr("cupsFax", NULL)) != NULL &&
+        !strcasecmp(cups_fax->value->value, "true"))
+      type = PPD_TYPE_FAX;
+    else if (d->type == PPDC_DRIVER_PS)
+      type = PPD_TYPE_POSTSCRIPT;
+    else if (d->type != PPDC_DRIVER_CUSTOM)
+      type = PPD_TYPE_RASTER;
+    else
+    {
+      for (filter = (ppdcFilter *)d->filters->first(),
+               type = PPD_TYPE_POSTSCRIPT;
+          filter;
+          filter = (ppdcFilter *)d->filters->next())
+        if (strcasecmp(filter->mime_type->value, "application/vnd.cups-raster"))
+         type = PPD_TYPE_RASTER;
+        else if (strcasecmp(filter->mime_type->value,
+                           "application/vnd.cups-pdf"))
+         type = PPD_TYPE_PDF;
+    }
+
+    for (product = (ppdcAttr *)d->attrs->first(), product_found = false;
+         product;
+        product = (ppdcAttr *)d->attrs->next())
+      if (!strcmp(product->name->value, "Product"))
+      {
+        product_found = true;
+
+       add_ppd(uri, "en", d->manufacturer->value, make_model,
+               device_id ? device_id->value->value : "",
+               product->value->value,
+               ps_version ? ps_version->value->value : "(3010) 0",
+               mtime, size, d->model_number, type);
+      }
+
+    if (!product_found)
+      add_ppd(uri, "en", d->manufacturer->value, make_model,
+             device_id ? device_id->value->value : "",
+             d->model_name->value,
+             ps_version ? ps_version->value->value : "(3010) 0",
+             mtime, size, d->model_number, type);
+  }
+
+  delete src;
+
+  return (1);
+}
+
+
 /*
  * 'load_drivers()' - Load driver-generated PPD files.
  */
@@ -1704,5 +1971,5 @@ load_drivers(void)
 
 
 /*
- * End of "$Id: cups-driverd.c 7652 2008-06-16 17:56:27Z mike $".
+ * End of "$Id$".
  */
index 890da354112ba195430bd7fdadca1bd3a47f06b1..8dbee2b59380c6657ff0ffe17606cde53a138cfa 100644 (file)
@@ -98,7 +98,7 @@ static void   set_hold_until(cupsd_job_t *job, time_t holdtime);
 static void    start_job(cupsd_job_t *job, cupsd_printer_t *printer);
 static void    unload_job(cupsd_job_t *job);
 static void    update_job(cupsd_job_t *job);
-static void    update_job_attrs(cupsd_job_t *job);
+static void    update_job_attrs(cupsd_job_t *job, int do_message);
 
 
 /*
@@ -595,7 +595,7 @@ cupsdFinishJob(cupsd_job_t *job)    /* I - Job */
 
   printer = job->printer;
 
-  update_job_attrs(job);
+  update_job_attrs(job, 0);
 
   if (job->status < 0)
   {
@@ -3677,7 +3677,7 @@ update_job(cupsd_job_t *job)              /* I - Job to check */
        event |= CUPSD_EVENT_PRINTER_STATE;
       }
 
-      update_job_attrs(job);
+      update_job_attrs(job, 0);
     }
     else if (loglevel == CUPSD_LOG_ATTR)
     {
@@ -3807,6 +3807,13 @@ update_job(cupsd_job_t *job)             /* I - Job to check */
     {
       cupsdLogJob(job, loglevel, "%s", message);
 
+      strlcpy(job->printer->state_message, message,
+             sizeof(job->printer->state_message));
+      cupsdAddPrinterHistory(job->printer);
+
+      if (loglevel <= CUPSD_LOG_INFO)
+       event |= CUPSD_EVENT_PRINTER_STATE;
+
       if (loglevel <= job->status_level)
       {
        /*
@@ -3816,14 +3823,7 @@ update_job(cupsd_job_t *job)             /* I - Job to check */
        if (loglevel != CUPSD_LOG_NOTICE)
          job->status_level = loglevel;
 
-       strlcpy(job->printer->state_message, message,
-               sizeof(job->printer->state_message));
-       cupsdAddPrinterHistory(job->printer);
-
-       if (loglevel <= CUPSD_LOG_INFO)
-         event |= CUPSD_EVENT_PRINTER_STATE;
-
-       update_job_attrs(job);
+       update_job_attrs(job, 1);
       }
     }
 
@@ -3867,7 +3867,8 @@ update_job(cupsd_job_t *job)              /* I - Job to check */
  */
 
 void
-update_job_attrs(cupsd_job_t *job)     /* I - Job to update */
+update_job_attrs(cupsd_job_t *job,     /* I - Job to update */
+                 int         do_message)/* I - 1 = update job-printer-state message */
 {
   int                  i;              /* Looping var */
   int                  num_reasons;    /* Actual number of reasons */
@@ -3907,7 +3908,8 @@ update_job_attrs(cupsd_job_t *job)        /* I - Job to update */
   * Otherwise copy the printer-state-message value...
   */
 
-  if (job->printer->state_message[0])
+  if (job->printer->state_message[0] &&
+      (do_message || !job->printer_message->values[0].string.text[0]))
     cupsdSetString(&(job->printer_message->values[0].string.text),
                   job->printer->state_message);
 
index fde21215e59f1e527e1e5f23a44fa12d2883a2fb..ea6d7755db552e9ca3d457731ba788edb18909ba 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: log.c 7697 2008-06-27 15:56:00Z mike $"
+ * "$Id: log.c 7699 2008-06-27 20:44:23Z mike $"
  *
  *   Log file routines for the Common UNIX Printing System (CUPS).
  *
@@ -190,9 +190,6 @@ cupsdLogJob(cupsd_job_t *job,               /* I - Job */
   if (TestConfigFile || level > LogLevel || !ErrorLog)
     return (1);
 
-  if (level > LogLevel || !ErrorLog)
-    return (1);
-
  /*
   * Format and write the log message...
   */
@@ -829,5 +826,5 @@ format_log_line(const char *message,        /* I - Printf-style format string */
 
 
 /*
- * End of "$Id: log.c 7697 2008-06-27 15:56:00Z mike $".
+ * End of "$Id: log.c 7699 2008-06-27 20:44:23Z mike $".
  */
index 05642f3a90ed416f71d21c286cf77090d829af6d..071ffddf3e4e346fb1823d98f67e38a1c64b309a 100644 (file)
 #  include <dirent.h>
 
 
+/*
+ * C++ magic...
+ */
+
+#  ifdef __cplusplus
+extern "C" {
+#  endif /* __cplusplus */
+
+
+/*
+ * Types...
+ */
+
+typedef int (*cupsd_compare_func_t)(const void *, const void *);
+
+
 /*
  * Prototypes...
  */
@@ -47,6 +63,10 @@ extern void          cupsdSendIPPString(ipp_tag_t value_tag,
 extern void            cupsdSendIPPTrailer(void);
 
 
+#  ifdef __cplusplus
+}
+#  endif /* __cplusplus */
+
 #endif /* !_CUPSD_UTIL_H_ */
 
 /*
index 0ba2e7430fabd6d222f1b51a6eba9573eb105683..1902aeb994f5a0cfe869d68c1eb0c213dbbf5e07 100644 (file)
@@ -1,10 +1,10 @@
 #!/bin/sh
 #
-# "$Id: 5.9-lpinfo.sh 6649 2007-07-11 21:46:42Z mike $"
+# "$Id: 5.9-lpinfo.sh 7711 2008-07-02 04:39:27Z mike $"
 #
 #   Test the lpinfo command.
 #
-#   Copyright 2007 by Apple Inc.
+#   Copyright 2007-2008 by Apple Inc.
 #   Copyright 1997-2005 by Easy Software Products, all rights reserved.
 #
 #   These coded instructions, statements, and computer programs are the
@@ -38,6 +38,18 @@ else
 fi
 echo ""
 
+echo "LPINFO Drivers Test"
+echo ""
+echo "    lpinfo -m | grep -q sample.drv"
+../systemv/lpinfo -m | grep -q sample.drv 2>&1
+if test $? != 0; then
+       echo "    FAILED"
+       exit 1
+else
+       echo "    PASSED"
+fi
+echo ""
+
 #
-# End of "$Id: 5.9-lpinfo.sh 6649 2007-07-11 21:46:42Z mike $".
+# End of "$Id: 5.9-lpinfo.sh 7711 2008-07-02 04:39:27Z mike $".
 #
index ae6fcb4976439a9b3541c5855281a0b58812f766..5eae27cce5a8dbd8803a70438057f423658f15fe 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# "$Id: run-stp-tests.sh 7697 2008-06-27 15:56:00Z mike $"
+# "$Id: run-stp-tests.sh 7712 2008-07-02 06:09:39Z mike $"
 #
 #   Perform the complete set of IPP compliance tests specified in the
 #   CUPS Software Test Plan.
@@ -213,6 +213,13 @@ mkdir /tmp/cups-$user/certs
 mkdir /tmp/cups-$user/share
 mkdir /tmp/cups-$user/share/banners
 mkdir /tmp/cups-$user/share/drv
+mkdir /tmp/cups-$user/share/locale
+for file in ../locale/cups_*.po; do
+       loc=`basename $file .po | cut -c 6-`
+       mkdir /tmp/cups-$user/share/locale/$loc
+       ln -s $root/locale/cups_$loc.po /tmp/cups-$user/share/locale/$loc
+       ln -s $root/locale/ppdc_$loc.po /tmp/cups-$user/share/locale/$loc
+done
 mkdir /tmp/cups-$user/share/mime
 mkdir /tmp/cups-$user/share/model
 mkdir /tmp/cups-$user/share/ppdc
@@ -233,7 +240,6 @@ ln -s $root/backend/snmp /tmp/cups-$user/bin/backend
 ln -s $root/backend/socket /tmp/cups-$user/bin/backend
 ln -s $root/backend/usb /tmp/cups-$user/bin/backend
 ln -s $root/cgi-bin /tmp/cups-$user/bin
-ln -s $root/ppdc/drv /tmp/cups-$user/bin/driver
 ln -s $root/monitor /tmp/cups-$user/bin
 ln -s $root/notifier /tmp/cups-$user/bin
 ln -s $root/scheduler /tmp/cups-$user/bin/daemon
@@ -279,7 +285,11 @@ if test `uname` = Darwin; then
        ln -s /usr/libexec/cups/filter/pstocupsraster /tmp/cups-$user/bin/filter
        ln -s /usr/libexec/cups/filter/pstopdffilter /tmp/cups-$user/bin/filter
 
-       ln -s /private/etc/cups/apple.* /tmp/cups-$user
+       if test -f /private/etc/cups/apple.types; then
+               ln -s /private/etc/cups/apple.* /tmp/cups-$user/share/mime
+       elif test -f /usr/share/cups/mime/apple.types; then
+               ln -s /usr/share/cups/mime/apple.* /tmp/cups-$user/share/mime
+       fi
 else
        ln -s $root/filter/imagetops /tmp/cups-$user/bin/filter
        ln -s $root/filter/imagetoraster /tmp/cups-$user/bin/filter
@@ -310,6 +320,7 @@ ServerBin /tmp/cups-$user/bin
 CacheDir /tmp/cups-$user/share
 DataDir /tmp/cups-$user/share
 FontPath /tmp/cups-$user/share/fonts
+PassEnv LOCALEDIR
 DocumentRoot $root/doc
 RequestRoot /tmp/cups-$user/spool
 TempDir /tmp/cups-$user/spool/temp
@@ -409,6 +420,7 @@ CUPS_SERVER=localhost; export CUPS_SERVER
 CUPS_SERVERROOT=/tmp/cups-$user; export CUPS_SERVERROOT
 CUPS_STATEDIR=/tmp/cups-$user; export CUPS_STATEDIR
 CUPS_DATADIR=/tmp/cups-$user/share; export CUPS_DATADIR
+LOCALEDIR=/tmp/cups-$user/share/locale; export LOCALEDIR
 
 #
 # Set a new home directory to avoid getting user options mixed in...
@@ -761,5 +773,5 @@ if test $fail != 0; then
 fi
 
 #
-# End of "$Id: run-stp-tests.sh 7697 2008-06-27 15:56:00Z mike $"
+# End of "$Id: run-stp-tests.sh 7712 2008-07-02 06:09:39Z mike $"
 #