begin namespace-cleanup of standard C headers
[musl] / include / locale.h
1 #ifndef _LOCALE_H
2 #define _LOCALE_H
3
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7
8 #undef NULL
9 #ifdef __cplusplus
10 #define NULL 0
11 #else
12 #define NULL ((void*)0)
13 #endif
14
15 #define LC_CTYPE    0
16 #define LC_NUMERIC  1
17 #define LC_TIME     2
18 #define LC_COLLATE  3
19 #define LC_MONETARY 4
20 #define LC_MESSAGES 5
21 #define LC_ALL      6
22
23 struct lconv {
24         char *decimal_point;
25         char *thousands_sep;
26         char *grouping;
27
28         char *int_curr_symbol;
29         char *currency_symbol;
30         char *mon_decimal_point;
31         char *mon_thousands_sep;
32         char *mon_grouping;
33         char *positive_sign;
34         char *negative_sign;
35         char int_frac_digits;
36         char frac_digits;
37         char p_cs_precedes;
38         char p_sep_by_space;
39         char n_cs_precedes;
40         char n_sep_by_space;
41         char p_sign_posn;
42         char n_sign_posn;
43         char int_p_cs_precedes;
44         char int_p_sep_by_space;
45         char int_n_cs_precedes;
46         char int_n_sep_by_space;
47         char int_p_sign_posn;
48         char int_n_sign_posn;
49 };
50
51
52 char *setlocale (int, const char *);
53 struct lconv *localeconv(void);
54
55
56 #if 1
57
58 #define __NEED_locale_t
59
60 #include <bits/alltypes.h>
61
62 #define LC_GLOBAL_LOCALE ((locale_t)-1)
63
64 #define LC_CTYPE_MASK    (1<<LC_CTYPE)
65 #define LC_NUMERIC_MASK  (1<<LC_NUMERIC)
66 #define LC_TIME_MASK     (1<<LC_TIME)
67 #define LC_COLLATE_MASK  (1<<LC_COLLATE)
68 #define LC_MONETARY_MASK (1<<LC_MONETARY)
69 #define LC_MESSAGES_MASK (1<<LC_MESSAGES)
70 #define LC_ALL_MASK      0x7fffffff
71
72 locale_t duplocale(locale_t);
73 void freelocale(locale_t);
74 locale_t newlocale(int, const char *, locale_t);
75 locale_t uselocale(locale_t);
76
77 #endif
78
79
80 #ifdef __cplusplus
81 }
82 #endif
83
84 #endif