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