Changeset 3003 for branches/libc-0.6
- Timestamp:
- Apr 7, 2007, 2:01:49 AM (18 years ago)
- Location:
- branches/libc-0.6/src/emx/src/lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/libc-0.6/src/emx/src/lib/locale/locale_collate.c
r1519 r3003 33 33 { 34 34 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 35 10, 11, 1 3, 12, 14, 15, 16, 17, 18, 19,36 20, 21, 2 3, 22, 24, 25, 26, 27, 28, 29,37 30, 31, 3 3, 32, 34, 35, 36, 37, 38, 39,38 40, 41, 4 3, 42, 44, 45, 46, 47, 48, 49,39 50, 51, 5 3, 52, 54, 55, 56, 57, 58, 59,40 60, 61, 6 3, 62, 64, 65, 66, 67, 68, 69,41 70, 71, 7 3, 72, 74, 75, 76, 77, 78, 79,42 80, 81, 8 3, 82, 84, 85, 86, 87, 88, 89,43 90, 91, 9 3, 92, 94, 95, 96, 97, 98, 99,44 100, 101, 10 3, 102, 104, 105, 106, 107, 108, 109,45 110, 111, 11 3, 112, 114, 115, 116, 117, 118, 119,46 120, 121, 12 3, 122, 124, 125, 126, 127, 128, 129,47 130, 131, 13 3, 132, 134, 135, 136, 137, 138, 139,48 140, 141, 14 3, 142, 144, 145, 146, 147, 148, 149,49 150, 151, 15 3, 152, 154, 155, 156, 157, 158, 159,50 160, 161, 16 3, 162, 164, 165, 166, 167, 168, 169,51 170, 171, 17 3, 172, 174, 175, 176, 177, 178, 179,52 180, 181, 18 3, 182, 184, 185, 186, 187, 188, 189,53 190, 191, 19 3, 192, 194, 195, 196, 197, 198, 199,54 200, 201, 20 3, 202, 204, 205, 206, 207, 208, 209,55 210, 211, 21 3, 212, 214, 215, 216, 217, 218, 219,56 220, 221, 22 3, 222, 224, 225, 226, 227, 228, 229,57 230, 231, 23 3, 232, 234, 235, 236, 237, 238, 239,58 240, 241, 24 3, 242, 244, 245, 246, 247, 248, 249,59 250, 251, 25 3, 252, 254, 25535 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 36 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 37 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 38 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 39 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 40 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 41 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 42 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 43 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 44 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 45 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 46 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 47 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 48 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 49 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 50 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 51 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 52 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 53 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 54 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 55 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 56 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 57 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 58 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 59 250, 251, 252, 253, 254, 255 60 60 }, 61 61 .au2MBCSPrefixs = -
branches/libc-0.6/src/emx/src/lib/str/strcoll.c
r1454 r3003 25 25 if (__libc_gLocaleCollate.mbcs) 26 26 { 27 FS_VAR();28 FS_SAVE_LOAD();29 27 /* MBCS case. We compare the strings as usual, but as soon as we 30 28 encounter a MBCS character we translate the rests of the strings … … 38 36 UniChar *ucs [2]; 39 37 const char *sbcs [2] = { s1, s2 }; 38 FS_VAR_SAVE_LOAD(); 40 39 41 40 /* I can't imagine X bytes to convert into more … … 48 47 UniChar *outbuf = ucs [i] = alloca (sl * sizeof (UniChar)); 49 48 50 if (UniUconvToUcs (__libc_gLocaleCollate.uobj, &inbuf, &in_left, &outbuf, 51 &out_left, &nonid)) 49 if (UniUconvToUcs (__libc_gLocaleCollate.uobj, &inbuf, &in_left, &outbuf, &out_left, &nonid)) 52 50 { 53 51 /* Oops, something bad happened (invalid character code). Suppose … … 64 62 } 65 63 66 d = __libc_gLocaleCollate.auchWeight [c1] - __libc_gLocaleCollate.auchWeight [c2]; 67 if (d || !c1 || !c2) 64 if (c1 != c2) 68 65 { 69 FS_RESTORE(); 70 return d; 66 d = __libc_gLocaleCollate.auchWeight [c1] - __libc_gLocaleCollate.auchWeight [c2]; 67 if (d || !c1 || !c2) 68 return d; 71 69 } 70 else if (!c1) 71 return 0; 72 72 c1 = *++s1; 73 73 c2 = *++s2; 74 74 } /* endfor */ 75 FS_RESTORE();76 75 } 77 76 else … … 79 78 for (;;) 80 79 { 81 d = __libc_gLocaleCollate.auchWeight [c1] - __libc_gLocaleCollate.auchWeight [c2]; 82 if (d || !c1 || !c2) 83 return d; 80 if (c1 != c2) 81 { 82 d = __libc_gLocaleCollate.auchWeight [c1] - __libc_gLocaleCollate.auchWeight [c2]; 83 if (d || !c1 || !c2) 84 return d; 85 } 86 else if (!c1) 87 return 0; 84 88 c1 = *++s1; 85 89 c2 = *++s2;
Note:
See TracChangeset
for help on using the changeset viewer.