Home | History | Annotate | Download | only in Support

Lines Matching refs:ch

124         UTF32 ch;
128 ch = *source++;
129 if (ch <= UNI_MAX_BMP) { /* Target is a character <= 0xFFFF */
131 if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_LOW_END) {
140 *target++ = (UTF16)ch; /* normal case */
142 } else if (ch > UNI_MAX_LEGAL_UTF32) {
154 ch -= halfBase;
155 *target++ = (UTF16)((ch >> halfShift) + UNI_SUR_HIGH_START);
156 *target++ = (UTF16)((ch & halfMask) + UNI_SUR_LOW_START);
172 UTF32 ch, ch2;
175 ch = *source++;
177 if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_HIGH_END) {
183 ch = ((ch - UNI_SUR_HIGH_START) << halfShift)
198 if (ch >= UNI_SUR_LOW_START && ch <= UNI_SUR_LOW_END) {
208 *target++ = ch;
214 fprintf(stderr, "ConvertUTF16toUTF32 illegal seq 0x%04x,%04x\n", ch, ch2);
227 UTF32 ch;
232 ch = *source++;
234 if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_HIGH_END) {
240 ch = ((ch - UNI_SUR_HIGH_START) << halfShift)
255 if (ch >= UNI_SUR_LOW_START && ch <= UNI_SUR_LOW_END) {
262 if (ch < (UTF32)0x80) { bytesToWrite = 1;
263 } else if (ch < (UTF32)0x800) { bytesToWrite = 2;
264 } else if (ch < (UTF32)0x10000) { bytesToWrite = 3;
265 } else if (ch < (UTF32)0x110000) { bytesToWrite = 4;
267 ch = UNI_REPLACEMENT_CHAR;
276 case 4: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6;
277 case 3: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6;
278 case 2: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6;
279 case 1: *--target = (UTF8)(ch | firstByteMark[bytesToWrite]);
297 UTF32 ch;
301 ch = *source++;
304 if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_LOW_END) {
314 if (ch < (UTF32)0x80) { bytesToWrite = 1;
315 } else if (ch < (UTF32)0x800) { bytesToWrite = 2;
316 } else if (ch < (UTF32)0x10000) { bytesToWrite = 3;
317 } else if (ch <= UNI_MAX_LEGAL_UTF32) { bytesToWrite = 4;
319 ch = UNI_REPLACEMENT_CHAR;
329 case 4: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6;
330 case 3: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6;
331 case 2: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6;
332 case 1: *--target = (UTF8) (ch | firstByteMark[bytesToWrite]);
428 UTF32 ch = 0;
442 case 5: ch += *source++; ch <<= 6; /* remember, illegal UTF-8 */
443 case 4: ch += *source++; ch <<= 6; /* remember, illegal UTF-8 */
444 case 3: ch += *source++; ch <<= 6;
445 case 2: ch += *source++; ch <<= 6;
446 case 1: ch += *source++; ch <<= 6;
447 case 0: ch += *source++;
449 ch -= offsetsFromUTF8[extraBytesToRead];
455 if (ch <= UNI_MAX_BMP) { /* Target is a character <= 0xFFFF */
457 if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_LOW_END) {
466 *target++ = (UTF16)ch; /* normal case */
468 } else if (ch > UNI_MAX_UTF16) {
482 ch -= halfBase;
483 *target++ = (UTF16)((ch >> halfShift) + UNI_SUR_HIGH_START);
484 *target++ = (UTF16)((ch & halfMask) + UNI_SUR_LOW_START);
501 UTF32 ch = 0;
515 case 5: ch += *source++; ch <<= 6;
516 case 4: ch += *source++; ch <<= 6;
517 case 3: ch += *source++; ch <<= 6;
518 case 2: ch += *source++; ch <<= 6;
519 case 1: ch += *source++; ch <<= 6;
520 case 0: ch += *source++;
522 ch -= offsetsFromUTF8[extraBytesToRead];
528 if (ch <= UNI_MAX_LEGAL_UTF32) {
533 if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_LOW_END) {
542 *target++ = ch;
544 } else { /* i.e., ch > UNI_MAX_LEGAL_UTF32 */
563 ch += *source++;
565 if (tmpBytesToRead) ch <<= 6;