Lines Matching refs:constptr
184 _ppd_cups_uiconst_t *constptr; /* Current constraint */ in cupsResolveConflicts() local
375 for (i = consts->num_constraints, constptr = consts->constraints; in cupsResolveConflicts()
377 i --, constptr ++) in cupsResolveConflicts()
383 if (constptr->installable) in cupsResolveConflicts()
391 (!_cups_strcasecmp(constptr->option->keyword, option) || in cupsResolveConflicts()
393 !_cups_strcasecmp(constptr->option->keyword, "PageRegion")) || in cupsResolveConflicts()
395 !_cups_strcasecmp(constptr->option->keyword, "PageSize")))) in cupsResolveConflicts()
402 if ((value = cupsGetOption(constptr->option->keyword, num_newopts, in cupsResolveConflicts()
405 if (!_cups_strcasecmp(constptr->option->keyword, "PageSize") || in cupsResolveConflicts()
406 !_cups_strcasecmp(constptr->option->keyword, "PageRegion")) in cupsResolveConflicts()
422 marked = ppdFindMarkedChoice(ppd, constptr->option->keyword); in cupsResolveConflicts()
436 if (_cups_strcasecmp(value, constptr->option->defchoice) && in cupsResolveConflicts()
437 (test = ppd_test_constraints(ppd, constptr->option->keyword, in cupsResolveConflicts()
438 constptr->option->defchoice, in cupsResolveConflicts()
446 num_newopts = cupsAddOption(constptr->option->keyword, in cupsResolveConflicts()
447 constptr->option->defchoice, in cupsResolveConflicts()
457 for (j = constptr->option->num_choices, in cupsResolveConflicts()
458 cptr = constptr->option->choices; in cupsResolveConflicts()
466 _cups_strcasecmp(constptr->option->defchoice, cptr->choice) && in cupsResolveConflicts()
468 (test = ppd_test_constraints(ppd, constptr->option->keyword, in cupsResolveConflicts()
477 num_newopts = cupsAddOption(constptr->option->keyword, in cupsResolveConflicts()
709 _ppd_cups_uiconst_t *constptr; /* Current constraint */ in ppd_load_constraints() local
767 if ((constptr = calloc(2, sizeof(_ppd_cups_uiconst_t))) == NULL) in ppd_load_constraints()
780 consts->constraints = constptr; in ppd_load_constraints()
785 constptr[0].option = ppdFindOption(ppd, oldconst->option1 + 6); in ppd_load_constraints()
786 constptr[0].choice = ppdFindChoice(constptr[0].option, "Custom"); in ppd_load_constraints()
787 constptr[0].installable = 0; in ppd_load_constraints()
791 constptr[0].option = ppdFindOption(ppd, oldconst->option1); in ppd_load_constraints()
792 constptr[0].choice = ppdFindChoice(constptr[0].option, in ppd_load_constraints()
794 constptr[0].installable = ppd_is_installable(installable, in ppd_load_constraints()
798 if (!constptr[0].option || (!constptr[0].choice && oldconst->choice1[0])) in ppd_load_constraints()
810 constptr[1].option = ppdFindOption(ppd, oldconst->option2 + 6); in ppd_load_constraints()
811 constptr[1].choice = ppdFindChoice(constptr[1].option, "Custom"); in ppd_load_constraints()
812 constptr[1].installable = 0; in ppd_load_constraints()
816 constptr[1].option = ppdFindOption(ppd, oldconst->option2); in ppd_load_constraints()
817 constptr[1].choice = ppdFindChoice(constptr[1].option, in ppd_load_constraints()
819 constptr[1].installable = ppd_is_installable(installable, in ppd_load_constraints()
823 if (!constptr[1].option || (!constptr[1].choice && oldconst->choice2[0])) in ppd_load_constraints()
832 consts->installable = constptr[0].installable || constptr[1].installable; in ppd_load_constraints()
872 if ((constptr = calloc((size_t)i, sizeof(_ppd_cups_uiconst_t))) == NULL) in ppd_load_constraints()
881 consts->constraints = constptr; in ppd_load_constraints()
887 i ++, vptr = strchr(vptr, '*'), constptr ++) in ppd_load_constraints()
919 constptr->option = ppdFindOption(ppd, option); in ppd_load_constraints()
920 constptr->choice = ppdFindChoice(constptr->option, choice); in ppd_load_constraints()
921 constptr->installable = ppd_is_installable(installable, option); in ppd_load_constraints()
922 consts->installable |= constptr->installable; in ppd_load_constraints()
924 if (!constptr->option || (!constptr->choice && choice[0])) in ppd_load_constraints()
958 _ppd_cups_uiconst_t *constptr; /* Current constraint */ in ppd_test_constraints() local
1006 for (i = consts->num_constraints, constptr = consts->constraints; in ppd_test_constraints()
1008 i --, constptr ++) in ppd_test_constraints()
1010 if (!_cups_strcasecmp(constptr->option->keyword, option)) in ppd_test_constraints()
1014 !_cups_strcasecmp(constptr->option->keyword, option + 13)) in ppd_test_constraints()
1024 for (i = consts->num_constraints, constptr = consts->constraints; in ppd_test_constraints()
1026 i --, constptr ++) in ppd_test_constraints()
1028 DEBUG_printf(("9ppd_test_constraints: %s=%s?", constptr->option->keyword, in ppd_test_constraints()
1029 constptr->choice ? constptr->choice->choice : "")); in ppd_test_constraints()
1031 if (constptr->choice && in ppd_test_constraints()
1032 (!_cups_strcasecmp(constptr->option->keyword, "PageSize") || in ppd_test_constraints()
1033 !_cups_strcasecmp(constptr->option->keyword, "PageRegion"))) in ppd_test_constraints()
1076 if ((!value || _cups_strcasecmp(value, constptr->choice->choice)) && in ppd_test_constraints()
1077 (!firstvalue || _cups_strcasecmp(firstvalue, constptr->choice->choice))) in ppd_test_constraints()
1083 else if (constptr->choice) in ppd_test_constraints()
1089 if (option && choice && !_cups_strcasecmp(option, constptr->option->keyword)) in ppd_test_constraints()
1096 else if ((value = cupsGetOption(constptr->option->keyword, num_options, in ppd_test_constraints()
1102 else if (constptr->choice->marked) in ppd_test_constraints()
1103 value = constptr->choice->choice; in ppd_test_constraints()
1112 constptr->option->keyword); in ppd_test_constraints()
1133 if ((!value || _cups_strcasecmp(value, constptr->choice->choice)) && in ppd_test_constraints()
1134 (!firstvalue || _cups_strcasecmp(firstvalue, constptr->choice->choice))) in ppd_test_constraints()
1141 !_cups_strcasecmp(option, constptr->option->keyword)) in ppd_test_constraints()
1150 else if ((value = cupsGetOption(constptr->option->keyword, num_options, in ppd_test_constraints()
1162 key.option = constptr->option; in ppd_test_constraints()