Duplicates a locale object.
Standard C Library (libc.a)
#include <locale.h>
locale_t duplocale(locobj);
locale_t locobj;
The duplocale subroutine creates a duplicate copy of the locale object referenced by the locobj argument.
If successful, the duplocale subroutine returns a handle for a new locale object. Otherwise, the duplocale subroutine returns ( locale_t) 0 and sets the errno global variable to indicate the error.
The duplocale subroutine fails if the following is true:
Item | Description |
---|---|
ENOMEM | There is not enough memory available to create the locale object or load the locale data. |
The duplocale subroutine might fail if the following is true:
Item | Description |
---|---|
EINVAL | The locobj argument is not a handle for a locale object. |