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