]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - ppdc/ppdc.cxx
Add a USB quirk rule for the Lexmark E120n (Issue #5478)
[thirdparty/cups.git] / ppdc / ppdc.cxx
index 52b88dfa8d42036bcff0e91b7e5fcead35d0a196..5411b5e376fab661a366623ce456fb4a74d51750 100644 (file)
@@ -1,21 +1,10 @@
 //
-// "$Id$"
+// PPD file compiler main entry for the CUPS PPD Compiler.
 //
-//   PPD file compiler main entry for the CUPS PPD Compiler.
+// Copyright 2007-2014 by Apple Inc.
+// Copyright 2002-2007 by Easy Software Products.
 //
-//   Copyright 2007-2011 by Apple Inc.
-//   Copyright 2002-2007 by Easy Software Products.
-//
-//   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 PPD compiler.
-//   usage() - Show usage and exit.
+// Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
 //
 
 //
@@ -80,7 +69,7 @@ main(int  argc,                               // I - Number of command-line arguments
   src             = new ppdcSource();
   use_model_name  = 0;
   verbose         = 0;
-  filenames       = cupsArrayNew((cups_array_func_t)strcasecmp, NULL);
+  filenames       = cupsArrayNew((cups_array_func_t)_cups_strcasecmp, NULL);
 
   for (i = 1; i < argc; i ++)
     if (argv[i][0] == '-')
@@ -192,7 +181,7 @@ main(int  argc,                             // I - Number of command-line arguments
 
                catalog = new ppdcCatalog(argv[i]);
 
-               if (catalog->messages->count == 0)
+               if (catalog->messages->count == 0 && strcmp(argv[i], "en"))
                {
                  _cupsLangPrintf(stderr,
                                  _("ppdc: Unable to find localization for "
@@ -213,7 +202,7 @@ main(int  argc,                             // I - Number of command-line arguments
           case 'v' :                   // Be verbose...
              verbose ++;
              break;
-           
+
           case 'z' :                   // Compress files...
              comp = 1;
              break;
@@ -237,7 +226,7 @@ main(int  argc,                             // I - Number of command-line arguments
                opt += strlen(opt) - 1;
                break;
              }
-           
+
          default :                     // Unknown
              usage();
              break;
@@ -319,7 +308,7 @@ main(int  argc,                             // I - Number of command-line arguments
        // Write the PPD file for this driver...
        if (use_model_name)
        {
-         if (!strncasecmp(d->model_name->value, d->manufacturer->value,
+         if (!_cups_strncasecmp(d->model_name->value, d->manufacturer->value,
                           strlen(d->manufacturer->value)))
          {
            // Model name already starts with the manufacturer...
@@ -344,7 +333,7 @@ main(int  argc,                             // I - Number of command-line arguments
          for (j = 0;
               outname[j] && j < (int)(sizeof(pcfilename) - 1);
               j ++)
-           pcfilename[j] = tolower(outname[j] & 255);
+           pcfilename[j] = (char)tolower(outname[j] & 255);
 
          pcfilename[j] = '\0';
        }
@@ -449,8 +438,7 @@ usage(void)
                           "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, _("  -v                      Be verbose."));
   _cupsLangPuts(stdout, _("  -z                      Compress PPD files using "
                           "GNU zip."));
   _cupsLangPuts(stdout, _("  --cr                    End lines with CR (Mac "
@@ -458,12 +446,7 @@ usage(void)
   _cupsLangPuts(stdout, _("  --crlf                  End lines with CR + LF "
                           "(Windows)."));
   _cupsLangPuts(stdout, _("  --lf                    End lines with LF "
-                          "(UNIX/Linux/Mac OS X)."));
+                          "(UNIX/Linux/macOS)."));
 
   exit(1);
 }
-
-
-//
-// End of "$Id$".
-//