1*0d5acd74SJohn Marino /*- 2*0d5acd74SJohn Marino * Copyright (c) 2011, 2012 The FreeBSD Foundation 3*0d5acd74SJohn Marino * All rights reserved. 4*0d5acd74SJohn Marino * 5*0d5acd74SJohn Marino * This software was developed by David Chisnall under sponsorship from 6*0d5acd74SJohn Marino * the FreeBSD Foundation. 7*0d5acd74SJohn Marino * 8*0d5acd74SJohn Marino * Redistribution and use in source and binary forms, with or without 9*0d5acd74SJohn Marino * modification, are permitted provided that the following conditions 10*0d5acd74SJohn Marino * are met: 11*0d5acd74SJohn Marino * 1. Redistributions of source code must retain the above copyright 12*0d5acd74SJohn Marino * notice, this list of conditions and the following disclaimer. 13*0d5acd74SJohn Marino * 2. Redistributions in binary form must reproduce the above copyright 14*0d5acd74SJohn Marino * notice, this list of conditions and the following disclaimer in the 15*0d5acd74SJohn Marino * documentation and/or other materials provided with the distribution. 16*0d5acd74SJohn Marino * 17*0d5acd74SJohn Marino * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18*0d5acd74SJohn Marino * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19*0d5acd74SJohn Marino * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20*0d5acd74SJohn Marino * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21*0d5acd74SJohn Marino * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22*0d5acd74SJohn Marino * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23*0d5acd74SJohn Marino * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24*0d5acd74SJohn Marino * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25*0d5acd74SJohn Marino * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26*0d5acd74SJohn Marino * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27*0d5acd74SJohn Marino * SUCH DAMAGE. 28*0d5acd74SJohn Marino * 29*0d5acd74SJohn Marino * $FreeBSD: head/include/xlocale/_stdlib.h 231673 2012-02-14 12:03:23Z theraven $ 30*0d5acd74SJohn Marino */ 31*0d5acd74SJohn Marino 32*0d5acd74SJohn Marino /* 33*0d5acd74SJohn Marino * Extended locale versions of the locale-aware functions from stdlib.h. 34*0d5acd74SJohn Marino * 35*0d5acd74SJohn Marino * Include <stdlib.h> before <xlocale.h> to expose these. 36*0d5acd74SJohn Marino */ 37*0d5acd74SJohn Marino double atof_l(const char *, locale_t); 38*0d5acd74SJohn Marino int atoi_l(const char *, locale_t); 39*0d5acd74SJohn Marino long atol_l(const char *, locale_t); 40*0d5acd74SJohn Marino long long atoll_l(const char *, locale_t); 41*0d5acd74SJohn Marino int mblen_l(const char *, size_t, locale_t); 42*0d5acd74SJohn Marino size_t mbstowcs_l(wchar_t * __restrict, 43*0d5acd74SJohn Marino const char * __restrict, size_t, locale_t); 44*0d5acd74SJohn Marino int mbtowc_l(wchar_t * __restrict, 45*0d5acd74SJohn Marino const char * __restrict, size_t, locale_t); 46*0d5acd74SJohn Marino double strtod_l(const char *, char **, locale_t); 47*0d5acd74SJohn Marino float strtof_l(const char *, char **, locale_t); 48*0d5acd74SJohn Marino long strtol_l(const char *, char **, int, locale_t); 49*0d5acd74SJohn Marino long double strtold_l(const char *, char **, locale_t); 50*0d5acd74SJohn Marino long long strtoll_l(const char *, char **, int, locale_t); 51*0d5acd74SJohn Marino unsigned long strtoul_l(const char *, char **, int, locale_t); 52*0d5acd74SJohn Marino unsigned long long strtoull_l(const char *, char **, int, locale_t); 53*0d5acd74SJohn Marino size_t wcstombs_l(char * __restrict, 54*0d5acd74SJohn Marino const wchar_t * __restrict, size_t, locale_t); 55*0d5acd74SJohn Marino int wctomb_l(char *, wchar_t, locale_t); 56*0d5acd74SJohn Marino 57*0d5acd74SJohn Marino int ___mb_cur_max_l(locale_t); 58*0d5acd74SJohn Marino #define MB_CUR_MAX_L(x) (___mb_cur_max_l(x)) 59*0d5acd74SJohn Marino 60