Lines Matching refs:code_point

29   uint32_t code_point;  in uv__wtf8_decode1()  local
40 code_point = b1; in uv__wtf8_decode1()
45 code_point = (code_point << 6) | (b2 & 0x3F); in uv__wtf8_decode1()
47 return 0x7FF & code_point; /* two-byte character */ in uv__wtf8_decode1()
52 code_point = (code_point << 6) | (b3 & 0x3F); in uv__wtf8_decode1()
54 return 0xFFFF & code_point; /* three-byte character */ in uv__wtf8_decode1()
59 code_point = (code_point << 6) | (b4 & 0x3F); in uv__wtf8_decode1()
61 code_point &= 0x1FFFFF; in uv__wtf8_decode1()
62 if (code_point <= 0x10FFFF) in uv__wtf8_decode1()
63 return code_point; /* four-byte character */ in uv__wtf8_decode1()
372 int32_t code_point; in uv_wtf8_length_as_utf16() local
375 code_point = uv__wtf8_decode1(&source_ptr); in uv_wtf8_length_as_utf16()
376 if (code_point < 0) in uv_wtf8_length_as_utf16()
378 if (code_point > 0xFFFF) in uv_wtf8_length_as_utf16()
390 int32_t code_point; in uv_wtf8_to_utf16() local
393 code_point = uv__wtf8_decode1(&source_ptr); in uv_wtf8_to_utf16()
395 assert(code_point >= 0); in uv_wtf8_to_utf16()
396 if (code_point > 0xFFFF) { in uv_wtf8_to_utf16()
397 assert(code_point < 0x10FFFF); in uv_wtf8_to_utf16()
398 *w_target++ = (((code_point - 0x10000) >> 10) + 0xD800); in uv_wtf8_to_utf16()
399 *w_target++ = ((code_point - 0x10000) & 0x3FF) + 0xDC00; in uv_wtf8_to_utf16()
402 *w_target++ = code_point; in uv_wtf8_to_utf16()
430 int32_t code_point; in uv_utf16_length_as_wtf8() local
434 code_point = uv__get_surrogate_value(w_source_ptr, w_source_len); in uv_utf16_length_as_wtf8()
436 assert(code_point >= 0); in uv_utf16_length_as_wtf8()
437 if (w_source_len < 0 && code_point == 0) in uv_utf16_length_as_wtf8()
439 if (code_point < 0x80) in uv_utf16_length_as_wtf8()
441 else if (code_point < 0x800) in uv_utf16_length_as_wtf8()
443 else if (code_point < 0x10000) in uv_utf16_length_as_wtf8()
467 int32_t code_point; in uv_utf16_to_wtf8() local
497 code_point = uv__get_surrogate_value(w_source_ptr, w_source_len); in uv_utf16_to_wtf8()
499 assert(code_point >= 0); in uv_utf16_to_wtf8()
500 if (w_source_len < 0 && code_point == 0) { in uv_utf16_to_wtf8()
504 if (code_point < 0x80) { in uv_utf16_to_wtf8()
505 *target++ = code_point; in uv_utf16_to_wtf8()
506 } else if (code_point < 0x800) { in uv_utf16_to_wtf8()
507 *target++ = 0xC0 | (code_point >> 6); in uv_utf16_to_wtf8()
510 *target++ = 0x80 | (code_point & 0x3F); in uv_utf16_to_wtf8()
511 } else if (code_point < 0x10000) { in uv_utf16_to_wtf8()
512 *target++ = 0xE0 | (code_point >> 12); in uv_utf16_to_wtf8()
515 *target++ = 0x80 | ((code_point >> 6) & 0x3F); in uv_utf16_to_wtf8()
518 *target++ = 0x80 | (code_point & 0x3F); in uv_utf16_to_wtf8()
520 *target++ = 0xF0 | (code_point >> 18); in uv_utf16_to_wtf8()
523 *target++ = 0x80 | ((code_point >> 12) & 0x3F); in uv_utf16_to_wtf8()
526 *target++ = 0x80 | ((code_point >> 6) & 0x3F); in uv_utf16_to_wtf8()
529 *target++ = 0x80 | (code_point & 0x3F); in uv_utf16_to_wtf8()