]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/ppd.c
Update svn:keyword properties.
[thirdparty/cups.git] / cups / ppd.c
index 2c826ff1bae1e8d94234e1941400acf7ddbe20af..6813ea0e640628ff68a53b6492601bdc724c30fd 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: ppd.c 9900 2011-08-17 20:59:46Z mike $"
+ * "$Id$"
  *
  *   PPD file routines for CUPS.
  *
- *   Copyright 2007-2011 by Apple Inc.
+ *   Copyright 2007-2012 by Apple Inc.
  *   Copyright 1997-2007 by Easy Software Products, all rights reserved.
  *
  *   These coded instructions, statements, and computer programs are the
@@ -327,7 +327,7 @@ ppdClose(ppd_file_t *ppd)           /* I - PPD file record */
 /*
  * 'ppdErrorString()' - Returns the text assocated with a status.
  *
- * @since CUPS 1.1.19/Mac OS X 10.3@
+ * @since CUPS 1.1.19/OS X 10.3@
  */
 
 const char *                           /* O - Status string */
@@ -397,7 +397,7 @@ _ppdGetEncoding(const char *name)   /* I - LanguageEncoding string */
 /*
  * 'ppdLastError()' - Return the status from the last ppdOpen*().
  *
- * @since CUPS 1.1.19/Mac OS X 10.3@
+ * @since CUPS 1.1.19/OS X 10.3@
  */
 
 ppd_status_t                           /* O - Status code */
@@ -417,7 +417,7 @@ ppdLastError(int *line)                     /* O - Line number */
 /*
  * '_ppdOpen()' - Read a PPD file into memory.
  *
- * @since CUPS 1.2/Mac OS X 10.5@
+ * @since CUPS 1.2/OS X 10.5@
  */
 
 ppd_file_t *                           /* O - PPD file record or @code NULL@ if the PPD file could not be opened. */
@@ -1264,7 +1264,7 @@ _ppdOpen(
 
         ppd->patches = temp;
 
-        strcpy(ppd->patches + strlen(ppd->patches), string);
+        memcpy(ppd->patches + strlen(ppd->patches), string, strlen(string) + 1);
       }
     }
     else if (!strcmp(keyword, "OpenUI"))
@@ -1378,7 +1378,7 @@ _ppdOpen(
       */
 
       if (!_cups_strcasecmp(name, "PageRegion"))
-        strcpy(custom_name, "CustomPageSize");
+        strlcpy(custom_name, "CustomPageSize", sizeof(custom_name));
       else
         snprintf(custom_name, sizeof(custom_name), "Custom%s", name);
 
@@ -1944,9 +1944,9 @@ _ppdOpen(
         cupsCharsetToUTF8((cups_utf8_t *)choice->text, text,
                           sizeof(choice->text), encoding);
       else if (!strcmp(name, "True"))
-        strcpy(choice->text, _("Yes"));
+        strlcpy(choice->text, _("Yes"), sizeof(choice->text));
       else if (!strcmp(name, "False"))
-        strcpy(choice->text, _("No"));
+        strlcpy(choice->text, _("No"), sizeof(choice->text));
       else
         strlcpy(choice->text, name, sizeof(choice->text));
 
@@ -2106,7 +2106,7 @@ ppdOpen(FILE *fp)                 /* I - File to read from */
 /*
  * 'ppdOpen2()' - Read a PPD file into memory.
  *
- * @since CUPS 1.2/Mac OS X 10.5@
+ * @since CUPS 1.2/OS X 10.5@
  */
 
 ppd_file_t *                           /* O - PPD file record or @code NULL@ if the PPD file could not be opened. */
@@ -2231,7 +2231,7 @@ ppdOpenFile(const char *filename) /* I - File to read from */
 /*
  * 'ppdSetConformance()' - Set the conformance level for PPD files.
  *
- * @since CUPS 1.1.20/Mac OS X 10.4@
+ * @since CUPS 1.1.20/OS X 10.4@
  */
 
 void
@@ -3062,7 +3062,7 @@ ppd_read(cups_file_t    *fp,              /* I - File to read from */
     DEBUG_printf(("9ppd_read: LINE=\"%s\"", line->buffer));
 
    /*
-    * The dynamically created PPDs for older style Mac OS X
+    * The dynamically created PPDs for older style OS X
     * drivers include a large blob of data inserted as comments
     * at the end of the file.  As an optimization we can stop
     * reading the PPD when we get to the start of this data.
@@ -3394,5 +3394,5 @@ ppd_update_filters(ppd_file_t      *ppd,/* I - PPD file */
 
 
 /*
- * End of "$Id: ppd.c 9900 2011-08-17 20:59:46Z mike $".
+ * End of "$Id$".
  */