]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - ppdc/ppdi.cxx
Merge changes from CUPS 1.5svn-r9641
[thirdparty/cups.git] / ppdc / ppdi.cxx
index 2fe4a5feb22fd1e4c5348427d9664e08dcdc80d0..a411bfef548aa9fb251e0bfc2d69d7738a678e2b 100644 (file)
@@ -3,7 +3,7 @@
 //
 //   PPD file import utility for the CUPS PPD Compiler.
 //
-//   Copyright 2007 by Apple Inc.
+//   Copyright 2007-2011 by Apple Inc.
 //   Copyright 2002-2005 by Easy Software Products.
 //
 //   These coded instructions, statements, and computer programs are the
@@ -22,7 +22,7 @@
 // Include necessary headers...
 //
 
-#include "ppdc.h"
+#include "ppdc-private.h"
 #include <unistd.h>
 #include <sys/stat.h>
 #include <sys/types.h>
@@ -49,6 +49,8 @@ main(int  argc,                               // I - Number of command-line arguments
   ppdcSource   *src;                   // PPD source file data
 
 
+  _cupsSetLocale(argv);
+
   // Scan the command-line...
   srcfile = NULL;
   src     = NULL;
@@ -109,7 +111,7 @@ main(int  argc,                             // I - Number of command-line arguments
   src->write_file(srcfile);
 
   // Delete the printer driver information...
-  delete src;
+  src->release();
 
   // Return with no errors.
   return (0);
@@ -123,10 +125,13 @@ main(int  argc,                           // I - Number of command-line arguments
 static void
 usage(void)
 {
-  puts("Usage: ppdi [options] filename.ppd [ ... filenameN.ppd ]");
-  puts("Options:");
-  puts("  -I include-dir");
-  puts("  -o filename.drv");
+  _cupsLangPuts(stdout, _("Usage: ppdi [options] filename.ppd [ ... "
+                         "filenameN.ppd ]"));
+  _cupsLangPuts(stdout, _("Options:"));
+  _cupsLangPuts(stdout, _("  -I include-dir          Add include directory to "
+                          "search path."));
+  _cupsLangPuts(stdout, _("  -o filename.drv         Set driver information "
+                          "file (otherwise ppdi.drv)."));
 
   exit(1);
 }