xref: /haiku/headers/posix/locale.h (revision 1294543de9ac0eff000eaea1b18368c36435d08e)
1 #ifndef _LOCALE_H_
2 #define _LOCALE_H_
3 /*
4 ** Distributed under the terms of the OpenBeOS License.
5 */
6 
7 #include <null.h>
8 
9 struct lconv {
10 	char *decimal_point;
11 	char *thousands_sep;
12 	char *grouping;
13 	char *int_curr_symbol;
14 	char *currency_symbol;
15 	char *mon_decimal_point;
16 	char *mon_thousands_sep;
17 	char *mon_grouping;
18 	char *positive_sign;
19 	char *negative_sign;
20 	char int_frac_digits;
21 	char frac_digits;
22 	char p_cs_precedes;
23 	char p_sep_by_space;
24 	char n_cs_precedes;
25 	char n_sep_by_space;
26 	char p_sign_posn;
27 	char n_sign_posn;
28 	char int_p_cs_precedes;
29 	char int_p_sep_by_space;
30 	char int_n_cs_precedes;
31 	char int_n_sep_by_space;
32 	char int_p_sign_posn;
33 	char int_n_sign_posn;
34 };
35 
36 #define	LC_ALL		0
37 #define	LC_COLLATE	1
38 #define	LC_CTYPE	2
39 #define	LC_MONETARY	3
40 #define	LC_NUMERIC	4
41 #define	LC_TIME		5
42 #define	LC_MESSAGES	6
43 /*
44  * the values above must be kept in loopable order (i.e. strictly increasing
45  * with no holes) and in sync with the value below
46  */
47 #define	LC_LAST		LC_MESSAGES
48 
49 #ifdef __cplusplus
50 extern "C" {
51 #endif
52 
53 extern struct lconv *localeconv(void);
54 extern char *setlocale(int category, const char *locale);
55 
56 #ifdef __cplusplus
57 }
58 #endif
59 
60 #endif /* _LOCALE_H_ */
61