xref: /freebsd/lib/libc/locale/lnumeric.h (revision b3e7694832e81d7a904a10f525f8797b753bf0d3)
1f43a321bSAlexey Zelkin /*-
2*4d846d26SWarner Losh  * SPDX-License-Identifier: BSD-2-Clause
3d915a14eSPedro F. Giffuni  *
474f2b975SAlexey Zelkin  * Copyright (c) 2000, 2001 Alexey Zelkin <phantom@FreeBSD.org>
590423eceSAlexey Zelkin  * All rights reserved.
690423eceSAlexey Zelkin  *
73c87aa1dSDavid Chisnall  * Copyright (c) 2011 The FreeBSD Foundation
85b5fa75aSEd Maste  *
93c87aa1dSDavid Chisnall  * Portions of this software were developed by David Chisnall
103c87aa1dSDavid Chisnall  * under sponsorship from the FreeBSD Foundation.
113c87aa1dSDavid Chisnall  *
1290423eceSAlexey Zelkin  * Redistribution and use in source and binary forms, with or without
1390423eceSAlexey Zelkin  * modification, are permitted provided that the following conditions
1490423eceSAlexey Zelkin  * are met:
1590423eceSAlexey Zelkin  * 1. Redistributions of source code must retain the above copyright
1690423eceSAlexey Zelkin  *    notice, this list of conditions and the following disclaimer.
1790423eceSAlexey Zelkin  * 2. Redistributions in binary form must reproduce the above copyright
1890423eceSAlexey Zelkin  *    notice, this list of conditions and the following disclaimer in the
1990423eceSAlexey Zelkin  *    documentation and/or other materials provided with the distribution.
2090423eceSAlexey Zelkin  *
2190423eceSAlexey Zelkin  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
2290423eceSAlexey Zelkin  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2390423eceSAlexey Zelkin  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2490423eceSAlexey Zelkin  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2590423eceSAlexey Zelkin  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2690423eceSAlexey Zelkin  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2790423eceSAlexey Zelkin  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2890423eceSAlexey Zelkin  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2990423eceSAlexey Zelkin  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3090423eceSAlexey Zelkin  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3190423eceSAlexey Zelkin  * SUCH DAMAGE.
3290423eceSAlexey Zelkin  */
3390423eceSAlexey Zelkin 
34f43a321bSAlexey Zelkin #ifndef _LNUMERIC_H_
35f43a321bSAlexey Zelkin #define	_LNUMERIC_H_
363c87aa1dSDavid Chisnall #include "xlocale_private.h"
3790423eceSAlexey Zelkin 
3890423eceSAlexey Zelkin struct lc_numeric_T {
3990423eceSAlexey Zelkin 	const char	*decimal_point;
4090423eceSAlexey Zelkin 	const char	*thousands_sep;
4190423eceSAlexey Zelkin 	const char	*grouping;
4290423eceSAlexey Zelkin };
433c87aa1dSDavid Chisnall struct xlocale_numeric {
443c87aa1dSDavid Chisnall 	struct xlocale_component header;
453c87aa1dSDavid Chisnall 	char *buffer;
463c87aa1dSDavid Chisnall 	struct lc_numeric_T locale;
473c87aa1dSDavid Chisnall };
4890423eceSAlexey Zelkin 
493c87aa1dSDavid Chisnall struct lc_numeric_T *__get_current_numeric_locale(locale_t loc);
50f43a321bSAlexey Zelkin int	__numeric_load_locale(const char *);
5190423eceSAlexey Zelkin 
52f43a321bSAlexey Zelkin #endif /* !_LNUMERIC_H_ */
53