Reimplement GetStringTypeA and GetStringTypeExA.
This commit is contained in:
parent
4062cd924f
commit
c59655ede0
|
@ -396,3 +396,43 @@ BOOL WINAPI GetStringTypeExW( LCID locale, DWORD type, LPCWSTR src, INT count, L
|
|||
/* locale is ignored for Unicode */
|
||||
return GetStringTypeW( type, src, count, chartype );
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* GetStringTypeA [KERNEL32.@]
|
||||
*/
|
||||
BOOL WINAPI GetStringTypeA(LCID locale, DWORD type, LPCSTR src, INT count, LPWORD chartype)
|
||||
{
|
||||
char buf[20];
|
||||
UINT cp;
|
||||
INT countW;
|
||||
LPWSTR srcW;
|
||||
BOOL ret = FALSE;
|
||||
|
||||
if(count == -1) count = strlen(src) + 1;
|
||||
|
||||
if(!GetLocaleInfoA(locale, LOCALE_IDEFAULTANSICODEPAGE | LOCALE_NOUSEROVERRIDE,
|
||||
buf, sizeof(buf)))
|
||||
{
|
||||
FIXME("For locale %04lx using current ANSI code page\n", locale);
|
||||
cp = GetACP();
|
||||
}
|
||||
else
|
||||
cp = atoi(buf);
|
||||
|
||||
countW = MultiByteToWideChar(cp, 0, src, count, NULL, 0);
|
||||
if((srcW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))))
|
||||
{
|
||||
MultiByteToWideChar(cp, 0, src, count, srcW, countW);
|
||||
ret = GetStringTypeW(type, srcW, count, chartype);
|
||||
HeapFree(GetProcessHeap(), 0, srcW);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* GetStringTypeExA [KERNEL32.@]
|
||||
*/
|
||||
BOOL WINAPI GetStringTypeExA(LCID locale, DWORD type, LPCSTR src, INT count, LPWORD chartype)
|
||||
{
|
||||
return GetStringTypeA(locale, type, src, count, chartype);
|
||||
}
|
||||
|
|
585
ole/ole2nls.c
585
ole/ole2nls.c
|
@ -811,591 +811,6 @@ BOOL WINAPI EnumSystemLocalesA(LOCALE_ENUMPROCA lpfnLocaleEnum,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static const unsigned char CT_CType2_LUT[] = {
|
||||
C2_NOTAPPLICABLE, /* - 0 */
|
||||
C2_NOTAPPLICABLE, /* - 1 */
|
||||
C2_NOTAPPLICABLE, /* - 2 */
|
||||
C2_NOTAPPLICABLE, /* - 3 */
|
||||
C2_NOTAPPLICABLE, /* - 4 */
|
||||
C2_NOTAPPLICABLE, /* - 5 */
|
||||
C2_NOTAPPLICABLE, /* - 6 */
|
||||
C2_NOTAPPLICABLE, /* - 7 */
|
||||
C2_NOTAPPLICABLE, /* - 8 */
|
||||
C2_SEGMENTSEPARATOR, /* - 9 */
|
||||
C2_NOTAPPLICABLE, /* - 10 */
|
||||
C2_NOTAPPLICABLE, /* - 11 */
|
||||
C2_NOTAPPLICABLE, /* - 12 */
|
||||
C2_NOTAPPLICABLE, /* - 13 */
|
||||
C2_NOTAPPLICABLE, /* - 14 */
|
||||
C2_NOTAPPLICABLE, /* - 15 */
|
||||
C2_NOTAPPLICABLE, /* - 16 */
|
||||
C2_NOTAPPLICABLE, /* - 17 */
|
||||
C2_NOTAPPLICABLE, /* - 18 */
|
||||
C2_NOTAPPLICABLE, /* - 19 */
|
||||
C2_NOTAPPLICABLE, /* - 20 */
|
||||
C2_NOTAPPLICABLE, /* - 21 */
|
||||
C2_NOTAPPLICABLE, /* - 22 */
|
||||
C2_NOTAPPLICABLE, /* - 23 */
|
||||
C2_NOTAPPLICABLE, /* - 24 */
|
||||
C2_NOTAPPLICABLE, /* - 25 */
|
||||
C2_NOTAPPLICABLE, /* - 26 */
|
||||
C2_NOTAPPLICABLE, /* - 27 */
|
||||
C2_NOTAPPLICABLE, /* - 28 */
|
||||
C2_NOTAPPLICABLE, /* - 29 */
|
||||
C2_NOTAPPLICABLE, /* - 30 */
|
||||
C2_NOTAPPLICABLE, /* - 31 */
|
||||
C2_WHITESPACE, /* - 32 */
|
||||
C2_OTHERNEUTRAL, /* ! - 33 */
|
||||
C2_OTHERNEUTRAL, /* " - 34 */ /* " */
|
||||
C2_EUROPETERMINATOR, /* # - 35 */
|
||||
C2_EUROPETERMINATOR, /* $ - 36 */
|
||||
C2_EUROPETERMINATOR, /* % - 37 */
|
||||
C2_LEFTTORIGHT, /* & - 38 */
|
||||
C2_OTHERNEUTRAL, /* ' - 39 */
|
||||
C2_OTHERNEUTRAL, /* ( - 40 */
|
||||
C2_OTHERNEUTRAL, /* ) - 41 */
|
||||
C2_OTHERNEUTRAL, /* * - 42 */
|
||||
C2_EUROPETERMINATOR, /* + - 43 */
|
||||
C2_COMMONSEPARATOR, /* , - 44 */
|
||||
C2_EUROPETERMINATOR, /* - - 45 */
|
||||
C2_EUROPESEPARATOR, /* . - 46 */
|
||||
C2_EUROPESEPARATOR, /* / - 47 */
|
||||
C2_EUROPENUMBER, /* 0 - 48 */
|
||||
C2_EUROPENUMBER, /* 1 - 49 */
|
||||
C2_EUROPENUMBER, /* 2 - 50 */
|
||||
C2_EUROPENUMBER, /* 3 - 51 */
|
||||
C2_EUROPENUMBER, /* 4 - 52 */
|
||||
C2_EUROPENUMBER, /* 5 - 53 */
|
||||
C2_EUROPENUMBER, /* 6 - 54 */
|
||||
C2_EUROPENUMBER, /* 7 - 55 */
|
||||
C2_EUROPENUMBER, /* 8 - 56 */
|
||||
C2_EUROPENUMBER, /* 9 - 57 */
|
||||
C2_COMMONSEPARATOR, /* : - 58 */
|
||||
C2_OTHERNEUTRAL, /* ; - 59 */
|
||||
C2_OTHERNEUTRAL, /* < - 60 */
|
||||
C2_OTHERNEUTRAL, /* = - 61 */
|
||||
C2_OTHERNEUTRAL, /* > - 62 */
|
||||
C2_OTHERNEUTRAL, /* ? - 63 */
|
||||
C2_LEFTTORIGHT, /* @ - 64 */
|
||||
C2_LEFTTORIGHT, /* A - 65 */
|
||||
C2_LEFTTORIGHT, /* B - 66 */
|
||||
C2_LEFTTORIGHT, /* C - 67 */
|
||||
C2_LEFTTORIGHT, /* D - 68 */
|
||||
C2_LEFTTORIGHT, /* E - 69 */
|
||||
C2_LEFTTORIGHT, /* F - 70 */
|
||||
C2_LEFTTORIGHT, /* G - 71 */
|
||||
C2_LEFTTORIGHT, /* H - 72 */
|
||||
C2_LEFTTORIGHT, /* I - 73 */
|
||||
C2_LEFTTORIGHT, /* J - 74 */
|
||||
C2_LEFTTORIGHT, /* K - 75 */
|
||||
C2_LEFTTORIGHT, /* L - 76 */
|
||||
C2_LEFTTORIGHT, /* M - 77 */
|
||||
C2_LEFTTORIGHT, /* N - 78 */
|
||||
C2_LEFTTORIGHT, /* O - 79 */
|
||||
C2_LEFTTORIGHT, /* P - 80 */
|
||||
C2_LEFTTORIGHT, /* Q - 81 */
|
||||
C2_LEFTTORIGHT, /* R - 82 */
|
||||
C2_LEFTTORIGHT, /* S - 83 */
|
||||
C2_LEFTTORIGHT, /* T - 84 */
|
||||
C2_LEFTTORIGHT, /* U - 85 */
|
||||
C2_LEFTTORIGHT, /* V - 86 */
|
||||
C2_LEFTTORIGHT, /* W - 87 */
|
||||
C2_LEFTTORIGHT, /* X - 88 */
|
||||
C2_LEFTTORIGHT, /* Y - 89 */
|
||||
C2_LEFTTORIGHT, /* Z - 90 */
|
||||
C2_OTHERNEUTRAL, /* [ - 91 */
|
||||
C2_OTHERNEUTRAL, /* \ - 92 */
|
||||
C2_OTHERNEUTRAL, /* ] - 93 */
|
||||
C2_OTHERNEUTRAL, /* ^ - 94 */
|
||||
C2_OTHERNEUTRAL, /* _ - 95 */
|
||||
C2_OTHERNEUTRAL, /* ` - 96 */
|
||||
C2_LEFTTORIGHT, /* a - 97 */
|
||||
C2_LEFTTORIGHT, /* b - 98 */
|
||||
C2_LEFTTORIGHT, /* c - 99 */
|
||||
C2_LEFTTORIGHT, /* d - 100 */
|
||||
C2_LEFTTORIGHT, /* e - 101 */
|
||||
C2_LEFTTORIGHT, /* f - 102 */
|
||||
C2_LEFTTORIGHT, /* g - 103 */
|
||||
C2_LEFTTORIGHT, /* h - 104 */
|
||||
C2_LEFTTORIGHT, /* i - 105 */
|
||||
C2_LEFTTORIGHT, /* j - 106 */
|
||||
C2_LEFTTORIGHT, /* k - 107 */
|
||||
C2_LEFTTORIGHT, /* l - 108 */
|
||||
C2_LEFTTORIGHT, /* m - 109 */
|
||||
C2_LEFTTORIGHT, /* n - 110 */
|
||||
C2_LEFTTORIGHT, /* o - 111 */
|
||||
C2_LEFTTORIGHT, /* p - 112 */
|
||||
C2_LEFTTORIGHT, /* q - 113 */
|
||||
C2_LEFTTORIGHT, /* r - 114 */
|
||||
C2_LEFTTORIGHT, /* s - 115 */
|
||||
C2_LEFTTORIGHT, /* t - 116 */
|
||||
C2_LEFTTORIGHT, /* u - 117 */
|
||||
C2_LEFTTORIGHT, /* v - 118 */
|
||||
C2_LEFTTORIGHT, /* w - 119 */
|
||||
C2_LEFTTORIGHT, /* x - 120 */
|
||||
C2_LEFTTORIGHT, /* y - 121 */
|
||||
C2_LEFTTORIGHT, /* z - 122 */
|
||||
C2_OTHERNEUTRAL, /* { - 123 */
|
||||
C2_OTHERNEUTRAL, /* | - 124 */
|
||||
C2_OTHERNEUTRAL, /* } - 125 */
|
||||
C2_OTHERNEUTRAL, /* ~ - 126 */
|
||||
C2_NOTAPPLICABLE, /* - 127 */
|
||||
C2_NOTAPPLICABLE, /* € - 128 */
|
||||
C2_NOTAPPLICABLE, /* <20> - 129 */
|
||||
C2_OTHERNEUTRAL, /* ‚ - 130 */
|
||||
C2_LEFTTORIGHT, /* ƒ - 131 */
|
||||
C2_OTHERNEUTRAL, /* „ - 132 */
|
||||
C2_OTHERNEUTRAL, /* … - 133 */
|
||||
C2_OTHERNEUTRAL, /* † - 134 */
|
||||
C2_OTHERNEUTRAL, /* ‡ - 135 */
|
||||
C2_LEFTTORIGHT, /* ˆ - 136 */
|
||||
C2_EUROPETERMINATOR, /* ‰ - 137 */
|
||||
C2_LEFTTORIGHT, /* Š - 138 */
|
||||
C2_OTHERNEUTRAL, /* ‹ - 139 */
|
||||
C2_LEFTTORIGHT, /* Œ - 140 */
|
||||
C2_NOTAPPLICABLE, /* <20> - 141 */
|
||||
C2_NOTAPPLICABLE, /* Ž - 142 */
|
||||
C2_NOTAPPLICABLE, /* <20> - 143 */
|
||||
C2_NOTAPPLICABLE, /* <20> - 144 */
|
||||
C2_OTHERNEUTRAL, /* ‘ - 145 */
|
||||
C2_OTHERNEUTRAL, /* ’ - 146 */
|
||||
C2_OTHERNEUTRAL, /* “ - 147 */
|
||||
C2_OTHERNEUTRAL, /* ” - 148 */
|
||||
C2_OTHERNEUTRAL, /* • - 149 */
|
||||
C2_OTHERNEUTRAL, /* – - 150 */
|
||||
C2_OTHERNEUTRAL, /* — - 151 */
|
||||
C2_LEFTTORIGHT, /* ˜ - 152 */
|
||||
C2_OTHERNEUTRAL, /* ™ - 153 */
|
||||
C2_LEFTTORIGHT, /* š - 154 */
|
||||
C2_OTHERNEUTRAL, /* › - 155 */
|
||||
C2_LEFTTORIGHT, /* œ - 156 */
|
||||
C2_NOTAPPLICABLE, /* <20> - 157 */
|
||||
C2_NOTAPPLICABLE, /* ž - 158 */
|
||||
C2_LEFTTORIGHT, /* Ÿ - 159 */
|
||||
C2_WHITESPACE, /* - 160 */
|
||||
C2_OTHERNEUTRAL, /* ¡ - 161 */
|
||||
C2_EUROPETERMINATOR, /* ¢ - 162 */
|
||||
C2_EUROPETERMINATOR, /* £ - 163 */
|
||||
C2_EUROPETERMINATOR, /* ¤ - 164 */
|
||||
C2_EUROPETERMINATOR, /* ¥ - 165 */
|
||||
C2_OTHERNEUTRAL, /* ¦ - 166 */
|
||||
C2_OTHERNEUTRAL, /* § - 167 */
|
||||
C2_OTHERNEUTRAL, /* ¨ - 168 */
|
||||
C2_OTHERNEUTRAL, /* © - 169 */
|
||||
C2_OTHERNEUTRAL, /* ª - 170 */
|
||||
C2_OTHERNEUTRAL, /* « - 171 */
|
||||
C2_OTHERNEUTRAL, /* ¬ - 172 */
|
||||
C2_OTHERNEUTRAL, /* - 173 */
|
||||
C2_OTHERNEUTRAL, /* ® - 174 */
|
||||
C2_OTHERNEUTRAL, /* ¯ - 175 */
|
||||
C2_EUROPETERMINATOR, /* ° - 176 */
|
||||
C2_EUROPETERMINATOR, /* ± - 177 */
|
||||
C2_EUROPENUMBER, /* ² - 178 */
|
||||
C2_EUROPENUMBER, /* ³ - 179 */
|
||||
C2_OTHERNEUTRAL, /* ´ - 180 */
|
||||
C2_OTHERNEUTRAL, /* µ - 181 */
|
||||
C2_OTHERNEUTRAL, /* ¶ - 182 */
|
||||
C2_OTHERNEUTRAL, /* · - 183 */
|
||||
C2_OTHERNEUTRAL, /* ¸ - 184 */
|
||||
C2_EUROPENUMBER, /* ¹ - 185 */
|
||||
C2_OTHERNEUTRAL, /* º - 186 */
|
||||
C2_OTHERNEUTRAL, /* » - 187 */
|
||||
C2_OTHERNEUTRAL, /* ¼ - 188 */
|
||||
C2_OTHERNEUTRAL, /* ½ - 189 */
|
||||
C2_OTHERNEUTRAL, /* ¾ - 190 */
|
||||
C2_OTHERNEUTRAL, /* ¿ - 191 */
|
||||
C2_LEFTTORIGHT, /* À - 192 */
|
||||
C2_LEFTTORIGHT, /* Á - 193 */
|
||||
C2_LEFTTORIGHT, /* Â - 194 */
|
||||
C2_LEFTTORIGHT, /* Ã - 195 */
|
||||
C2_LEFTTORIGHT, /* Ä - 196 */
|
||||
C2_LEFTTORIGHT, /* Å - 197 */
|
||||
C2_LEFTTORIGHT, /* Æ - 198 */
|
||||
C2_LEFTTORIGHT, /* Ç - 199 */
|
||||
C2_LEFTTORIGHT, /* È - 200 */
|
||||
C2_LEFTTORIGHT, /* É - 201 */
|
||||
C2_LEFTTORIGHT, /* Ê - 202 */
|
||||
C2_LEFTTORIGHT, /* Ë - 203 */
|
||||
C2_LEFTTORIGHT, /* Ì - 204 */
|
||||
C2_LEFTTORIGHT, /* Í - 205 */
|
||||
C2_LEFTTORIGHT, /* Î - 206 */
|
||||
C2_LEFTTORIGHT, /* Ï - 207 */
|
||||
C2_LEFTTORIGHT, /* Ð - 208 */
|
||||
C2_LEFTTORIGHT, /* Ñ - 209 */
|
||||
C2_LEFTTORIGHT, /* Ò - 210 */
|
||||
C2_LEFTTORIGHT, /* Ó - 211 */
|
||||
C2_LEFTTORIGHT, /* Ô - 212 */
|
||||
C2_LEFTTORIGHT, /* Õ - 213 */
|
||||
C2_LEFTTORIGHT, /* Ö - 214 */
|
||||
C2_OTHERNEUTRAL, /* × - 215 */
|
||||
C2_LEFTTORIGHT, /* Ø - 216 */
|
||||
C2_LEFTTORIGHT, /* Ù - 217 */
|
||||
C2_LEFTTORIGHT, /* Ú - 218 */
|
||||
C2_LEFTTORIGHT, /* Û - 219 */
|
||||
C2_LEFTTORIGHT, /* Ü - 220 */
|
||||
C2_LEFTTORIGHT, /* Ý - 221 */
|
||||
C2_LEFTTORIGHT, /* Þ - 222 */
|
||||
C2_LEFTTORIGHT, /* ß - 223 */
|
||||
C2_LEFTTORIGHT, /* à - 224 */
|
||||
C2_LEFTTORIGHT, /* á - 225 */
|
||||
C2_LEFTTORIGHT, /* â - 226 */
|
||||
C2_LEFTTORIGHT, /* ã - 227 */
|
||||
C2_LEFTTORIGHT, /* ä - 228 */
|
||||
C2_LEFTTORIGHT, /* å - 229 */
|
||||
C2_LEFTTORIGHT, /* æ - 230 */
|
||||
C2_LEFTTORIGHT, /* ç - 231 */
|
||||
C2_LEFTTORIGHT, /* è - 232 */
|
||||
C2_LEFTTORIGHT, /* é - 233 */
|
||||
C2_LEFTTORIGHT, /* ê - 234 */
|
||||
C2_LEFTTORIGHT, /* ë - 235 */
|
||||
C2_LEFTTORIGHT, /* ì - 236 */
|
||||
C2_LEFTTORIGHT, /* í - 237 */
|
||||
C2_LEFTTORIGHT, /* î - 238 */
|
||||
C2_LEFTTORIGHT, /* ï - 239 */
|
||||
C2_LEFTTORIGHT, /* ð - 240 */
|
||||
C2_LEFTTORIGHT, /* ñ - 241 */
|
||||
C2_LEFTTORIGHT, /* ò - 242 */
|
||||
C2_LEFTTORIGHT, /* ó - 243 */
|
||||
C2_LEFTTORIGHT, /* ô - 244 */
|
||||
C2_LEFTTORIGHT, /* õ - 245 */
|
||||
C2_LEFTTORIGHT, /* ö - 246 */
|
||||
C2_OTHERNEUTRAL, /* ÷ - 247 */
|
||||
C2_LEFTTORIGHT, /* ø - 248 */
|
||||
C2_LEFTTORIGHT, /* ù - 249 */
|
||||
C2_LEFTTORIGHT, /* ú - 250 */
|
||||
C2_LEFTTORIGHT, /* û - 251 */
|
||||
C2_LEFTTORIGHT, /* ü - 252 */
|
||||
C2_LEFTTORIGHT, /* ý - 253 */
|
||||
C2_LEFTTORIGHT, /* þ - 254 */
|
||||
C2_LEFTTORIGHT /* ÿ - 255 */
|
||||
};
|
||||
|
||||
static const WORD OLE2NLS_CT_CType3_LUT[] = {
|
||||
0x0000, /* - 0 */
|
||||
0x0000, /* - 1 */
|
||||
0x0000, /* - 2 */
|
||||
0x0000, /* - 3 */
|
||||
0x0000, /* - 4 */
|
||||
0x0000, /* - 5 */
|
||||
0x0000, /* - 6 */
|
||||
0x0000, /* - 7 */
|
||||
0x0000, /* - 8 */
|
||||
0x0008, /* - 9 */
|
||||
0x0008, /* - 10 */
|
||||
0x0008, /* - 11 */
|
||||
0x0008, /* - 12 */
|
||||
0x0008, /* - 13 */
|
||||
0x0000, /* - 14 */
|
||||
0x0000, /* - 15 */
|
||||
0x0000, /* - 16 */
|
||||
0x0000, /* - 17 */
|
||||
0x0000, /* - 18 */
|
||||
0x0000, /* - 19 */
|
||||
0x0000, /* - 20 */
|
||||
0x0000, /* - 21 */
|
||||
0x0000, /* - 22 */
|
||||
0x0000, /* - 23 */
|
||||
0x0000, /* - 24 */
|
||||
0x0000, /* - 25 */
|
||||
0x0000, /* - 26 */
|
||||
0x0000, /* - 27 */
|
||||
0x0000, /* - 28 */
|
||||
0x0000, /* - 29 */
|
||||
0x0000, /* - 30 */
|
||||
0x0000, /* - 31 */
|
||||
0x0048, /* - 32 */
|
||||
0x0048, /* ! - 33 */
|
||||
0x0448, /* " - 34 */ /* " */
|
||||
0x0048, /* # - 35 */
|
||||
0x0448, /* $ - 36 */
|
||||
0x0048, /* % - 37 */
|
||||
0x0048, /* & - 38 */
|
||||
0x0440, /* ' - 39 */
|
||||
0x0048, /* ( - 40 */
|
||||
0x0048, /* ) - 41 */
|
||||
0x0048, /* * - 42 */
|
||||
0x0048, /* + - 43 */
|
||||
0x0048, /* , - 44 */
|
||||
0x0440, /* - - 45 */
|
||||
0x0048, /* . - 46 */
|
||||
0x0448, /* / - 47 */
|
||||
0x0040, /* 0 - 48 */
|
||||
0x0040, /* 1 - 49 */
|
||||
0x0040, /* 2 - 50 */
|
||||
0x0040, /* 3 - 51 */
|
||||
0x0040, /* 4 - 52 */
|
||||
0x0040, /* 5 - 53 */
|
||||
0x0040, /* 6 - 54 */
|
||||
0x0040, /* 7 - 55 */
|
||||
0x0040, /* 8 - 56 */
|
||||
0x0040, /* 9 - 57 */
|
||||
0x0048, /* : - 58 */
|
||||
0x0048, /* ; - 59 */
|
||||
0x0048, /* < - 60 */
|
||||
0x0448, /* = - 61 */
|
||||
0x0048, /* > - 62 */
|
||||
0x0048, /* ? - 63 */
|
||||
0x0448, /* @ - 64 */
|
||||
0x8040, /* A - 65 */
|
||||
0x8040, /* B - 66 */
|
||||
0x8040, /* C - 67 */
|
||||
0x8040, /* D - 68 */
|
||||
0x8040, /* E - 69 */
|
||||
0x8040, /* F - 70 */
|
||||
0x8040, /* G - 71 */
|
||||
0x8040, /* H - 72 */
|
||||
0x8040, /* I - 73 */
|
||||
0x8040, /* J - 74 */
|
||||
0x8040, /* K - 75 */
|
||||
0x8040, /* L - 76 */
|
||||
0x8040, /* M - 77 */
|
||||
0x8040, /* N - 78 */
|
||||
0x8040, /* O - 79 */
|
||||
0x8040, /* P - 80 */
|
||||
0x8040, /* Q - 81 */
|
||||
0x8040, /* R - 82 */
|
||||
0x8040, /* S - 83 */
|
||||
0x8040, /* T - 84 */
|
||||
0x8040, /* U - 85 */
|
||||
0x8040, /* V - 86 */
|
||||
0x8040, /* W - 87 */
|
||||
0x8040, /* X - 88 */
|
||||
0x8040, /* Y - 89 */
|
||||
0x8040, /* Z - 90 */
|
||||
0x0048, /* [ - 91 */
|
||||
0x0448, /* \ - 92 */
|
||||
0x0048, /* ] - 93 */
|
||||
0x0448, /* ^ - 94 */
|
||||
0x0448, /* _ - 95 */
|
||||
0x0448, /* ` - 96 */
|
||||
0x8040, /* a - 97 */
|
||||
0x8040, /* b - 98 */
|
||||
0x8040, /* c - 99 */
|
||||
0x8040, /* d - 100 */
|
||||
0x8040, /* e - 101 */
|
||||
0x8040, /* f - 102 */
|
||||
0x8040, /* g - 103 */
|
||||
0x8040, /* h - 104 */
|
||||
0x8040, /* i - 105 */
|
||||
0x8040, /* j - 106 */
|
||||
0x8040, /* k - 107 */
|
||||
0x8040, /* l - 108 */
|
||||
0x8040, /* m - 109 */
|
||||
0x8040, /* n - 110 */
|
||||
0x8040, /* o - 111 */
|
||||
0x8040, /* p - 112 */
|
||||
0x8040, /* q - 113 */
|
||||
0x8040, /* r - 114 */
|
||||
0x8040, /* s - 115 */
|
||||
0x8040, /* t - 116 */
|
||||
0x8040, /* u - 117 */
|
||||
0x8040, /* v - 118 */
|
||||
0x8040, /* w - 119 */
|
||||
0x8040, /* x - 120 */
|
||||
0x8040, /* y - 121 */
|
||||
0x8040, /* z - 122 */
|
||||
0x0048, /* { - 123 */
|
||||
0x0048, /* | - 124 */
|
||||
0x0048, /* } - 125 */
|
||||
0x0448, /* ~ - 126 */
|
||||
0x0000, /* - 127 */
|
||||
0x0000, /* € - 128 */
|
||||
0x0000, /* <20> - 129 */
|
||||
0x0008, /* ‚ - 130 */
|
||||
0x8000, /* ƒ - 131 */
|
||||
0x0008, /* „ - 132 */
|
||||
0x0008, /* … - 133 */
|
||||
0x0008, /* † - 134 */
|
||||
0x0008, /* ‡ - 135 */
|
||||
0x0001, /* ˆ - 136 */
|
||||
0x0008, /* ‰ - 137 */
|
||||
0x8003, /* Š - 138 */
|
||||
0x0008, /* ‹ - 139 */
|
||||
0x8000, /* Œ - 140 */
|
||||
0x0000, /* <20> - 141 */
|
||||
0x0000, /* Ž - 142 */
|
||||
0x0000, /* <20> - 143 */
|
||||
0x0000, /* <20> - 144 */
|
||||
0x0088, /* ‘ - 145 */
|
||||
0x0088, /* ’ - 146 */
|
||||
0x0088, /* “ - 147 */
|
||||
0x0088, /* ” - 148 */
|
||||
0x0008, /* • - 149 */
|
||||
0x0400, /* – - 150 */
|
||||
0x0400, /* — - 151 */
|
||||
0x0408, /* ˜ - 152 */
|
||||
0x0000, /* ™ - 153 */
|
||||
0x8003, /* š - 154 */
|
||||
0x0008, /* › - 155 */
|
||||
0x8000, /* œ - 156 */
|
||||
0x0000, /* <20> - 157 */
|
||||
0x0000, /* ž - 158 */
|
||||
0x8003, /* Ÿ - 159 */
|
||||
0x0008, /* - 160 */
|
||||
0x0008, /* ¡ - 161 */
|
||||
0x0048, /* ¢ - 162 */
|
||||
0x0048, /* £ - 163 */
|
||||
0x0008, /* ¤ - 164 */
|
||||
0x0048, /* ¥ - 165 */
|
||||
0x0048, /* ¦ - 166 */
|
||||
0x0008, /* § - 167 */
|
||||
0x0408, /* ¨ - 168 */
|
||||
0x0008, /* © - 169 */
|
||||
0x0400, /* ª - 170 */
|
||||
0x0008, /* « - 171 */
|
||||
0x0048, /* ¬ - 172 */
|
||||
0x0408, /* - 173 */
|
||||
0x0008, /* ® - 174 */
|
||||
0x0448, /* ¯ - 175 */
|
||||
0x0008, /* ° - 176 */
|
||||
0x0008, /* ± - 177 */
|
||||
0x0000, /* ² - 178 */
|
||||
0x0000, /* ³ - 179 */
|
||||
0x0408, /* ´ - 180 */
|
||||
0x0008, /* µ - 181 */
|
||||
0x0008, /* ¶ - 182 */
|
||||
0x0008, /* · - 183 */
|
||||
0x0408, /* ¸ - 184 */
|
||||
0x0000, /* ¹ - 185 */
|
||||
0x0400, /* º - 186 */
|
||||
0x0008, /* » - 187 */
|
||||
0x0000, /* ¼ - 188 */
|
||||
0x0000, /* ½ - 189 */
|
||||
0x0000, /* ¾ - 190 */
|
||||
0x0008, /* ¿ - 191 */
|
||||
0x8003, /* À - 192 */
|
||||
0x8003, /* Á - 193 */
|
||||
0x8003, /* Â - 194 */
|
||||
0x8003, /* Ã - 195 */
|
||||
0x8003, /* Ä - 196 */
|
||||
0x8003, /* Å - 197 */
|
||||
0x8000, /* Æ - 198 */
|
||||
0x8003, /* Ç - 199 */
|
||||
0x8003, /* È - 200 */
|
||||
0x8003, /* É - 201 */
|
||||
0x8003, /* Ê - 202 */
|
||||
0x8003, /* Ë - 203 */
|
||||
0x8003, /* Ì - 204 */
|
||||
0x8003, /* Í - 205 */
|
||||
0x8003, /* Î - 206 */
|
||||
0x8003, /* Ï - 207 */
|
||||
0x8000, /* Ð - 208 */
|
||||
0x8003, /* Ñ - 209 */
|
||||
0x8003, /* Ò - 210 */
|
||||
0x8003, /* Ó - 211 */
|
||||
0x8003, /* Ô - 212 */
|
||||
0x8003, /* Õ - 213 */
|
||||
0x8003, /* Ö - 214 */
|
||||
0x0008, /* × - 215 */
|
||||
0x8003, /* Ø - 216 */
|
||||
0x8003, /* Ù - 217 */
|
||||
0x8003, /* Ú - 218 */
|
||||
0x8003, /* Û - 219 */
|
||||
0x8003, /* Ü - 220 */
|
||||
0x8003, /* Ý - 221 */
|
||||
0x8000, /* Þ - 222 */
|
||||
0x8000, /* ß - 223 */
|
||||
0x8003, /* à - 224 */
|
||||
0x8003, /* á - 225 */
|
||||
0x8003, /* â - 226 */
|
||||
0x8003, /* ã - 227 */
|
||||
0x8003, /* ä - 228 */
|
||||
0x8003, /* å - 229 */
|
||||
0x8000, /* æ - 230 */
|
||||
0x8003, /* ç - 231 */
|
||||
0x8003, /* è - 232 */
|
||||
0x8003, /* é - 233 */
|
||||
0x8003, /* ê - 234 */
|
||||
0x8003, /* ë - 235 */
|
||||
0x8003, /* ì - 236 */
|
||||
0x8003, /* í - 237 */
|
||||
0x8003, /* î - 238 */
|
||||
0x8003, /* ï - 239 */
|
||||
0x8000, /* ð - 240 */
|
||||
0x8003, /* ñ - 241 */
|
||||
0x8003, /* ò - 242 */
|
||||
0x8003, /* ó - 243 */
|
||||
0x8003, /* ô - 244 */
|
||||
0x8003, /* õ - 245 */
|
||||
0x8003, /* ö - 246 */
|
||||
0x0008, /* ÷ - 247 */
|
||||
0x8003, /* ø - 248 */
|
||||
0x8003, /* ù - 249 */
|
||||
0x8003, /* ú - 250 */
|
||||
0x8003, /* û - 251 */
|
||||
0x8003, /* ü - 252 */
|
||||
0x8003, /* ý - 253 */
|
||||
0x8000, /* þ - 254 */
|
||||
0x8003 /* ÿ - 255 */
|
||||
};
|
||||
|
||||
/******************************************************************************
|
||||
* GetStringTypeA [KERNEL32.@]
|
||||
*/
|
||||
BOOL WINAPI GetStringTypeA(LCID locale,DWORD dwInfoType,LPCSTR src,
|
||||
INT cchSrc,LPWORD chartype)
|
||||
{
|
||||
return GetStringTypeExA(locale,dwInfoType,src,cchSrc,chartype);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* GetStringTypeExA [KERNEL32.@]
|
||||
*
|
||||
* FIXME: Ignores the locale.
|
||||
*/
|
||||
BOOL WINAPI GetStringTypeExA(LCID locale,DWORD dwInfoType,LPCSTR src,
|
||||
INT cchSrc,LPWORD chartype)
|
||||
{
|
||||
int i;
|
||||
|
||||
if ((src==NULL) || (chartype==NULL) || (src==(LPSTR)chartype))
|
||||
{
|
||||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (cchSrc==-1)
|
||||
cchSrc=strlen(src)+1;
|
||||
|
||||
switch (dwInfoType) {
|
||||
case CT_CTYPE1:
|
||||
for (i=0;i<cchSrc;i++)
|
||||
{
|
||||
chartype[i] = 0;
|
||||
if (isdigit(src[i])) chartype[i]|=C1_DIGIT;
|
||||
if (isalpha(src[i])) chartype[i]|=C1_ALPHA;
|
||||
if (islower(src[i])) chartype[i]|=C1_LOWER;
|
||||
if (isupper(src[i])) chartype[i]|=C1_UPPER;
|
||||
if (isspace(src[i])) chartype[i]|=C1_SPACE;
|
||||
if (ispunct(src[i])) chartype[i]|=C1_PUNCT;
|
||||
if (iscntrl(src[i])) chartype[i]|=C1_CNTRL;
|
||||
/* FIXME: isblank() is a GNU extension */
|
||||
/* if (isblank(src[i])) chartype[i]|=C1_BLANK; */
|
||||
if ((src[i] == ' ') || (src[i] == '\t')) chartype[i]|=C1_BLANK;
|
||||
/* C1_XDIGIT */
|
||||
}
|
||||
return TRUE;
|
||||
|
||||
case CT_CTYPE2:
|
||||
for (i=0;i<cchSrc;i++)
|
||||
{
|
||||
chartype[i]=(WORD)CT_CType2_LUT[i];
|
||||
}
|
||||
return TRUE;
|
||||
|
||||
case CT_CTYPE3:
|
||||
for (i=0;i<cchSrc;i++)
|
||||
{
|
||||
chartype[i]=OLE2NLS_CT_CType3_LUT[i];
|
||||
}
|
||||
return TRUE;
|
||||
|
||||
default:
|
||||
ERR("Unknown dwInfoType:%ld\n",dwInfoType);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* VerLanguageNameA [KERNEL32.@]
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue