summaryrefslogtreecommitdiff
path: root/cups/ppd.c
diff options
context:
space:
mode:
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2008-07-30 23:42:12 +0000
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2008-07-30 23:42:12 +0000
commit749b1e90a80fd8245f9cb84d2f78ab65034eeb81 (patch)
tree41c2eb9f8c465165197a146aadd4df3e37ca362f /cups/ppd.c
parent005dd1eb9e7844f4bf631111847c26c9a4b56df3 (diff)
downloadcups-749b1e90a80fd8245f9cb84d2f78ab65034eeb81.tar.gz
Merge changes from CUPS 1.4svn-r7817.
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@901 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'cups/ppd.c')
-rw-r--r--cups/ppd.c39
1 files changed, 21 insertions, 18 deletions
diff --git a/cups/ppd.c b/cups/ppd.c
index 75db5c5ac..e88dad15b 100644
--- a/cups/ppd.c
+++ b/cups/ppd.c
@@ -1050,14 +1050,15 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
* Add the "custom" option...
*/
- if ((choice = ppd_add_choice(custom_option, "Custom")) == NULL)
- {
- DEBUG_puts("Unable to add Custom choice!");
+ if ((choice = ppdFindChoice(custom_option, "Custom")) == NULL)
+ if ((choice = ppd_add_choice(custom_option, "Custom")) == NULL)
+ {
+ DEBUG_puts("Unable to add Custom choice!");
- cg->ppd_status = PPD_ALLOC_ERROR;
+ cg->ppd_status = PPD_ALLOC_ERROR;
- goto error;
- }
+ goto error;
+ }
strlcpy(choice->text, text[0] ? text : _("Custom"),
sizeof(choice->text));
@@ -1089,14 +1090,15 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
if (custom_option)
{
- if ((choice = ppd_add_choice(custom_option, "Custom")) == NULL)
- {
- DEBUG_puts("Unable to add Custom choice!");
+ if ((choice = ppdFindChoice(custom_option, "Custom")) == NULL)
+ if ((choice = ppd_add_choice(custom_option, "Custom")) == NULL)
+ {
+ DEBUG_puts("Unable to add Custom choice!");
- cg->ppd_status = PPD_ALLOC_ERROR;
+ cg->ppd_status = PPD_ALLOC_ERROR;
- goto error;
- }
+ goto error;
+ }
strlcpy(choice->text, text[0] ? text : _("Custom"),
sizeof(choice->text));
@@ -1301,14 +1303,15 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
if ((custom_attr = ppdFindAttr(ppd, custom_name, "True")) != NULL)
{
- if ((choice = ppd_add_choice(option, "Custom")) == NULL)
- {
- DEBUG_puts("Unable to add Custom choice!");
+ if ((choice = ppdFindChoice(option, "Custom")) == NULL)
+ if ((choice = ppd_add_choice(option, "Custom")) == NULL)
+ {
+ DEBUG_puts("Unable to add Custom choice!");
- cg->ppd_status = PPD_ALLOC_ERROR;
+ cg->ppd_status = PPD_ALLOC_ERROR;
- goto error;
- }
+ goto error;
+ }
strlcpy(choice->text,
custom_attr->text[0] ? custom_attr->text : _("Custom"),