authorgravatar for emekankurumeh@outlook.comemekoi <emekankurumeh@outlook.com> 2019-06-05 14:42:36-05:00
committergravatar for emekankurumeh@outlook.comemekoi <emekankurumeh@outlook.com> 2019-06-05 14:42:36-05:00
logb74bcc9d76c25d6ae0f872f36f8c390dcd985bec
tree49e3f257fa48cfc5a34a0b1076be8a4b45efe752
parentfdddd131068775f8c811a51fdc08939165ee9e58

windows.unexpectedError prints a human friendly string


4 files changed, 412 insertions(+), 1 deletions(-)

std/os/windows.zig+9-1
...@@ -756,11 +756,19 @@ pub fn sliceToPrefixedSuffixedFileW(s: []const u8, comptime suffix: []const u16)...@@ -756,11 +756,19 @@ pub fn sliceToPrefixedSuffixedFileW(s: []const u8, comptime suffix: []const u16)
756 return result;756 return result;
757}757}
758758
759inline fn MAKELANGID(p: USHORT, s: USHORT) LANGID {
760 return (s << 10) | p;
761}
762
759/// Call this when you made a windows DLL call or something that does SetLastError763/// Call this when you made a windows DLL call or something that does SetLastError
760/// and you get an unexpected error.764/// and you get an unexpected error.
761pub fn unexpectedError(err: DWORD) std.os.UnexpectedError {765pub fn unexpectedError(err: DWORD) std.os.UnexpectedError {
762 if (std.os.unexpected_error_tracing) {766 if (std.os.unexpected_error_tracing) {
763 std.debug.warn("unexpected GetLastError(): {}\n", err);767 var buf: LPSTR = undefined;
768 const len = kernel32.FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, null, err, MAKELANGID(LANG.LANG_NEUTRAL, LANG.SUBLANG_DEFAULT), buf, 0, null);
769 defer _ = kernel32.LocalFree(@ptrCast(HLOCAL, buf));
770 std.debug.warn("error.Unexpected: {}: {}\n", err, buf[0..len]);
771
764 std.debug.dumpCurrentStackTrace(null);772 std.debug.dumpCurrentStackTrace(null);
765 }773 }
766 return error.Unexpected;774 return error.Unexpected;
std/os/windows/bits.zig+15
...@@ -6,6 +6,7 @@ const assert = std.debug.assert;...@@ -6,6 +6,7 @@ const assert = std.debug.assert;
6const maxInt = std.math.maxInt;6const maxInt = std.math.maxInt;
77
8pub const ERROR = @import("error.zig");8pub const ERROR = @import("error.zig");
9pub const LANG = @import("lang.zig");
910
10/// The standard input device. Initially, this is the console input buffer, CONIN$.11/// The standard input device. Initially, this is the console input buffer, CONIN$.
11pub const STD_INPUT_HANDLE = maxInt(DWORD) - 10 + 1;12pub const STD_INPUT_HANDLE = maxInt(DWORD) - 10 + 1;
...@@ -55,6 +56,10 @@ pub const ULONG = u32;...@@ -55,6 +56,10 @@ pub const ULONG = u32;
55pub const LONG = i32;56pub const LONG = i32;
56pub const ULONGLONG = u64;57pub const ULONGLONG = u64;
57pub const LONGLONG = i64;58pub const LONGLONG = i64;
59pub const HLOCAL = HANDLE;
60pub const LANGID = c_ushort;
61
62pub const va_list = *@OpaqueType();
5863
59pub const TRUE = 1;64pub const TRUE = 1;
60pub const FALSE = 0;65pub const FALSE = 0;
...@@ -525,3 +530,13 @@ pub const COINIT = extern enum {...@@ -525,3 +530,13 @@ pub const COINIT = extern enum {
525/// > this expansion applies to the total length.530/// > this expansion applies to the total length.
526/// from https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file#maximum-path-length-limitation531/// from https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file#maximum-path-length-limitation
527pub const PATH_MAX_WIDE = 32767;532pub const PATH_MAX_WIDE = 32767;
533
534pub const FORMAT_MESSAGE_ALLOCATE_BUFFER = 0x00000100;
535pub const FORMAT_MESSAGE_ARGUMENT_ARRAY = 0x00002000;
536pub const FORMAT_MESSAGE_FROM_HMODULE = 0x00000800;
537pub const FORMAT_MESSAGE_FROM_STRING = 0x00000400;
538pub const FORMAT_MESSAGE_FROM_SYSTEM = 0x00001000;
539pub const FORMAT_MESSAGE_IGNORE_INSERTS = 0x00000200;
540pub const FORMAT_MESSAGE_MAX_WIDTH_MASK = 0x000000FF;
541pub const FORMAT_MESSAGE_FROM_HMODULE = 0x00000800;
542pub const FORMAT_MESSAGE_FROM_STRING = 0x00000400;
std/os/windows/kernel32.zig+4
...@@ -50,6 +50,8 @@ pub extern "kernel32" stdcallcc fn FindFirstFileW(lpFileName: [*]const u16, lpFi...@@ -50,6 +50,8 @@ pub extern "kernel32" stdcallcc fn FindFirstFileW(lpFileName: [*]const u16, lpFi
50pub extern "kernel32" stdcallcc fn FindClose(hFindFile: HANDLE) BOOL;50pub extern "kernel32" stdcallcc fn FindClose(hFindFile: HANDLE) BOOL;
51pub extern "kernel32" stdcallcc fn FindNextFileW(hFindFile: HANDLE, lpFindFileData: *WIN32_FIND_DATAW) BOOL;51pub extern "kernel32" stdcallcc fn FindNextFileW(hFindFile: HANDLE, lpFindFileData: *WIN32_FIND_DATAW) BOOL;
5252
53pub extern "kernel32" stdcallcc fn FormatMessageA(dwFlags: DWORD, lpSource: LPVOID, dwMessageId: DWORD, dwLanguageId: DWORD, lpBuffer: LPSTR, nSize: DWORD, Arguments: ?*va_list) DWORD;
54
53pub extern "kernel32" stdcallcc fn FreeEnvironmentStringsW(penv: [*]u16) BOOL;55pub extern "kernel32" stdcallcc fn FreeEnvironmentStringsW(penv: [*]u16) BOOL;
5456
55pub extern "kernel32" stdcallcc fn GetCommandLineA() LPSTR;57pub extern "kernel32" stdcallcc fn GetCommandLineA() LPSTR;
...@@ -116,6 +118,8 @@ pub extern "kernel32" stdcallcc fn HeapFree(hHeap: HANDLE, dwFlags: DWORD, lpMem...@@ -116,6 +118,8 @@ pub extern "kernel32" stdcallcc fn HeapFree(hHeap: HANDLE, dwFlags: DWORD, lpMem
116118
117pub extern "kernel32" stdcallcc fn HeapValidate(hHeap: HANDLE, dwFlags: DWORD, lpMem: ?*const c_void) BOOL;119pub extern "kernel32" stdcallcc fn HeapValidate(hHeap: HANDLE, dwFlags: DWORD, lpMem: ?*const c_void) BOOL;
118120
121pub extern "kernel32" stdcallcc fn LocalFree(hMem: HLOCAL) ?HLOCAL;
122
119pub extern "kernel32" stdcallcc fn VirtualAlloc(lpAddress: ?LPVOID, dwSize: SIZE_T, flAllocationType: DWORD, flProtect: DWORD) ?LPVOID;123pub extern "kernel32" stdcallcc fn VirtualAlloc(lpAddress: ?LPVOID, dwSize: SIZE_T, flAllocationType: DWORD, flProtect: DWORD) ?LPVOID;
120pub extern "kernel32" stdcallcc fn VirtualFree(lpAddress: ?LPVOID, dwSize: SIZE_T, dwFreeType: DWORD) BOOL;124pub extern "kernel32" stdcallcc fn VirtualFree(lpAddress: ?LPVOID, dwSize: SIZE_T, dwFreeType: DWORD) BOOL;
121125
std/os/windows/lang.zig created+384
...@@ -0,0 +1,384 @@
1pub const LANG_NEUTRAL = 0x00;
2pub const LANG_INVARIANT = 0x7f;
3pub const LANG_AFRIKAANS = 0x36;
4pub const LANG_ALBANIAN = 0x1c;
5pub const LANG_ALSATIAN = 0x84;
6pub const LANG_AMHARIC = 0x5e;
7pub const LANG_ARABIC = 0x01;
8pub const LANG_ARMENIAN = 0x2b;
9pub const LANG_ASSAMESE = 0x4d;
10pub const LANG_AZERI = 0x2c;
11pub const LANG_AZERBAIJANI = 0x2c;
12pub const LANG_BANGLA = 0x45;
13pub const LANG_BASHKIR = 0x6d;
14pub const LANG_BASQUE = 0x2d;
15pub const LANG_BELARUSIAN = 0x23;
16pub const LANG_BENGALI = 0x45;
17pub const LANG_BRETON = 0x7e;
18pub const LANG_BOSNIAN = 0x1a;
19pub const LANG_BOSNIAN_NEUTRAL = 0x781a;
20pub const LANG_BULGARIAN = 0x02;
21pub const LANG_CATALAN = 0x03;
22pub const LANG_CENTRAL_KURDISH = 0x92;
23pub const LANG_CHEROKEE = 0x5c;
24pub const LANG_CHINESE = 0x04;
25pub const LANG_CHINESE_SIMPLIFIED = 0x04;
26pub const LANG_CHINESE_TRADITIONAL = 0x7c04;
27pub const LANG_CORSICAN = 0x83;
28pub const LANG_CROATIAN = 0x1a;
29pub const LANG_CZECH = 0x05;
30pub const LANG_DANISH = 0x06;
31pub const LANG_DARI = 0x8c;
32pub const LANG_DIVEHI = 0x65;
33pub const LANG_DUTCH = 0x13;
34pub const LANG_ENGLISH = 0x09;
35pub const LANG_ESTONIAN = 0x25;
36pub const LANG_FAEROESE = 0x38;
37pub const LANG_FARSI = 0x29;
38pub const LANG_FILIPINO = 0x64;
39pub const LANG_FINNISH = 0x0b;
40pub const LANG_FRENCH = 0x0c;
41pub const LANG_FRISIAN = 0x62;
42pub const LANG_FULAH = 0x67;
43pub const LANG_GALICIAN = 0x56;
44pub const LANG_GEORGIAN = 0x37;
45pub const LANG_GERMAN = 0x07;
46pub const LANG_GREEK = 0x08;
47pub const LANG_GREENLANDIC = 0x6f;
48pub const LANG_GUJARATI = 0x47;
49pub const LANG_HAUSA = 0x68;
50pub const LANG_HAWAIIAN = 0x75;
51pub const LANG_HEBREW = 0x0d;
52pub const LANG_HINDI = 0x39;
53pub const LANG_HUNGARIAN = 0x0e;
54pub const LANG_ICELANDIC = 0x0f;
55pub const LANG_IGBO = 0x70;
56pub const LANG_INDONESIAN = 0x21;
57pub const LANG_INUKTITUT = 0x5d;
58pub const LANG_IRISH = 0x3c;
59pub const LANG_ITALIAN = 0x10;
60pub const LANG_JAPANESE = 0x11;
61pub const LANG_KANNADA = 0x4b;
62pub const LANG_KASHMIRI = 0x60;
63pub const LANG_KAZAK = 0x3f;
64pub const LANG_KHMER = 0x53;
65pub const LANG_KICHE = 0x86;
66pub const LANG_KINYARWANDA = 0x87;
67pub const LANG_KONKANI = 0x57;
68pub const LANG_KOREAN = 0x12;
69pub const LANG_KYRGYZ = 0x40;
70pub const LANG_LAO = 0x54;
71pub const LANG_LATVIAN = 0x26;
72pub const LANG_LITHUANIAN = 0x27;
73pub const LANG_LOWER_SORBIAN = 0x2e;
74pub const LANG_LUXEMBOURGISH = 0x6e;
75pub const LANG_MACEDONIAN = 0x2f;
76pub const LANG_MALAY = 0x3e;
77pub const LANG_MALAYALAM = 0x4c;
78pub const LANG_MALTESE = 0x3a;
79pub const LANG_MANIPURI = 0x58;
80pub const LANG_MAORI = 0x81;
81pub const LANG_MAPUDUNGUN = 0x7a;
82pub const LANG_MARATHI = 0x4e;
83pub const LANG_MOHAWK = 0x7c;
84pub const LANG_MONGOLIAN = 0x50;
85pub const LANG_NEPALI = 0x61;
86pub const LANG_NORWEGIAN = 0x14;
87pub const LANG_OCCITAN = 0x82;
88pub const LANG_ODIA = 0x48;
89pub const LANG_ORIYA = 0x48;
90pub const LANG_PASHTO = 0x63;
91pub const LANG_PERSIAN = 0x29;
92pub const LANG_POLISH = 0x15;
93pub const LANG_PORTUGUESE = 0x16;
94pub const LANG_PULAR = 0x67;
95pub const LANG_PUNJABI = 0x46;
96pub const LANG_QUECHUA = 0x6b;
97pub const LANG_ROMANIAN = 0x18;
98pub const LANG_ROMANSH = 0x17;
99pub const LANG_RUSSIAN = 0x19;
100pub const LANG_SAKHA = 0x85;
101pub const LANG_SAMI = 0x3b;
102pub const LANG_SANSKRIT = 0x4f;
103pub const LANG_SCOTTISH_GAELIC = 0x91;
104pub const LANG_SERBIAN = 0x1a;
105pub const LANG_SERBIAN_NEUTRAL = 0x7c1a;
106pub const LANG_SINDHI = 0x59;
107pub const LANG_SINHALESE = 0x5b;
108pub const LANG_SLOVAK = 0x1b;
109pub const LANG_SLOVENIAN = 0x24;
110pub const LANG_SOTHO = 0x6c;
111pub const LANG_SPANISH = 0x0a;
112pub const LANG_SWAHILI = 0x41;
113pub const LANG_SWEDISH = 0x1d;
114pub const LANG_SYRIAC = 0x5a;
115pub const LANG_TAJIK = 0x28;
116pub const LANG_TAMAZIGHT = 0x5f;
117pub const LANG_TAMIL = 0x49;
118pub const LANG_TATAR = 0x44;
119pub const LANG_TELUGU = 0x4a;
120pub const LANG_THAI = 0x1e;
121pub const LANG_TIBETAN = 0x51;
122pub const LANG_TIGRIGNA = 0x73;
123pub const LANG_TIGRINYA = 0x73;
124pub const LANG_TSWANA = 0x32;
125pub const LANG_TURKISH = 0x1f;
126pub const LANG_TURKMEN = 0x42;
127pub const LANG_UIGHUR = 0x80;
128pub const LANG_UKRAINIAN = 0x22;
129pub const LANG_UPPER_SORBIAN = 0x2e;
130pub const LANG_URDU = 0x20;
131pub const LANG_UZBEK = 0x43;
132pub const LANG_VALENCIAN = 0x03;
133pub const LANG_VIETNAMESE = 0x2a;
134pub const LANG_WELSH = 0x52;
135pub const LANG_WOLOF = 0x88;
136pub const LANG_XHOSA = 0x34;
137pub const LANG_YAKUT = 0x85;
138pub const LANG_YI = 0x78;
139pub const LANG_YORUBA = 0x6a;
140pub const LANG_ZULU = 0x35;
141pub const SUBLANG_NEUTRAL = 0x00;
142pub const SUBLANG_DEFAULT = 0x01;
143pub const SUBLANG_SYS_DEFAULT = 0x02;
144pub const SUBLANG_CUSTOM_DEFAULT = 0x03;
145pub const SUBLANG_CUSTOM_UNSPECIFIED = 0x04;
146pub const SUBLANG_UI_CUSTOM_DEFAULT = 0x05;
147pub const SUBLANG_AFRIKAANS_SOUTH_AFRICA = 0x01;
148pub const SUBLANG_ALBANIAN_ALBANIA = 0x01;
149pub const SUBLANG_ALSATIAN_FRANCE = 0x01;
150pub const SUBLANG_AMHARIC_ETHIOPIA = 0x01;
151pub const SUBLANG_ARABIC_SAUDI_ARABIA = 0x01;
152pub const SUBLANG_ARABIC_IRAQ = 0x02;
153pub const SUBLANG_ARABIC_EGYPT = 0x03;
154pub const SUBLANG_ARABIC_LIBYA = 0x04;
155pub const SUBLANG_ARABIC_ALGERIA = 0x05;
156pub const SUBLANG_ARABIC_MOROCCO = 0x06;
157pub const SUBLANG_ARABIC_TUNISIA = 0x07;
158pub const SUBLANG_ARABIC_OMAN = 0x08;
159pub const SUBLANG_ARABIC_YEMEN = 0x09;
160pub const SUBLANG_ARABIC_SYRIA = 0x0a;
161pub const SUBLANG_ARABIC_JORDAN = 0x0b;
162pub const SUBLANG_ARABIC_LEBANON = 0x0c;
163pub const SUBLANG_ARABIC_KUWAIT = 0x0d;
164pub const SUBLANG_ARABIC_UAE = 0x0e;
165pub const SUBLANG_ARABIC_BAHRAIN = 0x0f;
166pub const SUBLANG_ARABIC_QATAR = 0x10;
167pub const SUBLANG_ARMENIAN_ARMENIA = 0x01;
168pub const SUBLANG_ASSAMESE_INDIA = 0x01;
169pub const SUBLANG_AZERI_LATIN = 0x01;
170pub const SUBLANG_AZERI_CYRILLIC = 0x02;
171pub const SUBLANG_AZERBAIJANI_AZERBAIJAN_LATIN = 0x01;
172pub const SUBLANG_AZERBAIJANI_AZERBAIJAN_CYRILLIC = 0x02;
173pub const SUBLANG_BANGLA_INDIA = 0x01;
174pub const SUBLANG_BANGLA_BANGLADESH = 0x02;
175pub const SUBLANG_BASHKIR_RUSSIA = 0x01;
176pub const SUBLANG_BASQUE_BASQUE = 0x01;
177pub const SUBLANG_BELARUSIAN_BELARUS = 0x01;
178pub const SUBLANG_BENGALI_INDIA = 0x01;
179pub const SUBLANG_BENGALI_BANGLADESH = 0x02;
180pub const SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN = 0x05;
181pub const SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC = 0x08;
182pub const SUBLANG_BRETON_FRANCE = 0x01;
183pub const SUBLANG_BULGARIAN_BULGARIA = 0x01;
184pub const SUBLANG_CATALAN_CATALAN = 0x01;
185pub const SUBLANG_CENTRAL_KURDISH_IRAQ = 0x01;
186pub const SUBLANG_CHEROKEE_CHEROKEE = 0x01;
187pub const SUBLANG_CHINESE_TRADITIONAL = 0x01;
188pub const SUBLANG_CHINESE_SIMPLIFIED = 0x02;
189pub const SUBLANG_CHINESE_HONGKONG = 0x03;
190pub const SUBLANG_CHINESE_SINGAPORE = 0x04;
191pub const SUBLANG_CHINESE_MACAU = 0x05;
192pub const SUBLANG_CORSICAN_FRANCE = 0x01;
193pub const SUBLANG_CZECH_CZECH_REPUBLIC = 0x01;
194pub const SUBLANG_CROATIAN_CROATIA = 0x01;
195pub const SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN = 0x04;
196pub const SUBLANG_DANISH_DENMARK = 0x01;
197pub const SUBLANG_DARI_AFGHANISTAN = 0x01;
198pub const SUBLANG_DIVEHI_MALDIVES = 0x01;
199pub const SUBLANG_DUTCH = 0x01;
200pub const SUBLANG_DUTCH_BELGIAN = 0x02;
201pub const SUBLANG_ENGLISH_US = 0x01;
202pub const SUBLANG_ENGLISH_UK = 0x02;
203pub const SUBLANG_ENGLISH_AUS = 0x03;
204pub const SUBLANG_ENGLISH_CAN = 0x04;
205pub const SUBLANG_ENGLISH_NZ = 0x05;
206pub const SUBLANG_ENGLISH_EIRE = 0x06;
207pub const SUBLANG_ENGLISH_SOUTH_AFRICA = 0x07;
208pub const SUBLANG_ENGLISH_JAMAICA = 0x08;
209pub const SUBLANG_ENGLISH_CARIBBEAN = 0x09;
210pub const SUBLANG_ENGLISH_BELIZE = 0x0a;
211pub const SUBLANG_ENGLISH_TRINIDAD = 0x0b;
212pub const SUBLANG_ENGLISH_ZIMBABWE = 0x0c;
213pub const SUBLANG_ENGLISH_PHILIPPINES = 0x0d;
214pub const SUBLANG_ENGLISH_INDIA = 0x10;
215pub const SUBLANG_ENGLISH_MALAYSIA = 0x11;
216pub const SUBLANG_ENGLISH_SINGAPORE = 0x12;
217pub const SUBLANG_ESTONIAN_ESTONIA = 0x01;
218pub const SUBLANG_FAEROESE_FAROE_ISLANDS = 0x01;
219pub const SUBLANG_FILIPINO_PHILIPPINES = 0x01;
220pub const SUBLANG_FINNISH_FINLAND = 0x01;
221pub const SUBLANG_FRENCH = 0x01;
222pub const SUBLANG_FRENCH_BELGIAN = 0x02;
223pub const SUBLANG_FRENCH_CANADIAN = 0x03;
224pub const SUBLANG_FRENCH_SWISS = 0x04;
225pub const SUBLANG_FRENCH_LUXEMBOURG = 0x05;
226pub const SUBLANG_FRENCH_MONACO = 0x06;
227pub const SUBLANG_FRISIAN_NETHERLANDS = 0x01;
228pub const SUBLANG_FULAH_SENEGAL = 0x02;
229pub const SUBLANG_GALICIAN_GALICIAN = 0x01;
230pub const SUBLANG_GEORGIAN_GEORGIA = 0x01;
231pub const SUBLANG_GERMAN = 0x01;
232pub const SUBLANG_GERMAN_SWISS = 0x02;
233pub const SUBLANG_GERMAN_AUSTRIAN = 0x03;
234pub const SUBLANG_GERMAN_LUXEMBOURG = 0x04;
235pub const SUBLANG_GERMAN_LIECHTENSTEIN = 0x05;
236pub const SUBLANG_GREEK_GREECE = 0x01;
237pub const SUBLANG_GREENLANDIC_GREENLAND = 0x01;
238pub const SUBLANG_GUJARATI_INDIA = 0x01;
239pub const SUBLANG_HAUSA_NIGERIA_LATIN = 0x01;
240pub const SUBLANG_HAWAIIAN_US = 0x01;
241pub const SUBLANG_HEBREW_ISRAEL = 0x01;
242pub const SUBLANG_HINDI_INDIA = 0x01;
243pub const SUBLANG_HUNGARIAN_HUNGARY = 0x01;
244pub const SUBLANG_ICELANDIC_ICELAND = 0x01;
245pub const SUBLANG_IGBO_NIGERIA = 0x01;
246pub const SUBLANG_INDONESIAN_INDONESIA = 0x01;
247pub const SUBLANG_INUKTITUT_CANADA = 0x01;
248pub const SUBLANG_INUKTITUT_CANADA_LATIN = 0x02;
249pub const SUBLANG_IRISH_IRELAND = 0x02;
250pub const SUBLANG_ITALIAN = 0x01;
251pub const SUBLANG_ITALIAN_SWISS = 0x02;
252pub const SUBLANG_JAPANESE_JAPAN = 0x01;
253pub const SUBLANG_KANNADA_INDIA = 0x01;
254pub const SUBLANG_KASHMIRI_SASIA = 0x02;
255pub const SUBLANG_KASHMIRI_INDIA = 0x02;
256pub const SUBLANG_KAZAK_KAZAKHSTAN = 0x01;
257pub const SUBLANG_KHMER_CAMBODIA = 0x01;
258pub const SUBLANG_KICHE_GUATEMALA = 0x01;
259pub const SUBLANG_KINYARWANDA_RWANDA = 0x01;
260pub const SUBLANG_KONKANI_INDIA = 0x01;
261pub const SUBLANG_KOREAN = 0x01;
262pub const SUBLANG_KYRGYZ_KYRGYZSTAN = 0x01;
263pub const SUBLANG_LAO_LAO = 0x01;
264pub const SUBLANG_LATVIAN_LATVIA = 0x01;
265pub const SUBLANG_LITHUANIAN = 0x01;
266pub const SUBLANG_LOWER_SORBIAN_GERMANY = 0x02;
267pub const SUBLANG_LUXEMBOURGISH_LUXEMBOURG = 0x01;
268pub const SUBLANG_MACEDONIAN_MACEDONIA = 0x01;
269pub const SUBLANG_MALAY_MALAYSIA = 0x01;
270pub const SUBLANG_MALAY_BRUNEI_DARUSSALAM = 0x02;
271pub const SUBLANG_MALAYALAM_INDIA = 0x01;
272pub const SUBLANG_MALTESE_MALTA = 0x01;
273pub const SUBLANG_MAORI_NEW_ZEALAND = 0x01;
274pub const SUBLANG_MAPUDUNGUN_CHILE = 0x01;
275pub const SUBLANG_MARATHI_INDIA = 0x01;
276pub const SUBLANG_MOHAWK_MOHAWK = 0x01;
277pub const SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA = 0x01;
278pub const SUBLANG_MONGOLIAN_PRC = 0x02;
279pub const SUBLANG_NEPALI_INDIA = 0x02;
280pub const SUBLANG_NEPALI_NEPAL = 0x01;
281pub const SUBLANG_NORWEGIAN_BOKMAL = 0x01;
282pub const SUBLANG_NORWEGIAN_NYNORSK = 0x02;
283pub const SUBLANG_OCCITAN_FRANCE = 0x01;
284pub const SUBLANG_ODIA_INDIA = 0x01;
285pub const SUBLANG_ORIYA_INDIA = 0x01;
286pub const SUBLANG_PASHTO_AFGHANISTAN = 0x01;
287pub const SUBLANG_PERSIAN_IRAN = 0x01;
288pub const SUBLANG_POLISH_POLAND = 0x01;
289pub const SUBLANG_PORTUGUESE = 0x02;
290pub const SUBLANG_PORTUGUESE_BRAZILIAN = 0x01;
291pub const SUBLANG_PULAR_SENEGAL = 0x02;
292pub const SUBLANG_PUNJABI_INDIA = 0x01;
293pub const SUBLANG_PUNJABI_PAKISTAN = 0x02;
294pub const SUBLANG_QUECHUA_BOLIVIA = 0x01;
295pub const SUBLANG_QUECHUA_ECUADOR = 0x02;
296pub const SUBLANG_QUECHUA_PERU = 0x03;
297pub const SUBLANG_ROMANIAN_ROMANIA = 0x01;
298pub const SUBLANG_ROMANSH_SWITZERLAND = 0x01;
299pub const SUBLANG_RUSSIAN_RUSSIA = 0x01;
300pub const SUBLANG_SAKHA_RUSSIA = 0x01;
301pub const SUBLANG_SAMI_NORTHERN_NORWAY = 0x01;
302pub const SUBLANG_SAMI_NORTHERN_SWEDEN = 0x02;
303pub const SUBLANG_SAMI_NORTHERN_FINLAND = 0x03;
304pub const SUBLANG_SAMI_LULE_NORWAY = 0x04;
305pub const SUBLANG_SAMI_LULE_SWEDEN = 0x05;
306pub const SUBLANG_SAMI_SOUTHERN_NORWAY = 0x06;
307pub const SUBLANG_SAMI_SOUTHERN_SWEDEN = 0x07;
308pub const SUBLANG_SAMI_SKOLT_FINLAND = 0x08;
309pub const SUBLANG_SAMI_INARI_FINLAND = 0x09;
310pub const SUBLANG_SANSKRIT_INDIA = 0x01;
311pub const SUBLANG_SCOTTISH_GAELIC = 0x01;
312pub const SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_LATIN = 0x06;
313pub const SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_CYRILLIC = 0x07;
314pub const SUBLANG_SERBIAN_MONTENEGRO_LATIN = 0x0b;
315pub const SUBLANG_SERBIAN_MONTENEGRO_CYRILLIC = 0x0c;
316pub const SUBLANG_SERBIAN_SERBIA_LATIN = 0x09;
317pub const SUBLANG_SERBIAN_SERBIA_CYRILLIC = 0x0a;
318pub const SUBLANG_SERBIAN_CROATIA = 0x01;
319pub const SUBLANG_SERBIAN_LATIN = 0x02;
320pub const SUBLANG_SERBIAN_CYRILLIC = 0x03;
321pub const SUBLANG_SINDHI_INDIA = 0x01;
322pub const SUBLANG_SINDHI_PAKISTAN = 0x02;
323pub const SUBLANG_SINDHI_AFGHANISTAN = 0x02;
324pub const SUBLANG_SINHALESE_SRI_LANKA = 0x01;
325pub const SUBLANG_SOTHO_NORTHERN_SOUTH_AFRICA = 0x01;
326pub const SUBLANG_SLOVAK_SLOVAKIA = 0x01;
327pub const SUBLANG_SLOVENIAN_SLOVENIA = 0x01;
328pub const SUBLANG_SPANISH = 0x01;
329pub const SUBLANG_SPANISH_MEXICAN = 0x02;
330pub const SUBLANG_SPANISH_MODERN = 0x03;
331pub const SUBLANG_SPANISH_GUATEMALA = 0x04;
332pub const SUBLANG_SPANISH_COSTA_RICA = 0x05;
333pub const SUBLANG_SPANISH_PANAMA = 0x06;
334pub const SUBLANG_SPANISH_DOMINICAN_REPUBLIC = 0x07;
335pub const SUBLANG_SPANISH_VENEZUELA = 0x08;
336pub const SUBLANG_SPANISH_COLOMBIA = 0x09;
337pub const SUBLANG_SPANISH_PERU = 0x0a;
338pub const SUBLANG_SPANISH_ARGENTINA = 0x0b;
339pub const SUBLANG_SPANISH_ECUADOR = 0x0c;
340pub const SUBLANG_SPANISH_CHILE = 0x0d;
341pub const SUBLANG_SPANISH_URUGUAY = 0x0e;
342pub const SUBLANG_SPANISH_PARAGUAY = 0x0f;
343pub const SUBLANG_SPANISH_BOLIVIA = 0x10;
344pub const SUBLANG_SPANISH_EL_SALVADOR = 0x11;
345pub const SUBLANG_SPANISH_HONDURAS = 0x12;
346pub const SUBLANG_SPANISH_NICARAGUA = 0x13;
347pub const SUBLANG_SPANISH_PUERTO_RICO = 0x14;
348pub const SUBLANG_SPANISH_US = 0x15;
349pub const SUBLANG_SWAHILI_KENYA = 0x01;
350pub const SUBLANG_SWEDISH = 0x01;
351pub const SUBLANG_SWEDISH_FINLAND = 0x02;
352pub const SUBLANG_SYRIAC_SYRIA = 0x01;
353pub const SUBLANG_TAJIK_TAJIKISTAN = 0x01;
354pub const SUBLANG_TAMAZIGHT_ALGERIA_LATIN = 0x02;
355pub const SUBLANG_TAMAZIGHT_MOROCCO_TIFINAGH = 0x04;
356pub const SUBLANG_TAMIL_INDIA = 0x01;
357pub const SUBLANG_TAMIL_SRI_LANKA = 0x02;
358pub const SUBLANG_TATAR_RUSSIA = 0x01;
359pub const SUBLANG_TELUGU_INDIA = 0x01;
360pub const SUBLANG_THAI_THAILAND = 0x01;
361pub const SUBLANG_TIBETAN_PRC = 0x01;
362pub const SUBLANG_TIGRIGNA_ERITREA = 0x02;
363pub const SUBLANG_TIGRINYA_ERITREA = 0x02;
364pub const SUBLANG_TIGRINYA_ETHIOPIA = 0x01;
365pub const SUBLANG_TSWANA_BOTSWANA = 0x02;
366pub const SUBLANG_TSWANA_SOUTH_AFRICA = 0x01;
367pub const SUBLANG_TURKISH_TURKEY = 0x01;
368pub const SUBLANG_TURKMEN_TURKMENISTAN = 0x01;
369pub const SUBLANG_UIGHUR_PRC = 0x01;
370pub const SUBLANG_UKRAINIAN_UKRAINE = 0x01;
371pub const SUBLANG_UPPER_SORBIAN_GERMANY = 0x01;
372pub const SUBLANG_URDU_PAKISTAN = 0x01;
373pub const SUBLANG_URDU_INDIA = 0x02;
374pub const SUBLANG_UZBEK_LATIN = 0x01;
375pub const SUBLANG_UZBEK_CYRILLIC = 0x02;
376pub const SUBLANG_VALENCIAN_VALENCIA = 0x02;
377pub const SUBLANG_VIETNAMESE_VIETNAM = 0x01;
378pub const SUBLANG_WELSH_UNITED_KINGDOM = 0x01;
379pub const SUBLANG_WOLOF_SENEGAL = 0x01;
380pub const SUBLANG_XHOSA_SOUTH_AFRICA = 0x01;
381pub const SUBLANG_YAKUT_RUSSIA = 0x01;
382pub const SUBLANG_YI_PRC = 0x01;
383pub const SUBLANG_YORUBA_NIGERIA = 0x01;
384pub const SUBLANG_ZULU_SOUTH_AFRICA = 0x01;