Home
last modified time | relevance | path

Searched refs:c32 (Results 1 – 4 of 4) sorted by relevance

/bionic/libc/bionic/
Dc32rtomb.cpp35 size_t c32rtomb(char* s, char32_t c32, mbstate_t* ps) { in c32rtomb() argument
48 if (c32 == U'\0') { in c32rtomb()
57 if ((c32 & ~0x7f) == 0) { in c32rtomb()
59 *s = c32; in c32rtomb()
69 if ((c32 & ~0x7f) == 0) { in c32rtomb()
72 } else if ((c32 & ~0x7ff) == 0) { in c32rtomb()
75 } else if ((c32 & ~0xffff) == 0) { in c32rtomb()
78 } else if ((c32 & ~0x1fffff) == 0) { in c32rtomb()
91 s[i] = (c32 & 0x3f) | 0x80; in c32rtomb()
92 c32 >>= 6; in c32rtomb()
[all …]
Dmbrtoc16.cpp40 static size_t begin_surrogate(char32_t c32, char16_t* pc16, in begin_surrogate() argument
42 c32 -= 0x10000; in begin_surrogate()
43 char16_t trail = (c32 & 0x3ff) | 0xdc00; in begin_surrogate()
49 *pc16 = ((c32 & 0xffc00) >> 10) | 0xd800; in begin_surrogate()
74 char32_t c32; in mbrtoc16() local
75 size_t nconv = mbrtoc32(&c32, s, n, state); in mbrtoc16()
80 } else if (c32 > 0x10ffff) { in mbrtoc16()
83 } else if (c32 < 0x10000) { in mbrtoc16()
84 *pc16 = static_cast<char16_t>(c32); in mbrtoc16()
87 return begin_surrogate(c32, pc16, nconv, state); in mbrtoc16()
Dmbrtoc32.cpp120 char32_t c32 = mbstate_get_byte(state, 0) & mask; in mbrtoc32() local
122 c32 <<= 6; in mbrtoc32()
123 c32 |= mbstate_get_byte(state, i) & 0x3f; in mbrtoc32()
126 if (c32 < lower_bound) { in mbrtoc32()
130 if ((c32 >= 0xd800 && c32 <= 0xdfff) || (c32 > 0x10ffff)) { in mbrtoc32()
135 *pc32 = c32; in mbrtoc32()
137 return mbstate_reset_and_return(c32 == U'\0' ? 0 : bytes_wanted, state); in mbrtoc32()
Dc16rtomb.cpp48 char32_t c32 = (c16 & ~0xd800) << 10; in c16rtomb() local
49 mbstate_set_byte(state, 3, (c32 & 0xff0000) >> 16); in c16rtomb()
50 mbstate_set_byte(state, 2, (c32 & 0x00ff00) >> 8); in c16rtomb()
62 char32_t c32 = ((mbstate_get_byte(state, 3) << 16) | in c16rtomb() local
65 return mbstate_reset_and_return(c32rtomb(s, c32, nullptr), state); in c16rtomb()