uselocale

Name

uselocale -- set locale for thread

Synopsis

#include <locale.h>

locale_t uselocale(locale_t newloc);

Description

The uselocale() function shall set the locale for the calling thread to the locale specified by newloc.

If newloc is the value LC_GLOBAL_LOCALE, the thread's locale shall be set to the process current global locale, as set by setlocale(). If newloc is NULL, the thread's locale is not altered.

Return Value

The uselocale() function shall return the previous locale, or LC_GLOBAL_LOCALE if the thread local locale has not been previously set.

Errors

None defined.

See Also

setlocale(), freelocale(), duplocale(), newlocale()