xref: /reactos/sdk/include/crt/locale.h (revision cdf90707)
1 /**
2  * This file has no copyright assigned and is placed in the Public Domain.
3  * This file is part of the w64 mingw-runtime package.
4  * No warranty is given; refer to the file DISCLAIMER within this package.
5  */
6 #ifndef _INC_LOCALE
7 #define _INC_LOCALE
8 
9 #include <crtdefs.h>
10 
11 #pragma pack(push,_CRT_PACKING)
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 #define LC_ALL 0
18 #define LC_COLLATE 1
19 #define LC_CTYPE 2
20 #define LC_MONETARY 3
21 #define LC_NUMERIC 4
22 #define LC_TIME 5
23 
24 #define LC_MIN LC_ALL
25 #define LC_MAX LC_TIME
26 
27 #ifndef _LCONV_DEFINED
28 #define _LCONV_DEFINED
29   struct lconv {
30     char *decimal_point;
31     char *thousands_sep;
32     char *grouping;
33     char *int_curr_symbol;
34     char *currency_symbol;
35     char *mon_decimal_point;
36     char *mon_thousands_sep;
37     char *mon_grouping;
38     char *positive_sign;
39     char *negative_sign;
40     char int_frac_digits;
41     char frac_digits;
42     char p_cs_precedes;
43     char p_sep_by_space;
44     char n_cs_precedes;
45     char n_sep_by_space;
46     char p_sign_posn;
47     char n_sign_posn;
48   };
49 #endif
50 
51 #ifndef _CONFIG_LOCALE_SWT
52 #define _CONFIG_LOCALE_SWT
53 
54 #define _ENABLE_PER_THREAD_LOCALE 0x1
55 #define _DISABLE_PER_THREAD_LOCALE 0x2
56 #define _ENABLE_PER_THREAD_LOCALE_GLOBAL 0x10
57 #define _DISABLE_PER_THREAD_LOCALE_GLOBAL 0x20
58 #define _ENABLE_PER_THREAD_LOCALE_NEW 0x100
59 #define _DISABLE_PER_THREAD_LOCALE_NEW 0x200
60 
61 #endif
62 
63   _Check_return_opt_
64   int
65   __cdecl
66   _configthreadlocale(
67     _In_ int _Flag);
68 
69   _Check_return_opt_
70   char*
71   __cdecl
72   setlocale(
73     _In_ int _Category,
74     _In_opt_z_ const char *_Locale);
75 
76   _Check_return_opt_
77   _CRTIMP
78   struct lconv*
79   __cdecl
80   localeconv(void);
81 
82   _Check_return_opt_
83   _locale_t
84   __cdecl
85   _get_current_locale(void);
86 
87   _Check_return_opt_
88   _locale_t
89   __cdecl
90   _create_locale(
91     _In_ int _Category,
92     _In_z_ const char *_Locale);
93 
94   void
95   __cdecl
96   _free_locale(
97     _In_opt_ _locale_t _Locale);
98 
99   _Check_return_
100   _locale_t
101   __cdecl
102   __get_current_locale(void);
103 
104   _Check_return_
105   _locale_t
106   __cdecl
107   __create_locale(
108     _In_ int _Category,
109     _In_z_ const char *_Locale);
110 
111   void
112   __cdecl
113   __free_locale(
114     _In_opt_ _locale_t _Locale);
115 
116 _CRTIMP
117 unsigned int
118 __cdecl
119 ___lc_collate_cp_func(void);
120 
121 _CRTIMP
122 unsigned int
123 __cdecl
124 ___lc_codepage_func(void);
125 
126 #ifndef _WLOCALE_DEFINED
127 #define _WLOCALE_DEFINED
128   _Check_return_opt_
129   _CRTIMP
130   wchar_t*
131   __cdecl
132   _wsetlocale(
133     _In_ int _Category,
134     _In_opt_z_ const wchar_t *_Locale);
135 #endif
136 
137 #ifdef __cplusplus
138 }
139 #endif
140 
141 #pragma pack(pop)
142 #endif
143