Lines Matching refs:ppd
27 static void ppd_debug_marked(ppd_file_t *ppd, const char *title);
29 # define ppd_debug_marked(ppd,title) argument
31 static void ppd_defaults(ppd_file_t *ppd, ppd_group_t *g);
32 static void ppd_mark_choices(ppd_file_t *ppd, const char *s);
33 static void ppd_mark_option(ppd_file_t *ppd, const char *option,
48 ppd_file_t *ppd, /* I - PPD file */ in cupsMarkOptions() argument
72 if (!ppd || num_options <= 0 || !options) in cupsMarkOptions()
75 ppd_debug_marked(ppd, "Before..."); in cupsMarkOptions()
93 !ppd->cache) in cupsMarkOptions()
99 ppd->cache = _ppdCacheCreateWithPPD(ppd); in cupsMarkOptions()
102 cache = ppd->cache; in cupsMarkOptions()
135 if (!_cups_strncasecmp(s, "Custom.", 7) || ppdPageSize(ppd, s)) in cupsMarkOptions()
136 ppd_mark_option(ppd, "PageSize", s); in cupsMarkOptions()
138 ppd_mark_option(ppd, "PageSize", ppd_keyword); in cupsMarkOptions()
144 ppd_mark_option(ppd, cache->source_option, ppd_keyword); in cupsMarkOptions()
148 ppd_mark_option(ppd, "MediaType", ppd_keyword); in cupsMarkOptions()
214 ppd_mark_option(ppd, preset->name, preset->value); in cupsMarkOptions()
226 ppd_mark_option(ppd, "OutputBin", ppd_keyword); in cupsMarkOptions()
237 ppd_mark_option(ppd, cache->sides_option, cache->sides_1sided); in cupsMarkOptions()
240 ppd_mark_option(ppd, cache->sides_option, cache->sides_2sided_long); in cupsMarkOptions()
243 ppd_mark_option(ppd, cache->sides_option, cache->sides_2sided_short); in cupsMarkOptions()
262 ppd_mark_option(ppd, "Resolution", optptr->value); in cupsMarkOptions()
263 ppd_mark_option(ppd, "SetResolution", optptr->value); in cupsMarkOptions()
265 ppd_mark_option(ppd, "JCLResolution", optptr->value); in cupsMarkOptions()
267 ppd_mark_option(ppd, "CNRes_PGP", optptr->value); in cupsMarkOptions()
273 ppdFindOption(ppd, "Collate")) in cupsMarkOptions()
276 ppd_mark_option(ppd, "Collate", "True"); in cupsMarkOptions()
278 ppd_mark_option(ppd, "Collate", "False"); in cupsMarkOptions()
312 if ((attr = ppdFindAttr(ppd, "cupsIPPFinishings", s)) == NULL) in cupsMarkOptions()
319 ppd_mark_choices(ppd, attr->value); in cupsMarkOptions()
328 if ((attr = ppdFindAttr(ppd, "APPrinterPreset", optptr->value)) != NULL) in cupsMarkOptions()
334 ppd_mark_choices(ppd, attr->value); in cupsMarkOptions()
338 ppd_mark_option(ppd, "MirrorPrint", optptr->value); in cupsMarkOptions()
340 ppd_mark_option(ppd, optptr->name, optptr->value); in cupsMarkOptions()
348 ppd_mark_option(ppd, "cupsPrintQuality", "Draft"); in cupsMarkOptions()
350 ppd_mark_option(ppd, "cupsPrintQuality", "High"); in cupsMarkOptions()
352 ppd_mark_option(ppd, "cupsPrintQuality", "Normal"); in cupsMarkOptions()
355 ppd_debug_marked(ppd, "After..."); in cupsMarkOptions()
357 return (ppdConflicts(ppd) > 0); in cupsMarkOptions()
392 ppdFindMarkedChoice(ppd_file_t *ppd, /* I - PPD file */ in ppdFindMarkedChoice() argument
399 DEBUG_printf(("2ppdFindMarkedChoice(ppd=%p, option=\"%s\")", ppd, option)); in ppdFindMarkedChoice()
401 if ((key.option = ppdFindOption(ppd, option)) == NULL) in ppdFindMarkedChoice()
407 marked = (ppd_choice_t *)cupsArrayFind(ppd->marked, &key); in ppdFindMarkedChoice()
421 ppdFindOption(ppd_file_t *ppd, /* I - PPD file data */ in ppdFindOption() argument
428 if (!ppd || !option) in ppdFindOption()
431 if (ppd->options) in ppdFindOption()
442 return ((ppd_option_t *)cupsArrayFind(ppd->options, &key)); in ppdFindOption()
455 for (i = ppd->num_groups, group = ppd->groups; i > 0; i --, group ++) in ppdFindOption()
472 ppdIsMarked(ppd_file_t *ppd, /* I - PPD file data */ in ppdIsMarked() argument
480 if (!ppd) in ppdIsMarked()
483 if ((key.option = ppdFindOption(ppd, option)) == NULL) in ppdIsMarked()
486 if ((c = (ppd_choice_t *)cupsArrayFind(ppd->marked, &key)) == NULL) in ppdIsMarked()
498 ppdMarkDefaults(ppd_file_t *ppd) /* I - PPD file record */ in ppdMarkDefaults() argument
505 if (!ppd) in ppdMarkDefaults()
512 for (c = (ppd_choice_t *)cupsArrayFirst(ppd->marked); in ppdMarkDefaults()
514 c = (ppd_choice_t *)cupsArrayNext(ppd->marked)) in ppdMarkDefaults()
516 cupsArrayRemove(ppd->marked, c); in ppdMarkDefaults()
524 for (i = ppd->num_groups, g = ppd->groups; i > 0; i --, g ++) in ppdMarkDefaults()
525 ppd_defaults(ppd, g); in ppdMarkDefaults()
531 ppdConflicts(ppd); in ppdMarkDefaults()
541 ppdMarkOption(ppd_file_t *ppd, /* I - PPD file record */ in ppdMarkOption() argument
546 ppd, option, choice)); in ppdMarkOption()
552 if (!ppd || !option || !choice) in ppdMarkOption()
559 ppd_mark_option(ppd, option, choice); in ppdMarkOption()
565 return (ppdConflicts(ppd)); in ppdMarkOption()
578 ppdFirstOption(ppd_file_t *ppd) /* I - PPD file */ in ppdFirstOption() argument
580 if (!ppd) in ppdFirstOption()
583 return ((ppd_option_t *)cupsArrayFirst(ppd->options)); in ppdFirstOption()
596 ppdNextOption(ppd_file_t *ppd) /* I - PPD file */ in ppdNextOption() argument
598 if (!ppd) in ppdNextOption()
601 return ((ppd_option_t *)cupsArrayNext(ppd->options)); in ppdNextOption()
697 ppd_debug_marked(ppd_file_t *ppd, /* I - PPD file data */ in ppd_debug_marked() argument
705 for (c = (ppd_choice_t *)cupsArrayFirst(ppd->marked); in ppd_debug_marked()
707 c = (ppd_choice_t *)cupsArrayNext(ppd->marked)) in ppd_debug_marked()
718 ppd_defaults(ppd_file_t *ppd, /* I - PPD file */ in ppd_defaults() argument
728 ppd_mark_option(ppd, o->keyword, o->defchoice); in ppd_defaults()
731 ppd_defaults(ppd, sg); in ppd_defaults()
740 ppd_mark_choices(ppd_file_t *ppd, /* I - PPD file */ in ppd_mark_choices() argument
756 ppd_mark_option(ppd, option->name, option->value); in ppd_mark_choices()
767 ppd_mark_option(ppd_file_t *ppd, /* I - PPD file */ in ppd_mark_option() argument
780 ppd, option, choice)); in ppd_mark_option()
789 cupsArraySave(ppd->options); in ppd_mark_option()
791 if ((o = ppdFindOption(ppd, "InputSlot")) != NULL) in ppd_mark_option()
794 if ((oldc = (ppd_choice_t *)cupsArrayFind(ppd->marked, &key)) != NULL) in ppd_mark_option()
797 cupsArrayRemove(ppd->marked, oldc); in ppd_mark_option()
801 cupsArrayRestore(ppd->options); in ppd_mark_option()
808 cupsArraySave(ppd->options); in ppd_mark_option()
810 o = ppdFindOption(ppd, option); in ppd_mark_option()
812 cupsArrayRestore(ppd->options); in ppd_mark_option()
834 ppdPageSize(ppd, choice); in ppd_mark_option()
847 if ((coption = ppdFindCustomOption(ppd, option)) != NULL) in ppd_mark_option()
923 if ((coption = ppdFindCustomOption(ppd, option)) != NULL) in ppd_mark_option()
1002 if ((oldc = (ppd_choice_t *)cupsArrayFind(ppd->marked, c)) != NULL) in ppd_mark_option()
1005 cupsArrayRemove(ppd->marked, oldc); in ppd_mark_option()
1014 for (j = 0; j < ppd->num_sizes; j ++) in ppd_mark_option()
1015 ppd->sizes[j].marked = !_cups_strcasecmp(ppd->sizes[j].name, in ppd_mark_option()
1023 cupsArraySave(ppd->options); in ppd_mark_option()
1027 if ((o = ppdFindOption(ppd, "PageRegion")) != NULL) in ppd_mark_option()
1030 if ((oldc = (ppd_choice_t *)cupsArrayFind(ppd->marked, &key)) != NULL) in ppd_mark_option()
1033 cupsArrayRemove(ppd->marked, oldc); in ppd_mark_option()
1039 if ((o = ppdFindOption(ppd, "PageSize")) != NULL) in ppd_mark_option()
1042 if ((oldc = (ppd_choice_t *)cupsArrayFind(ppd->marked, &key)) != NULL) in ppd_mark_option()
1045 cupsArrayRemove(ppd->marked, oldc); in ppd_mark_option()
1050 cupsArrayRestore(ppd->options); in ppd_mark_option()
1058 cupsArraySave(ppd->options); in ppd_mark_option()
1060 if ((o = ppdFindOption(ppd, "ManualFeed")) != NULL) in ppd_mark_option()
1063 if ((oldc = (ppd_choice_t *)cupsArrayFind(ppd->marked, &key)) != NULL) in ppd_mark_option()
1066 cupsArrayRemove(ppd->marked, oldc); in ppd_mark_option()
1070 cupsArrayRestore(ppd->options); in ppd_mark_option()
1079 cupsArraySave(ppd->options); in ppd_mark_option()
1081 if ((o = ppdFindOption(ppd, "InputSlot")) != NULL) in ppd_mark_option()
1084 if ((oldc = (ppd_choice_t *)cupsArrayFind(ppd->marked, &key)) != NULL) in ppd_mark_option()
1087 cupsArrayRemove(ppd->marked, oldc); in ppd_mark_option()
1091 cupsArrayRestore(ppd->options); in ppd_mark_option()
1097 cupsArrayAdd(ppd->marked, c); in ppd_mark_option()