Lines Matching +full:0 +full:xfffe

18     if (codepoint > 0x10FFFFu) {  in is_valid_codepoint()
21 if ((codepoint >= 0xFDD0 && codepoint <= 0xFDEF) in is_valid_codepoint()
22 || (codepoint & 0xFFFE) == 0xFFFE) { in is_valid_codepoint()
25 if (codepoint >= 0xD800 && codepoint <= 0xDFFF) { in is_valid_codepoint()
44 * If @s points to an impossible byte (0xFE or 0xFF) or a continuation
64 static int min_cp[5] = { 0x80, 0x800, 0x10000, 0x200000, 0x4000000 }; in mod_utf8_codepoint()
69 if (n == 0 || *s == 0) { in mod_utf8_codepoint()
77 if (byte < 0x80) { in mod_utf8_codepoint()
79 } else if (byte >= 0xFE) { in mod_utf8_codepoint()
80 cp = -1; /* impossible bytes 0xFE, 0xFF */ in mod_utf8_codepoint()
81 } else if ((byte & 0x40) == 0) { in mod_utf8_codepoint()
85 len = 0; in mod_utf8_codepoint()
86 for (mask = 0x80; byte & mask; mask >>= 1) { in mod_utf8_codepoint()
92 byte = i < n ? *p : 0; in mod_utf8_codepoint()
93 if ((byte & 0xC0) != 0x80) { in mod_utf8_codepoint()
99 cp |= byte & 0x3F; in mod_utf8_codepoint()
103 } else if (cp < min_cp[len - 2] && !(cp == 0 && len == 2)) { in mod_utf8_codepoint()
132 if (codepoint > 0 && codepoint <= 0x7F) { in mod_utf8_encode()
133 buf[0] = codepoint & 0x7F; in mod_utf8_encode()
134 buf[1] = 0; in mod_utf8_encode()
137 if (codepoint <= 0x7FF) { in mod_utf8_encode()
138 buf[0] = 0xC0 | ((codepoint >> 6) & 0x1F); in mod_utf8_encode()
139 buf[1] = 0x80 | (codepoint & 0x3F); in mod_utf8_encode()
140 buf[2] = 0; in mod_utf8_encode()
143 if (codepoint <= 0xFFFF) { in mod_utf8_encode()
144 buf[0] = 0xE0 | ((codepoint >> 12) & 0x0F); in mod_utf8_encode()
145 buf[1] = 0x80 | ((codepoint >> 6) & 0x3F); in mod_utf8_encode()
146 buf[2] = 0x80 | (codepoint & 0x3F); in mod_utf8_encode()
147 buf[3] = 0; in mod_utf8_encode()
150 buf[0] = 0xF0 | ((codepoint >> 18) & 0x07); in mod_utf8_encode()
151 buf[1] = 0x80 | ((codepoint >> 12) & 0x3F); in mod_utf8_encode()
152 buf[2] = 0x80 | ((codepoint >> 6) & 0x3F); in mod_utf8_encode()
153 buf[3] = 0x80 | (codepoint & 0x3F); in mod_utf8_encode()
154 buf[4] = 0; in mod_utf8_encode()