Changeset 7355 for trunk/src/ole32/compobj.c
- Timestamp:
- Nov 16, 2001, 10:19:35 AM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/ole32/compobj.c
r7343 r7355 437 437 BYTE *p; 438 438 int i; 439 440 441 #ifdef __WIN32OS2__ 442 // Note: only setup the lookup table once! 443 static BOOL fCLSIDTableInitialized = FALSE; 444 static BYTE table[256]; 445 #else 439 446 BYTE table[256]; 447 #endif 440 448 441 449 if (!s) 442 450 s = "{00000000-0000-0000-0000-000000000000}"; 443 451 else { /* validate the CLSID string */ 444 445 if (strlen(s) != 38) 452 453 #ifdef __WIN32OS2__ 454 // PH: all other characters are tested up to the 38th 455 // and cannot be zero so this test should be sufficient. 456 if (s[38] != 0) 457 #else 458 if (strlen(s) != 38) 459 #endif 446 460 return CO_E_CLASSSTRING; 447 461 … … 461 475 462 476 TRACE("%s -> %p\n", s, id); 463 464 /* quick lookup table */ 465 memset(table, 0, 256); 466 467 for (i = 0; i < 10; i++) { 468 table['0' + i] = i; 469 } 470 for (i = 0; i < 6; i++) { 471 table['A' + i] = i+10; 472 table['a' + i] = i+10; 473 } 477 478 479 #ifdef __WIN32OS2__ 480 if (fCLSIDTableInitialized == FALSE) 481 { 482 fCLSIDTableInitialized = TRUE; 483 #endif 484 485 /* quick lookup table */ 486 memset(table, 0, 256); 487 488 for (i = 0; i < 10; i++) { 489 table['0' + i] = i; 490 } 491 for (i = 0; i < 6; i++) { 492 table['A' + i] = i+10; 493 table['a' + i] = i+10; 494 } 495 496 #ifdef __WIN32OS2__ 497 } 498 #endif 474 499 475 500 /* in form {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} */
Note:
See TracChangeset
for help on using the changeset viewer.