Lines Matching refs:k
115 static int utf32_utf8(char *buf, int k) in utf32_utf8() argument
119 if (k < 0x80) { in utf32_utf8()
120 buf[0] = k; in utf32_utf8()
122 } else if (k < 0x800) { in utf32_utf8()
123 buf[0] = 0xc0 | (k >> 6); in utf32_utf8()
124 buf[1] = 0x80 | (k & 0x3f); in utf32_utf8()
126 } else if (k < 0x10000) { in utf32_utf8()
127 buf[0] = 0xe0 | (k >> 12); in utf32_utf8()
128 buf[1] = 0x80 | ((k >> 6) & 0x3f); in utf32_utf8()
129 buf[2] = 0x80 | (k & 0x3f); in utf32_utf8()
131 } else if (k < 0x200000) { in utf32_utf8()
132 buf[0] = 0xf0 | (k >> 18); in utf32_utf8()
133 buf[1] = 0x80 | ((k >> 12) & 0x3f); in utf32_utf8()
134 buf[2] = 0x80 | ((k >> 6) & 0x3f); in utf32_utf8()
135 buf[3] = 0x80 | (k & 0x3f); in utf32_utf8()
137 } else if (k < 0x4000000) { in utf32_utf8()
138 buf[0] = 0xf8 | (k >> 24); in utf32_utf8()
139 buf[1] = 0x80 | ((k >> 18) & 0x3f); in utf32_utf8()
140 buf[2] = 0x80 | ((k >> 12) & 0x3f); in utf32_utf8()
141 buf[3] = 0x80 | ((k >> 6) & 0x3f); in utf32_utf8()
142 buf[4] = 0x80 | (k & 0x3f); in utf32_utf8()
145 buf[0] = 0xfc | (k >> 30); in utf32_utf8()
146 buf[1] = 0x80 | ((k >> 24) & 0x3f); in utf32_utf8()
147 buf[2] = 0x80 | ((k >> 18) & 0x3f); in utf32_utf8()
148 buf[3] = 0x80 | ((k >> 12) & 0x3f); in utf32_utf8()
149 buf[4] = 0x80 | ((k >> 6) & 0x3f); in utf32_utf8()
150 buf[5] = 0x80 | (k & 0x3f); in utf32_utf8()