Changeset 1807
- Timestamp:
- Feb 2, 2005, 1:15:37 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/src/lib/locale/setlocale.c
-
Property cvs2svn:cvs-rev
changed from
1.18
to1.19
r1806 r1807 413 413 */ 414 414 struct __collate_weight aCW[256]; 415 int i, j;415 int i, c; 416 416 417 417 /* Initialize character weights. */ … … 439 439 * of equal elements stays the same. 440 440 */ 441 /** @todo check this algorithm, it doesn't look right! */ 442 for (i = 0; i < 255; i++) 443 for (j = i; j < 255; j++) 444 if (UniStrncmp(aCW[j].ucsWeight, aCW[j + 1].ucsWeight, MIN(aCW[j].len, aCW[j + 1].len)) > 0) 445 _memswap(&aCW[j], &aCW[j + 1], sizeof(aCW[j])); 441 c = 256 - 1; 442 do 443 { 444 int j = 0; 445 for (i = 0; i < c; i++) 446 if (UniStrncmp(aCW[i].ucsWeight, aCW[i + 1].ucsWeight, MIN(aCW[i].len, aCW[i + 1].len)) > 0) 447 { 448 _memswap(&aCW[i], &aCW[i + 1], sizeof(aCW[i])); 449 j = i; 450 } 451 c = j; 452 } while (c); 446 453 447 454 /* -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.