1231673Stheraven/*-
2231673Stheraven * Copyright (c) 2011, 2012 The FreeBSD Foundation
3231673Stheraven * All rights reserved.
4231673Stheraven *
5231673Stheraven * This software was developed by David Chisnall under sponsorship from
6231673Stheraven * the FreeBSD Foundation.
7231673Stheraven *
8231673Stheraven * Redistribution and use in source and binary forms, with or without
9231673Stheraven * modification, are permitted provided that the following conditions
10231673Stheraven * are met:
11231673Stheraven * 1. Redistributions of source code must retain the above copyright
12231673Stheraven *    notice, this list of conditions and the following disclaimer.
13231673Stheraven * 2. Redistributions in binary form must reproduce the above copyright
14231673Stheraven *    notice, this list of conditions and the following disclaimer in the
15231673Stheraven *    documentation and/or other materials provided with the distribution.
16231673Stheraven *
17231673Stheraven * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18231673Stheraven * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19231673Stheraven * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20231673Stheraven * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21231673Stheraven * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22231673Stheraven * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23231673Stheraven * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24231673Stheraven * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25231673Stheraven * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26231673Stheraven * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27231673Stheraven * SUCH DAMAGE.
28231673Stheraven *
29231673Stheraven * $FreeBSD$
30231673Stheraven */
31231673Stheraven
32231673Stheraven#ifndef _LOCALE_T_DEFINED
33231673Stheraven#define _LOCALE_T_DEFINED
34231673Stheraventypedef struct	_xlocale *locale_t;
35231673Stheraven#endif
36231673Stheraven
37231673Stheraven#ifndef _XLOCALE_WCHAR1_H
38231673Stheraven#define _XLOCALE_WCHAR1_H
39231673Stheravenint			 wcscasecmp_l(const wchar_t *, const wchar_t *,
40231673Stheraven			   locale_t);
41231673Stheravenint			 wcsncasecmp_l(const wchar_t *, const wchar_t *, size_t,
42231673Stheraven			   locale_t);
43231673Stheravenint			 wcscoll_l(const wchar_t *, const wchar_t *, locale_t);
44231673Stheravensize_t			 wcsxfrm_l(wchar_t * __restrict,
45231673Stheraven			   const wchar_t * __restrict, size_t, locale_t);
46231673Stheraven
47231673Stheraven#endif /* _XLOCALE_WCHAR1_H */
48231673Stheraven
49231673Stheraven/*
50231673Stheraven * Only declare the non-POSIX functions if we're included from xlocale.h.
51231673Stheraven */
52231673Stheraven
53231673Stheraven#ifdef _XLOCALE_H_
54231673Stheraven#ifndef _XLOCALE_WCHAR2_H
55231673Stheraven#define _XLOCALE_WCHAR2_H
56231673Stheraven
57231673Stheravenwint_t			 btowc_l(int, locale_t);
58231673Stheravenwint_t			 fgetwc_l(FILE *, locale_t);
59231673Stheravenwchar_t			*fgetws_l(wchar_t * __restrict, int, FILE * __restrict,
60231673Stheraven			    locale_t);
61231673Stheravenwint_t			 fputwc_l(wchar_t, FILE *, locale_t);
62231673Stheravenint			 fputws_l(const wchar_t * __restrict, FILE * __restrict,
63231673Stheraven			   locale_t);
64231673Stheravenint			 fwprintf_l(FILE * __restrict, locale_t,
65231673Stheraven			    const wchar_t * __restrict, ...);
66231673Stheravenint			 fwscanf_l(FILE * __restrict, locale_t,
67231673Stheraven			    const wchar_t * __restrict, ...);
68231673Stheravenwint_t			 getwc_l(FILE *, locale_t);
69231673Stheravenwint_t			 getwchar_l(locale_t);
70231673Stheravensize_t			 mbrlen_l(const char * __restrict, size_t,
71231673Stheraven			   mbstate_t * __restrict, locale_t);
72231673Stheravensize_t			 mbrtowc_l(wchar_t * __restrict,
73231673Stheraven			    const char * __restrict, size_t,
74231673Stheraven			    mbstate_t * __restrict, locale_t);
75231673Stheravenint			 mbsinit_l(const mbstate_t *, locale_t);
76231673Stheravensize_t			 mbsrtowcs_l(wchar_t * __restrict,
77231673Stheraven			    const char ** __restrict, size_t,
78231673Stheraven			    mbstate_t * __restrict, locale_t);
79231673Stheravenwint_t			 putwc_l(wchar_t, FILE *, locale_t);
80231673Stheravenwint_t			 putwchar_l(wchar_t, locale_t);
81231673Stheravenint			 swprintf_l(wchar_t * __restrict, size_t n, locale_t,
82231673Stheraven			    const wchar_t * __restrict, ...);
83231673Stheravenint			 swscanf_l(const wchar_t * __restrict, locale_t,
84231673Stheraven			   const wchar_t * __restrict, ...);
85231673Stheravenwint_t			 ungetwc_l(wint_t, FILE *, locale_t);
86231673Stheravenint			 vfwprintf_l(FILE * __restrict, locale_t,
87231673Stheraven			    const wchar_t * __restrict, __va_list);
88231673Stheravenint			 vswprintf_l(wchar_t * __restrict, size_t n, locale_t,
89231673Stheraven			    const wchar_t * __restrict, __va_list);
90231673Stheravenint			 vwprintf_l(locale_t, const wchar_t * __restrict,
91231673Stheraven			    __va_list);
92231673Stheravensize_t			 wcrtomb_l(char * __restrict, wchar_t,
93231673Stheraven			    mbstate_t * __restrict, locale_t);
94231673Stheravensize_t			 wcsftime_l(wchar_t * __restrict, size_t,
95231673Stheraven			    const wchar_t * __restrict,
96231673Stheraven			    const struct tm * __restrict, locale_t);
97231673Stheravensize_t			 wcsrtombs_l(char * __restrict,
98231673Stheraven			    const wchar_t ** __restrict, size_t,
99231673Stheraven			    mbstate_t * __restrict, locale_t);
100231673Stheravendouble			 wcstod_l(const wchar_t * __restrict,
101231673Stheraven			    wchar_t ** __restrict, locale_t);
102231673Stheravenlong			 wcstol_l(const wchar_t * __restrict,
103231673Stheraven			    wchar_t ** __restrict, int, locale_t);
104231673Stheravenunsigned long		 wcstoul_l(const wchar_t * __restrict,
105231673Stheraven			    wchar_t ** __restrict, int, locale_t);
106231673Stheravenint			 wcswidth_l(const wchar_t *, size_t, locale_t);
107231673Stheravenint			 wctob_l(wint_t, locale_t);
108231673Stheravenint			 wcwidth_l(wchar_t, locale_t);
109231673Stheravenint			 wprintf_l(locale_t, const wchar_t * __restrict, ...);
110231673Stheravenint			 wscanf_l(locale_t, const wchar_t * __restrict, ...);
111231673Stheravenint			 vfwscanf_l(FILE * __restrict, locale_t,
112231673Stheraven			    const wchar_t * __restrict, __va_list);
113231673Stheravenint			 vswscanf_l(const wchar_t * __restrict, locale_t,
114231673Stheraven			    const wchar_t *__restrict, __va_list);
115231673Stheravenint			 vwscanf_l(locale_t, const wchar_t * __restrict,
116231673Stheraven			    __va_list);
117231673Stheravenfloat			 wcstof_l(const wchar_t * __restrict,
118231673Stheraven			    wchar_t ** __restrict, locale_t);
119231673Stheravenlong double		 wcstold_l(const wchar_t * __restrict,
120231673Stheraven			    wchar_t ** __restrict, locale_t);
121231673Stheravenlong long		 wcstoll_l(const wchar_t * __restrict,
122231673Stheraven			    wchar_t ** __restrict, int, locale_t);
123231673Stheravenunsigned long long	 wcstoull_l(const wchar_t * __restrict,
124231673Stheraven			    wchar_t ** __restrict, int, locale_t);
125231673Stheravensize_t			 mbsnrtowcs_l(wchar_t * __restrict,
126231673Stheraven			    const char ** __restrict, size_t, size_t,
127231673Stheraven			    mbstate_t * __restrict, locale_t);
128231673Stheravensize_t			 wcsnrtombs_l(char * __restrict,
129231673Stheraven			    const wchar_t ** __restrict, size_t, size_t,
130231673Stheraven			    mbstate_t * __restrict, locale_t);
131231673Stheraven
132231673Stheraven#endif /* _XLOCALE_WCHAR_H */
133231673Stheraven#endif /* _XLOCALE_H_ */
134