xref: /netbsd-src/distrib/utils/libhack/localeconv.c (revision 274254cdae52594c1aa480a736aef78313d15c9c)
1 /*	$NetBSD: localeconv.c,v 1.3 2003/07/26 17:07:36 salo Exp $	*/
2 
3 /*
4  * Written by J.T. Conklin <jtc@NetBSD.org>.
5  * Public domain.
6  */
7 
8 #include <sys/cdefs.h>
9 #include <sys/localedef.h>
10 #include <locale.h>
11 #include <limits.h>
12 
13 /*
14  * The localeconv() function constructs a struct lconv from the current
15  * monetary and numeric locales.
16  */
17 
18 /*
19  * Return the current locale conversion.
20  * Fixed in the "C" locale.
21  */
22 struct lconv *
23 localeconv()
24 {
25     static struct lconv ret = {
26 	/* char	*decimal_point */ ".",
27 	/* char	*thousands_sep */ "",
28 	/* char	*grouping */ "",
29 	/* char	*int_curr_symbol */ "",
30 	/* char	*currency_symbol */ "",
31 	/* char	*mon_decimal_point */ "",
32 	/* char	*mon_thousands_sep */ "",
33 	/* char	*mon_grouping */ "",
34 	/* char	*positive_sign */ "",
35 	/* char	*negative_sign */ "",
36 	/* char	int_frac_digits */ CHAR_MAX,
37 	/* char	frac_digits */ CHAR_MAX,
38 	/* char	p_cs_precedes */ CHAR_MAX,
39 	/* char	p_sep_by_space */ CHAR_MAX,
40 	/* char	n_cs_precedes */ CHAR_MAX,
41 	/* char	n_sep_by_space */ CHAR_MAX,
42 	/* char	p_sign_posn */ CHAR_MAX,
43 	/* char	n_sign_posn */ CHAR_MAX,
44     };
45 
46     return (&ret);
47 }
48