Lines Matching refs:TOP_BITS
39 #define TOP_BITS(n) ((uint8_t)~BOTTOM_BITS(8 - (n))) macro
52 if ((c & TOP_BITS(3)) == TOP_BITS(2)) { in cbs_get_utf8()
56 } else if ((c & TOP_BITS(4)) == TOP_BITS(3)) { in cbs_get_utf8()
60 } else if ((c & TOP_BITS(5)) == TOP_BITS(4)) { in cbs_get_utf8()
69 (c & TOP_BITS(2)) != TOP_BITS(1)) { in cbs_get_utf8()
128 return CBB_add_u8(cbb, TOP_BITS(2) | (u >> 6)) && in cbb_add_utf8()
129 CBB_add_u8(cbb, TOP_BITS(1) | (u & BOTTOM_BITS(6))); in cbb_add_utf8()
132 return CBB_add_u8(cbb, TOP_BITS(3) | (u >> 12)) && in cbb_add_utf8()
133 CBB_add_u8(cbb, TOP_BITS(1) | ((u >> 6) & BOTTOM_BITS(6))) && in cbb_add_utf8()
134 CBB_add_u8(cbb, TOP_BITS(1) | (u & BOTTOM_BITS(6))); in cbb_add_utf8()
137 return CBB_add_u8(cbb, TOP_BITS(4) | (u >> 18)) && in cbb_add_utf8()
138 CBB_add_u8(cbb, TOP_BITS(1) | ((u >> 12) & BOTTOM_BITS(6))) && in cbb_add_utf8()
139 CBB_add_u8(cbb, TOP_BITS(1) | ((u >> 6) & BOTTOM_BITS(6))) && in cbb_add_utf8()
140 CBB_add_u8(cbb, TOP_BITS(1) | (u & BOTTOM_BITS(6))); in cbb_add_utf8()