summaryrefslogtreecommitdiff
path: root/ppdc
diff options
context:
space:
mode:
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2010-03-03 22:36:38 +0000
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2010-03-03 22:36:38 +0000
commit5a6b583acf40fd75a0eacaf886c6127fc122e516 (patch)
tree15a7ff6e21f42830571b87d4309f7ee645ebd92c /ppdc
parentf8b3a85b79b8eb74c37c839079ecbf8266a6f4ed (diff)
Merge changes from CUPS 1.5svn-r9022.
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@1937 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'ppdc')
-rw-r--r--ppdc/genstrings.cxx5
-rw-r--r--ppdc/ppdc.cxx26
-rw-r--r--ppdc/sample.drv4
3 files changed, 21 insertions, 14 deletions
diff --git a/ppdc/genstrings.cxx b/ppdc/genstrings.cxx
index f5441a1dc..76b3e3f82 100644
--- a/ppdc/genstrings.cxx
+++ b/ppdc/genstrings.cxx
@@ -7,7 +7,7 @@
// the standard media and sample driver strings. The results are picked up
// by GNU gettext and placed in the CUPS message catalog.
//
-// Copyright 2008-2009 by Apple Inc.
+// Copyright 2008-2010 by Apple Inc.
//
// These coded instructions, statements, and computer programs are the
// property of Apple Inc. and are protected by Federal copyright
@@ -67,6 +67,9 @@ main(void)
src = new ppdcSource("sample.drv");
catalog = new ppdcCatalog(NULL);
+ catalog->add_message("ISOLatin1");
+ catalog->add_message("English");
+
// Add the media size strings...
ppdcMediaSize *size; // Current media size
diff --git a/ppdc/ppdc.cxx b/ppdc/ppdc.cxx
index 78ad95f94..eaf88fa42 100644
--- a/ppdc/ppdc.cxx
+++ b/ppdc/ppdc.cxx
@@ -59,6 +59,7 @@ main(int argc, // I - Number of command-line arguments
filename[1024]; // PPD filename
int comp, // Compress
do_test, // Test PPD files
+ single_language,// Generate single-language files
use_model_name, // Use ModelName for filename
verbose; // Verbosity
ppdcLineEnding le; // Line ending to use
@@ -69,16 +70,17 @@ main(int argc, // I - Number of command-line arguments
_cupsSetLocale(argv);
// Scan the command-line...
- catalog = NULL;
- comp = 0;
- do_test = 0;
- le = PPDC_LFONLY;
- locales = NULL;
- outdir = "ppd";
- src = new ppdcSource();
- use_model_name = 0;
- verbose = 0;
- filenames = cupsArrayNew((cups_array_func_t)strcasecmp, NULL);
+ catalog = NULL;
+ comp = 0;
+ do_test = 0;
+ le = PPDC_LFONLY;
+ locales = NULL;
+ outdir = "ppd";
+ single_language = 0;
+ src = new ppdcSource();
+ use_model_name = 0;
+ verbose = 0;
+ filenames = cupsArrayNew((cups_array_func_t)strcasecmp, NULL);
for (i = 1; i < argc; i ++)
if (argv[i][0] == '-')
@@ -178,6 +180,8 @@ main(int argc, // I - Number of command-line arguments
}
else
{
+ single_language = 1;
+
if (verbose > 1)
_cupsLangPrintf(stdout,
_("ppdc: Loading messages for locale "
@@ -383,7 +387,7 @@ main(int argc, // I - Number of command-line arguments
ppdcArray *templocales = locales;
- if (!templocales)
+ if (!templocales && !single_language)
{
templocales = new ppdcArray();
for (ppdcCatalog *tempcatalog = (ppdcCatalog *)src->po_files->first();
diff --git a/ppdc/sample.drv b/ppdc/sample.drv
index a6c45c89f..a51137eb6 100644
--- a/ppdc/sample.drv
+++ b/ppdc/sample.drv
@@ -3,7 +3,7 @@
//
// Driver info file for CUPS-supplied PPDs.
//
-// Copyright 2007-2009 by Apple Inc.
+// Copyright 2007-2010 by Apple Inc.
// Copyright 1993-2006 by Easy Software Products.
//
// These coded instructions, statements, and computer programs are the
@@ -139,7 +139,7 @@ Version "1.4"
DriverType label
ModelNumber $DYMO_3x0
Throughput 8
- ManualCopies No
+ ManualCopies Yes
ColorDevice No
HWMargins 2 14.9 2 14.9