diff options
author | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2010-11-30 03:16:24 +0000 |
---|---|---|
committer | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2010-11-30 03:16:24 +0000 |
commit | 0837b7e828b9fc312fcf8f5741d2ba9683742672 (patch) | |
tree | 1209ad6c3a50b6fc8c2e7fdc4ce05445f17f1d86 /ppdc | |
parent | 1106b00e75e37e7f25a28ee95da560de55520018 (diff) |
Merge changes from CUPS 1.5svn-r9385.
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@2873 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'ppdc')
-rw-r--r-- | ppdc/ppdc-catalog.cxx | 14 | ||||
-rw-r--r-- | ppdc/ppdc-driver.cxx | 2 | ||||
-rw-r--r-- | ppdc/ppdc-file.cxx | 2 | ||||
-rw-r--r-- | ppdc/ppdc-import.cxx | 3 | ||||
-rw-r--r-- | ppdc/ppdc-source.cxx | 156 | ||||
-rw-r--r-- | ppdc/ppdc.cxx | 77 | ||||
-rw-r--r-- | ppdc/ppdhtml.cxx | 15 | ||||
-rw-r--r-- | ppdc/ppdi.cxx | 12 | ||||
-rw-r--r-- | ppdc/ppdmerge.cxx | 36 | ||||
-rw-r--r-- | ppdc/ppdpo.cxx | 26 |
10 files changed, 175 insertions, 168 deletions
diff --git a/ppdc/ppdc-catalog.cxx b/ppdc/ppdc-catalog.cxx index 91469e62a..acf178b29 100644 --- a/ppdc/ppdc-catalog.cxx +++ b/ppdc/ppdc-catalog.cxx @@ -3,7 +3,7 @@ // // Shared message catalog class for the CUPS PPD Compiler. // -// Copyright 2007-2009 by Apple Inc. +// Copyright 2007-2010 by Apple Inc. // Copyright 2002-2006 by Easy Software Products. // // These coded instructions, statements, and computer programs are the @@ -338,7 +338,7 @@ ppdcCatalog::load_messages( if ((ptr = (char *)strrchr(line, '\"')) == NULL) { _cupsLangPrintf(stderr, - _("ERROR: Expected quoted string on line %d of %s\n"), + _("ppdc: Expected quoted string on line %d of %s."), linenum, f); cupsFileClose(fp); return (-1); @@ -350,7 +350,7 @@ ppdcCatalog::load_messages( if ((ptr = strchr(line, '\"')) == NULL) { _cupsLangPrintf(stderr, - _("ERROR: Expected quoted string on line %d of %s\n"), + _("ppdc: Expected quoted string on line %d of %s."), linenum, f); cupsFileClose(fp); return (-1); @@ -415,8 +415,8 @@ ppdcCatalog::load_messages( if (!haveid) { _cupsLangPrintf(stderr, - _("ERROR: Need a msgid line before any " - "translation strings on line %d of %s\n"), + _("ppdc: Need a msgid line before any " + "translation strings on line %d of %s."), linenum, f); cupsFileClose(fp); return (-1); @@ -432,7 +432,7 @@ ppdcCatalog::load_messages( strlcat(id, ptr, sizeof(id)); else { - _cupsLangPrintf(stderr, _("ERROR: Unexpected text on line %d of %s\n"), + _cupsLangPrintf(stderr, _("ppdc: Unexpected text on line %d of %s."), linenum, f); cupsFileClose(fp); return (-1); @@ -460,7 +460,7 @@ ppdcCatalog::load_messages( unknown_load_format: _cupsLangPrintf(stderr, - _("ERROR: Unknown message catalog format for \"%s\"\n"), f); + _("ppdc: Unknown message catalog format for \"%s\"."), f); cupsFileClose(fp); return (-1); } diff --git a/ppdc/ppdc-driver.cxx b/ppdc/ppdc-driver.cxx index 20ee936f3..98545c6e1 100644 --- a/ppdc/ppdc-driver.cxx +++ b/ppdc/ppdc-driver.cxx @@ -728,7 +728,7 @@ ppdcDriver::write_ppd_file( // No, skip this one... _cupsLangPrintf(stderr, _("ppdc: No message catalog provided for locale " - "%s\n"), locale->value); + "%s."), locale->value); continue; } diff --git a/ppdc/ppdc-file.cxx b/ppdc/ppdc-file.cxx index 886892199..3d4520eb0 100644 --- a/ppdc/ppdc-file.cxx +++ b/ppdc/ppdc-file.cxx @@ -46,7 +46,7 @@ ppdcFile::ppdcFile(const char *f, // I - File to open line = 1; if (!fp) - _cupsLangPrintf(stderr, _("%s: Unable to open %s: %s\n"), "ppdc", f, + _cupsLangPrintf(stderr, _("ppdc: Unable to open %s: %s"), f, strerror(errno)); } diff --git a/ppdc/ppdc-import.cxx b/ppdc/ppdc-import.cxx index b550b682c..e4604600d 100644 --- a/ppdc/ppdc-import.cxx +++ b/ppdc/ppdc-import.cxx @@ -261,7 +261,8 @@ ppdcSource::import_ppd(const char *f) // I - Filename if (sscanf(attr->value, "%s%*[^\"]\"%[^\"]\"%s%s", encoding, version, charset, status) != 4) { - _cupsLangPrintf(stderr, _("Bad font attribute: %s\n"), attr->value); + _cupsLangPrintf(stderr, _("ppdc: Bad font attribute: %s"), + attr->value); continue; } diff --git a/ppdc/ppdc-source.cxx b/ppdc/ppdc-source.cxx index f68d1db9e..3fa7c2e2b 100644 --- a/ppdc/ppdc-source.cxx +++ b/ppdc/ppdc-source.cxx @@ -226,7 +226,7 @@ ppdcSource::find_include( if (*ptr != '>') { _cupsLangPrintf(stderr, - _("ppdc: Invalid #include/#po filename \"%s\"\n"), n); + _("ppdc: Invalid #include/#po filename \"%s\"."), n); return (0); } @@ -352,7 +352,7 @@ ppdcSource::get_attr(ppdcFile *fp, // I - File to read if (!get_token(fp, name, sizeof(name))) { _cupsLangPrintf(stderr, - _("ppdc: Expected name after %s on line %d of %s\n"), + _("ppdc: Expected name after %s on line %d of %s."), loc ? "LocAttribute" : "Attribute", fp->line, fp->filename); return (0); } @@ -360,7 +360,7 @@ ppdcSource::get_attr(ppdcFile *fp, // I - File to read if (!get_token(fp, selector, sizeof(selector))) { _cupsLangPrintf(stderr, - _("ppdc: Expected selector after %s on line %d of %s\n"), + _("ppdc: Expected selector after %s on line %d of %s."), loc ? "LocAttribute" : "Attribute", fp->line, fp->filename); return (0); } @@ -371,7 +371,7 @@ ppdcSource::get_attr(ppdcFile *fp, // I - File to read if (!get_token(fp, value, sizeof(value))) { _cupsLangPrintf(stderr, - _("ppdc: Expected value after %s on line %d of %s\n"), + _("ppdc: Expected value after %s on line %d of %s."), loc ? "LocAttribute" : "Attribute", fp->line, fp->filename); return (0); } @@ -393,7 +393,7 @@ ppdcSource::get_boolean(ppdcFile *fp) // I - File to read if (!get_token(fp, buffer, sizeof(buffer))) { _cupsLangPrintf(stderr, - _("ppdc: Expected boolean value on line %d of %s.\n"), + _("ppdc: Expected boolean value on line %d of %s."), fp->line, fp->filename); return (-1); } @@ -409,7 +409,7 @@ ppdcSource::get_boolean(ppdcFile *fp) // I - File to read else { _cupsLangPrintf(stderr, - _("ppdc: Bad boolean value (%s) on line %d of %s.\n"), + _("ppdc: Bad boolean value (%s) on line %d of %s."), buffer, fp->line, fp->filename); return (-1); } @@ -434,7 +434,7 @@ ppdcSource::get_choice(ppdcFile *fp) // I - File to read if (!get_token(fp, name, sizeof(name))) { _cupsLangPrintf(stderr, - _("ppdc: Expected choice name/text on line %d of %s.\n"), + _("ppdc: Expected choice name/text on line %d of %s."), fp->line, fp->filename); return (NULL); } @@ -446,7 +446,7 @@ ppdcSource::get_choice(ppdcFile *fp) // I - File to read if (!get_token(fp, code, sizeof(code))) { - _cupsLangPrintf(stderr, _("ppdc: Expected choice code on line %d of %s.\n"), + _cupsLangPrintf(stderr, _("ppdc: Expected choice code on line %d of %s."), fp->line, fp->filename); return (NULL); } @@ -479,7 +479,7 @@ ppdcSource::get_color_model(ppdcFile *fp) { _cupsLangPrintf(stderr, _("ppdc: Expected name/text combination for ColorModel on " - "line %d of %s\n"), fp->line, fp->filename); + "line %d of %s."), fp->line, fp->filename); return (NULL); } @@ -492,7 +492,7 @@ ppdcSource::get_color_model(ppdcFile *fp) { _cupsLangPrintf(stderr, _("ppdc: Expected colorspace for ColorModel on line %d of " - "%s\n"), fp->line, fp->filename); + "%s."), fp->line, fp->filename); return (NULL); } @@ -503,7 +503,7 @@ ppdcSource::get_color_model(ppdcFile *fp) { _cupsLangPrintf(stderr, _("ppdc: Expected color order for ColorModel on line %d of " - "%s\n"), fp->line, fp->filename); + "%s."), fp->line, fp->filename); return (NULL); } @@ -514,7 +514,7 @@ ppdcSource::get_color_model(ppdcFile *fp) { _cupsLangPrintf(stderr, _("ppdc: Expected compression for ColorModel on line %d of " - "%s\n"), fp->line, fp->filename); + "%s."), fp->line, fp->filename); return (NULL); } @@ -572,7 +572,7 @@ ppdcSource::get_color_profile( { _cupsLangPrintf(stderr, _("ppdc: Expected resolution/mediatype following " - "ColorProfile on line %d of %s\n"), + "ColorProfile on line %d of %s."), fp->line, fp->filename); return (NULL); } @@ -695,7 +695,7 @@ ppdcSource::get_constraint(ppdcFile *fp)// I - File to read { _cupsLangPrintf(stderr, _("ppdc: Expected constraints string for UIConstraints on " - "line %d of %s\n"), fp->line, fp->filename); + "line %d of %s."), fp->line, fp->filename); return (NULL); } @@ -704,7 +704,7 @@ ppdcSource::get_constraint(ppdcFile *fp)// I - File to read if (*ptr != '*') { _cupsLangPrintf(stderr, - _("ppdc: Option constraint must *name on line %d of %s\n"), + _("ppdc: Option constraint must *name on line %d of %s."), fp->line, fp->filename); return (NULL); } @@ -727,7 +727,7 @@ ppdcSource::get_constraint(ppdcFile *fp)// I - File to read if (*ptr != '*') { _cupsLangPrintf(stderr, - _("ppdc: Expected two option names on line %d of %s\n"), + _("ppdc: Expected two option names on line %d of %s."), fp->line, fp->filename); return (NULL); } @@ -826,7 +826,7 @@ ppdcSource::get_duplex(ppdcFile *fp, // I - File to read from { _cupsLangPrintf(stderr, _("ppdc: Expected duplex type after Duplex on line %d of " - "%s\n"), fp->line, fp->filename); + "%s."), fp->line, fp->filename); return; } @@ -905,7 +905,7 @@ ppdcSource::get_duplex(ppdcFile *fp, // I - File to read from } else _cupsLangPrintf(stderr, - _("ppdc: Unknown duplex type \"%s\" on line %d of %s\n"), + _("ppdc: Unknown duplex type \"%s\" on line %d of %s."), temp, fp->line, fp->filename); } @@ -931,7 +931,7 @@ ppdcSource::get_filter(ppdcFile *fp) // I - File to read if (!get_token(fp, type, sizeof(type))) { _cupsLangPrintf(stderr, - _("ppdc: Expected a filter definition on line %d of %s\n"), + _("ppdc: Expected a filter definition on line %d of %s."), fp->line, fp->filename); return (NULL); } @@ -954,7 +954,7 @@ ppdcSource::get_filter(ppdcFile *fp) // I - File to read if (!get_token(fp, program, sizeof(program))) { _cupsLangPrintf(stderr, - _("ppdc: Expected a program name on line %d of %s\n"), + _("ppdc: Expected a program name on line %d of %s."), fp->line, fp->filename); return (NULL); } @@ -964,14 +964,14 @@ ppdcSource::get_filter(ppdcFile *fp) // I - File to read { _cupsLangPrintf(stderr, _("ppdc: Invalid empty MIME type for filter on line %d of " - "%s\n"), fp->line, fp->filename); + "%s."), fp->line, fp->filename); return (NULL); } if (cost < 0 || cost > 200) { _cupsLangPrintf(stderr, - _("ppdc: Invalid cost for filter on line %d of %s\n"), + _("ppdc: Invalid cost for filter on line %d of %s."), fp->line, fp->filename); return (NULL); } @@ -980,7 +980,7 @@ ppdcSource::get_filter(ppdcFile *fp) // I - File to read { _cupsLangPrintf(stderr, _("ppdc: Invalid empty program name for filter on line %d " - "of %s\n"), fp->line, fp->filename); + "of %s."), fp->line, fp->filename); return (NULL); } @@ -1003,7 +1003,7 @@ ppdcSource::get_float(ppdcFile *fp) // I - File to read // Get the number from the file and range-check... if (!get_token(fp, temp, sizeof(temp))) { - _cupsLangPrintf(stderr, _("ppdc: Expected real number on line %d of %s\n"), + _cupsLangPrintf(stderr, _("ppdc: Expected real number on line %d of %s."), fp->line, fp->filename); return (-1.0f); } @@ -1014,7 +1014,7 @@ ppdcSource::get_float(ppdcFile *fp) // I - File to read { _cupsLangPrintf(stderr, _("ppdc: Unknown trailing characters in real number \"%s\" " - "on line %d of %s\n"), temp, fp->line, fp->filename); + "on line %d of %s."), temp, fp->line, fp->filename); return (-1.0f); } else @@ -1057,7 +1057,7 @@ ppdcSource::get_font(ppdcFile *fp) // I - File to read if (!get_token(fp, name, sizeof(name))) { _cupsLangPrintf(stderr, - _("ppdc: Expected name after Font on line %d of %s\n"), + _("ppdc: Expected name after Font on line %d of %s."), fp->line, fp->filename); return (0); } @@ -1077,7 +1077,7 @@ ppdcSource::get_font(ppdcFile *fp) // I - File to read { _cupsLangPrintf(stderr, _("ppdc: Expected encoding after Font on line %d of " - "%s\n"), fp->line, fp->filename); + "%s."), fp->line, fp->filename); return (0); } @@ -1085,7 +1085,7 @@ ppdcSource::get_font(ppdcFile *fp) // I - File to read { _cupsLangPrintf(stderr, _("ppdc: Expected version after Font on line %d of " - "%s\n"), fp->line, fp->filename); + "%s."), fp->line, fp->filename); return (0); } @@ -1093,14 +1093,14 @@ ppdcSource::get_font(ppdcFile *fp) // I - File to read { _cupsLangPrintf(stderr, _("ppdc: Expected charset after Font on line %d of " - "%s\n"), fp->line, fp->filename); + "%s."), fp->line, fp->filename); return (0); } if (!get_token(fp, temp, sizeof(temp))) { _cupsLangPrintf(stderr, - _("ppdc: Expected status after Font on line %d of %s\n"), + _("ppdc: Expected status after Font on line %d of %s."), fp->line, fp->filename); return (0); } @@ -1112,7 +1112,7 @@ ppdcSource::get_font(ppdcFile *fp) // I - File to read else { _cupsLangPrintf(stderr, - _("ppdc: Bad status keyword %s on line %d of %s\n"), + _("ppdc: Bad status keyword %s on line %d of %s."), temp, fp->line, fp->filename); return (0); } @@ -1155,7 +1155,7 @@ ppdcSource::get_generic(ppdcFile *fp, // I - File to read if (!get_token(fp, name, sizeof(name))) { _cupsLangPrintf(stderr, - _("ppdc: Expected name/text after %s on line %d of %s\n"), + _("ppdc: Expected name/text after %s on line %d of %s."), keyword, fp->line, fp->filename); return (NULL); } @@ -1204,7 +1204,7 @@ ppdcSource::get_group(ppdcFile *fp, // I - File to read if (!get_token(fp, name, sizeof(name))) { _cupsLangPrintf(stderr, - _("ppdc: Expected group name/text on line %d of %s\n"), + _("ppdc: Expected group name/text on line %d of %s."), fp->line, fp->filename); return (NULL); } @@ -1245,7 +1245,7 @@ ppdcSource::get_installable(ppdcFile *fp) { _cupsLangPrintf(stderr, _("ppdc: Expected name/text after Installable on line %d " - "of %s\n"), fp->line, fp->filename); + "of %s."), fp->line, fp->filename); return (NULL); } @@ -1500,7 +1500,7 @@ ppdcSource::get_integer(ppdcFile *fp) // I - File to read if (!get_token(fp, temp, sizeof(temp))) { - _cupsLangPrintf(stderr, _("ppdc: Expected integer on line %d of %s\n"), + _cupsLangPrintf(stderr, _("ppdc: Expected integer on line %d of %s."), fp->line, fp->filename); return (-1); } @@ -1572,7 +1572,7 @@ ppdcSource::get_option(ppdcFile *fp, // I - File to read if (!get_token(fp, name, sizeof(name))) { _cupsLangPrintf(stderr, - _("ppdc: Expected option name/text on line %d of %s\n"), + _("ppdc: Expected option name/text on line %d of %s."), fp->line, fp->filename); return (NULL); } @@ -1584,7 +1584,7 @@ ppdcSource::get_option(ppdcFile *fp, // I - File to read if (!get_token(fp, type, sizeof(type))) { - _cupsLangPrintf(stderr, _("ppdc: Expected option type on line %d of %s\n"), + _cupsLangPrintf(stderr, _("ppdc: Expected option type on line %d of %s."), fp->line, fp->filename); return (NULL); } @@ -1598,7 +1598,7 @@ ppdcSource::get_option(ppdcFile *fp, // I - File to read else { _cupsLangPrintf(stderr, - _("ppdc: Invalid option type \"%s\" on line %d of %s\n"), + _("ppdc: Invalid option type \"%s\" on line %d of %s."), type, fp->line, fp->filename); return (NULL); } @@ -1606,7 +1606,7 @@ ppdcSource::get_option(ppdcFile *fp, // I - File to read if (!get_token(fp, type, sizeof(type))) { _cupsLangPrintf(stderr, - _("ppdc: Expected option section on line %d of %s\n"), + _("ppdc: Expected option section on line %d of %s."), fp->line, fp->filename); return (NULL); } @@ -1627,7 +1627,7 @@ ppdcSource::get_option(ppdcFile *fp, // I - File to read { _cupsLangPrintf(stderr, _("ppdc: Invalid option section \"%s\" on line %d of " - "%s\n"), type, fp->line, fp->filename); + "%s."), type, fp->line, fp->filename); return (NULL); } @@ -1643,14 +1643,14 @@ ppdcSource::get_option(ppdcFile *fp, // I - File to read { _cupsLangPrintf(stderr, _("ppdc: Option %s redefined with a different type on line " - "%d of %s\n"), name, fp->line, fp->filename); + "%d of %s."), name, fp->line, fp->filename); return (NULL); } else if (g != mg) { _cupsLangPrintf(stderr, _("ppdc: Option %s defined in two different groups on line " - "%d of %s\n"), name, fp->line, fp->filename); + "%d of %s."), name, fp->line, fp->filename); return (NULL); } @@ -1679,7 +1679,7 @@ ppdcSource::get_po(ppdcFile *fp) // I - File to read if (!get_token(fp, locale, sizeof(locale))) { _cupsLangPrintf(stderr, - _("ppdc: Expected locale after #po on line %d of %s\n"), + _("ppdc: Expected locale after #po on line %d of %s."), fp->line, fp->filename); return (NULL); } @@ -1688,7 +1688,7 @@ ppdcSource::get_po(ppdcFile *fp) // I - File to read { _cupsLangPrintf(stderr, _("ppdc: Expected filename after #po %s on line %d of " - "%s\n"), locale, fp->line, fp->filename); + "%s."), locale, fp->line, fp->filename); return (NULL); } @@ -1696,7 +1696,7 @@ ppdcSource::get_po(ppdcFile *fp) // I - File to read if (find_po(locale)) { _cupsLangPrintf(stderr, - _("ppdc: Duplicate #po for locale %s on line %d of %s\n"), + _("ppdc: Duplicate #po for locale %s on line %d of %s."), locale, fp->line, fp->filename); return (NULL); } @@ -1728,7 +1728,7 @@ ppdcSource::get_po(ppdcFile *fp) // I - File to read else { _cupsLangPrintf(stderr, - _("ppdc: Unable to find #po file %s on line %d of %s\n"), + _("ppdc: Unable to find #po file %s on line %d of %s."), poname, fp->line, fp->filename); return (NULL); } @@ -1764,7 +1764,7 @@ ppdcSource::get_resolution(ppdcFile *fp)// I - File to read { _cupsLangPrintf(stderr, _("ppdc: Expected override field after Resolution on line " - "%d of %s\n"), fp->line, fp->filename); + "%d of %s."), fp->line, fp->filename); return (NULL); } @@ -1781,7 +1781,7 @@ ppdcSource::get_resolution(ppdcFile *fp)// I - File to read { _cupsLangPrintf(stderr, _("ppdc: Expected name/text after Resolution on line %d of " - "%s\n"), fp->line, fp->filename); + "%s."), fp->line, fp->filename); return (NULL); } @@ -1795,7 +1795,7 @@ ppdcSource::get_resolution(ppdcFile *fp)// I - File to read case 0 : _cupsLangPrintf(stderr, _("ppdc: Bad resolution name \"%s\" on line %d of " - "%s\n"), name, fp->line, fp->filename); + "%s."), name, fp->line, fp->filename); break; case 1 : ydpi = xdpi; @@ -1862,7 +1862,7 @@ ppdcSource::get_simple_profile(ppdcFile *fp) { _cupsLangPrintf(stderr, _("ppdc: Expected resolution/mediatype following " - "SimpleColorProfile on line %d of %s\n"), + "SimpleColorProfile on line %d of %s."), fp->line, fp->filename); return (NULL); } @@ -2032,7 +2032,7 @@ ppdcSource::get_token(ppdcFile *fp, // I - File to read // $ch = $ch _cupsLangPrintf(stderr, _("ppdc: Bad variable substitution ($%c) on line %d " - "of %s.\n"), ch, fp->line, fp->filename); + "of %s."), ch, fp->line, fp->filename); if (bufptr < bufend) *bufptr++ = '$'; @@ -2053,7 +2053,7 @@ ppdcSource::get_token(ppdcFile *fp, // I - File to read if (!(cond_state & PPDC_COND_SKIP)) _cupsLangPrintf(stderr, _("ppdc: Undefined variable (%s) on line %d of " - "%s.\n"), name, fp->line, fp->filename); + "%s."), name, fp->line, fp->filename); snprintf(bufptr, bufend - bufptr + 1, "$%s", name); bufptr += strlen(bufptr); @@ -2163,7 +2163,7 @@ ppdcSource::get_token(ppdcFile *fp, // I - File to read { _cupsLangPrintf(stderr, _("ppdc: Unterminated string starting with %c on line %d " - "of %s\n"), quote, startline, fp->filename); + "of %s."), quote, startline, fp->filename); return (NULL); } @@ -2400,7 +2400,7 @@ ppdcSource::read_file(const char *f, // I - File to read delete fp; if (cond_current != cond_stack) - _cupsLangPrintf(stderr, _("ppdc: Missing #endif at end of \"%s\"\n"), f); + _cupsLangPrintf(stderr, _("ppdc: Missing #endif at end of \"%s\"."), f); } @@ -2483,7 +2483,7 @@ ppdcSource::scan_file(ppdcFile *fp, // I - File to read if ((cond_current - cond_stack) >= 100) { _cupsLangPrintf(stderr, - _("ppdc: Too many nested #if's on line %d of %s\n"), + _("ppdc: Too many nested #if's on line %d of %s."), fp->line, fp->filename); break; } @@ -2501,7 +2501,7 @@ ppdcSource::scan_file(ppdcFile *fp, // I - File to read { if (cond_current == cond_stack) { - _cupsLangPrintf(stderr, _("ppdc: Missing #if on line %d of %s\n"), + _cupsLangPrintf(stderr, _("ppdc: Missing #if on line %d of %s."), fp->line, fp->filename); break; } @@ -2536,7 +2536,7 @@ ppdcSource::scan_file(ppdcFile *fp, // I - File to read { if (cond_current == cond_stack) { - _cupsLangPrintf(stderr, _("ppdc: Missing #if on line %d of %s\n"), + _cupsLangPrintf(stderr, _("ppdc: Missing #if on line %d of %s."), fp->line, fp->filename); break; } @@ -2566,7 +2566,7 @@ ppdcSource::scan_file(ppdcFile *fp, // I - File to read { if (cond_current == cond_stack) { - _cupsLangPrintf(stderr, _("ppdc: Missing #if on line %d of %s\n"), + _cupsLangPrintf(stderr, _("ppdc: Missing #if on line %d of %s."), fp->line, fp->filename); break; } @@ -2608,7 +2608,7 @@ ppdcSource::scan_file(ppdcFile *fp, // I - File to read { _cupsLangPrintf(stderr, _("ppdc: Expected include filename on line %d of " - "%s\n"), fp->line, fp->filename); + "%s."), fp->line, fp->filename); break; } @@ -2632,7 +2632,7 @@ ppdcSource::scan_file(ppdcFile *fp, // I - File to read delete incfile; if (cond_current != old_current) - _cupsLangPrintf(stderr, _("ppdc: Missing #endif at end of \"%s\"\n"), + _cupsLangPrintf(stderr, _("ppdc: Missing #endif at end of \"%s\"."), incname); } else @@ -2640,7 +2640,7 @@ ppdcSource::scan_file(ppdcFile *fp, // I - File to read // Can't find it! _cupsLangPrintf(stderr, _("ppdc: Unable to find include file \"%s\" on line %d " - "of %s\n"), inctemp, fp->line, fp->filename); + "of %s."), inctemp, fp->line, fp->filename); break; } } @@ -2708,7 +2708,7 @@ ppdcSource::scan_file(ppdcFile *fp, // I - File to read { _cupsLangPrintf(stderr, _("ppdc: Choice found on line %d of %s with no " - "Option\n"), fp->line, fp->filename); + "Option."), fp->line, fp->filename); break; } @@ -2783,7 +2783,7 @@ ppdcSource::scan_file(ppdcFile *fp, // I - File to read { _cupsLangPrintf(stderr, _("ppdc: Expected string after Copyright on line %d " - "of %s\n"), fp->line, fp->filename); + "of %s."), fp->line, fp->filename); break; } @@ -2871,7 +2871,7 @@ ppdcSource::scan_file(ppdcFile *fp, // I - File to read { _cupsLangPrintf(stderr, _("ppdc: Option %s defined in two different groups on " - "line %d of %s\n"), "cupsDarkness", fp->line, + "line %d of %s."), "cupsDarkness", fp->line, fp->filename); c->release(); continue; @@ -2894,7 +2894,7 @@ ppdcSource::scan_file(ppdcFile *fp, // I - File to read { _cupsLangPrintf(stderr, _("ppdc: Expected driver type keyword following " - "DriverType on line %d of %s\n"), + "DriverType on line %d of %s."), fp->line, fp->filename); continue; } @@ -2912,7 +2912,7 @@ ppdcSource::scan_file(ppdcFile *fp, // I - File to read d->type = PPDC_DRIVER_LABEL; else _cupsLangPrintf(stderr, - _("ppdc: Unknown driver type %s on line %d of %s\n"), + _("ppdc: Unknown driver type %s on line %d of %s."), temp, fp->line, fp->filename); } else if (!strcasecmp(temp, "Duplex")) @@ -2957,7 +2957,7 @@ ppdcSource::scan_file(ppdcFile *fp, // I - File to read { _cupsLangPrintf(stderr, _("ppdc: Option %s defined in two different groups on " - "line %d of %s\n"), "cupsFinishing", fp->line, + "line %d of %s."), "cupsFinishing", fp->line, fp->filename); c->release(); continue; @@ -3050,7 +3050,7 @@ ppdcSource::scan_file(ppdcFile *fp, // I - File to read { _cupsLangPrintf(stderr, _("ppdc: Option %s defined in two different groups on " - "line %d of %s\n"), "InputSlot", fp->line, + "line %d of %s."), "InputSlot", fp->line, fp->filename); c->release(); continue; @@ -3097,7 +3097,7 @@ ppdcSource::scan_file(ppdcFile *fp, // I - File to read { _cupsLangPrintf(stderr, _("ppdc: Expected name after Manufacturer on line %d " - "of %s\n"), fp->line, fp->filename); + "of %s."), fp->line, fp->filename); break; } @@ -3130,7 +3130,7 @@ ppdcSource::scan_file(ppdcFile *fp, // I - File to read { _cupsLangPrintf(stderr, _("ppdc: Expected name after MediaSize on line %d of " - "%s\n"), fp->line, fp->filename); + "%s."), fp->line, fp->filename); break; } @@ -3143,7 +3143,7 @@ ppdcSource::scan_file(ppdcFile *fp, // I - File to read { _cupsLangPrintf(stderr, _("ppdc: Unknown media size \"%s\" on line %d of " - "%s\n"), name, fp->line, fp->filename); + "%s."), name, fp->line, fp->filename); break; } @@ -3183,7 +3183,7 @@ ppdcSource::scan_file(ppdcFile *fp, // I - File to read { _cupsLangPrintf(stderr, _("ppdc: Option %s defined in two different groups on " - "line %d of %s\n"), "MediaType", fp->line, + "line %d of %s."), "MediaType", fp->line, fp->filename); c->release(); continue; @@ -3220,7 +3220,7 @@ ppdcSource::scan_file(ppdcFile *fp, // I - File to read { _cupsLangPrintf(stderr, _("ppdc: Expected name after ModelName on line %d of " - "%s\n"), fp->line, fp->filename); + "%s."), fp->line, fp->filename); break; } @@ -3266,7 +3266,7 @@ ppdcSource::scan_file(ppdcFile *fp, // I - File to read { _cupsLangPrintf(stderr, _("ppdc: Expected name after FileName on line %d of " - "%s\n"), fp->line, fp->filename); + "%s."), fp->line, fp->filename); break; } @@ -3283,7 +3283,7 @@ ppdcSource::scan_file(ppdcFile *fp, // I - File to read { _cupsLangPrintf(stderr, _("ppdc: Expected name after PCFileName on line %d of " - "%s\n"), fp->line, fp->filename); + "%s."), fp->line, fp->filename); break; } @@ -3316,7 +3316,7 @@ ppdcSource::scan_file(ppdcFile *fp, // I - File to read { _cupsLangPrintf(stderr, _("ppdc: Option %s defined in two different groups on " - "line %d of %s\n"), "Resolution", fp->line, + "line %d of %s."), "Resolution", fp->line, fp->filename); c->release(); continue; @@ -3386,7 +3386,7 @@ ppdcSource::scan_file(ppdcFile *fp, // I - File to read { _cupsLangPrintf(stderr, _("ppdc: Expected string after Version on line %d of " - "%s\n"), fp->line, fp->filename); + "%s."), fp->line, fp->filename); break; } @@ -3396,7 +3396,7 @@ ppdcSource::scan_file(ppdcFile *fp, // I - File to read else { _cupsLangPrintf(stderr, - _("ppdc: Unknown token \"%s\" seen on line %d of %s\n"), + _("ppdc: Unknown token \"%s\" seen on line %d of %s."), temp, fp->line, fp->filename); break; } diff --git a/ppdc/ppdc.cxx b/ppdc/ppdc.cxx index eaf88fa42..9d4b11e21 100644 --- a/ppdc/ppdc.cxx +++ b/ppdc/ppdc.cxx @@ -110,7 +110,7 @@ main(int argc, // I - Number of command-line arguments if (verbose > 1) _cupsLangPrintf(stdout, - _("ppdc: Adding include directory \"%s\"...\n"), + _("ppdc: Adding include directory \"%s\"."), argv[i]); ppdcSource::add_include(argv[i]); @@ -123,7 +123,7 @@ main(int argc, // I - Number of command-line arguments if (verbose > 1) _cupsLangPrintf(stdout, - _("ppdc: Loading messages from \"%s\"...\n"), + _("ppdc: Loading messages from \"%s\"."), argv[i]); if (!catalog) @@ -133,7 +133,7 @@ main(int argc, // I - Number of command-line arguments { _cupsLangPrintf(stderr, _("ppdc: Unable to load localization file " - "\"%s\" - %s\n"), argv[i], strerror(errno)); + "\"%s\" - %s"), argv[i], strerror(errno)); return (1); } break; @@ -146,7 +146,7 @@ main(int argc, // I - Number of command-line arguments if (verbose > 1) _cupsLangPrintf(stdout, _("ppdc: Writing PPD files to directory " - "\"%s\"...\n"), argv[i]); + "\"%s\"."), argv[i]); outdir = argv[i]; break; @@ -185,7 +185,7 @@ main(int argc, // I - Number of command-line arguments if (verbose > 1) _cupsLangPrintf(stdout, _("ppdc: Loading messages for locale " - "\"%s\"...\n"), argv[i]); + "\"%s\"."), argv[i]); if (catalog) catalog->release(); @@ -196,7 +196,7 @@ main(int argc, // I - Number of command-line arguments { _cupsLangPrintf(stderr, _("ppdc: Unable to find localization for " - "\"%s\" - %s\n"), argv[i], strerror(errno)); + "\"%s\" - %s"), argv[i], strerror(errno)); return (1); } } @@ -248,7 +248,7 @@ main(int argc, // I - Number of command-line arguments // Open and load the driver info file... if (verbose > 1) _cupsLangPrintf(stdout, - _("ppdc: Loading driver information file \"%s\"...\n"), + _("ppdc: Loading driver information file \"%s\"."), argv[i]); src->read_file(argv[i]); @@ -263,7 +263,7 @@ main(int argc, // I - Number of command-line arguments if (errno != EEXIST) { _cupsLangPrintf(stderr, - _("ppdc: Unable to create output directory %s: %s\n"), + _("ppdc: Unable to create output directory %s: %s"), outdir, strerror(errno)); return (1); } @@ -284,7 +284,7 @@ main(int argc, // I - Number of command-line arguments if (pipe(fds)) { _cupsLangPrintf(stderr, - _("ppdc: Unable to create output pipes: %s\n"), + _("ppdc: Unable to create output pipes: %s"), strerror(errno)); return (1); } @@ -300,14 +300,13 @@ main(int argc, // I - Number of command-line arguments execlp("cupstestppd", "cupstestppd", "-", (char *)0); _cupsLangPrintf(stderr, - _("ppdc: Unable to execute cupstestppd: %s\n"), + _("ppdc: Unable to execute cupstestppd: %s"), strerror(errno)); return (errno); } else if (pid < 0) { - _cupsLangPrintf(stderr, - _("ppdc: Unable to execute cupstestppd: %s\n"), + _cupsLangPrintf(stderr, _("ppdc: Unable to execute cupstestppd: %s"), strerror(errno)); return (errno); } @@ -363,7 +362,7 @@ main(int argc, // I - Number of command-line arguments if (cupsArrayFind(filenames, filename)) _cupsLangPrintf(stderr, - _("ppdc: Warning - overlapping filename \"%s\".\n"), + _("ppdc: Warning - overlapping filename \"%s\"."), filename); else cupsArrayAdd(filenames, strdup(filename)); @@ -372,13 +371,13 @@ main(int argc, // I - Number of command-line arguments if (!fp) { _cupsLangPrintf(stderr, - _("ppdc: Unable to create PPD file \"%s\" - %s.\n"), + _("ppdc: Unable to create PPD file \"%s\" - %s."), filename, strerror(errno)); return (1); } if (verbose) - _cupsLangPrintf(stdout, _("ppdc: Writing %s...\n"), filename); + _cupsLangPrintf(stdout, _("ppdc: Writing %s."), filename); } /* @@ -433,27 +432,33 @@ main(int argc, // I - Number of command-line arguments static void usage(void) { - _cupsLangPuts(stdout, - _("Usage: ppdc [options] filename.drv [ ... filenameN.drv ]\n" - "Options:\n" - " -D name=value Set named variable to value.\n" - " -I include-dir Add include directory to search " - "path.\n" - " -c catalog.po Load the specified message catalog.\n" - " -d output-dir Specify the output directory.\n" - " -l lang[,lang,...] Specify the output language(s) " - "(locale).\n" - " -m Use the ModelName value as the " - "filename.\n" - " -t Test PPDs instead of generating " - "them.\n" - " -v Be verbose (more v's for more " - "verbosity).\n" - " -z Compress PPD files using GNU zip.\n" - " --cr End lines with CR (Mac OS 9).\n" - " --crlf End lines with CR + LF (Windows).\n" - " --lf End lines with LF (UNIX/Linux/Mac " - "OS X).\n")); + _cupsLangPuts(stdout, _("Usage: ppdc [options] filename.drv [ ... " + "filenameN.drv ]")); + _cupsLangPuts(stdout, _("Options:")); + _cupsLangPuts(stdout, _(" -D name=value Set named variable to " + "value.")); + _cupsLangPuts(stdout, _(" -I include-dir Add include directory to " + "search path.")); + _cupsLangPuts(stdout, _(" -c catalog.po Load the specified message " + "catalog.")); + _cupsLangPuts(stdout, _(" -d output-dir Specify the output " + "directory.")); + _cupsLangPuts(stdout, _(" -l lang[,lang,...] Specify the output " + "language(s) (locale).")); + _cupsLangPuts(stdout, _(" -m Use the ModelName value as " + "the filename.")); + _cupsLangPuts(stdout, _(" -t Test PPDs instead of " + "generating them.")); + _cupsLangPuts(stdout, _(" -v Be verbose (more v's for " + "more verbosity).")); + _cupsLangPuts(stdout, _(" -z Compress PPD files using GNU " + "zip.")); + _cupsLangPuts(stdout, _(" --cr End lines with CR (Mac OS " + "9).")); + _cupsLangPuts(stdout, _(" --crlf End lines with CR + LF " + "(Windows).")); + _cupsLangPuts(stdout, _(" --lf End lines with LF (UNIX/" + "Linux/Mac OS X).")); exit(1); } diff --git a/ppdc/ppdhtml.cxx b/ppdc/ppdhtml.cxx index bcbb81e94..33ee5d927 100644 --- a/ppdc/ppdhtml.cxx +++ b/ppdc/ppdhtml.cxx @@ -3,7 +3,7 @@ // // PPD to HTML utility for the CUPS PPD Compiler. // -// Copyright 2007-2008 by Apple Inc. +// Copyright 2007-2010 by Apple Inc. // Copyright 2002-2005 by Easy Software Products. // // These coded instructions, statements, and computer programs are the @@ -169,12 +169,13 @@ main(int argc, // I - Number of command-line arguments static void usage(void) { - _cupsLangPuts(stdout, - _("Usage: ppdhtml [options] filename.drv >filename.html\n" - " -D name=value Set named variable to value.\n" - "Options:\n" - " -I include-dir Add include directory to search " - "path.\n")); + _cupsLangPuts(stdout, _("Usage: ppdhtml [options] filename.drv " + ">filename.html")); + _cupsLangPuts(stdout, _("Options:")); + _cupsLangPuts(stdout, _(" -D name=value Set named variable to " + "value.")); + _cupsLangPuts(stdout, _(" -I include-dir Add include directory to search " + "path.")); exit(1); } diff --git a/ppdc/ppdi.cxx b/ppdc/ppdi.cxx index 4e8aa3f50..abc4173f3 100644 --- a/ppdc/ppdi.cxx +++ b/ppdc/ppdi.cxx @@ -3,7 +3,7 @@ // // PPD file import utility for the CUPS PPD Compiler. // -// Copyright 2007-2008 by Apple Inc. +// Copyright 2007-2010 by Apple Inc. // Copyright 2002-2005 by Easy Software Products. // // These coded instructions, statements, and computer programs are the @@ -125,11 +125,11 @@ main(int argc, // I - Number of command-line arguments static void usage(void) { - _cupsLangPuts(stdout, - _("Usage: ppdi [options] filename.ppd [ ... filenameN.ppd ]\n" - "Options:\n" - " -I include-dir\n" - " -o filename.drv\n")); + _cupsLangPuts(stdout, _("Usage: ppdi [options] filename.ppd [ ... " + "filenameN.ppd ]")); + _cupsLangPuts(stdout, _("Options:")); + _cupsLangPuts(stdout, _(" -I include-dir")); + _cupsLangPuts(stdout, _(" -o filename.drv")); exit(1); } diff --git a/ppdc/ppdmerge.cxx b/ppdc/ppdmerge.cxx index ba705e365..bd5be92ac 100644 --- a/ppdc/ppdmerge.cxx +++ b/ppdc/ppdmerge.cxx @@ -93,7 +93,7 @@ main(int argc, // I - Number of command-line arguments // Open and load the PPD file... if ((infile = cupsFileOpen(argv[i], "r")) == NULL) { - _cupsLangPrintf(stderr, _("%s: Unable to open %s: %s\n"), "ppdmerge", + _cupsLangPrintf(stderr, _("%s: Unable to open %s: %s"), "ppdmerge", argv[i], strerror(errno)); return (1); } @@ -102,28 +102,29 @@ main(int argc, // I - Number of command-line arguments if ((ppd = ppdOpen2(infile)) == NULL) { ppd_status_t status; // PPD open status - int linenum; // Line number + int curline, // Current line + linenum; // Line number status = ppdLastError(&linenum); - _cupsLangPrintf(stderr, _("%s: Unable to open PPD file: %s on line %d.\n"), + _cupsLangPrintf(stderr, + _("%s: Unable to open PPD file: %s on line %d."), "ppdmerge", ppdErrorString(status), linenum); - - _cupsLangPrintf(stderr, "%d: ", linenum); cupsFileRewind(infile); line[0] = '\0'; + curline = 0; while (cupsFileGets(infile, line, sizeof(line))) { - linenum --; - if (!linenum) + curline ++; + if (curline >= linenum) break; } - - _cupsLangPrintf(stderr, "%s\n", line); - + + _cupsLangPrintf(stderr, "%d: %s", linenum, line); + cupsFileClose(infile); return (1); } @@ -132,7 +133,7 @@ main(int argc, // I - Number of command-line arguments if ((locale = ppd_locale(ppd)) == NULL) { _cupsLangPrintf(stderr, - _("ppdmerge: Bad LanguageVersion \"%s\" in %s\n"), + _("ppdmerge: Bad LanguageVersion \"%s\" in %s."), ppd->lang_version, argv[i]); cupsFileClose(infile); ppdClose(ppd); @@ -156,7 +157,7 @@ main(int argc, // I - Number of command-line arguments if (rename(inname, bckname)) { _cupsLangPrintf(stderr, - _("ppdmerge: Unable to backup %s to %s- %s\n"), + _("ppdmerge: Unable to backup %s to %s - %s"), inname, bckname, strerror(errno)); return (1); } @@ -172,7 +173,7 @@ main(int argc, // I - Number of command-line arguments else { // Don't need this PPD... - _cupsLangPrintf(stderr, _("ppdmerge: Ignoring PPD file %s...\n"), + _cupsLangPrintf(stderr, _("ppdmerge: Ignoring PPD file %s."), argv[i]); ppdClose(ppd); } @@ -363,11 +364,10 @@ ppd_locale(ppd_file_t *ppd) // I - PPD file static void usage(void) { - _cupsLangPuts(stdout, - _("Usage: ppdmerge [options] filename.ppd " - "[ ... filenameN.ppd ]\n" - "Options:\n" - " -o filename.ppd[.gz]\n")); + _cupsLangPuts(stdout, _("Usage: ppdmerge [options] filename.ppd [ ... " + "filenameN.ppd ]")); + _cupsLangPuts(stdout, _("Options:")); + _cupsLangPuts(stdout, _(" -o filename.ppd[.gz]")); exit(1); } diff --git a/ppdc/ppdpo.cxx b/ppdc/ppdpo.cxx index 3b7904f45..b413e5d6e 100644 --- a/ppdc/ppdpo.cxx +++ b/ppdc/ppdpo.cxx @@ -3,7 +3,7 @@ // // PPD file message catalog program for the CUPS PPD Compiler. // -// Copyright 2007-2008 by Apple Inc. +// Copyright 2007-2010 by Apple Inc. // Copyright 2002-2005 by Easy Software Products. // // These coded instructions, statements, and computer programs are the @@ -90,7 +90,7 @@ main(int argc, // I - Number of command-line arguments if (verbose > 1) _cupsLangPrintf(stdout, - _("ppdc: Adding include directory \"%s\"...\n"), + _("ppdc: Adding include directory \"%s\"."), argv[i]); ppdcSource::add_include(argv[i]); @@ -120,7 +120,7 @@ main(int argc, // I - Number of command-line arguments // Open and load the driver info file... if (verbose > 1) _cupsLangPrintf(stdout, - _("ppdc: Loading driver information file \"%s\"...\n"), + _("ppdc: Loading driver information file \"%s\"."), argv[i]); src = new ppdcSource(argv[i]); @@ -131,8 +131,7 @@ main(int argc, // I - Number of command-line arguments d = (ppdcDriver *)src->drivers->next()) { if (verbose) - _cupsLangPrintf(stderr, - _("ppdc: Adding/updating UI text from %s...\n"), + _cupsLangPrintf(stderr, _("ppdc: Adding/updating UI text from %s."), argv[i]); add_ui_strings(d, catalog); @@ -250,14 +249,15 @@ add_ui_strings(ppdcDriver *d, // I - Driver data static void usage(void) { - _cupsLangPuts(stdout, - _("Usage: ppdpo [options] -o filename.po filename.drv [ ... " - "filenameN.drv ]\n" - "Options:\n" - " -D name=value Set named variable to value.\n" - " -I include-dir Add include directory to search path.\n" - " -v Be verbose (more v's for more " - "verbosity).\n")); + _cupsLangPuts(stdout, _("Usage: ppdpo [options] -o filename.po filename.drv " + "[ ... filenameN.drv ]")); + _cupsLangPuts(stdout, _("Options:")); + _cupsLangPuts(stdout, _(" -D name=value Set named variable to " + "value.")); + _cupsLangPuts(stdout, _(" -I include-dir Add include directory to search " + "path.")); + _cupsLangPuts(stdout, _(" -v Be verbose (more v's for more " + "verbosity).")); exit(1); } |