duplocale

Name

duplocale -- provide new handle for selection of locale

Synopsis

#include <locale.h>

locale_t duplocale(locale_t locale);

Description

The duplocale() function shall provide a new locale object based on the locale object provided in locale, suitable for use in the newlocale() or uselocale() functions. The new object may be released by calling freelocale().

Return Value

On success, the duplocale() function shall return a locale object. Otherwise, it shall return NULL, and set errno to indicate the error.

Errors

The duplocale() function shall fail if:

ENOMEM

Insufficient memory.

See Also

setlocale(), freelocale(), newlocale(), uselocale()