/*
- * "$Id: ppd.c 5119 2006-02-16 15:52:06Z mike $"
+ * "$Id: ppd.c 5200 2006-02-28 00:10:32Z mike $"
*
* PPD file routines for the Common UNIX Printing System (CUPS).
*
ppd_free(ppd->attrs);
}
+ cupsArrayDelete(ppd->sorted_attrs);
+
/*
* Free custom options...
*/
case PPD_CUSTOM_PASSWORD :
case PPD_CUSTOM_STRING :
ppd_free(cparam->current.custom_string);
- ppd_free(cparam->minimum.custom_string);
- ppd_free(cparam->maximum.custom_string);
break;
default :
ppd->fonts[ppd->num_fonts] = strdup(name);
ppd->num_fonts ++;
}
-#if 0
- else if (!strcmp(keyword, "ParamCustomPageSize"))
- {
- if (!strcmp(name, "Width"))
- sscanf(string, "%*s%*s%f%f", ppd->custom_min + 0,
- ppd->custom_max + 0);
- else if (!strcmp(name, "Height"))
- sscanf(string, "%*s%*s%f%f", ppd->custom_min + 1,
- ppd->custom_max + 1);
- }
-#endif /* 0 */
else if (!strncmp(keyword, "ParamCustom", 11))
{
ppd_coption_t *coption; /* Custom option */
else if (!strcmp(ctype, "passcode"))
{
cparam->type = PPD_CUSTOM_PASSCODE;
- cparam->minimum.custom_passcode = strdup(cminimum);
- cparam->maximum.custom_passcode = strdup(cmaximum);
+ cparam->minimum.custom_passcode = atoi(cminimum);
+ cparam->maximum.custom_passcode = atoi(cmaximum);
}
else if (!strcmp(ctype, "password"))
{
cparam->type = PPD_CUSTOM_PASSWORD;
- cparam->minimum.custom_password = strdup(cminimum);
- cparam->maximum.custom_password = strdup(cmaximum);
+ cparam->minimum.custom_password = atoi(cminimum);
+ cparam->maximum.custom_password = atoi(cmaximum);
}
else if (!strcmp(ctype, "points"))
{
else if (!strcmp(ctype, "string"))
{
cparam->type = PPD_CUSTOM_STRING;
- cparam->minimum.custom_string = strdup(cminimum);
- cparam->maximum.custom_string = strdup(cmaximum);
+ cparam->minimum.custom_string = atoi(cminimum);
+ cparam->maximum.custom_string = atoi(cmaximum);
}
else
{
/*
- * End of "$Id: ppd.c 5119 2006-02-16 15:52:06Z mike $".
+ * End of "$Id: ppd.c 5200 2006-02-28 00:10:32Z mike $".
*/