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