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

Function ipp_lang_code

cups/ipp.c:5660–5676  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5658 */
5659
5660static char * /* O - Language code string */
5661ipp_lang_code(const char *locale, /* I - Locale string */
5662 char *buffer, /* I - String buffer */
5663 size_t bufsize) /* I - Size of string buffer */
5664{
5665 /*
5666 * Map POSIX ("C") locale to generic English, otherwise convert the locale string as-is.
5667 */
5668
5669 if (!_cups_strcasecmp(locale, "c"))
5670 {
5671 strlcpy(buffer, "en", bufsize);
5672 return (buffer);
5673 }
5674 else
5675 return (ipp_get_code(locale, buffer, bufsize));
5676}
5677
5678
5679/*

Callers 3

ippAddStringFunction · 0.85
ippAddStringsFunction · 0.85
ippSetValueTagFunction · 0.85

Calls 2

_cups_strcasecmpFunction · 0.85
ipp_get_codeFunction · 0.85

Tested by

no test coverage detected