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

Function ppdLocalizeMarkerName

cups/ppd-localize.c:436–467  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

434 */
435
436const char * /* O - Value or @code NULL@ if not found */
437ppdLocalizeMarkerName(
438 ppd_file_t *ppd, /* I - PPD file */
439 const char *name) /* I - Marker name to look up */
440{
441 ppd_attr_t *locattr; /* Localized attribute */
442 char ll_CC[6]; /* Language + country locale */
443
444
445 /*
446 * Range check input...
447 */
448
449 if (!ppd || !name)
450 return (NULL);
451
452 /*
453 * Get the default language...
454 */
455
456 ppd_ll_CC(ll_CC, sizeof(ll_CC));
457
458 /*
459 * Find the localized attribute...
460 */
461
462 if ((locattr = _ppdLocalizedAttr(ppd, "cupsMarkerName", name,
463 ll_CC)) == NULL)
464 locattr = ppdFindAttr(ppd, "cupsMarkerName", name);
465
466 return (locattr ? locattr->text : NULL);
467}
468
469
470/*

Callers 1

mainFunction · 0.85

Calls 3

ppd_ll_CCFunction · 0.85
_ppdLocalizedAttrFunction · 0.85
ppdFindAttrFunction · 0.85

Tested by 1

mainFunction · 0.68