Changeset 4174 for trunk/src/kernel32/KERNEL32.CPP
- Timestamp:
- Sep 3, 2000, 8:05:40 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/KERNEL32.CPP
r4134 r4174 1 /* $Id: KERNEL32.CPP,v 1.5 1 2000-08-31 12:47:51 sandervlExp $ */1 /* $Id: KERNEL32.CPP,v 1.52 2000-09-03 18:04:55 phaller Exp $ */ 2 2 3 3 /* … … 184 184 //****************************************************************************** 185 185 //****************************************************************************** 186 187 static const unsigned char CT_CType2_LUT[] = {188 C2_NOTAPPLICABLE, /* - 0 */189 C2_NOTAPPLICABLE, /* - 1 */190 C2_NOTAPPLICABLE, /* - 2 */191 C2_NOTAPPLICABLE, /* - 3 */192 C2_NOTAPPLICABLE, /* - 4 */193 C2_NOTAPPLICABLE, /* - 5 */194 C2_NOTAPPLICABLE, /* - 6 */195 C2_NOTAPPLICABLE, /* - 7 */196 C2_NOTAPPLICABLE, /* - 8 */197 C2_SEGMENTSEPARATOR, /* - 9 */198 C2_NOTAPPLICABLE, /* - 10 */199 C2_NOTAPPLICABLE, /* - 11 */200 C2_NOTAPPLICABLE, /* - 12 */201 C2_NOTAPPLICABLE, /* - 13 */202 C2_NOTAPPLICABLE, /* - 14 */203 C2_NOTAPPLICABLE, /* - 15 */204 C2_NOTAPPLICABLE, /* - 16 */205 C2_NOTAPPLICABLE, /* - 17 */206 C2_NOTAPPLICABLE, /* - 18 */207 C2_NOTAPPLICABLE, /* - 19 */208 C2_NOTAPPLICABLE, /* - 20 */209 C2_NOTAPPLICABLE, /* - 21 */210 C2_NOTAPPLICABLE, /* - 22 */211 C2_NOTAPPLICABLE, /* - 23 */212 C2_NOTAPPLICABLE, /* - 24 */213 C2_NOTAPPLICABLE, /* - 25 */214 C2_NOTAPPLICABLE, /* - 26 */215 C2_NOTAPPLICABLE, /* - 27 */216 C2_NOTAPPLICABLE, /* - 28 */217 C2_NOTAPPLICABLE, /* - 29 */218 C2_NOTAPPLICABLE, /* - 30 */219 C2_NOTAPPLICABLE, /* - 31 */220 C2_WHITESPACE, /* - 32 */221 C2_OTHERNEUTRAL, /* ! - 33 */222 C2_OTHERNEUTRAL, /* " - 34 */ /* " */223 C2_EUROPETERMINATOR, /* # - 35 */224 C2_EUROPETERMINATOR, /* $ - 36 */225 C2_EUROPETERMINATOR, /* % - 37 */226 C2_LEFTTORIGHT, /* & - 38 */227 C2_OTHERNEUTRAL, /* ' - 39 */228 C2_OTHERNEUTRAL, /* ( - 40 */229 C2_OTHERNEUTRAL, /* ) - 41 */230 C2_OTHERNEUTRAL, /* * - 42 */231 C2_EUROPETERMINATOR, /* + - 43 */232 C2_COMMONSEPARATOR, /* , - 44 */233 C2_EUROPETERMINATOR, /* - - 45 */234 C2_EUROPESEPARATOR, /* . - 46 */235 C2_EUROPESEPARATOR, /* / - 47 */236 C2_EUROPENUMBER, /* 0 - 48 */237 C2_EUROPENUMBER, /* 1 - 49 */238 C2_EUROPENUMBER, /* 2 - 50 */239 C2_EUROPENUMBER, /* 3 - 51 */240 C2_EUROPENUMBER, /* 4 - 52 */241 C2_EUROPENUMBER, /* 5 - 53 */242 C2_EUROPENUMBER, /* 6 - 54 */243 C2_EUROPENUMBER, /* 7 - 55 */244 C2_EUROPENUMBER, /* 8 - 56 */245 C2_EUROPENUMBER, /* 9 - 57 */246 C2_COMMONSEPARATOR, /* : - 58 */247 C2_OTHERNEUTRAL, /* ; - 59 */248 C2_OTHERNEUTRAL, /* < - 60 */249 C2_OTHERNEUTRAL, /* = - 61 */250 C2_OTHERNEUTRAL, /* > - 62 */251 C2_OTHERNEUTRAL, /* ? - 63 */252 C2_LEFTTORIGHT, /* @ - 64 */253 C2_LEFTTORIGHT, /* A - 65 */254 C2_LEFTTORIGHT, /* B - 66 */255 C2_LEFTTORIGHT, /* C - 67 */256 C2_LEFTTORIGHT, /* D - 68 */257 C2_LEFTTORIGHT, /* E - 69 */258 C2_LEFTTORIGHT, /* F - 70 */259 C2_LEFTTORIGHT, /* G - 71 */260 C2_LEFTTORIGHT, /* H - 72 */261 C2_LEFTTORIGHT, /* I - 73 */262 C2_LEFTTORIGHT, /* J - 74 */263 C2_LEFTTORIGHT, /* K - 75 */264 C2_LEFTTORIGHT, /* L - 76 */265 C2_LEFTTORIGHT, /* M - 77 */266 C2_LEFTTORIGHT, /* N - 78 */267 C2_LEFTTORIGHT, /* O - 79 */268 C2_LEFTTORIGHT, /* P - 80 */269 C2_LEFTTORIGHT, /* Q - 81 */270 C2_LEFTTORIGHT, /* R - 82 */271 C2_LEFTTORIGHT, /* S - 83 */272 C2_LEFTTORIGHT, /* T - 84 */273 C2_LEFTTORIGHT, /* U - 85 */274 C2_LEFTTORIGHT, /* V - 86 */275 C2_LEFTTORIGHT, /* W - 87 */276 C2_LEFTTORIGHT, /* X - 88 */277 C2_LEFTTORIGHT, /* Y - 89 */278 C2_LEFTTORIGHT, /* Z - 90 */279 C2_OTHERNEUTRAL, /* [ - 91 */280 C2_OTHERNEUTRAL, /* \ - 92 */281 C2_OTHERNEUTRAL, /* ] - 93 */282 C2_OTHERNEUTRAL, /* ^ - 94 */283 C2_OTHERNEUTRAL, /* _ - 95 */284 C2_OTHERNEUTRAL, /* ` - 96 */285 C2_LEFTTORIGHT, /* a - 97 */286 C2_LEFTTORIGHT, /* b - 98 */287 C2_LEFTTORIGHT, /* c - 99 */288 C2_LEFTTORIGHT, /* d - 100 */289 C2_LEFTTORIGHT, /* e - 101 */290 C2_LEFTTORIGHT, /* f - 102 */291 C2_LEFTTORIGHT, /* g - 103 */292 C2_LEFTTORIGHT, /* h - 104 */293 C2_LEFTTORIGHT, /* i - 105 */294 C2_LEFTTORIGHT, /* j - 106 */295 C2_LEFTTORIGHT, /* k - 107 */296 C2_LEFTTORIGHT, /* l - 108 */297 C2_LEFTTORIGHT, /* m - 109 */298 C2_LEFTTORIGHT, /* n - 110 */299 C2_LEFTTORIGHT, /* o - 111 */300 C2_LEFTTORIGHT, /* p - 112 */301 C2_LEFTTORIGHT, /* q - 113 */302 C2_LEFTTORIGHT, /* r - 114 */303 C2_LEFTTORIGHT, /* s - 115 */304 C2_LEFTTORIGHT, /* t - 116 */305 C2_LEFTTORIGHT, /* u - 117 */306 C2_LEFTTORIGHT, /* v - 118 */307 C2_LEFTTORIGHT, /* w - 119 */308 C2_LEFTTORIGHT, /* x - 120 */309 C2_LEFTTORIGHT, /* y - 121 */310 C2_LEFTTORIGHT, /* z - 122 */311 C2_OTHERNEUTRAL, /* { - 123 */312 C2_OTHERNEUTRAL, /* | - 124 */313 C2_OTHERNEUTRAL, /* } - 125 */314 C2_OTHERNEUTRAL, /* ~ - 126 */315 C2_NOTAPPLICABLE, /* - 127 */316 C2_NOTAPPLICABLE, /* - 128 */317 C2_NOTAPPLICABLE, /* - 129 */318 C2_OTHERNEUTRAL, /* - 130 */319 C2_LEFTTORIGHT, /* - 131 */320 C2_OTHERNEUTRAL, /* - 132 */321 C2_OTHERNEUTRAL, /*322 - 133 */323 C2_OTHERNEUTRAL, /* - 134 */324 C2_OTHERNEUTRAL, /* - 135 */325 C2_LEFTTORIGHT, /* - 136 */326 C2_EUROPETERMINATOR, /* - 137 */327 C2_LEFTTORIGHT, /* - 138 */328 C2_OTHERNEUTRAL, /* - 139 */329 C2_LEFTTORIGHT, /* - 140 */330 C2_NOTAPPLICABLE, /* - 141 */331 C2_NOTAPPLICABLE, /* - 142 */332 C2_NOTAPPLICABLE, /* - 143 */333 C2_NOTAPPLICABLE, /* - 144 */334 C2_OTHERNEUTRAL, /* - 145 */335 C2_OTHERNEUTRAL, /* - 146 */336 C2_OTHERNEUTRAL, /* - 147 */337 C2_OTHERNEUTRAL, /* - 148 */338 C2_OTHERNEUTRAL, /* - 149 */339 C2_OTHERNEUTRAL, /* - 150 */340 C2_OTHERNEUTRAL, /* - 151 */341 C2_LEFTTORIGHT, /* - 152 */342 C2_OTHERNEUTRAL, /* - 153 */343 C2_LEFTTORIGHT, /* - 154 */344 C2_OTHERNEUTRAL, /* - 155 */345 C2_LEFTTORIGHT, /* - 156 */346 C2_NOTAPPLICABLE, /* - 157 */347 C2_NOTAPPLICABLE, /* - 158 */348 C2_LEFTTORIGHT, /* - 159 */349 C2_WHITESPACE, /* - 160 */350 C2_OTHERNEUTRAL, /* ¡ - 161 */351 C2_EUROPETERMINATOR, /* ¢ - 162 */352 C2_EUROPETERMINATOR, /* £ - 163 */353 C2_EUROPETERMINATOR, /* € - 164 */354 C2_EUROPETERMINATOR, /* ¥ - 165 */355 C2_OTHERNEUTRAL, /* Š - 166 */356 C2_OTHERNEUTRAL, /* § - 167 */357 C2_OTHERNEUTRAL, /* š - 168 */358 C2_OTHERNEUTRAL, /* © - 169 */359 C2_OTHERNEUTRAL, /* ª - 170 */360 C2_OTHERNEUTRAL, /* « - 171 */361 C2_OTHERNEUTRAL, /* ¬ - 172 */362 C2_OTHERNEUTRAL, /* - 173 */363 C2_OTHERNEUTRAL, /* ® - 174 */364 C2_OTHERNEUTRAL, /* ¯ - 175 */365 C2_EUROPETERMINATOR, /* ° - 176 */366 C2_EUROPETERMINATOR, /* ± - 177 */367 C2_EUROPENUMBER, /* ² - 178 */368 C2_EUROPENUMBER, /* ³ - 179 */369 C2_OTHERNEUTRAL, /* Ž - 180 */370 C2_OTHERNEUTRAL, /* µ - 181 */371 C2_OTHERNEUTRAL, /* ¶ - 182 */372 C2_OTHERNEUTRAL, /* · - 183 */373 C2_OTHERNEUTRAL, /* ž - 184 */374 C2_EUROPENUMBER, /* ¹ - 185 */375 C2_OTHERNEUTRAL, /* º - 186 */376 C2_OTHERNEUTRAL, /* » - 187 */377 C2_OTHERNEUTRAL, /* Œ - 188 */378 C2_OTHERNEUTRAL, /* œ - 189 */379 C2_OTHERNEUTRAL, /* Ÿ - 190 */380 C2_OTHERNEUTRAL, /* ¿ - 191 */381 C2_LEFTTORIGHT, /* À - 192 */382 C2_LEFTTORIGHT, /* Á - 193 */383 C2_LEFTTORIGHT, /*  - 194 */384 C2_LEFTTORIGHT, /* à - 195 */385 C2_LEFTTORIGHT, /* Ä - 196 */386 C2_LEFTTORIGHT, /* Å - 197 */387 C2_LEFTTORIGHT, /* Æ - 198 */388 C2_LEFTTORIGHT, /* Ç - 199 */389 C2_LEFTTORIGHT, /* È - 200 */390 C2_LEFTTORIGHT, /* É - 201 */391 C2_LEFTTORIGHT, /* Ê - 202 */392 C2_LEFTTORIGHT, /* Ë - 203 */393 C2_LEFTTORIGHT, /* Ì - 204 */394 C2_LEFTTORIGHT, /* Í - 205 */395 C2_LEFTTORIGHT, /* Î - 206 */396 C2_LEFTTORIGHT, /* Ï - 207 */397 C2_LEFTTORIGHT, /* Ð - 208 */398 C2_LEFTTORIGHT, /* Ñ - 209 */399 C2_LEFTTORIGHT, /* Ò - 210 */400 C2_LEFTTORIGHT, /* Ó - 211 */401 C2_LEFTTORIGHT, /* Ô - 212 */402 C2_LEFTTORIGHT, /* Õ - 213 */403 C2_LEFTTORIGHT, /* Ö - 214 */404 C2_OTHERNEUTRAL, /* × - 215 */405 C2_LEFTTORIGHT, /* Ø - 216 */406 C2_LEFTTORIGHT, /* Ù - 217 */407 C2_LEFTTORIGHT, /* Ú - 218 */408 C2_LEFTTORIGHT, /* Û - 219 */409 C2_LEFTTORIGHT, /* Ü - 220 */410 C2_LEFTTORIGHT, /* Ý - 221 */411 C2_LEFTTORIGHT, /* Þ - 222 */412 C2_LEFTTORIGHT, /* ß - 223 */413 C2_LEFTTORIGHT, /* à - 224 */414 C2_LEFTTORIGHT, /* á - 225 */415 C2_LEFTTORIGHT, /* â - 226 */416 C2_LEFTTORIGHT, /* ã - 227 */417 C2_LEFTTORIGHT, /* ä - 228 */418 C2_LEFTTORIGHT, /* å - 229 */419 C2_LEFTTORIGHT, /* æ - 230 */420 C2_LEFTTORIGHT, /* ç - 231 */421 C2_LEFTTORIGHT, /* è - 232 */422 C2_LEFTTORIGHT, /* é - 233 */423 C2_LEFTTORIGHT, /* ê - 234 */424 C2_LEFTTORIGHT, /* ë - 235 */425 C2_LEFTTORIGHT, /* ì - 236 */426 C2_LEFTTORIGHT, /* í - 237 */427 C2_LEFTTORIGHT, /* î - 238 */428 C2_LEFTTORIGHT, /* ï - 239 */429 C2_LEFTTORIGHT, /* ð - 240 */430 C2_LEFTTORIGHT, /* ñ - 241 */431 C2_LEFTTORIGHT, /* ò - 242 */432 C2_LEFTTORIGHT, /* ó - 243 */433 C2_LEFTTORIGHT, /* ô - 244 */434 C2_LEFTTORIGHT, /* õ - 245 */435 C2_LEFTTORIGHT, /* ö - 246 */436 C2_OTHERNEUTRAL, /* ÷ - 247 */437 C2_LEFTTORIGHT, /* ø - 248 */438 C2_LEFTTORIGHT, /* ù - 249 */439 C2_LEFTTORIGHT, /* ú - 250 */440 C2_LEFTTORIGHT, /* û - 251 */441 C2_LEFTTORIGHT, /* ü - 252 */442 C2_LEFTTORIGHT, /* ý - 253 */443 C2_LEFTTORIGHT, /* þ - 254 */444 C2_LEFTTORIGHT /* ÿ - 255 */445 };446 447 const WORD OLE2NLS_CT_CType3_LUT[] = {448 0x0000, /* - 0 */449 0x0000, /* - 1 */450 0x0000, /* - 2 */451 0x0000, /* - 3 */452 0x0000, /* - 4 */453 0x0000, /* - 5 */454 0x0000, /* - 6 */455 0x0000, /* - 7 */456 0x0000, /* - 8 */457 0x0008, /* - 9 */458 0x0008, /* - 10 */459 0x0008, /* - 11 */460 0x0008, /* - 12 */461 0x0008, /* - 13 */462 0x0000, /* - 14 */463 0x0000, /* - 15 */464 0x0000, /* - 16 */465 0x0000, /* - 17 */466 0x0000, /* - 18 */467 0x0000, /* - 19 */468 0x0000, /* - 20 */469 0x0000, /* - 21 */470 0x0000, /* - 22 */471 0x0000, /* - 23 */472 0x0000, /* - 24 */473 0x0000, /* - 25 */474 0x0000, /* - 26 */475 0x0000, /* - 27 */476 0x0000, /* - 28 */477 0x0000, /* - 29 */478 0x0000, /* - 30 */479 0x0000, /* - 31 */480 0x0048, /* - 32 */481 0x0048, /* ! - 33 */482 0x0448, /* " - 34 */ /* " */483 0x0048, /* # - 35 */484 0x0448, /* $ - 36 */485 0x0048, /* % - 37 */486 0x0048, /* & - 38 */487 0x0440, /* ' - 39 */488 0x0048, /* ( - 40 */489 0x0048, /* ) - 41 */490 0x0048, /* * - 42 */491 0x0048, /* + - 43 */492 0x0048, /* , - 44 */493 0x0440, /* - - 45 */494 0x0048, /* . - 46 */495 0x0448, /* / - 47 */496 0x0040, /* 0 - 48 */497 0x0040, /* 1 - 49 */498 0x0040, /* 2 - 50 */499 0x0040, /* 3 - 51 */500 0x0040, /* 4 - 52 */501 0x0040, /* 5 - 53 */502 0x0040, /* 6 - 54 */503 0x0040, /* 7 - 55 */504 0x0040, /* 8 - 56 */505 0x0040, /* 9 - 57 */506 0x0048, /* : - 58 */507 0x0048, /* ; - 59 */508 0x0048, /* < - 60 */509 0x0448, /* = - 61 */510 0x0048, /* > - 62 */511 0x0048, /* ? - 63 */512 0x0448, /* @ - 64 */513 0x8040, /* A - 65 */514 0x8040, /* B - 66 */515 0x8040, /* C - 67 */516 0x8040, /* D - 68 */517 0x8040, /* E - 69 */518 0x8040, /* F - 70 */519 0x8040, /* G - 71 */520 0x8040, /* H - 72 */521 0x8040, /* I - 73 */522 0x8040, /* J - 74 */523 0x8040, /* K - 75 */524 0x8040, /* L - 76 */525 0x8040, /* M - 77 */526 0x8040, /* N - 78 */527 0x8040, /* O - 79 */528 0x8040, /* P - 80 */529 0x8040, /* Q - 81 */530 0x8040, /* R - 82 */531 0x8040, /* S - 83 */532 0x8040, /* T - 84 */533 0x8040, /* U - 85 */534 0x8040, /* V - 86 */535 0x8040, /* W - 87 */536 0x8040, /* X - 88 */537 0x8040, /* Y - 89 */538 0x8040, /* Z - 90 */539 0x0048, /* [ - 91 */540 0x0448, /* \ - 92 */541 0x0048, /* ] - 93 */542 0x0448, /* ^ - 94 */543 0x0448, /* _ - 95 */544 0x0448, /* ` - 96 */545 0x8040, /* a - 97 */546 0x8040, /* b - 98 */547 0x8040, /* c - 99 */548 0x8040, /* d - 100 */549 0x8040, /* e - 101 */550 0x8040, /* f - 102 */551 0x8040, /* g - 103 */552 0x8040, /* h - 104 */553 0x8040, /* i - 105 */554 0x8040, /* j - 106 */555 0x8040, /* k - 107 */556 0x8040, /* l - 108 */557 0x8040, /* m - 109 */558 0x8040, /* n - 110 */559 0x8040, /* o - 111 */560 0x8040, /* p - 112 */561 0x8040, /* q - 113 */562 0x8040, /* r - 114 */563 0x8040, /* s - 115 */564 0x8040, /* t - 116 */565 0x8040, /* u - 117 */566 0x8040, /* v - 118 */567 0x8040, /* w - 119 */568 0x8040, /* x - 120 */569 0x8040, /* y - 121 */570 0x8040, /* z - 122 */571 0x0048, /* { - 123 */572 0x0048, /* | - 124 */573 0x0048, /* } - 125 */574 0x0448, /* ~ - 126 */575 0x0000, /* - 127 */576 0x0000, /* - 128 */577 0x0000, /* - 129 */578 0x0008, /* - 130 */579 0x8000, /* - 131 */580 0x0008, /* - 132 */581 0x0008, /*582 - 133 */583 0x0008, /* - 134 */584 0x0008, /* - 135 */585 0x0001, /* - 136 */586 0x0008, /* - 137 */587 0x8003, /* - 138 */588 0x0008, /* - 139 */589 0x8000, /* - 140 */590 0x0000, /* - 141 */591 0x0000, /* - 142 */592 0x0000, /* - 143 */593 0x0000, /* - 144 */594 0x0088, /* - 145 */595 0x0088, /* - 146 */596 0x0088, /* - 147 */597 0x0088, /* - 148 */598 0x0008, /* - 149 */599 0x0400, /* - 150 */600 0x0400, /* - 151 */601 0x0408, /* - 152 */602 0x0000, /* - 153 */603 0x8003, /* - 154 */604 0x0008, /* - 155 */605 0x8000, /* - 156 */606 0x0000, /* - 157 */607 0x0000, /* - 158 */608 0x8003, /* - 159 */609 0x0008, /* - 160 */610 0x0008, /* ¡ - 161 */611 0x0048, /* ¢ - 162 */612 0x0048, /* £ - 163 */613 0x0008, /* € - 164 */614 0x0048, /* ¥ - 165 */615 0x0048, /* Š - 166 */616 0x0008, /* § - 167 */617 0x0408, /* š - 168 */618 0x0008, /* © - 169 */619 0x0400, /* ª - 170 */620 0x0008, /* « - 171 */621 0x0048, /* ¬ - 172 */622 0x0408, /* - 173 */623 0x0008, /* ® - 174 */624 0x0448, /* ¯ - 175 */625 0x0008, /* ° - 176 */626 0x0008, /* ± - 177 */627 0x0000, /* ² - 178 */628 0x0000, /* ³ - 179 */629 0x0408, /* Ž - 180 */630 0x0008, /* µ - 181 */631 0x0008, /* ¶ - 182 */632 0x0008, /* · - 183 */633 0x0408, /* ž - 184 */634 0x0000, /* ¹ - 185 */635 0x0400, /* º - 186 */636 0x0008, /* » - 187 */637 0x0000, /* Œ - 188 */638 0x0000, /* œ - 189 */639 0x0000, /* Ÿ - 190 */640 0x0008, /* ¿ - 191 */641 0x8003, /* À - 192 */642 0x8003, /* Á - 193 */643 0x8003, /*  - 194 */644 0x8003, /* à - 195 */645 0x8003, /* Ä - 196 */646 0x8003, /* Å - 197 */647 0x8000, /* Æ - 198 */648 0x8003, /* Ç - 199 */649 0x8003, /* È - 200 */650 0x8003, /* É - 201 */651 0x8003, /* Ê - 202 */652 0x8003, /* Ë - 203 */653 0x8003, /* Ì - 204 */654 0x8003, /* Í - 205 */655 0x8003, /* Î - 206 */656 0x8003, /* Ï - 207 */657 0x8000, /* Ð - 208 */658 0x8003, /* Ñ - 209 */659 0x8003, /* Ò - 210 */660 0x8003, /* Ó - 211 */661 0x8003, /* Ô - 212 */662 0x8003, /* Õ - 213 */663 0x8003, /* Ö - 214 */664 0x0008, /* × - 215 */665 0x8003, /* Ø - 216 */666 0x8003, /* Ù - 217 */667 0x8003, /* Ú - 218 */668 0x8003, /* Û - 219 */669 0x8003, /* Ü - 220 */670 0x8003, /* Ý - 221 */671 0x8000, /* Þ - 222 */672 0x8000, /* ß - 223 */673 0x8003, /* à - 224 */674 0x8003, /* á - 225 */675 0x8003, /* â - 226 */676 0x8003, /* ã - 227 */677 0x8003, /* ä - 228 */678 0x8003, /* å - 229 */679 0x8000, /* æ - 230 */680 0x8003, /* ç - 231 */681 0x8003, /* è - 232 */682 0x8003, /* é - 233 */683 0x8003, /* ê - 234 */684 0x8003, /* ë - 235 */685 0x8003, /* ì - 236 */686 0x8003, /* í - 237 */687 0x8003, /* î - 238 */688 0x8003, /* ï - 239 */689 0x8000, /* ð - 240 */690 0x8003, /* ñ - 241 */691 0x8003, /* ò - 242 */692 0x8003, /* ó - 243 */693 0x8003, /* ô - 244 */694 0x8003, /* õ - 245 */695 0x8003, /* ö - 246 */696 0x0008, /* ÷ - 247 */697 0x8003, /* ø - 248 */698 0x8003, /* ù - 249 */699 0x8003, /* ú - 250 */700 0x8003, /* û - 251 */701 0x8003, /* ü - 252 */702 0x8003, /* ý - 253 */703 0x8000, /* þ - 254 */704 0x8003 /* ÿ - 255 */705 };706 707 708 709 710 ODINFUNCTION5(BOOL, GetStringTypeExW,711 LCID, locale,712 DWORD, dwInfoType,713 LPCWSTR, lpSrcStr,714 int, cchSrc,715 LPWORD, lpCharType)716 {717 int i;718 719 dprintf(("KERNEL32: GetStringTypeW, not properly implemented\n"));720 if((DWORD)lpSrcStr == (DWORD)lpCharType ||721 !lpSrcStr ||722 !lpCharType)723 {724 O32_SetLastError(ERROR_INVALID_PARAMETER);725 return(FALSE);726 }727 728 if(cchSrc == -1)729 cchSrc = UniStrlen((UniChar*)lpSrcStr);730 731 switch(dwInfoType)732 {733 case CT_CTYPE1:734 for(i=0;i<cchSrc;i++)735 {736 lpCharType[i] = 0;737 if (isdigit(lpSrcStr[i])) lpCharType[i]|=C1_DIGIT;738 if (isalpha(lpSrcStr[i])) lpCharType[i]|=C1_ALPHA;739 if (islower(lpSrcStr[i])) lpCharType[i]|=C1_LOWER;740 if (isupper(lpSrcStr[i])) lpCharType[i]|=C1_UPPER;741 if (isspace(lpSrcStr[i])) lpCharType[i]|=C1_SPACE;742 if (ispunct(lpSrcStr[i])) lpCharType[i]|=C1_PUNCT;743 if (iscntrl(lpSrcStr[i])) lpCharType[i]|=C1_CNTRL;744 if ( (lpSrcStr[i] == ' ') ||745 (lpSrcStr[i] == '\t') )746 lpCharType[i]|=C1_BLANK;747 }748 return TRUE;749 break;750 751 case CT_CTYPE2:752 case CT_CTYPE3: //not supported right now753 return FALSE;754 break;755 }756 757 return FALSE;758 }759 760 ODINFUNCTION4(BOOL, GetStringTypeW,761 DWORD, dwInfoType,762 LPCWSTR, lpSrcStr,763 int, cchSrc,764 LPWORD, lpCharType)765 {766 return ODIN_GetStringTypeExW(0,767 dwInfoType,768 lpSrcStr,769 cchSrc,770 lpCharType);771 }772 773 /******************************************************************************774 *GetStringTypeExA[KERNEL32.397]775 *776 * FIXME: Ignores the locale.777 */778 ODINFUNCTION5(BOOL, GetStringTypeExA,779 LCID, locale,780 DWORD, dwInfoType,781 LPCSTR, src,782 INT, cchSrc,783 LPWORD, chartype)784 {785 int i;786 787 if ((src==NULL) ||788 (chartype==NULL) ||789 (src==(LPSTR)chartype))790 {791 SetLastError(ERROR_INVALID_PARAMETER);792 return FALSE;793 }794 795 if (cchSrc==-1)796 cchSrc=lstrlenA(src)+1;797 798 switch (dwInfoType)799 {800 case CT_CTYPE1:801 for (i=0;i<cchSrc;i++)802 {803 chartype[i] = 0;804 if (isdigit(src[i])) chartype[i]|=C1_DIGIT;805 if (isalpha(src[i])) chartype[i]|=C1_ALPHA;806 if (islower(src[i])) chartype[i]|=C1_LOWER;807 if (isupper(src[i])) chartype[i]|=C1_UPPER;808 if (isspace(src[i])) chartype[i]|=C1_SPACE;809 if (ispunct(src[i])) chartype[i]|=C1_PUNCT;810 if (iscntrl(src[i])) chartype[i]|=C1_CNTRL;811 /* FIXME: isblank() is a GNU extension */812 /*if (isblank(src[i])) chartype[i]|=C1_BLANK; */813 if ((src[i] == ' ') || (src[i] == '\t')) chartype[i]|=C1_BLANK;814 /* C1_XDIGIT */815 }816 return TRUE;817 818 case CT_CTYPE2:819 for (i=0;i<cchSrc;i++)820 {821 chartype[i]=(WORD)CT_CType2_LUT[i];822 }823 return TRUE;824 825 case CT_CTYPE3:826 for (i=0;i<cchSrc;i++)827 {828 chartype[i]=OLE2NLS_CT_CType3_LUT[i];829 }830 return TRUE;831 832 default:833 dprintf(("Unknown dwInfoType:%ld\n",834 dwInfoType));835 return FALSE;836 }837 }838 839 //******************************************************************************840 //NOTE: This has one parameter more than the W version! (@#$@#$)841 //******************************************************************************842 ODINFUNCTION5(BOOL, GetStringTypeA,843 LCID, locale,844 DWORD, dwInfoType,845 LPCSTR, lpSrcStr,846 int, cchSrc,847 LPWORD, lpCharType)848 {849 return ODIN_GetStringTypeExA(locale,850 dwInfoType,851 lpSrcStr,852 cchSrc,853 lpCharType);854 }855 856 //******************************************************************************857 186 VOID WIN32API GlobalMemoryStatus( MEMORYSTATUS *arg1) 858 187 { … … 887 216 } 888 217 //****************************************************************************** 889 //TODO!890 //******************************************************************************891 int WIN32API LCMapStringW(892 DWORD /*LCID*/ Locale,893 DWORD dwMapFlags,894 LPCWSTR lpSrcStr,895 int cchSrc,896 LPWSTR lpDestStr,897 int cchDest)898 {899 // quick hack! this code is not done!900 dprintf(("LCMapStringW: NOT IMPLEMENTED!"));901 if(cchSrc == -1)902 cchSrc = strlen((const char *)lpSrcStr);903 if(!cchDest)904 return cchSrc;905 lstrcpynW(lpDestStr, lpSrcStr, max(cchSrc, cchDest));906 return max(cchSrc, cchDest);907 }908 //******************************************************************************909 //TODO!910 //******************************************************************************911 int WIN32API LCMapStringA(912 DWORD /*LCID*/ Locale,913 DWORD dwMapFlags,914 LPCSTR lpSrcStr,915 int cchSrc,916 LPSTR lpDestStr,917 int cchDest)918 {919 dprintf(("KERNEL32: LCMapStringA not implemented\n"));920 if(cchSrc == -1)921 cchSrc = strlen((const char *)lpSrcStr);922 if(!cchDest)923 return cchSrc;924 strncpy((char *)lpDestStr, (const char *)lpSrcStr, max(cchSrc, cchDest));925 return max(cchSrc, cchDest);926 }927 //******************************************************************************928 //SvL: 24-6-'97 - Added929 218 //****************************************************************************** 930 219 BOOL WIN32API Beep( DWORD arg1, DWORD arg2) … … 996 285 997 286 return O32_MulDiv(arg1, arg2, arg3); 998 }999 //******************************************************************************1000 UINT WIN32API CompareStringA(LCID lcid, DWORD fdwStyle, LPCSTR lpString1,1001 DWORD cch1, LPCSTR lpString2, DWORD cch2)1002 {1003 int i;1004 int fEqual = TRUE;1005 char *string1 = (char *)lpString1, *string2 = (char *)lpString2;1006 1007 SetLastError(0);1008 1009 #ifdef DEBUG1010 if(fdwStyle & SORT_STRINGSORT)1011 dprintf(("KERNEL32: SORT_STRINGSORT not supported!\n"));1012 if(fdwStyle & NORM_IGNORENONSPACE)1013 dprintf(("KERNEL32: NORM_IGNORENONSPACE not supported!\n"));1014 if(fdwStyle & NORM_IGNORESYMBOLS)1015 dprintf(("KERNEL32: NORM_IGNORESYMBOLS not supported!\n"));1016 #endif1017 1018 if(lpString1 == NULL || lpString2 == NULL)1019 {1020 dprintf(("CompareStringA: (s1=%s,s2=%s): Invalid NULL string\n", lpString1, lpString2));1021 SetLastError(ERROR_INVALID_PARAMETER);1022 return 0;1023 }1024 1025 if(cch1 == -1) cch1 = strlen(string1);1026 if(cch2 == -1) cch2 = strlen(string2);1027 1028 if(fdwStyle) {1029 //TODO!1030 if(fdwStyle != 0 && fdwStyle != NORM_IGNORECASE)1031 return(0); /*PLF Fri 98-03-13 04:09:32 was return 1 */1032 }1033 if(fdwStyle & NORM_IGNORECASE)1034 fEqual = strnicmp(string1, string2, min(cch1, cch2));1035 else1036 fEqual = strncmp(string1, string2, min(cch1, cch2));1037 1038 if (fEqual < 0 ) fEqual = 1;1039 else if(fEqual == 0) fEqual = 2;1040 else if(fEqual > 0) fEqual = 3;1041 1042 //If equal, but different length, largest one is the greatest in lexical value1043 if(fEqual == 2 && cch1 != cch2){1044 if(cch1 < cch2)1045 fEqual = 1;1046 else1047 fEqual = 3;1048 }1049 dprintf2(("KERNEL32: OS2CompareStringA '%s' - '%s' returned %d\n", lpString1, lpString2, fEqual));1050 return(fEqual);1051 }1052 1053 //******************************************************************************1054 //TODO: Not complete (fdwStyle flags specify compare method)1055 //******************************************************************************1056 UINT WIN32API CompareStringW(LCID lcid, DWORD fdwStyle, LPCWSTR lpString1,1057 DWORD cch1, LPCWSTR lpString2, DWORD cch2)1058 {1059 int i;1060 int fEqual = TRUE;1061 char *string1;1062 char *string2;1063 1064 dprintf2(("KERNEL32: OS2CompareStringW '%s' - '%s'\n", string1, string2));1065 1066 if(lpString1 == NULL || lpString2 == NULL)1067 {1068 dprintf(("CompareStringW: (s1=%s,s2=%s): Invalid NULL string\n", lpString1, lpString2));1069 SetLastError(ERROR_INVALID_PARAMETER);1070 return 0;1071 }1072 1073 if(cch1 == -1) cch1 = lstrlenW(lpString1);1074 if(cch2 == -1) cch2 = lstrlenW(lpString2);1075 1076 string1 = UnicodeToAsciiStringN((LPWSTR)lpString1, cch1);1077 string2 = UnicodeToAsciiStringN((LPWSTR)lpString2, cch2);1078 1079 fEqual = CompareStringA(lcid, fdwStyle, string1, cch1, string2, cch2);1080 FreeAsciiString(string1);1081 FreeAsciiString(string2);1082 1083 return(fEqual);1084 287 } 1085 288 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.