Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | rfe-3473670: Various Unicode-related speedups/robustness |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | rfe-3473670 |
Files: | files | file ages | folders |
SHA1: |
92168a99c12bd4eca8cb5d3142f6fa1e |
User & Date: | jan.nijtmans 2012-01-14 09:30:32 |
Context
2012-01-22
| ||
15:30 | merge trunk expand all unicode tables and tools to eventually handle the unicode chars > 0xffff (if ... Closed-Leaf check-in: 544e5419f0 user: jan.nijtmans tags: rfe-3473670 | |
2012-01-14
| ||
09:30 | rfe-3473670: Various Unicode-related speedups/robustness check-in: 92168a99c1 user: jan.nijtmans tags: rfe-3473670 | |
2012-01-13
| ||
11:45 |
* library/http/http.tcl (http::Connect): [Bug 3472316]: Ensure that we only try to read the socket...check-in: 07438ee67a user: dkf tags: core-8-4-branch | |
Changes
Changes to generic/tclUniData.c.
︙ | ︙ | |||
20 21 22 23 24 25 26 | /* * The pageMap is indexed by page number and returns an alternate page number * that identifies a unique page of characters. Many Unicode characters map * to the same alternate page number. */ static CONST unsigned short pageMap[] = { | | | | | | | | | | | | | | | | | > > > > > | | | | | | | | | | | | | | | | > > > > > | | | | | | | | | | | | | | | | > > > > > | | | | | | | | | | | | | | | | > > > > > > | | | | | | | | | | | | | | | | > > > > > | | | | | | | | | | | | | | | | > > > > > > | | | | | | | | | | | | | | | | > > > > > | | | | | | | | | | | | | | | > > | > > > > | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 | /* * The pageMap is indexed by page number and returns an alternate page number * that identifies a unique page of characters. Many Unicode characters map * to the same alternate page number. */ static CONST unsigned short pageMap[] = { 0, 32, 64, 96, 0, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448, 224, 480, 512, 544, 576, 608, 640, 672, 704, 704, 736, 768, 800, 832, 864, 896, 928, 960, 992, 224, 1024, 224, 1056, 224, 224, 1088, 1120, 1152, 1184, 1216, 1248, 1280, 1312, 1344, 1376, 1408, 1344, 1344, 1440, 1472, 1504, 1536, 1568, 1344, 1344, 1600, 1632, 1664, 1696, 1728, 1760, 1792, 1792, 1792, 1792, 1792, 1824, 1856, 1888, 1920, 1952, 1984, 2016, 2048, 2080, 2112, 2144, 2176, 2208, 2240, 2272, 2304, 1952, 2336, 2368, 2400, 2432, 2464, 2496, 2528, 2560, 2592, 2624, 2656, 2688, 2720, 2752, 2784, 2688, 2816, 2848, 2880, 2912, 2944, 2976, 3008, 3040, 3072, 3104, 1792, 3136, 3168, 3200, 1792, 3232, 3264, 3296, 3328, 3360, 3392, 3424, 1792, 1344, 3456, 3488, 3520, 3552, 3584, 3616, 3648, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 3680, 1344, 3712, 3744, 3776, 1344, 3808, 1344, 3840, 3872, 3904, 1344, 1344, 3936, 3968, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 4000, 4032, 1344, 1344, 4064, 4096, 4128, 4160, 4192, 1344, 4224, 4256, 4288, 4320, 1344, 4352, 4384, 1344, 4416, 1344, 4448, 4480, 4512, 4544, 4576, 1344, 4608, 4640, 4672, 4704, 1344, 4736, 4768, 4800, 4832, 1792, 1792, 4864, 4896, 4928, 4960, 4992, 5024, 1344, 5056, 1344, 5088, 5120, 5152, 1792, 1792, 5184, 5216, 5248, 5280, 5312, 5344, 5376, 5312, 704, 5408, 224, 224, 224, 224, 5440, 224, 224, 224, 5472, 5504, 5536, 5568, 5600, 5632, 5664, 5696, 5728, 5760, 5792, 5824, 5856, 5888, 5920, 5952, 5984, 6016, 6048, 6080, 6112, 6144, 6176, 6208, 6240, 6240, 6240, 6240, 6240, 6240, 6240, 6240, 6272, 6304, 4672, 6336, 6368, 6400, 6432, 6464, 4672, 6496, 6528, 6560, 6592, 6624, 6656, 6688, 4672, 4672, 4672, 4672, 4672, 6720, 6752, 6784, 4672, 4672, 4672, 6816, 4672, 4672, 4672, 4672, 6848, 4672, 4672, 6880, 6912, 4672, 6944, 6976, 4672, 4672, 4672, 4672, 4672, 4672, 4672, 4672, 6240, 6240, 6240, 6240, 7008, 6240, 7040, 7072, 6240, 6240, 6240, 6240, 6240, 6240, 6240, 6240, 4672, 7104, 7136, 1792, 1792, 1792, 1792, 1792, 7168, 7200, 7232, 7264, 224, 224, 224, 7296, 7328, 7360, 1344, 7392, 7424, 7456, 7456, 704, 7488, 7520, 1792, 1792, 7552, 4672, 4672, 7584, 4672, 4672, 4672, 4672, 4672, 4672, 7616, 7648, 7680, 7712, 3040, 1344, 7744, 3968, 1344, 7776, 7808, 7840, 1344, 1344, 7872, 7904, 4672, 7936, 7968, 8000, 8032, 4672, 8000, 8032, 4672, 7968, 4672, 4672, 4672, 4672, 4672, 4672, 4672, 4672, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 4448, 4672, 4672, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 8064, 1792, 8096, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 8128, 4672, 8160, 5152, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 8192, 8224, 224, 8256, 8288, 1344, 1344, 8320, 8352, 8384, 224, 8416, 8448, 8480, 1792, 8512, 8544, 8576, 1344, 8608, 8640, 8672, 8704, 8736, 1632, 8768, 8800, 4480, 1824, 8832, 8864, 1792, 1344, 8896, 8928, 8960, 1344, 8992, 9024, 1792, 9056, 9088, 1792, 1792, 1792, 1792, 1344, 9120, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 9152, 9184, 9216, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9248, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 9280, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 9312, 1344, 9312, 1344, 1344, 9344, 1792, 9376, 9408, 9440, 1344, 1344, 9472, 9504, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 9536, 9568, 1344, 9600, 1344, 9632, 9664, 9696, 9728, 9760, 9792, 1344, 1344, 1344, 9824, 9856, 64, 9888, 9920, 9952, 9984, 10016, 10048 }; /* * The groupMap is indexed by combining the alternate page number with * the page offset and returns a group number that identifies a unique * set of character attributes. */ |
︙ | ︙ | |||
735 736 737 738 739 740 741 | * Bits 5-7 Case delta type: 000 = identity * 010 = add delta for lower * 011 = add delta for lower, add 1 for title * 100 = subtract delta for title/upper * 101 = sub delta for upper, sub 1 for title * 110 = sub delta for upper, add delta for lower * | < < | | | > > | | | | | | | | | < < < < < | < | < < > | > < < < | 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 | * Bits 5-7 Case delta type: 000 = identity * 010 = add delta for lower * 011 = add delta for lower, add 1 for title * 100 = subtract delta for title/upper * 101 = sub delta for upper, sub 1 for title * 110 = sub delta for upper, add delta for lower * * Bits 8-31 Case delta: delta for case conversions. This should be the * highest field so we can easily sign extend. */ static CONST int groups[] = { 0, 15, 12, 25, 27, 21, 22, 26, 20, 9, 8257, 28, 19, 8322, 29, 2, 23, 16, 11, -190078, 24, -30846, 321, 386, -50879, 59522, -30911, 76930, -49790, 53825, 52801, 52545, 20289, 51777, 52033, 53057, -24702, 54081, 53569, -41598, 54593, -33150, 54849, 55873, 55617, 56129, 5, -14206, 609, 451, 674, 20354, -24767, -14271, -33215, 2763585, -41663, 2762817, -2768510, -49855, 17729, 18241, -2760318, -2759550, -2760062, 53890, 52866, 52610, 51842, 52098, 53122, -10823550, 53634, 54146, -2750078, -2751614, 54658, 54914, -2745982, 55938, 17794, 55682, 18306, 56194, 4, 6, -21370, 9793, 9537, 16449, 16193, 9858, 9602, 8066, 16514, 16258, 2113, 16002, 14722, 1, 12162, 13954, 2178, 22146, 20610, -1662, -15295, 24706, -1727, 20545, 7, 3905, 3970, 12353, 12418, 8, 1859649, 10, -9044862, -976254, 15234, -1949375, -1918, -1983, -18814, -21886, -25470, -32638, -28542, -32126, -1981, -2174, -18879, -2237, 1844610, -21951, -25535, -28607, -32703, -32191, 13, 14, -1924287, -2145983, -2115007, 7233, 7298, 4170, 4234, 6749, 6813, -2750143, -976319, -2746047, 2763650, 2762882, -2759615, -2751679, -2760383, -2760127, -2768575, 1859714, -9044927, -10823615, 18, 17 }; /* * The following constants are used to determine the category of a * Unicode character. */ enum { UNASSIGNED, UPPERCASE_LETTER, LOWERCASE_LETTER, TITLECASE_LETTER, MODIFIER_LETTER, OTHER_LETTER, |
︙ | ︙ | |||
815 816 817 818 819 820 821 | * The following macros extract the fields of the character info. The * GetDelta() macro is complicated because we can't rely on the C compiler * to do sign extension on right shifts. */ #define GetCaseType(info) (((info) & 0xe0) >> 5) #define GetCategory(ch) (GetUniCharInfo(ch) & 0x1f) | | | < | 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 | * The following macros extract the fields of the character info. The * GetDelta() macro is complicated because we can't rely on the C compiler * to do sign extension on right shifts. */ #define GetCaseType(info) (((info) & 0xe0) >> 5) #define GetCategory(ch) (GetUniCharInfo(ch) & 0x1f) #define GetDelta(info) ((info) >> 8) /* * This macro extracts the information about a character from the * Unicode character tables. */ #define GetUniCharInfo(ch) (groups[groupMap[pageMap[((ch) & 0xffff) >> OFFSET_BITS] | ((ch) & ((1 << OFFSET_BITS)-1))]]) |
Changes to generic/tclUtf.c.
︙ | ︙ | |||
1118 1119 1120 1121 1122 1123 1124 | Tcl_UniChar Tcl_UniCharToUpper(ch) int ch; /* Unicode character to convert. */ { int info = GetUniCharInfo(ch); if (GetCaseType(info) & 0x04) { | | < < > | 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 | Tcl_UniChar Tcl_UniCharToUpper(ch) int ch; /* Unicode character to convert. */ { int info = GetUniCharInfo(ch); if (GetCaseType(info) & 0x04) { ch -= GetDelta(info); } return (Tcl_UniChar) ch; } /* *---------------------------------------------------------------------- * * Tcl_UniCharToLower -- * |
︙ | ︙ | |||
1147 1148 1149 1150 1151 1152 1153 | Tcl_UniChar Tcl_UniCharToLower(ch) int ch; /* Unicode character to convert. */ { int info = GetUniCharInfo(ch); if (GetCaseType(info) & 0x02) { | | < < > | 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 | Tcl_UniChar Tcl_UniCharToLower(ch) int ch; /* Unicode character to convert. */ { int info = GetUniCharInfo(ch); if (GetCaseType(info) & 0x02) { ch += GetDelta(info); } return (Tcl_UniChar) ch; } /* *---------------------------------------------------------------------- * * Tcl_UniCharToTitle -- * |
︙ | ︙ | |||
1181 1182 1183 1184 1185 1186 1187 | int mode = GetCaseType(info); if (mode & 0x1) { /* * Subtract or add one depending on the original case. */ | | | < < > | 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 | int mode = GetCaseType(info); if (mode & 0x1) { /* * Subtract or add one depending on the original case. */ ch += ((mode & 0x4) ? -1 : 1); } else if (mode == 0x4) { ch -= GetDelta(info); } return (Tcl_UniChar) ch; } /* *---------------------------------------------------------------------- * * Tcl_UniCharLen -- * |
︙ | ︙ |
Changes to tools/uniParse.tcl.
︙ | ︙ | |||
54 55 56 57 58 59 60 | set totitle 0 } else { set totitle $toupper } set categoryIndex [lsearch -exact $categories $category] if {$categoryIndex < 0} { | | < > | | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | set totitle 0 } else { set totitle $toupper } set categoryIndex [lsearch -exact $categories $category] if {$categoryIndex < 0} { error "Unexpected character category: $index($category)" } return [list $categoryIndex $toupper $tolower $totitle] } proc uni::getGroup {value} { variable groups set gIndex [lsearch -exact $groups $value] if {$gIndex == -1} { set gIndex [llength $groups] lappend groups $value } return $gIndex } proc uni::addPage {info} { variable pMap variable pages variable shift set pIndex [lsearch -exact $pages $info] if {$pIndex == -1} { set pIndex [llength $pages] lappend pages $info } lappend pMap [expr {$pIndex << $shift}] return } proc uni::buildTables {data} { variable shift variable pMap {} |
︙ | ︙ | |||
137 138 139 140 141 142 143 | set info {} } } } # Enter all assigned characters up to the current character for {set i $next} {$i <= $index} {incr i} { | < < < < | | 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 | set info {} } } } # Enter all assigned characters up to the current character for {set i $next} {$i <= $index} {incr i} { # Add the group index to the info for the current page lappend info $gIndex # If this is the last entry in the page, add the page if {($i & $mask) == $mask} { addPage $info set info {} } } set next [expr {$index + 1}] } return |
︙ | ︙ | |||
258 259 260 261 262 263 264 | * Bits 5-7 Case delta type: 000 = identity * 010 = add delta for lower * 011 = add delta for lower, add 1 for title * 100 = subtract delta for title/upper * 101 = sub delta for upper, sub 1 for title * 110 = sub delta for upper, add delta for lower * | < < | > > > > > > > > > > > > | < < < < | 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 | * Bits 5-7 Case delta type: 000 = identity * 010 = add delta for lower * 011 = add delta for lower, add 1 for title * 100 = subtract delta for title/upper * 101 = sub delta for upper, sub 1 for title * 110 = sub delta for upper, add delta for lower * * Bits 8-31 Case delta: delta for case conversions. This should be the * highest field so we can easily sign extend. */ static CONST int groups\[\] = {" set line " " set last [expr {[llength $groups] - 1}] for {set i 0} {$i <= $last} {incr i} { foreach {type toupper tolower totitle} [lindex $groups $i] {} # Compute the case conversion type and delta if {$totitle} { if {$totitle == $toupper} { # subtract delta for title or upper set case 4 set delta $toupper if {$tolower} { error "New case conversion type needed: $toupper $tolower $totitle" } } elseif {$toupper} { # subtract delta for upper, subtract 1 for title set case 5 set delta $toupper if {($totitle != 1) || $tolower} { error "New case conversion type needed: $toupper $tolower $totitle" } } else { # add delta for lower, add 1 for title set case 3 set delta $tolower if {$totitle != -1} { error "New case conversion type needed: $toupper $tolower $totitle" } } } elseif {$toupper} { # subtract delta for upper, add delta for lower set case 6 set delta $toupper if {$tolower != $toupper} { error "New case conversion type needed: $toupper $tolower $totitle" } } elseif {$tolower} { # add delta for lower set case 2 set delta $tolower } else { # noop set case 0 set delta 0 } append line [expr {($delta << 8) | ($case << 5) | $type}] if {$i != $last} { append line ", " } if {[string length $line] > 65} { puts $f [string trimright $line] set line " " } } puts $f $line puts -nonewline $f "}; /* * The following constants are used to determine the category of a * Unicode character. */ enum { UNASSIGNED, UPPERCASE_LETTER, LOWERCASE_LETTER, TITLECASE_LETTER, MODIFIER_LETTER, OTHER_LETTER, |
︙ | ︙ | |||
362 363 364 365 366 367 368 | * The following macros extract the fields of the character info. The * GetDelta() macro is complicated because we can't rely on the C compiler * to do sign extension on right shifts. */ #define GetCaseType(info) (((info) & 0xe0) >> 5) #define GetCategory(ch) (GetUniCharInfo(ch) & 0x1f) | | | | 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 | * The following macros extract the fields of the character info. The * GetDelta() macro is complicated because we can't rely on the C compiler * to do sign extension on right shifts. */ #define GetCaseType(info) (((info) & 0xe0) >> 5) #define GetCategory(ch) (GetUniCharInfo(ch) & 0x1f) #define GetDelta(info) ((info) >> 8) /* * This macro extracts the information about a character from the * Unicode character tables. */ #define GetUniCharInfo(ch) (groups\[groupMap\[pageMap\[((ch) & 0xffff) >> OFFSET_BITS\] | ((ch) & ((1 << OFFSET_BITS)-1))\]\]) " close $f } uni::main return |