svcadm(8)을 검색하려면 섹션에서 8 을 선택하고, 맨 페이지 이름에 svcadm을 입력하고 검색을 누른다.
duplocale(3c)
duplocale(3C) Standard C Library Functions duplocale(3C)
NAME
duplocale - duplicate a locale object
SYNOPSIS
#include <locale.h>
locale_t duplocale(locale_t locobj);
DESCRIPTION
The duplocale() function creates a duplicate copy of the locale object
referenced by the locobj argument.
If the locobj argument is LC_GLOBAL_LOCALE, duplocale() creates a new
locale object containing a copy of the global locale determined by the
setlocale() function.
The behavior is undefined if the locobj argument is not a valid locale
object handle.
RETURN VALUES
Upon successful completion, the duplocale() function returns a handle
for a new locale object. Otherwise, duplocale() returns (locale_t)0 and
set errno to indicate the error.
ERRORS
The duplocale() function will fail if:
ENOMEM There is not enough memory available to create the locale ob‐
ject or load the locale data.
USAGE
The use of the duplocale() function is recommended for situations where
a locale object is being used in multiple places, and it is possible
that the lifetime of the locale object might end before all uses are
finished. Another reason to duplicate a locale object is if a slightly
modified form is needed. This can be achieved by a call to newlocale()
following the duplocale() call.
As with the newlocale() function, handles for locale objects created by
the duplocale() function should be released by a corresponding call to
freelocale().
The duplocale() function can also be used in conjunction with uselo‐
cale((locale_t)0). This returns the locale in effect for the calling
thread, but can have the value LC_GLOBAL_LOCALE. Passing LC_GLOBAL_LO‐
CALE to functions such as isalnum_l() results in undefined behavior,
but applications can convert it into a usable locale object by using
the duplocale() function.
ATTRIBUTES
See attributes(7) for descriptions of the following attributes:
tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
TRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelMT-Safe _ Stan‐
dardSee standards(7)
SEE ALSO
freelocale(3C), newlocale(3C), uselocale(3C), attributes(7), stan‐
dards(7)
Managing System Locales in Internationalizing and Localizing Applica‐
tions in Oracle Solaris
HISTORY
The duplocale() function was added to Oracle Solaris in the Solaris
11.4.0 release.
Oracle Solaris 11.4 25 Nov 2024 duplocale(3C)