diff --git a/std/os/windows.zig b/std/os/windows.zig index 1d5900401..0757d9924 100644 --- a/std/os/windows.zig +++ b/std/os/windows.zig @@ -756,11 +756,19 @@ pub fn sliceToPrefixedSuffixedFileW(s: []const u8, comptime suffix: []const u16) return result; } +inline fn MAKELANGID(p: USHORT, s: USHORT) LANGID { + return (s << 10) | p; +} + /// Call this when you made a windows DLL call or something that does SetLastError /// and you get an unexpected error. pub fn unexpectedError(err: DWORD) std.os.UnexpectedError { if (std.os.unexpected_error_tracing) { - std.debug.warn("unexpected GetLastError(): {}\n", err); + var buf: LPSTR = undefined; + 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); + defer _ = kernel32.LocalFree(@ptrCast(HLOCAL, buf)); + std.debug.warn("error.Unexpected: {}: {}\n", err, buf[0..len]); + std.debug.dumpCurrentStackTrace(null); } return error.Unexpected; diff --git a/std/os/windows/bits.zig b/std/os/windows/bits.zig index 0bf299190..d05266c9f 100644 --- a/std/os/windows/bits.zig +++ b/std/os/windows/bits.zig @@ -6,6 +6,7 @@ const assert = std.debug.assert; const maxInt = std.math.maxInt; pub const ERROR = @import("error.zig"); +pub const LANG = @import("lang.zig"); /// The standard input device. Initially, this is the console input buffer, CONIN$. pub const STD_INPUT_HANDLE = maxInt(DWORD) - 10 + 1; @@ -55,6 +56,10 @@ pub const ULONG = u32; pub const LONG = i32; pub const ULONGLONG = u64; pub const LONGLONG = i64; +pub const HLOCAL = HANDLE; +pub const LANGID = c_ushort; + +pub const va_list = *@OpaqueType(); pub const TRUE = 1; pub const FALSE = 0; @@ -525,3 +530,13 @@ pub const COINIT = extern enum { /// > this expansion applies to the total length. /// from https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file#maximum-path-length-limitation pub const PATH_MAX_WIDE = 32767; + +pub const FORMAT_MESSAGE_ALLOCATE_BUFFER = 0x00000100; +pub const FORMAT_MESSAGE_ARGUMENT_ARRAY = 0x00002000; +pub const FORMAT_MESSAGE_FROM_HMODULE = 0x00000800; +pub const FORMAT_MESSAGE_FROM_STRING = 0x00000400; +pub const FORMAT_MESSAGE_FROM_SYSTEM = 0x00001000; +pub const FORMAT_MESSAGE_IGNORE_INSERTS = 0x00000200; +pub const FORMAT_MESSAGE_MAX_WIDTH_MASK = 0x000000FF; +pub const FORMAT_MESSAGE_FROM_HMODULE = 0x00000800; +pub const FORMAT_MESSAGE_FROM_STRING = 0x00000400; diff --git a/std/os/windows/kernel32.zig b/std/os/windows/kernel32.zig index 852369df2..bee1b8254 100644 --- a/std/os/windows/kernel32.zig +++ b/std/os/windows/kernel32.zig @@ -50,6 +50,8 @@ pub extern "kernel32" stdcallcc fn FindFirstFileW(lpFileName: [*]const u16, lpFi pub extern "kernel32" stdcallcc fn FindClose(hFindFile: HANDLE) BOOL; pub extern "kernel32" stdcallcc fn FindNextFileW(hFindFile: HANDLE, lpFindFileData: *WIN32_FIND_DATAW) BOOL; +pub extern "kernel32" stdcallcc fn FormatMessageA(dwFlags: DWORD, lpSource: LPVOID, dwMessageId: DWORD, dwLanguageId: DWORD, lpBuffer: LPSTR, nSize: DWORD, Arguments: ?*va_list) DWORD; + pub extern "kernel32" stdcallcc fn FreeEnvironmentStringsW(penv: [*]u16) BOOL; pub extern "kernel32" stdcallcc fn GetCommandLineA() LPSTR; @@ -116,6 +118,8 @@ pub extern "kernel32" stdcallcc fn HeapFree(hHeap: HANDLE, dwFlags: DWORD, lpMem pub extern "kernel32" stdcallcc fn HeapValidate(hHeap: HANDLE, dwFlags: DWORD, lpMem: ?*const c_void) BOOL; +pub extern "kernel32" stdcallcc fn LocalFree(hMem: HLOCAL) ?HLOCAL; + pub extern "kernel32" stdcallcc fn VirtualAlloc(lpAddress: ?LPVOID, dwSize: SIZE_T, flAllocationType: DWORD, flProtect: DWORD) ?LPVOID; pub extern "kernel32" stdcallcc fn VirtualFree(lpAddress: ?LPVOID, dwSize: SIZE_T, dwFreeType: DWORD) BOOL; diff --git a/std/os/windows/lang.zig b/std/os/windows/lang.zig new file mode 100644 index 000000000..7e6e2d1a7 --- /dev/null +++ b/std/os/windows/lang.zig @@ -0,0 +1,384 @@ +pub const LANG_NEUTRAL = 0x00; +pub const LANG_INVARIANT = 0x7f; +pub const LANG_AFRIKAANS = 0x36; +pub const LANG_ALBANIAN = 0x1c; +pub const LANG_ALSATIAN = 0x84; +pub const LANG_AMHARIC = 0x5e; +pub const LANG_ARABIC = 0x01; +pub const LANG_ARMENIAN = 0x2b; +pub const LANG_ASSAMESE = 0x4d; +pub const LANG_AZERI = 0x2c; +pub const LANG_AZERBAIJANI = 0x2c; +pub const LANG_BANGLA = 0x45; +pub const LANG_BASHKIR = 0x6d; +pub const LANG_BASQUE = 0x2d; +pub const LANG_BELARUSIAN = 0x23; +pub const LANG_BENGALI = 0x45; +pub const LANG_BRETON = 0x7e; +pub const LANG_BOSNIAN = 0x1a; +pub const LANG_BOSNIAN_NEUTRAL = 0x781a; +pub const LANG_BULGARIAN = 0x02; +pub const LANG_CATALAN = 0x03; +pub const LANG_CENTRAL_KURDISH = 0x92; +pub const LANG_CHEROKEE = 0x5c; +pub const LANG_CHINESE = 0x04; +pub const LANG_CHINESE_SIMPLIFIED = 0x04; +pub const LANG_CHINESE_TRADITIONAL = 0x7c04; +pub const LANG_CORSICAN = 0x83; +pub const LANG_CROATIAN = 0x1a; +pub const LANG_CZECH = 0x05; +pub const LANG_DANISH = 0x06; +pub const LANG_DARI = 0x8c; +pub const LANG_DIVEHI = 0x65; +pub const LANG_DUTCH = 0x13; +pub const LANG_ENGLISH = 0x09; +pub const LANG_ESTONIAN = 0x25; +pub const LANG_FAEROESE = 0x38; +pub const LANG_FARSI = 0x29; +pub const LANG_FILIPINO = 0x64; +pub const LANG_FINNISH = 0x0b; +pub const LANG_FRENCH = 0x0c; +pub const LANG_FRISIAN = 0x62; +pub const LANG_FULAH = 0x67; +pub const LANG_GALICIAN = 0x56; +pub const LANG_GEORGIAN = 0x37; +pub const LANG_GERMAN = 0x07; +pub const LANG_GREEK = 0x08; +pub const LANG_GREENLANDIC = 0x6f; +pub const LANG_GUJARATI = 0x47; +pub const LANG_HAUSA = 0x68; +pub const LANG_HAWAIIAN = 0x75; +pub const LANG_HEBREW = 0x0d; +pub const LANG_HINDI = 0x39; +pub const LANG_HUNGARIAN = 0x0e; +pub const LANG_ICELANDIC = 0x0f; +pub const LANG_IGBO = 0x70; +pub const LANG_INDONESIAN = 0x21; +pub const LANG_INUKTITUT = 0x5d; +pub const LANG_IRISH = 0x3c; +pub const LANG_ITALIAN = 0x10; +pub const LANG_JAPANESE = 0x11; +pub const LANG_KANNADA = 0x4b; +pub const LANG_KASHMIRI = 0x60; +pub const LANG_KAZAK = 0x3f; +pub const LANG_KHMER = 0x53; +pub const LANG_KICHE = 0x86; +pub const LANG_KINYARWANDA = 0x87; +pub const LANG_KONKANI = 0x57; +pub const LANG_KOREAN = 0x12; +pub const LANG_KYRGYZ = 0x40; +pub const LANG_LAO = 0x54; +pub const LANG_LATVIAN = 0x26; +pub const LANG_LITHUANIAN = 0x27; +pub const LANG_LOWER_SORBIAN = 0x2e; +pub const LANG_LUXEMBOURGISH = 0x6e; +pub const LANG_MACEDONIAN = 0x2f; +pub const LANG_MALAY = 0x3e; +pub const LANG_MALAYALAM = 0x4c; +pub const LANG_MALTESE = 0x3a; +pub const LANG_MANIPURI = 0x58; +pub const LANG_MAORI = 0x81; +pub const LANG_MAPUDUNGUN = 0x7a; +pub const LANG_MARATHI = 0x4e; +pub const LANG_MOHAWK = 0x7c; +pub const LANG_MONGOLIAN = 0x50; +pub const LANG_NEPALI = 0x61; +pub const LANG_NORWEGIAN = 0x14; +pub const LANG_OCCITAN = 0x82; +pub const LANG_ODIA = 0x48; +pub const LANG_ORIYA = 0x48; +pub const LANG_PASHTO = 0x63; +pub const LANG_PERSIAN = 0x29; +pub const LANG_POLISH = 0x15; +pub const LANG_PORTUGUESE = 0x16; +pub const LANG_PULAR = 0x67; +pub const LANG_PUNJABI = 0x46; +pub const LANG_QUECHUA = 0x6b; +pub const LANG_ROMANIAN = 0x18; +pub const LANG_ROMANSH = 0x17; +pub const LANG_RUSSIAN = 0x19; +pub const LANG_SAKHA = 0x85; +pub const LANG_SAMI = 0x3b; +pub const LANG_SANSKRIT = 0x4f; +pub const LANG_SCOTTISH_GAELIC = 0x91; +pub const LANG_SERBIAN = 0x1a; +pub const LANG_SERBIAN_NEUTRAL = 0x7c1a; +pub const LANG_SINDHI = 0x59; +pub const LANG_SINHALESE = 0x5b; +pub const LANG_SLOVAK = 0x1b; +pub const LANG_SLOVENIAN = 0x24; +pub const LANG_SOTHO = 0x6c; +pub const LANG_SPANISH = 0x0a; +pub const LANG_SWAHILI = 0x41; +pub const LANG_SWEDISH = 0x1d; +pub const LANG_SYRIAC = 0x5a; +pub const LANG_TAJIK = 0x28; +pub const LANG_TAMAZIGHT = 0x5f; +pub const LANG_TAMIL = 0x49; +pub const LANG_TATAR = 0x44; +pub const LANG_TELUGU = 0x4a; +pub const LANG_THAI = 0x1e; +pub const LANG_TIBETAN = 0x51; +pub const LANG_TIGRIGNA = 0x73; +pub const LANG_TIGRINYA = 0x73; +pub const LANG_TSWANA = 0x32; +pub const LANG_TURKISH = 0x1f; +pub const LANG_TURKMEN = 0x42; +pub const LANG_UIGHUR = 0x80; +pub const LANG_UKRAINIAN = 0x22; +pub const LANG_UPPER_SORBIAN = 0x2e; +pub const LANG_URDU = 0x20; +pub const LANG_UZBEK = 0x43; +pub const LANG_VALENCIAN = 0x03; +pub const LANG_VIETNAMESE = 0x2a; +pub const LANG_WELSH = 0x52; +pub const LANG_WOLOF = 0x88; +pub const LANG_XHOSA = 0x34; +pub const LANG_YAKUT = 0x85; +pub const LANG_YI = 0x78; +pub const LANG_YORUBA = 0x6a; +pub const LANG_ZULU = 0x35; +pub const SUBLANG_NEUTRAL = 0x00; +pub const SUBLANG_DEFAULT = 0x01; +pub const SUBLANG_SYS_DEFAULT = 0x02; +pub const SUBLANG_CUSTOM_DEFAULT = 0x03; +pub const SUBLANG_CUSTOM_UNSPECIFIED = 0x04; +pub const SUBLANG_UI_CUSTOM_DEFAULT = 0x05; +pub const SUBLANG_AFRIKAANS_SOUTH_AFRICA = 0x01; +pub const SUBLANG_ALBANIAN_ALBANIA = 0x01; +pub const SUBLANG_ALSATIAN_FRANCE = 0x01; +pub const SUBLANG_AMHARIC_ETHIOPIA = 0x01; +pub const SUBLANG_ARABIC_SAUDI_ARABIA = 0x01; +pub const SUBLANG_ARABIC_IRAQ = 0x02; +pub const SUBLANG_ARABIC_EGYPT = 0x03; +pub const SUBLANG_ARABIC_LIBYA = 0x04; +pub const SUBLANG_ARABIC_ALGERIA = 0x05; +pub const SUBLANG_ARABIC_MOROCCO = 0x06; +pub const SUBLANG_ARABIC_TUNISIA = 0x07; +pub const SUBLANG_ARABIC_OMAN = 0x08; +pub const SUBLANG_ARABIC_YEMEN = 0x09; +pub const SUBLANG_ARABIC_SYRIA = 0x0a; +pub const SUBLANG_ARABIC_JORDAN = 0x0b; +pub const SUBLANG_ARABIC_LEBANON = 0x0c; +pub const SUBLANG_ARABIC_KUWAIT = 0x0d; +pub const SUBLANG_ARABIC_UAE = 0x0e; +pub const SUBLANG_ARABIC_BAHRAIN = 0x0f; +pub const SUBLANG_ARABIC_QATAR = 0x10; +pub const SUBLANG_ARMENIAN_ARMENIA = 0x01; +pub const SUBLANG_ASSAMESE_INDIA = 0x01; +pub const SUBLANG_AZERI_LATIN = 0x01; +pub const SUBLANG_AZERI_CYRILLIC = 0x02; +pub const SUBLANG_AZERBAIJANI_AZERBAIJAN_LATIN = 0x01; +pub const SUBLANG_AZERBAIJANI_AZERBAIJAN_CYRILLIC = 0x02; +pub const SUBLANG_BANGLA_INDIA = 0x01; +pub const SUBLANG_BANGLA_BANGLADESH = 0x02; +pub const SUBLANG_BASHKIR_RUSSIA = 0x01; +pub const SUBLANG_BASQUE_BASQUE = 0x01; +pub const SUBLANG_BELARUSIAN_BELARUS = 0x01; +pub const SUBLANG_BENGALI_INDIA = 0x01; +pub const SUBLANG_BENGALI_BANGLADESH = 0x02; +pub const SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN = 0x05; +pub const SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC = 0x08; +pub const SUBLANG_BRETON_FRANCE = 0x01; +pub const SUBLANG_BULGARIAN_BULGARIA = 0x01; +pub const SUBLANG_CATALAN_CATALAN = 0x01; +pub const SUBLANG_CENTRAL_KURDISH_IRAQ = 0x01; +pub const SUBLANG_CHEROKEE_CHEROKEE = 0x01; +pub const SUBLANG_CHINESE_TRADITIONAL = 0x01; +pub const SUBLANG_CHINESE_SIMPLIFIED = 0x02; +pub const SUBLANG_CHINESE_HONGKONG = 0x03; +pub const SUBLANG_CHINESE_SINGAPORE = 0x04; +pub const SUBLANG_CHINESE_MACAU = 0x05; +pub const SUBLANG_CORSICAN_FRANCE = 0x01; +pub const SUBLANG_CZECH_CZECH_REPUBLIC = 0x01; +pub const SUBLANG_CROATIAN_CROATIA = 0x01; +pub const SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN = 0x04; +pub const SUBLANG_DANISH_DENMARK = 0x01; +pub const SUBLANG_DARI_AFGHANISTAN = 0x01; +pub const SUBLANG_DIVEHI_MALDIVES = 0x01; +pub const SUBLANG_DUTCH = 0x01; +pub const SUBLANG_DUTCH_BELGIAN = 0x02; +pub const SUBLANG_ENGLISH_US = 0x01; +pub const SUBLANG_ENGLISH_UK = 0x02; +pub const SUBLANG_ENGLISH_AUS = 0x03; +pub const SUBLANG_ENGLISH_CAN = 0x04; +pub const SUBLANG_ENGLISH_NZ = 0x05; +pub const SUBLANG_ENGLISH_EIRE = 0x06; +pub const SUBLANG_ENGLISH_SOUTH_AFRICA = 0x07; +pub const SUBLANG_ENGLISH_JAMAICA = 0x08; +pub const SUBLANG_ENGLISH_CARIBBEAN = 0x09; +pub const SUBLANG_ENGLISH_BELIZE = 0x0a; +pub const SUBLANG_ENGLISH_TRINIDAD = 0x0b; +pub const SUBLANG_ENGLISH_ZIMBABWE = 0x0c; +pub const SUBLANG_ENGLISH_PHILIPPINES = 0x0d; +pub const SUBLANG_ENGLISH_INDIA = 0x10; +pub const SUBLANG_ENGLISH_MALAYSIA = 0x11; +pub const SUBLANG_ENGLISH_SINGAPORE = 0x12; +pub const SUBLANG_ESTONIAN_ESTONIA = 0x01; +pub const SUBLANG_FAEROESE_FAROE_ISLANDS = 0x01; +pub const SUBLANG_FILIPINO_PHILIPPINES = 0x01; +pub const SUBLANG_FINNISH_FINLAND = 0x01; +pub const SUBLANG_FRENCH = 0x01; +pub const SUBLANG_FRENCH_BELGIAN = 0x02; +pub const SUBLANG_FRENCH_CANADIAN = 0x03; +pub const SUBLANG_FRENCH_SWISS = 0x04; +pub const SUBLANG_FRENCH_LUXEMBOURG = 0x05; +pub const SUBLANG_FRENCH_MONACO = 0x06; +pub const SUBLANG_FRISIAN_NETHERLANDS = 0x01; +pub const SUBLANG_FULAH_SENEGAL = 0x02; +pub const SUBLANG_GALICIAN_GALICIAN = 0x01; +pub const SUBLANG_GEORGIAN_GEORGIA = 0x01; +pub const SUBLANG_GERMAN = 0x01; +pub const SUBLANG_GERMAN_SWISS = 0x02; +pub const SUBLANG_GERMAN_AUSTRIAN = 0x03; +pub const SUBLANG_GERMAN_LUXEMBOURG = 0x04; +pub const SUBLANG_GERMAN_LIECHTENSTEIN = 0x05; +pub const SUBLANG_GREEK_GREECE = 0x01; +pub const SUBLANG_GREENLANDIC_GREENLAND = 0x01; +pub const SUBLANG_GUJARATI_INDIA = 0x01; +pub const SUBLANG_HAUSA_NIGERIA_LATIN = 0x01; +pub const SUBLANG_HAWAIIAN_US = 0x01; +pub const SUBLANG_HEBREW_ISRAEL = 0x01; +pub const SUBLANG_HINDI_INDIA = 0x01; +pub const SUBLANG_HUNGARIAN_HUNGARY = 0x01; +pub const SUBLANG_ICELANDIC_ICELAND = 0x01; +pub const SUBLANG_IGBO_NIGERIA = 0x01; +pub const SUBLANG_INDONESIAN_INDONESIA = 0x01; +pub const SUBLANG_INUKTITUT_CANADA = 0x01; +pub const SUBLANG_INUKTITUT_CANADA_LATIN = 0x02; +pub const SUBLANG_IRISH_IRELAND = 0x02; +pub const SUBLANG_ITALIAN = 0x01; +pub const SUBLANG_ITALIAN_SWISS = 0x02; +pub const SUBLANG_JAPANESE_JAPAN = 0x01; +pub const SUBLANG_KANNADA_INDIA = 0x01; +pub const SUBLANG_KASHMIRI_SASIA = 0x02; +pub const SUBLANG_KASHMIRI_INDIA = 0x02; +pub const SUBLANG_KAZAK_KAZAKHSTAN = 0x01; +pub const SUBLANG_KHMER_CAMBODIA = 0x01; +pub const SUBLANG_KICHE_GUATEMALA = 0x01; +pub const SUBLANG_KINYARWANDA_RWANDA = 0x01; +pub const SUBLANG_KONKANI_INDIA = 0x01; +pub const SUBLANG_KOREAN = 0x01; +pub const SUBLANG_KYRGYZ_KYRGYZSTAN = 0x01; +pub const SUBLANG_LAO_LAO = 0x01; +pub const SUBLANG_LATVIAN_LATVIA = 0x01; +pub const SUBLANG_LITHUANIAN = 0x01; +pub const SUBLANG_LOWER_SORBIAN_GERMANY = 0x02; +pub const SUBLANG_LUXEMBOURGISH_LUXEMBOURG = 0x01; +pub const SUBLANG_MACEDONIAN_MACEDONIA = 0x01; +pub const SUBLANG_MALAY_MALAYSIA = 0x01; +pub const SUBLANG_MALAY_BRUNEI_DARUSSALAM = 0x02; +pub const SUBLANG_MALAYALAM_INDIA = 0x01; +pub const SUBLANG_MALTESE_MALTA = 0x01; +pub const SUBLANG_MAORI_NEW_ZEALAND = 0x01; +pub const SUBLANG_MAPUDUNGUN_CHILE = 0x01; +pub const SUBLANG_MARATHI_INDIA = 0x01; +pub const SUBLANG_MOHAWK_MOHAWK = 0x01; +pub const SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA = 0x01; +pub const SUBLANG_MONGOLIAN_PRC = 0x02; +pub const SUBLANG_NEPALI_INDIA = 0x02; +pub const SUBLANG_NEPALI_NEPAL = 0x01; +pub const SUBLANG_NORWEGIAN_BOKMAL = 0x01; +pub const SUBLANG_NORWEGIAN_NYNORSK = 0x02; +pub const SUBLANG_OCCITAN_FRANCE = 0x01; +pub const SUBLANG_ODIA_INDIA = 0x01; +pub const SUBLANG_ORIYA_INDIA = 0x01; +pub const SUBLANG_PASHTO_AFGHANISTAN = 0x01; +pub const SUBLANG_PERSIAN_IRAN = 0x01; +pub const SUBLANG_POLISH_POLAND = 0x01; +pub const SUBLANG_PORTUGUESE = 0x02; +pub const SUBLANG_PORTUGUESE_BRAZILIAN = 0x01; +pub const SUBLANG_PULAR_SENEGAL = 0x02; +pub const SUBLANG_PUNJABI_INDIA = 0x01; +pub const SUBLANG_PUNJABI_PAKISTAN = 0x02; +pub const SUBLANG_QUECHUA_BOLIVIA = 0x01; +pub const SUBLANG_QUECHUA_ECUADOR = 0x02; +pub const SUBLANG_QUECHUA_PERU = 0x03; +pub const SUBLANG_ROMANIAN_ROMANIA = 0x01; +pub const SUBLANG_ROMANSH_SWITZERLAND = 0x01; +pub const SUBLANG_RUSSIAN_RUSSIA = 0x01; +pub const SUBLANG_SAKHA_RUSSIA = 0x01; +pub const SUBLANG_SAMI_NORTHERN_NORWAY = 0x01; +pub const SUBLANG_SAMI_NORTHERN_SWEDEN = 0x02; +pub const SUBLANG_SAMI_NORTHERN_FINLAND = 0x03; +pub const SUBLANG_SAMI_LULE_NORWAY = 0x04; +pub const SUBLANG_SAMI_LULE_SWEDEN = 0x05; +pub const SUBLANG_SAMI_SOUTHERN_NORWAY = 0x06; +pub const SUBLANG_SAMI_SOUTHERN_SWEDEN = 0x07; +pub const SUBLANG_SAMI_SKOLT_FINLAND = 0x08; +pub const SUBLANG_SAMI_INARI_FINLAND = 0x09; +pub const SUBLANG_SANSKRIT_INDIA = 0x01; +pub const SUBLANG_SCOTTISH_GAELIC = 0x01; +pub const SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_LATIN = 0x06; +pub const SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_CYRILLIC = 0x07; +pub const SUBLANG_SERBIAN_MONTENEGRO_LATIN = 0x0b; +pub const SUBLANG_SERBIAN_MONTENEGRO_CYRILLIC = 0x0c; +pub const SUBLANG_SERBIAN_SERBIA_LATIN = 0x09; +pub const SUBLANG_SERBIAN_SERBIA_CYRILLIC = 0x0a; +pub const SUBLANG_SERBIAN_CROATIA = 0x01; +pub const SUBLANG_SERBIAN_LATIN = 0x02; +pub const SUBLANG_SERBIAN_CYRILLIC = 0x03; +pub const SUBLANG_SINDHI_INDIA = 0x01; +pub const SUBLANG_SINDHI_PAKISTAN = 0x02; +pub const SUBLANG_SINDHI_AFGHANISTAN = 0x02; +pub const SUBLANG_SINHALESE_SRI_LANKA = 0x01; +pub const SUBLANG_SOTHO_NORTHERN_SOUTH_AFRICA = 0x01; +pub const SUBLANG_SLOVAK_SLOVAKIA = 0x01; +pub const SUBLANG_SLOVENIAN_SLOVENIA = 0x01; +pub const SUBLANG_SPANISH = 0x01; +pub const SUBLANG_SPANISH_MEXICAN = 0x02; +pub const SUBLANG_SPANISH_MODERN = 0x03; +pub const SUBLANG_SPANISH_GUATEMALA = 0x04; +pub const SUBLANG_SPANISH_COSTA_RICA = 0x05; +pub const SUBLANG_SPANISH_PANAMA = 0x06; +pub const SUBLANG_SPANISH_DOMINICAN_REPUBLIC = 0x07; +pub const SUBLANG_SPANISH_VENEZUELA = 0x08; +pub const SUBLANG_SPANISH_COLOMBIA = 0x09; +pub const SUBLANG_SPANISH_PERU = 0x0a; +pub const SUBLANG_SPANISH_ARGENTINA = 0x0b; +pub const SUBLANG_SPANISH_ECUADOR = 0x0c; +pub const SUBLANG_SPANISH_CHILE = 0x0d; +pub const SUBLANG_SPANISH_URUGUAY = 0x0e; +pub const SUBLANG_SPANISH_PARAGUAY = 0x0f; +pub const SUBLANG_SPANISH_BOLIVIA = 0x10; +pub const SUBLANG_SPANISH_EL_SALVADOR = 0x11; +pub const SUBLANG_SPANISH_HONDURAS = 0x12; +pub const SUBLANG_SPANISH_NICARAGUA = 0x13; +pub const SUBLANG_SPANISH_PUERTO_RICO = 0x14; +pub const SUBLANG_SPANISH_US = 0x15; +pub const SUBLANG_SWAHILI_KENYA = 0x01; +pub const SUBLANG_SWEDISH = 0x01; +pub const SUBLANG_SWEDISH_FINLAND = 0x02; +pub const SUBLANG_SYRIAC_SYRIA = 0x01; +pub const SUBLANG_TAJIK_TAJIKISTAN = 0x01; +pub const SUBLANG_TAMAZIGHT_ALGERIA_LATIN = 0x02; +pub const SUBLANG_TAMAZIGHT_MOROCCO_TIFINAGH = 0x04; +pub const SUBLANG_TAMIL_INDIA = 0x01; +pub const SUBLANG_TAMIL_SRI_LANKA = 0x02; +pub const SUBLANG_TATAR_RUSSIA = 0x01; +pub const SUBLANG_TELUGU_INDIA = 0x01; +pub const SUBLANG_THAI_THAILAND = 0x01; +pub const SUBLANG_TIBETAN_PRC = 0x01; +pub const SUBLANG_TIGRIGNA_ERITREA = 0x02; +pub const SUBLANG_TIGRINYA_ERITREA = 0x02; +pub const SUBLANG_TIGRINYA_ETHIOPIA = 0x01; +pub const SUBLANG_TSWANA_BOTSWANA = 0x02; +pub const SUBLANG_TSWANA_SOUTH_AFRICA = 0x01; +pub const SUBLANG_TURKISH_TURKEY = 0x01; +pub const SUBLANG_TURKMEN_TURKMENISTAN = 0x01; +pub const SUBLANG_UIGHUR_PRC = 0x01; +pub const SUBLANG_UKRAINIAN_UKRAINE = 0x01; +pub const SUBLANG_UPPER_SORBIAN_GERMANY = 0x01; +pub const SUBLANG_URDU_PAKISTAN = 0x01; +pub const SUBLANG_URDU_INDIA = 0x02; +pub const SUBLANG_UZBEK_LATIN = 0x01; +pub const SUBLANG_UZBEK_CYRILLIC = 0x02; +pub const SUBLANG_VALENCIAN_VALENCIA = 0x02; +pub const SUBLANG_VIETNAMESE_VIETNAM = 0x01; +pub const SUBLANG_WELSH_UNITED_KINGDOM = 0x01; +pub const SUBLANG_WOLOF_SENEGAL = 0x01; +pub const SUBLANG_XHOSA_SOUTH_AFRICA = 0x01; +pub const SUBLANG_YAKUT_RUSSIA = 0x01; +pub const SUBLANG_YI_PRC = 0x01; +pub const SUBLANG_YORUBA_NIGERIA = 0x01; +pub const SUBLANG_ZULU_SOUTH_AFRICA = 0x01;