duplocale Subroutine

Purpose

Duplicates a locale object.

Library

Standard C Library (libc.a)

Syntax

#include <locale.h>
locale_t duplocale(locobj);
locale_t locobj;

Description

The duplocale subroutine creates a duplicate copy of the locale object referenced by the locobj argument.

Return Values

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.

Error Codes

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.