CHANGES IN CUPS V1.1.17
+ - User-defined classification strings are now printed
+ verbatim - previously the classification box would be
+ empty.
- Re-added Spanish to the list of PPD languages that
CUPS supports.
- CUPS API library user and temp file updates for
/*
- * "$Id: common.c,v 1.15.2.9 2002/10/17 17:06:00 mike Exp $"
+ * "$Id: common.c,v 1.15.2.10 2002/10/28 17:33:30 mike Exp $"
*
* Common filter routines for the Common UNIX Printing System (CUPS).
*
float width) /* I - Width in points */
{
const char *classification; /* CLASSIFICATION environment variable */
+ const char *ptr; /* Temporary string pointer */
/*
else if (strcmp(classification, "unclassified") == 0)
printf("/ESPpl(UNCLASSIFIED");
else
+ {
printf("/ESPpl(");
+ for (ptr = classification; *ptr; ptr ++)
+ if (*ptr < 32 || *ptr > 126)
+ printf("\\%03o", *ptr);
+ else
+ {
+ if (*ptr == '(' || *ptr == ')' || *ptr == '\\')
+ putchar('\\');
+
+ putchar(*ptr);
+ }
+ }
+
if (label)
{
if (classification[0])
* Quote the label string as needed...
*/
- while (*label)
- {
- if (*label < 32 || *label > 126)
- printf("\\%03o", *label);
+ for (ptr = label; *ptr; ptr ++)
+ if (*ptr < 32 || *ptr > 126)
+ printf("\\%03o", *ptr);
else
{
- if (*label == '(' || *label == ')' || *label == '\\')
+ if (*ptr == '(' || *ptr == ')' || *ptr == '\\')
putchar('\\');
- putchar(*label);
+ putchar(*ptr);
}
-
- label ++;
- }
}
puts(")put");
/*
- * End of "$Id: common.c,v 1.15.2.9 2002/10/17 17:06:00 mike Exp $".
+ * End of "$Id: common.c,v 1.15.2.10 2002/10/28 17:33:30 mike Exp $".
*/