Changeset View
Changeset View
Standalone View
Standalone View
lib/libc/locale/xlocale.c
Context not available. | |||||
if (new->components[type]) { | if (new->components[type]) { | ||||
strncpy(new->components[type]->locale, src->locale, | strncpy(new->components[type]->locale, src->locale, | ||||
ENCODING_LEN); | ENCODING_LEN); | ||||
strncpy(new->components[type]->version, src->version, | |||||
XLOCALE_VERSION_LEN); | |||||
} | } | ||||
} else if (base->components[type]) { | } else if (base->components[type]) { | ||||
new->components[type] = xlocale_retain(base->components[type]); | new->components[type] = xlocale_retain(base->components[type]); | ||||
Context not available. | |||||
return ("C"); | return ("C"); | ||||
} | } | ||||
/* | |||||
* Returns the version of the locale for a particular component of a locale_t. | |||||
*/ | |||||
const char *querylocaleversion(int mask, locale_t loc) | |||||
{ | |||||
int type = ffs(mask) - 1; | |||||
FIX_LOCALE(loc); | |||||
if (type >= XLC_LAST) | |||||
return (NULL); | |||||
if (loc->components[type]) | |||||
return (loc->components[type]->version); | |||||
return (""); | |||||
} | |||||
/* | /* | ||||
* Installs the specified locale_t as this thread's locale. | * Installs the specified locale_t as this thread's locale. | ||||
*/ | */ | ||||
Context not available. |