Visual C++ backend for rbuild (for now just a hacked mingw backend) and related compi...
[reactos.git] / include / crt / locale.h
1 /*
2 * locale.h
3 * This file has no copyright assigned and is placed in the Public Domain.
4 * This file is a part of the mingw-runtime package.
5 * No warranty is given; refer to the file DISCLAIMER within the package.
6 *
7 * Functions and types for localization (ie. changing the appearance of
8 * output based on the standards of a certain country).
9 *
10 */
11
12 #ifndef _LOCALE_H_
13 #define _LOCALE_H_
14
15 /* All the headers include this file. */
16 #include <_mingw.h>
17
18 /*
19 * NOTE: I have tried to test this, but I am limited by my knowledge of
20 * locale issues. The structure does not bomb if you look at the
21 * values, and 'decimal_point' even seems to be correct. But the
22 * rest of the values are, by default, not particularly useful
23 * (read meaningless and not related to the international settings
24 * of the system).
25 */
26
27 #define LC_ALL 0
28 #define LC_COLLATE 1
29 #define LC_CTYPE 2
30 #define LC_MONETARY 3
31 #define LC_NUMERIC 4
32 #define LC_TIME 5
33 #define LC_MIN LC_ALL
34 #define LC_MAX LC_TIME
35
36 #ifndef RC_INVOKED
37
38 /* According to C89 std, NULL is defined in locale.h too. */
39 #define __need_NULL
40 #include <stddef.h>
41
42 /*
43 * The structure returned by 'localeconv'.
44 */
45 struct lconv
46 {
47 char* decimal_point;
48 char* thousands_sep;
49 char* grouping;
50 char* int_curr_symbol;
51 char* currency_symbol;
52 char* mon_decimal_point;
53 char* mon_thousands_sep;
54 char* mon_grouping;
55 char* positive_sign;
56 char* negative_sign;
57 char int_frac_digits;
58 char frac_digits;
59 char p_cs_precedes;
60 char p_sep_by_space;
61 char n_cs_precedes;
62 char n_sep_by_space;
63 char p_sign_posn;
64 char n_sign_posn;
65 };
66
67 #ifdef __cplusplus
68 extern "C" {
69 #endif
70
71 _CRTIMP char* __cdecl __MINGW_NOTHROW setlocale (int, const char*);
72 _CRTIMP struct lconv* __cdecl __MINGW_NOTHROW localeconv (void);
73
74 #ifndef _WLOCALE_DEFINED /* also declared in wchar.h */
75 # define __need_wchar_t
76 # include <stddef.h>
77 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wsetlocale(int, const wchar_t*);
78 # define _WLOCALE_DEFINED
79 #endif /* ndef _WLOCALE_DEFINED */
80
81 #ifdef __cplusplus
82 }
83 #endif
84
85 #endif /* Not RC_INVOKED */
86
87 #endif /* Not _LOCALE_H_ */
88
89