xref: /netbsd-src/lib/libc/locale/duplocale.3 (revision 379dd3c302a1e55beec2449af82b31d75879a5f3)
1*379dd3c3Srillig.\" $NetBSD: duplocale.3,v 1.4 2024/08/21 18:42:34 rillig Exp $
2*379dd3c3Srillig.\"
3da3ff697Schristos.\" Copyright (c) 2011 The FreeBSD Foundation
4da3ff697Schristos.\" All rights reserved.
5da3ff697Schristos.\"
6da3ff697Schristos.\" This documentation was written by David Chisnall under sponsorship from
7da3ff697Schristos.\" the FreeBSD Foundation.
8da3ff697Schristos.\"
9da3ff697Schristos.\" Redistribution and use in source and binary forms, with or without
10da3ff697Schristos.\" modification, are permitted provided that the following conditions
11da3ff697Schristos.\" are met:
12da3ff697Schristos.\" 1. Redistributions of source code must retain the above copyright
13da3ff697Schristos.\"    notice, this list of conditions and the following disclaimer.
14da3ff697Schristos.\" 2. Redistributions in binary form must reproduce the above copyright
15da3ff697Schristos.\"    notice, this list of conditions and the following disclaimer in the
16da3ff697Schristos.\"    documentation and/or other materials provided with the distribution.
17da3ff697Schristos.\"
18da3ff697Schristos.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19da3ff697Schristos.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20da3ff697Schristos.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21da3ff697Schristos.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22da3ff697Schristos.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23da3ff697Schristos.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24da3ff697Schristos.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25da3ff697Schristos.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26da3ff697Schristos.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27da3ff697Schristos.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28da3ff697Schristos.\" SUCH DAMAGE.
29da3ff697Schristos.\"
30da3ff697Schristos.\" $FreeBSD: head/lib/libc/locale/duplocale.3 281925 2015-04-24 10:17:55Z theraven $
31da3ff697Schristos.\"
3253b5b1c0Schristos.Dd February 15, 2021
33da3ff697Schristos.Dt DUPLOCALE 3
34da3ff697Schristos.Os
35da3ff697Schristos.Sh NAME
36da3ff697Schristos.Nm duplocale
37*379dd3c3Srillig.Nd duplicate a locale
38da3ff697Schristos.Sh LIBRARY
39da3ff697Schristos.Lb libc
40da3ff697Schristos.Sh SYNOPSIS
41da3ff697Schristos.In locale.h
42da3ff697Schristos.Ft locale_t
43da3ff697Schristos.Fn duplocale "locale_t locale"
44da3ff697Schristos.Sh DESCRIPTION
45da3ff697SchristosDuplicates an existing
46da3ff697Schristos.Fa locale_t
47da3ff697Schristosreturning a new
48da3ff697Schristos.Fa locale_t
49da3ff697Schristosthat refers to the same locale values but has an independent internal state.
50da3ff697SchristosThe locale returned by this call must be freed with
51da3ff697Schristos.Xr freelocale 3 .
52da3ff697Schristos.Sh SEE ALSO
53da3ff697Schristos.Xr freelocale 3 ,
54da3ff697Schristos.Xr localeconv 3 ,
55026eaf4dSwiz.Xr newlocale 3
56da3ff697Schristos.\" .Xr querylocale 3 ,
5753b5b1c0Schristos.\" .Xr uselocale 3 ,
58da3ff697Schristos.\" .Xr xlocale 3
59da3ff697Schristos.Sh STANDARDS
60da3ff697SchristosThis function conforms to
61da3ff697Schristos.St -p1003.1-2008 .
62