Lines Matching refs:constptr
180 _ppd_cups_uiconst_t *constptr; /* Current constraint */ in cupsResolveConflicts() local
371 for (i = consts->num_constraints, constptr = consts->constraints; in cupsResolveConflicts()
373 i --, constptr ++) in cupsResolveConflicts()
379 if (constptr->installable) in cupsResolveConflicts()
387 (!_cups_strcasecmp(constptr->option->keyword, option) || in cupsResolveConflicts()
389 !_cups_strcasecmp(constptr->option->keyword, "PageRegion")) || in cupsResolveConflicts()
391 !_cups_strcasecmp(constptr->option->keyword, "PageSize")))) in cupsResolveConflicts()
398 if ((value = cupsGetOption(constptr->option->keyword, num_newopts, in cupsResolveConflicts()
401 if (!_cups_strcasecmp(constptr->option->keyword, "PageSize") || in cupsResolveConflicts()
402 !_cups_strcasecmp(constptr->option->keyword, "PageRegion")) in cupsResolveConflicts()
418 marked = ppdFindMarkedChoice(ppd, constptr->option->keyword); in cupsResolveConflicts()
432 if (_cups_strcasecmp(value, constptr->option->defchoice) && in cupsResolveConflicts()
433 (test = ppd_test_constraints(ppd, constptr->option->keyword, in cupsResolveConflicts()
434 constptr->option->defchoice, in cupsResolveConflicts()
442 num_newopts = cupsAddOption(constptr->option->keyword, in cupsResolveConflicts()
443 constptr->option->defchoice, in cupsResolveConflicts()
453 for (j = constptr->option->num_choices, in cupsResolveConflicts()
454 cptr = constptr->option->choices; in cupsResolveConflicts()
462 _cups_strcasecmp(constptr->option->defchoice, cptr->choice) && in cupsResolveConflicts()
464 (test = ppd_test_constraints(ppd, constptr->option->keyword, in cupsResolveConflicts()
473 num_newopts = cupsAddOption(constptr->option->keyword, in cupsResolveConflicts()
705 _ppd_cups_uiconst_t *constptr; /* Current constraint */ in ppd_load_constraints() local
763 if ((constptr = calloc(2, sizeof(_ppd_cups_uiconst_t))) == NULL) in ppd_load_constraints()
776 consts->constraints = constptr; in ppd_load_constraints()
781 constptr[0].option = ppdFindOption(ppd, oldconst->option1 + 6); in ppd_load_constraints()
782 constptr[0].choice = ppdFindChoice(constptr[0].option, "Custom"); in ppd_load_constraints()
783 constptr[0].installable = 0; in ppd_load_constraints()
787 constptr[0].option = ppdFindOption(ppd, oldconst->option1); in ppd_load_constraints()
788 constptr[0].choice = ppdFindChoice(constptr[0].option, in ppd_load_constraints()
790 constptr[0].installable = ppd_is_installable(installable, in ppd_load_constraints()
794 if (!constptr[0].option || (!constptr[0].choice && oldconst->choice1[0])) in ppd_load_constraints()
806 constptr[1].option = ppdFindOption(ppd, oldconst->option2 + 6); in ppd_load_constraints()
807 constptr[1].choice = ppdFindChoice(constptr[1].option, "Custom"); in ppd_load_constraints()
808 constptr[1].installable = 0; in ppd_load_constraints()
812 constptr[1].option = ppdFindOption(ppd, oldconst->option2); in ppd_load_constraints()
813 constptr[1].choice = ppdFindChoice(constptr[1].option, in ppd_load_constraints()
815 constptr[1].installable = ppd_is_installable(installable, in ppd_load_constraints()
819 if (!constptr[1].option || (!constptr[1].choice && oldconst->choice2[0])) in ppd_load_constraints()
828 consts->installable = constptr[0].installable || constptr[1].installable; in ppd_load_constraints()
868 if ((constptr = calloc((size_t)i, sizeof(_ppd_cups_uiconst_t))) == NULL) in ppd_load_constraints()
877 consts->constraints = constptr; in ppd_load_constraints()
883 i ++, vptr = strchr(vptr, '*'), constptr ++) in ppd_load_constraints()
915 constptr->option = ppdFindOption(ppd, option); in ppd_load_constraints()
916 constptr->choice = ppdFindChoice(constptr->option, choice); in ppd_load_constraints()
917 constptr->installable = ppd_is_installable(installable, option); in ppd_load_constraints()
918 consts->installable |= constptr->installable; in ppd_load_constraints()
920 if (!constptr->option || (!constptr->choice && choice[0])) in ppd_load_constraints()
954 _ppd_cups_uiconst_t *constptr; /* Current constraint */ in ppd_test_constraints() local
1002 for (i = consts->num_constraints, constptr = consts->constraints; in ppd_test_constraints()
1004 i --, constptr ++) in ppd_test_constraints()
1006 if (!_cups_strcasecmp(constptr->option->keyword, option)) in ppd_test_constraints()
1010 !_cups_strcasecmp(constptr->option->keyword, option + 13)) in ppd_test_constraints()
1020 for (i = consts->num_constraints, constptr = consts->constraints; in ppd_test_constraints()
1022 i --, constptr ++) in ppd_test_constraints()
1024 DEBUG_printf(("9ppd_test_constraints: %s=%s?", constptr->option->keyword, in ppd_test_constraints()
1025 constptr->choice ? constptr->choice->choice : "")); in ppd_test_constraints()
1027 if (constptr->choice && in ppd_test_constraints()
1028 (!_cups_strcasecmp(constptr->option->keyword, "PageSize") || in ppd_test_constraints()
1029 !_cups_strcasecmp(constptr->option->keyword, "PageRegion"))) in ppd_test_constraints()
1072 if ((!value || _cups_strcasecmp(value, constptr->choice->choice)) && in ppd_test_constraints()
1073 (!firstvalue || _cups_strcasecmp(firstvalue, constptr->choice->choice))) in ppd_test_constraints()
1079 else if (constptr->choice) in ppd_test_constraints()
1085 if (option && choice && !_cups_strcasecmp(option, constptr->option->keyword)) in ppd_test_constraints()
1092 else if ((value = cupsGetOption(constptr->option->keyword, num_options, in ppd_test_constraints()
1098 else if (constptr->choice->marked) in ppd_test_constraints()
1099 value = constptr->choice->choice; in ppd_test_constraints()
1108 constptr->option->keyword); in ppd_test_constraints()
1129 if ((!value || _cups_strcasecmp(value, constptr->choice->choice)) && in ppd_test_constraints()
1130 (!firstvalue || _cups_strcasecmp(firstvalue, constptr->choice->choice))) in ppd_test_constraints()
1137 !_cups_strcasecmp(option, constptr->option->keyword)) in ppd_test_constraints()
1146 else if ((value = cupsGetOption(constptr->option->keyword, num_options, in ppd_test_constraints()
1158 key.option = constptr->option; in ppd_test_constraints()