• Home
  • Raw
  • Download

Lines Matching refs:ch

59 	UTF32 ch;  in ConvertUTF32toUTF16()  local
63 ch = *source++; in ConvertUTF32toUTF16()
64 if (ch <= UNI_MAX_BMP) { /* Target is a character <= 0xFFFF */ in ConvertUTF32toUTF16()
66 if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_LOW_END) { in ConvertUTF32toUTF16()
75 *target++ = (UTF16)ch; /* normal case */ in ConvertUTF32toUTF16()
77 } else if (ch > UNI_MAX_LEGAL_UTF32) { in ConvertUTF32toUTF16()
89 ch -= halfBase; in ConvertUTF32toUTF16()
90 *target++ = (UTF16)((ch >> halfShift) + UNI_SUR_HIGH_START); in ConvertUTF32toUTF16()
91 *target++ = (UTF16)((ch & halfMask) + UNI_SUR_LOW_START); in ConvertUTF32toUTF16()
107 UTF32 ch, ch2; in ConvertUTF16toUTF32() local
110 ch = *source++; in ConvertUTF16toUTF32()
112 if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_HIGH_END) { in ConvertUTF16toUTF32()
118 ch = ((ch - UNI_SUR_HIGH_START) << halfShift) in ConvertUTF16toUTF32()
133 if (ch >= UNI_SUR_LOW_START && ch <= UNI_SUR_LOW_END) { in ConvertUTF16toUTF32()
143 *target++ = ch; in ConvertUTF16toUTF32()
149 ANTLR3_FPRINTF(stderr, "ConvertUTF16toUTF32 illegal seq 0x%04x,%04x\n", ch, ch2); in ConvertUTF16toUTF32()
212 UTF32 ch; in ConvertUTF16toUTF8() local
217 ch = *source++; in ConvertUTF16toUTF8()
219 if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_HIGH_END) { in ConvertUTF16toUTF8()
225 ch = ((ch - UNI_SUR_HIGH_START) << halfShift) in ConvertUTF16toUTF8()
240 if (ch >= UNI_SUR_LOW_START && ch <= UNI_SUR_LOW_END) { in ConvertUTF16toUTF8()
247 if (ch < (UTF32)0x80) { bytesToWrite = 1; in ConvertUTF16toUTF8()
248 } else if (ch < (UTF32)0x800) { bytesToWrite = 2; in ConvertUTF16toUTF8()
249 } else if (ch < (UTF32)0x10000) { bytesToWrite = 3; in ConvertUTF16toUTF8()
250 } else if (ch < (UTF32)0x110000) { bytesToWrite = 4; in ConvertUTF16toUTF8()
252 ch = UNI_REPLACEMENT_CHAR; in ConvertUTF16toUTF8()
261 case 4: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; in ConvertUTF16toUTF8()
262 case 3: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; in ConvertUTF16toUTF8()
263 case 2: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; in ConvertUTF16toUTF8()
264 case 1: *--target = (UTF8)(ch | firstByteMark[bytesToWrite]); in ConvertUTF16toUTF8()
336 UTF32 ch = 0; in ConvertUTF8toUTF16() local
350 case 5: ch += *source++; ch <<= 6; /* remember, illegal UTF-8 */ in ConvertUTF8toUTF16()
351 case 4: ch += *source++; ch <<= 6; /* remember, illegal UTF-8 */ in ConvertUTF8toUTF16()
352 case 3: ch += *source++; ch <<= 6; in ConvertUTF8toUTF16()
353 case 2: ch += *source++; ch <<= 6; in ConvertUTF8toUTF16()
354 case 1: ch += *source++; ch <<= 6; in ConvertUTF8toUTF16()
355 case 0: ch += *source++; in ConvertUTF8toUTF16()
357 ch -= offsetsFromUTF8[extraBytesToRead]; in ConvertUTF8toUTF16()
363 if (ch <= UNI_MAX_BMP) { /* Target is a character <= 0xFFFF */ in ConvertUTF8toUTF16()
365 if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_LOW_END) { in ConvertUTF8toUTF16()
374 *target++ = (UTF16)ch; /* normal case */ in ConvertUTF8toUTF16()
376 } else if (ch > UNI_MAX_UTF16) { in ConvertUTF8toUTF16()
390 ch -= halfBase; in ConvertUTF8toUTF16()
391 *target++ = (UTF16)((ch >> halfShift) + UNI_SUR_HIGH_START); in ConvertUTF8toUTF16()
392 *target++ = (UTF16)((ch & halfMask) + UNI_SUR_LOW_START); in ConvertUTF8toUTF16()
409 UTF32 ch; in ConvertUTF32toUTF8() local
413 ch = *source++; in ConvertUTF32toUTF8()
416 if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_LOW_END) { in ConvertUTF32toUTF8()
426 if (ch < (UTF32)0x80) { bytesToWrite = 1; in ConvertUTF32toUTF8()
427 } else if (ch < (UTF32)0x800) { bytesToWrite = 2; in ConvertUTF32toUTF8()
428 } else if (ch < (UTF32)0x10000) { bytesToWrite = 3; in ConvertUTF32toUTF8()
429 } else if (ch <= UNI_MAX_LEGAL_UTF32) { bytesToWrite = 4; in ConvertUTF32toUTF8()
431 ch = UNI_REPLACEMENT_CHAR; in ConvertUTF32toUTF8()
441 case 4: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; in ConvertUTF32toUTF8()
442 case 3: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; in ConvertUTF32toUTF8()
443 case 2: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; in ConvertUTF32toUTF8()
444 case 1: *--target = (UTF8) (ch | firstByteMark[bytesToWrite]); in ConvertUTF32toUTF8()
462 UTF32 ch = 0; in ConvertUTF8toUTF32() local
476 case 5: ch += *source++; ch <<= 6; in ConvertUTF8toUTF32()
477 case 4: ch += *source++; ch <<= 6; in ConvertUTF8toUTF32()
478 case 3: ch += *source++; ch <<= 6; in ConvertUTF8toUTF32()
479 case 2: ch += *source++; ch <<= 6; in ConvertUTF8toUTF32()
480 case 1: ch += *source++; ch <<= 6; in ConvertUTF8toUTF32()
481 case 0: ch += *source++; in ConvertUTF8toUTF32()
483 ch -= offsetsFromUTF8[extraBytesToRead]; in ConvertUTF8toUTF32()
489 if (ch <= UNI_MAX_LEGAL_UTF32) { in ConvertUTF8toUTF32()
494 if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_LOW_END) { in ConvertUTF8toUTF32()
503 *target++ = ch; in ConvertUTF8toUTF32()