Lines Matching refs:codepoint
342 write_codepoint(struct spdk_json_write_ctx *w, uint32_t codepoint) in write_codepoint() argument
361 if (codepoint < sizeof(escapes) && escapes[codepoint]) { in write_codepoint()
363 out[1] = escapes[codepoint]; in write_codepoint()
365 } else if (codepoint >= 0x20 && codepoint < 0x7F) { in write_codepoint()
370 out[0] = (uint8_t)codepoint; in write_codepoint()
372 } else if (codepoint < 0x10000) { in write_codepoint()
375 write_hex_4(&out[2], (uint16_t)codepoint); in write_codepoint()
378 utf16_encode_surrogate_pair(codepoint, &high, &low); in write_codepoint()
401 uint32_t codepoint; in write_string_or_name() local
406 codepoint = utf8_decode_unsafe_1(p); in write_string_or_name()
409 codepoint = utf8_decode_unsafe_2(p); in write_string_or_name()
412 codepoint = utf8_decode_unsafe_3(p); in write_string_or_name()
415 codepoint = utf8_decode_unsafe_4(p); in write_string_or_name()
421 if (write_codepoint(w, codepoint)) { return fail(w); } in write_string_or_name()
438 uint32_t codepoint; in write_string_or_name_utf16le() local
443 codepoint = from_le16(&p[0]); in write_string_or_name_utf16le()
446 codepoint = utf16_decode_surrogate_pair(from_le16(&p[0]), from_le16(&p[1])); in write_string_or_name_utf16le()
452 if (write_codepoint(w, codepoint)) { return fail(w); } in write_string_or_name_utf16le()