Lines Matching refs:constptr

185   _ppd_cups_uiconst_t	*constptr;	/* Current constraint */  in cupsResolveConflicts()  local
376 for (i = consts->num_constraints, constptr = consts->constraints; in cupsResolveConflicts()
378 i --, constptr ++) in cupsResolveConflicts()
384 if (constptr->installable) in cupsResolveConflicts()
392 (!_cups_strcasecmp(constptr->option->keyword, option) || in cupsResolveConflicts()
394 !_cups_strcasecmp(constptr->option->keyword, "PageRegion")) || in cupsResolveConflicts()
396 !_cups_strcasecmp(constptr->option->keyword, "PageSize")))) in cupsResolveConflicts()
403 if ((value = cupsGetOption(constptr->option->keyword, num_newopts, in cupsResolveConflicts()
406 if (!_cups_strcasecmp(constptr->option->keyword, "PageSize") || in cupsResolveConflicts()
407 !_cups_strcasecmp(constptr->option->keyword, "PageRegion")) in cupsResolveConflicts()
423 marked = ppdFindMarkedChoice(ppd, constptr->option->keyword); in cupsResolveConflicts()
437 if (_cups_strcasecmp(value, constptr->option->defchoice) && in cupsResolveConflicts()
438 (test = ppd_test_constraints(ppd, constptr->option->keyword, in cupsResolveConflicts()
439 constptr->option->defchoice, in cupsResolveConflicts()
447 num_newopts = cupsAddOption(constptr->option->keyword, in cupsResolveConflicts()
448 constptr->option->defchoice, in cupsResolveConflicts()
458 for (j = constptr->option->num_choices, in cupsResolveConflicts()
459 cptr = constptr->option->choices; in cupsResolveConflicts()
467 _cups_strcasecmp(constptr->option->defchoice, cptr->choice) && in cupsResolveConflicts()
469 (test = ppd_test_constraints(ppd, constptr->option->keyword, in cupsResolveConflicts()
478 num_newopts = cupsAddOption(constptr->option->keyword, in cupsResolveConflicts()
710 _ppd_cups_uiconst_t *constptr; /* Current constraint */ in ppd_load_constraints() local
768 if ((constptr = calloc(2, sizeof(_ppd_cups_uiconst_t))) == NULL) in ppd_load_constraints()
781 consts->constraints = constptr; in ppd_load_constraints()
786 constptr[0].option = ppdFindOption(ppd, oldconst->option1 + 6); in ppd_load_constraints()
787 constptr[0].choice = ppdFindChoice(constptr[0].option, "Custom"); in ppd_load_constraints()
788 constptr[0].installable = 0; in ppd_load_constraints()
792 constptr[0].option = ppdFindOption(ppd, oldconst->option1); in ppd_load_constraints()
793 constptr[0].choice = ppdFindChoice(constptr[0].option, in ppd_load_constraints()
795 constptr[0].installable = ppd_is_installable(installable, in ppd_load_constraints()
799 if (!constptr[0].option || (!constptr[0].choice && oldconst->choice1[0])) in ppd_load_constraints()
811 constptr[1].option = ppdFindOption(ppd, oldconst->option2 + 6); in ppd_load_constraints()
812 constptr[1].choice = ppdFindChoice(constptr[1].option, "Custom"); in ppd_load_constraints()
813 constptr[1].installable = 0; in ppd_load_constraints()
817 constptr[1].option = ppdFindOption(ppd, oldconst->option2); in ppd_load_constraints()
818 constptr[1].choice = ppdFindChoice(constptr[1].option, in ppd_load_constraints()
820 constptr[1].installable = ppd_is_installable(installable, in ppd_load_constraints()
824 if (!constptr[1].option || (!constptr[1].choice && oldconst->choice2[0])) in ppd_load_constraints()
833 consts->installable = constptr[0].installable || constptr[1].installable; in ppd_load_constraints()
873 if ((constptr = calloc((size_t)i, sizeof(_ppd_cups_uiconst_t))) == NULL) in ppd_load_constraints()
882 consts->constraints = constptr; in ppd_load_constraints()
888 i ++, vptr = strchr(vptr, '*'), constptr ++) in ppd_load_constraints()
920 constptr->option = ppdFindOption(ppd, option); in ppd_load_constraints()
921 constptr->choice = ppdFindChoice(constptr->option, choice); in ppd_load_constraints()
922 constptr->installable = ppd_is_installable(installable, option); in ppd_load_constraints()
923 consts->installable |= constptr->installable; in ppd_load_constraints()
925 if (!constptr->option || (!constptr->choice && choice[0])) in ppd_load_constraints()
959 _ppd_cups_uiconst_t *constptr; /* Current constraint */ in ppd_test_constraints() local
1007 for (i = consts->num_constraints, constptr = consts->constraints; in ppd_test_constraints()
1009 i --, constptr ++) in ppd_test_constraints()
1011 if (!_cups_strcasecmp(constptr->option->keyword, option)) in ppd_test_constraints()
1015 !_cups_strcasecmp(constptr->option->keyword, option + 13)) in ppd_test_constraints()
1025 for (i = consts->num_constraints, constptr = consts->constraints; in ppd_test_constraints()
1027 i --, constptr ++) in ppd_test_constraints()
1029 DEBUG_printf(("9ppd_test_constraints: %s=%s?", constptr->option->keyword, in ppd_test_constraints()
1030 constptr->choice ? constptr->choice->choice : "")); in ppd_test_constraints()
1032 if (constptr->choice && in ppd_test_constraints()
1033 (!_cups_strcasecmp(constptr->option->keyword, "PageSize") || in ppd_test_constraints()
1034 !_cups_strcasecmp(constptr->option->keyword, "PageRegion"))) in ppd_test_constraints()
1077 if ((!value || _cups_strcasecmp(value, constptr->choice->choice)) && in ppd_test_constraints()
1078 (!firstvalue || _cups_strcasecmp(firstvalue, constptr->choice->choice))) in ppd_test_constraints()
1084 else if (constptr->choice) in ppd_test_constraints()
1090 if (option && choice && !_cups_strcasecmp(option, constptr->option->keyword)) in ppd_test_constraints()
1097 else if ((value = cupsGetOption(constptr->option->keyword, num_options, in ppd_test_constraints()
1103 else if (constptr->choice->marked) in ppd_test_constraints()
1104 value = constptr->choice->choice; in ppd_test_constraints()
1113 constptr->option->keyword); in ppd_test_constraints()
1134 if ((!value || _cups_strcasecmp(value, constptr->choice->choice)) && in ppd_test_constraints()
1135 (!firstvalue || _cups_strcasecmp(firstvalue, constptr->choice->choice))) in ppd_test_constraints()
1142 !_cups_strcasecmp(option, constptr->option->keyword)) in ppd_test_constraints()
1151 else if ((value = cupsGetOption(constptr->option->keyword, num_options, in ppd_test_constraints()
1163 key.option = constptr->option; in ppd_test_constraints()