Differences From Artifact [24271b6f0f]:
- File generic/tclUtf.c — part of check-in [9edc83a71a] at 2016-04-05 12:07:38 on branch novem — merge trunk (user: dgp size: 47851) [more...]
To Artifact [1e04544386]:
- File generic/tclUtf.c — part of check-in [11d4243035] at 2016-08-30 13:12:09 on branch novem — merge trunk (user: jan.nijtmans size: 47810) [more...]
| ︙ | |||
69 70 71 72 73 74 75 | 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | - - - - + - - - - - - |
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
#if TCL_UTF_MAX > 3
4,4,4,4,4,4,4,4,
#else
1,1,1,1,1,1,1,1,
#endif
|
| ︙ | |||
101 102 103 104 105 106 107 | 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | - + - + |
*---------------------------------------------------------------------------
*/
int
TclUtfCount(
int ch) /* The Tcl_UniChar whose size is returned. */
{
|
| ︙ | |||
142 143 144 145 146 147 148 | 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | - + |
int ch, /* The Tcl_UniChar to be stored in the
* buffer. */
char *buf) /* Buffer in which the UTF-8 representation of
* the Tcl_UniChar is stored. Buffer must be
* large enough to hold the UTF-8 character
* (at most TCL_UTF_MAX bytes). */
{
|
| ︙ | |||
170 171 172 173 174 175 176 | 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 | - + - - - - - + + + + + | buf[2] = (char) (((ch << 4) | 0x80) & 0xB0); buf[1] = (char) (((ch >> 2) | 0x80) & 0xBF); buf[0] = (char) (((ch >> 8) | 0xF0) & 0xF7); return 0; } } #endif |
| ︙ | |||
304 305 306 307 308 309 310 | 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 337 338 339 340 | - - - - + - - - + + + + + - + - - + - - - - - - + - - - - + + - - - - - - - + + + + + | return 2; } /* * A two-byte-character lead-byte not followed by trail-byte * represents itself. */ |
| ︙ |