1b096817theraven/*-
2d3308bcpfg * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3d3308bcpfg *
4b096817theraven * Copyright (c) 2011, 2012 The FreeBSD Foundation
5b096817theraven * All rights reserved.
6b096817theraven *
7b096817theraven * This software was developed by David Chisnall under sponsorship from
8b096817theraven * the FreeBSD Foundation.
9b096817theraven *
10b096817theraven * Redistribution and use in source and binary forms, with or without
11b096817theraven * modification, are permitted provided that the following conditions
12b096817theraven * are met:
13b096817theraven * 1. Redistributions of source code must retain the above copyright
14b096817theraven *    notice, this list of conditions and the following disclaimer.
15b096817theraven * 2. Redistributions in binary form must reproduce the above copyright
16b096817theraven *    notice, this list of conditions and the following disclaimer in the
17b096817theraven *    documentation and/or other materials provided with the distribution.
18b096817theraven *
19b096817theraven * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
20b096817theraven * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21b096817theraven * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22b096817theraven * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
23b096817theraven * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24b096817theraven * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25b096817theraven * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26b096817theraven * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27b096817theraven * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28b096817theraven * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29b096817theraven * SUCH DAMAGE.
30b096817theraven *
31b096817theraven * $FreeBSD$
32b096817theraven */
33b096817theraven
34b096817theraven#ifndef _LOCALE_T_DEFINED
35b096817theraven#define _LOCALE_T_DEFINED
36b096817theraventypedef struct	_xlocale *locale_t;
37b096817theraven#endif
38b096817theraven
39b096817theraven#ifndef _XLOCALE_WCHAR1_H
40b096817theraven#define _XLOCALE_WCHAR1_H
41b096817theravenint			 wcscasecmp_l(const wchar_t *, const wchar_t *,
42b096817theraven			   locale_t);
43b096817theravenint			 wcsncasecmp_l(const wchar_t *, const wchar_t *, size_t,
44b096817theraven			   locale_t);
45b096817theravenint			 wcscoll_l(const wchar_t *, const wchar_t *, locale_t);
46b096817theravensize_t			 wcsxfrm_l(wchar_t * __restrict,
47b096817theraven			   const wchar_t * __restrict, size_t, locale_t);
48b096817theraven
49b096817theraven#endif /* _XLOCALE_WCHAR1_H */
50b096817theraven
51b096817theraven/*
52b096817theraven * Only declare the non-POSIX functions if we're included from xlocale.h.
53b096817theraven */
54b096817theraven
55b096817theraven#ifdef _XLOCALE_H_
56b096817theraven#ifndef _XLOCALE_WCHAR2_H
57b096817theraven#define _XLOCALE_WCHAR2_H
58b096817theraven
59b096817theravenwint_t			 btowc_l(int, locale_t);
60b096817theravenwint_t			 fgetwc_l(FILE *, locale_t);
61b096817theravenwchar_t			*fgetws_l(wchar_t * __restrict, int, FILE * __restrict,
62b096817theraven			    locale_t);
63b096817theravenwint_t			 fputwc_l(wchar_t, FILE *, locale_t);
64b096817theravenint			 fputws_l(const wchar_t * __restrict, FILE * __restrict,
65b096817theraven			   locale_t);
66b096817theravenint			 fwprintf_l(FILE * __restrict, locale_t,
67b096817theraven			    const wchar_t * __restrict, ...);
68b096817theravenint			 fwscanf_l(FILE * __restrict, locale_t,
69b096817theraven			    const wchar_t * __restrict, ...);
70b096817theravenwint_t			 getwc_l(FILE *, locale_t);
71b096817theravenwint_t			 getwchar_l(locale_t);
72b096817theravensize_t			 mbrlen_l(const char * __restrict, size_t,
73b096817theraven			   mbstate_t * __restrict, locale_t);
74b096817theravensize_t			 mbrtowc_l(wchar_t * __restrict,
75b096817theraven			    const char * __restrict, size_t,
76b096817theraven			    mbstate_t * __restrict, locale_t);
77b096817theravenint			 mbsinit_l(const mbstate_t *, locale_t);
78b096817theravensize_t			 mbsrtowcs_l(wchar_t * __restrict,
79b096817theraven			    const char ** __restrict, size_t,
80b096817theraven			    mbstate_t * __restrict, locale_t);
81b096817theravenwint_t			 putwc_l(wchar_t, FILE *, locale_t);
82b096817theravenwint_t			 putwchar_l(wchar_t, locale_t);
83b096817theravenint			 swprintf_l(wchar_t * __restrict, size_t n, locale_t,
84b096817theraven			    const wchar_t * __restrict, ...);
85b096817theravenint			 swscanf_l(const wchar_t * __restrict, locale_t,
86b096817theraven			   const wchar_t * __restrict, ...);
87b096817theravenwint_t			 ungetwc_l(wint_t, FILE *, locale_t);
88b096817theravenint			 vfwprintf_l(FILE * __restrict, locale_t,
89b096817theraven			    const wchar_t * __restrict, __va_list);
90b096817theravenint			 vswprintf_l(wchar_t * __restrict, size_t n, locale_t,
91b096817theraven			    const wchar_t * __restrict, __va_list);
92b096817theravenint			 vwprintf_l(locale_t, const wchar_t * __restrict,
93b096817theraven			    __va_list);
94b096817theravensize_t			 wcrtomb_l(char * __restrict, wchar_t,
95b096817theraven			    mbstate_t * __restrict, locale_t);
96b096817theravensize_t			 wcsftime_l(wchar_t * __restrict, size_t,
97b096817theraven			    const wchar_t * __restrict,
98b096817theraven			    const struct tm * __restrict, locale_t);
99b096817theravensize_t			 wcsrtombs_l(char * __restrict,
100b096817theraven			    const wchar_t ** __restrict, size_t,
101b096817theraven			    mbstate_t * __restrict, locale_t);
102b096817theravendouble			 wcstod_l(const wchar_t * __restrict,
103b096817theraven			    wchar_t ** __restrict, locale_t);
104b096817theravenlong			 wcstol_l(const wchar_t * __restrict,
105b096817theraven			    wchar_t ** __restrict, int, locale_t);
106b096817theravenunsigned long		 wcstoul_l(const wchar_t * __restrict,
107b096817theraven			    wchar_t ** __restrict, int, locale_t);
108b096817theravenint			 wcswidth_l(const wchar_t *, size_t, locale_t);
109b096817theravenint			 wctob_l(wint_t, locale_t);
110b096817theravenint			 wcwidth_l(wchar_t, locale_t);
111b096817theravenint			 wprintf_l(locale_t, const wchar_t * __restrict, ...);
112b096817theravenint			 wscanf_l(locale_t, const wchar_t * __restrict, ...);
113b096817theravenint			 vfwscanf_l(FILE * __restrict, locale_t,
114b096817theraven			    const wchar_t * __restrict, __va_list);
115b096817theravenint			 vswscanf_l(const wchar_t * __restrict, locale_t,
116b096817theraven			    const wchar_t *__restrict, __va_list);
117b096817theravenint			 vwscanf_l(locale_t, const wchar_t * __restrict,
118b096817theraven			    __va_list);
119b096817theravenfloat			 wcstof_l(const wchar_t * __restrict,
120b096817theraven			    wchar_t ** __restrict, locale_t);
121b096817theravenlong double		 wcstold_l(const wchar_t * __restrict,
122b096817theraven			    wchar_t ** __restrict, locale_t);
123b096817theravenlong long		 wcstoll_l(const wchar_t * __restrict,
124b096817theraven			    wchar_t ** __restrict, int, locale_t);
125b096817theravenunsigned long long	 wcstoull_l(const wchar_t * __restrict,
126b096817theraven			    wchar_t ** __restrict, int, locale_t);
127b096817theravensize_t			 mbsnrtowcs_l(wchar_t * __restrict,
128b096817theraven			    const char ** __restrict, size_t, size_t,
129b096817theraven			    mbstate_t * __restrict, locale_t);
130b096817theravensize_t			 wcsnrtombs_l(char * __restrict,
131b096817theraven			    const wchar_t ** __restrict, size_t, size_t,
132b096817theraven			    mbstate_t * __restrict, locale_t);
133b096817theraven
134b096817theraven#endif /* _XLOCALE_WCHAR_H */
135b096817theraven#endif /* _XLOCALE_H_ */
136