Hello. Changelog: Dmitry Timoshkov <dmitry@codeweavers.com> Reimplement GetStringTypeA and GetStringTypeExA. diff -u cvs/hq/wine/memory/codepage.c wine/memory/codepage.c --- cvs/hq/wine/memory/codepage.c Mon Dec 10 21:25:44 2001 +++ wine/memory/codepage.c Mon Feb 4 15:54:38 2002 @@ -396,3 +396,43 @@ /* 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); +} diff -u cvs/hq/wine/ole/ole2nls.c wine/ole/ole2nls.c --- cvs/hq/wine/ole/ole2nls.c Thu Jan 3 17:51:39 2002 +++ wine/ole/ole2nls.c Mon Feb 4 15:31:39 2002 @@ -811,591 +811,6 @@ 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, /* - 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, /* - 141 */ - C2_NOTAPPLICABLE, /* - 142 */ - C2_NOTAPPLICABLE, /* - 143 */ - C2_NOTAPPLICABLE, /* - 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, /* - 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, /* - 129 */ - 0x0008, /* - 130 */ - 0x8000, /* - 131 */ - 0x0008, /* - 132 */ - 0x0008, /* - 133 */ - 0x0008, /* - 134 */ - 0x0008, /* - 135 */ - 0x0001, /* - 136 */ - 0x0008, /* - 137 */ - 0x8003, /* - 138 */ - 0x0008, /* - 139 */ - 0x8000, /* - 140 */ - 0x0000, /* - 141 */ - 0x0000, /* - 142 */ - 0x0000, /* - 143 */ - 0x0000, /* - 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, /* - 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.@] */