]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - filter/hpgl-main.c
Merge changes from CUPS 1.5svn-r8950.
[thirdparty/cups.git] / filter / hpgl-main.c
index b94cb494ef328637fd933f699f7137bbec68f640..953d44702b0461b22982a4e23b364133c364a1bf 100644 (file)
@@ -1,25 +1,16 @@
 /*
- * "$Id$"
+ * "$Id: hpgl-main.c 6649 2007-07-11 21:46:42Z mike $"
  *
  *   HP-GL/2 filter main entry for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1993-2005 by Easy Software Products.
+ *   Copyright 2007-2008 by Apple Inc.
+ *   Copyright 1993-2007 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
- *   property of Easy Software Products and are protected by Federal
- *   copyright law.  Distribution and use rights are outlined in the file
- *   "LICENSE.txt" which should have been included with this file.  If this
- *   file is missing or damaged please contact Easy Software Products
- *   at:
- *
- *       Attn: CUPS Licensing Information
- *       Easy Software Products
- *       44141 Airport View Drive, Suite 204
- *       Hollywood, Maryland 20636 USA
- *
- *       Voice: (301) 373-9600
- *       EMail: cups-info@cups.org
- *         WWW: http://www.cups.org
+ *   property of Apple Inc. and are protected by Federal copyright
+ *   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+ *   which should have been included with this file.  If this file is
+ *   file is missing or damaged, see the license at "http://www.cups.org/".
  *
  *   This file is subject to the Apple OS-Developed Software exception.
  *
@@ -36,6 +27,7 @@
 /*#define DEBUG*/
 #define _HPGL_MAIN_C_
 #include "hpgltops.h"
+#include <cups/i18n.h>
 
 
 /*
@@ -153,7 +145,8 @@ main(int  argc,             /* I - Number of command-line arguments */
 
   if (argc < 6 || argc > 7)
   {
-    fputs("ERROR: hpgltops job-id user title copies options [file]\n", stderr);
+    fprintf(stderr, _("Usage: %s job-id user title copies options [file]\n"),
+            argv[0]);
     return (1);
   }
 
@@ -172,7 +165,7 @@ main(int  argc,             /* I - Number of command-line arguments */
 
     if ((fp = fopen(argv[6], "rb")) == NULL)
     {
-      perror("ERROR: unable to open print file - ");
+      perror("DEBUG: unable to open print file - ");
       return (1);
     }
   }
@@ -198,8 +191,10 @@ main(int  argc,            /* I - Number of command-line arguments */
     shading = 0;
 
   if ((val = cupsGetOption("fitplot", num_options, options)) != NULL &&
-      strcasecmp(val, "no") && strcasecmp(val, "off") &&
-      strcasecmp(val, "false"))
+      !strcasecmp(val, "true"))
+    FitPlot = 1;
+  else if ((val = cupsGetOption("fit-to-page", num_options, options)) != NULL &&
+      !strcasecmp(val, "true"))
     FitPlot = 1;
 
   if ((val = cupsGetOption("penwidth", num_options, options)) != NULL)
@@ -270,5 +265,5 @@ compare_names(const void *p1,       /* I - First name */
 
 
 /*
- * End of "$Id$".
+ * End of "$Id: hpgl-main.c 6649 2007-07-11 21:46:42Z mike $".
  */