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