MCPcopy Create free account
hub / github.com/OpenPrinting/cups / ppdIsMarked

Function ppdIsMarked

cups/ppd-mark.c:464–483  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

462 */
463
464int /* O - Non-zero if option is marked */
465ppdIsMarked(ppd_file_t *ppd, /* I - PPD file data */
466 const char *option, /* I - Option/Keyword name */
467 const char *choice) /* I - Choice name */
468{
469 ppd_choice_t key, /* Search key */
470 *c; /* Choice pointer */
471
472
473 if (!ppd)
474 return (0);
475
476 if ((key.option = ppdFindOption(ppd, option)) == NULL)
477 return (0);
478
479 if ((c = (ppd_choice_t *)cupsArrayFind(ppd->marked, &key)) == NULL)
480 return (0);
481
482 return (!strcmp(c->choice, choice));
483}
484
485
486/*

Callers 2

EndPageFunction · 0.85
SetCommonOptionsFunction · 0.85

Calls 2

ppdFindOptionFunction · 0.85
cupsArrayFindFunction · 0.85

Tested by

no test coverage detected