/*
- * "$Id: ppd.c,v 1.94 2003/02/19 18:08:10 mike Exp $"
+ * "$Id: ppd.c,v 1.95 2003/02/19 22:02:39 mike Exp $"
*
* PPD file routines for the Common UNIX Printing System (CUPS).
*
if (option == NULL)
{
for (i = 0; i < (int)(sizeof(ui_keywords) / sizeof(ui_keywords[0])); i ++)
- if (!strcmp(name, ui_keywords[i]))
+ if (!strcmp(keyword, ui_keywords[i]))
break;
if (i < (int)(sizeof(ui_keywords) / sizeof(ui_keywords[0])))
ui_keyword = 1;
+ DEBUG_printf(("**** FOUND ADOBE UI KEYWORD %s WITHOUT OPENUI!\n",
+ keyword));
+
if (!group)
{
- if (strcmp(name, "Collate") && strcmp(name, "Duplex") &&
- strcmp(name, "InputSlot") && strcmp(name, "ManualFeed") &&
- strcmp(name, "MediaType") && strcmp(name, "MediaColor") &&
- strcmp(name, "MediaWeight") && strcmp(name, "OutputBin") &&
- strcmp(name, "OutputMode") && strcmp(name, "OutputOrder") &&
- strcmp(name, "PageSize") && strcmp(name, "PageRegion"))
+ if (strcmp(keyword, "Collate") && strcmp(keyword, "Duplex") &&
+ strcmp(keyword, "InputSlot") && strcmp(keyword, "ManualFeed") &&
+ strcmp(keyword, "MediaType") && strcmp(keyword, "MediaColor") &&
+ strcmp(keyword, "MediaWeight") && strcmp(keyword, "OutputBin") &&
+ strcmp(keyword, "OutputMode") && strcmp(keyword, "OutputOrder") &&
+ strcmp(keyword, "PageSize") && strcmp(keyword, "PageRegion"))
group = ppd_get_group(ppd, "Extra",
cupsLangString(language, CUPS_MSG_EXTRA));
else
}
DEBUG_printf(("Adding to group %s...\n", group->text));
- option = ppd_get_option(group, name);
+ option = ppd_get_option(group, keyword);
group = NULL;
}
else
- option = ppd_get_option(group, name);
+ option = ppd_get_option(group, keyword);
if (option == NULL)
{
* Now fill in the initial information for the option...
*/
- if (!strncmp(name, "JCL", 3))
+ if (!strncmp(keyword, "JCL", 3))
option->section = PPD_ORDER_JCL;
else
option->section = PPD_ORDER_ANY;
option->ui = PPD_UI_BOOLEAN;
else
option->ui = PPD_UI_PICKONE;
+
+ for (j = 0; j < ppd->num_attrs; j ++)
+ if (!strncmp(ppd->attrs[j]->name, "Default", 7) &&
+ !strcmp(ppd->attrs[j]->name + 7, keyword) &&
+ ppd->attrs[j]->value)
+ {
+ strlcpy(option->defchoice, ppd->attrs[j]->value,
+ sizeof(option->defchoice));
+ break;
+ }
}
}
return (NULL);
}
+ for (j = 0; j < ppd->num_attrs; j ++)
+ if (!strncmp(ppd->attrs[j]->name, "Default", 7) &&
+ !strcmp(ppd->attrs[j]->name + 7, name) &&
+ ppd->attrs[j]->value)
+ {
+ strlcpy(option->defchoice, ppd->attrs[j]->value,
+ sizeof(option->defchoice));
+ break;
+ }
+
if (text[0])
{
strlcpy(option->text, text, sizeof(option->text));
return (NULL);
}
+ for (j = 0; j < ppd->num_attrs; j ++)
+ if (!strncmp(ppd->attrs[j]->name, "Default", 7) &&
+ !strcmp(ppd->attrs[j]->name + 7, name) &&
+ ppd->attrs[j]->value)
+ {
+ strlcpy(option->defchoice, ppd->attrs[j]->value,
+ sizeof(option->defchoice));
+ break;
+ }
+
strlcpy(option->text, text, sizeof(option->text));
option->section = PPD_ORDER_JCL;
/*
- * End of "$Id: ppd.c,v 1.94 2003/02/19 18:08:10 mike Exp $".
+ * End of "$Id: ppd.c,v 1.95 2003/02/19 22:02:39 mike Exp $".
*/