]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - scheduler/cupsfilter.c
Fix source file header text duplication text duplication.
[thirdparty/cups.git] / scheduler / cupsfilter.c
index e0e1861f36800217508224196efa4976467f5eff..596b491a4c33a29d626a7bdbe47e4f7ba24180cb 100644 (file)
@@ -1,34 +1,14 @@
 /*
- * "$Id: cupsfilter.c 7952 2008-09-17 00:56:20Z mike $"
+ * Filtering program for CUPS.
  *
- *   Filtering program for CUPS.
+ * Copyright 2007-2016 by Apple Inc.
+ * Copyright 1997-2006 by Easy Software Products, all rights reserved.
  *
- *   Copyright 2007-2011 by Apple Inc.
- *   Copyright 1997-2006 by Easy Software Products, all rights reserved.
- *
- *   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()                - Main entry for the test program.
- *   add_printer_filter()  - Add a single filters from a PPD file.
- *   add_printer_filters() - Add filters from a PPD file.
- *   check_cb()            - Callback function for _cupsFileCheck.
- *   compare_pids()        - Compare two filter PIDs...
- *   escape_options()      - Convert an options array to a string.
- *   exec_filter()         - Execute a single filter.
- *   exec_filters()        - Execute filters for the given file and options.
- *   get_job_file()        - Get the specified job file.
- *   open_pipe()           - Create a pipe which is closed on exec.
- *   read_cupsd_conf()     - Read the cupsd.conf file to get the filter
- *                           settings.
- *   set_string()          - Copy and set a string.
- *   sighandler()          - Signal catcher for when we print from stdin...
- *   usage()               - Show program usage...
+ * 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
+ * missing or damaged, see the license at "http://www.cups.org/".
  */
 
 /*
@@ -99,11 +79,10 @@ static int          exec_filters(mime_type_t *srctype,
                                     cups_option_t *options);
 static void            get_job_file(const char *job);
 static int             open_pipe(int *fds);
-static int             read_cupsd_conf(const char *filename);
+static int             read_cups_files_conf(const char *filename);
 static void            set_string(char **s, const char *val);
 static void            sighandler(int sig);
-static void            usage(const char *command, const char *opt)
-                       __attribute__((noreturn));
+static void            usage(const char *opt) __attribute__((noreturn));
 
 
 /*
@@ -114,7 +93,8 @@ int                                  /* O - Exit status */
 main(int  argc,                                /* I - Number of command-line args */
      char *argv[])                     /* I - Command-line arguments */
 {
-  int          i;                      /* Looping vars */
+  int          i,                      /* Looping vars */
+               list_filters = 0;       /* Just list the filters? */
   const char   *command,               /* Command name */
                *opt,                   /* Current option */
                *printer;               /* Printer name */
@@ -130,7 +110,7 @@ main(int  argc,                             /* I - Number of command-line args */
   char         mimedir[1024];          /* MIME directory */
   char         *infile,                /* File to filter */
                *outfile;               /* File to create */
-  char         cupsdconf[1024];        /* cupsd.conf file */
+  char         cupsfilesconf[1024];    /* cups-files.conf file */
   const char   *server_root;           /* CUPS_SERVERROOT environment variable */
   mime_type_t  *src,                   /* Source type */
                *dst;                   /* Destination type */
@@ -174,7 +154,7 @@ main(int  argc,                             /* I - Number of command-line args */
   if ((server_root = getenv("CUPS_SERVERROOT")) == NULL)
     server_root = CUPS_SERVERROOT;
 
-  snprintf(cupsdconf, sizeof(cupsdconf), "%s/cupsd.conf", server_root);
+  snprintf(cupsfilesconf, sizeof(cupsfilesconf), "%s/cups-files.conf", server_root);
 
  /*
   * Process command-line arguments...
@@ -183,190 +163,193 @@ main(int  argc,                         /* I - Number of command-line args */
   _cupsSetLocale(argv);
 
   for (i = 1; i < argc; i ++)
+  {
     if (argv[i][0] == '-')
     {
-      for (opt = argv[i] + 1; *opt; opt ++)
-        switch (*opt)
+      if (!strcmp(argv[i], "--list-filters"))
+      {
+        list_filters = 1;
+      }
+      else if (!strcmp(argv[i], "--"))
+      {
+       i ++;
+       if (i < argc && !infile)
+         infile = argv[i];
+       else
+         usage(NULL);
+      }
+      else
+      {
+       for (opt = argv[i] + 1; *opt; opt ++)
        {
-         case '-' : /* Next argument is a filename... */
-             i ++;
-             if (i < argc && !infile)
-               infile = argv[i];
-             else
-               usage(command, opt);
-             break;
-
-          case 'a' : /* Specify option... */
-             i ++;
-             if (i < argc)
-               num_options = cupsParseOptions(argv[i], num_options, &options);
-             else
-               usage(command, opt);
-             break;
-
-          case 'c' : /* Specify cupsd.conf file location... */
-             i ++;
-             if (i < argc)
-             {
-               if (!strcmp(command, "convert"))
-                 num_options = cupsAddOption("copies", argv[i], num_options,
-                                             &options);
+         switch (*opt)
+         {
+           case 'a' : /* Specify option... */
+               i ++;
+               if (i < argc)
+                 num_options = cupsParseOptions(argv[i], num_options, &options);
+               else
+                 usage(opt);
+               break;
+
+           case 'c' : /* Specify cups-files.conf file location... */
+               i ++;
+               if (i < argc)
+               {
+                 if (!strcmp(command, "convert"))
+                   num_options = cupsAddOption("copies", argv[i], num_options, &options);
+                 else
+                   strlcpy(cupsfilesconf, argv[i], sizeof(cupsfilesconf));
+               }
+               else
+                 usage(opt);
+               break;
+
+           case 'd' : /* Specify the real printer name */
+               i ++;
+               if (i < argc)
+                 printer = argv[i];
+               else
+                 usage(opt);
+               break;
+
+           case 'D' : /* Delete input file after conversion */
+               removeinfile = 1;
+               break;
+
+           case 'e' : /* Use every filter from the PPD file */
+               all_filters = 1;
+               break;
+
+           case 'f' : /* Specify input file... */
+               i ++;
+               if (i < argc && !infile)
+                 infile = argv[i];
+               else
+                 usage(opt);
+               break;
+
+           case 'i' : /* Specify source MIME type... */
+               i ++;
+               if (i < argc)
+               {
+                 if (sscanf(argv[i], "%15[^/]/%255s", super, type) != 2)
+                   usage(opt);
+
+                 srctype = argv[i];
+               }
                else
-                 strlcpy(cupsdconf, argv[i], sizeof(cupsdconf));
-             }
-             else
-               usage(command, opt);
-             break;
-
-          case 'd' : /* Specify the real printer name */
-             i ++;
-             if (i < argc)
-               printer = argv[i];
-             else
-               usage(command, opt);
-             break;
-
-         case 'D' : /* Delete input file after conversion */
-             removeinfile = 1;
-             break;
-
-          case 'e' : /* Use every filter from the PPD file */
-             all_filters = 1;
-             break;
-
-          case 'f' : /* Specify input file... */
-             i ++;
-             if (i < argc && !infile)
-               infile = argv[i];
-             else
-               usage(command, opt);
-             break;
-
-          case 'i' : /* Specify source MIME type... */
-             i ++;
-             if (i < argc)
-             {
-               if (sscanf(argv[i], "%15[^/]/%255s", super, type) != 2)
-                 usage(command, opt);
-
-                srctype = argv[i];
-             }
-             else
-               usage(command, opt);
-             break;
-
-          case 'j' : /* Get job file or specify destination MIME type... */
-              if (strcmp(command, "convert"))
-             {
-               i ++;
+                 usage(opt);
+               break;
+
+           case 'j' : /* Get job file or specify destination MIME type... */
+               if (strcmp(command, "convert"))
+               {
+                 i ++;
+                 if (i < argc)
+                 {
+                   get_job_file(argv[i]);
+                   infile = TempFile;
+                 }
+                 else
+                   usage(opt);
+
+                 break;
+               }
+
+           case 'm' : /* Specify destination MIME type... */
+               i ++;
                if (i < argc)
                {
-                 get_job_file(argv[i]);
-                 infile = TempFile;
+                 if (sscanf(argv[i], "%15[^/]/%255s", super, type) != 2)
+                   usage(opt);
+
+                 dsttype = argv[i];
                }
                else
-                 usage(command, opt);
-
-                break;
-             }
-
-          case 'm' : /* Specify destination MIME type... */
-             i ++;
-             if (i < argc)
-             {
-               if (sscanf(argv[i], "%15[^/]/%255s", super, type) != 2)
-                 usage(command, opt);
-
-                dsttype = argv[i];
-             }
-             else
-               usage(command, opt);
-             break;
-
-          case 'n' : /* Specify number of copies... */
-             i ++;
-             if (i < argc)
-               num_options = cupsAddOption("copies", argv[i], num_options,
-                                           &options);
-             else
-               usage(command, opt);
-             break;
-
-          case 'o' : /* Specify option(s) or output filename */
-             i ++;
-             if (i < argc)
-             {
-               if (!strcmp(command, "convert"))
+                 usage(opt);
+               break;
+
+           case 'n' : /* Specify number of copies... */
+               i ++;
+               if (i < argc)
+                 num_options = cupsAddOption("copies", argv[i], num_options, &options);
+               else
+                 usage(opt);
+               break;
+
+           case 'o' : /* Specify option(s) or output filename */
+               i ++;
+               if (i < argc)
                {
-                 if (outfile)
-                   usage(command, NULL);
+                 if (!strcmp(command, "convert"))
+                 {
+                   if (outfile)
+                     usage(NULL);
+                   else
+                     outfile = argv[i];
+                 }
                  else
-                   outfile = argv[i];
+                   num_options = cupsParseOptions(argv[i], num_options, &options);
                }
                else
-                 num_options = cupsParseOptions(argv[i], num_options,
-                                                &options);
-             }
-             else
-               usage(command, opt);
-             break;
-
-          case 'p' : /* Specify PPD file... */
-          case 'P' : /* Specify PPD file... */
-             i ++;
-             if (i < argc)
-               ppdfile = argv[i];
-             else
-               usage(command, opt);
-             break;
-
-          case 't' : /* Specify title... */
-          case 'J' : /* Specify title... */
-             i ++;
-             if (i < argc)
-               title = argv[i];
-             else
-               usage(command, opt);
-             break;
-
-         case 'u' : /* Delete PPD file after conversion */
-             removeppd = 1;
-             break;
-
-          case 'U' : /* Specify username... */
-             i ++;
-             if (i < argc)
-               user = argv[i];
-             else
-               usage(command, opt);
-             break;
-
-         default : /* Something we don't understand... */
-             usage(command, opt);
-             break;
+                 usage(opt);
+               break;
+
+           case 'p' : /* Specify PPD file... */
+           case 'P' : /* Specify PPD file... */
+               i ++;
+               if (i < argc)
+                 ppdfile = argv[i];
+               else
+                 usage(opt);
+               break;
+
+           case 't' : /* Specify title... */
+           case 'J' : /* Specify title... */
+               i ++;
+               if (i < argc)
+                 title = argv[i];
+               else
+                 usage(opt);
+               break;
+
+           case 'u' : /* Delete PPD file after conversion */
+               removeppd = 1;
+               break;
+
+           case 'U' : /* Specify username... */
+               i ++;
+               if (i < argc)
+                 user = argv[i];
+               else
+                 usage(opt);
+               break;
+
+           default : /* Something we don't understand... */
+               usage(opt);
+               break;
+         }
        }
+      }
     }
     else if (!infile)
     {
       if (strcmp(command, "convert"))
        infile = argv[i];
       else
-      {
-       _cupsLangPuts(stderr,
-                     _("convert: Use the -f option to specify a file to "
-                       "convert."));
-       usage(command, NULL);
-      }
+       usage(NULL);
     }
     else
     {
       _cupsLangPuts(stderr,
                     _("cupsfilter: Only one filename can be specified."));
-      usage(command, NULL);
+      usage(NULL);
     }
+  }
 
   if (!infile && !srctype)
-    usage(command, NULL);
+    usage(NULL);
 
   if (!title)
   {
@@ -379,10 +362,10 @@ main(int  argc,                           /* I - Number of command-line args */
   }
 
  /*
-  * Load the cupsd.conf file and create the MIME database...
+  * Load the cups-files.conf file and create the MIME database...
   */
 
-  if (read_cupsd_conf(cupsdconf))
+  if (read_cups_files_conf(cupsfilesconf))
     return (1);
 
   snprintf(mimedir, sizeof(mimedir), "%s/mime", DataDir);
@@ -415,6 +398,7 @@ main(int  argc,                             /* I - Number of command-line args */
 
   if (srctype)
   {
+   /* sscanf return value already checked above */
     sscanf(srctype, "%15[^/]/%255s", super, type);
     if ((src = mimeType(mime, super, type)) == NULL)
     {
@@ -432,6 +416,7 @@ main(int  argc,                             /* I - Number of command-line args */
     return (1);
   }
 
+ /* sscanf return value already checked above */
   sscanf(dsttype, "%15[^/]/%255s", super, type);
   if (!_cups_strcasecmp(super, "printer"))
     dst = printer_type;
@@ -495,12 +480,31 @@ main(int  argc,                           /* I - Number of command-line args */
     filters = prefilters;
   }
 
- /*
-  * Do it!
-  */
+  if (list_filters)
+  {
+   /*
+    * List filters...
+    */
+
+    mime_filter_t      *filter;        /* Current filter */
+
+    for (filter = (mime_filter_t *)cupsArrayFirst(filters);
+        filter;
+        filter = (mime_filter_t *)cupsArrayNext(filters))
+      if (strcmp(filter->filter, "-"))
+        _cupsLangPuts(stdout, filter->filter);
 
-  status = exec_filters(src, filters, infile, outfile, ppdfile, printer, user,
-                        title, num_options, options);
+    status = 0;
+  }
+  else
+  {
+   /*
+    * Run filters...
+    */
+
+    status = exec_filters(src, filters, infile, outfile, ppdfile, printer, user,
+                         title, num_options, options);
+  }
 
  /*
   * Remove files as needed, then exit...
@@ -580,7 +584,7 @@ add_printer_filter(
   {
     char       *ptr;                   /* Pointer into maxsize(nnnn) program */
 
-    maxsize = strtoll(program + 8, &ptr, 10);
+    maxsize = (size_t)strtoll(program + 8, &ptr, 10);
 
     if (*ptr != ')')
     {
@@ -749,7 +753,7 @@ escape_options(
 {
   int          i;                      /* Looping var */
   cups_option_t        *option;                /* Current option */
-  int          bytes;                  /* Number of bytes needed */
+  size_t       bytes;                  /* Number of bytes needed */
   char         *s,                     /* Option string */
                *sptr,                  /* Pointer into string */
                *vptr;                  /* Pointer into value */
@@ -777,7 +781,7 @@ escape_options(
     if (sptr > s)
       *sptr++ = ' ';
 
-    strcpy(sptr, option->name);
+    strlcpy(sptr, option->name, bytes - (size_t)(sptr - s));
     sptr += strlen(sptr);
     *sptr++ = '=';
 
@@ -816,7 +820,7 @@ exec_filter(const char *filter,             /* I - Filter to execute */
 
 
  /*
-  * Add special voodoo magic for MacOS X - this allows MacOS X
+  * Add special voodoo magic for macOS - this allows macOS
   * programs to access their bundle resources properly...
   */
 
@@ -921,7 +925,7 @@ exec_filters(mime_type_t   *srctype,        /* I - Source type */
 {
   int          i;                      /* Looping var */
   const char   *argv[8],               /* Command-line arguments */
-               *envp[15],              /* Environment variables */
+               *envp[17],              /* Environment variables */
                *temp;                  /* Temporary string */
   char         *optstr,                /* Filter options */
                content_type[1024],     /* CONTENT_TYPE */
@@ -929,6 +933,8 @@ exec_filters(mime_type_t   *srctype,        /* I - Source type */
                cups_fontpath[1024],    /* CUPS_FONTPATH */
                cups_serverbin[1024],   /* CUPS_SERVERBIN */
                cups_serverroot[1024],  /* CUPS_SERVERROOT */
+               final_content_type[1024] = "",
+                                       /* FINAL_CONTENT_TYPE */
                lang[1024],             /* LANG */
                path[1024],             /* PATH */
                ppd[1024],              /* PPD */
@@ -951,6 +957,39 @@ exec_filters(mime_type_t   *srctype,       /* I - Source type */
   cups_dest_t  *dest;                  /* Destination information */
 
 
+ /*
+  * Figure out the final content type...
+  */
+
+  for (filter = (mime_filter_t *)cupsArrayLast(filters);
+       filter && filter->dst;
+       filter = (mime_filter_t *)cupsArrayPrev(filters))
+    if (strcmp(filter->dst->super, "printer"))
+      break;
+
+  if (filter && filter->dst)
+  {
+    const char *ptr;                   /* Pointer in type name */
+
+    if ((ptr = strchr(filter->dst->type, '/')) != NULL)
+      snprintf(final_content_type, sizeof(final_content_type),
+              "FINAL_CONTENT_TYPE=%s", ptr + 1);
+    else
+      snprintf(final_content_type, sizeof(final_content_type),
+              "FINAL_CONTENT_TYPE=%s/%s", filter->dst->super,
+              filter->dst->type);
+  }
+
+ /*
+  * Remove NULL ("-") filters...
+  */
+
+  for (filter = (mime_filter_t *)cupsArrayFirst(filters);
+       filter;
+       filter = (mime_filter_t *)cupsArrayNext(filters))
+    if (!strcmp(filter->filter, "-"))
+      cupsArrayRemove(filters, filter);
+
  /*
   * Setup the filter environment and command-line...
   */
@@ -1044,7 +1083,14 @@ exec_filters(mime_type_t   *srctype,     /* I - Source type */
   envp[11] = printer_name;
   envp[12] = rip_max_cache;
   envp[13] = userenv;
-  envp[14] = NULL;
+  envp[14] = "CHARSET=utf-8";
+  if (final_content_type[0])
+  {
+    envp[15] = final_content_type;
+    envp[16] = NULL;
+  }
+  else
+    envp[15] = NULL;
 
   for (i = 0; argv[i]; i ++)
     fprintf(stderr, "DEBUG: argv[%d]=\"%s\"\n", i, argv[i]);
@@ -1316,13 +1362,14 @@ open_pipe(int *fds)                     /* O - Pipe file descriptors (2) */
 
 
 /*
- * 'read_cupsd_conf()' - Read the cupsd.conf file to get the filter settings.
+ * 'read_cups_files_conf()' - Read the cups-files.conf file to get the filter settings.
  */
 
 static int                             /* O - 0 on success, 1 on error */
-read_cupsd_conf(const char *filename)  /* I - File to read */
+read_cups_files_conf(
+    const char *filename)              /* I - File to read */
 {
-  cups_file_t  *fp;                    /* cupsd.conf file */
+  cups_file_t  *fp;                    /* cups-files.conf file */
   const char   *temp;                  /* Temporary string */
   char         line[1024],             /* Line from file */
                *ptr;                   /* Pointer into line */
@@ -1375,9 +1422,7 @@ read_cupsd_conf(const char *filename)     /* I - File to read */
     cupsFileClose(fp);
   }
 
-  snprintf(line, sizeof(line),
-           "%s/filter:" CUPS_BINDIR ":" CUPS_SBINDIR ":/bin:/usr/bin",
-          ServerBin);
+  snprintf(line, sizeof(line), "%s/filter:" CUPS_BINDIR ":" CUPS_SBINDIR ":/bin:/usr/bin", ServerBin);
   set_string(&Path, line);
 
   return (0);
@@ -1426,70 +1471,28 @@ sighandler(int s)                       /* I - Signal number */
  */
 
 static void
-usage(const char *command,             /* I - Command name */
-      const char *opt)                 /* I - Incorrect option, if any */
+usage(const char *opt)                 /* I - Incorrect option, if any */
 {
   if (opt)
-    _cupsLangPrintf(stderr, _("%s: Unknown option \"%c\"."), command, *opt);
-
-  if (!strcmp(command, "cupsfilter"))
-  {
-    _cupsLangPuts(stdout, _("Usage: cupsfilter [ options ] filename"));
-    _cupsLangPuts(stdout, _("Options:"));
-    _cupsLangPuts(stdout, _("  -D                      Remove the input file "
-                            "when finished."));
-    _cupsLangPuts(stdout, _("  -P filename.ppd         Set PPD file."));
-    _cupsLangPuts(stdout, _("  -U username             Set username for job."));
-    _cupsLangPuts(stdout, _("  -c cupsd.conf           Set cupsd.conf file to "
-                            "use."));
-    _cupsLangPuts(stdout, _("  -d printer              Use the named "
-                            "printer."));
-    _cupsLangPuts(stdout, _("  -e                      Use every filter from "
-                            "the PPD file."));
-    _cupsLangPuts(stdout, _("  -i mime/type            Set input MIME type "
-                            "(otherwise auto-typed)."));
-    _cupsLangPuts(stdout, _("  -j job-id[,N]           Filter file N from the "
-                            "specified job (default is file 1)."));
-    _cupsLangPuts(stdout, _("  -m mime/type            Set output MIME type "
-                           "(otherwise application/pdf)."));
-    _cupsLangPuts(stdout, _("  -n copies               Set number of copies."));
-    _cupsLangPuts(stdout, _("  -o name=value           Set option(s)."));
-    _cupsLangPuts(stdout, _("  -p filename.ppd         Set PPD file."));
-    _cupsLangPuts(stdout, _("  -t title                Set title."));
-    _cupsLangPuts(stdout, _("  -u                      Remove the PPD file "
-                            "when finished."));
-  }
-  else
-  {
-    _cupsLangPuts(stdout, _("Usage: convert [ options ]"));
-    _cupsLangPuts(stdout, _("Options:"));
-    _cupsLangPuts(stdout, _("  -D                      Remove the input file "
-                            "when finished."));
-    _cupsLangPuts(stdout, _("  -J title                Set title."));
-    _cupsLangPuts(stdout, _("  -P filename.ppd         Set PPD file."));
-    _cupsLangPuts(stdout, _("  -U username             Set username for job."));
-    _cupsLangPuts(stdout, _("  -a 'name=value ...'     Set option(s)."));
-    _cupsLangPuts(stdout, _("  -c copies               Set number of copies."));
-    _cupsLangPuts(stdout, _("  -d printer              Use the named "
-                            "printer."));
-    _cupsLangPuts(stdout, _("  -e                      Use every filter from "
-                            "the PPD file."));
-    _cupsLangPuts(stdout, _("  -f filename             Set file to be "
-                            "converted (otherwise stdin)."));
-    _cupsLangPuts(stdout, _("  -i mime/type            Set input MIME type "
-                            "(otherwise auto-typed)."));
-    _cupsLangPuts(stdout, _("  -j mime/type            Set output MIME type "
-                           "(otherwise application/pdf)."));
-    _cupsLangPuts(stdout, _("  -o filename             Set file to be "
-                            "generated (otherwise stdout)."));
-    _cupsLangPuts(stdout, _("  -u                      Remove the PPD file "
-                            "when finished."));
-  }
+    _cupsLangPrintf(stderr, _("%s: Unknown option \"%c\"."), "cupsfilter", *opt);
+
+  _cupsLangPuts(stdout, _("Usage: cupsfilter [ options ] [ -- ] filename"));
+  _cupsLangPuts(stdout, _("Options:"));
+  _cupsLangPuts(stdout, _("  --list-filters          List filters that will be used."));
+  _cupsLangPuts(stdout, _("  -D                      Remove the input file when finished."));
+  _cupsLangPuts(stdout, _("  -P filename.ppd         Set PPD file."));
+  _cupsLangPuts(stdout, _("  -U username             Specify username."));
+  _cupsLangPuts(stdout, _("  -c cups-files.conf      Set cups-files.conf file to use."));
+  _cupsLangPuts(stdout, _("  -d printer              Use the named printer."));
+  _cupsLangPuts(stdout, _("  -e                      Use every filter from the PPD file."));
+  _cupsLangPuts(stdout, _("  -i mime/type            Set input MIME type (otherwise auto-typed)."));
+  _cupsLangPuts(stdout, _("  -j job-id[,N]           Filter file N from the specified job (default is file 1)."));
+  _cupsLangPuts(stdout, _("  -m mime/type            Set output MIME type (otherwise application/pdf)."));
+  _cupsLangPuts(stdout, _("  -n copies               Set number of copies."));
+  _cupsLangPuts(stdout, _("  -o name=value           Set option(s)."));
+  _cupsLangPuts(stdout, _("  -p filename.ppd         Set PPD file."));
+  _cupsLangPuts(stdout, _("  -t title                Set title."));
+  _cupsLangPuts(stdout, _("  -u                      Remove the PPD file when finished."));
 
   exit(1);
 }
-
-
-/*
- * End of "$Id: cupsfilter.c 7952 2008-09-17 00:56:20Z mike $".
- */