diff options
author | Jan Kotas <jkotas@microsoft.com> | 2018-03-19 06:59:33 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-19 06:59:33 -0700 |
commit | e7bb40f52d46671f5001012284a2f54eaa658e35 (patch) | |
tree | b303ba0ec6f7c19942cd0ceefe6c38eb6b5f941b /src/pal | |
parent | 259006de1cb285e5c15490013289e0b214c6cb21 (diff) | |
download | coreclr-e7bb40f52d46671f5001012284a2f54eaa658e35.tar.gz coreclr-e7bb40f52d46671f5001012284a2f54eaa658e35.tar.bz2 coreclr-e7bb40f52d46671f5001012284a2f54eaa658e35.zip |
Delete unused downlevel globalization support (#17022)
Delete ENABLE_DOWNLEVEL_FOR_NLS and everything under it
Diffstat (limited to 'src/pal')
-rw-r--r-- | src/pal/inc/pal.h | 823 | ||||
-rw-r--r-- | src/pal/inc/palprivate.h | 16 | ||||
-rw-r--r-- | src/pal/inc/rt/oleauto.h | 27 | ||||
-rw-r--r-- | src/pal/src/include/pal/locale.h | 4 | ||||
-rw-r--r-- | src/pal/src/locale/unicode.cpp | 110 | ||||
-rw-r--r-- | src/pal/src/misc/fmtmessage.cpp | 6 | ||||
-rw-r--r-- | src/pal/tests/palsuite/locale_info/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/pal/tests/palsuite/locale_info/GetStringTypeExW/CMakeLists.txt | 5 | ||||
-rw-r--r-- | src/pal/tests/palsuite/locale_info/GetStringTypeExW/test1/CMakeLists.txt | 17 | ||||
-rw-r--r-- | src/pal/tests/palsuite/locale_info/GetStringTypeExW/test1/test1.cpp | 54 | ||||
-rw-r--r-- | src/pal/tests/palsuite/locale_info/GetStringTypeExW/test1/testinfo.dat | 13 | ||||
-rw-r--r-- | src/pal/tests/palsuite/locale_info/GetStringTypeExW/test2/CMakeLists.txt | 17 | ||||
-rw-r--r-- | src/pal/tests/palsuite/locale_info/GetStringTypeExW/test2/test2.cpp | 78 | ||||
-rw-r--r-- | src/pal/tests/palsuite/locale_info/GetStringTypeExW/test2/testinfo.dat | 12 |
14 files changed, 1 insertions, 1182 deletions
diff --git a/src/pal/inc/pal.h b/src/pal/inc/pal.h index 7aadbda126..60f4a81c66 100644 --- a/src/pal/inc/pal.h +++ b/src/pal/inc/pal.h @@ -299,40 +299,6 @@ typedef long time_t; #define _TIME_T_DEFINED #endif // !PAL_STDCPP_COMPAT -#if ENABLE_DOWNLEVEL_FOR_NLS -#define MAKELCID(lgid, srtid) ((DWORD)((((DWORD)((WORD )(srtid))) << 16) | \ - ((DWORD)((WORD )(lgid))))) -#define LANGIDFROMLCID(lcid) ((WORD)(lcid)) -#define SORTIDFROMLCID(lcid) ((WORD)((((DWORD)(lcid)) >> 16) & 0xf)) - -#define LANG_NEUTRAL 0x00 -#define LANG_INVARIANT 0x7f -#define SUBLANG_NEUTRAL 0x00 // language neutral -#define SUBLANG_DEFAULT 0x01 // user default -#define SORT_DEFAULT 0x0 // sorting default -#define SUBLANG_SYS_DEFAULT 0x02 // system default - -#define MAKELANGID(p, s) ((((WORD )(s)) << 10) | (WORD )(p)) -#define PRIMARYLANGID(lgid) ((WORD )(lgid) & 0x3ff) -#define SUBLANGID(lgid) ((WORD )(lgid) >> 10) - -#define LANG_SYSTEM_DEFAULT (MAKELANGID(LANG_NEUTRAL, SUBLANG_SYS_DEFAULT)) -#define LANG_USER_DEFAULT (MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT)) -#define LOCALE_SYSTEM_DEFAULT (MAKELCID(LANG_SYSTEM_DEFAULT, SORT_DEFAULT)) -#define LOCALE_USER_DEFAULT (MAKELCID(LANG_USER_DEFAULT, SORT_DEFAULT)) -#define LOCALE_NEUTRAL (MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), SORT_DEFAULT)) -#define LOCALE_US_ENGLISH (MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT)) -#define LOCALE_INVARIANT (MAKELCID(MAKELANGID(LANG_INVARIANT, SUBLANG_NEUTRAL), SORT_DEFAULT)) - -#define SUBLANG_ENGLISH_US 0x01 -#define SUBLANG_CHINESE_TRADITIONAL 0x01 /* Chinese (Traditional) */ - -#endif // ENABLE_DOWNLEVEL_FOR_NLS - - -#define CT_CTYPE1 0x00000001 /* ctype 1 information */ -#define CT_CTYPE2 0x00000002 /* ctype 2 information */ -#define CT_CTYPE3 0x00000004 /* ctype 3 information */ #define C1_UPPER 0x0001 /* upper case */ #define C1_LOWER 0x0002 /* lower case */ #define C1_DIGIT 0x0004 /* decimal digits */ @@ -342,31 +308,6 @@ typedef long time_t; #define C1_BLANK 0x0040 /* blank characters */ #define C1_XDIGIT 0x0080 /* other digits */ #define C1_ALPHA 0x0100 /* any linguistic character */ -#define C2_LEFTTORIGHT 0x0001 /* left to right */ -#define C2_RIGHTTOLEFT 0x0002 /* right to left */ -#define C2_EUROPENUMBER 0x0003 /* European number, digit */ -#define C2_EUROPESEPARATOR 0x0004 /* European numeric separator */ -#define C2_EUROPETERMINATOR 0x0005 /* European numeric terminator */ -#define C2_ARABICNUMBER 0x0006 /* Arabic number */ -#define C2_COMMONSEPARATOR 0x0007 /* common numeric separator */ -#define C2_BLOCKSEPARATOR 0x0008 /* block separator */ -#define C2_SEGMENTSEPARATOR 0x0009 /* segment separator */ -#define C2_WHITESPACE 0x000A /* white space */ -#define C2_OTHERNEUTRAL 0x000B /* other neutrals */ -#define C2_NOTAPPLICABLE 0x0000 /* no implicit directionality */ -#define C3_NONSPACING 0x0001 /* nonspacing character */ -#define C3_DIACRITIC 0x0002 /* diacritic mark */ -#define C3_VOWELMARK 0x0004 /* vowel mark */ -#define C3_SYMBOL 0x0008 /* symbols */ -#define C3_KATAKANA 0x0010 /* katakana character */ -#define C3_HIRAGANA 0x0020 /* hiragana character */ -#define C3_HALFWIDTH 0x0040 /* half width character */ -#define C3_FULLWIDTH 0x0080 /* full width character */ -#define C3_IDEOGRAPH 0x0100 /* ideographic character */ -#define C3_KASHIDA 0x0200 /* Arabic kashida character */ -#define C3_LEXICAL 0x0400 /* lexical character */ -#define C3_ALPHA 0x8000 /* any ling. char (C1_ALPHA) */ -#define C3_NOTAPPLICABLE 0x0000 /* ctype 3 is not applicable */ #define DLL_PROCESS_ATTACH 1 #define DLL_THREAD_ATTACH 2 @@ -2906,84 +2847,6 @@ FlushInstructionCache( IN LPCVOID lpBaseAddress, IN SIZE_T dwSize); -#if ENABLE_DOWNLEVEL_FOR_NLS - -PALIMPORT -BOOL -PALAPI -GetStringTypeExW( - IN LCID Locale, - IN DWORD dwInfoType, - IN LPCWSTR lpSrcStr, - IN int cchSrc, - OUT LPWORD lpCharType); - -#ifdef UNICODE -#define GetStringTypeEx GetStringTypeExW -#endif - -#endif // ENABLE_DOWNLEVEL_FOR_NLS - - -#define NORM_IGNORECASE 0x00000001 // ignore case -#define NORM_IGNOREWIDTH 0x00020000 // ignore width - -#define NORM_LINGUISTIC_CASING 0x08000000 // use linguistic rules for casing - -#ifdef __APPLE__ -#define NORM_IGNORENONSPACE 0x00000002 // ignore nonspacing chars -#define NORM_IGNORESYMBOLS 0x00000004 // ignore symbols -#define NORM_IGNOREKANATYPE 0x00010000 // ignore kanatype -#define SORT_STRINGSORT 0x00001000 // use string sort method -#endif // __APPLE__ - - -typedef struct nlsversioninfo { - DWORD dwNLSVersionInfoSize; - DWORD dwNLSVersion; - DWORD dwDefinedVersion; -} NLSVERSIONINFO, *LPNLSVERSIONINFO; - -#define CSTR_LESS_THAN 1 -#define CSTR_EQUAL 2 -#define CSTR_GREATER_THAN 3 - -#if ENABLE_DOWNLEVEL_FOR_NLS - - -PALIMPORT -int -PALAPI -CompareStringW( - IN LCID Locale, - IN DWORD dwCmpFlags, - IN LPCWSTR lpString1, - IN int cchCount1, - IN LPCWSTR lpString2, - IN int cchCount2); - -#endif // ENABLE_DOWNLEVEL_FOR_NLS - - -PALIMPORT -int -PALAPI -CompareStringEx( - IN LPCWSTR lpLocaleName, - IN DWORD dwCmpFlags, - IN LPCWSTR lpString1, - IN int cchCount1, - IN LPCWSTR lpString2, - IN int cchCount2, - IN LPNLSVERSIONINFO lpVersionInformation, - IN LPVOID lpReserved, - IN LPARAM lParam); - - -#ifdef UNICODE -#define CompareString CompareStringW -#endif - #define MAX_LEADBYTES 12 #define MAX_DEFAULTCHAR 2 @@ -3054,692 +2917,6 @@ WideCharToMultiByte( IN LPCSTR lpDefaultChar, OUT LPBOOL lpUsedDefaultChar); -#if ENABLE_DOWNLEVEL_FOR_NLS - -PALIMPORT -LANGID -PALAPI -GetSystemDefaultLangID( - void); - -PALIMPORT -LANGID -PALAPI -GetUserDefaultLangID( - void); - -PALIMPORT -BOOL -PALAPI -SetThreadLocale( - IN LCID Locale); - -PALIMPORT -LCID -PALAPI -GetThreadLocale( - void); - -#endif //ENABLE_DOWNLEVEL_FOR_NLS - -// -// Locale Types. -// -// These types are used for the GetLocaleInfo NLS API routine. -// - -#ifdef __APPLE__ - -// -// The following LCTypes may be used in combination with any other LCTypes. -// -// LOCALE_NOUSEROVERRIDE is also used in GetTimeFormat and -// GetDateFormat. -// -// LOCALE_RETURN_NUMBER will return the result from GetLocaleInfo as a -// number instead of a string. This flag is only valid for the LCTypes -// beginning with LOCALE_I. -// -#define LOCALE_NOUSEROVERRIDE 0x80000000 /* do not use user overrides */ -#define LOCALE_RETURN_NUMBER 0x20000000 /* return number instead of string */ -#define LOCALE_RETURN_GENITIVE_NAMES 0x10000000 //Flag to return the Genitive forms of month names - -#define LOCALE_SLOCALIZEDDISPLAYNAME 0x00000002 // localized name of locale, eg "German (Germany)" in UI language -#define LOCALE_SENGLISHDISPLAYNAME 0x00000072 // Display name (language + country usually) in English, eg "German (Germany)" -#define LOCALE_SNATIVEDISPLAYNAME 0x00000073 // Display name in native locale language, eg "Deutsch (Deutschland) - -#define LOCALE_SLOCALIZEDLANGUAGENAME 0x0000006f // Language Display Name for a language, eg "German" in UI language -#define LOCALE_SENGLISHLANGUAGENAME 0x00001001 // English name of language, eg "German" -#define LOCALE_SNATIVELANGUAGENAME 0x00000004 // native name of language, eg "Deutsch" - -#define LOCALE_SLOCALIZEDCOUNTRYNAME 0x00000006 // localized name of country, eg "Germany" in UI language -#define LOCALE_SENGLISHCOUNTRYNAME 0x00001002 // English name of country, eg "Germany" -#define LOCALE_SNATIVECOUNTRYNAME 0x00000008 // native name of country, eg "Deutschland" - -// -// The following LCTypes are mutually exclusive in that they may NOT -// be used in combination with each other. -// -#define LOCALE_ILANGUAGE 0x00000001 /* language id */ -#define LOCALE_SLANGUAGE 0x00000002 /* localized name of language */ -#define LOCALE_SENGLANGUAGE 0x00001001 /* English name of language */ -#define LOCALE_SABBREVLANGNAME 0x00000003 /* abbreviated language name */ -#define LOCALE_SNATIVELANGNAME 0x00000004 /* native name of language */ -#define LOCALE_ICOUNTRY 0x00000005 /* country code */ -#define LOCALE_SCOUNTRY 0x00000006 /* localized name of country */ - -#define LOCALE_SENGCOUNTRY 0x00001002 /* English name of country */ -#define LOCALE_SABBREVCTRYNAME 0x00000007 /* abbreviated country name */ -#define LOCALE_SNATIVECTRYNAME 0x00000008 /* native name of country */ - -#define LOCALE_SLIST 0x0000000C /* list item separator */ -#define LOCALE_IMEASURE 0x0000000D /* 0 = metric, 1 = US */ - -#define LOCALE_SDECIMAL 0x0000000E /* decimal separator */ -#define LOCALE_STHOUSAND 0x0000000F /* thousand separator */ -#define LOCALE_SGROUPING 0x00000010 /* digit grouping */ -#define LOCALE_IDIGITS 0x00000011 /* number of fractional digits */ -#define LOCALE_ILZERO 0x00000012 /* leading zeros for decimal */ -#define LOCALE_INEGNUMBER 0x00001010 /* negative number mode */ -#define LOCALE_SNATIVEDIGITS 0x00000013 /* native ascii 0-9 */ - -#define LOCALE_SCURRENCY 0x00000014 /* local monetary symbol */ -#define LOCALE_SINTLSYMBOL 0x00000015 /* intl monetary symbol */ -#define LOCALE_SMONDECIMALSEP 0x00000016 /* monetary decimal separator */ -#define LOCALE_SMONTHOUSANDSEP 0x00000017 /* monetary thousand separator */ -#define LOCALE_SMONGROUPING 0x00000018 /* monetary grouping */ -#define LOCALE_ICURRDIGITS 0x00000019 /* # local monetary digits */ -#define LOCALE_IINTLCURRDIGITS 0x0000001A /* # intl monetary digits */ -#define LOCALE_ICURRENCY 0x0000001B /* positive currency mode */ -#define LOCALE_INEGCURR 0x0000001C /* negative currency mode */ - -#define LOCALE_SSHORTDATE 0x0000001F /* short date format string */ -#define LOCALE_SLONGDATE 0x00000020 /* long date format string */ -#define LOCALE_STIMEFORMAT 0x00001003 /* time format string */ -#define LOCALE_S1159 0x00000028 /* AM designator */ -#define LOCALE_S2359 0x00000029 /* PM designator */ - -#define LOCALE_ICALENDARTYPE 0x00001009 /* type of calendar specifier */ -#define LOCALE_IFIRSTDAYOFWEEK 0x0000100C /* first day of week specifier */ -#define LOCALE_IFIRSTWEEKOFYEAR 0x0000100D /* first week of year specifier */ - -#define LOCALE_SDAYNAME1 0x0000002A /* long name for Monday */ -#define LOCALE_SDAYNAME2 0x0000002B /* long name for Tuesday */ -#define LOCALE_SDAYNAME3 0x0000002C /* long name for Wednesday */ -#define LOCALE_SDAYNAME4 0x0000002D /* long name for Thursday */ -#define LOCALE_SDAYNAME5 0x0000002E /* long name for Friday */ -#define LOCALE_SDAYNAME6 0x0000002F /* long name for Saturday */ -#define LOCALE_SDAYNAME7 0x00000030 /* long name for Sunday */ -#define LOCALE_SABBREVDAYNAME1 0x00000031 /* abbreviated name for Monday */ -#define LOCALE_SABBREVDAYNAME2 0x00000032 /* abbreviated name for Tuesday */ -#define LOCALE_SABBREVDAYNAME3 0x00000033 /* abbreviated name for Wednesday */ -#define LOCALE_SABBREVDAYNAME4 0x00000034 /* abbreviated name for Thursday */ -#define LOCALE_SABBREVDAYNAME5 0x00000035 /* abbreviated name for Friday */ -#define LOCALE_SABBREVDAYNAME6 0x00000036 /* abbreviated name for Saturday */ -#define LOCALE_SABBREVDAYNAME7 0x00000037 /* abbreviated name for Sunday */ -#define LOCALE_SMONTHNAME1 0x00000038 /* long name for January */ -#define LOCALE_SMONTHNAME2 0x00000039 /* long name for February */ -#define LOCALE_SMONTHNAME3 0x0000003A /* long name for March */ -#define LOCALE_SMONTHNAME4 0x0000003B /* long name for April */ -#define LOCALE_SMONTHNAME5 0x0000003C /* long name for May */ -#define LOCALE_SMONTHNAME6 0x0000003D /* long name for June */ -#define LOCALE_SMONTHNAME7 0x0000003E /* long name for July */ -#define LOCALE_SMONTHNAME8 0x0000003F /* long name for August */ -#define LOCALE_SMONTHNAME9 0x00000040 /* long name for September */ -#define LOCALE_SMONTHNAME10 0x00000041 /* long name for October */ -#define LOCALE_SMONTHNAME11 0x00000042 /* long name for November */ -#define LOCALE_SMONTHNAME12 0x00000043 /* long name for December */ -#define LOCALE_SMONTHNAME13 0x0000100E /* long name for 13th month (if exists) */ -#define LOCALE_SABBREVMONTHNAME1 0x00000044 /* abbreviated name for January */ -#define LOCALE_SABBREVMONTHNAME2 0x00000045 /* abbreviated name for February */ -#define LOCALE_SABBREVMONTHNAME3 0x00000046 /* abbreviated name for March */ -#define LOCALE_SABBREVMONTHNAME4 0x00000047 /* abbreviated name for April */ -#define LOCALE_SABBREVMONTHNAME5 0x00000048 /* abbreviated name for May */ -#define LOCALE_SABBREVMONTHNAME6 0x00000049 /* abbreviated name for June */ -#define LOCALE_SABBREVMONTHNAME7 0x0000004A /* abbreviated name for July */ -#define LOCALE_SABBREVMONTHNAME8 0x0000004B /* abbreviated name for August */ -#define LOCALE_SABBREVMONTHNAME9 0x0000004C /* abbreviated name for September */ -#define LOCALE_SABBREVMONTHNAME10 0x0000004D /* abbreviated name for October */ -#define LOCALE_SABBREVMONTHNAME11 0x0000004E /* abbreviated name for November */ -#define LOCALE_SABBREVMONTHNAME12 0x0000004F /* abbreviated name for December */ -#define LOCALE_SABBREVMONTHNAME13 0x0000100F /* abbreviated name for 13th month (if exists) */ - -#define LOCALE_SPOSITIVESIGN 0x00000050 /* positive sign */ -#define LOCALE_SNEGATIVESIGN 0x00000051 /* negative sign */ - -#define LOCALE_FONTSIGNATURE 0x00000058 /* font signature */ -#define LOCALE_SISO639LANGNAME 0x00000059 /* ISO abbreviated language name */ -#define LOCALE_SISO3166CTRYNAME 0x0000005A /* ISO abbreviated country name */ - -#define LOCALE_SENGCURRNAME 0x00001007 /* english name of currency */ -#define LOCALE_SNATIVECURRNAME 0x00001008 /* native name of currency */ -#define LOCALE_SYEARMONTH 0x00001006 /* year month format string */ -#define LOCALE_IDIGITSUBSTITUTION 0x00001014 /* 0 = context, 1 = none, 2 = national */ - -#define LOCALE_SNAME 0x0000005C /* locale name <language>[-<Script>][-<REGION>[_<sort order>]] */ -#define LOCALE_SDURATION 0x0000005d /* time duration format */ -#define LOCALE_SKEYBOARDSTOINSTALL 0x0000005e /* (windows only) keyboards to install */ -#define LOCALE_SSHORTESTDAYNAME1 0x00000060 /* Shortest day name for Monday */ -#define LOCALE_SSHORTESTDAYNAME2 0x00000061 /* Shortest day name for Tuesday */ -#define LOCALE_SSHORTESTDAYNAME3 0x00000062 /* Shortest day name for Wednesday */ -#define LOCALE_SSHORTESTDAYNAME4 0x00000063 /* Shortest day name for Thursday */ -#define LOCALE_SSHORTESTDAYNAME5 0x00000064 /* Shortest day name for Friday */ -#define LOCALE_SSHORTESTDAYNAME6 0x00000065 /* Shortest day name for Saturday */ -#define LOCALE_SSHORTESTDAYNAME7 0x00000066 /* Shortest day name for Sunday */ -#define LOCALE_SISO639LANGNAME2 0x00000067 /* 3 character ISO abbreviated language name */ -#define LOCALE_SISO3166CTRYNAME2 0x00000068 /* 3 character ISO country name */ -#define LOCALE_SNAN 0x00000069 /* Not a Number */ -#define LOCALE_SPOSINFINITY 0x0000006a /* + Infinity */ -#define LOCALE_SNEGINFINITY 0x0000006b /* - Infinity */ -#define LOCALE_SSCRIPTS 0x0000006c /* Typical scripts in the locale */ -#define LOCALE_SPARENT 0x0000006d /* Fallback name for resources */ -#define LOCALE_SCONSOLEFALLBACKNAME 0x0000006e /* Fallback name for within the console */ -#define LOCALE_SLANGDISPLAYNAME 0x0000006f /* Language Display Name for a language */ -#define LOCALE_IREADINGLAYOUT 0x00000070 // Returns one of the following 4 reading layout values: - // 0 - Left to right (eg en-US) - // 1 - Right to left (eg arabic locales) - // 2 - Vertical top to bottom with columns to the left and also left to right (ja-JP locales) - // 3 - Vertical top to bottom with columns proceeding to the right -#define LOCALE_INEUTRAL 0x00000071 // Returns 0 for specific cultures, 1 for neutral cultures. -#define LOCALE_INEGATIVEPERCENT 0x00000074 // Returns 0-11 for the negative percent format -#define LOCALE_IPOSITIVEPERCENT 0x00000075 // Returns 0-3 for the positive percent formatIPOSITIVEPERCENT -#define LOCALE_SPERCENT 0x00000076 // Returns the percent symbol -#define LOCALE_SPERMILLE 0x00000077 // Returns the permille (U+2030) symbol -#define LOCALE_SMONTHDAY 0x00000078 // Returns the preferred month/day format -#define LOCALE_SSHORTTIME 0x00000079 // Returns the preferred short time format (ie: no seconds, just h:mm) -#define LOCALE_SOPENTYPELANGUAGETAG 0x0000007a // Open type language tag, eg: "latn" or "dflt" -#define LOCALE_SSORTLOCALE 0x0000007b // Name of locale to use for sorting/collation/casing behavior. - -#define LCMAP_LINGUISTIC_CASING 0x01000000 /* Use linguistic casing */ - -#define CAL_RETURN_GENITIVE_NAMES LOCALE_RETURN_GENITIVE_NAMES // return genitive forms of month names - -#define CAL_SSHORTESTDAYNAME1 0x00000031 -#define CAL_SSHORTESTDAYNAME2 0x00000032 -#define CAL_SSHORTESTDAYNAME3 0x00000033 -#define CAL_SSHORTESTDAYNAME4 0x00000034 -#define CAL_SSHORTESTDAYNAME5 0x00000035 -#define CAL_SSHORTESTDAYNAME6 0x00000036 -#define CAL_SSHORTESTDAYNAME7 0x00000037 - -#define CAL_SMONTHDAY 0x00000038 // Month/day pattern (reserve for potential inclusion in a future version) -#define CAL_SERASTRING 0x00000004 // era name for IYearOffsetRanges, eg A.D. -#define CAL_SABBREVERASTRING 0x00000039 // Abbreviated era string (eg: AD) - -#define CAL_SSHORTDATE 0x00000005 /* short date format string */ -#define CAL_SLONGDATE 0x00000006 /* long date format string */ -#define CAL_SDAYNAME1 0x00000007 /* native name for Monday */ -#define CAL_SDAYNAME2 0x00000008 /* native name for Tuesday */ -#define CAL_SDAYNAME3 0x00000009 /* native name for Wednesday */ -#define CAL_SDAYNAME4 0x0000000a /* native name for Thursday */ -#define CAL_SDAYNAME5 0x0000000b /* native name for Friday */ -#define CAL_SDAYNAME6 0x0000000c /* native name for Saturday */ -#define CAL_SDAYNAME7 0x0000000d /* native name for Sunday */ -#define CAL_SABBREVDAYNAME1 0x0000000e /* abbreviated name for Monday */ -#define CAL_SABBREVDAYNAME2 0x0000000f /* abbreviated name for Tuesday */ -#define CAL_SABBREVDAYNAME3 0x00000010 /* abbreviated name for Wednesday */ -#define CAL_SABBREVDAYNAME4 0x00000011 /* abbreviated name for Thursday */ -#define CAL_SABBREVDAYNAME5 0x00000012 /* abbreviated name for Friday */ -#define CAL_SABBREVDAYNAME6 0x00000013 /* abbreviated name for Saturday */ -#define CAL_SABBREVDAYNAME7 0x00000014 /* abbreviated name for Sunday */ -#define CAL_SMONTHNAME1 0x00000015 /* native name for January */ -#define CAL_SMONTHNAME2 0x00000016 /* native name for February */ -#define CAL_SMONTHNAME3 0x00000017 /* native name for March */ -#define CAL_SMONTHNAME4 0x00000018 /* native name for April */ -#define CAL_SMONTHNAME5 0x00000019 /* native name for May */ -#define CAL_SMONTHNAME6 0x0000001a /* native name for June */ -#define CAL_SMONTHNAME7 0x0000001b /* native name for July */ -#define CAL_SMONTHNAME8 0x0000001c /* native name for August */ -#define CAL_SMONTHNAME9 0x0000001d /* native name for September */ -#define CAL_SMONTHNAME10 0x0000001e /* native name for October */ -#define CAL_SMONTHNAME11 0x0000001f /* native name for November */ -#define CAL_SMONTHNAME12 0x00000020 /* native name for December */ -#define CAL_SMONTHNAME13 0x00000021 /* native name for 13th month (if any) */ -#define CAL_SABBREVMONTHNAME1 0x00000022 /* abbreviated name for January */ -#define CAL_SABBREVMONTHNAME2 0x00000023 /* abbreviated name for February */ -#define CAL_SABBREVMONTHNAME3 0x00000024 /* abbreviated name for March */ -#define CAL_SABBREVMONTHNAME4 0x00000025 /* abbreviated name for April */ -#define CAL_SABBREVMONTHNAME5 0x00000026 /* abbreviated name for May */ -#define CAL_SABBREVMONTHNAME6 0x00000027 /* abbreviated name for June */ -#define CAL_SABBREVMONTHNAME7 0x00000028 /* abbreviated name for July */ -#define CAL_SABBREVMONTHNAME8 0x00000029 /* abbreviated name for August */ -#define CAL_SABBREVMONTHNAME9 0x0000002a /* abbreviated name for September */ -#define CAL_SABBREVMONTHNAME10 0x0000002b /* abbreviated name for October */ -#define CAL_SABBREVMONTHNAME11 0x0000002c /* abbreviated name for November */ -#define CAL_SABBREVMONTHNAME12 0x0000002d /* abbreviated name for December */ -#define CAL_SABBREVMONTHNAME13 0x0000002e /* abbreviated name for 13th month (if any) */ -#define CAL_SYEARMONTH 0x0000002f /* year month format string */ - - -#else // __APPLE__ - -#define LOCALE_SDECIMAL 0x0000000E /* decimal separator */ -#define LOCALE_STHOUSAND 0x0000000F /* thousand separator */ -#define LOCALE_ILZERO 0x00000012 /* leading zeros for decimal */ -#define LOCALE_SCURRENCY 0x00000014 /* local monetary symbol */ -#define LOCALE_SMONDECIMALSEP 0x00000016 /* monetary decimal separator */ -#define LOCALE_SMONTHOUSANDSEP 0x00000017 /* monetary thousand separator */ - -#endif // __APPLE__ - - -#if ENABLE_DOWNLEVEL_FOR_NLS - -PALIMPORT -int -PALAPI -GetLocaleInfoW( - IN LCID Locale, - IN LCTYPE LCType, - OUT LPWSTR lpLCData, - IN int cchData); - -#endif // ENABLE_DOWNLEVEL_FOR_NLS - -PALIMPORT -int -PALAPI -GetLocaleInfoEx( - IN LPCWSTR lpLocaleName, - IN LCTYPE LCType, - OUT LPWSTR lpLCData, - IN int cchData); - - -PALIMPORT -int -PALAPI -CompareStringOrdinal( - IN LPCWSTR lpString1, - IN int cchCount1, - IN LPCWSTR lpString2, - IN int cchCount2, - IN BOOL bIgnoreCase); - -typedef struct _nlsversioninfoex { - DWORD dwNLSVersionInfoSize; - DWORD dwNLSVersion; - DWORD dwDefinedVersion; - DWORD dwEffectiveId; - GUID guidCustomVersion; - } NLSVERSIONINFOEX, *LPNLSVERSIONINFOEX; - -PALIMPORT -int -PALAPI -FindNLSStringEx( - IN LPCWSTR lpLocaleName, - IN DWORD dwFindNLSStringFlags, - IN LPCWSTR lpStringSource, - IN int cchSource, - IN LPCWSTR lpStringValue, - IN int cchValue, - OUT LPINT pcchFound, - IN LPNLSVERSIONINFOEX lpVersionInformation, - IN LPVOID lpReserved, - IN LPARAM lParam ); - -typedef enum { - COMPARE_STRING = 0x0001, -} NLS_FUNCTION; - -PALIMPORT -BOOL -PALAPI -IsNLSDefinedString( - IN NLS_FUNCTION Function, - IN DWORD dwFlags, - IN LPNLSVERSIONINFOEX lpVersionInfo, - IN LPCWSTR lpString, - IN int cchStr ); - - -PALIMPORT -int -PALAPI -ResolveLocaleName( - IN LPCWSTR lpNameToResolve, - OUT LPWSTR lpLocaleName, - IN int cchLocaleName ); - -PALIMPORT -BOOL -PALAPI -GetThreadPreferredUILanguages( - IN DWORD dwFlags, - OUT PULONG pulNumLanguages, - OUT PWSTR pwszLanguagesBuffer, - IN OUT PULONG pcchLanguagesBuffer); - - -PALIMPORT -int -PALAPI -GetSystemDefaultLocaleName( - OUT LPWSTR lpLocaleName, - IN int cchLocaleName); - -#ifdef UNICODE -#define GetLocaleInfo GetLocaleInfoW -#endif - -#if ENABLE_DOWNLEVEL_FOR_NLS -PALIMPORT -LCID -PALAPI -GetUserDefaultLCID( - void); -#endif - - -PALIMPORT -int -PALAPI -GetUserDefaultLocaleName( - OUT LPWSTR lpLocaleName, - IN int cchLocaleName); - - -#define LCID_INSTALLED 0x00000001 // installed locale ids -#define LCID_SUPPORTED 0x00000002 // supported locale ids -#ifdef __APPLE__ -#define LCID_ALTERNATE_SORTS 0x00000004 // alternate sort locale ids -#endif // __APPLE__ - -#if ENABLE_DOWNLEVEL_FOR_NLS -PALIMPORT -BOOL -PALAPI -IsValidLocale( - IN LCID Locale, - IN DWORD dwFlags); -#endif // ENABLE_DOWNLEVEL_FOR_NLS - - -typedef DWORD CALID; -typedef DWORD CALTYPE; - -#define CAL_ITWODIGITYEARMAX 0x00000030 // two digit year max -#define CAL_RETURN_NUMBER 0x20000000 // return number instead of string - -#define CAL_GREGORIAN 1 // Gregorian (localized) calendar -#define CAL_GREGORIAN_US 2 // Gregorian (U.S.) calendar -#define CAL_JAPAN 3 // Japanese Emperor Era calendar -#define CAL_TAIWAN 4 // Taiwan Era calendar -#define CAL_KOREA 5 // Korean Tangun Era calendar -#define CAL_HIJRI 6 // Hijri (Arabic Lunar) calendar -#define CAL_THAI 7 // Thai calendar -#define CAL_HEBREW 8 // Hebrew (Lunar) calendar -#define CAL_GREGORIAN_ME_FRENCH 9 // Gregorian Middle East French calendar -#define CAL_GREGORIAN_ARABIC 10 // Gregorian Arabic calendar -#define CAL_GREGORIAN_XLIT_ENGLISH 11 // Gregorian Transliterated English calendar -#define CAL_GREGORIAN_XLIT_FRENCH 12 // Gregorian Transliterated French calendar -#define CAL_JULIAN 13 - -#if ENABLE_DOWNLEVEL_FOR_NLS -PALIMPORT -int -PALAPI -GetCalendarInfoW( - IN LCID Locale, - IN CALID Calendar, - IN CALTYPE CalType, - OUT LPWSTR lpCalData, - IN int cchData, - OUT LPDWORD lpValue); - -#ifdef UNICODE -#define GetCalendarInfo GetCalendarInfoW -#endif - -#endif // ENABLE_DOWNLEVEL_FOR_NLS - - -PALIMPORT -int -PALAPI -GetCalendarInfoEx( - IN LPCWSTR lpLocaleName, - IN CALID Calendar, - IN LPCWSTR lpReserved, - IN CALTYPE CalType, - OUT LPWSTR lpCalData, - IN int cchData, - OUT LPDWORD lpValue); - -#if ENABLE_DOWNLEVEL_FOR_NLS -typedef BOOL (CALLBACK* LOCALE_ENUMPROCW)(LPWSTR); - -PALIMPORT -BOOL -PALAPI -EnumSystemLocalesW( - IN LOCALE_ENUMPROCW lpLocaleEnumProc, - IN DWORD dwFlags); -#endif // ENABLE_DOWNLEVEL_FOR_NLS - -#define DATE_SHORTDATE 0x00000001 // use short date picture -#define DATE_LONGDATE 0x00000002 // use long date picture -#define DATE_YEARMONTH 0x00000008 // use year month picture - -typedef BOOL (CALLBACK* DATEFMT_ENUMPROCEXW)(LPWSTR, CALID); - -#if ENABLE_DOWNLEVEL_FOR_NLS - -PALIMPORT -BOOL -PALAPI -EnumDateFormatsExW( - IN DATEFMT_ENUMPROCEXW lpDateFmtEnumProcEx, - IN LCID Locale, - IN DWORD dwFlags); - -#else // ENABLE_DOWNLEVEL_FOR_NLS - -typedef BOOL (CALLBACK* DATEFMT_ENUMPROCEXEXW)(LPWSTR, CALID, LPARAM); - -PALIMPORT -BOOL -PALAPI -EnumDateFormatsExEx( - IN DATEFMT_ENUMPROCEXEXW lpDateFmtEnumProcEx, - IN LPCWSTR lpLocaleName, - IN DWORD dwFlags, - IN LPARAM lParam); - -#endif // ENABLE_DOWNLEVEL_FOR_NLS - -typedef BOOL (CALLBACK* TIMEFMT_ENUMPROCW)(LPWSTR); - -#if ENABLE_DOWNLEVEL_FOR_NLS - -PALIMPORT -BOOL -PALAPI -EnumTimeFormatsW( - IN TIMEFMT_ENUMPROCW lpTimeFmtEnumProc, - IN LCID Locale, - IN DWORD dwFlags); - -#else // ENABLE_DOWNLEVEL_FOR_NLS - -typedef BOOL (CALLBACK* TIMEFMT_ENUMPROCEXW)(LPWSTR, LPARAM); - -PALIMPORT -BOOL -PALAPI -EnumTimeFormatsEx( - IN TIMEFMT_ENUMPROCEXW lpTimeFmtEnumProc, - IN LPCWSTR lpLocaleName, - IN DWORD dwFlags, - IN LPARAM lParam); - -#endif // ENABLE_DOWNLEVEL_FOR_NLS - -#define ENUM_ALL_CALENDARS 0xffffffff // enumerate all calendars -#define CAL_ICALINTVALUE 0x00000001 // calendar type -#define CAL_NOUSEROVERRIDE LOCALE_NOUSEROVERRIDE // do not use user overrides -#define CAL_SCALNAME 0x00000002 // native name of calendar - -typedef BOOL (CALLBACK* CALINFO_ENUMPROCEXW)(LPWSTR,CALID); - -#if ENABLE_DOWNLEVEL_FOR_NLS - -PALIMPORT -BOOL -PALAPI -EnumCalendarInfoExW( - IN CALINFO_ENUMPROCEXW lpCalInfoEnumProc, - IN LCID Locale, - IN CALID Calendar, - IN CALTYPE CalType); - -#else // ENABLE_DOWNLEVEL_FOR_NLS - -typedef BOOL (CALLBACK* CALINFO_ENUMPROCEXEXW)(LPWSTR, CALID, LPWSTR, LPARAM); - -PALIMPORT -BOOL -PALAPI -EnumCalendarInfoExEx( - IN CALINFO_ENUMPROCEXEXW lpCalInfoEnumProc, - IN LPCWSTR lpLocaleName, - IN CALID Calendar, - IN LPCWSTR lpReserved, - IN CALTYPE CalType, - IN LPARAM lParam); - -#endif // ENABLE_DOWNLEVEL_FOR_NLS - -#define LCMAP_LOWERCASE 0x00000100 -#define LCMAP_UPPERCASE 0x00000200 - -#if ENABLE_DOWNLEVEL_FOR_NLS - -PALIMPORT -int -PALAPI -LCMapStringW( - IN LCID Locale, - IN DWORD dwMapFlags, - IN LPCWSTR lpSrcStr, - IN int cchSrc, - OUT LPWSTR lpDestStr, - IN int cchDest); - -#ifdef UNICODE -#define LCMapString LCMapStringW -#endif - - -#endif // ENABLE_DOWNLEVEL_FOR_NLS - - -PALIMPORT -int -PALAPI -LCMapStringEx( - IN LPCWSTR lpLocaleName, - IN DWORD dwMapFlags, - IN LPCWSTR lpSrcStr, - IN int cchSrc, - OUT LPWSTR lpDestStr, - IN int cchDest, - IN LPNLSVERSIONINFO lpVersionInformation, - IN LPVOID lpReserved, - IN LPARAM lParam ); - -PALIMPORT -int -PALAPI -PAL_LCMapCharW( - IN LPCWSTR lpLocaleName, - IN DWORD dwMapFlags, - IN WCHAR srcChar, - OUT WCHAR *destChar, - LPNLSVERSIONINFO lpVersionInformation, - LPVOID lpReserved, - LPARAM lParam ); - -PALIMPORT -int -PALAPI -PAL_NormalizeStringExW( - IN LPCWSTR lpLocaleName, - IN DWORD dwMapFlags, - IN LPCWSTR lpSrcStr, - IN int cchSrc, - OUT LPWSTR lpDestStr, - IN int cchDest); - -PALIMPORT -int -PALAPI -PAL_ParseDateW( - IN LPCWSTR lpLocaleName, - IN LPCWSTR lpFormat, - IN LPCWSTR lpString, - OUT LPSYSTEMTIME lpTime); - -PALIMPORT -int -PALAPI -PAL_GetCalendar( - IN LPCWSTR lpLocaleName, - OUT CALID* pCalendar); - -#define GEOID_NOT_AVAILABLE -1 - -#define DATE_USE_ALT_CALENDAR 0x00000004 - -#if ENABLE_DOWNLEVEL_FOR_NLS - -PALIMPORT -int -PALAPI -GetDateFormatW( - IN LCID Locale, - IN DWORD dwFlags, - IN CONST SYSTEMTIME *lpDate, - IN LPCWSTR lpFormat, - OUT LPWSTR lpDateStr, - IN int cchDate); - -#else - -PALIMPORT -int -PALAPI -GetDateFormatEx( - IN LPCWSTR Locale, - IN DWORD dwFlags, - IN CONST SYSTEMTIME *lpDate, - IN LPCWSTR lpFormat, - OUT LPWSTR lpDateStr, - IN int cchDate, - IN LPCWSTR lpCalendar); - - -#endif // ENABLE_DOWNLEVEL_FOR_NLS - -PALIMPORT -int -PALAPI -GetDateFormatEx( - IN LPCWSTR lpLocaleName, - IN DWORD dwFlags, - IN CONST SYSTEMTIME *lpDate, - IN LPCWSTR lpFormat, - OUT LPWSTR lpDateStr, - IN int cchDate, - LPCWSTR lpCalendar); - - -#ifdef UNICODE -#define GetDateFormat GetDateFormatW -#endif - - PALIMPORT int PALAPI diff --git a/src/pal/inc/palprivate.h b/src/pal/inc/palprivate.h index ce1a9a99a1..b9c9d08a2f 100644 --- a/src/pal/inc/palprivate.h +++ b/src/pal/inc/palprivate.h @@ -239,22 +239,6 @@ GetModuleFileNameA( OUT LPSTR lpFileName, IN DWORD nSize); -#if ENABLE_DOWNLEVEL_FOR_NLS - - -PALIMPORT -int -PALAPI -CompareStringA( - IN LCID Locale, - IN DWORD dwCmpFlags, - IN LPCSTR lpString1, - IN int cchCount1, - IN LPCSTR lpString2, - IN int cchCount2); - -#endif // ENABLE_DOWNLEVEL_FOR_NLS - PALIMPORT LPSTR diff --git a/src/pal/inc/rt/oleauto.h b/src/pal/inc/rt/oleauto.h index a8499f96d5..958476f482 100644 --- a/src/pal/inc/rt/oleauto.h +++ b/src/pal/inc/rt/oleauto.h @@ -84,14 +84,6 @@ typedef struct { #define VARCMP_GT 2 #define VARCMP_NULL 3 -#ifdef ENABLE_DOWNLEVEL_FOR_NLS -STDAPI VarParseNumFromStr(OLECHAR * strIn, LCID lcid, ULONG dwFlags, - NUMPARSE * pnumprs, BYTE * rgbDig); - -STDAPI VarNumFromParseNum(NUMPARSE * pnumprs, BYTE * rgbDig, - ULONG dwVtBits, VARIANT * pvar); -#endif - STDAPI VariantChangeType(VARIANTARG * pvargDest, VARIANTARG * pvarSrc, USHORT wFlags, VARTYPE vt); @@ -108,21 +100,6 @@ STDAPI VarCyFix(CY cyIn, LPCY pcyResult); STDAPI VarR8FromCy(CY cyIn, DOUBLE * pdblOut); STDAPI VarR4FromCy(CY cyIn, FLOAT * pfltOut); -#ifdef ENABLE_DOWNLEVEL_FOR_NLS -STDAPI VarBstrFromCy(CY cyIn, LCID lcid, ULONG dwFlags, BSTR * pbstrOut); -STDAPI VarBstrFromUI1(BYTE bVal, LCID lcid, ULONG dwFlags, BSTR * pbstrOut); -STDAPI VarBstrFromI2(SHORT iVal, LCID lcid, ULONG dwFlags, BSTR * pbstrOut); -STDAPI VarBstrFromI4(LONG lIn, LCID lcid, ULONG dwFlags, BSTR * pbstrOut); -STDAPI VarBstrFromI8(LONG64 i64In, LCID lcid, ULONG dwFlags, BSTR FAR* pbstrOut); -STDAPI VarBstrFromR4(FLOAT fltIn, LCID lcid, ULONG dwFlags, BSTR * pbstrOut); -STDAPI VarBstrFromR8(DOUBLE dblIn, LCID lcid, ULONG dwFlags, BSTR * pbstrOut); -STDAPI VarBstrFromI1(CHAR cIn, LCID lcid, ULONG dwFlags, BSTR *pbstrOut); -STDAPI VarBstrFromUI2(USHORT uiIn, LCID lcid, ULONG dwFlags, BSTR *pbstrOut); -STDAPI VarBstrFromUI4(ULONG ulIn, LCID lcid, ULONG dwFlags, BSTR *pbstrOut); -STDAPI VarBstrFromUI8(ULONG64 ui64In, LCID lcid, ULONG dwFlags, BSTR FAR* pbstrOut); -STDAPI VarBstrFromDec(DECIMAL *pdecIn, LCID lcid, ULONG dwFlags, BSTR *pbstrOut); -#endif - STDAPI VarDecFromR4(FLOAT fltIn, DECIMAL *pdecOut); STDAPI VarDecFromR8(DOUBLE dblIn, DECIMAL *pdecOut); STDAPI VarDecFromCy(CY cyIn, DECIMAL *pdecOut); @@ -147,10 +124,6 @@ STDAPI VarUI4FromDec(DECIMAL *pdecIn, ULONG *pUI4In); STDAPI VarR8FromDec(DECIMAL *pdecIn, DOUBLE *pdblOut); STDAPI VarR4FromDec(DECIMAL *pdecIn, FLOAT *pfltOut); -#ifdef ENABLE_DOWNLEVEL_FOR_NLS -STDAPI VarR8FromStr(OLECHAR *strin, LCID lcid, ULONG dwFlags, DOUBLE *pdblOut); -#endif - STDAPI VarI1FromR8(DOUBLE dblIn, CHAR *pcOut); STDAPI VarI2FromR8(DOUBLE dblIn, SHORT * psOut); STDAPI VarI4FromR8(DOUBLE dblIn, LONG * plOut); diff --git a/src/pal/src/include/pal/locale.h b/src/pal/src/include/pal/locale.h index f59ce2e174..52362e5166 100644 --- a/src/pal/src/include/pal/locale.h +++ b/src/pal/src/include/pal/locale.h @@ -43,10 +43,6 @@ extern "C" #endif // HAVE_COREFOUNDATION #if HAVE_COREFOUNDATION -#if !ENABLE_DOWNLEVEL_FOR_NLS -BOOL LocaleInitialize( void ); -void LocaleCleanup( void ); -#endif // !ENABLE_DOWNLEVEL_FOR_NLS typedef struct _CP_MAPPING diff --git a/src/pal/src/locale/unicode.cpp b/src/pal/src/locale/unicode.cpp index c9c1ae1c4d..05e916efcf 100644 --- a/src/pal/src/locale/unicode.cpp +++ b/src/pal/src/locale/unicode.cpp @@ -353,116 +353,6 @@ IsValidCodePage( return retval; } -#if ENABLE_DOWNLEVEL_FOR_NLS -/*++ -Function: -GetStringTypeEx - -See MSDN doc. ---*/ -BOOL -PALAPI -GetStringTypeExW( - IN LCID Locale, - IN DWORD dwInfoType, - IN LPCWSTR lpSrcStr, - IN int cchSrc, - OUT LPWORD lpCharType) -{ - - - int i = 0; -#if !HAVE_COREFOUNDATION - UnicodeDataRec unicodeDataRec; -#endif /* !HAVE_COREFOUNDATION */ - BOOL bRet = TRUE; - wchar_t wcstr ; - PERF_ENTRY(GetStringTypeExW); - ENTRY("GetStringTypeExW(Locale=%#x, dwInfoType=%#x, lpSrcStr=%p (%S), " - "cchSrc=%d, lpCharType=%p)\n", - Locale, dwInfoType, lpSrcStr?lpSrcStr:W16_NULLSTRING, lpSrcStr?lpSrcStr:W16_NULLSTRING, cchSrc, lpCharType); - - if((Locale != LOCALE_USER_DEFAULT)||(dwInfoType != CT_CTYPE1) - || (cchSrc != 1) || (lpSrcStr == (LPCWSTR)lpCharType)) - { - ASSERT("One of the input parameters is invalid\n"); - SetLastError(ERROR_INVALID_PARAMETER); - bRet = FALSE; - goto GetStringTypeExExit; - } - - - /* - * get length if needed... - */ - if(cchSrc == -1) - { - cchSrc = PAL_wcslen(lpSrcStr); - } - - /* - * Loop through each character of the source string and update - * lpCharType accordingly. - */ - for(i = 0; i < cchSrc; i++) - { - wcstr = lpSrcStr[i]; -#if HAVE_COREFOUNDATION - lpCharType[i] = 0; - if (PAL_iswlower(wcstr)) - { - lpCharType[i] |= C1_LOWER; - } - if (PAL_iswupper(wcstr)) - { - lpCharType[i] |= C1_UPPER; - } - if (PAL_iswalpha(wcstr)) - { - lpCharType[i] |= C1_ALPHA; - } - if (PAL_iswdigit(wcstr)) - { - lpCharType[i] |= C1_DIGIT; - } - if (PAL_iswspace(wcstr)) - { - lpCharType[i] |= C1_SPACE; - } - if (PAL_iswblank(wcstr)) - { - lpCharType[i] |= C1_BLANK; - } - if (PAL_iswcntrl(wcstr)) - { - lpCharType[i] |= C1_CNTRL; - } - if (PAL_iswpunct(wcstr)) - { - lpCharType[i] |= C1_PUNCT; - } -#else /* HAVE_COREFOUNDATION */ - /* - * Get the unicode data record for that character. - */ - if(GetUnicodeData(wcstr, &unicodeDataRec)) - { - lpCharType[i] = unicodeDataRec.C1_TYPE_FLAGS; - } - else - { - lpCharType[i] = 0; - } -#endif /* HAVE_COREFOUNDATION */ - } - - GetStringTypeExExit: - LOGEXIT("GetStringTypeEx returns BOOL %d\n", bRet); - PERF_EXIT(GetStringTypeExW); - return bRet; -} -#endif // ENABLE_DOWNLEVEL_FOR_NLS - /*++ Function: GetCPInfo diff --git a/src/pal/src/misc/fmtmessage.cpp b/src/pal/src/misc/fmtmessage.cpp index 70b854aa9c..fcf749b51f 100644 --- a/src/pal/src/misc/fmtmessage.cpp +++ b/src/pal/src/misc/fmtmessage.cpp @@ -336,11 +336,7 @@ FormatMessageW( } if ( !( dwFlags & FORMAT_MESSAGE_FROM_STRING ) && - ( dwLanguageId != 0 -#if ENABLE_DOWNLEVEL_FOR_NLS - && dwLanguageId != MAKELANGID( LANG_NEUTRAL, SUBLANG_DEFAULT ) -#endif - ) ) + ( dwLanguageId != 0) ) { ERROR( "Invalid language indentifier.\n" ); SetLastError( ERROR_RESOURCE_LANG_NOT_FOUND ); diff --git a/src/pal/tests/palsuite/locale_info/CMakeLists.txt b/src/pal/tests/palsuite/locale_info/CMakeLists.txt index 52482daa41..c9756e97a3 100644 --- a/src/pal/tests/palsuite/locale_info/CMakeLists.txt +++ b/src/pal/tests/palsuite/locale_info/CMakeLists.txt @@ -4,7 +4,6 @@ cmake_minimum_required(VERSION 2.8.12.2) # add_subdirectory(CompareStringA) # add_subdirectory(CompareStringW) # add_subdirectory(GetLocaleInfoW) -# add_subdirectory(GetStringTypeExW) # add_subdirectory(GetSystemDefaultLangID) # add_subdirectory(GetThreadLocale) # add_subdirectory(GetTimeZoneInformation) diff --git a/src/pal/tests/palsuite/locale_info/GetStringTypeExW/CMakeLists.txt b/src/pal/tests/palsuite/locale_info/GetStringTypeExW/CMakeLists.txt deleted file mode 100644 index ef14ea5352..0000000000 --- a/src/pal/tests/palsuite/locale_info/GetStringTypeExW/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -add_subdirectory(test1) -add_subdirectory(test2) - diff --git a/src/pal/tests/palsuite/locale_info/GetStringTypeExW/test1/CMakeLists.txt b/src/pal/tests/palsuite/locale_info/GetStringTypeExW/test1/CMakeLists.txt deleted file mode 100644 index 9d6e4e2be8..0000000000 --- a/src/pal/tests/palsuite/locale_info/GetStringTypeExW/test1/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test1.cpp -) - -add_executable(paltest_getstringtypeexw_test1 - ${SOURCES} -) - -add_dependencies(paltest_getstringtypeexw_test1 coreclrpal) - -target_link_libraries(paltest_getstringtypeexw_test1 - ${COMMON_TEST_LIBRARIES} -) diff --git a/src/pal/tests/palsuite/locale_info/GetStringTypeExW/test1/test1.cpp b/src/pal/tests/palsuite/locale_info/GetStringTypeExW/test1/test1.cpp deleted file mode 100644 index e15c3d66cd..0000000000 --- a/src/pal/tests/palsuite/locale_info/GetStringTypeExW/test1/test1.cpp +++ /dev/null @@ -1,54 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/*============================================================================ -** -** Source: test1.c -** -** Purpose: Tests GetStringTypeExW with values that will ensure all possible -** flags get set once. -** -** -**==========================================================================*/ - -#include <palsuite.h> - - -int __cdecl main(int argc, char *argv[]) -{ - WCHAR wideStr[] = {'9',' '}; - WORD values1[] = { C1_DIGIT, C1_SPACE }; - int len = 2; - WORD Info[256]; - BOOL ret; - int i; - - if (PAL_Initialize(argc, argv)) - { - return FAIL; - } - - for (i=0; i<len; i++) - { - ret = GetStringTypeExW(LOCALE_USER_DEFAULT, CT_CTYPE1, &wideStr[i], 1, &Info[i]); - if (!ret) - { - Fail("GetStringTypeExW failed!\n"); - } - - if ((Info[i] & values1[i])!= values1[i]) - { - - Fail("GetStringTypeExW returned wrong type info for %c (%d)\n" - "Expected %#x, got %#x\n", wideStr[i], wideStr[i], - values1[i], Info[i]); - - } - } - - PAL_Terminate(); - - return PASS; -} - diff --git a/src/pal/tests/palsuite/locale_info/GetStringTypeExW/test1/testinfo.dat b/src/pal/tests/palsuite/locale_info/GetStringTypeExW/test1/testinfo.dat deleted file mode 100644 index b0fbea4c05..0000000000 --- a/src/pal/tests/palsuite/locale_info/GetStringTypeExW/test1/testinfo.dat +++ /dev/null @@ -1,13 +0,0 @@ -# Licensed to the .NET Foundation under one or more agreements. -# The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. - -Version = 1.0 -Section = Locale Information -Function = GetStringTypeExW -Name = Test #1 for GetStringTypeExW -TYPE = DEFAULT -EXE1 = test1 -Description -=Tests GetStringTypeExW with values that will ensure all possible -=flags get set once. diff --git a/src/pal/tests/palsuite/locale_info/GetStringTypeExW/test2/CMakeLists.txt b/src/pal/tests/palsuite/locale_info/GetStringTypeExW/test2/CMakeLists.txt deleted file mode 100644 index 7f90601ef9..0000000000 --- a/src/pal/tests/palsuite/locale_info/GetStringTypeExW/test2/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12.2) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(SOURCES - test2.cpp -) - -add_executable(paltest_getstringtypeexw_test2 - ${SOURCES} -) - -add_dependencies(paltest_getstringtypeexw_test2 coreclrpal) - -target_link_libraries(paltest_getstringtypeexw_test2 - ${COMMON_TEST_LIBRARIES} -) diff --git a/src/pal/tests/palsuite/locale_info/GetStringTypeExW/test2/test2.cpp b/src/pal/tests/palsuite/locale_info/GetStringTypeExW/test2/test2.cpp deleted file mode 100644 index 6dca7e8ac5..0000000000 --- a/src/pal/tests/palsuite/locale_info/GetStringTypeExW/test2/test2.cpp +++ /dev/null @@ -1,78 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/*============================================================================ -** -** Source: test2.c -** -** Purpose: Tests GetStringTypeExW with values from every possible unicode -** category. -** -** -**==========================================================================*/ - -#include <palsuite.h> - - -/* - * A random selection of unicode characters, each representing a distinct - * unicode category - */ -WCHAR TestStr[] = -{ - 0x05D0, /* 4, HEBREW LETTER ALEF */ - 0x0488, /* 7, COMBINING CYRILLIC HUNDRED THOUSANDS SIGN */ - 0x0030, /* 8, DIGIT ZERO */ - 0x0020, /* 22, SPACE */ -}; - -#define TEST_LEN (sizeof(TestStr) / sizeof(WCHAR)) - -WORD TestFlags[TEST_LEN] = -{ - C1_ALPHA, - 0, - C1_DIGIT, - C1_BLANK|C1_SPACE -}; - -int __cdecl main(int argc, char *argv[]) -{ - WORD Info; - BOOL ret; - int i; - - /* check only the bits listed in rotor_pal.doc */ - const WORD PAL_VALID_C1_BITS = C1_DIGIT | C1_SPACE; - - if (PAL_Initialize(argc, argv)) - { - return FAIL; - } - - for (i=0; i <TEST_LEN; i++) - { - ret = GetStringTypeExW(LOCALE_USER_DEFAULT, CT_CTYPE1, &TestStr[i], 1, &Info); - - if (!ret) - { - Fail("GetStringTypeExW failed!\n"); - } - - if ((Info & PAL_VALID_C1_BITS) != (TestFlags[i] & PAL_VALID_C1_BITS)) - { - - Fail("GetStringTypeExW (test #%i) returned wrong type info for %c (%d)\n" - "Expected %#x, got %#x\n", i, TestStr[i], TestStr[i], - TestFlags[i], Info); - - } - } - - PAL_Terminate(); - - return PASS; -} - - diff --git a/src/pal/tests/palsuite/locale_info/GetStringTypeExW/test2/testinfo.dat b/src/pal/tests/palsuite/locale_info/GetStringTypeExW/test2/testinfo.dat deleted file mode 100644 index 361d29b450..0000000000 --- a/src/pal/tests/palsuite/locale_info/GetStringTypeExW/test2/testinfo.dat +++ /dev/null @@ -1,12 +0,0 @@ -# Licensed to the .NET Foundation under one or more agreements. -# The .NET Foundation licenses this file to you under the MIT license. -# See the LICENSE file in the project root for more information. - -Version = 1.0 -Section = Locale Information -Function = GetStringTypeExW -Name = Test #2 for GetStringTypeExW -TYPE = DEFAULT -EXE1 = test2 -Description -=Tests GetStringTypeExW with values from every possible unicode category. |